Commit 199d91ea authored by 李明环(东信)'s avatar 李明环(东信)
parents a8ff795e 4a87c057
......@@ -9,10 +9,10 @@ export const xinhuaMpLogin = params => instance.post("/user/appUser/xinhua/mpLog
// B端-获取登录用户
export const getLoginUserApi = params => instance.post("/b/user/getLoginUser", params);
// 保存用户信息
export const saveBasicInfoApi = params => instance.post("/company/user/saveBasicInfo", params);
export const saveBasicInfoApi = params => instance.post("/b/user/save", params);
// 注册企业信息
export const registerCompanyApi = params => instance.post("/company/register", params);
export const registerCompanyApi = params => instance.post("/b/company/register", params);
// 重新注册企业信息
export const resubmitCompanyApi = params => instance.post("/company/register/resubmit", params);
......@@ -25,7 +25,7 @@ export const getApplicationListApi = params => instance.post("/job/getApplicatio
export const getInterviewListApi = params => instance.post("/job/getInterviewList", params);
// 获取公司信息及审核信息
export const getCompanyInfoApi = params => instance.post("/company/get", params);
export const getCompanyInfoApi = params => instance.post("/b/company/info", params);
// 保存企业信息
export const saveCompanyInfoApi = params => instance.post("/company/save", params);
//企业申诉
......@@ -42,6 +42,10 @@ export const appealInfo = params => instance.post("/company/appeal/info", params
//营业执照ocr
export const ocrLicense = params => instance.postForm("/ocr/license", params);
//检查企业是否存在
export const companyCheck = params => instance.post("/b/company/check", params);
//获取用户审核或申诉信息
export const companyReviewInfo = params => instance.post("/b/company/review/info", params);
//根据id获取反馈信息
export const feedbackById = params => instance.post(`/feedback/${params}`);
......@@ -23,20 +23,27 @@ const login = async () => {
setToken(loginRes.data);
const userInfoRes = await getLoginUserApi();
// 已经判断是否注册过企业
if (userInfoRes.data) {
uni.switchTab({
url: "/pages/user/index"
});
const { status } = userInfoRes.data;
console.log("status", typeof status);
switch (status) {
case 0:
uni.navigateTo({
url: `/pages/user/businessLicense/fillIn`
});
break;
default:
uni.switchTab({
url: "/pages/user/index"
});
break;
}
} else {
uni.navigateTo({
url: "/pages/user/businessLicense/fillIn"
url: `/pages/user/businessLicense/fillIn`
});
}
} else {
uni.showToast({
title: loginRes.message
});
}
};
</script>
......
......@@ -35,7 +35,7 @@
<div class="item">
<p class="label">姓名<text class="red">*</text></p>
<input type="text" v-model="params.realName" placeholder="请输入姓名" />
<input type="text" v-model="params.name" placeholder="请输入姓名" />
</div>
<div class="item">
<p class="label">职位<text class="red">*</text></p>
......@@ -97,52 +97,77 @@
import { ref } from "vue";
import evn from "@/utils/config";
import { uploadFiles } from "@/utils/fileUpload";
import { ocrLicense, getLoginUserApi } from "@/api/user.js";
import { validateForm } from "@/utils/utils";
import { ocrLicense, getLoginUserApi, saveBasicInfoApi } from "@/api/user.js";
import { useDefineStore } from "./store";
const pinias = useDefineStore();
const params = reactive({
avatarPath: "",
realName: "",
name: "",
phone: "",
position: ""
});
onLoad(() => {
console.log(uni);
});
const step = ref(0);
const step = ref(1);
const name = ref("");
const showPopout = ref(true);
const showPopout = ref(false);
onShow(() => {
step.value = 0;
// getLoginUserApiFn();
step.value = 1;
getLoginUserApiFn();
});
function ocrLicenseFn(uri) {
return ocrLicense({ uri }).then(res => {
if (res.code == 200) {
pinias.setFormDataKey("name", res.data.name);
pinias.setFormDataKey("creditCode", res.data.regNum);
pinias.setFormDataKey("location", res.data.address);
}
});
}
function getLoginUserApiFn() {
getLoginUserApi().then(user => {
if (user.code == 200 && user.data) {
const { avatarPath, name, phone, position } = user.data;
params.avatarPath = avatarPath;
params.name = name;
params.phone = phone;
params.position = position;
if (name) {
step.value = 3;
}
}
});
}
// function getLoginUserApiFn() {
// getLoginUserApi().then(user => {
// if (user.code == 200) {
// const { avatarPath, realName, phone, position } = user.data;
// params.avatarPath = avatarPath;
// params.realName = realName;
// params.phone = phone;
// params.position = position;
// }
// console.log("user", user);
// });
// }
/**
* 保存用户信息
*/
function saveBasicInfoApiFn() {
xma.showLoading({
title: "提交中...",
mask: true
});
if (validateForm(params, ["avatarPath", "name", "phone", "position"])) {
return saveBasicInfoApi(params).then(res => {
xma.hideLoading();
if (res.code == 200) {
step.value = 3;
return false;
} else {
return true;
}
});
} else {
return true;
}
}
const nextStep = () => {
let flag = false;
switch (step.value) {
case 1:
if (!pinias.formData.name) flag = true;
flag = saveBasicInfoApiFn();
break;
case 2:
if (!pinias.formData.creditCode) flag = true;
......@@ -162,7 +187,6 @@ const nextStep = () => {
});
return;
}
step.value++;
};
/* 选择图片 */
const chooseImage = sourceType => {
......@@ -171,9 +195,13 @@ const chooseImage = sourceType => {
count: 1,
success: async ({ tempFiles }) => {
const res = await uploadFiles(tempFiles);
pinias.setFormDataKey("licensePath", res[0].key);
ocrLicenseFn(res[0].key);
showPopout.value = false;
if (step.value == 1) {
params.avatarPath = res[0].key;
} else {
pinias.setFormDataKey("licensePath", res[0].key);
ocrLicenseFn(res[0].key);
showPopout.value = false;
}
}
});
};
......
......@@ -6,6 +6,7 @@ export const useDefineStore = defineStore("useDefineStore", ()=>{
name: "",
creditCode: "",
licensePath: "",
location:"",
licenseValidityPeriod: ""
})
function setFormDataKey(key, data) {
......
......@@ -2,22 +2,46 @@
<div class="page">
<NavBar backgroundBox="#FFFFFF" :showIcon="true" :showTitle="true" title="企业信息"></NavBar>
<view class="image-wrap">
<image v-if="formData.licensePath" :src="evn.APP_IMAGE_BASE_API + formData.licensePath" mode="" />
<image v-if="pinias.formData.licensePath" :src="evn.APP_IMAGE_BASE_API + pinias.formData.licensePath" mode="" />
<view>注:接受拍摄复印件,黑白复印需要加盖公章,大小不超过10M</view>
</view>
<view class="content-wrap">
<view class="item">
<view class="label"> 企业全称 </view>
<view class="content">
{{ formData.name }}
{{ pinias.formData.name }}
</view>
</view>
<view class="item">
<view class="label"> 信用代码 </view>
<view class="content">
{{ formData.creditCode }}
{{ pinias.formData.creditCode }}
</view>
</view>
<view class="item">
<view class="label"> 公司地址 </view>
<view class="content">
{{ pinias.formData.location }}
</view>
</view>
<view class="item">
<view class="label"> 是否人资机构 </view>
<view class="content">
<wd-radio-group v-model="pinias.formData.licenseValidityPeriod" shape="dot" inline>
<wd-radio value="true"></wd-radio>
<wd-radio value=""></wd-radio>
</wd-radio-group>
</view>
</view>
<view class="image-upload">
<image
v-if="pinias.formData.licenseValidityPeriod"
@click="chooseImage('album')"
src="@/static/image/businessLicense/businessLicenseUpload2.png"
mode=""
/>
<image v-else :src="evn.APP_IMAGE_BASE_API + pinias.formData.licenseValidityPeriod" mode="" />
</view>
<!-- <view class="item">
<view class="label"> 有效期 </view>
<view class="content">
......@@ -30,7 +54,7 @@
<view class="item">
<view class="label"> 日期 </view>
<wd-calendar
v-model="formData.licenseValidityPeriod"
v-model="pinias.formData.licenseValidityPeriod"
:disabled="radio == 1"
:min-date="new Date().getTime()"
:max-date="new Date('2059/01/01').getTime()"
......@@ -38,17 +62,22 @@
>
<view :class="`content ${radio == 1 ? 'disabled' : ''}`">
{{
(formData.licenseValidityPeriod && dayjs(formData.licenseValidityPeriod).format("YYYY-MM-DD")) ||
(pinias.formData.licenseValidityPeriod && dayjs(pinias.formData.licenseValidityPeriod).format("YYYY-MM-DD")) ||
"请选择"
}}
</view>
</wd-calendar>
</view> -->
</view>
<view class="btn-wrap">
<button class="bottom-btn" @tap="submit">提交</button>
</view>
<wd-tabbar
@tap="submit"
custom-style="display: flex;justify-content: center !important;z-index:1;"
fixed
placeholder
safeAreaInsetBottom
>
<view class="foot-btn">提交审核</view>
</wd-tabbar>
<!-- 申请错误 -->
<!-- <van-popup show="{{ showSubmitError }}" custom-style="border-radius:12rpx">
......@@ -90,11 +119,11 @@
import evn from "@/utils/config";
import { useDefineStore } from "./store";
import { ref } from "vue";
import dayjs from "dayjs";
import { registerCompanyApi } from "@/api/user";
const { formData, setFormDataKey } = useDefineStore();
import { registerCompanyApi, companyCheck } from "@/api/user";
const pinias = useDefineStore();
const show = ref(false);
// console.log(formData);
// console.log(pinias.formData);
const id = ref("");
const name = ref("");
const radio = ref(1);
......@@ -103,35 +132,43 @@ const navigateTo = url => {
url
});
};
/* 选择图片 */
const chooseImage = sourceType => {
uni.chooseImage({
sourceType: [sourceType],
count: 1,
success: async ({ tempFiles }) => {
const res = await uploadFiles(tempFiles);
pinias.setFormDataKey("licenseValidityPeriod", res[0].key);
}
});
};
const submit = () => {
const params = { ...formData };
if (radio.value == 1) {
params.licenseValidityPeriod = "2099-12-31";
}
registerCompanyApi(params).then(res => {
if (res.code == 200) {
// 被占用
if (res.data) {
name.value = res.data.name;
id.value = res.data.id;
show.value = true;
} else {
// 正常
uni.showToast({
title: "提交成功",
icon: "none"
const params = { ...pinias.formData };
const { name, creditCode } = pinias.formData;
companyCheck({ name, creditCode }).then(company => {
if (company.code == 200) {
if (!company.data) {
xma.showLoading({
title: "提交中...",
mask: true
});
uni.switchTab({
url: "/pages/user/index"
registerCompanyApi(params).then(res => {
xma.hideLoading();
if (res.code == 200) {
uni.switchTab({
url: "/pages/user/index"
});
}
});
} else {
show.value = true;
id.value = company.data.id;
name.value = company.data.name;
}
} else {
uni.showToast({
title: res.message,
icon: "error"
});
}
});
return;
};
</script>
......@@ -139,7 +176,6 @@ const submit = () => {
.page {
display: flex;
flex-direction: column;
height: 100%;
}
.image-wrap {
padding: 32rpx;
......@@ -163,6 +199,7 @@ const submit = () => {
display: flex;
padding: 32rpx 0;
border-bottom: 2rpx solid #f3f4f8;
align-items: center;
.label {
flex: 0 0 184rpx;
font-size: 24rpx;
......@@ -175,6 +212,7 @@ const submit = () => {
color: #1b2026;
.van-radio-group {
display: flex;
align-items: center;
gap: 30rpx;
}
}
......@@ -182,6 +220,27 @@ const submit = () => {
color: #cccccc;
}
}
.image-upload {
.t2 {
margin-top: 16rpx;
}
image {
width: 686rpx;
height: 386rpx;
margin-top: 84rpx;
}
}
}
.foot-btn {
position: fixed;
display: flex;
align-items: center;
justify-content: center;
width: 622rpx;
height: 80rpx;
color: #ffffff;
background: #1f86ff;
border-radius: 12rpx;
}
.btn-wrap {
padding: 16rpx 0;
......
......@@ -12,7 +12,7 @@
</div>
<div class="item">
<p class="label">姓名</p>
<input type="text" v-model="params.realName" placeholder="请输入姓名" />
<input type="text" v-model="params.name" placeholder="请输入姓名" />
</div>
<div class="item">
<p class="label">职位</p>
......@@ -41,7 +41,7 @@ import { uploadFiles } from "@/utils/fileUpload";
import { saveBasicInfoApi, getLoginUserApi } from "@/api/user";
const params = reactive({
avatarPath: "",
realName: "",
name: "",
phone: "",
position: ""
});
......@@ -49,9 +49,9 @@ const params = reactive({
getLoginUserApi().then(res => {
console.log(res);
if (res.code == 200) {
const { avatarPath, realName, phone, position } = res.data;
const { avatarPath, name, phone, position } = res.data;
params.avatarPath = avatarPath;
params.realName = realName;
params.name = name;
params.phone = phone;
params.position = position;
}
......
......@@ -62,7 +62,7 @@
<script setup>
import navBar from "@/components/navBar/index.vue";
import { getLoginUserApi, getCompanyInfoApi, appealInfo } from "@/api/user";
import { getLoginUserApi, getCompanyInfoApi, appealInfo, companyReviewInfo } from "@/api/user";
import { getEnumText } from "@/utils/utils";
import { ref, reactive } from "vue";
import evn from "@/utils/config.js";
......@@ -129,6 +129,17 @@ const appealInfoFn = () => {
}
});
};
const companyReviewInfoFn = () => {
companyReviewInfo().then(res => {
if (res.data.status == 2) {
navList[0].url = "/pages/user/myCompany/index?status=3";
navList[0].subText = "审核不通过";
} else if (res.data.status == 0) {
navList[0].subText = res.data.companyName;
navList[0].url = "/pages/user/myCompany/index";
}
});
};
/* 获取用户信息 */
const getUserInfo = async () => {
const userRes = await getLoginUserApi();
......@@ -139,31 +150,57 @@ const getUserInfo = async () => {
id.value = userRes.data.companyId;
}
const { status } = userRes.data;
if (status !== 1) {
uni.hideTabBar();
if (status == 2) {
// 代表添加了申述信息,需要查看申述状态,调用申诉信息接口
appealInfoFn();
} else if (status == 3) {
switch (status) {
case 1:
navList[0].subText = userRes.data.companyName;
avList[0].url = "/pages/user/myCompany/index?status=1";
break;
case 2:
navList[0].subText = "审核中";
navList[0].url = "/pages/user/myCompany/index?status=2";
companyReviewInfoFn();
break;
case 3:
navList[0].subText = "申诉中";
navList[0].url = "/pages/user/businessLicense/appeal";
companyReviewInfoFn();
break;
case 4:
navList[0].subText = "企业信息失效";
show.value = true;
// 代表账号所关联的企业被申述解除关联
}
}
if (status == 1 || status == 4) {
show.value = false;
const companyRes = await getCompanyInfoApi();
if (companyRes.code == 200) {
let type = companyRes.data.companyAudit.status;
if (type != 1) {
navList[0].subText = await getEnumText("EnumAuditStatus", type);
navList[0].url = "/pages/user/myCompany/index";
navList[0].auditStatus = type;
uni.hideTabBar();
} else {
uni.showTabBar();
}
}
break;
case 5:
// 账号长时间未登录 弹窗申诉
show.value = true;
break;
default:
break;
}
// if (status !== 1) {
// uni.hideTabBar();
// if (status == 2) {
// // 代表添加了申述信息,需要查看申述状态,调用申诉信息接口
// appealInfoFn();
// } else if (status == 3) {
// show.value = true;
// // 代表账号所关联的企业被申述解除关联
// }
// }
// if (status == 1 || status == 4) {
// show.value = false;
// const companyRes = await getCompanyInfoApi();
// if (companyRes.code == 200) {
// let type = companyRes.data.companyAudit.status;
// if (type != 1) {
// navList[0].subText = await getEnumText("EnumAuditStatus", type);
// navList[0].url = "/pages/user/myCompany/index";
// navList[0].auditStatus = type;
// uni.hideTabBar();
// } else {
// uni.showTabBar();
// }
// }
// }
};
onShow(() => {
getUserInfo();
......
......@@ -34,6 +34,7 @@ const { title, border, arrow } = defineProps({
.form-title {
width: 200rpx;
font-size: 24rpx;
text-wrap: nowrap;
font-weight: normal;
color: #77818f;
}
......
......@@ -5,43 +5,48 @@
<div class="top">
<img v-if="params.logoPath" :src="evn.APP_IMAGE_BASE_API + params.logoPath" @click="chooseImage" />
<img v-else src="@/static/image/temp/defaultCompany.png" alt="" @click="chooseImage" />
<div class="name">{{ companyInfo.name }}</div>
<div class="name">{{ companyInfo.companyName }}</div>
<formItem style="margin-top: 80rpx" title="营业执照" arrow :border="false" @click="jupmLicenseInfo">
<p :class="`status${companyInfo.companyAudit?.status}`">{{ auditStatus }}</p>
</formItem>
</div>
<div class="form-wrap">
<formItem title="企业简称">
<input type="text" v-model="params.nameAbbreviation" placeholder="请输入企业简称" />
<!-- <formItem title="企业名称">
<input type="text" v-model="params.companyName" placeholder="请输入企业名称" />
</formItem> -->
<formItem title="行业分类" v-if="[1].includes(pageStatus)">
<p style="color: #77818f">{{ companyInfo.industryCategory }}</p>
</formItem>
<formItem title="信用代码">
<p style="color: #77818f">{{ companyInfo.creditCode }}</p>
</formItem>
<formItem title="公司所在地" arrow>
<formItem title="公司地址" arrow>
<wd-col-picker
v-model="cityValue"
:columns="cityOpstion"
:disabled="![1, 3].includes(pageStatus)"
value-key="code"
label-key="name"
:column-change="columnChangeCity"
@confirm="handleConfirmCity"
use-default-slot
>
<p :class="{ placeholder: !cityText }" class="text-single">{{ cityText || "请选择公司所在地" }}</p>
<p :class="{ placeholder: !params.location }" class="text-single">
{{ params.location || "请选择公司所在地" }}
</p>
</wd-col-picker>
</formItem>
<formItem title="行业分类">
<p style="color: #77818f">{{ companyInfo.industryCategory }}</p>
</formItem>
<formItem title="详细地址">
<input type="text" placeholder="请输入详细地址" v-model="params.address" />
</formItem>
<div class="textarea-wrap">
<div class="textarea-wrap" v-if="[1].includes(pageStatus)">
<p class="label">公司介绍</p>
<textarea maxlength="500" placeholder="请输入公司介绍" v-model="params.companyIntro" />
</div>
</div>
</div>
<wd-tabbar
v-if="[1, 3].includes(pageStatus)"
@click="submit"
custom-style="display: flex;justify-content: center !important;"
custom-style="display: flex;justify-content: center !important;z-index:1;"
fixed
placeholder
safeAreaInsetBottom
......@@ -54,50 +59,72 @@
<script setup>
import { reactive, ref } from "vue";
import formItem from "./formItem.vue";
import { getCompanyInfoApi, saveCompanyInfoApi } from "@/api/user";
import { getCompanyInfoApi, saveCompanyInfoApi, companyReviewInfo } from "@/api/user";
import { getTreeListApi } from "@/api/common";
import { uploadFiles } from "@/utils/fileUpload";
import { getEnumText } from "@/utils/utils";
import evn from "@/utils/config";
import { useCompanyInfoStore } from "./companyInfo";
const params = reactive({
id: 0,
logoPath: "",
nameAbbreviation: "",
companyName: "",
provinceCode: "",
provinceName: "",
cityCode: "",
cityName: "",
districtCode: "",
districtName: "",
address: "",
creditCode: "",
location: "",
companyIntro: ""
});
const pageStatus = ref(1);
/* 调整到审核信息 */
const jupmLicenseInfo = () => {
uni.navigateTo({
url: "/pages/user/myCompany/licenseInfo"
});
if (pageStatus.value == 1 || pageStatus.value == 2 || pageStatus.value == 3) {
uni.navigateTo({
url: `/pages/user/myCompany/licenseInfo?status=${pageStatus.value}`
});
}
};
onLoad(({ status }) => {
pageStatus.value = status * 1;
if (status == 1) {
getCompanyInfoApiFn();
} else {
companyReviewInfoFn();
}
});
/* 审核状态文字 */
const auditStatus = ref("");
/* 获取公司信息 */
const companyInfo = ref({});
getCompanyInfoApi().then(async res => {
const { setCompanyInfoValue } = useCompanyInfoStore();
function getCompanyInfoApiFn() {
getCompanyInfoApi().then(async res => {
companyInfo.value = res.data;
Object.keys(params).forEach(key => {
params[key] = res.data[key];
});
const { provinceName, cityName, districtName } = res.data;
companyInfo.value = res.data;
Object.keys(params).forEach(key => {
params[key] = res.data[key];
cityText.value = [provinceName, cityName, districtName].join("-");
// 审核状态
auditStatus.value = await getEnumText("EnumAuditStatus", res.data.companyAudit.status);
});
const { provinceName, cityName, districtName } = res.data;
cityText.value = [provinceName, cityName, districtName].join("-");
// 审核状态
auditStatus.value = await getEnumText("EnumAuditStatus", res.data.companyAudit.status);
setCompanyInfoValue(res.data);
});
}
function companyReviewInfoFn() {
companyReviewInfo().then(async res => {
companyInfo.value = res.data;
Object.keys(params).forEach(key => {
params[key] = res.data[key];
});
cityText.value = res.data.location;
// 审核状态
auditStatus.value = await getEnumText("EnumAuditStatus", res.data.status);
});
}
/* 获取省市区 */
const cityOpstion = ref([]);
const cityValue = ref([]);
......@@ -118,13 +145,14 @@ const handleConfirmCity = ({ selectedItems }) => {
cityText.value = selectedItems.map(v => v.name).join("-");
citySelectedItems = selectedItems;
const [province, city, district] = selectedItems;
params.provinceCode = province.code;
params.provinceName = province.name;
params.cityCode = city.code;
params.cityName = city.name;
params.districtCode = district.code;
params.districtName = district.name;
console.log(cityValue);
// params.provinceCode = province.code;
// params.provinceName = province.name;
// params.cityCode = city.code;
// params.cityName = city.name;
// params.districtCode = district.code;
// params.districtName = district.name;
params.location = selectedItems.map(v => v.name).join("-");
};
/* 选择图片 */
const chooseImage = sourceType => {
......@@ -233,6 +261,10 @@ const validateForm = (formData, requiredFields) => {
.placeholder {
color: #77818f;
}
.text-single {
max-width: 80%;
margin-left: 50rpx;
}
.textarea-wrap {
padding: 16px 0;
.label {
......
......@@ -46,7 +46,7 @@
</template></wd-input
>
</view>
<view class="item">
<!-- <view class="item">
<view class="label"> 有效期 </view>
<view class="content">
<wd-radio-group @change="change" v-model="radio" shape="dot" inline :disabled="status != 2">
......@@ -68,7 +68,7 @@
{{ (myLicenseValidityPeriod && $formatTimestamp(myLicenseValidityPeriod, "YYYY-MM-DD")) || "请选择" }}
</view>
</wd-calendar>
</view>
</view> -->
</view>
<view class="btn-wrap" v-if="status == 2">
......@@ -80,7 +80,7 @@
<script setup>
import evn from "@/utils/config";
import { uploadFiles } from "@/utils/fileUpload";
import { getCompanyInfoApi, resubmitCompanyApi } from "@/api/user";
import { getCompanyInfoApi, resubmitCompanyApi, companyReviewInfo } from "@/api/user";
import { ref } from "vue";
import dayjs from "dayjs";
const radio = ref(1);
......@@ -92,9 +92,8 @@ let myLicenseValidityPeriod = ref(new Date().getTime());
let companyInfo = reactive({});
let minDate = ref(new Date().getTime());
let maxDate = ref(new Date().getTime() + 1000 * 60 * 60 * 24 * 365);
onReady(() => {
getCompanyInfoApiFn();
});
const pageStatus = ref(1);
function change(e) {
console.log(e);
if (e.value == 2) {
......@@ -103,13 +102,22 @@ function change(e) {
myLicenseValidityPeriod.value = 4102329600000;
}
}
onLoad(({ status }) => {
pageStatus.value = status;
if (status == 1) {
getCompanyInfoApiFn();
} else {
companyReviewInfoFn();
}
});
function getCompanyInfoApiFn() {
getCompanyInfoApi().then(res => {
companyInfo = res.data;
status.value = res.data.companyAudit.status;
myLicensePath.value = res.data.companyAudit.licensePath;
companyName.value = res.data.companyAudit.companyName;
myCode.value = res.data.companyAudit.creditCode;
status.value = res.data.status;
myLicensePath.value = res.data.licensePath;
companyName.value = res.data.companyName;
myCode.value = res.data.creditCode;
myLicenseValidityPeriod.value = res.data.licenseValidityPeriod;
// if (res.data.licenseValidityPeriod == 4102329600000) {
......@@ -119,6 +127,17 @@ function getCompanyInfoApiFn() {
// }
});
}
function companyReviewInfoFn() {
companyReviewInfo().then(async res => {
companyInfo.value = res.data;
status.value = res.data.status;
myLicensePath.value = res.data.licensePath;
companyName.value = res.data.companyName;
myCode.value = res.data.creditCode;
myLicenseValidityPeriod.value = res.data.licenseValidityPeriod;
});
}
/* 选择图片 */
const chooseImage = () => {
if (status.value == 2) {
......
......@@ -71,7 +71,7 @@ export const formatTimestamp = (timestamp, formatString = "YYYY-MM-DD hh:mm:ss")
export const validateForm=(formData,requiredFields) =>{
const phoneRegex = /^1[3-9]\d{9}$/; // 正则表达式匹配中国大陆手机号码
for (const field of requiredFields) {
if(field === "contactPhone") {
if(field === "contactPhone"||field === "phone") {
if (!formData[field] || !phoneRegex.test(formData[field])) {
uni.showToast({
title: `请填写正确电话号码!`,
......@@ -101,6 +101,12 @@ export const validateForm=(formData,requiredFields) =>{
?'联系人'
:field==='jobType'
?'职位类型'
:field==='position'
?'职位'
:field==='name'
?'姓名'
:field==='avatarPath'
?'头像'
:""
}!`,
icon: "none",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment