Page({
data: {
showsearch:false, //显示搜索按钮
searchtext:'', //搜索文字
filterdata:{}, //筛选条件数据
showfilter:false, //是否显示下拉筛选
showfilterindex:null, //显示哪个筛选类目
sortindex:0, //一级分类索引
sortid:null, //一级分类id
subsortindex:0, //二级分类索引
subsortid:null, //二级分类id
cityindex:0, //一级城市索引
cityid:null, //一级城市id
subcityindex:0, //二级城市索引
subcityid:null, //二级城市id
servicelist:[], //服务集市列表
scrolltop:null, //滚动位置
page: 0 //分页
},
onLoad: function () { //加载数据渲染页面
this.fetchServiceData();
this.fetchFilterData();
},
fetchFilterData:function(){ //获取筛选条件
this.setData({
filterdata:{
"sort": [
{
"id": 0,
"title": "全部"
},
{
"id": 1,
"title": "人力资源",
"subsort": [
{
"id": 1,
"title": "全部"
},
{
"id": 11,
"title": "社会及商业保险"
},
{
"id": 12,
"title": "招聘、猎头"
},
{
"id": 13,
"title": "薪酬绩效"
},
]
},
{
"id": 2,
"title": "财务法务",
"subsort": [
{
"id": 2,
"title": "全部"
},
{
"id": 21,
"title": "知识产权保护"
},
{
"id": 22,
"title": "工商注册"
},
{
"id": 23,
"title": "法律咨询"
},
]
},
{
"id": 3,
"title": "行政办公",
"subsort": [
{
"id": 3,
"title": "全部"
},
{
"id": 31,
"title": "翻译"
},
{
"id": 32,
"title": "速记"
}
]
},
{
"id": 4,
"title": "创业指导",
"subsort": [
{
"id": 4,
"title": "全部"
},
{
"id": 41,
"title": "创业培训"
}
]
},
],
"city": [
{
"id": 0,
"title": "全部"
},
{
"id": 1,
"title": "湖北省",
"subcity": [
{
"id": 1,
"title": "全部"
},
{
"id": 11,
"title": "武汉市"
},
{
"id": 12,
"title": "襄阳市"
},
{
"id": 13,
"title": "孝感市"
},
{
"id": 14,
"title": "随州市"
},
{
"id": 15,
"title": "荆州市"
},
{
"id": 16,
"title": "黄冈市"
},
{
"id": 17,
"title": "天门市"
},
{
"id": 18,
"title": "仙桃市"
},
{
"id": 19,
"title": "潜江市"
},
{
"id": 20,
"title": "十堰市"
},
{
"id": 21,
"title": "宜昌市"
},
{
"id": 22,
"title": "咸宁市"
},
]
},
{
"id": 2,
"title": "浙江省",
"subcity": [
{
"id": 2,
"title": "全部"
},
{
"id": 21,
"title": "杭州市"
},
{
"id": 22,
"title": "金华市"
},
{
"id": 23,
"title": "义乌市"
},
]
},
{
"id": 3,
"title": "江苏省",
"subcity": [
{
"id": 3,
"title": "全部"
},
{
"id": 31,
"title": "南京市"
},
{
"id": 32,
"title": "苏州市"
}
]
}
],
}
})
},
fetchServiceData:function(){ //获取城市列表
let _this = this;
wx.showToast({
title: '加载中',
icon: 'loading'
})
const perpage = 10;
this.setData({
page:this.data.page+1
})
const page = this.data.page;
const newlist = [];
for (var i = (page-1)*perpage; i < page*perpage; i++) {
newlist.push({
"id":i+1,
"name":"上海拜特信息技术有限公司"+(i+1),
"city":"上海",
"tag":"法律咨询",
"imgurl":"http://img.mukewang.com/57fdecf80001fb0406000338-240-135.jpg"
})
}
setTimeout(()=>{
_this.setData({
servicelist:_this.data.servicelist.concat(newlist)
})
},1500)
},
inputSearch:function(e){ //输入搜索文字
this.setData({
showsearch:e.detail.cursor>0,
searchtext:e.detail.value
})
},
submitSearch:function(){ //提交搜索
console.log(this.data.searchtext);
this.fetchServiceData();
},
setFilterPanel: function(e){ //展开筛选面板
const d = this.data;
const i = e.currentTarget.dataset.findex;
if(d.showfilterindex == i){
this.setData({
showfilter: false,
showfilterindex: null
})
}else{
this.setData({
showfilter: true,
showfilterindex:i,
})
}
console.log(d.showfilterindex);
},
setSortIndex:function(e){ //服务类别一级索引
const d= this.data;
const dataset = e.currentTarget.dataset;
this.setData({
sortindex:dataset.sortindex,
sortid:dataset.sortid,
subsortindex: d.sortindex==dataset.sortindex ? d.subsortindex:0
})
console.log('服务类别id:一级--'+this.data.sortid+',二级--'+this.data.subsortid);
},
setSubsortIndex:function(e){ //服务类别二级索引
const dataset = e.currentTarget.dataset;
this.setData({
subsortindex:dataset.subsortindex,
subsortid:dataset.subsortid,
})
console.log('服务类别id:一级--'+this.data.sortid+',二级--'+this.data.subsortid);
},
setCityIndex:function(e){ //服务城市一级索引
const d= this.data;
const dataset = e.currentTarget.dataset;
this.setData({
cityindex:dataset.cityindex,
cityid:dataset.cityid,
subcityindex: d.cityindex==dataset.cityindex ? d.subcityindex:0
})
console.log('服务城市id:一级--'+this.data.cit
没有合适的资源?快使用搜索试试~ 我知道了~
创客+实现大量功能,推荐研究_企业城微信小程序js代码前台前端H5页面源码.rar
共143个文件
png:75个
js:17个
wxss:16个
0 下载量 199 浏览量
2023-08-09
13:01:44
上传
评论
收藏 779KB RAR 举报
温馨提示
创客+实现大量功能,推荐研究_企业城微信小程序js代码前台前端H5页面源码.rar
资源推荐
资源详情
资源评论
收起资源包目录
创客+实现大量功能,推荐研究_企业城微信小程序js代码前台前端H5页面源码.rar (143个子文件)
.gitattributes 378B
.gitignore 574B
banner_02.jpg 61KB
bg_02.jpg 23KB
service.js 9KB
conference.js 5KB
question.js 4KB
space.js 4KB
index.js 2KB
activity.js 2KB
apply.js 2KB
myconferencelist.js 2KB
activitydetail.js 1KB
util.js 1KB
conferencedetail.js 1KB
property.js 1KB
resource.js 1KB
app.js 916B
spacereserve.js 721B
servicedetail.js 436B
my.js 11B
app.json 1KB
conference.json 157B
activity.json 154B
service.json 151B
jsconfig.json 74B
myconferencelist.json 57B
conferencedetail.json 51B
spacereserve.json 48B
activitydetail.json 48B
apply.json 48B
property.json 48B
my.json 48B
space.json 48B
servicedetail.json 48B
resource.json 45B
question.json 45B
4.png 136KB
1.png 118KB
5.png 87KB
7.png 63KB
6.png 60KB
2.png 29KB
8.png 26KB
9.png 21KB
10.png 20KB
3.png 9KB
icon_27.png 7KB
icon_25.png 7KB
icon_23.png 6KB
icon_03.png 5KB
icon_11.png 5KB
icon_29.png 5KB
icon_07.png 4KB
icon_05.png 4KB
icon_13.png 4KB
icon_09.png 4KB
icon_01.png 4KB
icon_26.png 2KB
icon_28.png 2KB
sousuoleimufill.png 2KB
icon_32.png 2KB
icon_30.png 2KB
up.png 2KB
icon_24.png 2KB
pengyoufill.png 2KB
guanbi2fill.png 1KB
zuobiaofill.png 1KB
pengyou.png 1KB
radioalt.png 1KB
gouwuchefill.png 1KB
zuobiao.png 1KB
jiahao2fill.png 1KB
xinxifill.png 1KB
biaoxingfill.png 1KB
xinxi.png 1KB
dianpufill.png 1KB
wenhao.png 1KB
radiofill.png 1KB
xihuan.png 1KB
biaoxing.png 1KB
tongzhifill.png 1KB
shizhong.png 1KB
shuaxin.png 1KB
xihuanfill.png 1KB
radio.png 1KB
yonghu.png 1KB
sousuo.png 1KB
wenhaofill.png 1KB
tongzhi.png 1019B
yonghufill.png 1010B
xiangji1fill.png 985B
shizhongfill.png 974B
zantongfill.png 965B
shouyefill.png 930B
shouye.png 866B
guanbi1.png 780B
xiangyou1.png 771B
liuyanfill.png 763B
xiangshang2.png 738B
共 143 条
- 1
- 2
资源评论
76725413
- 粉丝: 15
- 资源: 6951
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 20240420-扬州高中小学部风雨操场转换层条件图r.dwg
- 小猫咪邮件在线发送系统源码v1.1,支持添加附件
- 永磁电机铜耗估算表-Excel-v1.0
- 参考资料-人工智能对劳动力市场的影响机制研究.pdf
- 协同供应链集成产品介绍V71sp1.rar
- 上市公司-人工智能的采纳程度面板数据(2003-2021年).xlsx
- 参考资料-人工智能技术应用对就业的影响及作用机制研究-来自制造业企业的微观证据.pdf
- 第5章spring-mvc请求映射处理
- 2023-04-06-项目笔记 - 第一百十六阶段 - 4.4.2.114全局变量的作用域-114 -2024.04.27
- 协同供应链集成产品介绍V70.rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功