wangguoyu 8 hours ago
parent
commit
4e1e17474c
1 changed files with 8 additions and 6 deletions
  1. 8 6
      pages/Login/clientIndex.vue

+ 8 - 6
pages/Login/clientIndex.vue

@@ -10,7 +10,7 @@
 
 			<view v-if="fromAppShare" class="wechat-auth-box">
 				<view class="auth-tips">欢迎使用小程序</view>
-				<button class="wechat-auth-btn" open-type="getUserInfo" @click="onWechatAuth">
+				<button class="wechat-auth-btn" open-type="getUserInfo"@getuserinfo="onWechatAuth">
 					微信一键登录
 				</button>
 				<view class="switch-login" @click="switchToNormalLogin">使用账号登录</view>
@@ -79,7 +79,7 @@
 	const id = ref('')
 
 	// 新增变量
-	const fromAppShare = ref(true) // 是否来自APP分享
+	const fromAppShare = ref(false) // 是否来自APP分享
 
 	const store = useIsCanBack();
 
@@ -141,12 +141,12 @@
 			console.log('result', result);
 			if (result.data.bind) {
 				// 保存用户信息
-				if (res.data.loginVo.type === 4) {
-					cacheManager.set('auth', res.data.loginVo)
+				if (result.data.loginVo.type == 4) {
+					cacheManager.set('auth', result.data.loginVo)
 					store.setIsCanBack(false)
 					gotoPage();
-				} else if (res.data.loginVo.type === 6) {
-					cacheManager.set('auth', res.data.loginVo)
+				} else if (result.data.loginVo.type == 6) {
+					cacheManager.set('auth', result.data.loginVo)
 					store.setIsCanBack(false)
 					gotoPage2();
 				} else {
@@ -253,6 +253,7 @@
 	}
 
 	function gotoPage() {
+			console.log('ididid',id.value);
 		if (id.value) {
 			uni.navigateTo({
 				url: `/pages/client/hetong/hetongInfo?id=` + id.value
@@ -265,6 +266,7 @@
 	}
 
 	function gotoPage2() {
+			console.log('ididid222222',id.value);
 		if (id.value) {
 			uni.navigateTo({
 				url: `/pages/kehu/hetong/hetongInfo?id=` + id.value