Showing
27 changed files
with
399 additions
and
27 deletions
| @@ -32,7 +32,8 @@ | @@ -32,7 +32,8 @@ | ||
| 32 | "pages/reserve/share", | 32 | "pages/reserve/share", |
| 33 | "pages/reserve/submit", | 33 | "pages/reserve/submit", |
| 34 | "pages/me/history", | 34 | "pages/me/history", |
| 35 | - "pages/reserve/remark" | 35 | + "pages/reserve/remark", |
| 36 | + "pages/reserve/findSeller" | ||
| 36 | ], | 37 | ], |
| 37 | "subpackages": [ | 38 | "subpackages": [ |
| 38 | { | 39 | { |
components/reserve/search/how/date.js
0 → 100644
| 1 | +// components/reserve/search/how/hv/date.js | ||
| 2 | +var myBehavior = require('hv_behavior') | ||
| 3 | +const items=(function(){ | ||
| 4 | + let today=parseInt(new Date()/1000); | ||
| 5 | + let ds=[] | ||
| 6 | + for(let i=0;i<=15;i++){ | ||
| 7 | + ds.push(today+86400*i) | ||
| 8 | + } | ||
| 9 | + return ds | ||
| 10 | +})() | ||
| 11 | +Component({ | ||
| 12 | + behaviors: [myBehavior], | ||
| 13 | + data:{ | ||
| 14 | + items:items, | ||
| 15 | + }, | ||
| 16 | + lifetimes: { | ||
| 17 | + attached: function () { | ||
| 18 | + // 在组件实例进入页面节点树时执行 | ||
| 19 | + this.setData({ | ||
| 20 | + spi:this.data.pi, | ||
| 21 | + }) | ||
| 22 | + }, | ||
| 23 | + detached: function () { | ||
| 24 | + // 在组件实例被从页面节点树移除时执行 | ||
| 25 | + }, | ||
| 26 | + }, | ||
| 27 | + /** | ||
| 28 | + * 组件的方法列表 | ||
| 29 | + */ | ||
| 30 | + methods: { | ||
| 31 | + | ||
| 32 | + } | ||
| 33 | +}) |
components/reserve/search/how/date.json
0 → 100644
components/reserve/search/how/date.wxml
0 → 100644
| 1 | +<!--components/reserve/search/how/hv/date.wxml--> | ||
| 2 | +<wxs src="../../../../utils/util.wxs" module="util" /> | ||
| 3 | +<swiper previous-margin="20rpx" next-margin="20rpx" | ||
| 4 | + class="tabs" | ||
| 5 | + display-multiple-items="5"> | ||
| 6 | + <swiper-item wx:for="{{items}}" wx:key="items"> | ||
| 7 | + <view class="item {{spi==index?'active':''}} flex-vc" bindtap="checked" data-index="{{index}}" data-val="{{item}}" data-type="date"> | ||
| 8 | + <view class="name">{{util.unixtoTime(item,'DAY')||util.unixtoTime(item,'周WW')}}</view> | ||
| 9 | + <view class="mmdd">{{util.unixtoTime(item,'MM.DD')}}</view> | ||
| 10 | + </view> | ||
| 11 | + </swiper-item> | ||
| 12 | +</swiper> |
components/reserve/search/how/date.wxss
0 → 100644
components/reserve/search/how/dur.js
0 → 100644
components/reserve/search/how/dur.json
0 → 100644
components/reserve/search/how/dur.wxml
0 → 100644
components/reserve/search/how/dur.wxss
0 → 100644
components/reserve/search/how/hv_behavior.js
0 → 100644
| 1 | +// components/reserve/search/how/hv.js | ||
| 2 | +import util from '../../../../utils/util' | ||
| 3 | +module.exports = Behavior({ | ||
| 4 | + properties: { | ||
| 5 | + pi: { | ||
| 6 | + type: Number, | ||
| 7 | + value:0, | ||
| 8 | + } | ||
| 9 | + }, | ||
| 10 | + data: { | ||
| 11 | + | ||
| 12 | + }, | ||
| 13 | + attached: function(){ | ||
| 14 | + | ||
| 15 | + }, | ||
| 16 | + methods: { | ||
| 17 | + gotoHere(){ | ||
| 18 | + this.data.index; | ||
| 19 | + }, | ||
| 20 | + checked(e){ | ||
| 21 | + let index=util.attr(e,'index') | ||
| 22 | + let val=util.attr(e,'val') | ||
| 23 | + let type=util.attr(e,'type') | ||
| 24 | + this.setData({ | ||
| 25 | + spi:index, | ||
| 26 | + }) | ||
| 27 | + this.triggerEvent('event',{index,val,type}) | ||
| 28 | + } | ||
| 29 | + } | ||
| 30 | +}) |
| 1 | +/* components/reserve/search/how/hv.wxss */ | ||
| 2 | +@import "../../../../app.wxss"; | ||
| 3 | +.tabs { | ||
| 4 | + height: 100rpx; | ||
| 5 | +} | ||
| 6 | +.tabs .item{ | ||
| 7 | + width:120rpx; | ||
| 8 | + height:100rpx; | ||
| 9 | + line-height: 100rpx; | ||
| 10 | + border-radius:10rpx; | ||
| 11 | + border:2rpx solid #fffff; | ||
| 12 | + font-size:30rpx; | ||
| 13 | + font-weight:600; | ||
| 14 | + color:#353535; | ||
| 15 | + text-align: center; | ||
| 16 | + box-sizing: border-box; | ||
| 17 | +} | ||
| 18 | +.tabs .item.active{ | ||
| 19 | + border-radius:10rpx; | ||
| 20 | + background:rgba(255,245,235,1); | ||
| 21 | + border:2px solid rgba(195,165,108,1); | ||
| 22 | + color:rgba(192,163,105,1); | ||
| 23 | +} |
components/reserve/search/how/index.js
0 → 100644
| 1 | +// components/reserve/search/how/index.js | ||
| 2 | +Component({ | ||
| 3 | + /** | ||
| 4 | + * 组件的属性列表 | ||
| 5 | + */ | ||
| 6 | + properties: { | ||
| 7 | + | ||
| 8 | + }, | ||
| 9 | + | ||
| 10 | + /** | ||
| 11 | + * 组件的初始数据 | ||
| 12 | + */ | ||
| 13 | + data: { | ||
| 14 | + | ||
| 15 | + }, | ||
| 16 | + | ||
| 17 | + /** | ||
| 18 | + * 组件的方法列表 | ||
| 19 | + */ | ||
| 20 | + methods: { | ||
| 21 | + pnumEvent(e){ | ||
| 22 | + console.log(e) | ||
| 23 | + }, | ||
| 24 | + dateEvent(e){ | ||
| 25 | + console.log(e) | ||
| 26 | + }, | ||
| 27 | + } | ||
| 28 | +}) |
components/reserve/search/how/index.json
0 → 100644
components/reserve/search/how/index.wxml
0 → 100644
| 1 | +<!--components/reserve/search/how/index.wxml--> | ||
| 2 | +<view class="mask"></view> | ||
| 3 | +<view class="pages {{hasPage?'':'window'}}"> | ||
| 4 | + <view> | ||
| 5 | + <view>您好,几位,什么时候</view> | ||
| 6 | + <view class="close">X</view> | ||
| 7 | + </view> | ||
| 8 | + <view> | ||
| 9 | + <pnum bindevent="pnumEvent"></pnum> | ||
| 10 | + <view style="margin: 60rpx 0"> | ||
| 11 | + <date bindevent="dateEvent"></date> | ||
| 12 | + </view> | ||
| 13 | + <dur></dur> | ||
| 14 | + </view> | ||
| 15 | + <view class="button" bindtap></view> | ||
| 16 | +</view> | ||
| 17 | + |
components/reserve/search/how/index.wxss
0 → 100644
| 1 | +/* components/reserve/search/how/index.wxss */ |
components/reserve/search/how/pnum.js
0 → 100644
| 1 | +// components/reserve/search/how/hv/pnum.js | ||
| 2 | +var myBehavior = require('hv_behavior') | ||
| 3 | +const items=(function(){ | ||
| 4 | + let today=1; | ||
| 5 | + let ds=[] | ||
| 6 | + for(let i=0;i<=30;i++){ | ||
| 7 | + ds.push(today+i) | ||
| 8 | + } | ||
| 9 | + return ds | ||
| 10 | +})() | ||
| 11 | +Component({ | ||
| 12 | + behaviors: [myBehavior], | ||
| 13 | + data:{ | ||
| 14 | + items:items, | ||
| 15 | + }, | ||
| 16 | + lifetimes: { | ||
| 17 | + attached: function () { | ||
| 18 | + // 在组件实例进入页面节点树时执行 | ||
| 19 | + this.setData({ | ||
| 20 | + spi:this.data.pi==0?3:this.data.pi, | ||
| 21 | + }) | ||
| 22 | + }, | ||
| 23 | + detached: function () { | ||
| 24 | + // 在组件实例被从页面节点树移除时执行 | ||
| 25 | + }, | ||
| 26 | + }, | ||
| 27 | + | ||
| 28 | + /** | ||
| 29 | + * 组件的方法列表 | ||
| 30 | + */ | ||
| 31 | + methods: { | ||
| 32 | + | ||
| 33 | + } | ||
| 34 | +}) |
components/reserve/search/how/pnum.json
0 → 100644
components/reserve/search/how/pnum.wxml
0 → 100644
| 1 | +<!--components/reserve/search/how/hv/pnum.wxml--> | ||
| 2 | +<swiper previous-margin="20rpx" next-margin="20rpx" | ||
| 3 | + class="tabs" | ||
| 4 | + display-multiple-items="5"> | ||
| 5 | + <swiper-item wx:for="{{items}}" wx:key="items"> | ||
| 6 | + <view class="item {{spi==index?'active':''}} flex-vc" bindtap="checked" data-index="{{index}}" data-val="{{item}}" data-type="pnum"> | ||
| 7 | + <view class="name">{{item>30?'30位以上':item+' 位'}}</view> | ||
| 8 | + </view> | ||
| 9 | + </swiper-item> | ||
| 10 | +</swiper> |
components/reserve/search/how/pnum.wxss
0 → 100644
pages/reserve/findSeller.js
0 → 100644
| 1 | +// pages/reserve/findSeller.js | ||
| 2 | +Page({ | ||
| 3 | + | ||
| 4 | + /** | ||
| 5 | + * 页面的初始数据 | ||
| 6 | + */ | ||
| 7 | + data: { | ||
| 8 | + | ||
| 9 | + }, | ||
| 10 | + | ||
| 11 | + /** | ||
| 12 | + * 生命周期函数--监听页面加载 | ||
| 13 | + */ | ||
| 14 | + onLoad: function (options) { | ||
| 15 | + | ||
| 16 | + }, | ||
| 17 | + | ||
| 18 | + /** | ||
| 19 | + * 生命周期函数--监听页面初次渲染完成 | ||
| 20 | + */ | ||
| 21 | + onReady: function () { | ||
| 22 | + | ||
| 23 | + }, | ||
| 24 | + | ||
| 25 | + /** | ||
| 26 | + * 生命周期函数--监听页面显示 | ||
| 27 | + */ | ||
| 28 | + onShow: function () { | ||
| 29 | + | ||
| 30 | + }, | ||
| 31 | + | ||
| 32 | + /** | ||
| 33 | + * 生命周期函数--监听页面隐藏 | ||
| 34 | + */ | ||
| 35 | + onHide: function () { | ||
| 36 | + | ||
| 37 | + }, | ||
| 38 | + | ||
| 39 | + /** | ||
| 40 | + * 生命周期函数--监听页面卸载 | ||
| 41 | + */ | ||
| 42 | + onUnload: function () { | ||
| 43 | + | ||
| 44 | + }, | ||
| 45 | + | ||
| 46 | + /** | ||
| 47 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
| 48 | + */ | ||
| 49 | + onPullDownRefresh: function () { | ||
| 50 | + | ||
| 51 | + }, | ||
| 52 | + | ||
| 53 | + /** | ||
| 54 | + * 页面上拉触底事件的处理函数 | ||
| 55 | + */ | ||
| 56 | + onReachBottom: function () { | ||
| 57 | + | ||
| 58 | + }, | ||
| 59 | + | ||
| 60 | + howEvent(e){ | ||
| 61 | + console.log(e) | ||
| 62 | + }, | ||
| 63 | +}) |
pages/reserve/findSeller.json
0 → 100644
pages/reserve/findSeller.wxml
0 → 100644
pages/reserve/findSeller.wxss
0 → 100644
| 1 | +/* pages/reserve/findSeller.wxss */ |
| @@ -31,14 +31,14 @@ | @@ -31,14 +31,14 @@ | ||
| 31 | </formids> | 31 | </formids> |
| 32 | </view> | 32 | </view> |
| 33 | <view class="seller-view {{(listMoreCount<1)?(hasSearchLimit?'disabled enabled':'disabled'):''}}"> | 33 | <view class="seller-view {{(listMoreCount<1)?(hasSearchLimit?'disabled enabled':'disabled'):''}}"> |
| 34 | - <cover-view class="toast" wx:if="{{hasGetSellersEnd && listMoreCount<1 && !hasSearchLimit && markers.length<2}}">该地区没有可供预订的餐厅哦!努力开通中</cover-view> | ||
| 35 | - <cover-view class="toast" wx:if="{{hasGetSellersEnd && markers.length<2 && listMoreCount>0}}">移动或缩放地图,获取更多餐厅</cover-view> | ||
| 36 | - <cover-view class="flex-vc transverse-view-top" bindtap="listShow" wx:if="{{hasGetSellersEnd && listMoreCount>0}}"> | ||
| 37 | - <cover-view class="line"></cover-view> | ||
| 38 | - <cover-view class="text"> | ||
| 39 | - <cover-view>{{hasSellers?'查看其它':'已扩大范围为你找到'}}{{listMoreCount}}家餐厅</cover-view> | ||
| 40 | - </cover-view> | ||
| 41 | - </cover-view> | 34 | + <view class="toast" wx:if="{{hasGetSellersEnd && listMoreCount<1 && !hasSearchLimit && markers.length<2}}">该地区没有可供预订的餐厅哦!努力开通中</view> |
| 35 | + <view class="toast" wx:if="{{hasGetSellersEnd && markers.length<2 && listMoreCount>0}}">移动或缩放地图,获取更多餐厅</view> | ||
| 36 | + <view class="flex-vc transverse-view-top" bindtap="listShow" wx:if="{{hasGetSellersEnd && listMoreCount>0}}"> | ||
| 37 | + <view class="line"></view> | ||
| 38 | + <view class="text"> | ||
| 39 | + <view>{{hasSellers?'查看其它':'已扩大范围为你找到'}}{{listMoreCount}}家餐厅</view> | ||
| 40 | + </view> | ||
| 41 | + </view> | ||
| 42 | <view class="transverse-search flex-ll"> | 42 | <view class="transverse-search flex-ll"> |
| 43 | <view | 43 | <view |
| 44 | bindtap="caixiShow" | 44 | bindtap="caixiShow" |
| @@ -57,6 +57,12 @@ | @@ -57,6 +57,12 @@ | ||
| 57 | bindtap="tagsChange" | 57 | bindtap="tagsChange" |
| 58 | data-id="{{item.id}}">{{item.name}}</view> | 58 | data-id="{{item.id}}">{{item.name}}</view> |
| 59 | </block> | 59 | </block> |
| 60 | + <navigator url="./findSeller"> | ||
| 61 | + <view class="fingSeller flex-ll"> | ||
| 62 | + <view class="icon"></view> | ||
| 63 | + <view>查找餐厅</view> | ||
| 64 | + </view> | ||
| 65 | + </navigator> | ||
| 60 | </view> | 66 | </view> |
| 61 | <view class="transverse-list"> | 67 | <view class="transverse-list"> |
| 62 | <swiper | 68 | <swiper |
| @@ -97,12 +97,12 @@ page{ | @@ -97,12 +97,12 @@ page{ | ||
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | .picker{ | 99 | .picker{ |
| 100 | - height: 50rpx; | ||
| 101 | - line-height: 50rpx; | 100 | + height: 30rpx; |
| 101 | + line-height: 30rpx; | ||
| 102 | } | 102 | } |
| 103 | .picker .input{ | 103 | .picker .input{ |
| 104 | - height: 50rpx; | ||
| 105 | - line-height: 50rpx; | 104 | + height: 30rpx; |
| 105 | + line-height: 30rpx; | ||
| 106 | margin-right: 10rpx; | 106 | margin-right: 10rpx; |
| 107 | } | 107 | } |
| 108 | .picker .more{ | 108 | .picker .more{ |
| @@ -228,24 +228,44 @@ page{ | @@ -228,24 +228,44 @@ page{ | ||
| 228 | background-image: url("http://qn.colorcun.com/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20190925175650.png"); | 228 | background-image: url("http://qn.colorcun.com/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20190925175650.png"); |
| 229 | } | 229 | } |
| 230 | .transverse-search .tags{ | 230 | .transverse-search .tags{ |
| 231 | - height: 50rpx; | ||
| 232 | - line-height: 50rpx; | ||
| 233 | - background-color: #F0F0F9; | ||
| 234 | - border-radius: 4rpx; | ||
| 235 | - margin-right: 30rpx; | ||
| 236 | - padding: 0 16rpx; | 231 | + height: 30rpx; |
| 232 | + line-height: 30rpx; | ||
| 233 | + /*background-color: #F0F0F9;*/ | ||
| 234 | + /*border-radius: 4rpx;*/ | ||
| 235 | + padding: 0 22rpx; | ||
| 236 | + border-right:2rpx solid #E0E0E0; | ||
| 237 | +} | ||
| 238 | +.transverse-search .tags:first-child{ | ||
| 239 | + padding-left: 0; | ||
| 237 | } | 240 | } |
| 238 | .transverse-search .tags:last-child{ | 241 | .transverse-search .tags:last-child{ |
| 239 | margin-right: 0; | 242 | margin-right: 0; |
| 243 | + border-right-width:0; | ||
| 240 | } | 244 | } |
| 241 | .transverse-search .tags.active{ | 245 | .transverse-search .tags.active{ |
| 242 | - background:linear-gradient(to bottom ,#F4DAB9,#E9BE94); | ||
| 243 | - color:#8B5318; | 246 | + /*background:linear-gradient(to bottom ,#F4DAB9,#E9BE94);*/ |
| 247 | + color:#C0A369; | ||
| 244 | font-weight: 900; | 248 | font-weight: 900; |
| 245 | } | 249 | } |
| 250 | +.fingSeller{ | ||
| 251 | + height: 70rpx; | ||
| 252 | + line-height: 70rpx; | ||
| 253 | + width: 172rpx; | ||
| 254 | + box-shadow:-12rpx 0 10rpx -8rpx rgba(178,177,177,0.5); | ||
| 255 | + box-sizing: border-box; | ||
| 256 | + padding-left: 28rpx; | ||
| 257 | + font-weight:600; | ||
| 258 | + color:rgba(240,85,34,1); | ||
| 259 | +} | ||
| 260 | +.fingSeller .icon{ | ||
| 261 | + width: 32rpx; | ||
| 262 | + height: 30rpx; | ||
| 263 | + margin-right: 6rpx; | ||
| 264 | + background-image: url("http://qn.colorcun.com/reserve/images/find.png"); | ||
| 265 | + background-size: 100% 100%; | ||
| 266 | +} | ||
| 246 | 267 | ||
| 247 | - | ||
| 248 | -/* seller-view start*/ | 268 | + /* seller-view start*/ |
| 249 | .seller-view{ | 269 | .seller-view{ |
| 250 | height: 470rpx; | 270 | height: 470rpx; |
| 251 | position:fixed; | 271 | position:fixed; |
| @@ -29,9 +29,7 @@ | @@ -29,9 +29,7 @@ | ||
| 29 | "projectname": "c%E7%AB%AF%E9%A2%84%E5%AE%9A", | 29 | "projectname": "c%E7%AB%AF%E9%A2%84%E5%AE%9A", |
| 30 | "isGameTourist": false, | 30 | "isGameTourist": false, |
| 31 | "simulatorType": "wechat", | 31 | "simulatorType": "wechat", |
| 32 | - "simulatorPluginLibVersion": { | ||
| 33 | - "qywx_simulator_plugin": "1.2.0" | ||
| 34 | - }, | 32 | + "simulatorPluginLibVersion": {}, |
| 35 | "condition": { | 33 | "condition": { |
| 36 | "search": { | 34 | "search": { |
| 37 | "current": -1, | 35 | "current": -1, |
| @@ -576,6 +574,13 @@ | @@ -576,6 +574,13 @@ | ||
| 576 | "pathName": "pack-book/pages/book/b_addnew", | 574 | "pathName": "pack-book/pages/book/b_addnew", |
| 577 | "query": "", | 575 | "query": "", |
| 578 | "scene": null | 576 | "scene": null |
| 577 | + }, | ||
| 578 | + { | ||
| 579 | + "id": -1, | ||
| 580 | + "name": "pages/reserve/findSeller", | ||
| 581 | + "pathName": "pages/reserve/findSeller", | ||
| 582 | + "query": "", | ||
| 583 | + "scene": null | ||
| 579 | } | 584 | } |
| 580 | ] | 585 | ] |
| 581 | } | 586 | } |
| @@ -29,7 +29,7 @@ function unixtoTime(ns,format="YYYY-MM-DD HH:II:SS") { | @@ -29,7 +29,7 @@ function unixtoTime(ns,format="YYYY-MM-DD HH:II:SS") { | ||
| 29 | case 6:week="六";break | 29 | case 6:week="六";break |
| 30 | } | 30 | } |
| 31 | result=result.replace('WW',week); | 31 | result=result.replace('WW',week); |
| 32 | - if(format.indexOf('DAY')>0){ | 32 | + if(format.indexOf('DAY')>-1){ |
| 33 | // 获取当天 0 点的时间戳 | 33 | // 获取当天 0 点的时间戳 |
| 34 | var timeStamp = getDate(getDate().setHours(0, 0, 0, 0)) / 1000; | 34 | var timeStamp = getDate(getDate().setHours(0, 0, 0, 0)) / 1000; |
| 35 | 35 |
-
Please register or login to post a comment