我的老乡
@@ -199,6 +199,9 @@ export default {
diff --git a/src/components/userinfo/usercenter/index.vue b/src/components/userinfo/usercenter/index.vue
index 97c55e5..d846075 100644
--- a/src/components/userinfo/usercenter/index.vue
+++ b/src/components/userinfo/usercenter/index.vue
@@ -2,7 +2,7 @@
-
+
- h(App),
}).$mount("#app");
+export default Vue;
diff --git a/src/permission.js b/src/permission.js
index f35cf95..6a240c2 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -7,7 +7,7 @@ router.beforeEach(async (to, from, next) => {
// 路由守卫
console.log(from);
if (from.fullPath === "/list") {
- console.log(213);
+ // console.log(213);
sessionStorage.setItem("ISLIST", JSON.stringify(true));
} else {
sessionStorage.setItem("ISLIST", JSON.stringify(false));
diff --git a/src/router/index.js b/src/router/index.js
index 7fece97..6fdd25e 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -83,6 +83,18 @@ const routes = [
// },
],
},
+ {
+ path: "mytownsman",
+ name: "mytownsman",
+ component: () =>
+ import("../components/userinfo/usercenter/components/townsman.vue"),
+ },
+ {
+ path: "mybill",
+ name: "mybill",
+ component: () =>
+ import("../components/userinfo/usercenter/components/mybill.vue"),
+ },
],
},
{
@@ -95,22 +107,30 @@ const routes = [
path: "usercenter",
name: "usercenter",
component: () => import("../components/userinfo/usercenter/index.vue"),
- redirect: "townsman",
+ redirect: "usercenter/myintegral",
children: [
+ // {
+ // path: "townsman",
+ // name: "townsman",
+ // component: () =>
+ // import(
+ // "../components/userinfo/usercenter/components/townsman.vue"
+ // ),
+ // },
+ // {
+ // path: "mybill",
+ // name: "mybill",
+ // component: () =>
+ // import("../components/userinfo/usercenter/components/mybill.vue"),
+ // },
{
- path: "townsman",
- name: "townsman",
+ path: "myintegral",
+ name: "myintegral",
component: () =>
import(
- "../components/userinfo/usercenter/components/townsman.vue"
+ "../components/userinfo/usercenter/components/myintegral.vue"
),
},
- {
- path: "mybill",
- name: "mybill",
- component: () =>
- import("../components/userinfo/usercenter/components/mybill.vue"),
- },
{
path: "mycard",
name: "mycard",
@@ -125,14 +145,6 @@ const routes = [
"../components/userinfo/usercenter/components/mybalance.vue"
),
},
- {
- path: "myintegral",
- name: "myintegral",
- component: () =>
- import(
- "../components/userinfo/usercenter/components/myintegral.vue"
- ),
- },
],
},
{
@@ -184,6 +196,18 @@ const routes = [
},
],
},
+ {
+ path: "mytownsman",
+ name: "mytownsman",
+ component: () =>
+ import("../components/userinfo/usercenter/components/townsman.vue"),
+ },
+ {
+ path: "mybill",
+ name: "mybill",
+ component: () =>
+ import("../components/userinfo/usercenter/components/mybill.vue"),
+ },
],
},
{
diff --git a/src/style/index.less b/src/style/index.less
index 2c427c9..9619ed8 100644
--- a/src/style/index.less
+++ b/src/style/index.less
@@ -27,6 +27,7 @@ td,
div {
margin: 0;
padding: 0;
+ color: #475d5e;
font-family: PingFangSC, PingFangSC-Regular;
}
body,
@@ -148,6 +149,42 @@ i {
-moz-osx-font-smoothing: grayscale;
}
+.icon-xiangzuoxuanzhuan:before {
+ content: "\e744";
+}
+
+.icon-xiangyouxuanzhuan:before {
+ content: "\e746";
+}
+
+.icon-rotatexuanzhuan2:before {
+ content: "\e6e2";
+}
+
+.icon-rotatexuanzhuan:before {
+ content: "\e6eb";
+}
+
+.icon-xuanzhuan:before {
+ content: "\e652";
+}
+
+.icon-zhengjian:before {
+ content: "\e654";
+}
+
+.icon-shangchuan:before {
+ content: "\e73a";
+}
+
+.icon-guanbi1:before {
+ content: "\e739";
+}
+
+.icon-yulan:before {
+ content: "\e737";
+}
+
.icon-rili:before {
content: "\e736";
}
@@ -560,7 +597,7 @@ p.bottombox {
}
.ant-cascader-menu,
.ant-modal-body {
- max-height: 300px !important;
+ // max-height: 300px !important;
&::-webkit-scrollbar {
/*滚动条整体样式*/
width: 7px; /*高宽分别对应横竖滚动条的尺寸*/
diff --git a/src/style/index.wxss b/src/style/index.wxss
index 8af9085..11a8e46 100644
--- a/src/style/index.wxss
+++ b/src/style/index.wxss
@@ -26,6 +26,7 @@ td,
div {
margin: 0;
padding: 0;
+ color: #475d5e;
font-family: PingFangSC, PingFangSC-Regular;
}
body,
@@ -134,6 +135,33 @@ i {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
+.icon-xiangzuoxuanzhuan:before {
+ content: "\e744";
+}
+.icon-xiangyouxuanzhuan:before {
+ content: "\e746";
+}
+.icon-rotatexuanzhuan2:before {
+ content: "\e6e2";
+}
+.icon-rotatexuanzhuan:before {
+ content: "\e6eb";
+}
+.icon-xuanzhuan:before {
+ content: "\e652";
+}
+.icon-zhengjian:before {
+ content: "\e654";
+}
+.icon-shangchuan:before {
+ content: "\e73a";
+}
+.icon-guanbi1:before {
+ content: "\e739";
+}
+.icon-yulan:before {
+ content: "\e737";
+}
.icon-rili:before {
content: "\e736";
}
@@ -467,10 +495,6 @@ p.bottombox::after {
left: -20px;
background-color: #eeefef;
}
-.ant-cascader-menu,
-.ant-modal-body {
- max-height: 300px !important;
-}
.ant-cascader-menu::-webkit-scrollbar,
.ant-modal-body::-webkit-scrollbar {
/*滚动条整体样式*/
diff --git a/src/utils/commonUtil.js b/src/utils/commonUtil.js
index 9a6f76a..26f9eea 100644
--- a/src/utils/commonUtil.js
+++ b/src/utils/commonUtil.js
@@ -1103,6 +1103,47 @@ export function formatDateYMD(val) {
}
return fmt;
}
+export function formatDateYMDHMS(val) {
+ // model -> view,在更新 `` 元素之前格式化值
+ if (val !== "") {
+ if (val !== null && val !== "" && typeof val == "string") {
+ if (val.indexOf("T")) {
+ val = val.replace("T", " "); //原来L端可能返回的时间格式有带T的格式,处理一下
+ }
+ val = val.replace("-", "/").replace("-", "/");
+ }
+ var value = new Date(val);
+ //console.log(val);
+ var fmt = "yyyy-MM-dd HH:mm";
+ var o = {
+ "M+": value.getMonth() + 1, //月份
+ "d+": value.getDate(), //日
+ "H+": value.getHours(), //小时
+ //"h+": val.getHours()%12 == 0 ? 12 : val.getHours()%12, //小时
+ "m+": value.getMinutes(), //分
+ "s+": value.getSeconds(), //秒
+ //"S": val.getMilliseconds() //毫秒
+ //"q+": Math.floor((val.getMonth() + 3) / 3) //季度
+ };
+ if (/(y+)/.test(fmt))
+ fmt = fmt.replace(
+ RegExp.$1,
+ (value.getFullYear() + "").substr(4 - RegExp.$1.length)
+ );
+ for (var k in o) {
+ if (new RegExp("(" + k + ")").test(fmt)) {
+ fmt = fmt.replace(
+ RegExp.$1,
+ RegExp.$1.length == 1
+ ? o[k]
+ : ("00" + o[k]).substr(("" + o[k]).length)
+ );
+ }
+ }
+ return fmt;
+ }
+}
+
function getJobSpecialLabelNamesArray(jobSpecialLabelNames) {
if (isNotEmptyCheck(jobSpecialLabelNames)) {
return jobSpecialLabelNames.split(", ");
@@ -1110,6 +1151,35 @@ function getJobSpecialLabelNamesArray(jobSpecialLabelNames) {
return [];
}
+/**
+ * 处理工单状态
+ */
+export function userApplyOrderStatusArray() {
+ let orderStatus = [
+ { id: "10", name: "审核中" },
+ { id: "20", name: "跟面试" },
+ { id: "30", name: "跟入职" },
+ { id: "40", name: "跟在职" },
+ { id: "50", name: "跟离职" },
+ { id: "60", name: "已完成" },
+ { id: "70", name: "已放弃" },
+ ];
+ return orderStatus;
+}
+
+/**
+ * 根据工单状态ID获取名称
+ */
+export function getUserApplyOrderStatusById(id) {
+ let str = "";
+ let array = userApplyOrderStatusArray();
+ array.forEach((item) => {
+ if (item.id == id) {
+ str = item.name;
+ }
+ });
+ return str;
+}
// 处理职位列表的方法
export function disposeJobListData(jobList) {
if (jobList !== undefined) {
diff --git a/src/utils/request.js b/src/utils/request.js
index 1241475..264b0f1 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -1,4 +1,6 @@
import axios from "axios";
+import router from "@/router";
+// import Vue from "vue";
const baseURL = "http://1shoudan.com"; // 正式环境线上
console.log(baseURL);
// const baseURL = "https://d.matripe.com.cn"; // 正式环境本地
@@ -11,9 +13,38 @@ axios.defaults.withCredentials = true; //添加这行代码
// console.log(axios);
const service = axios.create({
baseURL: "/api_prod", // url = base url + request url
- // baseURL: baseURL, // baseURL: "/api", // url = base url + request url
+ // baseURL: baseURL, // baseURL: "/api", // url = base url + request url
withCredentials: true, // send cookies when cross-domain requests
timeout: 10000, // request timeout
crossDomain: true,
});
+service.interceptors.response.use(
+ (response) => {
+ const { msg, status } = response.data;
+ console.log(status);
+ if (status == 9999) {
+ sessionStorage.removeItem("LOGIN_DATA");
+
+ router.push("/login");
+ // 跳转到登录页面
+ // this.$message.warning(msg);
+ return Promise.reject(new Error("token过期"));
+ }
+ if (response.status === 200) {
+ return response;
+ } else {
+ // Message.error(message)
+ return Promise.reject(new Error(msg));
+ }
+ },
+ (error) => {
+ console.log(error);
+ // if (error.toString().indexOf("9999") !== -1) {
+ // router.push("/login");
+ // // Vue.$message.warning(msg)
+ // } else if (error.message.indexOf("500") !== -1) {
+ // }
+ // return Promise.reject(error);
+ }
+);
export default service;
diff --git a/src/views/main.vue b/src/views/main.vue
index 8ef5fd9..310bd35 100644
--- a/src/views/main.vue
+++ b/src/views/main.vue
@@ -50,13 +50,14 @@
+
{{ loginValue.tel }}
-
+
个人中心
-
+
+
+
+ -
+ 我的老乡
+
+
+ -
+ 我的报名
+
+
+
+
@@ -236,8 +255,12 @@ export default {
return 3;
} else if (path.indexOf("main") > -1) {
return 0;
- } else {
+ } else if (path.indexOf("mytownsman") > -1) {
return 4;
+ } else if (path.indexOf("mybill") > -1) {
+ return 5;
+ } else {
+ return 6;
}
},
},
@@ -498,17 +521,46 @@ export default {
}
}
}
+ .navigationright {
+ float: right;
+ margin-right: 24px;
+ font-size: 16px;
+ ul {
+ display: flex;
+ text-align: center;
+ line-height: 52px;
+ li {
+ cursor: pointer;
+ a.titleactiveafter {
+ font-size: 16px;
+ font-weight: bold;
+ color: #ff6a00;
+ }
+ a:hover {
+ color: #ff6a00;
+ }
+ &:first-child {
+ margin-right: 24px;
+ }
+ }
+ }
+ }
.login {
float: right;
- width: 70px;
+ // width: 36px;
line-height: 52px;
- span {
+ .loginbtn {
+ width: 70px;
+ }
+ > span {
+ width: 36px;
+ height: 36px;
span {
width: 36px;
height: 36px;
- margin-top: 8px;
- margin-left: 33px;
+ margin-top: 4px;
+ // margin-left: 33px;
border-radius: 999px;
// background-color: #ff6a00;
margin-right: -3px;
diff --git a/src/views/userinfo.vue b/src/views/userinfo.vue
index 6f89895..98e019a 100644
--- a/src/views/userinfo.vue
+++ b/src/views/userinfo.vue
@@ -3,14 +3,14 @@
-
+
-
+
-
-
个人中心
@@ -42,7 +42,7 @@
{{ loginValue.tel }}
-
+
个人中心
-
+
+
+
+ -
+ 我的老乡
+
+
+ -
+ 我的报名
+
+
+
+
@@ -181,7 +199,7 @@ export default {
isspinning: false,
isspecialboxshow: false,
isfootershow: true,
- laoxiangshow: false,
+ laoxiangshow: false, // 老乡的广告是否显示
isbannershow: true,
isLogin: false,
loginValue: {},
@@ -209,8 +227,12 @@ export default {
return 1;
} else if (path.indexOf("accountsetting") > -1) {
return 2;
- } else {
+ } else if (path.indexOf("mytownsman") > -1) {
+ return 3;
+ } else if (path.indexOf("mybill") > -1) {
return 4;
+ } else {
+ return 5;
}
},
},
@@ -344,7 +366,7 @@ export default {
font-size: 16px;
.titleactive {
font-size: 16px;
- font-weight: normal;
+ font-weight: bold;
color: #ff6a00;
}
.w {
@@ -356,7 +378,7 @@ export default {
span {
float: left;
}
- > span:first-of-type {
+ .titlelogo {
display: block;
width: 160px;
height: 52px;
@@ -375,7 +397,7 @@ export default {
// color: #ff6a00;
}
}
- > span:nth-of-type(2) {
+ .navigationleft {
ul {
font-size: 16px;
display: flex;
@@ -395,17 +417,44 @@ export default {
}
}
}
+ .navigationright {
+ float: right;
+ margin-right: 24px;
+ ul {
+ display: flex;
+ text-align: center;
+ line-height: 52px;
+ li {
+ cursor: pointer;
+ a.titleactiveafter {
+ font-weight: bold;
+ color: #ff6a00;
+ }
+ a:hover {
+ color: #ff6a00;
+ }
+ &:first-child {
+ margin-right: 24px;
+ }
+ }
+ }
+ }
.login {
float: right;
- width: 70px;
+ // width: 36px;
line-height: 52px;
- span {
+ .loginbtn {
+ width: 70px;
+ }
+ > span {
+ width: 36px;
+ height: 36px;
span {
width: 36px;
height: 36px;
- margin-top: 8px;
- margin-left: 33px;
+ margin-top: 5px;
+ // margin-left: 33px;
border-radius: 999px;
// background-color: #ff6a00;
margin-right: -3px;