提交 f685b599 编写于 作者: DCloud_iOS_WZT's avatar DCloud_iOS_WZT

update univerify-custom-page.uvue

上级 577b523a
......@@ -3,13 +3,13 @@
<page-head :title="title"></page-head>
<view class="uni-padding-wrap uni-common-mt">
<view class="uni-btn-v uni-common-mt">
<button type="primary" @click="verify(false)">一键登录(半屏)</button>
<button type="default" @click="verify(false)">一键登录(半屏)</button>
</view>
<view class="uni-btn-v uni-common-mt">
<button type="primary" @click="verify(true)">一键登录(全屏)</button>
<button type="default" @click="verify(true)">一键登录(全屏)</button>
</view>
<view class="uni-btn-v uni-common-mt">
<button type="primary" @click="customLoginIn()">一键登录(自定义页面)</button>
<button type="default" @click="customLoginIn()">一键登录(自定义页面)</button>
</view>
</view>
</view>
......@@ -25,10 +25,6 @@
slogan: '',
privacyName: '',
privacyUrl: ''
// phone: '176****6657',
// slogan: '认证服务由中国联通提供',
// privacyName: '中国联通认证服务条款',
// privacyUrl: 'https://opencloud.wostore.cn/authz/resource/html/disclaimer.html?fromsdk=true'
}
},
onLoad() {
......@@ -49,9 +45,15 @@
},
pushCustomPage() {
const url = '/pages/API/get-univerify-manager/univerify-custom-page?phone=' + this.phone + '&slogan=' + this.slogan + '&name=' + this.privacyName + '&link=' + this.privacyUrl;
uni.navigateTo({
uni.openDialogPage({
url: url,
animationType: "slide-in-bottom",
animationType: 'slide-in-bottom',
success(res) {
console.log("成功打开自定义登录页面");
},
fail(err) {
console.log(err);
}
})
},
verify(fullScreen : boolean) {
......
......@@ -39,7 +39,16 @@
},
methods: {
closePage() {
uni.navigateBack()
uni.closeDialogPage({
dialogPage: this.$page,
animationType:'slide-out-bottom',
success(res) {
console.log('closeThisDialog success', res)
},
fail(err) {
console.log('closeThisDialog fail', err)
}
})
},
openLink() {
let url = '/pages/API/get-univerify-manager/univerify-privacy-page?url=' + this.privacyUrl;
......@@ -56,11 +65,11 @@
},
loginIn() {
const numberTextElement = uni.getElementById('number-text');
const sloganTextElement = uni.getElementById('slogan-text');
const loginButtonElement = uni.getElementById('login-button');
const privacyCheckBoxElement = uni.getElementById('privacy-checkbox');
const privacyTextElement = uni.getElementById('privacy-text');
const numberTextElement = this.$page.getElementById('number-text');
const sloganTextElement = this.$page.getElementById('slogan-text');
const loginButtonElement = this.$page.getElementById('login-button');
const privacyCheckBoxElement = this.$page.getElementById('privacy-checkbox');
const privacyTextElement = this.$page.getElementById('privacy-text');
this.univerifyManager?.customLogin({
numberTextElement: numberTextElement!,
......@@ -187,7 +196,7 @@
}
.privacy {
margin-top: 5px;
margin-top: 10px;
margin-left: 5px;
flex-direction: row;
flex-wrap: wrap;
......@@ -203,7 +212,8 @@
.privacy-text {
margin-top: 4px;
color: #2785ff;
font-weight: bold;
color: black;
font-size: 14px;
}
......
<template>
<view class="background">
<view class="top_container" @click="onBack()">
</view>
<view class="container">
<web-view class="web" :src="url">
</web-view>
<view class="close_container">
<text class="close_icon" @click="onBack()">{{closeIcon}}</text>
</view>
<web-view class="web_container" :src="url"></web-view>
</view>
</view>
</template>
......@@ -17,7 +15,7 @@
data() {
return {
url: '',
backIcon:'\uE601'
closeIcon: '\uE650'
}
},
onLoad(options : OnLoadOptions) {
......@@ -30,7 +28,6 @@
animationType:'slide-out-bottom',
success(res) {
console.log('closeThisDialog success', res)
},
fail(err) {
console.log('closeThisDialog fail', err)
......@@ -43,30 +40,30 @@
<style>
.background {
background-color: rgba(0, 0, 0, 0.3);
background-color: #f1f1f1;
width: 100%;
height: 100%;
}
.top_container{
width: 100%;
height: 20%;
}
.container{
padding-top: var(--status-bar-height);
color: white;
bottom: 0;
width: 100%;
position: absolute;
height: 80%;
height: 100%;
}
.backArrow{
margin-left: 4px;
.close_container{
height: 45px;
width: 100%;
}
.close_icon {
left: 90%;
top: 15px;
font-family: uni-icon;
font-size: 30px;
width: 50px;
height: 50px;
font-size: 24px;
}
.web{
height: 100%;
.web_container{
padding-top: 10px;
flex: 1;
width: 100%;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册