Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-miniapp-eshop
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
yyq
7 years ago
Commit
ee4b2560c2f0d7f157feb0db1216e54b94bcd0d2
2 parents
44c46a90
557557a1
Merge branch 'feature/import' of git.yoho.cn:fe/yoho-miniapp-eshop into feature/import
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
app/pages/product/search/search.js
app/pages/product/search/search.wxml
app/project.config.json
app/pages/product/search/search.js
View file @
ee4b256
...
...
@@ -163,12 +163,24 @@ Page({
this
.
productList
(
params
);
},
searchRecent
:
function
()
{
searchRecent
:
function
(
e
)
{
const
key
=
e
.
target
.
dataset
.
key
;
this
.
confirmQuery
({
detail
:
{
value
:
key
}
});
},
deleteRecent
:
function
()
{
wx
.
setStorage
({
key
:
'search_hot_keys'
,
data
:
[]
});
this
.
setData
({
recentKeys
:
[]
});
},
setRecentKeys
:
function
(
key
)
{
...
...
app/pages/product/search/search.wxml
View file @
ee4b256
...
...
@@ -10,7 +10,8 @@
<view class="title">最近搜索
<image class="delete" src="../../../static/images/delete.png" bindtap="deleteRecent"></image></view>
<view class="keys">
<text wx:for="{{recentKeys}}" wx:key="{{item}}" class="key" bindtap="searchRecent">{{item}}</text>
<text wx:for="{{recentKeys}}" wx:key="{{item}}"
class="key" bindtap="searchRecent" data-key="{{item}}">{{item}}</text>
</view>
</view>
<view hidden="{{!searched}}">
...
...
app/project.config.json
View file @
ee4b256
...
...
@@ -10,7 +10,7 @@
"compileType"
:
"miniprogram"
,
"libVersion"
:
"1.9.1"
,
"appid"
:
"wxe8bfc9b404772199"
,
"projectname"
:
"%E6%9C%89%E8%B4%A7%E
5%AE%98%E6%96%B9-VANS
"
,
"projectname"
:
"%E6%9C%89%E8%B4%A7%E
6%9C%89%E7%9B%9F%E6%A8%A1%E6%9D%BF
"
,
"condition"
:
{
"search"
:
{
"current"
:
-1
,
...
...
Please
register
or
login
to post a comment