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

update univerify-custom-page.uvue

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