master
wangxia 2 years ago
parent 3effab8e99
commit f9f0814a49

@ -0,0 +1,230 @@
const _windowWidth = wx.getSystemInfoSync().windowWidth;
Component({
properties: {
//组件宽度
width: {
type: Number,
value: 700,
observer: function (newVal, oldVal, changedPath) {
var that = this;
if (newVal != that.data.width) {
this._refresh();
}
},
},
contentWidth: {
type: String,
value: "100vw",
},
//组件高度
height: {
type: Number,
value: 100,
},
//滑块大小
blockSize: {
type: Number,
value: 60,
observer: function (newVal, oldVal, changedPath) {
var that = this;
if (newVal != that.data.blockSize) {
this._refresh();
}
},
},
//区间进度条高度
barHeight: {
type: Number,
value: 10,
},
//背景条颜色
backgroundColor: {
type: String,
value: "#e9e9e9",
},
//已选择的颜色
activeColor: {
type: String,
value: "#E5EDFF",
},
//最小值
min: {
type: Number,
value: 0,
observer: function (newVal, oldVal, changedPath) {
var that = this;
if (newVal != that.data.min) {
that._refresh();
}
},
},
//最大值
max: {
type: Number,
value: 100,
observer: function (newVal, oldVal, changedPath) {
var that = this;
if (newVal != that.data.max) {
that._refresh();
}
},
},
//设置初始值
values: {
type: Object,
value: [0, 100],
observer: function (newVal, oldVal, changedPath) {
var that = this;
// var values = that.data.values;
if (that._isValuesValid(newVal) && that._isValuesValid(oldVal)) {
if (oldVal[0] != newVal[0] || oldVal[1] != newVal[1]) that._refresh();
}
},
},
},
/**
* 组件生命周期函数在组件布局完成后执行
*/
ready() {
// console.log(this.data.activeColor);
// console.log(this.data.width);
this.setData({
progressBarWidth: this.data.width,
});
this._refresh();
},
options: {
multipleSlots: true,
},
data: {
MAX_LENGTH: 700,
minBlockLeft: 0,
maxBlockLeft: 700,
progressBarLeft: 0,
progressBarWidth: 700,
fangdou: true,
},
methods: {
_pxToRpx: function (px) {
return (750 * px) / _windowWidth;
},
_onBlockTouchStart: function (e) {
console.log(e);
this._blockDownX = e.changedTouches[0].pageX;
this._blockLeft = e.target.dataset.left;
this._curBlock = e.target.dataset.tag;
},
_onBlockTouchMove: function (e) {
var that = this;
if (that.data.fangdou) {
that.data.fangdou = false;
var values = that._calculateValues(e);
that._refreshProgressBar(values[2], values[3]);
that._refreshBlock(values[2], values[3]);
var eventDetail = {
minValue: values[0],
maxValue: values[1],
fromUser: true,
};
var eventOption = {};
that.triggerEvent("rangechange", eventDetail, eventOption);
setTimeout(() => {
that.data.fangdou = true;
}, 5);
}
},
_onBlockTouchEnd: function (e) {
var that = this;
var values = that._calculateValues(e);
that._refreshProgressBar(values[2], values[3]);
that._refreshBlock(values[2], values[3]);
var eventDetail = {
minValue: values[0],
maxValue: values[1],
fromUser: true,
};
var eventOption = {};
that.triggerEvent("rangechange", eventDetail, eventOption);
},
_isValuesValid: function (values) {
return values != null && values != undefined && values.length == 2;
},
/**
* 根据手势计算相关数据
*/
_calculateValues: function (e) {
var that = this;
var moveLength = e.changedTouches[0].pageX - that._blockDownX;
var left = that._blockLeft + that._pxToRpx(moveLength);
left = Math.max(0, left);
left = Math.min(left, that.data.MAX_LENGTH);
var minBlockLeft = that.data.minBlockLeft;
var maxBlockLeft = that.data.maxBlockLeft;
if (that._curBlock == "minBlock") {
minBlockLeft = left;
} else {
maxBlockLeft = left;
}
var range = that.data.max - that.data.min;
var minLeft = Math.min(minBlockLeft, maxBlockLeft);
var maxLeft = Math.max(minBlockLeft, maxBlockLeft);
var minValue = (minLeft / that.data.MAX_LENGTH) * range + that.data.min;
var maxValue = (maxLeft / that.data.MAX_LENGTH) * range + that.data.min;
return [minValue, maxValue, minLeft, maxLeft];
},
/**
* 计算滑块坐标
*/
_calculateBlockLeft: function (minValue, maxValue) {
var that = this;
var blockSize = that.data.blockSize;
var range = that.data.max - that.data.min;
var minLeft = ((minValue - that.data.min) / range) * that.data.MAX_LENGTH;
var maxLeft = ((maxValue - that.data.min) / range) * that.data.MAX_LENGTH;
return [minLeft, maxLeft];
},
/**
* 刷新进度条视图
*/
_refreshProgressBar: function (minBlockLeft, maxBlockLeft) {
var that = this;
var blockSize = that.data.blockSize;
that.setData({
progressBarLeft: minBlockLeft + blockSize / 2,
progressBarWidth: Math.abs(maxBlockLeft - minBlockLeft),
});
},
/**
* 刷新滑块视图
*/
_refreshBlock: function (minBlockLeft, maxBlockLeft) {
var that = this;
that.setData({
minBlockLeft: minBlockLeft,
maxBlockLeft: maxBlockLeft,
});
},
/**
* 刷新整个视图
*/
_refresh: function () {
var that = this;
var MAX_LENGTH = that.data.width - that.data.blockSize;
that.setData({
MAX_LENGTH: MAX_LENGTH,
maxBlockLeft: MAX_LENGTH,
progressBarWidth: MAX_LENGTH,
});
var values = that.data.values;
if (that._isValuesValid(values)) {
values[0] = Math.max(that.data.min, values[0]);
values[0] = Math.min(values[0], that.data.max);
values[1] = Math.max(that.data.min, values[1]);
values[1] = Math.min(values[1], that.data.max);
var leftValues = that._calculateBlockLeft(values[0], values[1]);
that._refreshProgressBar(leftValues[0], leftValues[1]);
that._refreshBlock(leftValues[0], leftValues[1]);
}
},
},
});

