修改样式

parent d5a8dbe7
...@@ -6,6 +6,12 @@ ...@@ -6,6 +6,12 @@
} }
}, },
"pages": [ "pages": [
{
"path": "pages/login/index",
"style": {
"navigationStyle": "custom"
}
},
{ {
"path": "pages/recommend/index", "path": "pages/recommend/index",
"style": { "style": {
...@@ -198,12 +204,6 @@ ...@@ -198,12 +204,6 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{
"path": "pages/login/index",
"style": {
"navigationStyle": "custom"
}
},
{ {
"path": "pages/test", "path": "pages/test",
......
...@@ -8,9 +8,8 @@ ...@@ -8,9 +8,8 @@
<text class="t1">乐业观山湖</text> <text class="t1">乐业观山湖</text>
<text class="t2">安全、便捷的就业、创业服务平台</text> <text class="t2">安全、便捷的就业、创业服务平台</text>
</view> </view>
<view class="unit-name">观山湖区人力资源和社会保障局</view>
<button class="login-btn" @click="login">授权手机号登录</button> <button class="login-btn" @click="login">授权手机号登录</button>
<view class="unit-name">观山湖区人力资源与社会保障局</view>
</view> </view>
<!-- {{ res }} --> <!-- {{ res }} -->
</div> </div>
...@@ -100,16 +99,16 @@ const login = () => { ...@@ -100,16 +99,16 @@ const login = () => {
// position: fixed; // position: fixed;
// bottom: 336rpx; // bottom: 336rpx;
// left: 50%; // left: 50%;
margin-top: 371 * 2rpx;
width: 640rpx; width: 640rpx;
height: 96rpx; height: 96rpx;
font-size: 34rpx; font-size: 34rpx;
margin-top: 100rpx;
line-height: 96rpx; line-height: 96rpx;
color: #ffffff; color: #ffffff;
background-color: #1f86ff; background-color: #1f86ff;
} }
.unit-name { .unit-name {
margin-top: 200rpx; margin-top: 421 * 2rpx;
font-size: 24rpx; font-size: 24rpx;
font-weight: 500; font-weight: 500;
color: #1b2026; color: #1b2026;
......
...@@ -44,26 +44,26 @@ ...@@ -44,26 +44,26 @@
</wd-col-picker> </wd-col-picker>
</form-item> </form-item>
</form-row> </form-row>
<!-- 职位标题 --> <!-- 岗位名称 -->
<form-row> <form-row>
<form-item title="职位标题" icon="arrow"> <form-item title="岗位名称" icon="arrow">
<input type="text" v-model="item.name" placeholder="输入职位标题如“财务总监”" /> <input type="text" v-model="item.name" placeholder="请输入岗位名称" />
</form-item> </form-item>
</form-row> </form-row>
<!-- 职位描述 --> <!-- 职位描述 -->
<form-row> <form-row>
<form-item title="位描述" :border="false" icon=""> <form-item title="位描述" :border="false" icon="">
<textarea maxlength="800" v-model="item.positionDesc" placeholder="请输入你的位描述"></textarea> <textarea maxlength="800" v-model="item.positionDesc" placeholder="请输入你的位描述"></textarea>
</form-item> </form-item>
</form-row> </form-row>
<form-item title="位薪资" icon=""> <form-item title="位薪资" icon="">
<view <view
v-if="item.settlementType == 4" v-if="item.settlementType == 4"
:class="`inner flex-between ${item.salaryText ? '' : 'placeholder'}`" :class="`inner flex-between ${item.salaryText ? '' : 'placeholder'}`"
style="display: flex; justify-content: space-between; width: 100%" style="display: flex; justify-content: space-between; width: 100%"
@click="onOpen(item, index)" @click="onOpen(item, index)"
> >
{{ item.salaryText || "请选择月薪范围" }} {{ item.salaryText || "请选择岗位薪资待遇" }}
<!-- <view class="arrow"></view> --> <!-- <view class="arrow"></view> -->
<checkbox <checkbox
...@@ -80,7 +80,8 @@ ...@@ -80,7 +80,8 @@
style="display: flex; justify-content: space-between; width: 100%" style="display: flex; justify-content: space-between; width: 100%"
@click="onOpen(item, index)" @click="onOpen(item, index)"
> >
{{ item.salaryText || "请选择时薪范围" }} <!-- {{ item.salaryText || "请选择时薪范围" }} -->
{{ item.salaryText || "请选择岗位薪资待遇" }}
<!-- <view class="arrow"></view> --> <!-- <view class="arrow"></view> -->
<checkbox <checkbox
class="checkbox" class="checkbox"
...@@ -92,7 +93,7 @@ ...@@ -92,7 +93,7 @@
</view> </view>
</form-item> </form-item>
<form-item title="工作地" icon=""> <form-item title="工作地" icon="">
<wd-col-picker <wd-col-picker
v-model="cityValue" v-model="cityValue"
:columns="cityOpstion" :columns="cityOpstion"
...@@ -103,7 +104,7 @@ ...@@ -103,7 +104,7 @@
use-default-slot use-default-slot
> >
<p :class="{ placeholder: !item.cityText }" class="text-single"> <p :class="{ placeholder: !item.cityText }" class="text-single">
{{ item.cityText || "请选择公司所在地" }} {{ item.cityText || "请选择岗位工作地点" }}
</p> </p>
</wd-col-picker> </wd-col-picker>
</form-item> </form-item>
...@@ -170,7 +171,7 @@ ...@@ -170,7 +171,7 @@
</form-item> </form-item>
</view> </view>
<form-row :fill="false"> <form-row :fill="false">
<form-item title="专业技术职称" icon="edit"> <form-item title="专业技术职称(选填)" icon="edit">
<input <input
type="text" type="text"
@input="inputMajor($event, item)" @input="inputMajor($event, item)"
...@@ -196,7 +197,7 @@ ...@@ -196,7 +197,7 @@
</form-item> </form-item>
</form-row> </form-row>
<form-row :fill="false"> <form-row :fill="false">
<form-item title="职业资格/技能等级证书" icon="edit"> <form-item title="职业资格/技能等级证书(选填)" icon="edit">
<input <input
type="text" type="text"
@input="inputLeve($event, item)" @input="inputLeve($event, item)"
...@@ -221,7 +222,7 @@ ...@@ -221,7 +222,7 @@
</wd-picker> </wd-picker>
</form-item> </form-item>
</form-row> </form-row>
<form-item title="特种作业证" icon="edit"> <form-item title="特种作业证(选填)" icon="edit">
<input v-model="item.specialCertificates" type="text" placeholder="请填写特种作业证" /> <input v-model="item.specialCertificates" type="text" placeholder="请填写特种作业证" />
</form-item> </form-item>
<form-row :fill="false"> <form-row :fill="false">
...@@ -382,6 +383,10 @@ const jobForm = ref([ ...@@ -382,6 +383,10 @@ const jobForm = ref([
{ {
text: "三险一金", text: "三险一金",
active: false active: false
},
{
text: "其他",
active: false
} }
] ]
} }
...@@ -700,14 +705,14 @@ const submitFrom = () => { ...@@ -700,14 +705,14 @@ const submitFrom = () => {
}); });
} }
} else { } else {
console.log("jobForm.value", jobForm.value);
const allValid = const allValid =
jobForm.value.length > 0 && jobForm.value.length > 0 &&
jobForm.value.every(item => { jobForm.value.every(item => {
return ( return (
item && item &&
validateForm(item, [ validateForm(
item,
[
"jobTypeId", "jobTypeId",
"jobTypeName", "jobTypeName",
"name", "name",
...@@ -718,7 +723,9 @@ const submitFrom = () => { ...@@ -718,7 +723,9 @@ const submitFrom = () => {
"minAgeRequirement", "minAgeRequirement",
"contactPhone", "contactPhone",
"contactPerson" "contactPerson"
]) ],
"post"
)
); );
}); });
if (allValid) { if (allValid) {
...@@ -736,7 +743,7 @@ const submitFrom = () => { ...@@ -736,7 +743,7 @@ const submitFrom = () => {
}); });
} else { } else {
xma.showToast({ xma.showToast({
title: "请填写完整", title: "请完善岗位信息",
icon: "none" icon: "none"
}); });
} }
...@@ -800,6 +807,10 @@ function addPost() { ...@@ -800,6 +807,10 @@ function addPost() {
{ {
text: "三险一金", text: "三险一金",
active: false active: false
},
{
text: "其他",
active: false
} }
] ]
}); });
......
...@@ -27,10 +27,10 @@ ...@@ -27,10 +27,10 @@
@tap="chooseImage(2)" @tap="chooseImage(2)"
/> />
<image v-else src="@/static/image/businessLicense/appealingIdcard.png" @tap="chooseImage(2)" /> <image v-else src="@/static/image/businessLicense/appealingIdcard.png" @tap="chooseImage(2)" />
<view>点击上传人身份证</view> <view>点击上传人身份证</view>
</view> </view>
</view> </view>
<view class="t1"> 请上传企业营业执照和人身份证正面照片 </view> <view class="t1"> 请上传企业营业执照和人身份证正面照片 </view>
<view class="t1"> (注:图片大小不超过10M) </view> <view class="t1"> (注:图片大小不超过10M) </view>
</view> </view>
<wd-tabbar <wd-tabbar
......
...@@ -147,7 +147,7 @@ function saveBasicInfoApiFn() { ...@@ -147,7 +147,7 @@ function saveBasicInfoApiFn() {
title: "提交中...", title: "提交中...",
mask: true mask: true
}); });
if (validateForm(params, ["avatarPath", "name", "phone", "position"])) { if (validateForm(params, ["name", "phone", "position"])) {
return saveBasicInfoApi(params).then(res => { return saveBasicInfoApi(params).then(res => {
xma.hideLoading(); xma.hideLoading();
if (res.code == 200) { if (res.code == 200) {
......
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.48:8080/"; const baseURL = "http://192.168.11.48:8080/";
// 创建一个 axios 实例 // 创建一个 axios 实例
const instance = axios.create({ const instance = axios.create({
baseURL, // 设置基础 URL baseURL, // 设置基础 URL
......
...@@ -81,8 +81,25 @@ export const formatTimestamp = (timestamp, formatString = "YYYY-MM-DD hh:mm:ss") ...@@ -81,8 +81,25 @@ export const formatTimestamp = (timestamp, formatString = "YYYY-MM-DD hh:mm:ss")
.replace(/ss/g, second); .replace(/ss/g, second);
}; };
export const validateForm = (formData, requiredFields) => { export const validateForm = (formData, requiredFields,type) => {
const phoneRegex = /^1[3-9]\d{9}$/; // 正则表达式匹配中国大陆手机号码 const phoneRegex = /^1[3-9]\d{9}$/; // 正则表达式匹配中国大陆手机号码
const fieldMapping = {
jobTypeText: "职位类型",
postitDesc: "职位描述",
jobName: "职位名称",
address: "工作地址",
identityRequirement: "身份要求",
educationRequirement: "学历要求",
maxAgeRequirement: "年龄要求",
contactPerson: "联系人",
jobType: "职位类型",
position: "职位",
name: "名字",
positionalTitle: "专业技术职称",
professionalCertificates: "职业等级证书",
specialCertificates: "特种作业证书",
avatarPath: "头像"
};
for (const field of requiredFields) { for (const field of requiredFields) {
const fieldValue = formData[field]; const fieldValue = formData[field];
if (field === "contactPhone" || field === "phone") { if (field === "contactPhone" || field === "phone") {
...@@ -95,47 +112,13 @@ export const validateForm = (formData, requiredFields) => { ...@@ -95,47 +112,13 @@ export const validateForm = (formData, requiredFields) => {
return false; return false;
} }
} else if (fieldValue === null || fieldValue === undefined || fieldValue === "") { } else if (fieldValue === null || fieldValue === undefined || fieldValue === "") {
console.log(field); const title = fieldMapping[field] || (type === 'post' ? "岗位信息" : "表单")
uni.showToast({ uni.showToast({
title: `请填写${ title: `请${type === 'post' ? '完善' : '填写'}${title}!`,
field === "jobTypeText"
? "职位类型"
: field === "postitDesc"
? "职位描述"
: field === "jobName"
? "职位名称"
: field === "address"
? "工作地址"
: field === "identityRequirement"
? "身份要求"
: field === "educationRequirement"
? "学历要求"
: field === "maxAgeRequirement"
? "年龄要求"
: field === "contactPerson"
? "联系人"
: field === "jobType"
? "职位类型"
: field === "maxAgeRequirement"
? "年龄"
: field === "position"
? "职位"
: field === "name"
? "名字"
: field === "positionalTitle"
? "专业技术职称"
: field === "professionalCertificates"
? "职业等级证书"
: field === "specialCertificates"
? "特种作业证书"
: field === "avatarPath"
? "头像"
: "表单"
}!`,
icon: "none", icon: "none",
duration: 2000 duration: 2000
}); });
return false; return false;
} }
} }
......
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