浏览代码

Signed-off-by: liuboyan <632697560@qq.com>
1

liuboyan 4 年之前
父节点
当前提交
95b1269d93
共有 1 个文件被更改,包括 22 次插入23 次删除
  1. 22 23
      pages/index/login.vue

+ 22 - 23
pages/index/login.vue

@@ -234,25 +234,24 @@
 					// provider: 'weixin',
 					success: (res2) => {
 						console.log('res2', res2)
-						console.log('-------获取openid(unionid)-----');
 						uni.getUserInfo({
 							provider: 'weixin',
 							success: (info) => {
 								console.log('info')
-								uni.setStorage({
-									key: 'wxLoginData',
-									data: {
-										code: res2.code,
-										encryptedData: info.encryptedData,
-										iv: info.iv,
-										rawData: info.rawData,
-										signature: info.signature,
-									}
-								})
-								that.wxLoginData = uni.getStorageSync("wxLoginData")
-								console.log(1111111, that.wxLoginData && that.wxLoginData.rawData)
-								that.userNmae = JSON.parse(that.wxLoginData.rawData).nickName
-								that.getUserInfo()
+								// uni.setStorage({
+								// 	key: 'wxLoginData',
+								// 	data: {
+								// 		code: res2.code,
+								// 		encryptedData: info.encryptedData,
+								// 		iv: info.iv,
+								// 		rawData: info.rawData,
+								// 		signature: info.signature,
+								// 	}
+								// })
+								// that.wxLoginData = uni.getStorageSync("wxLoginData")
+								// console.log(1111111, that.wxLoginData && that.wxLoginData.rawData)
+								// that.userNmae = JSON.parse(that.wxLoginData.rawData).nickName
+								// that.getUserInfo()
 								// this.$refs.uTips.show({
 								// 	title: '获取角色信息成功',
 								// 	type: 'success',
@@ -260,19 +259,19 @@
 							},
 							fail: (error) => {
 								console.log(2222, error)
-								that.$refs.uTips.show({
-									title: '微信登录授权失败',
-									type: 'warning',
-								})
+								// that.$refs.uTips.show({
+								// 	title: '微信登录授权失败',
+								// 	type: 'warning',
+								// })
 							}
 						})
 					},
 					fail: () => {
 						console.log(33333, error)
-						that.$refs.uTips.show({
-							title: '微信登录授权失败',
-							type: 'warning',
-						})
+						// that.$refs.uTips.show({
+						// 	title: '微信登录授权失败',
+						// 	type: 'warning',
+						// })
 					}
 				})
 				// uni.getProvider({