2312970463@qq.com 4 years ago
parent
commit
159217f6d3

+ 3 - 1
api/api.js

@@ -216,4 +216,6 @@ export function getCity() {
 // export function getLiveList(page,limit) {
 //   return request.get('wechat/live', { page, limit}, { noAuth: true });
 // }
-
+export function getPower() {
+	return request.post('scheme', { }, { noAuth: true });
+}

+ 55 - 2
components/payment/index.vue

@@ -76,7 +76,7 @@
 					// #endif
 					// #ifdef MP-TOUTIAO
 					if(paytype !== 'balance'){
-						type = 'h5'
+						type = 'toutiao'
 					}
 					// #endif
 				} else if (paytype == 'balance') {
@@ -95,9 +95,12 @@
 				if (paytype == 'balance' && parseFloat(number) < parseFloat(that.totalPrice)) return that.$util.Tips({
 					title: '余额不足!'
 				});
+				// #ifndef MP-TOUTIAO
 				uni.showLoading({
 					title: '支付中'
 				});
+				// #endif
+				
 				let orderApi = that.order_type === 1 ? presellOrderPay : orderPay
 					
 				
@@ -255,7 +258,57 @@
 								location.href = locations;
 							}, 100);
 							break;
-						// #endif		
+						// #endif
+						// #ifdef MP-TOUTIAO
+						case 'toutiao':
+							console.log('头条支付')
+							// that.toPay = true;
+							console.log(jsConfig.data.order_id)
+							console.log()
+							tt.pay({
+							  orderInfo: {
+							    order_id: jsConfig.data.order_id,
+							    order_token:jsConfig.data.order_token,
+							  },
+							  service: 5,
+							  success(res) {
+								  console.log(res,'支付回调')
+							    if (res.code == 0) {
+							      // 支付成功处理逻辑,只有res.code=0时,才表示支付成功
+							      // 但是最终状态要以商户后端结果为准
+								 // uni.hideLoading();
+								 if (that.BargainId || that.combinationId || that.pinkId || that.seckillId)
+								 	return that.$util.Tips({
+								 		title: '支付成功',
+								 		icon: 'success'
+								 	}, {
+								 		tab: 4,
+								 		url: goPages
+								 	});
+								 return that.$util.Tips({
+								 	title: '支付成功',
+								 	icon: 'success'
+								 }, {
+								 	tab: 5,
+								 	url: goPages
+								 });
+							    }
+							  },
+							  fail(res) {
+								  console.log(res,'支付失败');
+							    // 调起收银台失败处理逻辑
+								uni.hideLoading();
+								let pages = '/pages/order_pay_status/index?order_id=' + orderId+'&msg=取消支付'
+								return that.$util.Tips({
+									title: '取消支付'
+								}, {
+									tab: 5,
+									url: pages + '&status=0'
+								});
+							  },
+							});
+							break;
+						// #endif
 					}
 				}).catch(err => {
 					uni.hideLoading();

+ 2 - 1
config/app.js

@@ -4,7 +4,8 @@ let VUE_APP_WS_URL = `ws://${location.hostname}?type=user`
 
 // 网络接口修改此字符 小程序域名要求https
 
-let httpApi = 'http://wcy.liuniu946.com' //测试站
+// let httpApi = 'http://wcy.liuniu946.com' //测试站
+let httpApi = 'https://www.jzwcy.com' 
 // let httpApi = 'http://192.168.31.50:8324' //本地
 
 // let httpApi = 'https://mer.crmeb.net'

+ 117 - 117
pages.json

@@ -612,125 +612,125 @@
 					}
 				}
 			]
-		}
-		// {
-		// 	"root": "pages/activity",
-		// 	"name": "activity",
-		// 	"pages": [{
-		// 			"path": "goods_seckill/index",
-		// 			"style": {
-		// 				"navigationBarTitleText": "限时秒杀"
-		// 					// #ifdef MP
-		// 					,
-		// 				"navigationBarTextStyle": "#fff",
-		// 				"navigationBarBackgroundColor": "#e93323"
-		// 				// #endif
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "goods_seckill_details/index",
-		// 			"style": {
-		// 				"navigationBarTitleText": "秒杀详情"
-		// 					// #ifdef MP
-		// 					,
-		// 				"navigationStyle": "custom"
-		// 				// #endif
-		// 			}
-		// 		},
-		// 		// {
-		// 		// 	"path": "liveBroadcast/index",
-		// 		// 	"style": {
-		// 		// 		"navigationBarTitleText": "直播列表",
-		// 		// 		"navigationBarBackgroundColor": "#F2F2F2"
+		},
+		{
+			"root": "pages/activity",
+			"name": "activity",
+			"pages": [{
+					"path": "goods_seckill/index",
+					"style": {
+						"navigationBarTitleText": "限时秒杀"
+							// #ifdef MP
+							,
+						"navigationBarTextStyle": "#fff",
+						"navigationBarBackgroundColor": "#e93323"
+						// #endif
+					}
+				},
+				{
+					"path": "goods_seckill_details/index",
+					"style": {
+						"navigationBarTitleText": "秒杀详情"
+							// #ifdef MP
+							,
+						"navigationStyle": "custom"
+						// #endif
+					}
+				},
+				// {
+				// 	"path": "liveBroadcast/index",
+				// 	"style": {
+				// 		"navigationBarTitleText": "直播列表",
+				// 		"navigationBarBackgroundColor": "#F2F2F2"
 
-		// 		// 	}
-		// 		// },
-		// 		{
-		// 			"path": "presell/index",
-		// 			"style": {
-		// 				"navigationBarTitleText": "预售"
-		// 					// #ifdef MP
-		// 					,
-		// 				"navigationBarTextStyle": "#fff",
-		// 				"navigationBarBackgroundColor": "#FF7F21"
-		// 				// #endif
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "presell_details/index",
-		// 			"style": {
-		// 				"navigationStyle": "custom"
-		// 					// #ifdef MP
-		// 					,
-		// 				"navigationBarTextStyle": "#fff"
-		// 				// #endif
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "combination/index",
-		// 			"style": {
-		// 				"navigationBarTitleText": "拼团"
-		// 					// #ifdef MP
-		// 					,
-		// 				"navigationBarTextStyle": "#fff",
-		// 				"navigationStyle":"custom"
-		// 				// "navigationBarBackgroundColor": "#fff"
-		// 				// #endif
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "combination_details/index",
-		// 			"style": {
-		// 				"navigationBarTitleText": "拼团详情",
-		// 				"navigationStyle": "custom"
-		// 					// #ifdef MP
-		// 					,
-		// 				"navigationBarTextStyle": "#fff"
-		// 				// #endif
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "combination_status/index",
-		// 			"style": {
-		// 				"navigationBarTitleText": "拼团状态"
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "assist/index",
-		// 			"style": {
-		// 				"navigationBarTitleText": "助力列表"
-		// 					// #ifdef MP
-		// 					,
-		// 				"navigationBarTextStyle": "#fff",
-		// 				"navigationBarBackgroundColor": "#e93323"
-		// 				// #endif
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "assist_detail/index",
-		// 			"style": {
-		// 				"navigationBarTitleText": "发起助力"
-		// 					// #ifdef MP
-		// 					,
-		// 				"navigationBarTextStyle": "#fff",
-		// 				"navigationBarBackgroundColor": "#e93323"
-		// 				// #endif
-		// 			}
-		// 		},
-		// 		{
-		// 			"path": "assist_record/index",
-		// 			"style": {
-		// 				"navigationBarTitleText": "助力记录"
-		// 					// #ifdef MP
-		// 					,
-		// 				"navigationBarTextStyle": "#fff",
-		// 				"navigationBarBackgroundColor": "#e93323"
-		// 				// #endif
-		// 			}
-		// 		}
+				// 	}
+				// },
+				{
+					"path": "presell/index",
+					"style": {
+						"navigationBarTitleText": "预售"
+							// #ifdef MP
+							,
+						"navigationBarTextStyle": "#fff",
+						"navigationBarBackgroundColor": "#FF7F21"
+						// #endif
+					}
+				},
+				{
+					"path": "presell_details/index",
+					"style": {
+						"navigationStyle": "custom"
+							// #ifdef MP
+							,
+						"navigationBarTextStyle": "#fff"
+						// #endif
+					}
+				},
+				{
+					"path": "combination/index",
+					"style": {
+						"navigationBarTitleText": "拼团"
+							// #ifdef MP
+							,
+						"navigationBarTextStyle": "#fff",
+						"navigationStyle":"custom"
+						// "navigationBarBackgroundColor": "#fff"
+						// #endif
+					}
+				},
+				{
+					"path": "combination_details/index",
+					"style": {
+						"navigationBarTitleText": "拼团详情",
+						"navigationStyle": "custom"
+							// #ifdef MP
+							,
+						"navigationBarTextStyle": "#fff"
+						// #endif
+					}
+				},
+				{
+					"path": "combination_status/index",
+					"style": {
+						"navigationBarTitleText": "拼团状态"
+					}
+				},
+				{
+					"path": "assist/index",
+					"style": {
+						"navigationBarTitleText": "助力列表"
+							// #ifdef MP
+							,
+						"navigationBarTextStyle": "#fff",
+						"navigationBarBackgroundColor": "#e93323"
+						// #endif
+					}
+				},
+				{
+					"path": "assist_detail/index",
+					"style": {
+						"navigationBarTitleText": "发起助力"
+							// #ifdef MP
+							,
+						"navigationBarTextStyle": "#fff",
+						"navigationBarBackgroundColor": "#e93323"
+						// #endif
+					}
+				},
+				{
+					"path": "assist_record/index",
+					"style": {
+						"navigationBarTitleText": "助力记录"
+							// #ifdef MP
+							,
+						"navigationBarTextStyle": "#fff",
+						"navigationBarBackgroundColor": "#e93323"
+						// #endif
+					}
+				}
 
-		// 	]
-		// }
+			]
+		}
 	],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",

+ 1 - 1
pages/activity/assist/index.vue

@@ -141,7 +141,7 @@
 					that.pageloading = false;
 					that.loadend = loadend;
 				}).catch(err => {
-					that.pageloading = false
+					that.pageloading = false 
 				});
 			},
 			openSubscribe: function(id) {

+ 31 - 0
pages/goods_details/index.vue

@@ -1010,7 +1010,23 @@
 					this.$set(this, 'isShowAuth', true)
 					// #endif
 				} else {
+					// #ifdef MP-TOUTIAO
+					let power = uni.getStorageSync('power')
+					// console.log()
+					if(!power) {
+						uni.showModal({
+							title: '提示',
+							showCancel: false,
+							content: '抖音小程序主要为商品展示,不支持加入购物车和购买功能!',
+						})
+					}else {
+						this.goCat();
+					}
+					// #endif
+					// #ifndef MP-TOUTIAO
 					this.goCat();
+					// #endif
+					
 				}
 			},
 			/*
@@ -1114,7 +1130,22 @@
 					this.$set(this, 'isShowAuth', true);
 					// #endif
 				} else {
+					// #ifdef MP-TOUTIAO
+					let power = uni.getStorageSync('power')
+					if(!power) {
+						uni.showModal({
+							title: '提示',
+							showCancel: false,
+							content: '抖音小程序主要为商品展示,不支持加入购物车和购买功能!',
+						})
+					}else {
+						this.goCat(true);
+					}
+					// #endif
+					// #ifndef MP-TOUTIAO
 					this.goCat(true);
+					// #endif
+					
 				}
 			},
 			// 授权关闭

+ 38 - 6
pages/index/index.vue

@@ -396,11 +396,12 @@
 	} from '@/api/user.js';
 	import {
 		getIndexData,
-		getCoupons
+		getCoupons,
+		getPower
 	} from '@/api/api.js';
 	// #ifdef MP
 	import {
-		getTemlIds,
+		getTemlIds
 	} from '@/api/api.js';
 	import {
 		SUBSCRIBE_MESSAGE,
@@ -427,8 +428,10 @@
 		goShopDetail
 	} from '@/libs/order.js'
 	import {
-		mapGetters
+		mapGetters,
+		mapMutations
 	} from "vuex";
+	// import { mapState, mapMutations } from 'vuex';
 	import tabNav from '@/components/tabNav.vue'
 	import countDown from '@/components/countDown'
 	import {
@@ -588,7 +591,9 @@
 				currSpid: '',
 				// sortMarTop: 0,
 				mer_location: "",
-				share_title: ""
+				share_title: "",
+				showNum: 0,
+				power: ''
 			}
 		},
 		/**
@@ -618,6 +623,9 @@
 		},
 		// #endif
 		onLoad(options) {
+			// #ifdef MP-TOUTIAO
+			this.getPower()
+			// #endif
 			let that = this;
 			if (options.spid) {
 				that.currSpid = options.spid
@@ -652,6 +660,7 @@
 			this.navH = app.globalData.navHeight;
 			let info = uni.createSelectorQuery().select(".mp-header");
 			info.boundingClientRect(function(data) {
+				console.log(data.height,'++++++++++++++++++++++++++++++++++')
 				that.marTop = data.height
 			}).exec()
 			// #endif
@@ -669,7 +678,8 @@
 			// #endif
 			if (this.isLogin) {
 				console.log("登录了+++++")
-				// this.getUserInfo();
+				this.showNum = 1
+				this.getUserInfo();
 				// #ifdef MP
 				// this.getHistory()
 				// #endif
@@ -678,7 +688,11 @@
 		onShow() {
 			this.getConfig()
 			if(this.isLogin){
-				this.getUserInfo()
+				if(this.showNum !== 1){
+					this.getUserInfo()
+				}else {
+					this.showNum = 0
+				}
 			}
 		},
 		onReady() {
@@ -883,6 +897,7 @@
 			// 拼团
 			getCombinationProduct() {
 				let that = this;
+				
 				getCombinationList({
 					limit: 3
 				}).then(res => {
@@ -1054,6 +1069,7 @@
 			getIndexConfig: function() {
 				let that = this;
 				getIndexData().then(res => {
+					 
 					that.$set(that, "imgUrls", res.data.banner);
 					that.$set(that, "menus", res.data.menu);
 					that.$set(that, "hot", res.data.hot);
@@ -1227,6 +1243,22 @@
 					url: `/pages/store/shopStreet/index`
 				})
 			},
+			getPower() {
+				getPower().then( ({data}) => {
+					if(data.openlink) {
+						this.power = data.openlink
+						uni.setStorageSync('power', data.openlink);
+					}else {
+						uni.showModal({
+							title: '提示',
+							showCancel: false,
+							content: '抖音小程序主要为商品展示,不支持加入购物车和购买功能!',
+						})
+					}
+					
+					
+				})
+			}
 		},
 		mounted() {
 			let self = this

+ 13 - 0
pages/order_addcart/order_addcart.vue

@@ -327,6 +327,19 @@
 			},
 			// 立即下单
 			subOrder: function(event) {
+				// #ifdef MP-TOUTIAO
+				let power = uni.getStorageSync('power')
+				console.log(power,'22222222222222222222')
+				if(!power) {
+					console.log('ddddddddddddddddd')
+					uni.showModal({
+						title: '提示',
+						showCancel: false,
+						content: '抖音小程序主要为商品展示,不支持加入购物车和购买功能!',
+					})
+					return
+				}
+				// #endif
 				let selectValue = []
 				this.cartList.valid.forEach(el=>{
 					el.list.forEach(goods=>{

+ 1 - 1
pages/order_pay_status/index.vue

@@ -14,7 +14,7 @@
 				</view>
 				<view class='item acea-row row-between-wrapper'>
 					<view>支付方式</view>
-					<view v-if="order_pay_info.pay_type==1 || order_pay_info.pay_type==2 || order_pay_info.pay_type==3" class='itemCom'>微信</view>
+					<view v-if="order_pay_info.pay_type==1 || order_pay_info.pay_type==2 || order_pay_info.pay_type==3 || order_pay_info.pay_type==7" class='itemCom'>微信</view>
 					<view v-else-if="order_pay_info.pay_type==4 || order_pay_info.pay_type==5" class='itemCom'>支付宝</view>
 					<view v-else class='itemCom'>余额</view>
 				</view>

+ 5 - 1
pages/store/detail/index.vue

@@ -21,12 +21,14 @@
 				<view>{{ score.toFixed(1) }}</view>
 			</view>
 		</view>
+		<!-- #ifndef MP-TOUTIAO -->
 		<view class="section wrap" @click="popupShow = true">
 			<view class="name">店铺二维码</view>
 			<view>
 				<text class="iconfont icon-erweima1"></text>
 			</view>
 		</view>
+		<!-- #endif -->
 		<navigator :url="`/pages/chat/customer_list/chat?mer_id=${store.mer_id}&uid=${this.uid}`" class="section wrap">
 			<view class="name">联系客服</view>
 			<view>
@@ -82,6 +84,7 @@
 			dateFormat: function(value) {
 				if (!value) {
 					return '';
+					
 				}
 				return value.split(' ')[0];
 			}
@@ -153,7 +156,8 @@
 			unfollow: function() {
 				unfollowStore(this.id).then(res => {
 					if (res.status === 200) {
-						this.store.care = false;
+						
+						this.store.care = false; 
 					}
 					this.$util.Tips({
 						title: res.message

+ 111 - 33
pages/users/order_confirm/index.vue

@@ -251,7 +251,8 @@
 		<!-- #endif -->
 		<block v-if="isShowBox">
 			<checkDelivery :isShowBox="isShowBox" :activeObj="activeObj" @close="boxClose" @confirmBtn="getData"></checkDelivery>
-		</block>
+		</block>
+		<web-view :src="ttUrl" v-if="ttUrl"></web-view>
 	</view>
 </template>
 <script>
@@ -432,7 +433,8 @@
 				hide_mer_status: 1,
 				addInvoice: {},
 				go_map: false,
-				orderPay: false,
+				orderPay: false,
+				ttUrl: ''
 			};
 		},
 		computed: mapGetters(['isLogin']),
@@ -937,17 +939,20 @@
 			phone: function(e) {
 				this.contactsTel = e.detail.value;
 			},
-			payment: function(data) {
+			payment: function(data) {
+				console.log('到达+++++++++++payment++++++++++++++')
 				console.log(data, 'data')
 				let that = this;
-				orderCreate(data).then(res => {
+				orderCreate(data).then(res => {
+					console.log(res,'++++++++++++++++++++++')
 					let status = res.data.status,
 						orderId = res.data.result.order_id,
 						callback_key = res.data.result.pay_key,
 						jsConfig = res.data.result.config,
 						goPages = '/pages/order_pay_status/index?order_id=' + orderId + '&msg=' + res.message;
 						console.log(jsConfig,'jsConfig+++++++++')
-						that.orderPay = true;
+						that.orderPay = true;
+					console.log(status,'status++++++++++++++++')
 					switch (status) {
 						case 'ORDER_EXIST':
 						case 'EXTEND_ORDER':
@@ -1015,7 +1020,8 @@
 							break;
 							// #endif
 							// #ifdef MP
-						case "routine":
+						case "routine":
+						console.log(jsConfig)
 							jsConfig.timeStamp = jsConfig.timestamp;
 							that.toPay = true;
 							uni.requestPayment({
@@ -1061,17 +1067,75 @@
 								url: goPages + '&status=1'
 							});
 							break;
-							// #ifdef H5
-						case 'h5':
-							let host = window.location.protocol + "//" + window.location.host;
-							let url = `${host}/pages/order_pay_status/index?order_id=${orderId}`
-							let eUrl = encodeURIComponent(url)
-							let locations = `${jsConfig.mweb_url}&redirect_url=${eUrl}`
-							setTimeout(() => {
-								location.href = locations;
-							}, 100);
-							break;
-							// #endif		
+							// #ifdef H5
+							case 'h5':
+							    console.log('come H5+++++++')
+								let host = window.location.protocol + "//" + window.location.host;
+								let url = `${host}/pages/order_pay_status/index?order_id=${orderId}`
+								console.log(url,'url++++++++++')
+								let eUrl = encodeURIComponent(url)
+								console.log(eUrl,'eUrl++++++++++')
+								let locations = `${jsConfig.mweb_url}&redirect_url=${eUrl}`
+								console.log(locations,'locations++++++++++++++++++')
+								setTimeout(() => {
+									location.href = locations;
+								}, 100);
+								break;
+							// #endif
+							// #ifdef MP-TOUTIAO
+							case 'toutiao':
+								console.log('头条支付')
+								// that.toPay = true;
+								console.log(jsConfig.data.order_id)
+								console.log()
+								tt.pay({
+								  orderInfo: {
+								    order_id: jsConfig.data.order_id,
+								    order_token:jsConfig.data.order_token,
+								  },
+								  service: 5,
+								  success(res) {
+									  console.log(res,'支付回调')
+								    if (res.code == 0) {
+								      // 支付成功处理逻辑,只有res.code=0时,才表示支付成功
+								      // 但是最终状态要以商户后端结果为准
+									 // uni.hideLoading();
+									 if (that.BargainId || that.combinationId || that.pinkId || that.seckillId)
+									 	return that.$util.Tips({
+									 		title: '支付成功',
+									 		icon: 'success'
+									 	}, {
+									 		tab: 4,
+									 		url: goPages
+									 	});
+									 return that.$util.Tips({
+									 	title: '支付成功',
+									 	icon: 'success'
+									 }, {
+									 	tab: 5,
+									 	url: goPages
+									 });
+								    }
+								  },
+								  fail(res) {
+									  console.log(res,'支付失败');
+								    // 调起收银台失败处理逻辑
+									uni.hideLoading();
+									let pages = '/pages/order_pay_status/index?order_id=' + orderId+'&msg=取消支付'
+									return that.$util.Tips({
+										title: '取消支付'
+									}, {
+										tab: 5,
+										url: pages + '&status=0'
+									});
+								  },
+								});
+								break;
+							// #endif
+						
+							
+							
+							
 					}
 				}).catch(err => {
 					uni.hideLoading();
@@ -1121,17 +1185,18 @@
 				}
 			},
 			SubOrder: function(e) {
-				// #ifdef MP-TOUTIAO
-				if(this.payType !== 'balance'){
-					this.payType="h5"
-				}
-				// #endif
+				
 				
 				let that = this,
 					data = {};
 				if (!that.payType) return that.$util.Tips({
 					title: '请选择支付方式'
-				});
+				});
+				// #ifdef MP-TOUTIAO
+				if(this.payType !== 'balance'){
+					this.payType="toutiao"
+				}
+				// #endif
 				if (!that.addressId && !that.shippingType) return that.$util.Tips({
 					title: '请选择收货地址'
 				});
@@ -1175,7 +1240,7 @@
 					order_type: this.order_type,
 					take: [],
 					receipt_data: this.invoiceData,
-					// #ifdef H5
+					// #ifdef H5 
 					return_url: 'http://' + window.location.host + '/pages/users/order_list/index',
 					// #endif
 				};
@@ -1194,15 +1259,28 @@
 				if (data.payType == 'balance' && parseFloat(that.userInfo.now_money) < parseFloat(that.totalPrice)) return that.$util
 					.Tips({
 						title: '余额不足!'
-					});
-				uni.showLoading({
-					title: '订单支付中',
-					mask: true
-				});
-				// #ifdef MP
-				openPaySubscribe().then(() => {
-					that.payment(data);
-				});
+					});
+				// #ifndef MP-TOUTIAO
+				uni.showLoading({
+					title: '订单支付中',
+					mask: true
+				});
+				// #endif
+				
+				// // #ifdef MP
+				// openPaySubscribe().then(() => {
+				// 	console.log('去支付+++++++++++++++++++')
+				// 	that.payment(data);
+				// });
+				// // #endif
+				// #ifdef MP-WEIXIN
+				openPaySubscribe().then(() => {
+					console.log('去支付+++++++++++++++++++')
+					that.payment(data);
+				});
+				// #endif
+				// #ifdef MP-TOUTIAO
+				that.payment(data);
 				// #endif
 				// #ifndef MP
 				that.payment(data);

+ 21 - 21
pages/users/order_list/index.vue

@@ -514,27 +514,27 @@
 				let self = this
 				if (!order_id) return that.$util.Tips({
 					title: '缺少订单号无法查看订单详情'
-				});
-				// #ifdef MP
-				uni.showLoading({
-					title: '正在加载',
-				})
-				openOrderSubscribe().then(() => {
-					uni.hideLoading();
-					if (self.orderStatus == 0) {
-						uni.navigateTo({
-							url: '/pages/order_details/stay?order_id=' + order_id
-						})
-					} else {
-						uni.navigateTo({
-							url: '/pages/order_details/index?order_id=' + order_id
-						})
-					}
-				}).catch(() => {
-					uni.hideLoading();
-				})
-				// #endif  
-				// #ifndef MP
+				});
+				// #ifdef MP-WEIXIN
+				uni.showLoading({
+					title: '正在加载',
+				})
+				openOrderSubscribe().then(() => {
+					uni.hideLoading();
+					if (self.orderStatus == 0) {
+						uni.navigateTo({
+							url: '/pages/order_details/stay?order_id=' + order_id
+						})
+					} else {
+						uni.navigateTo({
+							url: '/pages/order_details/index?order_id=' + order_id
+						})
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				})
+				// #endif 
+				// #ifndef MP-WEIXIN
 				if (self.orderStatus == 0) {
 					uni.navigateTo({
 						url: '/pages/order_details/stay?order_id=' + order_id

+ 2 - 2
pages/users/presell_order_list/index.vue

@@ -297,7 +297,7 @@
 				if (!order_id) return that.$util.Tips({
 					title: '缺少订单号无法查看订单详情'
 				});
-				// #ifdef MP
+				// #ifdef MP-WEIXIN
 				uni.showLoading({
 					title: '正在加载',
 				})
@@ -311,7 +311,7 @@
 					uni.hideLoading();
 				})
 				// #endif  
-				// #ifndef MP
+				// #ifndef MP-WEIXIN
 				
 				uni.navigateTo({
 					url: '/pages/order_details/index?order_id=' + order_id

+ 4 - 2
pages/users/user_address_list/index.vue

@@ -42,8 +42,10 @@
 				<view class='addressBnt bg-color on' @click='addAddress'><text class='iconfont icon-tianjiadizhi'></text>添加新地址</view>
 				<!-- #endif -->
 				<!-- #ifdef MP-->
-				<view class='addressBnt bg-color' @click='addAddress'><text class='iconfont icon-tianjiadizhi'></text>添加新地址</view>
-				<view class='addressBnt wxbnt' @click='getWxAddress'><text class='iconfont icon-weixin2'></text>导入微信地址</view>
+				<view class='addressBnt bg-color' @click='addAddress'><text class='iconfont icon-tianjiadizhi'></text>添加新地址</view>
+				<!-- #ifndef MP-TOUTIAO -->
+				<view class='addressBnt wxbnt' @click='getWxAddress'><text class='iconfont icon-weixin2'></text>导入微信地址</view>
+				<!-- #endif -->
 				<!-- #endif -->
 				<!-- #ifdef H5-->
 				<view class='addressBnt bg-color' :class="this.$wechat.isWeixin()?'':'on'" @click='addAddress'><text class='iconfont icon-tianjiadizhi'></text>添加新地址</view>

+ 6 - 2
store/modules/app.js

@@ -15,7 +15,8 @@ const state = {
 	backgroundColor: "#fff",
 	userInfo: null,
 	uid: Cache.get(UID) || null,
-	homeActive: false,
+	homeActive: false,
+	power: '',
 };
 
 const mutations = {
@@ -48,7 +49,10 @@ const mutations = {
 	},
 	CLOSE_HOME(state) {
 		state.homeActive = false;
-	},
+	},
+	setPower(state,val) {
+		state.power = val
+	}
 };
 
 const actions = {