Commit 826c11e8 by YangChengYuan

美行攻略添加了搜索功能

parent 09ac9c2c
......@@ -4,7 +4,7 @@ import api from './utils/Api.js'
App({
onLaunch: function(options) {
this.options = options
// 用户登录
// 用户登录
// this.checkUserLogin()
},
......
......@@ -119,5 +119,6 @@ Page({
typeof callback == "function" && callback()
}
})
}
},
})
\ No newline at end of file
<!--pages/guide/index.wxml-->
<view class='v-page'>
<!-- 搜索 -->
<form class="search_out">
<icon class='icon-search' type='search' size='14'></icon>
<input class="iptSearch" placeholder="关键词如地名、游泳等" value='{{iptValue}}' confirm-type="search" />
<icon class='icon-clear' type='clear' size='14' bindtap='clearContent'></icon>
</form>
<view class='guides-container'>
<view class="guide-wrapper" wx:for="{{guides}}" wx:for-item="n" wx:key="n.id" catchtap='handleGuideDetail' data-content="{{n.type=='1'?n.id:n.content}}" data-type="{{n.type}}">
<image class='image' src="{{n.poster}}" mode='aspectFill'></image>
......
/* pages/guide/index.wxss */
/* 搜索*/
.search_out{
width: 100%;
height: 50px;
display: block;
padding: 20rpx;
box-sizing: border-box;
position: relative;
background: rgb(207, 207, 207);
}
.search_out .icon-search{
position: absolute;
left: 20px;
top: calc(50% - 9px);
}
.search_out .icon-clear{
position: absolute;
right: 20px;
top: calc(50% - 9px);
opacity: 0.85;
}
.search_out .iptSearch{
width: 100%;
height: 30px;
box-sizing: border-box;
-ms-box-sizing: border-box;
-webkit-box-sizing: border-box;
margin: 0 auto;
padding-left: 32px;
padding-right: 32px;
background: rgb(255, 255, 255);
border-radius: 3px;
font-size: 12px;
}
/* 搜索结束*/
.v-page {
position: relative;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment