From 733ee575be6c2291f231101d8f4199dff69b61f0 Mon Sep 17 00:00:00 2001
From: zsk <710162063@qq.com>
Date: Tue, 26 Mar 2024 16:16:11 +0800
Subject: [PATCH] =?UTF-8?q?=E7=A6=81=E6=AD=A2=E9=87=8D=E5=A4=8D=E6=8F=90?=
=?UTF-8?q?=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/bottom-drawer/index.js | 11 ++
components/bottom-drawer/index.wxml | 2 +-
components/bottom-drawer/index.wxss | 4 +
pages/jobListSearch/index.js | 297 ++++++++++++++++++++----------------
pages/jobListSearch/index.json | 4 +-
pages/jobListSearch/index.wxml | 158 ++-----------------
pages/type/type/index.js | 46 ++++++
pages/type/type/index.json | 3 +
pages/type/type/index.wxml | 2 +
9 files changed, 248 insertions(+), 279 deletions(-)
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 @@
-->
+
+