武田基因病B开发环境
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.

78 lines
1.4 KiB

2 months ago
const app = getApp<IAppOption>()
2 months ago
Page({
data: {
popupShow: false,
popupType: 'argument',
popupParams: {
position: 'bottom',
},
2 months ago
userInfo: {},
bannerList: [],
2 months ago
pageTop: '',
background: 'transparent',
},
onLoad() {
2 months ago
app.waitLogin().then(() => {
this.setData({
popupShow: !app.globalData.guestPrivacyAgree,
})
app.getUserInfo().then((userInfo) => {
this.setData({
userInfo,
})
})
this.getBanner()
})
},
getBanner() {
wx.ajax({
method: 'GET',
url: '?r=wtx/common/banner-config',
data: {},
}).then((res) => {
this.setData({
bannerList: res,
})
})
},
onBannerItemTap(e) {
const { path } = e.currentTarget.dataset
wx.navigateTo({
url: path,
2 months ago
})
},
2 months ago
routerTo(e) {
const { url } = e.currentTarget.dataset
wx.navigateTo({
url,
})
},
2 months ago
handlePopupOk() {
const { popupType } = this.data
if (popupType === 'argument') {
wx.ajax({
method: 'POST',
url: '?r=wtx/user/agree-guest-privacy',
data: {
// TODO: 待补充
WorkerId: '',
},
}).then(() => {
this.setData({
popupShow: false,
})
})
}
},
handlePopupCancel() {
if (this.data.popupType === 'argument') {
wx.exitMiniProgram()
}
},
2 months ago
})
export {}