From 548ba9ad78fac776c4a72b54bb144aaa83023834 Mon Sep 17 00:00:00 2001 From: zsk <710162063@qq.com> Date: Mon, 25 Mar 2024 16:44:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 4 +- components/bottom-drawer/index.js | 7 + components/bottom-drawer/index.wxml | 4 +- pages/collect/index.js | 262 +++++++++++++++++++----------------- pages/collect/index.json | 3 + pages/collect/index.wxml | 34 +---- pages/company/company/index.wxml | 6 +- pages/mine/index.wxml | 4 +- pages/mine/myJob/index.js | 4 - pages/mine/opinion/index.js | 103 +++++++------- 10 files changed, 220 insertions(+), 211 deletions(-) diff --git a/app.js b/app.js index 7dd2fdb..76bd9bb 100644 --- a/app.js +++ b/app.js @@ -1,8 +1,8 @@ App({ globalData: { userInfo: null, - // ip: 'https://test.renminshitang.com.cn/daotian/api_dev', - 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: { diff --git a/components/bottom-drawer/index.js b/components/bottom-drawer/index.js index 072ab4a..d5d0da1 100644 --- a/components/bottom-drawer/index.js +++ b/components/bottom-drawer/index.js @@ -252,6 +252,13 @@ Component({ show: false, ageIndex:-1 }) + wx.showTabBar({ + animation: false, + success: (result) => { + }, + fail: () => { }, + complete: () => { } + }); } else { wx.showToast({ diff --git a/components/bottom-drawer/index.wxml b/components/bottom-drawer/index.wxml index fde8ca2..1a6d6e4 100644 --- a/components/bottom-drawer/index.wxml +++ b/components/bottom-drawer/index.wxml @@ -67,7 +67,7 @@ - + @@ -78,7 +78,7 @@ - + diff --git a/pages/collect/index.js b/pages/collect/index.js index d8cbef4..b7b51e9 100644 --- a/pages/collect/index.js +++ b/pages/collect/index.js @@ -3,6 +3,7 @@ const app = getApp(); const commonUtil = require("../../utils/commonUtil.js"); Page({ data: { + recordShow: false, toped: "1", recordList: [], storeJobListSearchForm: { @@ -19,7 +20,7 @@ Page({ cityName: "", brandIds: "", jobCategoryLabelIds: "", - ucj: 1, + ujc: 1, }, loading: true, hasMoreData: false, //下拉是否还有更多数据 @@ -45,8 +46,10 @@ Page({ onShow(){ var that = this; - - // that.getJobList(); + that.setData({ + recordList: [], + }); + that.getJobList(); }, goDetail(e){ console.log(e); @@ -58,127 +61,105 @@ Page({ }, getJobList() { - var that = this; + var that = this; // debugger - // that.setData({ - - // }) - that.setData({ + that.setData({ pageShow: false, - recordList: [] - }); - return new Promise(function (resolve, reject) { - if (that.data.storeJobListSearchForm.sortTag == 2) { - //如果按照距离排序,拼接上坐标 - that.data.storeJobListSearchForm.lng = app.globalData.lng; - that.data.storeJobListSearchForm.lat = app.globalData.lat; - } - - console.log(that.data.inputVal); - that.data.storeJobListSearchForm.cityName = that.data.searchCityParamStorage.name; - if (app.isEmptyCheck(that.data.searchCityParamStorage.name)) { - that.data.storeJobListSearchForm.cityName = "全国"; - } - that.data.storeJobListSearchForm.keys = that.data.inputVal == "搜索工作" ? "" : that.data.inputVal; - // debugger; - wx.showLoading({ - title: "加载中...", - }); - console.log(that.data.storeJobListSearchForm); - wx.request({ - url: app.globalData.ip + "/overall/store/job/list", - method: "POST", - header: app.globalData.headers, - data: that.data.storeJobListSearchForm, - success: function (res) { - console.log("职位列表↓↓↓↓"); - console.log(res); + }); + return new Promise(function (resolve, reject) { + wx.showLoading({ + title: "加载中...", + }); + console.log(that.data.storeJobListSearchForm); + wx.request({ + url: app.globalData.ip + "/yishoudan/custom/job/listApp", + method: "POST", + header: app.globalData.headers, + data: that.data.storeJobListSearchForm, + success: function (res) { + console.log("职位列表↓↓↓↓"); + console.log(res); - that.setData({ - totalPage: res.data.data.pageCount, - currPage: res.data.data.currentPage, - }); + that.setData({ + totalPage: res.data.data.pageBean.pageCount, + currPage: res.data.data.pageBean.currentPage, + }); - setTimeout(function () { - that.setData({ - triggered: false, - }); - }, 1000); - if (res.data.data.recordList == null || res.data.data.recordList.length == 0 || res.data.data.recordList.length < that.data.storeJobListSearchForm.pageSize) { - var jobListTemp = commonUtil.disposeJobListData(res.data.data.recordList); - that.data.recordList = that.data.recordList.concat(jobListTemp); + setTimeout(function () { + that.setData({ + triggered: false, + }); + }, 1000); + if (res.data.data.pageBean.recordList == null || res.data.data.pageBean.recordList.length == 0 || res.data.data.pageBean.recordList.length < that.data.storeJobListSearchForm.pageSize) { + var jobListTemp = commonUtil.disposeJobListData(res.data.data.pageBean.recordList); + that.data.recordList = that.data.recordList.concat(jobListTemp); - that.setData({ - recordList: that.data.recordList, - hasMoreData: false, - isTrigger: false, - }); - } else { - var jobListTemp = commonUtil.disposeJobListData(res.data.data.recordList); - that.data.recordList = that.data.recordList.concat(jobListTemp); + that.setData({ + recordList: that.data.recordList, + hasMoreData: false, + isTrigger: false, + }); + } else { + var jobListTemp = commonUtil.disposeJobListData(res.data.data.pageBean.recordList); + that.data.recordList = that.data.recordList.concat(jobListTemp); - that.setData({ - recordList: that.data.recordList, - hasMoreData: true, - isTrigger: false, - }); - } + that.setData({ + recordList: that.data.recordList, + hasMoreData: true, + isTrigger: false, + }); + } - wx.hideLoading({ - success: (res) => {}, - }); - that.setData({ - loading: false, - pageShow: true, - storeJobListSearchForm: that.data.storeJobListSearchForm, - }); - resolve(); + wx.hideLoading({ + success: (res) => { }, + }); + that.setData({ + loading: false, + pageShow: true, + storeJobListSearchForm: that.data.storeJobListSearchForm, + }); + resolve(); + // that.getTag(); - that.data.recordList.forEach((item, index) => { - // console.log(item); - if (app.isNotEmptyCheck(item.returnFeeType) || item.returnFeeType == "0" || item.returnFee == "0") { - item["fuWuFei"] = commonUtil.getReturnFeeTypeName1ById(item.returnFeeType, item.returnFee); - } else { - item["fuWuFei"] = ""; - } - - }); - that.setData({ - recordList: that.data.recordList, - currentJobDrawer: that.data.currentJobDrawer, - }); - // if (that.data.recordList.length < res.data.data.recordCount) { - // that.setData({ - // hasMoreData: true, - // }); - // } else { - // that.setData({ - // hasMoreData: false, - // }); - // } - }, - }); - }); + that.data.recordList.forEach((item, index) => { + console.log(item.storeDistrict); + item['citys'] = commonUtil.setJobInfoPosition(item.storeDistrict) + // console.log(item); + if (app.isNotEmptyCheck(item.returnFeeType) || item.returnFeeType == "0" || item.returnFee == "0") { + item["fuWuFei"] = commonUtil.getReturnFeeTypeName1ById(item.returnFeeType, item.returnFee); + } else { + item["fuWuFei"] = ""; + } + + }); + that.setData({ + recordList: that.data.recordList, + currentJobDrawer: that.data.currentJobDrawer, + }); + console.log(that.data.recordList) + // if (that.data.recordList.length < res.data.data.pageBean.recordCount) { + // that.setData({ + // hasMoreData: true, + // }); + // } else { + // that.setData({ + // hasMoreData: false, + // }); + // } + }, + }); + }); }, collectPaste(e) { var txt; var that = this; - if (!this.data.isLogin) { - wx.navigateTo({ - url: "/pages/login/index", - }); - return; - } var collected = e.currentTarget.dataset.collected; var storeJobId = e.currentTarget.dataset.jobid; that.doCollected(collected, storeJobId); }, doCollected(collected, storeJobId) { var that = this; - var url = "/user/collect/job/add"; - if (collected - 1 == 0) { - url = "/user/collect/job/remove"; - } + var url = "/yishoudan/custom/job/collect/" + storeJobId; console.log(app.globalData.headers); //发起网络请求 wx.request({ @@ -199,16 +180,10 @@ Page({ } } txt = "取消收藏"; - that.data.currentJobDrawer.collected = 2; - if (that.data.choiceCollect == 1) { - if (that.data.drawerShow) { - that.data.drawerShow = false; - } that.data.storeJobListSearchForm.pageNum = 1; that.setData({ recordList: [], - drawerShow: that.data.drawerShow, storeJobListSearchForm: that.data.storeJobListSearchForm, }); that.getJobList(); @@ -221,17 +196,10 @@ Page({ break; } } - that.data.currentJobDrawer.collected = 1; - txt = "收藏成功"; } - - console.log(that.data.currentJobDrawer); - that.setData({ recordList: that.data.recordList, - currentJobDrawer: that.data.currentJobDrawer, - isLogin: app.globalData.isLogin, }); wx.showToast({ icon: "none", @@ -242,5 +210,59 @@ Page({ console.log("操作失败"); }, }); - }, + }, + hidedrawershow (e) { + console.log(e); + this.setData({ + [e.detail.type]: false + }) + wx.showTabBar({ + animation: false, + success: (result) => { + + }, + fail: () => { }, + complete: () => { } + }); + }, + recordBill (e) { + console.log(e.currentTarget.dataset.job); + this.setData({ + recordShow: true, + currentInfo: e.currentTarget.dataset.job, + }) + console.log(this.data.recordShow); + wx.hideTabBar({ + animation: false, + success: (result) => { + + }, + fail: () => { }, + complete: () => { } + }); + return + if (!this.data.isLogin) { + wx.navigateTo({ + url: "/pages/login/index", + }); + return; + } + console.log(e.currentTarget.dataset.job); + console.log(123); + let middleInfo = e.currentTarget.dataset.job; + let info = JSON.stringify({ + id: middleInfo.id, + jobName: middleInfo.jobName, + storeName: middleInfo.storeName, + aliasName: middleInfo.aliasName, + storeId: middleInfo.storeId, + }); + console.log(info); + wx.navigateTo({ + url: `../newEnroll/enroll/index?applyType=1&info=${info}`, + }); + // wx.navigateTo({ + // url: `../newEnroll/enroll/index?applyType=1&info=${info}`, + // }); + }, }); diff --git a/pages/collect/index.json b/pages/collect/index.json index ffb5dc3..b1b868f 100644 --- a/pages/collect/index.json +++ b/pages/collect/index.json @@ -1,4 +1,7 @@ { + "usingComponents": { + "bottom-drawer": "../../components/bottom-drawer/index" + }, "navigationBarTitleText": "我的收藏", "backgroundColor": "#f5f5f5" diff --git a/pages/collect/index.wxml b/pages/collect/index.wxml index 0e8e3ec..c9ccf1a 100644 --- a/pages/collect/index.wxml +++ b/pages/collect/index.wxml @@ -1,36 +1,15 @@ - + 暂无记录 + - - - - - - - - - - - - {{item.title}} - - - - - - - + @@ -68,7 +47,7 @@ {{item.distanceKm}} {{item.age}} - {{item.monthlyPay}} + @@ -79,10 +58,10 @@ - 报名 + 立即报名 - 报名 + 立即报名 @@ -116,3 +95,4 @@ + \ No newline at end of file diff --git a/pages/company/company/index.wxml b/pages/company/company/index.wxml index d24df24..ee095ed 100644 --- a/pages/company/company/index.wxml +++ b/pages/company/company/index.wxml @@ -31,13 +31,13 @@ - + - {{serviceInfo.contactUserName || '暂无联系人' }} + {{storeInfo.contactUserName || '暂无联系人' }} -

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

+

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

diff --git a/pages/mine/index.wxml b/pages/mine/index.wxml index 82ec85c..78f542f 100644 --- a/pages/mine/index.wxml +++ b/pages/mine/index.wxml @@ -88,12 +88,12 @@ 工作
--> - + diff --git a/pages/mine/myJob/index.js b/pages/mine/myJob/index.js index 40053b7..8043fcd 100644 --- a/pages/mine/myJob/index.js +++ b/pages/mine/myJob/index.js @@ -49,10 +49,6 @@ Page({ item["age"] = item.customJob.maxAge + "岁以下"; } }) - - - - that.setData({ recordList:res.data.data }) diff --git a/pages/mine/opinion/index.js b/pages/mine/opinion/index.js index 88f174f..387d424 100644 --- a/pages/mine/opinion/index.js +++ b/pages/mine/opinion/index.js @@ -36,56 +36,54 @@ Page({ that.data.subLoad = true console.log(that.data.textVal) -that.setData({ - success: true, - loading: false, - subLoad:false -}); - - +// that.setData({ +// success: true, +// loading: false, +// subLoad:false +// }); - // if (that.data.textVal.trim() != '') { - // console.log(312313123); - // that.setData({ - // loading: true, - // }); - // wx.request({ - // url: app.globalData.ip + "/daotian/feedback/add", - // method: 'post', - // header: app.globalData.headers, - // data: { - // content: that.data.textVal - // }, - // success: function (res) { - // console.log(res); - // if (res.data.status == 200) { - // that.setData({ - // success: true, - // }); - // } else { - // wx.showToast({ - // title: res.data.msg, - // icon: 'none' - // }) - // } - // that.setData({ - // loading: false, - // }); - // that.data.subLoad = false + if (that.data.textVal.trim() != '') { + console.log(312313123); + that.setData({ + loading: true, + }); + wx.request({ + url: app.globalData.ip + "/daotian/feedback/add", + method: 'post', + header: app.globalData.headers, + data: { + content: that.data.textVal + }, + success: function (res) { + console.log(res); + if (res.data.status == 200) { + that.setData({ + success: true, + }); + } else { + wx.showToast({ + title: res.data.msg, + icon: 'none' + }) + } + that.setData({ + loading: false, + }); + that.data.subLoad = false - // }, - // fail: function (res) { - // that.setData({ - // loading: false, - // }); - // }, - // }); - // } else { - // wx.showToast({ - // title: '请输入内容再提交', - // icon: 'none' - // }) - // } + }, + fail: function (res) { + that.setData({ + loading: false, + }); + }, + }); + } else { + wx.showToast({ + title: '请输入内容再提交', + icon: 'none' + }) + } }, @@ -97,9 +95,12 @@ that.setData({ console.log(this.data.textVal); }, goback () { - wx.navigateBack({ - delta: 1, - }); + // wx.navigateBack({ + // delta: 1, + // }); + wx.switchTab({ + url: '../../mine/index', + }) }, goList () { wx.navigateTo({