瀏覽代碼

文字调大问题

wangtao 2 年之前
父節點
當前提交
161b6ed87d

+ 6 - 1
README.md

@@ -50,4 +50,9 @@ userPhone
 appid:"wxd64360a4b8c50006",
 secret:"b758e45c89162542610509dafd9db7c3",
 
-微信小程序返回 app 参数读取的是字符串,appData、appData2 
+微信小程序返回 app 参数读取的是字符串,appData、appData2 
+
+
+1.移动端配餐页面字体放大布局错乱问题
+2.
+3.

+ 1 - 1
src/assets/scss/common.scss

@@ -12,7 +12,7 @@ body {
         top: 0;
         left: 0;
         box-sizing: border-box;
-        background: #FF4747;
+        background: #ee0a24;
         text-align: center;
         color: #FFF;
         font-size: 18px;

+ 19 - 18
src/views/amount/index.vue

@@ -825,19 +825,20 @@ export default {
     },
     //返回上级或app目录页
     fanhuiBtn(){
-      this.$router.go(-1)
-      // if(localStorage.getItem("passageway")){
-      //   this.$router.go(-1)
-      // }else{
-        // setTimeout(()=>{
-        //   this.$router.go(-2)
-        // },10)
+      if(localStorage.getItem("passageway")){
+        this.$router.go(-1)
+      }else{
+        
+          window.location.href= "https://smartpark.caih.com/h5/#/home/feature"
+          // this.$router.go(-2)
+
         
         //window.location.href = "https://smartpark.caih.com/h5/#/home/feature?isApp=true"
       //}
+      }
     }
-  },
-};
+  }
+}
 </script>
 <style lang="scss" scoped>
 
@@ -883,7 +884,7 @@ export default {
         height:44px;
         line-height: 44px;
         .jgLabel{
-          color: #D7000F;
+          color: #ee0a24;
           position: absolute;
           z-index: 1;
           text-align: center;
@@ -924,7 +925,7 @@ export default {
         font-size: 15px;
         font-weight: 700;
         span{
-          color:#D7000F;
+          color:#ee0a24;
           font-weight: 400;
         }
       }
@@ -959,7 +960,7 @@ export default {
         }
       }
       .borderRed{
-        border:1px solid #D7000F;
+        border:1px solid #ee0a24;
       }
     }
 
