Commit 547aa6117fa464fc63034714aca876b97627d2e2

Authored by vking
1 parent 451599d0

search

... ... @@ -32,7 +32,8 @@
"pages/reserve/share",
"pages/reserve/submit",
"pages/me/history",
"pages/reserve/remark"
"pages/reserve/remark",
"pages/reserve/findSeller"
],
"subpackages": [
{
... ...
// components/reserve/search/how/hv/date.js
var myBehavior = require('hv_behavior')
const items=(function(){
let today=parseInt(new Date()/1000);
let ds=[]
for(let i=0;i<=15;i++){
ds.push(today+86400*i)
}
return ds
})()
Component({
behaviors: [myBehavior],
data:{
items:items,
},
lifetimes: {
attached: function () {
// 在组件实例进入页面节点树时执行
this.setData({
spi:this.data.pi,
})
},
detached: function () {
// 在组件实例被从页面节点树移除时执行
},
},
/**
* 组件的方法列表
*/
methods: {
}
})
... ...
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--components/reserve/search/how/hv/date.wxml-->
<wxs src="../../../../utils/util.wxs" module="util" />
<swiper previous-margin="20rpx" next-margin="20rpx"
class="tabs"
display-multiple-items="5">
<swiper-item wx:for="{{items}}" wx:key="items">
<view class="item {{spi==index?'active':''}} flex-vc" bindtap="checked" data-index="{{index}}" data-val="{{item}}" data-type="date">
<view class="name">{{util.unixtoTime(item,'DAY')||util.unixtoTime(item,'周WW')}}</view>
<view class="mmdd">{{util.unixtoTime(item,'MM.DD')}}</view>
</view>
</swiper-item>
</swiper>
... ...
/* components/reserve/search/how/hv/date.wxss */
@import "hv_behavior.wxss";
.item .name{
height: 42rpx;
font-size: 30rpx;
line-height: 42rpx;
}
.item .mmdd{
height: 34rpx;
line-height: 34rpx;
margin-top: 4rpx;
font-size: 24rpx;
}
\ No newline at end of file
... ...
// components/reserve/search/how/dur.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})
... ...
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--components/reserve/search/how/dur.wxml-->
<view class="tabs flex-ll">
<view class="item" data-id="1">
早餐
</view>
<view class="item" data-id="2">
午餐
</view>
<view class="item" data-id="3">
晚餐
</view>
</view>
... ...
/* components/reserve/search/how/dur.wxss */
@import "hv_behavior.wxss";
... ...
// components/reserve/search/how/hv.js
import util from '../../../../utils/util'
module.exports = Behavior({
properties: {
pi: {
type: Number,
value:0,
}
},
data: {
},
attached: function(){
},
methods: {
gotoHere(){
this.data.index;
},
checked(e){
let index=util.attr(e,'index')
let val=util.attr(e,'val')
let type=util.attr(e,'type')
this.setData({
spi:index,
})
this.triggerEvent('event',{index,val,type})
}
}
})
\ No newline at end of file
... ...
/* components/reserve/search/how/hv.wxss */
@import "../../../../app.wxss";
.tabs {
height: 100rpx;
}
.tabs .item{
width:120rpx;
height:100rpx;
line-height: 100rpx;
border-radius:10rpx;
border:2rpx solid #fffff;
font-size:30rpx;
font-weight:600;
color:#353535;
text-align: center;
box-sizing: border-box;
}
.tabs .item.active{
border-radius:10rpx;
background:rgba(255,245,235,1);
border:2px solid rgba(195,165,108,1);
color:rgba(192,163,105,1);
}
\ No newline at end of file
... ...
// components/reserve/search/how/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
pnumEvent(e){
console.log(e)
},
dateEvent(e){
console.log(e)
},
}
})
... ...
{
"component": true,
"usingComponents": {
"date":"./date",
"pnum":"./pnum",
"dur":"./dur"
}
}
\ No newline at end of file
... ...
<!--components/reserve/search/how/index.wxml-->
<view class="mask"></view>
<view class="pages {{hasPage?'':'window'}}">
<view>
<view>您好,几位,什么时候</view>
<view class="close">X</view>
</view>
<view>
<pnum bindevent="pnumEvent"></pnum>
<view style="margin: 60rpx 0">
<date bindevent="dateEvent"></date>
</view>
<dur></dur>
</view>
<view class="button" bindtap></view>
</view>
... ...
/* components/reserve/search/how/index.wxss */
\ No newline at end of file
... ...
// components/reserve/search/how/hv/pnum.js
var myBehavior = require('hv_behavior')
const items=(function(){
let today=1;
let ds=[]
for(let i=0;i<=30;i++){
ds.push(today+i)
}
return ds
})()
Component({
behaviors: [myBehavior],
data:{
items:items,
},
lifetimes: {
attached: function () {
// 在组件实例进入页面节点树时执行
this.setData({
spi:this.data.pi==0?3:this.data.pi,
})
},
detached: function () {
// 在组件实例被从页面节点树移除时执行
},
},
/**
* 组件的方法列表
*/
methods: {
}
})
... ...
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--components/reserve/search/how/hv/pnum.wxml-->
<swiper previous-margin="20rpx" next-margin="20rpx"
class="tabs"
display-multiple-items="5">
<swiper-item wx:for="{{items}}" wx:key="items">
<view class="item {{spi==index?'active':''}} flex-vc" bindtap="checked" data-index="{{index}}" data-val="{{item}}" data-type="pnum">
<view class="name">{{item>30?'30位以上':item+' 位'}}</view>
</view>
</swiper-item>
</swiper>
... ...
/* components/reserve/search/how/hv/pnum.wxss */
@import "hv_behavior.wxss";
.item .name{
font-size: 30rpx;
line-height: 40rpx;
}
\ No newline at end of file
... ...
// pages/reserve/findSeller.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
howEvent(e){
console.log(e)
},
})
\ No newline at end of file
... ...
{
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"navigationBarTitleText":"周到安排",
"usingComponents": {
"nav":"/components/nav/nav",
"how":"/components/reserve/search/how/index"
}
}
\ No newline at end of file
... ...
<!--pages/reserve/findSeller.wxml-->
<nav id="nav">周到安排</nav>
<how bindevent="howEvent" hasPage></how>
... ...
/* pages/reserve/findSeller.wxss */
\ No newline at end of file
... ...
... ... @@ -31,14 +31,14 @@
</formids>
</view>
<view class="seller-view {{(listMoreCount<1)?(hasSearchLimit?'disabled enabled':'disabled'):''}}">
<cover-view class="toast" wx:if="{{hasGetSellersEnd && listMoreCount<1 && !hasSearchLimit && markers.length<2}}">该地区没有可供预订的餐厅哦!努力开通中</cover-view>
<cover-view class="toast" wx:if="{{hasGetSellersEnd && markers.length<2 && listMoreCount>0}}">移动或缩放地图,获取更多餐厅</cover-view>
<cover-view class="flex-vc transverse-view-top" bindtap="listShow" wx:if="{{hasGetSellersEnd && listMoreCount>0}}">
<cover-view class="line"></cover-view>
<cover-view class="text">
<cover-view>{{hasSellers?'查看其它':'已扩大范围为你找到'}}{{listMoreCount}}家餐厅</cover-view>
</cover-view>
</cover-view>
<view class="toast" wx:if="{{hasGetSellersEnd && listMoreCount<1 && !hasSearchLimit && markers.length<2}}">该地区没有可供预订的餐厅哦!努力开通中</view>
<view class="toast" wx:if="{{hasGetSellersEnd && markers.length<2 && listMoreCount>0}}">移动或缩放地图,获取更多餐厅</view>
<view class="flex-vc transverse-view-top" bindtap="listShow" wx:if="{{hasGetSellersEnd && listMoreCount>0}}">
<view class="line"></view>
<view class="text">
<view>{{hasSellers?'查看其它':'已扩大范围为你找到'}}{{listMoreCount}}家餐厅</view>
</view>
</view>
<view class="transverse-search flex-ll">
<view
bindtap="caixiShow"
... ... @@ -57,6 +57,12 @@
bindtap="tagsChange"
data-id="{{item.id}}">{{item.name}}</view>
</block>
<navigator url="./findSeller">
<view class="fingSeller flex-ll">
<view class="icon"></view>
<view>查找餐厅</view>
</view>
</navigator>
</view>
<view class="transverse-list">
<swiper
... ...
... ... @@ -97,12 +97,12 @@ page{
}
.picker{
height: 50rpx;
line-height: 50rpx;
height: 30rpx;
line-height: 30rpx;
}
.picker .input{
height: 50rpx;
line-height: 50rpx;
height: 30rpx;
line-height: 30rpx;
margin-right: 10rpx;
}
.picker .more{
... ... @@ -228,24 +228,44 @@ page{
background-image: url("http://qn.colorcun.com/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20190925175650.png");
}
.transverse-search .tags{
height: 50rpx;
line-height: 50rpx;
background-color: #F0F0F9;
border-radius: 4rpx;
margin-right: 30rpx;
padding: 0 16rpx;
height: 30rpx;
line-height: 30rpx;
/*background-color: #F0F0F9;*/
/*border-radius: 4rpx;*/
padding: 0 22rpx;
border-right:2rpx solid #E0E0E0;
}
.transverse-search .tags:first-child{
padding-left: 0;
}
.transverse-search .tags:last-child{
margin-right: 0;
border-right-width:0;
}
.transverse-search .tags.active{
background:linear-gradient(to bottom ,#F4DAB9,#E9BE94);
color:#8B5318;
/*background:linear-gradient(to bottom ,#F4DAB9,#E9BE94);*/
color:#C0A369;
font-weight: 900;
}
.fingSeller{
height: 70rpx;
line-height: 70rpx;
width: 172rpx;
box-shadow:-12rpx 0 10rpx -8rpx rgba(178,177,177,0.5);
box-sizing: border-box;
padding-left: 28rpx;
font-weight:600;
color:rgba(240,85,34,1);
}
.fingSeller .icon{
width: 32rpx;
height: 30rpx;
margin-right: 6rpx;
background-image: url("http://qn.colorcun.com/reserve/images/find.png");
background-size: 100% 100%;
}
/* seller-view start*/
/* seller-view start*/
.seller-view{
height: 470rpx;
position:fixed;
... ...
... ... @@ -29,9 +29,7 @@
"projectname": "c%E7%AB%AF%E9%A2%84%E5%AE%9A",
"isGameTourist": false,
"simulatorType": "wechat",
"simulatorPluginLibVersion": {
"qywx_simulator_plugin": "1.2.0"
},
"simulatorPluginLibVersion": {},
"condition": {
"search": {
"current": -1,
... ... @@ -576,6 +574,13 @@
"pathName": "pack-book/pages/book/b_addnew",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/reserve/findSeller",
"pathName": "pages/reserve/findSeller",
"query": "",
"scene": null
}
]
}
... ...
... ... @@ -29,7 +29,7 @@ function unixtoTime(ns,format="YYYY-MM-DD HH:II:SS") {
case 6:week="六";break
}
result=result.replace('WW',week);
if(format.indexOf('DAY')>0){
if(format.indexOf('DAY')>-1){
// 获取当天 0 点的时间戳
var timeStamp = getDate(getDate().setHours(0, 0, 0, 0)) / 1000;
... ...