Selaa lähdekoodia

订单数据分离

wenjie 7 kuukautta sitten
vanhempi
commit
1fbe49e3e0
4 muutettua tiedostoa jossa 14 lisäystä ja 8 poistoa
  1. 6 1
      detail/goodsDetail/index.vue
  2. 5 5
      my/memberCenter/index.vue
  3. 2 1
      pay/pay.vue
  4. 1 1
      utils/request.js

+ 6 - 1
detail/goodsDetail/index.vue

@@ -259,11 +259,16 @@
 						// 		})
 						// 	}
 						// })
+						
+						let info = JSON.parse(JSON.stringify(this.info))
+						if(info.platformPrice){
+							info.realPrice = info.platformPrice.price
+						}
 						uni.navigateTo({
 							url:`/pay/pay`,
 							  success: function(res) {
 								// 通过eventChannel向被打开页面传送数据
-								res.eventChannel.emit('pay', that.info)
+								res.eventChannel.emit('pay', info)
 							  }
 						})
 					}else{

+ 5 - 5
my/memberCenter/index.vue

@@ -497,11 +497,11 @@
 			console.log('onload',options);
 		},
 		onShow() {
-			refreshVip().then(res=>{
-				if(res.state == 'Success'){
-					this.getUserDetail()
-				}
-			})
+			// refreshVip().then(res=>{
+			// 	if(res.state == 'Success'){
+			// 		this.getUserDetail()
+			// 	}
+			// })
 		}
 	}
 </script>

+ 2 - 1
pay/pay.vue

@@ -332,7 +332,8 @@
 					//TODO handle the exception
 				}
 				console.log('data', data);
-				that.calculate(that.info.goodsId, that.info.shopId)
+				// 移除优惠券计算价格
+				// that.calculate(that.info.goodsId, that.info.shopId)
 			})
 		}
 	}

+ 1 - 1
utils/request.js

@@ -21,7 +21,7 @@ export let request = (options) => {
 					data: options.data || {},
 					header: {
 						accessToken: uni.getStorageSync('token'),
-						code:1 //慧研学520100 中数5201000 贵大 p-0001
+						code:'520100' //慧研学520100 中数5201000 贵大 p-0001
 					},
 					success: (res) => {
 						if (res.statusCode !== 200) {