弹框更改

This commit is contained in:
zoujiandong
2023-09-07 10:04:35 +08:00
parent 9ad154f86b
commit 8d57f72f74
4 changed files with 49 additions and 7 deletions
+23 -3
View File
@@ -7,6 +7,16 @@ Page({
loading: true,
showEntryTip:false,
showEntryTip_second:false,
beforeClose(action){
return new Promise((resolve) => {
if (action === 'confirm') {
resolve(true);
} else {
// 拦截取消操作
resolve(false);
}
})
},
static_host: api.getStaticHost()
},
onConfirmEntry(){
@@ -14,15 +24,16 @@ Page({
},
onCloseEntry(){
this.setData({
showEntryTip_second:true
showEntryTip_second:true,
showEntryTip:true
})
},
onConfirmEntry_second(){
this.setData({
showEntryTip_second:false,
showEntryTip:false,
//showEntryTip:false,
});
wx.setStorageSync('hasEntry', true);
//wx.setStorageSync('hasEntry', true);
},
onCloseEntry_second(){
@@ -41,6 +52,9 @@ Page({
let from = option.from;
let usertype = wx.getStorageSync('usertype');
console.log("index onload: ", from, usertype)
this.setData({
beforeClose: this.data.beforeClose.bind(this),
})
if(from === "navbar"){
//切换身份
}else{
@@ -60,11 +74,17 @@ Page({
}
this.setData({ loading: false });
let isEntry=wx.getStorageSync('hasEntry');
console.log("onshow:"+isEntry)
if(!isEntry){
this.setData({
showEntryTip:true
});
}else{
this.setData({
showEntryTip:false
});
}
},
+1
View File
@@ -38,6 +38,7 @@
confirm-button-color="#3CC7C0"
bind:confirm="onConfirmEntry"
bind:cancel="onCloseEntry"
before-close="{{beforeClose}}"
>
<view class="entrymsg" >
<view> 亲爱的用户,感谢您信任并使用肝胆相照互联网医院医师端!我们依据最新法律法规的要求,制定了<text class="navigator" bindtap="go" data-url="/Pages/agreement_page/index?agreement_id=9">《隐私协议》</text>。请您仔细阅《隐私协议》,并确认了解我们对您的个人信息处理原则。</view>