提交 f350dcca 编写于 作者: W wanganxp

补充原生弹窗api的页面hide生命周期。优化自定义一键登陆页面

上级 14641660
...@@ -163,6 +163,9 @@ ...@@ -163,6 +163,9 @@
cropResize: false cropResize: false
} }
}, },
onHide() {
console.log("Page Hide");
},
onUnload() { onUnload() {
this.imageList = []; this.imageList = [];
this.sourceTypeIndex = 2 this.sourceTypeIndex = 2
......
...@@ -47,6 +47,9 @@ ...@@ -47,6 +47,9 @@
hoverPayload: false hoverPayload: false
} }
}, },
onHide() {
console.log("Page Hide");
},
methods: { methods: {
chooseLocation: function () { chooseLocation: function () {
let chooseLocationOptions = { let chooseLocationOptions = {
...@@ -106,8 +109,10 @@ ...@@ -106,8 +109,10 @@
test() { test() {
const pages = getCurrentPages() const pages = getCurrentPages()
const page = pages[pages.length - 1] const page = pages[pages.length - 1]
// #ifdef APP || WEB
const dialogPages = page.getDialogPages() const dialogPages = page.getDialogPages()
this.dialogPagesNum = dialogPages.length this.dialogPagesNum = dialogPages.length
// #endif
} }
} }
} }
......
...@@ -58,6 +58,9 @@ ...@@ -58,6 +58,9 @@
albumMode: "custom" albumMode: "custom"
} }
}, },
onHide() {
console.log("Page Hide");
},
methods: { methods: {
chooseVideo() { chooseVideo() {
uni.chooseVideo({ uni.chooseVideo({
......
...@@ -17,6 +17,9 @@ ...@@ -17,6 +17,9 @@
onReady() { onReady() {
this.loadAd() this.loadAd()
}, },
onHide() {
console.log("Page Hide");
},
methods: { methods: {
loadAd() { loadAd() {
if (this.btnDisable) if (this.btnDisable)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="container"> <view class="container">
<view class="safe_content"> <view class="safe_content">
<text class="close_icon" @click="closePage">{{closeIcon}}</text> <text class="close_icon" @click="closePage">{{closeIcon}}</text>
<text class="title">登录后 体验完整功能</text> <text class="title">这是一个普通uvue的dialogPage页面</text>
<view class="number"> <view class="number">
<text id="number-text" class="number-text" ref="number-text">{{phone}}</text> <text id="number-text" class="number-text" ref="number-text">{{phone}}</text>
<text id="slogan-text" class="slogan-text">{{slogan}}</text> <text id="slogan-text" class="slogan-text">{{slogan}}</text>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<button id="login-button" class="login-button" @click="loginIn">本机号码一键登录</button> <button id="login-button" class="login-button" @click="loginIn">本机号码一键登录</button>
<view class="privacy"> <view class="privacy">
<checkbox id="privacy-checkbox" class="privacy-checkbox" ref="privacy-checkbox" :checked="true"></checkbox> <checkbox id="privacy-checkbox" class="privacy-checkbox" ref="privacy-checkbox" :checked="true"></checkbox>
<text class="privacy-normal-text">已阅读并同意</text> <text class="privacy-normal-text">登录即同意</text>
<text id="privacy-text" class="privacy-text" @click="openLink">{{privacyName}}</text> <text id="privacy-text" class="privacy-text" @click="openLink">{{privacyName}}</text>
</view> </view>
<text class="other" @click="otherLogin">其他登录方式</text> <text class="other" @click="otherLogin">其他登录方式</text>
...@@ -151,12 +151,11 @@ ...@@ -151,12 +151,11 @@
top: 15px; top: 15px;
font-family: uni-icon; font-family: uni-icon;
font-size: 24px; font-size: 24px;
/* font-weight: bold; */
} }
.title { .title {
font-size: 20px;
align-self: center; align-self: center;
font-weight: bold;
top: 20px; top: 20px;
} }
......
...@@ -54,6 +54,9 @@ ...@@ -54,6 +54,9 @@
title: 'openLocation' title: 'openLocation'
} }
}, },
onHide() {
console.log("Page Hide");
},
methods: { methods: {
openLocation: function (e) { openLocation: function (e) {
console.log(e) console.log(e)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册