添加用户协议
This commit is contained in:
@@ -26,7 +26,17 @@ const getSms = (data) =>{
|
||||
})
|
||||
}
|
||||
|
||||
// 用户隐私协议 articles/agreement/secret 用户服务协议 articles/agreement/service
|
||||
|
||||
const secretService = (name) =>{
|
||||
return request({
|
||||
url: "articles/agreement/"+name
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export {
|
||||
smsAuth,
|
||||
getSms
|
||||
getSms,
|
||||
secretService
|
||||
}
|
||||
|
||||
@@ -68,5 +68,10 @@
|
||||
"uniStatistics" : {
|
||||
"enable" : false
|
||||
},
|
||||
"vueVersion" : "2"
|
||||
"vueVersion" : "2",
|
||||
"h5" : {
|
||||
"router" : {
|
||||
"mode" : "history"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
12
pages.json
12
pages.json
@@ -134,6 +134,18 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "登录"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/login/guide",
|
||||
"name": "loginGuide",
|
||||
"style": {
|
||||
"navigationBarTitleText": "引导页"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/login/agreement",
|
||||
"name": "agreement",
|
||||
"style": {
|
||||
"navigationBarTitleText": "用户隐藏协议"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/certification/personal",
|
||||
"name": "Personal",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="basics-content">
|
||||
<view>
|
||||
<view class="coupons-preview">
|
||||
<view class="item cover">
|
||||
<view v-if="types[typeIndex].id == 2">
|
||||
@@ -79,7 +79,7 @@
|
||||
<label class="input-label">{{timeIndex == 0 ? '券有效期': '延期天数'}}</label>
|
||||
<block v-if="timeIndex === 0">
|
||||
<view class="input-text" @click="showDatePicker = true">{{datePickerValue.length == 0 ? '选择优惠券有效期区间': datePickerValue[0] + ' 至 ' + datePickerValue[1]}}<uni-icons class="picker-icon" type="arrowdown" size="14" /></view>
|
||||
<tn-date-picker :show="showDatePicker" :monthNum="12" color="#e93340" :showTips="true" beginText="开始日期" endText="结束日期" @confirm="confirmDatePicker" @cancel="showDatePicker = false"/>
|
||||
<tn-date-picker :show="showDatePicker" :monthNum="12" color="#8b64fd" :showTips="true" beginText="开始日期" endText="结束日期" @confirm="confirmDatePicker" @cancel="showDatePicker = false"/>
|
||||
</block>
|
||||
<block v-if="timeIndex === 1">
|
||||
<view class="input-number">
|
||||
@@ -89,7 +89,7 @@
|
||||
</view>
|
||||
<view class="inputs">
|
||||
<label class="input-label">关联商品</label>
|
||||
<view class="input-text" @click="onSelectGoods" v-if="coupongoods">
|
||||
<view class="input-text" @click="onSelectGoods">
|
||||
<block v-if="coupongoods.length > 0">已关联{{coupongoods.length}}件商品</block>
|
||||
<block v-else>选择关联商品</block>
|
||||
<uni-icons class="picker-icon" type="arrowdown" size="14" />
|
||||
@@ -100,9 +100,9 @@
|
||||
<label>使用规则</label>
|
||||
<textarea :maxlength="-1" v-model="description" placeholder="输入使用规则说明" />
|
||||
</view>
|
||||
<view class="basisc-btn">
|
||||
<button type="default" class="btn" @click="updComponent">发布优惠券</button>
|
||||
</view>
|
||||
<view class="add-btn ios-bottom">
|
||||
<button type="default" @click="updComponent">发布优惠券</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -116,6 +116,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loding : true,
|
||||
typeIndex : 0,
|
||||
types : [
|
||||
{ id: 1, text: '服务券' },
|
||||
@@ -190,7 +191,7 @@
|
||||
},
|
||||
// 选择关联商品
|
||||
onSelectGoods(){
|
||||
this.$Router.push({name: 'selectGoods', params: {type: this.types[this.typeIndex].id}})
|
||||
this.$Router.push({name: 'couponsSelectGoods', params: {type: this.types[this.typeIndex].id}})
|
||||
},
|
||||
// 发布优惠券
|
||||
updComponent(){
|
||||
@@ -235,35 +236,6 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.basics-content{
|
||||
padding-bottom: ($padding*3) + 90;
|
||||
}
|
||||
|
||||
// 按钮组
|
||||
.basisc-btn{
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding: $padding;
|
||||
background: white;
|
||||
box-shadow: 0 0 4rpx 4rpx rgba($color: #000000, $alpha: .02);
|
||||
.btn {
|
||||
background: $mian-color;
|
||||
color: white;
|
||||
border-radius: 0;
|
||||
font-size: $title-size-lg;
|
||||
line-height: 88rpx;
|
||||
height: 88rpx;
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
&[disabled] {
|
||||
background: rgba($color: $mian-color, $alpha: .6);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.add-btn{
|
||||
padding: $padding;
|
||||
button{
|
||||
|
||||
59
pages/login/agreement.vue
Normal file
59
pages/login/agreement.vue
Normal 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
120
pages/login/guide.vue
Normal 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>
|
||||
@@ -26,8 +26,13 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 用户登录注册协议 -->
|
||||
<<<<<<< HEAD
|
||||
<view class="agreement">未注册的手机号验证后将自动创建账号,登录即表示同意接收<view @click="$Router.push({name: 'vipAgree', params: {type : 'loginPrivacy'}})">用户隐私协议</view>和<view @click="$Router.push({name: 'vipAgree', params: {type : 'loginService'}})">用户服务协议
|
||||
</view>
|
||||
=======
|
||||
<view class="agreement">未注册的手机号验证后将自动创建账号,登录即表示同意接收<navigator url="/pages/login/agreement?name=secret">用户隐私协议</navigator>和<navigator url="/pages/login/agreement?name=service">用户服务协议
|
||||
</navigator>
|
||||
>>>>>>> 1e1409f14e485939bb0a6d80e65119d65d4e6a1c
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -210,7 +215,7 @@
|
||||
}
|
||||
|
||||
.btn {
|
||||
background: $mian-color;
|
||||
background-image: linear-gradient(to bottom,#bf52eb,#8f32dd);
|
||||
color: white;
|
||||
border-radius: 0;
|
||||
margin-top: $margin;
|
||||
@@ -224,7 +229,7 @@
|
||||
}
|
||||
|
||||
&[disabled] {
|
||||
background: rgba($color: $mian-color, $alpha: .6);
|
||||
background: rgba($color: #8f32dd, $alpha: .6);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,17 +12,24 @@ Vue.use(Vuex)
|
||||
|
||||
export default new Vuex.Store({
|
||||
state: {
|
||||
token : uni.getStorageSync('token') || ''
|
||||
token : uni.getStorageSync('token') || '',
|
||||
coupongoods : []
|
||||
},
|
||||
getters: {
|
||||
getToken: state => {
|
||||
return state.token
|
||||
},
|
||||
getCoupongoods: state => {
|
||||
return state.coupongoods
|
||||
}
|
||||
},
|
||||
mutations: {
|
||||
setToken(state, tokenString) {
|
||||
state.token = tokenString
|
||||
uni.setStorageSync('token', tokenString)
|
||||
},
|
||||
setCoupongoods(state, value) {
|
||||
state.coupongoods = value
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -140,92 +140,64 @@
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
$box-height: 35px;
|
||||
/* #ifdef APP-NVUE */
|
||||
$box-line-height: 35px;
|
||||
/* #endif */
|
||||
$box-line-height: 26px;
|
||||
$box-width: 35px;
|
||||
|
||||
.uni-numbox {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: row;
|
||||
height: $box-height;
|
||||
line-height: $box-height;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.uni-cursor-point {
|
||||
/* #ifdef H5 */
|
||||
cursor: pointer;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.uni-numbox__value {
|
||||
background-color: $uni-bg-color;
|
||||
width: 50px;
|
||||
height: $box-height;
|
||||
text-align: center;
|
||||
font-size: $uni-font-size-lg;
|
||||
border-width: 1rpx;
|
||||
border-style: solid;
|
||||
border-color: $uni-border-color;
|
||||
border-left-width: 0;
|
||||
border-right-width: 0;
|
||||
}
|
||||
|
||||
.uni-numbox__minus {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: row;
|
||||
<style lang="scss" scoped>
|
||||
$box-height: 50rpx;
|
||||
/* #ifdef APP-NVUE */
|
||||
$box-line-height: 50rpx;
|
||||
/* #endif */
|
||||
$box-line-height: 50rpx;
|
||||
$box-width: 50rpx;
|
||||
|
||||
.uni-numbox {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: row;
|
||||
height: $box-height;
|
||||
line-height: $box-height - 7rpx;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
// width: 120px;
|
||||
}
|
||||
|
||||
.uni-cursor-point {
|
||||
/* #ifdef H5 */
|
||||
cursor: pointer;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.uni-numbox__value {
|
||||
background-color: $uni-bg-color;
|
||||
width: 50px;
|
||||
height: $box-height;
|
||||
text-align: center;
|
||||
font-size: $uni-font-size-lg;
|
||||
}
|
||||
|
||||
.uni-numbox__minus {
|
||||
width: $box-width;
|
||||
height: $box-height;
|
||||
// line-height: $box-line-height;
|
||||
// text-align: center;
|
||||
font-size: 20px;
|
||||
color: $uni-text-color;
|
||||
background-color: $uni-bg-color-grey;
|
||||
border-width: 1rpx;
|
||||
border-style: solid;
|
||||
border-color: $uni-border-color;
|
||||
border-top-left-radius: $uni-border-radius-base;
|
||||
border-bottom-left-radius: $uni-border-radius-base;
|
||||
border-right-width: 0;
|
||||
}
|
||||
|
||||
.uni-numbox__plus {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: $box-width;
|
||||
background: $border-color-lg;
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.uni-numbox__plus {
|
||||
width: $box-width;
|
||||
height: $box-height;
|
||||
border-width: 1rpx;
|
||||
border-style: solid;
|
||||
border-color: $uni-border-color;
|
||||
border-top-right-radius: $uni-border-radius-base;
|
||||
border-bottom-right-radius: $uni-border-radius-base;
|
||||
background-color: $uni-bg-color-grey;
|
||||
border-left-width: 0;
|
||||
}
|
||||
|
||||
.uni-numbox--text {
|
||||
font-size: 20px;
|
||||
color: $uni-text-color;
|
||||
}
|
||||
|
||||
.uni-numbox--disabled {
|
||||
color: $uni-text-color-disable;
|
||||
/* #ifdef H5 */
|
||||
cursor: not-allowed;
|
||||
/* #endif */
|
||||
}
|
||||
background: $border-color-lg;
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.uni-numbox--text {
|
||||
font-size: 20px;
|
||||
color: $uni-text-color;
|
||||
}
|
||||
|
||||
.uni-numbox--disabled {
|
||||
color: $uni-text-color-disable;
|
||||
/* #ifdef H5 */
|
||||
cursor: not-allowed;
|
||||
/* #endif */
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user