guhongwei há 4 anos atrás
pai
commit
0e605dfb52
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      src/views/bind/bind.vue

+ 2 - 2
src/views/bind/bind.vue

@@ -46,7 +46,7 @@ export default {
     async onSubmit(form) {
       form.openid = this.openid;
       let res = await this.bind(form);
-      if (res.errcode === 0) {
+      if (this.$checkRes(res)) {
         this.$notify({
           message: '绑定成功',
           type: 'success',
@@ -55,7 +55,7 @@ export default {
         window.history.replaceState({}, '首页', `${Vue.config.weixin.baseUrl}/api/train/auth?redirect_uri=${Vue.config.weixin.target}/login&type=0`);
       } else {
         this.$notify({
-          message: '绑定失败',
+          message: res.errmsg,
           type: 'error',
         });
       }