epmet 工作端 小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
2.0 KiB

/*
* @Author: mk 2403457699@qq.com
* @Date: 2024-08-14 10:47:07
* @LastEditors: mk 2403457699@qq.com
* @LastEditTime: 2024-10-21 14:21:35
* @FilePath: \epmet-work-mp\pages\webView\webView.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
const App = getApp()
Page({
data: {
worktoken: '',
staffId:"",
type:"",
day:"",
day2:"",
iceventid:"",
Hotline:"",
url:"",
},
onLoad: function (options) {
let agencyId=App.globalData.user.agencyId
console.log(App.globalData.user.agencyId,"App.globalData.user.agencyId");
console.log(options,"dslkjfsldfk");
if (options.token) {
this.setData({
worktoken: `${options.worktoken}`,
});
} else {
if (options.Hotline) {
if (options.staffId){
const url = `${options.Hotline}?worktoken=${decodeURIComponent(options.worktoken)}&staffId=${options.staffId}&type=${options.type}&day=${options.day}&day2=${options.day2}`;
console.log('生成的 URL:', url);
this.setData({
url: url
})
console.log(this.data.url,"ds;lkjdflks");
}else{
const url = `${options.Hotline}?worktoken=${decodeURIComponent(options.worktoken)}`;
console.log('生成的 URL:', url);
this.setData({
url: url
})
}
}else{
if (options.iceventid) {
const url = `${options.AttackEvent}?worktoken=${decodeURIComponent(options.worktoken)}&iceventid=${options.iceventid}`;
console.log('生成的 URL:', url);
this.setData({
url: url
})
}else{
const url = `${options.AttackEvent}?worktoken=${decodeURIComponent(options.worktoken)}`;
console.log('生成的 URL:', url);
this.setData({
url: url
})
}
}
}
},
onShow() {
this.onLoad()
},
})