Commit 232f91fc550b79c3164e01fa7c91b72aeeda17f0

Authored by fengtao
1 parent e1069bfb

refractor:移除一些无用代码,修改密码框眼睛图表颜色

@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 </view> 17 </view>
18 <view class="form-row u-flex"> 18 <view class="form-row u-flex">
19 <view class="v-input"><input type="text" v-model="loginForm.password" maxlength="32" placeholder="请输入登录密码" :password="!showPassword" /></view> 19 <view class="v-input"><input type="text" v-model="loginForm.password" maxlength="32" placeholder="请输入登录密码" :password="!showPassword" /></view>
20 - <view class="v-password" @click="showPasswordMode"><u-icon size="25" :name="showPassword ? 'eye-fill' : 'eye-off'"></u-icon></view> 20 + <view class="v-password" @click="showPasswordMode"><u-icon color="#9a9a9a" size="25" :name="showPassword ? 'eye-fill' : 'eye-off'"></u-icon></view>
21 <u-icon></u-icon> 21 <u-icon></u-icon>
22 </view> 22 </view>
23 <button class="submit" size="default" @click="onSubmitFunc"><text class="text">登录</text></button> 23 <button class="submit" size="default" @click="onSubmitFunc"><text class="text">登录</text></button>
@@ -81,11 +81,13 @@ export default { @@ -81,11 +81,13 @@ export default {
81 methods: { 81 methods: {
82 ...mapMutations(['setUserInfo']), 82 ...mapMutations(['setUserInfo']),
83 //微信授权登录 83 //微信授权登录
  84 + //#ifdef MP
84 onAuthorization(e) { 85 onAuthorization(e) {
85 wx.getUserProfile({ 86 wx.getUserProfile({
86 desc: '获取用户信息', 87 desc: '获取用户信息',
87 success: res => { 88 success: res => {
88 if (res) { 89 if (res) {
  90 + //微信官方自带解密(node)
89 let pc = new WXBizDataCrypt(appId, this.session_key); 91 let pc = new WXBizDataCrypt(appId, this.session_key);
90 let data = pc.decryptData(res.encryptedData, res.iv); 92 let data = pc.decryptData(res.encryptedData, res.iv);
91 let obj = { 93 let obj = {
@@ -98,6 +100,9 @@ export default { @@ -98,6 +100,9 @@ export default {
98 .get(`/yt/third/login/${this.openid}`) 100 .get(`/yt/third/login/${this.openid}`)
99 .then(res => { 101 .then(res => {
100 if (res.token == '' || res.token == null) { 102 if (res.token == '' || res.token == null) {
  103 + // return uni.showToast({
  104 + // title: '需要绑定'
  105 + // });
101 } else { 106 } else {
102 // 储存登录信息 107 // 储存登录信息
103 let resObj = { 108 let resObj = {
@@ -116,9 +121,6 @@ export default { @@ -116,9 +121,6 @@ export default {
116 icon: 'none' 121 icon: 'none'
117 }); 122 });
118 this.saveUserInfo(); 123 this.saveUserInfo();
119 - // return uni.showToast({  
120 - // title: '不需要绑定'  
121 - // });  
122 } 124 }
123 }) 125 })
124 .catch(e => { 126 .catch(e => {
@@ -127,7 +129,7 @@ export default { @@ -127,7 +129,7 @@ export default {
127 // #ifdef APP-PLUS||MP 129 // #ifdef APP-PLUS||MP
128 setTimeout(() => { 130 setTimeout(() => {
129 uni.reLaunch({ 131 uni.reLaunch({
130 - url: '/pages/personal/personal?obj=' + JSON.stringify(obj) 132 + url: '/pages/personal/personal?obj=' + encodeURIComponent(JSON.stringify(obj))
131 }); 133 });
132 }, 500); 134 }, 500);
133 // #endif 135 // #endif
@@ -135,6 +137,7 @@ export default { @@ -135,6 +137,7 @@ export default {
135 } 137 }
136 }); 138 });
137 }, 139 },
  140 + //#endif
138 saveUserInfo() { 141 saveUserInfo() {
139 //储存个人信息 142 //储存个人信息
140 uni.$u.http.get('/yt/user/me/info').then(res => { 143 uni.$u.http.get('/yt/user/me/info').then(res => {
@@ -120,5 +120,6 @@ @@ -120,5 +120,6 @@
120 background: linear-gradient(241deg, #00c9a7 0%, rgba(0, 223, 252, 0.5) 100%); 120 background: linear-gradient(241deg, #00c9a7 0%, rgba(0, 223, 252, 0.5) 100%);
121 opacity: 0.1; 121 opacity: 0.1;
122 transform: rotate(180deg); 122 transform: rotate(180deg);
  123 + z-index: -9999;
123 } 124 }
124 } 125 }