修改bug

parent 16b39adc
...@@ -35,3 +35,6 @@ export const getCityNameByCodeApi = code => instance.post(`/dict/dictProvinceCit ...@@ -35,3 +35,6 @@ export const getCityNameByCodeApi = code => instance.post(`/dict/dictProvinceCit
// 专业目录 // 专业目录
export const getMajorTreeApi = () => instance.post(`/dict/major/tree`); export const getMajorTreeApi = () => instance.post(`/dict/major/tree`);
// 用户申诉
export const appeal = params => instance.post(`/user/appeal`,params);
...@@ -18,41 +18,35 @@ ...@@ -18,41 +18,35 @@
<view class="content"> <view class="content">
<view class="name"> <view class="name">
<view class="t1">账户申述</view> <view class="t1">账户申述</view>
<textarea v-model="value" placeholder="请填写申述理由" /> <textarea v-model="reason" placeholder="请填写申述理由" />
</view> </view>
</view> </view>
<view class="btn-wrap flex-center"> <view class="btn-wrap flex-center">
<button class="bottom-btn" @tap="nextStep">提交</button> <button class="bottom-btn" @tap="appealFn">提交</button>
</view> </view>
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref } from "vue"; import { ref } from "vue";
import { getLoginUserApi } from "@/api/user.js"; import { appeal } from "@/api/user.js";
onLoad(() => { const reason = ref("");
onLoad(() => {});
}); const appealFn = () => {
onShow(() => { appeal({ appealMessage: reason.value }).then(res => {
getLoginUserApiFn(); if (res.code === 200) {
}); xma.showToast({
function getLoginUserApiFn() { title: res.message,
getLoginUserApi().then(user => { icon: "none",
// if (user.code == 200 && user.data) { duration: 1900
// const { avatarPath, name, phone, position } = user.data; });
// params.avatarPath = avatarPath; setTimeout(() => {
// params.name = name; xma.reLaunch({
// params.phone = phone; url: "/pages/login/index"
// params.position = position; });
// if (step.value !== 2) { }, 2000);
// if (name) { }
// step.value = 3;
// }
// }
// }
}); });
}
const nextStep = () => {
}; };
</script> </script>
...@@ -226,8 +220,8 @@ const nextStep = () => { ...@@ -226,8 +220,8 @@ const nextStep = () => {
padding: 16rpx 0; padding: 16rpx 0;
background-color: #ffffff; background-color: #ffffff;
border-top: 2rpx solid rgb(31 35 41 / 15%); border-top: 2rpx solid rgb(31 35 41 / 15%);
.bottom-btn{ .bottom-btn {
background: #1F86FF; background: #1f86ff;
width: 622rpx; width: 622rpx;
height: 80rpx; height: 80rpx;
line-height: 80rpx; line-height: 80rpx;
......
...@@ -32,9 +32,37 @@ ...@@ -32,9 +32,37 @@
<!-- 筛选导航 --> <!-- 筛选导航 -->
<view v-if="!maskType" class="select-nav" :style="{ top: '0px' }" catchtouchmove="{{true}}"> <view v-if="!maskType" class="select-nav" :style="{ top: '0px' }" catchtouchmove="{{true}}">
<view class="recommend">推荐</view> <view class="recommend">推荐</view>
<view class="select-item"> <!-- <view class="select-item">
<text :class="{ active: maskType == 'address' }" @tap="openMask('address')">贵州省</text> <text :class="{ active: maskType == 'address' }" @tap="openMask('address')">贵州省</text>
<text :class="{ active: maskType == 'other' }" @tap="openMask('other')">更多筛选</text> <text :class="{ active: maskType == 'other' }" @tap="openMask('other')">更多筛选</text>
</view> -->
<view class="filter-other flex-between">
<wd-col-picker
label="选择地址"
v-model="valueCity"
:columns="columnsCity"
:column-change="columnChangeCity"
@confirm="handleConfirmCity"
label-key="name"
value-key="code"
use-default-slot
>
<view class="item">{{ cityText }} <view class="arrow"></view> </view>
</wd-col-picker>
<view class="filter-opstion">
<wd-col-picker
v-model="majorValue"
:columns="majorOpstion"
value-key="name"
label-key="name"
:column-change="columnChangeMajor"
@confirm="handleConfirmMajor"
use-default-slot
>
<view class="item">{{ majorText || "全部" }} <view class="arrow"></view> </view>
</wd-col-picker>
</view>
<view class="item" :class="{ active: maskType == 'other' }" @tap="openMask('other')">更多筛选<view class="arrow"></view></view>
</view> </view>
</view> </view>
<!-- 蒙版弹框 --> <!-- 蒙版弹框 -->
...@@ -43,12 +71,12 @@ ...@@ -43,12 +71,12 @@
<view class="select-nav" :style="{ top: '0px' }" catchtouchmove="{{true}}" @tap.stop> <view class="select-nav" :style="{ top: '0px' }" catchtouchmove="{{true}}" @tap.stop>
<view class="recommend">推荐</view> <view class="recommend">推荐</view>
<view class="select-item"> <view class="select-item">
<text :class="{ active: maskType == 'address' }" @tap="openMask('address')">贵州省</text> <!-- <text :class="{ active: maskType == 'address' }" @tap="openMask('address')">贵州省</text> -->
<text :class="{ active: maskType == 'other' }" @tap="openMask('other')">更多筛选</text> <text :class="{ active: maskType == 'other' }" @tap="openMask('other')">更多筛选</text>
</view> </view>
</view> </view>
<!-- 区域弹窗 --> <!-- 区域弹窗 -->
<view <!-- <view
@click.stop="" @click.stop=""
catchtap="preventD" catchtap="preventD"
class="screen-pop address screen-pop-padding {{regionPop? 'screen-pop-tion':''}} " class="screen-pop address screen-pop-padding {{regionPop? 'screen-pop-tion':''}} "
...@@ -83,7 +111,7 @@ ...@@ -83,7 +111,7 @@
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
</view> </view> -->
<!-- 筛选弹窗 --> <!-- 筛选弹窗 -->
<view <view
@click.stop="" @click.stop=""
...@@ -220,7 +248,8 @@ import postionCard1 from "@/components/postionCard1/index.vue"; ...@@ -220,7 +248,8 @@ import postionCard1 from "@/components/postionCard1/index.vue";
import { getEumData } from "@/utils/utils.js"; import { getEumData } from "@/utils/utils.js";
import { getToken } from "@/utils/token"; import { getToken } from "@/utils/token";
import evn from "@/utils/config.js"; import evn from "@/utils/config.js";
import { getLoginUserApi } from "@/api/user"; import { getLoginUserApi, getMajorTreeApi } from "@/api/user";
import _ from "lodash";
/* 轮播 */ /* 轮播 */
const swiperList = ref([]); const swiperList = ref([]);
let swiperListData = []; let swiperListData = [];
...@@ -243,16 +272,19 @@ let salary = ref([ ...@@ -243,16 +272,19 @@ let salary = ref([
{ text: "50k以上", min: 50000, max: 100000 } { text: "50k以上", min: 50000, max: 100000 }
]); ]);
onLoad(() => {
getColumnsCity();
dictJobType();
getTreeData();
initOtherData();
});
onShow(() => { onShow(() => {
getLoginUserApi().then(res => { getLoginUserApi().then(res => {
uni.setStorageSync("userInfo", res.data); uni.setStorageSync("userInfo", res.data);
}); });
getTreeData();
dictJobType();
reset().then(res => { reset().then(res => {
getListData(); getListData();
}); });
initOtherData();
xma.xh.getMenuButtonBoundingClientRect({ xma.xh.getMenuButtonBoundingClientRect({
success(res) { success(res) {
contentHeight.value = (res.top + res.bottom) / 2 + 25 + "px"; contentHeight.value = (res.top + res.bottom) / 2 + 25 + "px";
...@@ -265,6 +297,28 @@ onReachBottom(e => { ...@@ -265,6 +297,28 @@ onReachBottom(e => {
getListData(); getListData();
}); });
const columnChangeCity = ({ resolve, selectedItem, finish }) => {
if (selectedItem.children?.length) {
resolve(selectedItem.children);
} else {
finish();
}
};
const handleConfirmCity = ({ value, selectedItems }) => {
const textIndex = _.compact(value).length - 1;
if (textIndex === -1) {
cityText.value = "全国";
} else {
cityText.value = selectedItems[textIndex].name;
}
const [provinceCode1, cityCode1, districtCode1] = value;
provinceCode = provinceCode1 || ""
cityCode = cityCode1 || "";
districtCode = districtCode1 || ""
getListData();
};
// 获取数据 // 获取数据
getBannerListApi(1).then(res => { getBannerListApi(1).then(res => {
swiperListData = res.data; swiperListData = res.data;
...@@ -328,6 +382,62 @@ const openMask = type => { ...@@ -328,6 +382,62 @@ const openMask = type => {
cityCode = "520100"; cityCode = "520100";
} }
}; };
// 城市筛选
const valueCity = ref([]);
const cityText = ref("全国");
const columnsCity = ref([]);
const getColumnsCity = () => {
getTreeListApi().then(res => {
// 给说有子选项都添加全部
res.data.forEach(v => {
v.children.unshift({
code: "",
name: "全部"
});
v.children.forEach(vv => {
if (vv.children?.length) {
vv.children.unshift({
code: "",
name: "全部"
});
}
});
});
res.data.unshift({
code: "",
name: "全国"
});
columnsCity.value.push(res.data);
});
};
/* 专业筛选 */
const majorValue = ref([]);
const majorOpstion = ref([]);
const columnChangeMajor = ({ selectedItem, resolve, finish }) => {
if (selectedItem.children) {
resolve(selectedItem.children);
} else {
finish();
}
};
const handleConfirmMajor = ({ value }) => {
majorText.value = value[1];
majorName = value[0] + '-' + value[1];
getListData()
};
const majorText = ref("");
getMajorTreeApi().then(res => {
if (res.code === 200) {
majorOpstion.value.push(
Object.keys(res.data).map(key => ({
name: key,
children: res.data[key]
}))
);
}
});
// 省市区 // 省市区
let regionPop = false; //区域 let regionPop = false; //区域
let regionNav = "贵州省"; //选中区域 let regionNav = "贵州省"; //选中区域
...@@ -358,45 +468,30 @@ const getTreeData = () => { ...@@ -358,45 +468,30 @@ const getTreeData = () => {
}); });
}; };
// 选择市 // // 选择市
const bindCityList = (code, name) => { // const bindCityList = (code, name) => {
for (let i = 0; i < cityData.value.length; i++) { // for (let i = 0; i < cityData.value.length; i++) {
if (cityData.value[i].code == code) { // if (cityData.value[i].code == code) {
let _children = cityData.value[i].children; // let _children = cityData.value[i].children;
regionData.value = _children; // regionData.value = _children;
cityId.value = code; // cityId.value = code;
} // }
} // }
cityCode = code; // cityCode = code;
}; // };
// 选择区 // // 选择区
const bindRegionList = code => { // const bindRegionList = code => {
regionId.value = code; // regionId.value = code;
maskType.value = null; // maskType.value = null;
if (code === -1) { // if (code === -1) {
districtCode = null; // districtCode = null;
} else { // } else {
districtCode = code; // districtCode = code;
} // }
pageNo = 1; // pageNo = 1;
positionListData.value = []; // positionListData.value = [];
getListData(); // getListData();
// let _regionNav; // };
// if (name == "全部") {
// for (let i = 0; i < cityData.length; i++) {
// if (cityId.value == cityData[i].code) {
// _regionNav = cityData[i].name;
// }
// }
// } else {
// pageNo = 1;
// regionNav = name;
// regionId.value = code;
// districtCode = code;
// getListData();
// }
// console.log(code);
};
// 职业类型筛选 // 职业类型筛选
const positionType = ref([]); const positionType = ref([]);
const sortNav = ref("职位类型"); const sortNav = ref("职位类型");
...@@ -452,6 +547,9 @@ const bindScreenEducationList = (text, code) => { ...@@ -452,6 +547,9 @@ const bindScreenEducationList = (text, code) => {
const keyword = ref(""); const keyword = ref("");
let pageNo = 1, let pageNo = 1,
pageSize = 10, pageSize = 10,
provinceCode = null,
cityCode = null,
majorName = null,
districtCode = null, districtCode = null,
minSalary = null, minSalary = null,
maxSalary = null, maxSalary = null,
...@@ -517,7 +615,6 @@ const reset = () => { ...@@ -517,7 +615,6 @@ const reset = () => {
pageNo = 1; pageNo = 1;
pageSize = 10; pageSize = 10;
keyword.value = ""; keyword.value = "";
districtCode = null;
minSalary = null; minSalary = null;
maxSalary = null; maxSalary = null;
educationRequirement = null; educationRequirement = null;
...@@ -555,7 +652,7 @@ const confirm = e => { ...@@ -555,7 +652,7 @@ const confirm = e => {
const confirmParameters = () => { const confirmParameters = () => {
pageNo = 1; pageNo = 1;
positionListData.value = []; positionListData.value = [];
getListData() getListData();
}; };
const getListData = () => { const getListData = () => {
...@@ -563,6 +660,9 @@ const getListData = () => { ...@@ -563,6 +660,9 @@ const getListData = () => {
pageNo: pageNo, pageNo: pageNo,
pageSize: pageSize, pageSize: pageSize,
keyword: keyword.value || null, keyword: keyword.value || null,
provinceCode: provinceCode || null,
cityCode: cityCode || null,
majorName:majorName || null,
districtCode: districtCode || null, districtCode: districtCode || null,
minSalary: minSalary || null, minSalary: minSalary || null,
maxSalary: maxSalary || null, maxSalary: maxSalary || null,
...@@ -571,6 +671,7 @@ const getListData = () => { ...@@ -571,6 +671,7 @@ const getListData = () => {
identityRequirement: identityRequirement || null, identityRequirement: identityRequirement || null,
jobTypePid: jobTypePid || null jobTypePid: jobTypePid || null
}; };
console.log("data", data);
getjobListApi(data).then(res => { getjobListApi(data).then(res => {
if (res.code == 200) { if (res.code == 200) {
positionListData.value = [...positionListData.value, ...res.data]; positionListData.value = [...positionListData.value, ...res.data];
...@@ -740,6 +841,36 @@ const getListData = () => { ...@@ -740,6 +841,36 @@ const getListData = () => {
height: 80rpx; height: 80rpx;
padding: 0 32rpx; padding: 0 32rpx;
background-color: #ffffff; background-color: #ffffff;
.filter-other {
gap: 16rpx;
.item {
/* display: flex;
align-items: flex-end; */
position: relative;
max-width: 120rpx;
padding: 12rpx 18rpx;
overflow: hidden;
font-size: 24rpx;
font-weight: normal;
line-height: 24rpx;
color: #ffffff;
text-overflow: ellipsis;
white-space: nowrap;
background: linear-gradient(180deg, #3570ff -3%, #29a5ff 100%);
border-radius: 8rpx;
.arrow {
position: absolute;
right: 6rpx;
bottom: 12rpx;
width: 0;
height: 0;
margin-left: 4rpx;
border-color: #ffffff;
border-width: 4rpx;
transform: rotateZ(0deg);
}
}
}
.recommend { .recommend {
position: relative; position: relative;
font-size: 36rpx; font-size: 36rpx;
......
...@@ -87,19 +87,19 @@ const navList = [ ...@@ -87,19 +87,19 @@ const navList = [
url: "/pages/login/index", url: "/pages/login/index",
text: "退出登录" text: "退出登录"
}, },
{ // {
icon: new URL("@/static/image/user/loginout.png", import.meta.url).href, // icon: new URL("@/static/image/user/loginout.png", import.meta.url).href,
url: "/pages/test", // url: "/pages/test",
text: "测试页面" // text: "测试页面"
}, // },
{ // {
icon: new URL("@/static/image/user/loginout.png", import.meta.url).href, // icon: new URL("@/static/image/user/loginout.png", import.meta.url).href,
url: "/pages/login/test", // url: "/pages/login/test",
fn: () => { // fn: () => {
removeToken(); // removeToken();
}, // },
text: "退出登录(去测试登录)" // text: "退出登录(去测试登录)"
} // }
]; ];
/* 个人信息 */ /* 个人信息 */
const realName = ref(""); const realName = ref("");
......
import axios from "axios"; import axios from "axios";
import { getToken } from "./token"; import { getToken } from "./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
...@@ -36,13 +36,14 @@ instance.interceptors.request.use( ...@@ -36,13 +36,14 @@ instance.interceptors.request.use(
// 响应拦截器 // 响应拦截器
instance.interceptors.response.use( instance.interceptors.response.use(
response => { response => {
if (response.data.code === 4 || response.data.code === 8) { let { code, message } = response.data;
if (code === 4 || code === 8) {
uni.showToast({ uni.showToast({
title: response.data.message, title: message,
icon: "none" icon: "none"
}); });
} }
if (response.data.code === 9) { if (code === 9) {
const path = getCurrentPages()[0].$page.path const path = getCurrentPages()[0].$page.path
if(path === '/pages/user/resume/essentialInformation/index') return if(path === '/pages/user/resume/essentialInformation/index') return
uni.showModal({ uni.showModal({
...@@ -58,6 +59,21 @@ instance.interceptors.response.use( ...@@ -58,6 +59,21 @@ instance.interceptors.response.use(
} }
} }
}); });
} else if (code === 13) {
uni.showModal({
title: '您的帐号已失效',
content: '由于您超过1月未登录现已将您的账号禁用您可完成申述后继续使用',
showCancel: true,
confirmText: '立即申述',
success: function (confirm) {
if (confirm.confirm) {
xma.navigateTo({
url: '/pages/postionList/appeal/index'
})
}
}
});
} }
uni.hideLoading() uni.hideLoading()
// 在这里可以对响应数据进行预处理 // 在这里可以对响应数据进行预处理
......
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