zs před 2 roky
rodič
revize
4caf936dca
3 změnil soubory, kde provedl 38 přidání a 11 odebrání
  1. 11 0
      pagesHome/group/group.vue
  2. 26 10
      pagesMy/dough/index.vue
  3. 1 1
      pagesMy/order/after.vue

+ 11 - 0
pagesHome/group/group.vue

@@ -49,6 +49,9 @@
 											<view class="time">
 												人数限制:{{item.person_limit}}人
 											</view>
+											<!-- <view class="other_2">
+												原价:<text>¥{{item.sell_price||'暂无'}}</text>团购价:<text>¥{{item.group_price||'暂无'}}</text>
+											</view> -->
 										</view>
 									</view>
 								</view>
@@ -394,6 +397,14 @@
 									font-size: 14px;
 									color: #858585;
 								}
+								.other_2 {
+									font-size: var(--font14Size);
+								
+									text {
+										color: #ff0000;
+										padding: 0 2vw 0 0;
+									}
+								}
 							}
 						}
 					}

+ 26 - 10
pagesMy/dough/index.vue

@@ -172,16 +172,21 @@
 													<view class="other_1">
 														人数限制:<text>{{item.person_limit||'暂无'}}人</text>
 													</view>
+													<view class="other_2">
+														原价:<text>¥{{item.sell_price||'暂无'}}</text>团购价:<text>¥{{item.group_price||'暂无'}}</text>
+													</view>
 												</view>
 											</view>
 											<view class="btn">
-												<button type="default" v-if="item.can_group==true" size="mini"
-													@tap.stop="toCan(item)">开团</button>
+												<button type="default" v-if="item.can_group==true&&item.status!='1'"
+													size="mini" @tap.stop="toCan(item)">开团</button>
 												<button type="default" v-if="item.status=='0'" size="mini"
-													@tap.stop="toShare(item)">分享</button>
+													@tap.stop="toShare(item)">查看团购</button>
 												<button type="default" v-if="item.status=='0'||item.status=='1'"
-													size="mini" @tap.stop="toHandle(item)">团处理</button>
-												<button type="default" size="mini" @tap.stop="toSet(item)">设置状态</button>
+													size="mini" @tap.stop="toHandle(item)">团购订单</button>
+												<button type="default" size="mini"
+													v-if="item.status=='0'||item.status=='2'"
+													@tap.stop="toSet(item)">散团</button>
 											</view>
 										</view>
 									</view>
@@ -269,6 +274,11 @@
 			await that.search()
 			uni.stopPullDownRefresh();
 		},
+		onHide: async function() {
+			const that = this;
+			that.clearPage();
+			await that.search()
+		},
 		methods: {
 			// 监听用户是否登录
 			watchLogin() {
@@ -706,14 +716,11 @@
 				const that = this;
 				uni.showModal({
 					title: '提示',
-					content: e.status != '2' ? '确定将该团改为准备中吗?' : '确定解散该团吗?',
+					content: '确定解散该团吗?',
 					success: async function(res) {
 						if (res.confirm) {
-							let status = '';
-							if (e.status == '2') status = '-1'
-							else status = '2'
 							let arr = await that.$api(`/group/${e._id}`, 'POST', {
-								status: status
+								status: '-1'
 							}, 'group')
 							if (arr.errcode == '0') {
 								uni.showToast({
@@ -978,6 +985,15 @@
 											color: var(--f85Color);
 										}
 									}
+
+									.other_2 {
+										font-size: var(--font14Size);
+
+										text {
+											color: #ff0000;
+											padding: 0 2vw 0 0;
+										}
+									}
 								}
 							}
 

+ 1 - 1
pagesMy/order/after.vue

@@ -203,7 +203,7 @@
 				const that = this;
 				let list = that.list;
 				let limit = that.limit;
-				if (that.total > list.length) {
+				if (that.total > list.length) { 
 					uni.showLoading({
 						title: '加载中',
 						mask: true