This commit is contained in:
唐明明
2021-09-28 11:00:53 +08:00
11 changed files with 236 additions and 24 deletions

59
pages/login/agreement.vue Normal file
View File

@@ -0,0 +1,59 @@
<template>
<view>
<view class="clauseCont">
<rich-text :nodes="clauseData"></rich-text>
</view>
</view>
</template>
<script>
import {
secretService
} from '@/apis/interfaces/auth'
export default {
data() {
return {
clauseData: [] //服务条款
};
},
onLoad(e) {
if(e.name === 'service'){
uni.setNavigationBarTitle({
title:'用户服务协议'
})
}else{
uni.setNavigationBarTitle({
title:'用户隐私协议'
})
}
// 获取服务条款
this.clauseInfo(e.name)
},
methods: {
// 服务条款
clauseInfo(name) {
secretService(name).then(res => {
this.clauseData = res.content.replace(/\<img/gi,
'<img style="max-width:100%; height:auto; vertical-align: top;"')
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
},
}
}
</script>
<style lang="scss">
page {
background-color: $uni-bg-color;
}
.clauseCont {
padding: $padding + 10 $padding * 2;
width: 100%;
box-sizing: border-box;
}
</style>

120
pages/login/guide.vue Normal file
View File

@@ -0,0 +1,120 @@
<template>
<view class="content">
<view class="login-top">
<view class="top-logo-content">
<image class="top-logo" fit="contain" src="/static/imgs/top_logo.png" />
链商星球(中国)
</view>
<image class="top-bg" fit="contain" mode="widthFix" src="/static/imgs/top_bg.png" />
</view>
<button class="btn" type="default" @click="login">登录/注册</button>
<view class="bottom">
<view>企业链</view>
<view class="bottom-2">从星煌开始</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
login(){
uni.navigateTo({
url:'/pages/login/login'
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
height: 100vh;
width: 100vw;
padding: $padding * 3;
box-sizing: border-box;
background: white;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
.login-top {
height: 46vh;
width: 100%;
display: flex;
flex-direction: row;
align-items: flex-end;
justify-content: center;
box-sizing: border-box;
position: relative;
padding-bottom: 160rpx;
.top-bg {
position: absolute;
bottom: 30rpx;
z-index: 2;
width: 740rpx;
margin-left: 40rpx;
}
.top-logo-content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
color: #7f56a4;
font-size: $title-size +2;
.top-logo {
margin-bottom: 20rpx;
width: 200rpx;
height: 200rpx;
}
}
}
.btn {
background-image: linear-gradient(to bottom,#bf52eb,#8f32dd);
color: white;
border-radius: 0;
margin-top: $margin;
font-size: $title-size + 6;
line-height: 90rpx;
height: 90rpx;
// font-weight: bold;
width: 500rpx;
border-radius: 10rpx;
margin: 50rpx 0;
&::after {
border: none;
}
&[disabled] {
background: rgba($color: $mian-color, $alpha: .6);
}
}
.bottom{
height: 30vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
color: #542083;
font-size: 54rpx;
.bottom-2{
font-size: 38rpx;
margin-top: 20rpx;
}
}
}
</style>

View File

@@ -26,8 +26,11 @@
</view>
</view>
<!-- 用户登录注册协议 -->
<view class="agreement">未注册的手机号验证后将自动创建账号登录即表示同意接收<navigator url="">用户隐私规格</navigator><navigator url="">用户服务协议
</navigator>
<view class="agreement">
未注册的手机号验证后将自动创建账号登录即表示同意接收
<view @click="$Router.push({name: 'agreement', params: {name : 'secret'}})">用户隐私协议</view>
<view @click="$Router.push({name: 'agreement', params: {name : 'service'}})">用户服务协议</view>
</view>
</view>
</template>
@@ -210,7 +213,7 @@
}
.btn {
background: $mian-color;
background-image: linear-gradient(to bottom,#bf52eb,#8f32dd);
color: white;
border-radius: 0;
margin-top: $margin;
@@ -224,7 +227,7 @@
}
&[disabled] {
background: rgba($color: $mian-color, $alpha: .6);
background: rgba($color: #8f32dd, $alpha: .6);
}
}
@@ -253,8 +256,7 @@
padding-top: $padding * 2;
font-size: $title-size-sm;
color: $text-gray;
navigator {
view {
color: $text-price;
display: inline-block;
padding: 0 10rpx;

View File

@@ -278,9 +278,7 @@
},
loginOut() {
this.$store.commit('setToken', '')
uni.reLaunch({
url: '/pages/login/login'
})
this.$Router.push({name: 'Login'})
},
// 上传头像
updImgs(type) {

View File

@@ -967,7 +967,7 @@
width: 100%;
z-index: 99;
left: 0;
top: 196px;
top: 200px;
// padding-top: var(--status-bar-height);
background-color: #F8F8F8;
transition: .5s;

View File

@@ -15,7 +15,11 @@
}
},
created() {
userAgree().then(res => {
let newUrl = ''
if(this.$Route.query.type == 'vipAgree') newUrl = 'articles/agreement/openvip'
if(this.$Route.query.type == 'loginPrivacy') newUrl = 'articles/agreement/secret'
if(this.$Route.query.type == 'loginService') newUrl = 'articles/agreement/service'
userAgree(newUrl).then(res => {
this.content = res.content
}).catch(err =>{
uni.showToast({

View File

@@ -87,7 +87,7 @@
</view>
<!-- 用户协议 -->
<view class="agree">
<view class="agree">
<view class="agree-tips" @click="$Router.push({name: 'vipAgree', params: {type : 'vipAgree'}})">
请仔细阅读并确认服务协议
</view>