弹框更改
This commit is contained in:
parent
9ad154f86b
commit
8d57f72f74
@ -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
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -6,6 +6,16 @@ Page({
|
||||
data: {
|
||||
showEntryTip:false,
|
||||
showEntryTip_second:false,
|
||||
beforeClose(action){
|
||||
return new Promise((resolve) => {
|
||||
if (action === 'confirm') {
|
||||
resolve(true);
|
||||
} else {
|
||||
// 拦截取消操作
|
||||
resolve(false);
|
||||
}
|
||||
})
|
||||
},
|
||||
navbarData: {
|
||||
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
|
||||
title: '登录', //导航栏 中间的标题
|
||||
@ -15,6 +25,9 @@ Page({
|
||||
},
|
||||
onLoad(){
|
||||
let usertype = wx.getStorageSync('usertype');
|
||||
this.setData({
|
||||
beforeClose: this.data.beforeClose.bind(this),
|
||||
})
|
||||
if(!usertype){
|
||||
wx.navigateTo({
|
||||
url: "/Pages/index/index"
|
||||
@ -25,7 +38,10 @@ Page({
|
||||
this.setData({
|
||||
showEntryTip:true,
|
||||
});
|
||||
|
||||
}else{
|
||||
this.setData({
|
||||
showEntryTip:false
|
||||
});
|
||||
}
|
||||
},
|
||||
onChange(event) {
|
||||
@ -42,17 +58,21 @@ Page({
|
||||
_navback() {
|
||||
wx.navigateBack()
|
||||
},
|
||||
onConfirmEntry(){
|
||||
wx.setStorageSync('hasEntry', true);
|
||||
},
|
||||
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(){
|
||||
|
||||
@ -50,6 +50,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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user