diff --git a/app.js b/app.js index c6003c6..76bd9bb 100644 --- a/app.js +++ b/app.js @@ -1,8 +1,8 @@ App({ globalData: { userInfo: null, - // ip: 'http://bl7.matripe.com.cn:8001', - ip: "https://daotian.matripe.com.cn", + ip: 'https://test.renminshitang.com.cn/daotian/api_dev', + // ip: "https://daotian.matripe.com.cn", // ip: 'http://localhost:8001', sessionId: "", header: { @@ -271,7 +271,8 @@ App({ // that.globalData.user.idauth = 0; that.globalData.sessionId = res.data.data.sessionId; that.globalData.headers.Cookie = "JSESSIONID=" + res.data.data.sessionId; - that.globalData.headers2.Cookie = "JSESSIONID=" + res.data.data.sessionId; + that.globalData.headers2.Cookie = "JSESSIONID=" + res.data.data.sessionId; + that.globalData.header.Authorization = "Bearer " + res.data.data.token; that.globalData.headers.Authorization = "Bearer " + res.data.data.token; that.globalData.headers2.Authorization = "Bearer " + res.data.data.token; diff --git a/components/bottom-drawer/index.js b/components/bottom-drawer/index.js index 4be5856..072ab4a 100644 --- a/components/bottom-drawer/index.js +++ b/components/bottom-drawer/index.js @@ -1,6 +1,15 @@ +const app = getApp(); +const mydate = new Date(); +var dateUtil = require("../../utils/dateUtil.js"); +var dateTimePicker = require("../../utils/dateTimePicker.js"); Component({ data: { + dateTime: "", + currentTime: dateUtil.formatDateYMD(mydate.toLocaleDateString()), + copyTime: dateUtil.formatDateYMD(mydate.toLocaleDateString()), sex: 1, + ageArray: [], + ageIndex: -1, morePeople: false, recordList: [ { @@ -73,9 +82,187 @@ Component({ type: Boolean, value: true }, + info: { + type: Object, + value: {}, + } + + }, + ready () { + let that = this; + console.log(this.data.info); + for (let i = 16; i < 70; i++) { + that.data.ageArray.push(i); + } + this.setData({ + ageArray: that.data.ageArray + }) + + let hour = new Date().getHours(); + if (hour < 20 && hour >= 6) { + if (that.data.currentTime == that.data.copyTime) { + that.data.currentTime = that.data.currentTime + " " + (hour + 1) + ":00"; + } + } else if (hour >= 20) { + if (that.data.currentTime == that.data.copyTime) { + that.data.currentTime = that.data.currentTime + " " + "19:30"; + } + } else if (hour < 6) { + if (that.data.currentTime == that.data.copyTime) { + that.data.currentTime = that.data.currentTime + " " + "6:00"; + } + } + this.setData({ + currentTime: that.data.currentTime, + }); + var obj = dateTimePicker.dateTimePicker(this.data.startYear, this.data.endYear, this.data.currentTime); + console.log(obj); + console.log(obj.dateTimeArray); + for (let index = 0; index < obj.dateTimeArray[0].length; index++) { + obj.dateTimeArray[0][index] = obj.dateTimeArray[0][index] + "年"; + } + for (let index = 0; index < obj.dateTimeArray[1].length; index++) { + obj.dateTimeArray[1][index] = obj.dateTimeArray[1][index] + "月"; + } + for (let index = 0; index < obj.dateTimeArray[2].length; index++) { + obj.dateTimeArray[2][index] = obj.dateTimeArray[2][index] + "日"; + } + this.setData({ + dateTimeArray: obj.dateTimeArray, + dateTime: obj.dateTime, + }); }, methods: { + changeDateTime (e) { + var dateTimeArray = this.data.dateTimeArray, + dateTime = e.detail.value; + this.setData({ + // dateTime: e.detail.value, + currentTime: dateTimeArray[0][dateTime[0]].replace("年", "") + "-" + dateTimeArray[1][dateTime[1]].replace("月", "") + "-" + dateTimeArray[2][dateTime[2]].replace("日", "") + " " + dateTimeArray[3][dateTime[3]], + }); + }, + + changeDateTimeColumn (e) { + console.log(e); + console.log(e.detail.value); + console.log(e.detail.column); + var arr = this.data.dateTime, + dateArr = this.data.dateTimeArray; + console.log(arr); + console.log(dateArr); + + + arr[e.detail.column] = e.detail.value; + console.log(dateArr[0][arr[0]], dateArr[1][arr[1]]); + + dateArr[2] = dateTimePicker.getMonthDay(dateArr[0][arr[0]], dateArr[1][arr[1]]); + for (let index = 0; index < dateArr[2].length; index++) { + dateArr[2][index] = dateArr[2][index] + "日"; + } + // .replace("年",'').replace("月",'').replace("日",'') + this.setData({ + dateTimeArray: dateArr, + dateTime: arr, + }); + }, + + bindPickerChangeAge (e) { + this.setData({ + ageIndex: e.detail.value, + ["userInfo.age"]: parseInt(e.detail.value) + 16, + }); + }, + formSubmit(e) { + let that = this; + console.log(e.detail.value); + if(e.detail.value.userName == ""){ + wx.showToast({ + icon: "none", + title: "请输入姓名", + }); + return; + } + if(e.detail.value.tel == ""){ + wx.showToast({ + icon: "none", + title: "请输入手机号", + }); + return; + } + var reg = /^1[3|4|5|6|9|7|8][0-9]\d{8}$/; + if(reg.test(e.detail.value.tel) == false){ + wx.showToast({ + icon: "none", + title: "请输入正确的手机号", + }); + return; + } + if(that.data.info.agencyOperation == 2){ + if(that.data.ageIndex == -1){ + wx.showToast({ + icon: "none", + title: "请选择年龄", + }); + return; + } + e.detail.value.age = parseInt(that.data.ageIndex) + 16; + e.detail.value.sex = that.data.sex; + }else{ + if(e.detail.value.idCard == ""){ + wx.showToast({ + icon: "none", + title: "请输入身份证号", + }); + return; + } + var regIdCard = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/; + if(regIdCard.test(e.detail.value.idCard) == false){ + wx.showToast({ + icon: "none", + title: "请输入正确的身份证号", + }); + return; + } + + e.detail.value.interviewTimeStr = that.data.currentTime; + } + + + + + + + + e.detail.value.jobId = that.data.info.id + console.log('form发生了submit事件,携带数据为:', e.detail.value) + wx.request({ + url: app.globalData.ip + '/yishoudan/common/order/add', + data: e.detail.value, + header: app.globalData.headers, + method: "POST", + success: function (res) { + console.log(res); + if (res.data.status == 200) { + wx.showToast({ + icon: "none", + title: "报名成功", + }) + that.setData({ + show: false, + ageIndex:-1 + }) + + } else { + wx.showToast({ + icon: "none", + title: res.data.msg, + }) + } + } + }) + }, + /** * 阻止滑动穿透 * @@ -131,9 +318,9 @@ Component({ }, hideLeft () { // this.data.show = false - // this.setData({ - // show: false - // }) + this.setData({ + ageIndex: -1 + }) var eventDetail = { type: this.data.drawerType }; diff --git a/components/bottom-drawer/index.wxml b/components/bottom-drawer/index.wxml index a7cb5f0..fde8ca2 100644 --- a/components/bottom-drawer/index.wxml +++ b/components/bottom-drawer/index.wxml @@ -1,10 +1,11 @@ +
- + - - + + @@ -31,12 +32,44 @@ - + 先生 女士 + + + + + + + + + 请选择年龄 + + + {{ageArray[ageIndex]}} + + + + + + + + + + + + + + - + + + + + + + + + + {{!!currentTime?currentTime:'----'}} + + @@ -53,17 +100,17 @@ - + - 多人报名切换 + - + @@ -76,3 +123,4 @@ --> +
diff --git a/pages/company/company/index.wxml b/pages/company/company/index.wxml index 570cadb..d24df24 100644 --- a/pages/company/company/index.wxml +++ b/pages/company/company/index.wxml @@ -37,8 +37,6 @@ {{serviceInfo.contactUserName || '暂无联系人' }} - -

{{serviceInfo.contactTel || '暂无联系方式'}}

diff --git a/pages/detail/index.js b/pages/detail/index.js index 5d8da4a..91c2d23 100644 --- a/pages/detail/index.js +++ b/pages/detail/index.js @@ -6,6 +6,7 @@ var qqmapsdk; Page({ data: { + images:[], isLogin:false, statusBarHeight: wx.getStorageSync("statusBarHeight"), // 状态栏高度 @@ -1142,6 +1143,9 @@ Page({ //职位特色 if (app.isNotEmptyCheck(jobDetail.jobSpecialLabelNames)) { jobDetail["jobSpecialLabelNames"] = that.getJobSpecialLabelNamesArray(jobDetail.jobSpecialLabelNames); + } + if (app.isNotEmptyCheck(jobDetail.jobRequestLabelNames)) { + jobDetail["jobRequestLabelNames"] = that.getJobRequestLabelNamesArray(jobDetail.jobRequestLabelNames); } }, diff --git a/pages/detail/index.wxml b/pages/detail/index.wxml index d12b574..04a57fd 100644 --- a/pages/detail/index.wxml +++ b/pages/detail/index.wxml @@ -60,7 +60,7 @@ - + diff --git a/pages/index/index.js b/pages/index/index.js index 9c02904..bfe8aa0 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -3,6 +3,7 @@ const app = getApp(); const commonUtil = require("../../utils/commonUtil.js"); Page({ data: { + currentInfo:{}, swiperHeight: 0, toped: "1", chaShowed: false, @@ -47,7 +48,7 @@ Page({ cityName: "", brandIds: "", jobCategoryLabelIds: "", - ucj: 0, + ujc: 0, }, loading: true, topJobList: [], @@ -1254,9 +1255,9 @@ Page({ scrollTo: "sticky", }); if (this.data.choiceCollect == 0) { - this.data.storeJobListSearchForm.ucj = 0; + this.data.storeJobListSearchForm.ujc = 0; } else { - this.data.storeJobListSearchForm.ucj = 1; + this.data.storeJobListSearchForm.ujc = 1; } this.toList(); @@ -1335,9 +1336,9 @@ Page({ ageRangeStr: that.data.minAge + "-" + that.data.maxAge, }; if (this.data.choiceCollect == 0) { - that.data.storeJobListSearchForm.ucj = 0; + that.data.storeJobListSearchForm.ujc = 0; } else { - that.data.storeJobListSearchForm.ucj = 1; + that.data.storeJobListSearchForm.ujc = 1; } console.log(that.data.storeJobListSearchForm); that.setData({ @@ -1575,7 +1576,7 @@ Page({ var that = this; wx.request({ - url: app.globalData.ip + "/store/job/collected/list?ucj=1", + url: app.globalData.ip + "/store/job/collected/list?ujc=1", method: "GET", data: {}, header: app.globalData.headers, @@ -2370,7 +2371,7 @@ Page({ }, doCollected (collected, storeJobId) { var that = this; - var url = "/assistant/job/collect/" + storeJobId; + var url = "/yishoudan/custom/job/collect/" + storeJobId; // if (collected - 1 == 0) { // url = "/user/collect/job/remove"; // } @@ -2525,7 +2526,7 @@ Page({ if (that.data.isLogin || (!that.data.isLogin && e.currentTarget.dataset.id == 0)) { if (e.currentTarget.dataset.id) { that.data.choiceCollect = e.currentTarget.dataset.id; - that.data.storeJobListSearchForm.ucj = e.currentTarget.dataset.id; + that.data.storeJobListSearchForm.ujc = e.currentTarget.dataset.id; that.data.storeJobListSearchForm.pageNum = 1; that.setData({ choiceCollect: that.data.choiceCollect, @@ -2684,7 +2685,7 @@ Page({ } }); that.data.storeJobListSearchForm.jobSpecialLabelIds = ""; - // that.data.storeJobListSearchForm.ucj = + // that.data.storeJobListSearchForm.ujc = // that.data.storeJobListSearchForm.brandIds = ""; that.data.storeJobListSearchForm.jobCategoryLabelIds = ""; that.data.storeJobListSearchForm.pageNum = 1; @@ -2738,8 +2739,10 @@ Page({ * */ recordBill (e) { + console.log(e.currentTarget.dataset.job); this.setData({ - recordShow: true + recordShow: true, + currentInfo: e.currentTarget.dataset.job, }) console.log(this.data.recordShow); wx.hideTabBar({ diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 9984c08..c21236a 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -423,4 +423,4 @@ - + diff --git a/pages/mine/addressBook/index.wxml b/pages/mine/addressBook/index.wxml index 552b77f..f70cf4a 100644 --- a/pages/mine/addressBook/index.wxml +++ b/pages/mine/addressBook/index.wxml @@ -2,7 +2,7 @@ - 暂无收货地址 + 暂无地址 diff --git a/pages/mine/myJob/index.wxml b/pages/mine/myJob/index.wxml index 45ae0fb..770de8f 100644 --- a/pages/mine/myJob/index.wxml +++ b/pages/mine/myJob/index.wxml @@ -1,7 +1,5 @@ - - - - - - - - {{item.customJob.jobName}} - {{(item.citys && item.citys != '-') ? item.citys + ' | ' : ''}} {{item.age}} - - - 2023-08-31 18:02 + + + + {{item.customJob.jobName}} + {{(item.citys && item.citys != '-') ? item.citys + ' | ' : ''}} {{item.age}} + + + 2023-08-31 18:02 + + - - - - - 暂无记录 - - - \ No newline at end of file + + + + 暂无记录 + +