Kaynağa Gözat

授权修改

306132416@qq.com 5 yıl önce
ebeveyn
işleme
542c87bf15
2 değiştirilmiş dosya ile 8 ekleme ve 2 silme
  1. 5 1
      pages/index/detailPage/index.vue
  2. 3 1
      pages/index/index.vue

+ 5 - 1
pages/index/detailPage/index.vue

@@ -74,11 +74,15 @@
 				shareContent:'',
 				shareCode:'',
 				storeImg:'',
+				isAuthPhone:getApp().globalData.user_phone,
 			}
 		},
 		onLoad(option) {
 			this.getDetailInfo(option.detailId);
 		},
+		onShow() {
+			this.isAuthPhone = getApp().globalData.user_phone;
+		},
 		onShareAppMessage() {
 			  return {
 			      title: '分销小助手',
@@ -116,7 +120,7 @@
 				});
 			},
 			 showShareModal(){
-					if(getApp().globalData.user_phone){
+					if(this.isAuthPhone){
 						this.$refs.popup.open();
 					}else {
 						uni.navigateTo({

+ 3 - 1
pages/index/index.vue

@@ -81,6 +81,7 @@
 				title: 'Hello',
 				pageInfo:{},
 				isAuth:getApp().globalData.isAuth,
+				isAuthPhone:getApp().globalData.user_phone,
 				productList:[
 					// {   
 					// 	id:'1',
@@ -117,6 +118,7 @@
 		},
 		onShow() {
 			this.isAuth =getApp().globalData.isAuth;
+			this.isAuthPhone = getApp().globalData.user_phone;
 		},
 		onShareAppMessage() {
 			  return {
@@ -252,7 +254,7 @@
 			},
 			 showShareModal(){
 			         // 需要在 popup 组件,指定 ref 为 popup
-			 		if(getApp().globalData.user_phone){
+			 		if(this.isAuthPhone){
 						this.$refs.popup.open();
 			 		}else {
 			 			uni.navigateTo({