Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wxapp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
亲子游项目
wxapp
Commits
45c2d2cc
Commit
45c2d2cc
authored
Sep 27, 2018
by
ArronYR
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of 123.56.28.111:qz-tour/wxapp
parents
8863f108
bf7ad3e3
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
16 deletions
+53
-16
components/search-filter/index.js
+7
-0
components/search-filter/index.wxss
+1
-1
images/icon_vip_price.png
+0
-0
pages/search/index.js
+43
-15
pages/search/index.wxss
+2
-0
No files found.
components/search-filter/index.js
View file @
45c2d2cc
...
@@ -20,6 +20,7 @@ Component({
...
@@ -20,6 +20,7 @@ Component({
filter_idx
:
0
,
filter_idx
:
0
,
selected
:
{
selected
:
{
type
:
'0'
,
type
:
'0'
,
city
:
'0'
,
catalog
:
'0'
,
catalog
:
'0'
,
region
:
'0'
,
region
:
'0'
,
tags
:
[]
tags
:
[]
...
@@ -74,7 +75,13 @@ Component({
...
@@ -74,7 +75,13 @@ Component({
_selected
.
catalog
=
idx
_selected
.
catalog
=
idx
_selected_titles
.
catalog
=
name
_selected_titles
.
catalog
=
name
}
else
if
(
this
.
data
.
filter_idx
==
3
)
{
}
else
if
(
this
.
data
.
filter_idx
==
3
)
{
if
(
name
==
'国内'
||
name
==
'国外'
)
{
// 国内国外筛选
_selected
.
region
=
idx
_selected
.
region
=
idx
}
else
{
// 城市筛选
_selected
.
city
=
idx
}
_selected_titles
.
region
=
name
_selected_titles
.
region
=
name
}
}
this
.
setData
({
this
.
setData
({
...
...
components/search-filter/index.wxss
View file @
45c2d2cc
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
.filter-content-wrapper {
.filter-content-wrapper {
position: fixed;
position: fixed;
width: 100%;
width: 100%;
top:
96
px;
top:
110
px;
left: 0;
left: 0;
bottom: 0;
bottom: 0;
right: 0;
right: 0;
...
...
images/icon_vip_price.png
0 → 100755
View file @
45c2d2cc
604 Bytes
pages/search/index.js
View file @
45c2d2cc
...
@@ -17,23 +17,47 @@ Page({
...
@@ -17,23 +17,47 @@ Page({
currentPage
:
1
,
currentPage
:
1
,
loading
:
true
,
loading
:
true
,
hasMore
:
true
,
hasMore
:
true
,
filters
:
{
type
:
'0'
,
catalog
:
'0'
,
city
:
'0'
,
region
:
'0'
,
tags
:
[]
}
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
this
.
getListData
()
this
.
getListData
()
},
},
/**
/**
* 加载
* 加载
*/
*/
getListData
:
function
(
callback
)
{
getListData
:
function
(
callback
)
{
const
p
=
this
.
data
.
currentPage
const
p
=
this
.
data
.
currentPage
api
.
search
.
index
({
let
params
=
{
p
p
:
p
}).
then
(
res
=>
{
}
if
(
this
.
data
.
filters
.
tags
.
length
>
0
)
{
params
[
'tags'
]
=
JSON
.
stringify
(
this
.
data
.
filters
.
tags
)
}
if
(
parseInt
(
this
.
data
.
filters
.
city
)
>
0
)
{
params
[
'city'
]
=
this
.
data
.
filters
.
city
}
if
(
parseInt
(
this
.
data
.
filters
.
region
)
>
0
)
{
params
[
'region_type'
]
=
this
.
data
.
filters
.
region
}
if
(
parseInt
(
this
.
data
.
filters
.
type
)
>
0
)
{
params
[
'type'
]
=
this
.
data
.
filters
.
type
}
if
(
parseInt
(
this
.
data
.
filters
.
catalog
)
>
0
)
{
params
[
'catalog_id'
]
=
this
.
data
.
filters
.
catalog
}
// 请求数据接口
api
.
search
.
index
(
params
).
then
(
res
=>
{
if
(
res
.
code
)
{
if
(
res
.
code
)
{
this
.
setData
({
this
.
setData
({
hasMore
:
false
,
hasMore
:
false
,
...
@@ -55,38 +79,37 @@ Page({
...
@@ -55,38 +79,37 @@ Page({
/**
/**
* 生命周期函数--监听页面初次渲染完成
* 生命周期函数--监听页面初次渲染完成
*/
*/
onReady
:
function
()
{
onReady
:
function
()
{
},
},
/**
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
:
function
()
{
onShow
:
function
()
{
},
},
/**
/**
* 生命周期函数--监听页面隐藏
* 生命周期函数--监听页面隐藏
*/
*/
onHide
:
function
()
{
onHide
:
function
()
{
},
},
/**
/**
* 生命周期函数--监听页面卸载
* 生命周期函数--监听页面卸载
*/
*/
onUnload
:
function
()
{
onUnload
:
function
()
{
},
},
/**
/**
* 页面相关事件处理函数--监听用户下拉动作
* 页面相关事件处理函数--监听用户下拉动作
*/
*/
onPullDownRefresh
:
function
()
{
onPullDownRefresh
:
function
()
{
this
.
setData
({
this
.
setData
({
projects
:
[],
projects
:
[],
loading
:
true
,
loading
:
true
,
hasMore
:
true
,
hasMore
:
true
,
currentPage
:
1
currentPage
:
1
...
@@ -105,7 +128,7 @@ Page({
...
@@ -105,7 +128,7 @@ Page({
/**
/**
* 页面上拉触底事件的处理函数
* 页面上拉触底事件的处理函数
*/
*/
onReachBottom
:
function
()
{
onReachBottom
:
function
()
{
let
that
=
this
let
that
=
this
if
(
that
.
data
.
loading
||
!
that
.
data
.
hasMore
)
{
if
(
that
.
data
.
loading
||
!
that
.
data
.
hasMore
)
{
return
;
return
;
...
@@ -123,14 +146,18 @@ Page({
...
@@ -123,14 +146,18 @@ Page({
/**
/**
* 用户点击右上角分享
* 用户点击右上角分享
*/
*/
onShareAppMessage
:
function
()
{
onShareAppMessage
:
function
()
{
},
},
/**
/**
* 用户进行了筛选操作
* 用户进行了筛选操作
*/
*/
filterChange
:
function
(
event
){
filterChange
:
function
(
event
)
{
console
.
log
(
event
)
let
_filters
=
event
.
detail
.
filters
this
.
setData
({
filters
:
_filters
})
wx
.
startPullDownRefresh
()
}
}
})
})
\ No newline at end of file
pages/search/index.wxss
View file @
45c2d2cc
/* pages/search/index.wxss */
/* pages/search/index.wxss */
.page-wrapper{
.page-wrapper{
}
}
.search-header{
.search-header{
background: white;
background: white;
padding-top: 14px;
}
}
.search-wrapper{
.search-wrapper{
display: flex;
display: flex;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment