2312970463@qq.com 4 роки тому
батько
коміт
81839a23ac

+ 1 - 1
components/Authorize.vue

@@ -99,7 +99,7 @@ export default {
 				.then(res => {
 					console.log('获取授权信息',res);
 					// #ifdef MP-TOUTIAO
-						// console.log("获取授权信息toutiao")
+						console.log("获取授权信息toutiao")
 						this.getUserInfo();
 					// #endif
 					// #ifdef MP-WEIXIN

+ 5 - 0
components/payment/index.vue

@@ -74,6 +74,11 @@
 					// #ifdef MP
 					type = 'routine';
 					// #endif
+					// #ifdef MP-TOUTIAO
+					if(paytype !== 'balance'){
+						type = 'h5'
+					}
+					// #endif
 				} else if (paytype == 'balance') {
 					type = 'balance';
 				}else if(paytype == 'alipay'){

+ 5 - 1
libs/routine.js

@@ -14,8 +14,10 @@ class Routine
 	
 	async getUserCode(){
 		let isAuth = await this.isAuth(), code = '' ;
+		console.log(isAuth,"isAuth++++++++++")
 		if(isAuth)
 			code = await this.getCode();
+		console.log(code,'code----------')
 		return code;
 	}
 	
@@ -24,7 +26,7 @@ class Routine
 	 */
 	async getUserInfo(){
 		let  that = this , code =await that.getUserCode();
-		// console.log(code)
+		console.log(code,'code+++++++')
 		return new Promise( (resolve,reject) => {
 			// console.log(code);
 			uni.getUserInfo({
@@ -82,6 +84,7 @@ class Routine
 		let provider = await this.getProvider();
 		return new Promise((resolve,reject)=>{
 			if(Cache.has(STATE_R_KEY)){
+				console.log(Cache.has(STATE_R_KEY),'有STATE_R_KEY')
 				return resolve(Cache.get(STATE_R_KEY));
 			}
 			uni.login({
@@ -123,6 +126,7 @@ class Routine
 		return new Promise((resolve,reject)=>{
 			uni.getSetting({
 				success(res) {
+					console.log(res,'++++++++++是否授权+++++++++++')
 					if (!res.authSetting[that.scopeUserInfo]) {
 						resolve(true)
 					} else {

+ 9 - 9
main.js

@@ -32,18 +32,18 @@ if (urlSpread !== undefined) {
 	}
 }
 
-if (vconsole !== undefined) {
-  if (vconsole === md5UnCrmeb && Cache.has(cookieName))
-	  Cache.clear(cookieName);
-} else vconsole = Cache.get(cookieName);
+// if (vconsole !== undefined) {
+//   if (vconsole === md5UnCrmeb && Cache.has(cookieName))
+// 	  Cache.clear(cookieName);
+// } else vconsole = Cache.get(cookieName);
 
-import VConsole from './components/vconsole.min.js'
+// import VConsole from './components/vconsole.min.js'
 
-if (vconsole !== undefined && vconsole === md5Crmeb) {
-	Cache.set(cookieName, md5Crmeb, 3600);
-	let vConsole = new VConsole();
+// if (vconsole !== undefined && vconsole === md5Crmeb) {
+// 	Cache.set(cookieName, md5Crmeb, 3600);
+// 	let vConsole = new VConsole();
 	
-}
+// }
 
 
 if(!!!Auth.isAndroid() && Auth.isWeixin()){

+ 123 - 123
pages.json

@@ -142,12 +142,12 @@
 						"navigationBarTitleText": "签到记录"
 					}
 				},
-				{
-					"path": "user_money/index",
-					"style": {
-						"navigationBarTitleText": "我的账户"
-					}
-				},
+				// {
+				// 	"path": "user_money/index",
+				// 	"style": {
+				// 		"navigationBarTitleText": "我的账户"
+				// 	}
+				// },
 				{
 					"path": "user_bill/index",
 					"style": {
@@ -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",

+ 20 - 1
pages/goods_details/index.vue

@@ -428,6 +428,10 @@
 		onReady() {},
 		onShow() {
 			this.getConfig()
+			console.log(this.isLogin,'this.isLogin')
+			if(this.isLogin){
+				this.getUserInfo()
+			}
 		},
 		/**
 		 * 用户点击右上角分享
@@ -550,6 +554,9 @@
 				// this.getUserInfo();
 				// this.get_product_collect();
 				this.isShowAuth = false
+				// if(!e.phone) {
+				// 	console.log("没有手机号")
+				// }
 			},
 			ChangCouponsClone: function() {
 				this.$set(this.coupon, 'coupon', false)
@@ -561,7 +568,19 @@
 				let that = this;
 				that.$set(that.sharePacket, 'isState', that.sharePacket.priceName != 0 ? false : true);
 				getUserInfo().then(res => {
-
+					let userInfo = res.data
+					if(!userInfo.phone){
+						uni.showModal({
+							title: "请绑定手机号",
+							content: "为了方便您的取货和我们的送货,并获取更多优惠活动,需要您的手机授权!",
+							showCancel: false,
+							complete() {
+								uni.navigateTo({
+									url: '/pages/users/user_phone/index'
+								})
+							}
+						})
+					}
 					// that.$set(that, 'uid', res.data.uid);
 				});
 			},

+ 31 - 2
pages/index/index.vue

@@ -668,14 +668,18 @@
 			// this.getLiveLists()
 			// #endif
 			if (this.isLogin) {
-				this.getUserInfo();
+				console.log("登录了+++++")
+				// this.getUserInfo();
 				// #ifdef MP
-				this.getHistory()
+				// this.getHistory()
 				// #endif
 			};
 		},
 		onShow() {
 			this.getConfig()
+			if(this.isLogin){
+				this.getUserInfo()
+			}
 		},
 		onReady() {
 			let self = this
@@ -701,6 +705,19 @@
 			onLoadFun: function(e) {
 				console.log('回调数据',e);
 				this.isShowAuth = false
+				// if(!e.phone){
+				// 	uni.showModal({
+				// 		title: "请绑定手机号",
+				// 		content: "为了方便您的取货和我们的送货,并获取更多优惠活动,需要您的手机授权!",
+				// 		showCancel: false,
+				// 		complete(){
+				// 			console.log("绑定手机号")
+				// 			uni.navigateTo({
+				// 				url: '/pages/users/user_phone/index'
+				// 			})
+				// 		}
+				// 	})
+				// }
 			},
 			setViewport(content) {
 				const meta = document.querySelector('meta[name=viewport]');
@@ -805,6 +822,18 @@
 				let that = this;
 				getUserInfo().then(res => {
 					that.userInfo = res.data
+					if(!that.userInfo.phone){
+						uni.showModal({
+							title: "请绑定手机号",
+							content: "为了方便您的取货和我们的送货,并获取更多优惠活动,需要您的手机授权!",
+							showCancel: false,
+							complete() {
+								uni.navigateTo({
+									url: '/pages/users/user_phone/index'
+								})
+							}
+						})
+					}
 				});
 			},
 			// 品牌好店

+ 10 - 7
pages/user/index.vue

@@ -157,7 +157,7 @@
 		orderData
 	} from '@/api/order.js'
 	import {
-		getconfig
+		getconfig, login
 	} from '@/api/public.js'
 	import {
 		mapGetters
@@ -262,6 +262,7 @@
 			});
 		},
 		onShow: function() {
+			console.log('ddddddddddddd')
 			let that = this;
 			if (that.isLogin) {
 				this.getUserInfo();
@@ -340,16 +341,18 @@
 						that.is_promoter = res.data.is_promoter
 						that.extension_status = res.data.extension_status
 						console.log(that.userInfo,'that.userInfo++++++')
-						if(that.userInfo.phone){
+						if(!that.userInfo.phone){
 							uni.showModal({
 								title: "请绑定手机号",
 								content: "为了方便您的取货和我们的送货,并获取更多优惠活动,需要您的手机授权!",
 								showCancel: false,
-								// complete() {
-								// 	uni.navigateTo({
-								// 		url: '/pages/users/user_phone/index'
-								// 	})
-								// }
+								success(){
+									// uni.navigateTo({
+									// 	url: 'pages/users/user_phone/index'
+									// })
+									that.bindPhone()
+								}
+								
 							})
 						}
 				});

+ 7 - 2
pages/users/order_confirm/index.vue

@@ -1120,8 +1120,13 @@
 					}
 				}
 			},
-			SubOrder: function(e) {
-				this.payType="h5"
+			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({

BIN
static/img/live-logo.gif


BIN
static/js/live-logo.gif