xcx 4 lat temu
rodzic
commit
2ccd868039

+ 20
- 8
src/pages/WoDe/ShiMingRenZheng/index.vue Wyświetl plik

71
   },
71
   },
72
   methods: {
72
   methods: {
73
     ...mapUserActions([
73
     ...mapUserActions([
74
-      'AliShiMingRenZheng'
74
+      'AliShiMingRenZheng',
75
+      'NewBindAliPay'
75
     ]),
76
     ]),
76
     ...mapUserMutations([
77
     ...mapUserMutations([
77
       'EditShopInfo'
78
       'EditShopInfo'
93
     ToAliShiMingRenZheng () {
94
     ToAliShiMingRenZheng () {
94
       if (this.DataLock) return
95
       if (this.DataLock) return
95
       this.DataLock = true
96
       this.DataLock = true
96
-      this.AliShiMingRenZheng({
97
-        urlData: { id: this.CurrentShopInfo.shopId },
98
-        data: {
99
-          alipayName: this.RealName,
100
-          aliLoginId: this.AliAccount
101
-        }
102
-      }).then(() => {
97
+      this.NewBindAliPay({ urlData: { id: this.CurrentShopInfo.shopId }, data: { loginId: this.AliAccount, realName: this.RealName } }).then(() => {
103
         this.EditShopInfo({ name: 'alipayName', value: this.RealName })
98
         this.EditShopInfo({ name: 'alipayName', value: this.RealName })
104
         this.Toast('认证成功')
99
         this.Toast('认证成功')
105
         this.DataLock = false
100
         this.DataLock = false
110
         this.Toast(res.data.message)
105
         this.Toast(res.data.message)
111
         this.DataLock = false
106
         this.DataLock = false
112
       })
107
       })
108
+      // this.AliShiMingRenZheng({
109
+      //   urlData: { id: this.CurrentShopInfo.shopId },
110
+      //   data: {
111
+      //     alipayName: this.RealName,
112
+      //     aliLoginId: this.AliAccount
113
+      //   }
114
+      // }).then(() => {
115
+      //   this.EditShopInfo({ name: 'alipayName', value: this.RealName })
116
+      //   this.Toast('认证成功')
117
+      //   this.DataLock = false
118
+      //   window.setTimeout(() => {
119
+      //     this.$router.go(-1)
120
+      //   }, 300)
121
+      // }).catch((res) => {
122
+      //   this.Toast(res.data.message)
123
+      //   this.DataLock = false
124
+      // })
113
     }
125
     }
114
   }
126
   }
115
 }
127
 }

+ 5
- 0
src/store/user/index.js Wyświetl plik

82
     }
82
     }
83
   },
83
   },
84
   actions: {
84
   actions: {
85
+    NewBindAliPay (context, payload) { // 绑定支付宝(新)
86
+      return new Promise((resolve, reject) => {
87
+        ToolClass.Axios(resolve, reject, Api.NewBindAliPay, context, payload, 1000)
88
+      })
89
+    },
85
     AliPay (context, payload) { // 支付宝支付
90
     AliPay (context, payload) { // 支付宝支付
86
       return new Promise((resolve, reject) => {
91
       return new Promise((resolve, reject) => {
87
         ToolClass.Axios(resolve, reject, Api.AliPay, context, payload, 1000)
92
         ToolClass.Axios(resolve, reject, Api.AliPay, context, payload, 1000)

+ 4
- 0
src/util/Api.js Wyświetl plik

2
 const prefix = '/api'
2
 const prefix = '/api'
3
 
3
 
4
 const $api = {
4
 const $api = {
5
+  NewBindAliPay: { // 绑定支付宝(新)
6
+    method: 'post',
7
+    url: `${prefix}/shop/:id/ali-pay`
8
+  },
5
   AliPay: { // 支付宝支付
9
   AliPay: { // 支付宝支付
6
     method: 'post',
10
     method: 'post',
7
     url: `${prefix}/shop/sent-award/order/:orderId`
11
     url: `${prefix}/shop/sent-award/order/:orderId`