修改服务范围地区的选择、提交事件数据的传递、新增tools.js邮箱验证正则、身份证验证正则、个人信息页面提交事件数据的传递、电子证件数据的动态
parent
cc4f0a9b67
commit
20e4d4ffb9
|
@ -8,7 +8,7 @@
|
|||
}"
|
||||
>
|
||||
<!-- 有的不支持canvas-id属性,必须用id属性 -->
|
||||
<canvas
|
||||
<canvas v-if="canvasId"
|
||||
class="canvas-bg"
|
||||
:canvas-id="canvasId"
|
||||
:id="canvasId"
|
||||
|
@ -17,7 +17,7 @@
|
|||
height: widthPx + 'px'
|
||||
}"
|
||||
></canvas>
|
||||
<canvas
|
||||
<canvas v-if="elId"
|
||||
class="canvas"
|
||||
:canvas-id="elId"
|
||||
:id="elId"
|
||||
|
|
|
@ -0,0 +1,107 @@
|
|||
.lotus-address-picker {
|
||||
font-size: 26rpx;
|
||||
padding-top: 30rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
line-height: normal;
|
||||
padding-right: 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.lotus-address-picker-box {
|
||||
/*display: -webkit-box;
|
||||
display: -webkit-flex;*/
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
justify-content: flex-start;
|
||||
padding-top: 10rpx;
|
||||
padding-bottom: 10rpx;
|
||||
}
|
||||
.lotus-address-picker-box-item {
|
||||
height: 600upx;
|
||||
overflow-y: auto;
|
||||
width: 33.333%;
|
||||
padding-left: 20rpx;
|
||||
padding-right: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.lotus-address-picker2 {
|
||||
color: #03affb;
|
||||
position: relative;
|
||||
}
|
||||
.lotus-address-picker2:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 65%;
|
||||
transform: translateY(-35%) rotate(-45deg);
|
||||
width: 20rpx;
|
||||
height: 10rpx;
|
||||
border-left-width: 4rpx;
|
||||
border-bottom-width: 4rpx;
|
||||
border-left-style: solid;
|
||||
border-bottom-style: solid;
|
||||
border-left-color: #03affb;
|
||||
border-bottom-color: #03affb;
|
||||
}
|
||||
.lotus-address-mask {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 999;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.lotus-address-box {
|
||||
background: #fff;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.lotus-address-action {
|
||||
font-size: 30rpx;
|
||||
/*display: -webkit-box;
|
||||
display: -webkit-flex;*/
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
justify-content: space-between;
|
||||
padding: 25rpx 30rpx;
|
||||
position: relative;
|
||||
}
|
||||
.lotus-address-action:after {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
height: 1px;
|
||||
border-top: 1px solid #eee;
|
||||
color: #eee;
|
||||
transform-origin: 0 0;
|
||||
transform: scaleY(0.5);
|
||||
}
|
||||
.lotus-address-action:before {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
height: 1px;
|
||||
border-bottom: 1px solid #eee;
|
||||
color: #eee;
|
||||
transform-origin: 0 100%;
|
||||
transform: scaleY(0.5);
|
||||
}
|
||||
.lotus-address-action-cancel {
|
||||
color: #969696;
|
||||
}
|
||||
.lotus-address-action-affirm {
|
||||
color: #03affb;
|
||||
}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,233 @@
|
|||
<template>
|
||||
<!--地址picker-->
|
||||
<view :status="checkStatus" v-if="lotusAddressData.visible" class="lotus-address-mask">
|
||||
<view :class="lotusAddressData.visible?'lotus-address-box':'lotus-address-box lotus-address-box-out'">
|
||||
<view class="lotus-address-action">
|
||||
<text @tap="cancelPicker" class="lotus-address-action-cancel">取消</text>
|
||||
<text @tap="chosedVal" class="lotus-address-action-affirm">确认</text>
|
||||
</view>
|
||||
<view class="lotus-address-picker-box">
|
||||
<!--省-->
|
||||
<scroll-view scroll-y :scroll-into-view="'pid'+pChoseIndex" class="lotus-address-picker-box-item">
|
||||
<view @tap="clickPicker(0,pIndex,pItem);" :id="'pid'+pIndex" :class="pIndex === pChoseIndex?'lotus-address-picker lotus-address-picker2':'lotus-address-picker'" v-for="(pItem,pIndex) in province" :key="pIndex">{{pItem}}</view>
|
||||
</scroll-view>
|
||||
<!--市-->
|
||||
<scroll-view scroll-y :scroll-into-view="'cid'+cChoseIndex" class="lotus-address-picker-box-item">
|
||||
<view @tap="clickPicker(1,cIndex,cItem);" :id="'cid'+cIndex" :class="cIndex === cChoseIndex?'lotus-address-picker lotus-address-picker2':'lotus-address-picker'" v-for="(cItem,cIndex) in city" :key="cIndex">{{cItem}}</view>
|
||||
</scroll-view>
|
||||
<!--区-->
|
||||
<scroll-view scroll-y :scroll-into-view="'tid'+tChoseIndex" class="lotus-address-picker-box-item">
|
||||
<view @tap="clickPicker(2,tIndex,tItem);" :id="'tid'+tIndex" :class="tIndex === tChoseIndex?'lotus-address-picker lotus-address-picker2':'lotus-address-picker'" v-for="(tItem,tIndex) in town" :key="tIndex">{{tItem}}</view>
|
||||
</scroll-view>
|
||||
<!--区END-->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!--地址picker END-->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {lotusAddressJson} from "./city.js";
|
||||
export default {
|
||||
props:['lotusAddressData'],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
province:[],
|
||||
city:[],
|
||||
town:[],
|
||||
provinceName:'',
|
||||
cityName:'',
|
||||
townName:'',
|
||||
type:0,//0新增1编辑
|
||||
pChoseIndex:-1,
|
||||
cChoseIndex:-1,
|
||||
tChoseIndex:-1
|
||||
};
|
||||
},
|
||||
methods:{
|
||||
//取消
|
||||
cancelPicker(){
|
||||
const provinceCode = this.getTarId(this.provinceName);
|
||||
const cityCode = this.getTarId(this.cityName);
|
||||
const townCode = this.getTarId(this.townName);
|
||||
this.visible = false;
|
||||
this.$emit("choseVal",{
|
||||
province:this.provinceName,
|
||||
provinceCode,
|
||||
city:this.cityName,
|
||||
cityCode,
|
||||
town:this.townName,
|
||||
townCode,
|
||||
isChose:0,
|
||||
visible:false
|
||||
});
|
||||
},
|
||||
//获取最后选择的省市区的值
|
||||
chosedVal() {
|
||||
this.type = 1;
|
||||
const provinceCode = this.getTarId(this.provinceName);
|
||||
const cityCode = this.getTarId(this.cityName);
|
||||
const townCode = this.getTarId(this.townName);
|
||||
this.visible = false;
|
||||
let isChose = 0;
|
||||
//已选省市区 isChose = 1
|
||||
if((this.provinceName&&this.cityName)||(this.provinceName&&this.cityName&&this.townName)){
|
||||
isChose = 1;
|
||||
}
|
||||
this.$emit("choseVal",{
|
||||
province:this.provinceName,
|
||||
provinceCode,
|
||||
city:this.cityName,
|
||||
cityCode,
|
||||
town:this.townName,
|
||||
townCode,
|
||||
isChose,
|
||||
visible:false
|
||||
});
|
||||
},
|
||||
//获取省市区value
|
||||
getTarId(name,type){
|
||||
let id = 0;
|
||||
lotusAddressJson.map((item,index)=>{
|
||||
if(item.name === name){
|
||||
id = item.value;
|
||||
}
|
||||
});
|
||||
return id;
|
||||
},
|
||||
//获取市数据
|
||||
getCityArr(parentId){
|
||||
let city = [];
|
||||
lotusAddressJson.map((item,index)=>{
|
||||
if(item.parent === parentId){
|
||||
city.push(item.name);
|
||||
}
|
||||
});
|
||||
return city;
|
||||
},
|
||||
//获取区数据
|
||||
getTownArr(parentId){
|
||||
let town = [];
|
||||
lotusAddressJson.map((item,index)=>{
|
||||
if(index>34&&item.parent === parentId){
|
||||
town.push(item.name);
|
||||
}
|
||||
});
|
||||
return town;
|
||||
},
|
||||
//初始化数据
|
||||
initFn(){
|
||||
if(!this.province.length){
|
||||
lotusAddressJson.map((item,index)=>{
|
||||
if(index<=34){
|
||||
this.province.push(item.name);
|
||||
}
|
||||
});
|
||||
}
|
||||
//已选择省市区,高亮显示对应选择省市区
|
||||
const p = this._props.lotusAddressData.provinceName;
|
||||
const c = this._props.lotusAddressData.cityName;
|
||||
const t = this._props.lotusAddressData.townName;
|
||||
//已选省
|
||||
if(p){
|
||||
this.pChoseIndex = this.getTarIndex(this.province,p);
|
||||
}
|
||||
//已选市
|
||||
if(p&&c){
|
||||
const pid = this.getTarId(p);
|
||||
this.city = this.getCityArr(pid);
|
||||
this.cChoseIndex = this.getTarIndex(this.city,c);
|
||||
}
|
||||
//已选区
|
||||
if(p&&c&&t){
|
||||
const cid= this.getTarId(c);
|
||||
this.town = this.getTownArr(cid);
|
||||
this.tChoseIndex = this.getTarIndex(this.town,t);
|
||||
}
|
||||
//未选省市区
|
||||
if(!p&&!c&&!t){
|
||||
this.pChoseIndex = -1;
|
||||
this.cChoseIndex = -1;
|
||||
this.tChoseIndex = -1;
|
||||
this.city = [];
|
||||
this.town = [];
|
||||
}
|
||||
},
|
||||
//获取已选省市区
|
||||
getChosedData(){
|
||||
const pid = this.getTarId(this.provinceName,'province');
|
||||
this.city = this.getCityArr(pid);
|
||||
const cid= this.getTarId(this.cityName,'city');
|
||||
this.town = this.getTownArr(cid);
|
||||
//已选省市区获取对应index
|
||||
if(this.provinceName){
|
||||
this.pChoseIndex = this.getTarIndex(this.province,this.provinceName);
|
||||
}
|
||||
if(this.cityName){
|
||||
this.cChoseIndex = this.getTarIndex(this.city,this.cityName);
|
||||
}
|
||||
if(this.townName){
|
||||
this.tChoseIndex = this.getTarIndex(this.town,this.townName);
|
||||
}
|
||||
},
|
||||
//选择省市区交互
|
||||
clickPicker(type,index,name){
|
||||
//省
|
||||
if(type === 0){
|
||||
this.pChoseIndex = index;
|
||||
this.provinceName = name;
|
||||
this.cChoseIndex = -1;
|
||||
this.tChoseIndex = -1;
|
||||
this.cityName = '';
|
||||
this.townName = '';
|
||||
}
|
||||
//市
|
||||
if(type ===1){
|
||||
this.cChoseIndex = index;
|
||||
this.cityName = name;
|
||||
this.tChoseIndex = -1;
|
||||
this.townName = '';
|
||||
}
|
||||
//区
|
||||
if(type === 2){
|
||||
this.tChoseIndex = index;
|
||||
this.townName = name;
|
||||
}
|
||||
//获取省市区数据
|
||||
this.getChosedData();
|
||||
},
|
||||
//获取已选省市区index
|
||||
getTarIndex(arr,tarName){
|
||||
let cIndex = 0;
|
||||
arr.map((item,index)=>{
|
||||
if(item === tarName){
|
||||
cIndex = index;
|
||||
}
|
||||
});
|
||||
return cIndex;
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
checkStatus(){
|
||||
let t = null;
|
||||
const _this = this;
|
||||
if(!_this.visible){
|
||||
_this.visible = _this._props.lotusAddressData.visible;
|
||||
//获取省市区
|
||||
_this.provinceName = _this._props.lotusAddressData.provinceName;
|
||||
_this.cityName = _this._props.lotusAddressData.cityName;
|
||||
_this.townName = _this._props.lotusAddressData.townName;
|
||||
//生成初始化数据
|
||||
_this.initFn();
|
||||
t = _this.visible;
|
||||
}
|
||||
return t;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
@import "./city.css";
|
||||
</style>
|
|
@ -356,14 +356,14 @@ moreColor:显示更多的颜色
|
|||
}
|
||||
|
||||
.loopItemBaseShow {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
// height: 100%;
|
||||
overflow: hidden;
|
||||
font-size: 28rpx;
|
||||
text-align: left;
|
||||
position: absolute;
|
||||
white-space: nowrap;
|
||||
align-items: center;
|
||||
text-overflow: ellipsis;
|
||||
|
|
|
@ -69,6 +69,16 @@ const tools = {
|
|||
// return false
|
||||
return !reg_tel.test(phone);
|
||||
},
|
||||
// 电子邮箱验证
|
||||
isEmail(email){
|
||||
let reg_email = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
|
||||
return !reg_email.test(email);
|
||||
},
|
||||
// 身份证验证
|
||||
isIdentity(identity) {
|
||||
let reg_identity = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
|
||||
return !reg_identity.test(identity);
|
||||
},
|
||||
// 手机号中间四位用"****"带替
|
||||
hideMPhone(phone){
|
||||
return `${phone.substr(0, 3)}****${phone.substr(7)}`
|
||||
|
|
|
@ -104,7 +104,16 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.checkFeedback();
|
||||
},
|
||||
methods: {
|
||||
// 查询意见反馈类型
|
||||
checkFeedback(){
|
||||
this.$requst.get('/universal/api.feedback/feedback_type',{page:1,list_rows:20}).then(res=>{
|
||||
|
||||
})
|
||||
},
|
||||
opinionType(index) {
|
||||
for (var i = 0; i < this.typeData.length; i++) {
|
||||
this.typeData[i].state = false
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
<template>
|
||||
<view class="content" :style="{paddingTop: statusHeight+25 + 'px'}">
|
||||
<view class="content" :style="{paddingTop: statusHeight + 'px'}">
|
||||
<statusNav navBarTitle="项目列表" :ifReturn="false"></statusNav>
|
||||
<container-subgroup-two>
|
||||
<view slot="content" style="margin: -100rpx -30rpx 0rpx; ">
|
||||
|
||||
<view class="project-list-input" :style="{top: statusHeight + 'px'}">
|
||||
<view slot="content" style="margin: -100rpx -30rpx;">
|
||||
<view class="project-list-input">
|
||||
<input type="text" class="int" value="" placeholder="请输入关键字" />
|
||||
<view class="xian">
|
||||
|
||||
</view>
|
||||
<view class="xian"></view>
|
||||
<image class="search" src="../../static/iocn/ss.png" mode="aspectFill" lazy-load></image>
|
||||
</view>
|
||||
<view class="screen bbot mar-sx20">
|
||||
|
@ -79,7 +76,6 @@
|
|||
format: true
|
||||
})
|
||||
return {
|
||||
statusBarHeight:uni.getSystemInfoSync().statusBarHeight+40,
|
||||
date: currentDate,
|
||||
array: ['类型', '类型', '类型', '类型'],
|
||||
index: 0,
|
||||
|
@ -128,8 +124,6 @@
|
|||
height: 114rpx;
|
||||
position: relative;
|
||||
padding: 20rpx 16rpx;
|
||||
position: fixed;
|
||||
z-index: 2;
|
||||
box-sizing: border-box;
|
||||
background-color: #FFFFFF
|
||||
}
|
||||
|
|
|
@ -4,7 +4,15 @@
|
|||
<!-- <view slot="leftContent"><i class="icon icon-return fon40" :style="{color:newColor}"></i></view> -->
|
||||
<view slot="leftContent" style="width: 30rpx;"></view>
|
||||
<view slot="centerContent"><view :style="{color:newColor}">个人中心</view></view>
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<view slot="rightContent" @tap="goSetUp"><i class="icon icon-sandian fon40" :style="{color:newColor}"></i></view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5 -->
|
||||
<view slot="rightContent" @tap="goSetUp"><i class="icon icon-sandian fon40" :style="{color:newColor}"></i></view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view slot="rightContent" style="width: 30rpx;"></view>
|
||||
<!-- #endif -->
|
||||
</status-nav-slot>
|
||||
<view class="posir" style="background: url(/static/public/icon-my-logo.png) no-repeat;background-size: 100% auto;" :style="{paddingTop: newHeight + 'px'}">
|
||||
<!-- <image src="/static/public/icon-my-logo.png" class="width100" mode="widthFix" lazy-load></image> -->
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view class="pad-x160">
|
||||
<view class="pad-x50">
|
||||
<status-nav-slot>
|
||||
<view slot="leftContent" @tap="goMessage" style="width: 70px;">
|
||||
<view class="home-message-box posir disac">
|
||||
|
@ -10,13 +10,26 @@
|
|||
<view slot="centerContent" class="disjcac">
|
||||
<image style="width: 156rpx;height: 38rpx;" src="/static/public/icom-home-logo.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<view slot="rightContent" class="disac" @tap="callEv">
|
||||
<image class="mar-y10" style="width: 26rpx;height: 26rpx;" src="/static/public/icon-home-phone.png" mode=""></image>
|
||||
<view class="fon26 col3">拨打电话</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5 -->
|
||||
<view slot="rightContent" class="disac" @tap="callEv">
|
||||
<image class="mar-y10" style="width: 26rpx;height: 26rpx;" src="/static/public/icon-home-phone.png" mode=""></image>
|
||||
<view class="fon26 col3">拨打电话</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view slot="rightContent" @tap="goMessage" style="width: 70px;"></view>
|
||||
<!-- #endif -->
|
||||
</status-nav-slot>
|
||||
<!-- <view :style="{paddingTop: statusHeight +'px'}"> -->
|
||||
<!-- banner图 -->
|
||||
<container-subgroup-two>
|
||||
<view slot="content" style="margin: 0 -30rpx;">
|
||||
<image class="width100" src="/static/public/icon-home-banner.png" mode="widthFix"></image>
|
||||
<view class="pad-zy20">
|
||||
<!-- 项目总数、实时故障、公告 -->
|
||||
|
@ -37,7 +50,6 @@
|
|||
<view class="fon24 color6 mar-y20 width100 bleft pad-z20">
|
||||
<lwNotice @dangGao="goNoticeDetail" :list="noticeList" :backgroundColor="'#FFFFFF'"></lwNotice>
|
||||
</view>
|
||||
<!-- <view class="clips1 col3 fon24 pad-z20 bleft">2021年11月06日公司团建,维修服务暂停一天。</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- 客户可见 -->
|
||||
|
@ -204,7 +216,8 @@
|
|||
<image class="flexs mar-z20" :src="item.imgsrc" style="width: 280rpx;height: 160rpx;" mode="aspectFill" lazy-load></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</container-subgroup-two>
|
||||
<!-- 底部tab -->
|
||||
<foot-tab></foot-tab>
|
||||
</view>
|
||||
|
@ -217,12 +230,14 @@
|
|||
// 公告
|
||||
import lwNotice from '@/components/lw-notice/lw-notice.vue';
|
||||
import footTabOne from '@/components/foot-tabs/foot-tab-one.vue';
|
||||
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
|
||||
export default {
|
||||
components:{
|
||||
pitera,
|
||||
statusNavSlot,
|
||||
lwNotice,
|
||||
'foot-tab' :footTabOne
|
||||
'foot-tab' :footTabOne,
|
||||
containerSubgroupTwo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -6,17 +6,17 @@
|
|||
<view class="mar-s20 mar-zy10" style="box-shadow: 0rpx 0rpx 20rpx rgba(0,0,0,.3);">
|
||||
<view class="bacf" style="padding: 4rpx;border-radius: 30rpx;">
|
||||
<view class="electronic-head disjcac fc">
|
||||
<image src="/static/public/icon-electronic-logo.png" mode="widthFix" lazy-load style="width: 347rpx;height: 85rpx;"></image>
|
||||
<view class="colf fon52 mar-sx30" style="letter-spacing: 6rpx;">ID:CW-0000</view>
|
||||
<image :src="userImg" mode="widthFix" lazy-load style="width: 347rpx;height: 85rpx;"></image>
|
||||
<view class="colf fon52 mar-sx30" style="letter-spacing: 6rpx;">ID:{{userId}}</view>
|
||||
<image class="mar-s20" src="/static/deleteImg/flying-img06.png" mode="aspectFill" style="width: 258rpx;height: 258rpx;border-radius: 100%;margin-bottom: -130rpx;border: 6rpx solid #edf1ff;background-color: #edf1ff;"></image>
|
||||
</view>
|
||||
<view class="pad-s140 mar-s30 disjcac fc">
|
||||
<view class="col3 fon68">姓名</view>
|
||||
<view class="fon32 col6 mar-sx30">市场部门 | 技术支持</view>
|
||||
<view class="col3 fon68">{{userName}}</view>
|
||||
<view class="fon32 col6 mar-sx30">{{userContent}}</view>
|
||||
<view class="fon22 col3 tcenter line-h36" style="margin: 60rpx 0 60rpx 0;">
|
||||
<view>+86 123 4567 8910</view>
|
||||
<view>12345678910qwer@890.com</view>
|
||||
<view>WWW.12345678910.com</view>
|
||||
<view>+86 {{userPhone}}</view>
|
||||
<view>{{userEmail}}</view>
|
||||
<view>{{website}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -30,7 +30,13 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
userImg:'/static/public/icon-electronic-logo.png',
|
||||
userId:'CW-0000',
|
||||
userName:'姓名',
|
||||
userContent:'市场部门 | 技术支持',
|
||||
userPhone:'123 4567 8910',
|
||||
userEmail:'12345678910qwer@890.com',
|
||||
website:'WWW.12345678910.com'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="person-btn">提交保存</view>
|
||||
<view class="person-btn" @tap="sumbmitData">提交保存</view>
|
||||
</view>
|
||||
</container-subgroup-two>
|
||||
</view>
|
||||
|
@ -98,9 +98,69 @@
|
|||
e_mail:'', // 电子邮箱
|
||||
id_card_no:'', // 身份证号码
|
||||
imgList:[],
|
||||
flag:true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 提交保存事件
|
||||
sumbmitData(){
|
||||
if(this.checkEmpty()){
|
||||
if(this.flag) {
|
||||
this.flag = false;
|
||||
let params = {
|
||||
a:this.nickname,
|
||||
b:this.full_name,
|
||||
c:this.genderNum,
|
||||
d:this.contact_number,
|
||||
e:this.e_mail,
|
||||
f:this.id_card_no,
|
||||
g:this.imgList[0] || '',
|
||||
h:this.imgList[1] || '',
|
||||
i:this.imgList[2] || '',
|
||||
k:this.imgList[3] || ''
|
||||
}
|
||||
console.log(params,119);
|
||||
// this.$requst.post('',params).then(res=>{
|
||||
// if(res.code){
|
||||
uni.navigateBack({delta:1})
|
||||
// }
|
||||
// })
|
||||
} else {
|
||||
this.$toolAll.tools.showToast('请勿重复提交');
|
||||
}
|
||||
}
|
||||
},
|
||||
// 判断是否为空
|
||||
checkEmpty(){
|
||||
let result = false;
|
||||
if(uni.getStorageSync('type_id')==4) {
|
||||
// 如果是工程师
|
||||
if(!this.nickname) {
|
||||
this.$toolAll.tools.showToast('请输入我的昵称');
|
||||
} else if(!this.full_name) {
|
||||
this.$toolAll.tools.showToast('请输入姓名');
|
||||
} else if(this.$toolAll.tools.isPhone(this.contact_number)) {
|
||||
this.$toolAll.tools.showToast('请正确输入联系电话');
|
||||
} else if(this.$toolAll.tools.isEmail(this.e_mail)) {
|
||||
this.$toolAll.tools.showToast('请正确输入电子邮箱');
|
||||
} else if(this.$toolAll.tools.isIdentity(this.id_card_no)) {
|
||||
this.$toolAll.tools.showToast('请正确输入身份证号码');
|
||||
} else if(!this.imgList[0]) {
|
||||
this.$toolAll.tools.showToast('请上传身份证正反面');
|
||||
} else if(!this.imgList[1]) {
|
||||
this.$toolAll.tools.showToast('请上传意外险材料');
|
||||
} else if(!this.imgList[2]) {
|
||||
this.$toolAll.tools.showToast('请上传合作协议');
|
||||
} else if(!this.imgList[3]) {
|
||||
this.$toolAll.tools.showToast('请上传技能证书');
|
||||
} else {
|
||||
result = true;
|
||||
}
|
||||
} else {
|
||||
result = true;
|
||||
}
|
||||
return result;
|
||||
},
|
||||
// 性别切换
|
||||
chooseGender(index){
|
||||
this.genderNum = index;
|
||||
|
@ -119,12 +179,12 @@
|
|||
from:tempImg[0]
|
||||
}
|
||||
console.log(params,104);
|
||||
// uploadImg(params).then(res=>{
|
||||
// console.log(res);
|
||||
// })
|
||||
uploadImg(params).then(res=>{
|
||||
console.log(res);
|
||||
})
|
||||
// this.$requst.upload('file/upload/image',{file:tempImg[i]}).then(res=>{
|
||||
// if(this.imgArr.length!=9){
|
||||
// this.imgArr.push(this.$http + res.data.src);
|
||||
// // this.imgArr.push(this.$http + res.data.src);
|
||||
// }
|
||||
// if(num==tempImg.length){
|
||||
// this.$toolAll.tools.showToast('上传成功(*^▽^*)')
|
||||
|
|
|
@ -17,15 +17,16 @@
|
|||
</view>
|
||||
<view class="bbot disac pad-sx30 pad-zy30">
|
||||
<view class="mar-y30 flexs disjbac" :style="{width: eareWidth + 'px'}">地 <view>区<text style="color: red;">*</text></view></view>
|
||||
<view class="disjbac width100" @tap="chooseRegion">
|
||||
<view>湖南省株洲市芦淞区</view>
|
||||
<!-- <view class="disjbac width100" @tap="chooseRegion"> -->
|
||||
<view class="disjbac width100" @tap="openPicker">
|
||||
<view>{{region}}</view>
|
||||
<i class="icon icon-next col9" style="font-size: 30rpx;"></i>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bbot disac pad-sx30 pad-zy30">
|
||||
<view class="mar-y30 flexs">详细地址 <text style="color: red;">*</text></view>
|
||||
<view class="disac">
|
||||
<input class="fon28" type="text" placeholder="请输入详细地址" placeholder-style="font-size:28rpx;"/>
|
||||
<input class="fon28" type="text" v-model="detailed_address" placeholder="请输入详细地址" placeholder-style="font-size:28rpx;"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bbot disac pad-sx30 pad-zy30">
|
||||
|
@ -43,12 +44,18 @@
|
|||
</view>
|
||||
</container-subgroup>
|
||||
<!-- 提交保存 -->
|
||||
<view class="person-btn" style="margin-top: -60rpx;">提交保存</view>
|
||||
<view class="person-btn" @tap="submitData" style="margin-top: -60rpx;">提交保存</view>
|
||||
<city @choseVal="choseValue" :lotusAddressData="lotusAddressData"></city>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import city from '@/components/city/city.vue';
|
||||
// import city from '@/components/city/city.js';
|
||||
export default {
|
||||
components:{
|
||||
city
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
personnelStatus:['工作状态','休息状态'],
|
||||
|
@ -57,8 +64,20 @@
|
|||
hoursNum:0,
|
||||
serviceRange:['30KM','80KM','1500KM','其他','其他','其他','其他'],
|
||||
rangeNum:0,
|
||||
lotusAddressData:{
|
||||
visible:false,
|
||||
provinceName:'',
|
||||
cityName:'',
|
||||
townName:'',
|
||||
},
|
||||
region:'湖南省株洲市芦淞区',
|
||||
newProvice:'',
|
||||
newCity:'',
|
||||
newDistrict:'',
|
||||
detailed_address:'',
|
||||
remarkText:'',
|
||||
eareWidth:''
|
||||
eareWidth:'',
|
||||
flag:true
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
|
@ -68,6 +87,40 @@
|
|||
}).exec()
|
||||
},
|
||||
methods: {
|
||||
// 提交保存
|
||||
submitData(){
|
||||
if(this.checkEmpty()) {
|
||||
if(this.flag) {
|
||||
this.flag = false;
|
||||
let params = {
|
||||
a:this.personnelStatus[this.statusNum],
|
||||
b:this.workingHours[this.hoursNum],
|
||||
c:this.region,
|
||||
d:this.detailed_address,
|
||||
f:this.serviceRange[this.rangeNum],
|
||||
g:this.remarkText
|
||||
}
|
||||
console.log(params,87);
|
||||
// this.$requst.post().then(res=>{
|
||||
// if(res.code) {
|
||||
// uni.navigateBack({delta:1})
|
||||
// }
|
||||
// })
|
||||
}
|
||||
}
|
||||
},
|
||||
// 判空事件
|
||||
checkEmpty(){
|
||||
let result = false;
|
||||
if(!this.region) {
|
||||
this.$toolAll.tools.showToast('请选择地区');
|
||||
} else if(!this.detailed_address){
|
||||
this.$toolAll.tools.showToast('请输入详细地址');
|
||||
} else {
|
||||
result = true;
|
||||
}
|
||||
return result;
|
||||
},
|
||||
// 选择地区
|
||||
chooseRegion(){
|
||||
uni.getLocation({
|
||||
|
@ -95,6 +148,53 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
getDistrict() {
|
||||
let ya = this
|
||||
uni.getLocation({
|
||||
success:(res)=> {
|
||||
uni.request({
|
||||
url: `https://apis.map.qq.com/ws/geocoder/v1/?location=${res.latitude},${res.longitude}&key=B2ABZ-SIDKS-WD2O3-6CJ2U-CDZOT-U3FKF`,
|
||||
header: {
|
||||
'Content-Type':'application/json'
|
||||
},
|
||||
success:function(res) {
|
||||
// console.log('地址数据:',res)
|
||||
ya.newProvice = res.data.result.address_component.province
|
||||
ya.newCity = res.data.result.address_component.city
|
||||
ya.newDistrict = res.data.result.address_component.district
|
||||
}
|
||||
})
|
||||
},
|
||||
})
|
||||
},
|
||||
//打开picker
|
||||
openPicker() {
|
||||
this.lotusAddressData.visible = true;
|
||||
this.lotusAddressData.provinceName = this.newProvice;
|
||||
this.lotusAddressData.cityName = this.newCity;
|
||||
this.lotusAddressData.townName = this.newDistrict;
|
||||
},
|
||||
//回传已选的省市区的值
|
||||
choseValue(res){
|
||||
//res数据源包括已选省市区与省市区code
|
||||
// console.log(res);
|
||||
this.lotusAddressData.visible = res.visible;//visible为显示与关闭组件标识true显示false隐藏
|
||||
//res.isChose = 1省市区已选 res.isChose = 0;未选
|
||||
if(res.isChose){
|
||||
this.lotusAddressData.provinceName = res.province;//省
|
||||
this.lotusAddressData.cityName = res.city;//市
|
||||
this.lotusAddressData.townName = res.town;//区
|
||||
this.region = `${res.province}${res.city}${res.town}`; //region为已选的省市区的值
|
||||
this.regionObj = {
|
||||
province:res.province,
|
||||
provinceCode:res.provinceCode,
|
||||
city:res.city,
|
||||
cityCode:res.cityCode,
|
||||
town:res.town,
|
||||
townCode:res.townCode
|
||||
}
|
||||
}
|
||||
},
|
||||
// 人员状态选择
|
||||
chooseStatus(index,num){
|
||||
switch (num){
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 94 KiB |
Loading…
Reference in New Issue