You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

207 lines
5.9 KiB

3 years ago
<template>
<!--pages/release/companyAuth/index.wxml-->
<view class="auth-page">
<view class="company-info-box">
3 years ago
<view class="title-l">请完善资料</view>
<view class="title-s">个人名片</view>
<view class="card-bg acea-row row-center-wrapper"><image src="https://download.cyjyyjy.com/person-card.png" mode=""></image></view>
3 years ago
<view class="form-item acea-row row-between row-middle">
<view class="label">姓名</view>
<view class="inp-box">
<input type="text" :value="form.legalPersonName" @input="inpChange" data-type="name" placeholder="请填写姓名">
</view>
</view>
3 years ago
<view class="form-item acea-row row-between row-middle">
<view class="label">企业名称</view>
<view class="inp-box">
<input type="text" :value="form.enterpriseName" @input="inpChange" data-type="enterpriseName"
placeholder="请填写企业名称">
</view>
</view>
<view class="form-item acea-row row-between row-middle">
<view class="label">职位</view>
<view class="inp-box">
<input type="text" @input="inpChange" data-type="" placeholder="请填写职位">
</view>
</view>
<view class="form-item acea-row row-between row-middle">
<view class="label">邮箱</view>
<view class="inp-box">
<input type="text" @input="inpChange" data-type="" placeholder="请填写邮箱">
</view>
</view>
<view class="form-item acea-row row-between row-middle">
<view class="label">微信</view>
<view class="inp-box">
<input type="text" @input="inpChange" data-type="" placeholder="请填写微信号">
</view>
</view>
<view class="form-item acea-row row-between row-middle">
<view class="label">企业规模</view>
<view class="inp-box">
<picker class="pick-box" @change="" mode="selector">
<view class="picker">{{'请选择'}}</view>
</picker>
</view>
</view>
<view class="form-item acea-row row-between row-middle">
<view class="label">意向领域</view>
<view class="inp-box">
<picker class="pick-box" @change="" mode="selector">
<view class="picker">{{'请选择'}}</view>
</picker>
</view>
</view>
3 years ago
</view>
<view class="submit-btn" @tap="submit">保存并提交</view>
</view>
</template>
<script>
// pages/release/personAuth/index.js
const util = require("../../../utils/util.js");
const app = getApp();
export default {
data() {
return {
form: {
legalPersonName: '',
legalPhone: '',
legalPersonIdcard: '',
idcardPicFront: '',
idcardPicBehind: '',
idcardPicHold: ''
},
isEdit: false
};
},
components: {},
props: {},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
if (options.authInfo) {
let authInfo = JSON.parse(decodeURIComponent(options.authInfo));
this.isEdit = true,
this.form.authorizationType = 2;
this.form.id = authInfo.id;
this.form.idcardPicHold = authInfo.idcardPicHold;
this.form.idcardPicBehind = authInfo.idcardPicBehind;
this.form.idcardPicFront = authInfo.idcardPicFront;
this.form.legalPersonIdcard = authInfo.legalPersonIdcard;
this.form.legalPhone = authInfo.legalPhone || '';
this.form.legalPersonName = authInfo.legalPersonName;
}
},
methods: {
inpChange(e) {
let type = e.currentTarget.dataset.type;
let value = e.detail.value;
if (type == 'name') {
this.setData({//['form.legalPersonName']: value
});
//try fix
this.form.legalPersonName = value;
} else if (type == 'phone') {
this.setData({//.form.legalPhone: value
});
//try fix
this.form.legalPhone = value;
} else if (type == 'idcard') {
this.setData({//.form.legalPersonIdcard: value
});
//try fix
this.form.legalPersonIdcard = value;
}
},
upCard(e) {
let type = e.currentTarget.dataset.type;
util.chooseImages(img => {
if (type == 'f') {
this.setData({//['form.idcardPicFront']: img
});
//try fix
this.form.idcardPicFront = img;
} else if (type == 'b') {
this.setData({//.form.idcardPicBehind: img
});
//try fix
this.form.idcardPicBehind = img;
} else {
this.setData({//.form.idcardPicHold: img
});
//try fix
this.form.idcardPicHold = img;
}
});
},
submit() {
let form = this.form;
if (form.legalPersonName == '') {
uni.showToast({
title: '请填写姓名',
icon: 'none'
});
return;
} else {
if (this.isEdit == false) {
app.http('post', 'EnterpriseAuthentication/createAuthenticInfoOne', this.form).then(res => {
if (res.data.success) {
uni.showModal({
title: '提示!',
content: '提交成功!请等待审核',
success(res) {
uni.navigateBack({
delta: 1
});
}
});
} else {
uni.showToast({
title: res.data.msg,
icon: 'none'
});
}
});
} else {
app.http('post', 'EnterpriseAuthentication/editAuthenticInfo', this.form).then(res => {
if (res.data.success) {
uni.showModal({
title: '提示!',
content: '提交成功!请等待审核',
success(res) {
uni.navigateBack({
delta: 1
});
}
});
} else {
uni.showToast({
title: res.data.msg,
icon: 'none'
});
}
});
}
}
}
}
};
</script>
<style>
/* pages/release/personAuth/index.wxss */
@import "../companyAuth/index.css";
</style>