douzhuo před 2 roky
rodič
revize
b6b0027797
6 změnil soubory, kde provedl 734 přidání a 490 odebrání
  1. +3
    -0
      config.js
  2. +152
    -140
      pages/center/Piabodata/Employeesstatistics.vue
  3. +2
    -2
      pages/index/personal.vue
  4. +2
    -2
      pages/mine/registerCode.vue
  5. +552
    -325
      pages/mine/registerForm.vue
  6. +23
    -21
      pages/mine/registerResult.vue

+ 3
- 0
config.js Zobrazit soubor

@@ -76,6 +76,9 @@ var config = {
updateList: `${host}/zkMessage/messageList`,
// 升级公告更新阅读
updateRead: `${host}/zkMessage/updateFlag`,
// 隐私协议
privacyAgr: `${host}/zkPrivate/findById`,
}
};
module.exports = config;

+ 152
- 140
pages/center/Piabodata/Employeesstatistics.vue Zobrazit soubor

@@ -17,142 +17,150 @@
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<view class="single">
<view class="title">
<view class="title1" style="flex: 1;">接待量排名(TOP10)</view>
<view class="title1" style="flex: 1;">接待量排名(TOP10)</view>
</view>
<view class="hejisan">
<view class="sanbox1" style="width: 35%;">
<view class="text1-1">合计</view>
<view class="text1-2">{{newlisttabinfo1.total}}次</view>
</view>
<view class="sanbox1" style="width: 40%;">
<view class="sanbox1" style="width: 40%;">
<view class="text1-1">顾问</view>
<view class="text1-2">{{newlisttabinfo1.count}}人</view>
</view>
<view class="sanbox1" style="width: 25%;">
<view class="sanbox1" style="width: 25%;">
<view class="text1-1">人均接待量</view>
<view class="text1-2">{{newlisttabinfo1.avg}}次</view>
</view>
</view>
<view class="jindu" style="height: 360rpx;overflow: auto;">
<view v-if="newlisttabinfo1.result.length!=0" class="jindu-box" v-for="(item,index) in newlisttabinfo1.result" :key="index">
<view v-if="newlisttabinfo1.result.length!=0" class="jindu-box"
v-for="(item,index) in newlisttabinfo1.result" :key="index">
<view class="jindu-boxche">
<view class="jindu-name" v-if="item.name">{{item.name.substring(0,4)}}</view>
<view style="width: 440rpx;margin-left: 10rpx;">
<u-line-progress height="24" :show-percent="false" active-color="#FBA448" :percent="item.zxl1"></u-line-progress>
<u-line-progress height="24" :show-percent="false" active-color="#FBA448"
:percent="item.zxl1"></u-line-progress>
</view>
<view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}次</view>
</view>
</view>
<view v-if="newlisttabinfo1.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
<view v-if="newlisttabinfo1.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
暂无数据
</view>
</view>
</view>
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<view class="single">
<view class="title">
<view class="title1" style="flex: 1;">销讲执行率排行(TOP10)</view>
<view class="title1" style="flex: 1;">销讲执行率排行(TOP10)</view>
</view>
<view class="hejisan">
<view class="sanbox1" style="width: 40%;">
<view class="sanbox1" style="width: 40%;">
<view class="text1-1">顾问</view>
<view class="text1-2">{{newlisttabinfo3.count}}人</view>
</view>
<view class="sanbox1" style="width: 25%;">
<view class="sanbox1" style="width: 25%;">
<view class="text1-1">人均执行率</view>
<view class="text1-2">{{newlisttabinfo3.avg}}%</view>
</view>
</view>
<view class="jindu" style="height: 360rpx;overflow: auto;">
<view v-if="newlisttabinfo3.result.length!=0" class="jindu-box" v-for="(item,index) in newlisttabinfo3.result" :key="index">
<view v-if="newlisttabinfo3.result.length!=0" class="jindu-box"
v-for="(item,index) in newlisttabinfo3.result" :key="index">
<view class="jindu-boxche">
<view class="jindu-name" v-if="item.name">{{item.name.substring(0,4)}}</view>
<view style="width: 440rpx;margin-left: 10rpx;">
<u-line-progress height="24" :show-percent="false" active-color="#FBA448" :percent="item.zxl1"></u-line-progress>
<u-line-progress height="24" :show-percent="false" active-color="#FBA448"
:percent="item.zxl1"></u-line-progress>
</view>
<view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}%</view>
</view>
</view>
<view v-if="newlisttabinfo3.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
<view v-if="newlisttabinfo3.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
暂无数据
</view>
</view>
</view>
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<view class="single">
<view class="title">
<view class="title1" style="flex: 1;">录音时长(TOP10)</view>
<view class="title1" style="flex: 1;">录音时长(TOP10)</view>
</view>
<view class="hejisan">
<view class="sanbox1" style="width: 35%;">
<view class="text1-1">合计</view>
<view class="text1-2">{{newlisttabinfo2.total}}分钟</view>
</view>
<view class="sanbox1" style="width: 40%;">
<view class="sanbox1" style="width: 40%;">
<view class="text1-1">顾问</view>
<view class="text1-2">{{newlisttabinfo2.count}}人</view>
</view>
<view class="sanbox1" style="width: 25%;">
<view class="sanbox1" style="width: 25%;">
<view class="text1-1">人均录音时长</view>
<view class="text1-2">{{newlisttabinfo2.avg}}分钟</view>
</view>
</view>
<view class="jindu" style="height: 360rpx;overflow: auto;">
<view v-if="newlisttabinfo2.result.length!=0" class="jindu-box" v-for="(item,index) in newlisttabinfo2.result" :key="index">
<view v-if="newlisttabinfo2.result.length!=0" class="jindu-box"
v-for="(item,index) in newlisttabinfo2.result" :key="index">
<view class="jindu-boxche">
<view class="jindu-name" v-if="item.name">{{item.name.substring(0,4)}}</view>
<view style="width: 440rpx;margin-left: 10rpx;">
<u-line-progress height="24" :show-percent="false" active-color="#FBA448" :percent="item.zxl1"></u-line-progress>
<u-line-progress height="24" :show-percent="false" active-color="#FBA448"
:percent="item.zxl1"></u-line-progress>
</view>
<view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}分钟</view>
</view>
</view>
<view v-if="newlisttabinfo2.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
<view v-if="newlisttabinfo2.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
暂无数据
</view>
</view>
</view>
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<view class="single">
<view class="title">
<view class="title1" style="flex: 1;">违禁次数排名(TOP10)</view>
<view class="title1" style="flex: 1;">违禁次数排名(TOP10)</view>
</view>
<view class="hejisan">
<view class="sanbox1" style="width: 35%;">
<view class="text1-1">合计</view>
<view class="text1-2">{{newlisttabinfo4.total}}次</view>
</view>
<view class="sanbox1" style="width: 40%;">
<view class="sanbox1" style="width: 40%;">
<view class="text1-1">顾问</view>
<view class="text1-2">{{newlisttabinfo4.count}}人</view>
</view>
<view class="sanbox1" style="width: 25%;">
<view class="sanbox1" style="width: 25%;">
<view class="text1-1">人均违禁次数</view>
<view class="text1-2">{{newlisttabinfo4.avg}}次</view>
</view>
</view>
<view class="jindu" style="height: 360rpx;overflow: auto;">
<view v-if="newlisttabinfo4.result.length!=0" class="jindu-box" v-for="(item,index) in newlisttabinfo4.result" :key="index">
<view v-if="newlisttabinfo4.result.length!=0" class="jindu-box"
v-for="(item,index) in newlisttabinfo4.result" :key="index">
<view class="jindu-boxche">
<view class="jindu-name" v-if="item.name">{{item.name.substring(0,4)}}</view>
<view style="width: 440rpx;margin-left: 10rpx;">
<u-line-progress height="24" :show-percent="false" active-color="#FBA448" :percent="item.zxl1"></u-line-progress>
<u-line-progress height="24" :show-percent="false" active-color="#FBA448"
:percent="item.zxl1"></u-line-progress>
</view>
<view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}次</view>
</view>
</view>
<view v-if="newlisttabinfo4.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
<view v-if="newlisttabinfo4.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
暂无数据
</view>
</view>
</view>
<u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
</view>
</template>
@@ -167,32 +175,32 @@
activeTotal: 4,
totalTimeShow: false,
// 项目id
houseId:'',
lastEndDate:'',
lastStartDate:'',
newlisttabinfo1:{
avg:'',
count:'',
total:'',
result:[],
houseId: '',
lastEndDate: '',
lastStartDate: '',
newlisttabinfo1: {
avg: '',
count: '',
total: '',
result: [],
},
newlisttabinfo2:{
avg:'',
count:'',
total:'',
result:[],
newlisttabinfo2: {
avg: '',
count: '',
total: '',
result: [],
},
newlisttabinfo3:{
avg:'',
count:'',
total:'',
result:[],
newlisttabinfo3: {
avg: '',
count: '',
total: '',
result: [],
},
newlisttabinfo4:{
avg:'',
count:'',
total:'',
result:[],
newlisttabinfo4: {
avg: '',
count: '',
total: '',
result: [],
},
};
},
@@ -201,52 +209,52 @@
this.houseId = uni.getStorageSync('buildingID').id;
this.init()
},
onPullDownRefresh(){
onPullDownRefresh() {
this.init()
setTimeout(function () {
uni.stopPullDownRefresh();
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
methods: {
init(){
this.newlisttabinfo1={
avg:'',
count:'',
total:'',
result:[],
},
this.newlisttabinfo2={
avg:'',
count:'',
total:'',
result:[],
},
this.newlisttabinfo3={
avg:'',
count:'',
total:'',
result:[],
},
this.newlisttabinfo4={
avg:'',
count:'',
total:'',
result:[],
init() {
this.newlisttabinfo1 = {
avg: '',
count: '',
total: '',
result: [],
}
this.newlisttabinfo2 = {
avg: '',
count: '',
total: '',
result: [],
}
var activeTotal=0;
if(this.activeTotal==3){
activeTotal=null;
}else{
activeTotal=this.activeTotal;
this.lastEndDate='';
this.lastStartDate='';
this.newlisttabinfo3 = {
avg: '',
count: '',
total: '',
result: [],
}
var promse={
timeType:activeTotal,
lastStartDate:this.lastStartDate,
lastEndDate:this.lastEndDate,
houseId:this.houseId
this.newlisttabinfo4 = {
avg: '',
count: '',
total: '',
result: [],
}

var activeTotal = 0;
if (this.activeTotal == 3) {
activeTotal = null;
} else {
activeTotal = this.activeTotal;
this.lastEndDate = '';
this.lastStartDate = '';
}
var promse = {
timeType: activeTotal,
lastStartDate: this.lastStartDate,
lastEndDate: this.lastEndDate,
houseId: this.houseId
}
this.staffStatisticsReceptionTop10(promse)
this.staffStatisticsRecordingTimTop10(promse)
@@ -254,57 +262,57 @@
this.staffStatisticsProhibitedTop10(promse)
},
//接待量排名
staffStatisticsReceptionTop10(promse){
this.$u.post('/cusLvStatistics/staffStatisticsReceptionTop10',promse).then(res=>{
res.result.forEach(item=>{
item.zxl=item.data
item.name=item.accountName
staffStatisticsReceptionTop10(promse) {
this.$u.post('/cusLvStatistics/staffStatisticsReceptionTop10', promse).then(res => {
res.result.forEach(item => {
item.zxl = item.data
item.name = item.accountName
})
res.result=this.dealData(res.result)
this.newlisttabinfo1=res;
res.result = this.dealData(res.result)
this.newlisttabinfo1 = res;
})
},
//录音时长
staffStatisticsRecordingTimTop10(promse){
this.$u.post('/cusLvStatistics/staffStatisticsRecordingTimTop10',promse).then(res=>{
res.result.forEach(item=>{
item.zxl=item.data
item.name=item.accountName
staffStatisticsRecordingTimTop10(promse) {
this.$u.post('/cusLvStatistics/staffStatisticsRecordingTimTop10', promse).then(res => {
res.result.forEach(item => {
item.zxl = item.data
item.name = item.accountName
})
res.result=this.dealData(res.result)
this.newlisttabinfo2=res;
res.result = this.dealData(res.result)
this.newlisttabinfo2 = res;
})
},
//销讲
staffStatisticsExecutionRateTop10(promse){
this.$u.post('/cusLvStatistics/staffStatisticsExecutionRateTop10',promse).then(res=>{
res.result.forEach(item=>{
item.zxl=item.data;
item.zxl1=item.data;
item.name=item.accountName
staffStatisticsExecutionRateTop10(promse) {
this.$u.post('/cusLvStatistics/staffStatisticsExecutionRateTop10', promse).then(res => {
res.result.forEach(item => {
item.zxl = item.data;
item.zxl1 = item.data;
item.name = item.accountName
})
this.newlisttabinfo3=res;
this.newlisttabinfo3 = res;
})
},
//j禁忌
staffStatisticsProhibitedTop10(promse){
this.$u.post('/cusLvStatistics/staffStatisticsProhibitedTop10',promse).then(res=>{
res.result.forEach(item=>{
item.zxl=item.data
item.name=item.accountName
staffStatisticsProhibitedTop10(promse) {
this.$u.post('/cusLvStatistics/staffStatisticsProhibitedTop10', promse).then(res => {
res.result.forEach(item => {
item.zxl = item.data
item.name = item.accountName
})
res.result=this.dealData(res.result)
this.newlisttabinfo4=res;
res.result = this.dealData(res.result)
this.newlisttabinfo4 = res;
})
},
//自定义时间
totalTimeChange(e) {
console.log(e.startDate, e.endDate)
this.activeTotal=3;
this.lastEndDate=e.endDate
this.lastStartDate=e.startDate
this.activeTotal = 3;
this.lastEndDate = e.endDate
this.lastStartDate = e.startDate
this.init()
},
//时间切换
@@ -313,15 +321,17 @@
this.totalTimeShow = true;
} else {
this.activeTotal = index;
this.lastEndDate='';
this.lastStartDate='';
this.lastEndDate = '';
this.lastStartDate = '';
this.init()
}
},
// 定义一个公共方法对数据进行处理
dealData(arr){
dealData(arr) {
// 获取最大值
let num=Math.max.apply(Math, arr.map(function (o) { return o.zxl })) //结果:3
let num = Math.max.apply(Math, arr.map(function(o) {
return o.zxl
})) //结果:3
// console.log(num)
// if(num>100){
// // 获取最大值的下标
@@ -338,11 +348,11 @@
// })
// return arr
// }
arr.map(item=>{
item.zxl1=Math.floor(item.zxl/num*100)
arr.map(item => {
item.zxl1 = Math.floor(item.zxl / num * 100)
})
return arr
},
}
};
@@ -354,23 +364,25 @@
background: #FAFAFA;
padding-bottom: 60rpx;
}
.boxtittab {
position: sticky;
top: var(--window-top);
z-index: 999;
}
.hejisan{
.hejisan {
width: 92%;
margin: 0 auto;
display: flex;
padding-top: 20rpx;
padding-bottom:20rpx;
.text1-1{
padding-bottom: 20rpx;

.text1-1 {
color: #666666;
}
.text1-2{

.text1-2 {
color: #333333;
margin-top: 10rpx;
}


+ 2
- 2
pages/index/personal.vue Zobrazit soubor

@@ -15,7 +15,7 @@
</view>
</view>
<view class="settingGroup box">
<!-- <navigator class="line" url="/pages/mine/messageList">
<navigator class="line" url="/pages/mine/messageList">
<view class="title" style="width: 19%;">
<image src="/static/images/studyhot.png" style="width: 36rpx;height: 36rpx;" mode=""></image>
消息
@@ -23,7 +23,7 @@
<view class="right">
<image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image>
</view>
</navigator> -->
</navigator>
<navigator class="line" url="/pages/mine/Myprofile">
<view class="title">
<image src="/static/images/setting.png" style="width: 36rpx;height: 36rpx;" mode=""></image>


+ 2
- 2
pages/mine/registerCode.vue Zobrazit soubor

@@ -24,7 +24,7 @@
this.appid = uni.getAccountInfoSync().miniProgram.appId;
this.qrCodeUrl = domain.baseUrl;
},
methods: {
methods: {
down() {
let url = this.qrCodeUrl+'/customer/getQrCode?appid='+this.appid+'&page=pages/mine/registerForm&scene='+this.projectId
console.log(url)
@@ -37,7 +37,7 @@
success: () => {
uni.showToast({
title: "保存成功",
icon: "none",
icon: "none"
})
},
fail: () => {


+ 552
- 325
pages/mine/registerForm.vue Zobrazit soubor

@@ -1,327 +1,554 @@
<template>
<view class="cented-box">
<view class="chented" style="margin-bottom: 26rpx;">
<view class="title" style="border: none;">
<view class="titletext">姓名</view>
<view class="titletext2">
<input maxlength="10" class="titletext-input" style="color: #333333;" v-model="parames.name"
placeholder-class="titletext-input" placeholder-style="color:#B2B2B2;" type="text"
placeholder="请输入客户姓名(必填)" />
</view>
<view class="titleimg">
<!-- <image class="titleimg1" src="../../../static/images/arrow.png" mode=""></image> -->
</view>
</view>
</view>
<view class="chented">

<view class="title">
<view class="titletext">性别</view>
<view class="titletext2 displayclick" style="display: flex;align-items: center;padding-left: 10rpx;">
<view class="sexRadio" @click="changeSex(1)" :class="{active:parames.sex == 1}">男士</view>
<view class="sexRadio" @click="changeSex(2)" :class="{active:parames.sex == 2}">女士</view>
</view>
</view>

<view class="title">
<view class="titletext">到访人数</view>
<view class="titletext2" style="display: flex;align-items: center;justify-content: space-around;">
<view class="num" v-for="i in 6" :key="i" :class="{active:parames.howMany == i+1}"
@click="changeHowMany(i+1)">
{{i + 1}}
</view>
</view>
</view>
<view class="title" @click="Buildingselection()">
<view class="titletext">到访途径</view>
<view class="titletext2"
style="font-size: 30rpx;font-weight: 400;color: #B2B2B2;line-height: 110rpx;padding-left: 10rpx;">
<!-- {{parames.sourceName||'请选择客户来源'}} -->
<text v-if="parames.sourceName" style="color: #333333;">{{parames.sourceName}}</text>
<text v-else>请选择客户来源</text>
</view>
<view class="titleimg">
<image class="titleimg1" src="../../static/images/arrow.png" mode=""></image>
</view>
</view>
<!-- <view class="title" style="border: none;" @click="Buildingselection()">
<view class="titletext">咨询业务</view>
<view class="titletext2"
style="font-size: 30rpx;font-weight: 400;color: #B2B2B2;line-height: 110rpx;padding-left: 10rpx;">
<text v-if="parames.sourceName" style="color: #333333;">{{parames.sourceName}}</text>
<text v-else>请选择咨询业务</text>
</view>
<view class="titleimg">
<image class="titleimg1" src="../../static/images/arrow.png" mode=""></image>
</view>
</view> -->
</view>
<button class="clive" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" v-if="verifyPass">提交</button>
<view class="clive" @click="save" v-else>提交</view>
<u-select :mask-close-able="false" v-model="Showhiddenunits" mode="single-column" :list="list"
@cancel="cancel" @confirm="confirm"></u-select>
</view>
</template>

<script>
var app = getApp();
<template>
<view class="cented-box">
<!-- 背景图 -->
<image class="bg-img" src="@/static/images/screenCode/screen_bg.png" mode=""></image>
<!-- 头部 -->
<view class="header">
<view class="lside">
<text class="text top">访客入场</text>
<text class="text">登记表</text>
</view>
<view class="rside">
<image src="@/static/images/screenCode/screen_note.png" mode=""></image>
</view>
</view>
<!-- 表单 -->
<view class="container">
<view class="chented">
<view class="title">
<view class="titletext">客户姓名</view>
<view class="titletext2">
<input maxlength="10" class="titletext-input" style="color: #333333;" v-model="parames.name"
placeholder-class="titletext-input" placeholder-style="color:#B2B2B2;" type="text"
placeholder="请输入客户姓名(必填)" />
</view>
<view class="titleimg"></view>
</view>
</view>
<view class="chented">
<view class="title">
<view class="titletext">客户性别</view>
<!-- <view class="titletext2 displayclick"
style="display: flex;align-items: center;padding-left: 10rpx;">
<view class="sexRadio" @click="changeSex(1)" :class="{active:parames.sex == 1}">男士</view>
<view class="sexRadio" @click="changeSex(2)" :class="{active:parames.sex == 2}">女士</view>
</view> -->
<u-radio-group v-model="parames.sex">
<view style="display: flex;align-items: center;">
<u-radio :name="1" shape="circle">男士</u-radio>
<u-radio :name="2" shape="circle">女士</u-radio>
</view>
</u-radio-group>
</view>
<view class="title">
<view class="titletext">到访人数</view>
<view class="titletext2" style="display: flex;align-items: center;justify-content: space-around;">
<view class="num" v-for="i in 4" :key="i" :class="{active:parames.howMany == i+1}"
@click="changeHowMany(i+1)">
{{i + 1}}
</view>
</view>
</view>
<!-- <view class="title" @click="Buildingselection()">
<view class="titletext">到访途径</view>
<view class="titletext2"
style="font-size: 30rpx;font-weight: 400;color: #B2B2B2;line-height: 110rpx;padding-left: 10rpx;">
<text v-if="parames.sourceName" style="color: #333333;">{{parames.sourceName}}</text>
<text v-else>请选择客户来源</text>
</view>
<view class="titleimg">
<image class="titleimg1" src="../../static/images/arrow.png" mode=""></image>
</view>
</view> -->
</view>
<button class="clive" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber"
v-if="verifyPass">提交</button>
<view class="clive" @click="save" v-else>提交</view>
<view class="dengji">
<view class="d-lside">
入场登记
</view>
<view class="d-rside">
<view class="top">
<text class="t-time">{{$u.timeFormat(new Date(), 'hh:MM:ss')}}</text>
<text class="date">{{$u.timeFormat(new Date(), 'yyyy/mm/dd')}}</text>
</view>
<view class="address" style="font-size: 36rpx;">{{pname}}</view>
</view>
</view>
<view class="bottoms">
<u-checkbox v-model="parames.checked">我已阅读并同意</u-checkbox>
<text class="books" @click="openModel">《{{tit}}》</text>
</view>
</view>
<u-modal class="aaa" v-model="modelShow" :title="tit" width="720rpx" :mask-close-able="true"
:show-confirm-button="false">
<view class="bbb">
<u-icon class="close" @click="readOk" name="close-circle" color="#CCCCCC" size="60"></u-icon>
</view>
<view class="slot-content" style="padding:0 20rpx;height: 800rpx;overflow-y: auto;">
<view class="cont">
<scroll-view style="height: 800rpx;" scroll-y="true">
<rich-text :nodes="content"></rich-text>
</scroll-view>
</view>
</view>
</u-modal>
<view class="tips">
疫情防控 人人有责
</view>
<u-select :mask-close-able="false" v-model="Showhiddenunits" mode="single-column" :list="list" @cancel="cancel"
@confirm="confirm"></u-select>
</view>
</template>
<script>
var app = getApp();
var config = require("@/config");
let domain = require("@/utils/domain")
export default {
data() {
return {
Showhiddenunits: false,
list: [{
label: '自然到访',
value: '自然到访'
},
{
label: '渠道推荐',
value: '渠道推荐'
},
],
parames: {
name: '',
sex: 1,
sourceName: null,
howMany: 1,
projectId: '',
phone:'',
projectId:'',
projectName:'xxx'
},
daitiReceptionobj: {},
verifyPass:false,
qrCodeUrl:''
};
},
onLoad(options){
const sceneStr = decodeURIComponent(options.scene);
console.log(options)
this.parames.projectId = sceneStr
},
watch:{
parames:{
deep:true,
handler(newV){
if (newV.name.length == 0) {
this.verifyPass = false;
}else{
this.verifyPass = true;
}
}
}
},
methods: {
save() {
if (this.parames.name.length == 0) {
uni.showToast({
icon: "none",
title: "姓名不能为空"
})
return;
}
},
getPhoneNumber(e){
this.qrCodeUrl = domain.baseUrl
if(e.detail.errMsg=="getPhoneNumber:ok"){
let data = {
code:e.detail.code,
appid:uni.getAccountInfoSync().miniProgram.appId,
}
uni.request({
url:this.qrCodeUrl + '/code/loginSessionKey',
method:"GET",
data,
success:(res)=> {
console.log(res.data.data)
let phoneNum = JSON.parse(res.data.data).phone_info.phoneNumber
this.parames.phone = phoneNum
if(this.parames.phone!=null && this.parames.phone!=""){
if(this.parames.name.length>8){
uni.showToast({
icon: "none",
title: "不能超过8个汉字"
})
}else{
uni.request({
url:this.qrCodeUrl + '/customer/codeAdd',
method:"POST",
data:this.parames,
header: {
'content-type': 'application/json',
'Access-Token': uni.getStorageSync('weapp_session_login_data').token
},
success: (addres) => {
if(addres.data.code == 10000){
uni.reLaunch({
url:'/pages/mine/registerResult'
})
}else{
uni.showToast({
icon: "none",
title: addres.data.message
})
}
}
})
}
}
}
})
}else{
return;
}
},
changeSex(sex) {
this.parames.sex = sex;
},
changeHowMany(num) {
this.parames.howMany = num;
},
Buildingselection() {
this.Showhiddenunits = true;
},
cancel() {
this.Showhiddenunits = false;
},
confirm(e) {
this.parames.sourceName = e[0].value;
this.Showhiddenunits = false;
},
}
};
</script>
<style lang="scss" scoped>
.sexRadio {
color: #BFBFBF;
border: 1rpx solid #BFBFBF;
font-size: 24upx;
width: 120rpx;
height: 60rpx;
text-align: center;
display: flex;
align-items: center;
justify-content: center;

&:last-child {
margin-left: 20rpx;
}

&.active {
background: #2B6FFF;
color: #fff;
border-color: #2B6FFF;
}
}

.num {
width: 50rpx;
height: 50rpx;
background: rgba(43, 110, 253, 0.1);
color: #2B6EFD;
font-size: 30rpx;
display: flex;
align-items: center;
justify-content: center;

&.active {
background: #2B6EFD;
color: #FFFFFF;
}
}

.cented-box {
background: #F8F8F8;
width: 100%;
height: 100vh;
}

.Pinspeak {
width: 100%;
height: 92rpx;
border-bottom: 1rpx solid #E0E0E0;
font-size: 32rpx;
font-weight: bold;
color: #333333;
text-indent: 30rpx;
line-height: 92rpx;
background: #FFFFFF;
margin-top: 20rpx;
padding-left: 10rpx;
}

.chented {
width: 100%;
padding-left: 30rpx;
padding-right: 30rpx;
background-color: #FFFFFF;

.title {
width: 100%;
height: 110rpx;
border-bottom: 1rpx solid #E0E0E0;
display: flex;
align-items: center;

.titletext {
width: 21%;
height: 110rpx;
font-size: 30rpx;
font-weight: 400;
color: #333333;
line-height: 110rpx;
text-indent: 10rpx;
}

.titletext2 {
width: 71%;
height: 110rpx;
}

.titletext-input {
width: 100%;
height: 110rpx;
font-size: 30rpx;
font-weight: 400;
color: #B2B2B2;
line-height: 110rpx;
padding-left: 10rpx;
}

.titleimg {
width: 8%;
text-align: right;

.titleimg1 {
width: 16rpx;
height: 36rpx;
}
}
}
}

.clive {
position: absolute;
bottom: 32rpx;
left: 30rpx;
right: 30rpx;
width: 690rpx;
height: 88rpx;
background: #2671E2;
text-align: center;
line-height: 88rpx;
color: #FFFFFF;
border-radius: 8rpx;
font-size: 32rpx;
}
let domain = require("@/utils/domain")
export default {
data() {
return {
Showhiddenunits: false,
list: [{
label: '自然到访',
value: '自然到访'
},
{
label: '渠道推荐',
value: '渠道推荐'
},
],
parames: {
name: '',
sex: 1,
// sourceName: "自然到访",
howMany: 1,
projectId: '',
phone: '',
projectId: '',
projectName: 'xxx',
version: "",
checked: true,
},
pname: "",
daitiReceptionobj: {},
verifyPass: false,
qrCodeUrl: '',
// 是否同意隐私协议
content: "",
modelShow: false,
tit: "",
};
},
onLoad(options) {
console.log(options)
const sceneStr = decodeURIComponent(options.scene);
this.parames.projectId = sceneStr
this.initFetch()
},
watch: {
parames: {
deep: true,
handler(newV) {
if (newV.checked) {
if (newV.name.length != 0) {
this.verifyPass = true;
} else {
this.verifyPass = false;
}
} else {
this.verifyPass = false;
}
// if (newV.name.length == 0) {
// this.verifyPass = false;
// } else {
// this.verifyPass = true;
// }
}
}
},
methods: {
initFetch() {
let appid = uni.getAccountInfoSync().miniProgram.appId;
uni.request({
url: config.service.privacyAgr,
method: "GET",
data: {
id: appid,
projectId: this.parames.projectId
},
header: {
'content-type': 'application/json',
'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
},
success: (res) => {
this.content = res.data.data.content
this.tit = res.data.data.title
this.parames.version = res.data.data.version
this.pname = res.data.data.projectName
}
})
},
openModel() {
this.modelShow = true;
},
readOk() {
this.parames.checked = true;
this.modelShow = false;
},
save() {
if (this.parames.checked == false) {
uni.showToast({
icon: "none",
title: "请阅读并同意用户隐私协议"
})
return;
} else {
if (this.parames.name.length == 0) {
uni.showToast({
icon: "none",
title: "姓名不能为空"
})
return;
}
}
},
getPhoneNumber(e) {
this.qrCodeUrl = domain.baseUrl
if (e.detail.errMsg == "getPhoneNumber:ok") {
let data = {
code: e.detail.code,
appid: uni.getAccountInfoSync().miniProgram.appId,
}
uni.request({
url: this.qrCodeUrl + '/code/loginSessionKey',
method: "GET",
data,
success: (res) => {
console.log(res.data.data)
let phoneNum = JSON.parse(res.data.data).phone_info.phoneNumber
this.parames.phone = phoneNum
if (this.parames.phone != null && this.parames.phone != "") {
if (this.parames.name.length > 8) {
uni.showToast({
icon: "none",
title: "不能超过8个汉字"
})
} else {
uni.request({
url: this.qrCodeUrl + '/customer/codeAdd',
method: "POST",
data: this.parames,
header: {
'content-type': 'application/json',
'Authorization': 'Bearer ' + uni.getStorageSync(
'weapp_session_login_data').token
},
success: (addres) => {
if (addres.data.code == 10000) {
uni.reLaunch({
url: '/pages/mine/registerResult'
})
} else {
uni.showToast({
icon: "none",
title: addres.data.message
})
}
}
})
}
}
}
})
} else {
return;
}
},
changeSex(sex) {
this.parames.sex = sex;
},
changeHowMany(num) {
this.parames.howMany = num;
},
Buildingselection() {
this.Showhiddenunits = true;
},
cancel() {
this.Showhiddenunits = false;
},
confirm(e) {
this.parames.sourceName = e[0].value;
this.Showhiddenunits = false;
},
}
};
</script>
<style lang="scss" scoped>
/deep/ .u-model-title {
padding-top: 0px !important;
padding: 48rpx 0 24rpx !important;
}
.aaa {
position: relative;
.bbb {
position: absolute;
top: 8rpx;
right: 8rpx;
}
}
.cented-box {
position: relative;
padding: 0 0 50rpx 0;
width: 100vw;
min-height: calc(100vh - var(--window-top));
display: flex;
flex-direction: column;
.bg-img {
width: 100%;
height: 100%;
z-index: -1;
position: absolute;
}
.header {
margin: 0 0 40rpx 0;
width: 100%;
display: flex;
.lside {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.text {
color: #fff;
font-size: 100rpx;
font-weight: 800;
}
.top {
font-size: 76rpx;
}
}
.rside {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
image {
width: 306rpx;
height: 302rpx;
}
}
}
.container {
position: relative;
margin: 0 auto;
width: 670rpx;
height: 900rpx;
background: #fff;
border-radius: 16rpx;
.chented {
padding: 0 30rpx;
width: 100%;
.title {
width: 100%;
height: 110rpx;
border-bottom: 1rpx solid #E0E0E0;
display: flex;
align-items: center;
.titletext {
width: 21%;
font-size: 30rpx;
font-weight: 400;
color: #333333;
}
.titletext2 {
width: 71%;
}
.titletext-input {
width: 100%;
height: 110rpx;
font-size: 30rpx;
font-weight: 400;
color: #B2B2B2;
line-height: 110rpx;
padding-left: 10rpx;
}
.titleimg {
width: 8%;
text-align: right;
.titleimg1 {
width: 16rpx;
height: 36rpx;
}
}
}
}
.clive {
margin: 100rpx auto 0;
width: 610rpx;
height: 88rpx;
background: #2671E2;
text-align: center;
line-height: 88rpx;
color: #FFFFFF;
border-radius: 8rpx;
font-size: 32rpx;
}
.dengji {
margin: 60rpx 0 0 0;
padding: 0 30rpx;
width: 100%;
display: flex;
.d-lside {
padding: 0 20rpx;
height: 88rpx;
display: flex;
align-items: center;
border-right: 1rpx solid #E0E0E0;
font-size: 36rpx;
font-weight: 500;
}
.d-rside {
padding: 0 20rpx;
height: 88rpx;
display: flex;
flex-direction: column;
.top {
display: flex;
align-items: baseline;
font-size: 24rpx;
color: #333330;
.t-time {
margin-right: 20rpx;
font-size: 36rpx;
font-weight: 500;
color: #333331;
}
}
}
}
.bottoms {
position: absolute;
bottom: 30rpx;
padding: 0 30rpx;
width: 100%;
.books {
margin-left: -24rpx;
color: #2671E2;
font-size: 30rpx;
}
}
}
.tips {
margin: 40rpx 0 0 0;
width: 100%;
text-align: center;
color: #fff;
font-size: 30rpx;
}
}
.sexRadio {
color: #BFBFBF;
border: 1rpx solid #BFBFBF;
font-size: 24upx;
width: 120rpx;
height: 60rpx;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
&:last-child {
margin-left: 20rpx;
}
&.active {
background: #2B6FFF;
color: #fff;
border-color: #2B6FFF;
}
}
.num {
width: 74rpx;
height: 74rpx;
border-radius: 8rpx;
background: rgba(43, 110, 253, 0.1);
color: #2B6EFD;
font-size: 32rpx;
display: flex;
align-items: center;
justify-content: center;
&.active {
background: #2B6EFD;
color: #FFFFFF;
}
}
.Pinspeak {
width: 100%;
height: 92rpx;
border-bottom: 1rpx solid #E0E0E0;
font-size: 32rpx;
font-weight: bold;
color: #333333;
text-indent: 30rpx;
line-height: 92rpx;
background: #FFFFFF;
margin-top: 20rpx;
padding-left: 10rpx;
}
</style>

+ 23
- 21
pages/mine/registerResult.vue Zobrazit soubor

@@ -13,33 +13,35 @@
export default {
data() {
return {
};
}
}
</script>

<style lang="scss">
.registerCode{
.registerImg{
width: 300rpx;
height: 300rpx;
margin: 130rpx auto;
image{
width: 100%;
height: 100%;
.registerCode {
.registerImg {
width: 300rpx;
height: 300rpx;
margin: 130rpx auto;

image {
width: 100%;
height: 100%;
}
}
.registerBtn {
width: 80%;
height: 80rpx;
background: #3384fd;
color: #FFFFFF;
border-radius: 10rpx;
line-height: 80rpx;
text-align: center;
font-size: 30rpx;
margin: 50rpx auto;
}
}
.registerBtn{
width: 80%;
height: 80rpx;
background: #3384fd;
color: #FFFFFF;
border-radius: 10rpx;
line-height: 80rpx;
text-align: center;
font-size: 30rpx;
margin: 50rpx auto;
}
}
</style>

Načítá se…
Zrušit
Uložit