@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

@ -0,0 +1,12 @@
<view class="range-slider" catchtap style="width:calc({{contentWidth}} - 40px);height:{{height}}px">
<view class="range-bar" catchtap style="width:calc({{width}}rpx - 20rpx);height:{{8}}rpx">
<view class="range-bar-bg" style="background-color:{{backgroundColor}};margin-left:10px"></view>
<view class="range-bar-progress" style="margin-left:{{progressBarLeft}}rpx;width:{{progressBarWidth}}rpx;background-color:{{activeColor}}"></view>
</view>
<view class="block" style="margin-left:{{minBlockLeft}}rpx" catchtouchstart="_onBlockTouchStart" catchtouchmove="_onBlockTouchMove" catchtouchend="_onBlockTouchEnd" data-left="{{minBlockLeft}}" data-tag="minBlock">
<slot name="minBlock"></slot>
</view>
<view class="block" style="margin-left:{{maxBlockLeft}}rpx" catchtouchstart="_onBlockTouchStart" catchtouchmove="_onBlockTouchMove" catchtouchend="_onBlockTouchEnd" data-left="{{maxBlockLeft}}" data-tag="maxBlock">
<slot name="maxBlock"></slot>
</view>
</view>

@ -0,0 +1,46 @@
.range-slider {
position: relative;
}
.range-bar {
position: absolute;
}
.range-bar {
position: absolute;
top: 50%;
transform: translate(0, -50%);
border-radius: 10000rpx;
}
.range-bar-bg {
position: absolute;
width: 100%;
height: 100%;
border-radius: 10000rpx;
}
.range-bar-progress {
position: absolute;
width: 100%;
height: 100%;
background-color: blueviolet;
}
.block {
position: absolute;
width: 30px;
height: 30px;
top: 50%;
border-radius: 50%;
transform: translate(0, -50%);
background-image: url('https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/home_age.svg');
background-color: #fff;
background-repeat: no-repeat;
background-size: 100% 100%;
/* background-color: var(--color-ysd); */
}
.block image {
width: 100%;
height: 100%;
}

