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

Loading…
Cancel
Save