Showing
61 changed files
with
1219 additions
and
64 deletions
| @@ -9,6 +9,7 @@ | @@ -9,6 +9,7 @@ | ||
| 9 | "pages/customer/invite", | 9 | "pages/customer/invite", |
| 10 | "pages/customer/list", | 10 | "pages/customer/list", |
| 11 | "pages/customer/remind", | 11 | "pages/customer/remind", |
| 12 | + "pages/customer/care", | ||
| 12 | "pages/reserve/index", | 13 | "pages/reserve/index", |
| 13 | "pages/reserve/index_yy", | 14 | "pages/reserve/index_yy", |
| 14 | "pages/me/index", | 15 | "pages/me/index", |
| @@ -20,6 +21,7 @@ | @@ -20,6 +21,7 @@ | ||
| 20 | "pages/reserve/searchKeyword", | 21 | "pages/reserve/searchKeyword", |
| 21 | "pages/reserve/detail", | 22 | "pages/reserve/detail", |
| 22 | "pages/me/follow", | 23 | "pages/me/follow", |
| 24 | + "pages/me/coupon", | ||
| 23 | "pages/manager-invitation/index", | 25 | "pages/manager-invitation/index", |
| 24 | "pages/manager-invitation/review", | 26 | "pages/manager-invitation/review", |
| 25 | "pages/manager-invitation/editor", | 27 | "pages/manager-invitation/editor", |
| @@ -55,7 +57,8 @@ | @@ -55,7 +57,8 @@ | ||
| 55 | "root": "pack-checkout", | 57 | "root": "pack-checkout", |
| 56 | "name": "支付", | 58 | "name": "支付", |
| 57 | "pages": [ | 59 | "pages": [ |
| 58 | - "pages/index" | 60 | + "pages/index", |
| 61 | + "pages/use" | ||
| 59 | ] | 62 | ] |
| 60 | }, | 63 | }, |
| 61 | { | 64 | { |
| @@ -122,9 +125,9 @@ | @@ -122,9 +125,9 @@ | ||
| 122 | "window": { | 125 | "window": { |
| 123 | "navigationStyle": "custom", | 126 | "navigationStyle": "custom", |
| 124 | "backgroundTextStyle": "light", | 127 | "backgroundTextStyle": "light", |
| 125 | - "navigationBarBackgroundColor": "#199095", | ||
| 126 | - "navigationBarTitleText": "点餐商户端", | ||
| 127 | - "navigationBarTextStyle": "white" | 128 | + "navigationBarBackgroundColor": "#FFFFFF", |
| 129 | + "navigationBarTitleText": "周到安排", | ||
| 130 | + "navigationBarTextStyle": "black" | ||
| 128 | }, | 131 | }, |
| 129 | "networkTimeout": { | 132 | "networkTimeout": { |
| 130 | "request": 10000, | 133 | "request": 10000, |
| @@ -51,7 +51,7 @@ Component({ | @@ -51,7 +51,7 @@ Component({ | ||
| 51 | } | 51 | } |
| 52 | //console.log('dur-dataset',dataset) | 52 | //console.log('dur-dataset',dataset) |
| 53 | setTimeout(()=>{ | 53 | setTimeout(()=>{ |
| 54 | - this.checked({currentTarget:{dataset:dataset}}) | 54 | + this.checked({currentTarget:{dataset:dataset}},) |
| 55 | },0) | 55 | },0) |
| 56 | 56 | ||
| 57 | } | 57 | } |
| @@ -38,10 +38,10 @@ module.exports = Behavior({ | @@ -38,10 +38,10 @@ module.exports = Behavior({ | ||
| 38 | checkedDefEvent(){ | 38 | checkedDefEvent(){ |
| 39 | console.log('this.type',this.type) | 39 | console.log('this.type',this.type) |
| 40 | let type=this.type | 40 | let type=this.type |
| 41 | - let ckdata = {} | 41 | + let ckdata = {}; |
| 42 | if (!this.data.ckdata) {//初始化值 | 42 | if (!this.data.ckdata) {//初始化值 |
| 43 | if(type == 'dur') return; | 43 | if(type == 'dur') return; |
| 44 | - let index, val | 44 | + let index, val; |
| 45 | if (type == 'pnum') { | 45 | if (type == 'pnum') { |
| 46 | index = 3 | 46 | index = 3 |
| 47 | val = this.data.items[index] | 47 | val = this.data.items[index] |
| @@ -13,10 +13,6 @@ Component({ | @@ -13,10 +13,6 @@ Component({ | ||
| 13 | type:Object, | 13 | type:Object, |
| 14 | value:null, | 14 | value:null, |
| 15 | }, | 15 | }, |
| 16 | - autoCon:{ | ||
| 17 | - type:Boolean, | ||
| 18 | - value:false | ||
| 19 | - } | ||
| 20 | }, | 16 | }, |
| 21 | 17 | ||
| 22 | /** | 18 | /** |
| @@ -34,7 +30,7 @@ Component({ | @@ -34,7 +30,7 @@ Component({ | ||
| 34 | }) | 30 | }) |
| 35 | setTimeout(()=>{ | 31 | setTimeout(()=>{ |
| 36 | if(!this.data.findSellerData){ | 32 | if(!this.data.findSellerData){ |
| 37 | - this.submit() | 33 | + this.submit('auto') |
| 38 | } | 34 | } |
| 39 | },300) | 35 | },300) |
| 40 | 36 | ||
| @@ -53,7 +49,7 @@ Component({ | @@ -53,7 +49,7 @@ Component({ | ||
| 53 | console.log('paramEvent',e.detail.type,e.detail) | 49 | console.log('paramEvent',e.detail.type,e.detail) |
| 54 | this.params[e.detail.type]=e.detail; | 50 | this.params[e.detail.type]=e.detail; |
| 55 | }, | 51 | }, |
| 56 | - submit(){ | 52 | + submit(action="click"){ |
| 57 | console.log('this.params',this.params) | 53 | console.log('this.params',this.params) |
| 58 | let paramObj={} | 54 | let paramObj={} |
| 59 | if(this.params['date']){ | 55 | if(this.params['date']){ |
| @@ -72,6 +68,7 @@ Component({ | @@ -72,6 +68,7 @@ Component({ | ||
| 72 | paramStr:util.unixtoTime(this.params['date'].val,'MM月DD日(`DAY/周WW`)') | 68 | paramStr:util.unixtoTime(this.params['date'].val,'MM月DD日(`DAY/周WW`)') |
| 73 | +' '+{1:'早餐',2:'午餐',3:'晚餐'}[this.params['dur'].val] | 69 | +' '+{1:'早餐',2:'午餐',3:'晚餐'}[this.params['dur'].val] |
| 74 | +' '+this.params['pnum'].val+'位', | 70 | +' '+this.params['pnum'].val+'位', |
| 71 | + action:action | ||
| 75 | }) | 72 | }) |
| 76 | }, | 73 | }, |
| 77 | show(){ | 74 | show(){ |
| @@ -39,7 +39,7 @@ | @@ -39,7 +39,7 @@ | ||
| 39 | </block> | 39 | </block> |
| 40 | <view class="cu-tag round line-white text-blue view cu-tag-end"></view> | 40 | <view class="cu-tag round line-white text-blue view cu-tag-end"></view> |
| 41 | </view> | 41 | </view> |
| 42 | - <view class="view button-view flex justify-end" bindtap="reserve"> | 42 | + <view class="view button-view flex justify-end" catchtap="reserve"> |
| 43 | <view class="cu-btn bg-blue text-white round reserve-button text-df text-bold view padding-xs">订包间</view> | 43 | <view class="cu-btn bg-blue text-white round reserve-button text-df text-bold view padding-xs">订包间</view> |
| 44 | </view> | 44 | </view> |
| 45 | </view> | 45 | </view> |
| @@ -16,8 +16,14 @@ Component({ | @@ -16,8 +16,14 @@ Component({ | ||
| 16 | data:{ | 16 | data:{ |
| 17 | shownotice:false, | 17 | shownotice:false, |
| 18 | }, | 18 | }, |
| 19 | - attached(){ | ||
| 20 | - this.getautomenu(); | 19 | + pageLifetimes: { |
| 20 | + show: function() { | ||
| 21 | + // 页面被展示 | ||
| 22 | + this.getautomenu(); | ||
| 23 | + }, | ||
| 24 | + attached(){ | ||
| 25 | + this.getautomenu(); | ||
| 26 | + }, | ||
| 21 | }, | 27 | }, |
| 22 | methods:{ | 28 | methods:{ |
| 23 | gotoList(e){ | 29 | gotoList(e){ |
| @@ -35,11 +41,9 @@ Component({ | @@ -35,11 +41,9 @@ Component({ | ||
| 35 | limit:1, | 41 | limit:1, |
| 36 | size:1, | 42 | size:1, |
| 37 | }).then(res=>{ | 43 | }).then(res=>{ |
| 38 | - if(res.data.length>0){ | ||
| 39 | - this.setData({ | ||
| 40 | - shownotice:true | ||
| 41 | - }) | ||
| 42 | - } | 44 | + this.setData({ |
| 45 | + shownotice:res.data.length ? true : false | ||
| 46 | + }) | ||
| 43 | }) | 47 | }) |
| 44 | }, | 48 | }, |
| 45 | } | 49 | } |
| 1 | -<cover-view style="top:{{pos.top}}rpx;left:{{pos.left}}rpx;right:{{pos.right}}rpx;" class="notice-cover" bindtap="gotoList" data-type="5" wx:if="{{shownotice}}"> | ||
| 2 | - <cover-view class="taocan-notice flex-lr"> | ||
| 3 | - <cover-view class="font28r" style="color:#FA7268;font-weight: bold;">您有一个套餐券待使用</cover-view> | ||
| 4 | - <cover-view class="notice-look font26r flex-cc">查看</cover-view> | ||
| 5 | - </cover-view> | ||
| 6 | - <cover-image src="http://nosqn.colorcun.com/nouse.jpg" class="taocan-image"></cover-image> | ||
| 7 | -</cover-view> | 1 | +<view style="top:{{pos.top}}rpx;left:{{pos.left}}rpx;right:{{pos.right}}rpx;" class="notice-cover" bindtap="gotoList" data-type="5" wx:if="{{shownotice}}"> |
| 2 | + <view class="taocan-notice flex-lr"> | ||
| 3 | + <view class="font28r" style="color:#FA7268;font-weight: bold;">您有一个套餐券待使用</view> | ||
| 4 | + <view class="notice-look font26r flex-cc">查看</view> | ||
| 5 | + </view> | ||
| 6 | + <image src="http://nosqn.colorcun.com/nouse.jpg" class="taocan-image"></image> | ||
| 7 | +</view> |
components/coupon/coupon.js
0 → 100644
| 1 | +Component({ | ||
| 2 | + properties:{ | ||
| 3 | + mark:{ | ||
| 4 | + type:String, | ||
| 5 | + value:'canuse' | ||
| 6 | + }, | ||
| 7 | + item:Object | ||
| 8 | + }, | ||
| 9 | + methods:{ | ||
| 10 | + todetail(e){ | ||
| 11 | + if(this.data.mark=='used'){ | ||
| 12 | + wx.showToast({ | ||
| 13 | + title:'该劵不能再使用', | ||
| 14 | + icon:'none', | ||
| 15 | + duration:2000 | ||
| 16 | + }) | ||
| 17 | + }else{ | ||
| 18 | + let aid=e.currentTarget.dataset.id; | ||
| 19 | + console.log(aid) | ||
| 20 | + wx.navigateTo({ | ||
| 21 | + url:'./coupon_detail?aid='+aid | ||
| 22 | + }) | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + } | ||
| 26 | + } | ||
| 27 | +}) |
components/coupon/coupon.json
0 → 100644
components/coupon/coupon.wxml
0 → 100644
| 1 | +<wxs src="../../utils/util.wxs" module="util" /> | ||
| 2 | +<view class="card flex-ll bg-white {{mark}}" bindtap="todetail" data-id="{{item.aid}}"> | ||
| 3 | + <view class="flex-vl {{mark=='canuse' ? 'black-font' : 'gray-font'}} card-main {{mark}}" style="justify-content:space-between;"> | ||
| 4 | + <view class="seller-info flex-ll"> | ||
| 5 | + <image class="seller-image"></image> | ||
| 6 | + <view class="smooth font-siny font24r">{{item.sellername}}</view> | ||
| 7 | + </view> | ||
| 8 | + <view class="font34r font-bold">{{item.aname}}</view> | ||
| 9 | + <view class="{{mark=='canuse' ? 'gray-deep-font' : 'gray-font'}} font24r smooth">有效时间:{{util.unixtoTime(item.stime,'YYYY.MM.DD')}}-{{util.unixtoTime(item.etime,'YYYY.MM.DD HH:II')}}</view> | ||
| 10 | + </view> | ||
| 11 | + <view class="flex-cc card-info font30r font-bold smooth" style="color:{{mark=='canuse' ? '#5EB2FF' : '#999999'}};">{{mark=='used' ? (item.status==1 ? '已使用' : '已过期') : '去使用'}}</view> | ||
| 12 | + <view class="circle-pos flex-vl" style="justify-content:space-between;"> | ||
| 13 | + <view class="circle circle-bottom bg-white"></view> | ||
| 14 | + <view class="circle circle-top bg-white"></view> | ||
| 15 | + </view> | ||
| 16 | +</view> |
components/coupon/coupon.wxss
0 → 100644
| 1 | +@import "../../app.wxss"; | ||
| 2 | +.card{ | ||
| 3 | + width: 690rpx; | ||
| 4 | + height: 164rpx; | ||
| 5 | + border-radius: 6rpx; | ||
| 6 | + margin: 0 auto 30rpx; | ||
| 7 | + background: rgba(87,160,255,.08); | ||
| 8 | + overflow: hidden; | ||
| 9 | + position: relative; | ||
| 10 | +} | ||
| 11 | +.card.canuse{ | ||
| 12 | + background: rgba(87,160,255,.08); | ||
| 13 | +} | ||
| 14 | +.card.used{ | ||
| 15 | + background: #F5F5F5; | ||
| 16 | +} | ||
| 17 | +.card-main{ | ||
| 18 | + width: 78%; | ||
| 19 | + height: 100%; | ||
| 20 | + /* background: linear-gradient(90deg, #3BBFF5 0%, #57A0FF 100%); */ | ||
| 21 | + padding: 14rpx 24rpx; | ||
| 22 | + box-sizing: border-box; | ||
| 23 | +} | ||
| 24 | +.card-main.canuse{ | ||
| 25 | + border-right: 2rpx dashed #5EB2FF; | ||
| 26 | +} | ||
| 27 | +.card-main.used{ | ||
| 28 | + border-right: 2rpx dashed #CCCCCC; | ||
| 29 | +} | ||
| 30 | +.seller-image{ | ||
| 31 | + width: 30rpx; | ||
| 32 | + height: 30rpx; | ||
| 33 | + border-radius: 50%; | ||
| 34 | + background: #EEEEEE; | ||
| 35 | + margin-right: 10rpx; | ||
| 36 | +} | ||
| 37 | +.card-info{ | ||
| 38 | + width: 22%; | ||
| 39 | + height: 100%; | ||
| 40 | + box-sizing: border-box; | ||
| 41 | +} | ||
| 42 | +.use-button{ | ||
| 43 | + width: 160rpx; | ||
| 44 | + height: 44rpx; | ||
| 45 | + border-radius: 24rpx; | ||
| 46 | + border: 2rpx solid #5EB2FF; | ||
| 47 | +} | ||
| 48 | +/* .circle{ | ||
| 49 | + width: 30rpx; | ||
| 50 | + height: 30rpx; | ||
| 51 | + border:2rpx solid #ECD9B7; | ||
| 52 | + border-radius: 50%; | ||
| 53 | + box-sizing: border-box; | ||
| 54 | +} */ | ||
| 55 | +/* .introduce{ | ||
| 56 | + display: -webkit-box; | ||
| 57 | + -webkit-box-orient: vertical; | ||
| 58 | + -webkit-line-clamp: 2; | ||
| 59 | + overflow: hidden; | ||
| 60 | +} */ | ||
| 61 | +.circle-pos{ | ||
| 62 | + width: 24rpx; | ||
| 63 | + height: 100%; | ||
| 64 | + position: absolute; | ||
| 65 | + left: 78%; | ||
| 66 | + top: 0; | ||
| 67 | + margin-left: -14rpx; | ||
| 68 | +} | ||
| 69 | +.circle{ | ||
| 70 | + width: 24rpx; | ||
| 71 | + height: 12rpx; | ||
| 72 | + background: #FFFFFF; | ||
| 73 | +} | ||
| 74 | +.circle-top{ | ||
| 75 | + border-radius: 12rpx 12rpx 0 0; | ||
| 76 | +} | ||
| 77 | +.circle-bottom{ | ||
| 78 | + border-radius: 0 0 12rpx 12rpx; | ||
| 79 | +} |
| 1 | <!--components/nav/nav.wxml--> | 1 | <!--components/nav/nav.wxml--> |
| 2 | -<view class="nav-main-space" style="height: {{statusBarHeightFull}}px;"> | ||
| 3 | - <view class="nav-main" style="background-color: {{backgroundColor}};color:{{color}};"> | 2 | +<view class="nav-main" style="background-color: {{backgroundColor}};color:{{color}};"> |
| 4 | <view class="nav" style="margin-top: {{statusBarHeight}}px;"> | 3 | <view class="nav" style="margin-top: {{statusBarHeight}}px;"> |
| 5 | <view class="flex-lr part" style="height: {{titleBarHeight}}px; line-height: {{titleBarHeight}}px"> | 4 | <view class="flex-lr part" style="height: {{titleBarHeight}}px; line-height: {{titleBarHeight}}px"> |
| 6 | <view class="opt flex-ll"> | 5 | <view class="opt flex-ll"> |
| @@ -25,4 +24,6 @@ | @@ -25,4 +24,6 @@ | ||
| 25 | 24 | ||
| 26 | </view> | 25 | </view> |
| 27 | </view> | 26 | </view> |
| 27 | +<view class="nav-main-space" style="height: {{statusBarHeightFull}}px;" wx:if="{{place}}"> | ||
| 28 | + | ||
| 28 | </view> | 29 | </view> |
| @@ -27,7 +27,7 @@ | @@ -27,7 +27,7 @@ | ||
| 27 | </block> | 27 | </block> |
| 28 | <block wx:else=""> | 28 | <block wx:else=""> |
| 29 | <block wx:if="{{item.isFull && item.isFull==1}}"> | 29 | <block wx:if="{{item.isFull && item.isFull==1}}"> |
| 30 | - <view class="room-select black-font font24r flex-cc gray">置满</view> | 30 | + <view class="room-full black-font font24r">订满</view> |
| 31 | </block> | 31 | </block> |
| 32 | <block wx:if="{{item.isorderFull && item.isorderFull==1}}"> | 32 | <block wx:if="{{item.isorderFull && item.isorderFull==1}}"> |
| 33 | <view class="room-full black-font font24r">订满</view> | 33 | <view class="room-full black-font font24r">订满</view> |
| @@ -70,7 +70,7 @@ | @@ -70,7 +70,7 @@ | ||
| 70 | <view wx:if="{{hasActivityTese && se.label_cstr}}" class="activity hasActivityTese flex-ll"> | 70 | <view wx:if="{{hasActivityTese && se.label_cstr}}" class="activity hasActivityTese flex-ll"> |
| 71 | <text class="activity-item">{{se.label_cstr}}</text> | 71 | <text class="activity-item">{{se.label_cstr}}</text> |
| 72 | </view> | 72 | </view> |
| 73 | - <view wx:if="{{(hasActivityRed && se.label_carr.length>0) || hasNewActivityList}}" class="activity flex-ll"> | 73 | + <view wx:if="{{hasActivityRed && se.label_carr.length>0}}" class="activity flex-ll"> |
| 74 | <view wx:for="{{se.label_carr}}" class="activity-item flex-vc activity-item-{{item.type}}" wx:key="selleractivitykey">{{item.name}}</view> | 74 | <view wx:for="{{se.label_carr}}" class="activity-item flex-vc activity-item-{{item.type}}" wx:key="selleractivitykey">{{item.name}}</view> |
| 75 | <view class="activity-item flex-vc activity-item-0" wx:if="{{seller.is_card==1}}">商家补贴</view> | 75 | <view class="activity-item flex-vc activity-item-0" wx:if="{{seller.is_card==1}}">商家补贴</view> |
| 76 | </view> | 76 | </view> |
| 1 | +<view class="taocan-card bg-white flex-vc"> | ||
| 2 | + <navigator url="/pages/taocan/index?sid={{item.sid}}&pid={{item.id}}" hover-class="navigator-hover" class="flex-ll taocan-main"> | ||
| 3 | + <image mode="aspectFill" | ||
| 4 | + src="{{item.main_url?item.main_url+'?imageView2/2/w/320/interlace/0/q/100':'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png'}}" class="taocan-image"></image> | ||
| 5 | + <view class="taocan-info flex-vl"> | ||
| 6 | + <view class="black-font font36r font-bold font-more" style="line-height: 50rpx;margin-bottom: 6rpx;width:100%;">{{item.name}}</view> | ||
| 7 | + <view class="gray-deep-font font28r" style="line-height: 40rpx;margin-bottom: 6rpx;">{{item.service}}</view> | ||
| 8 | + <view class="flex-ll" style="align-items: flex-end;"> | ||
| 9 | + <view class="text-orange" style="margin-right: 20rpx;"> | ||
| 10 | + <text class="font28r">¥</text> | ||
| 11 | + <text class="font40r font-bold" style="line-height: 56rpx;">{{item.sale_price}}</text> | ||
| 12 | + </view> | ||
| 13 | + <view class="text-gray" style="text-decoration:line-through;margin-bottom: 4rpx; "> | ||
| 14 | + <text class="font20r">¥</text> | ||
| 15 | + <text class="font28r" style="line-height: 40rpx;">{{item.market_price}}</text> | ||
| 16 | + </view> | ||
| 17 | + </view> | ||
| 18 | + <view class="view flex text-orange align-end" style="margin-top: 6rpx;" wx:if="{{item.discount>0}}"> | ||
| 19 | + <view class="view tag" style="margin-bottom: 6rpx;"></view> | ||
| 20 | + <view class="view margin-left-xs txt-24-h">{{item.discount}}折</view> | ||
| 21 | + </view> | ||
| 22 | + <view class="button txt-28-h text-bold flex align-center justify-center">抢购</view> | ||
| 23 | + </view> | ||
| 24 | + </navigator> | ||
| 25 | + <navigator url="./detail?id={{item.sid}}" hover-class="navigator-hover" class="taocan-seller flex-lr"> | ||
| 26 | + <view class="flex-ll"> | ||
| 27 | + <image mode="aspectFill" src="{{item.seller_image ? item.seller_image+'?imageView2/2/w/84/interlace/0/q/100' : 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png'}}" style="width: 84rpx;height: 80rpx;border-radius:6rpx;"></image> | ||
| 28 | + <view class="flex-vl seller-info"> | ||
| 29 | + <view class="font-bold font26r black-font font-more" style="line-height: 36rpx;margin-bottom: 6rpx;width:100%;">{{item.sellername}}</view> | ||
| 30 | + <view class="gray-font font24r font-more" style="line-height: 34rpx;width:100%;">{{item.map_address}}</view> | ||
| 31 | + </view> | ||
| 32 | + </view> | ||
| 33 | + <view class="more"></view> | ||
| 34 | + </navigator> | ||
| 35 | +</view> |
| 1 | +@import "../../../app.wxss"; | ||
| 2 | +@import "../../../colorui/main.wxss"; | ||
| 3 | +.taocan-card{ | ||
| 4 | + width:710rpx; | ||
| 5 | + padding: 30rpx; | ||
| 6 | + border-radius:6rpx; | ||
| 7 | + box-sizing: border-box; | ||
| 8 | + box-shadow: 0 0 8rpx 0 #E0E0E0; | ||
| 9 | + overflow: hidden; | ||
| 10 | +} | ||
| 11 | +.taocan-main{ | ||
| 12 | + width: 100%; | ||
| 13 | + margin-bottom: 20rpx; | ||
| 14 | +} | ||
| 15 | +.taocan-image{ | ||
| 16 | + width: 200rpx; | ||
| 17 | + height: 200rpx; | ||
| 18 | + background-color: #4C4E4F; | ||
| 19 | + min-width: 200rpx; | ||
| 20 | + position: relative; | ||
| 21 | + border-radius: 10rpx; | ||
| 22 | +} | ||
| 23 | +.taocan-info{ | ||
| 24 | + width: 450rpx; | ||
| 25 | + height: 200rpx; | ||
| 26 | + padding-left: 30rpx; | ||
| 27 | + box-sizing: border-box; | ||
| 28 | + position: relative; | ||
| 29 | +} | ||
| 30 | +.tag{ | ||
| 31 | + width: 22rpx; | ||
| 32 | + height: 22rpx; | ||
| 33 | + background-image: url("http://nosqn.colorcun.com/taocan/1%20%281%29.png"); | ||
| 34 | +} | ||
| 35 | +.button{ | ||
| 36 | + position: absolute; | ||
| 37 | + right: 0; | ||
| 38 | + bottom: 0; | ||
| 39 | + width: 124rpx; | ||
| 40 | + height: 56rpx; | ||
| 41 | + border-radius: 28rpx; | ||
| 42 | + background: linear-gradient(#F98E47,#F05522); | ||
| 43 | + color: #ffffff; | ||
| 44 | +} | ||
| 45 | +.taocan-seller{ | ||
| 46 | + width: 100%; | ||
| 47 | + padding: 20rpx; | ||
| 48 | + box-sizing: border-box; | ||
| 49 | + background:#F8F8F8; | ||
| 50 | + border-radius:10rpx; | ||
| 51 | +} | ||
| 52 | +.seller-info{ | ||
| 53 | + width: 496rpx; | ||
| 54 | + padding-left: 20rpx; | ||
| 55 | + box-sizing: border-box; | ||
| 56 | + position: relative; | ||
| 57 | +} |
| @@ -137,7 +137,8 @@ Page({ | @@ -137,7 +137,8 @@ Page({ | ||
| 137 | fromid:getApp().openid, | 137 | fromid:getApp().openid, |
| 138 | hasSellerShare:1, | 138 | hasSellerShare:1, |
| 139 | hasInvitation:1, | 139 | hasInvitation:1, |
| 140 | - },'/pages/customer/index') | 140 | + },'/pages/customer/index'); |
| 141 | + console.log(path,'yyyyyyy') | ||
| 141 | return { | 142 | return { |
| 142 | title: this.data.tpls[this.data.current].shareFirstTitle, | 143 | title: this.data.tpls[this.data.current].shareFirstTitle, |
| 143 | path: path, | 144 | path: path, |
| @@ -178,5 +179,11 @@ Page({ | @@ -178,5 +179,11 @@ Page({ | ||
| 178 | url: '/pack-book/pages/book/b_detail?id=' + this.detail.id | 179 | url: '/pack-book/pages/book/b_detail?id=' + this.detail.id |
| 179 | }); | 180 | }); |
| 180 | } | 181 | } |
| 181 | - } | 182 | + }, |
| 183 | + tolist(){ | ||
| 184 | + wx.navigateTo({ | ||
| 185 | + url:'./coupon' | ||
| 186 | + }) | ||
| 187 | + }, | ||
| 188 | + | ||
| 182 | }) | 189 | }) |
| @@ -36,6 +36,14 @@ | @@ -36,6 +36,14 @@ | ||
| 36 | <userinfo-share binduserinfo="share" class="share Semibold"> | 36 | <userinfo-share binduserinfo="share" class="share Semibold"> |
| 37 | 通知客户 | 37 | 通知客户 |
| 38 | </userinfo-share> | 38 | </userinfo-share> |
| 39 | + <!-- <view class="white-font font28r smooth reminder" bindtap="tolist"> | ||
| 40 | + <view class="angel"></view> | ||
| 41 | + <view class="rect"></view> | ||
| 42 | + <view class="reminder-content flex-vc"> | ||
| 43 | + <view style="color:#EFEEFF;margin-bottom: 6rpx;" class="font26r">共赠送5张优惠券</view> | ||
| 44 | + <view style="color:#794F28;" class="Semibold">点击查看</view> | ||
| 45 | + </view> | ||
| 46 | + </view> --> | ||
| 39 | </view> | 47 | </view> |
| 40 | <!--//商务--> | 48 | <!--//商务--> |
| 41 | <template name="tpl-1"> | 49 | <template name="tpl-1"> |
| @@ -97,4 +97,41 @@ image{ | @@ -97,4 +97,41 @@ image{ | ||
| 97 | width: 70%; | 97 | width: 70%; |
| 98 | font-size: 36rpx; | 98 | font-size: 36rpx; |
| 99 | color: #794F28; | 99 | color: #794F28; |
| 100 | +} | ||
| 101 | +.reminder{ | ||
| 102 | + width: 260rpx; | ||
| 103 | + position: absolute; | ||
| 104 | + right: 15%; | ||
| 105 | + bottom:130rpx; | ||
| 106 | +} | ||
| 107 | +.reminder-content{ | ||
| 108 | + width: 100%; | ||
| 109 | + padding: 20rpx 0; | ||
| 110 | + border-radius: 8rpx; | ||
| 111 | + background: #222222; | ||
| 112 | + line-height:1.4; | ||
| 113 | + box-shadow: 0 0 8rpx 0 #000000; | ||
| 114 | +} | ||
| 115 | +.angel{ | ||
| 116 | + width: 24rpx; | ||
| 117 | + height: 24rpx; | ||
| 118 | + position: absolute; | ||
| 119 | + top: 102rpx; | ||
| 120 | + left: 0; | ||
| 121 | + right: 0; | ||
| 122 | + background: #222222; | ||
| 123 | + box-shadow: 0 0 8rpx 0 #000000; | ||
| 124 | + margin: 0 auto; | ||
| 125 | + transform: rotate(45deg); | ||
| 126 | + border-radius: 2rpx; | ||
| 127 | +} | ||
| 128 | +.rect{ | ||
| 129 | + width: 60rpx; | ||
| 130 | + height: 20rpx; | ||
| 131 | + position: absolute; | ||
| 132 | + bottom: 0; | ||
| 133 | + left: 0; | ||
| 134 | + right: 0; | ||
| 135 | + background: #222222; | ||
| 136 | + margin: 0 auto; | ||
| 100 | } | 137 | } |
pack-checkout/pages/use.js
0 → 100644
| 1 | +import util from '../../utils/util'; | ||
| 2 | +import App from '../../utils/api'; | ||
| 3 | +Page({ | ||
| 4 | + onLoad(opt){ | ||
| 5 | + console.log(opt); | ||
| 6 | + let query=decodeURIComponent(opt.scene); | ||
| 7 | + console.log(query) | ||
| 8 | + query.split('&').forEach(q=>{ | ||
| 9 | + let _q=q.split('='); | ||
| 10 | + opt[_q[0]]=_q[1]; | ||
| 11 | + }) | ||
| 12 | + this.opt=opt; | ||
| 13 | + }, | ||
| 14 | + checkout(){ | ||
| 15 | + App.Activity.SetActivityStatus(this.opt).then((json)=>{ | ||
| 16 | + if(json.ret==200){ | ||
| 17 | + wx.showToast({ | ||
| 18 | + title:'已核销', | ||
| 19 | + duration:2000, | ||
| 20 | + mask:true, | ||
| 21 | + | ||
| 22 | + }) | ||
| 23 | + } | ||
| 24 | + }) | ||
| 25 | + } | ||
| 26 | +}) |
pack-checkout/pages/use.json
0 → 100644
pack-checkout/pages/use.wxml
0 → 100644
| 1 | +<nav>核销优惠券</nav> | ||
| 2 | +<view class="flex-vc" style="padding-top: 180rpx;line-height: 1.4;"> | ||
| 3 | + <view class="black-font font40r font-bold" style="margin-bottom: 10rpx;">优惠券一旦核销,将不能再使用</view> | ||
| 4 | + <view class="black-font font40r font-bold">核销前请与客户确认</view> | ||
| 5 | + <view class="white-font font32r flex-cc use-button" bindtap="checkout">核销</view> | ||
| 6 | + <navigator open-type="exit" target="miniProgram" class="green-font font36r smooth know-button flex-cc">退出</navigator> | ||
| 7 | +</view> |
pack-checkout/pages/use.wxss
0 → 100644
pages/customer/care.js
0 → 100644
pages/customer/care.json
0 → 100644
| 1 | +{} |
pages/customer/care.wxml
0 → 100644
| 1 | +<web-view src="https://xt04.colorcun.com/tarnsfer.html" bindload="getdata"></web-view> |
pages/customer/care.wxss
0 → 100644
| @@ -25,6 +25,8 @@ Page({ | @@ -25,6 +25,8 @@ Page({ | ||
| 25 | options: {tplid: ''}, | 25 | options: {tplid: ''}, |
| 26 | hasOwner: true,//是否为发起人 | 26 | hasOwner: true,//是否为发起人 |
| 27 | animation: 'animation', | 27 | animation: 'animation', |
| 28 | + couponhidden:false, | ||
| 29 | + getcoupon:false | ||
| 28 | }, | 30 | }, |
| 29 | id: null, | 31 | id: null, |
| 30 | msgTpl:'', | 32 | msgTpl:'', |
| @@ -39,6 +41,7 @@ Page({ | @@ -39,6 +41,7 @@ Page({ | ||
| 39 | } | 41 | } |
| 40 | param.tpls=[TP.tpls(options.tplid)] | 42 | param.tpls=[TP.tpls(options.tplid)] |
| 41 | this.setData(param) | 43 | this.setData(param) |
| 44 | + this.getactivity(); | ||
| 42 | mta.Page.init({ | 45 | mta.Page.init({ |
| 43 | "appID": "500667280", | 46 | "appID": "500667280", |
| 44 | "eventID": "500667287", | 47 | "eventID": "500667287", |
| @@ -308,4 +311,76 @@ Page({ | @@ -308,4 +311,76 @@ Page({ | ||
| 308 | url: '/pages/reserve/index' | 311 | url: '/pages/reserve/index' |
| 309 | }) | 312 | }) |
| 310 | }, | 313 | }, |
| 314 | + load(e){ | ||
| 315 | + console.log(e,'care') | ||
| 316 | + }, | ||
| 317 | + setcoupon(){ | ||
| 318 | + if(this.data.list && this.data.list.length>0){ | ||
| 319 | + let list=this.data.list,liststr=[]; | ||
| 320 | + list.forEach((v,i)=>{ | ||
| 321 | + liststr.push(v.id); | ||
| 322 | + }) | ||
| 323 | + App.Activity.SetActivityAsReserve({aid:liststr.toString()}).then((json)=>{ | ||
| 324 | + if(json.ret==200){ | ||
| 325 | + this.setData({ | ||
| 326 | + getcoupon:true | ||
| 327 | + }) | ||
| 328 | + } | ||
| 329 | + }) | ||
| 330 | + } | ||
| 331 | + }, | ||
| 332 | + tohref(){ | ||
| 333 | + let systemInfo = wx.getSystemInfoSync(); | ||
| 334 | + let reg = /ios/i; | ||
| 335 | + if(reg.test(systemInfo.system)){ | ||
| 336 | + wx.showModal({ | ||
| 337 | + content:'关注"周到安排"公众号,及时获取更多优惠信息', | ||
| 338 | + comfirmText:'去关注', | ||
| 339 | + comfirmColor:'#5EB2FF', | ||
| 340 | + cancelText:'取消', | ||
| 341 | + cancelColor:'#999999', | ||
| 342 | + success:(res)=>{ | ||
| 343 | + if(res.confirm){ | ||
| 344 | + wx.setClipboardData({ | ||
| 345 | + data: '周到安排', | ||
| 346 | + success (res) { | ||
| 347 | + wx.getClipboardData({ | ||
| 348 | + success (res) { | ||
| 349 | + console.log(res.data) // data | ||
| 350 | + } | ||
| 351 | + }) | ||
| 352 | + } | ||
| 353 | + }) | ||
| 354 | + } | ||
| 355 | + } | ||
| 356 | + }) | ||
| 357 | + }else{ | ||
| 358 | + wx.navigateTo({ | ||
| 359 | + url:'./care' | ||
| 360 | + }) | ||
| 361 | + } | ||
| 362 | + | ||
| 363 | + }, | ||
| 364 | + getactivity(){ | ||
| 365 | + App.Activity.GetActivityByRid({rid:this.id}).then((json)=>{ | ||
| 366 | + if(json.ret==200){ | ||
| 367 | + console.log(json.data); | ||
| 368 | + this.setData({ | ||
| 369 | + list:json.data | ||
| 370 | + }) | ||
| 371 | + } | ||
| 372 | + }) | ||
| 373 | + }, | ||
| 374 | + todetail(e){ | ||
| 375 | + let aid=e.currentTarget.dataset.id; | ||
| 376 | + console.log(aid) | ||
| 377 | + wx.navigateTo({ | ||
| 378 | + url:'../me/coupon_detail?aid='+aid | ||
| 379 | + }) | ||
| 380 | + }, | ||
| 381 | + close(){ | ||
| 382 | + this.setData({ | ||
| 383 | + couponhidden:true, | ||
| 384 | + }) | ||
| 385 | + }, | ||
| 311 | }) | 386 | }) |
| 1 | <!--pages/customer/detail_owner.wxml--> | 1 | <!--pages/customer/detail_owner.wxml--> |
| 2 | +<wxs src="../../utils/util.wxs" module="util" /> | ||
| 2 | <import src="../tpl/invitation"></import> | 3 | <import src="../tpl/invitation"></import> |
| 3 | <nav backgroundColor="rgba(0,0,0,0)" hasHome style="position: fixed;z-index: 1;" class="navhome"> | 4 | <nav backgroundColor="rgba(0,0,0,0)" hasHome style="position: fixed;z-index: 1;" class="navhome"> |
| 4 | <!-- | 5 | <!-- |
| @@ -65,3 +66,57 @@ | @@ -65,3 +66,57 @@ | ||
| 65 | </template> | 66 | </template> |
| 66 | <ddate id="ddate" order="{{detail}}" wx:if="{{detail}}" bindevent="ddateEvent"></ddate> | 67 | <ddate id="ddate" order="{{detail}}" wx:if="{{detail}}" bindevent="ddateEvent"></ddate> |
| 67 | <a2l bindshow="a2lshow" bindhide="a2lshow" key="INVIT-OWNER"></a2l> | 68 | <a2l bindshow="a2lshow" bindhide="a2lshow" key="INVIT-OWNER"></a2l> |
| 69 | + | ||
| 70 | +<view class="coupon" wx:if="{{list && list.length>0}}" hidden="{{couponhidden}}" bindtap="close"> | ||
| 71 | + <view class="coupon-content flex-vc" style="margin-top: -{{360+(list.length>2 ? 180 : 75*list.length+1)}}rpx;"> | ||
| 72 | + <view class="coupon-bg"></view> | ||
| 73 | + <view class="coupon-info"> | ||
| 74 | + <view class="coupon-header flex-vc"> | ||
| 75 | + <view class="font-bold">恭喜您获得</view> | ||
| 76 | + <view class="font32r">{{list.length}}张代金券</view> | ||
| 77 | + </view> | ||
| 78 | + <view class="coupon-list"> | ||
| 79 | + <view class="coupon-single flex-ll bg-white" wx:for="{{list}}"> | ||
| 80 | + <view class="flex-vl coupon-main" style="justify-content: center;"> | ||
| 81 | + <view class="font36r font-bold" style="color:#E84033;">{{item.aname}}</view> | ||
| 82 | + <view class="gray-font font20r">有效期至{{util.unixtoTime(item.etime,'YYYY.MM.DD HH:II')}}</view> | ||
| 83 | + </view> | ||
| 84 | + <view class="flex-vc coupon-border"> | ||
| 85 | + <view class="circle circle-bottom bg-white"></view> | ||
| 86 | + <view class="coupon-line"></view> | ||
| 87 | + <view class="circle circle-top bg-white"></view> | ||
| 88 | + </view> | ||
| 89 | + <block wx:if="{{getcoupon}}"> | ||
| 90 | + <view class="flex-cc" style="padding-right: 15rpx;" data-id="{{item.id}}" catchtap="todetail"> | ||
| 91 | + <view class="use-button flex-cc font20r">去使用</view> | ||
| 92 | + </view> | ||
| 93 | + </block> | ||
| 94 | + <block wx:else> | ||
| 95 | + <userinfo binduserinfo="setcoupon"> | ||
| 96 | + <view class="flex-cc" style="padding-right: 15rpx;"> | ||
| 97 | + <view class="use-button flex-cc font20r">领取</view> | ||
| 98 | + </view> | ||
| 99 | + </userinfo> | ||
| 100 | + </block> | ||
| 101 | + </view> | ||
| 102 | + </view> | ||
| 103 | + <block wx:if="{{getcoupon}}"> | ||
| 104 | + <view class="coupon-button font24r smooth white-font flex-cc" catchtap="tohref"> | ||
| 105 | + <view style="position: relative;z-index: 0;">在我的-卡券中可查看,<text style="color:#FFC807;">前往查看</text></view> | ||
| 106 | + </view> | ||
| 107 | + </block> | ||
| 108 | + <block wx:else> | ||
| 109 | + <userinfo binduserinfo="setcoupon"> | ||
| 110 | + <view class="coupon-button font32r smooth white-font flex-cc get-button font-bold">立即领取</view> | ||
| 111 | + </userinfo> | ||
| 112 | + | ||
| 113 | + </block> | ||
| 114 | + | ||
| 115 | + <!-- <official-account class="care flex-ll" bindload="load"></official-account> --> | ||
| 116 | + </view> | ||
| 117 | + <view class="" style="padding: 20rpx;position: relative;top: -94rpx;" catchtap="close"> | ||
| 118 | + <image src="http://nosqn.colorcun.com/book-close.png" style="width: 60rpx;height: 60rpx;"></image> | ||
| 119 | + </view> | ||
| 120 | + </view> | ||
| 121 | +</view> | ||
| 122 | + |
| @@ -151,4 +151,118 @@ image{ | @@ -151,4 +151,118 @@ image{ | ||
| 151 | background-size: 100% 100%; | 151 | background-size: 100% 100%; |
| 152 | width:36rpx; | 152 | width:36rpx; |
| 153 | height:36rpx; | 153 | height:36rpx; |
| 154 | -} | ||
| 154 | +} | ||
| 155 | +.coupon{ | ||
| 156 | + position: fixed; | ||
| 157 | + left: 0; | ||
| 158 | + right: 0; | ||
| 159 | + top: 0; | ||
| 160 | + bottom: 0; | ||
| 161 | + background: rgba(0,0,0,.5); | ||
| 162 | +} | ||
| 163 | +.coupon-content{ | ||
| 164 | + width: 658rpx; | ||
| 165 | + position: absolute; | ||
| 166 | + left: 0; | ||
| 167 | + right: 0; | ||
| 168 | + top: 50%; | ||
| 169 | + margin: auto; | ||
| 170 | +} | ||
| 171 | +.coupon-bg{ | ||
| 172 | + width: 658rpx; | ||
| 173 | + height: 468rpx; | ||
| 174 | + background: url(http://nosqn.colorcun.com/coupon.jpg) center center no-repeat; | ||
| 175 | + background-size:contain; | ||
| 176 | +} | ||
| 177 | +.coupon-info{ | ||
| 178 | + width: 502rpx; | ||
| 179 | + border-radius: 20rpx; | ||
| 180 | + overflow: hidden; | ||
| 181 | + background: #F65636; | ||
| 182 | + position: relative; | ||
| 183 | + top: -152rpx; | ||
| 184 | + margin: 0 auto; | ||
| 185 | +} | ||
| 186 | +.coupon-header{ | ||
| 187 | + width: 100%; | ||
| 188 | + height: 152rpx; | ||
| 189 | +} | ||
| 190 | +.coupon-header>view:first-child{ | ||
| 191 | + font-size: 48rpx; | ||
| 192 | +} | ||
| 193 | +.coupon-header>view{ | ||
| 194 | + background: linear-gradient(to bottom, #FFFFFF, #FAECA5); | ||
| 195 | + -webkit-background-clip: text; | ||
| 196 | + line-height: 1.4; | ||
| 197 | + -webkit-text-fill-color: transparent; | ||
| 198 | +} | ||
| 199 | +.coupon-button{ | ||
| 200 | + width: 100%; | ||
| 201 | + padding: 20rpx 0; | ||
| 202 | + line-height: 34rpx; | ||
| 203 | + position: relative; | ||
| 204 | +} | ||
| 205 | +.coupon-list{ | ||
| 206 | + width: 502rpx; | ||
| 207 | + max-height: 360rpx; | ||
| 208 | + overflow-y: scroll; | ||
| 209 | +} | ||
| 210 | +.coupon-single{ | ||
| 211 | + width: 452rpx; | ||
| 212 | + height: 134rpx; | ||
| 213 | + border-radius: 20rpx; | ||
| 214 | + line-height: 1.4; | ||
| 215 | + margin:0 auto 16rpx; | ||
| 216 | + background: #FFFFFF; | ||
| 217 | +} | ||
| 218 | +.coupon-main{ | ||
| 219 | + width: 310rpx; | ||
| 220 | + height: 100%; | ||
| 221 | + padding-left: 30rpx; | ||
| 222 | + box-sizing: border-box; | ||
| 223 | +} | ||
| 224 | +.coupon-border{ | ||
| 225 | + width: 32rpx; | ||
| 226 | + height: 100%; | ||
| 227 | +} | ||
| 228 | +.circle{ | ||
| 229 | + width: 20rpx; | ||
| 230 | + height: 10rpx; | ||
| 231 | + background: #F65636; | ||
| 232 | + border:2rpx solid #F65636; | ||
| 233 | +} | ||
| 234 | +.circle-top{ | ||
| 235 | + border-radius: 10rpx 10rpx 0 0; | ||
| 236 | +} | ||
| 237 | +.coupon-line{ | ||
| 238 | + width: 2rpx; | ||
| 239 | + height: 114rpx; | ||
| 240 | + background: rgba(246,86,54,.2); | ||
| 241 | +} | ||
| 242 | +.circle-bottom{ | ||
| 243 | + border-radius: 0 0 10rpx 10rpx; | ||
| 244 | +} | ||
| 245 | +.use-button{ | ||
| 246 | + width: 92rpx; | ||
| 247 | + height: 44rpx; | ||
| 248 | + border-radius: 22rpx; | ||
| 249 | + background: #E84033; | ||
| 250 | + color: #FFFFFF; | ||
| 251 | +} | ||
| 252 | +::-webkit-scrollbar { | ||
| 253 | + display: none; /* Chrome Safari */ | ||
| 254 | +} | ||
| 255 | +.care{ | ||
| 256 | + width: 380px; | ||
| 257 | + height: 84px; | ||
| 258 | + /* position: absolute; | ||
| 259 | + left: 0; | ||
| 260 | + top: 0; */ | ||
| 261 | + /* padding-left: 100rpx; */ | ||
| 262 | + box-sizing: border-box; | ||
| 263 | + background: #E84033; | ||
| 264 | +} | ||
| 265 | +.get-button{ | ||
| 266 | + background: transparent; | ||
| 267 | + padding: 30rpx 0; | ||
| 268 | +} |
pages/customer/tarnsfer.html
0 → 100644
| 1 | +<!DOCTYPE html> | ||
| 2 | +<html> | ||
| 3 | + <head> | ||
| 4 | + <meta charset="utf-8"> | ||
| 5 | + <title></title> | ||
| 6 | + <script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script> | ||
| 7 | + <script> | ||
| 8 | + var storage = window.sessionStorage,num=1; | ||
| 9 | + if(storage.getItem("num")){ | ||
| 10 | + num=storage.getItem("num")+1; | ||
| 11 | + } | ||
| 12 | + storage.setItem('num', num); | ||
| 13 | + if(storage.getItem("num")==1){ | ||
| 14 | + window.location.href="https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzU1MTE4Njc4OQ==#wechat_redirect"; | ||
| 15 | + }else{ | ||
| 16 | + storage.removeItem("num"); | ||
| 17 | + wx.miniProgram.navigateBack(); | ||
| 18 | + } | ||
| 19 | + | ||
| 20 | + </script> | ||
| 21 | + </head> | ||
| 22 | + <body> | ||
| 23 | + </body> | ||
| 24 | +</html> |
pages/me/coupon.js
0 → 100644
| 1 | +import util from '../../utils/util'; | ||
| 2 | +import App from '../../utils/api'; | ||
| 3 | +Page({ | ||
| 4 | + onLoad(){ | ||
| 5 | + this.init(); | ||
| 6 | + this.getlist(); | ||
| 7 | + }, | ||
| 8 | + getlist(){ | ||
| 9 | + App.Activity.ActivityListByOpenid().then((json)=>{ | ||
| 10 | + console.log(json); | ||
| 11 | + if(json.ret==200){ | ||
| 12 | + this.setData({ | ||
| 13 | + list:json.data | ||
| 14 | + }) | ||
| 15 | + } | ||
| 16 | + }) | ||
| 17 | + }, | ||
| 18 | + init(){ | ||
| 19 | + let systemInfo = wx.getSystemInfoSync(); | ||
| 20 | + let reg = /ios/i; | ||
| 21 | + let pt = 20;//导航状态栏上内边距 | ||
| 22 | + let h = 44;//导航状态栏高度 | ||
| 23 | + if(reg.test(systemInfo.system)){ | ||
| 24 | + pt = systemInfo.statusBarHeight; | ||
| 25 | + h = 44; | ||
| 26 | + }else{ | ||
| 27 | + pt = systemInfo.statusBarHeight; | ||
| 28 | + h = 48; | ||
| 29 | + } | ||
| 30 | + this.setData({ | ||
| 31 | + contentHeight:systemInfo.windowHeight-pt-h | ||
| 32 | + }) | ||
| 33 | + }, | ||
| 34 | + getnext(){ | ||
| 35 | + | ||
| 36 | + }, | ||
| 37 | + toused(){ | ||
| 38 | + wx.navigateTo({ | ||
| 39 | + url:'./used' | ||
| 40 | + }) | ||
| 41 | + } | ||
| 42 | +}) |
pages/me/coupon.json
0 → 100644
pages/me/coupon.wxml
0 → 100644
| 1 | +<nav>优惠券</nav> | ||
| 2 | +<scroll-view class="list" style="height:{{contentHeight}}px;padding-bottom: 140rpx;" bindscrolltolower="getnext" scroll-y> | ||
| 3 | + <!-- <view class="flex-rr"> | ||
| 4 | + <view class="flex-rr select-all font28r smooth"> | ||
| 5 | + <block wx:if="{{selectall}}"> | ||
| 6 | + <icon class="icon-box-img" type="success" size="30rpx" color="#ECD9B7"></icon> | ||
| 7 | + </block> | ||
| 8 | + <block wx:else> | ||
| 9 | + <view class="circle"></view> | ||
| 10 | + </block> | ||
| 11 | + <view style="color:#ECD9B7;padding-left: 8rpx;">全选</view> | ||
| 12 | + </view> | ||
| 13 | + </view> --> | ||
| 14 | + <block wx:for="{{list}}"> | ||
| 15 | + <coupon item="{{item}}" role="custom"></coupon> | ||
| 16 | + </block> | ||
| 17 | + | ||
| 18 | +</scroll-view> | ||
| 19 | +<view class="card-used flex-cc bg-white gray-font font32r" bindtap="toused">查看卡券历史记录<view class="more" style="margin-left: 20rpx;"></view></view> |
pages/me/coupon.wxss
0 → 100644
| 1 | +.list{ | ||
| 2 | + width: 100%; | ||
| 3 | + padding-top: 20rpx; | ||
| 4 | + box-sizing: border-box; | ||
| 5 | +} | ||
| 6 | +.select-all{ | ||
| 7 | + width: 200rpx; | ||
| 8 | + padding:30rpx 20rpx; | ||
| 9 | + box-sizing: border-box; | ||
| 10 | +} | ||
| 11 | +.circle{ | ||
| 12 | + width: 30rpx; | ||
| 13 | + height: 30rpx; | ||
| 14 | + border:2rpx solid #ECD9B7; | ||
| 15 | + border-radius: 50%; | ||
| 16 | + box-sizing: border-box; | ||
| 17 | +} | ||
| 18 | +.card-used{ | ||
| 19 | + width: 100%; | ||
| 20 | + height: 120rpx; | ||
| 21 | + box-shadow: 0 0 8rpx #EEF0F2; | ||
| 22 | + background: #FFFFFF; | ||
| 23 | + position: fixed; | ||
| 24 | + left: 0; | ||
| 25 | + bottom: 0; | ||
| 26 | +} |
pages/me/coupon_detail.js
0 → 100644
| 1 | +import util from '../../utils/util'; | ||
| 2 | +import App from '../../utils/api'; | ||
| 3 | +Page({ | ||
| 4 | + data:{ | ||
| 5 | + statuslist:{ | ||
| 6 | + 0:{ | ||
| 7 | + status:'待使用' | ||
| 8 | + }, | ||
| 9 | + 1:{ | ||
| 10 | + status:'已核销' | ||
| 11 | + }, | ||
| 12 | + } | ||
| 13 | + }, | ||
| 14 | + onLoad(opt){ | ||
| 15 | + this.opt=opt; | ||
| 16 | + this.getdetail(); | ||
| 17 | + }, | ||
| 18 | + getdetail(){ | ||
| 19 | + App.Activity.ActivityListByOpenid({aid:this.opt.aid}).then((json)=>{ | ||
| 20 | + console.log(json); | ||
| 21 | + if(json.ret==200){ | ||
| 22 | + this.setData({ | ||
| 23 | + couponinfo:json.data[0] | ||
| 24 | + }) | ||
| 25 | + if(!this.data.couponinfo.qrcode){ | ||
| 26 | + this.getcode(); | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + } | ||
| 30 | + }) | ||
| 31 | + }, | ||
| 32 | + clickSeller(){ | ||
| 33 | + let seller_tel=this.data.couponinfo.seller_tel||this.data.couponinfo.phone | ||
| 34 | + if(typeof seller_tel=='string'){ | ||
| 35 | + seller_tel=seller_tel.split(',') | ||
| 36 | + } | ||
| 37 | + this.selectComponent('#as').show({ | ||
| 38 | + seller_tel:seller_tel, | ||
| 39 | + }); | ||
| 40 | + }, | ||
| 41 | + getcode(){ | ||
| 42 | + App.Activity.UseCreateQrcode({aid:this.opt.aid}).then((json)=>{ | ||
| 43 | + console.log(json) | ||
| 44 | + if(json.ret==200){ | ||
| 45 | + this.setData({ | ||
| 46 | + 'couponinfo.qrcode':json.data | ||
| 47 | + }) | ||
| 48 | + } | ||
| 49 | + }) | ||
| 50 | + } | ||
| 51 | +}) |
pages/me/coupon_detail.json
0 → 100644
pages/me/coupon_detail.wxml
0 → 100644
| 1 | +<!--pages/taocan/detail.wxml--> | ||
| 2 | +<wxs src="../../utils/util.wxs" module="util" /> | ||
| 3 | +<view class="view bg-blue-img"></view> | ||
| 4 | +<nav hasHome backgroundColor="rgba(0,0,0,0)" color="#ffffff"></nav> | ||
| 5 | +<view class="view padding-lr padding-bottom-lg" style="position: relative"> | ||
| 6 | + <view class="text-white txt-40-h text-bold margin-top-sm">卡券{{statuslist[couponinfo.status].status}}</view> | ||
| 7 | + <view class="text-white txt-28-h margin-bottom-lg" style="margin-top: 6rpx;">感谢您的支持,请您按尽快来店就餐哦</view> | ||
| 8 | + <view class="view flex flex-direction justify-center align-center margin-top-lg bg-white code-cover"> | ||
| 9 | + <view class="header view flex align-center" bindtap="clickSeller"> | ||
| 10 | + <view class="view avatar margin-right-sm" style="background-image: url('{{order_info.seller_image}}?imageView2/2/w/320')"></view> | ||
| 11 | + <view class="flex-treble" style="width: 450rpx;"> | ||
| 12 | + <view class="txt-32-h text-cut text-bold" style="margin-bottom: 2rpx;">{{couponinfo.sellername}}</view> | ||
| 13 | + <view class="txt-24-h text-gray text-cut">{{couponinfo.real_address||couponinfo.address}}</view> | ||
| 14 | + </view> | ||
| 15 | + <view class="phone view"></view> | ||
| 16 | + </view> | ||
| 17 | + <view class="text-bold txt-36-h">{{couponinfo.aname}}</view> | ||
| 18 | + <block wx:if="{{couponinfo.qrcode}}"> | ||
| 19 | + <image src="{{couponinfo.qrcode}}" | ||
| 20 | + class="margin-tb-lg" | ||
| 21 | + mode="heightFix" style="height: 340rpx;max-width: 365rpx;" ></image> | ||
| 22 | + </block> | ||
| 23 | + <block wx:else> | ||
| 24 | + <image src="" | ||
| 25 | + class="margin-tb-lg" | ||
| 26 | + mode="heightFix" style="height: 340rpx;max-width: 365rpx;" ></image> | ||
| 27 | + </block> | ||
| 28 | + | ||
| 29 | + <view class="text-bold txt-30-h text-blue">请将此码出示给店员</view> | ||
| 30 | + </view> | ||
| 31 | + <navigator url="/pages/reserve/reserve?id={{couponinfo.sellerid}}&activeTab=reserve"> | ||
| 32 | + <view class="view card flex margin-tb-sm padding-lg justify-between"> | ||
| 33 | + <view class="view text-bold txt-32-h">您还可以预订包间</view> | ||
| 34 | + <view class="view bg-blue-blue round text-bold" style="padding: 8rpx 20rpx;">订包间</view> | ||
| 35 | + </view> | ||
| 36 | + </navigator> | ||
| 37 | + <view class="view card"> | ||
| 38 | + <view class="txt-30-h padding solid-bottom text-bold">使用须知</view> | ||
| 39 | + <view class="view padding block"> | ||
| 40 | + <view class="flex align-center margin-bottom-sm"> | ||
| 41 | + <view class="dot"></view> | ||
| 42 | + <view class="txt-30-h text-bold">有效期</view> | ||
| 43 | + </view> | ||
| 44 | + <view class="text-df">{{util.unixtoTime(couponinfo.stime,'YYYY.MM.DD')}}-{{util.unixtoTime(couponinfo.etime,'YYYY.MM.DD HH:II')}}</view> | ||
| 45 | + </view> | ||
| 46 | + <view class="view padding block"> | ||
| 47 | + <view class="flex align-center margin-bottom-sm"> | ||
| 48 | + <view class="dot"></view> | ||
| 49 | + <view class="txt-30-h text-bold">使用时间</view> | ||
| 50 | + </view> | ||
| 51 | + <view class="text-df">{{couponinfo.use_time}}</view> | ||
| 52 | + </view> | ||
| 53 | + <view class="view padding block padding-bottom-sm"> | ||
| 54 | + <view class="flex align-center margin-bottom-sm"> | ||
| 55 | + <view class="dot"></view> | ||
| 56 | + <view class="txt-30-h text-bold">使用规则</view> | ||
| 57 | + </view> | ||
| 58 | + <view class="text-df"> | ||
| 59 | + <text style="line-height: 40rpx;">{{couponinfo.explain}}</text> | ||
| 60 | + </view> | ||
| 61 | + <!-- <view class="flex justify-center align-center rule margin-top-sm margin-bottom-sm" bindtap="toggleRule"> | ||
| 62 | + <view class="txt-28-h">{{hasShowRule?'收起':'展开更多'}}</view> | ||
| 63 | + <view class="view icon {{hasShowRule?'show':''}}"></view> | ||
| 64 | + </view> --> | ||
| 65 | + </view> | ||
| 66 | + </view> | ||
| 67 | + <!-- <view class="view card margin-top-sm padding-bottom-xs"> | ||
| 68 | + <view class="padding solid-bottom flex justify-between"> | ||
| 69 | + <view class="txt-30-h text-bold">订单信息</view> | ||
| 70 | + <chatbot params="{{({act:'taocan',id:order_info.id,...order_tips})}}" wx:if="{{order_tips.optbut}}"> | ||
| 71 | + <view class="text-df order-opt-but order-opt-but{{order_info.status}} flex align-center justify-center"> | ||
| 72 | + {{order_tips.optbut}} | ||
| 73 | + </view> | ||
| 74 | + </chatbot> | ||
| 75 | + | ||
| 76 | + </view> | ||
| 77 | + <view class="view padding padding-lr-lg flex justify-between"> | ||
| 78 | + <view class="text-gray txt-28-h">商品总价</view> | ||
| 79 | + <view class="txt-28-h">¥{{order_info.price}}</view> | ||
| 80 | + </view> | ||
| 81 | + <view class="view padding-bottom padding-lr-lg flex justify-between"> | ||
| 82 | + <view class="text-gray txt-28-h">实际付款</view> | ||
| 83 | + <view class="txt-28-h">¥{{order_info.should_price}}</view> | ||
| 84 | + </view> | ||
| 85 | + <navigator url="/pages/taocan/orderHis?id={{order_info.id}}"> | ||
| 86 | + <view class="view padding-bottom padding-lr-lg flex justify-between"> | ||
| 87 | + <view class="text-gray txt-28-h">交易快照</view> | ||
| 88 | + <view class="view txt-28-h flex-treble flex align-center justify-end"> | ||
| 89 | + <view class="padding-right-sm">发生交易纠纷时,可作为判断依据</view> | ||
| 90 | + <view class="more"></view> | ||
| 91 | + </view> | ||
| 92 | + </view> | ||
| 93 | + </navigator> | ||
| 94 | + <view class="view padding-bottom padding-lr-lg flex justify-between"> | ||
| 95 | + <view class="text-gray txt-28-h">订单编号</view> | ||
| 96 | + <view class="txt-28-h">{{order_info.order_no}}</view> | ||
| 97 | + </view> | ||
| 98 | + <view class="view padding-bottom padding-lr-lg flex justify-between"> | ||
| 99 | + <view class="text-gray txt-28-h">下单时间</view> | ||
| 100 | + <view class="txt-28-h">{{util.unixtoTime(order_info.pay_time,'YYYY-MM-DD HH:II:SS')}}</view> | ||
| 101 | + </view> | ||
| 102 | + <view class="view padding-bottom padding-lr-lg flex justify-between" wx:if="{{order_info.status==3}}"> | ||
| 103 | + <view class="text-gray txt-28-h">使用时间</view> | ||
| 104 | + <view class="txt-28-h">{{util.unixtoTime(order_info.use_time,'YYYY-MM-DD HH:II:SS')}}</view> | ||
| 105 | + </view> | ||
| 106 | + <view class="view padding-bottom padding-lr-lg flex justify-between" wx:if="{{order_info.status==5}}"> | ||
| 107 | + <view class="text-gray txt-28-h">退款时间</view> | ||
| 108 | + <view class="txt-28-h">{{util.unixtoTime(order_info.refund_time,'YYYY-MM-DD HH:II:SS')}}</view> | ||
| 109 | + </view> | ||
| 110 | + </view> --> | ||
| 111 | +</view> | ||
| 112 | +<as-phone id="as"></as-phone> | ||
| 113 | + |
pages/me/coupon_detail.wxss
0 → 100644
| 1 | +/* pages/taocan/detail.wxss */ | ||
| 2 | +@import "../../colorui/main.wxss"; | ||
| 3 | +.bg-blue-img{ | ||
| 4 | + height: 390rpx; | ||
| 5 | + color:#ffffff; | ||
| 6 | + position: fixed; | ||
| 7 | + top:0; | ||
| 8 | + width: 100%; | ||
| 9 | + background-image: url("http://nosqn.colorcun.com/taocan/1%20%2825%29.png"); | ||
| 10 | +} | ||
| 11 | +.code-cover{ | ||
| 12 | + width: 690rpx; | ||
| 13 | + border-radius: 10rpx; | ||
| 14 | + margin: 0 auto; | ||
| 15 | + padding: 60rpx 30rpx; | ||
| 16 | + box-shadow: 0px 0px 30rpx 0px #E5E5E5; | ||
| 17 | + box-sizing: border-box; | ||
| 18 | +} | ||
| 19 | +.header{ | ||
| 20 | + width: 100%; | ||
| 21 | + margin-bottom: 50rpx; | ||
| 22 | +} | ||
| 23 | +.avatar{ | ||
| 24 | + width: 60rpx; | ||
| 25 | + height: 60rpx; | ||
| 26 | + border-radius: 50%; | ||
| 27 | + background: #EEEEEE; | ||
| 28 | +} | ||
| 29 | +.phone{ | ||
| 30 | + width: 40rpx; | ||
| 31 | + height: 40rpx; | ||
| 32 | + background-image: url("http://nosqn.colorcun.com/taocan/1%20%2810%29.png"); | ||
| 33 | + margin-bottom: 44rpx; | ||
| 34 | +} | ||
| 35 | +.card{ | ||
| 36 | + width: 100%; | ||
| 37 | + background: #FFFFFF; | ||
| 38 | + box-shadow: 0px 0px 30rpx 0px #E5E5E5; | ||
| 39 | + border-radius: 20rpx; | ||
| 40 | +} | ||
| 41 | +.block .dot{ | ||
| 42 | + width: 8rpx; | ||
| 43 | + height: 26rpx; | ||
| 44 | + background: linear-gradient(180deg, #3BBFF5 0%, #57A0FF 100%); | ||
| 45 | + margin-right: 20rpx; | ||
| 46 | +} | ||
| 47 | +.rule .icon{ | ||
| 48 | + width: 22rpx; | ||
| 49 | + height: 12rpx; | ||
| 50 | + margin-left: 20rpx; | ||
| 51 | + background-image: url("http://nosqn.colorcun.com/taocan/1%20%285%29.png"); | ||
| 52 | +} | ||
| 53 | +.rule .icon.show{ | ||
| 54 | + background-image: url("http://nosqn.colorcun.com/taocan/1%20%286%29.png"); | ||
| 55 | +} | ||
| 56 | +.overline{ | ||
| 57 | + text-decoration: line-through; | ||
| 58 | +} | ||
| 59 | +.order-opt-but{ | ||
| 60 | + width: 136rpx; | ||
| 61 | + height: 48rpx; | ||
| 62 | + border: 2rpx solid #CCCCCC; | ||
| 63 | + color:#999999; | ||
| 64 | +} | ||
| 65 | +.order-opt-but6{ | ||
| 66 | + border: 2rpx solid #42A5FF; | ||
| 67 | + color:#42A5FF; | ||
| 68 | +} |
| @@ -19,6 +19,7 @@ Page({ | @@ -19,6 +19,7 @@ Page({ | ||
| 19 | * 生命周期函数--监听页面加载 | 19 | * 生命周期函数--监听页面加载 |
| 20 | */ | 20 | */ |
| 21 | onLoad: function (options) { | 21 | onLoad: function (options) { |
| 22 | + this.getautomenu(); | ||
| 22 | let systemInfo = wx.getSystemInfoSync(); | 23 | let systemInfo = wx.getSystemInfoSync(); |
| 23 | console.log('hahha',systemInfo,systemInfo.statusBarHeight) | 24 | console.log('hahha',systemInfo,systemInfo.statusBarHeight) |
| 24 | this.setData({ | 25 | this.setData({ |
| @@ -118,6 +119,7 @@ Page({ | @@ -118,6 +119,7 @@ Page({ | ||
| 118 | limit:1, | 119 | limit:1, |
| 119 | size:1, | 120 | size:1, |
| 120 | }).then(res=>{ | 121 | }).then(res=>{ |
| 122 | + console.log(res) | ||
| 121 | if(res.data.length>0){ | 123 | if(res.data.length>0){ |
| 122 | this.setData({ | 124 | this.setData({ |
| 123 | shownotice:true | 125 | shownotice:true |
| @@ -125,4 +127,14 @@ Page({ | @@ -125,4 +127,14 @@ Page({ | ||
| 125 | } | 127 | } |
| 126 | }) | 128 | }) |
| 127 | }, | 129 | }, |
| 130 | + getcode(){ | ||
| 131 | + wx.scanCode({ | ||
| 132 | + success:(res)=>{ | ||
| 133 | + console.log('success',res) | ||
| 134 | + }, | ||
| 135 | + fail:()=>{ | ||
| 136 | + console.log('fail') | ||
| 137 | + } | ||
| 138 | + }) | ||
| 139 | + } | ||
| 128 | }) | 140 | }) |
| @@ -31,6 +31,12 @@ | @@ -31,6 +31,12 @@ | ||
| 31 | <view class="money-title">红包</view> | 31 | <view class="money-title">红包</view> |
| 32 | </view> | 32 | </view> |
| 33 | </navigator> | 33 | </navigator> |
| 34 | + <navigator url="./coupon" class="money-item"> | ||
| 35 | + <view class="flex-vc"> | ||
| 36 | + <view class="money-value">{{user.card}}</view> | ||
| 37 | + <view class="money-title">卡券</view> | ||
| 38 | + </view> | ||
| 39 | + </navigator> | ||
| 34 | </view> | 40 | </view> |
| 35 | <view class="block-rev"> | 41 | <view class="block-rev"> |
| 36 | <navigator url="/pages/me/list" open-type="switchTab"> | 42 | <navigator url="/pages/me/list" open-type="switchTab"> |
| @@ -30,6 +30,7 @@ Page({ | @@ -30,6 +30,7 @@ Page({ | ||
| 30 | * 生命周期函数--监听页面加载 | 30 | * 生命周期函数--监听页面加载 |
| 31 | */ | 31 | */ |
| 32 | onLoad: function (options) { | 32 | onLoad: function (options) { |
| 33 | + | ||
| 33 | // if(getApp().meListType){ | 34 | // if(getApp().meListType){ |
| 34 | // this.tabType=getApp().meListType | 35 | // this.tabType=getApp().meListType |
| 35 | // this.setData({ | 36 | // this.setData({ |
| @@ -119,8 +120,13 @@ Page({ | @@ -119,8 +120,13 @@ Page({ | ||
| 119 | } | 120 | } |
| 120 | this.setData({ | 121 | this.setData({ |
| 121 | [`list[`+tabType+`]`]: this.data.list[tabType].concat(data), | 122 | [`list[`+tabType+`]`]: this.data.list[tabType].concat(data), |
| 122 | - hasMore:this.hasMore | 123 | + hasMore:this.hasMore, |
| 123 | }) | 124 | }) |
| 125 | + if(tabType>4 && this.getOffset()==1){ | ||
| 126 | + this.setData({ | ||
| 127 | + shownotice:resData.length>0 ? true : false | ||
| 128 | + }) | ||
| 129 | + } | ||
| 124 | // if(res.data.length==0){ | 130 | // if(res.data.length==0){ |
| 125 | // this.GetRecommendSellerLists() | 131 | // this.GetRecommendSellerLists() |
| 126 | // } | 132 | // } |
pages/me/new_file.
0 → 100644
pages/me/used.js
0 → 100644
| 1 | +import util from '../../utils/util'; | ||
| 2 | +import App from '../../utils/api'; | ||
| 3 | +Page({ | ||
| 4 | + data:{ | ||
| 5 | + tablist:[ | ||
| 6 | + { | ||
| 7 | + name:'已使用', | ||
| 8 | + status:0 | ||
| 9 | + }, | ||
| 10 | + { | ||
| 11 | + name:'已失效', | ||
| 12 | + status:0 | ||
| 13 | + } | ||
| 14 | + ], | ||
| 15 | + tabidx:0 | ||
| 16 | + }, | ||
| 17 | + onLoad(){ | ||
| 18 | + this.init(); | ||
| 19 | + this.getlist(); | ||
| 20 | + }, | ||
| 21 | + getlist(){ | ||
| 22 | + App.Activity.GetListByStatus().then((json)=>{ | ||
| 23 | + console.log(json); | ||
| 24 | + if(json.ret==200){ | ||
| 25 | + this.setData({ | ||
| 26 | + list:json.data | ||
| 27 | + }) | ||
| 28 | + } | ||
| 29 | + }) | ||
| 30 | + }, | ||
| 31 | + init(){ | ||
| 32 | + let systemInfo = wx.getSystemInfoSync(); | ||
| 33 | + let reg = /ios/i; | ||
| 34 | + let pt = 20;//导航状态栏上内边距 | ||
| 35 | + let h = 44;//导航状态栏高度 | ||
| 36 | + if(reg.test(systemInfo.system)){ | ||
| 37 | + pt = systemInfo.statusBarHeight; | ||
| 38 | + h = 44; | ||
| 39 | + }else{ | ||
| 40 | + pt = systemInfo.statusBarHeight; | ||
| 41 | + h = 48; | ||
| 42 | + } | ||
| 43 | + this.setData({ | ||
| 44 | + headerHeight:pt+h, | ||
| 45 | + contentHeight:systemInfo.windowHeight-pt-h | ||
| 46 | + }) | ||
| 47 | + }, | ||
| 48 | + selecttab(e){ | ||
| 49 | + let idx=util.attr(e,'index'); | ||
| 50 | + this.setData({ | ||
| 51 | + tabidx:idx | ||
| 52 | + }) | ||
| 53 | + } | ||
| 54 | +}) |
pages/me/used.json
0 → 100644
pages/me/used.wxml
0 → 100644
| 1 | +<nav>历史记录</nav> | ||
| 2 | +<view class="tablist flex-lr" style="top:{{headerHeight}}px;"> | ||
| 3 | + <block wx:for="{{tablist}}"> | ||
| 4 | + <view class="flex-vc tab-single" data-index="{{index}}" bindtap="selecttab"> | ||
| 5 | + <view class="{{tabidx===index ? 'blue-font font-bold' : 'black-font'}} font32r" style="line-height: 44rpx;padding: 10rpx 0;">{{item.name}}</view> | ||
| 6 | + <view class="{{tabidx==index ? 'active' : ''}} tab-line"></view> | ||
| 7 | + </view> | ||
| 8 | + </block> | ||
| 9 | + | ||
| 10 | +</view> | ||
| 11 | +<view class="list" style="padding-top: 100rpx;"> | ||
| 12 | + <block wx:for="{{tabidx==0 ? list.use : list.over}}"> | ||
| 13 | + <coupon item="{{item}}" mark="used"></coupon> | ||
| 14 | + </block> | ||
| 15 | +</view> |
pages/me/used.wxss
0 → 100644
| 1 | +.tablist{ | ||
| 2 | + width: 100%; | ||
| 3 | + height: 80rpx; | ||
| 4 | + padding: 6rpx 150rpx 0; | ||
| 5 | + box-sizing: border-box; | ||
| 6 | + position: fixed; | ||
| 7 | + left: 0; | ||
| 8 | + z-index: 2; | ||
| 9 | + background: #FFFFFF; | ||
| 10 | +} | ||
| 11 | +.tab-single{ | ||
| 12 | + height: 100%; | ||
| 13 | + padding: 0 20rpx; | ||
| 14 | +} | ||
| 15 | +.tab-line{ | ||
| 16 | + width: 60rpx; | ||
| 17 | + height: 6rpx; | ||
| 18 | + border-radius: 3rpx; | ||
| 19 | + background: #FFFFFF; | ||
| 20 | +} | ||
| 21 | +.tab-line.active{ | ||
| 22 | + background: linear-gradient(to right, #3BBFF5 0%, #57A0FF 100%); | ||
| 23 | +} |
| @@ -4,10 +4,10 @@ | @@ -4,10 +4,10 @@ | ||
| 4 | <navigator open-type="navigateBack" wx:if="{{hasBack}}"> | 4 | <navigator open-type="navigateBack" wx:if="{{hasBack}}"> |
| 5 | <view style="top:{{meTop}}px;" | 5 | <view style="top:{{meTop}}px;" |
| 6 | class="me view flex flex-direction align-center justify-center round"> | 6 | class="me view flex flex-direction align-center justify-center round"> |
| 7 | - <image src="http://nosqn.colorcun.com/back-white.png" style="width: 18rpx;height: 32rpx;"></image> | 7 | + <!-- <image src="http://nosqn.colorcun.com/back-white.png" style="width: 18rpx;height: 32rpx;"></image> --> |
| 8 | </view> | 8 | </view> |
| 9 | </navigator> | 9 | </navigator> |
| 10 | - <nav hasHome wx:if="{{hasNav}}" id='nav'>{{seller.sellername}}</nav> | 10 | + <nav hasHome id='nav' backgroundColor="{{hasNav ? '#ffffff' : 'transparent'}}" place="{{false}}">{{hasNav ? seller.sellername : ''}}</nav> |
| 11 | <view class="swiper-view"> | 11 | <view class="swiper-view"> |
| 12 | <swiper class="swiper-image" | 12 | <swiper class="swiper-image" |
| 13 | indicator-dots="{{false}}" autoplay="{{false}}" | 13 | indicator-dots="{{false}}" autoplay="{{false}}" |
| @@ -32,6 +32,7 @@ Page({ | @@ -32,6 +32,7 @@ Page({ | ||
| 32 | * 生命周期函数--监听页面加载 | 32 | * 生命周期函数--监听页面加载 |
| 33 | */ | 33 | */ |
| 34 | options:null, | 34 | options:null, |
| 35 | + discountapi:[App.Foodset.GetListByFoodset,App.Customer.GetSellerListByActivity,App.Customer.GetSellerListByCheck], | ||
| 35 | onLoad: function (options) { | 36 | onLoad: function (options) { |
| 36 | //latitude=34.215637&longitude=108.891264&scale=16&height=397 | 37 | //latitude=34.215637&longitude=108.891264&scale=16&height=397 |
| 37 | this.options=options; | 38 | this.options=options; |
| @@ -113,7 +114,7 @@ Page({ | @@ -113,7 +114,7 @@ Page({ | ||
| 113 | hasMore:true, | 114 | hasMore:true, |
| 114 | GetCollectionSellerList(){ | 115 | GetCollectionSellerList(){ |
| 115 | this.city=JSON.parse(this.options.city) | 116 | this.city=JSON.parse(this.options.city) |
| 116 | - App.Customer.GetActivitySellerListByFoods({ | 117 | + this.discountapi[this.data.tabidx]({ |
| 117 | code:this.city.code, | 118 | code:this.city.code, |
| 118 | pid:this.city.pid, | 119 | pid:this.city.pid, |
| 119 | offset:this.offset, | 120 | offset:this.offset, |
| @@ -122,6 +123,11 @@ Page({ | @@ -122,6 +123,11 @@ Page({ | ||
| 122 | lat_extend:this.location.latitude, | 123 | lat_extend:this.location.latitude, |
| 123 | lng_extend:this.location.longitude, | 124 | lng_extend:this.location.longitude, |
| 124 | }).then(res=>{ | 125 | }).then(res=>{ |
| 126 | + if(this.offset==1){ | ||
| 127 | + this.setData({ | ||
| 128 | + sellers:[] | ||
| 129 | + }) | ||
| 130 | + } | ||
| 125 | let sellers=res.data; | 131 | let sellers=res.data; |
| 126 | let sellersLength=sellers.length; | 132 | let sellersLength=sellers.length; |
| 127 | this.hasMore=sellersLength>=this.size | 133 | this.hasMore=sellersLength>=this.size |
| @@ -137,6 +143,9 @@ Page({ | @@ -137,6 +143,9 @@ Page({ | ||
| 137 | // seller.distance += 'm'; | 143 | // seller.distance += 'm'; |
| 138 | // } | 144 | // } |
| 139 | // } | 145 | // } |
| 146 | + if(seller.discount){ | ||
| 147 | + seller.discount=(Number(seller.discount)*10).toFixed(1); | ||
| 148 | + } | ||
| 140 | if(seller.seller_tel){ | 149 | if(seller.seller_tel){ |
| 141 | seller.seller_tel=seller.seller_tel.split(','); | 150 | seller.seller_tel=seller.seller_tel.split(','); |
| 142 | }else{ | 151 | }else{ |
| @@ -179,6 +188,9 @@ Page({ | @@ -179,6 +188,9 @@ Page({ | ||
| 179 | let tabidx=util.attr(e,'tabidx'); | 188 | let tabidx=util.attr(e,'tabidx'); |
| 180 | this.setData({ | 189 | this.setData({ |
| 181 | tabidx:tabidx, | 190 | tabidx:tabidx, |
| 182 | - }) | 191 | + |
| 192 | + }) | ||
| 193 | + this.offset=1; | ||
| 194 | + this.GetCollectionSellerList(); | ||
| 183 | } | 195 | } |
| 184 | }) | 196 | }) |
| @@ -7,6 +7,7 @@ | @@ -7,6 +7,7 @@ | ||
| 7 | "nav":"/components/nav/nav", | 7 | "nav":"/components/nav/nav", |
| 8 | "getpos":"/components/userinfo/getpos", | 8 | "getpos":"/components/userinfo/getpos", |
| 9 | "sb-tr":"/components/reserve/seller-box-transverse/seller-box", | 9 | "sb-tr":"/components/reserve/seller-box-transverse/seller-box", |
| 10 | - "hasActivity":"/components/activity/hasActivity" | 10 | + "hasActivity":"/components/activity/hasActivity", |
| 11 | + "taocan":"/components/reserve/seller-box-transverse/taocan-card" | ||
| 11 | } | 12 | } |
| 12 | } | 13 | } |
| @@ -18,13 +18,19 @@ | @@ -18,13 +18,19 @@ | ||
| 18 | </view> | 18 | </view> |
| 19 | </view> | 19 | </view> |
| 20 | <view class="follow" style="margin-top: {{activity?96:32}}rpx;"> | 20 | <view class="follow" style="margin-top: {{activity?96:32}}rpx;"> |
| 21 | - <view class="biaoyu">{{discountlist[tabidx].slogan}}</view> | 21 | + <view class="biaoyu" style="margin-bottom: {{sellers.length>0 ? 30 : 160}}rpx;">{{discountlist[tabidx].slogan}}</view> |
| 22 | <view class="seller" wx:for="{{sellers}}" wx:key="sellers.key" | 22 | <view class="seller" wx:for="{{sellers}}" wx:key="sellers.key" |
| 23 | - bindtap="gotoDetail" data-sid="{{item.id}}" wx:if="{{item.hasFollow}}"> | ||
| 24 | - <sb-tr seller="{{item}}" | ||
| 25 | - hasActivity="{{false}}" hasAverage="{{true}}" | ||
| 26 | - hasBrand hasActivityRed hasActivityShort hasNewActivityList | ||
| 27 | - hasSlogan="{{false}}" sellerStyle="noborder noshadow activity-list"></sb-tr> | 23 | + bindtap="{{tabidx==0 ? '' : 'gotoDetail'}}" data-sid="{{item.id}}" wx:if="{{item.hasFollow}}"> |
| 24 | + <block wx:if="{{tabidx==0}}"> | ||
| 25 | + <taocan item="{{item}}"></taocan> | ||
| 26 | + </block> | ||
| 27 | + <block wx:else> | ||
| 28 | + <sb-tr seller="{{item}}" | ||
| 29 | + hasActivityTags="{{true}}" hasAverage="{{true}}" | ||
| 30 | + hasBrand hasActivityShort hasNewActivityList | ||
| 31 | + hasSlogan="{{false}}" sellerStyle="noborder noshadow activity-list"></sb-tr> | ||
| 32 | + </block> | ||
| 33 | + | ||
| 28 | </view> | 34 | </view> |
| 29 | <view class="flex-vc" wx:if="{{!hasMore}}">没有更多了</view> | 35 | <view class="flex-vc" wx:if="{{!hasMore}}">没有更多了</view> |
| 30 | </view> | 36 | </view> |
| @@ -47,7 +47,7 @@ page{ | @@ -47,7 +47,7 @@ page{ | ||
| 47 | text-align: center; | 47 | text-align: center; |
| 48 | margin-left: calc(50% - 264rpx); | 48 | margin-left: calc(50% - 264rpx); |
| 49 | position: relative; | 49 | position: relative; |
| 50 | - margin-bottom: 160rpx; | 50 | +/* margin-bottom: 160rpx; */ |
| 51 | } | 51 | } |
| 52 | .biaoyu:after,.biaoyu:before{ | 52 | .biaoyu:after,.biaoyu:before{ |
| 53 | content:""; | 53 | content:""; |
| @@ -20,8 +20,8 @@ | @@ -20,8 +20,8 @@ | ||
| 20 | <image class="moveToLocation-image" src="http://nosqn.colorcun.com/2.0/home%20%2811%29.png"></image> | 20 | <image class="moveToLocation-image" src="http://nosqn.colorcun.com/2.0/home%20%2811%29.png"></image> |
| 21 | </view> | 21 | </view> |
| 22 | </view> | 22 | </view> |
| 23 | -<taocan-notice></taocan-notice> | ||
| 24 | <view class="view content padding-top-xs" style="height: 70vh;"> | 23 | <view class="view content padding-top-xs" style="height: 70vh;"> |
| 24 | + <taocan-notice></taocan-notice> | ||
| 25 | <filter-group height="{{height}}" | 25 | <filter-group height="{{height}}" |
| 26 | id="filter-group" | 26 | id="filter-group" |
| 27 | bindevent="filterGroupEvent" | 27 | bindevent="filterGroupEvent" |
| @@ -51,10 +51,8 @@ | @@ -51,10 +51,8 @@ | ||
| 51 | </view> | 51 | </view> |
| 52 | <view class="view flex flex-direction justify-center align-center empty-box empty-box-move margin-sm" | 52 | <view class="view flex flex-direction justify-center align-center empty-box empty-box-move margin-sm" |
| 53 | wx:else=""> | 53 | wx:else=""> |
| 54 | - <view class="view flex text-df tips align-center text-orange"> | ||
| 55 | - <view class="view icon"></view> | ||
| 56 | - <view class="view">往任意方向拖动地图,可查找不同范围的餐厅</view> | ||
| 57 | - </view> | 54 | + <view class="view icon"></view> |
| 55 | + <view class="view text-lg margin-top-sm">任意方向缩放或拖动地图</view> | ||
| 58 | <view class="view text-lg">地图显示范围无餐厅</view> | 56 | <view class="view text-lg">地图显示范围无餐厅</view> |
| 59 | <view style="margin-top: 80rpx;" | 57 | <view style="margin-top: 80rpx;" |
| 60 | bindtap="reduceMapScale" data-val="39.684670,118.176300" | 58 | bindtap="reduceMapScale" data-val="39.684670,118.176300" |
| @@ -81,7 +79,7 @@ | @@ -81,7 +79,7 @@ | ||
| 81 | <view class="view">往任意方向拖动地图,可查找不同范围的餐厅</view> | 79 | <view class="view">往任意方向拖动地图,可查找不同范围的餐厅</view> |
| 82 | </view> --> | 80 | </view> --> |
| 83 | <view class="view icon"></view> | 81 | <view class="view icon"></view> |
| 84 | - <view class="view text-lg margin-top-sm">往任意方向拖动地图</view> | 82 | + <view class="view text-lg margin-top-sm">任意方向缩放或拖动地图</view> |
| 85 | <view class="view text-24" style="margin-top: 16rpx;">可以查找更多餐厅</view> | 83 | <view class="view text-24" style="margin-top: 16rpx;">可以查找更多餐厅</view> |
| 86 | </view> | 84 | </view> |
| 87 | <view class="view" style="height: 192rpx;"></view> | 85 | <view class="view" style="height: 192rpx;"></view> |
| @@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
| 17 | </view> | 17 | </view> |
| 18 | </view> | 18 | </view> |
| 19 | <view class="view solid-bottom flex justify-around align-center" style="height: 110rpx;" bindtap="dispalySearchHow"> | 19 | <view class="view solid-bottom flex justify-around align-center" style="height: 110rpx;" bindtap="dispalySearchHow"> |
| 20 | - <view class="flex-treble txt-36-h {{findSellerData.paramStr ? 'text-bold' : ''}}" style="color: {{findSellerData.paramStr ? '#353535' : '#999999'}};">{{findSellerData.paramStr||'选择日期/时段/人数'}}</view> | 20 | + <view class="flex-treble txt-36-h {{findSellerData.action=='auto' ? '' : 'text-bold'}}" style="color: {{findSellerData.action=='auto' ? '#999999' : '#353535'}};">{{findSellerData.action=='auto' ? '选择日期/时段/人数' : findSellerData.paramStr||'选择日期/时段/人数'}}</view> |
| 21 | <view class="more"></view> | 21 | <view class="more"></view> |
| 22 | </view> | 22 | </view> |
| 23 | <view class="view solid-bottom flex justify-around align-center" | 23 | <view class="view solid-bottom flex justify-around align-center" |
| @@ -39,10 +39,10 @@ | @@ -39,10 +39,10 @@ | ||
| 39 | <view wx:if="{{IsSetActivityByFoods}}" class="margin-top-lg padding-lr-lg padding-top-lg"> | 39 | <view wx:if="{{IsSetActivityByFoods}}" class="margin-top-lg padding-lr-lg padding-top-lg"> |
| 40 | <view class="txt-40-h text-bold margin-bottom">精选特惠</view> | 40 | <view class="txt-40-h text-bold margin-bottom">精选特惠</view> |
| 41 | <view class="flex justify-center align-center" > | 41 | <view class="flex justify-center align-center" > |
| 42 | - <view class="view youhui-image image1" style="" data-tabidx="0" data-path="/pages/reserve/discount" bindtap="goPath"></view> | 42 | + <view class="view youhui-image image1" style="" data-tabidx="2" data-path="/pages/reserve/discount" bindtap="goPath"></view> |
| 43 | <view class="margin-left-xs"> | 43 | <view class="margin-left-xs"> |
| 44 | <view class="view youhui-image image2" data-tabidx="1" data-path="/pages/reserve/discount" bindtap="goPath"></view> | 44 | <view class="view youhui-image image2" data-tabidx="1" data-path="/pages/reserve/discount" bindtap="goPath"></view> |
| 45 | - <view class="view youhui-image image3 margin-top-xs" data-tabidx="2" data-path="/pages/reserve/discount" bindtap="goPath"></view> | 45 | + <view class="view youhui-image image3 margin-top-xs" data-tabidx="0" data-path="/pages/reserve/discount" bindtap="goPath"></view> |
| 46 | </view> | 46 | </view> |
| 47 | </view> | 47 | </view> |
| 48 | </view> | 48 | </view> |
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | "setting": { | 3 | "setting": { |
| 4 | "urlCheck": true, | 4 | "urlCheck": true, |
| 5 | "es6": true, | 5 | "es6": true, |
| 6 | - "enhance": false, | 6 | + "enhance": true, |
| 7 | "postcss": true, | 7 | "postcss": true, |
| 8 | "preloadBackgroundData": false, | 8 | "preloadBackgroundData": false, |
| 9 | "minified": true, | 9 | "minified": true, |
| @@ -20,6 +20,7 @@ | @@ -20,6 +20,7 @@ | ||
| 20 | "compileHotReLoad": false, | 20 | "compileHotReLoad": false, |
| 21 | "useMultiFrameRuntime": true, | 21 | "useMultiFrameRuntime": true, |
| 22 | "useApiHook": true, | 22 | "useApiHook": true, |
| 23 | + "useApiHostProcess": true, | ||
| 23 | "babelSetting": { | 24 | "babelSetting": { |
| 24 | "ignore": [], | 25 | "ignore": [], |
| 25 | "disablePlugins": [], | 26 | "disablePlugins": [], |
| @@ -32,11 +33,10 @@ | @@ -32,11 +33,10 @@ | ||
| 32 | "userConfirmedBundleSwitch": false, | 33 | "userConfirmedBundleSwitch": false, |
| 33 | "packNpmManually": false, | 34 | "packNpmManually": false, |
| 34 | "packNpmRelationList": [], | 35 | "packNpmRelationList": [], |
| 35 | - "minifyWXSS": true, | ||
| 36 | - "useApiHostProcess": true | 36 | + "minifyWXSS": true |
| 37 | }, | 37 | }, |
| 38 | "compileType": "miniprogram", | 38 | "compileType": "miniprogram", |
| 39 | - "libVersion": "2.11.2", | 39 | + "libVersion": "2.14.1", |
| 40 | "appid": "wxd3dc4206c76f14fc", | 40 | "appid": "wxd3dc4206c76f14fc", |
| 41 | "projectname": "c%E7%AB%AF%E9%A2%84%E5%AE%9A", | 41 | "projectname": "c%E7%AB%AF%E9%A2%84%E5%AE%9A", |
| 42 | "isGameTourist": false, | 42 | "isGameTourist": false, |
| @@ -88,10 +88,9 @@ | @@ -88,10 +88,9 @@ | ||
| 88 | "miniprogram": { | 88 | "miniprogram": { |
| 89 | "list": [ | 89 | "list": [ |
| 90 | { | 90 | { |
| 91 | - "id": 0, | ||
| 92 | "name": "预订本-商家1", | 91 | "name": "预订本-商家1", |
| 93 | "pathName": "pack-book/pages/book/b_index", | 92 | "pathName": "pack-book/pages/book/b_index", |
| 94 | - "query": "seller_id=1297&seller_openid= oZc-q05hV2N-knHfpxKg5dDUp5vU&manager_id=20612", | 93 | + "query": "seller_id=1001&seller_openid= oZc-q05hV2N-knHfpxKg5dDUp5vU&manager_id=20612", |
| 95 | "scene": 1001 | 94 | "scene": 1001 |
| 96 | }, | 95 | }, |
| 97 | { | 96 | { |
| @@ -691,6 +690,30 @@ | @@ -691,6 +690,30 @@ | ||
| 691 | "pathName": "pack-checkout/pages/index", | 690 | "pathName": "pack-checkout/pages/index", |
| 692 | "query": "rid=153180&sid=1297", | 691 | "query": "rid=153180&sid=1297", |
| 693 | "scene": null | 692 | "scene": null |
| 693 | + }, | ||
| 694 | + { | ||
| 695 | + "name": "pack-checkout/pages/use", | ||
| 696 | + "pathName": "pack-checkout/pages/use", | ||
| 697 | + "query": "seller_id=1297&seller_openid= oZc-q05hV2N-knHfpxKg5dDUp5vU&manager_id=20612", | ||
| 698 | + "scene": null | ||
| 699 | + }, | ||
| 700 | + { | ||
| 701 | + "name": "pack-checkout/pages/use", | ||
| 702 | + "pathName": "pack-checkout/pages/use", | ||
| 703 | + "query": "scene=aid%3D9%26openid%3DoB-xJ5MEi2mTMrBTiYImD9cpGH6o", | ||
| 704 | + "scene": null | ||
| 705 | + }, | ||
| 706 | + { | ||
| 707 | + "name": "pages/customer/detail_owner_invitation", | ||
| 708 | + "pathName": "pages/customer/detail_owner_invitation", | ||
| 709 | + "query": "id= 157347", | ||
| 710 | + "scene": null | ||
| 711 | + }, | ||
| 712 | + { | ||
| 713 | + "name": "pages/customer/index", | ||
| 714 | + "pathName": "pages/customer/index", | ||
| 715 | + "query": "id=157589&tplid=1&fromid=oB-xJ5MEi2mTMrBTiYImD9cpGH6o&hasSellerShare=0&hasInvitation=1 ", | ||
| 716 | + "scene": 1047 | ||
| 694 | } | 717 | } |
| 695 | ] | 718 | ] |
| 696 | } | 719 | } |
| @@ -561,4 +561,33 @@ export default { | @@ -561,4 +561,33 @@ export default { | ||
| 561 | 'App.Customer.GetSellerPreferentialDocking':null, | 561 | 'App.Customer.GetSellerPreferentialDocking':null, |
| 562 | //接单人,获得商家设置的接单人列表 | 562 | //接单人,获得商家设置的接单人列表 |
| 563 | 'App.Customer.GetReceptionists':null, | 563 | 'App.Customer.GetReceptionists':null, |
| 564 | + | ||
| 565 | + //买单优惠 | ||
| 566 | + 'App.Customer.GetSellerListByCheck':null, | ||
| 567 | + //套餐优惠 | ||
| 568 | + 'App.Foodset.GetListByFoodset':null, | ||
| 569 | + //线下优惠 | ||
| 570 | + 'App.Customer.GetSellerListByActivity':null, | ||
| 571 | + | ||
| 572 | + | ||
| 573 | + //用户活动列表 不传aid查用户列表 传aid查详情 | ||
| 574 | + 'App.Activity.ActivityListByOpenid':{ | ||
| 575 | + openid:'openid', | ||
| 576 | + }, | ||
| 577 | + //点击使用 进优惠券详情时 调这个 创建核销码 | ||
| 578 | + 'App.Activity.UseCreateQrcode':{ | ||
| 579 | + openid:'openid', | ||
| 580 | + }, | ||
| 581 | + //扫码进页面 点核销 调这个 | ||
| 582 | + 'App.Activity.SetActivityStatus':null, | ||
| 583 | + //用户在小程序点前往查看 跳转到公众号后 前端调这个接口 程序自动调关联领取关系 | ||
| 584 | + 'App.Activity.SetActivityAsReserve':{ | ||
| 585 | + openid:'openid', | ||
| 586 | + }, | ||
| 587 | + //获取预定绑定活动 | ||
| 588 | + 'App.Activity.GetActivityByRid':null, | ||
| 589 | + //获取各状态列表 | ||
| 590 | + 'App.Activity.GetListByStatus':{ | ||
| 591 | + openid:'openid', | ||
| 592 | + } | ||
| 564 | } | 593 | } |
-
Please register or login to post a comment