小程序修改代码

This commit is contained in:
2025-08-06 13:16:08 +08:00
parent 50e892adc4
commit b6a59ce3d8
14 changed files with 80 additions and 47 deletions

View File

@ -20,7 +20,7 @@ Page({
onSearch() {
const nickName = this.data.nickName.trim();
const phoneNumber = this.data.phoneNumber.trim();
const supervisorUserId = this.data;
const { supervisorUserId } = this.data;
if (!nickName) {
wx.showToast({ title: '请输入主管名称', icon: 'none' });
@ -37,7 +37,11 @@ Page({
header: {
Authorization: wx.getStorageSync('token')
},
data: { nickName, phoneNumber, supervisorUserId},
data: {
nickName: nickName,
phoneNumber: phoneNumber,
supervisorUserId: supervisorUserId,
},
success: (res) => {
console.log('--->后端返回记录',res.data);
if (res.data.code === 1) {
@ -105,7 +109,7 @@ Page({
onLoad(options) {
console.log('--->',options);
this.setData({
supervisorUserId: options.supId,
supervisorUserId: options.id,
})
this.onSearchSupId();
},