Commit d07b6ac57ebe8d2d24d9b5c51498384557297569

Authored by vking
1 parent 3b244e0b

pay

@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <view class="jindu-view"> 2 <view class="jindu-view">
3 <view class="tips-info">3步轻松买单</view> 3 <view class="tips-info">3步轻松买单</view>
4 <view class="top flex-lr"> 4 <view class="top flex-lr">
5 - <view class="top-icon flex-vc {{checkout.status>=index?'active':''}}" wx:for="{{steps}}" wx:key="key"> 5 + <view class="top-icon flex-vc {{index==0 || checkout.status>=index?'active':''}}" wx:for="{{steps}}" wx:key="key">
6 <view class="top-icon-txt flex-vc">{{item.number}}</view> 6 <view class="top-icon-txt flex-vc">{{item.number}}</view>
7 </view> 7 </view>
8 </view> 8 </view>
@@ -8,6 +8,7 @@ Page({ @@ -8,6 +8,7 @@ Page({
8 */ 8 */
9 data: { 9 data: {
10 checkout:null, 10 checkout:null,
  11 + hasLoading:true,
11 }, 12 },
12 13
13 /** 14 /**
@@ -62,22 +63,25 @@ Page({ @@ -62,22 +63,25 @@ Page({
62 GetCheckout(){ 63 GetCheckout(){
63 App.Customer.GetOrderInfo({rid:this.options.rid}).then(res=>{ 64 App.Customer.GetOrderInfo({rid:this.options.rid}).then(res=>{
64 let checkout=res.data 65 let checkout=res.data
65 - let remark=[]  
66 - if(res.data.is_wine>0){  
67 - remark.push('有剩余酒水要退') 66 + if(checkout){
  67 + let remark=[]
  68 + if(res.data.is_wine>0){
  69 + remark.push('有剩余酒水要退')
  70 + }
  71 + if(res.data.is_pack>0){
  72 + remark.push('菜品打包')
  73 + }
  74 + checkout.remark=remark.join('、')
  75 + if(checkout.status>1){
  76 + this.GetOrderInfoStop()
  77 + }else{
  78 + this.GetOrderInfoRun()
  79 + }
68 } 80 }
69 - if(res.data.is_pack>0){  
70 - remark.push('菜品打包')  
71 - }  
72 - checkout.remark=remark.join('、')  
73 this.setData({ 81 this.setData({
74 - checkout:checkout 82 + checkout:checkout,
  83 + hasLoading:false,
75 }) 84 })
76 - if(checkout.status>1){  
77 - this.GetOrderInfoStop()  
78 - }else{  
79 - this.GetOrderInfoRun()  
80 - }  
81 }) 85 })
82 }, 86 },
83 is_wine:0, 87 is_wine:0,
  1 +<!--
  2 +此文件为开发者工具生成,生成时间: 2020/4/17 下午2:12:45
  3 +使用方法:
  4 +1. 在"pack-checkout\pages\index.wxml"中使用`include`指令引入此模板,
  5 +2. 在"pack-checkout\pages\index.wxss"中使用`import`指令引入"pack-checkout\pages\index.skeleton.wxss"
  6 +3. 书写对应的逻辑,来控制骨架屏的显示与隐藏
  7 +
  8 +更多详细信息可以参考文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/skeleton.html
  9 +-->
  10 +<view class="sk-container">
  11 + <view is="components/nav/nav">
  12 + <view class="nav--nav-main-space" style="height: 64px;">
  13 + <view class="nav--nav-main" style="background-color: #ffffff;color:#000000;">
  14 + <view class="nav--nav" style="margin-top: 20px;">
  15 + <view class="nav--flex-lr nav--part" style="height: 44px; line-height: 44px">
  16 + <view class="nav--opt nav--flex-ll">
  17 + <view class="nav--back nav--flex-vc">
  18 + <image class="nav--back-image sk-image"></image>
  19 + </view>
  20 + </view>
  21 + <view class="nav--title sk-transparent sk-text-32-9545-629 sk-text" style="background-size: 32.0285% 2.75rem; background-position-x: 50%;">周到安排</view>
  22 + <view class="nav--opt">
  23 + <view></view>
  24 + </view>
  25 + </view>
  26 + </view>
  27 + </view>
  28 + </view>
  29 + </view>
  30 + <view class="pages sk-image">
  31 + <view class="content">
  32 + <view is="pack-checkout/components/jinduBar">
  33 + <view class="jinduBar--jindu-view">
  34 + <view class="jinduBar--tips-info sk-transparent sk-image">3步轻松买单</view>
  35 + <view class="jinduBar--top jinduBar--flex-lr sk-pseudo sk-pseudo-circle">
  36 + <view class="jinduBar--top-icon jinduBar--flex-vc">
  37 + <view class="jinduBar--top-icon-txt jinduBar--flex-vc sk-transparent sk-text-14-2857-157 sk-text" style="background-size: 32.875% 1.225rem;">1</view>
  38 + </view>
  39 + <view class="jinduBar--top-icon jinduBar--flex-vc">
  40 + <view class="jinduBar--top-icon-txt jinduBar--flex-vc sk-transparent sk-text-14-2857-162 sk-text" style="background-size: 32.875% 1.225rem;">2</view>
  41 + </view>
  42 + <view class="jinduBar--top-icon jinduBar--flex-vc">
  43 + <view class="jinduBar--top-icon-txt jinduBar--flex-vc sk-transparent sk-text-14-2857-97 sk-text" style="background-size: 32.875% 1.225rem;">3</view>
  44 + </view>
  45 + </view>
  46 + <view class="jinduBar--bottom jinduBar--flex-lr">
  47 + <view class="jinduBar--bottom-txt sk-transparent sk-text-15-0000-926 sk-text" style="background-size: 100% 1.25rem;">获取消费金额</view>
  48 + <view class="jinduBar--bottom-txt sk-transparent sk-text-15-0000-606 sk-text" style="background-size: 100% 1.25rem; background-position-x: 50%;">商家反馈消费金额</view>
  49 + <view class="jinduBar--bottom-txt sk-transparent sk-text-15-0000-414 sk-text" style="background-size: 100% 1.25rem; background-position-x: 100%;">提前买单</view>
  50 + </view>
  51 + </view>
  52 + </view>
  53 + </view>
  54 + <checkbox-group>
  55 + <view class="content checkout">
  56 + <view class="title sk-transparent sk-text-32-5000-940 sk-text" style="border: none; background-size: 35.518% 2.5rem;">买单相关(可选)</view>
  57 + <view class="item flex-lr" style="border: none;">
  58 + <view class="sk-transparent sk-text-38-4058-984 sk-text" style="background-size: 100% 4.3125rem;">剩余酒水饮料需要退</view>
  59 + <checkbox color="#EFEFEF" value="is_wine"></checkbox>
  60 + </view>
  61 + <view class="item flex-lr" style="border: none;">
  62 + <view class="sk-transparent sk-text-38-4058-599 sk-text" style="background-size: 100% 4.3125rem;">菜品打包</view>
  63 + <checkbox color="#EFEFEF" value="is_pack"></checkbox>
  64 + </view>
  65 + </view>
  66 + </checkbox-group>
  67 + <view class="checkout-get">
  68 + <view class="checkout-button sk-transparent">
  69 + 获取消费金额
  70 + <view class="checkout-button-money-tips sk-transparent sk-text-20-5882-11 sk-text" style="background-size: 82.4615% 1.0625rem; background-position-x: 50%;">18.80元红包待用</view>
  71 + </view>
  72 + </view>
  73 + </view>
  74 + <view is="components/tips/showModal/showModal" id="showModal">
  75 + <view class="showModal--mask showModal--flex-vc showModal--checkout" hidden="true">
  76 + <view class="showModal--showModal">
  77 + <view class="showModal--header sk-transparent sk-opacity">
  78 + 确认信息
  79 + </view>
  80 + <view class="showModal--body sk-transparent sk-opacity">
  81 + 确认信息
  82 + </view>
  83 + <view class="showModal--footer showModal--flex-cc"><button plain="true" class="showModal--button-none showModal--confirm showModal--bg-brown sk-transparent sk-button sk-pseudo sk-pseudo-circle" data-type="confirm" style="color: rgb(255, 255, 255); border: none;">知道了</button></view>
  84 + </view>
  85 + </view>
  86 + </view>
  87 +</view>
  1 +/*
  2 +此文件为开发者工具生成,生成时间: 2020/4/17 下午2:12:45
  3 +使用方法:参考 "pack-checkout\pages\index.skeleton.wxml"
  4 +*/
  5 +.sk-transparent {
  6 + color: transparent !important;
  7 + }
  8 +.sk-text-32-9545-629 {
  9 + background-image: linear-gradient(transparent 32.9545%, #EEEEEE 0%, #EEEEEE 67.0455%, transparent 0%) !important;
  10 + background-size: 100% 2.7500rem;
  11 + position: relative !important;
  12 + }
  13 +.sk-text {
  14 + background-origin: content-box !important;
  15 + background-clip: content-box !important;
  16 + background-color: transparent !important;
  17 + color: transparent !important;
  18 + background-repeat: repeat-y !important;
  19 + }
  20 +.sk-text-14-2857-157 {
  21 + background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
  22 + background-size: 100% 1.2250rem;
  23 + position: relative !important;
  24 + }
  25 +.sk-text-14-2857-162 {
  26 + background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
  27 + background-size: 100% 1.2250rem;
  28 + position: relative !important;
  29 + }
  30 +.sk-text-14-2857-97 {
  31 + background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
  32 + background-size: 100% 1.2250rem;
  33 + position: relative !important;
  34 + }
  35 +.sk-text-15-0000-926 {
  36 + background-image: linear-gradient(transparent 15.0000%, #EEEEEE 0%, #EEEEEE 85.0000%, transparent 0%) !important;
  37 + background-size: 100% 1.2500rem;
  38 + position: relative !important;
  39 + }
  40 +.sk-text-15-0000-606 {
  41 + background-image: linear-gradient(transparent 15.0000%, #EEEEEE 0%, #EEEEEE 85.0000%, transparent 0%) !important;
  42 + background-size: 100% 1.2500rem;
  43 + position: relative !important;
  44 + }
  45 +.sk-text-15-0000-414 {
  46 + background-image: linear-gradient(transparent 15.0000%, #EEEEEE 0%, #EEEEEE 85.0000%, transparent 0%) !important;
  47 + background-size: 100% 1.2500rem;
  48 + position: relative !important;
  49 + }
  50 +.sk-text-32-5000-940 {
  51 + background-image: linear-gradient(transparent 32.5000%, #EEEEEE 0%, #EEEEEE 67.5000%, transparent 0%) !important;
  52 + background-size: 100% 2.5000rem;
  53 + position: relative !important;
  54 + }
  55 +.sk-text-38-4058-984 {
  56 + background-image: linear-gradient(transparent 38.4058%, #EEEEEE 0%, #EEEEEE 61.5942%, transparent 0%) !important;
  57 + background-size: 100% 4.3125rem;
  58 + position: relative !important;
  59 + }
  60 +.sk-text-38-4058-599 {
  61 + background-image: linear-gradient(transparent 38.4058%, #EEEEEE 0%, #EEEEEE 61.5942%, transparent 0%) !important;
  62 + background-size: 100% 4.3125rem;
  63 + position: relative !important;
  64 + }
  65 +.sk-text-20-5882-11 {
  66 + background-image: linear-gradient(transparent 20.5882%, #EEEEEE 0%, #EEEEEE 79.4118%, transparent 0%) !important;
  67 + background-size: 100% 1.0625rem;
  68 + position: absolute !important;
  69 + }
  70 +.sk-opacity {
  71 + opacity: 0 !important;
  72 + }
  73 +.sk-button {
  74 + color: #EFEFEF !important;
  75 + background: #EFEFEF !important;
  76 + border: none !important;
  77 + box-shadow: none !important;
  78 + }
  79 +.sk-image {
  80 + background: #EFEFEF !important;
  81 + }
  82 +.sk-pseudo::before, .sk-pseudo::after {
  83 + background: #EFEFEF !important;
  84 + background-image: none !important;
  85 + color: transparent !important;
  86 + border-color: transparent !important;
  87 + }
  88 +.sk-pseudo-rect::before, .sk-pseudo-rect::after {
  89 + border-radius: 0 !important;
  90 + }
  91 +.sk-pseudo-circle::before, .sk-pseudo-circle::after {
  92 + border-radius: 50% !important;
  93 + }
  94 +.sk-container {
  95 + position: absolute;
  96 + overflow: hidden;
  97 + top: 0;
  98 + left: 0;
  99 + right: 0;
  100 + bottom: 0;
  101 + z-index: 1000000;
  102 + background-color: transparent;
  103 + }
1 <!--pack-activity/pages/index.wxml--> 1 <!--pack-activity/pages/index.wxml-->
2 <wxs src="../../utils/util.wxs" module="util" /> 2 <wxs src="../../utils/util.wxs" module="util" />
  3 +<block wx:if="{{hasLoading}}">
  4 + <include src="./index.skeleton.wxml"></include>
  5 +</block>
3 <nav hasHome>{{checkout.sellername||'周到安排'}}</nav> 6 <nav hasHome>{{checkout.sellername||'周到安排'}}</nav>
4 <view class="pages"> 7 <view class="pages">
5 <view class="content"> 8 <view class="content">
6 <jinduBar checkout="{{checkout}}"></jinduBar> 9 <jinduBar checkout="{{checkout}}"></jinduBar>
7 </view> 10 </view>
8 - <!--//买单相关(可选)-->  
9 - <block wx:if="{{checkout.status<1}}">  
10 - <checkbox-group bindchange="checkoutData">  
11 - <view class="content checkout">  
12 - <view class="title">买单相关(可选)</view>  
13 - <view class="item flex-lr">  
14 - <view>剩余酒水饮料需要退</view>  
15 - <checkbox color="#ffffff" value="is_wine"/>  
16 - </view>  
17 - <view class="item flex-lr">  
18 - <view>菜品打包</view>  
19 - <checkbox color="#ffffff" value="is_pack"/>  
20 - </view>  
21 - </view>  
22 - </checkbox-group>  
23 - <view class="checkout-get" bindtap="checkoutInit">  
24 - <view class="checkout-button">  
25 - 获取消费金额  
26 - <view class="checkout-button-money-tips" wx:if="{{user.price>0}}">{{user.price}}元红包待用</view>  
27 - </view>  
28 - </view>  
29 - </block>  
30 - <block wx:elif="{{checkout.status==1}}"> 11 + <block wx:if="{{checkout.status==1}}">
31 <view class="content checkout"> 12 <view class="content checkout">
32 <view class="waiting-money flex-vc"> 13 <view class="waiting-money flex-vc">
33 <icon type="waiting" size="47" color="#C0A369"/> 14 <icon type="waiting" size="47" color="#C0A369"/>
@@ -84,7 +65,7 @@ @@ -84,7 +65,7 @@
84 </view> 65 </view>
85 <view class="money-tips">注:消费清单,离店时请到前台索要;</view> 66 <view class="money-tips">注:消费清单,离店时请到前台索要;</view>
86 </block> 67 </block>
87 - <block wx:else=""> 68 + <block wx:elif="{{checkout.status==3}}">
88 <view class="content money"> 69 <view class="content money">
89 <view class="waiting-money flex-vc"> 70 <view class="waiting-money flex-vc">
90 <icon type="success" size="47" color="#C8B16D"/> 71 <icon type="success" size="47" color="#C8B16D"/>
@@ -131,5 +112,26 @@ @@ -131,5 +112,26 @@
131 </view> 112 </view>
132 </view> 113 </view>
133 </block> 114 </block>
  115 + <block wx:else="">
  116 + <checkbox-group bindchange="checkoutData">
  117 + <view class="content checkout">
  118 + <view class="title">买单相关(可选)</view>
  119 + <view class="item flex-lr">
  120 + <view>剩余酒水饮料需要退</view>
  121 + <checkbox color="#ffffff" value="is_wine"/>
  122 + </view>
  123 + <view class="item flex-lr">
  124 + <view>菜品打包</view>
  125 + <checkbox color="#ffffff" value="is_pack"/>
  126 + </view>
  127 + </view>
  128 + </checkbox-group>
  129 + <view class="checkout-get" bindtap="checkoutInit">
  130 + <view class="checkout-button">
  131 + 获取消费金额
  132 + <view class="checkout-button-money-tips" wx:if="{{user.price>0}}">{{user.price}}元红包待用</view>
  133 + </view>
  134 + </view>
  135 + </block>
134 </view> 136 </view>
135 <showModal id="showModal" confirmText="知道了" bindshowModal="showModal" cla="checkout"></showModal> 137 <showModal id="showModal" confirmText="知道了" bindshowModal="showModal" cla="checkout"></showModal>
1 /* pack-activity/pages/index.wxss */ 1 /* pack-activity/pages/index.wxss */
  2 +@import "index.skeleton.wxss";
2 page{ 3 page{
3 background-color: #F5F5F5; 4 background-color: #F5F5F5;
4 } 5 }
@@ -644,7 +644,7 @@ @@ -644,7 +644,7 @@
644 "id": 80, 644 "id": 80,
645 "name": "pack-checkout/pages/index", 645 "name": "pack-checkout/pages/index",
646 "pathName": "pack-checkout/pages/index", 646 "pathName": "pack-checkout/pages/index",
647 - "query": "rid=60472&sid=80", 647 + "query": "rid=61685&sid=80",
648 "scene": null 648 "scene": null
649 } 649 }
650 ] 650 ]