|
|
@ -1,6 +1,6 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<view class="group-con"> |
|
|
|
<view class="group-con"> |
|
|
|
<view class="header acea-row row-between-wrapper"> |
|
|
|
<view class="header acea-row row-between-wrapper" v-if="storeCombination"> |
|
|
|
<view class="pictrue"> |
|
|
|
<view class="pictrue"> |
|
|
|
<image :src="storeCombination.image" /> |
|
|
|
<image :src="storeCombination.image" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -15,20 +15,13 @@ |
|
|
|
<view v-if="pinkBool === -1" class="iconfont icon-pintuanshibai"></view> |
|
|
|
<view v-if="pinkBool === -1" class="iconfont icon-pintuanshibai"></view> |
|
|
|
<view v-else-if="pinkBool === 1" class="iconfont icon-pintuanchenggong font-color-red"></view> |
|
|
|
<view v-else-if="pinkBool === 1" class="iconfont icon-pintuanchenggong font-color-red"></view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="wrapper"> |
|
|
|
<view class="wrapper" v-if="pinkT"> |
|
|
|
<view class="title acea-row row-center-wrapper"> |
|
|
|
<view class="title acea-row row-center-wrapper"> |
|
|
|
<view class="line"></view> |
|
|
|
<view class="line"></view> |
|
|
|
<view class="name acea-row row-center-wrapper"> |
|
|
|
<view class="name acea-row row-center-wrapper"> |
|
|
|
<text>剩余</text> |
|
|
|
<text>剩余</text> |
|
|
|
<count-down |
|
|
|
<count-down :isDay="true" :tipText="'倒计时 '" :dayText="' 天 '" :hourText="' 时 '" :minuteText="' 分 '" |
|
|
|
:isDay="false" |
|
|
|
:secondText="' 秒'" :datatime="pinkT.stopTime/1000"></count-down> |
|
|
|
:tipText="false" |
|
|
|
|
|
|
|
:dayText="false" |
|
|
|
|
|
|
|
:hourText="' : '" |
|
|
|
|
|
|
|
:minuteText="' : '" |
|
|
|
|
|
|
|
:secondText="false" |
|
|
|
|
|
|
|
:datatime="pinkT.stopTime/1000" |
|
|
|
|
|
|
|
></count-down> |
|
|
|
|
|
|
|
<text>结束</text> |
|
|
|
<text>结束</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="line"></view> |
|
|
|
<view class="line"></view> |
|
|
@ -38,11 +31,10 @@ |
|
|
|
<text class="tips" v-else-if="pinkBool === -1">还差{{ count }}人,拼团失败</text> |
|
|
|
<text class="tips" v-else-if="pinkBool === -1">还差{{ count }}人,拼团失败</text> |
|
|
|
<text class="tips font-color-red" v-else-if="pinkBool === 0">拼团中,还差{{ count }}人拼团成功</text> |
|
|
|
<text class="tips font-color-red" v-else-if="pinkBool === 0">拼团中,还差{{ count }}人拼团成功</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view |
|
|
|
|
|
|
|
class="list acea-row row-middle" |
|
|
|
<view class="list acea-row row-middle" |
|
|
|
:class="[pinkBool === 1 || pinkBool === -1 ? 'result' : '',iShidden ? 'on' : '']" |
|
|
|
:class="[pinkBool === 1 || pinkBool === -1 ? 'result' : '',iShidden ? 'on' : '']"> |
|
|
|
> |
|
|
|
<view class="pictrue" v-if="pinkT"> |
|
|
|
<view class="pictrue"> |
|
|
|
|
|
|
|
<image :src="pinkT.avatar" /> |
|
|
|
<image :src="pinkT.avatar" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="acea-row row-middle" v-if="pinkAll.length > 0"> |
|
|
|
<view class="acea-row row-middle" v-if="pinkAll.length > 0"> |
|
|
@ -54,29 +46,17 @@ |
|
|
|
<image class="img-none" src="@/static/images/vacancy.png" /> |
|
|
|
<image class="img-none" src="@/static/images/vacancy.png" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view |
|
|
|
<view v-if="(pinkBool === 1 || pinkBool === -1) && count > 9" class="lookAll acea-row row-center-wrapper" |
|
|
|
v-if="(pinkBool === 1 || pinkBool === -1) && count > 9" |
|
|
|
@click="lookAll"> |
|
|
|
class="lookAll acea-row row-center-wrapper" |
|
|
|
|
|
|
|
@click="lookAll" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{{ iShidden ? "收起" : "查看全部" }} |
|
|
|
{{ iShidden ? "收起" : "查看全部" }} |
|
|
|
<text class="iconfont" :class="iShidden ? 'icon-xiangshang' : 'icon-xiangxia'"></text> |
|
|
|
<text class="iconfont" :class="iShidden ? 'icon-xiangshang' : 'icon-xiangxia'"></text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view |
|
|
|
<view class="teamBnt bg-color-red" v-if="userBool === 1 && isOk == 0 && pinkBool === 0" @click="goPoster">邀请好友参团 |
|
|
|
class="teamBnt bg-color-red" |
|
|
|
</view> |
|
|
|
v-if="userBool === 1 && isOk == 0 && pinkBool === 0" |
|
|
|
<view class="teamBnt bg-color-red" v-else-if="userBool === 0 && pinkBool === 0 && count > 0" @click="pay">我要参团 |
|
|
|
@click="goPoster" |
|
|
|
</view> |
|
|
|
>邀请好友参团</view> |
|
|
|
<view class="teamBnt bg-color-red" v-if="pinkBool === 1 || pinkBool === -1" |
|
|
|
<view |
|
|
|
@click="goDetail(storeCombination.id)">再次开团</view> |
|
|
|
class="teamBnt bg-color-red" |
|
|
|
|
|
|
|
v-else-if="userBool === 0 && pinkBool === 0 && count > 0" |
|
|
|
|
|
|
|
@click="pay" |
|
|
|
|
|
|
|
>我要参团</view> |
|
|
|
|
|
|
|
<view |
|
|
|
|
|
|
|
class="teamBnt bg-color-red" |
|
|
|
|
|
|
|
v-if="pinkBool === 1 || pinkBool === -1" |
|
|
|
|
|
|
|
@click="goDetail(storeCombination.id)" |
|
|
|
|
|
|
|
>再次开团</view> |
|
|
|
|
|
|
|
<view class="cancel" @click="getCombinationRemove" v-if="pinkBool === 0 && userBool === 1"> |
|
|
|
<view class="cancel" @click="getCombinationRemove" v-if="pinkBool === 0 && userBool === 1"> |
|
|
|
<text class="iconfont icon-guanbi3"></text> |
|
|
|
<text class="iconfont icon-guanbi3"></text> |
|
|
|
<text>取消开团</text> |
|
|
|
<text>取消开团</text> |
|
|
@ -90,9 +70,18 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import CountDown from "@/components/CountDown"; |
|
|
|
import CountDown from "@/components/CountDown"; |
|
|
|
import { getCombinationPink, getCombinationRemove } from "@/api/activity"; |
|
|
|
import { |
|
|
|
import { postCartAdd } from "@/api/store"; |
|
|
|
getCombinationPink, |
|
|
|
import { isWeixin, parseQuery, handleQrCode } from "@/utils/index"; |
|
|
|
getCombinationRemove |
|
|
|
|
|
|
|
} from "@/api/activity"; |
|
|
|
|
|
|
|
import { |
|
|
|
|
|
|
|
postCartAdd |
|
|
|
|
|
|
|
} from "@/api/store"; |
|
|
|
|
|
|
|
import { |
|
|
|
|
|
|
|
isWeixin, |
|
|
|
|
|
|
|
parseQuery, |
|
|
|
|
|
|
|
handleQrCode |
|
|
|
|
|
|
|
} from "@/utils/index"; |
|
|
|
|
|
|
|
|
|
|
|
const NAME = "GroupRule"; |
|
|
|
const NAME = "GroupRule"; |
|
|
|
export default { |
|
|
|
export default { |
|
|
@ -108,8 +97,8 @@ export default { |
|
|
|
pinkBool: 0, //判断拼团是否成功|0=失败,1=成功 |
|
|
|
pinkBool: 0, //判断拼团是否成功|0=失败,1=成功 |
|
|
|
userBool: 0, //判断当前用户是否在团内|0=未在,1=在 |
|
|
|
userBool: 0, //判断当前用户是否在团内|0=未在,1=在 |
|
|
|
pinkAll: [], //团员 |
|
|
|
pinkAll: [], //团员 |
|
|
|
pinkT: [], //团长信息 |
|
|
|
pinkT: {}, //团长信息 |
|
|
|
storeCombination: [], //拼团产品 |
|
|
|
storeCombination: {}, //拼团产品 |
|
|
|
pinkId: 0, |
|
|
|
pinkId: 0, |
|
|
|
uniqueId: "", |
|
|
|
uniqueId: "", |
|
|
|
count: 0, //拼团剩余人数 |
|
|
|
count: 0, //拼团剩余人数 |
|
|
@ -156,8 +145,7 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
.catch(err => { |
|
|
|
uni.showToast({ |
|
|
|
uni.showToast({ |
|
|
|
title: |
|
|
|
title: err.msg || err.response.data.msg || err.response.data.message, |
|
|
|
err.msg || err.response.data.msg || err.response.data.message, |
|
|
|
|
|
|
|
icon: "none", |
|
|
|
icon: "none", |
|
|
|
duration: 2000 |
|
|
|
duration: 2000 |
|
|
|
}); |
|
|
|
}); |
|
|
|