|
@@ -28,30 +28,28 @@
|
|
|
<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
|
|
|
<view class="list-scroll-view">
|
|
|
<view class="list" v-for="(item, index) in list" :key="index">
|
|
|
- <image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''" mode="">
|
|
|
+ <view class="image">
|
|
|
+ <image class="file" v-for="(tag, indexs) in item.persons.slice(0,7)" :key="indexs"
|
|
|
+ :src="tag.icon&&tag.icon.length>0?tag.icon[0].url:''" mode="">
|
|
|
+
|
|
|
+ </view>
|
|
|
</image>
|
|
|
<view class="list_1">
|
|
|
<view class="name">
|
|
|
- {{item.leader||'暂无'}}
|
|
|
+ {{item.person_limit||0}}人即可开团成功
|
|
|
</view>
|
|
|
<view class="some">
|
|
|
- <text>商品名称</text>
|
|
|
- <text>{{item.name||'暂无'}}</text>
|
|
|
+ <text>团长</text>
|
|
|
+ <text>{{item.leader.name||'暂无'}}</text>
|
|
|
</view>
|
|
|
<view class="some">
|
|
|
<text>参团人数</text>
|
|
|
- <text>{{item.person_limit||0}}人</text>
|
|
|
+ <text>{{item.persons.length||0}}人</text>
|
|
|
</view>
|
|
|
- <view class="other">
|
|
|
- <view class="other_1">
|
|
|
- <text>¥</text>
|
|
|
- <text>{{item.sell_money||0}}</text>
|
|
|
- </view>
|
|
|
- <view class="other_2">
|
|
|
- <view class="btn" @click="onSubmit(item)">
|
|
|
- <text>{{item.status||'开团中'}}</text>立即参团
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ </view>
|
|
|
+ <view class="other">
|
|
|
+ <view class="btn" @click="onSubmit(item)">
|
|
|
+ <text>{{item.zhStatus||'暂无状态'}}</text>立即参团
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -91,6 +89,7 @@
|
|
|
shopInfo: {},
|
|
|
// 参团列表
|
|
|
list: [],
|
|
|
+ statusList: [],
|
|
|
num: 1,
|
|
|
total: 0,
|
|
|
skip: 0,
|
|
@@ -105,10 +104,10 @@
|
|
|
specs_id: e.specs_id || '634394bc32c3065a80eb14ad'
|
|
|
});
|
|
|
},
|
|
|
- onShow: function() {
|
|
|
+ onShow: async function() {
|
|
|
const that = this;
|
|
|
- that.watchLogin();
|
|
|
- that.search();
|
|
|
+ await that.watchLogin();
|
|
|
+ await that.search();
|
|
|
},
|
|
|
methods: {
|
|
|
// 开团
|
|
@@ -140,6 +139,7 @@
|
|
|
let arr = await that.$api(`/util/checkCanBuy`, 'POST', data)
|
|
|
if (arr.errcode == '0') {
|
|
|
if (arr.data.result == true) {
|
|
|
+ that.clearPage();
|
|
|
uni.navigateTo({
|
|
|
url: `/pagesHome/order/order?key=${arr.data.key}`
|
|
|
})
|
|
@@ -166,9 +166,15 @@
|
|
|
const that = this;
|
|
|
uni.getStorage({
|
|
|
key: 'token',
|
|
|
- success: function(res) {
|
|
|
+ success: async function(res) {
|
|
|
let user = that.$jwt(res.data);
|
|
|
that.$set(that, `user`, user);
|
|
|
+ let status = await that.$api(`/dictData`, 'GET', {
|
|
|
+ code: "group_status"
|
|
|
+ });
|
|
|
+ if (status.errcode == '0') {
|
|
|
+ that.$set(that, `statusList`, status.data)
|
|
|
+ }
|
|
|
},
|
|
|
fail: function(err) {}
|
|
|
})
|
|
@@ -191,12 +197,18 @@
|
|
|
let info = {
|
|
|
skip: that.skip,
|
|
|
limit: that.limit,
|
|
|
+ goodsSpec: that.query.specs_id,
|
|
|
+ status: '0'
|
|
|
}
|
|
|
res = await that.$api(`/group`, 'GET', {
|
|
|
...info
|
|
|
})
|
|
|
if (res.errcode == '0') {
|
|
|
let list = [...that.list, ...res.data];
|
|
|
+ for (let val of list) {
|
|
|
+ let status = that.statusList.find(i => i.value == val.status)
|
|
|
+ if (status) val.zhStatus = status.label;
|
|
|
+ }
|
|
|
that.$set(that, `list`, list);
|
|
|
that.$set(that, `total`, res.total)
|
|
|
}
|
|
@@ -318,10 +330,17 @@
|
|
|
border-radius: 5px;
|
|
|
|
|
|
.image {
|
|
|
- width: 25vw;
|
|
|
- height: 25vw;
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ width: 27vw;
|
|
|
+ height: 27vw;
|
|
|
border-radius: 5px;
|
|
|
margin: 0 2vw 0 0;
|
|
|
+
|
|
|
+ .file {
|
|
|
+ width: 9vw;
|
|
|
+ height: 9vw;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.list_1 {
|
|
@@ -345,39 +364,22 @@
|
|
|
color: var(--f00Color);
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- .other {
|
|
|
+ .other {
|
|
|
+ .btn {
|
|
|
display: flex;
|
|
|
- justify-content: space-between;
|
|
|
+ flex-direction: column;
|
|
|
align-items: center;
|
|
|
+ margin: 0 2vw;
|
|
|
+ padding: 2vw 3vw;
|
|
|
+ background-color: var(--ff0Color);
|
|
|
+ color: var(--fffColor);
|
|
|
+ border-radius: 2vw;
|
|
|
+ font-size: var(--font14Size);
|
|
|
|
|
|
- .other_1 {
|
|
|
- font-size: var(--font14Size);
|
|
|
- color: var(--f85Color);
|
|
|
-
|
|
|
- text {
|
|
|
- font-weight: bold;
|
|
|
- padding: 0 1vw 0 0;
|
|
|
- color: var(--ff0Color);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .other_2 {
|
|
|
- .btn {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- align-items: center;
|
|
|
- margin: 0 2vw;
|
|
|
- padding: 2vw 3vw;
|
|
|
- background-color: var(--ff0Color);
|
|
|
- color: var(--fffColor);
|
|
|
- border-radius: 2vw;
|
|
|
- font-size: var(--font14Size);
|
|
|
-
|
|
|
- text {
|
|
|
- font-size: var(--font12Size);
|
|
|
- }
|
|
|
- }
|
|
|
+ text {
|
|
|
+ font-size: var(--font12Size);
|
|
|
}
|
|
|
}
|
|
|
}
|