bug修复

parent 0cea30ae
import instance from "@/utils/request";
// 获取消息分页
export const getMessagePageList = params => instance.post("/message/getPageList", params);
export const getMessagePageList = params => instance.post("/message/consumer/getPageList", params);
......@@ -8,7 +8,7 @@ export const submitResumeApi = id => instance.post(`/job/application/${id}`);
// 获取投递
export const getSubmitResumeApi = id => instance.post(`/job/getApplication/${id}`);
// 获取职位详情
export const getCompanyDetailApi = id => instance.post(`/company/detail/${id}`);
export const getCompanyDetailApi = id => instance.post(`/job/company/detail/${id}`);
// 需求信息分页
export const getNeedListApi = data => instance.post("/need/getPageList", data);
......
......@@ -7,7 +7,10 @@
class="item flex-between"
:class="[v.infoType == 1 ? 'layout1' : 'layout2']"
>
<img :src="evn.APP_IMAGE_BASE_API + v.thumbnailPath" v-if="v.infoType == 2" />
<view v-if="v.infoType == 2" class="view-box">
<img :src="evn.APP_IMAGE_BASE_API + v.thumbnailPath" />
<wd-icon name="play-circle" size="36px" class="icon"></wd-icon>
</view>
<view>
<view class="title">{{ v.title }}</view>
<view class="flex-align-center">
......@@ -81,10 +84,22 @@ const props = defineProps({
.layout2 {
flex-direction: column;
align-items: flex-start;
img {
.view-box {
position: relative;
width: 100%;
height: 294rpx;
margin: 0;
img {
width: 100%;
height: 294rpx;
margin: 0;
}
.icon {
position: absolute;
top: 50%;
left: 50%;
margin: auto;
color: #ffffff;
transform: translateX(-50%) translateY(-50%);
}
}
.title {
margin-top: 32rpx;
......
......@@ -9,7 +9,7 @@
</view>
<view class="flex-between">
<text class="company-name">{{ data.companyName }}</text>
<text class="address">贵阳-观山湖区</text>
<text class="address">{{ data.cityName + "-" + data.districtName }}</text>
</view>
</view>
</template>
......
......@@ -42,7 +42,10 @@
@close="handlePickerClose"
>
<view class="flex-align-center tags">
<div v-for="(item, index) in mValue" :key="index" type="primary">{{ item.name }}</div>
<div v-for="(item, index) in mValue" :key="index" type="primary">
{{ item.name }}
<wd-icon name="close" size="22rpx" style="color: gray" @tap="deleteItem(index)"></wd-icon>
</div>
</view>
<view class="wd-col-picker__selected">
<scroll-view :scroll-x="true" scroll-with-animation :scroll-left="scrollLeft">
......@@ -117,7 +120,7 @@ const $item = ".wd-col-picker__selected-item";
const props = defineProps(colPickerProps);
console.log(props.mMax);
console.log(props.mValue);
const emit = defineEmits(["close", "update:modelValue", "update:mValue", "confirm"]);
const emit = defineEmits(["close", "update:modelValue", "update:mValue", "confirm", "delete:mValue"]);
const pickerShow = ref<boolean>(false);
const currentCol = ref<number>(0);
......@@ -157,6 +160,10 @@ const showValue = computed(() => {
}
});
const deleteItem = index => {
emit("delete:mValue", index);
};
watch(
() => props.modelValue,
newValue => {
......
......@@ -13,6 +13,13 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/webView/index",
"style": {
"navigationBarTitleText": "webWiew",
"navigationStyle": "custom"
}
},
{
"path": "pages/messageList/index",
"style": {
......@@ -201,6 +208,7 @@
"borderStyle": "black",
"backgroundColor": "#FFFFFF",
"position": "bottom",
"iconWidth": "52rpx",
"list": [
{
"pagePath": "pages/postionList/index",
......
......@@ -14,6 +14,10 @@
{{ data.views }}
</div>
</div>
<view class="title-bottom">
<text>相关介绍</text>
<img class="title-photo" src="@/static/image/article/relevant.png" alt="" />
</view>
<div class="content" v-html="data.content"></div>
</div>
</div>
......@@ -69,5 +73,21 @@ onLoad(({ id }) => {
}
}
}
.title-bottom {
position: relative;
width: 150rpx;
margin-bottom: 16rpx;
text {
font-size: 36rpx;
font-weight: 600;
}
.title-photo {
position: absolute;
right: 0;
bottom: 0;
width: 122rpx;
height: 16rpx;
}
}
}
</style>
<template>
<NavBar :showIcon="false" backgroundBox="#ffffff" :showTitle="true" title="动态"></NavBar>
<div class="policy">
<div class="tab-name" :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)">{{
v.name
}}</view>
<view style="padding-bottom: 40px">
<NavBar :showIcon="false" backgroundBox="#ffffff" :showTitle="true" title="动态"></NavBar>
<div class="policy">
<div class="tab-name" :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)">{{
v.name
}}</view>
</div>
<scroll-view :scroll-y="true" class="content" @scrolltolower="getData()">
<article-list :list="list"></article-list>
</scroll-view>
</div>
<scroll-view :scroll-y="true" class="content" @scrolltolower="getData()">
<article-list :list="list"></article-list>
</scroll-view>
</div>
</view>
</template>
<script setup>
......
<template>
<NavBar :showIcon="false" backgroundBox="#ffffff" :showTitle="true" title="消息"></NavBar>
<div class="message-list">
<scroll-view :scroll-y="true" @scrolltolower="getList">
<view class="system">
<view class="item flex-between" v-for="(v, i) in list" :key="i">
<img src="@/static/image/user/default-avatar.png" alt="" />
<view class="content">
<view class="name-date flex-between">
<text class="name">{{ v.title || "" }}</text>
<text class="date">2024-06-21 12:30</text>
</view>
<view class="message flex-between">
<text>{{ v.content }}</text>
<view class="flex-align-center">
<text class="link">立即前往</text>
<view class="arrow"></view>
<view style="padding-bottom: 40px">
<NavBar :showIcon="false" backgroundBox="#ffffff" :showTitle="true" title="消息"></NavBar>
<div class="message-list">
<scroll-view :scroll-y="true" @scrolltolower="getList">
<view class="system">
<view class="item flex-between" v-for="(v, i) in list" :key="i">
<img src="@/static/image/user/default-avatar.png" alt="" />
<view class="content">
<view class="name-date flex-between">
<text class="name">{{ v.title || "" }}</text>
<text class="date">2024-06-21 12:30</text>
</view>
<view class="message flex-between">
<text>{{ v.content }}</text>
<view class="flex-align-center">
<text class="link">立即前往</text>
<view class="arrow"></view>
</view>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
</div>
</scroll-view>
</div>
</view>
</template>
<script setup>
......@@ -32,11 +34,22 @@ import _ from "lodash";
const list = ref([]);
let pageNo = 1;
onShow(() => {
getList();
resetData().then(res => {
getList();
});
});
// 重置数据
const resetData = () => {
return new Promise(resolve => {
pageNo = 1;
list.value = [];
resolve();
});
};
const getList = () => {
getMessagePageList({
pageNo: pageNo++,
pageNo: pageNo,
pageSize: 10
}).then(res => {
res.data.forEach(async v => {
......@@ -46,6 +59,10 @@ const getList = () => {
list.value = _.concat(list.value, res.data);
});
};
onReachBottom(() => {
pageNo++;
getList();
});
</script>
<style lang="scss" scoped>
......
<template>
<NavBar :showIcon="false" backgroundBox="#ffffff" :showTitle="true" title="政策"></NavBar>
<div class="policy">
<div class="tab-name" :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)">{{
v.name
}}</view>
<view style="padding-bottom: 40px">
<NavBar :showIcon="false" backgroundBox="#ffffff" :showTitle="true" title="政策"></NavBar>
<div class="policy">
<div class="tab-name" :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)">{{
v.name
}}</view>
</div>
<scroll-view :scroll-y="true" class="content" @scrolltolower="getData()">
<article-list :list="list"></article-list>
</scroll-view>
</div>
<scroll-view :scroll-y="true" class="content" @scrolltolower="getData()">
<article-list :list="list"></article-list>
</scroll-view>
</div>
</view>
</template>
<script setup>
......
......@@ -21,7 +21,7 @@
<view class="pos-name">{{ partTimeJobData.name }}</view>
<view class="cos-position">
<!-- <text>{{partTimeJobData.placeCityName}}</text> -->
<text>贵州</text>
<text>{{ partTimeJobData.cityName }}</text>
<text class="margin-8">|</text>
<text>{{ partTimeJobData.jobList?.length }}个在招职位</text>
</view>
......@@ -154,7 +154,7 @@ const onTouchEnd = e => {
};
const setRecommendTop = () => {
const { windowHeight, windowTop } = uni.getWindowInfo();
top.value = 60;
top.value = 200;
recommendTop.value = windowHeight - 178;
};
......
This diff is collapsed.
......@@ -6,7 +6,7 @@
<input placeholder="请输入要查询的内容" placeholder-class="log-input-p" type="text" />
</view>
<view class="list">
<view class="item flex-between" v-for="v in platformList" :key="v.id">
<view class="item flex-between" v-for="v in platformList" :key="v.id" @tap="toWeb(v.link)">
<view class="com flex-align-center">
<image :src="evn.APP_IMAGE_BASE_API + v.logo" />
<view class="text">
......@@ -51,6 +51,11 @@ onLoad(opstion => {
});
getData();
});
const toWeb = url => {
uni.navigateTo({
url: `/pages/webView/index?url=${url}`
});
};
</script>
<style lang="scss" scoped>
......
......@@ -105,9 +105,10 @@
>
</view>
<view class="cos-position">
<text>{{ partTimeJobData.company?.placeCityName }}</text>
<text>{{ partTimeJobData.countRecruiting | 0 }} <text class="margin-8">|</text>个在招职位</text>
<text
>{{ partTimeJobData.company.cityName || "" }} <text class="margin-8"></text> |
<text class="margin-8"></text>{{ partTimeJobData.company.pubJobNum || 0 }}个在招职位</text
>
</view>
<!-- <img class="modu-icon" src="@/static/image/temp/test.jpg" /> -->
<view class="arrow modu-icon"></view>
......
......@@ -2,11 +2,16 @@
<NavBar :showIcon="true" :showTitle="true" title="教育经历" backgroundBox="#ffffff"></NavBar>
<view class="item">
<view class="label">学校名称</view>
<input v-model="params.schoolName" placeholder="请输入用户名" border="{{ false }}" />
<input
v-model="params.schoolName"
placeholder-style="font-size: 24rpx;"
placeholder="请输入用户名"
border="{{ false }}"
/>
</view>
<view class="item">
<view class="label">专业名称</view>
<input v-model="params.major" placeholder="请输入用户名" border="{{ false }}" />
<input v-model="params.major" placeholder-style="font-size: 24rpx;" placeholder="请输入用户名" border="{{ false }}" />
</view>
<view class="item">
......@@ -51,7 +56,31 @@ import { saveEducationExperienceApi } from "@/api/user";
import dayjs from "dayjs";
import { reactive } from "vue";
const params = reactive({ schoolName: "", startDate: 0, endDate: 0, major: "" });
let allList = [];
let modify = false;
let dataIndex = null;
onLoad(options => {
if (options.data) {
// 获取并解码 JSON 字符串
const arrayStr = decodeURIComponent(options.data);
const arrayData = JSON.parse(arrayStr);
allList = [...arrayData];
console.log("allList", allList);
if (options.index) {
modify = true;
dataIndex = options.index * 1;
const data = arrayData[options.index];
params.schoolName = data.schoolName;
params.major = data.major;
params.startDate = data.startDate;
params.endDate = data.endDate;
allList = allList.filter((item, index) => index !== options.index * 1);
console.log("allList", allList);
}
}
});
const format = date => date && dayjs(date).format("YYYY-MM-DD");
const submit = () => {
let really = true;
for (let key in params) {
......@@ -66,7 +95,12 @@ const submit = () => {
});
return;
}
saveEducationExperienceApi(JSON.stringify([params])).then(res => {
if (modify) {
allList.splice(dataIndex, 0, params);
} else {
allList.push(params);
}
saveEducationExperienceApi(JSON.stringify(allList)).then(res => {
if (res.code === 200) {
uni.showToast({
title: "保存成功",
......@@ -100,7 +134,7 @@ const submit = () => {
.inner {
height: 88rpx;
padding: 0 32rpx;
font-size: 28rpx;
font-size: 24rpx;
line-height: 88rpx;
}
textarea {
......
<template>
<div class="essential-information">
<NavBar :showIcon="true" :showTitle="true" title="基本信息"></NavBar>
<NavBar backgroundBox="#ffffff" :showIcon="true" :showTitle="true" title="基本信息"></NavBar>
<view
class="real-name-authentication flex-between"
v-if="verified == 0"
@tap="navigateTo('/pages/user/resume/realNameAuthentication/index')"
@tap="toIdcard"
data-url="/subPackages/resume/pages/real-name-authentication/real-name-authentication"
>
<view class="flex-align-center">
......@@ -25,6 +25,17 @@
<img class="avatar" v-if="userInfo.avatarPath" :src="evn.APP_IMAGE_BASE_API + userInfo.avatarPath" />
<img class="avatar" v-else src="@/static/image/user/default-avatar.png" />
</view>
<view class="my-info-list flex-column">
<view class="my-info-title label">
<text>昵称</text>
</view>
<input
class="my-info-form"
v-model="userInfo.realName"
placeholder="请输入"
placeholder-class="placeholder-style"
/>
</view>
<!-- 性别 -->
<view class="my-info-list pd-b-38">
<view class="my-info-title label">
......@@ -127,6 +138,20 @@
<text>邮箱</text>
</view>
<input
cursor-spacing="30"
class="my-info-form"
v-model="userInfo.email"
placeholder="请填写邮箱"
placeholder-class="placeholder-style"
/>
</view>
<!-- 邮箱 -->
<view class="my-info-list flex-column" style="opacity: 0">
<view class="my-info-title label">
<text>邮箱</text>
</view>
<input
cursor-spacing="30"
class="my-info-form"
v-model="userInfo.email"
placeholder="请填写邮箱"
......@@ -151,27 +176,40 @@ let verified = ref(0);
const cropperFlag = 0;
const identityCode = 0;
const userInfo = ref({
userId: "575447396285247488",
username: "15585110655",
avatarPath: "v2MpPublishMedia/2024-07-16/1721120465826.jpg",
realName: "陈家驹",
userId: "",
username: "",
avatarPath: "user/default-avatar.png",
realName: "",
gender: 2,
phone: "13368604081",
email: "15165156@qq.com",
birthDate: 1633017600000,
phone: "",
email: "",
birthDate: "",
identityType: 2,
educationLevel: 6,
workExperience: 11,
personalTags: null,
verified: 1,
loginTime: 1721804335908,
loginTime: "",
jobStatus: 1,
completeResume: false,
user: null
});
onMounted(() => {
getData();
getEumDataFn().then(res => {
getData();
});
});
// 页面跳转
const toIdcard = () => {
uni.navigateTo({
url: "/pages/user/resume/realNameAuthentication/index",
success: function (res) {
// 通过eventChannel向被打开页面传送数据
res.eventChannel.emit("pageEvent", userInfo.value);
}
});
};
/* 头像 */
const bindUploadImg = () => {
uni.chooseFile({
......@@ -212,12 +250,18 @@ getEumData("EnumIdentityType").then(res => {
/* 学历 */
const educationText = ref("");
const educationOpstion = ref([]);
getEumData("EnumEducation").then(res => {
res.forEach(v => {
v.code = v.code * 1;
const getEumDataFn = () => {
return new Promise(resolve => {
getEumData("EnumEducation").then(res => {
res.forEach(v => {
v.code = v.code * 1;
});
educationOpstion.value = res;
resolve();
});
});
educationOpstion.value = res;
});
};
const changeEducationLevel = e => {
educationText.value = e.selectedItems.text;
};
......@@ -231,6 +275,7 @@ const getData = async () => {
return;
}
userInfo.value = data;
educationText.value = educationOpstion.value[data.educationLevel - 1].text;
}
};
......@@ -604,10 +649,11 @@ const submit = () => {
}
}
.my-form-submit {
position: absolute;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
padding-bottom: env(safe-area-inset-bottom);
text-align: center;
border-top: 1rpx solid #ebebeb;
}
......
......@@ -33,7 +33,7 @@
</wd-picker>
</view>
<!-- 个人优势 -->
<view class="advantage" @click="navigateTo('/pages/user/resume/introduce/index')">
<view class="advantage" @click="navigateTo(`/pages/user/resume/introduce/index?data=${resumeData.personalAdvantage}`)">
<view class="flex-between">
<text class="gradient-title">个人优势</text>
<view class="arrow" bind:tap="navigateTo"></view>
......@@ -43,44 +43,100 @@
</view>
</view>
<!-- 求职意向 -->
<view class="intention" @click="navigateTo('/pages/user/resume/jobIntention/index')">
<view
class="intention"
@click="navigateTo(`/pages/user/resume/jobIntention/index?data=${encodeURIComponent(JSON.stringify(resumeData))}`)"
>
<view class="flex-between">
<text class="gradient-title">求职意向</text>
<view class="arrow"></view>
</view>
<view class="postion">{{ resumeData.preferredPosition }}</view>
<view class="salary">{{ resumeData.minSalary }}-{{ resumeData.maxSalary }}| {{ resumeData.preferredCityName }}</view>
<view class="salary"
>{{ resumeData.minSalary }}{{ resumeData.minSalary ? "-" : "" }}{{ resumeData.maxSalary
}}{{ resumeData.preferredCityName ? "| " : "" }} {{ resumeData.preferredCityName }}</view
>
</view>
<!-- 工作经历 -->
<view class="experience" @click="navigateTo('/pages/user/resume/workExperience/index')">
<view class="experience">
<view class="flex-between">
<text class="gradient-title">工作经历</text>
<view class="arrow"></view>
<wd-icon
name="add"
size="24rpx"
@click="
navigateTo(
`/pages/user/resume/workExperience/index?data=${encodeURIComponent(
JSON.stringify(resumeData.workExperience)
)}`
)
"
></wd-icon>
</view>
<view class="list">
<view class="item" v-for="(item, index) in resumeData.workExperience" :key="index">
<view
class="item"
v-for="(item, index) in resumeData.workExperience"
:key="index"
@tap="
navigateTo(
`/pages/user/resume/workExperience/index?data=${encodeURIComponent(
JSON.stringify(resumeData.workExperience)
)}&index=${index}`
)
"
>
<view class="name-date flex-between">
<text class="name">·{{ item.companyName }}</text>
<text class="date">{{ item.startDate }} ~ {{ item.endDate }}</text>
</view>
<view class="postion">·{{ item.position }}</view>
<view class="content"> ·{{ item.content }} </view>
<view class="flex-between">
<view>
<view class="postion">·{{ item.position }}</view>
<view class="content"> ·{{ item.content }} </view>
</view>
<wd-icon name="error-fill" size="36rpx" style="color: red" @tap.stop="deleteItem(index)"></wd-icon>
</view>
</view>
</view>
</view>
<!-- 教育经历 -->
<view class="experience" @click="navigateTo('/pages/user/resume/educationExperience/index')">
<view class="experience">
<view class="flex-between">
<text class="gradient-title">教育经历</text>
<view class="arrow"></view>
<wd-icon
name="add"
size="24rpx"
@click="
navigateTo(
`/pages/user/resume/educationExperience/index?data=${encodeURIComponent(
JSON.stringify(resumeData.educationExperience)
)}`
)
"
></wd-icon>
</view>
<view class="list">
<view class="item" v-for="(item, index) in resumeData.educationExperience" :key="index">
<view
class="item"
v-for="(item, index) in resumeData.educationExperience"
:key="index"
@tap="
navigateTo(
`/pages/user/resume/educationExperience/index?data=${encodeURIComponent(
JSON.stringify(resumeData.educationExperience)
)}&index=${index}`
)
"
>
<view class="name-date flex-between">
<text class="name">·{{ item.schoolName }}</text>
<text class="date">{{ item.startDate }}~{{ item.endDate }}</text>
</view>
<view class="postion">·{{ item.major }}</view>
<view class="flex-between">
<view class="postion">·{{ item.major }}</view>
<wd-icon name="error-fill" size="36rpx" style="color: red" @tap.stop="deleteItemTwo(index)"></wd-icon>
</view>
<!-- <view class="content">
·内容:预计,建筑工程将在今年底竣工。宿舍会在明年8月启用,让多达600名学生入住。
国大学生事务处处长何汉杰说,国大的宿舍都各有特色,并解释为何要兴建以体育为主题的宿舍。
......@@ -94,7 +150,13 @@
<script setup>
import { reactive } from "vue";
import { getUserResumeApi, getLoginUserApi, saveJobStatusApi } from "@/api/user";
import {
getUserResumeApi,
getLoginUserApi,
saveJobStatusApi,
saveWorkExperienceApi,
saveEducationExperienceApi
} from "@/api/user";
import { getEnumText, getEumData } from "@/utils/utils.js";
import { useToast } from "wot-design-uni";
import { navigateTo } from "@/utils/utils.js";
......@@ -139,14 +201,26 @@ const getUserResume = () => {
preferredPosition,
maxSalary,
minSalary,
preferredProvinceName,
preferredProvinceCode,
preferredCityName,
preferredCityCode,
preferredDistrictName,
preferredDistrictCode,
workExperience,
educationExperience
educationExperience,
preferredPositionId
} = res.data;
resumeData.preferredCityName = preferredCityName;
resumeData.citySelectedItems = [
{ name: preferredProvinceName, code: preferredProvinceCode },
{ name: preferredCityName, code: preferredCityCode },
{ name: preferredDistrictName, code: preferredDistrictCode }
];
resumeData.personalAdvantage = personalAdvantage; // 求职状态回
resumeData.preferredPosition = preferredPosition.split(",").join("|");
resumeData.preferredPositionId = preferredPositionId.split(",");
resumeData.maxSalary = maxSalary && maxSalary / 1000 + "k";
resumeData.minSalary = minSalary && minSalary / 1000 + "k";
resumeData.workExperience = JSON.parse(workExperience || "[]");
......@@ -191,11 +265,59 @@ const changeJobStatus = async e => {
const { code, message } = await saveJobStatusApi({ jobStatus: e.value });
if (code == 200) {
resumeData.jobStatusText = e.selectedItems.text;
toast.success("保存成功");
uni.showToast({
message: "保存成功",
icon: "none"
});
} else {
toast.error(message);
uni.showToast({
message: message,
icon: "none"
});
}
};
const deleteItem = index => {
uni.showModal({
title: "删除",
content: "是否删除该条记录?",
success: async res => {
if (res.confirm) {
console.log("resumeData.workExperience", resumeData.workExperience);
resumeData.workExperience.splice(index, 1);
saveWorkExperienceApi(JSON.stringify(resumeData.workExperience)).then(res => {
if (res.code == 200) {
uni.showToast({
title: "删除成功",
icon: "success"
});
}
});
}
}
});
};
const deleteItemTwo = index => {
uni.showModal({
title: "删除",
content: "是否删除该条记录?",
success: async res => {
if (res.confirm) {
console.log("resumeData.workExperience", resumeData.workExperience);
resumeData.educationExperience.splice(index, 1);
saveEducationExperienceApi(JSON.stringify(resumeData.educationExperience)).then(res => {
if (res.code == 200) {
uni.showToast({
title: "删除成功",
icon: "success"
});
}
});
}
}
});
};
</script>
<style lang="scss" scoped>
......
......@@ -19,6 +19,10 @@
import { ref } from "vue";
import { saveAdvantageApi } from "@/api/user.js";
const inputvalue = ref("");
onLoad(options => {
inputvalue.value = options.data;
});
const save = () => {
saveAdvantageApi({ personalAdvantage: inputvalue.value }).then(res => {
console.log(res);
......
......@@ -17,6 +17,7 @@
:column-change="columnChange"
:before-confirm="beforeConfirm"
@confirm="handleConfirm"
@delete:mValue="handleDelete"
use-default-slot
>
<view class="form-item">
......@@ -82,11 +83,35 @@ import _ from "lodash";
const value = ref([]);
const mValue = ref([]);
const columns = ref([]);
onLoad(options => {
if (options.data) {
const data = JSON.parse(decodeURIComponent(options.data));
console.log("data,", data);
const preferredPositionList = data.preferredPosition.split("|");
mValue.value = preferredPositionList.map((item, index) => {
return {
name: item,
id: data.preferredPositionId[index]
};
});
citySelectedItems = data.citySelectedItems;
cityText.value = citySelectedItems.map(v => v.name).join("-");
salarySelectedItems = [{ value: data.minSalary.slice(0, -1) * 1000 }, { value: data.maxSalary.slice(0, -1) * 1000 }];
salaryText.value = data.minSalary.slice(0, -1) * 1000 + "元" + "~" + data.maxSalary.slice(0, -1) * 1000 + "元";
console.log("salarySelectedItems", salarySelectedItems);
}
});
const handleDelete = index => {
mValue.value.splice(index, 1);
};
dictJobTypeApi({}).then(res => {
columns.value.push(res.data);
console.log(columns);
});
const columnChange = ({ selectedItem, resolve, finish }) => {
console.log("columnChange", selectedItem);
if (selectedItem.children) {
resolve(selectedItem.children);
} else {
......@@ -94,17 +119,19 @@ const columnChange = ({ selectedItem, resolve, finish }) => {
}
};
const beforeConfirm = (value2, selectedItems, resolve) => {
console.log("selectedItems", selectedItems);
/* 判断是否点到重复的 */
const tagter = _.last(selectedItems);
const index = mValue.value.indexOf(tagter);
if (index != -1) {
mValue.value.splice(index, 1);
} else {
console.log("tagter", tagter);
mValue.value.push(tagter);
if (mValue.value.length >= 3) {
// _.pullAt(mValue.value, 0);
resolve(true);
}
// if (mValue.value.length >= 3) {
// _.pullAt(mValue.value, 0);
resolve(true);
// }
}
resolve(false);
};
......
......@@ -6,7 +6,7 @@
<view class="input-form">
<view class="item">
<view class="label">姓名</view>
<input type="text" v-model="data.realName" placeholder="请输入姓名" />
<input type="text" :value="data.realName" placeholder="请输入姓名" />
</view>
<view class="item">
<view class="label">身份证号</view>
......@@ -32,7 +32,7 @@
</template>
<script setup>
import { ref, reactive } from "vue";
import { ref, reactive, getCurrentInstance } from "vue";
import { uploadFiles } from "@/utils/fileUpload.js";
import evn from "@/utils/config.js";
import { saveIdCardApi } from "@/api/user.js";
......@@ -44,6 +44,16 @@ const data = reactive({
});
const idCardFrontPathDefle = new URL("@/static/image/user/idcardFront.png", import.meta.url);
const idCardBackPathDefle = new URL("@/static/image/user/idcardBack.png", import.meta.url);
onLoad(() => {
const instance = getCurrentInstance().proxy;
const eventChannel = instance.getOpenerEventChannel();
eventChannel.on("pageEvent", function (datas) {
data.realName = datas.realName;
data.citizenId = datas.citizenId;
data.idCardFrontPath = datas.idCardFrontPath;
data.idCardBackPath = datas.idCardBackPath;
});
});
const uploadeImage = type => {
// 正面
......@@ -62,8 +72,31 @@ const uploadeImage = type => {
});
};
const submit = () => {
let release = true;
for (let i in data) {
if (!data[i]) {
release = false;
}
}
if (!release) {
uni.showToast({
title: "请完善信息",
icon: "none"
});
return;
}
saveIdCardApi(data).then(res => {
console.log(res);
if (res.code == 200) {
uni.showToast({
title: "提交成功",
icon: "none"
});
setTimeout(() => {
uni.navigateBack({
delta: 1
});
}, 1500);
}
});
};
</script>
......@@ -115,6 +148,7 @@ const submit = () => {
.btn-wrap {
position: fixed;
bottom: 0;
left: 0;
box-sizing: border-box;
width: 100%;
padding: 16rpx 64rpx;
......
......@@ -33,6 +33,7 @@
:maxDate="new Date().getTime()"
type="year-month"
v-model="params.endDate"
:formatter="formatter"
/>
</view>
</view>
......@@ -63,7 +64,7 @@
<view class="form-item">
<view class="form-info">
<view class="label">工作内容</view>
<textarea v-model="params.content" placeholder="请输入" />
<textarea :maxlength="500" v-model="params.content" placeholder="请输入" />
</view>
</view>
</view>
......@@ -90,9 +91,43 @@ const params = reactive({
position: "",
content: ""
});
let allList = [];
let modify = false;
let dataIndex = null;
const postionValue = ref([]);
const postionOpstion = ref([]);
const value = ref(Date.now());
onLoad(options => {
if (options.data) {
const arrayStr = decodeURIComponent(options.data);
const arrayData = JSON.parse(arrayStr);
allList = [...arrayData];
if (options.index) {
modify = true;
dataIndex = options.index * 1;
const data = arrayData[options.index];
console.log("data", data);
params.companyName = data.companyName;
params.startDate = data.startDate;
params.endDate = data.endDate;
jobTypeText.value = data.position;
params.content = data.content;
allList = allList.filter((item, index) => index !== options.index * 1);
console.log("allList", allList);
}
}
});
const formatter = (type, value) => {
switch (type) {
case "year":
return value + "年";
case "month":
return value + "月";
default:
return "至今";
}
};
dictJobTypeApi({}).then(res => {
postionOpstion.value.push(res.data);
});
......@@ -122,7 +157,12 @@ const save = () => {
});
return;
}
saveWorkExperienceApi(JSON.stringify([params])).then(res => {
if (modify) {
allList.splice(dataIndex, 0, params);
} else {
allList.push(params);
}
saveWorkExperienceApi(JSON.stringify(allList)).then(res => {
console.log(res);
if (res.code == 200) {
uni.showToast({
......
<template>
<web-view :src="url"></web-view>
</template>
<script setup>
import { ref } from "vue";
let url = ref("");
onLoad(options => {
url.value = options.url;
});
</script>
<style lang="scss" scoped></style>
src/static/image/tabBar/community.png

1.72 KB | W: | H:

src/static/image/tabBar/community.png

1.72 KB | W: | H:

src/static/image/tabBar/community.png
src/static/image/tabBar/community.png
src/static/image/tabBar/community.png
src/static/image/tabBar/community.png
  • 2-up
  • Swipe
  • Onion skin
src/static/image/tabBar/home.png

824 Bytes | W: | H:

src/static/image/tabBar/home.png

897 Bytes | W: | H:

src/static/image/tabBar/home.png
src/static/image/tabBar/home.png
src/static/image/tabBar/home.png
src/static/image/tabBar/home.png
  • 2-up
  • Swipe
  • Onion skin
src/static/image/tabBar/homeActive.png

890 Bytes | W: | H:

src/static/image/tabBar/homeActive.png

992 Bytes | W: | H:

src/static/image/tabBar/homeActive.png
src/static/image/tabBar/homeActive.png
src/static/image/tabBar/homeActive.png
src/static/image/tabBar/homeActive.png
  • 2-up
  • Swipe
  • Onion skin
src/static/image/tabBar/msg.png

668 Bytes | W: | H:

src/static/image/tabBar/msg.png

763 Bytes | W: | H:

src/static/image/tabBar/msg.png
src/static/image/tabBar/msg.png
src/static/image/tabBar/msg.png
src/static/image/tabBar/msg.png
  • 2-up
  • Swipe
  • Onion skin
src/static/image/tabBar/msgActive.png

693 Bytes | W: | H:

src/static/image/tabBar/msgActive.png

803 Bytes | W: | H:

src/static/image/tabBar/msgActive.png
src/static/image/tabBar/msgActive.png
src/static/image/tabBar/msgActive.png
src/static/image/tabBar/msgActive.png
  • 2-up
  • Swipe
  • Onion skin
src/static/image/tabBar/policy.png

1.55 KB | W: | H:

src/static/image/tabBar/policy.png

1.24 KB | W: | H:

src/static/image/tabBar/policy.png
src/static/image/tabBar/policy.png
src/static/image/tabBar/policy.png
src/static/image/tabBar/policy.png
  • 2-up
  • Swipe
  • Onion skin
src/static/image/tabBar/user.png

1.09 KB | W: | H:

src/static/image/tabBar/user.png

1.17 KB | W: | H:

src/static/image/tabBar/user.png
src/static/image/tabBar/user.png
src/static/image/tabBar/user.png
src/static/image/tabBar/user.png
  • 2-up
  • Swipe
  • Onion skin
src/static/image/tabBar/userActive.png

1.15 KB | W: | H:

src/static/image/tabBar/userActive.png

1.26 KB | W: | H:

src/static/image/tabBar/userActive.png
src/static/image/tabBar/userActive.png
src/static/image/tabBar/userActive.png
src/static/image/tabBar/userActive.png
  • 2-up
  • Swipe
  • Onion skin
import axios from "axios";
import { getToken } from "./token";
// const baseURL = "https://lygsh-api.wjzpgz.com/";
const baseURL = "http://192.168.11.158:8080/";
const baseURL = "http://192.168.11.181:8080/";
// 创建一个 axios 实例
const instance = axios.create({
baseURL, // 设置基础 URL
......@@ -33,6 +33,27 @@ instance.interceptors.request.use(
// 响应拦截器
instance.interceptors.response.use(
response => {
if (response.data.code === 4 || response.data.code === 8) {
uni.showToast({
title: response.data.message,
icon: "none"
});
}
if (response.data.code === 9) {
uni.showModal({
title: "提示",
content: "请先完善基本信息!",
success: function (res) {
if (res.confirm) {
uni.navigateTo({
url: "/pages/user/resume/essentialInformation/index"
});
} else if (res.cancel) {
console.log("用户点击取消");
}
}
});
}
// 在这里可以对响应数据进行预处理
return response.data;
},
......
class SwipeHandler {
constructor() {
this.startY = 0;
this.endY = 0;
this.startTime = 0;
this.endTime = 0;
this.startY = 0;
this.endY = 0;
this.startTime = 0;
this.endTime = 0;
}
onTouchStart(e) {
this.startY = e.touches[0].clientY;
this.startTime = Date.now();
this.startY = e.touches[0].clientY;
this.startTime = Date.now();
}
onTouchMove(e) {
// 在这里可以更新Y坐标,但通常只需要开始和结束时的坐标
// 在这里可以更新Y坐标,但通常只需要开始和结束时的坐标
}
onTouchEnd(e) {
this.endY = e.changedTouches[0].clientY;
this.endTime = Date.now();
const distanceThreshold = 150; // 设置滑动距离阈值,单位:像素
const timeThreshold = 200; // 设置时间阈值,单位:毫秒
const distance = this.startY - this.endY;
const duration = this.endTime - this.startTime;
if (Math.abs(distance) > distanceThreshold && duration < timeThreshold) {
if (distance > 0) {
// 向上滑动
console.log('向上滑动');
return 'up'
} else {
// 向下滑动
console.log('向下滑动');
return 'down'
this.endY = e.changedTouches[0].clientY;
this.endTime = Date.now();
const distanceThreshold = 50; // 设置滑动距离阈值,单位:像素
const timeThreshold = 200; // 设置时间阈值,单位:毫秒
const distance = this.startY - this.endY;
const duration = this.endTime - this.startTime;
if (Math.abs(distance) > distanceThreshold && duration < timeThreshold) {
if (distance > 0) {
// 向上滑动
console.log("向上滑动");
return "up";
} else {
// 向下滑动
console.log("向下滑动");
return "down";
}
}
}
}
}
export default SwipeHandler
export default SwipeHandler;
/* const swipeHandler = new SwipeHandler();
Page({
......@@ -52,4 +52,4 @@ export default SwipeHandler
onTouchEnd: function(e) {
swipeHandler.onTouchEnd(e);
}
}); */
\ No newline at end of file
}); */
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