Commit b06280209d477c8052e273a074f93241d49fa923

Authored by wangfan
1 parent 32f85979

C端调整

  1 +// components/reserve/discount.js
  2 +Component({
  3 + /**
  4 + * 组件的属性列表
  5 + */
  6 + properties: {},
  7 +
  8 + /**
  9 + * 组件的初始数据
  10 + */
  11 + data: {
  12 + display:false,
  13 + },
  14 +
  15 + /**
  16 + * 组件的方法列表
  17 + */
  18 + methods: {
  19 + hide(){
  20 + this.setData({
  21 + display:false,
  22 + })
  23 + },
  24 + show(){
  25 + this.setData({
  26 + display:true,
  27 + })
  28 + },
  29 + }
  30 +})
  1 +{
  2 + "component": true,
  3 + "usingComponents": {}
  4 +}
  1 +<!--components/reserve/discount.wxml-->
  2 +<view class="mask" bindtap="hide" wx:if="{{display}}">
  3 + <view class="discount" catchtap="">
  4 + <view class="discount-name Semibold" bindtap="hide">
  5 + 优惠信息
  6 + <view class="close"></view>
  7 + </view>
  8 + <view class="slogan">致电商家时,请说明是一键订平台的客户</view>
  9 + <view class="list">
  10 + <view class="item flex-ll">
  11 + <view class="left flex-vc">123213</view>
  12 + <view class="right flex-vc">
  13 + 123321312
  14 + </view>
  15 + </view>
  16 + </view>
  17 + </view>
  18 +</view>
  1 +/* components/reserve/discount.wxss */
  2 +@import "../../app.wxss";
  3 +.discount{
  4 + position: fixed;
  5 + bottom: 0;
  6 + background-color: #ffffff;
  7 + border-radius: 10rpx 10rpx 0rpx 0rpx;
  8 + color: #353535;
  9 + width: 90%;
  10 + padding: 30rpx 5%;
  11 +}
  12 +.discount view{
  13 + background-size: 100% 100%;
  14 +}
  15 +.discount-name{
  16 + font-size: 32rpx;
  17 + height: 44rpx;
  18 + line-height: 44rpx;
  19 + width: 100%;
  20 + position: relative;
  21 + text-align: center;
  22 +}
  23 +.discount-name .close{
  24 + background-image: url("http://qn.colorcun.com/reserve/images/%E5%85%B3%20%20%E9%97%AD.png");
  25 + width: 32rpx;
  26 + height: 32rpx;
  27 + position: absolute;
  28 + right:0;
  29 + top:6rpx;
  30 +}
  31 +.slogan{
  32 + background-color: #FEF1EA;
  33 + height: 70rpx;
  34 + line-height: 70rpx;
  35 + font-size: 28rpx;
  36 + color:#C28C56;
  37 + margin-top: 30rpx;
  38 + text-align: center;
  39 + border-radius: 6rpx;
  40 +}
  41 +.list{
  42 + max-height: 730rpx;
  43 + overflow-y: auto;
  44 +}
  45 +.item{
  46 + width: 100%;
  47 + max-width: 690rpx;
  48 + height: 190rpx;
  49 + background-image: url("http://qn.colorcun.com/reserve/images/%E4%BC%98%E6%83%A0%E5%88%B8.jpg");
  50 + margin-top: 40rpx;
  51 +}
  52 +.item .left{
  53 + width: 200rpx;
  54 + height: 190rpx;
  55 + color: #fff;
  56 +}
  57 +.item .right{
  58 + max-width: 300rpx;
  59 + height: 190rpx;
  60 + margin-left: 50rpx;
  61 + font-size: 28rpx;
  62 +}
@@ -190,4 +190,7 @@ Page({ @@ -190,4 +190,7 @@ Page({
190 urls:urls 190 urls:urls
191 }) 191 })
192 }, 192 },
  193 + showDiscount(){
  194 + this.selectComponent('#discount').show()
  195 + },
193 }) 196 })
@@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
8 "stat":"/components/stat/stat", 8 "stat":"/components/stat/stat",
9 "as":"/components/actionSheet/index", 9 "as":"/components/actionSheet/index",
10 "nav":"/components/nav/nav", 10 "nav":"/components/nav/nav",
11 - "getpos":"/components/userinfo/getpos" 11 + "getpos":"/components/userinfo/getpos",
  12 + "discount":"/components/reserve/discount"
12 } 13 }
13 } 14 }
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 <view class="icon car" wx:if="{{seller.is_parking==1}}">停车场</view> 32 <view class="icon car" wx:if="{{seller.is_parking==1}}">停车场</view>
33 </view> 33 </view>
34 </view> 34 </view>
35 - <formids wx:if="{{seller.activity.length>0}}" url="/pages/reserve/activity?id={{seller.id}}"> 35 + <formids wx:if="{{seller.activity.length>0}}" bindclick="showDiscount">
36 <view class="activity-view" > 36 <view class="activity-view" >
37 <view class="activity" > 37 <view class="activity" >
38 <view class="flex-lr"> 38 <view class="flex-lr">
@@ -132,4 +132,5 @@ @@ -132,4 +132,5 @@
132 </view> 132 </view>
133 </view> 133 </view>
134 <as id="as" items="{{seller.seller_tel}}" bindclick="reservePhone">拨打电话预定</as> 134 <as id="as" items="{{seller.seller_tel}}" bindclick="reservePhone">拨打电话预定</as>
135 -<getpos bindpos="onpos" id="getpos"></getpos>  
  135 +<getpos bindpos="onpos" id="getpos"></getpos>
  136 +<discount id="discount"></discount>