|
@@ -5,6 +5,8 @@ import QRCode from '../../../utils/weapp-qrcode.js';
|
|
|
Page({
|
|
|
data: {
|
|
|
frameStyle: { useTop: true, name: '裁判信息', leftArrow: true, useBar: false },
|
|
|
+ // 比赛系统用户
|
|
|
+ raceuser: {},
|
|
|
list: [],
|
|
|
total: 0,
|
|
|
page: 0,
|
|
@@ -39,14 +41,14 @@ Page({
|
|
|
content: '是否确认删除该条数据?',
|
|
|
async success(res) {
|
|
|
if (res.confirm) {
|
|
|
- // const arr = await app.$delete(`/user/${item._id}`);
|
|
|
- // if (arr.errcode == '0') {
|
|
|
- // wx.showToast({ title: `删除信息成功`, icon: 'success', duration: 2000 })
|
|
|
- // that.setData({ skip: 0, page: 0, list: [] })
|
|
|
- // that.watchLogin()
|
|
|
- // } else {
|
|
|
- // wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
|
|
|
- // }
|
|
|
+ const arr = await app.$delete(`/user/${item._id}`, {}, 'race');
|
|
|
+ if (arr.errcode == '0') {
|
|
|
+ wx.showToast({ title: `删除信息成功`, icon: 'success', duration: 2000 })
|
|
|
+ that.setData({ skip: 0, page: 0, list: [] })
|
|
|
+ that.watchLogin()
|
|
|
+ } else {
|
|
|
+ wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -85,7 +87,7 @@ Page({
|
|
|
},
|
|
|
makeQRCode(template = 0) {
|
|
|
const that = this;
|
|
|
- const url = `${that.data.form.id}&&2`;
|
|
|
+ const url = `${that.data.raceuser._id}&&2`;
|
|
|
var qrcode = new QRCode(`myQrcode`, {
|
|
|
text: url,
|
|
|
width: 110,
|
|
@@ -153,6 +155,7 @@ Page({
|
|
|
wx.getStorage({
|
|
|
key: 'raceuser',
|
|
|
success: async res => {
|
|
|
+ that.setData({ raceuser: res.data })
|
|
|
let arr;
|
|
|
// 查询当前用户学校,学校id存比赛系统user中的_id,查询当前用户学校与教练的关系表
|
|
|
arr = await app.$get(`/school`, { user_id: res.data.user_id._id })
|