diff --git a/components/bottom-drawer/index.js b/components/bottom-drawer/index.js index 805ff53..c16a94d 100644 --- a/components/bottom-drawer/index.js +++ b/components/bottom-drawer/index.js @@ -4,6 +4,7 @@ var dateUtil = require("../../utils/dateUtil.js"); var dateTimePicker = require("../../utils/dateTimePicker.js"); Component({ data: { + disabled:false, idCardImageUrl:"", idCardNum:"", dateTime: "", @@ -233,6 +234,12 @@ Component({ e.detail.value.idCardImageUrl = that.data.idCardImageUrl } e.detail.value.jobId = that.data.info.id + that.setData({ + disabled:true + }) + + + console.log('form发生了submit事件,携带数据为:', e.detail.value) wx.request({ url: app.globalData.ip + '/yishoudan/common/order/add', @@ -249,6 +256,7 @@ Component({ that.setData({ show: false, ageIndex:-1, + disabled:false, idCardNum:"" }) wx.showTabBar({ @@ -260,6 +268,9 @@ Component({ }); } else { + that.setData({ + disabled:false, + }) wx.showToast({ icon: "none", title: res.data.msg, diff --git a/components/bottom-drawer/index.wxml b/components/bottom-drawer/index.wxml index cfee7ff..71b92af 100644 --- a/components/bottom-drawer/index.wxml +++ b/components/bottom-drawer/index.wxml @@ -113,7 +113,7 @@ 选择报名人 --> - + diff --git a/components/bottom-drawer/index.wxss b/components/bottom-drawer/index.wxss index 9bfc71b..38179c5 100644 --- a/components/bottom-drawer/index.wxss +++ b/components/bottom-drawer/index.wxss @@ -71,4 +71,8 @@ height: 24px; padding: 4px; box-sizing: border-box; +} +button.loginOut.disabled { + pointer-events: none; + background: #aaa; } \ No newline at end of file diff --git a/pages/jobListSearch/index.js b/pages/jobListSearch/index.js index b567f57..a429c8d 100644 --- a/pages/jobListSearch/index.js +++ b/pages/jobListSearch/index.js @@ -3,6 +3,8 @@ const app = getApp(); const commonUtil = require("../../utils/commonUtil.js"); Page({ data: { + currentInfo:{}, + recordShow: false, toped: "1", chaShowed: false, isTrigger: false, @@ -45,7 +47,7 @@ Page({ jobSpecialLabelIds: "", cityName: "", brandIds: "", - ucj: 0, + ujc: 0, }, loading: true, topJobList: [], @@ -536,7 +538,7 @@ Page({ // var brandIdArray = that.data.storeJobListSearchForm.brandIds.split(","); - // res.data.data.forEach((item) => { + // res.data.data.pageBean.forEach((item) => { // item["checked"] = false; // brandIdArray.forEach((item1) => { // if (item.id == item1) { @@ -1158,13 +1160,13 @@ 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, success: function (res) { console.log(res); - let collectList = res.data.data.recordList; + let collectList = res.data.data.pageBean.recordList; let jobs = that.data.recordList; if (collectList != null && collectList != "" && collectList != undefined && collectList.length != 0 && jobs != null && jobs != "" && jobs != undefined && jobs.length != 0) { for (var j = 0; j != jobs.length; ++j) { @@ -1367,7 +1369,7 @@ Page({ }); console.log(that.data.storeJobListSearchForm); wx.request({ - url: app.globalData.ip + "/assistant/custom/job/v2/list", + url: app.globalData.ip + "/yishoudan/custom/job/listApp", method: "POST", header: app.globalData.headers, data: that.data.storeJobListSearchForm, @@ -1376,8 +1378,8 @@ Page({ console.log(res); that.setData({ - totalPage: res.data.data.pageCount, - currPage: res.data.data.currentPage, + totalPage: res.data.data.pageBean.pageCount, + currPage: res.data.data.pageBean.currentPage, }); setTimeout(function () { @@ -1385,8 +1387,8 @@ Page({ 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); + 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({ @@ -1395,7 +1397,7 @@ Page({ isTrigger: false, }); } else { - var jobListTemp = commonUtil.disposeJobListData(res.data.data.recordList); + var jobListTemp = commonUtil.disposeJobListData(res.data.data.pageBean.recordList); that.data.recordList = that.data.recordList.concat(jobListTemp); that.setData({ @@ -1442,7 +1444,7 @@ Page({ console.log(that.data.navigatorBarHeight); }); }, 300); - // if (that.data.recordList.length < res.data.data.recordCount) { + // if (that.data.recordList.length < res.data.data.pageBean.recordCount) { // that.setData({ // hasMoreData: true, // }); @@ -1707,8 +1709,8 @@ Page({ }, success: function (res) { console.log(res); - app.globalData.openId = res.data.data.openId; - let promise = app.setLoginUserTokenInfo(res.data.data.phoneNumber, null); + app.globalData.openId = res.data.data.pageBean.openId; + let promise = app.setLoginUserTokenInfo(res.data.data.pageBean.phoneNumber, null); var collected = e.currentTarget.dataset.collected; if (collected) { promise.then((res) => { @@ -1760,7 +1762,7 @@ Page({ }, success: function (res) { console.log(res); - let promise = app.setLoginUserTokenInfo(res.data.data.phoneNumber, null); + let promise = app.setLoginUserTokenInfo(res.data.data.pageBean.phoneNumber, null); var collected = e.currentTarget.dataset.collected; if (collected) { promise.then((res) => { @@ -1773,7 +1775,7 @@ Page({ promise.then((res) => { wx.navigateTo({ url: "../enroll/index?applyType=1", - //url: "../enroll/index?applyType=1&tel=" + res.data.data.phoneNumber + //url: "../enroll/index?applyType=1&tel=" + res.data.data.pageBean.phoneNumber }); }); } @@ -1837,7 +1839,7 @@ Page({ }, success: function (res) { console.log(res); - let promise = app.setLoginUserTokenInfo(res.data.data.phoneNumber, null); + let promise = app.setLoginUserTokenInfo(res.data.data.pageBean.phoneNumber, null); promise.then((res) => { that.setData({ isLogin: app.globalData.isLogin, @@ -1867,7 +1869,7 @@ Page({ }, success: function (res) { console.log(res); - let promise = app.setLoginUserTokenInfo(res.data.data.phoneNumber, null); + let promise = app.setLoginUserTokenInfo(res.data.data.pageBean.phoneNumber, null); promise.then((res) => { that.setData({ isLogin: app.globalData.isLogin, @@ -1932,102 +1934,84 @@ Page({ }, }); }, - collectPaste(e) { - var txt; - var that = this; - if (!this.data.isLogin) { - wx.redirectTo({ - url: "/pages/login/index", - }); - return; - } - var collected = e.currentTarget.dataset.collected; - var storeJobId = e.currentTarget.dataset.jobid; - that.doCollected(collected, storeJobId); - // console.log(collected); - // if(!this.data.isCollect){ - // that.setData({ - // isCollect: true, - // collectTxt:'已收藏' - // }) - // txt = '收藏成功' - // }else{ - // that.setData({ - // isCollect: false, - // collectTxt:'收藏' - // }) - // } - }, - doCollected(collected, storeJobId) { - var that = this; - var url = "/user/collect/job/add"; - if (collected - 1 == 0) { - url = "/user/collect/job/remove"; - } - console.log(app.globalData.headers); - //发起网络请求 - wx.request({ - url: app.globalData.ip + url, - data: { - storeJobId: storeJobId, - }, - header: app.globalData.headers, - method: "GET", - success: function (res) { - var txt; - if (collected - 1 == 0) { - //取消收藏 - for (var i = 0; i != that.data.recordList.length; ++i) { - if (that.data.recordList[i].id - storeJobId == 0) { - that.data.recordList[i].collected = 2; - break; - } - } - 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(); - } - } else { - //收藏 - for (var i = 0; i != that.data.recordList.length; ++i) { - if (that.data.recordList[i].id - storeJobId == 0) { - that.data.recordList[i].collected = 1; - 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", - title: txt, - }); - }, - fail: function (res) { - console.log("操作失败"); - }, - }); - }, + 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); + // console.log(collected); + // if(!this.data.isCollect){ + // that.setData({ + // isCollect: true, + // collectTxt:'已收藏' + // }) + // txt = '收藏成功' + // }else{ + // that.setData({ + // isCollect: false, + // collectTxt:'收藏' + // }) + // } + }, + doCollected (collected, storeJobId) { + var that = this; + var url = "/yishoudan/custom/job/collect/" + storeJobId; + // if (collected - 1 == 0) { + // url = "/user/collect/job/remove"; + // } + // console.log(app.globalData.headers); + //发起网络请求 + wx.request({ + url: app.globalData.ip + url, + // data: { + // jobId: storeJobId, + // classify:0 + // }, + header: app.globalData.headers, + method: "GET", + success: function (res) { + var txt; + if (collected - 1 == 0) { + //取消收藏 + for (var i = 0; i != that.data.recordList.length; ++i) { + if (that.data.recordList[i].id - storeJobId == 0) { + that.data.recordList[i].collected = 0; + break; + } + } + txt = "取消收藏"; + } else { + //收藏 + for (var i = 0; i != that.data.recordList.length; ++i) { + if (that.data.recordList[i].id - storeJobId == 0) { + that.data.recordList[i].collected = 1; + break; + } + } + txt = "收藏成功"; + } + that.setData({ + recordList: that.data.recordList, + currentJobDrawer: that.data.currentJobDrawer, + isLogin: app.globalData.isLogin, + }); + wx.showToast({ + icon: "none", + title: txt, + }); + }, + fail: function (res) { + console.log("操作失败"); + }, + }); + }, getUserInfoBtn: function (e) { console.log(e); let that = this; @@ -2134,7 +2118,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, @@ -2259,7 +2243,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; @@ -2320,22 +2304,75 @@ Page({ * * */ - recordBill(e) { + hidedrawershow (e) { + console.log(e); + this.setData({ + [e.detail.type]: false + }) + wx.showTabBar({ + animation: false, + success: (result) => { + + }, + fail: () => { }, + complete: () => { } + }); + }, + hideDrawer () { + let that = this; + this.getTabBar().setData({ + isShow: true, + }); + that.setData({ + drawerShow: false, + }); + // this.getJobList(); + // setTimeout(() => { + // wx.showTabBar({ + // success(e) {}, + // }); + // }, 300); + }, + recordBill (e) { + // 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}`, - }); - }, + this.setData({ + recordShow: true, + currentInfo: e.currentTarget.dataset.job, + }) + console.log(this.data.recordShow); + wx.hideTabBar({ + animation: false, + success: (result) => { + + }, + fail: () => { }, + complete: () => { } + }); + 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}`, + // }); + }, imageLoad() { this.setData({ isLoading: false, diff --git a/pages/jobListSearch/index.json b/pages/jobListSearch/index.json index 84dd50b..45843b9 100644 --- a/pages/jobListSearch/index.json +++ b/pages/jobListSearch/index.json @@ -1,5 +1,7 @@ { - "usingComponents": {}, + "usingComponents": { + "bottom-drawer": "../../components/bottom-drawer/index" + }, "navigationBarTitleText": "搜索", "navigationBarBackgroundColor": "#fff", "navigationBarTextStyle": "black", diff --git a/pages/jobListSearch/index.wxml b/pages/jobListSearch/index.wxml index 5e21e12..0490109 100644 --- a/pages/jobListSearch/index.wxml +++ b/pages/jobListSearch/index.wxml @@ -89,7 +89,7 @@ --> - + {{searchCityParamStorage.name == '' ? '全国' : searchCityParamStorage.shortName}} @@ -262,15 +262,10 @@ - - - - - - - - - - 代理 - - - {{!isLogin ? '登录查看服务费' : (agencyStatus == 1 ? (item.fuWuFei ? item.fuWuFei : '-') : '服务费仅代理可见')}} - - - - - - - - 没有符合条件的职位 - - - - 已经到底啦~ - 上滑加载更多 - - - - 未登录时只能使用部分功能,成为伯才代理即可使用更多功能。 - - 登录稻田 - - - - - - - - 没有符合条件的职位 - - - - - - - - {{currentJobDrawer.jobName}} - - 服务费:{{!isLogin ? '登录查看服务费' : (agencyStatus == 1 ? (currentJobDrawer.fuWuFei ? currentJobDrawer.fuWuFei : '-') : '服务费仅代理可见')}} - - - - - - - - - -

已收藏

-
- -

收藏

-
-
- 报名 - - - 复制 - -
-
- - - - {{userInfo.agencyStatus == 1 ? (userInfo.noticeEndStr ? userInfo.noticeEndStr : ('详情咨询:' + userInfo.tel)) : ('详情咨询:' + serviceInfo.aliasName + (serviceInfo.workPhone || '-'))}} - - 以上联系人,可以 - 改成我的 - - - -
-
-
- - - - - - - 成为伯才代理 - 请联系客户经理 - - - - 客户经理 - - {{serviceInfo.userName }} - -

{{serviceInfo.tel || '0371-6611 3723'}}

-
- - - - - 加载中... - - - 长按识别二维码 -
-
-
-
-
+ + + \ No newline at end of file diff --git a/pages/type/type/index.js b/pages/type/type/index.js index c62c6e8..8563f85 100644 --- a/pages/type/type/index.js +++ b/pages/type/type/index.js @@ -3,6 +3,8 @@ const app = getApp(); const commonUtil = require("../../../utils/commonUtil.js"); Page({ data: { + currentInfo:{}, + recordShow: false, pullNum: 0, //下拉次数 loadMore: "", loadContent: ["马不停蹄加载更多数据中...", "-- 已经到底了,加不了咯 --"], @@ -345,6 +347,35 @@ Page({ url: "/pages/filterPage/index", }); }, + hidedrawershow (e) { + console.log(e); + this.setData({ + [e.detail.type]: false + }) + wx.showTabBar({ + animation: false, + success: (result) => { + + }, + fail: () => { }, + complete: () => { } + }); + }, + hideDrawer () { + let that = this; + this.getTabBar().setData({ + isShow: true, + }); + that.setData({ + drawerShow: false, + }); + // this.getJobList(); + // setTimeout(() => { + // wx.showTabBar({ + // success(e) {}, + // }); + // }, 300); + }, recordBill (e) { // if (!this.data.isLogin) { // wx.navigateTo({ @@ -353,6 +384,21 @@ Page({ // return; // } 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 + console.log(e.currentTarget.dataset.job); console.log(123); let middleInfo = e.currentTarget.dataset.job; let info = JSON.stringify({ diff --git a/pages/type/type/index.json b/pages/type/type/index.json index 7373b59..78323ca 100644 --- a/pages/type/type/index.json +++ b/pages/type/type/index.json @@ -1,4 +1,7 @@ { + "usingComponents": { + "bottom-drawer": "../../../components/bottom-drawer/index" + }, "navigationBarBackgroundColor":"#0dcc91", "navigationBarTextStyle":"white", "backgroundColor": "#FFFFFF", diff --git a/pages/type/type/index.wxml b/pages/type/type/index.wxml index 2d25145..a423746 100644 --- a/pages/type/type/index.wxml +++ b/pages/type/type/index.wxml @@ -95,3 +95,5 @@ + +