Просмотр исходного кода

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

jf 5 лет назад
Родитель
Сommit
de0145b1af
1 измененных файлов с 18 добавлено и 3 удалено
  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({})