Bladeren bron

commit -m 修复测试问题

zhengjinyi 4 jaren geleden
bovenliggende
commit
4b7adb7dc1

+ 12 - 12
components/cm-module/cm-seller/user.vue

@@ -202,18 +202,18 @@
 				})	
 			},
 			TestZHIboFn(){//测试跳转直播小程序
-				uni.navigateToMiniProgram({
-					appId: 'wx92d650b253f8f2e3',
-					path: '/pages/index/index',
-					extraData: {
-						'data1': 'test'
-					},
-					envVersion: 'develop',
-					success(res) {
-						// 打开成功
-						console.log(res)
-					}
-				})
+				// uni.navigateToMiniProgram({
+				// 	appId: 'wx92d650b253f8f2e3',
+				// 	path: '/pages/index/index',
+				// 	extraData: {
+				// 		'data1': 'test'
+				// 	},
+				// 	envVersion: 'develop',
+				// 	success(res) {
+				// 		// 打开成功
+				// 		console.log(res)
+				// 	}
+				// })
 			},
 			navigator(url){
 				this.$api.navigateTo(url)

+ 3 - 2
components/cm-module/creatOrder/freight.vue

@@ -104,21 +104,22 @@
 							case 0:
 								self.freightMoney = self.infoData.freight
 								self.freePostFlag = 1
-								self.freightBeansMoney = self.freightMoney
 								if( self.userBeans >= self.freightMoney*100 ){
 									self.isBeansShow = true
+									self.freightBeansMoney = self.freightMoney
 								}else{
 									self.isBeansShow = false
+									self.freightBeansMoney = 0
 								}
 								break
 							case 1:
 								self.freePostFlag = -1
 								self.freightMoney = '到付'
-								self.freightBeansMoney = 30
 								if( self.userBeans >= 3000 ){
 									self.freightBeansMoney = 30
 									self.isBeansShow = true
 								}else{
+									self.freightBeansMoney = 0
 									self.isBeansShow = false
 								}
 								break

+ 22 - 3
pages/user/order/create-order.vue

@@ -175,17 +175,28 @@
 					}
 				this.OrderService.GetOrderPostage(params).then(response =>{
 					this.isFreight = true
+					this.isCheckedBeans = false
 					this.freightData = response.data
 					this.hanldFreePostFlag = response.data.freePostFlag
 					this.hanldFreight = response.data.freight
 					if(this.hanldFreePostFlag == 1){
-						this.freightBeansMoney = response.data.freight
+						if( this.freightData.userBeans >= this.hanldFreight*100 ){
+							this.freightBeansMoney = this.hanldFreight
+						}else{
+							this.freightBeansMoney = 0
+						}
 						this.payAllPrice = this.allPrice + response.data.freight
 						this.attributePallPrice()
+						this.hanldFreightBeans(this.isCheckedBeans)
 					}else{
-						this.freightBeansMoney = 30
+						if( this.freightData.userBeans >= 3000 ){
+							this.freightBeansMoney = 30
+						}else{
+							this.freightBeansMoney = 0
+						}
 						this.payAllPrice = this.allPrice
 						this.attributePallPrice()
+						this.hanldFreightBeans(this.isCheckedBeans)
 					}
 				})
 			},
@@ -235,13 +246,20 @@
 			hanldFreightBeans(data){//是否勾选采美豆抵扣
 				this.isCheckedBeans = data;
 				if(this.isCheckedBeans){
-					this.hanldUserBeans = this.freightBeansMoney*100
+					// 判断如果采美豆大于等于运费*100
+					if( this.freightData.userBeans >= this.hanldFreight*100 ){
+						this.hanldUserBeans = this.freightBeansMoney*100
+					}else{
+						this.hanldUserBeans = 0
+					}
+					// 计算抵扣后的总价
 					if(this.hanldFreePostFlag == 1){
 						this.payAllPrice = this.allPrice + this.hanldFreight - this.freightBeansMoney
 						console.log('抵扣',this.payAllPrice)
 					}
 				}else{
 					this.hanldUserBeans = 0
+					// 不抵扣时计算总价
 					if(this.hanldFreePostFlag == 1){
 						this.payAllPrice = this.allPrice + this.hanldFreight
 						console.log('不抵扣',this.payAllPrice)
@@ -254,6 +272,7 @@
 					if(this.ischecked){
 						this.balanceDeductionFlag =1
 						this.attributePallPrice()
+						this.hanldFreightBeans(this.isCheckedBeans)
 					}else{
 						if(this.hanldFreePostFlag == 1 || this.hanldFreePostFlag == '1'){
 							this.payAllPrice = this.allPrice+parseInt(this.freightData.freight)

+ 1 - 1
seller/pages/club/club-list.vue

@@ -51,7 +51,7 @@
 									<text>再次购买</text>
 								</view>
 								<view class="btn yeo" @click.stop="_goRechargeOrder(item)">
-									<text>充值/下金</text>
+									<text>充值/下金</text>
 								</view>
 							</view>
 						</view>