|
@@ -101,7 +101,9 @@ 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 }); }
|
|
|
|
+ else if (type == '2') { arr = await app.$post(`/coach/${id}`, { user_id: res.data._id }); aee = await app.$post(`/user/${res.data._id}`, { type: type }); }
|
|
|
|
+ else if (type == '3') { arr = await app.$post(`/student/${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: '提示',
|