Commit 8e89955d by YangChengYuan

美行攻略增加搜索请求功能和VIP页增加了表单

parent 826c11e8
......@@ -10,10 +10,11 @@ Page({
*/
data: {
guides: [],
iptValue: '',
currentPage: 1,
loading: true,
hasMore: true,
i: 0
},
/**
......@@ -120,5 +121,33 @@ Page({
}
})
},
/* 美行攻略 的 重置input框的文本*/
clearContent: function () {
this.setData({
iptValue: ''
})
},
/* 美行攻略 的 搜索请求*/
searchFun: function (e) {
const p = this.data.currentPage
var title = e.detail.value
api.guide.list({
title, p
}).then(res => {
if (res.code) {
this.setData({
hasMore: false,
loading: false
})
} else {
this.setData({
guides: this.data.guides = res.data,
loading: false,
hasMore: res.data && res.data.length > 0 ? true : false,
currentPage: res.data && res.data.length > 0 ? p : (p - 1)
})
typeof callback == "function" && callback()
}
})
}
})
\ No newline at end of file
......@@ -3,7 +3,15 @@
<!-- 搜索 -->
<form class="search_out">
<icon class='icon-search' type='search' size='14'></icon>
<input class="iptSearch" placeholder="关键词如地名、游泳等" value='{{iptValue}}' confirm-type="search" />
<input
class="iptSearch"
placeholder="关键词如地名、游泳等"
value='{{iptValue}}'
confirm-type="搜索"
type='text'
bindconfirm="searchFun"
bindinput='getIptValue'
/>
<icon class='icon-clear' type='clear' size='14' bindtap='clearContent'></icon>
</form>
......
......@@ -5,6 +5,7 @@
"i-row": "/iview/row/index",
"i-col": "/iview/col/index",
"i-input-number": "/iview/input-number/index",
"i-button": "/iview/button/index"
"i-button": "/iview/button/index",
"i-input": "/iview/input/index"
}
}
\ No newline at end of file
......@@ -20,6 +20,14 @@
会员卡说明:用户购买一次会员卡后,增加一年的会员时限,多次购买则在先有的基础上延长时间,单次以1年为标准。
</view>
<!-- 用户输入的信息 -->
<i-input i-class="right-align" value="" title="姓名" type="text" placeholder="请输入您的姓名" />
<view class='phoneGive'>
<text>手机号</text>
<button>授权</button>
</view>
<i-input i-class="right-align right-align-last" type="text" title="地址" placeholder="请输入您的地址" maxlength="50" />
<i-row class='height'>
<i-col span="20" offset='2' i-class="col-class">
<i-button bind:click="handleClick" type="primary" shape="circle" size="small">立即{{user.is_vip==1?'续费':'购买'}} ¥{{common.numFixed(vip_price*value1, 2)}}</i-button>
......
......@@ -4,6 +4,48 @@ page {
background-color: #f7f7f7;
}
/* 会员信息*/
.right-align{
border-top: 1px solid rgba(0, 0, 0, 0.1);
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.right-align input{
text-align: right;
}
.phoneGive{
width: 100%;
height: 45px;
box-sizing: border-box;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding: 0 15px;
background: white;
}
.phoneGive text{
width: 75px;
min-width:65px;
height: 100%;
line-height: 45px;
display: inline-block;
font-size: 14px;
color:#495060;
padding-right: 10px;
}
.phoneGive button{
width: 65px;
height: 80%;
padding: 0;
margin: 0;
display: inline-block;
border: 1px solid rgba(0, 0, 0, 0.4);
border-radius: 50px;
color:#495060;
font-size: 14px;
}
.card-box {
width: 690rpx;
height: 385rpx;
......
......@@ -4,7 +4,7 @@
"ignore": []
},
"setting": {
"urlCheck": true,
"urlCheck": false,
"es6": true,
"postcss": true,
"minified": true,
......
......@@ -5,7 +5,7 @@
// }
export const Config = {
apiPath: "https://mavaler.jqhulian.com/api/",
apiPath: "https://meixz.utools.club/api/",
mobPath: "https://mavaler.jqhulian.com/mob/",
shopJoinPath: "https://mavaler.jqhulian.com/mob/Index/shopjoin"
}
......
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