|
@@ -2,7 +2,6 @@
|
|
<mobile-frame>
|
|
<mobile-frame>
|
|
<view class="main">
|
|
<view class="main">
|
|
<view class="one">
|
|
<view class="one">
|
|
- <!-- <view class="one_1">参团商品</view> -->
|
|
|
|
<view class="list" @tap="toView">
|
|
<view class="list" @tap="toView">
|
|
<image class="image" :src="goodsInfo.file&&goodsInfo.file.length>0?goodsInfo.file[0].url:''"
|
|
<image class="image" :src="goodsInfo.file&&goodsInfo.file.length>0?goodsInfo.file[0].url:''"
|
|
mode="">
|
|
mode="">
|
|
@@ -11,6 +10,10 @@
|
|
<view class="name">
|
|
<view class="name">
|
|
{{goodsInfo.name||'暂无'}}
|
|
{{goodsInfo.name||'暂无'}}
|
|
</view>
|
|
</view>
|
|
|
|
+ <view class="specs">
|
|
|
|
+ <text>规格:{{specsInfo.name}}</text>
|
|
|
|
+ <text>店铺:{{shopInfo.name}}</text>
|
|
|
|
+ </view>
|
|
<view class="money">
|
|
<view class="money">
|
|
<text>¥</text>
|
|
<text>¥</text>
|
|
<text>{{specsInfo.sell_money}}</text>
|
|
<text>{{specsInfo.sell_money}}</text>
|
|
@@ -22,36 +25,38 @@
|
|
<button type="default" size="default" @click="toGroup()">我要开团</button>
|
|
<button type="default" size="default" @click="toGroup()">我要开团</button>
|
|
</view>
|
|
</view>
|
|
<view class="thr">
|
|
<view class="thr">
|
|
- <!-- <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="">
|
|
|
|
- </image>
|
|
|
|
- <view class="list_1">
|
|
|
|
- <view class="name">
|
|
|
|
- {{item.name||'暂无'}}
|
|
|
|
- </view>
|
|
|
|
- <view class="some">
|
|
|
|
- <text>店铺名称</text>
|
|
|
|
- <text>{{item.name||'暂无'}}</text>
|
|
|
|
- </view>
|
|
|
|
- <view class="some">
|
|
|
|
- <text>规格名称</text>
|
|
|
|
- <text>{{item.name||'暂无'}}</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="toJoin(item)"><text>已参团{{item.num||'5'}}人</text>立即参团</view>
|
|
|
|
|
|
+ <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="">
|
|
|
|
+ </image>
|
|
|
|
+ <view class="list_1">
|
|
|
|
+ <view class="name">
|
|
|
|
+ {{item.leader||'暂无'}}
|
|
|
|
+ </view>
|
|
|
|
+ <view class="some">
|
|
|
|
+ <text>商品名称</text>
|
|
|
|
+ <text>{{item.name||'暂无'}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="some">
|
|
|
|
+ <text>参团人数</text>
|
|
|
|
+ <text>{{item.num||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="toJoin(item)">
|
|
|
|
+ <text>{{item.status||'开团中'}}</text>立即参团
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- <!-- </view>
|
|
|
|
- </scroll-view> -->
|
|
|
|
|
|
+ </scroll-view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</mobile-frame>
|
|
</mobile-frame>
|
|
@@ -75,6 +80,7 @@
|
|
"name": "商品6",
|
|
"name": "商品6",
|
|
"view_num": 54,
|
|
"view_num": 54,
|
|
"sell_money": 1,
|
|
"sell_money": 1,
|
|
|
|
+ "leader": '测试人员',
|
|
"file": [{
|
|
"file": [{
|
|
"id": "20221010102439",
|
|
"id": "20221010102439",
|
|
"name": "ece9214111e760727a166eaac037fdc0.jpg",
|
|
"name": "ece9214111e760727a166eaac037fdc0.jpg",
|
|
@@ -89,6 +95,7 @@
|
|
"name": "王大拿商品1",
|
|
"name": "王大拿商品1",
|
|
"view_num": 37,
|
|
"view_num": 37,
|
|
"sell_money": 15,
|
|
"sell_money": 15,
|
|
|
|
+ "leader": '测试人员',
|
|
"file": [{
|
|
"file": [{
|
|
"id": "20221010100628",
|
|
"id": "20221010100628",
|
|
"name": "0e7edbb2f8e99780f253a3604adc32e4.jpg",
|
|
"name": "0e7edbb2f8e99780f253a3604adc32e4.jpg",
|
|
@@ -103,6 +110,7 @@
|
|
"name": "王大拿商品2",
|
|
"name": "王大拿商品2",
|
|
"view_num": 196,
|
|
"view_num": 196,
|
|
"sell_money": 50,
|
|
"sell_money": 50,
|
|
|
|
+ "leader": '测试人员',
|
|
"file": [{
|
|
"file": [{
|
|
"id": "20221011092711",
|
|
"id": "20221011092711",
|
|
"name": "25.png",
|
|
"name": "25.png",
|
|
@@ -117,6 +125,7 @@
|
|
"name": "test",
|
|
"name": "test",
|
|
"view_num": 265,
|
|
"view_num": 265,
|
|
"sell_money": 0.1,
|
|
"sell_money": 0.1,
|
|
|
|
+ "leader": '测试人员',
|
|
"file": [{
|
|
"file": [{
|
|
"id": "20220929141236",
|
|
"id": "20220929141236",
|
|
"name": "f0e22552dddcf494f9720c655a8420a.png",
|
|
"name": "f0e22552dddcf494f9720c655a8420a.png",
|
|
@@ -131,6 +140,7 @@
|
|
"name": "测试店铺1-商品1",
|
|
"name": "测试店铺1-商品1",
|
|
"view_num": 59,
|
|
"view_num": 59,
|
|
"sell_money": 0.1,
|
|
"sell_money": 0.1,
|
|
|
|
+ "leader": '测试人员',
|
|
"file": [{
|
|
"file": [{
|
|
"id": "20220929141236",
|
|
"id": "20220929141236",
|
|
"name": "f0e22552dddcf494f9720c655a8420a.png",
|
|
"name": "f0e22552dddcf494f9720c655a8420a.png",
|
|
@@ -145,6 +155,7 @@
|
|
"name": "商品2",
|
|
"name": "商品2",
|
|
"view_num": 164,
|
|
"view_num": 164,
|
|
"sell_money": 1,
|
|
"sell_money": 1,
|
|
|
|
+ "leader": '测试人员',
|
|
"file": [{
|
|
"file": [{
|
|
"id": "20220929163309",
|
|
"id": "20220929163309",
|
|
"name": "f0e22552dddcf494f9720c655a8420a.png",
|
|
"name": "f0e22552dddcf494f9720c655a8420a.png",
|
|
@@ -178,7 +189,7 @@
|
|
async toGroup() {
|
|
async toGroup() {
|
|
const that = this;
|
|
const that = this;
|
|
let user = that.user;
|
|
let user = that.user;
|
|
- if (user) {
|
|
|
|
|
|
+ if (user._id) {
|
|
let data = {
|
|
let data = {
|
|
shop: that.shopInfo._id,
|
|
shop: that.shopInfo._id,
|
|
goods: that.goodsInfo._id,
|
|
goods: that.goodsInfo._id,
|
|
@@ -195,20 +206,27 @@
|
|
that.search()
|
|
that.search()
|
|
} else {
|
|
} else {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
- title: arr.data.errmsg || '下单失败!',
|
|
|
|
|
|
+ title: arr.data.errmsg,
|
|
icon: 'none'
|
|
icon: 'none'
|
|
})
|
|
})
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- uni.showToast({
|
|
|
|
- title: '无用户登录无法开团',
|
|
|
|
- icon: 'none'
|
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: `/pages/login/index`
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 立即参团
|
|
// 立即参团
|
|
toJoin(e) {
|
|
toJoin(e) {
|
|
- console.log(e);
|
|
|
|
|
|
+ const that = this;
|
|
|
|
+ let user = that.user;
|
|
|
|
+ if (user._id) {
|
|
|
|
+ console.log(e);
|
|
|
|
+ } else {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: `/pages/login/index`
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 监听用户是否登录
|
|
// 监听用户是否登录
|
|
watchLogin() {
|
|
watchLogin() {
|
|
@@ -290,12 +308,6 @@
|
|
height: 100vh;
|
|
height: 100vh;
|
|
|
|
|
|
.one {
|
|
.one {
|
|
- .one_1 {
|
|
|
|
- text-align: center;
|
|
|
|
- font-size: var(--font16Size);
|
|
|
|
- font-weight: bold;
|
|
|
|
- margin: 2vw 0;
|
|
|
|
- }
|
|
|
|
|
|
|
|
.list {
|
|
.list {
|
|
display: flex;
|
|
display: flex;
|
|
@@ -326,6 +338,13 @@
|
|
margin: 0 0 1vw 0;
|
|
margin: 0 0 1vw 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ .specs {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ color: var(--f85Color);
|
|
|
|
+ font-size: var(--font12Size);
|
|
|
|
+ }
|
|
|
|
+
|
|
.money {
|
|
.money {
|
|
color: var(--fFB1Color);
|
|
color: var(--fFB1Color);
|
|
font-size: var(--font14Size);
|
|
font-size: var(--font14Size);
|
|
@@ -340,8 +359,7 @@
|
|
}
|
|
}
|
|
|
|
|
|
.two {
|
|
.two {
|
|
- margin: 4vw 0;
|
|
|
|
- text-align: center;
|
|
|
|
|
|
+ margin: 4vw 0 0 0;
|
|
|
|
|
|
button {
|
|
button {
|
|
margin: 0 2vw 2vw 2vw;
|
|
margin: 0 2vw 2vw 2vw;
|