小程序修改代码

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

@ -8,6 +8,7 @@ Page({
showList: false, // 是否显示绩效列表
performanceList: [], // 绩效列表数据,含 ratePercent 字段
userRole: '', // 用户角色
id: 0,
},
onNameInput(e) {
@ -20,6 +21,7 @@ Page({
onSearch() {
const nickName = this.data.nickName.trim();
const phoneNumber = this.data.phoneNumber.trim();
const { id } = this.data
if (!nickName) {
wx.showToast({ title: '请输入主管名称', icon: 'none' });
@ -36,7 +38,10 @@ Page({
header: {
Authorization: wx.getStorageSync('token')
},
data: { nickName, phoneNumber },
data: {
nickName: nickName,
phoneNumber: phoneNumber,
},
success: (res) => {
console.log('--->后端返回记录',res.data);
if (res.data.code === 1) {
@ -71,7 +76,8 @@ Page({
onLoad(options) {
console.log('--->',options);
this.setData({
userRole: options.role
userRole: options.role,
id: options.id,
})
let showRole = '';
switch (options.role) {