Browse Source

立即下单跳转

zhanghui 1 year ago
parent
commit
7f141a5054
2 changed files with 6 additions and 123 deletions
  1. 1 1
      pages/index/diy/components/latestGroupBuying.vue
  2. 5 122
      pages/user/index.vue

+ 1 - 1
pages/index/diy/components/latestGroupBuying.vue

@@ -29,7 +29,7 @@
 						¥{{ e.minPrice || 0.00 }} ~ ¥ {{ e.maxPrice || 0.00 }}
 					</view>
 				</view>
-				<view class="introduce">
+				<view class="introduce" @click="goToDetail(e)">
 					<view>
 						{{ e.mainTitle || '测试名字' }}
 					</view>

+ 5 - 122
pages/user/index.vue

@@ -515,65 +515,11 @@ export default {
 	},
 	onLoad (option) {
 
-		// uni.hideTabBar()
 		let that = this;
-		// uni.navigateTo({
-		// 		url: '/pages/groupbuying/groupbuying_order_list/index?order_id= + order_id'
-		// 	});
-		// if (this.is_diy) {
-		// 	if (uni.getStorageSync('FOOTER_BAR')) {
-		// 		uni.hideTabBar()
-		// 	}
-		// 	uni.request({
-		// 		url:'api/mock/navigation',
-		// 		success:res=>{
-		// 			this.newData = res.data
-		// 			if (this.newData.status && this.newData.status.status) {
-		// 				uni.hideTabBar()
-		// 			} else {
-		// 				uni.showTabBar()
-		// 			}
-		// 		}
-		// 	})
-		// }
-		// #ifdef MP
-		// 小程序静默授权
-
-		if (!this.$store.getters.isLogin) {
-			// Routine.getCode()
-			// 	.then(code => {
-			// 		Routine.silenceAuth(code).then(res => {
-			// 			this.onLoadFun();
-			// 		})
-			// 	})
-			// 	.catch(res => {
-			// 		uni.hideLoading();
-			// 	});
-		}
-		// #endif
 
-		// #ifdef H5 || APP-PLUS
-		if (that.isLogin == false) {
-			toLogin()
-		}
-		//获取用户信息回来后授权
-		let cacheCode = this.$Cache.get('snsapi_userinfo_code');
-		let res1 = cacheCode ? option.code != cacheCode : true;
-		if (this.isWeixin && option.code && res1 && option.scope === 'snsapi_userinfo') {
-			this.$Cache.set('snsapi_userinfo_code', option.code);
-			Auth.auth(option.code).then(res => {
-				this.getUserInfo();
-			}).catch(err => { })
-		}
-		// #endif
-		// #ifdef APP-PLUS
-		that.$set(that, 'pageHeight', app.globalData.windowHeight);
-		// #endif
 
-		let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
-		let curRoute = routes[routes.length - 1].route //获取当前页面路由
-		this.activeRouter = '/' + curRoute
-		this.getCopyRight();
+
+
 	},
 	onReady () {
 		let self = this
@@ -585,7 +531,9 @@ export default {
 		// #endif
 	},
 	onShow: function () {
-		this.commissionStatistics();
+		if (this.$store.getters.isLogin) {
+			this.commissionStatistics();
+		}
 		this.currentRole=this.$store.getters.newCurrentRole;
 		console.log(this.newCurrentRole);
 		this.grouponMngStatis();
@@ -673,16 +621,7 @@ export default {
 			Auth.isWeixin() && Auth.toAuth('snsapi_userinfo', '/pages/user/index');
 			//#endif
 		},
-		getRoutineUserInfo (e) {
-			updateUserInfo({
-				userInfo: e.detail.userInfo
-			}).then(res => {
-				this.getUserInfo();
-				return this.$util.Tips(this.$t('更新用户信息成功'));
-			}).catch(res => {
 
-			})
-		},
 		// 记录会员访问
 		setVisit () {
 			// setVisit({
@@ -863,63 +802,7 @@ export default {
 
 		},
 
-		// 签到
-		goSignIn () {
-			uni.navigateTo({
-				url: '/pages/users/user_sgin/index'
-			})
-		},
-		// goMenuPage
-		goMenuPage (url, name) {
-			if (this.isLogin) {
-				if (url.indexOf('http') === -1) {
-					// #ifdef H5 || APP-PLUS
-					if (name && name === this.$t(`service_reception`)) {
-						// return window.location.href = `${location.origin}${url}`
-						return uni.navigateTo({
-							url: `/pages/annex/web_view/index?url=${location.origin}${url}`
-						});
-					} else if (name && name === this.$t(`contact_customer`)) {
-						return getCustomer(url)
-
-					} else if (name === this.$t(`order_write_off`)) {
-						console.log(`${url}`)
-						return uni.navigateTo({
-							url: url
-						});
-						// return window.location.href = `${location.origin}${url}`
-					}
-					// #endif
 
-					// #ifdef MP
-					if (name && name === this.$t(`contact_customer`)) {
-						return getCustomer(url)
-					}
-					if (url != '#' && url == '/pages/users/user_info/index') {
-						uni.openSetting({
-							success: function (res) { }
-						});
-					}
-					// #endif
-					uni.navigateTo({
-						url: url,
-						fail (err) {
-							uni.switchTab({
-								url: url
-							})
-						}
-					})
-				} else {
-					uni.navigateTo({
-						url: `/pages/annex/web_view/index?url=${url}`
-					});
-				}
-			} else {
-				// #ifdef MP
-				this.openAuto()
-				// #endif
-			}
-		},
 		goRouter (item) {
 			var pages = getCurrentPages();
 			var page = (pages[pages.length - 1]).$page.fullPath;