<template>
|
<view class="cp-flex-col page">
|
<view class="cp-flex-col cp-justify-start cp-items-center cp-relative group">
|
<view class="cp-flex cp-items-center text-wrapper" style="justify-content: center;display: flex;color: #fff;">
|
<view @click="click1" class="">用户服务协议</view>
|
<view @click="click2" class="" style="padding-left: 30px;">隐私协议</view>
|
</view>
|
<view class="cp-flex-col section space-y-56 pos_2">
|
<text class="cp-self-center font_1 text"> {{ config.site_title }} </text>
|
<view class="cp-flex-col space-y-31">
|
<view class="cp-flex-col space-y-27">
|
<view class="cp-flex-row cp-items-center section_2 space-x-19">
|
<image class="image_2" src="../../static/login/b17f7f0690876b2c1c9f62a06ee82d02.png" />
|
<!-- <text class="font_2 text_2">手机号/邮箱</text> -->
|
<input v-model="mobile" type="text" class="font_2 text_2" placeholder="手机号">
|
</view>
|
<view v-if="config.is_h5_sms == 1" class="cp-flex-row cp-justify-between cp-items-center section_3">
|
<view class="cp-flex-row cp-items-center space-x-17">
|
<image class="cp-shrink-0 image_3" src="../../static/login/smscode.png" />
|
<input v-model="code" type="number" class="font_2 text_3" placeholder="请输入验证码">
|
</view>
|
<view @click="getValidate" style="color: #a13bff;font-size: 12px;padding-right: 10px;">{{show?"获取验证码":`已发送${count}s`}}</view>
|
<!-- <image class="image_4" src="../../static/login/acde9f55d278d771fe4bb0c73271082f.png" /> -->
|
</view>
|
<view class="cp-flex-row cp-justify-between cp-items-center section_3">
|
<view class="cp-flex-row cp-items-center space-x-17">
|
<image class="cp-shrink-0 image_3" src="../../static/login/532d85c2bb2b38c49a37446e1b76def1.png" />
|
<input v-model="password" type="password" class="font_2 text_3" placeholder="密码">
|
</view>
|
<!-- <image class="image_4" src="../../static/login/acde9f55d278d771fe4bb0c73271082f.png" /> -->
|
</view>
|
<view class="cp-flex-row cp-justify-between cp-items-center section_3">
|
<view class="cp-flex-row cp-items-center space-x-17">
|
<image class="cp-shrink-0 image_3" src="../../static/login/532d85c2bb2b38c49a37446e1b76def1.png" />
|
<input v-model="passwordd" type="password" class="font_2 text_3" placeholder="确认密码">
|
</view>
|
<!-- <image class="image_4" src="../../static/login/acde9f55d278d771fe4bb0c73271082f.png" /> -->
|
</view>
|
</view>
|
<view class="cp-flex-col group_2 space-y-32">
|
<!-- <text class="cp-self-end text_4">验证码登陆</text> -->
|
<view @click="submit" class="cp-flex-col cp-justify-start cp-items-center button"><text class="text_5">立即注册</text></view>
|
<view @click="navtologin" class="cp-flex-col cp-justify-start cp-items-center button"><text class="text_5">返回登录</text></view>
|
</view>
|
</view>
|
</view>
|
<view class="cp-flex-col cp-justify-start cp-items-center image-wrapper pos">
|
<image class="image" :src="config.logo" />
|
</view>
|
</view>
|
<!-- <view class="cp-flex-row cp-justify-center cp-items-center group_3">
|
<view class="section_4"></view>
|
<text class="font_1 text_6">快捷登录</text>
|
<view class="section_4 view"></view>
|
</view>
|
<view class="cp-flex-row cp-justify-between cp-self-center equal-division">
|
<image class="equal-division-item" src="../../static/login/ff05399c7d6e9e083474a6bec24440d2.png" />
|
<image class="equal-division-item" src="../../static/login/513984f2eeec8266766b5d1bedf4386f.png" />
|
<image class="equal-division-item" src="../../static/login/32d84522d79c35d58299896595991b54.png" />
|
</view> -->
|
</view>
|
</template>
|
|
<script>
|
import mixin from "@/mixin/checkLoaded";
|
export default {
|
mixins: [mixin],
|
data() {
|
return {
|
show:true,
|
timer:null,
|
count:'',
|
mobile:'',
|
code:'',
|
password:'',
|
passwordd:'',
|
parent_id:'',
|
key:'',
|
config:{},
|
isMpBind:false
|
}
|
},
|
onLoad(op) {
|
if(op.share_id){
|
this.parent_id = op.share_id
|
}
|
// #ifdef MP
|
if(op.bindMob){
|
this.isMpBind = true
|
}
|
// #endif
|
this.config = this.$store.state.config
|
},
|
methods: {
|
getValidate(){
|
if(!(/^1(3|4|5|7|8)\d{9}$/.test(this.mobile))){
|
uni.showToast({
|
title:"请输入正确的手机号码",
|
icon:"none"
|
})
|
return
|
}
|
const TIME_COUNT = 60;
|
if (!this.timer) {
|
this.count = TIME_COUNT;
|
this.show = false;
|
//此处写提交获取验证码的请求
|
this.$request("/api/Member/sendSms","POST",{mobile:this.mobile}).then(res=>{
|
if(res.status == 200){
|
uni.showToast({
|
title:res.msg,
|
icon:"none"
|
})
|
this.timer = setInterval(() => {
|
if (this.count > 0 && this.count <= TIME_COUNT) {
|
this.count--;
|
} else {
|
this.show = true;
|
clearInterval(this.timer);
|
this.timer = null;
|
}
|
}, 1000)
|
uni.setStorageSync('key',res.key)
|
uni.setStorageSync('keyTime',new Date().getTime())
|
this.key = res.key
|
}else{
|
uni.showToast({
|
title:res.msg,
|
icon:"none"
|
})
|
uni.removeStorageSync('key')
|
uni.removeStorageSync('keyTime')
|
}
|
}).catch(err=>{
|
this.$failToast()
|
})
|
}
|
},
|
navtologin() {
|
uni.navigateBack({
|
delta:1
|
})
|
},
|
submit(){
|
if(!(this.mobile && this.password)){
|
this.$failToast("请输入手机号和密码")
|
return
|
}
|
if(this.password != this.passwordd){
|
this.$failToast("密码不一致,请重新输入")
|
return
|
}
|
if (this.config.is_h5_sms == 1) {
|
if(!this.code){
|
this.$failToast("请输入验证码")
|
return
|
}
|
if(!this.key){
|
this.$failToast("请获取验证码")
|
return
|
}
|
}
|
|
let m_id = ''
|
if(this.$store.state.userInfo.member_id){
|
m_id = this.$store.state.userInfo.member_id
|
}
|
|
this.$request("/api/Member/add","POST",{
|
key:this.key,
|
code:this.code,
|
mobile:this.mobile,
|
passwd:this.password,
|
}).then(res=>{
|
uni.showModal({
|
title:'提示',
|
content:res.msg
|
})
|
if(res.status == 800){
|
setTimeout(function() {
|
uni.reLaunch({
|
url: "/pages/login/newlogin"
|
})
|
}, 500);
|
}
|
}).catch(err=>{
|
this.$failToast()
|
})
|
},
|
click1(){
|
uni.navigateTo({
|
url:"../content/content?content_id=1"
|
})
|
},
|
click2(){
|
uni.navigateTo({
|
url:"../content/content?content_id=2"
|
})
|
}
|
}
|
}
|
</script>
|
|
<style scoped lang="css">
|
|
html {
|
font-size: 16px;
|
}
|
|
body {
|
margin: 0;
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans',
|
'Droid Sans', 'Helvetica Neue', 'Microsoft Yahei', sans-serif;
|
-webkit-font-smoothing: antialiased;
|
-moz-osx-font-smoothing: grayscale;
|
}
|
|
view,
|
image,
|
text {
|
box-sizing: border-box;
|
flex-shrink: 0;
|
}
|
|
#app {
|
width: 100vw;
|
height: 100vh;
|
}
|
|
.cp-flex-row {
|
display: flex;
|
flex-direction: row;
|
}
|
|
.cp-flex-col {
|
display: flex;
|
flex-direction: column;
|
}
|
|
.cp-justify-start {
|
justify-content: flex-start;
|
}
|
|
.cp-justify-end {
|
justify-content: flex-end;
|
}
|
|
.cp-justify-center {
|
justify-content: center;
|
}
|
|
.cp-justify-between {
|
justify-content: space-between;
|
}
|
|
.cp-justify-around {
|
justify-content: space-around;
|
}
|
|
.cp-justify-evenly {
|
justify-content: space-evenly;
|
}
|
|
.cp-items-start {
|
align-items: flex-start;
|
}
|
|
.cp-items-end {
|
align-items: flex-end;
|
}
|
|
.cp-items-center {
|
align-items: center;
|
}
|
|
.cp-items-baseline {
|
align-items: baseline;
|
}
|
|
.cp-items-stretch {
|
align-items: stretch;
|
}
|
|
.cp-self-start {
|
align-self: flex-start;
|
}
|
|
.cp-self-end {
|
align-self: flex-end;
|
}
|
|
.cp-self-center {
|
align-self: center;
|
}
|
|
.cp-self-baseline {
|
align-self: baseline;
|
}
|
|
.cp-self-stretch {
|
align-self: stretch;
|
}
|
|
.cp-flex-1 {
|
flex: 1 1 0%;
|
}
|
|
.cp-flex-auto {
|
flex: 1 1 auto;
|
}
|
|
.cp-grow {
|
flex-grow: 1;
|
}
|
|
.cp-grow-0 {
|
flex-grow: 0;
|
}
|
|
.cp-shrink {
|
flex-shrink: 1;
|
}
|
|
.cp-shrink-0 {
|
flex-shrink: 0;
|
}
|
|
.cp-relative {
|
position: relative;
|
}
|
.page {
|
padding: 0rpx 34rpx 218rpx;
|
background-image: linear-gradient(66deg, #6186fe 0%, #a23aff 100%);
|
width: 100%;
|
overflow-y: auto;
|
overflow-x: hidden;
|
height: 100vh;
|
}
|
|
.group {
|
padding-top: 650rpx;
|
}
|
|
.text-wrapper {
|
padding: 327rpx 0 21rpx;
|
background-color: #ffffff75;
|
border-radius: 30rpx;
|
width: 473rpx;
|
}
|
|
.font_1 {
|
font-size: 30rpx;
|
font-family: HiraginoSansGB;
|
line-height: 28rpx;
|
color: #ffffff;
|
}
|
|
.section {
|
padding: 118rpx 40rpx 38rpx;
|
background-color: #ffffff;
|
border-radius: 20rpx;
|
width: 536rpx;
|
}
|
|
.space-y-56>view:not(:first-child),
|
.space-y-56>text:not(:first-child),
|
.space-y-56>image:not(:first-child) {
|
margin-top: 56rpx;
|
}
|
|
.pos_2 {
|
position: absolute;
|
left: 50%;
|
top: 280rpx;
|
transform: translateX(-50%);
|
}
|
|
.text {
|
color: #333333;
|
line-height: 29rpx;
|
}
|
|
.space-y-31>view:not(:first-child),
|
.space-y-31>text:not(:first-child),
|
.space-y-31>image:not(:first-child) {
|
margin-top: 31rpx;
|
}
|
|
.space-y-27>view:not(:first-child),
|
.space-y-27>text:not(:first-child),
|
.space-y-27>image:not(:first-child) {
|
margin-top: 27rpx;
|
}
|
|
.section_2 {
|
padding: 14rpx 22rpx 10rpx;
|
border-radius: 30rpx;
|
background-image: url('../../static/login/02fdccc95ea34e937ec1edcee2d69b21.png');
|
background-size: 100% 100%;
|
background-repeat: no-repeat;
|
}
|
|
.space-x-19>view:not(:first-child),
|
.space-x-19>text:not(:first-child),
|
.space-x-19>image:not(:first-child) {
|
margin-left: 19rpx;
|
}
|
|
.image_2 {
|
width: 38rpx;
|
height: 45rpx;
|
}
|
|
.font_2 {
|
font-size: 24rpx;
|
font-family: HiraginoSansGB;
|
color: #666666;
|
}
|
|
.text_2 {
|
margin-right: 222rpx;
|
line-height: 25rpx;
|
}
|
|
.section_3 {
|
padding: 11rpx 22rpx 6rpx;
|
border-radius: 30rpx;
|
background-image: url('../../static/login/02fdccc95ea34e937ec1edcee2d69b21.png');
|
background-size: 100% 100%;
|
background-repeat: no-repeat;
|
}
|
|
.space-x-17>view:not(:first-child),
|
.space-x-17>text:not(:first-child),
|
.space-x-17>image:not(:first-child) {
|
margin-left: 17rpx;
|
}
|
|
.image_3 {
|
width: 41rpx;
|
height: 52rpx;
|
}
|
|
.text_3 {
|
line-height: 23rpx;
|
}
|
|
.image_4 {
|
width: 26rpx;
|
height: 15rpx;
|
}
|
|
.group_2 {
|
padding: 0 11rpx;
|
}
|
|
.space-y-32>view:not(:first-child),
|
.space-y-32>text:not(:first-child),
|
.space-y-32>image:not(:first-child) {
|
margin-top: 32rpx;
|
}
|
|
.text_4 {
|
color: #666666;
|
font-size: 20rpx;
|
font-family: HiraginoSansGB;
|
line-height: 22rpx;
|
text-decoration: underline;
|
}
|
|
.button {
|
padding: 16rpx 0;
|
background-image: linear-gradient(212deg, #6384fe 0%, #a13bff 100%);
|
border-radius: 30rpx;
|
width: 434rpx;
|
}
|
|
.text_5 {
|
color: #ffffff;
|
font-size: 36rpx;
|
font-family: HiraginoSansGB;
|
line-height: 33rpx;
|
}
|
|
.image-wrapper {
|
padding: 58rpx 0 63rpx;
|
background-image: url('../../static/login/0316f830b076fd836291cfb192b3ef65.png');
|
background-size: 100% 100%;
|
background-repeat: no-repeat;
|
width: 199rpx;
|
}
|
|
.pos {
|
position: absolute;
|
left: 50%;
|
top: 180rpx;
|
transform: translateX(-50%);
|
}
|
|
.image {
|
width: 147rpx;
|
height: 78rpx;
|
}
|
|
.group_3 {
|
margin-top: 93rpx;
|
}
|
|
.section_4 {
|
opacity: 0.5;
|
width: 217rpx;
|
height: 1rpx;
|
border: solid 1rpx #ffffff;
|
}
|
|
.text_6 {
|
margin-left: 20rpx;
|
}
|
|
.view {
|
margin-left: 15rpx;
|
}
|
|
.equal-division {
|
margin-top: 73rpx;
|
width: 421rpx;
|
}
|
|
.equal-division-item {
|
margin: 2rpx 0;
|
width: 70.5rpx;
|
height: 63rpx;
|
}
|
</style>
|