diff --git a/app.wxss b/app.wxss index 543ef2e..0c08899 100644 --- a/app.wxss +++ b/app.wxss @@ -11,6 +11,11 @@ page { --color-f40: #ff4400; --color-027: #ff4400; } +.overText{ + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} ::-webkit-scrollbar { display: none; width: 0; @@ -1554,7 +1559,7 @@ page { color: #fff; border-radius: 999px; } -.loginOut { +button.loginOut { width: 200px; height: 42px; opacity: 1; diff --git a/assets/iconfont-weapp/iconfont-weapp-icon.wxss b/assets/iconfont-weapp/iconfont-weapp-icon.wxss index d935954..73cf488 100644 --- a/assets/iconfont-weapp/iconfont-weapp-icon.wxss +++ b/assets/iconfont-weapp/iconfont-weapp-icon.wxss @@ -10,6 +10,10 @@ +.t-icon-paizhao5 { + background: url(data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3Csvg%20version%3D%221.1%22%20width%3D%27100%25%27%20height%3D%27100%25%27%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20id%3D%22t-icon-paizhao5%22%20viewBox%3D%220%200%201142%201024%22%3E%3Cpath%20d%3D%22M1010.361108%201020.396308c70.262154%200%20127.133538-56.871385%20127.133538-127.133539V291.064123c-3.347692-66.906585-56.879262-120.438154-127.133538-120.438154h-3.347693c66.914462%200%20123.785846%2053.531569%20127.133539%20120.442093v602.202584c0%2070.258215-56.875323%20127.1296-127.133539%20127.1296h3.347693z%20m27.557415-752.789662l0.468677%200.496246-0.630154-0.582892c-6.994708-6.266092-16.466708-9.909169-27.395938-9.909169h-163.934523l-127.1296-157.239139%20127.133538%20153.895385h3.347692l-130.48123-153.895385-0.003939-0.007877-0.685292-0.976738c-6.888369-9.275077-19.719877-12.402215-29.420308-12.402215h-230.845046c-13.382892%200-23.422031%206.691446-30.109538%2013.378953L294.407877%20257.614769H130.473354v-0.015754c-23.414154%200-40.1408%2016.730585-40.1408%2040.148677v595.511139c0%2023.422031%2016.726646%2040.148677%2040.1408%2040.148677h879.891692c23.024246%200%2039.581538-16.175262%2040.125046-38.982893l0.015754-1.157907c2.875077%2020.160985-11.594831%2037.840738-30.613661%2042.369969%2019.077908-4.525292%2033.957415-22.205046%2033.957415-42.369969V297.747692c0-23.414154-20.066462-43.484554-43.488492-43.484554h-3.347693c11.894154%200%2022.929723%205.175138%2030.905108%2013.33957z%20m0.468677%200.496246l0.106338%200.098462c7.546092%207.140431%2012.012308%2017.455262%2012.012308%2029.550277l-0.015754-1.110646c-0.291446-10.732308-4.777354-20.692677-11.831138-28.258462l-0.271754-0.279631zM399.844431%2012.7488l-1.378462%200.638031c-12.6976%205.947077-24.536615%2013.887015-34.800246%2024.052184l-0.370215%200.374154a141.571938%20141.571938%200%200%201%2036.548923-25.064369zM685.8752%200h-0.039385c40.148677%200%2073.605908%2016.726646%20100.371693%2046.836185l103.715446%20120.442092h120.438154c70.262154%200%20127.133538%2053.523692%20130.477292%20123.785846v602.202585c-3.347692%2070.258215-60.219077%20130.481231-130.477292%20130.48123H130.473354C60.2112%201023.744%200%20966.8608%200%20893.262769V297.747692c3.347692-70.258215%2060.219077-130.473354%20130.473354-130.473354H250.919385l103.715446-123.785846C377.210092%2017.687631%20409.115569%201.213046%20444.349046%200.063015a33.437538%2033.437538%200%200%201%200.606523-0.063015h240.888123l1.902277%200.015754-1.870769-0.015754z%22%20fill%3D%22%23333333%22%20%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M568.745354%20354.630892c116.413046%200%20212.984123%2092.585354%20214.106584%20212.007385l0.011816%202.107077c3.308308%20115.928615-91.746462%20212.176738-210.510769%20214.086892l-3.607631%200.031508c-120.438154%200-214.114462-93.676308-214.114462-214.1184%200-58.549169%2024.253046-112.0768%2063.145354-150.969108l0.535631-0.531692%200.929477-0.933416%200.208738-0.208738a209.5616%20209.5616%200%200%201%20121.245539-59.651938%20216.134892%20216.134892%200%200%201%2028.049723-1.81957z%20m0%2086.984862c-69.698954%200-126.227692%2055.973415-127.117785%20125.459692l-0.011815-1.673846c0%2070.262154%2056.871385%20127.133538%20127.133538%20127.133538%2069.698954%200%20126.223754-55.981292%20127.117785-125.46363l0.007877%201.673846c0-70.262154-56.871385-127.1296-127.1296-127.1296z%22%20fill%3D%22%230DCC91%22%20%3E%3C%2Fpath%3E%3C%2Fsvg%3E); +} + .t-icon-shoucang { background: url(data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3Csvg%20version%3D%221.1%22%20width%3D%27100%25%27%20height%3D%27100%25%27%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20id%3D%22t-icon-shoucang%22%20viewBox%3D%220%200%201048%201024%22%3E%3Cpath%20d%3D%22M365.539202%20463.229623c17.747946%208.876021%20106.495868%2057.687992%20106.495868%20221.867757%200%208.876021%200%2017.747946-8.876021%2026.623967-8.871925%208.876021-17.747946%2013.311983-26.623967%2013.311984a39.772111%2039.772111%200%200%201-39.93595-39.935951c0-115.371889-53.247934-146.431818-62.119859-150.867781-17.752042-8.876021-26.623967-31.064025-22.188005-48.811971%204.435962-8.876021%208.876021-17.747946%2022.188005-22.188005%208.871925-4.435962%2022.183908-4.435962%2031.059929%200z%22%20fill%3D%22%230DCC91%22%20%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M569.654917%2010.622185a87.900051%2087.900051%200%200%201%2048.811972%2048.811971l102.059905%20212.991736%20235.175645%2035.499988c39.93595%204.435962%2070.999976%2031.059929%2084.311959%2070.99588%2013.311983%2035.499988%204.435962%2079.871901-26.623967%20106.495868l-173.055785%20173.055785%2039.93595%20239.615703c4.435962%2039.93595-8.876021%2079.871901-44.376009%20102.059906-17.747946%2013.311983-39.93595%2017.747946-62.119859%2017.747946-17.752042%200-35.499988-4.435962-48.811971-13.311984l-204.115715-106.495868-204.119811%20110.931831c-35.495892%2017.752042-79.871901%2017.752042-110.931831-4.435963-31.059929-22.188004-48.811971-62.123955-44.371912-102.059905l39.93595-239.615703-173.055785-173.055786C1.679686%20458.793661-7.196335%20418.85771%206.115648%20378.92176c13.311983-35.499988%2044.371913-62.123955%2084.307864-70.99588l235.17974-35.499988%20102.059905-212.991736c13.311983-26.623967%2035.495892-44.371913%2062.119859-53.247934s57.687992-8.876021%2079.871901%204.435963z%20m-44.371913%2066.559917c-13.311983%200-26.623967%208.876021-31.059929%2017.752042l-115.371889%20226.303719c-4.435962%2013.311983-13.311983%2017.747946-26.623967%2022.183909l-252.927686%2035.499988c-13.311983%200-22.188004%208.876021-26.623967%2022.188004-4.435962%2013.311983%200%2026.623967%208.876021%2035.495892l186.367768%20186.367769c8.871925%208.876021%2013.311983%2017.752042%208.871925%2031.064026L232.419367%20911.4011c0%2013.311983%204.435962%2026.623967%2013.311984%2031.059929%208.876021%208.876021%2026.623967%208.876021%2039.93595%200l221.867757-119.807851h13.311984c4.435962%200%2013.311983%200%2017.747946%204.440058l221.867757%20119.807852c13.311983%204.435962%2026.623967%204.435962%2039.93595%200l0.716799-0.720896%201.433599-1.44179c8.073206-8.179702%2015.237101-16.670699%2011.161586-28.90134l-44.376009-257.363649c0-13.311983%200-22.188004%208.876021-31.059929l186.367769-186.367769c8.876021-8.876021%2013.311983-22.188004%208.876021-35.499988-4.440058-13.311983-13.311983-22.188004-26.623967-22.188005l-252.927687-39.93595c-13.311983%200-22.188004-8.871925-26.623967-17.747946l-0.368639-0.753663c-1.376254-1.212414-2.428925-2.445309-3.047421-3.686396-7.004151-15.540205-13.688815-30.330842-20.053991-44.371913l-87.465875-181.92771c-4.435962-13.311983-17.747946-17.752042-31.05993-17.752042zM4.45677%20414.503668l-0.016384%200.729087c-0.229376%2024.006626%209.523188%2046.731206%2027.78723%2065.232815l0.511999%200.516095a96.70644%2096.70644%200%200%201-28.282845-66.477997z%22%20fill%3D%22%23333333%22%20%3E%3C%2Fpath%3E%3C%2Fsvg%3E); } diff --git a/pages/collect/index.js b/pages/collect/index.js index 54f2a5c..c2d13c8 100644 --- a/pages/collect/index.js +++ b/pages/collect/index.js @@ -4,34 +4,7 @@ const commonUtil = require("../../utils/commonUtil.js"); Page({ data: { toped: "1", - chaShowed: false, - backHeight:wx.getMenuButtonBoundingClientRect().top + (wx.getMenuButtonBoundingClientRect().height/2) +'px', - 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: { pageNum: 1, pageSize: 20, @@ -49,1729 +22,50 @@ Page({ ucj: 1, }, 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: "", // 列表滚动的控制 - navList: [ - { - img: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/ztrt.png", - url: "/pages/hotList/index", - title: "主推/热推", - }, - // { img: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/dtld.png",url:'/pages/hotList/index', title: "职位云亮点" }, - // { img: "http://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/zjzp.png",url:'/pages/hotList/index', title: "职教职培" }, - { - img: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/cwdl.png", - url: "/pages/tobeAgency/index", - title: "成为代理", - }, - // { img: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/dzkf.png",url:'/pages/hotList/index', title: "定制开发" }, - { - img: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/xmhz.png", - url: "/pages/xiangmuhezuo/index", - title: "项目合作", - }, - { - img: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/xtxx.png", - url: "/pages/message/index", - title: "消息中心", - }, - { - img: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/lxwm.png", - url: "/pages/connectUs/index", - title: "联系我们", - }, - // { img: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/jqqd.png",url:'/pages/hotList/index', title: "敬请期待" }, - ], - bannerList: [], - /** - * 筛选的相关变量 - * - * - */ - filterData: { - yanba: [ - { - name: "无", - id: 1, - active: 0, - }, - { - name: "小面积", - id: 2, - active: 0, - }, - { - name: "大面积", - id: 3, - active: 0, - }, - ], - area: [ - { - 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, - }, - { - name: "鲁东南", - id: 6, - active: 0, - }, - { - name: "黑吉辽", - id: 7, - active: 0, - }, - { - name: "疆藏青", - id: 8, - active: 0, - }, - { - name: "渝湘赣", - id: 9, - active: 0, - }, - { - name: "陕甘宁", - id: 10, - active: 0, - }, - { - name: "云贵川", - id: 11, - active: 0, - }, - { - name: "港澳台", - id: 12, - active: 0, - }, - ], - price: [ - { - name: "3000-4000", - id: 1, - active: 0, - }, - { - name: "4000-5000", - id: 2, - active: 0, - }, - { - name: "5000-6000", - id: 3, - active: 0, - }, - { - name: "6000-7000", - id: 4, - active: 0, - }, - { - name: "7000-8000", - id: 5, - active: 0, - }, - { - name: "8000以上", - id: 6, - active: 0, - }, - ], - sex: [ - { - name: "男", - id: 1, - active: 0, - }, - { - name: "女", - id: 2, - active: 0, - }, - { - name: "男女不限", - id: -1, - active: -1, - }, - ], - jobFilter: { - tagArray0: [], - tagArray1: [], - tagArray2: [], - tagArray3: [], - tagArray4: [], - }, - classifyList: [], - }, - copyList: {}, - innerFilter: false, - }, - goBack(){ - wx.navigateBack({ - delta: -1, - }) - }, - // 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(); - }, - 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 + "/labels/getListByTypeAndIndustry", - data: { - type: 90, - industry: 2, - }, - header: app.globalData.header, - method: "GET", - success: function (res) { - console.log(res.data.data); - wx.setStorageSync("FILTER_LIST", res.data.data); - res.data.data.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.forEach((item) => { - item["checked"] = false; - jobSpecialLabelIdArray.forEach((item1) => { - if (item.id == item1) { - item["checked"] = true; - } - }); - }); - - that.setData({ - jobSpecialLabelList: res.data.data, - }); - }, - }); - }, - 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`, - }); - } - }, - getBrandNameAllList: function () { - var that = this; - wx.request({ - url: app.globalData.ip + "/labels/type/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; - if (brandIdArray) { - brandIdArray.forEach((item1) => { - if (item.id == item1) { - item["checked"] = true; - } - }); - } - }); - that.setData({ - brandList: res.data.data.labels, - }); - } - }, - }); - // wx.request({ - // url: app.globalData.ip + "/brand/getBrandNameAllList", // 品牌列表获取接口 - // data: {}, - // header: app.globalData.header, - // method: "GET", - // success: function (res) { - // console.log(res); - - // var brandIdArray = that.data.storeJobListSearchForm.brandIds.split(","); - - // res.data.data.forEach((item) => { - // item["checked"] = false; - // brandIdArray.forEach((item1) => { - // if (item.id == item1) { - // item["checked"] = true; - // } - // }); - // }); - // that.setData({ - // brandList: res.data.data, - // }); - // }, - // }); - }, - - 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); - 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(); - - 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")) { - this.data.filterData.classifyList = wx.getStorageSync("CLASSIFY_LIST"); - this.data.filterData.classifyList.forEach((item) => { - item.active = 0; - }); - let classifyList = "filterData.classifyList"; - this.setData({ - [classifyList]: this.data.filterData.classifyList, - }); - } - this.setData({ - copyList: JSON.parse(JSON.stringify(this.data.filterData)), - }); - // that.getJobList(); - that.getBannerList(); - that.getchannelList(); - that.searchAnimate(); - }, - onReady() { - let that = this; - - }, - /** - * 智能匹配结束 - * - * - * - */ - 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.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.images; - that.setData({ - templateList: res.data.data.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.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") { - filterData = middleList; - this.setData({ - selectJobList: [], - selectBrandList: [], - firstMenu: "排序", - secondMenu: "不限", - sexid: -1, - activez: "zuigao", - innerFilter: false, - }); - } else if (type == "innerclear") { - filterData = middleList; - this.setData({ - selectJobList: [], - selectBrandList: [], - firstMenu: "排序", - secondMenu: "不限", - sexid: -1, - activez: "zuigao", - innerFilter: false, - }); - } - console.log(filterData); - this.setData({ - filterData, - leftShow: false, - recordList: [], - whichOneShow: "", - scrollTo: "sticky", - }); - if (this.data.choiceCollect == 0) { - this.data.storeJobListSearchForm.ucj = 0; - } else { - this.data.storeJobListSearchForm.ucj = 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 }; - if (this.data.choiceCollect == 0) { - that.data.storeJobListSearchForm.ucj = 0; - } else { - that.data.storeJobListSearchForm.ucj = 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.setData({ - recordList: [], - }); - that.data.storeJobListSearchForm.pageNum = 1; - wx.setStorageSync("BILLFROM", "firstBill"); - - // 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: [], - }); - } - 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(); - }, - collectedStoreJobList() { - var that = this; - - wx.request({ - url: app.globalData.ip + "/store/job/collected/list?ucj=1", - method: "GET", - data: {}, - header: app.globalData.headers, - success: function (res) { - console.log(res); - let collectList = res.data.data.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, + inputVal: "搜索工作", + wxCode: "", + isCollect: false, + collectTxt: "收藏", + searchCityParamStorage: { + name: "", + shortName: "", + }, + + pageShow: false, + whichOneShow: "", + + }, + goBack(){ + wx.navigateBack({ + delta: -1, + }) + }, + onShow(){ + + var that = this; + + that.getJobList(); + }, + goDetail(e){ + console.log(e); + var that = this; + wx.navigateTo({ + url: "../detail/index?storeJobId=" + e.currentTarget.dataset.id + "&wxCode=" + that.data.wxCode, }); - } - - // this.getJobList(); - }, + + }, getJobList() { var that = this; - // debugger + // debugger + // that.setData({ + + // }) that.setData({ - pageShow: false, + pageShow: false, + recordList: [] }); return new Promise(function (resolve, reject) { if (that.data.storeJobListSearchForm.sortTag == 2) { @@ -1839,7 +133,6 @@ Page({ storeJobListSearchForm: that.data.storeJobListSearchForm, }); resolve(); - that.getTag(); that.data.recordList.forEach((item, index) => { // console.log(item); @@ -1848,17 +141,7 @@ Page({ } 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, @@ -1876,497 +159,8 @@ Page({ }, }); }); - }, - - 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; - if (collected) { - promise.then((res) => { - that.setData({ - isLogin: app.globalData.isLogin, - }); - that.doCollected(collected, e.currentTarget.dataset.jobid); - // that.collectedStoreJobList(); - }); - } else { - if (that.data.recordBillType == "photo" || that.data.recordBillType == "record") { - promise.then((res) => { - if (that.data.recordBillType == "photo") { - that.chooseIdCard(); - } else { - that.navigatorToRecord(); - } - }); - } else { - promise.then((res) => { - let argument; - argument = JSON.stringify(e.currentTarget.dataset.info).replace(/\=|\&/g, "3D"); - wx.navigateTo({ - url: `../newEnroll/enroll/index?applyType=1&info=${argument}`, - }); - }); - } - } - }, - 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.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.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.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.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)) { - wx.setStorageSync("storageSyncAgencyUserId", res.data.data); - } - //先设置代理人缓存人再登录 - app.getLoginUserTokenInfo(); - } catch (e) { - console.log("0-扫描微信二维码,设置参数错误:", e); - //先设置代理人缓存人再登录 - app.getLoginUserTokenInfo(); - } - }, - fail: function (res0) { - console.log("获取来源对应的代理人错误", id); - }, - }); - }, - collectPaste(e) { + }, + collectPaste(e) { var txt; var that = this; if (!this.data.isLogin) { @@ -2378,19 +172,6 @@ Page({ 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; @@ -2462,629 +243,4 @@ Page({ }, }); }, - 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.ucj = 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.ucj = - // 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) { - 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() { - 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( - "#searchInputBox", - [ - { - // paddingTop: "10px", - // paddingBottom: "10px", - top: "10px", - width: "100%", - // height: "40px", - // backgroundColor: "#f5f5f5", - }, - { - // 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, - { - scrollSource: "#listBox", - timeRange: 1000, - startScrollOffset: 0, - endScrollOffset: 60, - } - ); - this.animate( - "#searchInput", - [ - { - backgroundColor: '#fff' - }, - { - backgroundColor: '#f5f5f5' - }, - ], - 500, - { - scrollSource: "#listBox", - timeRange: 1000, - startScrollOffset: 0, - endScrollOffset: 90, - } - ); - this.animate( - "#sticky", - [ - { - marginTop: "50px", - // top: "0px", - }, - { - marginTop: "0px", - // 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, - } - ); - this.animate( - ".goback", - [ - { - opacity: "1", - fontSize:'24px' - }, - { - opacity: "0", - fontSize:'0' - }, - ], - 1000, - { - scrollSource: "#listBox", - timeRange: 1000, - startScrollOffset: 0, - endScrollOffset: 10, - } - ); - } - ) - .exec(); - }, - - // 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", - }); - }, }); diff --git a/pages/collect/index.wxml b/pages/collect/index.wxml index 272327e..c2ae58d 100644 --- a/pages/collect/index.wxml +++ b/pages/collect/index.wxml @@ -1,7 +1,7 @@ - + @@ -27,78 +27,8 @@ - - - - - - @@ -114,21 +44,13 @@ - - - - + @@ -190,76 +112,3 @@ - - - - - - - - - - 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/detail/index.js b/pages/detail/index.js index ede5260..5f169c5 100644 --- a/pages/detail/index.js +++ b/pages/detail/index.js @@ -61,8 +61,37 @@ Page({ shareDetailImg: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/posterbg1.1.png", posterImg: "", safeBottom:wx.getWindowInfo().screenHeight - wx.getWindowInfo().safeArea.height+'px', - swiperHeight:0 - }, + swiperHeight:0, + bottomLift:0, + showfixToast:false, + current:0, + }, + doNothing(){}, + closeFix(){ + this.setData({ + showfixToast:false + }) + }, + bindchange(e){ + console.log(e.detail.current) + this.setData({ + current:e.detail.current, + }) + }, + showFix(e){ + var that = this; + console.log(e.currentTarget.dataset.id); + var id = e.currentTarget.dataset.id; + var profiles = that.data.jobDetail.storeImage + var currentProfileIndex = (profiles|| []).findIndex((profile) => profile.id === id); + + console.log(currentProfileIndex ); + + this.setData({ + current:currentProfileIndex, + showfixToast:true + }) + }, showdialog() { this.setData({ iosDialog: true, @@ -76,9 +105,20 @@ Page({ onShow() { var that = this; - console.log(that.data.safeBottom); + wx.getSystemInfo({ + success: res => { + that.data.bottomLift = res.screenHeight - res.safeArea.bottom + 60; + }, + fail(err) { + console.log(err); + } + }) + + + console.log(that.data.bottomLift); this.setData({ + bottomLift:that.data.bottomLift, isLogin: app.globalData.isLogin, // backHeight:wx.getMenuButtonBoundingClientRect().top, isLoading: true, diff --git a/pages/detail/index.wxml b/pages/detail/index.wxml index b5b2202..6741657 100644 --- a/pages/detail/index.wxml +++ b/pages/detail/index.wxml @@ -1,18 +1,37 @@ + + + {{current+1}}/{{jobDetail.storeImage.length}} + + + + + + + + + + + + + + + {{jobDetail.storeJob.jobName}} - + - + - + - @@ -429,31 +448,30 @@ - + 该职位暂时停招 - + 电话 - + 微信 - - - + + - - + + diff --git a/pages/detail/index.wxss b/pages/detail/index.wxss index 1d6e5e7..245dcd8 100644 --- a/pages/detail/index.wxss +++ b/pages/detail/index.wxss @@ -56,10 +56,6 @@ page, justify-content: start; } -.bottomBtn > view > view:nth-child(3) button { - font-weight: 100; - /* width: 45px; */ -} .servicePrice { border: 1rpx solid var(--color-ysd); background-color: #ffeee7; @@ -189,7 +185,8 @@ button::after { flex: 1; } button.loginOut { - width: 280px; + /* width: 280px; */ + width: 100%; padding: 7px 0; line-height: 26px; margin-right:16px; diff --git a/pages/index/filtercss.wxss b/pages/index/filtercss.wxss index d1dc41c..635eff9 100644 --- a/pages/index/filtercss.wxss +++ b/pages/index/filtercss.wxss @@ -33,7 +33,7 @@ border: 1px solid transparent; } .sub .content > span.active { - background-color: #E7F2FF; + background-color: var(--color-ysd-bg); color: var(--color-ysd); border-color: var(--color-ysd); } diff --git a/pages/index/index.js b/pages/index/index.js index f14b3f2..3cb30c9 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -1978,15 +1978,10 @@ Page({ 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", - // }); - // } + }, /** * 简版抽屉 diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 05fd007..530bb01 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -6,7 +6,7 @@ - + 郑州一才企业管理有限公司 @@ -28,28 +28,8 @@ 13253506869 - - - - - - - - - - - - {{item.title}} - - - - - - + + @@ -232,7 +212,7 @@ --> - + - @@ -495,10 +348,12 @@ - - {{item.district == "" ?'':item.district + ' | ' }} - {{item.distanceKm}} - {{item.age}} + + + {{item.district == "" ?'':item.district}} + + {{ ' | ' + item.distanceKm}} + {{' | ' +item.age}} {{item.monthlyPay}} @@ -514,7 +369,7 @@ 报名 - 报名 + 报名 diff --git a/pages/index/index.wxss b/pages/index/index.wxss index 5f59e3c..b12d44f 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -603,9 +603,9 @@ button.collect icon::before { /* opacity: 0.5; */ /* border: 1rpx solid var(--color-ysd); color: var(--color-ysd); */ - background: rgba(255, 68, 0, 0.2); + background: #FFEEE9; color: var(--color-ysd); - border: 1rpx solid rgba(255, 68, 0, 0.2); + border: 1rpx solid #ff4400; } .opacityBtn { position: absolute; @@ -984,7 +984,7 @@ button.collect icon::before { .genderTag > view { height: 28px; line-height: 26px; - background-color: #E7F2FF; + background-color:var(--color-ysd-bg); border: 1px solid var(--color-ysd); border-radius: 999px; margin-right: 8px; diff --git a/pages/login/index.wxml b/pages/login/index.wxml index 7b85e38..9a34212 100644 --- a/pages/login/index.wxml +++ b/pages/login/index.wxml @@ -7,8 +7,8 @@ - - 找工作,到一才! + + 钱多活少离家近
diff --git a/pages/mine/index.wxml b/pages/mine/index.wxml index 0ca24ed..111420e 100644 --- a/pages/mine/index.wxml +++ b/pages/mine/index.wxml @@ -1,6 +1,6 @@ - - + + @@ -30,8 +30,8 @@ - - + + @@ -40,7 +40,7 @@ 微信用户 - 为劳动者创造价值 + 钱多活少离家近 diff --git a/pages/mine/setting/index.wxml b/pages/mine/setting/index.wxml index 44b87a8..dbca273 100644 --- a/pages/mine/setting/index.wxml +++ b/pages/mine/setting/index.wxml @@ -36,7 +36,7 @@ - + 退出登录 diff --git a/pages/mine/setting/index.wxss b/pages/mine/setting/index.wxss index 2ea7d3d..0f4b058 100644 --- a/pages/mine/setting/index.wxss +++ b/pages/mine/setting/index.wxss @@ -34,7 +34,7 @@ page{ line-height: 24px; color: #b8b8b8; } -.loginOut{ +.loginOut23{ width: unset; height: 56px; background-color: #fff; diff --git a/pages/mine/trueName/index.wxml b/pages/mine/trueName/index.wxml index da8d058..6ebe7da 100644 --- a/pages/mine/trueName/index.wxml +++ b/pages/mine/trueName/index.wxml @@ -1,6 +1,6 @@ - 实名认证 + 实名认证 {{trueName}} diff --git a/pages/mine/userDetail/index.wxml b/pages/mine/userDetail/index.wxml index beee6cf..70d409d 100644 --- a/pages/mine/userDetail/index.wxml +++ b/pages/mine/userDetail/index.wxml @@ -71,7 +71,7 @@ - 实名认证 + 实名认证 {{userInfo.realName}} diff --git a/pages/mine/versionPage/index.wxml b/pages/mine/versionPage/index.wxml index 5649e16..ae3e741 100644 --- a/pages/mine/versionPage/index.wxml +++ b/pages/mine/versionPage/index.wxml @@ -1,6 +1,6 @@ - +

一才

Version {{version}}

diff --git a/pages/newEnroll/enroll/index.wxml b/pages/newEnroll/enroll/index.wxml index 937a03e..401f405 100644 --- a/pages/newEnroll/enroll/index.wxml +++ b/pages/newEnroll/enroll/index.wxml @@ -42,7 +42,7 @@
- +
@@ -55,7 +55,7 @@ - + {{item.value}} @@ -242,11 +242,11 @@ - + 收起 - + 展开 @@ -288,11 +288,11 @@ - + 取消 - + diff --git a/pages/newEnroll/enroll/index.wxss b/pages/newEnroll/enroll/index.wxss index ce816ff..d127e1e 100644 --- a/pages/newEnroll/enroll/index.wxss +++ b/pages/newEnroll/enroll/index.wxss @@ -198,9 +198,8 @@ button.newBtn { } .rightPz { position: relative; - width: 40px; - height: 34px; - top: -4px; + width: 32px; + height: 29px; margin-left: 10px; background-repeat: no-repeat; background-size: cover; diff --git a/project.config.json b/project.config.json index fdc5a23..160e6f3 100644 --- a/project.config.json +++ b/project.config.json @@ -44,7 +44,7 @@ "tabIndent": "insertSpaces", "tabSize": 2 }, - "appid": "wxd7aba642f7fd77fd", + "appid": "wxb0c590fd696b79be", "packOptions": { "ignore": [], "include": [] diff --git a/project.private.config.json b/project.private.config.json index 86289de..741e9a2 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -1,7 +1,7 @@ { "setting": { "compileHotReLoad": true, - "urlCheck": false + "urlCheck": true }, "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", "projectname": "yicai",