This commit is contained in:
ghusermoon 2020-06-23 09:05:45 +08:00
commit fe995ced2d
10 changed files with 507 additions and 137 deletions

View File

@ -68,6 +68,10 @@ export default {
launch_id: launch_id
});
},
// 标签的列表
labelList({}) {
return vm.$u.post('StartUp/labelList', {});
},
// 获取地区列表
getAreaList({ pid }) {
return vm.$u.post('Area/areaList', {

View File

@ -0,0 +1,74 @@
/*
graceUI rich-text 鍔犲己宸ュ叿
link : graceui.hcoder.net
author : 5213606@qq.com 娣辨捣
*/
// 姝e垯鍙橀噺
var graceRichTextReg;
// 鎵归噺鏇挎崲鐨勬牱寮<E789B1> [ 鏍规嵁椤圭洰闇€姹傝嚜琛岃缃<EE8695> ]
var GRT = [
// div 鏍峰紡
['div', "line-height:2em;"],
// h1 鏍峰紡
['h1', "font-size:3em; line-height:1.5em;"],
// h2 鏍峰紡
['h2', "font-size:2em; line-height:1.8em;"],
// h3 鏍峰紡
['h3', "font-size:1.6em; line-height:2em;"],
// h4 鏍峰紡
['h4', "font-size:1.2em; line-height:2em;"],
// h5 鏍峰紡
['h5', "font-size:1em; line-height:2em;"],
// h6 鏍峰紡
['h6', "font-size:0.9em; line-height:2em;"],
// p 鏍峰紡
['p', "font-size:1em; line-height:2em;"],
// b 鏍峰紡
['b', "font-size:1em; line-height:2em;"],
// strong 鏍峰紡
['strong', "font-size:1em; line-height:2em;"],
// code 鏍峰紡
['code', "font-size:1em; line-height:1.2em; background:#F6F7F8; padding:8px 2%; width:96%;"],
// img 鏍峰紡
['img', "width:100%; margin:8px 0;"],
// blockquote
['blockquote', "font-size:1em; border-left:3px solid #D1D1D1; line-height:2em; border-radius:5px; background:#F6F7F8; padding:8px 2%;"],
// li 鏍峰紡
['ul', "padding:5px 0; list-style:none; padding:0; margin:0;"],
['li', "line-height:1.5em; padding:5px 0; list-style:none; padding:0; margin:0; margin-top:10px;"],
// table
['table', "width:100%; border-left:1px solid #F2F3F4; border-top:1px solid #F2F3F4;"],
['th', "border-right:1px solid #F2F3F4; border-bottom:1px solid #F2F3F4;"],
['td', "border-right:1px solid #F2F3F4; border-bottom:1px solid #F2F3F4; padding-left:5px;"]
];
module.exports = {
format : function(html){
html = html.replace(/<pre.*pre>?/gis, function(word){
word = word.replace(/[\n]/gi,'<br />');
word = word.replace(/ /gi,'<span style="padding-left:2em;"></span>');
return word.replace(/[\t]/gi, '<span style="padding-left:2em;"></span>');
});
html = html.replace(/<pre/gi, '<p style="font-size:1em; margin:12px 0; line-height:1.2em; background:#F6F7F8; border-radius:5px; padding:8px 4%; width:92%;"');
html = html.replace(/<\/pre/gi,"</p");
for(let i = 0; i < GRT.length; i++){
graceRichTextReg = new RegExp('<'+GRT[i][0]+'>|<'+GRT[i][0]+' (.*?)>', 'gi');
html = html.replace(graceRichTextReg , function(word){
// 鍒嗘瀽 dom 涓婃槸鍚﹀甫鏈<E794AB> style=""
if(word.indexOf('style=') != -1){
var regIn = new RegExp('<' + GRT[i][0] + '(.*?)style="(.*?)"(.*?)(/?)>', 'gi');
return word.replace(regIn, '<'+ GRT[i][0] +'$1style="$2 ' + GRT[i][1] +'"$3$4>');
}else{
var regIn = new RegExp('<' + GRT[i][0] + '(.*?)(/?)>', 'gi');
return word.replace(regIn, '<'+ GRT[i][0] +'$1 style="' + GRT[i][1] +'$2">');
}
});
}
return html;
}
}

View File

@ -22,7 +22,7 @@
</view>
<view class="edit-btn">保存地址</view>
<!-- <u-picker mode="region" v-model="show" @confirm="setArea"></u-picker> -->
<!-- <u-select v-model="show" mode="mutil-column-auto" :list="areaList" @confirm="setArea"></u-select> -->
<u-select v-model="show" mode="mutil-column-auto" :list="areaList" @confirm="setArea"></u-select>
</view>
</template>
<script>

View File

@ -1,22 +1,35 @@
<template>
<view>
<image v-if="type" class="welcome_images" src="../../static/pageA/welcome_img.jpg" mode="aspectFill"></image>
<!-- <image v-if="type" class="welcome_images" src="../../static/pageA/welcome_img.jpg" mode="aspectFill"></image> -->
<view v-if="type" id="video_mp4">
<view class="page-body">
<view class="page-section">
<video id="myVideo" :src=" 'https://' + vide0_url" :controls="controls" :autoplay="autoplayes" :loop="loop" @error="videoErrorCallback" enable-danmu danmu-btn></video>
</view>
</view>
</view>
<view v-if="type" class="welcome_jumpes" @click="leap_over">跳过{{remaining}}</view>
<view v-if="banner" class="welcome_jumpes" @click="leap_overto">跳过</view>
<!-- 轮播图 -->
<view class="uni-padding-wrap" v-if="banner">
<view class="uni-padding-wrap">
<view class="page-section swiper">
<view class="page-section-spacing">
<swiper class="swiper" :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration">
<swiper-item v-for="(item,index) in imgurl" :key="index">
<view class="swiper-item uni-bg-red">
<image :src="item" mode="aspectFill"></image>
</view>
<swiper-item>
<view class="swiper-item uni-bg-red">A</view>
</swiper-item>
<swiper-item>
<view class="swiper-item uni-bg-green">B</view>
</swiper-item>
<swiper-item>
<view class="swiper-item uni-bg-blue">C</view>
</swiper-item>
</swiper>
</view>
</view>
</view>
</view>
<!-- 用户协议弹窗 -->
<view class="welcome_backes" v-if="protocol">
<view class="content">
@ -35,24 +48,46 @@
export default {
data() {
return {
remaining : 3,
remaining: 10,
type: true,
banner: false,
protocol: false,
heightes: '',
imgurl: ['../../static/pageA/welcome_banner.jpg', '../../static/pageA/welcome_img2.jpg', '../../static/pageA/welcome_img3.jpg'],
imgurl: [],
indicatorDots: true,
autoplay: true,
loop : 'true',
interval: 3000,
duration: 500,
vide0_url : '',
agreement: { //
document_title: "",
document_content: ""
},
title: 'video',
src: '',
inputValue: '',
controls : false,
autoplayes : true,
danmuList: [{
text: '第 1s 出现的弹幕',
color: '#ff0000',
time: 1
},
{
text: '第 3s 出现的弹幕',
color: '#ff00ff',
time: 3
}
]
};
},
onLoad() {
},
onReady: function(res) {
this.videoContext = uni.createVideoContext('myVideo')
},
methods: {
unescapeHTML(temp) {
@ -65,6 +100,7 @@
}).then((res) => {
if (res.errCode == 0) {
let agreement = res.data;
// console.log(agreement.document_content)
agreement.document_content = this.unescapeHTML(agreement.document_content);
// console.log(agreement);
this.agreement = agreement;
@ -73,6 +109,11 @@
//
this.$u.api.pageList({}).then((res) => {
console.log('协议', res)
let data_image = res.data.welcome_page
let vide0_url = res.data.start_page[0].launch_path
this.list = data_image;
this.vide0_url = vide0_url;
console.log(this.list)
})
},
// 3
@ -81,7 +122,7 @@
this.remaining--;
if (this.remaining <= 0) {
clearInterval(this.timer);
// console.log("")
console.log("完了")
this.type = !this.type
this.banner = !this.banner;
}
@ -108,6 +149,40 @@
uni.navigateTo({
url: '/pageA/login/login'
});
},
//
bindInputBlur: function(e) {
this.inputValue = e.target.value
},
bindButtonTap: function() {
var that = this
uni.chooseVideo({
sourceType: ['album', 'camera'],
maxDuration: 60,
camera: ['front', 'back'],
success: function(res) {
this.src = res.tempFilePath
}
})
},
bindSendDanmu: function() {
this.videoContext.sendDanmu({
text: this.inputValue,
color: this.getRandomColor()
})
},
videoErrorCallback: function(e) {
console.log('视频错误信息:')
console.log(e.target.errMsg)
},
getRandomColor: function() {
const rgb = []
for (let i = 0; i < 3; ++i) {
let color = Math.floor(Math.random() * 256).toString(16)
color = color.length == 1 ? '0' + color : color
rgb.push(color)
}
return '#' + rgb.join('')
}
},
mounted() {
@ -136,28 +211,50 @@
background: #C4CAC6;
z-index: 10;
}
#myVideo{
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: 0;
margin: auto;
}
uni-video{
width: 100%;
height: auto;
}
.uni-video-container{
background-color: none!important;
}
.welcome_images {
width: 100%;
position: fixed;
height: 100%
}
uni-swiper,uni-view,uni-image{
uni-swiper,
uni-view,
uni-image {
width: 100%;
// position: fixed;
height: 100%
}
uni-image {
width: 100%;
}
//
uni-swiper .uni-swiper-dot-active {
background-color: #fff !important;
}
.welcome_backes {
width: 100%;
position: fixed;
height: 100%;
background: #999999;
.content {
width: 558rpx;
height: 730rpx;
@ -168,6 +265,7 @@
bottom: 0;
top: 0;
margin: auto;
.title {
width: 558rpx;
text-align: center;
@ -178,8 +276,10 @@
line-height: 29rpx;
margin: 30rpx 0 24rpx 0;
}
.scroll {
height: 560rpx;
.protocol_content {
width: 494rpx;
height: 528rpx;
@ -195,6 +295,7 @@
}
}
.to_agree {
width: 558rpx;
font-size: 30rpx;

View File

@ -19,11 +19,11 @@
<!-- 服务协议 -->
<view class="pact">
<view>
<view></view>
<text>我已详细阅读并同意</text>
<text class="pact_text">用户协议 </text>
<text class="pact_text">隐私协议</text>
<text class="pact_text">使用协议</text>
<text class="pact_text" v-for="(item,index) in pact_text" :key="index" @click="pact_click(index)"> {{item.text}} </text>
</view>
<u-checkbox-group @change="checkboxGroupChange" size="27">
<u-checkbox @change="checkboxChange" v-model="item.checked" v-for="(item, index) in list" :key="index" :name="item.name"
shape="circle" size="14" active-color="#19BE6B"></u-checkbox>
@ -79,6 +79,19 @@
member_mobile: '', //
smslog_type: '2', //
sms_code: '', //
//
pact_text: [{
"id": '1',
"text": "《用户协议》"
}, {
"id": '2',
"text": "《隐私协议》"
}, {
"id": '3',
"text": "《使用协议》"
},
]
};
},
onLoad() {
@ -93,15 +106,47 @@
console.log(res)
})
},
//
pact_click(index){
console.log(index)
uni.navigateTo({
url: '/pageA/pactList/pactList?index=' + index
});
},
//
loginOn() {
// console.log("")
console.log("登录")
// console.log(this.member_mobile)
// console.log(this.sms_code)
//
//
let type_phone = this.$u.test.mobile( this.member_mobile)
if( this.member_mobile == ''){
this.$refs.uToast.show({
title: '手机号不能为空',
type: 'error'
})
return false;
}
if (type_phone == false) {
this.$refs.uToast.show({
title: '手机号格式不正确',
type: 'error'
});
return false;
}
if( this.sms_code == ''){
this.$refs.uToast.show({
title: '验证码不能为空',
type: 'error'
})
return false;
}
this.$u.api.phoneLogin({
member_mobile: this.member_mobile,
sms_code: this.sms_code
}).then((res) => {
console.log(res)
// console.log(res)
if (res.errCode == 0) {
//
@ -110,8 +155,13 @@
data: res.data,
success: function() {
console.log('success');
//
uni.navigateTo({
url : '/pageA/topick/topick'
})
}
});
// token
uni.setStorage({
key: 'token',
@ -203,7 +253,6 @@
</script>
<style lang="scss" scoped>
.login {
// background: url(../../static/pageA/loginbackground.png) no-repeat!important;
@ -282,9 +331,7 @@
margin-bottom: 10px;
}
.identifying {
}
.identifying {}
}
.uni-input-input,
@ -297,23 +344,29 @@
font-size: 22rpx;
font-weight: 400;
color: rgba(255, 255, 255, 1);
line-height: 36px;
// line-height: 36px;
}
.pact>view:first-child {
float: left;
}
.pact_text {
font-size: 22px;
font-weight: 400;
color: rgba(129, 188, 253, 1) !important;
line-height: 36px;
// line-height: 36px;
}
//
.pact {
position: relative;
padding-left: 40rpx;
overflow: hidden; //
text-overflow: ellipsis; //
white-space: nowrap; //
overflow: hidden;
// overflow: hidden; //
// text-overflow: ellipsis; //
// white-space: nowrap; //
}
.u-checkbox-group {

View File

@ -0,0 +1,74 @@
<template>
<view class="packlist">
<view>
<rich-text class="rict_type" :nodes="document_content"></rich-text>
</view>
</view>
</template>
<script>
var graceRichText = require("../../components/logininput/rictText.js");
export default {
data() {
return {
document_content : ''
}
},
onLoad(option) {
console.log(option)
//
let typeIindex = option.index;
this.typeIndexRquest(typeIindex)
},
methods: {
unescapeHTML (temp){
temp = "" + temp;
return temp.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&").replace(/&quot;/g, '"').replace(/&apos;/g, "'");
},
typeIndexRquest(typeIindex){
// 3 0 1 2 agreementopen_storeprivacyuse使
if(typeIindex == 0){
this.$u.api.documentInfo({
document_code: 'agreement'
}).then((res)=>{
console.log(res)
let data = this.unescapeHTML(res.data.document_content);
this.document_content = data
})
}
if(typeIindex == 1){
this.$u.api.documentInfo({
document_code: 'privacy'
}).then((res)=>{
console.log(res)
let data = this.unescapeHTML(res.data.document_content);
this.document_content = data
})
}
if(typeIindex == 2){
this.$u.api.documentInfo({
document_code: 'use'
}).then((res)=>{
console.log(res)
let data = this.unescapeHTML(res.data.document_content);
this.document_content = data
})
}
}
},
mounted(){
},
components:{}
}
</script>
<style lang="scss" scoped>
.packlist{}
.packlist > view{
width:676px;
font-size:26rpx;
color: #333;
width: 90%;
margin: 0 auto;
}
</style>

View File

@ -80,11 +80,35 @@
methods: {
//
loginIn(){
let type_phone = this.$u.test.mobile( this.member_mobile)
if( this.member_mobile == ''){
this.$refs.uToast.show({
title: '手机号不能为空',
type: 'error'
})
return false;
}
if (type_phone == false) {
this.$refs.uToast.show({
title: '手机号格式不正确',
type: 'error'
});
return false;
}
if( this.sms_code == ''){
this.$refs.uToast.show({
title: '验证码不能为空',
type: 'error'
})
return false;
}
this.$u.api.phoneRegister({
member_mobile: this.member_mobile,
sms_code: this.sms_code
}).then((res) => {
console.log(res)
console.log('3333333333',res);
//
// console.log(res)
if(res.errCode == 0){
//
@ -93,6 +117,10 @@
data: res.data,
success: function () {
console.log('success');
//
uni.navigateTo({
url : '/pageA/topick/topick'
})
}
});
//
@ -108,6 +136,13 @@
type: 'error'
})
}
if(res.errCode == 2){
this.$refs.uToast.show({
title: res.message,
type: 'primary',
url: '/pageA/login/login'
})
}
})
},
// checkbox

View File

@ -10,7 +10,7 @@
</view>
<!-- 标签 -->
<view class="tab_lable">
<view :class="{'cur': rSelect.indexOf(index)!=-1}" v-for="(item,index) in tab_lables" :key="index" @click="tapClick(index)">{{item}}</view>
<view :class="{'cur': rSelect.indexOf(index)!=-1}" v-for="(item,index) in tab_lables" :key="index" @click="tapClick(index)">{{item.name}}</view>
</view>
<!-- 提交按钮 -->
<view class="submites" @click="toHomePage">{{submites}}</view>
@ -28,11 +28,19 @@
value: '',
login: '登录',
show: false,
tab_lables: ["科技", "科技", "科技", "科技", "科技", "科技", "科技", "科技", "科技", "科技"],
tab_lables: [],
submites: '选好了进入首页',
rSelect:[]
};
},
onLoad(){
//
this.labelList()
},
mounted(){
},
methods: {
// checkbox
checkboxChange(e) {
@ -59,7 +67,17 @@
uni.switchTab({
url: '/pages/index/index'
});
}
},
//
labelList(){
console.log("11111222")
this.$u.api.labelList({
}).then((res) => {
console.log(res)
this.tab_lables = res.data
})
},
}
};
</script>

View File

@ -17,6 +17,17 @@
}
}
},
{
"path": "pactList/pactList",
"style": {
"navigationBarTitleText": "用户协议详情",
"app-plus":{
"titleNView":{
"backgroundColor":"#fff"
}
}
}
},
{
"path": "bindinges/bindinges",
"style": {

BIN
static/mp4.mp4 Normal file

Binary file not shown.