|
|
|
@ -1,9 +1,10 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<view class="p-root-detail-fellow g_w_all g_bg_page g_kuaishou">
|
|
|
|
<view class="p-root-detail-fellow g_w_all g_bg_page g_kuaishou">
|
|
|
|
<view style="padding-bottom: 200rpx;">
|
|
|
|
<view style="padding-bottom: 200rpx">
|
|
|
|
<AiApply class @outputInfo="getTownsManInfo" />
|
|
|
|
<AiApply class @outputInfo="getTownsManInfo" />
|
|
|
|
<view class="g_h_10"></view>
|
|
|
|
<view class="g_h_10"></view>
|
|
|
|
<g-panel-form-slot :list="[
|
|
|
|
<g-panel-form-slot
|
|
|
|
|
|
|
|
:list="[
|
|
|
|
{
|
|
|
|
{
|
|
|
|
icon: '',
|
|
|
|
icon: '',
|
|
|
|
label: '工友电话',
|
|
|
|
label: '工友电话',
|
|
|
|
@ -16,10 +17,12 @@
|
|
|
|
pColumn: 8,
|
|
|
|
pColumn: 8,
|
|
|
|
require: false,
|
|
|
|
require: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]" @changeMobile="handleClickMobile"></g-panel-form-slot>
|
|
|
|
]"
|
|
|
|
<view class="g_h_10"></view>
|
|
|
|
@changeMobile="handleClickMobile"
|
|
|
|
<g-panel-form-slot
|
|
|
|
></g-panel-form-slot>
|
|
|
|
:list="[
|
|
|
|
<view class="g_h_10"></view>
|
|
|
|
|
|
|
|
<g-panel-form-slot
|
|
|
|
|
|
|
|
:list="[
|
|
|
|
{
|
|
|
|
{
|
|
|
|
icon: '',
|
|
|
|
icon: '',
|
|
|
|
label: '姓名',
|
|
|
|
label: '姓名',
|
|
|
|
@ -94,17 +97,18 @@
|
|
|
|
pColumn: 8,
|
|
|
|
pColumn: 8,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]"
|
|
|
|
]"
|
|
|
|
@changeName="handleClickName"
|
|
|
|
@changeName="handleClickName"
|
|
|
|
@changeSex="handleClickSex"
|
|
|
|
@changeSex="handleClickSex"
|
|
|
|
@changeAge="handleClickAge"
|
|
|
|
@changeAge="handleClickAge"
|
|
|
|
@changeNation="handleClickNation"
|
|
|
|
@changeNation="handleClickNation"
|
|
|
|
@changeIDcard="handleClickIDcard"
|
|
|
|
@changeIDcard="handleClickIDcard"
|
|
|
|
@changeAddress="handleClickAddress"
|
|
|
|
@changeAddress="handleClickAddress"
|
|
|
|
@updateFile="updateFile"
|
|
|
|
@updateFile="updateFile"
|
|
|
|
@updateIDInfo="handlerIDInfo"
|
|
|
|
@updateIDInfo="handlerIDInfo"
|
|
|
|
></g-panel-form-slot>
|
|
|
|
></g-panel-form-slot>
|
|
|
|
<view class="g_h_10"></view>
|
|
|
|
<view class="g_h_10"></view>
|
|
|
|
<g-panel-form-slot :list="[
|
|
|
|
<g-panel-form-slot
|
|
|
|
|
|
|
|
:list="[
|
|
|
|
{
|
|
|
|
{
|
|
|
|
icon: '',
|
|
|
|
icon: '',
|
|
|
|
label: '上传附件',
|
|
|
|
label: '上传附件',
|
|
|
|
@ -114,273 +118,282 @@
|
|
|
|
tip: 'slot-update-file',
|
|
|
|
tip: 'slot-update-file',
|
|
|
|
pColumn: 16,
|
|
|
|
pColumn: 16,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]" @updateFile="updateFile">
|
|
|
|
]"
|
|
|
|
<template v-slot:after>
|
|
|
|
@updateFile="updateFile"
|
|
|
|
<view class="g_flex_row_start g_p_10" v-if="imgList.length > 0">
|
|
|
|
>
|
|
|
|
<view v-for="(item, index) in imgList" class="g_position_rela" :class="index <= 2 ? 'g_mr_18' : ''" :key="index">
|
|
|
|
<template v-slot:after>
|
|
|
|
<i class="iconfont icon-guanbi img-close" @click="delImg(index)"></i>
|
|
|
|
<view class="g_flex_row_start g_p_10" v-if="imgList.length > 0">
|
|
|
|
<image :src="item" class="g_w_56 g_h_56 g_radius_8" />
|
|
|
|
<view v-for="(item, index) in imgList" class="g_position_rela" :class="index <= 2 ? 'g_mr_18' : ''" :key="index">
|
|
|
|
</view>
|
|
|
|
<i class="iconfont icon-guanbi img-close" @click="delImg(index)"></i>
|
|
|
|
</view>
|
|
|
|
<image :src="item" class="g_w_56 g_h_56 g_radius_8" />
|
|
|
|
</template>
|
|
|
|
</view>
|
|
|
|
</g-panel-form-slot>
|
|
|
|
</view>
|
|
|
|
<g-panel-fixed>
|
|
|
|
</template>
|
|
|
|
<slot>
|
|
|
|
</g-panel-form-slot>
|
|
|
|
<view class="g_flex_row_center">
|
|
|
|
<g-panel-fixed>
|
|
|
|
<g-button btnText="取消" class="g_mr_16" size="small" type="default" @clickBtn="goReturn"></g-button>
|
|
|
|
<slot>
|
|
|
|
<g-button btnText="确定" class @clickBtn="handleSubmit" size="small" type="primary"></g-button>
|
|
|
|
<view class="g_flex_row_center">
|
|
|
|
</view>
|
|
|
|
<g-button btnText="取消" class="g_mr_16" size="small" type="default" @clickBtn="goReturn"></g-button>
|
|
|
|
</slot>
|
|
|
|
<g-button btnText="确定" class @clickBtn="handleSubmit" size="small" type="primary"></g-button>
|
|
|
|
</g-panel-fixed>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</slot>
|
|
|
|
</view>
|
|
|
|
</g-panel-fixed>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import AiApply from './components/AiApply.vue'
|
|
|
|
import AiApply from "./components/AiApply.vue";
|
|
|
|
import { nationlist } from '../../utils/nation.js'
|
|
|
|
import { nationlist } from "../../utils/nation.js";
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
components: {
|
|
|
|
AiApply,
|
|
|
|
AiApply,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onReady() {
|
|
|
|
onReady() {
|
|
|
|
this.G.setNavStyle()
|
|
|
|
this.G.setNavStyle();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onShareAppMessage() {
|
|
|
|
onShareAppMessage() {
|
|
|
|
return this.G.shareFun()
|
|
|
|
return this.G.shareFun();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
cdnBaseImg: this.G.store().cdnBaseImg,
|
|
|
|
cdnBaseImg: this.G.store().cdnBaseImg,
|
|
|
|
info: {
|
|
|
|
info: {
|
|
|
|
nation: '汉族',
|
|
|
|
nation: "汉族",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
nation: nationlist.map((item, index) => {
|
|
|
|
nation: nationlist.map((item, index) => {
|
|
|
|
return item.name
|
|
|
|
return item.name;
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
nationIndex: 0,
|
|
|
|
nationIndex: 0,
|
|
|
|
imgList: [],
|
|
|
|
imgList: [],
|
|
|
|
}
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onLoad(options) {
|
|
|
|
watch: {
|
|
|
|
let that = this
|
|
|
|
"info.idCard"() {
|
|
|
|
console.log('快速报名:', options)
|
|
|
|
console.log("this.info.idCard", this.info.idCard);
|
|
|
|
if (options) {
|
|
|
|
if (this.info.idCard.length == 15 || this.info.idCard.length == 18) {
|
|
|
|
if (options.sex) {
|
|
|
|
let info = this.G.getInfoByIDcard(this.info.idCard);
|
|
|
|
options.sex = Number(options.sex)
|
|
|
|
console.log("info info info ", info);
|
|
|
|
} else {
|
|
|
|
this.info.age = info.age;
|
|
|
|
options.sex = 1
|
|
|
|
this.info.sex = info.sex ? (info.sex == "男" ? 1 : 2) : "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (options.nation) {
|
|
|
|
},
|
|
|
|
options.nation = options.nation.indexOf('族') > -1 ? options.nation : options.nation + '族'
|
|
|
|
},
|
|
|
|
} else {
|
|
|
|
onLoad(options) {
|
|
|
|
options.nation = '汉族'
|
|
|
|
let that = this;
|
|
|
|
}
|
|
|
|
console.log("快速报名:", options);
|
|
|
|
this.info = options
|
|
|
|
if (options) {
|
|
|
|
// 民族的回显
|
|
|
|
if (options.sex) {
|
|
|
|
that.nation.forEach((item, index) => {
|
|
|
|
options.sex = Number(options.sex);
|
|
|
|
if (item == that.info.nation) {
|
|
|
|
} else {
|
|
|
|
that.nationIndex = index
|
|
|
|
options.sex = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
if (options.nation) {
|
|
|
|
if (this.info.imgs) {
|
|
|
|
options.nation = options.nation.indexOf("族") > -1 ? options.nation : options.nation + "族";
|
|
|
|
this.imgList = this.info.imgs.split(',')
|
|
|
|
} else {
|
|
|
|
}
|
|
|
|
options.nation = "汉族";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
console.log('获取工友信息:', options)
|
|
|
|
this.info = options;
|
|
|
|
},
|
|
|
|
// 民族的回显
|
|
|
|
onShow() {
|
|
|
|
that.nation.forEach((item, index) => {
|
|
|
|
let that = this
|
|
|
|
if (item == that.info.nation) {
|
|
|
|
// that.nation.forEach((item, index) => {
|
|
|
|
that.nationIndex = index;
|
|
|
|
// if (item == that.info.nation) {
|
|
|
|
}
|
|
|
|
// console.log(that.info.nation);
|
|
|
|
});
|
|
|
|
// console.log(index);
|
|
|
|
if (this.info.imgs) {
|
|
|
|
// that.nationIndex = index;
|
|
|
|
this.imgList = this.info.imgs.split(",");
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// });
|
|
|
|
}
|
|
|
|
// that.speed = 0;
|
|
|
|
console.log("获取工友信息:", options);
|
|
|
|
// setTimeout(() => {
|
|
|
|
},
|
|
|
|
// }, 300);
|
|
|
|
onShow() {
|
|
|
|
},
|
|
|
|
let that = this;
|
|
|
|
created() {
|
|
|
|
// that.nation.forEach((item, index) => {
|
|
|
|
let that = this
|
|
|
|
// if (item == that.info.nation) {
|
|
|
|
},
|
|
|
|
// console.log(that.info.nation);
|
|
|
|
methods: {
|
|
|
|
// console.log(index);
|
|
|
|
getTownsManInfo(info) {
|
|
|
|
// that.nationIndex = index;
|
|
|
|
let that = this
|
|
|
|
// }
|
|
|
|
console.log('info', info)
|
|
|
|
// });
|
|
|
|
that.info = {
|
|
|
|
// that.speed = 0;
|
|
|
|
...info,
|
|
|
|
// setTimeout(() => {
|
|
|
|
index: that.info.index,
|
|
|
|
// }, 300);
|
|
|
|
nation: info.nation + '族',
|
|
|
|
},
|
|
|
|
}
|
|
|
|
created() {
|
|
|
|
},
|
|
|
|
let that = this;
|
|
|
|
handleClickName(e) {
|
|
|
|
},
|
|
|
|
this.info.name = this.info.userName = e
|
|
|
|
methods: {
|
|
|
|
},
|
|
|
|
getTownsManInfo(info) {
|
|
|
|
handleClickSex(e) {
|
|
|
|
let that = this;
|
|
|
|
this.info.sex = e
|
|
|
|
console.log("info", info);
|
|
|
|
},
|
|
|
|
that.info = {
|
|
|
|
handleClickAge(e) {
|
|
|
|
...info,
|
|
|
|
this.info.age = e
|
|
|
|
index: that.info.index,
|
|
|
|
},
|
|
|
|
nation: info.nation + "族",
|
|
|
|
handleClickMobile(e) {
|
|
|
|
};
|
|
|
|
this.info.tel = e
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleClickName(e) {
|
|
|
|
handleClickNation(e) {
|
|
|
|
this.info.name = this.info.userName = e;
|
|
|
|
let that = this
|
|
|
|
},
|
|
|
|
console.log(e.name)
|
|
|
|
handleClickSex(e) {
|
|
|
|
this.info.nation = e.name
|
|
|
|
this.info.sex = e;
|
|
|
|
that.nation.forEach((item, index) => {
|
|
|
|
},
|
|
|
|
if (item == e.name) {
|
|
|
|
handleClickAge(e) {
|
|
|
|
// console.log(that.info.nation)
|
|
|
|
this.info.age = e;
|
|
|
|
// console.log(index)
|
|
|
|
},
|
|
|
|
that.nationIndex = index
|
|
|
|
handleClickMobile(e) {
|
|
|
|
}
|
|
|
|
this.info.tel = e;
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleClickNation(e) {
|
|
|
|
/**
|
|
|
|
let that = this;
|
|
|
|
* 获取上传的身份信息
|
|
|
|
console.log(e.name);
|
|
|
|
*/
|
|
|
|
this.info.nation = e.name;
|
|
|
|
handlerIDInfo(res) {
|
|
|
|
that.nation.forEach((item, index) => {
|
|
|
|
console.log('res', res)
|
|
|
|
if (item == e.name) {
|
|
|
|
let that = this
|
|
|
|
// console.log(that.info.nation)
|
|
|
|
that.info.name = res.info.name
|
|
|
|
// console.log(index)
|
|
|
|
that.info.sex = res.info.sex ? (res.info.sex == '男' ? 1 : 2) : ''
|
|
|
|
that.nationIndex = index;
|
|
|
|
that.info.age = res.info.age
|
|
|
|
}
|
|
|
|
that.info.nation = res.info.nationality + '族'
|
|
|
|
});
|
|
|
|
that.info.idCard = res.info.num
|
|
|
|
},
|
|
|
|
that.info.idCardImageUrl = res.image
|
|
|
|
/**
|
|
|
|
that.info.userName = res.info.name
|
|
|
|
* 获取上传的身份信息
|
|
|
|
that.info.address = res.info.address
|
|
|
|
*/
|
|
|
|
that.nation.forEach((item, index) => {
|
|
|
|
handlerIDInfo(res) {
|
|
|
|
console.log('item1', item)
|
|
|
|
console.log("res", res);
|
|
|
|
console.log('that.info.nation + "族"', that.info.nation + '族')
|
|
|
|
let that = this;
|
|
|
|
if (item == that.info.nation) {
|
|
|
|
that.info.name = res.info.name;
|
|
|
|
console.log('item2', item)
|
|
|
|
that.info.sex = res.info.sex ? (res.info.sex == "男" ? 1 : 2) : "";
|
|
|
|
|
|
|
|
that.info.age = res.info.age;
|
|
|
|
|
|
|
|
that.info.nation = res.info.nationality + "族";
|
|
|
|
|
|
|
|
that.info.idCard = res.info.num;
|
|
|
|
|
|
|
|
that.info.idCardImageUrl = res.image;
|
|
|
|
|
|
|
|
that.info.userName = res.info.name;
|
|
|
|
|
|
|
|
that.info.address = res.info.address;
|
|
|
|
|
|
|
|
that.nation.forEach((item, index) => {
|
|
|
|
|
|
|
|
console.log("item1", item);
|
|
|
|
|
|
|
|
console.log('that.info.nation + "族"', that.info.nation + "族");
|
|
|
|
|
|
|
|
if (item == that.info.nation) {
|
|
|
|
|
|
|
|
console.log("item2", item);
|
|
|
|
|
|
|
|
|
|
|
|
that.nationIndex = index
|
|
|
|
that.nationIndex = index;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
});
|
|
|
|
console.log('that.info', that.info)
|
|
|
|
console.log("that.info", that.info);
|
|
|
|
console.log('that.nationIndex', that.nationIndex)
|
|
|
|
console.log("that.nationIndex", that.nationIndex);
|
|
|
|
that.$forceUpdate()
|
|
|
|
that.$forceUpdate();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 删除图片
|
|
|
|
// 删除图片
|
|
|
|
delImg(ind) {
|
|
|
|
delImg(ind) {
|
|
|
|
this.imgList.splice(
|
|
|
|
this.imgList.splice(
|
|
|
|
this.imgList.findIndex((item, index) => index == ind),
|
|
|
|
this.imgList.findIndex((item, index) => index == ind),
|
|
|
|
1
|
|
|
|
1
|
|
|
|
)
|
|
|
|
);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 上传图片
|
|
|
|
// 上传图片
|
|
|
|
updateFile(e) {
|
|
|
|
updateFile(e) {
|
|
|
|
let that = this
|
|
|
|
let that = this;
|
|
|
|
if (that.imgList.length < 4) {
|
|
|
|
if (that.imgList.length < 4) {
|
|
|
|
that.imgList.push(e)
|
|
|
|
that.imgList.push(e);
|
|
|
|
uni.hideLoading()
|
|
|
|
uni.hideLoading();
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
uni.showToast({
|
|
|
|
uni.showToast({
|
|
|
|
title: '最多只能上传4张',
|
|
|
|
title: "最多只能上传4张",
|
|
|
|
icon: 'none',
|
|
|
|
icon: "none",
|
|
|
|
})
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleClickIDcard(e) {
|
|
|
|
handleClickIDcard(e) {
|
|
|
|
this.info.idCard = e
|
|
|
|
this.info.idCard = e;
|
|
|
|
if (this.info.idCard.length == 15 || this.info.idCard.length == 18) {
|
|
|
|
console.log("eeeeee", this.info.idCard);
|
|
|
|
let info = this.G.getInfoByIDcard(this.info.idCard)
|
|
|
|
|
|
|
|
this.info.age = info.age
|
|
|
|
|
|
|
|
this.info.sex = info.sex ? (info.sex == '男' ? 1 : 2) : ''
|
|
|
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// console.log(this.G.getInfoByIDcard(this.info.idCard));
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handleClickAddress(e) {
|
|
|
|
|
|
|
|
this.info.address = e
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
goReturn() {
|
|
|
|
|
|
|
|
uni.navigateBack()
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handleSubmit() {
|
|
|
|
|
|
|
|
let that = this
|
|
|
|
|
|
|
|
console.log('that.info.imgs', that.info.imgs)
|
|
|
|
|
|
|
|
console.log('that.imgList', that.imgList)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!that.info.name) {
|
|
|
|
// console.log(this.G.getInfoByIDcard(this.info.idCard));
|
|
|
|
uni.showToast({
|
|
|
|
},
|
|
|
|
icon: 'none',
|
|
|
|
handleClickAddress(e) {
|
|
|
|
title: '请输入姓名',
|
|
|
|
this.info.address = e;
|
|
|
|
})
|
|
|
|
},
|
|
|
|
return false
|
|
|
|
goReturn() {
|
|
|
|
}
|
|
|
|
uni.navigateBack();
|
|
|
|
if (!that.info.tel && !that.info.idCard) {
|
|
|
|
},
|
|
|
|
uni.showToast({
|
|
|
|
handleSubmit() {
|
|
|
|
icon: 'none',
|
|
|
|
let that = this;
|
|
|
|
title: '请至少输入手机号或者身份证号',
|
|
|
|
console.log("that.info.imgs", that.info.imgs);
|
|
|
|
})
|
|
|
|
console.log("that.imgList", that.imgList);
|
|
|
|
return false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (that.info.tel && !that.G.setReg(that.info.tel, 'tel')) {
|
|
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
|
|
icon: 'none',
|
|
|
|
|
|
|
|
title: '请输入正确的手机号',
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (that.info.idCard && !that.G.isValidIdCard(that.info.idCard)) {
|
|
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
|
|
icon: 'none',
|
|
|
|
|
|
|
|
title: '请输入正确的身份证号',
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(that.info)
|
|
|
|
if (!that.info.name) {
|
|
|
|
if (that.imgList.length > 0) {
|
|
|
|
uni.showToast({
|
|
|
|
that.info.imgs = that.imgList
|
|
|
|
icon: "none",
|
|
|
|
}
|
|
|
|
title: "请输入姓名",
|
|
|
|
console.log('that.info.imgs', that.info.imgs)
|
|
|
|
});
|
|
|
|
uni.$emit('getTownsman', { info: that.info })
|
|
|
|
return false;
|
|
|
|
uni.navigateBack()
|
|
|
|
}
|
|
|
|
},
|
|
|
|
if (!that.info.tel && !that.info.idCard) {
|
|
|
|
handleClickInfo() {
|
|
|
|
uni.showToast({
|
|
|
|
let that = this
|
|
|
|
icon: "none",
|
|
|
|
that.G.uploadImg((res) => {
|
|
|
|
title: "请至少输入手机号或者身份证号",
|
|
|
|
console.log('res', res)
|
|
|
|
});
|
|
|
|
that.info.name = res.info.name || ''
|
|
|
|
return false;
|
|
|
|
that.info.sex = res.info.sex ? (res.info.sex == '男' ? 1 : 2) : ''
|
|
|
|
}
|
|
|
|
that.info.age = res.info.age || ''
|
|
|
|
if (that.info.tel && !that.G.setReg(that.info.tel, "tel")) {
|
|
|
|
that.info.nation = res.info.nationality || ''
|
|
|
|
uni.showToast({
|
|
|
|
that.info.idCard = res.info.num || ''
|
|
|
|
icon: "none",
|
|
|
|
that.info.idCardImageUrl = res.image || ''
|
|
|
|
title: "请输入正确的手机号",
|
|
|
|
that.info.userName = res.info.name || ''
|
|
|
|
});
|
|
|
|
that.info.address = res.info.address || ''
|
|
|
|
return false;
|
|
|
|
that.nation.forEach((item, index) => {
|
|
|
|
}
|
|
|
|
if (item == that.info.nation) {
|
|
|
|
if (that.info.idCard && !that.G.isValidIdCard(that.info.idCard)) {
|
|
|
|
that.nationIndex = index
|
|
|
|
uni.showToast({
|
|
|
|
}
|
|
|
|
icon: "none",
|
|
|
|
})
|
|
|
|
title: "请输入正确的身份证号",
|
|
|
|
that.$forceUpdate()
|
|
|
|
});
|
|
|
|
}, 'idcard')
|
|
|
|
return false;
|
|
|
|
},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
}
|
|
|
|
console.log(that.info);
|
|
|
|
|
|
|
|
if (that.imgList.length > 0) {
|
|
|
|
|
|
|
|
that.info.imgs = that.imgList;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
console.log("that.info.imgs", that.info.imgs);
|
|
|
|
|
|
|
|
uni.$emit("getTownsman", { info: that.info });
|
|
|
|
|
|
|
|
uni.navigateBack();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handleClickInfo() {
|
|
|
|
|
|
|
|
let that = this;
|
|
|
|
|
|
|
|
that.G.uploadImg((res) => {
|
|
|
|
|
|
|
|
console.log("res", res);
|
|
|
|
|
|
|
|
that.info.name = res.info.name || "";
|
|
|
|
|
|
|
|
that.info.sex = res.info.sex ? (res.info.sex == "男" ? 1 : 2) : "";
|
|
|
|
|
|
|
|
that.info.age = res.info.age || "";
|
|
|
|
|
|
|
|
that.info.nation = res.info.nationality || "";
|
|
|
|
|
|
|
|
that.info.idCard = res.info.num || "";
|
|
|
|
|
|
|
|
that.info.idCardImageUrl = res.image || "";
|
|
|
|
|
|
|
|
that.info.userName = res.info.name || "";
|
|
|
|
|
|
|
|
that.info.address = res.info.address || "";
|
|
|
|
|
|
|
|
that.nation.forEach((item, index) => {
|
|
|
|
|
|
|
|
if (item == that.info.nation) {
|
|
|
|
|
|
|
|
that.nationIndex = index;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
that.$forceUpdate();
|
|
|
|
|
|
|
|
}, "idcard");
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
<style>
|
|
|
|
.img-close {
|
|
|
|
.img-close {
|
|
|
|
position: absolute;
|
|
|
|
position: absolute;
|
|
|
|
width: 18px;
|
|
|
|
width: 18px;
|
|
|
|
height: 18px;
|
|
|
|
height: 18px;
|
|
|
|
right: -6px;
|
|
|
|
right: -6px;
|
|
|
|
top: -6px;
|
|
|
|
top: -6px;
|
|
|
|
z-index: 99;
|
|
|
|
z-index: 99;
|
|
|
|
background-color: #666;
|
|
|
|
background-color: #666;
|
|
|
|
color: #fff;
|
|
|
|
color: #fff;
|
|
|
|
font-size: 8px;
|
|
|
|
font-size: 8px;
|
|
|
|
text-align: center;
|
|
|
|
text-align: center;
|
|
|
|
line-height: 18px;
|
|
|
|
line-height: 18px;
|
|
|
|
border-radius: 50%;
|
|
|
|
border-radius: 50%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
|