|
@@ -57,8 +57,11 @@
|
|
|
<text class="title">籍贯</text>
|
|
|
</view>
|
|
|
<view class="right flex">
|
|
|
- <input class="input" v-model="updata.ancestral_place" type="text" placeholder="请填写籍贯"
|
|
|
- placeholder-class="placeholder" />
|
|
|
+ <pickerAddress @change="changeAncestralPlace">
|
|
|
+ {{
|
|
|
+ updata.ancestral_place||'请选择籍贯'
|
|
|
+ }}
|
|
|
+ </pickerAddress>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="flex listItem">
|
|
@@ -66,8 +69,11 @@
|
|
|
<text class="title">学历</text>
|
|
|
</view>
|
|
|
<view class="right flex">
|
|
|
- <input class="input" v-model="updata.education" type="text" placeholder="请填写学历"
|
|
|
- placeholder-class="placeholder" />
|
|
|
+ <picker class="input" :range='educationList' mode="selector" @change="changeEducation">
|
|
|
+ <view>
|
|
|
+ {{updata.education||'选择学历'}}
|
|
|
+ </view>
|
|
|
+ </picker>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="flex listItem">
|
|
@@ -303,10 +309,11 @@
|
|
|
type: 0, //0为新增,1为修改2为商品页进入注册
|
|
|
userModelData: {}, //保存获取的用户模板
|
|
|
modelid: '', //保存要预览的模板id
|
|
|
+ educationList: ['小学', '初中', '高中', '大专', '本科', '研究生', '博士'] //学历列表
|
|
|
};
|
|
|
},
|
|
|
async onLoad(options) {
|
|
|
- this.modelid = options.modelid
|
|
|
+ this.modelid = options.modelid
|
|
|
if (options.type == 1) {
|
|
|
this.type = 1;
|
|
|
await this.getUserCardInfo()
|
|
@@ -322,6 +329,11 @@
|
|
|
...mapState(['baseURL']),
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 选择学历
|
|
|
+ changeEducation(res) {
|
|
|
+ this.updata.education = this.educationList[res.detail.value];
|
|
|
+ console.log(res);
|
|
|
+ },
|
|
|
// 初始化
|
|
|
init() {
|
|
|
const that = this;
|
|
@@ -356,7 +368,7 @@
|
|
|
for (let a = 0; a < that.typeList.length; a++) {
|
|
|
if (+that.typeList[a].id == +that.userModelData.service_project_ar[i].id) {
|
|
|
that.typeList[a].checked = true;
|
|
|
- that.updata.checkedType.push(''+that.typeList[a].id)
|
|
|
+ that.updata.checkedType.push('' + that.typeList[a].id)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -393,17 +405,17 @@
|
|
|
// 跳转查看预览页面
|
|
|
look() {
|
|
|
const that = this;
|
|
|
- if(!that.rendl()){
|
|
|
+ if (!that.rendl()) {
|
|
|
return
|
|
|
}
|
|
|
const birthday = IdCard('' + that.updata.cardId, 1);
|
|
|
// 复制选中的服务数组
|
|
|
let arr = [...that.updata.checkedType]
|
|
|
- let pushar=[];
|
|
|
+ let pushar = [];
|
|
|
that.typeList.forEach(
|
|
|
(re) => {
|
|
|
for (let i = 0; i < arr.length; i++) {
|
|
|
- console.log(arr[i],'循环');
|
|
|
+ console.log(arr[i], '循环');
|
|
|
if (+arr[i] == +re.id) {
|
|
|
// 删除已选中的对象
|
|
|
arr.splice(i, 1)
|
|
@@ -413,7 +425,7 @@
|
|
|
}
|
|
|
}
|
|
|
)
|
|
|
-
|
|
|
+
|
|
|
let data = {
|
|
|
name: that.updata.name,
|
|
|
avatar: that.updata.avatar,
|
|
@@ -438,10 +450,10 @@
|
|
|
service_project_ar: pushar,
|
|
|
is_type_audit: 1
|
|
|
}
|
|
|
- uni.setStorageSync('modeldata',data)
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ uni.setStorageSync('modeldata', data)
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/user/model/model?mtype=' + that.modelid + '&look=2'
|
|
|
})
|
|
@@ -510,6 +522,12 @@
|
|
|
this.updata.time = time.detail.value;
|
|
|
console.log(time);
|
|
|
},
|
|
|
+ // 选择籍贯
|
|
|
+ changeAncestralPlace({
|
|
|
+ data
|
|
|
+ }) {
|
|
|
+ this.updata.ancestral_place = data[2];
|
|
|
+ },
|
|
|
// 选择省市区
|
|
|
onCityClick({
|
|
|
data
|
|
@@ -653,7 +671,7 @@
|
|
|
// 实名认证
|
|
|
confirm(e) {
|
|
|
const that = this;
|
|
|
- if(!that.rendl()){
|
|
|
+ if (!that.rendl()) {
|
|
|
return
|
|
|
}
|
|
|
that.loding = true;
|
|
@@ -689,7 +707,7 @@
|
|
|
});
|
|
|
},
|
|
|
// 认证
|
|
|
- rendl(){
|
|
|
+ rendl() {
|
|
|
const that = this;
|
|
|
if (!that.updata.avatar) {
|
|
|
uni.showModal({
|
|
@@ -699,7 +717,7 @@
|
|
|
});
|
|
|
return false
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (!that.updata.name) {
|
|
|
uni.showModal({
|
|
|
title: '错误',
|