|
|
@ -6,34 +6,63 @@ |
|
|
|
* @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() |
|
|
|
const App = getApp() |
|
|
|
Page({ |
|
|
|
data: { |
|
|
|
worktoken: '', |
|
|
|
staffId:"", |
|
|
|
type:"", |
|
|
|
day:"", |
|
|
|
day2:"" |
|
|
|
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}`, |
|
|
|
}); |
|
|
|
console.log('url', this.data.worktoken); |
|
|
|
} else { |
|
|
|
console.log(options, "dslfjlksd"); |
|
|
|
this.setData({ |
|
|
|
worktoken: decodeURIComponent(options.worktoken), |
|
|
|
staffId: options.staffId, |
|
|
|
type: `${options.type}`, |
|
|
|
day: options.day, |
|
|
|
day2: options.day2 |
|
|
|
}) |
|
|
|
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 |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
const url = `https://epmet-preview.elinkservice.cn/epmet-work-h5/#/Hotline?worktoken=${this.data.worktoken}&staffId=${this.data.staffId}&type=${this.data.type}&day=${this.data.day}&day2=${this.data.day2}`; |
|
|
|
console.log('生成的 URL:', url); |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
this.onLoad() |
|
|
|