From c1132de27d62344c1ea02030551e00ed6825c2db Mon Sep 17 00:00:00 2001 From: zsk <710162063@qq.com> Date: Fri, 16 Aug 2024 10:33:33 +0800 Subject: [PATCH] 1 --- app.js | 3 +- app.json | 4 +- app.wxss | 112 +- assets/iconfont/iconfont.wxss | 22 +- components/bottom-drawer/index.wxml | 2 +- pages/company/company/index.js | 40 +- pages/company/company/index.json | 6 +- pages/company/company/index.wxml | 82 +- pages/company/company/index.wxss | 8 + pages/company/companyDetail/index.js | 115 ++ pages/company/companyDetail/index.json | 6 + pages/company/companyDetail/index.wxml | 52 + pages/company/companyDetail/index.wxss | 31 + pages/detail/index.js | 19 +- pages/detail/index.wxml | 10 +- pages/detail/index.wxss | 25 +- pages/hotList/index.js | 3145 ++++++++++++++++++++++++++++++++ pages/hotList/index.json | 9 + pages/hotList/index.wxml | 435 +++++ pages/hotList/index.wxss | 6 + pages/index/index.js | 98 +- pages/index/index.json | 5 +- pages/index/index.wxml | 59 +- pages/index/index.wxss | 75 +- pages/jobListSearch/index.wxml | 4 +- pages/jobListSearch/index.wxss | 9 +- pages/message/index.js | 8 +- project.private.config.json | 4 +- 28 files changed, 4257 insertions(+), 137 deletions(-) create mode 100644 pages/company/companyDetail/index.js create mode 100644 pages/company/companyDetail/index.json create mode 100644 pages/company/companyDetail/index.wxml create mode 100644 pages/company/companyDetail/index.wxss create mode 100644 pages/hotList/index.js create mode 100644 pages/hotList/index.json create mode 100644 pages/hotList/index.wxml create mode 100644 pages/hotList/index.wxss diff --git a/app.js b/app.js index 0d5fc50..5212ad6 100644 --- a/app.js +++ b/app.js @@ -70,7 +70,7 @@ if (envVersion === 'develop') { // baseUrl = "https://test.renminshitang.com.cn/zhuchangtong/api_dev" that.globalData.ip = 'https://test.renminshitang.com.cn/daotian/api_dev' // that.globalData.ip = 'https://daotian.matripe.com.cn' - that.globalData.ip = 'https://daotian.matripe.com.cn' + // that.globalData.ip = 'https://daotian.matripe.com.cn' } else if (envVersion === 'trial') { console.log('当前是体验环境'); that.globalData.ip = "https://test.renminshitang.com.cn/daotian/api_dev" @@ -296,6 +296,7 @@ if (envVersion === 'develop') { that.globalData.headers2.Cookie = "JSESSIONID=" + res.data.data.sessionId; that.globalData.headers.Authorization = "Bearer " + res.data.data.token; that.globalData.headers2.Authorization = "Bearer " + res.data.data.token; + that.globalData.agencyId = res.data.data.agencyId that.globalData.isLogin = true; that.globalData.read = res.data.data.read; diff --git a/app.json b/app.json index a4031ac..f2c4308 100644 --- a/app.json +++ b/app.json @@ -1,6 +1,7 @@ { "pages": [ "pages/index/index", + "pages/hotList/index", "pages/jobListSearch/index", "pages/city/index", "pages/detail/index", @@ -48,7 +49,8 @@ "pages/serviceTerm/index", "pages/type/type/index", - "pages/company/company/index" + "pages/company/company/index", + "pages/company/companyDetail/index" ], "permission": { diff --git a/app.wxss b/app.wxss index dbeacfe..4f8e35f 100644 --- a/app.wxss +++ b/app.wxss @@ -1751,77 +1751,77 @@ button.loginOut { /* 搜索框的公用样式 */ .weui-search-bar { - padding-right: 12px; + padding-right: 12px; } .weui-search-bar__form { - border-radius: 40px !important; + border-radius: 40px !important; } -.weui-search-bar__form .icon-sousuo { - position: absolute; - left: 8px; - width: 16px; - top: 1px; - height: 16px; - color: #cccccc; +.weui-search-bar__form .icon-sousuo11 { + position: absolute; + left: 14px; + width: 16px; + top: 1px; + height: 16px; + color: #cccccc; } .weui-search-bar__box { - position: relative; - line-height: 40px; - height: 40px; - padding-left: 32px; - display: flex; + position: relative; + line-height: 40px; + height: 40px; + padding-left: 32px; + display: flex; - justify-content: space-between; - padding-right: 0; + justify-content: space-between; + padding-right: 0; } .weui-search-bar__box .weui-search-bar__input { - width: 220px; - padding: 0; - height: 40px !important; - line-height: 40px !important; - font-size: 16px; + width: 220px; + padding: 0; + height: 40px !important; + line-height: 40px !important; + font-size: 16px; } .weui-search-bar__box { - height: 40px !important; - line-height: 40px !important; + height: 40px !important; + line-height: 40px !important; } .weui-search-bar__box .search { - position: relative; - text-align: left; - width: 56px; - padding-left: 12px; - box-sizing: border-box; - /* left: -10px; */ - font-size: 16px; - height: 40px !important; - font-weight: bold; - line-height: 40px !important; - color: var(--color-ysd); + position: relative; + text-align: left; + width: 52px; + padding-left: 12px; + box-sizing: border-box; + /* left: -10px; */ + font-size: 16px; + height: 40px !important; + font-weight: bold; + line-height: 40px !important; + color: var(--color-be); } .weui-search-bar__box .search::before { - content: ""; - position: absolute; - width: 1px; - height: 16px; - left: 0; - top: 50%; - transform: translateY(-50%); - background-color: #ddd; + content: ""; + position: absolute; + width: 1px; + height: 16px; + left: 0; + top: 50%; + transform: translateY(-50%); + background-color: #ddd; } -.weui-search-bar .icon-qingchu { - position: absolute; - top: 50%; - right: 62px; - padding-right: 0; - transform: translateY(-50%); - width: 16px; - height: 16px; - z-index: 3; - line-height: 16px; - /* -webkit-mask-size: 16px; */ - /* mask-size: 16px; */ +.weui-search-bar .icon-qingchu1 { + position: absolute; + top: 50%; + right: 62px; + padding-right: 0; + transform: translateY(-50%); + width: 16px; + height: 16px; + z-index: 3; + line-height: 16px; + /* -webkit-mask-size: 16px; */ + /* mask-size: 16px; */ } .weui-search-bar .icon-qingchu::before { color: rgba(0, 0, 0, 0.25); @@ -2010,7 +2010,7 @@ button.loginOut { .navigatorBar { position: relative; letter-spacing:1px; - opacity: 0; + /* opacity: 0; */ /* z-index: 999; */ /* background-color: var(--color-ysd); */ padding-bottom: 8px; @@ -2027,7 +2027,7 @@ button.loginOut { .navigatorBar .tabs { position: relative; left: 50%; - color: #000; + color: #fff; font-size: 35rpx; transform: translateX(-50%); /* justify-content: center; */ diff --git a/assets/iconfont/iconfont.wxss b/assets/iconfont/iconfont.wxss index af29735..75b4af3 100644 --- a/assets/iconfont/iconfont.wxss +++ b/assets/iconfont/iconfont.wxss @@ -1,8 +1,8 @@ @font-face { font-family: "iconfont"; /* Project id 2708790 */ - src: url('//at.alicdn.com/t/c/font_2708790_4xfil7j3wbc.woff2?t=1709604310354') format('woff2'), - url('//at.alicdn.com/t/c/font_2708790_4xfil7j3wbc.woff?t=1709604310354') format('woff'), - url('//at.alicdn.com/t/c/font_2708790_4xfil7j3wbc.ttf?t=1709604310354') format('truetype'); + src: url('//at.alicdn.com/t/c/font_2708790_iz9ln1n6ek.woff2?t=1723708967378') format('woff2'), + url('//at.alicdn.com/t/c/font_2708790_iz9ln1n6ek.woff?t=1723708967378') format('woff'), + url('//at.alicdn.com/t/c/font_2708790_iz9ln1n6ek.ttf?t=1723708967378') format('truetype'); } .iconfont { @@ -13,6 +13,18 @@ -moz-osx-font-smoothing: grayscale; } +.icon-luxian:before { + content: "\e619"; +} + +.icon-eye:before { + content: "\e686"; +} + +.icon-eye-close:before { + content: "\e687"; +} + .icon-wodeshoucang1:before { content: "\e64c"; } @@ -1085,6 +1097,10 @@ content: "\e600"; } +.icon-qingchu1:before { + content: "\e90f"; +} + .icon-duihao1:before { content: "\e7fa"; } diff --git a/components/bottom-drawer/index.wxml b/components/bottom-drawer/index.wxml index 4edfbdc..4a96239 100644 --- a/components/bottom-drawer/index.wxml +++ b/components/bottom-drawer/index.wxml @@ -98,7 +98,7 @@ - + diff --git a/pages/company/company/index.js b/pages/company/company/index.js index 22b98fa..45f18f2 100644 --- a/pages/company/company/index.js +++ b/pages/company/company/index.js @@ -22,6 +22,12 @@ Page({ */ onReady () { + }, + goDetail(){ + console.log("0000") + wx.navigateTo({ + url: '../companyDetail/index', + }) }, goMap () { console.log("123") @@ -45,22 +51,24 @@ Page({ */ getInfo () { let that = this - wx.request({ - url: app.globalData.ip + "/yishoudan/agency/getInfo", - method: "get", - header: app.globalData.headers, - success: function (res) { - console.log(res) - let data = res.data.data - if (res.data.status == 200) { - data.agency.imgList = data.agency.imgs.split(',') - that.setData({ - storeInfo: data.agency - }) - } - - } - }) + wx.request({ + url: app.globalData.ip + "/yicai/agency/store/list", + data: { pageSize: 100, pageNum: 1, keys: "",agencyId:2743}, + header: app.globalData.headers, + method: "post", + success: function (res) { + console.log(res); + if (res.data.status == 200) { + res.data.data.pageBean.recordList.forEach(item => { + item['pubTime'] = dateUtil.timeShow(item.publishTime); + console.log(item); + }); + that.setData({ + infoList: res.data.data.pageBean.recordList, + }); + } + }, + }); }, /** * 拨打电话 diff --git a/pages/company/company/index.json b/pages/company/company/index.json index 48012e6..5aeaee6 100644 --- a/pages/company/company/index.json +++ b/pages/company/company/index.json @@ -1,6 +1,6 @@ { "navigationBarBackgroundColor":"#0dcc91", "navigationBarTextStyle":"white", - "backgroundColor": "#FFFFFF", - "navigationBarTitleText": "网点" -} \ No newline at end of file + "backgroundColor": "#f5f5f5", + "navigationBarTitleText": "网点列表" +} diff --git a/pages/company/company/index.wxml b/pages/company/company/index.wxml index 2360f5c..a1d699c 100644 --- a/pages/company/company/index.wxml +++ b/pages/company/company/index.wxml @@ -1,6 +1,75 @@ - + - + + + + + + {{storeInfo.fullName || '-'}} + + + + 营业时间:8:00 - 23:00 + + + {{storeInfo.address || '-'}} + + + + + + + + + + + + + + + + {{storeInfo.fullName || '-'}} + + + + 营业时间:8:00 - 23:00 + + + {{storeInfo.address || '-'}} + + + + + + + + + + + + + + + {{storeInfo.fullName || '-'}} + + + + 营业时间:8:00 - 23:00 + + + {{storeInfo.address || '-'}} + + + + + + + + + + + + - + - + --> - \ No newline at end of file + diff --git a/pages/company/company/index.wxss b/pages/company/company/index.wxss index 71da575..36b7d72 100644 --- a/pages/company/company/index.wxss +++ b/pages/company/company/index.wxss @@ -20,4 +20,12 @@ page{ flex: 1; justify-content: space-between; padding: 0 10px 0 16px; +} +.icon-dianhua{ + position: relative; + top:12px; + width:28px;height:28px;border-radius: 50%;background-color: var(--color-ysd-bg);color:var(--color-hover);display: flex;align-items: center;justify-content: center;font-size: 16px;float: right; +} +.dhImg{ + width: 28px;height:28px;margin-top:40px } \ No newline at end of file diff --git a/pages/company/companyDetail/index.js b/pages/company/companyDetail/index.js new file mode 100644 index 0000000..22b98fa --- /dev/null +++ b/pages/company/companyDetail/index.js @@ -0,0 +1,115 @@ +const app = getApp(); +// const commonUtil = require("../../utils/commonUtil"); +// pages/company/company/index.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + storeInfo: {} + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad (options) { + this.getInfo() + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady () { + + }, + goMap () { + console.log("123") + let that = this + wx.openLocation({ + latitude: Number(that.data.storeInfo.lat), + longitude: Number(that.data.storeInfo.lng), + name: that.data.storeInfo.fullName, + address: that.data.storeInfo.address, + scale: 18 + }) + }, + /** + * 生命周期函数--监听页面显示 + */ + onShow () { + + }, + /** + * 获取企业信息 + */ + getInfo () { + let that = this + wx.request({ + url: app.globalData.ip + "/yishoudan/agency/getInfo", + method: "get", + header: app.globalData.headers, + success: function (res) { + console.log(res) + let data = res.data.data + if (res.data.status == 200) { + data.agency.imgList = data.agency.imgs.split(',') + that.setData({ + storeInfo: data.agency + }) + } + + } + }) + }, + /** + * 拨打电话 + */ + makePhoneCall () { + var that = this; + if (!that.data.storeInfo.contactTel) { + wx.showToast({ + title: '暂无联系方式', + icon: 'none' + }) + return + } + wx.makePhoneCall({ + phoneNumber: that.data.storeInfo.contactTel, + }); + }, + /** + * 生命周期函数--监听页面隐藏 + */ + onHide () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage () { + + } +}) \ No newline at end of file diff --git a/pages/company/companyDetail/index.json b/pages/company/companyDetail/index.json new file mode 100644 index 0000000..743872e --- /dev/null +++ b/pages/company/companyDetail/index.json @@ -0,0 +1,6 @@ +{ + "navigationBarBackgroundColor":"#0dcc91", + "navigationBarTextStyle":"white", + "backgroundColor": "#FFFFFF", + "navigationBarTitleText": "一才工作" +} \ No newline at end of file diff --git a/pages/company/companyDetail/index.wxml b/pages/company/companyDetail/index.wxml new file mode 100644 index 0000000..ddafe67 --- /dev/null +++ b/pages/company/companyDetail/index.wxml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + 关于我们 + {{storeInfo.aboutUs || '对方还未介绍自己'}} + + + + + + + + {{storeInfo.fullName || '-'}} + + {{storeInfo.address || '-'}} + + + + 导航 + + + + + + + + + + + + {{storeInfo.contactUserName || '暂无联系人' }} + +

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

+
+
+
+ + + +
+
+
diff --git a/pages/company/companyDetail/index.wxss b/pages/company/companyDetail/index.wxss new file mode 100644 index 0000000..36b7d72 --- /dev/null +++ b/pages/company/companyDetail/index.wxss @@ -0,0 +1,31 @@ +@import '../../index/index.wxss'; +page{ + position: relative; +} +.servicebox{ + padding: 10px; + background-color: #fff; +} +.servicebox .serviceinfo image { + width: 52px; + height: 52px; +} +.servicebox .serviceBottom { + height: 48px; + line-height: 48px; + width: 100%; + justify-content: space-between; +} +.servicebox .serviceBottom > view { + flex: 1; + justify-content: space-between; + padding: 0 10px 0 16px; +} +.icon-dianhua{ + position: relative; + top:12px; + width:28px;height:28px;border-radius: 50%;background-color: var(--color-ysd-bg);color:var(--color-hover);display: flex;align-items: center;justify-content: center;font-size: 16px;float: right; +} +.dhImg{ + width: 28px;height:28px;margin-top:40px +} \ No newline at end of file diff --git a/pages/detail/index.js b/pages/detail/index.js index 1707804..d5a4310 100644 --- a/pages/detail/index.js +++ b/pages/detail/index.js @@ -76,10 +76,14 @@ Page({ console.log(wx.getSystemInfo()); var that = this; - this.videoContext = wx.createVideoContext(`${e.target.dataset.id}`, this); - this.videoContext.requestFullScreen(); - this.videoContext.hideStatusBar(); - this.videoContext.play(); + that.videoContext = wx.createVideoContext(`${e.target.dataset.id}`, that); + + console.log(that.videoContext) + console.log("=========================") + + that.videoContext.requestFullScreen(); + that.videoContext.hideStatusBar(); + that.videoContext.play(); // setTimeout(() => { // that.setData({ // isShareShow: true, @@ -87,7 +91,12 @@ Page({ // }, 500); }, fullScreen(){ - this.videoContext.stop(); + if (!e.detail.fullScreen) { + this.setData({ + isShareShow: false, + }); + this.videoContext.stop(); + } }, doNothing(){}, closeFix(){ diff --git a/pages/detail/index.wxml b/pages/detail/index.wxml index e0fc9e2..a2e0552 100644 --- a/pages/detail/index.wxml +++ b/pages/detail/index.wxml @@ -56,14 +56,16 @@ - + + - - + + - + + diff --git a/pages/detail/index.wxss b/pages/detail/index.wxss index fb7d76b..4aea02f 100644 --- a/pages/detail/index.wxss +++ b/pages/detail/index.wxss @@ -558,7 +558,28 @@ button.collectBtn { .img5{ - width: calc(20vw - 16px); - height: calc(20vw - 16px); + width: 60px; + height: 60px; margin: 0px 4px; +} +.videoContainer::after { + content: ""; + width: 0; + height: 0; + border: 10px solid #ffffffbb; + border-right-color: transparent; + border-top-color: transparent; + border-left-width: 16px; + border-right-width: 0px; + border-bottom-color: transparent; + left: 50%; + top: 30px; + border-radius: 3px; + transform: translate(-50%, -50%); + /* background-color: #ffffff; */ + position: absolute; + z-index: 10; +} +.theVideo { + position: relative; } \ No newline at end of file diff --git a/pages/hotList/index.js b/pages/hotList/index.js new file mode 100644 index 0000000..d592b8a --- /dev/null +++ b/pages/hotList/index.js @@ -0,0 +1,3145 @@ +const app = getApp(); + +const commonUtil = require("../../utils/commonUtil.js"); +Page({ + data: { + currentInfo: {}, + swiperHeight: 0, + toped: "1", + chaShowed: false, + isTrigger: false, + // background: ["../../assets/images/banner1.jpg", "../../assets/images/banner2.jpg", "../../assets/images/banner3.jpg", "../../assets/images/banner4.jpg"], + pullNum: 0, //下拉次数 + tabs: [], + activeTab: 0, + systemInfo: {}, + getMenuButtonBoundingClientRect: {}, + // 手机基础信息 + tabs2: [], + loadMore: "", + loadContent: ["马不停蹄加载更多数据中...", "-- 已经到底了,加不了咯 --"], + + statusBarHeight: wx.getStorageSync("statusBarHeight"), // 状态栏高度 + + navigationBarHeight: wx.getStorageSync("navigationBarHeight"), // 导航栏高度 + + menuButtonHeight: wx.getStorageSync("menuButtonHeight"), // 胶囊按钮高度 + + menuButton: wx.getStorageSync("menuButtonInfo"), // 胶囊信息 + navigatorHeight: 60, + activeTab2: 0, + contentIndex: 0, + latestClass: 0, + zoneClass: 0, + recordList: [], + jobSpecialLabelNames: [], + storeJobListSearchForm: { + recruitment: 1, + pageNum: 1, + pageSize: 20, + classify: 1, + sex: -1, + workTypeStr: "", + lat: "", + lng: "", + jobClassify: "", + sortTag: 0, + jobSpecialLabelIds: "", + cityName: "", + brandIds: "", + jobCategoryLabelIds: "", + ujc: 0, + }, + loading: true, + topJobList: [], + hasLocation: false, + chooseActive: false, //筛选是否高亮 + + labelItems: [], + checkedlabelItems: [], + hasMoreData: false, //下拉是否还有更多数据 + inputShowed: false, + inputVal: "搜索职位", + wxCode: "", + isCollect: false, + collectTxt: "收藏", + isLogin: app.globalData.isLogin, + hasUserInfo: 0, + searchCityParamStorage: { + name: "", + shortName: "", + }, + iosDialog1: false, + phoneDialog: false, + triggered: false, + pageShow: false, + whichOneShow: "", + siv: "", + activez: "zuigao", + sexid: "-1", // 性别筛选的id + dialog1: false, + dialog2: false, + jobSpecialLabelList: [], + brandList: [], + firstMenu: "排序", // 工价筛选tab显示 + secondMenu: "性别", // 性别筛选tab显示 + selectBrandList: [], // 选中的品牌标签 + selectJobList: [], // 选中的特色标签 + tagArray0: [], + tagArray1: [], + tagArray2: [], + tagArray3: [], + tagArray4: [], + recordBillType: "", // 报名类型(拍照或者直接报名) + signType: 0, // 职位类型(自营 三方) + recordCount: 0, + totalPage: 0, + currPage: 0, + currentJobDrawer: {}, // 当前简版职位抽屉信息 + drawerShow: false, // 简版职位抽屉显隐 + choiceCollect: 0, //收藏的筛选 + corpUserFlag: app.globalData.loginUserInfo.corpUserFlag, // 内部成员的判断 + agencyStatus: app.globalData.loginUserInfo.agencyStatus, // 是否是代理的判断 + serviceInfo: {}, // 代理信息 + navigatorBarHeight: 0, // 头部整体高度信息 + iosDialog: false, // 成为代理弹窗 + isLoading: true, // 成为代理图片加载loading效果 + isScrollTop: false, // 控制职位列表的滚动 + swiperTextList: ["日结工", "18岁", "电子厂", "短期工", "47岁", "保底", "小时工"], // 关键词轮播的关键词列表 + placeholderText: "", // 当前关键词 + leftShow: false, // 左侧智能匹配抽屉显示 + /** + * 滑动相关变量 + */ + lastX: 0, //滑动开始x轴位置 + lastY: 0, //滑动开始y轴位置 + text: "没有滑动", + currentGesture: 0, //标识手势 + listPosition: null, // 存储列表当前位置 + halfHide: true, // 智能匹配显示一半控制 + topNum: 0, + scrollTo: "", // 列表滚动的控制 + + bannerList: [], + filterData: { + + sex: [ + { + name: "男", + id: 1, + active: 0, + icon: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/nan912.png", + selectIcon: + "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/nan912-1.png", + }, + { + name: "女", + id: 2, + active: 0, + icon: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/nv912.png", + selectIcon: + "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/nv912-1.png", + }, + { + name: "男女不限", + id: -1, + active: -1, + }, + ], + jobFilter: { + tagArray0: [], + tagArray1: [], + tagArray2: [], + tagArray3: [], + tagArray4: [], + }, + classifyList: [], + }, + //智能筛选数据 + smartObj: { + tattoo: [ + { + name: "无", + id: 1, + active: 0, + }, + { + name: "小面积", + id: 2, + active: 0, + }, + { + name: "大面积", + id: 3, + active: 0, + }, + ], + criminal: [ + { + name: "无", + id: 1, + active: 0, + }, + { + name: "有", + id: 2, + active: 0, + }, + ], + blacklist: [ + { + name: "是", + id: 1, + active: 0, + }, + { + name: "否", + id: 2, + active: 0, + }, + ], + idCardType: [ + { + name: "原件正常", + id: 1, + active: 0, + }, + { + name: "临时", + id: 2, + active: 0, + }, + { + name: "消磁", + id: 3, + active: 0, + }, + { + name: "过期", + id: 4, + active: 0, + }, + { + name: "复印件", + id: 5, + active: 0, + }, + ], + sex: [ + { + name: "男", + id: 1, + active: 0, + icon: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/nan912.png", + selectIcon: + "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/nan912-1.png", + }, + { + name: "女", + id: 2, + active: 0, + icon: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/nv912.png", + selectIcon: + "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/nv912-1.png", + }, + { + name: "男女不限", + id: -1, + active: -1, + }, + ], + nativePlace: "", + nation: "", + }, + copyList: {}, + innerFilter: false, + // 年龄筛选参数 + rangeValues: [16, 60], // 年龄筛选区间 + maxAge: 60, // 年龄区间最大取值 + minAge: 16, + recordShow: false + }, + // onPullDownRefresh:function(){ + // this.getJobList(); + // console.log(123); + + // wx.stopPullDownRefresh({ + // success() { + // app.refreshSuccess(); + // } + // }); + // }, + goLogin () { + wx.setStorageSync("comeFromPage", "index"); + wx.navigateTo({ + url: "/pages/login/index", + }); + }, + close () { + let that = this; + let brandList = that.data.brandList; + let selectBrandList = that.data.selectBrandList; + if (selectBrandList.length > 0) { + for (let i = 0; i < brandList.length; i++) { + console.log("level1"); + for (let j = 0; j < selectBrandList.length; j++) { + console.log("level2"); + if (brandList[i].id == selectBrandList[j].id) { + return (brandList[i].checked = true); + } else { + brandList[i].checked = false; + } + } + } + } else { + brandList.forEach((item) => { + item.checked = false; + }); + } + return brandList; + }, + closeFix: function () { + var that = this; + // let brandList = that.close() + // that.data.brandList.forEach((item) => { + // if (that.data.selectBrandList.length > 0) { + // that.data.selectBrandList.forEach((item1) => { + // if (item.id != item1.id) { + // console.log("isSame"); + // item.checked = false; + // console.log(item.checked); + // } else { + // item.checked = true; + // } + // }); + // } else { + // item.checked = false; + // } + // }); + // console.log(that.data.brandList); + // console.log(that.data.selectBrandList); + console.log("isout"); + }, + touchStart (e) { + // console.log("滚起来", e); + // this.setData({ + // scrollStop: false + // }) + this.setData({ + // whichOneShow: mark, + siv: "", + }); + }, + choosenTop (e) { + var that = this; + // that.data.storeJobListSearchForm.pageNum = 1; + let id = e.currentTarget.dataset.id; + setTimeout(() => { + that.setData({ + toped: id, + // isScrollTop: false, + }); + }, 0); + // 切换标准 简版 重新查询列表 + // that.data.storeJobListSearchForm.pageNum = 1; + // that.setData({ + // toped: id, + // recordList: [], + // }); + // that.getJobList(); + }, + + chooseNl: function (e) { + var that = this; + console.log(e); + let mark = ""; + let type = e.target.dataset.type; + let whichOneShow = that.data.whichOneShow; + // if (!that.data.isLogin) { + // wx.navigateTo({ + // url: "/pages/login/index", + // }); + // return; + // } + if (type == "gj") { + if (whichOneShow == "gj") { + mark = ""; + } else { + mark = "gj"; + } + } else if (type == "sex") { + if (whichOneShow == "sex") { + mark = ""; + } else { + mark = "sex"; + } + } else if (type == "brand") { + if (whichOneShow == "brand") { + mark = ""; + } else { + mark = "brand"; + } + } else if (type == "special") { + if (whichOneShow == "special") { + mark = ""; + } else { + mark = "special"; + } + } + if (that.data.siv != "menu") { + setTimeout(() => { + that.setData({ + whichOneShow: mark, + // siv:'menu' + }); + console.log(this.data.whichOneShow); + }, 0); + that.setData({ + siv: "menu", + scrollTo: "sticky", + }); + } + this.hideLeft(); + }, + getType () { + var that = this; + wx.request({ + url: app.globalData.ip + "/yishoudan/labels/type/app/95", + method: "get", + header: app.globalData.headers, + success: function (res) { + console.log(res); + + let classifyList = "filterData.classifyList"; + that.setData({ + [classifyList]: res.data.data.labels, + }); + + + // that.data.storeJobListSearchForm['jobCategoryLabelIds'] = res.data.data.labels[0].id + // that.setData({ + // list:res.data.data.labels, + // storeJobListSearchForm: that.data.storeJobListSearchForm + // }) + } + }) + }, + toSpecialArea: function (e) { + var id = e.currentTarget.dataset.id; + wx.navigateTo({ + url: "../specialArea/index?id=" + id, + }); + }, + chooseM: function (e) { + var str = e.currentTarget.dataset.id; + console.log(str); + this.setData({ + activez: str, + }); + }, + watch () { }, + witchNav (e) { + console.log(e); + if (!this.data.isLogin) { + wx.navigateTo({ + url: "/pages/login/index", + }); + return; + } + if (e.currentTarget.dataset.title == "成为代理") { + console.log("成为代理"); + if (app.globalData.loginUserInfo.agencyStatus == 1) { + wx.showToast({ + title: "您已经是代理了", + icon: "none", + duration: 2000, + }); + return; + } + } else if (e.currentTarget.dataset.title == "主推/热推") { + wx.navigateTo({ + url: e.currentTarget.dataset.url + "?listtype=" + this.data.toped, + }); + return; + } + + wx.navigateTo({ + url: e.currentTarget.dataset.url, + }); + }, + toHot (e) { + if (e.currentTarget.dataset.path) { + if (e.currentTarget.dataset.path == "/pages/hotList/index") { + wx.navigateTo({ + url: `${e.currentTarget.dataset.path}?listtype=${this.data.toped}`, + }); + } + } + }, + choiceSex (e) { + var that = this; + let data = e.currentTarget.dataset; + that.data.filterData[data.type].forEach((item) => { + item.active = 0; + }); + let index = that.data.filterData[data.type].findIndex((item) => { + return item.id == data.id; + }); + that.data.filterData[data.type][index].active = data.id; + // let str = that.data.sexid + console.log(e); + let str = e.currentTarget.dataset.id; + console.log(str); + if (str == "1") { + that.data.secondMenu = "男生"; + } else if (str == "2") { + that.data.secondMenu = "女生"; + } else if (str == "-1") { + that.data.secondMenu = "不限"; + } + that.setData({ + sexid: str, + secondMenu: this.data.secondMenu, + }); + that.data.storeJobListSearchForm.pageNum = 1; + that.data.storeJobListSearchForm.sex = str; + that.setData({ + storeJobListSearchForm: that.data.storeJobListSearchForm, + recordList: [], + filterData: that.data.filterData, + innerFilter: true, + }); + that.getJobList().then(() => { + that.setData({ + siv: "menu", + whichOneShow: "", + }); + }); + }, + onScrollRefresh: function () { + var that = this; + that.data.storeJobListSearchForm.pageNum = 1; + that.setData({ + recordList: [], + }); + that.getJobList(); + + // setTimeout(function(){ + // that.setData({ + // recordList: [],: false, + // }) + // },2000); + }, + + cc: function () { }, + close: function () { + this.setData({ + dialog1: false, + dialog2: false, + phoneDialog: false, + }); + }, + searchKey: function (e) { + if (!this.data.isLogin) { + wx.navigateTo({ + url: "../login/index", + }); + return; + } + console.log(e); + this.data.recordList = []; + this.data.storeJobListSearchForm.pageNum = 1; + this.data.storeJobListSearchForm.keys = this.data.inputVal; + this.getJobList(); + }, + onShareAppMessage: function () { + var path = commonUtil.getCurrentPageUrlWithArgs(); + if (app.globalData.isLogin && app.globalData.agencyStatus - 0 != 0) { + //当前用户是代理人 + path += (path.indexOf("?") >= 0 ? "&" : "?") + "agencyUserId=" + app.globalData.loginUserInfo.id; + } + console.log(path); + let img; + + this.data.templateList.forEach((element) => { + if (element.title == "职位云小程序首页卡片分享封面") { + img = element.img + "?" + new Date().getTime(); + } + }); + return { + title: " ", + path: path, + imageUrl: img, + }; + }, + goSearch () { + if (!this.data.isLogin) { + wx.navigateTo({ + url: "../login/index", + }); + return; + } + wx.navigateTo({ + url: `../jobListSearch/index?from=project&listtype=${this.data.toped}&key=${this.data.placeholderText}`, + }); + }, + clearInput: function () { + this.setData({ + inputVal: "搜索职位", + chaShowed: false, + inputShowed: false, + hasMoreData: true, + }); + this.inputBlur(); + this.data.recordList = []; + this.data.storeJobListSearchForm.pageNum = 1; + this.data.storeJobListSearchForm.keys = ""; + this.getJobList(); + }, + inputTyping: function (e) { + this.setData({ + inputVal: e.detail.value, + }); + console.log(this.data.inputVal == ""); + if (this.data.inputVal == "") { + this.data.recordList = []; + this.data.storeJobListSearchForm.pageNum = 1; + this.data.storeJobListSearchForm.keys = ""; + this.getJobList(); + } + }, + /** + * 清除本地缓存 + * + * + */ + clear () { + wx.clearStorage(); + + console.log("清除成功"); + }, + inputBlur () { }, + getListByTypeAndIndustry: function () { + var that = this; + wx.request({ + url: app.globalData.ip + "/yishoudan/labels/type/app/90", + + header: app.globalData.header, + method: "GET", + success: function (res) { + console.log(res.data.data.labels); + wx.setStorageSync("FILTER_LIST", res.data.data.labels); + res.data.data.labels.forEach((item) => { + if (item.typeClassify == "0") { + that.data.tagArray0.push(item); + } else if (item.typeClassify == "1") { + that.data.tagArray1.push(item); + } else if (item.typeClassify == "2") { + that.data.tagArray2.push(item); + } else if (item.typeClassify == "3") { + that.data.tagArray3.push(item); + } else if (item.typeClassify == "4") { + that.data.tagArray4.push(item); + } + }); + that.setData({ + tagArray0: that.data.tagArray0, + tagArray1: that.data.tagArray1, + tagArray2: that.data.tagArray2, + tagArray3: that.data.tagArray3, + tagArray4: that.data.tagArray4, + }); + + var jobSpecialLabelIdArray = + that.data.storeJobListSearchForm.jobSpecialLabelIds.split(","); + + res.data.data.labels.forEach((item) => { + item["checked"] = false; + jobSpecialLabelIdArray.forEach((item1) => { + if (item.id == item1) { + item["checked"] = true; + } + }); + }); + + that.setData({ + jobSpecialLabelList: res.data.data.labels, + }); + }, + }); + }, + golistSharePage () { + if (this.data.isLogin) { + if (app.globalData.loginUserInfo.agencyStatus == 1) { + wx.navigateTo({ + url: `/pages/listSharePage/index?listtype=${this.data.toped}`, + }); + } else { + wx.navigateTo({ + url: `/pages/tobeAgency/index`, + }); + } + } else { + wx.navigateTo({ + url: `/pages/login/index`, + }); + } + }, + clear () { + // wx.clearStorage() + }, + getBrandNameAllList: function () { + var that = this; + wx.request({ + url: app.globalData.ip + "/yishoudan/labels/type/app/95", // 分类列表获取接口 + header: app.globalData.header, + method: "GET", + success: function (res) { + console.log(res); + if (res.data.status == 200) { + if (that.data.storeJobListSearchForm.brandIds) { + var brandIdArray = + that.data.storeJobListSearchForm.brandIds.split(","); + } + console.log(res.data.data.labels); + wx.setStorageSync("CLASSIFY_LIST", res.data.data.labels); + res.data.data.labels.forEach((item) => { + item["checked"] = false; + delete item.typeClassify + if (brandIdArray) { + brandIdArray.forEach((item1) => { + if (item.id == item1) { + item["checked"] = true; + } + }); + } + }); + that.setData({ + brandList: res.data.data.labels, + }); + } + }, + }); + }, + + selectBrand: function (e) { + var that = this; + let data = e.currentTarget.dataset; + let index = that.data.filterData[data.type].findIndex((item) => { + return item.id == data.id; + }); + that.data.filterData[data.type][index].active = data.id; + + if (that.data.brandList[data.index].checked) { + that.data.brandList[data.index].checked = false; + // let index1 = that.data.selectBrandList.indexOf(that.data.brandList[index]) + // that.data.selectBrandList.splice(index1,1) + } else { + that.data.brandList[data.index].checked = true; + } + console.log(that.data.selectBrandList); + this.setData({ + brandList: that.data.brandList, + filterData: that.data.filterData, + }); + }, + reset: function (e) { + var that = this; + console.log(e); + if (e.target.dataset.type == 1) { + //特色 + that.data.jobSpecialLabelList.forEach((item) => { + // console.log(item); + if (item.checked) { + item.checked = false; + } + }); + that.setData({ + jobSpecialLabelList: that.data.jobSpecialLabelList, + tagArray0: that.data.tagArray0, + tagArray1: that.data.tagArray1, + tagArray2: that.data.tagArray2, + tagArray3: that.data.tagArray3, + selectJobList: [], + whichOneShow: "", + }); + that.data.storeJobListSearchForm.jobSpecialLabelIds = ""; + } else if (e.target.dataset.type == 2) { + //品牌 + that.data.brandList.forEach((item) => { + if (item.checked) { + item.checked = false; + } + }); + that.setData({ + brandList: that.data.brandList, + selectBrandList: [], + whichOneShow: "", + }); + that.data.storeJobListSearchForm.jobCategoryLabelIds = ""; + // that.data.storeJobListSearchForm.brandIds = ""; + } else if (e.target.dataset.type == 4) { + that.setData({ + activez: "", + }); + } + that.data.storeJobListSearchForm.pageNum = 1; + that.setData({ + recordList: [], + innerFilter: false, + }); + that.getJobList(); + }, + loginOut: function () { + var that = this; + var jobSpecialLabelIdArray = []; + + // var brandIdArray = []; + that.data.selectBrandList = []; + that.data.filterData.classifyList.forEach((item) => { + if (item.active) { + if (that.data.selectBrandList.indexOf(item) == -1) { + that.data.selectBrandList.push(item); + } + // brandIdArray.push(item.id); + } + }); + that.data.selectJobList = []; + let subArr = that.data.filterData.jobFilter; + let jobList = subArr.tagArray0.concat(subArr.tagArray1, subArr.tagArray2, subArr.tagArray3, subArr.tagArray4); + jobList.forEach((item) => { + if (item.active) { + if (that.data.selectJobList.indexOf(item) == -1) { + that.data.selectJobList.push(item); + } + } + }); + // if (brandIdArray.length > 0) { + // // that.data.storeJobListSearchForm.brandIds = brandIdArray.join(","); + // that.data.storeJobListSearchForm.jobCategoryLabelIds = brandIdArray.join(","); + // } else { + // // that.data.storeJobListSearchForm.brandIds = ""; + // that.data.storeJobListSearchForm.jobCategoryLabelIds = ""; + // } + // that.data.storeJobListSearchForm.pageNum = 1; + that.setData({ + // recordList: [], + // siv: "", + // whichOneShow: "", + selectBrandList: that.data.selectBrandList, + selectJobList: that.data.selectJobList, + // innerFilter:true + }); + // that.getJobList(); + }, + onLoad (options) { + var that = this; + // console.log('options+++++++++++++++++++++++++++++++++',options); + console.log(wx.getSystemInfoSync()); + // Array.prototype.logResult = function(){ + // console.log('Array'); + // } + this.setData({ + placeholderText: this.data.swiperTextList[0], + }); + let arr = []; + arr.logResult(); + + this.getListByTypeAndIndustry(); + this.getBrandNameAllList(); + + // 查看是否授权 + wx.getSetting({ + success (res) { + if (res.authSetting["scope.userInfo"]) { + // 已经授权,可以直接调用 getUserInfo 获取头像昵称 + wx.getUserInfo({ + success: function (res) { + console.log(res.userInfo); + }, + }); + } + }, + }); + + // if (app.isNotEmptyCheck(options.fromSearchPage) && options.fromSearchPage == 1) { + // try { + // var searchCityParamStorage = wx.getStorageSync("searchCityParamStorage"); + // if (searchCityParamStorage) { + // console.log("searchCityParamStorage======", searchCityParamStorage); + // that.data.storeJobListSearchForm.cityName = searchCityParamStorage.name; + // if (app.isEmptyCheck(searchCityParamStorage.name)) { + // that.data.storeJobListSearchForm.cityName = "全国"; + // } + // that.setData({ + // searchCityParamStorage: searchCityParamStorage, + // }); + // } + // } catch (e) { + // console.log("获取缓存设置的查询职位列表参数错误:", e); + // } + // } else { + // try { + // wx.removeStorageSync("searchJobListParamStorage"); + // } catch (e) { + // console.log("删除缓存设置的查询职位列表参数错误:", e); + // } + // try { + // wx.removeStorageSync("searchCityParamStorage"); + // } catch (e) { + // console.log("删除缓存设置的查询职位列表参数错误:", e); + // } + // } + + try { + if (app.globalData.isScanQRCodes - 1 == 0) { + wx.showToast({ + title: "欢迎查看好工作", + icon: "success", + duration: 2000, + }); + if (!getApp().globalData.isLogin) { + setTimeout(function () { + if (!getApp().globalData.isLogin) { + that.openIOS2(); + } + }, 5000); + } + } + } catch (e) { + console.log("获取缓存设置的查询职位列表参数错误:", e); + } + + console.log("options==============================1"); + console.log(options); + console.log("options==============================2"); + + if (app.isNotEmptyCheck(options.scene)) { + //扫小程序码携带参数 + var sceneStr = decodeURIComponent(options.scene); + var sceneJson = commonUtil.sceneToJson(sceneStr); + console.log("sceneJson===", sceneJson); + if (sceneJson.fromType == 1) { + app.globalData.isCommission = 1; + wx.setStorageSync("storageSyncAgencyUserId", sceneJson.userId); + } + + //先设置代理人缓存人再登录 + app.getLoginUserTokenInfo(); + } else if (app.isNotEmptyCheck(options.fromType)) { + //扫小程序普通二维码携带参数-来源ID + console.log("options.fromType========" + options.fromType); + if (options.fromType == 0) { + console.log("options.id========" + options.id); + console.log("options.userId========" + options.userId); + try { + app.globalData.isCommission = 1; + wx.setStorageSync("fromQrCodeChannelContactId", options.id); + that.getAgencyUserId(options.id); + } catch (e) { + console.log("0-扫描微信二维码,设置参数错误:", e); + } + } else if (options.fromType.indexOf("0&id=") >= 0) { + //兼容2021-9-9之前的二维码 + var paramsTempId = options.fromType.replace("0&id=", ""); + console.log("¶msTempId========" + paramsTempId); + try { + app.globalData.isCommission = 1; + wx.setStorageSync("fromQrCodeChannelContactId", paramsTempId); + that.getAgencyUserId(paramsTempId); + } catch (e) { + console.log("0-扫描微信二维码,设置参数错误:", e); + } + } else { + //兼容2021-9-9之前的二维码 + var paramsTempId = options.fromType.replace("0,id=", ""); + console.log("=paramsTempId========" + paramsTempId); + try { + app.globalData.isCommission = 1; + wx.setStorageSync("fromQrCodeChannelContactId", paramsTempId); + that.getAgencyUserId(paramsTempId); + } catch (e) { + console.log("0-扫描微信二维码,设置参数错误:", e); + } + } + } else { + console.log("options.fromType===else=====" + options); + } + + //this.wxLogin(); + let res = wx.getStorageSync("storeJobId"); //详情页返回 + console.log(res); + if (app.isEmptyCheck(res.data)) { + this.setData({ + recordList: [], + }); + } else { + wx.removeStorageSync({ + key: "storeJobId", + }); + } + + console.log("on show"); + + //登录=================================start + if (app.globalData.isLogin) { + this.setData({ + isLogin: app.globalData.isLogin, + hasUserInfo: app.globalData.hasUserInfo, + agencyStatus: app.globalData.loginUserInfo.agencyStatus, + corpUserFlag: app.globalData.loginUserInfo.corpUserFlag, + userInfo: app.globalData.loginUserInfo, + serviceInfo: app.globalData.serviceInfo, + isLoading: true, + }); + } else { + // 由于 userLogin 是网络请求,可能会在 Page.onLoad 之后才返回 + // 所以此处加入 callback 以防止这种情况 + app.userLoginCallback = (res) => { + this.setData({ + isLogin: app.globalData.isLogin, + hasUserInfo: app.globalData.hasUserInfo, + agencyStatus: app.globalData.loginUserInfo.agencyStatus, + corpUserFlag: app.globalData.loginUserInfo.corpUserFlag, + userInfo: app.globalData.loginUserInfo, + serviceInfo: app.globalData.serviceInfo, + }); + console.log(that.data.serviceInfo); + }; + console.log(that.data.serviceInfo); + } + //登录=================================end + + this.getHopeJobLabels(); + var reset = true; + let agencyUserId = options.agencyUserId; + if (agencyUserId) { + wx.setStorageSync("storageSyncAgencyUserId", agencyUserId); + console.log("agencyUserId", agencyUserId); + app.globalData.isCommission = 1; + } + app.getLoginUserTokenInfo(); + that.getType(); + + // this.getJobList(); + if (wx.getStorageSync("FILTER_LIST")) { + let list = wx.getStorageSync("FILTER_LIST"); + list.forEach((item) => { + item.active = 0; + if (item.typeClassify == "0") { + this.data.filterData.jobFilter["tagArray0"].push(item); + } else if (item.typeClassify == "1") { + this.data.filterData.jobFilter["tagArray1"].push(item); + } else if (item.typeClassify == "2") { + this.data.filterData.jobFilter["tagArray2"].push(item); + } else if (item.typeClassify == "3") { + this.data.filterData.jobFilter["tagArray3"].push(item); + } else if (item.typeClassify == "4") { + this.data.filterData.jobFilter["tagArray4"].push(item); + } + }); + let jobFilter = "filterData.jobFilter"; + this.setData({ + [jobFilter]: this.data.filterData.jobFilter, + }); + } + if (wx.getStorageSync("CLASSIFY_LIST")) { + + console.log(wx.getStorageSync("CLASSIFY_LIST")) + + this.data.filterData.classifyList = wx.getStorageSync("CLASSIFY_LIST"); + this.data.filterData.classifyList.forEach((item) => { + console.log(item); + item.active = 0; + delete item.typeClassify + }); + let classifyList = "filterData.classifyList"; + this.setData({ + [classifyList]: this.data.filterData.classifyList, + }); + } + + this.setData({ + copyList: JSON.parse(JSON.stringify(this.data.filterData)), + }); + that.setData({ + recordList: [], + }); + that.getJobList(); + // that.getJobList(); + }, + onReady () { + let that = this; + // var query = wx.createSelectorQuery(); + // query.select(".navigatorBar").boundingClientRect(); + // query.exec(function (res) { + // //res就是 所有标签为v1的元素的信息 的数组 + // console.log(res); + // //取高度 + // console.log(res[0].height); + // that.setData({ + // navigatorBarHeight: res[0].height, + // }); + // }); + }, + /** + * 智能匹配结束 + * + * + * + */ + goChannel (e) { + console.log(e); + }, + /** + * 筛选标签的点击 + * + * + */ + setActive (e) { + console.log(e); + let data = e.currentTarget.dataset; + if (data.type == "yanba" || data.type == "sex" || data.type == "price") { + console.log(data.id); + let index = this.data.filterData[data.type].findIndex((item) => { + return item.id == data.id; + }); + if (this.data.filterData[data.type][index].active == data.id) { + this.data.filterData[data.type][index].active = 0; + } else { + this.data.filterData[data.type].forEach((item) => { + item.active = 0; + }); + this.data.filterData[data.type][index].active = data.id; + } + + this.setData({ + filterData: this.data.filterData, + }); + } else if (data.type != "jobFilter") { + this.data.filterData[data.type].forEach((item) => { + if (item.id == data.id) { + if (item.active == data.id) { + item.active = 0; + } else { + item.active = data.id; + } + } + }); + console.log(this.data.filterData[data.type]); + } else { + this.data.filterData[data.type][data.arr].forEach((item) => { + if (item.id == data.id) { + if (item.active == data.id) { + item.active = 0; + } else { + item.active = data.id; + } + } + }); + } + + this.setData({ + filterData: this.data.filterData, + }); + }, + + /** + * 获取banner信息 + * + * + */ + getBannerList () { + let that = this; + wx.request({ + url: app.globalData.ip + "/daotian/banner/list", + success (res) { + console.log(res); + if (res.data.status == 200) { + that.setData({ + bannerList: res.data.data.pageBean.banners, + }); + } + }, + }); + }, + + /** + * 获取图片模板信息 + * + * + */ + getTemplateList () { + // let that = this; + // wx.request({ + // url: app.globalData.ip + "/daotian/image/list", + // success (res) { + // console.log(res); + // if (res.data.status == 200) { + // app.globalData.templateList = res.data.data.pageBean.images; + // that.setData({ + // templateList: res.data.data.pageBean.images, + // }); + // } + // }, + // }); + }, + + /** + * 获取频道列表 + * + * + */ + getchannelList () { + let that = this; + wx.request({ + url: app.globalData.ip + "/daotian/channel/list", + success (res) { + console.log(res); + if (res.data.status == 200) { + that.setData({ + navList: res.data.data.pageBean.channels, + }); + } + }, + }); + }, + /** + * 清除筛选信息 + * + * + */ + clearFilter1 (e) { + let middleList = JSON.parse(JSON.stringify(this.data.copyList)); + let type = e.currentTarget.dataset.type; + let filterData = this.data.filterData; + + console.log(type); + if (type == 2) { + filterData = { + ...filterData, + classifyList: middleList.classifyList, + }; + this.setData({ + selectBrandList: [], + }); + } else if (type == 1) { + filterData = { + ...filterData, + jobFilter: middleList.jobFilter, + }; + this.setData({ + selectJobList: [], + }); + } else if (type == "outerClear") { + console.log('storeJobListSearchForm', this.data.storeJobListSearchForm.ageRangeStr); + filterData = middleList; + this.setData({ + selectJobList: [], + selectBrandList: [], + firstMenu: "排序", + secondMenu: "不限", + sexid: -1, + rangeValues: [16, 60], + maxAge: 60, + minAge: 16, + activez: "zuigao", + innerFilter: false, + }); + console.log('storeJobListSearchForm', this.data.storeJobListSearchForm.ageRangeStr); + } else if (type == "innerclear") { + filterData = middleList; + this.setData({ + selectJobList: [], + selectBrandList: [], + firstMenu: "排序", + secondMenu: "不限", + sexid: -1, + rangeValues: [16, 60], + maxAge: 60, + minAge: 16, + activez: "zuigao", + innerFilter: false, + }); + } + console.log(filterData); + this.setData({ + filterData, + leftShow: false, + recordList: [], + whichOneShow: "", + scrollTo: "sticky", + }); + if (this.data.choiceCollect == 0) { + this.data.storeJobListSearchForm.ujc = 0; + } else { + this.data.storeJobListSearchForm.ujc = 1; + } + this.toList(); + + // this.getJobList(); + }, + /** + * 点击确认按钮 + * + * + */ + toList () { + let that = this; + let innerFilter = false; + console.log(this.data.filterData); + let formSearch = { + pageNum: 1, + pageSize: 20, + }; + let filter = this.data.filterData; + for (var k in filter) { + if (k != "jobFilter") { + let jobCategoryArr = []; + filter[k].forEach((item) => { + if (item.active != 0) { + if (k == "price") { + if (item.name == "8000以上") { + formSearch.monthlyPayStr = "8001-20000"; + } else { + formSearch.monthlyPayStr = item.name; + } + } else if (k == "sex") { + formSearch.sex = item.id; + if (item.id == -1) { + this.data.secondMenu = "不限"; + } else if (item.id == 1) { + this.data.secondMenu = "男生"; + innerFilter = true; + } else if (item.id == 2) { + this.data.secondMenu = "女生"; + innerFilter = true; + } + this.setData({ + sexid: item.id, + secondMenu: this.data.secondMenu, + }); + } else if (k == "classifyList") { + jobCategoryArr.push(item.id); + if (jobCategoryArr.length > 0) { + innerFilter = true; + } + } + } + }); + formSearch.jobCategoryLabelIds = jobCategoryArr.join(); + } else { + let totalArr = [...filter["jobFilter"].tagArray0, ...filter["jobFilter"].tagArray1, ...filter["jobFilter"].tagArray2, ...filter["jobFilter"].tagArray3, ...filter["jobFilter"].tagArray4]; + let jobSpecialArr = []; + console.log(totalArr); + totalArr.forEach((item) => { + if (item.active != 0) { + jobSpecialArr.push(item.id); + } + }); + console.log(jobSpecialArr); + if (jobSpecialArr.length > 0) { + innerFilter = true; + } + console.log(jobSpecialArr.join(",")); + formSearch.jobSpecialLabelIds = jobSpecialArr.join(","); + } + } + console.log(formSearch); + + that.data.storeJobListSearchForm = { + ...that.data.storeJobListSearchForm, ...formSearch, + ageRangeStr: that.data.minAge + "-" + that.data.maxAge, + }; + if (this.data.choiceCollect == 0) { + that.data.storeJobListSearchForm.ujc = 0; + } else { + that.data.storeJobListSearchForm.ujc = 1; + } + console.log(that.data.storeJobListSearchForm); + that.setData({ + recordList: [], + leftShow: false, + innerFilter, + whichOneShow: "", + storeJobListSearchForm: that.data.storeJobListSearchForm, + }); + that.loginOut(); + that.getJobList(); + }, + /** + * 智能匹配结束 + * + * + */ + onTabClick (e) { + const index = e.detail.index; + this.setData({ + activeTab: index, + }); + }, + + onChange (e) { + const index = e.detail.index; + this.setData({ + activeTab: index, + }); + }, + + findLocation () { + var that = this; + wx.getLocation({ + type: "gcj02", + success (res1) { + console.log("获取位置2"); + console.log(res1); + app.globalData.lng = res1.longitude; + app.globalData.lat = res1.latitude; + }, + fail () { }, + }); + }, + + emptyMethod (e) { + console.log(e); + }, + chooseIdCard () { + var that = this; + if (that.data.agencyStatus != 1) { + this.setData({ + iosDialog: true, + }); + return; + } + wx.chooseImage({ + count: 1, + sizeType: ["original", "compressed"], + sourceType: ["album", "camera"], + success (res) { + console.log(res); + wx.navigateTo({ + url: `../newEnroll/enroll/index?applyType=1&imgUrl=${res.tempFilePaths[0]}`, + }); + // that.uploadIdcardImg(res); + }, + }); + }, + navigatorToRecord () { + if (this.data.agencyStatus != 1) { + this.setData({ + iosDialog: true, + }); + return; + } + wx.navigateTo({ + url: `../newEnroll/enroll/index?applyType=1`, + }); + }, + PageScroll (e) { + let that = this; + const query = wx.createSelectorQuery().in(this); + query + .select(".sticky") + .boundingClientRect(function (res) { + // console.log(res); + if (res.top <= 5) { + that.setData({ + isScrollTop: true, + }); + } else if (res.top > 0 && res.top < 90) { + that.setData({ + isScrollTop: false, + }); + } else if (res.top >= 90) { + that.setData({ + isScrollTop: false, + }); + } + }) + .exec(); + }, + onShow () { + let that = this; + that.data.storeJobListSearchForm.pageNum = 1; + wx.setStorageSync("BILLFROM", "firstBill"); + + // var query = wx.createSelectorQuery(); + // query.select(".toppic").boundingClientRect(); + // query.exec(function (res) { + // //res就是 所有标签为v1的元素的信息 的数组 + // console.log(res); + // //取高度 + // console.log(res[0].height); + // that.setData({ + // swiperHeight: res[0].height, + // }); + // }); + + // wx.showTabBar({ + // success(e) {}, + // }); + // let index = 1; + // that.setData({ + // placeholderText: that.data.swiperTextList[0], + // }); + // setInterval(() => { + // that.data.placeholderText = that.data.swiperTextList[index % that.data.swiperTextList.length]; + // that.setData({ + // placeholderText: that.data.placeholderText, + // }); + // index++; + // }, 5000); + if (wx.getStorageSync("FROMCITY")) { + try { + var searchCityParamStorage = wx.getStorageSync("searchCityParamStorage"); + if (searchCityParamStorage) { + console.log("searchCityParamStorage======", searchCityParamStorage); + that.data.storeJobListSearchForm.cityName = searchCityParamStorage.name; + if (app.isEmptyCheck(searchCityParamStorage.name)) { + that.data.storeJobListSearchForm.cityName = ""; + } + + that.setData({ + searchCityParamStorage: searchCityParamStorage, + storeJobListSearchForm: that.data.storeJobListSearchForm, + }); + that.setData({ + recordList: [], + }); + this.getJobList(); + } + } catch (e) { + console.log("获取缓存设置的查询职位列表参数错误:", e); + } + wx.removeStorageSync("FROMCITY"); + } else { + // that.setData({ + // recordList: [], + // }); + // that.getJobList(); + } + if (typeof this.getTabBar === "function" && this.getTabBar()) { + this.getTabBar().setData({ + selected: 0, + isShow: true, + }); + } + wx.setStorageSync("comeFromPage", "index"); + + this.setData({ + storeJobListSearchForm: that.data.storeJobListSearchForm, + isLogin: app.globalData.isLogin, + recordBillType: "", + }); + console.log(app.globalData); + + setTimeout(() => { + if (app.globalData.isLogin) { + that.setData({ + agencyStatus: app.globalData.loginUserInfo.agencyStatus, + corpUserFlag: app.globalData.loginUserInfo.corpUserFlag, + userInfo: app.globalData.loginUserInfo, + serviceInfo: app.globalData.serviceInfo, + }); + console.log(app.globalData.loginUserInfo); + } else { + that.setData({ + serviceInfo: app.globalData.serviceInfo, + }); + this.wxLogin(); + } + }, 100); + console.log(app.globalData.headers); + // if (that.data.inputVal != "搜索工作") { + // console.log(that.data.inputVal); + // that.setData({ + // recordList: [], + // }); + + // that.getJobList(); + // } + + wx.removeStorage({ + key: "townsManInfo", + }); + wx.removeStorage({ + key: "townsManInfoJob", + }); + + /*this.wxLogin(); + let res = wx.getStorageSync({ + key: "storeJobId" + }); //详情页返回 + + if (app.isEmptyCheck(res.data)) { + this.setData({ + recordList: [] + }); + } else { + wx.removeStorageSync({ + key: "storeJobId" + }); + } + + console.log("on show"); + this.getHopeJobLabels(); + var reset = true;*/ + that.getTemplateList(); + that.searchAnimate(); + + }, + collectedStoreJobList () { + var that = this; + + wx.request({ + 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.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) { + jobs[j].collected = 2; + } + for (var i = 0; i != collectList.length; ++i) { + for (var j = 0; j != jobs.length; ++j) { + if (collectList[i].storeJobId - jobs[j].id == 0) { + jobs[j].collected = 1; + break; + } + } + } + that.setData({ + recordList: jobs, + }); + } + }, + fail: function (res) { }, + }); + }, + getHopeJobLabels () { + var that = this; + wx.request({ + url: app.globalData.ip + "/labels/findAllHopeJobLabels", + // ?category=4 + method: "GET", + data: {}, + success: function (res0) { + console.log("感兴趣职位 ↓↓↓"); + console.log(res0); + if (res0.data.data != null) { + res0.data.data.forEach((item, index) => { + item["title"] = item.name; + item["checked"] = false; + + if (index == 0 || index == 1) { + item["checked"] = true; + } + }); + } + + that.setData({ + labelItems: res0.data.data == null ? [] : res0.data.data, + }); + that.initData(); + console.log("感兴趣职位 赋值title↓↓↓"); + console.log(res0); + }, + fail: function (res) { + console.log(res); + wx.showToast({ + title: "获取失败", + icon: "none", + duration: 2000, + }); + }, + }); + }, + makePhoneCall () { + var that = this; + wx.makePhoneCall({ + phoneNumber: "13937184434", + }); + }, + goScreen () { + wx.navigateTo({ + url: "../screen/index", + }); + }, + goCity () { + let that = this; + + wx.navigateTo({ + url: "../city/index", + }); + }, + initData () { + var that = this; + try { + // 获取手机基础信息(头状态栏和标题栏高度) + let systemInfo = wx.getSystemInfoSync(); + let getMenuButtonBoundingClientRect = wx.getMenuButtonBoundingClientRect(); + console.log(wx.getMenuButtonBoundingClientRect()); + this.setData({ + systemInfo, + getMenuButtonBoundingClientRect, + }); + } catch (e) { + console.log(e); + + wx.alert({ + title: "温馨提示", + content: "onLoad 执行异常", + }); + } + let res0 = wx.getStorageSync("checkedlabelItems"); + + console.log(app.isNotEmptyCheck(res0.data)); + that.data.tabs2 = [ + { + name: "打勾推荐", + category: -1, + id: 406, + checked: true, + title: "打勾推荐", + }, + ]; + + if (app.isNotEmptyCheck(res0.data)) { + for (var i = 0; i < res0.data.length; i++) { + res0.data[i]["title"] = res0.data[i].name; + // that.data.tabs2.push(res0.data[i]); + } + + console.log("获取缓存"); // res0.data.unshift(); + // console.log(res.data.unshift({name: "打勾推荐", category: 3, id: 406, checked: true, title: "打勾推荐"})); + } else { + console.log("无感兴趣职位 push两个职位 ↓↓↓"); + console.log(that.data.labelItems); + that.data.labelItems.forEach((item) => { + if (item.name == "理货员" || item.name == "餐饮服务员") { + // that.data.tabs2.push(item); + } + }); // that.data.tabs2.push(that.data.labelItems[0], that.data.labelItems[1]) + } + + that.setData({ + tabs2: that.data.tabs2, + }); + + let res = wx.getStorageSync("sex"); //性别 + if (app.isNotEmptyCheck(res.data)) { + that.data.storeJobListSearchForm.sex = res.data; + that.data.storeJobListSearchForm.pageNum = 1; + } else { + // res.data = []; + } + let res2 = wx.getStorageSync("checkedJobItems"); //筛选职位 + let workTypeStrCurr = ""; + if (app.isNotEmptyCheck(res2.data)) { + res2.data.forEach((item, index) => { + workTypeStrCurr += item.value + ","; + }); + + if (workTypeStrCurr.length > 0) { + workTypeStrCurr = workTypeStrCurr.substr(0, workTypeStrCurr.length - 1); + } + + that.data.storeJobListSearchForm.workTypeStr = workTypeStrCurr; + that.data.storeJobListSearchForm.pageNum = 1; + } else { + that.data.storeJobListSearchForm.workTypeStr = ""; + that.data.storeJobListSearchForm.pageNum = 1; + } + + console.log(res.data + "===" + res2.data); + + if (res.data == -1 && (res2.data == null || res2.data == "")) { + that.setData({ + chooseActive: false, + }); + } else { + that.setData({ + chooseActive: true, + }); + } + + // this.getJobList(); + }, + + getJobList () { + var that = this; + // debugger + that.setData({ + pageShow: false, + }); + 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; + console.log(that.data.storeJobListSearchForm.cityName) + + if (app.isEmptyCheck(that.data.searchCityParamStorage.name) || that.data.storeJobListSearchForm.cityName == '全国') { + that.data.storeJobListSearchForm.cityName = ""; + } + that.data.storeJobListSearchForm.keys = that.data.inputVal == "搜索职位" ? "" : that.data.inputVal; + that.data.storeJobListSearchForm.recruitment = 1 + that.data.storeJobListSearchForm.jobSpecialLabelIds = + that.data.storeJobListSearchForm.jobSpecialLabelIds != "" + ? that.data.storeJobListSearchForm.jobSpecialLabelIds + ",608" + : that.data.storeJobListSearchForm.jobSpecialLabelIds + "608"; + // debugger; + 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.pageBean.pageCount, + currPage: res.data.data.pageBean.currentPage, + }); + + 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.pageBean.recordList); + that.data.recordList = that.data.recordList.concat(jobListTemp); + + 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(); + that.getTag(); + + 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"] = ""; + } + // 简版弹窗通告显示 + if (item.id == that.data.currentJobDrawer.id) { + item["jobDesp"] = item.jobDesp.replace(/\*\*\*\*\*/g, "").split("————————")[0]; + // 展示用字段 + item["jobDesp1"] = item.jobDesp.replace("⚠", ""); + item["jobDesp1"] = item.jobDesp1.replace("[红包]", ""); + that.data.currentJobDrawer = { + ...item, + index: that.data.currentJobDrawer.index ? that.data.currentJobDrawer.index : null, + }; + } + }); + 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, + // }); + // } + }, + }); + }); + }, + + onScrollRefresh () { + this.data.recordList = []; + this.data.storeJobListSearchForm.pageNum = 1; + this.getJobList(); + }, + + getTag () { + let that = this; + let query = that.createSelectorQuery(); + query + .selectAll(".tttg") + .boundingClientRect() + .exec(function (res) { + res.forEach((item) => { + item.forEach((element, index) => { + if (element.width > 200) { + // that.data.recordList[index].isTagShow = true; + var age = "recordList[" + index + "].isTagShow"; + that.setData({ + [age]: true, + }); + } + }); + }); + // if(){ + + // } + // console.log(res); + }); + }, + + // 下拉加载更多 + onScrollToLower () { + console.log("===================================================="); + var that = this; + // if (app.globalData.isLogin) { + that.data.storeJobListSearchForm.pageNum = that.data.storeJobListSearchForm.pageNum + 1; + if (that.data.hasMoreData) { + that.getJobList(); + } + + this.setData({ + loadMore: "load", + }); + // } else { + + // } + + that.data.pullNum = that.data.pullNum + 1; + }, + + handleTabClick (e) { + var that = this; + var index = e.detail.index; + console.log(e.detail.index); + let categoryCurr = that.data.tabs2[index].category; // that.data.tabs2.forEach((item,index2) => { + // if (index == index2) { + // categoryCurr = item.category + // } + // if( index == 0){ + // categoryCurr = -1 + // } + // }) + + this.setData({ + // [tabsName]: index, + contentIndex: index, + }); + console.log(categoryCurr); + that.data.storeJobListSearchForm.jobClassify = categoryCurr; + that.data.storeJobListSearchForm.pageNum = 1; + that.setData({ + recordList: [], + }); + that.getJobList(); + }, + /** + * 标准详情 + * + * + */ + goDetail (e) { + console.log(e); + var that = this; + if (this.data.isLogin) { + wx.navigateTo({ + url: "../detail/index?storeJobId=" + e.currentTarget.dataset.id + "&wxCode=" + that.data.wxCode, + }); + } else { + wx.navigateTo({ + url: "../login/index", + }); + } + + }, + /** + * 简版抽屉 + * + * + */ + goDrawer (event) { + let that = this; + + console.log(event.currentTarget.dataset.item); + event.currentTarget.dataset.item["jobDesp"] = event.currentTarget.dataset.item.jobDesp.replace(/\*\*\*\*\*/g, "").split("————————")[0]; + // 展示用字段 + event.currentTarget.dataset.item["jobDesp1"] = event.currentTarget.dataset.item.jobDesp.replace("⚠", ""); + event.currentTarget.dataset.item["jobDesp1"] = event.currentTarget.dataset.item.jobDesp1.replace("[红包]", ""); + + // wx.hideTabBar({ + // success(e) { + this.getTabBar().setData({ + isShow: false, + }); + that.setData({ + currentJobDrawer: { + ...event.currentTarget.dataset.item, + index: event.currentTarget.dataset.index, + }, + drawerShow: true, + }); + // }, + // }); + + console.log(this.data.currentJobDrawer); + }, + copyClose () { + var that = this; + var contentInfo; + const query = wx.createSelectorQuery().in(this); + query + .select(".contactInfo") + .boundingClientRect(function (res) { + contentInfo = res.dataset.info; + var text = that.data.currentJobDrawer.jobDesp + contentInfo; + wx.setClipboardData({ + data: text, + success (res) { + wx.getClipboardData({ + success (res) { + console.log(res.data); // data + wx.showToast({ + title: "内容已复制", + icon: "none", + duration: 1500, + }); + }, + }); + }, + }); + }) + .exec(); + }, + // showDrawer() { + // this.setData({ + // }); + // }, + hideDrawer () { + let that = this; + this.getTabBar().setData({ + isShow: true, + }); + that.setData({ + drawerShow: false, + }); + // this.getJobList(); + // setTimeout(() => { + // wx.showTabBar({ + // success(e) {}, + // }); + // }, 300); + }, + goEnroll (e) { + console.log(e); + // wx.navigateTo({ + // url: "../newEnroll/index?applyType=0" + // }); + var that = this; + + wx.removeStorageSync("townsManInfo"); + wx.removeStorageSync("townsManInfoJob"); + wx.removeStorageSync("storeInfoJob"); + + // if(app.isNotEmptyCheck(wx.getStorage('townsManInfo'))){ + // wx.removeStorageSync('townsManInfo') + // } + // if(app.isNotEmptyCheck(wx.getStorage('townsManInfoJob'))){ + // wx.removeStorageSync('townsManInfoJob') + // } + // if(app.isNotEmptyCheck(wx.getStorage('storeInfoJob'))){ + // wx.removeStorageSync('storeInfoJob') + // } + // wx.removeStorageSync('townsManInfoJob') + console.log(app.globalData.loginUserInfo.tel); + wx.setStorageSync("jobDetailStorage", that.data.recordList[e.currentTarget.dataset.idx]); + let argument; + argument = JSON.stringify(e.currentTarget.dataset.info).replace(/\=|\&/g, "3D"); + wx.navigateTo({ + url: `../newEnroll/enroll/index?applyType=1&info=${argument}`, + }); + }, + wxLogin () { + var that = this; + wx.login({ + success (res) { + if (res.code) { + that.setData({ + wxCode: res.code, + }); + } else { + console.log("获取code失败!" + res.errMsg); + } + }, + }); + }, + changeRecordBillType (e) { + let that = this; + console.log(e); + that.setData({ + recordBillType: e.currentTarget.dataset.type, + }); + }, + toSmart () { + wx.navigateTo({ + url: "/pages/IDCardWithNFC/index", + }); + }, + getPhoneNumber (e) { + var that = this; + console.log(e); + console.log(e.detail.errMsg); + /*wx.setStorageSync({ + key: "jobDetailStorage", + data: that.data.recordList[e.currentTarget.dataset.idx] + });*/ + + wx.setStorageSync("jobDetailStorage", that.data.recordList[e.currentTarget.dataset.idx]); + + // console.log(e); + // console.log(e.detail.errMsg) + // console.log(e.detail.iv) + // console.log(e.detail.encryptedData) + if ("getPhoneNumber:ok" == e.detail.errMsg) { + //同意 + var iv = e.detail.iv; + var encryptedData = e.detail.encryptedData; + console.log(iv, "=-=========", encryptedData); + wx.checkSession({ + success () { + //session_key 未过期,并且在本生命周期一直有效 + wx.request({ + url: app.globalData.ip + "/getWechatTel", + data: { + code: that.data.wxCode, + iv: iv, + encryptedData: encryptedData, + type: "yishoudan", + appId: app.globalData.appId + }, + success: function (res) { + console.log(res); + app.globalData.openId = res.data.data.openId; + let promise = app.setLoginUserTokenInfo(res.data.data.phoneNumber, null); + var collected = e.currentTarget.dataset.collected; + + console.log(wx.getStorage("loginUserTokenInfo")) + console.log(collected) + promise.then((res) => { + that.setData({ + isLogin: app.globalData.isLogin, + }); + // debugger + setTimeout(() => { + that.doCollected(collected, e.currentTarget.dataset.jobid); + }, 1000) + // that.collectedStoreJobList(); + }); + }, + fail: function (res) { + console.log("获取用户手机号错误"); + }, + }); + }, + fail () { + // session_key 已经失效,需要重新执行登录流程 + wx.login({ + success (res) { + if (res.code) { + console.log(res.code); + //发起网络请求 + wx.request({ + url: app.globalData.ip + "/getWechatTel", + data: { + code: res.code, + iv: iv, + encryptedData: encryptedData, + type: "yishoudan", + appId: app.globalData.appId + }, + success: function (res) { + console.log(res); + let promise = app.setLoginUserTokenInfo(res.data.data.pageBean.phoneNumber, null); + var collected = e.currentTarget.dataset.collected; + if (collected) { + promise.then((res) => { + that.setData({ + isLogin: app.globalData.isLogin, + }); + that.doCollected(collected, e.currentTarget.dataset.jobid); + }); + } else { + promise.then((res) => { + wx.navigateTo({ + url: "../enroll/index?applyType=1", + //url: "../enroll/index?applyType=1&tel=" + res.data.data.pageBean.phoneNumber + }); + }); + } + }, + fail: function (res) { + console.log("获取用户手机号错误"); + }, + }); + } else { + console.log("获取手机号失败!" + res.errMsg); + } + }, + }); + }, + }); + } else { + //拒绝 + var collected = e.currentTarget.dataset.collected; + if (collected) { + try { + wx.setStorageSync("comeFromPage", "index"); + } catch (e) { + console.log("index-页面跳转,设置参数错误:", e); + } + wx.navigateTo({ + url: "/pages/login/index", + }); + } else { + wx.navigateTo({ + url: "../enroll/index?applyType=1", + }); + } + } + return false; + }, + getPhoneNumber1 (e) { + var that = this; + console.log(e); + console.log(e.detail.errMsg); + + that.close(); + // console.log(e); + // console.log(e.detail.errMsg) + // console.log(e.detail.iv) + // console.log(e.detail.encryptedData) + + if ("getPhoneNumber:ok" == e.detail.errMsg) { + //同意 + var iv = e.detail.iv; + var encryptedData = e.detail.encryptedData; + wx.checkSession({ + success () { + //session_key 未过期,并且在本生命周期一直有效 + wx.request({ + url: app.globalData.ip + "/getWechatTel", + data: { + code: that.data.wxCode, + iv: iv, + encryptedData: encryptedData, + type: "yishoudan", + appId: app.globalData.appId + }, + success: function (res) { + console.log(res); + let promise = app.setLoginUserTokenInfo(res.data.data.pageBean.phoneNumber, null); + promise.then((res) => { + that.setData({ + isLogin: app.globalData.isLogin, + }); + that.onScrollToLower(); + }); + }, + fail: function (res) { + console.log("获取用户手机号错误"); + }, + }); + }, + fail () { + // session_key 已经失效,需要重新执行登录流程 + wx.login({ + success (res) { + if (res.code) { + console.log(res.code); + //发起网络请求 + wx.request({ + url: app.globalData.ip + "/getWechatTel", + data: { + code: res.code, + iv: iv, + encryptedData: encryptedData, + type: "yishoudan", + appId: app.globalData.appId + }, + success: function (res) { + console.log(res); + let promise = app.setLoginUserTokenInfo(res.data.data.pageBean.phoneNumber, null); + promise.then((res) => { + that.setData({ + isLogin: app.globalData.isLogin, + }); + }); + }, + fail: function (res) { + console.log("获取用户手机号错误"); + }, + }); + } else { + console.log("获取手机号失败!" + res.errMsg); + } + }, + }); + }, + }); + } else { + //拒绝 + if (e.currentTarget.dataset.type != "close") { + try { + wx.setStorageSync("comeFromPage", "index"); + } catch (e) { + console.log("index-页面跳转,设置参数错误:", e); + } + + wx.navigateTo({ + url: "/pages/login/index", + }); + } else { + that.close(); + } + } + return false; + }, + getAgencyUserId (id) { + var that = this; + wx.request({ + url: app.globalData.ip + "/channel/contact/getAgencyUserId", + method: "GET", + header: app.globalData.header, + data: { + channelContactId: id, + }, + success: function (res) { + console.log("获取来源对应的代理人,来源ID:", id); + console.log(res); + try { + if (app.isNotEmptyCheck(res.data.data.pageBean)) { + wx.setStorageSync("storageSyncAgencyUserId", res.data.data.pageBean); + } + //先设置代理人缓存人再登录 + app.getLoginUserTokenInfo(); + } catch (e) { + console.log("0-扫描微信二维码,设置参数错误:", e); + //先设置代理人缓存人再登录 + app.getLoginUserTokenInfo(); + } + }, + fail: function (res0) { + console.log("获取来源对应的代理人错误", id); + }, + }); + }, + 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; + let type = e.currentTarget.dataset.type; + var collected = e.currentTarget.dataset.collected; + var storeJobId = e.currentTarget.dataset.jobid; + let idx = e.currentTarget.dataset.idx; + console.log(type); + wx.getUserProfile({ + desc: "用于完善会员资料", // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写 + success: (res) => { + console.log(res); + //发起网络请求 + wx.request({ + url: app.globalData.ip + "/updateUserWechatInfo", + data: { + nickName: res.userInfo.nickName, + avatarUrl: res.userInfo.avatarUrl, + gender: res.userInfo.gender, + country: res.userInfo.country, + province: res.userInfo.province, + city: res.userInfo.city, + }, + method: "POST", + header: app.globalData.headers, + success: function (res) { + console.log(res); + app.globalData.hasUserInfo = 1; + that.setData({ + hasUserInfo: 1, + }); + that.doMenuClick(type, collected, storeJobId, idx); + }, + fail: function (res) { + that.doMenuClick(type, collected, storeJobId, idx); + }, + }); + }, + fail: (res) => { + console.log(res); + that.doMenuClick(type, collected, storeJobId, idx); + }, + }); + }, + doMenuClick: function (_type, _collected, _storeJobId, _idx) { + let that = this; + if (_type - 1 == 0) { + //点击全国 + that.goCity(); + } else if (_type - 2 == 0) { + //搜索 + } else if (_type - 3 == 0) { + //筛选 + that.goScreen(); + } else if (_type - 4 == 0) { + //收藏 + that.doCollected(_collected, _storeJobId); + } else if (_type - 5 == 0) { + //报名 + wx.setStorageSync("jobDetailStorage", that.data.recordList[_idx]); + wx.navigateTo({ + url: "../enroll/index?applyType=1&tel=" + app.globalData.loginUserInfo.tel, + }); + } + }, + changSign (e) { + let that = this; + console.log(e); + that.data.storeJobListSearchForm.pageNum = 1; + if (e.target.dataset.type == 0 && that.data.signType != 0) { + that.data.storeJobListSearchForm.signType = ""; + that.setData({ + signType: e.target.dataset.type, + recordList: [], + storeJobListSearchForm: that.data.storeJobListSearchForm, + }); + that.getJobList(); + } else if (e.target.dataset.type == 1 && that.data.signType != 1) { + that.data.storeJobListSearchForm.signType = 1; + that.setData({ + signType: e.target.dataset.type, + recordList: [], + storeJobListSearchForm: that.data.storeJobListSearchForm, + }); + that.getJobList(); + } else if (e.target.dataset.type == 2 && that.data.signType != 2) { + that.data.storeJobListSearchForm.signType = 2; + that.setData({ + signType: e.target.dataset.type, + recordList: [], + storeJobListSearchForm: that.data.storeJobListSearchForm, + }); + that.getJobList(); + } + }, + /** + * 收藏的切换 + * + * + */ + collectChange (e) { + let that = this; + 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.ujc = e.currentTarget.dataset.id; + that.data.storeJobListSearchForm.pageNum = 1; + that.setData({ + choiceCollect: that.data.choiceCollect, + storeJobListSearchForm: that.data.storeJobListSearchForm, + recordList: [], + hasMoreData: false, + }); + that.getJobList(); + } + } else { + that.setData({ + recordList: [], + hasMoreData: false, + choiceCollect: 1, + }); + // } + } + }, + choiceFilter (e) { + var that = this; + // let str = that.data.activez + let str = e.currentTarget.dataset.id; + if (str == "all") { + that.data.storeJobListSearchForm.sortTag = 0; + that.setData({ + firstMenu: "排序", + // storeJobListSearchForm: that.data.storeJobListSearchForm, + recordList: [], + }); + that.getJobList().then(() => { + that.setData({ + siv: "menu", + }); + }); + } else if (str == "zuijin") { + //距离最近 + if (that.data.storeJobListSearchForm.lng && that.data.storeJobListSearchForm.lat) { + that.data.storeJobListSearchForm.sortTag = 2; + that.setData({ + firstMenu: "距离", + // storeJobListSearchForm: tha t.data.storeJobListSearchForm, + recordList: [], + }); + that.getJobList().then(() => { + that.setData({ + siv: "menu", + }); + }); + } else { + wx.getLocation({ + type: "gcj02", + success (res1) { + console.log("获取位置1"); + app.globalData.lng = res1.longitude; + app.globalData.lat = res1.latitude; + that.data.storeJobListSearchForm.lng = res1.longitude; + that.data.storeJobListSearchForm.lat = res1.latitude; + that.data.storeJobListSearchForm.sortTag = 2; + that.data.storeJobListSearchForm.pageNum = 1; + that.setData({ + firstMenu: "距离", + storeJobListSearchForm: that.data.storeJobListSearchForm, + recordList: [], + }); + that.getJobList().then(() => { + that.setData({ + siv: "menu", + }); + }); + // var promise = new Promise(function(resolve,reject){ + // that.getJobList(); + // }); + }, + fail () { + console.log("获取位置失败,打开位置设置界面"); + // wx.openSetting({ + // success(res) { + // console.log(res.authSetting); + // if (res.authSetting["scope.userLocation"]) { + // wx.getLocation({ + // type: "gcj02", + // success(res1) { + // console.log("获取位置2"); + // console.log(res1); + // app.globalData.lng = res1.longitude; + // app.globalData.lat = res1.latitude; + + // that.data.storeJobListSearchForm.sortTag = 2; + // that.data.storeJobListSearchForm.lng = res1.longitude; + // that.data.storeJobListSearchForm.lat = res1.latitude; + // that.data.storeJobListSearchForm.pageNum = 1; + // that.setData({ + // storeJobListSearchForm: that.data.storeJobListSearchForm, + // recordList: [], + // }); + // that.getJobList().then(() => { + // that.setData({ + // siv: "menu", + // }); + // }); + // }, + // fail() {}, + // }); + // } + // }, + // }); + }, + }); + } + } else if (str == "zuigao") { + //工价最高 + that.data.storeJobListSearchForm.sortTag = 1; + that.data.storeJobListSearchForm.pageNum = 1; + that.setData({ + storeJobListSearchForm: that.data.storeJobListSearchForm, + firstMenu: "排序", + recordList: [], + }); + that.getJobList().then(() => { + that.setData({ + siv: "menu", + }); + }); + } + that.setData({ + activez: str, + }); + that.setData({ + whichOneShow: "", + siv: "", + }); + // setTimeout(() => { + // that.setData({ + // whichOneShow: "", + // }); + // console.log(this.data.whichOneShow); + // console.log("112233"); + // }, 1); + }, + /** + * 清除所有的筛选项 + * + * + */ + clearFilter () { + let that = this; + that.data.jobSpecialLabelList.forEach((item) => { + // console.log(item); + if (item.checked) { + item.checked = false; + } + }); + that.data.brandList.forEach((item) => { + if (item.checked) { + item.checked = false; + } + }); + that.data.storeJobListSearchForm.jobSpecialLabelIds = ""; + // that.data.storeJobListSearchForm.ujc = + // that.data.storeJobListSearchForm.brandIds = ""; + that.data.storeJobListSearchForm.jobCategoryLabelIds = ""; + that.data.storeJobListSearchForm.pageNum = 1; + that.setData({ + jobSpecialLabelList: that.data.jobSpecialLabelList, + tagArray0: that.data.tagArray0, + tagArray1: that.data.tagArray1, + tagArray2: that.data.tagArray2, + tagArray3: that.data.tagArray3, + brandList: that.data.brandList, + selectJobList: [], + selectBrandList: [], + recordList: [], + whichOneShow: "", + firstMenu: "排序", + secondMenu: "不限", + sexid: -1, + activez: "zuigao", + }); + // that.choiceFilter({ + // currentTarget: { + // dataset: { + // id: "all", + // }, + // }, + // }); + // that.choiceSex({ + // currentTarget: { + // dataset: { + // id: "-1", + // }, + // }, + // }); + that.getJobList(); + }, + scroll (e) { + return false; + }, + stoptap (e) { + return false; + }, + changeContact () { + console.log(2123); + wx.navigateTo({ + url: `/pages/configAnnunciate/index`, + }); + }, + /** + * 简版报名 + * + * + */ + recordBill (e) { + console.log(e.currentTarget.dataset.job); + + console.log(this.data.recordShow); + wx.hideTabBar({ + animation: false, + success: (result) => { + this.setData({ + recordShow: true, + currentInfo: e.currentTarget.dataset.job, + }) + }, + 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}`, + // }); + }, + imageLoad () { + this.setData({ + isLoading: false, + }); + }, + closeDialog () { + this.setData({ + iosDialog: false, + }); + }, + showLeft () { + this.setData({ + leftShow: true, + }); + }, + hideLeft () { + this.setData({ + leftShow: false, + whichOneShow: "", + }); + console.log(this.data.innerFilter); + if (!this.data.innerFilter) { + this.setData({ + filterData: JSON.parse(JSON.stringify(this.data.copyList)), + }); + } + }, + /** + * 阻止滑动穿透 + * + * + */ + modalMove () { + console.log("123") + return false; + }, + /** + * 获取搜索轮播的关键字索引 + * + * + */ + getSwiperIndex (e) { + // console.dir(e); + if (e.detail.current) { + this.setData({ + placeholderText: this.data.swiperTextList[e.detail.current], + }); + // console.log(this.data.swiperTextList[e.detail.current]); + // console.log(this.data.placeholderText); + } + }, + onPageScroll (e) { }, + drawerTouchStart (event) { + this.handletouchtart(event); + }, + drawerTouchMove (event) { + let tx = this.handletouchmove(event); + console.log(tx); + if (tx.ty > 100) { + this.hideDrawer(); + } + }, + filterTouchMove (event) { + let tx = this.handletouchmove(event); + if (tx.tx < -100) { + this.setData({ + leftShow: false, + }); + } + }, + filterTouchStart (event) { + this.handletouchtart(event); + }, + listTouchMove (event) { + if (event.detail.scrollTop - this.data.listPosition > 15 && this.data.halfHide == false) { + this.setData({ + halfHide: true, + }); + } else if (event.detail.scrollTop - this.data.listPosition < -15 && this.data.halfHide == true) { + this.setData({ + halfHide: false, + }); + } + if (event.detail.scrollTop > 200) { + // wx.setTabBarItem({ + // index: 0, + // text: "回顶部", + // iconPath: "/assets/images/ysd.png", + // selectedIconPath: "/assets/images/top.png", + // success: (e) => {}, + // fail(e) { + // console.log(e); + // }, + // }); + } else if (event.detail.scrollTop <= 200) { + // wx.setTabBarItem({ + // index: 0, + // text: "首页", + // iconPath: "/assets/images/ysd.png", + // selectedIconPath: "/assets/images/ysd1.png", + // success: (e) => {}, + // fail(e) { + // console.log(e); + // }, + // }); + } + // console.log(event); + }, + listTouchStart (event) { + this.data.listPosition = event.detail.scrollTop; + }, + + /** + * 页面滑动事件监听 + * + * + */ + handletouchmove: function (event) { + let that = this; + var currentX = event.touches[0].pageX; + var currentY = event.touches[0].pageY; + var tx = currentX - this.data.lastX; + var ty = currentY - this.data.lastY; + var text = ""; + //左右方向滑动 + if (Math.abs(tx) > Math.abs(ty)) { + return { + tx, + }; + } + //上下方向滑动 + else { + return { + ty, + }; + } + }, + // 触摸开始事件 + handletouchtart: function (event) { + this.data.lastX = event.touches[0].pageX; + this.data.lastY = event.touches[0].pageY; + }, + searchAnimate () { + let that = this; + wx.createSelectorQuery() + .select("#listBox") + .fields( + { + scrollOffset: true, + size: true, + }, + (res) => { + + this.animate( + ".navigatorBar", + [ + { + opacity: 0 + }, + { + opacity: 1 + }, + ], + 800, + { + scrollSource: "#listBox", + timeRange: 1000, + startScrollOffset: 0, + endScrollOffset: that.data.swiperHeight - 34, + } + ); + } + ) + .exec(); + }, + deleteMark (e) { + // console.log(e); + console.log(e); + let data = e.currentTarget.dataset.item; + let filter = this.data.filterData; + // if(e.currentTarget.dataset.item){ + // 判断是否是标签筛选项 + this.data.storeJobListSearchForm.pageNum = 1; + if (data.hasOwnProperty("typeClassify")) { + console.log(e); + this.data.selectJobList.forEach((item, index) => { + console.log(item); + if (item.id == data.id) { + this.data.selectJobList.splice(index, 1); + let ind = + filter.jobFilter["tagArray" + data.typeClassify].indexOf(item); + console.log(filter.jobFilter["tagArray" + data.typeClassify][ind]); + filter.jobFilter["tagArray" + data.typeClassify][ind].active = 0; + this.toList(); + } + }); + this.setData({ + selectJobList: this.data.selectJobList, + filterData: this.data.filterData, + }); + } else { + this.data.selectBrandList.forEach((item, index) => { + if (item.id == data.id) { + this.data.selectBrandList.splice(index, 1); + // let ind = filter.jobFilter["tagArray" + data.typeClassify].indexOf(item); + // console.log(filter.jobFilter["tagArray" + data.typeClassify][ind]); + // filter.jobFilter["tagArray" + data.typeClassify][ind].active = 0; + let ind = filter.classifyList.indexOf(item); + console.log(filter.classifyList[ind]); + filter.classifyList[ind].active = 0; + this.toList(); + } + }); + this.setData({ + selectBrandList: this.data.selectBrandList, + filterData: this.data.filterData, + }); + } + + // } + }, + + deleteAge (e) { + console.log(e); + let that = this; + that.data.storeJobListSearchForm.ageRangeStr = "16-60"; + that.data.storeJobListSearchForm.pageNum = 1; + this.setData({ + minAge: 16, + maxAge: 60, + rangeValues: [16, 60], + }); + this.toList(); + }, + + deletePaixu (e) { + console.log(e); + let that = this; + // let data = e.currentTarget.dataset.item; + this.data.storeJobListSearchForm.sortTag = 0; + that.data.storeJobListSearchForm.pageNum = 1; + this.setData({ + firstMenu: "工价", + activez: "zuigao", + }); + this.toList(); + }, + deleteSex () { + let filter = this.data.filterData; + this.data.storeJobListSearchForm.pageNum = 1; + this.data.filterData.sex.forEach((item, index) => { + item.active = 0; + if (index == 2) { + item.active = -1; + } + }); + this.data.smartObj.sex.forEach((item, index) => { + item.active = 0; + if (index == 2) { + item.active = -1; + } + }); + this.setData({ + filterData: this.data.filterData, + smartObj: this.data.smartObj, + }); + + this.toList(); + }, + // tabbar点击监听 + onTabItemTap (e) { + console.log(e); + let that = this; + that.setData({ + topNum: 1, + }); + }, + onHide () { + this.setData({ + whichOneShow: "", + // topNum: 1, + }); + }, + onUnload () { + console.log("destory"); + }, + goList () { + wx.navigateTo({ + url: "/pages/filterPage/index", + }); + }, + goMap () { + wx.getLocation({ + type: 'gcj02', //返回可以用于wx.openLocation的经纬度 + success (res) { + const latitude = 34.757034; + const longitude = 113.772587; + wx.openLocation({ + latitude, + longitude, + name: '郑州一才企业管理有限公司', + address: '河南省郑州市管城回族区心怡路与东站南街交叉口郑东升龙广场2号楼5楼', + scale: 18 + }) + } + }) + }, + makePhone (e) { + var that = this; + var tel = e.currentTarget.dataset.tel; + wx.makePhoneCall({ + // number: that.data.jobDetail.assistantUserTel + "" + phoneNumber: tel, + }); + }, + /** + * 范围选择年龄的回调 + */ + onRangeChange (e) { + let maxAge = Math.floor(e.detail.maxValue) + ""; + let minAge = Math.floor(e.detail.minValue) + ""; + console.log(maxAge, minAge); + this.setData({ + rangeValues: [minAge, maxAge], + maxAge, + minAge, + }); + }, + hidedrawershow (e) { + console.log(e); + this.setData({ + [e.detail.type]: false + }) + wx.showTabBar({ + animation: false, + success: (result) => { + + }, + fail: () => { }, + complete: () => { } + }); + }, +}); diff --git a/pages/hotList/index.json b/pages/hotList/index.json new file mode 100644 index 0000000..5864be7 --- /dev/null +++ b/pages/hotList/index.json @@ -0,0 +1,9 @@ +{ + "usingComponents": { + "bottom-drawer": "../../components/bottom-drawer/index" + }, + "navigationBarTitleText": "主推/热推", + "navigationBarBackgroundColor": "#0dcc91", + "navigationBarTextStyle": "white", + "backgroundColor": "#f5f5f5" +} \ No newline at end of file diff --git a/pages/hotList/index.wxml b/pages/hotList/index.wxml new file mode 100644 index 0000000..42d71b4 --- /dev/null +++ b/pages/hotList/index.wxml @@ -0,0 +1,435 @@ + + + + + + {{searchCityParamStorage.name == '' ? '全国' : searchCityParamStorage.shortName}} + + + + + + + + {{item}} + + + + + + 搜索 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{item.jobName || item.aliasName}} + 月薪 + {{item.salaryClassifyValue}} + + + + + {{(item.district && item.district != '-') ? item.district + ' | ' : ''}} + {{ item.distanceKm}} + {{item.age}} + + + {{item.monthlyPay}} + + + + + + {{item1}} + 暂无特色 + + + + 立即报名 + + + 立即报名 + + + + + + + + + + + + + 没有符合条件的职位 + + + 已经到底啦~ + 上滑加载更多 + + + + + 暂无记录 + + + + + + + + + + + + + + + + 1.性别(单选) + + {{item.name}} + + + + 2.分类 + + {{item.name}} + + + + 3.薪资福利 + + {{item.name}} + + + + 4.宿舍保障 + + {{item.name}} + + + + 5.班制休息 + + {{item.name}} + + + + 6.面试特色 + + {{item.name}} + + + + 7.其他特色 + + {{item.name}} + + + + + + + + + + diff --git a/pages/hotList/index.wxss b/pages/hotList/index.wxss new file mode 100644 index 0000000..2a2df16 --- /dev/null +++ b/pages/hotList/index.wxss @@ -0,0 +1,6 @@ +@import "../index/index.wxss"; + +.container { + + background-color: #f5f5f5; +} \ No newline at end of file diff --git a/pages/index/index.js b/pages/index/index.js index 3ba98d1..7df56f0 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: { + navList: [], currentInfo: {}, swiperHeight: 0, toped: "1", @@ -1157,7 +1158,7 @@ Page({ console.log(res); if (res.data.status == 200) { that.setData({ - bannerList: res.data.data.pageBean.banners, + bannerList: res.data.data.banners, }); } }, @@ -1198,7 +1199,7 @@ Page({ console.log(res); if (res.data.status == 200) { that.setData({ - navList: res.data.data.pageBean.channels, + navList: res.data.data.channels, }); } }, @@ -1460,6 +1461,21 @@ Page({ }, onShow () { let that = this; + + // that.setData({ + // navList:[{ + // id: 45, + // img: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/2024-03-14/77694bb5-34e7-4381-8f2c-f4cc1987cf3a_职教职培.png", + // path: "/subPage/vocationalList/index", + // remark: "职教职培", + // sortIdx: 1, + // status: 1, + // title: "职教职培" + // }] + // }) + that.getchannelList(); + // that.searchAnimate(); + that.data.storeJobListSearchForm.pageNum = 1; wx.setStorageSync("BILLFROM", "firstBill"); @@ -1586,8 +1602,10 @@ Page({ var reset = true;*/ that.getTemplateList(); that.searchAnimate(); + that.getBannerList(); }, + collectedStoreJobList () { var that = this; @@ -2948,15 +2966,25 @@ Page({ size: true, }, (res) => { - this.animate( - ".navigatorBar", + "#searchInputBox", [ { - opacity: 0 + // paddingTop: "10px", + // paddingBottom: "10px", + top: "10px", + width: "100%", + // height: "40px", + // backgroundColor: "#f5f5f5", }, { - opacity: 1 + // paddingTop: that.data.statusBarHeight + (that.data.navigationBarHeight - that.data.menuButtonHeight) / 2 + "px", + // paddingBottom: "30px", + top: "-48px", + width: "70%", + // height: "84px", + // backgroundColor: "#ff4400", + // paddingTop:'100px', }, ], 800, @@ -2964,7 +2992,63 @@ Page({ scrollSource: "#listBox", timeRange: 1000, startScrollOffset: 0, - endScrollOffset: that.data.swiperHeight - 34, + endScrollOffset: 60, + } + ); + this.animate( + ".the_city", + [ + { + color: "#333", + }, + { + color: "#fff", + }, + ], + 500, + { + scrollSource: "#listBox", + timeRange: 1000, + startScrollOffset: 0, + endScrollOffset: 90, + } + ); + // this.animate( + // "#navBox", + // [ + // { + // marginTop: "50px", + // // top: "0px", + // }, + // { + // marginTop: "50px", + // // top: "-272px", + // }, + // ], + // 2000, + // { + // scrollSource: "#listBox", + // timeRange: 2000, + // startScrollOffset: 50, + // endScrollOffset: 362, + // } + // ); + this.animate( + ".daotian", + [ + { + opacity: "1", + }, + { + opacity: "0", + }, + ], + 1000, + { + scrollSource: "#listBox", + timeRange: 1000, + startScrollOffset: 0, + endScrollOffset: 90, } ); } diff --git a/pages/index/index.json b/pages/index/index.json index 4ed1306..19a149c 100644 --- a/pages/index/index.json +++ b/pages/index/index.json @@ -3,8 +3,5 @@ "range-slider": "../../components/range/range-slider", "bottom-drawer": "../../components/bottom-drawer/index" }, - "navigationBarBackgroundColor": "#0dcc91", - "navigationBarTextStyle": "white", - "backgroundColor": "#FFFFFF", - "navigationBarTitleText": "一才工作" + "navigationStyle":"custom" } \ No newline at end of file diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 3a90fbb..27d5805 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -1,5 +1,5 @@ - + + + 一才工作 - + + + + {{searchCityParamStorage.name == '' ? '全国' : searchCityParamStorage.shortName}} + + + + + + + + {{item}} + + + + + + 搜索 + + + + + + + + + + + + + + + + + + {{item.title}} + + + + + - + diff --git a/pages/index/index.wxss b/pages/index/index.wxss index da1f2b9..cf85024 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -1400,7 +1400,8 @@ button.collect icon::before { } .bannerContainer { background-color: #f5f5f5; - padding-top: 10px; + padding-top: 10px; + margin-bottom: 12px; } .banner { width: calc(100vw - 20px); @@ -1421,20 +1422,6 @@ button.collect icon::before { overflow: hidden; background-color: #f5f5f5; } -.navList { - width: calc(100vw - 20px); - /* height: 97px; */ - display: flex; - flex-wrap: wrap; - justify-content: start; - align-items: center; - text-align: center; - padding-top: 12px; - margin: 0 10px; - margin-top: 10px; - border-radius: 8px; - background-color: #fff; -} .navSub { width: 20%; margin-bottom: 12px; @@ -1450,3 +1437,61 @@ button.collect icon::before { /* z-index: -1; */ /* visibility: ; */ } +.navListContainer { + overflow: hidden; + background-color: #f5f5f5; +} +.navList { + width: calc(100vw - 20px); + /* height: 97px; */ + display: flex; + flex-wrap: wrap; + justify-content: start; + align-items: center; + text-align: center; + /* padding-top: 12px; */ + margin: 0 10px; + margin-top: 4px; + border-radius: 8px; + background-color: #fff; +} +.navSub { + width: 20%; + display: flex; + flex-direction: column; + align-items: center; + margin-bottom: 12px; + margin-top: 12px; +} +.navSub image { + width: 44px; + height: 44px; +} +.navigatorBar { + position: relative; + z-index: 0; + background-color: #0dcc91; +} +.navigatorBar .tabs { + position: relative; + /* background-color: #0dcc91; */ + left: 50%; + color: #fff; + transform: translateX(-50%); + justify-content: center; + box-sizing: border-box; +} + +.navigatorBar .tabs > view { + flex: 1; + line-height: 26px; + width: 56px; + color: #666; + text-align: center; +} +.navigatorBar .tabs .active { + height: 26px; + background-color: #ff4400; + color: #fff; + border-radius: 6px; +} \ No newline at end of file diff --git a/pages/jobListSearch/index.wxml b/pages/jobListSearch/index.wxml index 4b0c359..89911db 100644 --- a/pages/jobListSearch/index.wxml +++ b/pages/jobListSearch/index.wxml @@ -1,8 +1,8 @@ - - + + 搜索 diff --git a/pages/jobListSearch/index.wxss b/pages/jobListSearch/index.wxss index 615c60f..33747ae 100644 --- a/pages/jobListSearch/index.wxss +++ b/pages/jobListSearch/index.wxss @@ -31,8 +31,9 @@ page { background-color: #ff4400; } .weui-search-bar .icon-qingchu { - position: absolute !important; - z-index: 9999999; + /* position: absolute !important; */ + z-index: 9999999; + margin-right: 12px; } .weui-search-bar .icon-qingchu::after { z-index: 9999; @@ -115,4 +116,8 @@ page { line-height: 44px; margin-bottom: 40px; margin-top: 20rpx; +} +.container { + + background-color: #fff } \ No newline at end of file diff --git a/pages/message/index.js b/pages/message/index.js index 23c7f05..47972f7 100644 --- a/pages/message/index.js +++ b/pages/message/index.js @@ -11,7 +11,8 @@ Page({ iosDialog: false, isLoading: true, messageClick: false, - infoList: [], + infoList: [], + agencyId: app.globalData.user.agencyId }, /** @@ -33,6 +34,7 @@ Page({ * 生命周期函数--监听页面显示 */ onShow() { + console.log(this.data.agencyId) // let serviceInfo = wx.getStorageSync('ServiceInfo') this.getInfoList(); console.log('messageTab'+typeof this.getTabBar); @@ -107,8 +109,8 @@ Page({ getInfoList() { let that = this; wx.request({ - url: app.globalData.ip + "/bocai/cms/list", - data: { pageSize: 100, pageNum: 1, keys: "" }, + url: app.globalData.ip + "/yicai/bocai/cms/list", + data: { pageSize: 100, pageNum: 1, keys: "",agencyId:2743,status:10 }, header: app.globalData.headers, method: "post", success: function (res) { diff --git a/project.private.config.json b/project.private.config.json index 3fae5d0..f0f8639 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -1,7 +1,7 @@ { "setting": { "compileHotReLoad": true, - "urlCheck": true + "urlCheck": false }, "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", "projectname": "dandelionPlatform", @@ -200,5 +200,5 @@ ] } }, - "libVersion": "3.0.0" + "libVersion": "2.33.0" } \ No newline at end of file