Explorar el Código

[ 205 ] 成功设置支付密码后,还是提示请先设置密码 (解决)

wangn hace 5 años
padre
commit
6e9794f9d8
Se han modificado 1 ficheros con 18 adiciones y 3 borrados
  1. 18 3
      hdApp/src/pagesPurchase/setPsd.vue

+ 18 - 3
hdApp/src/pagesPurchase/setPsd.vue

@@ -72,9 +72,24 @@ export default {
     changePsd () {
       console.log(this.keyContent.length)
       if (this.keyContent.length === 6) {
-        adminSetPayPassword({ password: this.keyContent }).then(res => {
-          this.$msg(res.msg)
-          uni.navigateBack({})
+        adminSetPayPassword({ password: this.keyContent }).then(psdRes => {
+          uni.login({
+            provider: 'weixin',
+            success: res => {
+              postWxCode({ code: res.code }).then(subRes => {
+                this.$store.commit('setLoginInfo', {
+                  ...subRes.data.admin,
+                  ...subRes.data
+                })
+              })
+              this.$msg(psdRes.msg)
+              uni.navigateBack({})
+            },
+            fail:err=>{
+              reject(err)
+            }
+          })
+          
         }).catch(err => { 
           this.$msg(err.msg)
           uni.navigateBack({})