Bladeren bron

no message

py 1 jaar geleden
bovenliggende
commit
e26a4a7853
3 gewijzigde bestanden met toevoegingen van 25 en 14 verwijderingen
  1. 10 2
      pages-buy/group-code.vue
  2. 14 11
      pages-buy/group-shop.vue
  3. 1 1
      pages-order/group-info.vue

+ 10 - 2
pages-buy/group-code.vue

@@ -74,8 +74,16 @@
 					order_id: this.order_id
 				}).then((res) => {
 					if (res.code === 1) {
-						if (this.codeData.code.length >= res.data.code.length) {
-							return
+						if (res.data.code.length === 0) {
+							tools.error('暂无可用券')
+							setTimeout(() => {
+								tools.leftClick()
+							}, 1000)
+						}
+						if (this.codeData.code.length != 0) {
+							if (this.codeData.code.length == res.data.code.length) {
+								return
+							}
 						}
 						this.codeData = res.data
 						this.$refs.canvasCodeRef.getCode(this.codeData.code[0].code)

+ 14 - 11
pages-buy/group-shop.vue

@@ -23,18 +23,13 @@
 					<view class="">
 						营业时间:{{timeData}}
 					</view>
-					<image src="@/static/img/takeout/info-phone.png" mode="" class="phone" @click="phoneBut(shopInfo.shop_phone)"></image>
+					<image src="@/static/img/takeout/info-phone.png" mode="" class="phone"
+						@click="phoneBut(shopInfo.shop_phone)"></image>
 				</view>
-				<view class="uni-margin-wrap mb-18">
+				<view class="uni-margin-wrap mb-18" v-if="shopInfo.shop_album.length>0">
 					<swiper class="swiper" :circular='true' :autoplay="true" :interval="3000" :duration="500">
-						<swiper-item>
-							<view class="swiper-item bgc-B3DDFB">A</view>
-						</swiper-item>
-						<swiper-item>
-							<view class="swiper-item bgc-3">B</view>
-						</swiper-item>
-						<swiper-item>
-							<view class="swiper-item fc-65420c">C</view>
+						<swiper-item v-for="(item,index) in shopInfo.shop_album">
+							<image :src="item" mode="" class="swiper-img"></image>
 						</swiper-item>
 					</swiper>
 				</view>
@@ -130,7 +125,9 @@
 					lon: '',
 					shop_id: ''
 				},
-				shopInfo: {},
+				shopInfo: {
+					shop_album: []
+				},
 				timeData: '',
 				array: '',
 				shopList: []
@@ -306,6 +303,12 @@
 		border-radius: 20rpx;
 	}
 
+	.swiper-img {
+		width: 100%;
+		height: 200rpx;
+		border-radius: 20rpx;
+	}
+
 	.swiper-item {
 		display: block;
 		height: 200rpx;

+ 1 - 1
pages-order/group-info.vue

@@ -106,7 +106,7 @@
 				<view class="fs-32 fc-3 fw-600">
 					券码信息({{infoData.code_num}}张可用)
 				</view>
-				<view class="goBut text-align-center fs-26 b-r-ccc b-rad-200" @click="goCode">
+				<view class="goBut text-align-center fs-26 b-r-ccc b-rad-200" @click="goCode" v-show="infoData.code_num != 0">
 					查看券码
 				</view>
 			</view>