Commit dabf061e4a3cfb85edb760dbd3f6b8486be93459

Authored by Yolanda
1 parent 2784207b

no message

Showing 51 changed files with 1505 additions and 371 deletions
@@ -4,7 +4,9 @@ @@ -4,7 +4,9 @@
4 <view class="item {{index==multiIndex[0]?'active':''}}" 4 <view class="item {{index==multiIndex[0]?'active':''}}"
5 bindtap="active" data-index="{{index}}" 5 bindtap="active" data-index="{{index}}"
6 wx:for="{{multiArray[0]}}" wx:key="multiArraykey"> 6 wx:for="{{multiArray[0]}}" wx:key="multiArraykey">
7 - {{item}} 7 + <view style="height:{{index>0 ? '14rpx' : 0}}"></view>
  8 + <view style="line-height: {{index>0 ? '32rpx' : '80rpx'}};">{{item.name}}</view>
  9 + <block wx:if="{{index>0}}"><view style="line-height: 24rpx;">({{item.cu}})</view></block>
8 <view class="number" wx:if="{{index>=1 && index<4}}">{{index}}</view> 10 <view class="number" wx:if="{{index>=1 && index<4}}">{{index}}</view>
9 </view> 11 </view>
10 </view> 12 </view>
@@ -16,14 +16,14 @@ @@ -16,14 +16,14 @@
16 .item{ 16 .item{
17 background-color: #F1F1F1; 17 background-color: #F1F1F1;
18 width: 150rpx; 18 width: 150rpx;
19 - height: 70rpx; 19 + height: 80rpx;
20 overflow: hidden; 20 overflow: hidden;
21 white-space:nowrap; 21 white-space:nowrap;
22 border-radius: 4rpx; 22 border-radius: 4rpx;
23 - line-height: 70rpx; 23 + line-height: 40rpx;
24 font-size: 24rpx; 24 font-size: 24rpx;
25 text-align: center; 25 text-align: center;
26 - margin-bottom: 30rpx; 26 + margin-bottom: 20rpx;
27 position: relative; 27 position: relative;
28 display: inline-block; 28 display: inline-block;
29 margin-right: calc((100% - 600rpx) / 3); 29 margin-right: calc((100% - 600rpx) / 3);
1 // components/2.0/filter/filter-group.js 1 // components/2.0/filter/filter-group.js
2 import DA from '../../../pages/reserve/data'; 2 import DA from '../../../pages/reserve/data';
3 import util from '../../../utils/util' 3 import util from '../../../utils/util'
  4 +import QQMapWX from '../../../utils/qqmap-wx-jssdk.js'
  5 +const qqmapsdk = new QQMapWX({
  6 + key: 'SDEBZ-I74W4-QLGUX-XXYXU-HIR23-3QFBJ'
  7 +});
4 Component({ 8 Component({
5 /** 9 /**
6 * 组件的属性列表 10 * 组件的属性列表
@@ -9,13 +13,21 @@ Component({ @@ -9,13 +13,21 @@ Component({
9 height:Number, 13 height:Number,
10 disabled:Boolean, 14 disabled:Boolean,
11 filterParams:Object,//人均过滤初始值 15 filterParams:Object,//人均过滤初始值
  16 + location:{
  17 + type:Object,
  18 + value:{
  19 + latitude:39.684671,
  20 + longitude:118.176300
  21 + }
  22 +
  23 + }
12 }, 24 },
13 25
14 /** 26 /**
15 * 组件的初始数据 27 * 组件的初始数据
16 */ 28 */
17 data: { 29 data: {
18 - multiArray: ['全部菜系'], 30 + multiArray: [{name:'全部菜系',cu:''}],
19 multiIndex: [0], 31 multiIndex: [0],
20 tags: [ 32 tags: [
21 {id: 1, name: '环境好'}, 33 {id: 1, name: '环境好'},
@@ -26,7 +38,8 @@ Component({ @@ -26,7 +38,8 @@ Component({
26 filterOpened:false, 38 filterOpened:false,
27 }, 39 },
28 attached(){ 40 attached(){
29 - this.init() 41 + // this.init('610100');
  42 + this.getcityCode();
30 this.filterParams= null 43 this.filterParams= null
31 this.paramsData={}//过滤参数集合 44 this.paramsData={}//过滤参数集合
32 setTimeout(()=>{ 45 setTimeout(()=>{
@@ -42,10 +55,11 @@ Component({ @@ -42,10 +55,11 @@ Component({
42 * 组件的方法列表 55 * 组件的方法列表
43 */ 56 */
44 methods: { 57 methods: {
45 - async init(){ 58 + async init(code){
46 this.setData({ 59 this.setData({
47 - multiArray: [['全部菜系'].concat(await DA.getCates())] 60 + multiArray: [[{name:'全部菜系',cu:''}].concat(await DA.getCates(code))]
48 }) 61 })
  62 + console.log('puhl',this.data.multiArray);
49 this.filterParams= this.data.filterParams 63 this.filterParams= this.data.filterParams
50 }, 64 },
51 caixiActive(e) { 65 caixiActive(e) {
@@ -54,7 +68,7 @@ Component({ @@ -54,7 +68,7 @@ Component({
54 multiIndex: [e.detail] 68 multiIndex: [e.detail]
55 }) 69 })
56 if(e.detail>0){ 70 if(e.detail>0){
57 - DA.getCatesID(parseInt(e.detail) - 1).then(cuisine=>{ 71 + DA.getCatesID(parseInt(e.detail) - 1,this.citycode).then(cuisine=>{
58 this.paramsData.cuisine=cuisine 72 this.paramsData.cuisine=cuisine
59 this.eventPush() 73 this.eventPush()
60 }) 74 })
@@ -156,6 +170,19 @@ Component({ @@ -156,6 +170,19 @@ Component({
156 eventPush(){ 170 eventPush(){
157 this.triggerEvent('event',this.paramsData); 171 this.triggerEvent('event',this.paramsData);
158 }, 172 },
159 - 173 + getcityCode(){
  174 + qqmapsdk.reverseGeocoder({
  175 + location: {
  176 + latitude: this.data.location.latitude,
  177 + longitude: this.data.location.longitude
  178 + },
  179 + success:(res)=>{
  180 + if(res.status!=0) return;
  181 + console.log('qqmapsdk.reverseGeocoder',res.result)
  182 + this.citycode=res.result.ad_info.city_code.slice(3);
  183 + this.init(this.citycode);
  184 + },
  185 + })
  186 + }
160 } 187 }
161 }) 188 })
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 class="view bg-white flex flex-sub filter-group padding-top-sm padding-left-lg padding-right-lg padding-bottom-sm {{caixiOpened || filterOpened?'filter-group-opened':''}}"> 6 class="view bg-white flex flex-sub filter-group padding-top-sm padding-left-lg padding-right-lg padding-bottom-sm {{caixiOpened || filterOpened?'filter-group-opened':''}}">
7 <view class="view cu-tag round {{caixiOpened?'opened text-blue':''}} {{multiIndex[0]>0?'bg-blue light':''}} " bindtap="caixiShow"> 7 <view class="view cu-tag round {{caixiOpened?'opened text-blue':''}} {{multiIndex[0]>0?'bg-blue light':''}} " bindtap="caixiShow">
8 <block wx:if="{{multiIndex[0]==0}}">菜系</block> 8 <block wx:if="{{multiIndex[0]==0}}">菜系</block>
9 - <block wx:else="">{{multiArray[0][multiIndex[0]]}}</block> 9 + <block wx:else="">{{multiArray[0][multiIndex[0]].name}}</block>
10 <view class="more view"></view> 10 <view class="more view"></view>
11 </view> 11 </view>
12 <block wx:for="{{tags}}" wx:key="tagskey"> 12 <block wx:for="{{tags}}" wx:key="tagskey">
1 // components/2.0/reserve/card.js 1 // components/2.0/reserve/card.js
2 import util from '../../../utils/util'; 2 import util from '../../../utils/util';
  3 +import App from '../../../utils/api';
3 import RS from '../../../utils/reserveStatus' 4 import RS from '../../../utils/reserveStatus'
4 Component({ 5 Component({
5 /** 6 /**
@@ -7,6 +8,7 @@ Component({ @@ -7,6 +8,7 @@ Component({
7 */ 8 */
8 properties: { 9 properties: {
9 detail:Object, 10 detail:Object,
  11 + tabType:Number
10 }, 12 },
11 13
12 /** 14 /**
@@ -50,6 +52,87 @@ Component({ @@ -50,6 +52,87 @@ Component({
50 this.setData({ 52 this.setData({
51 reserve:detail, 53 reserve:detail,
52 }) 54 })
53 - } 55 + console.log('666666',detail);
  56 +
  57 + if(this.data.tabType==6){
  58 + this.remark('auto');
  59 + }
  60 +
  61 + },
  62 + openlocation(){
  63 + console.log('6666666')
  64 + wx.openLocation({
  65 + latitude:Number(this.data.reserve.seller.lat),
  66 + longitude:Number(this.data.reserve.seller.long),
  67 + scale: 18
  68 + })
  69 + },
  70 + remark(action='click'){
  71 + App.Customer.CheckIsComment({rid:this.data.reserve.id}).then(res => {
  72 + console.log('66666fffffff',res)
  73 + this.setData({
  74 + hasComment:res.data!=1,//已评论
  75 + })
  76 + if(action=='click'){
  77 + if(res.data==0){
  78 + wx.navigateTo({
  79 + url:'/pages/pinglun/create?sid='+this.data.reserve.seller.id+'&oid='+this.data.reserve.id+'&sellername='+this.data.reserve.seller.sellername
  80 + })
  81 + }else{
  82 + wx.showToast({
  83 + title:'该订单已评论',
  84 + icon:'none'
  85 + })
  86 + }
  87 + }
  88 +
  89 +
  90 + })
  91 +
  92 + },
  93 + cookbook() {
  94 + if (this.data.reserve.order && this.data.reserve.order.cookbooklist.length > 0) {
  95 + wx.navigateTo({
  96 + url: util.http_build_query({
  97 + rid: this.data.reserve.id,
  98 + oid: this.data.reserve.order.id,
  99 + identity: 1
  100 + }, '/pack-cookbook/pages/success')
  101 + });
  102 + } else {
  103 + App.Advance.CreateOrder({
  104 + rid: this.data.reserve.id,
  105 + openid: getApp().openid,
  106 + }).then(res => {
  107 + if (res.ret != 200) {
  108 + return util.toast(res.msg, 'none')
  109 + }
  110 + wx.navigateTo({
  111 + url: util.http_build_query({
  112 + rid: this.data.reserve.id,
  113 + oid: res.data.id,
  114 + identity: 1,
  115 + sid: res.data.sellerid
  116 + }, '/pack-cookbook/pages/index')
  117 + });
  118 + })
  119 + }
  120 +
  121 + },
  122 + checkout(){
  123 + if(this.data.reserve.status==0){
  124 + this.selectComponent('#showModal').options({
  125 + header: '您点早啦!',
  126 + body: '商家分配包间后,您可以通过在线买单支付,无需到前台结账排队等发票。'
  127 + }).show();
  128 + }else{
  129 + wx.navigateTo({
  130 + url:util.http_build_query({
  131 + rid:this.data.reserve.id,
  132 + sid:this.data.reserve.seller.id
  133 + },'/pack-checkout/pages/index')
  134 + })
  135 + }
  136 + },
54 } 137 }
55 }) 138 })
1 { 1 {
2 "component": true, 2 "component": true,
3 - "usingComponents": {} 3 + "usingComponents": {
  4 + "userinfo": "/components/userinfo/userinfo",
  5 + "showModal":"/components/tips/showModal/showModal"
  6 + }
4 } 7 }
@@ -3,18 +3,25 @@ @@ -3,18 +3,25 @@
3 <view class="view margin-lr-lg margin-top-sm solid radius padding padding-bottom-lg" style="box-shadow: 0px 0px 20rpx 0px #EEF0F2;"> 3 <view class="view margin-lr-lg margin-top-sm solid radius padding padding-bottom-lg" style="box-shadow: 0px 0px 20rpx 0px #EEF0F2;">
4 <view class="view flex padding-bottom solid-bottom align-center"> 4 <view class="view flex padding-bottom solid-bottom align-center">
5 <view class="view round margin-right-sm" 5 <view class="view round margin-right-sm"
6 - style="width: 60rpx;height: 60rpx; background-image: url('{{reserve.seller.seller_image}}');"> 6 + style="min-width:60rpx;width: 60rpx;height: 60rpx; background-image: url('{{reserve.seller.seller_image}}');">
7 </view> 7 </view>
8 <view class="view text-cut flex-treble"> 8 <view class="view text-cut flex-treble">
9 - <view class="view text-lg text-cut Medium" style="margin-bottom: 16rpx;">{{reserve.seller.sellername}}</view>  
10 - <view class="view text-df bg-white text-cut">{{reserve.seller.map_address}}</view>  
11 - </view>  
12 - <view class="view margin-left-sm text-blue text-lg Medium" style="min-width: 100rpx;">  
13 - {{reserve.getStatusStr}} 9 + <view class="flex-lr" style="width: 100%;">
  10 + <view class="text-lg text-cut Medium" style="margin-bottom: 16rpx;">{{reserve.seller.sellername}}</view>
  11 + <view class="margin-left-sm text-blue text-lg Medium" style="min-width: 100rpx;margin-bottom: 16rpx;font-size: 30rpx;">
  12 + {{reserve.getStatusStr}}
  13 + </view>
  14 + </view>
  15 + <view class="flex-lr" catchtap="openlocation">
  16 + <view class="view text-df bg-white text-cut" style="max-width: 450rpx;">{{reserve.seller.map_address}}</view>
  17 + <view class="more"></view>
  18 + </view>
  19 +
14 </view> 20 </view>
  21 +
15 </view> 22 </view>
16 - <view class="view margin-top">  
17 - <view class="view flex align-center" style="margin-bottom: 44rpx;"> 23 + <view class="view margin-top solid-bottom">
  24 + <view class="view flex align-center" style="margin-bottom: 30rpx;">
18 <view class="view flex-sub bg-white Medium">预订时间</view> 25 <view class="view flex-sub bg-white Medium">预订时间</view>
19 <view class="view flex-treble text-bold" style="font-size: 36rpx;"> 26 <view class="view flex-treble text-bold" style="font-size: 36rpx;">
20 <view class="value" wx:if="{{reserve.hasOnlineReserve || reserve.hasUpdateDate || reserve.type==0}}"> 27 <view class="value" wx:if="{{reserve.hasOnlineReserve || reserve.hasUpdateDate || reserve.type==0}}">
@@ -23,11 +30,52 @@ @@ -23,11 +30,52 @@
23 <view class="value" wx:else="">{{reserve.rdateStr}}</view> 30 <view class="value" wx:else="">{{reserve.rdateStr}}</view>
24 </view> 31 </view>
25 </view> 32 </view>
26 - <view class="view flex align-center"> 33 + <view class="view flex align-center" style="margin-bottom: 30rpx;">
27 <view class="view flex-sub bg-white Medium" style="min-width: 140rpx;">包间类型</view> 34 <view class="view flex-sub bg-white Medium" style="min-width: 140rpx;">包间类型</view>
28 <view class="view flex-treble text-bold text-cut" style="font-size: 36rpx;"> 35 <view class="view flex-treble text-bold text-cut" style="font-size: 36rpx;">
29 {{reserve.tableFirst||util.getRoomName(reserve.room_demand)}} 36 {{reserve.tableFirst||util.getRoomName(reserve.room_demand)}}
30 </view> 37 </view>
31 </view> 38 </view>
  39 + <view class="view flex align-center" style="margin-bottom: 30rpx;">
  40 + <view class="view flex-sub bg-white Medium" style="min-width: 140rpx;">预订人</view>
  41 + <view class="view flex-treble text-cut text-bold" style="font-size: 36rpx;">
  42 + {{reserve.rname}}
  43 + </view>
  44 + </view>
  45 + <view class="view flex align-center">
  46 + <view class="view flex-sub bg-white Medium" style="min-width: 140rpx;">联系电话</view>
  47 + <view class="view flex-treble text-cut text-bold" style="font-size: 36rpx;">
  48 + {{reserve.phone?reserve.phoneMask:''}}
  49 + </view>
  50 + </view>
  51 + <view style="height: 30rpx;"></view>
32 </view> 52 </view>
  53 + <view class="view button-cover flex-rr">
  54 + <navigator url="/pages/reserve/reserve?id={{reserve.seller.id}}&activeTab=reserve" class="second-book-button flex-cc item-button">再次预订</navigator>
  55 + <view class="remark-button flex-cc item-button" wx:if="{{tabType==6 && hasComment}}" catchtap="remark">评价</view>
  56 + <block wx:if="{{tabType==5}}">
  57 + <userinfo
  58 + binduserinfo="checkout"
  59 + share="{{reserve}}"
  60 + share-act="invitation" wx:if="{{reserve.hasRunning && reserve.seller.isopen_md==1}}">
  61 + <view class="buy-button flex-cc item-button" >买单</view>
  62 + </userinfo>
  63 +
  64 + <block wx:if="{{reserve.hasRunning && reserve.seller.is_open_order==1}}">
  65 + <userinfo
  66 + binduserinfo="cookbook"
  67 + bindshare="share"
  68 + share="{{reserve}}"
  69 + share-act="invitation">
  70 + <view class="item-button flex-cc order-button" wx:if="{{reserve.order && reserve.order.cookbooklist.length>0}}">查看菜品</view>
  71 + <view class="item-button flex-cc order-button" wx:else>提前点餐</view>
  72 + </userinfo>
  73 +
  74 + </block>
  75 + </block>
  76 +
  77 +
  78 + </view>
  79 +
33 </view> 80 </view>
  81 +<showModal id="showModal" confirmText="知道了" bindshowModal="showModal" cla="checkout"></showModal>
1 /* components/2.0/reserve/card.wxss */ 1 /* components/2.0/reserve/card.wxss */
2 -@import "../../../colorui/main.wxss";  
  2 +@import "../../../colorui/main.wxss";
  3 +@import '../../../app.wxss';
  4 +.button-cover{
  5 + width: 100%;
  6 + padding-top: 30rpx;
  7 + font-size: 28rpx;
  8 +}
  9 +.remark-button{
  10 + width: 120rpx;
  11 + height: 60rpx;
  12 + border-radius: 30rpx;
  13 + border: 2rpx solid #42A5FF;
  14 + box-sizing: border-box;
  15 + color: #42A5FF;
  16 +}
  17 +.second-book-button{
  18 + width: 160rpx;
  19 + height: 60rpx;
  20 + border-radius: 30rpx;
  21 + border: 2rpx solid #666666;
  22 + box-sizing: border-box;
  23 + color: #353535;
  24 +}
  25 +.item-button{
  26 + margin-right: 20rpx;
  27 + font-size: 28rpx;
  28 +}
  29 +.buy-button{
  30 + width: 120rpx;
  31 + height: 60rpx;
  32 + border-radius: 30rpx;
  33 + border: 2rpx solid #42A5FF;
  34 + box-sizing: border-box;
  35 + color: #42A5FF;
  36 +}
  37 +.order-button{
  38 + width: 160rpx;
  39 + height: 60rpx;
  40 + border-radius: 30rpx;
  41 + background: #E6F3FF;
  42 + box-sizing: border-box;
  43 + color: #42A5FF;
  44 +}
  45 +.item-button:last-child{
  46 + margin-right: 0;
  47 +}
1 /* components/2.0/reserve/card.wxss */ 1 /* components/2.0/reserve/card.wxss */
2 -@import "/colorui/main.wxss";  
  2 +@import "/colorui/main.wxss";
@@ -8,7 +8,9 @@ @@ -8,7 +8,9 @@
8 </view> 8 </view>
9 <view class="view detail margin-left-sm flex-treble margin-top-sm text-cut"> 9 <view class="view detail margin-left-sm flex-treble margin-top-sm text-cut">
10 <view class="view flex align-center justify-between" style="height: 52rpx;"> 10 <view class="view flex align-center justify-between" style="height: 52rpx;">
11 - <view class="view title text-bold text-cut margin-right-sm">{{sellerx.sellername}}</view> 11 + <view class="view title text-bold text-cut margin-right-sm">
  12 + <text style="color: #ffffff;font-size: 24rpx;margin-right: 4rpx;background-color:#d81e06;display: inline-block;border-radius: 8rpx;width: 66rpx;height: 36rpx;line-height: 36rpx;text-align: center;" wx:if="{{sellerx.is_have_activity==1}}">优惠</text>
  13 + {{sellerx.sellername}}</view>
12 <view class="view text-gray" style="font-size: 26rpx;">{{util.distance(sellerx.distance||sellerx.distance_centre)}}</view> 14 <view class="view text-gray" style="font-size: 26rpx;">{{util.distance(sellerx.distance||sellerx.distance_centre)}}</view>
13 </view> 15 </view>
14 <view class="view flex align-center justify-between text-gray margin-top-xs" style="height: 36rpx;"> 16 <view class="view flex align-center justify-between text-gray margin-top-xs" style="height: 36rpx;">
@@ -35,8 +37,12 @@ @@ -35,8 +37,12 @@
35 <block wx:for="{{sellerx.class}}" wx:key="seclass"> 37 <block wx:for="{{sellerx.class}}" wx:key="seclass">
36 <view 38 <view
37 data-cid="{{item.id}}" data-cname="{{item.name}}" 39 data-cid="{{item.id}}" data-cname="{{item.name}}"
38 - class="cu-tag round line-blue text-blue view">{{item.name}}</view> 40 + class="cu-tag round line-blue text-blue view" wx:if="{{index<3}}">{{item.name}}</view>
  41 +
39 </block> 42 </block>
  43 + <block wx:if="{{sellerx.class.length>3}}">
  44 + <view class="cu-tag round line-blue text-blue view">...</view>
  45 + </block>
40 <view class="cu-tag round line-white text-blue view cu-tag-end"></view> 46 <view class="cu-tag round line-white text-blue view cu-tag-end"></view>
41 </view> 47 </view>
42 <view class="view button-view flex justify-end" bindtap="reserve"> 48 <view class="view button-view flex justify-end" bindtap="reserve">
  1 +<!--pages/reserve/indexList.wxml-->
  2 +<nav>
  3 + <view class="view header flex align-center justify-center text-blue padding-left" style="right:{{right}}px;top:{{top}}px;" wx:if="{{right>0}}">
  4 + <view class="view flex flex-direction" bindtap="dispalySearchHow">
  5 + <view class="view txt-26-h">{{headerHows[0]}}</view>
  6 + <view class="view txt-26-h">{{headerHows[1]}}</view>
  7 + </view>
  8 + <view class="line margin-lr"></view>
  9 + <view class="flex justify-around align-center" bindtap="searchKeyword">
  10 + <image class="margin-right-sm" wx:if="{{!keyword}}"
  11 + style="width: 32rpx; height: 32rpx;" src="http://nosqn.colorcun.com/search/s%20%2811%29.png"></image>
  12 + <view class="view text-cut txt-34-h text-left margin-right-sm"
  13 + style="width: 170rpx;">{{keyword||'搜索餐厅…'}}</view>
  14 + <view class="margin-right-sm clean view"
  15 + wx:if="{{keyword}}" catchtap="moveToLocation"></view>
  16 + </view>
  17 + </view>
  18 +</nav>
  19 + <!--
  20 + <view class="searchAddrView searchKeyword bg-white" bindtap="gotoSearch">
  21 + <view class="searchAddr flex-ll">
  22 + <image class="icon" src="http://nosqn.colorcun.com/custom/lite-online/image/search26.png"></image>
  23 + <input style="width: 100%;" placeholder="{{search_placeholder}}"
  24 + type="text" disabled placeholder-class="placeholder"
  25 + value="{{keyword}}"/>
  26 + <view class="clean" catchtap="moveToLocation" wx:if="{{keyword && hasSuggestion}}"></view>
  27 + </view>
  28 + </view>
  29 + -->
  30 +<view class="view content" style="height: calc(100vh - 65px);">
  31 + <filter-group height="{{height}}"
  32 + id="filter-group"
  33 + filterParams="{{filterParams}}"
  34 + bindevent="filterGroupEvent"
  35 + disabled="{{(sellers.length<1 && !hasFilterData) || hasLoading}}"></filter-group>
  36 + <block wx:if="{{hasLoading}}">
  37 + <view class="view flex flex-direction justify-center align-center" wx:if="{{hasLoading}}">
  38 + <image class="view" src="http://nosqn.colorcun.com/2.0/timg.gif" style="width: 40rpx;height: 40rpx;margin-top: 260rpx;"></image>
  39 + <view class="view bg-white text-sm margin-top">包间查找中,请稍后…</view>
  40 + </view>
  41 + </block>
  42 + <block wx:elif="{{sellers.length<1}}">
  43 + <view class="view flex flex-direction justify-center align-center empty-box margin-sm">
  44 + <image class="margin-top"
  45 + src="http://nosqn.colorcun.com/2.0/home%20%2818%29.png" style="width: 520rpx; height: 384rpx;"></image>
  46 + <view class="view margin-top-lg text-df">抱歉,没有找到符合的内容</view>
  47 + <view class="view margin-top-xs text-df">试试搜搜别的</view>
  48 + </view>
  49 + </block>
  50 + <block wx:else="">
  51 + <scroll-view class="view scroll-view" scroll-y="true"
  52 + scroll-into-view="seller-{{scrollSellerID}}"
  53 + scroll-with-animation
  54 + bindscrolltolower="getListMore"
  55 + style="width:100%;height: calc(100vh - 65px);">
  56 + <block wx:for="{{sellers}}" wx:key="sellers" >
  57 + <navigator url="/pages/reserve/detail?id={{item.id}}" hover-class="navigator-hover">
  58 + <seller-card class="seller-card" id="seller-{{item.id}}"
  59 + activeSellerID="{{activeSellerID}}"
  60 + seller="{{item}}" bindevent="sellerCardEvent" ></seller-card>
  61 + </navigator>
  62 + </block>
  63 + <view class="view" style="height: 160rpx;"></view>
  64 + </scroll-view>
  65 + </block>
  66 +</view>
  67 +<getpos bindpos="onpos" id="getpos" hasAllowLoading="{{false}}"></getpos>
  68 +<as-phone id="as"></as-phone>
  69 +<search-how id="search-how" findSellerData="{{findSellerData}}" bindevent="howEvent"></search-how>
  70 +<menu></menu>
  71 +<service></service>
  1 +import App from '../../utils/api';
  2 +import util from '../../utils/util'
1 Component({ 3 Component({
2 data:{ 4 data:{
3 menuhidden:true, 5 menuhidden:true,
@@ -5,8 +7,44 @@ Component({ @@ -5,8 +7,44 @@ Component({
5 }, 7 },
6 attached: function() { 8 attached: function() {
7 this.setStatus(); 9 this.setStatus();
  10 + this.getuser();
  11 + this.getautomenu();
  12 + this.getorder();
8 }, 13 },
9 methods:{ 14 methods:{
  15 + getuser(){
  16 + App.User.GetBalance().then(res=>{
  17 + this.setData({
  18 + user:res.data
  19 + })
  20 + })
  21 + },
  22 + getorder(){
  23 + App.Reserve.GetReserveIsConsume().then((json)=>{
  24 + if(json.ret==200){
  25 + console.log('787878',json.data)
  26 + this.setData({
  27 + haveorder:json.data.is_customer==1 || json.data.is_manager==1
  28 + })
  29 + }
  30 + })
  31 + },
  32 + getautomenu(){
  33 + App.Foodset.GetUserFoodOrders({
  34 + status:2,//tabType,
  35 + openid: getApp().openid,
  36 + offset:1,
  37 + limit:1,
  38 + size:1,
  39 + }).then(res=>{
  40 + console.log(res)
  41 + if(res.data.length>0){
  42 + this.setData({
  43 + shownotice:true
  44 + })
  45 + }
  46 + })
  47 + },
10 showmenu(){ 48 showmenu(){
11 this.setData({ 49 this.setData({
12 menuhidden:false 50 menuhidden:false
@@ -19,10 +57,28 @@ Component({ @@ -19,10 +57,28 @@ Component({
19 }, 57 },
20 topage(e){ 58 topage(e){
21 let url=e.currentTarget.dataset.path; 59 let url=e.currentTarget.dataset.path;
22 - wx.redirectTo({ 60 + wx.navigateTo({
23 url:url 61 url:url
24 }) 62 })
25 }, 63 },
  64 + topagerelunch(e){
  65 + let url=e.currentTarget.dataset.path;
  66 + wx.reLaunch({
  67 + url:url
  68 + })
  69 + },
  70 + tosearch(e){
  71 + let url=e.currentTarget.dataset.path;
  72 + wx.navigateTo({
  73 + url:url
  74 + })
  75 + },
  76 + gotoList(e){
  77 + getApp().meListType=e.currentTarget.dataset.type;
  78 + wx.redirectTo({
  79 + url:'/pages/me/list?type='+e.currentTarget.dataset.type
  80 + })
  81 + },
26 setStatus(){ 82 setStatus(){
27 let pages = getCurrentPages(); 83 let pages = getCurrentPages();
28 let p = pages[pages.length - 1]; 84 let p = pages[pages.length - 1];
1 -<view class="menu flex-vc" bindtap="showmenu"></view>  
2 -<view class="menu-list flex-vl" style="justify-content: flex-end;" hidden="{{menuhidden}}" bindtap="hidemenu"> 1 +
  2 +
  3 +<view class="menu-mask" hidden="{{menuhidden}}" bindtap="hidemenu"></view>
  4 +<view class="menu-cover">
  5 + <view class="menu flex-vc white-font font28r" bindtap="{{menuhidden ? 'showmenu' : 'hidemenu'}}">
  6 + <block wx:if="{{menuhidden}}">
  7 + 更多
  8 + <view class="notice" wx:if="{{shownotice==true || haveorder==true}}"></view>
  9 + </block>
  10 + <block wx:else>关闭</block>
  11 + </view>
  12 + <block wx:if="{{'pages/me/index'!=url}}">
  13 + <view class="menu-item white-font font30r smooth flex-cc {{menuhidden ? '' : 'menu-item-me-active'}}" bindtap="topagerelunch" data-path="/pages/me/index">我的</view>
  14 + </block>
  15 + <block wx:else>
  16 + <view class="menu-item gray-font font30r smooth flex-cc {{menuhidden ? '' : 'menu-item-me-active'}}" data-path="/pages/me/index">我的</view>
  17 + </block>
  18 + <block wx:if="{{'pages/me/list'!=url}}">
  19 + <view class="menu-item white-font font30r smooth flex-cc {{menuhidden ? '' : 'menu-item-order-active'}}" bindtap="topagerelunch" data-path="/pages/me/list">订单</view>
  20 + </block>
  21 + <block wx:else>
  22 + <view class="menu-item gray-font font30r smooth flex-cc {{menuhidden ? '' : 'menu-item-order-active'}}" data-path="/pages/me/list">订单</view>
  23 + </block>
  24 + <block wx:if="{{'pages/reserve/index'!=url}}">
  25 + <view class="menu-item white-font font30r smooth flex-cc {{menuhidden ? '' : 'menu-item-home-active'}}" bindtap="topagerelunch" data-path="/pages/reserve/index">首页</view>
  26 + </block>
  27 + <block wx:else>
  28 + <view class="menu-item gray-font font30r smooth flex-cc {{menuhidden ? '' : 'menu-item-home-active'}}" data-path="/pages/me/index">首页</view>
  29 + </block>
  30 + <block wx:if="{{'pages/me/follow'!=url}}">
  31 + <view class="menu-item white-font font30r smooth flex-cc {{menuhidden ? '' : 'menu-item-collection-active'}}" bindtap="topage" data-path="/pages/me/follow">收藏</view>
  32 + </block>
  33 + <block wx:else>
  34 + <view class="menu-item gray-font font30r smooth flex-cc {{menuhidden ? '' : 'menu-item-collection-active'}}" data-path="/pages/me/follow">收藏</view>
  35 + </block>
  36 + <block wx:if="{{'pages/me/list'!=url}}">
  37 + <view class="menu-item white-font font30r smooth flex-cc {{menuhidden ? '' : 'menu-item-package-active'}}" bindtap="gotoList" data-path="/pages/me/list" data-type="7">套餐
  38 + <view class="notice" wx:if="{{shownotice==true}}"></view>
  39 + </view>
  40 + </block>
  41 + <block wx:else>
  42 + <view class="menu-item gray-font font30r smooth flex-cc {{menuhidden ? '' : 'menu-item-package-active'}}" data-path="/pages/me/list">套餐
  43 + <view class="notice" wx:if="{{shownotice==true}}"></view>
  44 + </view>
  45 + </block>
  46 + <block wx:if="{{'pages/me/coupon'!=url}}">
  47 + <view class="menu-item white-font font30r smooth flex-vc {{menuhidden ? '' : 'menu-item-card-active'}}" bindtap="topage" data-path="/pages/me/coupon">
  48 + <view>卡包</view>
  49 + <view>({{user.customer_activity}})</view>
  50 + </view>
  51 + </block>
  52 + <block wx:else>
  53 + <view class="menu-item gray-font font30r smooth flex-cc {{menuhidden ? '' : 'menu-item-card-active'}}" data-path="/pages/me/coupon">
  54 + <view>卡包</view>
  55 + <view>({{user.customer_activity}})</view>
  56 + </view>
  57 + </block>
  58 +</view>
  59 +<!-- <view class="menu-list flex-vl" style="justify-content: flex-end;" hidden="{{menuhidden}}" bindtap="hidemenu">
3 <view class="menu-item menu-seller-item flex-ll" bindtap="hidemenu"> 60 <view class="menu-item menu-seller-item flex-ll" bindtap="hidemenu">
4 <view class="menu-item-image menu-item-back"></view> 61 <view class="menu-item-image menu-item-back"></view>
5 <view class="white-font font30r smooth">返回</view> 62 <view class="white-font font30r smooth">返回</view>
6 </view> 63 </view>
7 <block wx:if="{{'pages/me/index'!=url}}"> 64 <block wx:if="{{'pages/me/index'!=url}}">
8 - <view class="menu-item menu-seller-item flex-ll" bindtap="topage" data-path="/pages/me/index"> 65 + <view class="menu-item menu-seller-item flex-ll" bindtap="topage" data-path="/pages/me/index" style="left: 40rpx;top: ;">
9 <view class="menu-item-image menu-item-me"></view> 66 <view class="menu-item-image menu-item-me"></view>
10 <view class="white-font font30r smooth">我的</view> 67 <view class="white-font font30r smooth">我的</view>
11 </view> 68 </view>
@@ -16,17 +73,15 @@ @@ -16,17 +73,15 @@
16 <view class="white-font font30r smooth">订单</view> 73 <view class="white-font font30r smooth">订单</view>
17 </view> 74 </view>
18 </block> 75 </block>
19 - <block wx:if="{{'pages/reserve/search'!=url}}">  
20 - <view class="menu-item menu-seller-item flex-ll" bindtap="topage" data-path="/pages/reserve/search">  
21 - <view class="menu-item-image menu-item-search"></view>  
22 - <view class="white-font font30r smooth" bindtap="">搜索</view>  
23 - </view>  
24 - </block>  
25 <block wx:if="{{'pages/reserve/index'!=url}}"> 76 <block wx:if="{{'pages/reserve/index'!=url}}">
26 <view class="menu-item menu-seller-item flex-ll" bindtap="topage" data-path="/pages/reserve/index"> 77 <view class="menu-item menu-seller-item flex-ll" bindtap="topage" data-path="/pages/reserve/index">
27 <view class="menu-item-image menu-item-nearby"></view> 78 <view class="menu-item-image menu-item-nearby"></view>
28 - <view class="white-font font30r smooth" bindtap="">附近</view> 79 + <view class="white-font font30r smooth" bindtap="">首页</view>
29 </view> 80 </view>
30 </block> 81 </block>
31 -  
32 -</view>  
  82 +</view> -->
  83 +<block wx:if="{{'pages/reserve/search'!=url && 'pages/reserve/searchKeyword'!=url}}">
  84 + <view class="menu-search-fixed flex-vc" bindtap="tosearch" data-path="/pages/reserve/search">
  85 + <view class="white-font font22r smooth" style="color: #42A5FF;">搜索</view>
  86 + </view>
  87 +</block>
1 @import '../../app.wxss'; 1 @import '../../app.wxss';
2 -.menu{ 2 +.menu-cover{
3 width: 100rpx; 3 width: 100rpx;
4 height: 100rpx; 4 height: 100rpx;
5 border-radius: 50%; 5 border-radius: 50%;
6 position: fixed; 6 position: fixed;
7 - left: 40rpx;  
8 - bottom: 80rpx; 7 + left: 20rpx;
  8 + bottom: 200rpx;
9 z-index: 10001; 9 z-index: 10001;
10 border-radius: 50; 10 border-radius: 50;
11 - background: url(http://libpc.colorcun.com/navigator.png) center center no-repeat; 11 +}
  12 +.menu-mask{
  13 + position: fixed;
  14 + left: 0;
  15 + right: 0;
  16 + top: 0;
  17 + bottom: 0;
  18 + z-index: 10000;
  19 +}
  20 +.menu{
  21 + width: 100rpx;
  22 + height: 100rpx;
  23 + border-radius: 50%;
  24 + /* position: fixed;
  25 + left: 40rpx;
  26 + bottom: 200rpx;
  27 + z-index: 10000;
  28 + border-radius: 50; */
  29 + /* background: url(http://libpc.colorcun.com/navigator.png) center center no-repeat;
  30 + background-size: contain; */
  31 + background: rgba(0,0,0,.8);
  32 + position: relative;
  33 + z-index: 2;
  34 +}
  35 +.menu-search-fixed{
  36 + width: 100rpx;
  37 + height: 100rpx;
  38 + border-radius: 50%;
  39 + position: fixed;
  40 + left: 20rpx;
  41 + bottom:380rpx;
  42 + z-index: 9999;
  43 + background: url(http://nosqn.colorcun.com/searchfixed.png) center center no-repeat;
12 background-size: contain; 44 background-size: contain;
  45 + padding-top: 40rpx;
  46 + box-sizing: border-box;
  47 + font-size: 22rpx;
  48 + color: #42A5FF;
13 } 49 }
14 .menu image{ 50 .menu image{
15 width: 34rpx; 51 width: 34rpx;
@@ -29,34 +65,72 @@ @@ -29,34 +65,72 @@
29 box-sizing: border-box; 65 box-sizing: border-box;
30 } 66 }
31 .menu-item{ 67 .menu-item{
  68 + width: 100rpx;
32 height: 100rpx; 69 height: 100rpx;
33 margin-bottom: 40rpx; 70 margin-bottom: 40rpx;
  71 + position: absolute;
  72 + background: rgba(0,0,0,.8);
  73 + border-radius: 50%;
  74 + left: 0;
  75 + top: 0;
  76 + transition: left .2s ease,top .2s ease;
  77 + opacity: 0;
  78 +}
  79 +.menu-item-me-active{
  80 + opacity: 1;
  81 + left: 0rpx;
  82 + top: -180rpx;
  83 +}
  84 +.menu-item-order-active{
  85 + opacity: 1;
  86 + left: 106rpx;
  87 + top: -146rpx;
  88 +}
  89 +.menu-item-home-active{
  90 + opacity: 1;
  91 + left: 171rpx;
  92 + top: -56rpx;
  93 +}
  94 +.menu-item-collection-active{
  95 + opacity: 1;
  96 + left: 171rpx;
  97 + top: 56rpx;
  98 +}
  99 +.menu-item-package-active{
  100 + opacity: 1;
  101 + left: 106rpx;
  102 + top: 146rpx;
  103 +}
  104 +.menu-item-card-active{
  105 + opacity: 1;
  106 + left: 0rpx;
  107 + top: 180rpx;
34 } 108 }
35 .menu-item-image{ 109 .menu-item-image{
36 width: 100rpx; 110 width: 100rpx;
37 height: 100rpx; 111 height: 100rpx;
38 - margin-right: 20rpx;  
39 - border-radius: 50%; 112 + /* margin-right: 20rpx; */
  113 + /* border-radius: 50%; */
40 } 114 }
41 .menu-item-search{ 115 .menu-item-search{
42 background: url(http://libpc.colorcun.com/search.png) center center no-repeat; 116 background: url(http://libpc.colorcun.com/search.png) center center no-repeat;
43 background-size: contain; 117 background-size: contain;
44 } 118 }
45 .menu-item-order{ 119 .menu-item-order{
46 - background: url(http://libpc.colorcun.com/order.png) center center no-repeat;  
47 - background-size: contain; 120 + /* background: url(http://libpc.colorcun.com/order.png) center center no-repeat;
  121 + background-size: contain; */
48 } 122 }
49 .menu-item-me{ 123 .menu-item-me{
50 - background: url(http://libpc.colorcun.com/me.png) center center no-repeat;  
51 - background-size: contain; 124 + /* background: url(http://libpc.colorcun.com/me.png) center center no-repeat;
  125 + background-size: contain; */
52 } 126 }
53 .menu-item-back{ 127 .menu-item-back{
54 - background: url(http://nosqn.colorcun.com/menu-back.png) center center no-repeat;  
55 - background-size: contain; 128 + /* background: url(http://nosqn.colorcun.com/menu-back.png) center center no-repeat;
  129 + background-size: contain; */
56 } 130 }
57 .menu-item-nearby{ 131 .menu-item-nearby{
58 - background: url(http://libpc.colorcun.com/nearby.png) center center no-repeat;  
59 - background-size: contain; 132 + /* background: url(http://libpc.colorcun.com/nearby.png) center center no-repeat;
  133 + background-size: contain; */
60 } 134 }
61 .click-icon{ 135 .click-icon{
62 width: 12rpx; 136 width: 12rpx;
@@ -68,4 +142,13 @@ @@ -68,4 +142,13 @@
68 } 142 }
69 .gray-font{ 143 .gray-font{
70 color: #999999; 144 color: #999999;
  145 +}
  146 +.notice{
  147 + width: 16rpx;
  148 + height: 16rpx;
  149 + border-radius: 50%;
  150 + background: #FA5151;
  151 + position: absolute;
  152 + right: 14rpx;
  153 + top: 32rpx;
71 } 154 }
@@ -8,6 +8,7 @@ Component({ @@ -8,6 +8,7 @@ Component({
8 }, 8 },
9 methods:{ 9 methods:{
10 showmenu(){ 10 showmenu(){
  11 + console.log('66666')
11 this.setData({ 12 this.setData({
12 menuhidden:false 13 menuhidden:false
13 }) 14 })
@@ -17,10 +18,10 @@ Component({ @@ -17,10 +18,10 @@ Component({
17 menuhidden:true 18 menuhidden:true
18 }) 19 })
19 }, 20 },
20 - topage(e){  
21 - let url=e.currentTarget.dataset.path;  
22 - wx.redirectTo({  
23 - url:url 21 + noopen(){
  22 + wx.showToast({
  23 + title:'当前城市暂未开通该服务,敬请期待',
  24 + icon:'none'
24 }) 25 })
25 }, 26 },
26 setStatus(){ 27 setStatus(){
1 -<view class="menu flex-vc white-font font26r" bindtap="showmenu">  
2 - <view>更多</view>  
3 - <view>服务</view> 1 +<view class="menu-mask" hidden="{{menuhidden}}" bindtap="hidemenu"></view>
  2 +<view class="service-cover">
  3 + <view class="menu flex-vc white-font font26r" bindtap="{{menuhidden ? 'showmenu' : 'hidemenu'}}">
  4 + <block wx:if="{{menuhidden}}">
  5 + <view>其他</view>
  6 + <view>服务</view>
  7 + </block>
  8 + <block wx:else>关闭</block>
  9 + </view>
  10 + <view class="service-item gray-font font30r smooth flex-cc {{menuhidden ? '' : 'menu-item-driving-active'}}" bindtap="noopen">代驾</view>
  11 + <view class="service-item gray-font font30r smooth flex-cc {{menuhidden ? '' : 'menu-item-teahouse-active'}}" bindtap="noopen">茶楼</view>
  12 + <view class="service-item gray-font font30r smooth flex-cc {{menuhidden ? '' : 'menu-item-foot-active'}}" bindtap="noopen">沐足</view>
  13 + <view class="service-item gray-font font30r smooth flex-cc {{menuhidden ? '' : 'menu-item-shower-active'}}" bindtap="noopen">洗浴</view>
4 </view> 14 </view>
5 -<view class="menu-list flex-vr" style="justify-content: flex-end;align-items: flex-end;" hidden="{{menuhidden}}" bindtap="hidemenu"> 15 +<!-- <view class="menu-list flex-vr" style="justify-content: flex-end;align-items: flex-end;" hidden="{{menuhidden}}" bindtap="hidemenu">
6 <view class="menu-item menu-seller-item flex-rr"> 16 <view class="menu-item menu-seller-item flex-rr">
7 <view class="gray-font font30r smooth">代驾</view> 17 <view class="gray-font font30r smooth">代驾</view>
8 <view class="menu-item-image menu-item-driving"></view> 18 <view class="menu-item-image menu-item-driving"></view>
@@ -23,29 +33,4 @@ @@ -23,29 +33,4 @@
23 <view class="white-font font30r smooth">返回</view> 33 <view class="white-font font30r smooth">返回</view>
24 <view class="menu-item-image menu-item-back"></view> 34 <view class="menu-item-image menu-item-back"></view>
25 </view> 35 </view>
26 - <!-- <block wx:if="{{'pages/me/index'!=url}}">  
27 - <view class="menu-item menu-seller-item flex-rr" bindtap="topage" data-path="/pages/me/index">  
28 - <view class="menu-item-image menu-item-me"></view>  
29 - <view class="white-font font30r smooth">我的</view>  
30 - </view>  
31 - </block>  
32 - <block wx:if="{{'pages/me/list'!=url}}">  
33 - <view class="menu-item menu-seller-item flex-rr" bindtap="topage" data-path="/pages/me/list">  
34 - <view class="menu-item-image menu-item-order"></view>  
35 - <view class="white-font font30r smooth">订单</view>  
36 - </view>  
37 - </block>  
38 - <block wx:if="{{'pages/reserve/search'!=url}}">  
39 - <view class="menu-item menu-seller-item flex-rr" bindtap="topage" data-path="/pages/reserve/search">  
40 - <view class="menu-item-image menu-item-search"></view>  
41 - <view class="white-font font30r smooth" bindtap="">搜索</view>  
42 - </view>  
43 - </block>  
44 - <block wx:if="{{'pages/reserve/index'!=url}}">  
45 - <view class="menu-item menu-seller-item flex-rr" bindtap="topage" data-path="/pages/reserve/index">  
46 - <view class="menu-item-image menu-item-nearby"></view>  
47 - <view class="white-font font30r smooth" bindtap="">附近</view>  
48 - </view>  
49 - </block> -->  
50 -  
51 -</view>  
  36 +</view> -->
1 @import '../../app.wxss'; 1 @import '../../app.wxss';
2 -.menu{ 2 +.menu-mask{
  3 + position: fixed;
  4 + left: 0;
  5 + right: 0;
  6 + top: 0;
  7 + bottom: 0;
  8 + z-index: 9999;
  9 +}
  10 +.service-cover{
3 width: 100rpx; 11 width: 100rpx;
4 height: 100rpx; 12 height: 100rpx;
5 border-radius: 50%; 13 border-radius: 50%;
6 position: fixed; 14 position: fixed;
  15 + right: 20rpx;
  16 + bottom: 190rpx;
  17 + z-index: 10000;
  18 + border-radius: 50;
  19 +}
  20 +.menu{
  21 + width: 100rpx;
  22 + height: 100rpx;
  23 + border-radius: 50%;
  24 + /* position: fixed;
7 right: 40rpx; 25 right: 40rpx;
8 - bottom: 80rpx; 26 + bottom: 80rpx; */
9 z-index: 10001; 27 z-index: 10001;
10 border-radius: 50; 28 border-radius: 50;
11 background: rgba(0,0,0,.8); 29 background: rgba(0,0,0,.8);
12 /* background: url(http://libpc.colorcun.com/navigator.png) center center no-repeat; 30 /* background: url(http://libpc.colorcun.com/navigator.png) center center no-repeat;
13 background-size: contain; */ 31 background-size: contain; */
14 - line-height: 1.2; 32 + position: relative;
  33 + z-index: 2;
  34 +}
  35 +.service-item{
  36 + width: 100rpx;
  37 + height: 100rpx;
  38 + margin-bottom: 40rpx;
  39 + position: absolute;
  40 + background: rgba(0,0,0,.8);
  41 + border-radius: 50%;
  42 + right: 0;
  43 + top: 0;
  44 + transition: right .2s ease,top .2s ease;
  45 + opacity: 0;
  46 +}
  47 +.menu-item-driving-active{
  48 + opacity: 1;
  49 + top: -166rpx;
  50 + right:69rpx;
  51 +}
  52 +.menu-item-teahouse-active{
  53 + opacity: 1;
  54 + top: -69rpx;
  55 + right:166rpx;
  56 +}
  57 +.menu-item-foot-active{
  58 + opacity: 1;
  59 + top: 69rpx;
  60 + right:166rpx;
  61 +}
  62 +.menu-item-shower-active{
  63 + opacity: 1;
  64 + top: 166rpx;
  65 + right:69rpx;
15 } 66 }
16 .menu image{ 67 .menu image{
17 width: 34rpx; 68 width: 34rpx;
@@ -17,6 +17,10 @@ Component({ @@ -17,6 +17,10 @@ Component({
17 type:Boolean, 17 type:Boolean,
18 value:false, 18 value:false,
19 }, 19 },
  20 + search:{
  21 + type:Boolean,
  22 + value:true
  23 + }
20 }, 24 },
21 25
22 /** 26 /**
@@ -31,7 +35,10 @@ Component({ @@ -31,7 +35,10 @@ Component({
31 */ 35 */
32 methods: { 36 methods: {
33 detailGo(){ 37 detailGo(){
34 - this.SetHistorySearch(); 38 + if(this.data.search==true){
  39 + this.SetHistorySearch();
  40 + }
  41 +
35 this.triggerEvent('click',{act:'detail',data:this.data.item}) 42 this.triggerEvent('click',{act:'detail',data:this.data.item})
36 }, 43 },
37 reserveGo(){ 44 reserveGo(){
@@ -100,7 +100,7 @@ Page({ @@ -100,7 +100,7 @@ Page({
100 100
101 if(bi.type==0){ 101 if(bi.type==0){
102 if (!this.detailData.hasOwner && !this.hasCallPhone) { 102 if (!this.detailData.hasOwner && !this.hasCallPhone) {
103 - return util.toast('只有记录人可以拨打', 'none'); 103 + return util.toast('您无权拨打电话', 'none');
104 } 104 }
105 }else{ 105 }else{
106 //getApp().isAdmin 106 //getApp().isAdmin
@@ -210,7 +210,21 @@ Page({ @@ -210,7 +210,21 @@ Page({
210 res.data.cancel.cdateStr = util.unixtoTime(res.data.cancel.cdate, "YYYY.MM.DD HH:II") 210 res.data.cancel.cdateStr = util.unixtoTime(res.data.cancel.cdate, "YYYY.MM.DD HH:II")
211 } 211 }
212 this.detailData = RS.reserve(res.data); 212 this.detailData = RS.reserve(res.data);
213 - 213 + let user=util.cache('seller_user');
  214 + if(user.id!=this.detailData.uid){
  215 + if(this.detailData.phoneStr!=''){
  216 + let phoneStr=this.detailData.phoneStr;
  217 + let phonearr=phoneStr.split('');
  218 + for(let i=3;i<7;i++){
  219 + phonearr.splice(i,1,'*');
  220 + }
  221 + console.log(phonearr)
  222 + phoneStr=phonearr.join('');
  223 + this.detailData.phoneStr=phoneStr;
  224 + }
  225 +
  226 + }
  227 +
214 let tpl='MM月DD日 HH:II' 228 let tpl='MM月DD日 HH:II'
215 /* 229 /*
216 if(this.detailData.type>0){ 230 if(this.detailData.type>0){
@@ -245,22 +259,38 @@ Page({ @@ -245,22 +259,38 @@ Page({
245 }) 259 })
246 }, 260 },
247 gotoModify() { 261 gotoModify() {
248 - let url  
249 - if(this.detailData.type==1){  
250 - url='./online_update'  
251 - wx.navigateTo({  
252 - url: url+'?id=' + this.data.bookInfo.id  
253 - })  
254 - }else{  
255 - url='./b_addnew'  
256 - wx.redirectTo({  
257 - url: url+'?id=' + this.data.bookInfo.id  
258 - })  
259 - } 262 + let user=util.cache('seller_user');
  263 + if(user.id==this.data.bookInfo.uid || user.role_name=='管理员' || user.role_name=='店长'){
  264 + let url
  265 + if(this.detailData.type==1){
  266 + url='./online_update'
  267 + wx.navigateTo({
  268 + url: url+'?id=' + this.data.bookInfo.id
  269 + })
  270 + }else{
  271 + url='./b_addnew'
  272 + wx.redirectTo({
  273 + url: url+'?id=' + this.data.bookInfo.id
  274 + })
  275 + }
  276 + }else{
  277 + wx.showToast({
  278 + title:'您无权操作该订单'
  279 + })
  280 + }
  281 +
260 282
261 }, 283 },
262 cancelReserve() { 284 cancelReserve() {
263 - this.selectComponent('#cancel').show(); 285 + let user=util.cache('seller_user');
  286 + if(user.id==this.data.bookInfo.uid || user.role_name=='管理员' || user.role_name=='店长'){
  287 + this.selectComponent('#cancel').show();
  288 + }else{
  289 + wx.showToast({
  290 + title:'您无权操作该订单'
  291 + })
  292 + }
  293 +
264 }, 294 },
265 reserveCancel(e) { 295 reserveCancel(e) {
266 console.log('reserveCancel', e.detail); 296 console.log('reserveCancel', e.detail);
@@ -128,7 +128,7 @@ Page({ @@ -128,7 +128,7 @@ Page({
128 }, 128 },
129 call(){ 129 call(){
130 wx.makePhoneCall({ 130 wx.makePhoneCall({
131 - phoneNumber: this.data.staffinfo.phone //仅为示例,并非真实的电话号码 131 + phoneNumber: this.data.staffinfo.phone ? this.data.staffinfo.phone : this.data.detail.seller.seller_tel.split(',')[0]//仅为示例,并非真实的电话号码
132 }) 132 })
133 }, 133 },
134 test(e){ 134 test(e){
@@ -168,7 +168,7 @@ Page({ @@ -168,7 +168,7 @@ Page({
168 }) 168 })
169 }, 169 },
170 getroomimage(){ 170 getroomimage(){
171 - App.Photo.getSellerPhotoById({sellerid:this.data.detail.seller.id,type:2}).then((json)=>{ 171 + App.Tables.GetTablesPhoto({sellerid:this.data.detail.seller.id,tableids:this.tablestr}).then((json)=>{
172 if(json.ret==200){ 172 if(json.ret==200){
173 this.setData({ 173 this.setData({
174 roomimage:json.data 174 roomimage:json.data
@@ -244,10 +244,16 @@ Page({ @@ -244,10 +244,16 @@ Page({
244 openid: getApp().openid, 244 openid: getApp().openid,
245 rid: this.id 245 rid: this.id
246 }, fouce).then(res => { 246 }, fouce).then(res => {
247 - let tables=[]; 247 + let tables=[],regions=[],tabaleids=[];
248 res.data.tables.forEach(t=>{ 248 res.data.tables.forEach(t=>{
249 tables.push(t.name); 249 tables.push(t.name);
  250 + tabaleids.push(t.id);
  251 + if(regions.indexOf('t.rname')==-1){
  252 + regions.push(t.rname);
  253 + }
  254 +
250 }) 255 })
  256 + this.tablestr=tabaleids.toString();
251 let reserev=RS.reserve(res.data) 257 let reserev=RS.reserve(res.data)
252 console.log('reserev',reserev) 258 console.log('reserev',reserev)
253 let dateSmart 259 let dateSmart
@@ -266,9 +272,11 @@ Page({ @@ -266,9 +272,11 @@ Page({
266 seller:{ 272 seller:{
267 name:res.data.seller.sellername, 273 name:res.data.seller.sellername,
268 room:tables.join('、'), 274 room:tables.join('、'),
  275 + region:regions.join('、'),
269 date:dateSmart, 276 date:dateSmart,
270 addr:res.data.seller.real_address||res.data.seller.map_address, 277 addr:res.data.seller.real_address||res.data.seller.map_address,
271 image:res.data.image_url, 278 image:res.data.image_url,
  279 + tel:reserev.seller.seller_tel.split(',')[0]
272 } 280 }
273 }) 281 })
274 if(this.data.detail.type==0){ 282 if(this.data.detail.type==0){
@@ -413,6 +421,9 @@ Page({ @@ -413,6 +421,9 @@ Page({
413 fromid:getApp().openid, 421 fromid:getApp().openid,
414 hasInvitation:1, 422 hasInvitation:1,
415 tplid:this.data.options.tplid, 423 tplid:this.data.options.tplid,
  424 + uid:this.data.options.uid ? itation:1,
  425 + tplid:this.data.options.tplid,
  426 + uid:this.data.options.uid ? this.data.options.uid : ''
416 },'/pages/customer/index'), 427 },'/pages/customer/index'),
417 imageUrl: this.data.tpls[0].shareImage, 428 imageUrl: this.data.tpls[0].shareImage,
418 } 429 }
@@ -443,4 +454,10 @@ Page({ @@ -443,4 +454,10 @@ Page({
443 morehidden:true 454 morehidden:true
444 }) 455 })
445 }, 456 },
  457 + noopenservice(){
  458 + wx.showToast({
  459 + title:'当前城市暂未开通该服务,敬请期待',
  460 + icon:'none'
  461 + })
  462 + }
446 }) 463 })
1 <!--pages/customer/detail_owner.wxml--> 1 <!--pages/customer/detail_owner.wxml-->
2 <import src="../tpl/invitation"></import> 2 <import src="../tpl/invitation"></import>
3 <nav backgroundColor="rgba(0,0,0,0)" hasHome style="position: fixed;z-index: 1;" class="navhome" place="{{true}}"></nav> 3 <nav backgroundColor="rgba(0,0,0,0)" hasHome style="position: fixed;z-index: 1;" class="navhome" place="{{true}}"></nav>
4 -<block wx:if="{{detail && detail.type==0 && detail.channel==5}}"> 4 +<!-- detail.type==0 && detail.channel==5 -->
  5 +<block wx:if="{{detail}}">
5 <!-- <view class="pages bg-1" style="max-height:{{height}}px;overflow-y: scroll;padding-top: {{statusBarHeight+titleBarHeight}}px;line-height: 1.4;padding-bottom: 60rpx;position: relative;"> 6 <!-- <view class="pages bg-1" style="max-height:{{height}}px;overflow-y: scroll;padding-top: {{statusBarHeight+titleBarHeight}}px;line-height: 1.4;padding-bottom: 60rpx;position: relative;">
6 <view class="book-image flex-cc"></view> 7 <view class="book-image flex-cc"></view>
7 <view class="cover-conent flex-vc"> 8 <view class="cover-conent flex-vc">
@@ -90,9 +91,9 @@ @@ -90,9 +91,9 @@
90 <view class="font24r last-yellow-font" style="width:140rpx;padding: 0 20rpx;box-sizing: border-box;margin: 0 auto;" bindtap="secondbook">再次预订</view> 91 <view class="font24r last-yellow-font" style="width:140rpx;padding: 0 20rpx;box-sizing: border-box;margin: 0 auto;" bindtap="secondbook">再次预订</view>
91 <view style="height:40rpx;"></view> 92 <view style="height:40rpx;"></view>
92 </scroll-view> --> 93 </scroll-view> -->
93 - <scroll-view class="last-book-bg" style="padding-top: {{statusBarHeight+titleBarHeight}}px;line-height: 1.4;height:{{height}}px;" scroll-y>  
94 - <view class="book-flower"></view>  
95 - <view style="padding-left: 40rpx;box-sizing: border-box;"> 94 + <scroll-view class="last-book-bg" style="line-height: 1.4;height:{{height}}px;" scroll-y>
  95 + <view style="height:{{statusBarHeight+titleBarHeight}}px;"></view>
  96 + <view class="book-flower" style="top:{{statusBarHeight+titleBarHeight}}px;"></view><view style="padding-left: 40rpx;box-sizing: border-box;">
96 <view class="last-book-staff flex-vr" style="align-items: flex-end;"> 97 <view class="last-book-staff flex-vr" style="align-items: flex-end;">
97 <image src="{{staffinfo.photo}}" class="book-staff-headerimg" mode="aspectFit"></image> 98 <image src="{{staffinfo.photo}}" class="book-staff-headerimg" mode="aspectFit"></image>
98 <view class="flex-rr" style="margin-bottom: 20rpx;"> 99 <view class="flex-rr" style="margin-bottom: 20rpx;">
@@ -103,7 +104,7 @@ @@ -103,7 +104,7 @@
103 </view> 104 </view>
104 </view> 105 </view>
105 <view class="flex-rr" bindtap="call"> 106 <view class="flex-rr" bindtap="call">
106 - <view class="flex-rr font26r yellow-font">{{staffinfo.phone}}</view> 107 + <view class="flex-rr font26r yellow-font">{{staffinfo.phone ? staffinfo.phone : seller.tel}}</view>
107 <view class="book-staff-item-button flex-cc"> 108 <view class="book-staff-item-button flex-cc">
108 <image src="http://nosqn.colorcun.com/book-phone.png" class="book-header-icon"></image> 109 <image src="http://nosqn.colorcun.com/book-phone.png" class="book-header-icon"></image>
109 <view class="font22r brown-font">拨打电话</view> 110 <view class="font22r brown-font">拨打电话</view>
@@ -114,9 +115,11 @@ @@ -114,9 +115,11 @@
114 <view class="yellow-font font44r" style="margin-bottom: 60rpx;">{{seller.name}}</view> 115 <view class="yellow-font font44r" style="margin-bottom: 60rpx;">{{seller.name}}</view>
115 <view> 116 <view>
116 <view class="font26r" style="color: #C9BD89;margin-bottom: 20rpx;">已为您安排在包间</view> 117 <view class="font26r" style="color: #C9BD89;margin-bottom: 20rpx;">已为您安排在包间</view>
  118 + <view class="font40r" style="color: #E8D47E;margin-bottom: 20rpx;">{{seller.region}}</view>
117 <view class="book-room-rect flex-cc"> 119 <view class="book-room-rect flex-cc">
118 <view class="font44r yellow-font">{{seller.room}}</view> 120 <view class="font44r yellow-font">{{seller.room}}</view>
119 <view class="book-look-button brown-font font22r flex-cc" wx:if="{{roomimage && roomimage.length>0}}" bindtap="lookroom">浏览照片</view> 121 <view class="book-look-button brown-font font22r flex-cc" wx:if="{{roomimage && roomimage.length>0}}" bindtap="lookroom">浏览照片</view>
  122 + <view class="book-look-button gray-font font22r flex-cc" wx:else style="background: #CCCCCC;">浏览照片</view>
120 </view> 123 </view>
121 <view class="yellow-font font30r" style="margin-bottom: 24rpx;">时间:{{seller.date}}</view> 124 <view class="yellow-font font30r" style="margin-bottom: 24rpx;">时间:{{seller.date}}</view>
122 <view class="flex-lr" style="line-height: 1.2;padding-right: 40rpx;box-sizing: border-box;margin-bottom: 200rpx;"> 125 <view class="flex-lr" style="line-height: 1.2;padding-right: 40rpx;box-sizing: border-box;margin-bottom: 200rpx;">
@@ -127,13 +130,13 @@ @@ -127,13 +130,13 @@
127 </view> 130 </view>
128 </view> 131 </view>
129 <view class="confirm-cover" wx:if="{{showconfirm}}"> 132 <view class="confirm-cover" wx:if="{{showconfirm}}">
130 - <button class="book-share-button font38r flex-cc font-bold" catchtap="confirmed">确认收到</button> 133 + <button class="book-share-button font38r flex-cc font-bold" bindtap="confirmed">确认收到</button>
131 <view class="confirm-notice flex-vc"> 134 <view class="confirm-notice flex-vc">
132 <view class="white-font font26r flex-cc">点击确认收到,可告知发起人已收到邀请</view> 135 <view class="white-font font26r flex-cc">点击确认收到,可告知发起人已收到邀请</view>
133 <view class="angel"></view> 136 <view class="angel"></view>
134 </view> 137 </view>
135 </view> 138 </view>
136 - 139 + <view style="height: 240rpx;"></view>
137 </scroll-view> 140 </scroll-view>
138 <view class="all-button flex-lr" wx:if="{{!showconfirm}}"> 141 <view class="all-button flex-lr" wx:if="{{!showconfirm}}">
139 <block wx:if="{{detail.hasCancel}}"> 142 <block wx:if="{{detail.hasCancel}}">
@@ -148,9 +151,10 @@ @@ -148,9 +151,10 @@
148 <view class="font30r">转发好友</view> 151 <view class="font30r">转发好友</view>
149 </button> 152 </button>
150 </block> 153 </block>
151 - <view class="book-item-font second-book-button flex-cc" bindtap="secondbook"> 154 + <view class="book-item-font second-book-button flex-cc" bindtap="secondbook" style="position: relative;">
152 <image src="http://nosqn.colorcun.com/second-book.png" class="button-item-icon"></image> 155 <image src="http://nosqn.colorcun.com/second-book.png" class="button-item-icon"></image>
153 <view class="font30r">再次预订</view> 156 <view class="font30r">再次预订</view>
  157 + <view class="notice" style="top: -10rpx;right: 0rpx;"></view>
154 </view> 158 </view>
155 <view class="line-border"></view> 159 <view class="line-border"></view>
156 <block wx:if="{{list}}"> 160 <block wx:if="{{list}}">
@@ -164,26 +168,26 @@ @@ -164,26 +168,26 @@
164 <view class="book-buttons"> 168 <view class="book-buttons">
165 <view class="select-button white-font font28r flex-cc" bindtap="showselect">选项</view> 169 <view class="select-button white-font font28r flex-cc" bindtap="showselect">选项</view>
166 <view hidden="{{selecthidden}}"> 170 <view hidden="{{selecthidden}}">
167 - <navigator class="select-item-button flex-cc white-font font24r" style="left: 30rpx;bottom:328rpx;" open-type="redirect" url="/pages/customer/index?islove=custom">首页</navigator>  
168 - <navigator class="select-item-button flex-cc white-font font24r" style="left: 126rpx;bottom:242rpx;" open-type="redirect" url="/pages/me/index">我的</navigator>  
169 - <block wx:if="{{detail.hasCancel}}"><view class="select-item-button flex-cc gray-font font28r" style="left: 130rpx;bottom:110rpx;">取消订单</view>  
170 - <view class="select-item-button flex-cc white-font font24r" style="left: 130rpx;bottom:110rpx;" bindtap="cancelmodal">取消订单</view> 171 + <navigator class="select-item-button flex-cc white-font font24r" style="left: 75rpx;bottom:290rpx;" open-type="redirect" url="/pages/customer/index?islove=custom">首页</navigator>
  172 + <navigator class="select-item-button flex-cc white-font font24r" style="left: 150rpx;bottom:160rpx;" open-type="redirect" url="/pages/me/index">我的</navigator>
  173 + <block wx:if="{{detail.hasCancel}}">
  174 + <view class="select-item-button flex-cc gray-font font28r" style="left: 75rpx;bottom:30rpx;">取消订单</view>
171 </block> 175 </block>
172 <block wx:else> 176 <block wx:else>
173 - <view class="select-item-button flex-cc white-font font24r" style="left: 130rpx;bottom:110rpx;" bindtap="cancelmodal">取消订单</view> 177 + <view class="select-item-button flex-cc white-font font24r" style="left: 75rpx;bottom:30rpx;" bindtap="cancelmodal">取消订单</view>
174 </block> 178 </block>
175 - <view class="select-item-button flex-cc white-font font24r" style="left: 42rpx;bottom:10rpx;" bindtap="closeselect">返回</view> 179 + <!-- <view class="select-item-button flex-cc white-font font24r" style="left: 42rpx;bottom:10rpx;" bindtap="closeselect">返回</view> -->
176 </view> 180 </view>
177 </view> 181 </view>
178 <view class="book-mask" hidden="{{morehidden}}" bindtap="closemore"></view> 182 <view class="book-mask" hidden="{{morehidden}}" bindtap="closemore"></view>
179 <view class="service-buttons"> 183 <view class="service-buttons">
180 <view class="more-button white-font font28r flex-vc" bindtap="showmore">更多<view>服务</view></view> 184 <view class="more-button white-font font28r flex-vc" bindtap="showmore">更多<view>服务</view></view>
181 <view hidden="{{morehidden}}"> 185 <view hidden="{{morehidden}}">
182 - <view class="select-item-button flex-cc gray-font font24r" style="right: 0rpx;bottom:724rpx;">酒水</view>  
183 - <view class="select-item-button flex-cc gray-font font24r" style="right: 112rpx;bottom:660rpx;">代驾</view>  
184 - <view class="select-item-button flex-cc gray-font font24r" style="right: 152rpx;bottom:546rpx;">酒店</view>  
185 - <view class="select-item-button flex-cc gray-font font24r" style="right: 112rpx;bottom:430rpx;">茶楼沐足</view>  
186 - <view class="select-item-button flex-cc white-font font24r" style="right: 0rpx;bottom:368rpx;" bindtap="closemore">返回</view> 186 + <view class="select-item-button flex-cc gray-font font24r" style="right: 39rpx;bottom:681rpx;" bindtap="noopenservice">酒水</view>
  187 + <view class="select-item-button flex-cc gray-font font24r" style="right: 136rpx;bottom:599rpx;" bindtap="noopenservice">代驾</view>
  188 + <view class="select-item-button flex-cc gray-font font24r" style="right: 136rpx;bottom:473rpx;" bindtap="noopenservice">酒店</view>
  189 + <view class="select-item-button flex-cc gray-font font24r" style="right: 39rpx;bottom:391rpx;" bindtap="noopenservice">茶楼沐足</view>
  190 + <!-- <view class="select-item-button flex-cc white-font font24r" style="right: 0rpx;bottom:368rpx;" bindtap="closemore">返回</view> -->
187 </view> 191 </view>
188 </view> 192 </view>
189 <block wx:if="{{detail.hasCancel}}"> 193 <block wx:if="{{detail.hasCancel}}">
@@ -105,7 +105,7 @@ Page({ @@ -105,7 +105,7 @@ Page({
105 call(){ 105 call(){
106 wx.reportMonitor('1012', 1) 106 wx.reportMonitor('1012', 1)
107 wx.makePhoneCall({ 107 wx.makePhoneCall({
108 - phoneNumber: this.data.staffinfo.phone //仅为示例,并非真实的电话号码 108 + phoneNumber: this.data.staffinfo.phone ? this.data.staffinfo.phone : this.data.detail.seller.seller_tel.split(',')[0]//仅为示例,并非真实的电话号码
109 }) 109 })
110 }, 110 },
111 test(e){ 111 test(e){
@@ -139,7 +139,7 @@ Page({ @@ -139,7 +139,7 @@ Page({
139 }) 139 })
140 }, 140 },
141 getroomimage(){ 141 getroomimage(){
142 - App.Photo.getSellerPhotoById({sellerid:this.data.detail.seller.id,type:2}).then((json)=>{ 142 + App.Tables.GetTablesPhoto({sellerid:this.data.detail.seller.id,tableids:this.tablestr}).then((json)=>{
143 if(json.ret==200){ 143 if(json.ret==200){
144 this.setData({ 144 this.setData({
145 roomimage:json.data 145 roomimage:json.data
@@ -200,10 +200,16 @@ Page({ @@ -200,10 +200,16 @@ Page({
200 openid: getApp().openid, 200 openid: getApp().openid,
201 rid: this.data.options.id 201 rid: this.data.options.id
202 }, fouce).then(res => { 202 }, fouce).then(res => {
203 - let tables=[]; 203 + let tables=[],regions=[],tabaleids=[];
204 res.data.tables.forEach(t=>{ 204 res.data.tables.forEach(t=>{
205 tables.push(t.name); 205 tables.push(t.name);
  206 + tabaleids.push(t.id);
  207 + if(regions.indexOf('t.rname')==-1){
  208 + regions.push(t.rname);
  209 + }
  210 +
206 }) 211 })
  212 + this.tablestr=tabaleids.toString();
207 let reserev=RS.reserve(res.data) 213 let reserev=RS.reserve(res.data)
208 console.log('reserev',reserev) 214 console.log('reserev',reserev)
209 let dateSmart 215 let dateSmart
@@ -223,12 +229,14 @@ Page({ @@ -223,12 +229,14 @@ Page({
223 name:reserev.seller.sellername, 229 name:reserev.seller.sellername,
224 room:tables.join('、'), 230 room:tables.join('、'),
225 date:dateSmart, 231 date:dateSmart,
  232 + region:regions.join('、'),
226 addr:reserev.seller.real_address||reserev.seller.map_address, 233 addr:reserev.seller.real_address||reserev.seller.map_address,
227 image:reserev.image_url, 234 image:reserev.image_url,
228 hasOwner:true, 235 hasOwner:true,
229 type:reserev.type, 236 type:reserev.type,
230 is_set_ddate:reserev.is_set_ddate, 237 is_set_ddate:reserev.is_set_ddate,
231 hasUpTime:reserev.type==1 && reserev.hasRunning && reserev.status!=2, 238 hasUpTime:reserev.type==1 && reserev.hasRunning && reserev.status!=2,
  239 + tel:reserev.seller.seller_tel.split(',')[0]
232 } 240 }
233 }) 241 })
234 if(this.data.detail.type==0){ 242 if(this.data.detail.type==0){
@@ -362,7 +370,7 @@ Page({ @@ -362,7 +370,7 @@ Page({
362 tplid:this.data.options.tplid, 370 tplid:this.data.options.tplid,
363 } 371 }
364 if(this.data.options.uid){ 372 if(this.data.options.uid){
365 - parmdata.uid=this.data.options.uid; 373 + parmdata.uid=this.data.options.uid;
366 } 374 }
367 return { 375 return {
368 title: this.data.tpls[0].shareTitle, 376 title: this.data.tpls[0].shareTitle,
@@ -521,6 +529,12 @@ Page({ @@ -521,6 +529,12 @@ Page({
521 mask:true 529 mask:true
522 }) 530 })
523 }, 531 },
  532 + noopenservice(){
  533 + wx.showToast({
  534 + title:'当前城市暂未开通该服务,敬请期待',
  535 + icon:'none'
  536 + })
  537 + },
524 showselect(){ 538 showselect(){
525 wx.reportMonitor('1014', 1) 539 wx.reportMonitor('1014', 1)
526 this.setData({ 540 this.setData({
@@ -11,7 +11,8 @@ @@ -11,7 +11,8 @@
11 --> 11 -->
12 </nav> 12 </nav>
13 <!-- 内部预定 --> 13 <!-- 内部预定 -->
14 -<block wx:if="{{detail && detail.type==0 && detail.channel==5}}"> 14 +<!-- detail.type==0 && detail.channel==2 -->
  15 +<block wx:if="{{detail}}">
15 <!-- <view class="pages bg-1" style="max-height:{{height}}px;overflow-y: scroll;padding-top: {{statusBarHeight+titleBarHeight}}px;line-height: 1.4;padding-bottom: 60rpx;"> 16 <!-- <view class="pages bg-1" style="max-height:{{height}}px;overflow-y: scroll;padding-top: {{statusBarHeight+titleBarHeight}}px;line-height: 1.4;padding-bottom: 60rpx;">
16 <view class="book-image flex-cc"> 17 <view class="book-image flex-cc">
17 </view> 18 </view>
@@ -108,8 +109,9 @@ @@ -108,8 +109,9 @@
108 <view style="height:40rpx;"></view> 109 <view style="height:40rpx;"></view>
109 </scroll-view> --> 110 </scroll-view> -->
110 <showModal id="showModal" confirmText="知道了" bindshowModal="showModal" cla="checkout"></showModal> 111 <showModal id="showModal" confirmText="知道了" bindshowModal="showModal" cla="checkout"></showModal>
111 - <scroll-view class="last-book-bg" style="padding-top: {{statusBarHeight+titleBarHeight}}px;line-height: 1.4;height:{{height}}px;" scroll-y>  
112 - <view class="book-flower"></view> 112 + <scroll-view class="last-book-bg" style="line-height: 1.4;height:{{height}}px;" scroll-y>
  113 + <view style="height:{{statusBarHeight+titleBarHeight}}px;"></view>
  114 + <view class="book-flower" style="top:{{statusBarHeight+titleBarHeight}}px;"></view>
113 <view style="padding-left: 40rpx;box-sizing: border-box;"> 115 <view style="padding-left: 40rpx;box-sizing: border-box;">
114 <view class="last-book-staff flex-vr" style="align-items: flex-end;"> 116 <view class="last-book-staff flex-vr" style="align-items: flex-end;">
115 <image src="{{staffinfo.photo}}" class="book-staff-headerimg" mode="aspectFit"></image> 117 <image src="{{staffinfo.photo}}" class="book-staff-headerimg" mode="aspectFit"></image>
@@ -121,7 +123,7 @@ @@ -121,7 +123,7 @@
121 </view> 123 </view>
122 </view> 124 </view>
123 <view class="flex-rr"> 125 <view class="flex-rr">
124 - <view class="flex-rr font26r yellow-font">{{staffinfo.phone}}</view> 126 + <view class="flex-rr font26r yellow-font">{{staffinfo.phone ? staffinfo.phone : seller.tel}}</view>
125 <view class="book-staff-item-button flex-cc" bindtap="call"> 127 <view class="book-staff-item-button flex-cc" bindtap="call">
126 <image src="http://nosqn.colorcun.com/book-phone.png" class="book-header-icon"></image> 128 <image src="http://nosqn.colorcun.com/book-phone.png" class="book-header-icon"></image>
127 <view class="font22r brown-font">拨打电话</view> 129 <view class="font22r brown-font">拨打电话</view>
@@ -131,17 +133,24 @@ @@ -131,17 +133,24 @@
131 <view class="book-font"></view> 133 <view class="book-font"></view>
132 <view class="flex-lr" style="padding-right: 40rpx;box-sizing: border-box;align-items: flex-start;"> 134 <view class="flex-lr" style="padding-right: 40rpx;box-sizing: border-box;align-items: flex-start;">
133 <view class="yellow-font font44r" style="max-width:428rpx;margin-bottom: 60rpx;">{{seller.name}}</view> 135 <view class="yellow-font font44r" style="max-width:428rpx;margin-bottom: 60rpx;">{{seller.name}}</view>
  136 + <!-- <view class="last-book-food flex-cc" bindtap="cookbook">
  137 + <view class="white-font font30r smooth" style="color: #043341;">提前点餐</view>
  138 + <image src="http://nosqn.colorcun.com/book-direction.png" style="width: 12rpx;height: 24rpx;margin-left: 10rpx;"></image>
  139 + <view class="notice"></view>
  140 + </view> -->
134 <block wx:if="{{detail.seller.is_open_order==1 && !detail.hasOvered && !detail.hasCancel}}"> 141 <block wx:if="{{detail.seller.is_open_order==1 && !detail.hasOvered && !detail.hasCancel}}">
135 <block wx:if="{{detail && detail.seller.is_open_order==1}}"> 142 <block wx:if="{{detail && detail.seller.is_open_order==1}}">
136 <view class="last-book-food flex-cc" bindtap="cookbook"> 143 <view class="last-book-food flex-cc" bindtap="cookbook">
137 <view class="white-font font30r smooth" style="color: #043341;">提前点餐</view> 144 <view class="white-font font30r smooth" style="color: #043341;">提前点餐</view>
138 <image src="http://nosqn.colorcun.com/book-direction.png" style="width: 12rpx;height: 24rpx;margin-left: 10rpx;"></image> 145 <image src="http://nosqn.colorcun.com/book-direction.png" style="width: 12rpx;height: 24rpx;margin-left: 10rpx;"></image>
  146 + <view class="notice"></view>
139 </view> 147 </view>
140 </block> 148 </block>
141 <block wx:else> 149 <block wx:else>
142 <view class="last-book-food flex-ll" bindtap="noopen" data-mark="buy"> 150 <view class="last-book-food flex-ll" bindtap="noopen" data-mark="buy">
143 <view class="white-font font30r smooth">提前点餐</view> 151 <view class="white-font font30r smooth">提前点餐</view>
144 <image src="http://nosqn.colorcun.com/book-direction.png" style="width: 12rpx;height: 24rpx;margin-left: 10rpx;"></image> 152 <image src="http://nosqn.colorcun.com/book-direction.png" style="width: 12rpx;height: 24rpx;margin-left: 10rpx;"></image>
  153 + <view class="notice"></view>
145 </view> 154 </view>
146 </block> 155 </block>
147 </block> 156 </block>
@@ -149,9 +158,11 @@ @@ -149,9 +158,11 @@
149 158
150 <view> 159 <view>
151 <view class="font26r" style="color: #C9BD89;margin-bottom: 20rpx;">已为您安排在包间</view> 160 <view class="font26r" style="color: #C9BD89;margin-bottom: 20rpx;">已为您安排在包间</view>
  161 + <view class="font40r" style="color: #E8D47E;margin-bottom: 20rpx;">{{seller.region}}</view>
152 <view class="book-room-rect flex-cc"> 162 <view class="book-room-rect flex-cc">
153 <view class="font44r yellow-font">{{seller.room}}</view> 163 <view class="font44r yellow-font">{{seller.room}}</view>
154 <view class="book-look-button brown-font font22r flex-cc" wx:if="{{roomimage && roomimage.length>0}}" bindtap="lookroom">浏览照片</view> 164 <view class="book-look-button brown-font font22r flex-cc" wx:if="{{roomimage && roomimage.length>0}}" bindtap="lookroom">浏览照片</view>
  165 + <view class="book-look-button gray-font font22r flex-cc" wx:else style="background: #CCCCCC;">浏览照片</view>
155 </view> 166 </view>
156 <view class="yellow-font font30r" style="margin-bottom: 24rpx;">时间:{{seller.date}}</view> 167 <view class="yellow-font font30r" style="margin-bottom: 24rpx;">时间:{{seller.date}}</view>
157 <view class="flex-lr" style="line-height: 1.2;padding-right: 40rpx;box-sizing: border-box;"> 168 <view class="flex-lr" style="line-height: 1.2;padding-right: 40rpx;box-sizing: border-box;">
@@ -161,7 +172,7 @@ @@ -161,7 +172,7 @@
161 172
162 </view> 173 </view>
163 </view> 174 </view>
164 - 175 + <view style="height: 240rpx;"></view>
165 </scroll-view> 176 </scroll-view>
166 <view class="all-button flex-lr"> 177 <view class="all-button flex-lr">
167 <block wx:if="{{detail.hasCancel}}"> 178 <block wx:if="{{detail.hasCancel}}">
@@ -176,9 +187,10 @@ @@ -176,9 +187,10 @@
176 <view class="font30r">转发好友</view> 187 <view class="font30r">转发好友</view>
177 </button> 188 </button>
178 </block> 189 </block>
179 - <view class="book-item-font second-book-button flex-cc" bindtap="secondbook"> 190 + <view class="book-item-font second-book-button flex-cc" bindtap="secondbook" style="position: relative;">
180 <image src="http://nosqn.colorcun.com/second-book.png" class="button-item-icon"></image> 191 <image src="http://nosqn.colorcun.com/second-book.png" class="button-item-icon"></image>
181 <view class="font30r">再次预订</view> 192 <view class="font30r">再次预订</view>
  193 + <view class="notice" style="top: -10rpx;right: 0rpx;"></view>
182 </view> 194 </view>
183 <view class="line-border"></view> 195 <view class="line-border"></view>
184 <block wx:if="{{list}}"> 196 <block wx:if="{{list}}">
@@ -192,26 +204,26 @@ @@ -192,26 +204,26 @@
192 <view class="book-buttons"> 204 <view class="book-buttons">
193 <view class="select-button white-font font28r flex-cc" bindtap="showselect">选项</view> 205 <view class="select-button white-font font28r flex-cc" bindtap="showselect">选项</view>
194 <view hidden="{{selecthidden}}"> 206 <view hidden="{{selecthidden}}">
195 - <navigator class="select-item-button flex-cc white-font font24r" style="left: 30rpx;bottom:328rpx;" open-type="redirect" url="/pages/customer/index?islove=custom">首页</navigator>  
196 - <navigator class="select-item-button flex-cc white-font font24r" style="left: 126rpx;bottom:242rpx;" open-type="redirect" url="/pages/me/index">我的</navigator>  
197 - <block wx:if="{{detail.hasCancel}}"><view class="select-item-button flex-cc gray-font font28r" style="left: 130rpx;bottom:110rpx;">取消订单</view>  
198 - <view class="select-item-button flex-cc white-font font24r" style="left: 130rpx;bottom:110rpx;" bindtap="cancelmodal">取消订单</view> 207 + <navigator class="select-item-button flex-cc white-font font24r" style="left: 75rpx;bottom:290rpx;" open-type="redirect" url="/pages/customer/index?islove=custom">首页</navigator>
  208 + <navigator class="select-item-button flex-cc white-font font24r" style="left: 150rpx;bottom:160rpx;" open-type="redirect" url="/pages/me/index">我的</navigator>
  209 + <block wx:if="{{detail.hasCancel}}">
  210 + <view class="select-item-button flex-cc gray-font font28r" style="left: 75rpx;bottom:30rpx;">取消订单</view>
199 </block> 211 </block>
200 <block wx:else> 212 <block wx:else>
201 - <view class="select-item-button flex-cc white-font font24r" style="left: 130rpx;bottom:110rpx;" bindtap="cancelmodal">取消订单</view> 213 + <view class="select-item-button flex-cc white-font font24r" style="left: 75rpx;bottom:30rpx;" bindtap="cancelmodal">取消订单</view>
202 </block> 214 </block>
203 - <view class="select-item-button flex-cc white-font font24r" style="left: 42rpx;bottom:10rpx;" bindtap="closeselect">返回</view> 215 + <!-- <view class="select-item-button flex-cc white-font font24r" style="left: 42rpx;bottom:10rpx;" bindtap="closeselect">返回</view> -->
204 </view> 216 </view>
205 </view> 217 </view>
206 <view class="book-mask" hidden="{{morehidden}}" bindtap="closemore"></view> 218 <view class="book-mask" hidden="{{morehidden}}" bindtap="closemore"></view>
207 <view class="service-buttons"> 219 <view class="service-buttons">
208 <view class="more-button white-font font28r flex-vc" bindtap="showmore">更多<view>服务</view></view> 220 <view class="more-button white-font font28r flex-vc" bindtap="showmore">更多<view>服务</view></view>
209 <view hidden="{{morehidden}}"> 221 <view hidden="{{morehidden}}">
210 - <view class="select-item-button flex-cc gray-font font24r" style="right: 0rpx;bottom:724rpx;">酒水</view>  
211 - <view class="select-item-button flex-cc gray-font font24r" style="right: 112rpx;bottom:660rpx;">代驾</view>  
212 - <view class="select-item-button flex-cc gray-font font24r" style="right: 152rpx;bottom:546rpx;">酒店</view>  
213 - <view class="select-item-button flex-cc gray-font font24r" style="right: 112rpx;bottom:430rpx;">茶楼沐足</view>  
214 - <view class="select-item-button flex-cc white-font font24r" style="right: 0rpx;bottom:368rpx;" bindtap="closemore">返回</view> 222 + <view class="select-item-button flex-cc gray-font font24r" style="right: 39rpx;bottom:681rpx;" bindtap="noopenservice">酒水</view>
  223 + <view class="select-item-button flex-cc gray-font font24r" style="right: 136rpx;bottom:599rpx;" bindtap="noopenservice">代驾</view>
  224 + <view class="select-item-button flex-cc gray-font font24r" style="right: 136rpx;bottom:473rpx;" bindtap="noopenservice">酒店</view>
  225 + <view class="select-item-button flex-cc gray-font font24r" style="right: 39rpx;bottom:391rpx;" bindtap="noopenservice">茶楼沐足</view>
  226 + <!-- <view class="select-item-button flex-cc white-font font24r" style="right: 0rpx;bottom:368rpx;" bindtap="closemore">返回</view> -->
215 </view> 227 </view>
216 </view> 228 </view>
217 <block wx:if="{{detail.hasCancel}}"> 229 <block wx:if="{{detail.hasCancel}}">
@@ -406,4 +406,15 @@ image{ @@ -406,4 +406,15 @@ image{
406 height: 62rpx; 406 height: 62rpx;
407 background: linear-gradient(to right,#E1B275,#FEEFBC,#E1B275); 407 background: linear-gradient(to right,#E1B275,#FEEFBC,#E1B275);
408 border-radius: 32rpx; 408 border-radius: 32rpx;
  409 + position: relative;
  410 + z-index: 100;
  411 +}
  412 +.notice{
  413 + width: 20rpx;
  414 + height: 20rpx;
  415 + border-radius: 50%;
  416 + position: absolute;
  417 + right: -10rpx;
  418 + top: 10rpx;
  419 + background: #E61010;
409 } 420 }
@@ -126,7 +126,7 @@ Page({ @@ -126,7 +126,7 @@ Page({
126 }) 126 })
127 if(opt.uid && opt.uid!=''){ 127 if(opt.uid && opt.uid!=''){
128 App.Activity.SetRelation({ 128 App.Activity.SetRelation({
129 - uid:opt.uid 129 + uid:opt.uid,
130 }) 130 })
131 App.Activity.SetIntegral({ 131 App.Activity.SetIntegral({
132 uid:opt.uid, 132 uid:opt.uid,
1 <!--pages/me/follow.wxml--> 1 <!--pages/me/follow.wxml-->
2 -<nav>关注</nav> 2 +<nav>收藏</nav>
3 <view class="pages"> 3 <view class="pages">
4 <view class="flex-vc empty" wx:if="{{sellers.length<1}}"> 4 <view class="flex-vc empty" wx:if="{{sellers.length<1}}">
5 <image src="http://nosqn.colorcun.com/2.0/home%20%2818%29.png" style="width: 520rpx;height: 348rpx;"></image> 5 <image src="http://nosqn.colorcun.com/2.0/home%20%2818%29.png" style="width: 520rpx;height: 348rpx;"></image>
6 - <view style="font-size: 28rpx;margin-top: 40rpx;">暂时没有关注的店铺哦</view> 6 + <view style="font-size: 28rpx;margin-top: 40rpx;">暂时没有收藏的店铺哦</view>
7 </view> 7 </view>
8 <view class="follow" wx:else=""> 8 <view class="follow" wx:else="">
9 <block wx:for="{{sellers}}" wx:key="sellers" > 9 <block wx:for="{{sellers}}" wx:key="sellers" >
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 <navigator url="/pages/me/follow" class="money-item"> 16 <navigator url="/pages/me/follow" class="money-item">
17 <view class="flex-vc"> 17 <view class="flex-vc">
18 <view class="money-value">{{user.collection||0}}</view> 18 <view class="money-value">{{user.collection||0}}</view>
19 - <view class="money-title">关注</view> 19 + <view class="money-title">我的收藏</view>
20 </view> 20 </view>
21 </navigator> 21 </navigator>
22 <navigator url="/pack-activity/pages/money" class="money-item"> 22 <navigator url="/pack-activity/pages/money" class="money-item">
@@ -46,11 +46,23 @@ @@ -46,11 +46,23 @@
46 </view> 46 </view>
47 </navigator> 47 </navigator>
48 <view class="content flex-ll"> 48 <view class="content flex-ll">
49 - <view class="flex-vc" bindtap="gotoList" data-type="1"> 49 + <view class="flex-vc order-item" bindtap="gotoList" data-type="1">
50 <view class="icon o1"></view> 50 <view class="icon o1"></view>
51 - <view class="text">等待确认</view>  
52 - </view>  
53 - <view class="flex-vc" bindtap="gotoList" data-type="2"> 51 + <view class="text">待确认</view>
  52 + <view class="number-notice white-font font24r flex-cc" wx:if="{{user.queren>0}}">{{user.queren}}</view>
  53 + </view>
  54 + <view class="flex-vc order-item" bindtap="gotoList" data-type="5">
  55 + <view class="icon o1"></view>
  56 + <view class="text">未赴约</view>
  57 + <view class="number-notice white-font font24r flex-cc" wx:if="{{user.fuyue>0}}">{{user.fuyue}}</view>
  58 + </view>
  59 +
  60 + <view class="flex-vc order-item" bindtap="gotoList" data-type="6">
  61 + <view class="icon o1"></view>
  62 + <view class="text">待评价</view>
  63 + <view class="number-notice white-font font24r flex-cc" wx:if="{{user.pingjia>0}}">{{user.pingjia}}</view>
  64 + </view>
  65 + <!-- <view class="flex-vc" bindtap="gotoList" data-type="2">
54 <view class="icon o2"></view> 66 <view class="icon o2"></view>
55 <view class="text">预订成功</view> 67 <view class="text">预订成功</view>
56 </view> 68 </view>
@@ -61,10 +73,10 @@ @@ -61,10 +73,10 @@
61 <view class="flex-vc" bindtap="gotoList" data-type="4"> 73 <view class="flex-vc" bindtap="gotoList" data-type="4">
62 <view class="icon o4"></view> 74 <view class="icon o4"></view>
63 <view class="text">无效预订</view> 75 <view class="text">无效预订</view>
64 - </view> 76 + </view> -->
65 </view> 77 </view>
66 </view> 78 </view>
67 - <view class="block-list" style="margin-bottom: 20rpx;" bindtap="gotoList" data-type="5"> 79 + <view class="block-list" style="margin-bottom: 20rpx;" bindtap="gotoList" data-type="7">
68 <view class="item flex-lr"> 80 <view class="item flex-lr">
69 <view class="item-name flex-ll"> 81 <view class="item-name flex-ll">
70 <view class="taocan"></view> 82 <view class="taocan"></view>
@@ -219,4 +219,21 @@ image{ @@ -219,4 +219,21 @@ image{
219 } 219 }
220 .col-4 navigator{ 220 .col-4 navigator{
221 padding-top: 60rpx; 221 padding-top: 60rpx;
  222 +}
  223 +
  224 +.order-item{
  225 + position: relative;
  226 +}
  227 +.number-notice{
  228 + min-width: 32rpx;
  229 + height: 32rpx;
  230 + position: absolute;
  231 + left: 50%;
  232 + top: -16rpx;
  233 + background:#FA5151;
  234 + margin-left: 8rpx;
  235 + border-radius: 16rpx;
  236 + font-size: 20rpx;
  237 + padding: 0 10rpx;
  238 + box-sizing: border-box;
222 } 239 }
@@ -53,7 +53,7 @@ Page({ @@ -53,7 +53,7 @@ Page({
53 onShow: function () { 53 onShow: function () {
54 PubSub.emit('custom-tab-bar') 54 PubSub.emit('custom-tab-bar')
55 console.log('getApp().meListType',getApp().meListType) 55 console.log('getApp().meListType',getApp().meListType)
56 - if(getApp().meListType && getApp().meListType<5){ 56 + if(getApp().meListType && getApp().meListType<7){
57 this.getautomenu(); 57 this.getautomenu();
58 } 58 }
59 if(!getApp().meListType) getApp().meListType=defTabType 59 if(!getApp().meListType) getApp().meListType=defTabType
@@ -89,19 +89,19 @@ Page({ @@ -89,19 +89,19 @@ Page({
89 89
90 }, 90 },
91 getLisType(){ 91 getLisType(){
92 - if(this.tabType<5) return {type:this.tabType} 92 + if(this.tabType<7) return {type:this.tabType}
93 //2=交易成功(待使用) 3=已使用 5=已退款 6=已过期 93 //2=交易成功(待使用) 3=已使用 5=已退款 6=已过期
94 - return {status:{5:2,6:3,7:6,8:5}[this.tabType]} 94 + return {status:{7:2,8:3,9:6,10:5}[this.tabType]}
95 }, 95 },
96 getOffset(){ 96 getOffset(){
97 - if(this.tabType<5) return this.offset 97 + if(this.tabType<7) return this.offset
98 let page=parseInt(this.offset/this.limit)+1 98 let page=parseInt(this.offset/this.limit)+1
99 return page 99 return page
100 }, 100 },
101 getListData() { 101 getListData() {
102 let tabType=this.tabType 102 let tabType=this.tabType
103 let lisFun=App.Customer.GetMyOrder 103 let lisFun=App.Customer.GetMyOrder
104 - if(tabType>4){ 104 + if(tabType>6){
105 lisFun=App.Foodset.GetUserFoodOrders 105 lisFun=App.Foodset.GetUserFoodOrders
106 } 106 }
107 lisFun({ 107 lisFun({
@@ -122,7 +122,7 @@ Page({ @@ -122,7 +122,7 @@ Page({
122 [`list[`+tabType+`]`]: this.data.list[tabType].concat(data), 122 [`list[`+tabType+`]`]: this.data.list[tabType].concat(data),
123 hasMore:this.hasMore, 123 hasMore:this.hasMore,
124 }) 124 })
125 - if(tabType>4 && this.getOffset()==1){ 125 + if(tabType>6 && this.getOffset()==1){
126 this.setData({ 126 this.setData({
127 shownotice:resData.length>0 ? true : false 127 shownotice:resData.length>0 ? true : false
128 }) 128 })
@@ -149,7 +149,7 @@ Page({ @@ -149,7 +149,7 @@ Page({
149 }, 149 },
150 formatList(list) { 150 formatList(list) {
151 if (list.length<1) return []; 151 if (list.length<1) return [];
152 - if(this.tabType>4) return list; 152 + if(this.tabType>6) return list;
153 let dlist = []; 153 let dlist = [];
154 let openid = getApp().openid; 154 let openid = getApp().openid;
155 list.forEach(row => { 155 list.forEach(row => {
1 <!--pages/customer/list.wxml--> 1 <!--pages/customer/list.wxml-->
2 <nav> 2 <nav>
3 <view class="view header-tabs flex align-end"> 3 <view class="view header-tabs flex align-end">
4 - <view class="view item {{tabType<5?'active':''}} margin-right-lg" data-type="1" bindtap="switchType">我的订单</view>  
5 - <view class="view item {{tabType>4?'active':''}} flex-ll" data-type="5" bindtap="switchType"> 4 + <view class="view item {{tabType<7?'active':''}} margin-right-lg" data-type="1" bindtap="switchType">我的订单</view>
  5 + <view class="view item {{tabType>6?'active':''}} flex-ll" data-type="7" bindtap="switchType">
6 <view>我的套餐</view> 6 <view>我的套餐</view>
7 <view class="notice" wx:if="{{shownotice==true}}"></view> 7 <view class="notice" wx:if="{{shownotice==true}}"></view>
8 </view> 8 </view>
9 </view> 9 </view>
10 </nav> 10 </nav>
11 -<view class="view tabs flex padding-lr-lg padding-top-xs justify-between padding-bottom-sm margin-bottom-sm" wx:if="{{tabType<5}}">  
12 - <view class="view item {{tabType==1?'active':''}}" data-type="1" bindtap="switchType">等待确认</view>  
13 - <view class="view item {{tabType==2?'active':''}}" data-type="2" bindtap="switchType">预订成功</view>  
14 - <view class="view item {{tabType==3?'active':''}}" data-type="3" bindtap="switchType">历史订单</view>  
15 - <view class="view item {{tabType==4?'active':''}}" data-type="4" bindtap="switchType">无效预订</view> 11 +<view class="view tabs flex padding-lr-lg padding-top-xs justify-between padding-bottom-sm margin-bottom-sm" wx:if="{{tabType<7}}">
  12 + <view class="view item {{tabType==1?'active':''}}" data-type="1" bindtap="switchType">待确认</view>
  13 + <view class="view item {{tabType==5?'active':''}}" data-type="5" bindtap="switchType">未赴约</view>
  14 + <view class="view item {{tabType==6?'active':''}}" data-type="6" bindtap="switchType">待评价</view>
  15 + <!-- <view class="view item {{tabType==4?'active':''}}" data-type="4" bindtap="switchType">无效预订</view> -->
16 </view> 16 </view>
17 <view class="view tabs flex padding-lr-lg padding-top-xs justify-between padding-bottom-sm margin-bottom-sm" wx:else=""> 17 <view class="view tabs flex padding-lr-lg padding-top-xs justify-between padding-bottom-sm margin-bottom-sm" wx:else="">
18 - <view class="view item {{tabType==5?'active':''}}" data-type="5" bindtap="switchType">待使用</view>  
19 - <view class="view item {{tabType==6?'active':''}}" data-type="6" bindtap="switchType">已使用</view>  
20 - <view class="view item {{tabType==7?'active':''}}" data-type="7" bindtap="switchType">已过期</view>  
21 - <view class="view item {{tabType==8?'active':''}}" data-type="8" bindtap="switchType">退款</view> 18 + <view class="view item {{tabType==7?'active':''}}" data-type="7" bindtap="switchType">待使用</view>
  19 + <view class="view item {{tabType==8?'active':''}}" data-type="8" bindtap="switchType">已使用</view>
  20 + <view class="view item {{tabType==9?'active':''}}" data-type="9" bindtap="switchType">已过期</view>
  21 + <view class="view item {{tabType==10?'active':''}}" data-type="10" bindtap="switchType">退款</view>
22 </view> 22 </view>
23 <view class="view pages"> 23 <view class="view pages">
24 <block wx:if="{{list[tabType].length==0}}"> 24 <block wx:if="{{list[tabType].length==0}}">
@@ -28,13 +28,13 @@ @@ -28,13 +28,13 @@
28 </view> 28 </view>
29 </block> 29 </block>
30 <block wx:else=""> 30 <block wx:else="">
31 - <block wx:if="{{tabType<5}}"> 31 + <block wx:if="{{tabType<7}}">
32 <navigator wx:for="{{list[tabType]}}" wx:key="*this" 32 <navigator wx:for="{{list[tabType]}}" wx:key="*this"
33 wx:for-item="detail" wx:for-index="dateIndex" 33 wx:for-item="detail" wx:for-index="dateIndex"
34 - url="/pages/customer/{{detail.navigator}}?id={{detail.id}}"> 34 + url="/pages/customer/{{detail.navigator}}?id={{detail.id}}" hover-stop-propagation>
35 <card 35 <card
36 hasShowStatus bindevent="gotoDetail" 36 hasShowStatus bindevent="gotoDetail"
37 - seller="{{detail.seller}}" detail="{{detail}}"></card> 37 + seller="{{detail.seller}}" detail="{{detail}}" tabType="{{tabType}}"></card>
38 </navigator> 38 </navigator>
39 </block> 39 </block>
40 <view class="view padding-lr" wx:else=""> 40 <view class="view padding-lr" wx:else="">
@@ -2,24 +2,27 @@ @@ -2,24 +2,27 @@
2 import util from '../../utils/util'; 2 import util from '../../utils/util';
3 import App from '../../utils/api'; 3 import App from '../../utils/api';
4 const {regeneratorRuntime} = global 4 const {regeneratorRuntime} = global
5 -let getCates=async function(){  
6 - let res=await App.Reserve.GetCustomerConfig(); 5 +let getCates=async function(code){
  6 + let res=await App.Reserve.GetCustomerConfig({code:code});
7 let cates=[]; 7 let cates=[];
8 res.data.cate.forEach(ca=>{ 8 res.data.cate.forEach(ca=>{
9 - cates.push(ca.name); 9 + cates.push({
  10 + name:ca.name,
  11 + cu:ca.cu
  12 + });
10 }) 13 })
11 return cates; 14 return cates;
12 } 15 }
13 -let getLabels=async function(){  
14 - let res=await App.Reserve.GetCustomerConfig(); 16 +let getLabels=async function(code){
  17 + let res=await App.Reserve.GetCustomerConfig({code:code});
15 return res.data.pub_label; 18 return res.data.pub_label;
16 } 19 }
17 -let getCatesID=async function(index){  
18 - let res=await App.Reserve.GetCustomerConfig(); 20 +let getCatesID=async function(index,code){
  21 + let res=await App.Reserve.GetCustomerConfig({code:code});
19 return res.data.cate[index].id; 22 return res.data.cate[index].id;
20 } 23 }
21 -let getCitys=async function(){  
22 - let res=await App.Reserve.GetCustomerConfig(); 24 +let getCitys=async function(code){
  25 + let res=await App.Reserve.GetCustomerConfig({code:code});
23 return res.data.region_code; 26 return res.data.region_code;
24 } 27 }
25 export default { 28 export default {
@@ -20,7 +20,8 @@ Page({ @@ -20,7 +20,8 @@ Page({
20 * 生命周期函数--监听页面加载 20 * 生命周期函数--监听页面加载
21 */ 21 */
22 onLoad: function (options) { 22 onLoad: function (options) {
23 - this.options=options 23 + this.options=options;
  24 + this.getroomImage();
24 this.downloadImages() 25 this.downloadImages()
25 App.Customer.IsCollectionSeller({ 26 App.Customer.IsCollectionSeller({
26 sid:options.id, 27 sid:options.id,
@@ -366,4 +367,14 @@ Page({ @@ -366,4 +367,14 @@ Page({
366 this.selectComponent('#as').show(this.data.seller); 367 this.selectComponent('#as').show(this.data.seller);
367 } 368 }
368 }, 369 },
  370 + getroomImage(){
  371 + App.Tables.GetTablesPhotoBySid({sellerid:this.options.id}).then((json)=>{
  372 + console.log(json)
  373 + if(json.ret==200){
  374 + this.setData({
  375 + roomImages:json.data
  376 + })
  377 + }
  378 + })
  379 + }
369 }) 380 })
@@ -115,14 +115,23 @@ @@ -115,14 +115,23 @@
115 </block> 115 </block>
116 </view> 116 </view>
117 <taocan sid="{{seller.id}}" wx:if="{{seller.id}}"></taocan> 117 <taocan sid="{{seller.id}}" wx:if="{{seller.id}}"></taocan>
118 - <view class="view bg-white text-black padding-tb-lg margin-top-sm" wx:if="{{seller.room_image.length>0}}"> 118 + <view class="view bg-white text-black padding-tb-lg margin-top-sm" wx:if="{{roomImages && roomImages.length>0}}">
119 <view class="view padding-left-lg text-bold txt-40-h margin-bottom">参观包间</view> 119 <view class="view padding-left-lg text-bold txt-40-h margin-bottom">参观包间</view>
120 <scroll-view class="text-cut margin-bottom-sm" scroll-x="true" bindscroll="scroll" style="width: 100%;"> 120 <scroll-view class="text-cut margin-bottom-sm" scroll-x="true" bindscroll="scroll" style="width: 100%;">
121 - <block wx:for="{{seller.room_image}}" wx:key="room_image"> 121 + <!-- <block wx:for="{{seller.room_image}}" wx:key="room_image">
122 <image class="room_image" mode="aspectFill" 122 <image class="room_image" mode="aspectFill"
123 bindtap="reviweRoomImage" data-current="{{item}}" 123 bindtap="reviweRoomImage" data-current="{{item}}"
124 src="{{item}}?imageView2/2/w/640/interlace/0/q/100"></image> 124 src="{{item}}?imageView2/2/w/640/interlace/0/q/100"></image>
125 - </block> 125 + </block> -->
  126 + <block wx:for="{{roomImages}}" wx:key="room_image">
  127 + <view class="flex-vc" style="display: inline-block;">
  128 + <image class="room_image" mode="aspectFill"
  129 + bindtap="reviweRoomImage" data-current="{{item.url}}"
  130 + src="{{item.url}}?imageView2/2/w/640/interlace/0/q/100"></image>
  131 + <view class="black-font font36r flex-cc font-bold" style="padding: 10rpx 0;">{{item.name}}</view>
  132 + </view>
  133 +
  134 + </block>
126 </scroll-view> 135 </scroll-view>
127 </view> 136 </view>
128 <view class="view bg-white text-black padding-tb-lg margin-top-sm" wx:if="{{seller.dishes.length>0}}"> 137 <view class="view bg-white text-black padding-tb-lg margin-top-sm" wx:if="{{seller.dishes.length>0}}">
@@ -29,6 +29,11 @@ Page({ @@ -29,6 +29,11 @@ Page({
29 }) 29 })
30 }, 30 },
31 }) 31 })
  32 + const systeminfo=wx.getSystemInfoSync();
  33 + let ratio=750/systeminfo.windowWidth;
  34 + console.log(systeminfo)
  35 + this.systeminfo=systeminfo;
  36 + this.ratio=ratio;
32 }, 37 },
33 38
34 /** 39 /**
@@ -89,6 +94,12 @@ Page({ @@ -89,6 +94,12 @@ Page({
89 let sdobj = { 94 let sdobj = {
90 map: map, 95 map: map,
91 } 96 }
  97 + this.setData({
  98 + location:{
  99 + latitude:map.latitude,
  100 + longitude:map.longitude
  101 + }
  102 + })
92 this.setData(sdobj) 103 this.setData(sdobj)
93 }, 104 },
94 setLoacl(e){ 105 setLoacl(e){
@@ -109,6 +120,7 @@ Page({ @@ -109,6 +120,7 @@ Page({
109 }, 120 },
110 moveToLocation() { 121 moveToLocation() {
111 console.log('moveToLocation') 122 console.log('moveToLocation')
  123 + this.oldmap=null;
112 this.selectComponent('#getpos').getPos(true); 124 this.selectComponent('#getpos').getPos(true);
113 }, 125 },
114 switchpage(){ 126 switchpage(){
@@ -157,7 +169,16 @@ Page({ @@ -157,7 +169,16 @@ Page({
157 this.mapCtx.getRegion({ 169 this.mapCtx.getRegion({
158 success: (res) => { 170 success: (res) => {
159 if (res.southwest.latitude) { 171 if (res.southwest.latitude) {
160 - this.mapData.region = res 172 + let newragion=res;
  173 + let singlelat=(res.northeast.latitude-res.southwest.latitude)/this.systeminfo.windowHeight;
  174 + let distancelat=singlelat*(80/this.ratio);
  175 + let test=Number(distancelat.toFixed(7));
  176 + let oldlat=Number(res.southwest.latitude.toFixed(7));
  177 + let southwestlat=oldlat+test;
  178 + console.log('pua',test,oldlat,southwestlat);
  179 + newragion.southwest.latitude=southwestlat;
  180 + this.mapData.region = newragion;
  181 + console.log('uuuuuuu',newragion,southwestlat)
161 } 182 }
162 this.selectComponent('#filter-group').hide(); 183 this.selectComponent('#filter-group').hide();
163 this.getSellers(); 184 this.getSellers();
@@ -177,7 +198,7 @@ Page({ @@ -177,7 +198,7 @@ Page({
177 lng: this.user.longitude == def_longitude ? '' : this.user.longitude, 198 lng: this.user.longitude == def_longitude ? '' : this.user.longitude,
178 offset: 0, 199 offset: 0,
179 rows: 200, 200 rows: 200,
180 - distance: 100000, 201 + distance: 30000,
181 map: JSON.stringify({...this.mapData.region, scale: 50}) 202 map: JSON.stringify({...this.mapData.region, scale: 50})
182 } 203 }
183 if (param.lat) { 204 if (param.lat) {
@@ -225,47 +246,50 @@ Page({ @@ -225,47 +246,50 @@ Page({
225 if(seller.scale>this.mapData.scale) return; 246 if(seller.scale>this.mapData.scale) return;
226 let marker = { 247 let marker = {
227 id: seller.id, 248 id: seller.id,
228 - iconPath: "http://nosqn.colorcun.com/custom/lite-online/cates/circle1x5.png" + cates_version, 249 + // iconPath: "http://nosqn.colorcun.com/custom/lite-online/cates/circle1x5.png" + cates_version,
  250 + iconPath:'http://nosqn.colorcun.com/map-icon.png',
229 latitude: seller.lat, 251 latitude: seller.lat,
230 longitude: seller.long, 252 longitude: seller.long,
231 - width: 8,  
232 - height: 8,  
233 - //title:seller.seller_name, 253 + width: 33,
  254 + height: 36,
  255 + // title:seller.seller_name,
234 zIndex: sellersLength - si, 256 zIndex: sellersLength - si,
235 zIndexBak: sellersLength - si, 257 zIndexBak: sellersLength - si,
236 //seller: seller, 258 //seller: seller,
237 }; 259 };
238 marker.callout={ 260 marker.callout={
239 - content: ' ' + seller.sellername + ' ',  
240 - color: '#353535', 261 + content:seller.selleralias ? seller.selleralias : seller.sellername,
  262 + color: '#000000',
241 fontSize: 12, 263 fontSize: 12,
242 - borderWidth: 1,  
243 - borderColor: '#cccccc',  
244 - borderRadius: 50,  
245 - bgColor: '#fefefe',  
246 - padding: 5,  
247 - textAlign: 'left',  
248 - display:'BYCLICK', 264 + borderWidth: 0,
  265 + // borderColor: '#cccccc',
  266 + borderRadius: 0,
  267 + bgColor: 'transparent',
  268 + padding: 0,
  269 + textAlign: 'center',
  270 + display:'ALWAYS',
  271 + anchorX:0,
  272 + anchorY:48,
249 }; 273 };
250 - marker.calloutDisplay='BYCLICK'; 274 + // marker.calloutDisplay='BYCLICK';
251 if (seller.mode.length > 0) { 275 if (seller.mode.length > 0) {
252 seller.mode.forEach(x => { 276 seller.mode.forEach(x => {
253 - if (x.id == 1) {//大图标  
254 - marker.iconPath = "http://nosqn.colorcun.com/custom/lite-online/cates/其他菜品.png";  
255 - if (seller.cate.length > 0) {  
256 - marker.iconPath = seller.cate[0].icon  
257 - }  
258 - marker.iconPath = marker.iconPath.replace(/\/cates\/(.*)\.png/, function ($0, $1) {  
259 - return '/cates/' + encodeURI($1) + '.png'  
260 - })  
261 - marker.iconPath += cates_version  
262 - marker.width = 20;  
263 - marker.height = 25;  
264 - }  
265 - if(x.id==2){//商家名  
266 - marker.callout.display='ALWAYS';  
267 - marker.calloutDisplay='ALWAYS';  
268 - } 277 + // if (x.id == 1) {//大图标
  278 + // marker.iconPath = "http://nosqn.colorcun.com/custom/lite-online/cates/其他菜品.png";
  279 + // if (seller.cate.length > 0) {
  280 + // marker.iconPath = seller.cate[0].icon
  281 + // }
  282 + // marker.iconPath = marker.iconPath.replace(/\/cates\/(.*)\.png/, function ($0, $1) {
  283 + // return '/cates/' + encodeURI($1) + '.png'
  284 + // })
  285 + // marker.iconPath += cates_version
  286 + // marker.width = 20;
  287 + // marker.height = 25;
  288 + // }
  289 + // if(x.id==2){//商家名
  290 + // marker.callout.display='ALWAYS';
  291 + // marker.calloutDisplay='ALWAYS';
  292 + // }
269 }) 293 })
270 } 294 }
271 markers.push(marker) 295 markers.push(marker)
@@ -306,37 +330,48 @@ Page({ @@ -306,37 +330,48 @@ Page({
306 this.activeSellerID = e.markerId 330 this.activeSellerID = e.markerId
307 let bl = 1.2; 331 let bl = 1.2;
308 markers.forEach((m, i) => { 332 markers.forEach((m, i) => {
309 - m.iconPath = m.iconPath.replace('/cates-active/', '/cates/') 333 + // m.iconPath = m.iconPath.replace('/cates-active/', '/cates/');
  334 + if(m.id!='local'){
  335 + m.iconPath='http://nosqn.colorcun.com/map-icon.png';
  336 + m.width = 33;
  337 + m.height = 36;
  338 + }
310 m.zIndex = m.zIndexBak 339 m.zIndex = m.zIndexBak
311 - if (m.width == 20 * bl) {  
312 - m.width = 20;  
313 - m.height = 25;  
314 - }  
315 - if (m.width == 12) {  
316 - m.width = 8;  
317 - m.height = 8;  
318 - } 340 + // if (m.width == 20 * bl) {
  341 + // m.width = 20;
  342 + // m.height = 25;
  343 + // }
  344 + // if (m.width == 12) {
  345 + // m.width = 8;
  346 + // m.height = 8;
  347 + // }
  348 +
319 if(m.callout){ 349 if(m.callout){
320 - m.callout.borderColor= '#cccccc';  
321 - m.callout.bgColor= '#fefefe';  
322 - m.callout.color= '#353535';  
323 - m.callout.display=m.calloutDisplay; 350 + // m.callout.borderColor= 'rgba(0,0,0,0)';
  351 + m.callout.bgColor= 'transparent';
  352 + m.callout.color= '#000000';
  353 + m.callout.display='ALWAYS';
  354 + m.callout.anchorY=48;
324 } 355 }
325 if (m.id == e.markerId) { 356 if (m.id == e.markerId) {
326 - m.iconPath = m.iconPath.replace('/cates/', '/cates-active/')  
327 - if (m.width == 20) {  
328 - m.width = 20 * bl;  
329 - m.height = 25 * bl;  
330 - } else {  
331 - m.width = 12;  
332 - m.height = 12;  
333 - }  
334 - m.zIndex = 9999 357 + // m.iconPath = m.iconPath.replace('/cates/', '/cates-active/');
  358 + m.iconPath='http://nosqn.colorcun.com/map-icon-active.png'
  359 + // if (m.width == 20) {
  360 + // m.width = 20 * bl;
  361 + // m.height = 25 * bl;
  362 + // } else {
  363 + // m.width = 12;
  364 + // m.height = 12;
  365 + // }
  366 + m.width = 41;
  367 + m.height = 48;
  368 + m.zIndex = 9999;
335 if(m.callout){ 369 if(m.callout){
336 - m.callout.borderColor= '#F05522';  
337 - m.callout.bgColor= '#F05522';  
338 - m.callout.color= '#fefefe'; 370 + // m.callout.borderColor= 'rgba(0,0,0,0)';
  371 + m.callout.bgColor= 'transparent';
  372 + m.callout.color= '#353535';
339 m.callout.display='ALWAYS'; 373 m.callout.display='ALWAYS';
  374 + m.callout.anchorY=60;
340 } 375 }
341 } 376 }
342 }) 377 })
@@ -366,7 +401,7 @@ Page({ @@ -366,7 +401,7 @@ Page({
366 scrollTop:0, 401 scrollTop:0,
367 scrollEvent(e){ 402 scrollEvent(e){
368 if(this.mapScale<12) return; 403 if(this.mapScale<12) return;
369 - //console.log(e.detail.scrollTop) 404 + console.log(e.detail.scrollTop)
370 this.scrollTop=e.detail.scrollTop 405 this.scrollTop=e.detail.scrollTop
371 if(this.hasScrollToIng)return; 406 if(this.hasScrollToIng)return;
372 this.debounce(()=>{ 407 this.debounce(()=>{
@@ -374,12 +409,15 @@ Page({ @@ -374,12 +409,15 @@ Page({
374 },300) 409 },300)
375 }, 410 },
376 scrollEventActive(){ 411 scrollEventActive(){
377 - let idx=parseInt(this.scrollTop/162)  
378 - let po=this.scrollTop%((idx>0?idx:1)*162);  
379 - if(po>80){ 412 + let idx=parseInt(this.scrollTop/(324/this.ratio))
  413 + let po=this.scrollTop%((idx>0?idx:1)*(324/this.ratio));
  414 + if(po>162/this.ratio){
380 idx+=1; 415 idx+=1;
381 } 416 }
382 - //console.log(idx,po) 417 + console.log(idx,po)
  418 + if(idx>=this.sellers.length){
  419 + idx=this.sellers.length-1
  420 + }
383 if(this.sellers[idx]){ 421 if(this.sellers[idx]){
384 //this.activeSellerID=this.sellers[idx].id 422 //this.activeSellerID=this.sellers[idx].id
385 this.markertap({markerId:this.sellers[idx].id},false) 423 this.markertap({markerId:this.sellers[idx].id},false)
@@ -31,12 +31,17 @@ @@ -31,12 +31,17 @@
31 <view style="color: #42A5FF;font-size: 20rpx;">地图</view> 31 <view style="color: #42A5FF;font-size: 20rpx;">地图</view>
32 </view> 32 </view>
33 </view> 33 </view>
  34 +<!-- location="{{location}}" -->
34 <view class="view content padding-top-xs" style="height: 60vh;"> 35 <view class="view content padding-top-xs" style="height: 60vh;">
35 <taocan-notice></taocan-notice> 36 <taocan-notice></taocan-notice>
36 - <filter-group height="{{height}}"  
37 - id="filter-group"  
38 - bindevent="filterGroupEvent"  
39 - disabled="{{(sellers.length<1 && !hasFilterData) || hasLoading}}"></filter-group> 37 + <block wx:if="{{location}}">
  38 + <filter-group height="{{height}}"
  39 + location="{{location}}"
  40 + id="filter-group"
  41 + bindevent="filterGroupEvent"
  42 + disabled="{{(sellers.length<1 && !hasFilterData) || hasLoading}}"></filter-group>
  43 + </block>
  44 +
40 <block wx:if="{{hasLoading}}"> 45 <block wx:if="{{hasLoading}}">
41 <view class="view flex flex-direction justify-center align-center" wx:if="{{hasLoading}}"> 46 <view class="view flex flex-direction justify-center align-center" wx:if="{{hasLoading}}">
42 <image class="view" src="http://nosqn.colorcun.com/2.0/timg.gif" style="width: 40rpx;height: 40rpx;margin-top: 260rpx;"></image> 47 <image class="view" src="http://nosqn.colorcun.com/2.0/timg.gif" style="width: 40rpx;height: 40rpx;margin-top: 260rpx;"></image>
@@ -32,7 +32,7 @@ Page({ @@ -32,7 +32,7 @@ Page({
32 */ 32 */
33 eventChannel:null, 33 eventChannel:null,
34 onLoad: async function (options) { 34 onLoad: async function (options) {
35 - console.log(options) 35 + console.log(options,'uuuuuu')
36 /** 36 /**
37 * lat=39.65273 37 * lat=39.65273
38 * &lng=118.15813 38 * &lng=118.15813
@@ -68,4 +68,4 @@ @@ -68,4 +68,4 @@
68 <as-phone id="as"></as-phone> 68 <as-phone id="as"></as-phone>
69 <search-how id="search-how" findSellerData="{{findSellerData}}" bindevent="howEvent"></search-how> 69 <search-how id="search-how" findSellerData="{{findSellerData}}" bindevent="howEvent"></search-how>
70 <menu></menu> 70 <menu></menu>
71 -<service></service>  
  71 +<service></service>
@@ -22,18 +22,83 @@ Page({ @@ -22,18 +22,83 @@ Page({
22 * 生命周期函数--监听页面加载 22 * 生命周期函数--监听页面加载
23 */ 23 */
24 onLoad: function (options) { 24 onLoad: function (options) {
  25 + console.log(options,'pppppppppp')
  26 + if(options.frompage && options.frompage=='search'){
  27 + this.filterParams=null;
  28 + if(options.filter){
  29 + this.filterParams=JSON.parse(options.filter)
  30 + this.setData({
  31 + filterParams:this.filterParams,
  32 + })
  33 + this.filterGroupData.average=this.filterParams.active
  34 + }
  35 + if(options.city){
  36 + this.city=JSON.parse(options.city)
  37 + }
  38 + this.findSellerData=null
  39 + if(options.hows){
  40 + this.findSellerData=JSON.parse(options.hows)
  41 + let paramStr=this.findSellerData.paramStr.split(" ");
  42 + this.setData({
  43 + findSellerData:this.findSellerData,
  44 + headerHows:[
  45 + paramStr[0].substr(0,6),
  46 + paramStr[1]+' '+paramStr[2],
  47 + ],
  48 +
  49 + })
  50 + }
  51 + // this.options=options;
  52 + // let map=this.data.map;
  53 + // map.latitude = this.options.lat;
  54 + // map.longitude = this.options.lng;
  55 + // map.scale = mapScale;
  56 + // this.setData({
  57 + // map:map
  58 + // })
  59 + if(options.hasSuggestion){
  60 + let pos=options.centre_pos.split(',')
  61 + this.suggestion={
  62 + latitude:pos[0],
  63 + longitude:pos[1],
  64 + title:options.keyword,
  65 + }
  66 + this.setData({
  67 + hasSuggestion:true,
  68 + suggestion:this.suggestion,
  69 + keyword:this.options.keyword,
  70 + })
  71 + delete this.options.keyword
  72 + }else if(this.options.keyword){
  73 + this.setData({
  74 + keyword:options.keyword,
  75 + })
  76 + }
  77 + PubSub.on(
  78 + 'searchParamList',
  79 + data=>{
  80 + console.log('searchParamList.msg',data)
  81 + if(data.fun=='setSuggestion'){
  82 + this.setSuggestion(data.suggestion);
  83 + }
  84 + }
  85 + )
  86 + }
  87 + this.move=false;
25 const systeminfo=wx.getSystemInfoSync(); 88 const systeminfo=wx.getSystemInfoSync();
26 let ratio=750/systeminfo.windowWidth; 89 let ratio=750/systeminfo.windowWidth;
27 console.log(systeminfo) 90 console.log(systeminfo)
28 - this.setData({  
29 - height:systeminfo.windowHeight-(350/ratio)  
30 - }) 91 + this.systeminfo=systeminfo;
  92 + this.ratio=ratio;
  93 + // this.setData({
  94 + // height:systeminfo.windowHeight-(350/ratio),
  95 + // })
31 }, 96 },
32 -  
33 /** 97 /**
34 * 生命周期函数--监听页面初次渲染完成 98 * 生命周期函数--监听页面初次渲染完成
35 */ 99 */
36 onReady: function () { 100 onReady: function () {
  101 +
37 this.selectComponent('#getpos').getPos(); 102 this.selectComponent('#getpos').getPos();
38 }, 103 },
39 104
@@ -61,7 +126,27 @@ Page({ @@ -61,7 +126,27 @@ Page({
61 * 生命周期函数--监听页面卸载 126 * 生命周期函数--监听页面卸载
62 */ 127 */
63 onUnload: function () { 128 onUnload: function () {
64 - 129 + if(this.hasOneListPage()){
  130 + PubSub.off('searchParamList')
  131 + if(this.suggestion){
  132 + PubSub.emit('searchParam',{fun:'setSuggestion',suggestion:this.suggestion})
  133 + }else if(this.hasCleanSuggestion){
  134 + PubSub.emit('searchParam', {fun:'moveToLocation'})
  135 + }
  136 + }
  137 + },
  138 + hasOneListPage(){//判断是否只有一个列表页面
  139 + let pages = getCurrentPages();
  140 + let pc=0
  141 + pages.forEach(p=>{
  142 + if(p.route=='pages/reserve/map' && this.options.frompage){
  143 + pc++;
  144 + }
  145 + })
  146 + if(pc==1){//只有一个列表页
  147 + return true
  148 + }
  149 + return false
65 }, 150 },
66 /** 151 /**
67 * 用户点击右上角分享 152 * 用户点击右上角分享
@@ -76,24 +161,33 @@ Page({ @@ -76,24 +161,33 @@ Page({
76 url: './index' 161 url: './index'
77 }) 162 })
78 }, 163 },
79 - onpos(e) {  
80 - let res = e.detail;  
81 - console.log('onpos.res', res);  
82 - let map = this.data.map;  
83 - if (!res.latitude){  
84 - map.latitude = def_latitude;  
85 - map.longitude = def_longitude;  
86 - }else{  
87 - map.latitude = res.latitude;  
88 - map.longitude = res.longitude;  
89 - }  
90 - map.scale = mapScale;  
91 - this.user.latitude = res.latitude;  
92 - this.user.longitude = res.longitude;  
93 - let sdobj = {  
94 - map: map,  
95 - }  
96 - this.setData(sdobj) 164 + onpos(e) {
  165 + let res = e.detail;
  166 + console.log('onpos.res', res,this.options.formpage,this.options.formpage=='search');
  167 + console.log('hahahhahahhaha',this.options);
  168 + let map = this.data.map;
  169 + if (!res.latitude){
  170 + map.latitude = def_latitude;
  171 + map.longitude = def_longitude;
  172 + }else{
  173 + if(this.options.frompage){
  174 + map.latitude = this.options.lat;
  175 + map.longitude = this.options.lng;
  176 + }else{
  177 + map.latitude = res.latitude;
  178 + map.longitude = res.longitude;
  179 + }
  180 +
  181 +
  182 + }
  183 + map.scale = mapScale;
  184 + this.user.latitude = res.latitude;
  185 + this.user.longitude = res.longitude;
  186 + let sdobj = {
  187 + map: map,
  188 + }
  189 + this.setData(sdobj)
  190 +
97 }, 191 },
98 setLoacl(e){ 192 setLoacl(e){
99 let pos=util.attr(e,'val').split(','); 193 let pos=util.attr(e,'val').split(',');
@@ -113,6 +207,7 @@ Page({ @@ -113,6 +207,7 @@ Page({
113 }, 207 },
114 moveToLocation() { 208 moveToLocation() {
115 console.log('moveToLocation') 209 console.log('moveToLocation')
  210 + this.oldmap=null;
116 this.selectComponent('#getpos').getPos(true); 211 this.selectComponent('#getpos').getPos(true);
117 }, 212 },
118 debounceTimer:null, 213 debounceTimer:null,
@@ -126,11 +221,35 @@ Page({ @@ -126,11 +221,35 @@ Page({
126 },wait); 221 },wait);
127 }, 222 },
128 regionChange(e){ 223 regionChange(e){
  224 + console.log('55555',e)
129 if(e.type=='end'){ 225 if(e.type=='end'){
130 - console.log('regionChange', e)  
131 - this.debounce(this.regionChangeDo,800) 226 + console.log('regionChange', e);
  227 + this.debounce(this.regionChangeDo,800);
  228 + // if(this.move==false){
  229 + // this.debounce(this.regionChangeDo,800);
  230 + // this.move=true;
  231 + // }else{
  232 + // // wx.showToast({
  233 + // // title:e.causedBy
  234 + // // })
  235 + // if(e.causedBy=='drag'){
  236 + // // wx.showToast({
  237 + // // title:e.detail.causedBy
  238 + // // })
  239 + // this.sellers=[];
  240 + // this.setData({
  241 + // markers:[]
  242 + // })
  243 + // this.makeSellers();
  244 + // }
  245 +
  246 + // }
  247 +
132 } 248 }
133 }, 249 },
  250 + tapregionchange(){
  251 + this.debounce(this.regionChangeDo,800);
  252 + },
134 mapCtx:null, 253 mapCtx:null,
135 mapData: { 254 mapData: {
136 latitude: 0, 255 latitude: 0,
@@ -144,6 +263,13 @@ Page({ @@ -144,6 +263,13 @@ Page({
144 }, 263 },
145 regionChangeDo(){ 264 regionChangeDo(){
146 console.log('regionChangeDo') 265 console.log('regionChangeDo')
  266 + // let map=this.data.map;
  267 + // map.latitude = this.options.lat;
  268 + // map.longitude = this.options.lng;
  269 + // map.scale = mapScale;
  270 + // this.setData({
  271 + // map:map
  272 + // })
147 if(!this.mapCtx){ 273 if(!this.mapCtx){
148 this.mapCtx = wx.createMapContext('map') 274 this.mapCtx = wx.createMapContext('map')
149 } 275 }
@@ -153,18 +279,168 @@ Page({ @@ -153,18 +279,168 @@ Page({
153 this.mapScale = res.scale; 279 this.mapScale = res.scale;
154 }, 280 },
155 }) 281 })
  282 +
156 this.mapCtx.getRegion({ 283 this.mapCtx.getRegion({
157 success: (res) => { 284 success: (res) => {
  285 + console.log('yyyyyyy',res);
  286 + let newmap={},distance=0;
158 if (res.southwest.latitude) { 287 if (res.southwest.latitude) {
159 - this.mapData.region = res 288 + let newragion=res;
  289 + let singlelat=(res.northeast.latitude-res.southwest.latitude)/this.systeminfo.windowHeight;
  290 + let distancelat=singlelat*(400/this.ratio);
  291 + let test=Number(distancelat.toFixed(7));
  292 + let oldlat=Number(res.southwest.latitude.toFixed(7));
  293 + let southwestlat=oldlat+test;
  294 + console.log('pua',test,oldlat,southwestlat);
  295 + newragion.southwest.latitude=southwestlat;
  296 + this.mapData.region = newragion;
  297 + console.log('uuuuuuu',newragion,southwestlat)
  298 + newmap.lat=(this.mapData.region.southwest.latitude + this.mapData.region.northeast.latitude) / 2;
  299 + newmap.lng=(this.mapData.region.southwest.longitude + this.mapData.region.northeast.longitude) / 2
  300 + if(this.oldmap){
  301 + distance=this.getdistance(newmap.lat,newmap.lng,this.oldmap.lat,this.oldmap.lng);
  302 + }
160 } 303 }
161 // this.selectComponent('#filter-group').hide(); 304 // this.selectComponent('#filter-group').hide();
162 - this.getSellers(); 305 + console.log('distance',distance);
  306 + if(this.options.frompage && this.options.frompage=='search'){
  307 + if(distance>=2){
  308 + this.getList();
  309 + }else{
  310 + if(!this.oldmap){
  311 + this.oldmap=newmap;
  312 + this.getList();
  313 + console.log('6666666666666')
  314 + }
  315 + }
  316 + }else{
  317 + if(distance>=2){
  318 + this.getSellers();
  319 + }else{
  320 + if(!this.oldmap){
  321 + this.oldmap=newmap;
  322 + this.getSellers();
  323 + console.log('6666666666666')
  324 + }
  325 + }
  326 + }
  327 +
  328 +
  329 +
163 }, 330 },
164 }) 331 })
165 }, 332 },
  333 + add(a,b){
  334 + console.log("a",a);
  335 + console.log("b",b);
  336 + console.log("a+b",a+Number(b.toFixed(15)));
  337 + return a+b;
  338 + },
  339 + getdistance(la1,lo1,la2,lo2) {
  340 + console.log('9999',la1,lo1,la2,lo2)
  341 + var La1 = la1 * Math.PI / 180.0;
  342 + var La2 = la2 * Math.PI / 180.0;
  343 + var La3 = La1 - La2;
  344 + var Lb3 = lo1 * Math.PI / 180.0 - lo2 * Math.PI / 180.0;
  345 + var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(La3 / 2), 2) + Math.cos(La1) * Math.cos(La2) * Math.pow(Math.sin(Lb3 / 2), 2)));
  346 + s = s * 6378.137;//地球半径
  347 + s = Math.round(s * 10000) / 10000;
  348 + return s;
  349 + // console.log("计算结果",s)
  350 + },
166 hasSellers:0, 351 hasSellers:0,
167 sellers:[], 352 sellers:[],
  353 + suggestion:null,
  354 + setSuggestion(suggestion){
  355 + console.log('tttttt')
  356 + this.suggestion=suggestion
  357 + this.hasCleanSuggestion=false
  358 + this.setData({
  359 + suggestion:suggestion,
  360 + hasSuggestion:true,
  361 + })
  362 + this.getList()
  363 + },
  364 + getList(){
  365 + this.setData({
  366 + hasLoading:true,
  367 + })
  368 + this.offset=1 //page
  369 + this.size=20 //page size
  370 + this.param={
  371 + offset:this.offset,
  372 + size:this.size,
  373 + code:this.city?this.city.code:'',
  374 + pid:this.city?this.city.pid:'',
  375 + keyword:this.options.keyword||'',
  376 + ...this.findSellerData.paramObj,
  377 + }
  378 + console.log('this.location',this.location)
  379 + if(this.suggestion){
  380 + this.param.lat_extend=this.suggestion.latitude
  381 + this.param.lng_extend=this.suggestion.longitude
  382 + }else if(this.location){
  383 + this.param.lat_extend=this.location.latitude
  384 + this.param.lng_extend=this.location.longitude
  385 + }
  386 + this.hasFilterData=false
  387 + if(this.filterGroupData.tags){
  388 + this.param.tags = this.filterGroupData.tags;
  389 + this.hasFilterData=true
  390 + }
  391 + console.log('this.filterGroupData',this.filterGroupData)
  392 + if (this.filterGroupData.cuisine) {
  393 + this.param.cuisine = this.filterGroupData.cuisine;
  394 + this.hasFilterData=true
  395 + }
  396 + if(this.filterGroupData.average){
  397 + this.param.average = this.filterGroupData.average;
  398 + this.hasFilterData=true
  399 + }
  400 +
  401 + App.Customer.GetSellerListByFoods(this.param).then(res=>{
  402 + this.setData({
  403 + rsl:[],
  404 + hasMore:res.data.length==this.size,
  405 + // sellers:this.sellerFormat(res.data),
  406 + hasLoading:false,
  407 + //hasDisabled:this.getHasDisabled(res.data.length>0,this.data.multiIndex[0]>0 || tags.length>0 || this.findSellerData)
  408 + hasFilterData:this.hasFilterData,
  409 + })
  410 + this.setData({
  411 + current:0
  412 + })
  413 + this.sellers=this.sellerFormat(res.data);
  414 + this.makeMarker();
  415 + this.makeSellers();
  416 + this.debounce(this.makeDefMarker,300);
  417 + // this.hasGetSellerEnd=true
  418 + // this.triggerEvent('event',{type:'getListEnd',total:res.data.length})
  419 + /*
  420 + if(res.data.length==0 && this.offset==1 && this.location){
  421 + this.GetRecommendSellerList()
  422 + }
  423 + */
  424 + })
  425 + },
  426 + sellerFormat(sellers){
  427 + // sellers.forEach((seller) => {
  428 + // if(seller.distance || seller.distance===0) {
  429 + // seller.distance = parseInt(seller.distance);
  430 + // if (seller.distance > 1000) {
  431 + // seller.distance = (seller.distance / 1000).toFixed(2) + 'km'
  432 + // } else {
  433 + // seller.distance += 'm';
  434 + // }
  435 + // }
  436 + // })
  437 + sellers.forEach(seller=>{
  438 + if(this.findSellerData){
  439 + seller.findSellerParamObj=this.findSellerData.paramObj
  440 + }
  441 + })
  442 + return sellers;
  443 + },
168 getSellers(){ 444 getSellers(){
169 console.log('getSellers',this.mapScale,this.mapData) 445 console.log('getSellers',this.mapScale,this.mapData)
170 this.setData({ 446 this.setData({
@@ -176,15 +452,16 @@ Page({ @@ -176,15 +452,16 @@ Page({
176 lng: this.user.longitude == def_longitude ? '' : this.user.longitude, 452 lng: this.user.longitude == def_longitude ? '' : this.user.longitude,
177 offset: 0, 453 offset: 0,
178 rows: 200, 454 rows: 200,
179 - distance: 100000, 455 + distance: 20000,
180 map: JSON.stringify({...this.mapData.region, scale: 50}) 456 map: JSON.stringify({...this.mapData.region, scale: 50})
181 } 457 }
  458 + console.log('222222',param)
182 if (param.lat) { 459 if (param.lat) {
183 param.centre_pos = `${param.lat},${param.lng}` 460 param.centre_pos = `${param.lat},${param.lng}`
184 } else { 461 } else {
185 let lat = (this.mapData.region.southwest.latitude + this.mapData.region.northeast.latitude) / 2 462 let lat = (this.mapData.region.southwest.latitude + this.mapData.region.northeast.latitude) / 2
186 let lng = (this.mapData.region.southwest.longitude + this.mapData.region.northeast.longitude) / 2 463 let lng = (this.mapData.region.southwest.longitude + this.mapData.region.northeast.longitude) / 2
187 - param.centre_pos = `${lat},${lng}` 464 + param.centre_pos = `${lat},${lng}`;
188 } 465 }
189 this.hasFilterData=false 466 this.hasFilterData=false
190 if(this.filterGroupData.tags){ 467 if(this.filterGroupData.tags){
@@ -215,6 +492,9 @@ Page({ @@ -215,6 +492,9 @@ Page({
215 v.cateStr=v.cateStr.join('/') 492 v.cateStr=v.cateStr.join('/')
216 } 493 }
217 }) 494 })
  495 + this.setData({
  496 + current:0
  497 + })
218 this.sellers=res.data.list; 498 this.sellers=res.data.list;
219 this.makeMarker(); 499 this.makeMarker();
220 this.makeSellers(); 500 this.makeSellers();
@@ -226,8 +506,10 @@ Page({ @@ -226,8 +506,10 @@ Page({
226 506
227 }, 507 },
228 makeMarker(){ 508 makeMarker(){
  509 + console.log('699965606970970797707970')
229 this.mapCtx.getScale({ 510 this.mapCtx.getScale({
230 success: (res) => { 511 success: (res) => {
  512 + console.log('iiiiiiiii',res)
231 this.mapData.scale = res.scale; 513 this.mapData.scale = res.scale;
232 let markers=[] 514 let markers=[]
233 let sellersLength=this.sellers.length 515 let sellersLength=this.sellers.length
@@ -235,49 +517,52 @@ Page({ @@ -235,49 +517,52 @@ Page({
235 if(seller.scale>this.mapData.scale) return; 517 if(seller.scale>this.mapData.scale) return;
236 let marker = { 518 let marker = {
237 id: seller.id, 519 id: seller.id,
238 - iconPath: "http://nosqn.colorcun.com/custom/lite-online/cates/circle1x5.png" + cates_version, 520 + // iconPath: "http://nosqn.colorcun.com/custom/lite-online/cates/circle1x5.png" + cates_version,
  521 + iconPath:'http://nosqn.colorcun.com/map-icon.png',
239 latitude: seller.lat, 522 latitude: seller.lat,
240 longitude: seller.long, 523 longitude: seller.long,
241 - width: 8,  
242 - height: 8, 524 + width: 33,
  525 + height: 36,
243 //title:seller.seller_name, 526 //title:seller.seller_name,
244 zIndex: sellersLength - si, 527 zIndex: sellersLength - si,
245 zIndexBak: sellersLength - si, 528 zIndexBak: sellersLength - si,
246 //seller: seller, 529 //seller: seller,
247 }; 530 };
248 - // marker.callout={  
249 - // content: ' ' + seller.sellername + ' ',  
250 - // color: '#353535',  
251 - // fontSize: 12,  
252 - // borderWidth: 1,  
253 - // borderColor: '#cccccc',  
254 - // borderRadius: 50,  
255 - // bgColor: '#fefefe',  
256 - // padding: 5,  
257 - // textAlign: 'left',  
258 - // display:'BYCLICK',  
259 - // }; 531 + marker.callout={
  532 + content:seller.selleralias ? seller.selleralias : seller.sellername,
  533 + color: '#000000',
  534 + fontSize: 12,
  535 + borderWidth: 0,
  536 + // borderColor: '#cccccc',
  537 + borderRadius: 0,
  538 + bgColor: 'transparent',
  539 + padding: 0,
  540 + textAlign: 'center',
  541 + display:'ALWAYS',
  542 + anchorX:0,
  543 + anchorY:48,
  544 + };
260 // marker.calloutDisplay='BYCLICK'; 545 // marker.calloutDisplay='BYCLICK';
261 - if (seller.mode.length > 0) {  
262 - seller.mode.forEach(x => {  
263 - if (x.id == 1) {//大图标  
264 - marker.iconPath = "http://nosqn.colorcun.com/custom/lite-online/cates/其他菜品.png";  
265 - if (seller.cate.length > 0) {  
266 - marker.iconPath = seller.cate[0].icon  
267 - }  
268 - marker.iconPath = marker.iconPath.replace(/\/cates\/(.*)\.png/, function ($0, $1) {  
269 - return '/cates/' + encodeURI($1) + '.png'  
270 - })  
271 - marker.iconPath += cates_version  
272 - marker.width = 20;  
273 - marker.height = 25;  
274 - }  
275 - // if(x.id==2){//商家名  
276 - // marker.callout.display='ALWAYS';  
277 - // marker.calloutDisplay='ALWAYS';  
278 - // }  
279 - })  
280 - } 546 + // if (seller.mode.length > 0) {
  547 + // seller.mode.forEach(x => {
  548 + // if (x.id == 1) {//大图标
  549 + // marker.iconPath = "http://nosqn.colorcun.com/custom/lite-online/cates/其他菜品.png";
  550 + // if (seller.cate.length > 0) {
  551 + // marker.iconPath = seller.cate[0].icon
  552 + // }
  553 + // marker.iconPath = marker.iconPath.replace(/\/cates\/(.*)\.png/, function ($0, $1) {
  554 + // return '/cates/' + encodeURI($1) + '.png'
  555 + // })
  556 + // marker.iconPath += cates_version
  557 + // marker.width = 25;
  558 + // marker.height = 28;
  559 + // }
  560 + // if(x.id==2){//商家名
  561 + // marker.callout.display='ALWAYS';
  562 + // marker.calloutDisplay='ALWAYS';
  563 + // }
  564 + // })
  565 + // }
281 markers.push(marker) 566 markers.push(marker)
282 }) 567 })
283 markers.push({ 568 markers.push({
@@ -290,10 +575,14 @@ Page({ @@ -290,10 +575,14 @@ Page({
290 zIndex: 9999, 575 zIndex: 9999,
291 zIndexBak:9999, 576 zIndexBak:9999,
292 }) 577 })
  578 + console.log('kkkkkkkkkk',markers)
293 this.setData({ 579 this.setData({
294 markers:markers, 580 markers:markers,
295 }) 581 })
296 }, 582 },
  583 + fail:()=>{
  584 + console.log('fail')
  585 + }
297 }) 586 })
298 }, 587 },
299 makeSellers(){ 588 makeSellers(){
@@ -310,48 +599,61 @@ Page({ @@ -310,48 +599,61 @@ Page({
310 this.markertap({markerId:id}); 599 this.markertap({markerId:id});
311 }, 600 },
312 makeDefMarker(){ 601 makeDefMarker(){
  602 + console.log('mmmmmmmmm',this.data.markers,!this.activeSellerID && this.data.markers.length>0)
313 if(!this.activeSellerID && this.data.markers.length>0){ 603 if(!this.activeSellerID && this.data.markers.length>0){
314 this.markertap({markerId:this.data.markers[0].id}) 604 this.markertap({markerId:this.data.markers[0].id})
315 } 605 }
316 }, 606 },
317 hasScrollToIng:false, 607 hasScrollToIng:false,
318 markertap(e,scrollTo=true){ 608 markertap(e,scrollTo=true){
  609 + console.log(e)
319 if(!e.markerId || e.markerId=='local') return; 610 if(!e.markerId || e.markerId=='local') return;
320 let markers=this.data.markers 611 let markers=this.data.markers
321 this.activeSellerID = e.markerId 612 this.activeSellerID = e.markerId
322 let bl = 1.2; 613 let bl = 1.2;
323 markers.forEach((m, i) => { 614 markers.forEach((m, i) => {
324 - m.iconPath = m.iconPath.replace('/cates-active/', '/cates/') 615 + // m.iconPath = m.iconPath.replace('/cates-active/', '/cates/');
  616 + if(m.id!='local'){
  617 + m.iconPath='http://nosqn.colorcun.com/map-icon.png';
  618 + m.width = 33;
  619 + m.height = 36;
  620 + }
  621 +
325 m.zIndex = m.zIndexBak 622 m.zIndex = m.zIndexBak
326 - if (m.width == 20 * bl) {  
327 - m.width = 20;  
328 - m.height = 25;  
329 - }  
330 - if (m.width == 12) {  
331 - m.width = 8;  
332 - m.height = 8;  
333 - } 623 + // if (m.width == 20 * bl) {
  624 + // m.width = 20;
  625 + // m.height = 25;
  626 + // }
  627 + // if (m.width == 12) {
  628 + // m.width = 8;
  629 + // m.height = 8;
  630 + // }
334 if(m.callout){ 631 if(m.callout){
335 - m.callout.borderColor= '#cccccc';  
336 - m.callout.bgColor= '#fefefe';  
337 - m.callout.color= '#353535';  
338 - m.callout.display=m.calloutDisplay; 632 + // m.callout.borderColor= 'rgba(0,0,0,0)';
  633 + m.callout.bgColor= 'transparent';
  634 + m.callout.color= '#000000';
  635 + m.callout.display='ALWAYS';
  636 + m.callout.anchorY=48;
339 } 637 }
340 if (m.id == e.markerId) { 638 if (m.id == e.markerId) {
341 - m.iconPath = m.iconPath.replace('/cates/', '/cates-active/')  
342 - if (m.width == 20) {  
343 - m.width = 20 * bl;  
344 - m.height = 25 * bl;  
345 - } else {  
346 - m.width = 12;  
347 - m.height = 12;  
348 - }  
349 - m.zIndex = 9999 639 + // m.iconPath = m.iconPath.replace('/cates/', '/cates-active/')
  640 + m.iconPath='http://nosqn.colorcun.com/map-icon-active.png'
  641 + // if (m.width == 20) {
  642 + // m.width = 20 * bl;
  643 + // m.height = 25 * bl;
  644 + // } else {
  645 + // m.width = 12;
  646 + // m.height = 12;
  647 + // }
  648 + m.width = 41;
  649 + m.height = 48;
  650 + m.zIndex = 9999;
350 if(m.callout){ 651 if(m.callout){
351 - m.callout.borderColor= '#F05522';  
352 - m.callout.bgColor= '#F05522';  
353 - m.callout.color= '#fefefe'; 652 + // m.callout.borderColor= 'rgba(0,0,0,0)';
  653 + m.callout.bgColor= 'transparent';
  654 + m.callout.color= '#000000';
354 m.callout.display='ALWAYS'; 655 m.callout.display='ALWAYS';
  656 + m.callout.anchorY=60;
355 } 657 }
356 this.setData({ 658 this.setData({
357 current:i, 659 current:i,
  1 +<wxs src="../../utils/util.wxs" module="util" />
1 <map id="map" scale="{{map.scale}}" 2 <map id="map" scale="{{map.scale}}"
2 longitude="{{map.longitude||118.170300}}" latitude="{{map.latitude||39.65273}}" 3 longitude="{{map.longitude||118.170300}}" latitude="{{map.latitude||39.65273}}"
3 markers="{{markers}}" polygons="{{polygons}}" 4 markers="{{markers}}" polygons="{{polygons}}"
@@ -19,6 +20,7 @@ @@ -19,6 +20,7 @@
19 <image class="moveToLocation-image" src="http://nosqn.colorcun.com/loaction.png"></image> 20 <image class="moveToLocation-image" src="http://nosqn.colorcun.com/loaction.png"></image>
20 </view> 21 </view>
21 </view> 22 </view>
  23 +<view class="bg-white font28r region-button flex-cc font-bold" bindtap="tapregionchange">展示当前区域内餐厅</view>
22 <view class="moveToLocationView"> 24 <view class="moveToLocationView">
23 <view bindtap="switchpage" class="view moveToLocation flex-vc" style="top: -490rpx;"> 25 <view bindtap="switchpage" class="view moveToLocation flex-vc" style="top: -490rpx;">
24 <image class="moveToLocation-image" src="http://nosqn.colorcun.com/menu.png" style="width: 32rpx;height: 26rpx;margin-bottom: 8rpx;"></image> 26 <image class="moveToLocation-image" src="http://nosqn.colorcun.com/menu.png" style="width: 32rpx;height: 26rpx;margin-bottom: 8rpx;"></image>
@@ -36,7 +38,10 @@ @@ -36,7 +38,10 @@
36 </view> 38 </view>
37 39
38 <view> 40 <view>
39 - <view class="black-font font-bold font38r font-more" style="margin-bottom: 10rpx;width: 370rpx;">{{selleritem.sellername}}</view> 41 + <view class="black-font font-bold font38r font-more" style="margin-bottom: 10rpx;width: 370rpx;">
  42 + <text style="color: #ffffff;font-size: 24rpx;margin-right: 4rpx;background-color:#d81e06;display: inline-block;border-radius: 8rpx;width: 66rpx;height: 36rpx;line-height: 36rpx;text-align: center;" wx:if="{{selleritem.is_have_activity==1}}">优惠</text>
  43 + {{selleritem.sellername}}
  44 + </view>
40 <view class="gray-font font26r" style="padding-bottom: 14rpx;">{{selleritem.cateStr}}</view> 45 <view class="gray-font font26r" style="padding-bottom: 14rpx;">{{selleritem.cateStr}}</view>
41 <view style="padding-top:4rpx;" wx:if="{{selleritem.activity && selleritem.activity.length>0}}"> 46 <view style="padding-top:4rpx;" wx:if="{{selleritem.activity && selleritem.activity.length>0}}">
42 <block wx:for="{{selleritem.activity}}" wx:key="selleractivitykey" wx:if="{{index<2}}"> 47 <block wx:for="{{selleritem.activity}}" wx:key="selleractivitykey" wx:if="{{index<2}}">
@@ -46,7 +51,7 @@ @@ -46,7 +51,7 @@
46 </block> 51 </block>
47 </view> 52 </view>
48 <view class="flex-ll"> 53 <view class="flex-ll">
49 - <view class="gray-font font24r" style="margin-right: 40rpx;">{{selleritem.distance}}m</view> 54 + <view class="gray-font font24r" style="margin-right: 40rpx;">{{util.distance(selleritem.distance||selleritem.distance_centre)}}</view>
50 <view class="gray-font font24r" wx:if="{{selleritem.average>0}}">¥{{selleritem.average}}/人</view> 55 <view class="gray-font font24r" wx:if="{{selleritem.average>0}}">¥{{selleritem.average}}/人</view>
51 </view> 56 </view>
52 <!-- <view></view> --> 57 <!-- <view></view> -->
@@ -55,8 +60,13 @@ @@ -55,8 +60,13 @@
55 <view class="seller-room flex-ll"> 60 <view class="seller-room flex-ll">
56 <view class="flex-ll" style="width:450rpx;height:52rpx;overflow: scroll;"> 61 <view class="flex-ll" style="width:450rpx;height:52rpx;overflow: scroll;">
57 <block wx:for="{{selleritem.class}}" wx:key="seclass"> 62 <block wx:for="{{selleritem.class}}" wx:key="seclass">
58 - <view data-cid="{{item.id}}" data-cname="{{item.name}}" class="room-type line-blue text-blue">{{item.name}}</view>  
59 - </block> 63 + <block wx:if="{{index<3}}">
  64 + <view data-cid="{{item.id}}" data-cname="{{item.name}}" class="room-type line-blue text-blue">{{item.name}}</view>
  65 + </block>
  66 + </block>
  67 + <block wx:if="{{selleritem.class.length>3}}">
  68 + <view class="room-type line-blue text-blue">...</view>
  69 + </block>
60 </view> 70 </view>
61 <view class="box-shadow"></view> 71 <view class="box-shadow"></view>
62 <view class="book-cover"> 72 <view class="book-cover">
@@ -98,6 +108,7 @@ @@ -98,6 +108,7 @@
98 </block> --> 108 </block> -->
99 109
100 </view> 110 </view>
  111 +
101 <getpos bindpos="onpos" id="getpos" hasFailPop></getpos> 112 <getpos bindpos="onpos" id="getpos" hasFailPop></getpos>
102 <a2l bindshow="a2lshow" bindhide="a2lshow" key="INDEX" type="black20"></a2l> 113 <a2l bindshow="a2lshow" bindhide="a2lshow" key="INDEX" type="black20"></a2l>
103 <as-phone id="as"></as-phone> 114 <as-phone id="as"></as-phone>
@@ -98,4 +98,17 @@ swiper{ @@ -98,4 +98,17 @@ swiper{
98 line-height: 36rpx; 98 line-height: 36rpx;
99 border-radius: 4rpx; 99 border-radius: 4rpx;
100 padding: 0 10rpx; 100 padding: 0 10rpx;
  101 +}
  102 +.region-button{
  103 + width: 276rpx;
  104 + height: 70rpx;
  105 + border-radius: 35rpx;
  106 + color: #42A5FF;
  107 + position: fixed;
  108 + left: 0;
  109 + right: 0;
  110 + top: 80rpx;
  111 + margin: 0 auto;
  112 + z-index: 1000;
  113 + box-shadow: 0 4rpx 10rpx #E5E5E5;
101 } 114 }
@@ -4,6 +4,7 @@ import App from '../../utils/api'; @@ -4,6 +4,7 @@ import App from '../../utils/api';
4 const {regeneratorRuntime} = global 4 const {regeneratorRuntime} = global
5 const zdmask='-zdmask?v=1.2' 5 const zdmask='-zdmask?v=1.2'
6 import PubSub from '../../utils/PubSub' 6 import PubSub from '../../utils/PubSub'
  7 +const slots={'morning':1,'noon':2,'night':3}
7 Page({ 8 Page({
8 9
9 /** 10 /**
@@ -192,9 +193,35 @@ Page({ @@ -192,9 +193,35 @@ Page({
192 if(this.options.pnum){ 193 if(this.options.pnum){
193 this.reserve.pnum = this.options.pnum; 194 this.reserve.pnum = this.options.pnum;
194 } 195 }
195 - wx.redirectTo({  
196 - url:util.http_build_query(this.reserve,'./submit')  
197 - }) 196 +
  197 + App.Reserve.GetReserveIsExits({sid:this.reserve.sid,ddate_solt:slots[this.reserve.section],ddate:this.reserve.ddate}).then((json)=>{
  198 + console.log(json)
  199 + if(json.ret==200){
  200 + if(json.data==1){
  201 + wx.showModal({
  202 + content:'您在该店铺已有一个订单待处理,是否加订一间?',
  203 + confirmText:'是',
  204 + concelText:'否',
  205 + cancelColor:'#999999',
  206 + success:(res)=>{
  207 + if(res.confirm){
  208 + wx.redirectTo({
  209 + url:util.http_build_query(this.reserve,'./submit')
  210 + })
  211 + }
  212 + }
  213 +
  214 + })
  215 + }else{
  216 + wx.redirectTo({
  217 + url:util.http_build_query(this.reserve,'./submit')
  218 + })
  219 + }
  220 + }
  221 + })
  222 + // wx.redirectTo({
  223 + // url:util.http_build_query(this.reserve,'./submit')
  224 + // })
198 }, 225 },
199 selecttime(e){//时间改变 226 selecttime(e){//时间改变
200 console.log(e); 227 console.log(e);
@@ -10,6 +10,7 @@ Page({ @@ -10,6 +10,7 @@ Page({
10 */ 10 */
11 data: { 11 data: {
12 location:'获取中...', 12 location:'获取中...',
  13 + navborder:false,
13 hasFilter:false,// 14 hasFilter:false,//
14 taocanpos:{ 15 taocanpos:{
15 top:193, 16 top:193,
@@ -166,4 +167,21 @@ Page({ @@ -166,4 +167,21 @@ Page({
166 this.selectComponent('#as').show(e.detail.seller); 167 this.selectComponent('#as').show(e.detail.seller);
167 } 168 }
168 }, 169 },
  170 + onPageScroll(e){
  171 + console.log('scroll',e)
  172 + if(e.scrollTop>=88){
  173 + if(!this.data.navborder){
  174 + this.setData({
  175 + navborder:true
  176 + })
  177 + }
  178 +
  179 + }else{
  180 + if(this.data.navborder){
  181 + this.setData({
  182 + navborder:false
  183 + })
  184 + }
  185 + }
  186 + }
169 }) 187 })
@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 "navigationBarTextStyle": "white", 3 "navigationBarTextStyle": "white",
4 "navigationBarTitleText":"周到安排", 4 "navigationBarTitleText":"周到安排",
5 "usingComponents": { 5 "usingComponents": {
  6 + "nav":"/components/nav/nav",
6 "search-how":"/components/2.0/filter/how/index", 7 "search-how":"/components/2.0/filter/how/index",
7 "location":"/components/2.0/filter/location", 8 "location":"/components/2.0/filter/location",
8 "filter":"/components/2.0/filter/filter", 9 "filter":"/components/2.0/filter/filter",
1 <!--pages/reserve/home.wxml--> 1 <!--pages/reserve/home.wxml-->
2 -<!-- <nav backgroundColor="rgba(0,0,0,0)" color="#ffffff" place="{{false}}"></nav> --> 2 +<nav backgroundColor="{{navborder ? '#ffffff' : 'transparent'}}" place="{{false}}"></nav>
3 <view class="view header"> 3 <view class="view header">
4 <image src="http://nosqn.colorcun.com/search/s%20%281%29.png" 4 <image src="http://nosqn.colorcun.com/search/s%20%281%29.png"
5 style="z-index: 1" 5 style="z-index: 1"
@@ -29,6 +29,7 @@ Page({ @@ -29,6 +29,7 @@ Page({
29 onLoad: function (options) { 29 onLoad: function (options) {
30 //filter=null&city={"code":"610100","pid":"610000","name":"西安市","status":"1","last_date":"1598949575"}&hows={"params":{"pnum":{"index":3,"val":4,"type":"pnum"},"date":{"index":0,"val":1606979898,"type":"date"},"dur":{"index":2,"val":3,"type":"dur"}},"paramObj":{"when_date":"2020-12-03","several":4,"daily":3},"paramStr":"12月03日(今天)晚餐 4位"} 30 //filter=null&city={"code":"610100","pid":"610000","name":"西安市","status":"1","last_date":"1598949575"}&hows={"params":{"pnum":{"index":3,"val":4,"type":"pnum"},"date":{"index":0,"val":1606979898,"type":"date"},"dur":{"index":2,"val":3,"type":"dur"}},"paramObj":{"when_date":"2020-12-03","several":4,"daily":3},"paramStr":"12月03日(今天)晚餐 4位"}
31 console.log('searchKeyword',options) 31 console.log('searchKeyword',options)
  32 + this.getcollectionlist();
32 this.options=options 33 this.options=options
33 this.city=JSON.parse(options.city) 34 this.city=JSON.parse(options.city)
34 this.selectComponent('#getpos').getPos(); 35 this.selectComponent('#getpos').getPos();
@@ -353,7 +354,26 @@ Page({ @@ -353,7 +354,26 @@ Page({
353 centre_pos:`${suggestion.latitude},${suggestion.longitude}`, 354 centre_pos:`${suggestion.latitude},${suggestion.longitude}`,
354 multiIndex:0, 355 multiIndex:0,
355 ...this.options, 356 ...this.options,
  357 + frompage:'search',
356 },'/pages/reserve/indexList') 358 },'/pages/reserve/indexList')
357 }) 359 })
358 }, 360 },
  361 + getcollectionlist(){
  362 + App.Customer.GetCollectionSellerList({
  363 + openid:getApp().openid,
  364 + lat:this.location.latitude,
  365 + lng:this.location.longitude,
  366 + offset:1,
  367 + size:10,
  368 + }).then(res=>{
  369 + let sellers=res.data;
  370 + sellers.forEach((item,i)=>{
  371 + item.title=item.sellername;
  372 + item.type='-1';
  373 + })
  374 + this.setData({
  375 + collectionlist:sellers,
  376 + })
  377 + })
  378 + }
359 }) 379 })
@@ -57,16 +57,29 @@ @@ -57,16 +57,29 @@
57 </view> 57 </view>
58 </view> 58 </view>
59 </view> 59 </view>
60 - <view class="pages" wx:elif="{{history.length>0}}">  
61 - <view class="flex-lr">  
62 - <view class="history-title">最近搜索</view>  
63 - <view class="history-empty" bindtap="historyEmpty"></view>  
64 - </view>  
65 - <view class="history-list">  
66 - <block wx:for="{{history}}" wx:key="history.key">  
67 - <search-item item="{{item}}" hasHistory bindclick="searchItemClick"></search-item>  
68 - </block>  
69 - </view> 60 + <view class="pages flex-vl" wx:else>
  61 + <block wx:if="{{history.length>0}}">
  62 + <view class="flex-lr">
  63 + <view class="history-title">最近搜索</view>
  64 + <view class="history-empty" bindtap="historyEmpty"></view>
  65 + </view>
  66 + <view class="history-list" style="margin-bottom: 60rpx;">
  67 + <block wx:for="{{history}}" wx:key="history.key">
  68 + <search-item item="{{item}}" hasHistory bindclick="searchItemClick"></search-item>
  69 + </block>
  70 + </view>
  71 + </block>
  72 + <block wx:if="{{collectionlist.length>0}}">
  73 + <view class="flex-lr">
  74 + <view class="history-title">收藏的店</view>
  75 + <navigator class="text-blue font28r" style="height: 100%;padding-left: 20rpx;color: #42A5FF;" url="/pages/me/follow">更多</navigator>
  76 + </view>
  77 + <view class="history-list">
  78 + <block wx:for="{{collectionlist}}" wx:key="collectionlist.key">
  79 + <search-item item="{{item}}" hasHistory bindclick="searchItemClick" search="{{false}}"></search-item>
  80 + </block>
  81 + </view>
  82 + </block>
70 </view> 83 </view>
71 </view> 84 </view>
72 <getpos bindpos="onpos" id="getpos" hasAllowFail></getpos> 85 <getpos bindpos="onpos" id="getpos" hasAllowFail></getpos>
@@ -597,9 +597,8 @@ @@ -597,9 +597,8 @@
597 overflow-y: scroll; 597 overflow-y: scroll;
598 background: url(http://nosqn.colorcun.com/last-book-bg.png) center center no-repeat; 598 background: url(http://nosqn.colorcun.com/last-book-bg.png) center center no-repeat;
599 background-size: 100% 100%; 599 background-size: 100% 100%;
600 - padding-bottom: 10rpx;  
601 position: relative; 600 position: relative;
602 - padding-bottom: 240rpx; 601 + /* padding-bottom: 240rpx; */
603 } 602 }
604 .book-flower{ 603 .book-flower{
605 width: 340rpx; 604 width: 340rpx;
@@ -777,6 +776,7 @@ @@ -777,6 +776,7 @@
777 top: 0; 776 top: 0;
778 bottom: 0; 777 bottom: 0;
779 margin: auto 0; 778 margin: auto 0;
  779 + z-index: 99;
780 } 780 }
781 .confirm-cover{ 781 .confirm-cover{
782 position: fixed; 782 position: fixed;
@@ -9,9 +9,11 @@ class PubSub { @@ -9,9 +9,11 @@ class PubSub {
9 } 9 }
10 10
11 on(type, handler) { 11 on(type, handler) {
  12 + console.log('collection',handler)
12 let cache = this.PubSubCache[type] || (this.PubSubCache[type] = {}); 13 let cache = this.PubSubCache[type] || (this.PubSubCache[type] = {});
13 - 14 + console.log('cache',cache);
14 handler.$uid = handler.$uid || this.PubSubCache.$uid++; 15 handler.$uid = handler.$uid || this.PubSubCache.$uid++;
  16 + console.log('handler',handler.$uid);
15 cache[handler.$uid] = handler; 17 cache[handler.$uid] = handler;
16 } 18 }
17 19
@@ -606,6 +606,20 @@ export default { @@ -606,6 +606,20 @@ export default {
606 //判断是否点击确认收到 606 //判断是否点击确认收到
607 'App.Reserve.GetIsRelaSuccess':{ 607 'App.Reserve.GetIsRelaSuccess':{
608 openid:'openid' 608 openid:'openid'
  609 + },
  610 + //App获取桌位关联图片
  611 + 'App.Tables.GetTablesPhoto':null,
  612 + //小程序获取桌位关联图片
  613 + 'App.Tables.GetTablesPhotoBySid':null,
  614 +
  615 + //订单预订成功是否消费
  616 + 'App.Reserve.GetReserveIsConsume':{
  617 + openid:'openid'
  618 + },
  619 +
  620 + //预定同一商家、时段时提醒
  621 + 'App.Reserve.GetReserveIsExits':{
  622 + openid:'openid'
609 } 623 }
610 624
611 } 625 }
@@ -15,6 +15,7 @@ const status=[ @@ -15,6 +15,7 @@ const status=[
15 '已取消',//4:取消预定 15 '已取消',//4:取消预定
16 '已预订',//5:C端在线预定(分配包间) 16 '已预订',//5:C端在线预定(分配包间)
17 '已拒绝'//6:拒单 17 '已拒绝'//6:拒单
  18 + // '待赴约'
18 ]; 19 ];
19 const soltName=['','早餐','午餐','晚餐','夜宵'] 20 const soltName=['','早餐','午餐','晚餐','夜宵']
20 export default { 21 export default {
@@ -667,6 +667,12 @@ @@ -667,6 +667,12 @@
667 "pathName": "pages/customer/discount", 667 "pathName": "pages/customer/discount",
668 "query": "id=199122&sid=4352", 668 "query": "id=199122&sid=4352",
669 "scene": null 669 "scene": null
  670 + },
  671 + {
  672 + "name": "pages/reserve/detail",
  673 + "pathName": "pages/reserve/detail",
  674 + "query": "id=1297",
  675 + "scene": null
670 } 676 }
671 ] 677 ]
672 } 678 }