@@ -992,7 +993,7 @@ export default {
       .jg{
         position: relative;
         .jgLabel{
-          color: #D7000F ;
+          color: #ee0a24 ;
           font-size: 16px;
           position: absolute;
           top:11px;
@@ -1013,7 +1014,7 @@ export default {
         margin-top: 20px;
         float: left;
         width: 28%;
-        border:1px solid #D7000F!important;
+        border:1px solid #ee0a24!important;
       }
       // & > .van-col.active {
       //   background: #F22E3C;
@@ -1033,7 +1034,7 @@ export default {
       }
       .right {
         text-align: right;
-        color: #D7000F;
+        color: #ee0a24;
       }
     }
     .tip {
@@ -1144,7 +1145,7 @@ export default {
   
 }
 .active {
-  background: #D7000F !important;
+  background: #ee0a24 !important;
   color: #fff !important;
 }
 .mianBox::-webkit-scrollbar {
@@ -1159,7 +1160,7 @@ export default {
 }
 /*特殊处理 */
 /deep/ .van-field__control{
-  color: #D7000F !important;
+  color: #ee0a24 !important;
   margin-left:0;
   margin-top:2px;
 }
@@ -1185,6 +1186,6 @@ export default {
   stroke:rgb(255, 255, 255)!important
 }
 .van-key--blue{
-  background: #D7000F;
+  background: #ee0a24;
 }
 </style>

+ 91 - 67
src/views/catering/index.vue

@@ -19,15 +19,15 @@
     <van-row class="bottom">
         <van-row class="orderList" v-if="active==0">
           <van-col span="24" v-for="(item,index) in order" :key="index" class="order" @click="orderOne(item)">
-              <van-col span="5" class="dcrText" style="margin-top:0">点餐人:</van-col>
-              <van-col offset="1" span="18" class="dcr" style="margin-top:0">{{item.orderUserName}}</van-col>
-              <van-col span="5" class="scAddressText">送餐地址:</van-col>
-              <van-col offset="1" span="18" class="scAddress">{{item.address}}</van-col>
-              <van-col span="5" class="statusText">当前状态:</van-col>
-              <van-col offset="1" span="18" :class="item.orderStatus == '3' ? 'status' : 'status1'">
+              <div class="left dcrText" style="margin-top:0">点餐人:</div>
+              <div class="right dcr" style="margin-top:0">{{item.orderUserName}}</div>
+              <div class="left scAddressText">送餐地址:</div>
+              <div span="18" class="right scAddress">{{item.address}}</div>
+              <div class="left statusText">当前状态:</div>
+              <div class="right" :class="item.orderStatus == '3' ? 'status' : 'status1'">
                   {{item.orderStatus == "0" ? "待接单" : item.orderStatus == "1" ? "配餐中" : item.orderStatus == "2" ? "送餐中"  : "已完成"}}
-              </van-col>
-              <van-steps :active="item.orderStatus == '0' ? '-1' : item.orderStatus" v-if="item.orderStatus != '3'"  active-color="#D7000F" inactive-color="#999999">
+              </div>
+              <van-steps :active="item.orderStatus == '0' ? '-1' : item.orderStatus" v-if="item.orderStatus != '3'"  active-color="#ee0a24" inactive-color="#999999">
                 <van-step>{{ item.orderStatus == 0 ? '待接单' : item.orderStatus == 1 ? '已接单' : item.orderStatus == 2 ? '已接单' : '接单' }}</van-step>
                 <van-step>{{ item.orderStatus == 1 ? '配餐中' : item.orderStatus == 2 ? '已配餐' : '配餐' }}</van-step>
                 <van-step>{{ item.orderStatus == 2 ? '送餐中' : '送餐' }}</van-step>
@@ -37,15 +37,15 @@
         </van-row>
         <van-row class="orderList" v-if="active==1">
           <van-col span="24" v-for="(item,index) in order" :key="index" class="order" @click="orderOne(item)">
-              <van-col span="5" class="dcrText" style="margin-top:0">点餐人:</van-col>
-              <van-col offset="1" span="18" class="dcr" style="margin-top:0">{{item.orderUserName}}</van-col>
-              <van-col span="5" class="scAddressText" >送餐地址:</van-col>
-              <van-col offset="1" span="18" class="scAddress">{{item.address || "-"}}</van-col>
-              <van-col span="5" class="statusText">当前状态:</van-col>
-              <van-col offset="1" span="18" :class="item.orderStatus == '3' ? 'status' : 'status1'">
+              <div class="left dcrText" style="margin-top:0">点餐人:</div>
+              <div class="right dcr" style="margin-top:0">{{item.orderUserName}}</div>
+              <div class="left scAddressText" >送餐地址:</div>
+              <div class="right scAddress">{{item.address || "-"}}</div>
+              <div class="left statusText">当前状态:</div>
+              <div class="right" :class="item.orderStatus == '3' ? 'status' : 'status1'">
                   {{item.orderStatus == "0" ? "待接单" : item.orderStatus == "1" ? "配餐中" : item.orderStatus == "2" ? "送餐中"  : "已完成"}}
-              </van-col>
-              <!-- <van-steps :active="item.orderStatus == '0' ? '-1' : item.orderStatus" v-if="item.orderStatus != '3'"  active-color="#D7000F" inactive-color="#999999">
+              </div>
+              <!-- <van-steps :active="item.orderStatus == '0' ? '-1' : item.orderStatus" v-if="item.orderStatus != '3'"  active-color="#ee0a24" inactive-color="#999999">
                 <van-step>{{ item.orderStatus == 0 ? '待接单' : item.orderStatus == 1 ? '已接单' : item.orderStatus == 2 ? '已接单' : '接单' }}</van-step>
                 <van-step>{{ item.orderStatus == 1 ? '配餐中' : item.orderStatus == 2 ? '已配餐' : '配餐' }}</van-step>
                 <van-step>{{ item.orderStatus == 2 ? '送餐中' : '送餐' }}</van-step>
@@ -57,18 +57,18 @@
     <van-dialog v-model="show" class="pcDialog">
        <van-row class="orderDetails">
            <van-col class="order" span="24">
-              <van-col span="7" style="margin-top:0">订餐人:</van-col>
-              <van-col offset="1" span="16" style="margin-top:0">{{orderDetails.orderUserName || '-'}}</van-col>
-              <van-col span="7">餐别:</van-col>
-              <van-col offset="1" span="16">{{orderDetails.mType || '-'}}</van-col>
-              <van-col span="7">手机号:</van-col>
-              <van-col offset="1" span="16">{{orderDetails.phone || '-'}}</van-col>
-              <van-col span="7">送餐地址:</van-col>
-              <van-col offset="1" span="16">{{orderDetails.address  || "-"}}</van-col>
-              <van-col span="7">下单时间:</van-col>
-              <van-col offset="1" span="16">{{orderDetails.orderTime || '-'}}</van-col>
-              <van-col span="7">备注:</van-col>
-              <van-col offset="1" span="16">{{orderDetails.remark || '-'}}</van-col>
+              <div class="left" style="margin-top:0">订餐人:</div>
+              <div class="right" style="margin-top:0">{{orderDetails.orderUserName || '-'}}</div>
+              <div class="left">餐别:</div>
+              <div class="right">{{orderDetails.mType || '-'}}</div>
+              <div class="left">手机号:</div>
+              <div class="right">{{orderDetails.phone || '-'}}</div>
+              <div class="left">送餐地址:</div>
+              <div class="right">{{orderDetails.address  || "-"}}</div>
+              <div class="left">下单时间:</div>
+              <div class="right">{{orderDetails.orderTime || '-'}}</div>
+              <div class="left">备注:</div>
+              <div class="right">{{orderDetails.remark || '-'}}</div>
            </van-col>
           <van-col class="detailsText">配餐明细</van-col>
           <van-col  span="24"  class="dishes">
@@ -121,25 +121,30 @@ export default {
     document.title = '中国东信智慧园区'
     this.orderStatus()
     if(this.$route.query.id){
-        this.orderStatus()
+        this.orderStatus2()
         setTimeout(()=>{
             for(let i =0;i<this.order.length;i++){
-                console.log(this.order[i].id)
                 if(this.order[i].id == this.$route.query.id){
+                    if(this.order[i].orderStatus == '1' || this.order[i].orderStatus == '2'|| this.order[i].orderStatus == '0'){
+                        this.active= 0
+                    }else{
+                        this.active= 1
+                    }
                     this.orderOne(this.order[i])
                 }
             }
         },1000)
         
     }else{
-        this.orderStatus()
+        this.orderStatus2()
     }
     
   },
   methods: {
       //返回上级
     fanhuiBtn() {
-        this.$router.push({ path: "/home"}) 
+        window.href = "https://smartpark.caih.com/h5/#/home/feature"
+        // this.$router.go(-1)
     },
     //订单查询
     orderStatus(id){
@@ -175,6 +180,31 @@ export default {
         }
        
       
+    },
+    //订单查询
+    orderStatus2(){
+        let data = {
+            current:1,
+            size:500,
+            orderStatus:undefined,
+            statusList:[0,1,2,3]
+        }
+            //历史订单
+        axios.post(`https://smartpark.caih.com/dxapi/dreOrder/page`,data).then(res => { 
+            const data = res.data.data.records
+            this.number = data.length
+            if(this.number == "0"){
+                this.number = undefined
+            }
+            if(data.length>99){
+                this.number = data.length
+            }
+            this.order  = data
+            this.status = true
+        })
+  
+       
+      
     },
     //active切换
     activeSelect(){
@@ -184,20 +214,6 @@ export default {
             this.orderStatus(3)
         }
     },
-    // //订单详情
-    // orderOne(row){
-    //     this.orderDetails = row
-    //     axios.get(`https://smartpark.caih.com/dxapi/system/config/configKey/dre_urgency_phone`).then(res => { 
-    //         this.orderDetails.jjPhone  = res.data.data
-    //         //订单详情
-    //         axios.get(`https://smartpark.caih.com/dxapi/dreOrderDetail/listByOrder?orderId=${row.id}`).then(res => { 
-    //             this.dishes = res.data.data
-    //             this.show = true
-    //         })
-            
-    //     })
-        
-    // },
     //订单详情
     orderOne(row){
         this.orderDetails = row
@@ -268,8 +284,6 @@ export default {
                 })
             })
         }
-        
-        
     },
     //关闭
     close(id){
@@ -305,21 +319,26 @@ export default {
         .orderList{
             .order{
                 padding:15px;
-                .dcrText,.scAddressText,.statusText{
+                div{
+                    font-size: 14px;
+                    float:left;
+                    line-height:26px;
+                }
+                .left{
+                    width:30%;
+                    display: inline-block;
                     color:#999999;
-                    
+                    text-align: left;
                 }
-                .dcr,.scAddress,.status{
+                .right{
+                    width:70%;
+                    display: inline-block;
                     color:#333;
                     text-align: right;
                 }
-                div{
-                    font-size: 14px;
-                    margin-top:8px;
-                    height:21px;
-                }
+
                 .status1{
-                    color:#D7000F;
+                    color:#ee0a24;
                     text-align: right;
                 }
                 .van-steps{
@@ -353,17 +372,22 @@ export default {
                 padding:0px 16px 20px;
                 border-bottom:1px solid #F0F0F0;
                 div{
-                    margin-top:8px;
-                    line-height: 20px;
-                    height:21px;
+                    float:left;
+                    line-height:26px;
                 }
-                div:nth-child(odd){
+                .left{
+                    width:40%;
+                    display: inline-block;
                     text-align: left;
                     color:#999999;
+                    vertical-align: top;
                 }
-                div:nth-child(even){
+                .right{
+                    width:60%;
+                    display: inline-block;
                     text-align: right;
-                    color:#333;  
+                    color:#333; 
+                    vertical-align: top;
                 }
             }
         }
@@ -419,12 +443,12 @@ export default {
             
             .zt{
                 color: #fff;
-                background:#D7000F;
+                background:#ee0a24;
             }
             .gb{
-                 color: #D7000F;
+                 color: #ee0a24;
                 background:#fff;
-                border:1px solid #D7000F;
+                border:1px solid #ee0a24;
             }
             .overTime{
                 background-color: #ccc;
@@ -462,7 +486,7 @@ export default {
     left:24px;
     color:#fff;
     margin-left:20px;
-    background-color: #D7000F;
+    background-color: #ee0a24;
     font-size: 10px;
 }
 .pcDialog .van-dialog__footer{

+ 1 - 1
src/views/home/index.vue

@@ -477,7 +477,7 @@ export default {
       left: -10%;     //椭圆左边隐藏10%,右边隐藏10%
       top: 0;
       border-radius: 0 0 200% 200%;  //左上角,右上角,右下角,左下角
-      background-image: linear-gradient(180deg, #FF4747 0%, #D7000F 100%);
+      background-image: linear-gradient(180deg, #FF4747 0%, #ee0a24 100%);
     }
     .people{
       width:100%;

+ 7 - 7
src/views/login/index.vue

@@ -102,7 +102,7 @@ export default {
   mounted() {
 
     document.title = '中国东信智慧园区'
-    //Cookies.set("openid57",'o5P6I5tLj-TjrK7leWUT8EFmTCa4') //本地测试
+    Cookies.set("openid57",'o5P6I5tLj-TjrK7leWUT8EFmTCa4') //本地测试
     if(Cookies.get('rememberMe57')){
       this.loginForm.rememberMe = Boolean(Cookies.get('rememberMe57'))
     }
@@ -185,8 +185,8 @@ export default {
     },
     login_info() {
       if(Cookies.get("openid57") && Cookies.get("username57") && Cookies.get("password57")){
-        window.location.href = "https://smartpark.caih.com/vuepay/#/home"
-        //this.$router.push({ path: `/home`}) 
+        //window.location.href = "https://smartpark.caih.com/vuepay/#/home"
+        this.$router.push({ path: `/home`}) 
       }else{
         this.$refs.loginForm.validate(valid => {
           if (valid) {
@@ -242,8 +242,8 @@ export default {
                           }
                         }
                         setTimeout(()=>{
-                          //this.$router.push({ path: `/home`}) 
-                          window.location.href = "https://smartpark.caih.com/vuepay/#/home"
+                          this.$router.push({ path: `/home`}) 
+                          //window.location.href = "https://smartpark.caih.com/vuepay/#/home"
                         },200)
                      })
                     })
@@ -394,8 +394,8 @@ export default {
     width:100%;
     margin-top:10px;
     color: #fff;
-    background-color: #D7000F;
-    border-color: #D7000F;
+    background-color: #ee0a24;
+    border-color: #ee0a24;
     border-radius: 4px;
   }
 

+ 6 - 6
src/views/orderingFood/address/index.vue

@@ -23,7 +23,7 @@
     <van-row class="middle">
         <van-col :span="24" class="addressWrap">
           <van-col :span="24" class="address room" v-for="(item,index) in addressList" :key="index" @click="change(item.id)">
-              <van-col :span="24" class="name" :style="item.id == form.id ? 'color:#d7000f' :''" >{{item.name}}</van-col>
+              <van-col :span="24" class="name" :style="item.id == form.id ? 'color:#ee0a24' :''" >{{item.name}}</van-col>
               <van-image v-if="item.id == form.id"
                 :src="require('../../../assets/image/gx.png')"
                 class="gx"
@@ -41,7 +41,7 @@
     </van-col>
     <van-col class="remarks">
         <van-col class="remarksText" :span="24">备注信息(非必填):</van-col>
-        <textarea type="text" placeholder="请输入备注信息" v-model="form.remarks" class="remarksInput" rows="3" maxlength="40" />
+        <textarea type="text" placeholder="请输入备注信息" v-model="form.remarks" class="remarksInput" rows="3" maxlength="70" />
     </van-col>
     <van-row class="bottom">
       <van-row class="settlement">
@@ -221,7 +221,7 @@ export default {
         font-size: 18px;
         font-weight: 700;
         vertical-align: middle;
-        color: #d7000f;
+        color: #ee0a24;
       }
       .type {
         margin-top: -6px;
@@ -300,7 +300,7 @@ export default {
         font-size: 15px;
         color: #666666;
         .money {
-          color: #d7000f;
+          color: #ee0a24;
           font-size: 18px;
         }
       }
@@ -310,7 +310,7 @@ export default {
       right: 0;
       bottom: 0;
       width: 40%;
-      background: #d7000f;
+      background: #ee0a24;
       color: #fff;
       text-align: center;
       font-size: 16px;
@@ -369,7 +369,7 @@ export default {
   line-height: 20px;
 }
 .van-dialog__confirm{
-  background:#D7000F;
+  background:#ee0a24;
   color:#fff;
   font-weight: 700;
   font-size: 16px;

+ 535 - 0
src/views/orderingFood/index copy.vue

@@ -0,0 +1,535 @@
+<template>
+  <div class="mianBox">
+    <van-row class="headerBox" >
+      <van-col class="returnWrap" @click="fanhuiBtn">
+        <van-image class="arrow-left"
+          :src="require('../../assets/image/left.png')"
+        />
+        <van-col class="return">返回</van-col>
+      </van-col>
+      <van-col class="title">{{title}}</van-col>
+    </van-row>
+    <van-row class="top">
+        <van-row class="timeType">
+            <van-col class="describe">今日{{type}}菜品推荐:<span class="time">(点餐时间:{{time}})</span></van-col>
+        </van-row>
+        <van-row class="RecommendedDishes" gutter="43">
+          <van-col  span="12" v-for="(item,index) in RecommendedDishes" :key="index" class="dishes" >
+            <div class="name">{{item.name}}</div>
+            <div class="price">¥{{item.price}}</div>
+          </van-col>
+        </van-row>
+        <van-button  type="danger" @click="diancan" class="button">去点餐</van-button>
+    </van-row>
+    <van-row class="bottom">
+        <van-row class="title">
+            <van-col span="12" class="describe">最近点餐:</van-col>
+            <van-col span="12" class="allOrder" @click="allOrder">
+                <span>所有订单</span>
+                <van-image :src="require('../../assets/image/right2.png')" class="right_icon"  />
+            </van-col>
+        </van-row>
+        <van-row class="orderList">
+          <van-row span="24" v-for="(item,index) in order" :key="index" class="order" @click="orderOne(item)">
+              <van-col span="5" class="moneyText">下单金额:</van-col>
+              <van-col offset="1" span="18" class="money" >¥{{item.totalMoney}}</van-col>
+              <van-col span="5" class="moneyText">已点菜品:</van-col>
+              <van-col offset="1" span="18" class="money">{{item.dishes}}</van-col>
+              <van-col span="5" class="orderTimeText">下单时间:</van-col>
+              <van-col offset="1" span="18" class="orderTime">{{item.orderTime}}</van-col>
+              <van-col span="5" class="statusText">当前状态:</van-col>
+              <van-col offset="1" span="18" :class="item.orderStatus == '3' ? 'status' : 'status1'">
+                  {{item.orderStatus == "0" ? "待接单" : item.orderStatus == "1" ? "配餐中" : item.orderStatus == "2" ? "送餐中"  : "已完成"}}
+              </van-col>
+              <van-steps  :active="item.orderStatus == '0' ? '-1' : item.orderStatus" v-if="item.orderStatus != '3'"  active-color="#ee0a24" inactive-color="#999999">
+                <van-step>{{ item.orderStatus == 0 ? '待接单' : item.orderStatus == 1 ? '已接单' : item.orderStatus == 2 ? '已接单' : '接单' }}</van-step>
+                <van-step>{{ item.orderStatus == 1 ? '配餐中' : item.orderStatus == 2 ? '已配餐' : '配餐' }}</van-step>
+                <van-step>{{ item.orderStatus == 2 ? '送餐中' : '送餐' }}</van-step>
+             </van-steps>
+          </van-row>
+          <!-- <van-col span="24" class="noMore" v-if="over">{{dd}}</van-col> -->
+           <van-col span="24" class="noMore" v-if="over">没有更多数据了</van-col>
+          <van-col span="24" class="noData" v-if="over2">暂无点餐信息</van-col>
+        </van-row>
+    </van-row>
+    <van-dialog v-model="open" class="pcDialog">
+      <van-row class="orderDetails">
+        <van-col class="detailsTitle">点餐明细</van-col>
+        <van-col class="order" span="24">
+            <van-col span="7" style="margin-top:0">订餐人:</van-col>
+            <van-col offset="1" span="16" style="margin-top:0">{{orderDetails.orderUserName || '-'}}</van-col>
+            <van-col span="7">餐别:</van-col>
+            <van-col offset="1" span="16">{{orderDetails.mType || '-'}}</van-col>
+            <van-col span="7">手机号:</van-col>
+            <van-col offset="1" span="16">{{orderDetails.phone || '-'}}</van-col>
+            <van-col span="7">送餐地址:</van-col>
+            <van-col offset="1" span="16">{{orderDetails.address  || "-"}}</van-col>
+            <van-col span="7">备注:</van-col>
+            <van-col offset="1" span="16">{{orderDetails.remark || '-'}}</van-col>
+        </van-col>
+        <van-col class="detailsText">已点菜品</van-col>
+        <van-col  span="24"  class="dishes">
+          <van-col span="24" v-for="(item,index) in dishes" :key="index" class="list">
+              <van-col span="12" class="name">{{item.mName}}</van-col>
+              <van-col span="12" class="num">{{item.mCount}}份</van-col>
+          </van-col>
+        </van-col>
+        <van-col class="statusSelect">
+          <van-col class="select gb" @click="close">
+            关闭
+          </van-col>
+        </van-col>
+        
+      </van-row>
+    </van-dialog>
+  </div>
+</template>
+<script>
+import { getNowTime } from "@/assets/js/dataFormate.js";
+import Cookies from "js-cookie";
+import {
+  Dialog,
+  Toast,
+} from "vant";
+export default {
+  data() {
+    return {
+      dd:undefined,
+      status:false,
+      title:"自助点餐",
+      type:undefined,
+      time:undefined,
+      RecommendedDishes:[],
+      order:[],
+      over:false,//数据拉载完成
+      over2:false,
+      open:false,
+      orderDetails:{},
+      dishes:[],
+    };
+  },
+  components: {
+    [Dialog.name]: Dialog,
+    [Toast.name]: Toast,
+  },
+  created() {
+    let nowTime = getNowTime().split(" ")[1].substring(0,2)
+    if(0 <= nowTime && nowTime < 9){
+      this.type = "早餐"
+      this.time = "00:00 - 09:00"
+    }
+    if(9<= nowTime  && nowTime < 13){
+      this.type = "午餐"
+      this.time = "09:00 - 13:00"
+    }
+    if(13<= nowTime && nowTime < 19){
+      this.type = "晚餐"
+      this.time = "13:00 - 19:00"
+    }
+    if(19<= nowTime && nowTime < 24){
+      this.type = "宵夜"
+      this.time = "19:00 - 24:00"
+    }
+    if(this.$route.query.token){
+      this.getToken()
+    }else if(localStorage.getItem("tokenERP")){
+      
+    }else{
+      Toast("没有获取token信息")
+    }
+    
+  },
+  mounted(){
+    //获取菜单
+    axios.get(`https://smartpark.caih.com/dxapi/dreMenu/list?current=1&size=500&type=${this.type}&isRecommend=1`).then(res => { 
+     const data = res.data.data.records
+     this.RecommendedDishes  = data
+    })
+
+    document.title = '中国东信智慧园区'
+    let startTime = getNowTime().split(" ")[0] + " 00:00:00"
+    let endTime = getNowTime().split(" ")[0] + " 23:59:59"
+    //历史订单
+      axios.post(`https://smartpark.caih.com/dxapi/dreOrder/page`,{
+        current:1,
+        size:500,
+        orderUserName:Cookies.get("nickName57"),
+        startTime:startTime,
+        endTime:endTime,
+      }).then(res => { 
+        const data = res.data.data.records
+        const arr = data.slice(0,5)
+        if(arr.length>0){
+          for(let a =0;a<arr.length;a++){
+            arr[a].dishes = ''
+            if(arr[a].dreOrderDetails && arr[a].dreOrderDetails.length>0){
+                for(let i =0;i<arr[a].dreOrderDetails.length;i++){
+                  arr[a].dishes = arr[a].dishes + '、'  + arr[a].dreOrderDetails[i].mName
+                }
+              }
+          }
+          for(let i =0;i<arr.length;i++){
+            arr[i].dishes = arr[i].dishes.substr(1,arr[i].dishes.length - 1)
+          }
+        }
+        this.order = arr
+        if(this.order.length>0){
+          this.over = true
+          this.over2 = false
+        }else{
+          this.over = false
+          this.over2 = true
+        }
+        this.status = true
+      })
+  },
+  methods: {
+    getToken(){
+      localStorage.setItem("tokenERP",this.$route.query.token)
+      axios({//查询信息
+        method: 'get',
+        url: 'https://smartpark.caih.com/zkxt/api/thirdparty/v1/user/getZkUserByCipher?cipher=' + this.$route.query.token,
+        timeout: 10000,
+      }).then(res =>{
+        if(res.data?.data?.id){
+          Cookies.set("nickName57", res.data.data.name, { expires: 300 });
+          localStorage.setItem("user_wt", res.data.data.id)
+        }
+      }).catch(err =>{
+        this.userNoAlert()
+      });
+    },
+    userNoAlert(){
+      Toast("当前账户初始流程中,请耐心等待或联系管理人员查询")
+    },
+    /**点餐 */
+    diancan(){
+      this.$router.push({ path: "/orderService"})
+    },
+    /**所有订单 */
+    allOrder(){
+      this.$router.push({ path: "/orderList"})
+    },
+    /** 返回上级或app目录页 */
+    fanhuiBtn(){
+      //this.$router.back()
+      this.$router.go(-1)
+      //this.$router.push({ path: "/home"})
+    },
+    orderOne(row){
+      this.open = true
+      this.orderDetails = row
+      this.dishes = row.dreOrderDetails
+    },
+    close(){
+      this.open = false
+    }
+  },
+};
+</script>
+<style lang="scss" scoped>
+.mianBox{
+    width:100%;
+    height:100%;
+    overflow: scroll;
+  
+    background-color: #F9F9F9 !important;
+    .top{
+        .timeType{
+            padding:13px 16px;
+            text-align: left;
+            box-shadow: inset 0px -1px 0px 0px rgba(232,232,232,1);
+            .describe{
+                font-size: 15px;
+                font-weight: 700;
+                width:100%;
+                 .time{
+                    font-weight: 400;
+                  }
+            }
+           
+        }
+        .RecommendedDishes{
+          margin:8px 0 24px;
+          padding:5px 15px 0px;
+            .dishes{
+                height:36px;
+                line-height: 36px;
+                font-size: 14px;
+                background-clip:content-box;
+                position: relative;
+                width:calc(50vw - 36px);
+                .name{
+                  color:#666666;
+                  text-align: left;
+                  border-bottom:1px dashed #ccc;
+                  width:66.7% !important;
+                  display: inline-block;
+                  position: absolute;
+                  left:0;
+                  //width:60px; //要加宽度 ,若是span等行内元素,加个display:inline-block;
+                  white-space: nowrap;
+                  overflow: hidden;
+                  text-overflow: ellipsis;
+                }
+                .price{
+                  color:#999999;
+                  text-align: right;
+                  border-bottom:1px dashed #ccc;
+                  width:33.3% !important;
+                  display: inline-block;
+                  position: absolute;
+                  right:0; 
+                }
+            }
+            .dishes:nth-child(2n){
+              margin-left:42px;
+            }
+        }
+        .button{
+            width:calc(100% - 30px);
+            margin:0px 15px 24px;
+            border-radius: 5px;
+            font-size: 17px;
+            height:44px;
+            line-height: 44px;
+            border:none;
+            background: #ee0a24;
+        }
+    }
+    .bottom{
+        background-color: #fff;
+        margin-top:8px;
+        .title{
+            padding:0px 15px;
+            box-shadow: inset 0px -1px 0px 0px rgba(232,232,232,1);
+            text-align: left;
+            height:48px;
+            line-height: 48px;
+            .describe{
+                font-size: 15px;
+                font-weight: 700;
+            }
+            .allOrder{
+                font-size: 14px;
+                font-weight: 400;
+                text-align: right;
+                color:#666;
+                .right_icon{
+                    width:6px !important;
+                    margin-left:5px;
+                }
+            } 
+        }
+        .orderList{
+            .order{
+                font-size: 14px;
+                padding:14px 15px 20px;
+                .moneyText,.orderTimeText,.statusText{
+                    color:#999999;
+                    text-align: left;
+                }
+                .money,.orderTime,.status{
+                    color:#333;
+                    text-align: right;
+                     white-space: nowrap;
+                    /* 超出隐藏 */
+                    overflow: hidden;
+                    /* 文本超出显示成... */
+                    text-overflow: ellipsis;
+                }
+                div{
+                    font-size: 14px;
+                    margin-top:8px;
+                    line-height: 20px;
+                }
+                .status1{
+                    color:#ee0a24;
+                    text-align: right;
+                }
+                .van-steps{
+                    width:100%;
+                    background:transparent;
+                    height:40px;
+                    padding-bottom:20px;
+                    
+                }
+            }
+            .order:nth-child(odd){
+                background-color: #fff;
+            }
+            .order:nth-child(even){
+                background-color: #F9F9F9;
+            }
+            
+        }
+        .noMore{
+            background-color: #F0F0F0;
+            color:#999999;
+            text-align: center;
+            padding:20px 0;
+            font-size: 12px;
+        }
+        .noData{
+          height:200px;
+          line-height: 200px;
+          color:#999999;
+          text-align: center;
+          font-size: 12px;
+          background-color: #ffffff;
+        }
+    }
+    .pcDialog{
+        border-radius: 5px;
+        width:85%;
+        padding:20px 0;
+        .orderDetails{
+            .detailsTitle{
+              font-size: 18px;
+              margin-top:0px;
+              text-align: center;
+              font-weight: 700;
+              width:100%;
+            }
+            .order{
+                padding:0px 16px 20px;
+                border-bottom:1px solid #F0F0F0;
+                div{
+                    margin-top:8px;
+                    line-height: 20px;
+                }
+                div:nth-child(odd){
+                    text-align: left;
+                    color:#999999;
+                }
+                div:nth-child(even){
+                    text-align: right;
+                    color:#333;  
+                }
+            }
+        }
+        .detailsText,.jjPhone{
+            font-size: 15px;
+            margin:20px 16px 8px;
+            font-weight: 700;
+        }
+        .jjPhone{
+            margin:20px 16px 0;
+        }
+        .dishes{
+            max-height:calc(100vh - 550px);
+            overflow-y: scroll;
+            padding:0px 16px;
+            .list{
+                color:#333;
+                font-size: 15px;
+                height:40px;
+                line-height: 40px;
+                width:100%;
+                div:nth-child(odd){
+                    text-align: left;
+                    padding-left:10px;
+                }
+                div:nth-child(even){
+                    text-align: right;
+                    padding-right:10px;
+                }
+            }
+            
+            .list:nth-child(odd){
+                background: #F9F9F9;
+            }
+            .list:nth-child(even){
+                background: #F0F0F0;
+            }
+            
+        }
+        .statusSelect{
+            margin:20px 0 0;
+            width:100%;
+            box-sizing: border-box;
+            padding:0 16px;
+            .select{
+                height:44px;
+                line-height: 44px; 
+                font-size: 17px;
+                text-align: center;
+                border-radius: 5px;
+                width:100%;
+            }
+
+            .gb{
+                color: #fff;
+                background:#ee0a24;
+                border-radius: 5px;
+            }
+        }
+    }
+    
+}
+
+</style>
+<style>
+.van-steps__items{
+    margin-top:-50px !important;
+    padding:0 14px;
+}
+.van-step__title{
+    position: absolute !important;
+    top:40px;
+    font-size: 12px !important;
+    left:-15px;
+    color:#333;
+}
+.van-step--horizontal:nth-child(2) .van-step__title{
+  width:68px;
+  text-align: right;
+}
+.van-step--horizontal:nth-child(3) .van-step__title{
+  width:75px;
+  text-align: center;
+}
+.van-step--finish .van-step__title{
+  margin-left:0px !important;
+}
+.van-step__circle{
+  width:8px;
+  height:8px;
+}
+
+.van-step--horizontal .van-step__circle-container{
+  padding:0;
+  left:0;
+  margin-top:1px;
+}
+.van-step--horizontal:last-child .van-step__title{
+  margin-left:-40px;
+}
+.van-step__line{
+  background:transparent !important;
+  border-bottom:1px dashed #ccc;
+}
+.van-step--finish .van-step__line{
+  background:#ee0a24 !important;
+  border:none;
+}
+.van-step--horizontal:last-child .van-step__circle-container{
+  right:12px !important;
+}
+.van-step--horizontal:last-child .van-step__circle-container{
+  right:12px !important;
+}
+.van-step__title--active{
+  color:#333 !important;
+}
+.van-step__icon--active{
+  background: #ee0a24;
+  width:8px;
+  height:8px;
+  border-radius: 50% !important;
+}
+.van-step--horizontal .van-step__icon{
+  font-size: 0;
+}
+
+</style>

+ 81 - 53
src/views/orderingFood/index.vue

@@ -11,12 +11,13 @@
     </van-row>
     <van-row class="top">
         <van-row class="timeType">
-            <van-col class="describe">今日{{type}}菜品推荐:<span class="time">(点餐时间:{{time}})</span></van-col>
+            <van-col class="describe" v-if="hasFood">今日{{type}}菜品推荐:<span class="time">(点餐时间:{{time}})</span></van-col>
+            <van-col class="describe" v-if="!hasFood">今日点餐时间已结束</van-col>
         </van-row>
         <van-row class="RecommendedDishes" gutter="43">
           <van-col  span="12" v-for="(item,index) in RecommendedDishes" :key="index" class="dishes" >
             <div class="name">{{item.name}}</div>
-            <div class="price">¥{{item.price}}</div>
+            <div class="price">¥{{Number(item.price).toFixed(2)}}</div>
           </van-col>
         </van-row>
         <van-button  type="danger" @click="diancan" class="button">去点餐</van-button>
@@ -31,17 +32,17 @@
         </van-row>
         <van-row class="orderList">
           <van-row span="24" v-for="(item,index) in order" :key="index" class="order" @click="orderOne(item)">
-              <van-col span="5" class="moneyText">下单金额:</van-col>
-              <van-col offset="1" span="18" class="money" >¥{{item.totalMoney}}</van-col>
-              <van-col span="5" class="moneyText">已点菜品:</van-col>
-              <van-col offset="1" span="18" class="money">{{item.dishes}}</van-col>
-              <van-col span="5" class="orderTimeText">下单时间:</van-col>
-              <van-col offset="1" span="18" class="orderTime">{{item.orderTime}}</van-col>
-              <van-col span="5" class="statusText">当前状态:</van-col>
-              <van-col offset="1" span="18" :class="item.orderStatus == '3' ? 'status' : 'status1'">
+              <div class="left moneyText">下单金额:</div>
+              <div class="right money" >¥{{Number(item.totalMoney).toFixed(2)}}</div>
+              <div class="left moneyText">已点菜品:</div>
+              <div class="right money">{{item.dishes}}</div>
+              <div class="left orderTimeText">下单时间:</div>
+              <div class="right orderTime">{{item.orderTime}}</div>
+              <div class="left statusText">当前状态:</div>
+              <div class="right" :class="item.orderStatus == '3' ? 'status' : 'status1'">
                   {{item.orderStatus == "0" ? "待接单" : item.orderStatus == "1" ? "配餐中" : item.orderStatus == "2" ? "送餐中"  : "已完成"}}
-              </van-col>
-              <van-steps  :active="item.orderStatus == '0' ? '-1' : item.orderStatus" v-if="item.orderStatus != '3'"  active-color="#D7000F" inactive-color="#999999">
+              </div>
+              <van-steps  :active="item.orderStatus == '0' ? '-1' : item.orderStatus" v-if="item.orderStatus != '3'"  active-color="#ee0a24" inactive-color="#999999">
                 <van-step>{{ item.orderStatus == 0 ? '待接单' : item.orderStatus == 1 ? '已接单' : item.orderStatus == 2 ? '已接单' : '接单' }}</van-step>
                 <van-step>{{ item.orderStatus == 1 ? '配餐中' : item.orderStatus == 2 ? '已配餐' : '配餐' }}</van-step>
                 <van-step>{{ item.orderStatus == 2 ? '送餐中' : '送餐' }}</van-step>
@@ -56,16 +57,16 @@
       <van-row class="orderDetails">
         <van-col class="detailsTitle">点餐明细</van-col>
         <van-col class="order" span="24">
-            <van-col span="7" style="margin-top:0">订餐人:</van-col>
-            <van-col offset="1" span="16" style="margin-top:0">{{orderDetails.orderUserName || '-'}}</van-col>
-            <van-col span="7">餐别:</van-col>
-            <van-col offset="1" span="16">{{orderDetails.mType || '-'}}</van-col>
-            <van-col span="7">手机号:</van-col>
-            <van-col offset="1" span="16">{{orderDetails.phone || '-'}}</van-col>
-            <van-col span="7">送餐地址:</van-col>
-            <van-col offset="1" span="16">{{orderDetails.address  || "-"}}</van-col>
-            <van-col span="7">备注:</van-col>
-            <van-col offset="1" span="16">{{orderDetails.remark || '-'}}</van-col>
+            <div class="left" style="margin-top:0">订餐人:</div>
+            <div class="right" style="margin-top:0">{{orderDetails.orderUserName || '-'}}</div>
+            <div class="left">餐别:</div>
+            <div class="right">{{orderDetails.mType || '-'}}</div>
+            <div class="left">手机号:</div>
+            <div class="right">{{orderDetails.phone || '-'}}</div>
+            <div class="left">送餐地址:</div>
+            <div class="right">{{orderDetails.address  || "-"}}</div>
+            <div class="left">备注:</div>
+            <div class="right">{{orderDetails.remark || '-'}}</div>
         </van-col>
         <van-col class="detailsText">已点菜品</van-col>
         <van-col  span="24"  class="dishes">
@@ -116,19 +117,23 @@ export default {
     let nowTime = getNowTime().split(" ")[1].substring(0,2)
     if(0 <= nowTime && nowTime < 9){
       this.type = "早餐"
+      this.hasFood = true
       this.time = "00:00 - 09:00"
     }
     if(9<= nowTime  && nowTime < 13){
       this.type = "午餐"
+      this.hasFood = true
       this.time = "09:00 - 13:00"
     }
     if(13<= nowTime && nowTime < 19){
       this.type = "晚餐"
+      this.hasFood = true
       this.time = "13:00 - 19:00"
     }
-    if(19<= nowTime && nowTime < 24){
-      this.type = "宵夜"
-      this.time = "19:00 - 24:00"
+    if(19<= nowTime){
+      this.type = "休业"
+      this.hasFood = false
+      this.time = "00:00 - 09:00"
     }
     if(this.$route.query.token){
       this.getToken()
@@ -141,7 +146,7 @@ export default {
   },
   mounted(){
     //获取菜单
-    axios.get(`https://smartpark.caih.com/dxapi/dreMenu/list?current=1&size=500&type=${this.type}&isRecommend=1`).then(res => { 
+    axios.get(`https://smartpark.caih.com/dxapi/dreMenu/list?current=1&size=500&type=${this.type}&isRecommend=1&status=0`).then(res => { 
      const data = res.data.data.records
      this.RecommendedDishes  = data
     })
@@ -212,8 +217,9 @@ export default {
     },
     /** 返回上级或app目录页 */
     fanhuiBtn(){
+      window.location.href= "https://smartpark.caih.com/h5/#/home/feature"
       //this.$router.back()
-      this.$router.go(-1)
+      //this.$router.go(-1)
       //this.$router.push({ path: "/home"})
     },
     orderOne(row){
@@ -293,6 +299,8 @@ export default {
             font-size: 17px;
             height:44px;
             line-height: 44px;
+            border:none;
+            background: #ee0a24;
         }
     }
     .bottom{
@@ -321,28 +329,44 @@ export default {
         }
         .orderList{
             .order{
-                font-size: 14px;
+                font-size: 0;
                 padding:14px 15px 20px;
-                .moneyText,.orderTimeText,.statusText{
-                    color:#999999;
-                    text-align: left;
-                }
-                .money,.orderTime,.status{
-                    color:#333;
-                    text-align: right;
-                     white-space: nowrap;
-                    /* 超出隐藏 */
-                    overflow: hidden;
-                    /* 文本超出显示成... */
-                    text-overflow: ellipsis;
-                }
+                // .moneyText,.orderTimeText,.statusText{
+                    
+                // }
+                // .money,.orderTime,.status{
+                //     color:#333;
+                //     text-align: right;
+                //      white-space: nowrap;
+                //     /* 超出隐藏 */
+                //     overflow: hidden;
+                //     /* 文本超出显示成... */
+                //     text-overflow: ellipsis;
+                // }
                 div{
                     font-size: 14px;
-                    margin-top:8px;
-                    line-height: 20px;
+                    float:left;
+                    line-height:26px;
+                }
+                .left{
+                  width:40%;
+                  display: inline-block;
+                  color:#999999;
+                  text-align: left;
+                }
+                .right{
+                  width:60%;
+                  display: inline-block;
+                  text-align: right;
+                  white-space: nowrap;
+                  /* 超出隐藏 */
+                  overflow: hidden;
+                  /* 文本超出显示成... */
+                  text-overflow: ellipsis;
+                 
                 }
                 .status1{
-                    color:#D7000F;
+                    color:#ee0a24;
                     text-align: right;
                 }
                 .van-steps{
@@ -396,13 +420,17 @@ export default {
                     margin-top:8px;
                     line-height: 20px;
                 }
-                div:nth-child(odd){
-                    text-align: left;
-                    color:#999999;
+                .left{
+                  width:40%;
+                  display: inline-block;
+                  color:#999999;
+                  text-align: left;
                 }
-                div:nth-child(even){
-                    text-align: right;
-                    color:#333;  
+                .right{
+                  width:60%;
+                  display: inline-block;
+                  text-align: right;
+                  color:#333;  
                 }
             }
         }
@@ -458,7 +486,7 @@ export default {
 
             .gb{
                 color: #fff;
-                background:#D7000F;
+                background:#ee0a24;
                 border-radius: 5px;
             }
         }
@@ -508,7 +536,7 @@ export default {
   border-bottom:1px dashed #ccc;
 }
 .van-step--finish .van-step__line{
-  background:#D7000F !important;
+  background:#ee0a24 !important;
   border:none;
 }
 .van-step--horizontal:last-child .van-step__circle-container{
@@ -521,7 +549,7 @@ export default {
   color:#333 !important;
 }
 .van-step__icon--active{
-  background: #D7000F;
+  background: #ee0a24;
   width:8px;
   height:8px;
   border-radius: 50% !important;

+ 50 - 38
src/views/orderingFood/orderList/index.vue

@@ -12,16 +12,16 @@
     <van-row class="top">
         <van-row class="orderList">
           <van-col span="24" v-for="(item,index) in order" :key="index" class="order" @click="orderOne(item)">
-              <van-col span="5" class="moneyText">下单金额:</van-col>
-              <van-col offset="1" span="18" class="money">¥{{item.totalMoney}}</van-col>
-              <van-col span="5" class="moneyText">已点菜品:</van-col>
-              <van-col offset="1" span="18" class="money">{{item.dishes}}</van-col>
-              <van-col span="5" class="orderTimeText">下单时间:</van-col>
-              <van-col offset="1" span="18" class="orderTime">{{item.orderTime}}</van-col>
-              <van-col span="5" class="statusText">当前状态:</van-col>
-              <van-col offset="1" span="18" :class="item.orderStatus == '3' ? 'status' : 'status1'">
+              <div class="left moneyText" style="margin-top:0">下单金额:</div>
+              <div class="right money" style="margin-top:0">¥{{Number(item.totalMoney).toFixed(2)}}</div>
+              <div class="left moneyText">已点菜品:</div>
+              <div class="right money">{{item.dishes}}</div>
+              <div class="left  orderTimeText">下单时间:</div>
+              <div class="right orderTime">{{item.orderTime}}</div>
+              <div class="left statusText">当前状态:</div>
+              <div class="right" :class="item.orderStatus == '3' ? 'status' : 'status1'">
                   {{item.orderStatus == "0" ? "待接单" : item.orderStatus == "1" ? "配餐中" : item.orderStatus == "2" ? "送餐中"  : "已完成"}}
-              </van-col>
+              </div>
           </van-col>
           <van-col span="24" class="noMore" v-if="over">没有更多数据了</van-col>
           <van-col span="24" class="noData" v-if="over2">暂无点餐信息</van-col>
@@ -31,16 +31,16 @@
       <van-row class="orderDetails">
         <van-col class="detailsTitle">点餐明细</van-col>
         <van-col class="order" span="24">
-            <van-col span="7" style="margin-top:0">订餐人:</van-col>
-            <van-col offset="1" span="16" style="margin-top:0">{{orderDetails.orderUserName || '-'}}</van-col>
-            <van-col span="7">餐别:</van-col>
-            <van-col offset="1" span="16">{{orderDetails.mType || '-'}}</van-col>
-            <van-col span="7">手机号:</van-col>
-            <van-col offset="1" span="16">{{orderDetails.phone || '-'}}</van-col>
-            <van-col span="7">送餐地址:</van-col>
-            <van-col offset="1" span="16">{{orderDetails.address  || "-"}}</van-col>
-            <van-col span="7">备注:</van-col>
-            <van-col offset="1" span="16">{{orderDetails.remark || '-'}}</van-col>
+            <van-col class="left" style="margin-top:0">订餐人:</van-col>
+            <van-col class="right" style="margin-top:0">{{orderDetails.orderUserName || '-'}}</van-col>
+            <van-col class="left">餐别:</van-col>
+            <van-col class="right">{{orderDetails.mType || '-'}}</van-col>
+            <van-col class="left">手机号:</van-col>
+            <van-col class="right">{{orderDetails.phone || '-'}}</van-col>
+            <van-col class="left">送餐地址:</van-col>
+            <van-col class="right">{{orderDetails.address  || "-"}}</van-col>
+            <van-col class="left">备注:</van-col>
+            <van-col class="right">{{orderDetails.remark || '-'}}</van-col>
         </van-col>
         <van-col class="detailsText">已点菜品</van-col>
         <van-col  span="24"  class="dishes">
@@ -134,21 +134,30 @@ export default {
             .order{
                 font-size: 14px;
                 padding:14px 15px 20px;
-                .moneyText,.orderTimeText,.statusText{
-                    color:#999999;
-                    text-align: left;
-                }
-                .money,.orderTime,.status{
-                    color:#333;
-                    text-align: right;
-                }
                 div{
                     font-size: 14px;
-                    margin-top:8px;
-                    line-height: 20px;
+                    float:left;
+                    line-height:26px;
+                }
+                .left{
+                  width:40%;
+                  display: inline-block;
+                  color:#999999;
+                  text-align: left;
+                }
+                .right{
+                  width:60%;
+                  display: inline-block;
+                  text-align: right;
+                  color:#333; 
+                  white-space: nowrap;
+                  /* 超出隐藏 */
+                  overflow: hidden;
+                  /* 文本超出显示成... */
+                  text-overflow: ellipsis;
                 }
                 .status1{
-                    color:#D7000F;
+                    color:#ee0a24;
                     text-align: right;
                 }
                 .van-steps{
@@ -156,7 +165,6 @@ export default {
                     background:transparent;
                     height:40px;
                     padding-bottom:20px;
-                    
                 }
             }
             .order:nth-child(odd){
@@ -202,13 +210,17 @@ export default {
                     margin-top:8px;
                     line-height: 20px;
                 }
-                div:nth-child(odd){
-                    text-align: left;
-                    color:#999999;
+                .left{
+                  width:40%;
+                  display: inline-block;
+                  color:#999999;
+                  text-align: left;
                 }
-                div:nth-child(even){
-                    text-align: right;
-                    color:#333;  
+                .right{
+                  width:60%;
+                  display: inline-block;
+                  text-align: right;
+                  color:#333;  
                 }
             }
         }
@@ -264,7 +276,7 @@ export default {
 
             .gb{
                 color: #fff;
-                background:#D7000F;
+                background:#ee0a24;
                 border-radius: 5px;
             }
         }

+ 15 - 16
src/views/orderingFood/orderService/index.vue

@@ -62,7 +62,7 @@
                 >菜名:<span class="name">{{ item.name }}</span></van-col
               >
               <van-col span="24" class="text2"
-                >单价:<span class="money">¥{{ item.price }}</span></van-col
+                >单价:<span class="money">¥{{ Number(item.price).toFixed(2) }}</span></van-col
               >
             </van-col>
             <van-col span="12" class="right">
@@ -117,7 +117,7 @@ export default {
         { name: "早餐" },
         { name: "午餐" },
         { name: "晚餐" },
-        { name: "宵夜" },
+        // { name: "宵夜" },
       ],
       overTime:undefined,
     };
@@ -137,9 +137,9 @@ export default {
     console.log(this.$store.state.canbie)
     if(this.$store.state.canbie){
       this.typeValue = this.$store.state.canbie
-      if(nowTime <= 9){
+      if(0<=nowTime  && nowTime < 9){
         this.overTime = 0
-      }else if( 9< nowTime  && nowTime < 13){
+      }else if( 9<= nowTime  && nowTime < 13){
         this.overTime = 1
       }else if( 13<= nowTime && nowTime < 19){
         this.overTime = 2
@@ -147,18 +147,17 @@ export default {
         this.overTime = 3
       }
     }else{
-      if(nowTime <= 9){
+      if(nowTime < 9){
         this.typeValue = "早餐"
         this.overTime = 0
-      }else if( 9< nowTime  && nowTime < 13){
+      }else if( 9<= nowTime  && nowTime < 13){
         this.typeValue = "午餐"
         this.overTime = 1
       }else if( 13<= nowTime && nowTime < 19){
         this.typeValue = "晚餐"
         this.overTime = 2
       }else{
-        this.typeValue = "宵夜"
-        this.overTime = 3
+        
       }
     }
     if(JSON.stringify(this.footStoreData) != '[]'){
@@ -278,7 +277,7 @@ export default {
         font-size: 18px;
         font-weight: 700;
         vertical-align: middle;
-        color: #d7000f;
+        color: #ee0a24;
       }
       .type {
         margin-top: -12px;
@@ -304,7 +303,7 @@ export default {
           line-height: 48px;
           color:#666666;
           .determine{
-            color:#d7000f;
+            color:#ee0a24;
           }
         }
         .typeList{
@@ -320,7 +319,7 @@ export default {
             text-align: center;
           }
           .name:hover{
-            color:#d7000f;
+            color:#ee0a24;
           }
           .noName{
             cursor:not-allowed;
@@ -354,7 +353,7 @@ export default {
               font-weight: 700;
             }
             .money {
-              color: #d7000f;
+              color: #ee0a24;
             }
           }
           .right {
@@ -381,7 +380,7 @@ export default {
       .text {
         color: #666666;
         .money {
-          color: #d7000f;
+          color: #ee0a24;
         }
       }
     }
@@ -390,7 +389,7 @@ export default {
       right: 0;
       bottom: 0;
       width: 30%;
-      background: #d7000f;
+      background: #ee0a24;
       color: #fff;
       text-align: center;
     }
@@ -423,11 +422,11 @@ export default {
 }
 .van-stepper__minus, .van-stepper__plus{
   background:transparent !important;
-  border:1px solid #d7000f;
+  border:1px solid #ee0a24;
   
 }
 .van-stepper__minus::after, .van-stepper__minus::before, .van-stepper__plus::after, .van-stepper__plus::before{
-  background-color: #d7000f;
+  background-color: #ee0a24;
 }
 
 </style>

+ 433 - 0
src/views/orderingFood/orderService/index2.vue

@@ -0,0 +1,433 @@
+<template>
+  <div class="mianBox">
+    <van-row class="headerBox" >
+      <van-col class="returnWrap" @click="fanhuiBtn">
+        <van-image class="arrow-left"
+          :src="require('../../../assets/image/left.png')"
+        />
+        <van-col class="return">返回</van-col>
+      </van-col>
+      <van-col class="title">{{title}}</van-col>
+    </van-row>
+    <van-row class="top">
+      <van-row class="foodType">
+        <van-col class="describe" :span="12">
+          <van-image
+            :src="require('../../../assets/image/cj.png')"
+            class="cj"
+          />
+          <span class="describe">{{ typeValue }}菜单</span>
+        </van-col>
+        <van-col class="type" :span="11" @click="downStatus">
+          <van-col class="name" :span="24" >{{typeSelect}}<van-image
+            :src="require('../../../assets/image/xl.png')"
+            class="xl"
+          /></van-col>
+          
+        </van-col>
+        <van-popup
+          v-model="show"
+          position="bottom"
+          :style="{ 'max-height': '260px','overflow-y': 'hidden' }"
+          
+        >
+          <van-col :span="24" class="selectTitle">
+              <van-col :span="4" class="cancel" @click="cancel">
+                取消
+              </van-col>
+              <van-col :span="16" class="title">
+                请选择餐别
+              </van-col>
+              <van-col :span="4" class="determine" @click="determine">
+                确定
+              </van-col>
+          </van-col>
+          <van-col :span="24" class="typeList" v-for="(item,index) in typeList" :key="index" @click="change(item.name,index)">
+              <van-col :span="24" :class="index >= overTime ? 'name' : 'noName'"  >{{item.name}}</van-col>
+          </van-col>
+        </van-popup>
+      </van-row>
+    </van-row>
+    <van-row class="middle">
+      <van-row class="foodList" :gutter="20">
+        <van-col
+          span="24"
+          v-for="(item, index) in foodList"
+          :key="index"
+          class="foodWrap"
+        >
+          <van-col span="24" class="food">
+            <van-col span="12" class="left">
+              <van-col span="24" class="text1"
+                >菜名:<span class="name">{{ item.name }}</span></van-col
+              >
+              <van-col span="24" class="text2"
+                >单价:<span class="money">¥{{ item.price }}</span></van-col
+              >
+            </van-col>
+            <van-col span="12" class="right">
+              <van-stepper
+                v-model="item.num"
+                min="0"
+                max="100"
+                theme="round"
+                button-size="24"
+                disable-input
+                @change="onChange(item.id,item.num)"
+              />
+            </van-col>
+          </van-col>
+        </van-col>
+      </van-row>
+    </van-row>
+    <van-row class="bottom">
+      <van-row class="settlement">
+        <van-col class="money">
+          <van-col class="text"
+            >合计金额:<span class="money"
+              >¥{{ money.toFixed(2) }}</span
+            ></van-col
+          >
+        </van-col>
+        <van-col class="sure" @click="submit">
+          结算
+        </van-col>
+      </van-row>
+    </van-row>
+  </div>
+</template>
+<script>
+import { mapState } from "vuex";
+import { getNowTime } from "@/assets/js/dataFormate.js";
+import {
+  Toast,
+} from "vant";
+export default {
+  data() {
+    return {
+      typeColor:undefined,//菜单类型
+      show:false,
+      title: "点餐服务",
+      typeValue: undefined,
+      typeSelect:"切换餐别",
+      type: 2,
+      money: 0,
+      foodList: [],
+      typeList: [
+        { name: "早餐" },
+        { name: "午餐" },
+        { name: "晚餐" },
+        { name: "宵夜" },
+      ],
+      overTime:undefined,
+    };
+  },
+  components: {
+    [Toast.name]: Toast,
+  },
+  computed: {
+    ...mapState({
+       footStoreData:state=>state.cart
+    })
+   },
+  mounted() {
+    document.title = '中国东信智慧园区'
+    //时段判断
+    let nowTime = getNowTime().split(" ")[1].substring(0,2)
+    console.log(this.$store.state.canbie)
+    if(this.$store.state.canbie){
+      this.typeValue = this.$store.state.canbie
+      if(nowTime <= 9){
+        this.overTime = 0
+      }else if( 9< nowTime  && nowTime < 13){
+        this.overTime = 1
+      }else if( 13<= nowTime && nowTime < 19){
+        this.overTime = 2
+      }else{
+        this.overTime = 3
+      }
+    }else{
+      if(nowTime <= 9){
+        this.typeValue = "早餐"
+        this.overTime = 0
+      }else if( 9< nowTime  && nowTime < 13){
+        this.typeValue = "午餐"
+        this.overTime = 1
+      }else if( 13<= nowTime && nowTime < 19){
+        this.typeValue = "晚餐"
+        this.overTime = 2
+      }else{
+        this.typeValue = "宵夜"
+        this.overTime = 3
+      }
+    }
+    if(JSON.stringify(this.footStoreData) != '[]'){
+        this.foodList = this.footStoreData
+    }else{
+      this.foodMenu(this.typeValue)
+    }
+   
+    //餐单信息判断
+    this.money = 0;
+    let data = this.foodList
+    for(let i=0;i<data.length;i++){
+        if(data[i].num){
+            this.money += data[i].price * data[i].num
+        }
+    }
+    
+  },
+  methods: {
+    /** 餐别类型状态 */
+    downStatus(){
+      this.show = true
+    },
+    /** 返回 */
+    fanhuiBtn() {
+      this.$store.dispatch("cart", [])
+      this.$store.dispatch("canbie", undefined)
+      this.$router.go(-1)
+    },
+    /** 餐别类型状态切换 */
+    onChange(id,value) {
+        this.money = 0;
+        let data = this.foodList
+        for(let i=0;i<data.length;i++){
+            if(data[i].num){
+                this.money += data[i].price * data[i].num
+            }
+        }
+    },
+    /** 菜品锁定 */
+    submit(){
+      let num = 0
+      for(let i=0;i<this.foodList.length;i++){
+        num = this.foodList[i].num + num
+      }
+      if(num<1){
+          Toast("请添加菜品")
+      }else{
+        this.$store.dispatch("cart", this.foodList)
+        this.$store.dispatch("canbie", this.typeValue)
+        localStorage.setItem("canbie57",this.typeValue)
+        this.$router.push({ path: "/address"})
+      }
+    },
+    /** 餐别id选择 */
+    change(name,index){
+      if(index >= this.overTime){
+        this.typeColor = name
+        this.determine()
+      }
+      
+    },
+    /** 菜单 */
+    foodMenu(id){
+      this.foodList  = []
+      axios.get(`https://smartpark.caih.com/dxapi/dreMenu/list?current=1&size=500&type=${id}&status=0`).then(res => { 
+        const data = res.data.data.records
+        for(let i = 0;i<data.length;i++){
+          data[i].num = 0
+        }
+        this.foodList  = data
+      })
+    },
+    /** 餐别确定 */
+    determine(){
+      this.money = 0
+      if(this.typeColor == undefined){
+        Toast("请选择餐别")
+      }else{
+        this.show = false
+        this.typeValue = this.typeColor 
+        for(let i = 0; i<this.typeList.length;i++){
+          if(this.typeColor == this.typeList[i].id){
+            this.typeValue = this.typeList[i].name
+            this.typeSelect = this.typeValue
+          }
+        }
+        this.typeSelect = this.typeValue
+        this.foodMenu(this.typeValue)
+      }
+    },
+    /** 餐别取消 */
+    cancel(){
+      this.show = false
+    }
+  },
+};
+</script>
+<style lang="scss" scoped>
+.mianBox {
+  width: 100%;
+  height: 100%;
+  background-color: #f9f9f9 !important;
+  .top {
+    .foodType {
+      padding: 0 15px;
+      text-align: left;
+      border-bottom: 1px solid #e8e8e8;
+      height:48px;
+      line-height: 48px;;
+      .cj {
+        width: 20px;
+        vertical-align: middle;
+        margin:0 4px 0  -1px;
+      }
+      .describe {
+        font-size: 18px;
+        font-weight: 700;
+        vertical-align: middle;
+        color: #ee0a24;
+      }
+      .type {
+        margin-top: -12px;
+        font-size: 14px;
+        color:#333;
+        text-align: right;
+        .name{
+          text-align: right;
+          vertical-align: middle;
+          margin-top:12px;
+          .xl{
+            vertical-align: middle;
+            width:20px;
+            margin:0px -6px 0 4px;
+          }
+        }
+        
+      }
+      .selectTitle{
+          font-size: 16px;
+          text-align: center;
+          height:48px;
+          line-height: 48px;
+          color:#666666;
+          .determine{
+            color:#ee0a24;
+          }
+        }
+        .typeList{
+          font-size: 16px;
+          border-top:1px solid #e8e8e8;
+          height:48px;
+          line-height: 48px;
+          position: relative;
+          .overTime{
+            color:#ccc;
+          }
+          .name{
+            text-align: center;
+          }
+          .name:hover{
+            color:#ee0a24;
+          }
+          .noName{
+            cursor:not-allowed;
+            color:#ccc;
+            text-align: center;
+          }
+        }
+    }
+  }
+  .middle {
+    padding: 0px 15px;
+    background-color: #fff;
+    height: calc(100vh - 180px);
+    overflow-y: scroll;
+    .foodList {
+      .foodWrap {
+        .food {
+          // height:78px;
+          // line-height: 78px;
+          padding:16px 0;
+          border-bottom: 1px solid #e8e8e8;
+          .left {
+            .text2{
+               margin-top:5px;
+            }
+            color: #666666;
+            font-size: 15px;
+            vertical-align: middle;
+            .name {
+              color: #333;
+              font-weight: 700;
+            }
+            .money {
+              color: #ee0a24;
+            }
+          }
+          .right {
+            margin-top: 15px;
+            text-align: right;
+          }
+        }
+      }
+    }
+  }
+
+  .bottom {
+    background: #fff;
+    width: 100%;
+    margin-top: 10px;
+    position: fixed;
+    bottom: 0px;
+    left: 0;
+    height: 60px;
+    line-height: 60px;
+    font-size: 18px;
+    .settlement {
+      padding: 0 15px;
+      .text {
+        color: #666666;
+        .money {
+          color: #ee0a24;
+        }
+      }
+    }
+    .sure {
+      position: absolute;
+      right: 0;
+      bottom: 0;
+      width: 30%;
+      background: #ee0a24;
+      color: #fff;
+      text-align: center;
+    }
+  }
+}
+</style>
+<style>
+.van-dropdown-menu__bar {
+  box-shadow: none;
+}
+.van-ellipsis {
+  font-size: 16px;
+  text-align: right;
+}
+.van-dropdown-menu__title::after {
+  /* border:6px solid; */
+}
+.van-dropdown-menu__item {
+  width: 100% !important;
+}
+.van-dropdown-menu__title {
+  width: 100%;
+}
+.van-stepper__input {
+  border: 1px solid #e8e8e8;
+  width: 48px !important;
+  height:32px !important;
+  margin: 0 12px;
+  border-radius: 5px;
+}
+.van-stepper__minus, .van-stepper__plus{
+  background:transparent !important;
+  border:1px solid #ee0a24;
+  
+}
+.van-stepper__minus::after, .van-stepper__minus::before, .van-stepper__plus::after, .van-stepper__plus::before{
+  background-color: #ee0a24;
+}
+
+</style>

+ 2 - 2
src/views/record/index.vue

@@ -517,7 +517,7 @@ export default {
         margin-left:5px;
       }
       .search{
-        background-color: #D7000F;
+        background-color: #ee0a24;
         border-radius: 6px;
         margin-top:-2px;
         color:#fff;
@@ -567,7 +567,7 @@ export default {
       
     }
     .negative{
-      color:#D7000F ;
+      color:#ee0a24 ;
     }
     .just{
       color:#0091FF

+ 7 - 2
src/views/result/index.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="mianBox" >
         <van-row class="headerBox">
-          <van-col class="returnWrap" @click="$router.go(-2)">
+          <van-col class="returnWrap" @click="$router.go(-1)">
             <van-image class="arrow-left"
               :src="require('../../assets/image/left.png')"
             />
@@ -12,7 +12,7 @@
         <div v-if="result">
             <img src="../../assets/image/success.png" alt="" class="result">
             <van-row class="text">支付完成</van-row>
-            <van-button   type="danger" @click="$router.go(-2)" class="fanhui">返回首页</van-button>
+            <van-button   type="danger" @click="fanhuiBtn" class="fanhui">返回首页</van-button>
         </div>
         <div v-if="!result">
             <img src="../../assets/image/fail.png" alt="" class="result">
@@ -40,6 +40,11 @@ export default {
         }
     }
   },
+  methods:{
+     fanhuiBtn(){
+      window.location.href= "https://smartpark.caih.com/h5/#/home/feature"
+     }
+  }
 }
 </script>
 

文件差異過大導致無法顯示
+ 0 - 0
文档/点餐/点餐服务 首页-新/点餐服务 首页-新/index.html


文件差異過大導致無法顯示
+ 1 - 1
文档/点餐/自助点餐 标注文件/自助点餐 标注文件/自助点餐-标注文件/index.html


文件差異過大導致無法顯示
+ 0 - 0
文档/点餐/自助点餐首页/自助点餐首页/index.html


文件差異過大導致無法顯示
+ 0 - 0
文档/点餐/配餐清单页面 标注文件/配餐清单页面 标注文件/配餐清单 标注文件/index.html


部分文件因文件數量過多而無法顯示