Procházet zdrojové kódy

Merge branch 'master' of http://git.huaml.com/zhh/front-end

jf před 5 roky
rodič
revize
de0145b1af
1 změnil soubory, kde provedl 18 přidání a 3 odebrání
  1. 18 3
      hdApp/src/pagesPurchase/setPsd.vue

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

@@ -72,9 +72,24 @@ export default {
     changePsd () {
     changePsd () {
       console.log(this.keyContent.length)
       console.log(this.keyContent.length)
       if (this.keyContent.length === 6) {
       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 => { 
         }).catch(err => { 
           this.$msg(err.msg)
           this.$msg(err.msg)
           uni.navigateBack({}) 
           uni.navigateBack({})