lilei 4 months ago
parent
commit
4ea7ea232f

+ 22 - 19
pagesB/accountBalance/accountBalance.vue

@@ -131,10 +131,10 @@ export default {
 		  })
 		  return
 	  }
-      this.info = info
 	  uni.showLoading({
 	  	title:'加载中...'
 	  })
+	  this.info = info
 	  createRechargeOrder({
 		  rechargeRuleSn: info.rechargeRuleSn,
 		  rechargeAmount:info.rechargeAmount,
@@ -145,24 +145,7 @@ export default {
 		  storeSn:this.shelfInfo.storeSn,
 	  }).then(res =>{
 		  if(res.status == 200){
-			  purchasePay({
-					bizSn:res.data.rechargeSn,
-					bizNo:res.data.rechargeNo,
-					bizType:'RECHARGE_BILL',
-					payUserOpenId: this.$store.state.vuex_openid || uni.getStorageSync('openid')
-				}).then(ret=>{
-					if(ret.status == 200){
-						this.showPopu = true
-						this.payData = ret.data?ret.data.payRequestRest:null
-					}
-					setTimeout(()=>{
-						uni.hideLoading()
-					},300)
-					uni.showToast({
-						title: ret.message,
-						icon: 'none'
-					})
-				})
+			  this.toPay(res.data)
 		  }else{
 			  setTimeout(()=>{
 				uni.hideLoading()
@@ -174,6 +157,26 @@ export default {
 		  }
 	  })
     },
+	toPay(data){
+		purchasePay({
+			bizSn:data.rechargeSn,
+			bizNo:data.rechargeNo,
+			bizType:'RECHARGE_BILL',
+			payUserOpenId: this.$store.state.vuex_openid || uni.getStorageSync('openid')
+		}).then(ret=>{
+			if(ret.status == 200){
+				this.showPopu = true
+				this.payData = ret.data?ret.data.payRequestRest:null
+			}
+			setTimeout(()=>{
+				uni.hideLoading()
+			},300)
+			uni.showToast({
+				title: ret.message,
+				icon: 'none'
+			})
+		})
+	},
 	payComplete(item,isOk){
 		this.showPopu = false
 		if(isOk){

+ 1 - 1
pagesB/procureOrder/orderDetail.vue

@@ -190,7 +190,7 @@
 		<view v-if="info&&info.billStatus == 'WAIT_AUDIT'||info.billStatus == 'WAIT_PAY'||info.billStatus == 'WAIT_RECEIVE'" style="background-color: #fff;">
 			<view class="footer flex align_center justify_center">
 				<u-button style="margin-left: 10px;" v-if="info.billStatus == 'WAIT_AUDIT'||info.billStatus == 'WAIT_PAY'" size="medium" shape="round" type="default" plain @click="cancelOrder(info)">取消订单</u-button>
-				<u-button style="margin-left: 10px;" v-if="info.billStatus == 'WAIT_PAY'" size="medium" shape="round" type="error" plain @click="payOrder(info)">立即支付</u-button>
+				<u-button style="margin-left: 10px;" v-if="info.billStatus == 'WAIT_PAY'&&info.payOnlineType=='PAY_WECHAT_ONLINE'" size="medium" shape="round" type="error" plain @click="payOrder(info)">立即支付</u-button>
 				<!-- <u-button style="margin-left: 10px;" v-if="info.billStatus == 'FINISH'" size="medium" shape="round" type="error" plain @click="buyAgain(info)">再次购买</u-button> -->
 				<u-button style="margin-left: 10px;" v-if="info.billStatus == 'WAIT_RECEIVE'" size="medium" shape="round" type="error" plain @click="receiveOrder(info)">确认收货</u-button>
 			</view>

+ 1 - 1
pagesB/procureOrder/orderList.vue

@@ -69,7 +69,7 @@
 									 </view>
 									 <view style="text-align: right;color: #999;">
 										 <u-button style="margin-left: 10px;" v-if="item.billStatus == 'WAIT_AUDIT'||item.billStatus == 'WAIT_PAY'" size="mini" shape="round" type="default" plain @click="cancelOrder(item)">取消订单</u-button>
-										 <u-button style="margin-left: 10px;" v-if="item.billStatus == 'WAIT_PAY'" size="mini" shape="round" type="error" plain @click="payOrder(item)">立即支付</u-button>
+										 <u-button style="margin-left: 10px;" v-if="item.billStatus == 'WAIT_PAY'&&item.payOnlineType=='PAY_WECHAT_ONLINE'" size="mini" shape="round" type="error" plain @click="payOrder(item)">立即支付</u-button>
 										 <!-- <u-button style="margin-left: 10px;" v-if="item.billStatus == 'CANCEL'" size="mini" shape="round" type="error" plain @click="buyAgain(item)">再次购买</u-button> -->
 										 <u-button style="margin-left: 10px;" v-if="item.billStatus == 'WAIT_RECEIVE'" size="mini" shape="round" type="error" plain @click="receiveOrder(item)">确认收货</u-button>
 										 <view v-if="(item.billStatus == 'CANCEL'||item.billStatus == 'AUDIT_REJECT')&&item.payInfo">

+ 4 - 5
pagesB/shopiing/productDetail.vue

@@ -97,7 +97,7 @@
 			<view :style="{height:safeAreaBottom+'px'}"></view>
 		</view>
 		<!-- 购物车动画 -->
-		<uni-cart-animation ref="cartAnimation" @animationfinish="animationfinish"></uni-cart-animation>
+		<uni-cart-animation ref="cartAnimation" @animationfinish="loading = false"></uni-cart-animation>
 		<!-- 立即购买和付款 -->
 		<page-container
 		:show="showPopu" 
@@ -431,6 +431,7 @@
 					if(res.status == 200){
 						this.detail = res.data
 						if(res.data){
+							// 产品图片列表
 							if(res.data.productPicList){
 								res.data.productPicList.forEach(item => {
 									this.imgList.push(item.imageUrl||'/static/def_imgs.png')
@@ -438,6 +439,7 @@
 							}else{
 								this.imgList.push(res.data.productMsg||'/static/def_imgs.png')
 							}
+							// 产品促销活动
 							const a = res.data.shopPromoProduct
 							let bprice = res.data.price
 							if(a){
@@ -459,14 +461,11 @@
 							const kdk = res.data.shopProductSubsidy&&res.data.shopProductSubsidy.subsidyAmount>0&&res.data.shopProductSubsidy.subsidyAmount<this.storeAccount.giveBalance
 							this.hasKdk = kdk
 						}
-						console.log(this.detail)
 					}
 					uni.hideLoading()
 				})
 			},
-			animationfinish(){
-				this.loading = false
-			},
+			// 修改数量
 			changeQty(value) {
 				const max = 999
 				const v = value > max ? max : (value==''||value==0?1:value)