|
@@ -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',
|
|
|
});
|
|
|
}
|