Compare commits
8 Commits
544cae7cb1
...
ca7273f152
| Author | SHA1 | Date | |
|---|---|---|---|
| ca7273f152 | |||
| 6e09702db5 | |||
| ec477fe7c1 | |||
| fa267c9796 | |||
|
|
a03b54a406 | ||
|
|
6a3f84c4f4 | ||
|
|
9d4a7f1172 | ||
| e19230dae5 |
21
.gitignore
vendored
21
.gitignore
vendored
@@ -1 +1,22 @@
|
||||
# 编译/打包输出目录
|
||||
/unpackage/
|
||||
|
||||
# 依赖包目录
|
||||
/node_modules/
|
||||
|
||||
# IDE/编辑器配置
|
||||
.vscode/
|
||||
.idea/
|
||||
|
||||
# macOS 系统文件
|
||||
.DS_Store
|
||||
|
||||
# Windows 系统文件
|
||||
Thumbs.db
|
||||
|
||||
# 日志文件
|
||||
npm-debug.log
|
||||
yarn-debug.log
|
||||
|
||||
# HBuilderX 运行时生成的文件
|
||||
.hbuilderx
|
||||
@@ -1,16 +0,0 @@
|
||||
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
|
||||
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
|
||||
"version": "0.0",
|
||||
"configurations": [{
|
||||
"default" :
|
||||
{
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"mp-weixin" :
|
||||
{
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"type" : "uniCloud"
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
common/.DS_Store
vendored
BIN
common/.DS_Store
vendored
Binary file not shown.
@@ -67,7 +67,7 @@ html {
|
||||
}
|
||||
|
||||
.btn-feel {
|
||||
transition: transform 0.2s ease;
|
||||
transition: transform 0.15s ease;
|
||||
transform-style: preserve-3d;
|
||||
}
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ const prePage = () => {
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 页面跳转封装,支持 query 参数传递和返回回调
|
||||
* @param {string} url - 跳转路径
|
||||
@@ -59,17 +60,22 @@ const prePage = () => {
|
||||
* @param {object} options.query - 携带参数
|
||||
* @param {function} options.onBack - 页面返回时的回调(目标页调用 uni.navigateBack 时传递数据)
|
||||
*/
|
||||
let isJumping = false
|
||||
export const navTo = function(url, {
|
||||
needLogin = false,
|
||||
query = {},
|
||||
onBack = null
|
||||
} = {}) {
|
||||
const userStore = useUserStore();
|
||||
|
||||
if(isJumping) return
|
||||
isJumping=true
|
||||
if (needLogin && !userStore.hasLogin) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
});
|
||||
isJumping=false
|
||||
}, 170);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -84,9 +90,12 @@ export const navTo = function(url, {
|
||||
currentPage.__onBackCallback__ = onBack;
|
||||
}
|
||||
|
||||
uni.navigateTo({
|
||||
url: finalUrl
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: finalUrl
|
||||
});
|
||||
isJumping=false
|
||||
}, 170);
|
||||
};
|
||||
|
||||
export const navBack = function({
|
||||
|
||||
BIN
components/.DS_Store
vendored
BIN
components/.DS_Store
vendored
Binary file not shown.
327
components/DatePicker/DatePicker.vue
Normal file
327
components/DatePicker/DatePicker.vue
Normal file
@@ -0,0 +1,327 @@
|
||||
<template>
|
||||
<uni-popup
|
||||
ref="popup"
|
||||
type="bottom"
|
||||
borderRadius="10px 10px 0 0"
|
||||
background-color="#FFFFFF"
|
||||
:mask-click="maskClick"
|
||||
>
|
||||
<view class="popup-content">
|
||||
<view class="popup-header">
|
||||
<view class="btn-cancel" @click="cancel">取消</view>
|
||||
<view class="title">{{ title }}</view>
|
||||
<view class="btn-confirm" @click="confirm">确认</view>
|
||||
</view>
|
||||
<view class="popup-list">
|
||||
<picker-view
|
||||
indicator-style="height: 84rpx;"
|
||||
:value="selectedIndex"
|
||||
@change="bindChange"
|
||||
class="picker-view"
|
||||
>
|
||||
<picker-view-column>
|
||||
<view
|
||||
v-for="(year, index) in years"
|
||||
:key="index"
|
||||
class="item"
|
||||
:class="{ 'item-active': selectedIndex[0] === index }"
|
||||
>
|
||||
<text>{{ year }}</text>
|
||||
<text>年</text>
|
||||
</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view
|
||||
v-for="(month, index) in months"
|
||||
:key="index"
|
||||
class="item"
|
||||
:class="{ 'item-active': selectedIndex[1] === index }"
|
||||
>
|
||||
<text>{{ month }}</text>
|
||||
<text>月</text>
|
||||
</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view
|
||||
v-for="(day, index) in days"
|
||||
:key="index"
|
||||
class="item"
|
||||
:class="{ 'item-active': selectedIndex[2] === index }"
|
||||
>
|
||||
<text>{{ day }}</text>
|
||||
<text>日</text>
|
||||
</view>
|
||||
</picker-view-column>
|
||||
</picker-view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'datePicker',
|
||||
data() {
|
||||
return {
|
||||
maskClick: false,
|
||||
title: '选择日期',
|
||||
confirmCallback: null,
|
||||
cancelCallback: null,
|
||||
changeCallback: null,
|
||||
selectedIndex: [0, 0, 0],
|
||||
selectedDate: '',
|
||||
|
||||
// 日期数据
|
||||
years: [],
|
||||
months: [],
|
||||
days: [],
|
||||
|
||||
// 配置
|
||||
startYear: 0,
|
||||
endYear: 0,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.initDateData();
|
||||
},
|
||||
methods: {
|
||||
// 初始化日期数据
|
||||
initDateData() {
|
||||
const currentYear = new Date().getFullYear();
|
||||
this.startYear = currentYear - 50; // 往前50年
|
||||
this.endYear = currentYear + 10; // 往后10年
|
||||
|
||||
// 生成年份
|
||||
this.years = [];
|
||||
for (let i = this.startYear; i <= this.endYear; i++) {
|
||||
this.years.push(i);
|
||||
}
|
||||
|
||||
// 生成月份
|
||||
this.months = [];
|
||||
for (let i = 1; i <= 12; i++) {
|
||||
this.months.push(i);
|
||||
}
|
||||
|
||||
// 初始天数(默认当前年月)
|
||||
this.updateDays(this.years[0], this.months[0]);
|
||||
},
|
||||
|
||||
// 根据年月更新天数
|
||||
updateDays(year, month) {
|
||||
const daysInMonth = new Date(year, month, 0).getDate();
|
||||
this.days = [];
|
||||
for (let i = 1; i <= daysInMonth; i++) {
|
||||
this.days.push(i);
|
||||
}
|
||||
},
|
||||
|
||||
open(config = {}) {
|
||||
const {
|
||||
title = '选择日期',
|
||||
success,
|
||||
cancel,
|
||||
change,
|
||||
maskClick = false,
|
||||
defaultDate = '',
|
||||
} = config;
|
||||
|
||||
this.reset();
|
||||
this.title = title;
|
||||
if (typeof success === 'function') this.confirmCallback = success;
|
||||
if (typeof cancel === 'function') this.cancelCallback = cancel;
|
||||
if (typeof change === 'function') this.changeCallback = change;
|
||||
this.maskClick = maskClick;
|
||||
|
||||
// 设置默认选中
|
||||
this.setDefaultDate(defaultDate);
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$refs.popup.open();
|
||||
});
|
||||
},
|
||||
|
||||
close() {
|
||||
this.$refs.popup.close();
|
||||
},
|
||||
|
||||
// 设置默认日期
|
||||
setDefaultDate(dateStr) {
|
||||
if (!dateStr) {
|
||||
// 没有默认日期,使用当前日期
|
||||
const now = new Date();
|
||||
const year = now.getFullYear();
|
||||
const month = now.getMonth() + 1;
|
||||
const day = now.getDate();
|
||||
|
||||
this.selectedIndex = [
|
||||
this.years.findIndex(y => y === year),
|
||||
this.months.findIndex(m => m === month),
|
||||
this.days.findIndex(d => d === day)
|
||||
];
|
||||
} else {
|
||||
// 解析日期字符串 (支持 YYYY-MM-DD 格式)
|
||||
const [year, month, day] = dateStr.split('-').map(Number);
|
||||
this.selectedIndex = [
|
||||
this.years.findIndex(y => y === year),
|
||||
this.months.findIndex(m => m === month),
|
||||
this.days.findIndex(d => d === day)
|
||||
];
|
||||
}
|
||||
|
||||
// 确保索引有效
|
||||
this.selectedIndex = this.selectedIndex.map((index, i) =>
|
||||
index === -1 ? 0 : index
|
||||
);
|
||||
|
||||
this.updateSelectedDate();
|
||||
},
|
||||
|
||||
bindChange(e) {
|
||||
this.selectedIndex = e.detail.value;
|
||||
|
||||
// 检查是否需要更新天数
|
||||
const oldDaysLength = this.days.length;
|
||||
const selectedYear = this.years[this.selectedIndex[0]];
|
||||
const selectedMonth = this.months[this.selectedIndex[1]];
|
||||
this.updateDays(selectedYear, selectedMonth);
|
||||
|
||||
// 如果天数变化且当前选择的日期超过新月份的天数,调整日期索引
|
||||
if (this.days.length !== oldDaysLength && this.selectedIndex[2] >= this.days.length) {
|
||||
this.selectedIndex[2] = this.days.length - 1;
|
||||
}
|
||||
|
||||
this.updateSelectedDate();
|
||||
|
||||
// 触发change回调
|
||||
this.changeCallback && this.changeCallback(this.selectedDate, this.selectedIndex);
|
||||
},
|
||||
|
||||
// 更新选中的日期字符串
|
||||
updateSelectedDate() {
|
||||
const year = this.years[this.selectedIndex[0]];
|
||||
const month = this.months[this.selectedIndex[1]].toString().padStart(2, '0');
|
||||
const day = this.days[this.selectedIndex[2]].toString().padStart(2, '0');
|
||||
this.selectedDate = `${year}-${month}-${day}`;
|
||||
},
|
||||
|
||||
cancel() {
|
||||
this.clickCallback(this.cancelCallback);
|
||||
},
|
||||
|
||||
confirm() {
|
||||
this.clickCallback(this.confirmCallback);
|
||||
},
|
||||
|
||||
async clickCallback(callback) {
|
||||
if (typeof callback !== 'function') {
|
||||
this.$refs.popup.close();
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const result = await callback(this.selectedDate, this.selectedIndex);
|
||||
if (result !== false) {
|
||||
this.$refs.popup.close();
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('callback 执行出错:', error);
|
||||
}
|
||||
},
|
||||
|
||||
reset() {
|
||||
this.maskClick = false;
|
||||
this.confirmCallback = null;
|
||||
this.cancelCallback = null;
|
||||
this.changeCallback = null;
|
||||
this.selectedIndex = [0, 0, 0];
|
||||
this.selectedDate = '';
|
||||
this.title = '选择日期';
|
||||
},
|
||||
|
||||
// 设置日期范围
|
||||
setDateRange(startYear, endYear) {
|
||||
this.startYear = startYear;
|
||||
this.endYear = endYear;
|
||||
|
||||
// 重新生成年份
|
||||
this.years = [];
|
||||
for (let i = this.startYear; i <= this.endYear; i++) {
|
||||
this.years.push(i);
|
||||
}
|
||||
|
||||
// 重置选中索引
|
||||
this.selectedIndex[0] = 0;
|
||||
this.updateDays(this.years[0], this.months[0]);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.popup-content {
|
||||
color: #000000;
|
||||
height: 50vh;
|
||||
}
|
||||
.popup-list {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: space-evenly;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
.picker-view {
|
||||
width: 100%;
|
||||
height: calc(50vh - 100rpx);
|
||||
margin-top: 20rpx;
|
||||
.uni-picker-view-mask {
|
||||
background: rgba(0, 0, 0, 0);
|
||||
}
|
||||
.item {
|
||||
line-height: 84rpx;
|
||||
height: 84rpx;
|
||||
text-align: center;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #cccccc;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8rpx;
|
||||
}
|
||||
.item-active {
|
||||
color: #333333;
|
||||
}
|
||||
.uni-picker-view-indicator:after {
|
||||
border-color: #e3e3e3;
|
||||
}
|
||||
.uni-picker-view-indicator:before {
|
||||
border-color: #e3e3e3;
|
||||
}
|
||||
}
|
||||
}
|
||||
.popup-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 40rpx 40rpx 10rpx 40rpx;
|
||||
.title {
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #333333;
|
||||
text-align: center;
|
||||
}
|
||||
.btn-cancel {
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #666d7f;
|
||||
line-height: 38rpx;
|
||||
}
|
||||
.btn-confirm {
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #256bfa;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
BIN
hook/.DS_Store
vendored
BIN
hook/.DS_Store
vendored
Binary file not shown.
BIN
lib/.DS_Store
vendored
BIN
lib/.DS_Store
vendored
Binary file not shown.
@@ -206,6 +206,9 @@ function getFormCompletionPercent(form) {
|
||||
height: 80rpx;
|
||||
border-bottom: 2rpx solid #EBEBEB
|
||||
position: relative;
|
||||
.triangle {
|
||||
pointer-events: none;
|
||||
}
|
||||
.triangle::before
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
|
||||
@@ -26,7 +26,8 @@
|
||||
</view>
|
||||
<view class="tops-right">
|
||||
<view class="right-imghead">
|
||||
<image v-if="userInfo.sex === '0'" src="@/static/icon/boy.png"></image>
|
||||
<image v-if="userInfo.avatar" :src="userInfo.avatar"></image>
|
||||
<image v-else-if="userInfo.sex == '0'" src="@/static/icon/boy.png"></image>
|
||||
<image v-else src="@/static/icon/girl.png"></image>
|
||||
</view>
|
||||
<view class="right-sex">
|
||||
@@ -39,12 +40,10 @@
|
||||
<view class="mys-line">
|
||||
<view class="line"></view>
|
||||
</view>
|
||||
<view class="mys-info">
|
||||
<view class="mys-info btn-feel">
|
||||
<view class="mys-h4">
|
||||
<text>求职期望</text>
|
||||
<view class="mys-edit-icon">
|
||||
<image class="button-click" src="@/static/icon/edit1.png" @click="navTo('/packageA/pages/jobExpect/jobExpect')"></image>
|
||||
</view>
|
||||
<view>求职期望</view>
|
||||
<image class="icon" src="@/static/icon/edit1.png" @click="navTo('/packageA/pages/jobExpect/jobExpect')"></image>
|
||||
</view>
|
||||
<view class="mys-text">
|
||||
<text>期望薪资:</text>
|
||||
@@ -64,15 +63,17 @@
|
||||
</view>
|
||||
<view class="card-top" style="margin-top: 24rpx">
|
||||
<view class="mys-info" style="padding: 0">
|
||||
<view class="mys-h4">
|
||||
<view class="mys-h4 btn-feel">
|
||||
<text>工作经历</text>
|
||||
<view class="mys-edit-icon">
|
||||
<image class="button-click" src="@/static/icon/edit1.png" @click="navTo('/packageA/pages/jobExpect/jobExpect')"></image>
|
||||
<view class="mys-edit-icon btn-feel" @click="navTo('/packageA/pages/workExp/workExp')">
|
||||
<image class="icon button-click btn-feel" src="@/static/icon/plus.png"></image>
|
||||
<view class="txt">添加</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="exp-item" v-for="item in userInfo.workExp" :key="item.id">
|
||||
<view class="fl_box fl_justbet mar_top10">
|
||||
<text class="fs_16">{{ item.company }}</text>
|
||||
<view class="exp-item btn-feel" v-for="item in userInfo.workExp" :key="item.id">
|
||||
<view class="fl_box fl_justbet mar_top15">
|
||||
<view class="fs_16">{{ item.company }}</view>
|
||||
<image class="icon btn-feel" src="@/static/icon/edit1.png" @click="navTo(`/packageA/pages/workExp/workExp?id=${item.id}`)"></image>
|
||||
</view>
|
||||
<view class="mys-text fl_box fl_justbet">
|
||||
<text class="color_333333 fs_14">{{ item.position }}</text>
|
||||
@@ -87,7 +88,7 @@
|
||||
</view>
|
||||
<template #footer>
|
||||
<view class="footer-container">
|
||||
<view class="footer-button">上传简历</view>
|
||||
<view class="footer-button btn-feel">上传简历</view>
|
||||
</view>
|
||||
</template>
|
||||
</AppLayout>
|
||||
@@ -212,10 +213,25 @@ image{
|
||||
display: flex;
|
||||
justify-content: space-between
|
||||
align-items: center
|
||||
.mys-edit-icon{
|
||||
display: inline-block
|
||||
.icon{
|
||||
width: 40rpx;
|
||||
height: 40rpx
|
||||
}
|
||||
.mys-edit-icon{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.txt{
|
||||
font-size: 26rpx;
|
||||
color: #444;
|
||||
font-weight: 400;
|
||||
}
|
||||
.icon{
|
||||
width: 28rpx;
|
||||
height: 28rpx
|
||||
margin-right: 5rpx;
|
||||
margin-top: 2rpx
|
||||
vertical-align: bottom;
|
||||
}
|
||||
}
|
||||
}
|
||||
.datetext{
|
||||
@@ -247,7 +263,10 @@ image{
|
||||
.exp-item{
|
||||
padding-bottom: 28rpx;
|
||||
border-bottom: 2rpx dashed #EEEEEE;
|
||||
|
||||
.icon{
|
||||
width 40rpx;
|
||||
height 40rpx
|
||||
}
|
||||
}
|
||||
.exp-item:nth-last-child(1){
|
||||
border-bottom: none;
|
||||
|
||||
@@ -250,8 +250,15 @@ function selectAvatar() {
|
||||
sourceType: ["album", "camera"],
|
||||
count: 1,
|
||||
success: ({ tempFilePaths, tempFiles }) => {
|
||||
console.log(`选择的图片:${tempFilePaths}`);
|
||||
console.warn("没有做后续上传逻辑!!!!!!!");
|
||||
$api
|
||||
.uploadFile(tempFilePaths[0], true)
|
||||
.then((res) => {
|
||||
res = JSON.parse(res);
|
||||
if (res.msg) fromValue.avatar = res.msg;
|
||||
})
|
||||
.catch((err) => {
|
||||
$api.msg("上传失败");
|
||||
});
|
||||
},
|
||||
fail: (error) => {},
|
||||
});
|
||||
@@ -284,6 +291,7 @@ function selectAvatar() {
|
||||
.avatar{
|
||||
width:110rpx;
|
||||
height: 110rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
.content-input
|
||||
|
||||
BIN
packageA/pages/post/.DS_Store
vendored
BIN
packageA/pages/post/.DS_Store
vendored
Binary file not shown.
@@ -7,10 +7,11 @@
|
||||
</template>
|
||||
<view class="mys-container">
|
||||
<!-- 个人信息 -->
|
||||
<view class="card-top">
|
||||
<view class="card-top btn-feel">
|
||||
<view class="info">
|
||||
<view class="avatar">
|
||||
<image v-if="userInfo.sex === '0'" src="@/static/icon/boy.png"></image>
|
||||
<image v-if="userInfo.avatar" :src="userInfo.avatar"></image>
|
||||
<image v-else-if="userInfo.sex == '0'" src="@/static/icon/boy.png"></image>
|
||||
<image v-else src="@/static/icon/girl.png"></image>
|
||||
</view>
|
||||
<view class="info-right">
|
||||
@@ -32,12 +33,12 @@
|
||||
</view>
|
||||
<view class="info-bottom">
|
||||
<view>到岗:2025-11-02</view>
|
||||
<view>地点:<dict-Label dictType="area" :value="Number(userInfo.area)"></dict-Label></view>
|
||||
<view>地点:青岛市-<dict-Label dictType="area" :value="Number(userInfo.area)"></dict-Label></view>
|
||||
</view>
|
||||
<view class="des-card" style="margin-top: 24rpx">
|
||||
<view class="fl_box fl_justbet">
|
||||
<view>求职意向岗位</view>
|
||||
<view>{{ userInfo.jobIntention || "-" }}</view>
|
||||
<view style="white-space:nowrap">求职意向岗位</view>
|
||||
<view class="line_1" style="padding-left:40rpx" >{{ userInfo.jobIntention || userInfo.jobTitle?.join(',') || '-' }}</view>
|
||||
</view>
|
||||
<view class="fl_box fl_justbet">
|
||||
<view>毕业学校</view>
|
||||
@@ -50,7 +51,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="card">
|
||||
<view class="card btn-feel">
|
||||
<view class="title">
|
||||
<image class="bg" src="@/static/icon/title-bg.png" />
|
||||
<view class="text">个人技能</view>
|
||||
@@ -63,7 +64,7 @@
|
||||
<view class="content">暂无个人技能</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card">
|
||||
<view class="card btn-feel">
|
||||
<view class="title">
|
||||
<image class="bg" src="@/static/icon/title-bg.png" />
|
||||
<view class="text">关键经历</view>
|
||||
@@ -76,7 +77,7 @@
|
||||
<view class="content">暂无关键经历</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card">
|
||||
<view class="card btn-feel">
|
||||
<view class="title">
|
||||
<image class="bg" src="@/static/icon/title-bg.png" />
|
||||
<view class="text">荣誉及证书情况</view>
|
||||
@@ -195,6 +196,9 @@ image {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
margin-right: 24rpx;
|
||||
image{
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
.info-right {
|
||||
height: 160rpx;
|
||||
|
||||
245
packageA/pages/workExp/workExp.vue
Normal file
245
packageA/pages/workExp/workExp.vue
Normal file
@@ -0,0 +1,245 @@
|
||||
<template>
|
||||
<AppLayout title="工作经历" border back-gorund-color="#ffffff" :show-bg-image="false">
|
||||
<template #headerleft>
|
||||
<view class="btn mar_le20 button-click" @click="navBack">取消</view>
|
||||
</template>
|
||||
<template #headerright>
|
||||
<view class="btn mar_ri20 button-click blue" @click="confirm">确认</view>
|
||||
</template>
|
||||
<view class="content">
|
||||
<view class="content-input">
|
||||
<view class="input-titile">公司</view>
|
||||
<input class="input-con" v-model="fromValue.company" placeholder="请输入公司名称" />
|
||||
</view>
|
||||
<view class="content-input">
|
||||
<view class="input-titile">岗位</view>
|
||||
<input class="input-con" v-model="fromValue.position" placeholder="请输入岗位" />
|
||||
</view>
|
||||
<view class="content-input">
|
||||
<view class="input-titile">时间</view>
|
||||
<view class="flex-box">
|
||||
<view class="input-box btn-feel" @click="changestartTime">
|
||||
<input v-model="fromValue.startTime" class="input-con triangle" disabled placeholder="开始时间" />
|
||||
<image class="icon" src="@/static/icon/arrow-down.png" />
|
||||
</view>
|
||||
<view class="gap">-</view>
|
||||
<view class="input-box btn-feel" @click="changeendTime">
|
||||
<input v-model="fromValue.endTime" class="input-con triangle" disabled placeholder="至今" />
|
||||
<image class="icon" src="@/static/icon/arrow-down.png" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-input">
|
||||
<view class="input-titile">工作内容</view>
|
||||
<textarea class="text-area" placeholder="请输入工作内容" v-model="fromValue.duty"></textarea>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 时间选择器组件 -->
|
||||
<DatePicker ref="datePicker" />
|
||||
<template #footer v-if="fromValue.id">
|
||||
<view class="footer-container">
|
||||
<view class="footer-button btn-feel" @click="delCurrent">删除该工作经历</view>
|
||||
</view>
|
||||
</template>
|
||||
</AppLayout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, inject, watch, ref, onMounted, computed } from "vue";
|
||||
import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||
const { $api, navTo, navBack } = inject("globalFunction");
|
||||
import { storeToRefs } from "pinia";
|
||||
import useUserStore from "@/stores/useUserStore";
|
||||
import useDictStore from "@/stores/useDictStore";
|
||||
import DatePicker from "@/components/DatePicker/DatePicker.vue";
|
||||
const { userInfo } = storeToRefs(useUserStore());
|
||||
const { getUserResume } = useUserStore();
|
||||
const { dictLabel, oneDictData } = useDictStore();
|
||||
|
||||
// 初始化数据
|
||||
const fromValue = reactive({
|
||||
position: "",
|
||||
company: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
duty: "",
|
||||
id: undefined,
|
||||
});
|
||||
|
||||
// 获取时间选择器组件的引用
|
||||
const datePicker = ref();
|
||||
|
||||
onLoad((e) => {
|
||||
initLoad(e?.id);
|
||||
});
|
||||
|
||||
const confirm = async () => {
|
||||
// 验证必填字段
|
||||
if (!fromValue.company) {
|
||||
return $api.msg("请输入公司名称");
|
||||
}
|
||||
if (!fromValue.position) {
|
||||
return $api.msg("请输入岗位");
|
||||
}
|
||||
if (!fromValue.startTime) {
|
||||
return $api.msg("请选择开始时间");
|
||||
}
|
||||
// 验证时间逻辑:结束时间不能早于开始时间
|
||||
if (fromValue.endTime && new Date(fromValue.endTime) < new Date(fromValue.startTime)) {
|
||||
return $api.msg("结束时间不能早于开始时间");
|
||||
}
|
||||
let res;
|
||||
try {
|
||||
if (fromValue.id) {
|
||||
res = await $api.createRequest("/app/user/experience/edit", fromValue, "post");
|
||||
} else {
|
||||
res = await $api.createRequest("/app/user/experience/save", fromValue, "post");
|
||||
}
|
||||
$api.msg("保存成功");
|
||||
getUserResume().then(() => {
|
||||
navBack();
|
||||
});
|
||||
} catch (error) {
|
||||
$api.msg("保存失败");
|
||||
}
|
||||
};
|
||||
|
||||
function delCurrent() {
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "确认要删除此条工作经历吗?",
|
||||
showCancel: true,
|
||||
success: async ({ confirm, cancel }) => {
|
||||
if (confirm) {
|
||||
await $api.createRequest("/app/user/experience/delete", { id: fromValue.id }, "post");
|
||||
$api.msg("删除成功");
|
||||
getUserResume().then(() => {
|
||||
navBack();
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function initLoad(id) {
|
||||
if (!id) return;
|
||||
$api
|
||||
.createRequest(`/app/user/experience/getSingle/${id}`, {}, "get")
|
||||
.then((res) => {
|
||||
Object.assign(fromValue, res.data);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error("获取工作经历失败:", err);
|
||||
});
|
||||
}
|
||||
|
||||
// 选择开始时间
|
||||
const changestartTime = () => {
|
||||
console.log(1);
|
||||
datePicker.value.open({
|
||||
title: "选择开始时间",
|
||||
defaultDate: fromValue.startTime,
|
||||
success: (selectedDate) => {
|
||||
fromValue.startTime = selectedDate;
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
// 选择结束时间
|
||||
const changeendTime = () => {
|
||||
datePicker.value.open({
|
||||
title: "选择结束时间",
|
||||
defaultDate: fromValue.endTime,
|
||||
success: (selectedDate) => {
|
||||
fromValue.endTime = selectedDate;
|
||||
// 如果结束时间早于新的开始时间,清空结束时间
|
||||
if (fromValue.startTime && new Date(fromValue.startTime) > new Date(selectedDate)) {
|
||||
fromValue.endTime = "";
|
||||
$api.msg("结束时间不能小于开始时间!");
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.btn.blue {
|
||||
color: #1677ff;
|
||||
}
|
||||
.content {
|
||||
padding: 28rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
height: calc(100% - 120rpx);
|
||||
}
|
||||
|
||||
.flex-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.gap {
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
flex: 0.25;
|
||||
text-align: center;
|
||||
}
|
||||
.icon {
|
||||
width: 75rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
.input-box {
|
||||
flex: 0.375;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.content-input {
|
||||
margin-bottom: 48rpx;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: 2rpx solid #ebebeb;
|
||||
&:nth-last-of-type(1) {
|
||||
border-bottom: none;
|
||||
}
|
||||
.input-titile {
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #6a6a6a;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.input-con {
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
line-height: 80rpx;
|
||||
height: 80rpx;
|
||||
position: relative;
|
||||
}
|
||||
.triangle {
|
||||
pointer-events: none;
|
||||
}
|
||||
.text-area {
|
||||
width: 100%;
|
||||
height: 700rpx;
|
||||
background: #f5f5f5;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
.footer-container {
|
||||
background: #ffffff;
|
||||
box-shadow: 0rpx -4rpx 24rpx 0rpx rgba(11, 44, 112, 0.12);
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
padding: 40rpx 28rpx 20rpx 28rpx;
|
||||
.footer-button {
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
background: #f93a4a;
|
||||
border-radius: 8rpx;
|
||||
color: #ffffff;
|
||||
line-height: 90rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -175,6 +175,13 @@
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/workExp/workExp",
|
||||
"style": {
|
||||
"navigationBarTitleText": "工作经历",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/reservation/reservation",
|
||||
"style": {
|
||||
|
||||
BIN
pages/.DS_Store
vendored
BIN
pages/.DS_Store
vendored
Binary file not shown.
@@ -2,7 +2,8 @@
|
||||
<AppLayout title="我的" back-gorund-color="#F4F4F4">
|
||||
<view class="mine-userinfo btn-feel" @click="navTo('/packageA/pages/myResume/myResume')">
|
||||
<view class="userindo-head">
|
||||
<image class="userindo-head-img" v-if="userInfo.sex === '0'" src="/static/icon/boy.png"></image>
|
||||
<image class="userindo-head-img" v-if="userInfo.avatar" :src="userInfo.avatar"></image>
|
||||
<image class="userindo-head-img" v-else-if="userInfo.sex === '0'" src="/static/icon/boy.png"></image>
|
||||
<image class="userindo-head-img" v-else src="/static/icon/girl.png"></image>
|
||||
</view>
|
||||
<view class="userinfo-ls">
|
||||
@@ -32,7 +33,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="mini-cards">
|
||||
<view class="card-top btn-feel" @click="navTo('/packageA/pages/personalInfo/personalInfo')">
|
||||
<view class="card-top btn-feel" @click="navTo('/packageA/pages/vCard/vCard')">
|
||||
<view class="top-title line_1">
|
||||
<text>{{ userInfo.name || '暂无用户名' }}</text>
|
||||
|
|
||||
@@ -45,7 +46,7 @@
|
||||
</text>
|
||||
</view>
|
||||
<view class="top-btn button-click" >
|
||||
修改简历
|
||||
电子名片
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-main">
|
||||
|
||||
BIN
static/.DS_Store
vendored
BIN
static/.DS_Store
vendored
Binary file not shown.
BIN
static/font/.DS_Store
vendored
BIN
static/font/.DS_Store
vendored
Binary file not shown.
BIN
static/gif/.DS_Store
vendored
BIN
static/gif/.DS_Store
vendored
Binary file not shown.
BIN
static/icon/.DS_Store
vendored
BIN
static/icon/.DS_Store
vendored
Binary file not shown.
BIN
static/icon/arrow-down.png
Normal file
BIN
static/icon/arrow-down.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 341 B |
BIN
static/icon/plus.png
Normal file
BIN
static/icon/plus.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 263 B |
BIN
static/tabbar/.DS_Store
vendored
BIN
static/tabbar/.DS_Store
vendored
Binary file not shown.
BIN
stores/.DS_Store
vendored
BIN
stores/.DS_Store
vendored
Binary file not shown.
BIN
uni_modules/.DS_Store
vendored
BIN
uni_modules/.DS_Store
vendored
Binary file not shown.
BIN
unpackage/.DS_Store
vendored
BIN
unpackage/.DS_Store
vendored
Binary file not shown.
BIN
unpackage/dist/.DS_Store
vendored
BIN
unpackage/dist/.DS_Store
vendored
Binary file not shown.
BIN
unpackage/dist/build/.DS_Store
vendored
BIN
unpackage/dist/build/.DS_Store
vendored
Binary file not shown.
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"hash": "ca4965da",
|
||||
"configHash": "0b32ae75",
|
||||
"lockfileHash": "e3b0c442",
|
||||
"browserHash": "9e383778",
|
||||
"optimized": {},
|
||||
"chunks": {}
|
||||
}
|
||||
3
unpackage/dist/cache/.vite/deps/package.json
vendored
3
unpackage/dist/cache/.vite/deps/package.json
vendored
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
36
unpackage/dist/dev/mp-weixin/project.config.json
vendored
36
unpackage/dist/dev/mp-weixin/project.config.json
vendored
@@ -1,36 +0,0 @@
|
||||
{
|
||||
"description": "项目配置文件。",
|
||||
"packOptions": {
|
||||
"ignore": []
|
||||
},
|
||||
"setting": {
|
||||
"urlCheck": false,
|
||||
"es6": true,
|
||||
"postcss": true,
|
||||
"minified": true,
|
||||
"newFeature": true,
|
||||
"bigPackageSizeSupport": true
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "",
|
||||
"appid": "touristappid",
|
||||
"projectname": "qingdao-employment-service",
|
||||
"condition": {
|
||||
"search": {
|
||||
"current": -1,
|
||||
"list": []
|
||||
},
|
||||
"conversation": {
|
||||
"current": -1,
|
||||
"list": []
|
||||
},
|
||||
"game": {
|
||||
"current": -1,
|
||||
"list": []
|
||||
},
|
||||
"miniprogram": {
|
||||
"current": -1,
|
||||
"list": []
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||
"projectname": "qingdao-employment-service",
|
||||
"setting": {
|
||||
"compileHotReLoad": true,
|
||||
"autoAudits": false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user