Commit cc631333a5b100d761a931d929b8c08d02192e63

Authored by vking
1 parent 3b6dffa1

new 2.0

  1 +// components/reserve/caixi.js
  2 +import util from '../../../utils/util';
  3 +Component({
  4 + /**
  5 + * 组件的属性列表
  6 + */
  7 + properties: {
  8 + multiArray:{
  9 + type:Array,
  10 + value:[],
  11 + },
  12 + multiIndex:{
  13 + type:Array,
  14 + value:[],
  15 + },
  16 + },
  17 +
  18 + /**
  19 + * 组件的初始数据
  20 + */
  21 + data: {
  22 + hidden:true
  23 + },
  24 +
  25 + /**
  26 + * 组件的方法列表
  27 + */
  28 + methods: {
  29 + hide(){
  30 + this.setData({
  31 + hidden:true,
  32 + })
  33 + },
  34 + active(e){
  35 + this.triggerEvent('active',util.attr(e,'index'));
  36 + this.hide();
  37 + },
  38 + show(){
  39 + this.setData({
  40 + hidden:false,
  41 + })
  42 + },
  43 + }
  44 +})
  1 +{
  2 + "component": true,
  3 + "usingComponents": {}
  4 +}
  1 +<!--components/reserve/caixi.wxml-->
  2 +<view class="caixi" catchtap="hide" hidden="{{hidden}}">
  3 + <view class="caixi-view">
  4 + <view class="item {{index==multiIndex[0]?'active':''}}"
  5 + bindtap="active" data-index="{{index}}"
  6 + wx:for="{{multiArray[0]}}" wx:key="multiArraykey">
  7 + {{item}}
  8 + <image class="number" wx:if="{{index>=1 && index<4}}" src="http://nosqn.colorcun.com/reserve/images/cx{{index}}.png"></image>
  9 + </view>
  10 + </view>
  11 +</view>
  12 +
  1 +/* components/reserve/caixi.wxss */
  2 +@import "../../../app.wxss";
  3 +.caixi{
  4 + background-color: #fefefe;
  5 + position: absolute;
  6 + width: calc(100% - 80rpx);
  7 + border-radius: 0rpx 0rpx 40rpx 40rpx;
  8 + padding: 0rpx 40rpx 30rpx;
  9 + color: #353535;
  10 + margin-top: 20rpx;
  11 +}
  12 +.caixi-view{
  13 +
  14 +}
  15 +.item{
  16 + background-color: #F0F0F9;
  17 + width: 150rpx;
  18 + height: 70rpx;
  19 + overflow: hidden;
  20 + white-space:nowrap;
  21 + border-radius: 4rpx;
  22 + line-height: 70rpx;
  23 + font-size: 24rpx;
  24 + text-align: center;
  25 + margin-bottom: 30rpx;
  26 + position: relative;
  27 + display: inline-block;
  28 + margin-right: calc((100% - 600rpx) / 3);
  29 +}
  30 +.item:nth-child(4n){
  31 + margin-right:0;
  32 +}
  33 +.item.active{
  34 + background: #E6F3FF;
  35 + color:#42A5FF;
  36 + font-weight: 900;
  37 +}
  38 +.item .number{
  39 + width: 30rpx;
  40 + height: 26rpx;
  41 + position: absolute;
  42 + top:0;
  43 + left: 0;
  44 +}
  1 +// components/2.0/filter/filter-group.js
  2 +import DA from '../../../pages/reserve/data';
  3 +Component({
  4 + /**
  5 + * 组件的属性列表
  6 + */
  7 + properties: {
  8 + height:Number,
  9 + },
  10 +
  11 + /**
  12 + * 组件的初始数据
  13 + */
  14 + data: {
  15 + multiArray: ['全部菜系'],
  16 + multiIndex: [0],
  17 + tags: [
  18 + {id: 1, name: '环境好'},
  19 + {id: 2, name: '菜品有特色'},
  20 + {id: 3, name: '超大包间'},
  21 + ],
  22 + caixiOpened:false,
  23 + filterOpened:false,
  24 + },
  25 + attached(){
  26 + this.init()
  27 + this.filterParams= null
  28 + },
  29 + /**
  30 + * 组件的方法列表
  31 + */
  32 + methods: {
  33 + async init(){
  34 + this.setData({
  35 + multiArray: [['全部菜系'].concat(await DA.getCates())]
  36 + })
  37 + },
  38 + caixiActive(e) {
  39 + console.log('caixiActive', e);
  40 + this.setData({
  41 + multiIndex: [e.detail]
  42 + })
  43 + this.hide()
  44 + },
  45 + caixiShow() {
  46 + if(this.data.caixiOpened){
  47 + this.selectComponent('#caixi').hide();
  48 + this.setData({
  49 + caixiOpened:false,
  50 + })
  51 + }else{
  52 + this.selectComponent('#filter').hide();
  53 + this.selectComponent('#caixi').show();
  54 + this.setData({
  55 + caixiOpened:true,
  56 + filterOpened:false,
  57 + })
  58 + }
  59 + },
  60 + filterShow() {
  61 + if(this.data.filterOpened){
  62 + this.selectComponent('#filter').hide();
  63 + this.setData({
  64 + filterOpened:false,
  65 + })
  66 + }else{
  67 + this.selectComponent('#caixi').hide();
  68 + this.selectComponent('#filter').show(this.filterParams);
  69 + this.setData({
  70 + filterOpened:true,
  71 + caixiOpened:false,
  72 + })
  73 + }
  74 + },
  75 +
  76 + filterEvent(e) {
  77 + console.log('filterEvent', e)
  78 + if (e.detail.type == 'clean') {
  79 + this.filterParams = null
  80 + this.setData({
  81 + filterParams: null,
  82 + })
  83 + } else {
  84 + this.filterParams = e.detail.data
  85 + this.setData({
  86 + filterParams: this.filterParams,
  87 + })
  88 + }
  89 + },
  90 + hide(){
  91 + this.selectComponent('#caixi').hide();
  92 + this.selectComponent('#filter').hide();
  93 + this.setData({
  94 + filterOpened:false,
  95 + caixiOpened:false,
  96 + })
  97 + },
  98 + }
  99 +})
  1 +{
  2 + "component": true,
  3 + "usingComponents": {
  4 + "caixi":"./caixi",
  5 + "filter":"./filter"
  6 + }
  7 +}
  1 +<!--components/2.0/filter/filter-group.wxml-->
  2 +<view class="view filter-group-view {{caixiOpened || filterOpened?'mask':''}}"
  3 + bindtap="hide"
  4 + style="height: {{caixiOpened || filterOpened?height+'px':'auto'}};">
  5 + <view catchtap="catchtap"
  6 + class="view bg-white flex flex-sub filter-group padding-top 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">
  8 + <block wx:if="{{multiIndex[0]==0}}">菜系</block>
  9 + <block wx:else="">{{multiArray[0][multiIndex[0]]}}</block>
  10 + <view class="more view"></view>
  11 + </view>
  12 + <block wx:for="{{tags}}" wx:key="tags.key">
  13 + <view class="view cu-tag round {{item.active?'bg-blue light':''}}"
  14 + bindtap="tagsChange"
  15 + data-id="{{item.id}}">{{item.name}}</view>
  16 + </block>
  17 + <view class="view cu-tag round {{filterOpened?'opened text-blue':''}} {{filterParams.consumeStr?'bg-blue light':''}}" bindtap="filterShow">
  18 + {{filterParams.consumeStr?filterParams.consumeStr:'筛选'}}
  19 + <view class="more view"></view>
  20 + </view>
  21 + </view>
  22 + <view class="opened-block bg-white" catchtap="catchtap">
  23 + <caixi multiArray="{{multiArray}}" multiIndex="{{multiIndex}}"
  24 + bindactive="caixiActive" id="caixi"
  25 + ></caixi>
  26 + <filter id="filter" bindevent="filterEvent"></filter>
  27 + </view>
  28 +</view>
  1 +/* components/2.0/filter/filter-group.wxss */
  2 +@import "../../../colorui/main.wxss";
  3 +
  4 +.cu-tag+.cu-tag{
  5 + margin-left: 20rpx;
  6 +}
  7 +.more{
  8 + background-image: url("http://nosqn.colorcun.com/2.0/home%20%2815%29.png");
  9 + width: 12rpx;
  10 + height: 6rpx;
  11 + margin-left: 6rpx;
  12 +}
  13 +.light .more{
  14 + background-image: url("http://nosqn.colorcun.com/2.0/home%20%2814%29.png");
  15 +}
  16 +.opened .more{
  17 + background-image: url("http://nosqn.colorcun.com/2.0/home%20%2813%29.png");
  18 +}
  19 +.opened-block{
  20 + position: relative;
  21 +}
  22 +.filter-group-view{
  23 + position: relative;
  24 + z-index: 10000;
  25 +}
  26 +.filter-group{
  27 + position: relative;
  28 + z-index: 10000;
  29 + overflow-x: auto;
  30 +}
  31 +.filter-group:after{
  32 + display: block;
  33 + content: "";
  34 + min-width: 40rpx;
  35 + height: 40rpx;
  36 +}
  37 +.filter-group-opened{}
  38 +.mask:before{
  39 + content: "";
  40 + display: block;
  41 + position: absolute;
  42 + bottom: 0;
  43 + width: 100%;
  44 + height: 50%;
  45 + background-color: rgba(0,0,0,0.5);
  46 +}
  1 +// components/reserve/search/filter.js
  2 +import util from '../../../utils/util'
  3 +Component({
  4 + /**
  5 + * 组件的属性列表
  6 + */
  7 + properties: {
  8 +
  9 + },
  10 +
  11 + /**
  12 + * 组件的初始数据
  13 + */
  14 + data: {
  15 + consumeStr:'',
  16 + hasDisplay:false,
  17 + },
  18 + attached(){
  19 + this.min=0
  20 + this.max=300
  21 + },
  22 + /**
  23 + * 组件的方法列表
  24 + */
  25 + methods: {
  26 + consumeEvent(e){
  27 + console.log('consumeEvent',e)
  28 + let data={
  29 + hasChange:true,
  30 + }
  31 + if(e.detail.type=='once'){
  32 + this.min=e.detail.min
  33 + this.max=e.detail.max
  34 + }else{
  35 + this[e.detail.type]=e.detail.value
  36 + }
  37 + let consumeStr=''
  38 + if(this.min==0){
  39 + if(this.max>this.min){
  40 + consumeStr='¥'+this.max+'以下'
  41 + }
  42 + }else{
  43 + if(this.min<300){
  44 + consumeStr='¥'+this.min+'-'+this.max
  45 + }else{
  46 + consumeStr='¥'+this.min+'以上'
  47 + }
  48 + }
  49 + let obj={
  50 + consumeStr:consumeStr,
  51 + }
  52 + if(e.detail.type!='once'){
  53 + obj.active=''
  54 + }
  55 + this.setData(obj)
  56 + },
  57 + changeVal(e){
  58 + let active=util.attr(e,'val')
  59 + let val=active.split(',')
  60 + this.min=val[0]
  61 + this.max=val[1]
  62 + this.setData({
  63 + active:active,
  64 + })
  65 + this.selectComponent('#consume').changeVal(this.min,this.max);
  66 + },
  67 + hide(){
  68 + this.setData({
  69 + hasDisplay:false,
  70 + })
  71 + },
  72 + show(filterParams=null){
  73 + let obj={
  74 + hasDisplay:true,
  75 + }
  76 + if(filterParams){
  77 + if(filterParams.active){
  78 + obj.active=filterParams.active
  79 + }
  80 + this.min=filterParams.min
  81 + this.max=filterParams.max
  82 + obj.consumeStr=filterParams.consumeStr||''
  83 + }
  84 + this.setData(obj)
  85 + if(filterParams){
  86 + setTimeout(()=>{
  87 + this.selectComponent('#consume').changeVal(this.min,this.max);
  88 + },0)
  89 + }else{
  90 + setTimeout(()=>{
  91 + this.selectComponent('#consume').changeVal(0,300);
  92 + this.setData({
  93 + active:'',
  94 + consumeStr:'',
  95 + })
  96 + },0)
  97 + }
  98 + },
  99 + submit(){
  100 + this.triggerEvent('event',{
  101 + type:'set',
  102 + data:{
  103 + consumeStr:this.data.consumeStr||'',
  104 + min:this.min,
  105 + max:this.max,
  106 + active:this.data.active||'',
  107 + },
  108 + })
  109 + this.close()
  110 + },
  111 + reset(){
  112 + this.selectComponent('#consume').changeVal(0,300);
  113 + this.setData({
  114 + active:'',
  115 + consumeStr:'',
  116 + })
  117 + this.triggerEvent('event',{type:'clean'})
  118 + this.close()
  119 + },
  120 + }
  121 +})
  1 +{
  2 + "component": true,
  3 + "usingComponents": {
  4 + "consume":"/components/stat/zyslider"
  5 + }
  6 +}
  1 +<!--components/reserve/search/filter.wxml-->
  2 +<view class="filter" catchtap="catchtap" wx:if="{{hasDisplay}}">
  3 + <view class="part flex-ll">
  4 + 人均消费
  5 + <view class="txt" wx:if="{{consumeStr}}">{{consumeStr}}</view>
  6 + </view>
  7 + <view class="flex-lr tips">
  8 + <view class="content">¥0</view>
  9 + <view class="content">¥300以上</view>
  10 + </view>
  11 + <view class="consume flex-vc">
  12 + <consume style="width:99%;" id="consume"
  13 + cla="slider20"
  14 + minValue="0" maxValue="300" min="0" max="300"
  15 + step="10"
  16 + blockColor="#fefefe"
  17 + backgroundColor="#42A5FF"
  18 + selectedColor="#42A5FF"
  19 + bindevent="consumeEvent">
  20 + </consume>
  21 + </view>
  22 + <view class="flex-lr split">
  23 + <view class="item {{active=='0,100'?'active':''}}" bindtap="changeVal" data-val="0,100">¥100以下</view>
  24 + <view class="item {{active=='100,200'?'active':''}}" bindtap="changeVal" data-val="100,200">¥100-200</view>
  25 + <view class="item {{active=='200,300'?'active':''}}" bindtap="changeVal" data-val="200,300">¥200-300</view>
  26 + <view class="item {{active=='300,300'?'active':''}}" bindtap="changeVal" data-val="300,300">¥300以上</view>
  27 + </view>
  28 + <view class="flex-lr buttons">
  29 + <view class="reset" bindtap="reset">重置</view>
  30 + <view class="submit" bindtap="submit">完成</view>
  31 + </view>
  32 +</view>
  33 +
  1 +/* components/reserve/search/filter.wxss */
  2 +@import "../../../app.wxss";
  3 +.filter{
  4 + position: absolute;
  5 + width: 100%;
  6 + background-color: #fefefe;
  7 + z-index: 9999;
  8 + padding: 20rpx 40rpx 0;
  9 + box-sizing: border-box;
  10 + border-radius: 0px 0px 40rpx 40rpx;
  11 +}
  12 +
  13 +.part{
  14 + height: 48rpx;
  15 + font-size: 34rpx;
  16 + font-family: PingFangSC-Semibold, PingFang SC;
  17 + font-weight: 600;
  18 + color: #353535;
  19 + line-height: 48rpx;
  20 +}
  21 +.part .txt{
  22 + height: 48rpx;
  23 + font-size: 34rpx;
  24 + font-family: PingFangSC-Medium, PingFang SC;
  25 + font-weight: 500;
  26 + color: #42A5FF;
  27 + line-height: 48rpx;
  28 + margin-left: 30rpx;
  29 +}
  30 +.tips{
  31 + height: 40rpx;
  32 + font-size: 28rpx;
  33 + font-family: PingFangSC-Regular, PingFang SC;
  34 + font-weight: 400;
  35 + color: #353535;
  36 + line-height: 40rpx;
  37 + margin-top: 40rpx;
  38 +}
  39 +.tips .content{
  40 + width: 130rpx;
  41 + text-align: center;
  42 +}
  43 +.consume{
  44 + margin: 0rpx auto;
  45 + width: calc(100% - 60rpx);
  46 + height: 80rpx;
  47 + overflow: hidden;
  48 +}
  49 +.split{
  50 + margin-top: 60rpx;
  51 +}
  52 +.split .item{
  53 + width: calc(calc(100% - 66rpx) / 4);
  54 + margin-right: 22rpx;
  55 + height: 84rpx;
  56 + background: #F0F0F9;
  57 + border-radius: 6rpx;
  58 +
  59 + font-size: 28rpx;
  60 + font-family: PingFangSC-Regular, PingFang SC;
  61 + font-weight: 400;
  62 + color: #353535;
  63 + line-height: 84rpx;
  64 + text-align: center;
  65 +}
  66 +.split .item:last-child{
  67 + margin-right: 0;
  68 +}
  69 +.split .item.active{
  70 + background: #E6F3FF;
  71 + color: #42A5FF;
  72 +}
  73 +.buttons{
  74 + width: calc(100% + 100rpx);
  75 + margin-left: -50rpx;
  76 + margin-top: 60rpx;
  77 + box-shadow: 0px 0px 8rpx 0px #EEF0F2;
  78 + border-radius: 0px 0px 40rpx 40rpx;
  79 + padding: 20rpx 50rpx;
  80 + box-sizing: border-box;
  81 +}
  82 +.buttons .reset,.buttons .submit{
  83 + width: calc(50% - 25rpx);
  84 + height: 80rpx;
  85 + background: #F2F2F2;
  86 + border-radius: 40rpx;
  87 +
  88 + font-size: 34rpx;
  89 + font-family: PingFangSC-Medium, PingFang SC;
  90 + font-weight: 500;
  91 + color: #42A5FF;
  92 + line-height: 80rpx;
  93 + text-align: center;
  94 + box-sizing: border-box;
  95 +}
  96 +.buttons .submit{
  97 + margin-left: 50rpx;
  98 + background: #42A5FF;
  99 + color: #FFFFFF;
  100 +}
  1 +// components/2.0/seller/card.js
  2 +Component({
  3 + /**
  4 + * 组件的属性列表
  5 + */
  6 + properties: {
  7 +
  8 + },
  9 +
  10 + /**
  11 + * 组件的初始数据
  12 + */
  13 + data: {
  14 +
  15 + },
  16 +
  17 + /**
  18 + * 组件的方法列表
  19 + */
  20 + methods: {
  21 +
  22 + }
  23 +})
  1 +{
  2 + "component": true,
  3 + "usingComponents": {}
  4 +}
  1 +<!--components/2.0/seller/card.wxml-->
  2 +<text>components/2.0/seller/card.wxml</text>
  1 +/* components/2.0/seller/card.wxss */
