From be57172895058045a6c75c70cf36f5230eaad8bc Mon Sep 17 00:00:00 2001 From: wangxia <779219182@qq.com> Date: Mon, 1 Jul 2024 18:25:47 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/request.js b/src/utils/request.js index 915994e..2d89e9a 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -7,8 +7,8 @@ console.log('use message in request', this); console.log('use message in request', vue); // import Vue from "vue"; // console.log('use message in request2', Vue); -const baseURL = "//idaotian.com"; // 正式环境线上 -// const baseURL = "//test.renminshitang.com.cn/daotian/api_dev"; // 测试环境本地 +// const baseURL = "//idaotian.com"; // 正式环境线上 +const baseURL = "//test.renminshitang.com.cn/daotian/api_dev"; // 测试环境本地 // console.log(data1.keys()); axios.defaults.withCredentials = true; //添加这行代码 // 动态设置https协议,拼接到接口基础路径 @@ -33,13 +33,13 @@ service.interceptors.request.use( // } // } + req.headers.appId = "daotianpc"; if (localStorage.getItem("LOGIN_DATA")) { console.log('req', req); console.log('req url', req.url); req.headers.Authorization = "Bearer " + localStorage.getItem("LOGIN_DATA_token"); req.headers.agencyId = JSON.parse(localStorage.getItem("DAOTIAN_agencyid")) - req.headers.appId = "daotianpc"; req.headers["g-open-env"] = 'WEB-PAGE' if (req.url == '/assistant/custom/job/v2/list') { req.headers.appId = '' From 903f878181c92614b26f6eb3952189d93c53408a Mon Sep 17 00:00:00 2001 From: wangxia <779219182@qq.com> Date: Fri, 2 Aug 2024 11:36:50 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/utils/request.js b/src/utils/request.js index 2d89e9a..08086d0 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -8,7 +8,8 @@ console.log('use message in request', vue); // import Vue from "vue"; // console.log('use message in request2', Vue); // const baseURL = "//idaotian.com"; // 正式环境线上 -const baseURL = "//test.renminshitang.com.cn/daotian/api_dev"; // 测试环境本地 +const baseURL = "//daotian.matripe.com.cn"; // 正式环境线上 +// const baseURL = "//test.renminshitang.com.cn/daotian/api_dev"; // 测试环境本地 // console.log(data1.keys()); axios.defaults.withCredentials = true; //添加这行代码 // 动态设置https协议,拼接到接口基础路径 @@ -87,6 +88,7 @@ service.interceptors.response.use( } else if (response.data.status === 2002) {// 职位名称 // message.error('职位名称:请不要填写【' + response.data.msg + '】相关违禁内容'); console.log('response.data.status === 2002', response.data.status); + console.log(' vue.$message', vue.$message); vue.$message.error(response.data.msg) // this.$message.error(response.data.msg); setTimeout(() => { @@ -105,6 +107,19 @@ service.interceptors.response.use( // code: 2002, // msg: response.data.msg // }); + } else if (response.data.status == 9009) { + vue.$message.error(response.data.msg) + setTimeout(() => { + localStorage.removeItem("LOGIN_DATA"); + localStorage.removeItem("LOGIN_DATA_token"); + localStorage.removeItem("DAOTIAN_agencyid"); + router.push("/login"); + return Promise.reject(new Error(response.data.msg)); + // 跳转到登录页面 + // this.$message.warning(msg); + }, 2000); + + } else { // Message.error(response.data.msg) // vue.$message.error(response.data.msg) From 672c05bc55939ea8c2eefd61b1ecb3f0f3c68784 Mon Sep 17 00:00:00 2001 From: wangxia <779219182@qq.com> Date: Fri, 2 Aug 2024 14:10:38 +0800 Subject: [PATCH 3/4] =?UTF-8?q?header=20=E6=B7=BB=E5=8A=A0=E6=9D=A5?= =?UTF-8?q?=E6=BA=90=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/utils/request.js b/src/utils/request.js index 08086d0..50a4fe4 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -8,8 +8,10 @@ console.log('use message in request', vue); // import Vue from "vue"; // console.log('use message in request2', Vue); // const baseURL = "//idaotian.com"; // 正式环境线上 -const baseURL = "//daotian.matripe.com.cn"; // 正式环境线上 -// const baseURL = "//test.renminshitang.com.cn/daotian/api_dev"; // 测试环境本地 + + +// const baseURL = "//daotian.matripe.com.cn"; // 正式环境线上 +const baseURL = "//test.renminshitang.com.cn/daotian/api_dev"; // 测试环境本地 // console.log(data1.keys()); axios.defaults.withCredentials = true; //添加这行代码 // 动态设置https协议,拼接到接口基础路径 @@ -38,9 +40,12 @@ service.interceptors.request.use( if (localStorage.getItem("LOGIN_DATA")) { console.log('req', req); console.log('req url', req.url); - + let appName = '稻田' req.headers.Authorization = "Bearer " + localStorage.getItem("LOGIN_DATA_token"); req.headers.agencyId = JSON.parse(localStorage.getItem("DAOTIAN_agencyid")) + // 请求来源标识 1.小程序 2.app 3.网页 + req.headers.appClassify = 3 + req.headers.appName = encodeURIComponent(appName) req.headers["g-open-env"] = 'WEB-PAGE' if (req.url == '/assistant/custom/job/v2/list') { req.headers.appId = '' From e8c26a92ae253fdd5ad3c4544dfee2a835f2aa2e Mon Sep 17 00:00:00 2001 From: wangxia <779219182@qq.com> Date: Tue, 20 Aug 2024 14:59:00 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FirstJob/joblist.vue | 141 ++++++++++++++++++------------------ src/utils/request.js | 4 +- 2 files changed, 71 insertions(+), 74 deletions(-) diff --git a/src/components/FirstJob/joblist.vue b/src/components/FirstJob/joblist.vue index 8f12267..0dc78d5 100644 --- a/src/components/FirstJob/joblist.vue +++ b/src/components/FirstJob/joblist.vue @@ -223,8 +223,8 @@
{{ managerInfo.name }} @@ -1069,7 +1067,7 @@ export default { minAge: "", maxAge: "", managerInfo: {}, - hasTab:false, //判断是不是从后台来的 + hasTab: false, //判断是不是从后台来的 }; }, // 计算属性 @@ -1204,13 +1202,12 @@ export default { this.currentPage = info.pageNum ? info.pageNum : 1; } - if(this.$route.query.tab == 1 || localStorage.getItem("hasTab")){ - this.signType = 1; - this.hasTab = true; - //写入session缓存 - localStorage.setItem("hasTab", this.hasTab) - - } + if (this.$route.query.tab == 1 || localStorage.getItem("hasTab")) { + this.signType = 1; + this.hasTab = true; + //写入session缓存 + localStorage.setItem("hasTab", this.hasTab); + } if (this.$route.query.type) { if (this.$route.query.type == "vocational") { @@ -1362,14 +1359,13 @@ export default { this.isspinning = true; console.log(this.formvalue); try { - let aId = ""; - - if (window.location.origin.indexOf('localhost:') > -1 || window.location.origin.indexOf('test.') > -1){ - aId = "2743" - }else{ - aId = "3087" - } + let aId = ""; + if (window.location.origin.indexOf("localhost:") > -1 || window.location.origin.indexOf("test.") > -1) { + aId = "2743"; + } else { + aId = "3087"; + } newdata = { agencyId: aId, //测试版 @@ -1396,11 +1392,11 @@ export default { if (data.status === 200) { this.jobMainList = disposeJobListData(data.data.recordList); this.jobMainList.forEach((item, index) => { - if (item.jobType == 2) { - item["servetype"] = setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType); - }else{ - item["servetype"] = setReturnFee(item.returnFee, item.returnFeeType); - } + if (item.jobType == 2) { + item["servetype"] = setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType); + } else { + item["servetype"] = setReturnFee(item.returnFee, item.returnFeeType); + } }); this.formvalue.total = data.data.recordCount; console.log(this.jobMainList); @@ -1447,21 +1443,21 @@ export default { console.log(this.searchValue); if (typeof +this.searchValue.trim() == "number" && !isNaN(+this.searchValue.trim())) { this.formvalue.ageStr = this.searchValue.trim(); - this.formvalue.keys = ""; + this.formvalue.keys = ""; } else { // this.formvalue.aliasName = this.searchValue.trim(); - this.formvalue.keys = this.searchValue.trim(); - this.formvalue.ageStr = "" + this.formvalue.keys = this.searchValue.trim(); + this.formvalue.ageStr = ""; } // console.log("search1"); // this.formvalue.aliasName = this.searchValue; // console.log(this.formvalue); - if(this.formvalue.signType == 1){ - this.getJobListYicai(); - }else{ - this.getJobList(); - } + if (this.formvalue.signType == 1) { + this.getJobListYicai(); + } else { + this.getJobList(); + } this.isdownHotStoreShow = false; } @@ -1787,8 +1783,8 @@ export default { this.formvalue.aliasName = ""; this.formvalue.keys = ""; this.formvalue.ageStr = ""; - console.log('this.formvalue',this.formvalue); - if (this.formvalue.signType == 1) { + console.log("this.formvalue", this.formvalue); + if (this.formvalue.signType == 1) { this.getJobListYicai(); } else { this.getJobList(); @@ -1901,7 +1897,7 @@ export default { // 跳转到路由新页面的方法 // console.log(item); // let userinfo = JSON.stringify(item); - sessionStorage.setItem("PAGE_TYPE", JSON.stringify({ id: item.id, pageNum: this.formvalue.pageNum, signType: this.signType,jobClassify:item.jobClassify })); + sessionStorage.setItem("PAGE_TYPE", JSON.stringify({ id: item.id, pageNum: this.formvalue.pageNum, signType: this.signType, jobClassify: item.jobClassify })); if (this.signType == "") { this.$router.push({ name: "recordbill", params: item }); @@ -2044,11 +2040,12 @@ export default { this.currentCity = item.name; // this.getJobList(); this.visible = false; - if (this.formvalue.signType != 0) { - this.getJobListYicai(); - } else { - this.getJobList(); - } + console.log('this.formvalue.signType',this.formvalue.signType); + if (this.signType != 0) { + this.getJobListYicai(); + } else { + this.getJobList(); + } }, getHotStoreList(item) { // console.log(item); @@ -2066,11 +2063,11 @@ export default { this.currentCity = "全国"; // console.log(this.formvalue); // this.getJobList(); - if (this.formvalue.signType != 0) { - this.getJobListYicai(); - } else { - this.getJobList(); - } + if (this.formvalue.signType != 0) { + this.getJobListYicai(); + } else { + this.getJobList(); + } }, copyText(event, ind) { // 复制文本内容 @@ -2109,18 +2106,18 @@ export default { this.formvalue.levelType = ""; this.formvalue.provinceName = ""; // this.getJobList(); - if (this.formvalue.signType != 0) { - this.getJobListYicai(); - } else { - this.getJobList(); - } + if (this.formvalue.signType != 0) { + this.getJobListYicai(); + } else { + this.getJobList(); + } }, /** * 前往详情页 */ toDetail(item) { // :to="signType == '' ? '/detail?id=' + item.id + '&page=' + formvalue.pageNum : '/detailYicai?id=' + item.id + '&page=' + formvalue.pageNum" - sessionStorage.setItem("PAGE_TYPE", JSON.stringify({ id: item.id, pageNum: this.formvalue.pageNum, signType: this.signType,jobClassify:item.jobClassify })); + sessionStorage.setItem("PAGE_TYPE", JSON.stringify({ id: item.id, pageNum: this.formvalue.pageNum, signType: this.signType, jobClassify: item.jobClassify })); const routeURL = this.$router.resolve({ name: this.signType == "" ? "Detail" : "DetailYicai", @@ -3252,31 +3249,31 @@ export default { } } .jobpricemonth { - display: inline-block; + display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 400; text-align: left; color: #333; line-height: 20px; - margin-left: 8px; + margin-left: 8px; + } + .xmfDiv { + display: inline-block; + height: 20px; + margin-top: 4px; + background: #f1faff; + border-radius: 2px; + line-height: 16px; + padding-right: 4px; } - .xmfDiv{ - display: inline-block; - height: 20px; - margin-top: 4px; - background: #f1faff; - border-radius: 2px; - line-height: 16px; - padding-right: 4px; - } .jobpricehour { margin-top: 8px; font-size: 14px; font-weight: normal; text-align: left; color: #ff4400; - display: inline-block; + display: inline-block; // line-height: 24px; font-weight: 600; span { diff --git a/src/utils/request.js b/src/utils/request.js index 50a4fe4..b8396ef 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -10,8 +10,8 @@ console.log('use message in request', vue); // const baseURL = "//idaotian.com"; // 正式环境线上 -// const baseURL = "//daotian.matripe.com.cn"; // 正式环境线上 -const baseURL = "//test.renminshitang.com.cn/daotian/api_dev"; // 测试环境本地 +const baseURL = "//daotian.matripe.com.cn"; // 正式环境线上 +// const baseURL = "//test.renminshitang.com.cn/daotian/api_dev"; // 测试环境本地 // console.log(data1.keys()); axios.defaults.withCredentials = true; //添加这行代码 // 动态设置https协议,拼接到接口基础路径