47 lines
811 B
JavaScript
47 lines
811 B
JavaScript
// index.js
|
|
// 获取应用实例
|
|
const app = getApp()
|
|
|
|
Page({
|
|
data: {
|
|
image1: "https://tdesign.gtimg.com/miniprogram/images/avatar1.png",
|
|
image2: "https://tdesign.gtimg.com/miniprogram/images/avatar2.png"
|
|
|
|
},
|
|
// 添加员工
|
|
addEmployee(e) {
|
|
console.log(e)
|
|
this.setData({
|
|
showDialog: true
|
|
})
|
|
},
|
|
closeDialog() {
|
|
this.setData({
|
|
showDialog: false
|
|
});
|
|
},
|
|
// 员工页面
|
|
navigateToEmployee() {
|
|
wx.navigateTo({
|
|
url: '/pages/employee/index',
|
|
})
|
|
},
|
|
// 商户页面
|
|
switchToMerchant() {
|
|
wx.switchTab({
|
|
url: '/pages/merchant/payroll',
|
|
})
|
|
},
|
|
|
|
onLoad() {
|
|
if (wx.getUserProfile) {
|
|
this.setData({
|
|
canIUseGetUserProfile: true
|
|
})
|
|
}
|
|
},
|
|
onShow() {
|
|
},
|
|
|
|
})
|