修改样式

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