- 后端:RlzDispatch/Profit/Promotion/Region 控制器、服务、Mapper、领域模型 - 权限:MethodSecurityConfig + PermissionInterceptor - 管理后台:派单/分润/推广/区域 页面与 API - Android 陪护端:派单/运营/退款 Fragment 及布局 - 小程序:推广员子包、派单/运营/退款/检索子包、自定义 tabBar - 文档:多角色系统方案、角色权限矩阵、用户操作手册等 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
92 lines
2.3 KiB
JavaScript
92 lines
2.3 KiB
JavaScript
//获取应用实例
|
|
var app = getApp();
|
|
const { request } = require('../../utils/request')
|
|
|
|
Page({
|
|
data: {
|
|
option1: [{ text: '切换医院', value: 0 }],
|
|
value1: 0,
|
|
version_number: '1.0',
|
|
height: '',
|
|
url: app.globalData.url,
|
|
hospitalId: '',
|
|
special_offer: [],
|
|
firstLoad: true
|
|
},
|
|
|
|
shuChange: function (e) {
|
|
this.setData({ hospitalId: e.detail })
|
|
this.getCaregiverList();
|
|
},
|
|
|
|
onShow: function () {
|
|
if (this.data.firstLoad) {
|
|
this.setData({ firstLoad: false })
|
|
this.getHospitals()
|
|
this.getCaregiverList()
|
|
}
|
|
},
|
|
|
|
// 加载医院列表
|
|
getHospitals: function () {
|
|
var that = this;
|
|
request({
|
|
url: '/system/hospital/list',
|
|
method: 'GET',
|
|
loading: false
|
|
}).then(res => {
|
|
var hospitals = res.rows || res.data || [];
|
|
var options = [{ text: '切换医院', value: 0 }];
|
|
hospitals.forEach(function (h, i) {
|
|
options.push({
|
|
text: h.hospitalname,
|
|
value: i + 1
|
|
})
|
|
})
|
|
that.setData({ option1: options, hospitalData: hospitals })
|
|
}).catch(function() {
|
|
that.setData({ option1: [{ text: '加载失败', value: 0 }] })
|
|
})
|
|
},
|
|
|
|
// 加载陪护人员列表
|
|
getCaregiverList: function () {
|
|
var that = this;
|
|
request({
|
|
url: '/system/hospitalUserView/list',
|
|
method: 'GET',
|
|
loading: true,
|
|
data: { hospitalId: this.data.hospitalId }
|
|
}).then(res => {
|
|
var list = res.data || [];
|
|
list = list.map(function(item) {
|
|
item.facePic = app.fixImageUrl(item.facePic || item.avatar) || '/pages/image/userimg.png';
|
|
return item;
|
|
});
|
|
that.setData({ special_offer: list })
|
|
}).catch(function() {
|
|
wx.showToast({ title: '加载失败', icon: 'none' })
|
|
})
|
|
},
|
|
|
|
// 跳转详情
|
|
details(e) {
|
|
if (e.currentTarget.dataset.item != 0) {
|
|
let item = JSON.stringify(e.currentTarget.dataset.item);
|
|
wx.navigateTo({
|
|
url: "/shopping/pages/goddess/goddess?item=" + item,
|
|
});
|
|
}
|
|
},
|
|
back(e){
|
|
wx.navigateBack()
|
|
},
|
|
onLoad: function (e) {
|
|
var navBar = getApp().getNavBarHeight();
|
|
navBar.hospitalId = e.hospitalId || '';
|
|
this.setData(navBar);
|
|
},
|
|
changeDateTime1(e) {
|
|
this.setData({ dateTime1: e.detail.value });
|
|
},
|
|
}) |