|
@@ -101,7 +101,7 @@ Page({
|
|
// 学校
|
|
// 学校
|
|
let arr;
|
|
let arr;
|
|
let aee;
|
|
let aee;
|
|
- if (type == '1') { arr = await app.$post(`/school/${id}`, { user_id: res.data.id }); aee = await app.$post(`/user/${res.data.id}`, { type: type }); };
|
|
|
|
|
|
+ if (type == '1') { arr = await app.$post(`/school/${id}`, { user_id: res.data._id }); aee = await app.$post(`/user/${res.data._id}`, { type: type }); };
|
|
if (arr.errcode == '0' && aee.errcode == '0') {
|
|
if (arr.errcode == '0' && aee.errcode == '0') {
|
|
wx.showModal({
|
|
wx.showModal({
|
|
title: '提示',
|
|
title: '提示',
|
|
@@ -110,7 +110,6 @@ Page({
|
|
if (res.confirm) { wx.clearStorage(); wx.redirectTo({ url: '/pages/index/index' }) }
|
|
if (res.confirm) { wx.clearStorage(); wx.redirectTo({ url: '/pages/index/index' }) }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- // wx.showToast({ title: `绑定账号成功`, icon: 'success', duration: 2000 });
|
|
|
|
} else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }); wx.showToast({ title: `${aee.errmsg}`, icon: 'error', duration: 2000 }) }
|
|
} else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }); wx.showToast({ title: `${aee.errmsg}`, icon: 'error', duration: 2000 }) }
|
|
},
|
|
},
|
|
fail: res => {
|
|
fail: res => {
|