@@ -6,6 +6,7 @@ Component({ @@ -6,6 +6,7 @@ Component({
6 */ 6 */
7 properties: { 7 properties: {
8 /** slider 最小值 */ 8 /** slider 最小值 */
  9 + cla:String,//额外样式名称
9 min: { 10 min: {
10 type: Number 11 type: Number
11 }, 12 },
1 <!--component/zyslider.wxml--> 1 <!--component/zyslider.wxml-->
2 <slot></slot> 2 <slot></slot>
3 -<view class="container {{hideOption}}"> 3 +<view class="container {{cla}} {{hideOption}}">
4 <view class="slider-item min" style="left:{{leftValue}}rpx;background-color:{{blockColor}};" catchtouchmove="sliderMove" data-type="min"></view> 4 <view class="slider-item min" style="left:{{leftValue}}rpx;background-color:{{blockColor}};" catchtouchmove="sliderMove" data-type="min"></view>
5 <view class="slider-item max" style="left:{{rightValue}}rpx;background-color:{{blockColor}};" catchtouchmove="sliderMove" data-type="max"></view> 5 <view class="slider-item max" style="left:{{rightValue}}rpx;background-color:{{blockColor}};" catchtouchmove="sliderMove" data-type="max"></view>
6 6
@@ -39,6 +39,10 @@ @@ -39,6 +39,10 @@
39 border-radius: 50%; 39 border-radius: 50%;
40 z-index: 2; 40 z-index: 2;
41 } 41 }
  42 +.slider20 .slider-item{
  43 + box-shadow: 0px 4prx 8rpx 0px #E6F3FF;
  44 + border: 2rpx solid #E6F3FF;
  45 +}
42 46
43 .min { 47 .min {
44 position: relative; 48 position: relative;
@@ -32,6 +32,7 @@ Component({ @@ -32,6 +32,7 @@ Component({
32 this.hide(); 32 this.hide();
33 }else{ 33 }else{
34 let p=getCurrentPages() 34 let p=getCurrentPages()
  35 + console.log('add-to-lite.attached',p)
35 if(p.length==1){ 36 if(p.length==1){
36 this.show(); 37 this.show();
37 } 38 }
@@ -45,7 +46,7 @@ Component({ @@ -45,7 +46,7 @@ Component({
45 show(){ 46 show(){
46 this.triggerEvent("show"); 47 this.triggerEvent("show");
47 //导航栏自适应 48 //导航栏自适应
48 - if(this.data.type=='yellow'){ 49 + if(this.data.type=='black20'){
49 let systemInfo = wx.getSystemInfoSync(); 50 let systemInfo = wx.getSystemInfoSync();
50 let reg = /ios/i; 51 let reg = /ios/i;
51 let pt = 20;//导航状态栏上内边距 52 let pt = 20;//导航状态栏上内边距
@@ -2,15 +2,13 @@ @@ -2,15 +2,13 @@
2 <view class="tip {{type}}" style="top:{{statusBarHeightFull}}px;" bindtap="hide" hidden="{{hidden}}"> 2 <view class="tip {{type}}" style="top:{{statusBarHeightFull}}px;" bindtap="hide" hidden="{{hidden}}">
3 <view class="jian"></view> 3 <view class="jian"></view>
4 <view class="content flex-lr" bindtap="hide"> 4 <view class="content flex-lr" bindtap="hide">
5 - <view class="flex-vc" wx:if="{{type=='yellow'}}">  
6 - <view class="flex-ll text"> 5 + <view class="flex-vc" wx:if="{{type=='black20'}}">
  6 + <view class="flex-ll text title">
7 点击 7 点击
8 <view class="more"></view> 8 <view class="more"></view>
9 添加到我的小程序 9 添加到我的小程序
10 </view> 10 </view>
11 - <view class="text flex-ll">微信下拉即可快速  
12 - <view class="Semibold">订包间</view>  
13 - </view> 11 + <view class="text">微信下拉即可快速订包间</view>
14 </view> 12 </view>
15 <view class="flex-ll" wx:else=""> 13 <view class="flex-ll" wx:else="">
16 <view class="flex-ll text"> 14 <view class="flex-ll text">
@@ -89,4 +89,53 @@ @@ -89,4 +89,53 @@
89 } 89 }
90 .tip.black .more{ 90 .tip.black .more{
91 background-image: url("http://nosqn.colorcun.com/reserve/images/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_201911181208294.png"); 91 background-image: url("http://nosqn.colorcun.com/reserve/images/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_201911181208294.png");
  92 +}
  93 +
  94 +.tip.black20{
  95 + width: 436rpx;
  96 + right: 20rpx;
  97 + font-size:20rpx;
  98 + font-weight:500;
  99 + position: fixed;
  100 + z-index: 99;
  101 +}
  102 +.tip.black20 .content{
  103 + height:114rpx;
  104 + line-height: 100rpx;
  105 + background:rgba(0,0,0,0.7);
  106 + border-radius:20rpx;
  107 + color:#FFFFFF;
  108 +}
  109 +.tip.black20 .more{
  110 + background-image: url("http://nosqn.colorcun.com/2.0/home%20%282%29.png");
  111 + width: 32rpx;
  112 + height: 12rpx;
  113 +}
  114 +.tip.black20 .close{
  115 + background-image: url("http://nosqn.colorcun.com/2.0/home%20%283%29.png");
  116 + width: 20rpx;
  117 + height: 20rpx;
  118 +}
  119 +.tip.black20 .jian{
  120 + background-image: url("http://nosqn.colorcun.com/2.0/home%20%281%29.png");
  121 + width: 72rpx;
  122 + height: 54rpx;
  123 + margin-left: 230rpx;
  124 +}
  125 +.tip.black20 .text{
  126 + height: 32rpx;
  127 + font-size: 22rpx;
  128 + font-family: PingFangSC-Regular, PingFang SC;
  129 + font-weight: 400;
  130 + color: #FFFFFF;
  131 + line-height: 32rpx;
  132 +}
  133 +.tip.black20 .title{
  134 + height: 36rpx;
  135 + font-size: 26rpx;
  136 + font-family: PingFangSC-Semibold, PingFang SC;
  137 + font-weight: 600;
  138 + color: #FFFFFF;
  139 + line-height: 36rpx;
  140 + margin-bottom: 6rpx;
92 } 141 }
@@ -31,10 +31,6 @@ Component({ @@ -31,10 +31,6 @@ Component({
31 */ 31 */
32 methods: { 32 methods: {
33 getPos(fouce=false){ 33 getPos(fouce=false){
34 - this.selectComponent('#confirm').options({  
35 - header: '定位失败',  
36 - body: '请开启定位,为您查询附近餐厅。'  
37 - }).show();  
38 this._getPos().then(res => { 34 this._getPos().then(res => {
39 console.log('wx.getLocation.then', res); 35 console.log('wx.getLocation.then', res);
40 failCount=0; 36 failCount=0;
1 // pages/reservr/index.js 1 // pages/reservr/index.js
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 -import DA from './data';  
5 import PubSub from '../../utils/PubSub' 4 import PubSub from '../../utils/PubSub'
6 const {regeneratorRuntime} = global 5 const {regeneratorRuntime} = global
7 const mapScale = 15//18; 6 const mapScale = 15//18;
@@ -10,13 +9,21 @@ const def_longitude = 118.176300; @@ -10,13 +9,21 @@ const def_longitude = 118.176300;
10 Page({ 9 Page({
11 data:{ 10 data:{
12 map:{}, 11 map:{},
  12 + height:1000,
13 }, 13 },
14 user:{}, 14 user:{},
15 /** 15 /**
16 * 生命周期函数--监听页面加载 16 * 生命周期函数--监听页面加载
17 */ 17 */
18 onLoad: function (options) { 18 onLoad: function (options) {
19 - 19 + wx.getSystemInfo({
  20 + success:res=>{
  21 + console.log('wx.getSystemInfo',res)
  22 + this.setData({
  23 + height:res.windowHeight-180
  24 + })
  25 + },
  26 + })
20 }, 27 },
21 28
22 /** 29 /**
@@ -31,7 +38,6 @@ Page({ @@ -31,7 +38,6 @@ Page({
31 */ 38 */
32 onShow: function () { 39 onShow: function () {
33 PubSub.emit('custom-tab-bar') 40 PubSub.emit('custom-tab-bar')
34 -  
35 }, 41 },
36 42
37 /** 43 /**
@@ -3,16 +3,9 @@ @@ -3,16 +3,9 @@
3 "navigationBarTextStyle": "black", 3 "navigationBarTextStyle": "black",
4 "navigationBarTitleText":"周到安排", 4 "navigationBarTitleText":"周到安排",
5 "usingComponents": { 5 "usingComponents": {
6 - "formids":"/components/formids/formids",  
7 - "nav":"/components/nav/nav",  
8 "getpos":"/components/userinfo/getpos", 6 "getpos":"/components/userinfo/getpos",
9 - "sb-tr":"/components/reserve/seller-box-transverse/seller-box",  
10 "a2l":"/components/tips/add-to-lite", 7 "a2l":"/components/tips/add-to-lite",
11 - "boost":"/components/tips/boost",  
12 - "caixi":"/components/reserve/caixi",  
13 - "activity-enter":"/components/activity/enter",  
14 "as-phone":"/components/actionSheet/phone", 8 "as-phone":"/components/actionSheet/phone",
15 - "activity-tips":"/components/tips/discount",  
16 - "filter":"/components/reserve/search/filter" 9 + "filter-group":"/components/2.0/filter/filter-group"
17 } 10 }
18 } 11 }
@@ -14,13 +14,18 @@ @@ -14,13 +14,18 @@
14 subkey="SDEBZ-I74W4-QLGUX-XXYXU-HIR23-3QFBJ" 14 subkey="SDEBZ-I74W4-QLGUX-XXYXU-HIR23-3QFBJ"
15 layer-style="2" 15 layer-style="2"
16 style="width: 100%; height: 360rpx;"></map> 16 style="width: 100%; height: 360rpx;"></map>
17 -<view class="view"> 17 +<view class="view content" style="height: {{height}}px;">
  18 + <filter-group height="{{height}}"></filter-group>
18 19
19 </view> 20 </view>
20 <getpos bindpos="onpos" id="getpos"></getpos> 21 <getpos bindpos="onpos" id="getpos"></getpos>
21 <view bindtap="moveToLocation" class="view moveToLocation flex align-center justify-center"> 22 <view bindtap="moveToLocation" class="view moveToLocation flex align-center justify-center">
22 <image class="moveToLocation-image" src="http://nosqn.colorcun.com/2.0/home%20%2811%29.png"></image> 23 <image class="moveToLocation-image" src="http://nosqn.colorcun.com/2.0/home%20%2811%29.png"></image>
23 </view> 24 </view>
  25 +<view class="me view flex flex-direction align-center justify-center bg-white round">
  26 + <view class="icon view"></view>
  27 + <view class="text">我的</view>
  28 +</view>
24 <!-- 29 <!--
25 30
26 <view class="toast" wx:if="{{hasGetSellersEnd && listMoreCount<1 && !hasSearchLimit}}">该地区没有可供预订的餐厅哦!努力开通中</view> 31 <view class="toast" wx:if="{{hasGetSellersEnd && listMoreCount<1 && !hasSearchLimit}}">该地区没有可供预订的餐厅哦!努力开通中</view>
@@ -37,4 +42,5 @@ @@ -37,4 +42,5 @@
37 <activity-tips wx:if="{{hasSetActivity}}" map="{{map}}"></activity-tips> 42 <activity-tips wx:if="{{hasSetActivity}}" map="{{map}}"></activity-tips>
38 <as-phone id="as"></as-phone> 43 <as-phone id="as"></as-phone>
39 <filter id="filter" bindevent="filterEvent"></filter> 44 <filter id="filter" bindevent="filterEvent"></filter>
40 --->  
  45 +-->
  46 +<a2l bindshow="a2lshow" bindhide="a2lshow" key="INDEX" type="black20"></a2l>
@@ -14,4 +14,31 @@ page{ @@ -14,4 +14,31 @@ page{
14 .moveToLocation-image{ 14 .moveToLocation-image{
15 width: 40rpx; 15 width: 40rpx;
16 height: 40rpx; 16 height: 40rpx;
  17 +}
  18 +.me{
  19 + width: 84rpx;
  20 + height: 84rpx;
  21 + box-shadow: 0px 0px 10rpx 0rpx #E5E5E5;
  22 + position: fixed;
  23 + left:30rpx;
  24 + top:40rpx;
  25 +}
  26 +.me .icon{
  27 + background-image: url("http://nosqn.colorcun.com/2.0/home%20%284%29.png");
  28 + width: 32rpx;
  29 + height: 32rpx;
  30 +}
  31 +.me .text{
  32 + font-size: 20rpx;
  33 + font-weight: 400;
  34 + color: #5EB2FF;
  35 + line-height: 28rpx;
  36 + white-space:nowrap;
  37 +}
  38 +.content{
  39 + width: 100%;
  40 + background: #FFFFFF;
  41 + box-shadow: 0rpx 0rpx 20rpx 0rpx #E5E5E5;
  42 + border-radius: 40rpx 40rpx 0rpx 0rpx;
  43 + overflow: hidden;
17 } 44 }