@ -3,7 +3,7 @@ const app = getApp();
const commonUtil = require("../../utils/commonUtil.js"); const commonUtil = require("../../utils/commonUtil.js");
Page({ Page({
data: { data: {
swiperHeight:0, swiperHeight: 0,
toped: "1", toped: "1",
chaShowed: false, chaShowed: false,
isTrigger: false, isTrigger: false,
@ -294,6 +294,10 @@ Page({
}, },
copyList: {}, copyList: {},
innerFilter: false, innerFilter: false,
// 年龄筛选参数
rangeValues: [16, 60], // 年龄筛选区间
maxAge: 60, // 年龄区间最大取值
minAge: 16,
}, },
// onPullDownRefresh:function(){ // onPullDownRefresh:function(){
// this.getJobList(); // this.getJobList();
@ -305,13 +309,13 @@ Page({
// } // }
// }); // });
// }, // },
goLogin() { goLogin () {
wx.setStorageSync("comeFromPage", "index"); wx.setStorageSync("comeFromPage", "index");
wx.navigateTo({ wx.navigateTo({
url: "/pages/login/index", url: "/pages/login/index",
}); });
}, },
close() { close () {
let that = this; let that = this;
let brandList = that.data.brandList; let brandList = that.data.brandList;
let selectBrandList = that.data.selectBrandList; let selectBrandList = that.data.selectBrandList;
@ -356,7 +360,7 @@ Page({
// console.log(that.data.selectBrandList); // console.log(that.data.selectBrandList);
console.log("isout"); console.log("isout");
}, },
touchStart(e) { touchStart (e) {
// console.log("滚起来", e); // console.log("滚起来", e);
// this.setData({ // this.setData({
// scrollStop: false // scrollStop: false
@ -366,7 +370,7 @@ Page({
siv: "", siv: "",
}); });
}, },
choosenTop(e) { choosenTop (e) {
var that = this; var that = this;
// that.data.storeJobListSearchForm.pageNum = 1; // that.data.storeJobListSearchForm.pageNum = 1;
let id = e.currentTarget.dataset.id; let id = e.currentTarget.dataset.id;
@ -431,8 +435,8 @@ Page({
console.log(this.data.whichOneShow); console.log(this.data.whichOneShow);
}, 0); }, 0);
that.setData({ that.setData({
// siv: "menu", siv: "menu",
// scrollTo: "sticky", scrollTo: "sticky",
}); });
} }
this.hideLeft(); this.hideLeft();
@ -450,8 +454,8 @@ Page({
activez: str, activez: str,
}); });
}, },
watch() {}, watch () { },
witchNav(e) { witchNav (e) {
console.log(e); console.log(e);
if (!this.data.isLogin) { if (!this.data.isLogin) {
wx.navigateTo({ wx.navigateTo({
@ -480,7 +484,7 @@ Page({
url: e.currentTarget.dataset.url, url: e.currentTarget.dataset.url,
}); });
}, },
toHot(e) { toHot (e) {
if (e.currentTarget.dataset.path) { if (e.currentTarget.dataset.path) {
if (e.currentTarget.dataset.path == "/pages/hotList/index") { if (e.currentTarget.dataset.path == "/pages/hotList/index") {
wx.navigateTo({ wx.navigateTo({
@ -489,7 +493,7 @@ Page({
} }
} }
}, },
choiceSex(e) { choiceSex (e) {
var that = this; var that = this;
let data = e.currentTarget.dataset; let data = e.currentTarget.dataset;
that.data.filterData[data.type].forEach((item) => { that.data.filterData[data.type].forEach((item) => {
@ -544,7 +548,7 @@ Page({
// },2000); // },2000);
}, },
cc: function () {}, cc: function () { },
close: function () { close: function () {
this.setData({ this.setData({
dialog1: false, dialog1: false,
@ -585,7 +589,7 @@ Page({
imageUrl: img, imageUrl: img,
}; };
}, },
goSearch() { goSearch () {
if (!this.data.isLogin) { if (!this.data.isLogin) {
wx.navigateTo({ wx.navigateTo({
url: "../login/index", url: "../login/index",
@ -626,12 +630,12 @@ Page({
* *
* *
*/ */
clear() { clear () {
wx.clearStorage(); wx.clearStorage();
console.log("清除成功"); console.log("清除成功");
}, },
inputBlur() {}, inputBlur () { },
getListByTypeAndIndustry: function () { getListByTypeAndIndustry: function () {
var that = this; var that = this;
wx.request({ wx.request({
@ -683,7 +687,7 @@ Page({
}, },
}); });
}, },
golistSharePage() { golistSharePage () {
if (this.data.isLogin) { if (this.data.isLogin) {
if (app.globalData.loginUserInfo.agencyStatus == 1) { if (app.globalData.loginUserInfo.agencyStatus == 1) {
wx.navigateTo({ wx.navigateTo({
@ -865,7 +869,7 @@ Page({
}); });
// that.getJobList(); // that.getJobList();
}, },
onLoad(options) { onLoad (options) {
var that = this; var that = this;
console.log(options); console.log(options);
console.log(wx.getSystemInfoSync()); console.log(wx.getSystemInfoSync());
@ -883,7 +887,7 @@ Page({
// 查看是否授权 // 查看是否授权
wx.getSetting({ wx.getSetting({
success(res) { success (res) {
if (res.authSetting["scope.userInfo"]) { if (res.authSetting["scope.userInfo"]) {
// 已经授权,可以直接调用 getUserInfo 获取头像昵称 // 已经授权,可以直接调用 getUserInfo 获取头像昵称
wx.getUserInfo({ wx.getUserInfo({
@ -1093,7 +1097,7 @@ Page({
that.getBannerList(); that.getBannerList();
that.getchannelList(); that.getchannelList();
}, },
onReady() { onReady () {
let that = this; let that = this;
// var query = wx.createSelectorQuery(); // var query = wx.createSelectorQuery();
// query.select(".navigatorBar").boundingClientRect(); // query.select(".navigatorBar").boundingClientRect();
@ -1113,7 +1117,7 @@ Page({
* *
* *
*/ */
goChannel(e) { goChannel (e) {
console.log(e); console.log(e);
}, },
/** /**
@ -1121,7 +1125,7 @@ Page({
* *
* *
*/ */
setActive(e) { setActive (e) {
console.log(e); console.log(e);
let data = e.currentTarget.dataset; let data = e.currentTarget.dataset;
if (data.type == "yanba" || data.type == "sex" || data.type == "price") { if (data.type == "yanba" || data.type == "sex" || data.type == "price") {
@ -1174,11 +1178,11 @@ Page({
* *
* *
*/ */
getBannerList() { getBannerList () {
let that = this; let that = this;
wx.request({ wx.request({
url: app.globalData.ip + "/daotian/banner/list", url: app.globalData.ip + "/daotian/banner/list",
success(res) { success (res) {
console.log(res); console.log(res);
if (res.data.status == 200) { if (res.data.status == 200) {
that.setData({ that.setData({
@ -1194,11 +1198,11 @@ Page({
* *
* *
*/ */
getTemplateList() { getTemplateList () {
let that = this; let that = this;
wx.request({ wx.request({
url: app.globalData.ip + "/daotian/image/list", url: app.globalData.ip + "/daotian/image/list",
success(res) { success (res) {
console.log(res); console.log(res);
if (res.data.status == 200) { if (res.data.status == 200) {
app.globalData.templateList = res.data.data.images; app.globalData.templateList = res.data.data.images;
@ -1215,11 +1219,11 @@ Page({
* *
* *
*/ */
getchannelList() { getchannelList () {
let that = this; let that = this;
wx.request({ wx.request({
url: app.globalData.ip + "/daotian/channel/list", url: app.globalData.ip + "/daotian/channel/list",
success(res) { success (res) {
console.log(res); console.log(res);
if (res.data.status == 200) { if (res.data.status == 200) {
that.setData({ that.setData({
@ -1234,7 +1238,7 @@ Page({
* *
* *
*/ */
clearFilter1(e) { clearFilter1 (e) {
let middleList = JSON.parse(JSON.stringify(this.data.copyList)); let middleList = JSON.parse(JSON.stringify(this.data.copyList));
let type = e.currentTarget.dataset.type; let type = e.currentTarget.dataset.type;
let filterData = this.data.filterData; let filterData = this.data.filterData;
@ -1300,7 +1304,7 @@ Page({
* *
* *
*/ */
toList() { toList () {
let that = this; let that = this;
let innerFilter = false; let innerFilter = false;
console.log(this.data.filterData); console.log(this.data.filterData);
@ -1363,7 +1367,10 @@ Page({
} }
console.log(formSearch); console.log(formSearch);
that.data.storeJobListSearchForm = { ...that.data.storeJobListSearchForm, ...formSearch }; that.data.storeJobListSearchForm = {
...that.data.storeJobListSearchForm, ...formSearch,
ageRangeStr: that.data.minAge + "-" + that.data.maxAge,
};
if (this.data.choiceCollect == 0) { if (this.data.choiceCollect == 0) {
that.data.storeJobListSearchForm.ucj = 0; that.data.storeJobListSearchForm.ucj = 0;
} else { } else {
@ -1385,38 +1392,38 @@ Page({
* *
* *
*/ */
onTabClick(e) { onTabClick (e) {
const index = e.detail.index; const index = e.detail.index;
this.setData({ this.setData({
activeTab: index, activeTab: index,
}); });
}, },
onChange(e) { onChange (e) {
const index = e.detail.index; const index = e.detail.index;
this.setData({ this.setData({
activeTab: index, activeTab: index,
}); });
}, },
findLocation() { findLocation () {
var that = this; var that = this;
wx.getLocation({ wx.getLocation({
type: "gcj02", type: "gcj02",
success(res1) { success (res1) {
console.log("获取位置2"); console.log("获取位置2");
console.log(res1); console.log(res1);
app.globalData.lng = res1.longitude; app.globalData.lng = res1.longitude;
app.globalData.lat = res1.latitude; app.globalData.lat = res1.latitude;
}, },
fail() {}, fail () { },
}); });
}, },
emptyMethod(e) { emptyMethod (e) {
console.log(e); console.log(e);
}, },
chooseIdCard() { chooseIdCard () {
var that = this; var that = this;
if (that.data.agencyStatus != 1) { if (that.data.agencyStatus != 1) {
this.setData({ this.setData({
@ -1428,7 +1435,7 @@ Page({
count: 1, count: 1,
sizeType: ["original", "compressed"], sizeType: ["original", "compressed"],
sourceType: ["album", "camera"], sourceType: ["album", "camera"],
success(res) { success (res) {
console.log(res); console.log(res);
wx.navigateTo({ wx.navigateTo({
url: `../newEnroll/enroll/index?applyType=1&imgUrl=${res.tempFilePaths[0]}`, url: `../newEnroll/enroll/index?applyType=1&imgUrl=${res.tempFilePaths[0]}`,
@ -1437,7 +1444,7 @@ Page({
}, },
}); });
}, },
navigatorToRecord() { navigatorToRecord () {
if (this.data.agencyStatus != 1) { if (this.data.agencyStatus != 1) {
this.setData({ this.setData({
iosDialog: true, iosDialog: true,
@ -1448,7 +1455,7 @@ Page({
url: `../newEnroll/enroll/index?applyType=1`, url: `../newEnroll/enroll/index?applyType=1`,
}); });
}, },
PageScroll(e) { PageScroll (e) {
let that = this; let that = this;
const query = wx.createSelectorQuery().in(this); const query = wx.createSelectorQuery().in(this);
query query
@ -1471,7 +1478,7 @@ Page({
}) })
.exec(); .exec();
}, },
onShow() { onShow () {
let that = this; let that = this;
that.data.storeJobListSearchForm.pageNum = 1; that.data.storeJobListSearchForm.pageNum = 1;
wx.setStorageSync("BILLFROM", "firstBill"); wx.setStorageSync("BILLFROM", "firstBill");
@ -1525,7 +1532,7 @@ Page({
console.log("获取缓存设置的查询职位列表参数错误:", e); console.log("获取缓存设置的查询职位列表参数错误:", e);
} }
wx.removeStorageSync("FROMCITY"); wx.removeStorageSync("FROMCITY");
}else{ } else {
that.setData({ that.setData({
recordList: [], recordList: [],
}); });
@ -1601,7 +1608,7 @@ Page({
that.searchAnimate(); that.searchAnimate();
}, },
collectedStoreJobList() { collectedStoreJobList () {
var that = this; var that = this;
wx.request({ wx.request({
@ -1630,10 +1637,10 @@ Page({
}); });
} }
}, },
fail: function (res) {}, fail: function (res) { },
}); });
}, },
getHopeJobLabels() { getHopeJobLabels () {
var that = this; var that = this;
wx.request({ wx.request({
url: app.globalData.ip + "/labels/findAllHopeJobLabels", url: app.globalData.ip + "/labels/findAllHopeJobLabels",
@ -1671,25 +1678,25 @@ Page({
}, },
}); });
}, },
makePhoneCall() { makePhoneCall () {
var that = this; var that = this;
wx.makePhoneCall({ wx.makePhoneCall({
phoneNumber: "13937184434", phoneNumber: "13937184434",
}); });
}, },
goScreen() { goScreen () {
wx.navigateTo({ wx.navigateTo({
url: "../screen/index", url: "../screen/index",
}); });
}, },
goCity() { goCity () {
let that = this; let that = this;
wx.navigateTo({ wx.navigateTo({
url: "../city/index", url: "../city/index",
}); });
}, },
initData() { initData () {
var that = this; var that = this;
try { try {
// 获取手机基础信息(头状态栏和标题栏高度) // 获取手机基础信息(头状态栏和标题栏高度)
@ -1783,7 +1790,7 @@ Page({
// this.getJobList(); // this.getJobList();
}, },
getJobList() { getJobList () {
var that = this; var that = this;
// debugger // debugger
that.setData({ that.setData({
@ -1847,7 +1854,7 @@ Page({
} }
wx.hideLoading({ wx.hideLoading({
success: (res) => {}, success: (res) => { },
}); });
that.setData({ that.setData({
loading: false, loading: false,
@ -1894,13 +1901,13 @@ Page({
}); });
}, },
onScrollRefresh() { onScrollRefresh () {
this.data.recordList = []; this.data.recordList = [];
this.data.storeJobListSearchForm.pageNum = 1; this.data.storeJobListSearchForm.pageNum = 1;
this.getJobList(); this.getJobList();
}, },
getTag() { getTag () {
let that = this; let that = this;
let query = that.createSelectorQuery(); let query = that.createSelectorQuery();
query query
@ -1926,7 +1933,7 @@ Page({
}, },
// 下拉加载更多 // 下拉加载更多
onScrollToLower() { onScrollToLower () {
console.log("===================================================="); console.log("====================================================");
var that = this; var that = this;
// if (app.globalData.isLogin) { // if (app.globalData.isLogin) {
@ -1945,7 +1952,7 @@ Page({
that.data.pullNum = that.data.pullNum + 1; that.data.pullNum = that.data.pullNum + 1;
}, },
handleTabClick(e) { handleTabClick (e) {
var that = this; var that = this;
var index = e.detail.index; var index = e.detail.index;
console.log(e.detail.index); console.log(e.detail.index);
@ -1975,7 +1982,7 @@ Page({
* *
* *
*/ */
goDetail(e) { goDetail (e) {
console.log(e); console.log(e);
var that = this; var that = this;
wx.navigateTo({ wx.navigateTo({
@ -1988,7 +1995,7 @@ Page({
* *
* *
*/ */
goDrawer(event) { goDrawer (event) {
let that = this; let that = this;
console.log(event.currentTarget.dataset.item); console.log(event.currentTarget.dataset.item);
@ -2014,7 +2021,7 @@ Page({
console.log(this.data.currentJobDrawer); console.log(this.data.currentJobDrawer);
}, },
copyClose() { copyClose () {
var that = this; var that = this;
var contentInfo; var contentInfo;
const query = wx.createSelectorQuery().in(this); const query = wx.createSelectorQuery().in(this);
@ -2025,9 +2032,9 @@ Page({
var text = that.data.currentJobDrawer.jobDesp + contentInfo; var text = that.data.currentJobDrawer.jobDesp + contentInfo;
wx.setClipboardData({ wx.setClipboardData({
data: text, data: text,
success(res) { success (res) {
wx.getClipboardData({ wx.getClipboardData({
success(res) { success (res) {
console.log(res.data); // data console.log(res.data); // data
wx.showToast({ wx.showToast({
title: "内容已复制", title: "内容已复制",
@ -2045,7 +2052,7 @@ Page({
// this.setData({ // this.setData({
// }); // });
// }, // },
hideDrawer() { hideDrawer () {
let that = this; let that = this;
this.getTabBar().setData({ this.getTabBar().setData({
isShow: true, isShow: true,
@ -2060,7 +2067,7 @@ Page({
// }); // });
// }, 300); // }, 300);
}, },
goEnroll(e) { goEnroll (e) {
console.log(e); console.log(e);
// wx.navigateTo({ // wx.navigateTo({
// url: "../newEnroll/index?applyType=0" // url: "../newEnroll/index?applyType=0"
@ -2089,10 +2096,10 @@ Page({
url: `../newEnroll/enroll/index?applyType=1&info=${argument}`, url: `../newEnroll/enroll/index?applyType=1&info=${argument}`,
}); });
}, },
wxLogin() { wxLogin () {
var that = this; var that = this;
wx.login({ wx.login({
success(res) { success (res) {
if (res.code) { if (res.code) {
that.setData({ that.setData({
wxCode: res.code, wxCode: res.code,
@ -2103,19 +2110,19 @@ Page({
}, },
}); });
}, },
changeRecordBillType(e) { changeRecordBillType (e) {
let that = this; let that = this;
console.log(e); console.log(e);
that.setData({ that.setData({
recordBillType: e.currentTarget.dataset.type, recordBillType: e.currentTarget.dataset.type,
}); });
}, },
toSmart() { toSmart () {
wx.navigateTo({ wx.navigateTo({
url: "/pages/IDCardWithNFC/index", url: "/pages/IDCardWithNFC/index",
}); });
}, },
getPhoneNumber(e) { getPhoneNumber (e) {
var that = this; var that = this;
console.log(e); console.log(e);
console.log(e.detail.errMsg); console.log(e.detail.errMsg);
@ -2136,7 +2143,7 @@ Page({
var encryptedData = e.detail.encryptedData; var encryptedData = e.detail.encryptedData;
console.log(iv, "=-=========", encryptedData); console.log(iv, "=-=========", encryptedData);
wx.checkSession({ wx.checkSession({
success() { success () {
//session_key 未过期,并且在本生命周期一直有效 //session_key 未过期,并且在本生命周期一直有效
wx.request({ wx.request({
url: app.globalData.ip + "/getWechatTel", url: app.globalData.ip + "/getWechatTel",
@ -2145,7 +2152,7 @@ Page({
iv: iv, iv: iv,
encryptedData: encryptedData, encryptedData: encryptedData,
type: "yishoudan", type: "yishoudan",
appId:app.globalData.appId appId: app.globalData.appId
}, },
success: function (res) { success: function (res) {
console.log(res); console.log(res);
@ -2185,10 +2192,10 @@ Page({
}, },
}); });
}, },
fail() { fail () {
// session_key 已经失效,需要重新执行登录流程 // session_key 已经失效,需要重新执行登录流程
wx.login({ wx.login({
success(res) { success (res) {
if (res.code) { if (res.code) {
console.log(res.code); console.log(res.code);
//发起网络请求 //发起网络请求
@ -2199,7 +2206,7 @@ Page({
iv: iv, iv: iv,
encryptedData: encryptedData, encryptedData: encryptedData,
type: "yishoudan", type: "yishoudan",
appId:app.globalData.appId appId: app.globalData.appId
}, },
success: function (res) { success: function (res) {
console.log(res); console.log(res);
@ -2252,7 +2259,7 @@ Page({
} }
return false; return false;
}, },
getPhoneNumber1(e) { getPhoneNumber1 (e) {
var that = this; var that = this;
console.log(e); console.log(e);
console.log(e.detail.errMsg); console.log(e.detail.errMsg);
@ -2268,7 +2275,7 @@ Page({
var iv = e.detail.iv; var iv = e.detail.iv;
var encryptedData = e.detail.encryptedData; var encryptedData = e.detail.encryptedData;
wx.checkSession({ wx.checkSession({
success() { success () {
//session_key 未过期,并且在本生命周期一直有效 //session_key 未过期,并且在本生命周期一直有效
wx.request({ wx.request({
url: app.globalData.ip + "/getWechatTel", url: app.globalData.ip + "/getWechatTel",
@ -2277,7 +2284,7 @@ Page({
iv: iv, iv: iv,
encryptedData: encryptedData, encryptedData: encryptedData,
type: "yishoudan", type: "yishoudan",
appId:app.globalData.appId appId: app.globalData.appId
}, },
success: function (res) { success: function (res) {
console.log(res); console.log(res);
@ -2294,10 +2301,10 @@ Page({
}, },
}); });
}, },
fail() { fail () {
// session_key 已经失效,需要重新执行登录流程 // session_key 已经失效,需要重新执行登录流程
wx.login({ wx.login({
success(res) { success (res) {
if (res.code) { if (res.code) {
console.log(res.code); console.log(res.code);
//发起网络请求 //发起网络请求
@ -2308,7 +2315,7 @@ Page({
iv: iv, iv: iv,
encryptedData: encryptedData, encryptedData: encryptedData,
type: "yishoudan", type: "yishoudan",
appId:app.globalData.appId appId: app.globalData.appId
}, },
success: function (res) { success: function (res) {
console.log(res); console.log(res);
@ -2348,7 +2355,7 @@ Page({
} }
return false; return false;
}, },
getAgencyUserId(id) { getAgencyUserId (id) {
var that = this; var that = this;
wx.request({ wx.request({
url: app.globalData.ip + "/channel/contact/getAgencyUserId", url: app.globalData.ip + "/channel/contact/getAgencyUserId",
@ -2377,7 +2384,7 @@ Page({
}, },
}); });
}, },
collectPaste(e) { collectPaste (e) {
var txt; var txt;
var that = this; var that = this;
if (!this.data.isLogin) { if (!this.data.isLogin) {
@ -2403,7 +2410,7 @@ Page({
// }) // })
// } // }
}, },
doCollected(collected, storeJobId) { doCollected (collected, storeJobId) {
var that = this; var that = this;
var url = "/user/collect/job/add"; var url = "/user/collect/job/add";
if (collected - 1 == 0) { if (collected - 1 == 0) {
@ -2538,7 +2545,7 @@ Page({
}); });
} }
}, },
changSign(e) { changSign (e) {
let that = this; let that = this;
console.log(e); console.log(e);
that.data.storeJobListSearchForm.pageNum = 1; that.data.storeJobListSearchForm.pageNum = 1;
@ -2573,7 +2580,7 @@ Page({
* *
* *
*/ */
collectChange(e) { collectChange (e) {
let that = this; let that = this;
if (that.data.isLogin || (!that.data.isLogin && e.currentTarget.dataset.id == 0)) { if (that.data.isLogin || (!that.data.isLogin && e.currentTarget.dataset.id == 0)) {
if (e.currentTarget.dataset.id) { if (e.currentTarget.dataset.id) {
@ -2591,13 +2598,13 @@ Page({
} else { } else {
that.setData({ that.setData({
recordList: [], recordList: [],
hasMoreData:false, hasMoreData: false,
choiceCollect: 1, choiceCollect: 1,
}); });
// } // }
} }
}, },
choiceFilter(e) { choiceFilter (e) {
var that = this; var that = this;
// let str = that.data.activez // let str = that.data.activez
let str = e.currentTarget.dataset.id; let str = e.currentTarget.dataset.id;
@ -2630,7 +2637,7 @@ Page({
} else { } else {
wx.getLocation({ wx.getLocation({
type: "gcj02", type: "gcj02",
success(res1) { success (res1) {
console.log("获取位置1"); console.log("获取位置1");
app.globalData.lng = res1.longitude; app.globalData.lng = res1.longitude;
app.globalData.lat = res1.latitude; app.globalData.lat = res1.latitude;
@ -2652,7 +2659,7 @@ Page({
// that.getJobList(); // that.getJobList();
// }); // });
}, },
fail() { fail () {
console.log("获取位置失败,打开位置设置界面"); console.log("获取位置失败,打开位置设置界面");
// wx.openSetting({ // wx.openSetting({
// success(res) { // success(res) {
@ -2723,7 +2730,7 @@ Page({
* *
* *
*/ */
clearFilter() { clearFilter () {
let that = this; let that = this;
that.data.jobSpecialLabelList.forEach((item) => { that.data.jobSpecialLabelList.forEach((item) => {
// console.log(item); // console.log(item);
@ -2773,13 +2780,13 @@ Page({
// }); // });
that.getJobList(); that.getJobList();
}, },
scroll(e) { scroll (e) {
return false; return false;
}, },
stoptap(e) { stoptap (e) {
return false; return false;
}, },
changeContact() { changeContact () {
console.log(2123); console.log(2123);
wx.navigateTo({ wx.navigateTo({
url: `/pages/configAnnunciate/index`, url: `/pages/configAnnunciate/index`,
@ -2790,7 +2797,7 @@ Page({
* *
* *
*/ */
recordBill(e) { recordBill (e) {
if (!this.data.isLogin) { if (!this.data.isLogin) {
wx.navigateTo({ wx.navigateTo({
url: "/pages/login/index", url: "/pages/login/index",
@ -2815,22 +2822,22 @@ Page({
// url: `../newEnroll/enroll/index?applyType=1&info=${info}`, // url: `../newEnroll/enroll/index?applyType=1&info=${info}`,
// }); // });
}, },
imageLoad() { imageLoad () {
this.setData({ this.setData({
isLoading: false, isLoading: false,
}); });
}, },
closeDialog() { closeDialog () {
this.setData({ this.setData({
iosDialog: false, iosDialog: false,
}); });
}, },
showLeft() { showLeft () {
this.setData({ this.setData({
leftShow: true, leftShow: true,
}); });
}, },
hideLeft() { hideLeft () {
this.setData({ this.setData({
leftShow: false, leftShow: false,
whichOneShow: "", whichOneShow: "",
@ -2847,7 +2854,7 @@ Page({
* *
* *
*/ */
modalMove() { modalMove () {
return false; return false;
}, },
/** /**
@ -2855,7 +2862,7 @@ Page({
* *
* *
*/ */
getSwiperIndex(e) { getSwiperIndex (e) {
// console.dir(e); // console.dir(e);
if (e.detail.current) { if (e.detail.current) {
this.setData({ this.setData({
@ -2865,18 +2872,18 @@ Page({
// console.log(this.data.placeholderText); // console.log(this.data.placeholderText);
} }
}, },
onPageScroll(e) {}, onPageScroll (e) { },
drawerTouchStart(event) { drawerTouchStart (event) {
this.handletouchtart(event); this.handletouchtart(event);
}, },
drawerTouchMove(event) { drawerTouchMove (event) {
let tx = this.handletouchmove(event); let tx = this.handletouchmove(event);
console.log(tx); console.log(tx);
if (tx.ty > 100) { if (tx.ty > 100) {
this.hideDrawer(); this.hideDrawer();
} }
}, },
filterTouchMove(event) { filterTouchMove (event) {
let tx = this.handletouchmove(event); let tx = this.handletouchmove(event);
if (tx.tx < -100) { if (tx.tx < -100) {
this.setData({ this.setData({
@ -2884,10 +2891,10 @@ Page({
}); });
} }
}, },
filterTouchStart(event) { filterTouchStart (event) {
this.handletouchtart(event); this.handletouchtart(event);
}, },
listTouchMove(event) { listTouchMove (event) {
if (event.detail.scrollTop - this.data.listPosition > 15 && this.data.halfHide == false) { if (event.detail.scrollTop - this.data.listPosition > 15 && this.data.halfHide == false) {
this.setData({ this.setData({
halfHide: true, halfHide: true,
@ -2922,7 +2929,7 @@ Page({
} }
// console.log(event); // console.log(event);
}, },
listTouchStart(event) { listTouchStart (event) {
this.data.listPosition = event.detail.scrollTop; this.data.listPosition = event.detail.scrollTop;
}, },
@ -2956,7 +2963,7 @@ Page({
this.data.lastX = event.touches[0].pageX; this.data.lastX = event.touches[0].pageX;
this.data.lastY = event.touches[0].pageY; this.data.lastY = event.touches[0].pageY;
}, },
searchAnimate() { searchAnimate () {
let that = this; let that = this;
wx.createSelectorQuery() wx.createSelectorQuery()
.select("#listBox") .select("#listBox")
@ -2991,28 +2998,28 @@ Page({
}, },
// tabbar点击监听 // tabbar点击监听
onTabItemTap(e) { onTabItemTap (e) {
console.log(e); console.log(e);
let that = this; let that = this;
that.setData({ that.setData({
topNum: 1, topNum: 1,
}); });
}, },
onHide() { onHide () {
this.setData({ this.setData({
whichOneShow: "", whichOneShow: "",
// topNum: 1, // topNum: 1,
}); });
}, },
onUnload() { onUnload () {
console.log("destory"); console.log("destory");
}, },
goList() { goList () {
wx.navigateTo({ wx.navigateTo({
url: "/pages/filterPage/index", url: "/pages/filterPage/index",
}); });
}, },
goMap(){ goMap () {
wx.getLocation({ wx.getLocation({
type: 'gcj02', //返回可以用于wx.openLocation的经纬度 type: 'gcj02', //返回可以用于wx.openLocation的经纬度
success (res) { success (res) {
@ -3021,14 +3028,14 @@ Page({
wx.openLocation({ wx.openLocation({
latitude, latitude,
longitude, longitude,
name:'郑州一才企业管理有限公司', name: '郑州一才企业管理有限公司',
address:'河南省郑州市管城回族区心怡路与东站南街交叉口郑东升龙广场2号楼5楼', address: '河南省郑州市管城回族区心怡路与东站南街交叉口郑东升龙广场2号楼5楼',
scale: 18 scale: 18
}) })
} }
}) })
}, },
makePhone(e){ makePhone (e) {
var that = this; var that = this;
var tel = e.currentTarget.dataset.tel; var tel = e.currentTarget.dataset.tel;
wx.makePhoneCall({ wx.makePhoneCall({
@ -3036,4 +3043,17 @@ Page({
phoneNumber: tel, 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,
});
},
}); });

@ -1,6 +1,9 @@
{ {
"navigationBarBackgroundColor":"#0dcc91", "usingComponents": {
"navigationBarTextStyle":"white", "range-slider": "../../components/range/range-slider"
},
"navigationBarBackgroundColor": "#0dcc91",
"navigationBarTextStyle": "white",
"backgroundColor": "#FFFFFF", "backgroundColor": "#FFFFFF",
"navigationBarTitleText": "一才工作" "navigationBarTitleText": "一才工作"
} }

@ -92,7 +92,7 @@
<i class="iconfont icon-zhankai f12 c9 fst ml4" wx:if="{{whichOneShow != 'special' && selectJobList.length <= 0}}" data-type="special"></i> <i class="iconfont icon-zhankai f12 c9 fst ml4" wx:if="{{whichOneShow != 'special' && selectJobList.length <= 0}}" data-type="special"></i>
<view wx:if="{{selectJobList.length > 0}}" class="specialnum ml4" catchtap data-type="special">{{selectJobList.length}}</view> <view wx:if="{{selectJobList.length > 0}}" class="specialnum ml4" catchtap data-type="special">{{selectJobList.length}}</view>
<!-- catchtap="hideLeft" --> <!-- catchtap="hideLeft" -->
<scroll-view class="gjFixed" catchtouchmove="modalMove" catchtap wx:if="{{whichOneShow == 'special'}}"> <scroll-view class="gjFixed" catchtouchmove="modalMove" wx:if="{{whichOneShow == 'special'}}">
<scroll-view scroll-y="{{true}}" catchtap class="filterBox filterContainer"> <scroll-view scroll-y="{{true}}" catchtap class="filterBox filterContainer">
<!-- <view class="sub" hover-class="none" hover-stop-propagation="false"> <!-- <view class="sub" hover-class="none" hover-stop-propagation="false">
<view class="title">1.烟疤纹身(单选)</view> <view class="title">1.烟疤纹身(单选)</view>
@ -112,6 +112,16 @@
<span wx:for="{{filterData.price}}" wx:key="index" data-type="price" data-id="{{item.id}}" bindtap="setActive" class="{{item.active== item.id ? 'active':''}}" hover-class="none" hover-stop-propagation="false">{{item.name}}</span> <span wx:for="{{filterData.price}}" wx:key="index" data-type="price" data-id="{{item.id}}" bindtap="setActive" class="{{item.active== item.id ? 'active':''}}" hover-class="none" hover-stop-propagation="false">{{item.name}}</span>
</view> </view>
</view>--> </view>-->
<view class="sub" hover-class="none" hover-stop-propagation="false">
<view class="title">年龄(岁)</view>
<view class="content por" style="justify-content:space-between">
<view class="slider_value fsa" style="position: absolute;top: -15px;left: 50%;color: var(--color-ysd);transform:translateX(-50%)" hover-class="none" hover-stop-propagation="false">
<view class hover-class="none" hover-stop-propagation="false">{{minAge + '-'}}</view>
<view class hover-class="none" hover-stop-propagation="false">{{maxAge == 60 ? maxAge + '+' : maxAge }}</view>
</view>
<range-slider height="50" block-size="50" min="16" max="60" values="{{rangeValues}}" bindrangechange="onRangeChange" activeColor="var(--color-ysd)"></range-slider>
</view>
</view>
<view class="sub" hover-class="none" hover-stop-propagation="false"> <view class="sub" hover-class="none" hover-stop-propagation="false">
<view class="title">1.性别(单选)</view> <view class="title">1.性别(单选)</view>
<view class="content"> <view class="content">
@ -155,7 +165,7 @@
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<view class="btnBox bt1"> <view class="btnBox bt1" catchtap>
<button class="clearFilter" data-type="innerclear" bindtap="clearFilter1">清除</button> <button class="clearFilter" data-type="innerclear" bindtap="clearFilter1">清除</button>
<button class="normalBtn loginOut" bindtap="toList">确定</button> <button class="normalBtn loginOut" bindtap="toList">确定</button>
</view> </view>

Loading…
Cancel
Save