弹框更改
This commit is contained in:
parent
9ad154f86b
commit
8d57f72f74
@ -7,6 +7,16 @@ Page({
|
|||||||
loading: true,
|
loading: true,
|
||||||
showEntryTip:false,
|
showEntryTip:false,
|
||||||
showEntryTip_second:false,
|
showEntryTip_second:false,
|
||||||
|
beforeClose(action){
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
if (action === 'confirm') {
|
||||||
|
resolve(true);
|
||||||
|
} else {
|
||||||
|
// 拦截取消操作
|
||||||
|
resolve(false);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
static_host: api.getStaticHost()
|
static_host: api.getStaticHost()
|
||||||
},
|
},
|
||||||
onConfirmEntry(){
|
onConfirmEntry(){
|
||||||
@ -14,15 +24,16 @@ Page({
|
|||||||
},
|
},
|
||||||
onCloseEntry(){
|
onCloseEntry(){
|
||||||
this.setData({
|
this.setData({
|
||||||
showEntryTip_second:true
|
showEntryTip_second:true,
|
||||||
|
showEntryTip:true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onConfirmEntry_second(){
|
onConfirmEntry_second(){
|
||||||
this.setData({
|
this.setData({
|
||||||
showEntryTip_second:false,
|
showEntryTip_second:false,
|
||||||
showEntryTip:false,
|
//showEntryTip:false,
|
||||||
});
|
});
|
||||||
wx.setStorageSync('hasEntry', true);
|
//wx.setStorageSync('hasEntry', true);
|
||||||
|
|
||||||
},
|
},
|
||||||
onCloseEntry_second(){
|
onCloseEntry_second(){
|
||||||
@ -41,6 +52,9 @@ Page({
|
|||||||
let from = option.from;
|
let from = option.from;
|
||||||
let usertype = wx.getStorageSync('usertype');
|
let usertype = wx.getStorageSync('usertype');
|
||||||
console.log("index onload: ", from, usertype)
|
console.log("index onload: ", from, usertype)
|
||||||
|
this.setData({
|
||||||
|
beforeClose: this.data.beforeClose.bind(this),
|
||||||
|
})
|
||||||
if(from === "navbar"){
|
if(from === "navbar"){
|
||||||
//切换身份
|
//切换身份
|
||||||
}else{
|
}else{
|
||||||
@ -60,11 +74,17 @@ Page({
|
|||||||
}
|
}
|
||||||
this.setData({ loading: false });
|
this.setData({ loading: false });
|
||||||
let isEntry=wx.getStorageSync('hasEntry');
|
let isEntry=wx.getStorageSync('hasEntry');
|
||||||
|
|
||||||
|
console.log("onshow:"+isEntry)
|
||||||
if(!isEntry){
|
if(!isEntry){
|
||||||
this.setData({
|
this.setData({
|
||||||
showEntryTip:true
|
showEntryTip:true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}else{
|
||||||
|
this.setData({
|
||||||
|
showEntryTip:false
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -38,6 +38,7 @@
|
|||||||
confirm-button-color="#3CC7C0"
|
confirm-button-color="#3CC7C0"
|
||||||
bind:confirm="onConfirmEntry"
|
bind:confirm="onConfirmEntry"
|
||||||
bind:cancel="onCloseEntry"
|
bind:cancel="onCloseEntry"
|
||||||
|
before-close="{{beforeClose}}"
|
||||||
>
|
>
|
||||||
<view class="entrymsg" >
|
<view class="entrymsg" >
|
||||||
<view> 亲爱的用户,感谢您信任并使用肝胆相照互联网医院医师端!我们依据最新法律法规的要求,制定了<text class="navigator" bindtap="go" data-url="/Pages/agreement_page/index?agreement_id=9">《隐私协议》</text>。请您仔细阅《隐私协议》,并确认了解我们对您的个人信息处理原则。</view>
|
<view> 亲爱的用户,感谢您信任并使用肝胆相照互联网医院医师端!我们依据最新法律法规的要求,制定了<text class="navigator" bindtap="go" data-url="/Pages/agreement_page/index?agreement_id=9">《隐私协议》</text>。请您仔细阅《隐私协议》,并确认了解我们对您的个人信息处理原则。</view>
|
||||||
|
|||||||
@ -6,6 +6,16 @@ Page({
|
|||||||
data: {
|
data: {
|
||||||
showEntryTip:false,
|
showEntryTip:false,
|
||||||
showEntryTip_second:false,
|
showEntryTip_second:false,
|
||||||
|
beforeClose(action){
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
if (action === 'confirm') {
|
||||||
|
resolve(true);
|
||||||
|
} else {
|
||||||
|
// 拦截取消操作
|
||||||
|
resolve(false);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
navbarData: {
|
navbarData: {
|
||||||
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
|
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
|
||||||
title: '登录', //导航栏 中间的标题
|
title: '登录', //导航栏 中间的标题
|
||||||
@ -15,6 +25,9 @@ Page({
|
|||||||
},
|
},
|
||||||
onLoad(){
|
onLoad(){
|
||||||
let usertype = wx.getStorageSync('usertype');
|
let usertype = wx.getStorageSync('usertype');
|
||||||
|
this.setData({
|
||||||
|
beforeClose: this.data.beforeClose.bind(this),
|
||||||
|
})
|
||||||
if(!usertype){
|
if(!usertype){
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: "/Pages/index/index"
|
url: "/Pages/index/index"
|
||||||
@ -25,7 +38,10 @@ Page({
|
|||||||
this.setData({
|
this.setData({
|
||||||
showEntryTip:true,
|
showEntryTip:true,
|
||||||
});
|
});
|
||||||
|
}else{
|
||||||
|
this.setData({
|
||||||
|
showEntryTip:false
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onChange(event) {
|
onChange(event) {
|
||||||
@ -42,17 +58,21 @@ Page({
|
|||||||
_navback() {
|
_navback() {
|
||||||
wx.navigateBack()
|
wx.navigateBack()
|
||||||
},
|
},
|
||||||
|
onConfirmEntry(){
|
||||||
|
wx.setStorageSync('hasEntry', true);
|
||||||
|
},
|
||||||
onCloseEntry(){
|
onCloseEntry(){
|
||||||
this.setData({
|
this.setData({
|
||||||
showEntryTip_second:true
|
showEntryTip_second:true,
|
||||||
|
showEntryTip:true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onConfirmEntry_second(){
|
onConfirmEntry_second(){
|
||||||
this.setData({
|
this.setData({
|
||||||
showEntryTip_second:false,
|
showEntryTip_second:false,
|
||||||
showEntryTip:false,
|
// showEntryTip:false,
|
||||||
});
|
});
|
||||||
wx.setStorageSync('hasEntry', true);
|
//wx.setStorageSync('hasEntry', true);
|
||||||
|
|
||||||
},
|
},
|
||||||
onCloseEntry_second(){
|
onCloseEntry_second(){
|
||||||
|
|||||||
@ -50,6 +50,7 @@
|
|||||||
confirm-button-color="#3CC7C0"
|
confirm-button-color="#3CC7C0"
|
||||||
bind:confirm="onConfirmEntry"
|
bind:confirm="onConfirmEntry"
|
||||||
bind:cancel="onCloseEntry"
|
bind:cancel="onCloseEntry"
|
||||||
|
before-close="{{beforeClose}}"
|
||||||
>
|
>
|
||||||
<view class="entrymsg" >
|
<view class="entrymsg" >
|
||||||
<view> 亲爱的用户,感谢您信任并使用肝胆相照互联网医院医师端!我们依据最新法律法规的要求,制定了<text class="navigator" bindtap="go" data-url="/Pages/agreement_page/index?agreement_id=9">《隐私协议》</text>。请您仔细阅《隐私协议》,并确认了解我们对您的个人信息处理原则。</view>
|
<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