1

parent 1b2b1be9
...@@ -2,7 +2,11 @@ ...@@ -2,7 +2,11 @@
<NavBar :showIcon="true" :showTitle="true" title="文章详情" backgroundBox="#FFFFFF"></NavBar> <NavBar :showIcon="true" :showTitle="true" title="文章详情" backgroundBox="#FFFFFF"></NavBar>
<div class="page"> <div class="page">
<div class="top"> <div class="top">
<video :src="evn.APP_IMAGE_BASE_API + data.videoPath" v-if="data.infoType === 2"></video> <video
:poster="evn.APP_IMAGE_BASE_API + data.thumbnailPath"
:src="evn.APP_IMAGE_BASE_API + data.videoPath"
v-if="data.infoType === 2"
></video>
<div class="title">{{ data.title }}</div> <div class="title">{{ data.title }}</div>
<div class="flex-between"> <div class="flex-between">
<div class="publisher">{{ data.publisher }}</div> <div class="publisher">{{ data.publisher }}</div>
...@@ -53,6 +57,7 @@ onLoad(({ id }) => { ...@@ -53,6 +57,7 @@ onLoad(({ id }) => {
data.value.bmStutas = Res.data; data.value.bmStutas = Res.data;
}); });
}); });
function next() { function next() {
xma.navigateTo({ xma.navigateTo({
url: `/pages/signUp/index?articleId=${articleId.value}` url: `/pages/signUp/index?articleId=${articleId.value}`
......
<template> <template>
<NavBar :showIcon="false" :showTitle="true" title="动态"></NavBar>
<div class="policy"> <div class="policy">
<NavBar :showIcon="false" :showTitle="true" title="动态"></NavBar>
<div class="tab-name" :style="{ position: sticky, top: contentHeight }" :enable-flex="true" :scroll-x="true"> <div class="tab-name" :style="{ position: sticky, top: contentHeight }" :enable-flex="true" :scroll-x="true">
<view :class="{ item: 1, active: active == v.id }" v-for="v in typeList" :key="v.id" @click="changeType(v)">{{ <view :class="{ item: 1, active: active == v.id }" v-for="v in typeList" :key="v.id" @click="changeType(v)">{{
v.name v.name
......
...@@ -13,12 +13,13 @@ ...@@ -13,12 +13,13 @@
<view class="message flex-between"> <view class="message flex-between">
<text>{{ v.content }}</text> <text>{{ v.content }}</text>
<view class="flex-align-center"> <view class="flex-align-center">
<text class="link">立即前往</text> <text class="link" v-if="[2, 3, 4, 7].includes(v.type)">立即前往</text>
<view class="arrow"></view> <view class="arrow"></view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<wd-status-tip v-if="list.length == 0" image="../.././static/image/enmpty-dt.png" tip="暂无消息" />
</view> </view>
</scroll-view> </scroll-view>
</div> </div>
...@@ -37,7 +38,7 @@ const params = ref({ ...@@ -37,7 +38,7 @@ const params = ref({
isEnd: false isEnd: false
}); });
const goToDetail = item => { const goToDetail = item => {
if (item.type == 3 || item.type == 4) { if ([3, 4, 7].includes(item.type)) {
xma.navigateTo({ xma.navigateTo({
url: `/pages/user/myCompany/licenseInfo?id=${item.id}` url: `/pages/user/myCompany/licenseInfo?id=${item.id}`
}); });
......
<template> <template>
<NavBar :showIcon="false" :showTitle="true" title="政策"></NavBar>
<div class="policy"> <div class="policy">
<div class="tab-name" :enable-flex="true" :scroll-x="true"> <NavBar :showIcon="false" :showTitle="true" title="政策"></NavBar>
<div class="tab-name" :style="{ position: sticky, top: contentHeight }" :enable-flex="true" :scroll-x="true">
<view :class="{ item: 1, active: active == v.id }" v-for="v in typeList" :key="v.id" @click="changeType(v)">{{ <view :class="{ item: 1, active: active == v.id }" v-for="v in typeList" :key="v.id" @click="changeType(v)">{{
v.name v.name
}}</view> }}</view>
...@@ -18,6 +18,7 @@ import articleList from "@/components/articleList/index.vue"; ...@@ -18,6 +18,7 @@ import articleList from "@/components/articleList/index.vue";
import { getArticleListApi, getArticleTypesApi } from "@/api/article.js"; import { getArticleListApi, getArticleTypesApi } from "@/api/article.js";
import { reactive, ref } from "vue"; import { reactive, ref } from "vue";
const active = ref(""); const active = ref("");
const contentHeight = ref("100rpx");
const typeList = ref([{ id: "", name: "全部" }]); const typeList = ref([{ id: "", name: "全部" }]);
getArticleTypesApi(1).then(res => { getArticleTypesApi(1).then(res => {
typeList.value.push(...res.data); typeList.value.push(...res.data);
...@@ -73,6 +74,18 @@ onPullDownRefresh(() => { ...@@ -73,6 +74,18 @@ onPullDownRefresh(() => {
}); });
}); });
}); });
onLoad(() => {
xma.xh.getSystemInfo({
success(res) {
// console.log('设备信息', res); // 设备信息
}
});
xma.xh.getMenuButtonBoundingClientRect({
success(res) {
contentHeight.value = (res.top + res.bottom) / 2 + 25 + "px";
}
});
});
// 触底加载 // 触底加载
onReachBottom(() => { onReachBottom(() => {
feedbackListFn(); feedbackListFn();
......
<template> <template>
<NavBar :showIcon="false" :showTitle="true" title="推荐"></NavBar>
<div class="page"> <div class="page">
<view class="tabs"> <NavBar :showIcon="false" :showTitle="true" title="推荐"></NavBar>
<view class="tabs" :style="{ position: sticky, top: contentHeight }">
<text @tap="changeActiveTab('求职推荐')" :class="activeTab == '求职推荐' ? 'active' : ''">求职推荐</text> <text @tap="changeActiveTab('求职推荐')" :class="activeTab == '求职推荐' ? 'active' : ''">求职推荐</text>
<text @tap="changeActiveTab('职位管理')" :class="activeTab == '职位管理' ? 'active' : ''">职位管理</text> <text @tap="changeActiveTab('职位管理')" :class="activeTab == '职位管理' ? 'active' : ''">职位管理</text>
</view> </view>
...@@ -139,6 +139,9 @@ ...@@ -139,6 +139,9 @@
</scroll-view> </scroll-view>
</view> </view>
<view class="release-postion" @tap="releasePostion"> 发布 </view> <view class="release-postion" @tap="releasePostion"> 发布 </view>
<!-- <wd-fab :draggable="true">
</wd-fab> -->
</view> </view>
</div> </div>
</template> </template>
...@@ -172,6 +175,7 @@ import { useAsync } from "@/hooks/useAsync"; ...@@ -172,6 +175,7 @@ import { useAsync } from "@/hooks/useAsync";
import _ from "lodash"; import _ from "lodash";
import { useReleasePostionStore } from "./releasePostion/store"; import { useReleasePostionStore } from "./releasePostion/store";
/* tab */ /* tab */
const contentHeight = ref("100rpx");
const pinias = useReleasePostionStore(); const pinias = useReleasePostionStore();
const activeTab = ref("求职推荐"); const activeTab = ref("求职推荐");
const changeActiveTab = tab => { const changeActiveTab = tab => {
...@@ -229,9 +233,7 @@ const getApplicationListParams = ref({ ...@@ -229,9 +233,7 @@ const getApplicationListParams = ref({
pageSize: 10 pageSize: 10
}); });
const getResumeRecommendList = () => { const getResumeRecommendList = () => {
getResumeRecommendListApi(getApplicationListParams.value).then(res => { getResumeRecommendListApi(getApplicationListParams.value).then(res => {});
console.log("resresresres", res);
});
}; };
// 城市筛选 // 城市筛选
const valueCity = ref([]); const valueCity = ref([]);
...@@ -356,9 +358,21 @@ const getJobList = (status = "") => { ...@@ -356,9 +358,21 @@ const getJobList = (status = "") => {
v.workModeText = workModeText; v.workModeText = workModeText;
v.statusText = statusText; v.statusText = statusText;
}); });
jobList.value = res.data; jobList.value = [...res.data];
}); });
}; };
onLoad(() => {
xma.xh.getSystemInfo({
success(res) {
// console.log('设备信息', res); // 设备信息
}
});
xma.xh.getMenuButtonBoundingClientRect({
success(res) {
contentHeight.value = (res.top + res.bottom) / 2 + 25 + "px";
}
});
});
onShow(() => { onShow(() => {
getTopFilter(); getTopFilter();
getJobList(); getJobList();
...@@ -383,6 +397,7 @@ const switchJobStatus = async v => { ...@@ -383,6 +397,7 @@ const switchJobStatus = async v => {
title: "操作成功", title: "操作成功",
icon: "none" icon: "none"
}); });
getJobList();
} else { } else {
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
...@@ -505,12 +520,11 @@ const editJob = ({ id, status }) => { ...@@ -505,12 +520,11 @@ const editJob = ({ id, status }) => {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex-grow: 1; flex-grow: 1;
height: 200rpx;
.release-postion { .release-postion {
position: fixed; position: fixed;
right: 22rpx; right: 22rpx;
bottom: 120rpx; bottom: 150rpx;
z-index: 1; z-index: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
......
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
<veiw class="label">面试时间</veiw> <veiw class="label">面试时间</veiw>
<wd-datetime-picker <wd-datetime-picker
v-model="date" v-model="date"
:min-date="new Date().getTime()" style="z-index: 999 !important"
:min-date="new Date(new Date().setHours(0, 0, 0, 0)).getTime()"
use-default-slot use-default-slot
label="日期选择" label="日期选择"
@confirm="dateConfirm" @confirm="dateConfirm"
...@@ -60,7 +61,6 @@ ...@@ -60,7 +61,6 @@
</template> </template>
<script setup> <script setup>
import navBar from "@/components/navBar/index.vue";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { getApplicationByIdApi, inviteInterviewApi } from "@/api/postion"; import { getApplicationByIdApi, inviteInterviewApi } from "@/api/postion";
import { reactive, ref } from "vue"; import { reactive, ref } from "vue";
......
<template> <template>
<NavBar :showIcon="true" :showTitle="false" title="" backgroundBox="#FFFFFF"></NavBar>
<div class="page"> <div class="page">
<NavBar :showIcon="true" :showTitle="false" title="" backgroundBox="#FFFFFF"></NavBar>
<view class="title"> <view class="title">
<view class="t1">1/5填写职位信息</view> <view class="t1">1/5填写职位信息</view>
<view class="t2">选择对应的职位并填写职位信息</view> <view class="t2">选择对应的职位并填写职位信息</view>
...@@ -47,7 +47,13 @@ ...@@ -47,7 +47,13 @@
</view> </view>
<view class="form-item describe" style="border: 0"> <view class="form-item describe" style="border: 0">
<view class="form-item-title">职位描述</view> <view class="form-item-title">职位描述</view>
<textarea maxlength="500" v-model="pinias.formData.jobDesc" placeholder="请输入你的职位描述" /> <wd-textarea
custom-class="textarea"
show-word-limit
maxlength="500"
v-model="pinias.formData.jobDesc"
placeholder="请输入你的职位描述"
/>
</view> </view>
</view> </view>
...@@ -94,6 +100,8 @@ const changeWorkMode = mode => { ...@@ -94,6 +100,8 @@ const changeWorkMode = mode => {
pinias.setFormDataKey("workMode", mode); pinias.setFormDataKey("workMode", mode);
pinias.setFormDataKey("minSalary", 0); pinias.setFormDataKey("minSalary", 0);
pinias.setFormDataKey("maxSalary", 0); pinias.setFormDataKey("maxSalary", 0);
console.log("mode", mode);
if (mode == 2) { if (mode == 2) {
// 小时 // 小时
pinias.setFormDataKey("settlementType", 1); pinias.setFormDataKey("settlementType", 1);
...@@ -124,6 +132,7 @@ const handleConfirm = ({ selectedItems, value }) => { ...@@ -124,6 +132,7 @@ const handleConfirm = ({ selectedItems, value }) => {
pinias.setFormDataKey("jobType", taget.id); pinias.setFormDataKey("jobType", taget.id);
}; };
const next = () => { const next = () => {
xma.hideKeyboard();
if (validateForm(pinias.formData, ["jobType", "jobTypeText", "jobName", "jobDesc"])) { if (validateForm(pinias.formData, ["jobType", "jobTypeText", "jobName", "jobDesc"])) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/recommend/releasePostion/step2" url: "/pages/recommend/releasePostion/step2"
...@@ -145,6 +154,23 @@ const next = () => { ...@@ -145,6 +154,23 @@ const next = () => {
opacity: 1; opacity: 1;
} }
} }
.page {
.textarea {
margin-top: 32rpx;
background: #f2f5fb;
max-height: 272rpx;
:deep(.wd-textarea__value) {
background: #f2f5fb !important;
max-height: 272rpx;
width: 100%;
padding: 0 !important;
}
:deep(.wd-textarea__count) {
background: none !important;
}
}
}
.switch { .switch {
display: flex; display: flex;
align-items: center; align-items: center;
......
<template> <template>
<NavBar :showIcon="true" :showTitle="false" title="" backgroundBox="#FFFFFF"></NavBar>
<div class="page"> <div class="page">
<NavBar :showIcon="true" :showTitle="false" title="" backgroundBox="#FFFFFF"></NavBar>
<view class="title"> <view class="title">
<view class="t1">2/5福利待遇</view> <view class="t1">2/5福利待遇</view>
<view class="t2">给岗位选择对应福利待遇</view> <view class="t2">给岗位选择对应福利待遇</view>
...@@ -33,15 +33,12 @@ ...@@ -33,15 +33,12 @@
<view class="title-box" <view class="title-box"
><view></view> ><view></view>
<view class="title">薪资选择</view> <view class="title">薪资选择</view>
<wd-icon name="close" size="30rpx"></wd-icon> <wd-icon @click="handleClose" name="close" size="30rpx"></wd-icon>
</view> </view>
<wd-picker-view <wd-picker-view @change="handleConfirm" use-default-slot :columns="columns" v-model="value"></wd-picker-view>
@change="handleConfirm" <view style="width: 100%; display: flex; justify-content: center"
use-default-slot ><wd-button style="width: 80%" @click="handleClose" block :round="false">确定</wd-button></view
:columns="columns" >
v-model="value"
@close="handleClose"
></wd-picker-view>
</wd-popup> </wd-popup>
</view> </view>
<view class="form-item"> <view class="form-item">
...@@ -176,6 +173,13 @@ function onOpen() { ...@@ -176,6 +173,13 @@ function onOpen() {
show.value = true; show.value = true;
} }
function handleClose() { function handleClose() {
if (value.value[1] < value.value[0]) {
xma.showToast({
title: "最高薪资不能小于最低薪资",
icon: "none"
});
return;
}
show.value = false; show.value = false;
} }
/* 是否提供住宿 */ /* 是否提供住宿 */
...@@ -264,16 +268,6 @@ initViewData(); ...@@ -264,16 +268,6 @@ initViewData();
:deep(.uni-checkbox-input) { :deep(.uni-checkbox-input) {
border-radius: 50% !important; border-radius: 50% !important;
} }
.title-box {
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 0 32rpx;
.title {
font-weight: bold;
}
}
.welfare { .welfare {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
......
<template> <template>
<NavBar v-if="showTab" :showIcon="true" :showTitle="false" title="" backgroundBox="#FFFFFF"></NavBar>
<div class="page"> <div class="page">
<NavBar v-if="showTab" :showIcon="true" :showTitle="false" title="" backgroundBox="#FFFFFF"></NavBar>
<view class="title"> <view class="title">
<view class="t1">3/5工作地点</view> <view class="t1">3/5工作地点</view>
<view class="t2">添加准确的就职工作地址</view> <view class="t2">添加准确的就职工作地址</view>
......
<template> <template>
<NavBar :showIcon="true" :showTitle="false" title="" backgroundBox="#FFFFFF"></NavBar>
<div class="page"> <div class="page">
<NavBar :showIcon="true" :showTitle="false" title="" backgroundBox="#FFFFFF"></NavBar>
<view class="title"> <view class="title">
<view class="t1">4/5填写职位信息</view> <view class="t1">4/5填写职位信息</view>
<view class="t2">设置招聘偏好,让报名更精准</view> <view class="t2">设置招聘偏好,让报名更精准</view>
......
<template> <template>
<NavBar :showIcon="true" :showTitle="false" title="" backgroundBox="#FFFFFF"></NavBar>
<div class="page"> <div class="page">
<NavBar :showIcon="true" :showTitle="false" title="" backgroundBox="#FFFFFF"></NavBar>
<view class="title"> <view class="title">
<view class="t1">5/5 更多要求</view> <view class="t1">5/5 更多要求</view>
<view class="t2">设置招聘偏好,让报名更精准</view> <view class="t2">设置招聘偏好,让报名更精准</view>
...@@ -46,21 +46,33 @@ import { useReleasePostionStore } from "./store"; ...@@ -46,21 +46,33 @@ import { useReleasePostionStore } from "./store";
const pinias = useReleasePostionStore(); const pinias = useReleasePostionStore();
import { validateForm } from "@/utils/utils"; import { validateForm } from "@/utils/utils";
const submit = () => { const submit = () => {
xma.hideKeyboard();
xma.showLoading({
title: "提交中",
mask: true
});
if (pinias.formData.id) { if (pinias.formData.id) {
// 更新 // 更新
updateJobApi(pinias.formData).then(res => { updateJobApi(pinias.formData).then(res => {
if (res.code == 200) { if (res.code == 200) {
pinias.resetForm(); pinias.resetForm();
uni.showToast({ setTimeout(() => {
wx.hideLoading({
complete: complete => {
if (complete.errMsg == "hideLoading:ok") {
wx.showToast({
title: "更新成功", title: "更新成功",
icon: "none", icon: "none"
duration: 2000,
success: () => {
uni.switchTab({
url: "/pages/recommend/index"
}); });
} }
}
}); });
}, 2000);
setTimeout(() => {
uni.switchTab({
url: "/pages/recommend/index"
});
}, 3000);
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
...@@ -75,16 +87,23 @@ const submit = () => { ...@@ -75,16 +87,23 @@ const submit = () => {
createJobApi(pinias.formData).then(res => { createJobApi(pinias.formData).then(res => {
if (res.code == 200) { if (res.code == 200) {
pinias.resetForm(); pinias.resetForm();
uni.showToast({ setTimeout(() => {
wx.hideLoading({
complete: complete => {
if (complete.errMsg == "hideLoading:ok") {
wx.showToast({
title: "发布成功", title: "发布成功",
icon: "none", icon: "none"
duration: 2000,
success: () => {
uni.switchTab({
url: "/pages/recommend/index"
}); });
} }
}
});
}, 2000);
setTimeout(() => {
uni.switchTab({
url: "/pages/recommend/index"
}); });
}, 3000);
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
......
...@@ -42,7 +42,7 @@ export const useReleasePostionStore = defineStore("useReleasePostionStore", ()=> ...@@ -42,7 +42,7 @@ export const useReleasePostionStore = defineStore("useReleasePostionStore", ()=>
jobTypeText: "", jobTypeText: "",
jobDesc: "", jobDesc: "",
negotiableSalary: 0, negotiableSalary: 0,
settlementType: 1, settlementType: 4,
minSalary: 0, minSalary: 0,
maxSalary: 0, maxSalary: 0,
benefits: "", benefits: "",
......
<template> <template>
<div class="page"> <div class="page">
<div class="title">添加岗位信息{{ pinias.formData.positionList.length + 1 }}</div>
<div class="form"> <div class="form">
<div class="grid"> <div class="from-item" v-for="(item, index) in postItem" :key="index + Math.random()">
<div class="title">
<view>添加岗位信息{{ index + 1 }}</view>
<wd-icon v-if="index > 0" @click="deleteItem(index)" name="close-outline" size="34rpx"></wd-icon>
</div>
<formItem full title="岗位名称"> <formItem full title="岗位名称">
<input type="text" v-model="postItem.jobName" placeholder="请填写岗位名称" /> <input
type="text"
@input="changeInput($event, 'jobName', index)"
v-model="item.jobName"
placeholder="请填写岗位名称"
/>
</formItem> </formItem>
<formItem title="招聘人数"> <formItem title="招聘人数">
<input type="number" v-model="postItem.recruitmentNumber" placeholder="请填写招聘的人数" /> <input
type="number"
@input="changeInput($event, 'recruitmentNumber', index)"
v-model="item.recruitmentNumber"
placeholder="请填写招聘的人数"
/>
</formItem> </formItem>
<formItem title="年龄要求"> <formItem title="年龄要求">
<wd-col-picker <wd-col-picker
v-model="age" v-model="age"
:columns="ageColumns" :columns="ageColumns"
:close-on-click-modal="false"
:column-change="changeAge" :column-change="changeAge"
@confirm="confirmAge" @confirm="confirmAge"
use-default-slot use-default-slot
> >
<view :class="`inner flex-between ${ageText ? '' : 'placeholder'}`" bind:tap="onOpen"> <view :class="`inner flex-between ${item.ageText ? '' : 'placeholder'}`" @tap="changePicker(index)">
{{ ageText || "请选择年龄要求" }} {{ item.ageText || "请选择年龄要求" }}
<view class="arrow"></view> <view class="arrow"></view>
</view> </view>
</wd-col-picker> </wd-col-picker>
...@@ -28,21 +42,48 @@ ...@@ -28,21 +42,48 @@
:columns="educationColumns" :columns="educationColumns"
value-key="code" value-key="code"
label-key="text" label-key="text"
v-model="postItem.educationRequirement" v-model="item.educationRequirement"
@confirm="confirmEducation" @confirm="confirmEducation"
use-default-slot use-default-slot
> >
<view :class="`inner flex-between ${educationText ? '' : 'placeholder'}`"> <view :class="`inner flex-between ${item.educationText ? '' : 'placeholder'}`" @tap="changePicker(index)">
<view class="flex-align-center" bind:tap="onShowIdentitySelect"> <view class="flex-align-center" bind:tap="onShowIdentitySelect">
{{ educationText || "请选择学历" }} {{ item.educationText || "请选择学历" }}
</view> </view>
<view class="arrow"></view> <view class="arrow"></view>
</view> </view>
</wd-picker> </wd-picker>
</formItem> </formItem>
<formItem title="薪资待遇"> <formItem title="薪资待遇"
<wd-col-picker ><view :class="`inner flex-between ${item.salaryText ? '' : 'placeholder'}`" @click="onOpen(index)">
{{ item.salaryText || "请选择月薪范围" }}
<!-- <checkbox class="checkbox" @click="onChecked" :checked="my">面议</checkbox> -->
</view>
<wd-popup
v-model="show"
position="bottom"
custom-style="height:40%;border-radius: 20rpx;z-index:999;"
@close="handleClose"
>
<view class="title-box"
><view></view>
<view class="title">薪资选择</view>
<wd-icon @click="handleClose" name="close" size="30rpx"></wd-icon>
</view>
<wd-picker-view
@change="handleConfirm"
use-default-slot
:columns="salaryColumns"
v-model="moneyValue"
></wd-picker-view>
<view style="width: 100%; display: flex; justify-content: center"
><wd-button :data-index="index" style="width: 80%" @click="handleClose" block :round="false"
>确定</wd-button
></view
>
</wd-popup>
<!-- <wd-col-picker
v-model="salary" v-model="salary"
:columns="salaryColumns" :columns="salaryColumns"
:column-change="changeSalary" :column-change="changeSalary"
...@@ -53,45 +94,39 @@ ...@@ -53,45 +94,39 @@
{{ salaryText || "请选择薪资" }} {{ salaryText || "请选择薪资" }}
<view class="arrow"></view> <view class="arrow"></view>
</view> </view>
</wd-col-picker> </wd-col-picker> -->
</formItem> </formItem>
<formItem title="是否提供食宿" full> <formItem title="是否提供食宿" full>
<wd-radio-group shape="dot" inline v-model="postItem.accommodation"> <wd-radio-group shape="dot" inline v-model="item.accommodation">
<wd-radio v-for="v in EnumAccommodation" :key="v.code" :value="v.code">{{ v.text }}</wd-radio> <wd-radio v-for="v in EnumAccommodation" :key="v.code" :value="v.code">{{ v.text }}</wd-radio>
</wd-radio-group> </wd-radio-group>
</formItem> </formItem>
<formItem title="是否缴纳五险一金" full> <formItem title="是否缴纳五险一金" full>
<wd-radio-group shape="dot" inline v-model="postItem.socialInsurance"> <wd-radio-group shape="dot" inline v-model="item.socialInsurance">
<wd-radio value="1"></wd-radio> <wd-radio value="1"></wd-radio>
<wd-radio value="0"></wd-radio> <wd-radio value="0"></wd-radio>
</wd-radio-group> </wd-radio-group>
</formItem> </formItem>
<formItem title="岗位专业(技能)要求" full> <formItem title="岗位专业(技能)要求" full>
<textarea v-model="postItem.skills" placeholder="请输入岗位专业(技能)要求" /> <textarea v-model="item.skills" placeholder="请输入岗位专业(技能)要求" />
</formItem> </formItem>
<!-- <formItem title="备注" full> <!-- <formItem title="备注" full>
<input v-model="postItem.socialInsurance" placeholder="请填写" /> <input v-model="postItem.socialInsurance" placeholder="请填写" />
</formItem> --> </formItem> -->
</div> </div>
</div> </div>
<!-- 确认提交 --> <wd-tabbar
<wd-overlay :show="show" @click="show = false"> @tap="next"
<view class="wrapper flex-center"> custom-style="display: flex;justify-content: center !important;z-index:1;"
<view class="block" @click.stop=""> fixed
<img src="@/static/image/signUp.png" alt="" /> placeholder
<p>您已填写{{ pinias.formData.companyName }}</p> safeAreaInsetBottom
<p>招聘岗位{{ pinias.formData.positionList.length }}</p> >
<div class="btn"> <view class="footer">
<button class="b1" @click="show = false">继续提交</button> <button class="foot-btn1" @click="addPost">继续添加</button>
<button class="b2" @click="submit">提交报名</button> <button class="foot-btn" @click="openMask">提交报名</button></view
</div> >
</view> </wd-tabbar>
</view>
</wd-overlay>
<div class="footer">
<button class="b1" @click="addPost">继续提交</button>
<button class="b2" @click="openMask">提交报名</button>
</div>
</div> </div>
</template> </template>
...@@ -102,20 +137,26 @@ import formItem from "./formItem.vue"; ...@@ -102,20 +137,26 @@ import formItem from "./formItem.vue";
import { useStore } from "./store"; import { useStore } from "./store";
const pinias = useStore(); const pinias = useStore();
import { jobFairRegisterApi } from "@/api/article"; import { jobFairRegisterApi } from "@/api/article";
let my = ref(false);
let moneyValue = ref([]);
let currentIndex = ref(0);
const show = ref(false); const show = ref(false);
const postItem = ref({ const postItem = ref([
{
jobName: "", jobName: "",
recruitmentNumber: 1, recruitmentNumber: 1, //身份
minAgeRequirement: 0, minAgeRequirement: 0, //最小年龄
maxAgeRequirement: 0, maxAgeRequirement: 0, //最大年龄
educationRequirement: "0", educationRequirement: "0", //学历要求EnumEducationRequirement
minSalary: 0, minSalary: 1000, //最低薪资
maxSalary: 0, maxSalary: 1000, //最高薪资
socialInsurance: "1", socialInsurance: "1",
accommodation: "0", ageText: null,
skills: "" educationText: null,
}); accommodation: "0", //是否提供食宿EnumAccommodation
skills: "" //"岗位专业(技能)要求
}
]);
/* 年龄 */ /* 年龄 */
const age = ref([]); const age = ref([]);
const ageText = ref("不限"); const ageText = ref("不限");
...@@ -132,25 +173,54 @@ const changeAge = ({ selectedItem, resolve, finish }) => { ...@@ -132,25 +173,54 @@ const changeAge = ({ selectedItem, resolve, finish }) => {
resolve(temp); resolve(temp);
} }
} else { } else {
postItem.value.minAgeRequirement = 0; postItem.value[currentIndex.value].minAgeRequirement = 0;
postItem.value.maxAgeRequirement = 0; postItem.value[currentIndex.value].maxAgeRequirement = 0;
ageText.value = "不限"; postItem.value[currentIndex.value].ageText = "不限";
finish(); finish();
} }
}; };
function deleteItem(index) {
postItem.value.splice(index, 1);
}
function onOpen(index) {
currentIndex.value = index;
show.value = true;
my.value = false;
}
function changePicker(index) {
currentIndex.value = index;
console.log("currentIndex.value", currentIndex.value);
}
function onChecked() {
my.value = !my.value;
// 如果勾选了面议
if (my.value) {
// postItem
salaryText.value = "";
postItem.value[currentIndex.value].minSalary = 0;
postItem.value[currentIndex.value].maxSalary = 0;
} else {
postItem.value[currentIndex.value].minSalary = "";
postItem.value[currentIndex.value].maxSalary = "";
}
}
const confirmAge = ({ value, selectedItems }) => { const confirmAge = ({ value, selectedItems }) => {
const [min, max] = value; const [min, max] = value;
console.log(selectedItems);
if (max) { if (max) {
postItem.value.minAgeRequirement = min; postItem.value[currentIndex.value].minAgeRequirement = min;
postItem.value.maxAgeRequirement = max; postItem.value[currentIndex.value].maxAgeRequirement = max;
} else { } else {
postItem.value.minAgeRequirement = 0; postItem.value[currentIndex.value].minAgeRequirement = 0;
postItem.value.maxAgeRequirement = 0; postItem.value[currentIndex.value].maxAgeRequirement = 0;
ageText.value = "不限"; postItem.value[currentIndex.value].ageText = "不限";
} }
ageText.value = selectedItems.map(v => v.label).join("~"); postItem.value[currentIndex.value].ageText = selectedItems.map(v => v.label).join("~");
}; };
function changeInput(e, type, index) {
let { value } = e.detail;
currentIndex.value = index;
postItem.value[index][type] = value;
}
const initAgeColumns = () => { const initAgeColumns = () => {
const temp = [ const temp = [
{ {
...@@ -177,13 +247,13 @@ const initEducationColumns = async () => { ...@@ -177,13 +247,13 @@ const initEducationColumns = async () => {
educationColumns.value = await getEumData("EnumEducationRequirement"); educationColumns.value = await getEumData("EnumEducationRequirement");
}; };
const confirmEducation = ({ selectedItems }) => { const confirmEducation = ({ selectedItems }) => {
educationText.value = selectedItems.text; postItem.value[currentIndex.value].educationText = selectedItems.text;
}; };
initEducationColumns(); initEducationColumns();
/* 薪水 */ /* 薪水 */
const salary = ref([]); const salary = ref([]);
const salaryText = ref(""); const salaryText = ref("1K");
const salaryColumns = ref([]); const salaryColumns = ref([]);
const changeSalary = ({ selectedItem, resolve, finish }) => { const changeSalary = ({ selectedItem, resolve, finish }) => {
if (selectedItem.next) { if (selectedItem.next) {
...@@ -200,34 +270,64 @@ const changeSalary = ({ selectedItem, resolve, finish }) => { ...@@ -200,34 +270,64 @@ const changeSalary = ({ selectedItem, resolve, finish }) => {
finish(); finish();
} }
}; };
const confirmSalary = ({ value, selectedItems }) => {
const [min, max] = value;
if (max) {
postItem.value.minSalary = min;
postItem.value.maxSalary = max;
} else {
postItem.value.minSalary = 0;
postItem.value.maxSalary = 0;
salaryText.value = "面议";
}
salaryText.value = selectedItems.map(v => v.label).join("~");
};
const initsalaryColumns = () => { const initsalaryColumns = () => {
const temp = [ let multiple = 1000;
{ const temp = [];
value: "面议",
label: "面议", // 生成序列
next: false for (let i = 1; i <= 50; i++) {
} const currentValue = i * multiple;
];
for (let i = 1; i < 50; i++) {
temp.push({ temp.push({
value: i * 1000, value: currentValue,
label: i * 1000, label: currentValue / multiple + "K",
next: true next: true
}); });
} }
salaryColumns.value.push(temp);
// 确保 columns.value 是一个数组
if (!Array.isArray(salaryColumns.value)) {
salaryColumns.value = [];
}
// 清空原来的数组,以确保只包含新的数据
salaryColumns.value.length = 0;
// 将 temp 复制两次,推入 columns.value
salaryColumns.value.push([...temp], [...temp]);
};
function handleClose() {
if (moneyValue.value[1] < moneyValue.value[0]) {
xma.showToast({
title: "最高薪资不能小于最低薪资",
icon: "none"
});
return;
}
postItem.value[currentIndex.value].maxSalary = moneyValue.value[1];
postItem.value[currentIndex.value].minSalary = moneyValue.value[0];
show.value = false;
}
function changeIndex(index) {
currentIndex = index;
console.log("currentIndex", currentIndex);
}
const handleConfirm = ({ selectedItem, value }) => {
if (value[1] < value[0]) {
xma.showToast({
title: "最高薪资不能小于最低薪资",
icon: "none"
});
return;
} else {
postItem.value[currentIndex.value].maxSalary = moneyValue.value[1];
postItem.value[currentIndex.value].minSalary = moneyValue.value[0];
}
// my.value = false;
postItem.value[currentIndex.value].salaryText = value.map(num => `${num / 1000}k`).join("~");
}; };
initsalaryColumns(); initsalaryColumns();
/* 是否提供食宿 */ /* 是否提供食宿 */
...@@ -238,61 +338,27 @@ const initEnumAccommodation = async () => { ...@@ -238,61 +338,27 @@ const initEnumAccommodation = async () => {
initEnumAccommodation(); initEnumAccommodation();
/* 添加 */ /* 添加 */
const addPost = () => { const addPost = () => {
const { jobName, recruitmentNumber, educationRequirement, socialInsurance, accommodation, skills } = postItem.value;
ageText;
salaryText;
if (
[
jobName,
recruitmentNumber,
educationRequirement,
socialInsurance,
accommodation,
skills,
ageText.value,
salaryText.value
].some(v => {
return v === "";
})
) {
uni.showToast({
title: "请填写完整",
icon: "none"
});
return;
}
if (pinias.formData.positionList.length == 0) {
let arr = [];
arr.push(postItem.value);
pinias.setFormDataKey("positionList", arr);
} else {
pinias.setFormDataKey("positionList", [...pinias.formData.positionList, postItem.value]);
}
/* 数据清空 */ /* 数据清空 */
postItem.value = { postItem.value.push({
jobName: "", jobName: "",
recruitmentNumber: 1, recruitmentNumber: 1, //身份
minAgeRequirement: 0, minAgeRequirement: 0, //最小年龄
maxAgeRequirement: 0, maxAgeRequirement: 0, //最大年龄
educationRequirement: "0", educationRequirement: "0", //学历要求EnumEducationRequirement
minSalary: 0, minSalary: 1000, //最低薪资
maxSalary: 0, maxSalary: 1000, //最高薪资
socialInsurance: "1", socialInsurance: "1",
accommodation: "0", ageText: null,
skills: "" educationText: null,
}; accommodation: "0", //是否提供食宿EnumAccommodation
ageText.value = ""; skills: "" //"岗位专业(技能)要求
salaryText.value = ""; });
age.value = [];
salary.value = [];
console.log(postItem.value);
}; };
/* 提交 */ /* 提交 */
const openMask = () => { const openMask = () => {
console.log("postItem.value", postItem.value); console.log("postItem.value", postItem.value);
const result = postItem.value.every(item => {
if ( return validateForm(item, [
validateForm(postItem.value, [
"accommodation", "accommodation",
"educationRequirement", "educationRequirement",
"jobName", "jobName",
...@@ -303,83 +369,60 @@ const openMask = () => { ...@@ -303,83 +369,60 @@ const openMask = () => {
"recruitmentNumber", "recruitmentNumber",
"skills", "skills",
"socialInsurance" "socialInsurance"
]) ]);
) { });
if (pinias.formData.positionList.length == 0) { if (!result) {
let arr = []; // 如果有任意一个 item 验证失败,则提示用户
arr.push(postItem.value);
pinias.setFormDataKey("positionList", arr);
show.value = true;
} else {
pinias.setFormDataKey("positionList", [...pinias.formData.positionList, postItem.value]);
show.value = true;
}
}
};
const validateForm = (formData, requiredFields) => {
for (const field of requiredFields) {
const value = formData[field];
// 排除 0 和 "0" 的值,不作为空值校验
if (value === undefined || value === null || value === "") {
uni.showToast({ uni.showToast({
title: `请填写完整`, title: `请填写完整`,
icon: "none", icon: "none",
duration: 2000 duration: 2000
}); });
return false; return false;
} } else {
} pinias.setFormDataKey("positionList", postItem.value);
return true; console.log("pinias.formData", pinias.formData);
};
const submit = () => {
console.log(pinias.formData);
if (
validateForm(postItem.value, [
"accommodation",
"educationRequirement",
"jobName",
"maxAgeRequirement",
"maxSalary",
"minAgeRequirement",
"minSalary",
"recruitmentNumber",
"skills",
"socialInsurance"
])
) {
console.log("pinias", pinias);
pinias.resetForm();
return;
jobFairRegisterApi(pinias.formData).then(res => { jobFairRegisterApi(pinias.formData).then(res => {
if (res.code == 200) { if (res.code == 200) {
postItem.value = { postItem.value = [
{
jobName: "", jobName: "",
recruitmentNumber: 1, recruitmentNumber: 1, //身份
minAgeRequirement: 0, minAgeRequirement: 0, //最小年龄
maxAgeRequirement: 0, maxAgeRequirement: 0, //最大年龄
educationRequirement: "0", educationRequirement: "0", //学历要求EnumEducationRequirement
minSalary: 0, minSalary: 1000, //最低薪资
maxSalary: 0, maxSalary: 1000, //最高薪资
socialInsurance: "1", socialInsurance: "1",
accommodation: "0", ageText: null,
skills: "" educationText: null,
}; accommodation: "0", //是否提供食宿EnumAccommodation
ageText.value = ""; skills: "" //"岗位专业(技能)要求
salaryText.value = ""; }
age.value = []; ];
salary.value = [];
pinias.resetForm(); pinias.resetForm();
xma.reLaunch({ xma.reLaunch({
url: "/pages/recommend/index" url: "/pages/recommend/index"
}); });
} }
console.log(res);
}); });
} }
}; };
const validateForm = (formData, requiredFields) => {
for (const field of requiredFields) {
const value = formData[field];
// 排除 0 和 "0" 的值,不作为空值校验
if (value === undefined || value === null || value === "") {
uni.showToast({
title: `请填写${field}字段`,
icon: "none",
duration: 2000
});
return false;
}
}
return true;
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -394,29 +437,40 @@ const submit = () => { ...@@ -394,29 +437,40 @@ const submit = () => {
width: 100%; width: 100%;
height: 140rpx; height: 140rpx;
} }
} .title-box {
.footer {
display: flex; display: flex;
button { align-items: center;
width: 296rpx; justify-content: space-between;
height: 80rpx; box-sizing: border-box;
line-height: 80rpx; padding: 0 32rpx;
.title {
font-weight: bold;
font-size: 32rpx;
} }
.b1 {
font-size: 30rpx;
font-weight: 600;
color: #1f86ff;
background: #1f86ff0f;
&::after {
border: 0;
} }
:deep(.uni-checkbox-input) {
border-radius: 50% !important;
} }
.b2 { }
font-size: 30rpx; .foot-btn {
font-weight: 600; display: flex;
align-items: center;
justify-content: center;
width: 296rpx;
height: 80rpx;
color: #ffffff; color: #ffffff;
background: #1f86ff; background: #1f86ff;
} border-radius: 12rpx;
}
.foot-btn1 {
display: flex;
align-items: center;
justify-content: center;
width: 296rpx;
height: 80rpx;
color: #1f86ff;
background: #e8f2ff;
border-radius: 12rpx;
} }
.wrapper { .wrapper {
width: 100%; width: 100%;
......
...@@ -2,27 +2,44 @@ ...@@ -2,27 +2,44 @@
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100%; background: #F3F4F8;
min-height: 100vh;
.title { .title {
padding: 32rpx; padding: 32rpx 0;
font-size: 48rpx; font-size: 48rpx;
font-weight: normal; font-weight: normal;
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
line-height: 54rpx; line-height: 54rpx;
white-space: nowrap;
color: #1b2026; color: #1b2026;
} }
.form { .form {
flex: 1; flex: 1;
padding: 32rpx;
font-size: 28rpx; font-size: 28rpx;
.from-item {
margin-top: 32rpx;
background-color: #fff;
box-sizing: border-box;
padding: 0 32rpx;
}
input { input {
font-size: 28rpx; font-size: 28rpx;
} }
.placeholder { .placeholder {
color: #77818f; color: #77818f;
} }
.from-item:nth-child(1) {
margin-top: 0;
}
} }
.footer { .footer {
padding: 16rpx 0; display: flex;
border-top: 2rpx solid rgb(31 35 41 / 15%); align-items: center;
justify-content: space-around;
width: 100%;
height: 100%;
} }
} }
<template> <template>
<div class="page"> <div class="page1">
<NavBar :showIcon="true" :showTitle="true" title="岗位信息" backgroundBox="#FFFFFF"></NavBar> <NavBar :showIcon="true" :showTitle="true" title="岗位信息" backgroundBox="#FFFFFF"></NavBar>
<div class="title">填写企业信息</div> <div class="title1">填写企业信息</div>
<div class="form"> <div class="form">
<formItem title="企业(单位)名称"> <formItem title="企业(单位)名称">
<input type="text" v-model="pinias.formData.companyName" placeholder="请填写单位名称" /> <input type="text" v-model="pinias.formData.companyName" placeholder="请填写单位名称" />
...@@ -16,9 +16,15 @@ ...@@ -16,9 +16,15 @@
<textarea type="text" v-model="pinias.formData.companyIntro" placeholder="请输入简介" /> <textarea type="text" v-model="pinias.formData.companyIntro" placeholder="请输入简介" />
</formItem> </formItem>
</div> </div>
<div class="footer"> <wd-tabbar
<button class="bottom-btn" @click="next">下一步</button> @tap="next"
</div> custom-style="display: flex;justify-content: center !important;z-index:1;"
fixed
placeholder
safeAreaInsetBottom
>
<view class="footer"> <button class="foot-btn" @click="next">下一步</button></view>
</wd-tabbar>
</div> </div>
</template> </template>
...@@ -47,8 +53,37 @@ const next = () => { ...@@ -47,8 +53,37 @@ const next = () => {
<style lang="scss" scoped> <style lang="scss" scoped>
@import "./index.scss"; @import "./index.scss";
.page1 {
background: #fff;
box-sizing: border-box;
padding: 0 32rpx;
.title1 {
padding: 32rpx 0;
font-size: 48rpx;
font-weight: normal;
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
line-height: 54rpx;
white-space: nowrap;
color: #1b2026;
}
.foot-btn {
display: flex;
align-items: center;
justify-content: center;
width: 622rpx;
height: 80rpx;
color: #ffffff;
background: #1f86ff;
border-radius: 12rpx;
}
}
textarea { textarea {
width: 100%; width: 100%;
height: 108px; height: 216rpx;
} }
</style> </style>
...@@ -23,9 +23,15 @@ ...@@ -23,9 +23,15 @@
<input type="number" v-model="params.phone" placeholder="请输入电话" /> <input type="number" v-model="params.phone" placeholder="请输入电话" />
</div> </div>
</div> </div>
<div class="footer"> <wd-tabbar
<button class="bottom-btn" @click="submit">保存</button> @tap="next"
</div> custom-style="display: flex;justify-content: center !important;z-index:1;"
fixed
placeholder
safeAreaInsetBottom
>
<view class="foot-btn" @click="submit">保存</view>
</wd-tabbar>
</div> </div>
</template> </template>
...@@ -123,9 +129,17 @@ const submit = () => { ...@@ -123,9 +129,17 @@ const submit = () => {
} }
} }
} }
.footer {
padding: 8px 0; .foot-btn {
border-top: 1rpx solid #1f232918; position: fixed;
display: flex;
align-items: center;
justify-content: center;
width: 622rpx;
height: 80rpx;
color: #ffffff;
background: #1f86ff;
border-radius: 12rpx;
} }
} }
</style> </style>
...@@ -98,20 +98,20 @@ const navList = reactive([ ...@@ -98,20 +98,20 @@ const navList = reactive([
removeToken(); removeToken();
}, },
text: "退出登录" text: "退出登录"
},
{
icon: new URL("@/static/image/user/loginout.png", import.meta.url).href,
url: "/pages/login/test",
fn: () => {
removeToken();
},
text: "退出登录(去测试登录)"
},
{
icon: new URL("@/static/image/user/loginout.png", import.meta.url).href,
url: "/pages/user/businessLicense/fillIn",
text: "企业认证"
} }
// {
// icon: new URL("@/static/image/user/loginout.png", import.meta.url).href,
// url: "/pages/login/test",
// fn: () => {
// removeToken();
// },
// text: "退出登录(去测试登录)"
// },
// {
// icon: new URL("@/static/image/user/loginout.png", import.meta.url).href,
// url: "/pages/user/businessLicense/fillIn",
// text: "企业认证"
// }
// //
]); ]);
/* 个人信息 */ /* 个人信息 */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<img v-if="params.logoPath" :src="evn.APP_IMAGE_BASE_API + params.logoPath" @click="chooseImage" /> <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" /> <img v-else src="@/static/image/temp/defaultCompany.png" alt="" @click="chooseImage" />
<div class="name">{{ companyInfo.name }}</div> <div class="name">{{ companyInfo.name }}</div>
<formItem title="营业执照" arrow :border="false" @click="jupmLicenseInfo"> <formItem style="margin-top: 80rpx" title="营业执照" arrow :border="false" @click="jupmLicenseInfo">
<p :class="`status${companyInfo.companyAudit?.status}`">{{ auditStatus }}</p> <p :class="`status${companyInfo.companyAudit?.status}`">{{ auditStatus }}</p>
</formItem> </formItem>
</div> </div>
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</formItem> </formItem>
<div class="textarea-wrap"> <div class="textarea-wrap">
<p class="label">公司介绍</p> <p class="label">公司介绍</p>
<textarea placeholder="请输入公司介绍" v-model="params.companyIntro" /> <textarea maxlength="500" placeholder="请输入公司介绍" v-model="params.companyIntro" />
</div> </div>
</div> </div>
</div> </div>
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<view class="item"> <view class="item">
<view class="label"> 有效期 </view> <view class="label"> 有效期 </view>
<view class="content"> <view class="content">
<wd-radio-group v-model="radio" shape="dot" inline :disabled="status != 2"> <wd-radio-group @change="change" v-model="radio" shape="dot" inline :disabled="status != 2">
<wd-radio :value="1">长期</wd-radio> <wd-radio :value="1">长期</wd-radio>
<wd-radio :value="2">具体时间</wd-radio> <wd-radio :value="2">具体时间</wd-radio>
</wd-radio-group> </wd-radio-group>
...@@ -60,12 +60,12 @@ ...@@ -60,12 +60,12 @@
<wd-calendar <wd-calendar
v-model="myLicenseValidityPeriod" v-model="myLicenseValidityPeriod"
:disabled="radio == 1 && status != 2" :disabled="radio == 1 && status != 2"
:min-date="new Date().getTime()" :min-date="minDate"
:max-date="new Date('2059/01/01').getTime()" :max-date="maxDate"
use-default-slot use-default-slot
> >
<view :class="`content ${radio == 1 ? 'disabled' : ''}`"> <view :class="`content ${radio == 1 ? 'disabled' : ''}`">
{{ (myLicenseValidityPeriod && dayjs(myLicenseValidityPeriod).format("YYYY-MM-DD")) || "请选择" }} {{ (myLicenseValidityPeriod && $formatTimestamp(myLicenseValidityPeriod, "YYYY-MM-DD")) || "请选择" }}
</view> </view>
</wd-calendar> </wd-calendar>
</view> </view>
...@@ -88,11 +88,21 @@ const companyName = ref(""); ...@@ -88,11 +88,21 @@ const companyName = ref("");
const myCode = ref(""); const myCode = ref("");
const myLicensePath = ref(""); const myLicensePath = ref("");
let status = ref(1); let status = ref(1);
let myLicenseValidityPeriod = ref(4102329600000); let myLicenseValidityPeriod = ref(new Date().getTime());
let companyInfo = reactive({}); let companyInfo = reactive({});
let minDate = ref(new Date().getTime());
let maxDate = ref(new Date().getTime() + 1000 * 60 * 60 * 24 * 365);
onReady(() => { onReady(() => {
getCompanyInfoApiFn(); getCompanyInfoApiFn();
}); });
function change(e) {
console.log(e);
if (e.value == 2) {
myLicenseValidityPeriod.value = new Date().getTime();
} else {
myLicenseValidityPeriod.value = 4102329600000;
}
}
function getCompanyInfoApiFn() { function getCompanyInfoApiFn() {
getCompanyInfoApi().then(res => { getCompanyInfoApi().then(res => {
companyInfo = res.data; companyInfo = res.data;
...@@ -102,11 +112,11 @@ function getCompanyInfoApiFn() { ...@@ -102,11 +112,11 @@ function getCompanyInfoApiFn() {
myCode.value = res.data.companyAudit.creditCode; myCode.value = res.data.companyAudit.creditCode;
myLicenseValidityPeriod.value = res.data.licenseValidityPeriod; myLicenseValidityPeriod.value = res.data.licenseValidityPeriod;
if (res.data.licenseValidityPeriod == 4102329600000) { // if (res.data.licenseValidityPeriod == 4102329600000) {
radio.value = 1; // radio.value = 1;
} else { // } else {
radio.value = 2; // radio.value = 2;
} // }
}); });
} }
/* 选择图片 */ /* 选择图片 */
......
import axios from "axios"; import axios from "axios";
import { getToken,removeToken } from "@/utils/token"; import { getToken,removeToken } from "@/utils/token";
// const baseURL = "https://lygsh-api.wjzpgz.com/"; const baseURL = "https://lygsh-api.wjzpgz.com/";
const baseURL = "http://192.168.11.179:8080/"; // const baseURL = "http://192.168.11.181:8080/";
// 创建一个 axios 实例 // 创建一个 axios 实例
const instance = axios.create({ const instance = axios.create({
baseURL, // 设置基础 URL baseURL, // 设置基础 URL
......
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