Browse Source

上传

master
前端-胡立永 3 months ago
parent
commit
14b62a053f
5 changed files with 111 additions and 37 deletions
  1. +60
    -14
      components/config/configPopup.vue
  2. +1
    -1
      config.js
  3. +14
    -7
      pages/index/agreement.vue
  4. +16
    -1
      pages/index/logoInfo.vue
  5. +20
    -14
      pages_order/auth/wxLogin.vue

+ 60
- 14
components/config/configPopup.vue View File

@ -1,36 +1,79 @@
<template>
<view class="configPopup">
<uv-popup ref="popup" :round="30" :customStyle="{height: '50vh'}">
<uv-popup ref="popup" :round="30" :closeOnClickOverlay="!required">
<view class="content">
<uv-parse :content="content"></uv-parse>
<scroll-view
id="scrollView"
scroll-y="true"
:scroll-top="scrollTop"
style="height: 100%;">
<uv-parse :content="configList[keys[index]]"></uv-parse>
<view class="uni-color-btn" @click="success">
下一步
</view>
</scroll-view>
</view>
<view class="content" v-else>
<uv-parse :content="text || content"></uv-parse>
</view>
</uv-popup>
</view>
</template>
<script>
import { mapState } from 'vuex'
import {
mapState
} from 'vuex'
export default {
name: 'configPoup',
props: {
text: {
default: ''
},
keys: {
default: [],
},
required: {
default: false,
},
},
data() {
return {
content : ''
content: '',
index: 0,
scrollTop : 0,
}
},
onShow(){
},
onShow() {},
methods: {
//
open(key){
open(key) {
this.content = this.configList[key]
this.$refs.popup.open('bottom');
}
},
openkeys() {
this.index = 0
this.$refs.popup.open('bottom');
},
success() {
if (this.index == this.keys.length - 1) {
this.$emit('success')
this.$refs.popup.close();
return
}
this.index++
this.scrollTop = 100
this.$nextTick(res => {
this.scrollTop = 0
})
},
},
computed : {
computed: {
...mapState(['configList'])
}
}
@ -38,8 +81,11 @@
<style lang="scss" scoped>
.configPopup {
.content{
.content {
padding: 30rpx 20rpx;
overflow: scroll;
height: 50vh;
box-sizing: border-box;
}
}
</style>

+ 1
- 1
config.js View File

@ -7,7 +7,7 @@ import uvUI from '@/uni_modules/uv-ui-tools'
Vue.use(uvUI);
// 当前环境
const type = 'dev'
const type = 'prod'
// 环境配置


+ 14
- 7
pages/index/agreement.vue View File

@ -25,13 +25,15 @@
:class="{active:isActive === '已满18岁'}"
@click="setActive('已满18岁')">{{ '已满18岁' }}</view>
<view class="checkbox">
<view class="checkbox" @click="$refs.popup.openkeys()">
<uv-checkbox-group v-model="checkboxValue">
<view class="flex-center">
<uv-checkbox
size="40rpx"
icon-size="30rpx"
activeColor="#ecb864" :name="1"></uv-checkbox>
disabled
activeColor="#ecb864"
:name="1"></uv-checkbox>
<text>已同意</text>
<text @click="$refs.popup.open('privacyAgreement')">隐私政策</text>
</view>
@ -46,7 +48,10 @@
</view>
<configPopup ref="popup"></configPopup>
<configPopup ref="popup"
required
:keys="keys"
@success="checkboxValue = [1]"/>
</view>
</template>
@ -59,6 +64,7 @@
isActive : null,
checkboxValue : [],
configObj : {},
keys : ['user_ys_one', 'user_ys_two', 'user_xy_three', 'user_xy_four'],
}
},
computed : {
@ -83,10 +89,11 @@
return
}
if(!this.checkboxValue.length){
uni.showToast({
title:'请同意隐私政策',
icon: 'none'
})
// uni.showToast({
// title:'',
// icon: 'none'
// })
this.$refs.popup.openkeys()
return
}


+ 16
- 1
pages/index/logoInfo.vue View File

@ -1,6 +1,12 @@
<template>
<view class="page">
<view class="video" v-if="video">
<video :src="video"></video>
</view>
<uv-parse :content="content"></uv-parse>
<view class="uni-color-btn">
返回
</view>
</view>
</template>
@ -10,6 +16,7 @@
return {
content : '',
id : 0,
video : '',
}
},
onLoad({id}) {
@ -23,6 +30,7 @@
res.result.forEach(n => {
if(this.id == n.id){
this.content = n.details
this.video = n.vo
}
})
}
@ -34,6 +42,13 @@
<style scoped lang="scss">
.page{
padding-bottom: 100rpx;
.video{
width: 100%;
video{
width: 100%;
height: 420rpx;
}
}
}
</style>

+ 20
- 14
pages_order/auth/wxLogin.vue View File

@ -15,21 +15,22 @@
微信登录
</view>
</view>
<!-- <view class="btn b2">
使用短信验证登录
</view> -->
<view class="btn b2"
@click="qux">
取消登录
</view>
<view class="config">
<uv-checkbox-group v-model="checkboxValue" shape="circle">
<view class="flex-center">
<uv-checkbox size="30rpx" icon-size="20rpx" activeColor="#07c060" :name="1"></uv-checkbox>
<text>已同意</text>
<text @click="openConfigDetail('privacyAgreement')">隐私政策</text>
<text @click="openConfigDetail('userAgreement')">服务条款</text>
<view class="info">
<img src="../static/auth/info.svg" alt="info" />
</view>
<view class="flex-center">
<uv-checkbox size="30rpx" icon-size="20rpx" activeColor="#07c060" :name="1"></uv-checkbox>
<text>已同意</text>
<text @click="openConfigDetail('user_ys')">隐私政策</text>
<text @click="openConfigDetail('user_xy')">用户协议</text>
<view class="info">
<img src="../static/auth/info.svg" alt="info" />
</view>
</view>
</uv-checkbox-group>
</view>
@ -116,7 +117,12 @@
uni.navigateTo({
url:'/pages/index/home'
})
}
},
qux(){
uni.reLaunch({
url: '/pages/index/agreement'
})
},
}
}
</script>
@ -160,8 +166,8 @@
}
.b2 {
background-color: #3c69f122;
color: #3c69f1;
background-color: rgba($uni-wx-color, 0.2);
color: $uni-wx-color;
}
.mt {


Loading…
Cancel
Save