服务费更新

cyl/dev
wangxia 4 years ago
parent faa5b3d99f
commit f70e1911b6

@ -16,18 +16,7 @@
<div class="imgbox"> <div class="imgbox">
<img v-if="item.logo" :src="item.logo" alt="" /> <img v-if="item.logo" :src="item.logo" alt="" />
<img v-else src="../../../../static/img/nopicture.png" alt="" /> <img v-else src="../../../../static/img/nopicture.png" alt="" />
<span <span>服务费{{ item.servetype }}</span>
>服务费<i
v-if="
item.returnFee &&
item.returnFee !== -1 &&
item.returnFee !== null
? true
: false
"
>{{ item.returnFee }}</i
><i v-else> -</i>{{ item.servetype }}</span
>
</div> </div>
<div class="jobname"> <div class="jobname">
{{ {{
@ -113,7 +102,7 @@ export default {
* 如果 root 实例挂载了一个文档内元素 mounted 被调用时 vm.el 也在文档内 * 如果 root 实例挂载了一个文档内元素 mounted 被调用时 vm.el 也在文档内
*/ */
mounted() { mounted() {
console.log(this.$route.fullPath); // console.log(this.$route.fullPath);
if (this.$route.fullPath.indexOf("detail") > -1) { if (this.$route.fullPath.indexOf("detail") > -1) {
this.isdetail = true; this.isdetail = true;
} }

@ -239,16 +239,7 @@
<div class="topbox"> <div class="topbox">
<div>服务费</div> <div>服务费</div>
<div> <div>
<span <span>{{ jobDetail.servetype }}</span>
v-if="
jobDetail.returnFee &&
jobDetail.returnFee !== -1 &&
jobDetail.returnFee !== null
? true
: false
"
>{{ jobDetail.returnFee }}</span
><i v-else>--</i><span>{{ jobDetail.servetype }}</span>
</div> </div>
</div> </div>
<button class="dropdown bottombox1" @click="torecord()"> <button class="dropdown bottombox1" @click="torecord()">

@ -172,7 +172,7 @@
</a-breadcrumb-item> </a-breadcrumb-item>
</a-breadcrumb> --> </a-breadcrumb> -->
<!-- 主体部分 --> <!-- 主体部分 -->
<div class="maincontent w"> <div class="w" id="maincontent">
<div class="maincontentleft"> <div class="maincontentleft">
<div style="text-align: center"> <div style="text-align: center">
<a-spin tip="加载中..." :spinning="isspinning"></a-spin> <a-spin tip="加载中..." :spinning="isspinning"></a-spin>
@ -254,18 +254,7 @@
<div class="subsetright"> <div class="subsetright">
<div class="topbox"> <div class="topbox">
<div>服务费</div> <div>服务费</div>
<div> <div>{{ item.servetype }}</div>
<span
v-if="
item.returnFee &&
item.returnFee !== -1 &&
item.returnFee !== null
? true
: false
"
>{{ item.returnFee }}</span
><i v-else>--</i>{{ item.servetype }}
</div>
</div> </div>
<div class="bottombox1"> <div class="bottombox1">
<router-link <router-link
@ -514,6 +503,14 @@ export default {
}, },
deep: true, deep: true,
}, },
$route: {
handler(to, from) {
console.log("ischange");
console.log(to);
console.log(from);
},
deep: true,
},
}, },
// //
@ -540,38 +537,10 @@ export default {
// document.querySelector(".ant-pagination-options-quick-jumper").innerHTML = // document.querySelector(".ant-pagination-options-quick-jumper").innerHTML =
// "<input type='text'>"; // "<input type='text'>";
console.log(this.formvalue); console.log(this.formvalue);
window.addEventListener("scroll", this.windowScroll); // console.log(this.$route);
}, },
// //
methods: { methods: {
/**
* 处理后台返回的职位列表
*/
windowScroll() {
let scrollTop =
window.pageYOffset ||
document.documentElement.scrollTop ||
document.body.scrollTop;
// console.log(scrollTop); // ,
let navigation = document.getElementById("navigation");
let content = document.querySelector(".maincontent");
// let filterbox = document.querySelector(".w");
// console.log(filterbox);
// console.log(content);
// let left = ("100vw" - "1200px") / 2;
if (scrollTop >= 81) {
navigation.style.position = "fixed";
navigation.style.top = "0px";
navigation.style.boxShadow = "2px 2px 4px 0px rgba(0,0,0,0.05)";
// navigation.style.left = 0;
content.style.marginTop = "90px";
} else {
navigation.style.position = "relative";
navigation.style.right = "0";
content.style.marginTop = "16px";
navigation.style.boxShadow = "none";
}
},
// //
// filterbox() { // filterbox() {
// return () => { // return () => {
@ -620,7 +589,7 @@ export default {
// const that = this; // const that = this;
try { try {
const { data } = await getProvinceApi(); const { data } = await getProvinceApi();
console.log(data); // console.log(data);
data.data.pop(); data.data.pop();
this.cityoption = data.data; this.cityoption = data.data;
@ -802,8 +771,8 @@ export default {
} else if (date.getDay() === 7) { } else if (date.getDay() === 7) {
this.dateinfo.week = "星期日"; this.dateinfo.week = "星期日";
} }
console.log(date.getDate()); // console.log(date.getDate());
console.log(date.getDate().length); // console.log(date.getDate().length);
if (date.getDate().toString().length <= 1) { if (date.getDate().toString().length <= 1) {
this.dateinfo.day = "0" + date.getDate(); this.dateinfo.day = "0" + date.getDate();
console.log(this.dateinfo.day); console.log(this.dateinfo.day);
@ -1265,7 +1234,7 @@ export default {
} }
} }
/deep/ .maincontent { /deep/ #maincontent {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-top: 16px; margin-top: 16px;

@ -0,0 +1,117 @@
<template>
<!-- 首页页面 -->
<div class="main-container">
<div class="bgimg">
<a-carousel :autoplay="true" effect="fade" :dots="false" ref="scrollimg">
<img :src="item" alt="" v-for="(item, index) in imglist" :key="index" />
</a-carousel>
<div class="middleslogan" :style="{ opacity: isshow ? '1' : '0' }">
<i class="iconfont icon-yigezhuanmenfuwudailidepingtai"></i>
</div>
<div class="bottominfo">
Copyright © 2015 - 2022 Matripe. All Rights Reserved. <i></i>
<a target="_blank" href="https://beian.miit.gov.cn/#/Integrated/index"
>京ICP备16043923号-9</a
>
0
</div>
</div>
<div class="navigationBar">
<ul>
<li>关于一手单</li>
<li>合作品牌</li>
<li>业务版图</li>
<li>联系我们</li>
</ul>
</div>
</div>
</template>
<script>
export default {
//
name: "main",
//
components: {},
//
props: {},
//
data() {
return {
isshow: false,
imglist: [
require("../../assets/banner1.png"),
require("../../assets/banner2.png"),
require("../../assets/banner3.png"),
],
};
},
//
computed: {},
//
watch: {},
//
/**
* 组件实例创建完成属性已绑定但DOM还未生成$ el属性还不存在
*/
created() {
setTimeout(() => {
this.isshow = true;
}, 500);
},
/**
* el 被新创建的 vm.el 替换并挂载到实例上去之后调用该钩子
* 如果 root 实例挂载了一个文档内元素 mounted 被调用时 vm.el 也在文档内
*/
mounted() {},
//
methods: {},
};
</script>
<style scoped lang="less">
.main-container {
overflow: hidden;
.bgimg {
position: relative;
overflow: hidden;
width: 100vw;
height: calc(100% - 80px);
height: 100%;
// background: url("../../assets/banner1.png") no-repeat center;
img {
width: 1920px !important;
height: calc(100vh - 80px);
}
.middleslogan {
position: absolute;
top: 40%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
color: #fff;
z-index: 99;
transition: all 1.5s;
i {
font-size: 90px;
text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.4);
}
}
.bottominfo {
position: absolute;
bottom: 40px;
left: 50%;
font-size: 14px;
transform: translateX(-50%);
color: #fff;
}
}
.navigationBar {
> ul {
display: flex;
width: 1200px;
height: 96px;
background-color: #fff;
}
}
}
</style>

@ -62,7 +62,6 @@ export default {
<style scoped lang="less"> <style scoped lang="less">
.main-container { .main-container {
height: calc(100vh - 80px);
overflow: hidden; overflow: hidden;
.bgimg { .bgimg {
position: relative; position: relative;
@ -72,8 +71,9 @@ export default {
height: 100%; height: 100%;
// background: url("../../assets/banner1.png") no-repeat center; // background: url("../../assets/banner1.png") no-repeat center;
img { img {
width: 100%; // width: 100%;
height: 100%; width: 1920px !important;
height: calc(100vh - 80px);
} }
.middleslogan { .middleslogan {
position: absolute; position: absolute;

@ -1250,20 +1250,22 @@ export function disposeJobListData(jobList) {
if (item.returnFeeType) { if (item.returnFeeType) {
if (item.returnFeeType === 0) { if (item.returnFeeType === 0) {
item.servetype = "元/小时"; item.servetype = `${item.returnFee || "--"}元/小时`;
} else if (item.returnFeeType === 1) { } else if (item.returnFeeType === 1) {
item.servetype = "元/日"; item.servetype = `${item.returnFee || "--"}元/日`;
} else if (item.returnFeeType === 2) { } else if (item.returnFeeType === 2) {
item.servetype = "元/月"; item.servetype = `${item.returnFee || "--"}元/月`;
} else if (item.returnFeeType === 3) { } else if (item.returnFeeType === 3) {
item.servetype = "元/次"; item.servetype = `${item.returnFee || "--"}元/次`;
} else { } else if (item.returnFeeType === 4) {
item.servetype = "元/小时"; item.servetype = `${item.returnFee || "--"}元/件`;
} else if (item.returnFeeType === 5) {
item.servetype = `工人收入${item.returnFee || "--"}%`;
} }
// console.log(item); // console.log(item);
// item["returnFee"] = item.returnFee / 100; // item["returnFee"] = item.returnFee / 100;
} else { } else {
item.servetype = "元/小时"; item.servetype = `${item.returnFee || "--"}元/小时`;
} }
//时薪 //时薪
// var hourlyPayStr = ""; // var hourlyPayStr = "";
@ -1422,21 +1424,40 @@ export function disposeJobListData(jobList) {
//服务费 //服务费
// console.log(item); // console.log(item);
if (jobList.returnFeeType || jobList.returnFeeType === 0) { if (jobList.returnFeeType) {
if (jobList.returnFeeType === 0) { if (jobList.returnFeeType === 0) {
jobList.servetype = "元/小时"; jobList.servetype = `${jobList.returnFee || "--"}元/小时`;
} else if (jobList.returnFeeType === 1) { } else if (jobList.returnFeeType === 1) {
jobList.servetype = "元/日"; jobList.servetype = `${jobList.returnFee || "--"}元/日`;
} else if (jobList.returnFeeType === 2) { } else if (jobList.returnFeeType === 2) {
jobList.servetype = "元/月"; jobList.servetype = `${jobList.returnFee || "--"}元/月`;
} else if (jobList.returnFeeType === 3) { } else if (jobList.returnFeeType === 3) {
jobList.servetype = "元/次"; jobList.servetype = `${jobList.returnFee || "--"}元/次`;
} else if (jobList.returnFeeType === 4) {
jobList.servetype = `${jobList.returnFee || "--"}元/件`;
} else if (jobList.returnFeeType === 5) {
jobList.servetype = `工人收入${jobList.returnFee || "--"}%`;
} }
// console.log(jobList); // console.log(jobList);
// jobList["returnFee"] = jobList.returnFee / 100; // jobList["returnFee"] = jobList.returnFee / 100;
} else { } else {
jobList.servetype = "元/小时"; jobList.servetype = `${jobList.returnFee || "--"}元/小时`;
} }
// if (jobList.returnFeeType || jobList.returnFeeType === 0) {
// if (jobList.returnFeeType === 0) {
// jobList.servetype = "元/小时";
// } else if (jobList.returnFeeType === 1) {
// jobList.servetype = "元/日";
// } else if (jobList.returnFeeType === 2) {
// jobList.servetype = "元/月";
// } else if (jobList.returnFeeType === 3) {
// jobList.servetype = "元/次";
// }
// // console.log(jobList);
// // jobList["returnFee"] = jobList.returnFee / 100;
// } else {
// jobList.servetype = "元/小时";
// }
//地址深圳丨龙岗区丨 //地址深圳丨龙岗区丨
var districtStr = ""; var districtStr = "";
if (isNotEmptyCheck(jobList.district)) { if (isNotEmptyCheck(jobList.district)) {

@ -12,8 +12,8 @@ console.log(baseURL);
axios.defaults.withCredentials = true; //添加这行代码 axios.defaults.withCredentials = true; //添加这行代码
// console.log(axios); // console.log(axios);
const service = axios.create({ const service = axios.create({
// baseURL: "/api_prod", // url = base url + request url 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 withCredentials: true, // send cookies when cross-domain requests
timeout: 10000, // request timeout timeout: 10000, // request timeout
crossDomain: true, crossDomain: true,
@ -21,7 +21,7 @@ const service = axios.create({
service.interceptors.response.use( service.interceptors.response.use(
(response) => { (response) => {
const { msg, status } = response.data; const { msg, status } = response.data;
console.log(status); // console.log(status);
if (status == 9999) { if (status == 9999) {
sessionStorage.removeItem("LOGIN_DATA"); sessionStorage.removeItem("LOGIN_DATA");

@ -306,6 +306,21 @@ export default {
} }
this.showfooter(); this.showfooter();
}, },
$route: {
handler(to, from) {
console.log("ischange");
console.log(to);
console.log(from);
window.addEventListener("scroll", this.windowScroll); //
if (to.fullPath == "/list") {
return;
} else {
window.removeEventListener("scroll", this.windowScroll);
console.log("isremove");
}
},
deep: true,
},
// isLogin() { // isLogin() {
// this.isLogin = JSON.parse(localStorage.getItem("LOGIN_DATA")); // this.isLogin = JSON.parse(localStorage.getItem("LOGIN_DATA"));
// console.log(this.isLogin); // console.log(this.isLogin);
@ -334,11 +349,41 @@ export default {
sessionStorage.getItem("LOGIN_DATA") !== null sessionStorage.getItem("LOGIN_DATA") !== null
? JSON.parse(sessionStorage.getItem("LOGIN_DATA")) ? JSON.parse(sessionStorage.getItem("LOGIN_DATA"))
: { tel: "" }; : { tel: "" };
console.log(this.loginValue); // console.log(this.loginValue);
// console.log(document.querySelector(".ant-pagination-options-quick-jumper")); // console.log(document.querySelector(".ant-pagination-options-quick-jumper"));
}, },
// //
methods: { methods: {
/**
* 处理后台返回的职位列表
*/
windowScroll() {
// console.log(e);
let scrollTop =
window.pageYOffset ||
document.documentElement.scrollTop ||
document.body.scrollTop;
// console.log(scrollTop); // ,
let navigation = document.getElementById("navigation");
let content = document.getElementById("maincontent");
// let filterbox = document.querySelector(".w");
// console.log(filterbox);
// console.log(content);
// let left = ("100vw" - "1200px") / 2;
if (this.$route.fullPath == "/list") {
if (scrollTop >= 81) {
navigation.style.position = "fixed";
navigation.style.top = "0px";
navigation.style.boxShadow = "2px 2px 4px 0px rgba(0,0,0,0.05)";
content.style.marginTop = "90px";
} else {
navigation.style.position = "relative";
navigation.style.right = "0";
content.style.marginTop = "16px";
navigation.style.boxShadow = "none";
}
}
},
// //
async getJobList(newdata) { async getJobList(newdata) {
this.isspinning = true; this.isspinning = true;
@ -355,7 +400,7 @@ export default {
total: null, // total: null, //
}; };
for (var k in this.formvalue) { for (var k in this.formvalue) {
console.log(this.formvalue[k]); // console.log(this.formvalue[k]);
if (Array.isArray(this.formvalue[k])) { if (Array.isArray(this.formvalue[k])) {
newdata[k] = newdata[k] =
this.formvalue[k].length > 0 ? this.formvalue[k].join() : ""; this.formvalue[k].length > 0 ? this.formvalue[k].join() : "";
@ -363,23 +408,23 @@ export default {
newdata[k] = this.formvalue[k]; newdata[k] = this.formvalue[k];
} }
} }
console.log(newdata); // console.log(newdata);
// debugger; // debugger;
console.log(this.isLogin); // console.log(this.isLogin);
if (this.isLogin) { if (this.isLogin) {
const { data } = await JobListApi(newdata); const { data } = await JobListApi(newdata);
console.log(data); // console.log(data);
if (data.status === 200) { if (data.status === 200) {
this.jobMainList = disposeJobListData(data.data.recordList); this.jobMainList = disposeJobListData(data.data.recordList);
this.formvalue.total = data.data.recordCount; this.formvalue.total = data.data.recordCount;
console.log(this.jobMainList); // console.log(this.jobMainList);
} else { } else {
this.$message.info("数据获取失败"); this.$message.info("数据获取失败");
} }
} }
this.totop(); this.totop();
// = data.data.recordList; // = data.data.recordList;
console.log(this.formvalue); // console.log(this.formvalue);
} catch (error) { } catch (error) {
console.log(error); console.log(error);
} }
@ -413,9 +458,9 @@ export default {
pageSize: 4, pageSize: 4,
jobCategory: 608, jobCategory: 608,
}); });
console.log(data); // console.log(data);
this.fellowList = disposeJobListData(data.data.recordList); this.fellowList = disposeJobListData(data.data.recordList);
console.log(this.fellowList); // console.log(this.fellowList);
} }
// this.$emit("update:relationList", this.relationList); // this.$emit("update:relationList", this.relationList);
} catch (error) { } catch (error) {

Loading…
Cancel
Save