DaMowang 2 年之前
父節點
當前提交
109311df65

+ 6 - 10
src/App.vue

@@ -3,8 +3,8 @@ export default {
   globalData: {
     userInfo: {},
     shopInfo: {
-      shop_name: "数字茶城",
-      desc: "数字茶城",
+      shop_name: "茶付宝",
+      desc: "茶付宝",
     },
     openId: "",
     authorizeWindow: true, //是否可以打开用户信息授权页面,避免重复打开
@@ -12,7 +12,7 @@ export default {
     hasUpdate: false, // 小程序是否有更新版本 默认为没有
     newVersionInfo: {
       num: "1.0.0",
-      desc: "数字茶城上线啦!",
+      desc: "茶付宝上线啦!",
       updateInfo: [], // 数组形式描述一下具体更新了什么内容
     }, // 当前小程序最新版本信息
     msgTmp: null, //订阅消息模板id信息
@@ -34,14 +34,10 @@ export default {
     var logs = uni.getStorageSync("logs") || [];
     logs.unshift(Date.now());
     uni.setStorageSync("logs", logs);
-    uni.setStorageSync("mallName", "数字茶城");
-  },
-  onShow() {
-    console.log("App Show");
-  },
-  onHide() {
-    console.log("App Hide");
+    uni.setStorageSync("mallName", "茶付宝");
   },
+  onShow() {},
+  onHide() {},
 };
 </script>
 

+ 5 - 3
src/app.scss

@@ -48,9 +48,9 @@ div {
 /* 在线链接服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 */
 @font-face {
     font-family: 'iconfont';  /* Project id 3748689 */
-    src: url('//at.alicdn.com/t/c/font_3748689_wcw36kgzp2l.woff2?t=1684402036060') format('woff2'),
-         url('//at.alicdn.com/t/c/font_3748689_wcw36kgzp2l.woff?t=1684402036060') format('woff'),
-         url('//at.alicdn.com/t/c/font_3748689_wcw36kgzp2l.ttf?t=1684402036060') format('truetype');
+    src: url('//at.alicdn.com/t/c/font_3748689_l484n4wdg4r.woff2?t=1684734065148') format('woff2'),
+         url('//at.alicdn.com/t/c/font_3748689_l484n4wdg4r.woff?t=1684734065148') format('woff'),
+         url('//at.alicdn.com/t/c/font_3748689_l484n4wdg4r.ttf?t=1684734065148') format('truetype');
   }
 
 .iconfont {
@@ -227,6 +227,8 @@ uni-input {
 // 暂无信息/数据/列表
 .zanwu {
     text-align: center;
+    min-height: 100vh;
+    background: #fff;
 }
 
 .zanwutxt {

+ 25 - 0
src/pages.json

@@ -266,6 +266,31 @@
 						"navigationBarTitleText": "激活"
 					}
 				},
+				{
+					"path": "orderingfood/activationcode",
+					"style": {
+						"navigationBarTitleText": "生成激活码"
+					}
+				},
+				{
+					"path": "orderingfood/group",
+					"style": {
+						"navigationBarTitleText": "我的团队"
+					}
+				},
+				{
+					"path": "orderingfood/orderlist",
+					"style": {
+						"navigationBarTitleText": "订单列表"
+					}
+				},
+				{
+					"path": "orderingfood/detail",
+					"style": {
+						"navigationBarTitleText": "订单详情"
+					}
+				},
+
 				{
 					"path": "order/verificationCode",
 					"style": {

+ 1 - 1
src/pages/index/index.vue

@@ -61,7 +61,7 @@
                         <!-- <view class="product-txt">赠送{{ i.give_integral ? i.give_integral + "批发券" : i.give_cha_bao + "茶宝" }}</view> -->
                         <view class="product-txt" v-if="[3,4].includes(i.type)">限时赠送<text class="corFE2C15">{{ i.teac }}</text>TeaC</view>
                         <view class="product-txt fenxiang" v-if="[3,4].includes(i.type)">
-                            <text class="iconfont">&#xe604;</text>
+                            <text class="iconfont red">&#xe62b;</text>
                             <text class="red">分享约获得 {{ i.first_teac }} TeaC</text>
                         </view>
                     </view>

+ 1 - 1
src/pages/integral-list/index.vue

@@ -11,7 +11,7 @@
         <image class="goods_img" :src="item.goodsThumbnailUrl" mode=""></image>
         <view class="goods_info flex_c flex_jc">
           <view class="goods_name ellipsis">{{ item.goodsName }}</view>
-          <view class="msg">{{ item.integral }}消费积分</view>
+          <view class="msg">{{ item.integral }}消费</view>
           <view
             class="info_btn flex_r flex_ac flex_jc"
             @tap="openConversion(item.goodsId)"

+ 43 - 22
src/pages/my/index.vue

@@ -101,10 +101,6 @@
             <image class="fun_img" src="/static/my/give.png" mode=""></image>
             <view class="fun_text">赠送</view>
           </navigator>
-          <navigator class="fun_list flex_c flex_ac" url="/pagesB/my/assistant" hover-class="none">
-            <image class="fun_img" src="/static/my/assistant.png" mode=""></image>
-            <view class="fun_text">开票助手</view>
-          </navigator>
           <navigator class="fun_list flex_c flex_ac" @click="getImgPage" hover-class="none">
             <image class="fun_img" src="/static/my/sharePoster.png" mode=""></image>
             <view class="fun_text">分享海报</view>
@@ -122,21 +118,15 @@
             <image class="fun_img" src="/static/my/withdraw.png" mode=""></image>
             <view class="fun_text">提现明细</view>
           </navigator>
-          <!-- <navigator class="fun_list flex_c flex_ac" url="/pages/accountDetails/integral" hover-class="none">
-            <image class="fun_img" src="/static/my/inte-list.png" mode=""></image>
-            <view class="fun_text">积分明细</view>
-          </navigator> -->
-          <navigator class="fun_list flex_c flex_ac" url="/pagesB/invoice/invoiceList" hover-class="none">
-            <image class="fun_img" src="/static/my/assistantHistory.png" mode=""></image>
-            <view class="fun_text">开票历史</view>
-          </navigator>
+          <navigator></navigator>
+          <navigator></navigator>
+          <navigator></navigator>
         </view>
       </view>
       <view class="fun mar_t30">
         <view class="fun_title flex_r flex_ac flex_jb">我的订单
           <navigator class="more flexr flex_ac" url="/pages/szw-order-list/index?status=0" hover-class="none">
-            全部订单
-            <image class="more_img" src="/static/my/more.png" mode=""></image>
+            全部订单<image class="more_img" src="/static/my/more.png" mode=""></image>
           </navigator>
         </view>
         <view class="fun_con mar_t50 flex_r flex_ac flex_jb">
@@ -165,10 +155,36 @@
       <view class="fun mar_t30">
         <view class="fun_title">本地生活</view>
         <view class="fun_con mar_t50 flex_r flex_ac flex_jb">
-          <navigator class="fun_list flex_c flex_ac" @click="goto('/pages/agreement/index',{tit:'关于我们',type:7})" hover-class="none">
-            <image class="fun_img" src="/static/my/about.png" mode=""></image>
-            <view class="fun_text">团队</view>
+          <navigator v-if="local_uinfo.level_id>1" class="fun_list flex_c flex_ac" url="/pagesB/orderingfood/group" hover-class="none">
+            <image class="fun_img" src="/static/my/l_group.png" mode=""></image>
+            <view class="fun_text">我的团队</view>
+          </navigator>
+          <navigator class="fun_list flex_c flex_ac" url="/pagesB/orderingfood/orderlist" hover-class="none">
+            <image class="fun_img" src="/static/my/order_history.png" mode=""></image>
+            <view class="fun_text">历史订单</view>
           </navigator>
+          <navigator></navigator>
+          <navigator></navigator>
+          <navigator></navigator>
+        </view>
+      </view>
+      <view class="fun mar_t30">
+        <view class="fun_title">其他</view>
+        <view class="fun_con mar_t50 flex_r flex_ac flex_jb">
+          <navigator class="fun_list flex_c flex_ac" url="/pagesB/address/list" hover-class="none">
+            <image class="fun_img" src="/static/my/dizhi.png" mode=""></image>
+            <view class="fun_text">地址管理</view>
+          </navigator>
+          <navigator class="fun_list flex_c flex_ac" url="/pagesB/my/assistant" hover-class="none">
+            <image class="fun_img" src="/static/my/assistant.png" mode=""></image>
+            <view class="fun_text">开票助手</view>
+          </navigator>
+          <navigator class="fun_list flex_c flex_ac" url="/pagesB/invoice/invoiceList" hover-class="none">
+            <image class="fun_img" src="/static/my/assistantHistory.png" mode=""></image>
+            <view class="fun_text">开票历史</view>
+          </navigator>
+          <navigator></navigator>
+          <navigator></navigator>
         </view>
       </view>
       <view class="fun mar_t30">
@@ -186,10 +202,6 @@
             <image class="fun_img" src="/static/my/green.png" mode=""></image>
             <view class="fun_text">新手教程</view>
           </navigator>
-          <navigator class="fun_list flex_c flex_ac" url="/pagesB/address/list" hover-class="none">
-            <image class="fun_img" src="/static/my/dizhi.png" mode=""></image>
-            <view class="fun_text">地址管理</view>
-          </navigator>
           <view class="fun_list flex_c flex_ac">
             <button open-type="contact" style="background: #fff; border: 0; line-height: 1; padding: 0">
               <image class="fun_img" src="/static/my/service.png" mode=""></image>
@@ -236,6 +248,7 @@ export default {
       allChaYou: "",
 
       isAuthentication: uni.getStorageSync("isAuthentication"), //是否开启实名模块
+      local_uinfo: {}, //本地生活信息
     };
   },
   onLoad(options) {
@@ -246,6 +259,7 @@ export default {
     }
     this.closeAuto(); //关闭实名功能
     this.getchayou(); //获取茶友
+    this.getLU(); //本地生活信息
   },
   onShow() {
     let token = uni.getStorageSync("token");
@@ -403,7 +417,14 @@ export default {
           this.allChaYou = res.data.data.below + res.data.data.lower_level;
         }
       });
-    }
+    },
+    getLU() {
+        post("local/userinfo").then(res => {
+            if (res.code == 0) {
+                this.local_uinfo = res.data
+            }
+        })
+    },
   },
 };
 </script>

+ 80 - 10
src/pages/orderingfood/merchantlist.vue

@@ -3,18 +3,31 @@
     <div class="head">
       <div class="bg"></div>
       <div class="card">
-        <div class="card_tit">消费积分账户</div>
+        <div class="card_tit">消费账户</div>
         <div class="msg"><span>支持主流消费场所使用</span><span class="iconfont">&#xe631;</span></div>
-        <div class="m">
-          <div class="tit">账户余额</div>
-          <div class="balance f_dinB">{{ local_uinfo.integral }}</div>
+        <div class="mm">
+          <div class="balance f_dinB">{{ local_uinfo.integral || 0 }}</div>
         </div>
+        <!-- <div class="m">
+          <div class="tit">账户余额</div>
+          <div class="balance f_dinB">{{ local_uinfo.integral || 0 }}</div>
+        </div> -->
+        <div class="live_name">{{ typeto(local_uinfo.level_id) }}</div>
       </div>
     </div>
-    <div class="list">
+    <div class="l_tabBar flex_r flex_jb">
+      <div class="item" v-for="(i,s) in tabs" :key="s">
+        <img :src="i" alt="" class="ico">
+        <!-- <div class="tit">{{ i.tit }}</div> -->
+      </div>
+    </div>
+    <view class="loadingBox" v-if="loading">
+        <img class="loading" src="http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/2caa2ae4dc849856f3eca4ff2b3abf7fd19e7632gif" />
+    </view>
+    <div class="list" v-else>
       <div class="li_item" v-for="(i,s) in merchantList" :key="s" @click="goMerchant(i)">
         <div class="logo_img">
-          <img src="http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/4820537f88796ee05a37530be80976921979f7f9png" alt="">
+          <img :src="i.restaurant_img" alt="">
         </div>
         <div class="con_box">
           <div class="p1 ellipsis">{{ i.restaurant_name }}</div>
@@ -28,6 +41,7 @@
 
 <script>
 	import QQMapWX from '@/static/utils/qqmap-wx-jssdk.min.js'
+	import tabs from './tabs'
 import { post } from "@/request/api.js";
 export default {
   name: "merchantlist",
@@ -35,6 +49,7 @@ export default {
   components: {},
   data() {
     return {
+      loading: true,
       Query: {
         lat: 113.9367,
         lng: 22.5325,
@@ -44,6 +59,7 @@ export default {
       merchant: {},
       merchantList: [],
       local_uinfo: {},
+      tabs
     };
   },
   methods: {
@@ -51,6 +67,7 @@ export default {
     getlists(){
       post("local/getMerchant",this.Query).then(res => {
         if(res.code == 0){
+          this.loading = false
           let merchantList = res.data.data
           delete res.data.data
           this.merchant = res.data
@@ -68,6 +85,7 @@ export default {
 				success(res) {
 					// 经纬度转化地址信息
 					// const qqmap = require('@/pages/qqmap-wx-jssdk.min.js');
+          console.log('位置信息:',res);
 					const showmap = new QQMapWX({
 						key: 'NWSBZ-ZUME4-LLTU6-XSQGB-YBKAT-U4FCZ'
 					});
@@ -81,6 +99,7 @@ export default {
 							const adres = result.result.location;
               that.Query = { ...that.Query, ...adres };
               that.getlists();
+              console.log('逆地址解析:',result);
 						}
 					});
 				},
@@ -127,6 +146,7 @@ export default {
     // 是否激活本地生活
     isActivation(){
       post("local/isActivation",this.Query).then(res => {
+          console.log('是否激活本地生活',res);
         if(res.code == -1){
           this.goto("/pagesB/orderingfood/activation")
         }else{
@@ -141,12 +161,21 @@ export default {
           this.local_uinfo = res.data
         }
       })
+    },
+    typeto(va) {
+        switch (va) {
+            case 1: return "VIP";
+            case 2: return "黄金VIP";
+            case 3: return "群主";
+            case 4: return "副总";
+            case 5: return "联合发起人";
+            default: return ""
+        }
     }
   },
   onShow() {
     this.isActivation();
   },
-  mounted() {},
   onReachBottom() {
     if(this.Query.page < this.merchant.last_page) this.getlists();
   },
@@ -189,21 +218,34 @@ export default {
     }
     .m{
       position: absolute;
-      bottom: 30rpx;
+      bottom: 25rpx;
       right: 30rpx;
     }
+    .mm{
+      text-align: center;
+      margin-top: 20rpx;
+    }
     .tit,.balance{
       color: #C99D60;
-      text-align: right;
+      // text-align: right;
     }
     .balance{
-      font-size: 40rpx;
+      font-size: 46rpx;
       margin-top: 8rpx;
       &:before {
         content: "¥";
         font-size: 24rpx;
       }
     }
+    .live_name{
+      font-size: 36rpx;
+      // font-weight: bold;
+      color: #C99D60;
+      position: absolute;
+      bottom: 25rpx;
+      right: 30rpx;
+
+    }
   }
 }
 .list{
@@ -250,4 +292,32 @@ export default {
     }
   }
 }
+.l_tabBar{
+  margin: 32rpx 32rpx 0;
+  background-color: #fff;
+  padding: 10rpx 20rpx;
+  border-radius: 10rpx;
+  box-shadow: 4rpx 4rpx 26rpx 2rpx rgba(17, 18, 29, 0.1);
+  flex-wrap: wrap;
+  .item{
+    width: 105rpx;
+    margin: 10rpx 10rpx;
+  }
+  .ico{
+    width: 100%;
+    height: 138rpx;
+  }
+  // .tit{
+  //   font-size: 26rpx;
+  //   text-align: center;
+  // }
+}
+.loadingBox{
+  text-align: center;
+  padding: 100rpx 0;
+  .loading{
+    width: 280rpx;
+    height: 280rpx;
+  }
+}
 </style>

+ 15 - 0
src/pages/orderingfood/tabs.js

@@ -0,0 +1,15 @@
+export default [
+  "http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/9b77a4e9651ebb272f58972297f15989c8e7dfe2png", //餐厅
+  "http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/c49b23e0145a7c4e52183ae0850d0948e2ada385png", //饮品
+  "http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/e3d3719e646469f2615abce1ef61753ea7de0b19png", //影院
+  "http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/cd4f1a2815a87ed4e118b8fe496468f826eeb594png", //加油
+  "http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/06b44cf0c78938c9740a13826cd7b3777c7bb1c6png", //手机充值
+  "http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/83906365c174dcc7acf620d7247f80f9f1818d6epng", //酒店
+  // "http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/8b0b0de11b1d5b2e3e97cf3b20d489ecdb32f27epng", //景区
+  "http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/97d00306c223bd7568335b93189d9b40a386fc12png", //音视频
+  "http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/3ef239b805b42b155d05ddeb3e3755c1a6522633png", //出行
+  "http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/4089ec6a9c87e91d4ed8207562b87e9bd48b8c9dpng", //休闲娱乐
+  "http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/9595dbbd82b99db56de906743b9456962d01857bpng", //丽人医美
+  // "http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/67e25d80a52975f21eebe115c782984aa2dfa2d3png", //婚纱摄影
+
+  ]

+ 1 - 1
src/pages/product/p_details.vue

@@ -65,7 +65,7 @@
       <view class="goods_teac flex_r flex_jb" v-if="['3','4'].includes(type)">
         <view class="product-txt">限时赠送{{ detail.teac }}TeaC</view>
         <view class="product-txt fenxiang"> 
-            <text class="iconfont">&#xe604;</text>
+            <text class="iconfont red">&#xe62b;</text>
             <text class="red">分享约获得 {{ detail.first_teac }} TeaC</text>
         </view>
       </view>

+ 1 - 1
src/pages/product/productRetail.vue

@@ -18,7 +18,7 @@
                     <view class="product-txt" v-if="type == 6">每<text class="green">{{i.interval_time}}</text> 分钟降价 <text class="green">{{i.drop_range * 100}}%</text> </view>
                     <view class="product-txt" v-if="['3','4'].includes(type)">限时赠送<text class="corFE2C15">{{ i.teac }}</text>TeaC</view>
                     <view class="product-txt fenxiang" v-if="['3','4'].includes(type)">
-                        <text class="iconfont">&#xe604;</text>
+                        <text class="iconfont red">&#xe62b;</text>
                         <text class="red">分享约获得{{ i.first_teac }}TeaC</text>
                     </view>
                 </view>

+ 1 - 1
src/pages/sign/index.vue

@@ -59,7 +59,7 @@
                     <!-- <view class="product-txt">赠送{{ i.give_integral ? i.give_integral + "批发券" : i.give_cha_bao + "茶宝" }}</view> -->
                     <view class="product-txt" v-if="['3','4'].includes(i.type)">限时赠送<text class="corFE2C15">{{ i.teac }}</text>TeaC</view>
                     <view class="product-txt fenxiang" v-if="['3','4'].includes(i.type)">
-                        <text class="iconfont">&#xe604;</text>
+                        <text class="iconfont red">&#xe62b;</text>
                         <text class="red">分享约获得 {{ i.first_teac }} TeaC</text>
                     </view>
                 </view>

+ 2 - 2
src/pagesB/invoice/invoiceList.vue

@@ -101,8 +101,8 @@ export default {
 </script>
 <style scoped lang='scss'>
 .iApp {
-  width: 100%;
-  height: 100%;
+  min-height: 100vh;
+  background: #fff;
   .log_list {
     padding: 32rpx 32rpx;
     overflow: scroll;

+ 1 - 0
src/pagesB/my/assistant.vue

@@ -164,6 +164,7 @@ export default {
 <style scoped lang='scss'>
 .iApp {
   min-height: 100vh;
+  background: #fff;
 
   .log_list {
     padding: 0rpx 32rpx 100rpx;

+ 187 - 0
src/pagesB/orderingfood/activationcode.vue

@@ -0,0 +1,187 @@
+<template>
+    <div class='activationcode'>
+        <div class="user_info flex_r flex_jb">
+            <img class="userimg" :src="userinfo.head_pic" />
+            <div class="u_info">
+                <div class="p1">{{ userinfo.nickname }}</div>
+                <div class="p1">手机号:{{ userinfo.mobile }}</div>
+                <div class="p3">加入时间:{{ local_uinfo.create_time }}</div>
+            </div>
+        </div>
+        <div class="con">
+            <div class="box1">
+                <div class="tab" :class="{active:level_id==i.i}" v-for="(i,s) in tabs" :key="s" @click="onto(i)">
+                    <div class="p1">{{ i.n }}</div>
+                    <div class="p2">剩余生成数:{{Purview[i.k]}}</div>
+                </div>
+            </div>
+        </div>
+        <div class="bntbar">
+            <div class="btn" @click="activationCode">立即生成</div>
+        </div>
+        <div class="codebox" v-if="code">
+            <div class="msg">激活码已生成:</div>
+            <div class="code" @click="copyText(code)">{{ code }}</div>
+            <div class="smsg">(*点击激活码可复制)</div>
+        </div>
+    </div>
+</template>
+<script>
+import { post } from "@/request/api.js";
+import uniCopy from "@/utils/copy";
+export default {
+    name: 'activationcode',
+    props: {},
+    components: {},
+    data() {
+        return {
+            userinfo: uni.getStorageSync('userinfo'),
+            local_uinfo: {},
+            Purview: {},
+            code: undefined,
+
+            tabs: [
+                { n: "VIP", i: 1, k: "vip_num" },
+                { n: "黄金VIP", i: 2, k: "lord_num" },
+                { n: "群主", i: 3, k: "helper_num" },
+                { n: "副总", i: 4, k: "vice_num" },
+            ],
+            level_id: 1,
+        }
+    },
+    methods: {
+        getLU() {
+            post("local/userinfo").then(res => {
+                if (res.code == 0) {
+                    this.local_uinfo = res.data
+                }
+            })
+        },
+        getPurview() {
+            post("local/getPurview").then(res => {
+                if (res.code == 0) {
+                    this.Purview = res.data
+                }
+            })
+        },
+        activationCode() {
+            post("local/activationCode",{
+                level_id: this.level_id
+            }).then(res => {
+                if (res.code == 0) {
+                    this.code = res.data.code;
+                    this.getPurview();
+                }
+            })
+        },
+        copyText(e) {
+            uniCopy({
+                content: e,
+                success: (res) => {},
+                error: (e) => {},
+            });
+        },
+        onto(i){
+            if(this.Purview[i.k] > 0) this.level_id = i.i
+        }
+    },
+    onLoad(da) {
+        this.getPurview();
+        this.getLU();
+    },
+    onShow() {},
+    mounted() {},
+}
+</script>
+<style scoped lang='scss'>
+page {
+    background-color: #fff;
+}
+.user_info{
+    padding: 38rpx 32rpx;
+    border-bottom: 1px solid #e5e5e5;
+    .userimg{
+        width: 160rpx;
+        height: 160rpx;
+        border-radius: 10rpx;
+    }
+    .u_info{
+        width: calc(100% - 160rpx);
+        padding: 4rpx 0 4rpx 30rpx;
+        display: flex;
+        flex-direction: column;
+        justify-content: space-between;
+        .p1{
+            font-size: 36rpx;
+        }
+        .p3{
+            font-size: 28rpx;
+            color: #999;
+        }
+    }
+}
+.con{
+    padding: 28rpx 32rpx;
+    .box1{
+        margin: 0 -15rpx;
+    }
+    .tab{
+        display: inline-block;
+        background-color: rgba($color: #000, $alpha: 0.06);
+        width: calc(50% - 30rpx);
+        margin: 15rpx;
+        text-align: center;
+        padding: 22rpx 26rpx;
+        border-radius: 10rpx;
+        .p1{
+            font-size: 36rpx;
+            font-weight: bold;
+            margin-bottom: 10rpx;
+        }
+        .p2{
+            font-size: 24epx;
+            color: #666;
+        }
+        &.active{
+            background-color: #d3aa79;
+            .p1,.p2{
+                color: #fff;
+            }
+        }
+    }
+}
+.bntbar{
+    padding: 0 32rpx;
+    .btn{
+        font-weight: bold;
+        height: 90rpx;
+        line-height: 90rpx;
+        text-align: center;
+        background: radial-gradient(circle, #d3aa79,#ebcda8);
+        border-radius: 45rpx;
+    }
+}
+.codebox{
+    padding: 0 32rpx;
+    text-align: center;
+    margin-top: 50rpx;
+    .msg{
+        text-align: left;
+        margin-bottom: 30rpx;
+        font-size: 36rpx;
+        color: #666;
+    }
+    .code{
+        display: inline-block;
+        background-color: rgba($color: #000, $alpha: 0.08);
+        color: #000;
+        padding: 10rpx 50rpx;
+        border-radius: 10rpx;
+    }
+    .smsg{
+        font-size: 22rpx;
+        margin-top: 10rpx;
+        // text-align: left;
+    }
+}
+</style>

+ 633 - 0
src/pagesB/orderingfood/detail.vue

@@ -0,0 +1,633 @@
+<template>
+    <view class="content">
+        <block v-if="loading">
+            <view class="loadingBox">
+                <img class="loading" lazy-load src="http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/3a96ff52efce6661adb41c54c29a87241b6e72f5gif" />
+            </view>
+        </block>
+        <block v-else>
+            <view style="height: 30rpx;"></view>
+            <view class="orderBox">
+                <view class="header" v-if="orderDetail.status==0">
+                    <view class="title" :style="'color:'+template.color.color2">待付款</view>
+                    <view class="statusBox">
+                        <view class="status">
+                            <icon type="daifukuan" size="30" :color="template.color.color5"></icon>
+                            <view style="font-size: 24rpx;" :style="'color:'+template.color.color5">请在 {{ $day(orderDetail.create_time).add(7, 'm').format("YYYY-MM-DD HH:mm") }} 前完成支付</view>
+                        </view>
+                    </view>
+                    <view class="button" v-if="$day().unix() < $day(orderDetail.create_time).add(7, 'm').unix()" :style="'background-color:'+template.color.color1" @click="paypalPrderTap(orderDetail.trade_no)">立即支付</view>
+                </view>
+                <view class="header" v-if="orderDetail.status==1">
+                    <view class="title" :style="'color:'+template.color.color2">{{orderDetail.order_status=='OUT_MEAL'?"待自提":"待出餐"}}</view>
+                    <view class="statusBox">
+                        <view class="status">
+                            <icon type="dingdan" size="25" :color="template.color.color5"></icon>
+                            <text :style="'color:'+template.color.color5">下单</text>
+                        </view>
+                        <view class="line"></view>
+                        <view class="status">
+                            <icon type="zhunbeizhong" size="25" :color="template.color.color5"></icon>
+                            <text :style="'color:'+template.color.color5">准备</text>
+                        </view>
+                        <view class="line"></view>
+                        <view class="status">
+                            <icon type="ziqu" size="25" :color="orderDetail.order_status=='OUT_MEAL'?template.color.color5:template.color.color3"></icon>
+                            <text :style="'color:'+(orderDetail.order_status=='OUT_MEAL'?template.color.color5:template.color.color3)">自提</text>
+                        </view>
+                    </view>
+                    <view class="button" v-if="orderDetail.order_status=='OUT_MEAL'" :style="'background-color:'+template.color.color1" @click="qrcodeTap(true)">出示提货码</view>
+                </view>
+                <!-- <view class="header" v-if="orderDetail.order_status==3">
+                    <view class="title" :style="'color:'+template.color.color2">{{orderDetail.delivery_type==1?'已送达':'已自提'}}</view>
+                    <view class="statusBox">
+                        <view class="status">
+                            <icon type="wanchen" size="25" :color="template.color.color1"></icon>
+                            <text style="padding-top: 6rpx;" :style="'color:'+template.color.color1">感谢惠顾,期待您的下次光临</text>
+                        </view>
+                    </view>
+                </view>
+                <view class="header" v-if="orderDetail.order_status==4">
+                    <view class="title" :style="'color:'+template.color.color2">{{orderDetail.paypal_type?'已关闭':'已过期'}}</view>
+                    <view class="statusBox">
+                        <view class="status">
+                            <icon type="yiguanbi" size="25" :color="template.color.color5"></icon>
+                            <text style="padding-top: 6rpx;" :style="'color:'+template.color.color5">{{orderDetail.paypal_type?'订单已关闭,如有疑问请联系客服':'订单因超时未支付已过期'}}</text>
+                        </view>
+                    </view>
+                </view> -->
+                <view class="content">
+                    <view class="storeBox">
+                        <view class="store">
+                            <view class="name">{{orderDetail.restaurant_name}}</view>
+                            <view class="adds">{{orderDetail.restaurant_address}}</view>
+                        </view>
+                    </view>
+                    <view class="lineBox">
+                        <view class="left"></view>
+                        <view class="right"></view>
+                    </view>
+                    <view class="goodsBox">
+                        <view class="goods" v-for="(item, index) in orderGoods" :key="index">
+                            <view class="infoBox">
+                                <view class="title" :style="'color:'+template.color.color2">{{item.product_name}}</view>
+                                <!-- <view v-if="item.details" class="label" :style="'color:'+template.color.color3">
+                                    <text v-for="(va, i) in item.details" :key="i">{{va.sku_name}}</text>
+                                </view> -->
+                            </view>
+                            <view class="number" :style="'color:'+template.color.color2">x{{item.number}}</view>
+                            <view class="price" :style="'color:'+template.color.color2">¥{{$h.Add(item.user_price, item.spec_price)}}</view>
+                        </view>
+                        <view class="goods">
+                            <view class="infoBox">
+                                <view class="title" :style="'color:'+template.color.color3">商品合计<text>(共{{GoodNumber}}件商品)</text></view>
+                            </view>
+                            <view class="number"></view>
+                            <view class="price" :style="'color:'+template.color.color3">¥{{orderTotal}}</view>
+                        </view>
+                        <view class="goods">
+                            <view class="infoBox">
+                                <view class="title" :style="'color:'+template.color.color3">优惠抵扣<text>(消费金)</text></view>
+                            </view>
+                            <view class="number"></view>
+                            <view class="price" :style="'color:'+template.color.color3">-¥{{deduction}}</view>
+                        </view>
+                        <view class="total">
+                            <view class="name" :style="'color:'+template.color.color2">合计</view>
+                            <view class="price" :style="'color:'+template.color.color2">¥{{actuallypaid}}</view>
+                        </view>
+                    </view>
+                    <view class="lineBox">
+                        <view class="left"></view>
+                        <view class="right"></view>
+                    </view>
+                    <view class="footer">
+                        <view class="label">
+                            <view class="title">订单编号</view>
+                            <view class="nums">{{orderDetail.trade_no}}</view>
+                        </view>
+                        <view class="label">
+                            <view class="title">下单时间</view>
+                            <view class="nums">{{orderDetail.order_time || orderDetail.create_time}}</view>
+                        </view>
+                        <view class="label" v-if="orderDetail.order_time">
+                            <view class="title">支付时间</view>
+                            <view class="nums">{{orderDetail.order_time}}</view>
+                        </view>
+                        <view class="label" v-if="orderDetail.remark_user">
+                            <view class="title">备注信息</view>
+                            <view class="nums">{{orderDetail.remark_user}}</view>
+                        </view>
+                    </view>
+                </view>
+            </view>
+            <view style="height: 50rpx;"></view>
+            <view class="showContent" :style="qrcodeShow?'bottom:0;':''">
+                <view class="bg" @click="qrcodeTap(false)"></view>
+                <view class="showBox" style="min-height: 550rpx;">
+                    <view class="pheader" :style="'color:'+template.color.color2">请向店员出示提货码</view>
+                    <view class="images">
+                        <uqcode ref="uqcode" class="code-img" :size="150"/>
+                    </view>
+                    <view class="qrText" :style="'background-color:'+template.color.color4" @click="copyVerificationCode()">{{orderDetail.code}}</view>
+                </view>
+            </view>
+        </block>
+    </view>
+</template>
+<script>
+import Icon from "@/pagesB/components/icon/icon.vue";
+import uqcode from "@/components/uqrcode/uqrcode.vue";
+import { post } from "@/request/api.js";
+import { ToPayOpre } from "@/utils/reqTools.js";
+let toPayOpre = new ToPayOpre();
+export default {
+    components: {
+        Icon,
+        uqcode
+    },
+    data() {
+        return {
+            loading: true,
+            template: {
+                color: {
+                    color1: "#d3aa79",
+                    color2: "#323232",
+                    color3: "#999",
+                    color5: "#d3aa79"
+                }
+            },
+            shopData: uni.getStorageSync('__yipinShopInfo'),
+            orderId: 0,
+            orderDetail: '',
+            paypalShow: false,
+            qrcodeShow: false,
+            userData: uni.getStorageSync('userinfo'),
+
+            orderGoods: [],
+            orderTotal: 0,
+            GoodNumber: 0,
+            Integral: 0,
+            deduction: 0,
+            actuallypaid: 0,
+        }
+    },
+    onShow() {},
+    onLoad(e) {
+        this.getOrderDetail(e);
+    },
+    methods: {
+        getOrderDetail(da) {
+            post("local/orderDetail", da).then(res => {
+                if (res.code == 0) {
+                    this.loading = false;
+					if(res.data.detail.error_code == 200){
+						this.orderDetail = res.data.detail.data;
+                        this.orderDetail.status = res.data.order.status;
+					}
+                    else{
+						this.orderDetail = res.data.order;
+                    }
+                    let da = res.data.order.orderGoods
+                    let totals = 0;
+                    let number = 0;
+                    da.forEach(itm => {
+                        number += itm.number;
+                        totals = this.$h.Add(totals, this.$h.Mul(this.$h.Add(itm.user_price, itm.spec_price), itm.number));
+                    })
+                    this.orderGoods = da;
+                    this.orderTotal = totals;
+                    this.GoodNumber = number;
+                    this.getIntegral();
+                    if(this.orderDetail.order_status=='OUT_MEAL'){
+                        setTimeout(() => {
+                            this.$refs.uqcode.createCode(this.orderDetail.code)
+                        }, 1000);
+                    }
+                }
+            })
+        },
+        getIntegral(){
+            post("local/getIntegral").then(res=>{
+                if (res.code == 0) {
+                    let va = res.data
+                    this.Integral = this.$h.Mul(va,100);
+                    this.deduction = this.$h.Mul(this.orderTotal,va);
+                    this.actuallypaid = this.$h.Sub(this.orderTotal,this.deduction);
+                }
+            })
+        },
+
+        getPhoneTap(number) {
+            uni.makePhoneCall({
+                phoneNumber: number
+            });
+        },
+        paypalPrderTap(trade_no) {
+            post("local/goOrderPay", {trade_no}).then(res => {
+                if (res.code == 0 && res.data.data.prepayid) {
+                    toPayOpre.toPay(res.data.data, (rea) => {
+                      if (!rea) {
+                        // 支付成功
+                        uni.showToast({ title: "支付成功", icon: "none" });
+                      } else {
+                        // 支付失败
+                        uni.showToast({ title: "支付已取消", icon: "none" });
+                      }
+                    });
+                }
+            })
+        },
+        copyVerificationCode() {
+            let data = this.orderDetail;
+            uni.setClipboardData({
+                data: data.code,
+                success: function() {}
+            });
+        },
+        qrcodeTap(va){
+            this.qrcodeShow = va
+        },
+    }
+}
+</script>
+<style lang="scss">
+page {
+    background-color: #e7e7e7;
+}
+
+.orderBox {
+    width: 90%;
+    margin: 0 auto;
+    border-radius: 20rpx;
+    overflow: hidden;
+    position: relative;
+
+    .lineBox {
+        position: relative;
+        width: 100%;
+        height: 30rpx;
+        margin-top: -16rpx;
+
+        .left {
+            position: absolute;
+            left: -12rpx;
+            width: 30rpx;
+            height: 30rpx;
+            background-color: #e7e7e7;
+            border-radius: 100%;
+        }
+
+        .right {
+            position: absolute;
+            right: -12rpx;
+            width: 30rpx;
+            height: 30rpx;
+            background-color: #e7e7e7;
+            border-radius: 100%;
+        }
+    }
+
+    .header {
+        width: 100%;
+        padding: 10rpx 0 30rpx;
+        background-color: #fff;
+        display: flex;
+        flex-direction: column;
+        align-items: center;
+        justify-content: center;
+        box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.05);
+        position: relative;
+
+        .title {
+            font-size: 30rpx;
+            font-weight: bold;
+            height: 100rpx;
+            width: 100%;
+            display: flex;
+            justify-content: center;
+            align-items: center;
+        }
+
+        .statusBox {
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            position: relative;
+            width: 100%;
+            height: 160rpx;
+
+            .status {
+                display: flex;
+                align-items: center;
+                flex-direction: column;
+                justify-content: center;
+
+                text {
+                    font-size: 24rpx;
+                }
+            }
+
+            .line {
+                width: 80rpx;
+                border-top: 1px dashed #e2e2e2;
+                height: 1px;
+                margin: 0 12rpx;
+                margin-top: -30rpx;
+            }
+        }
+
+        .button {
+            padding: 8rpx 20rpx;
+            font-size: 24rpx;
+            color: #fff;
+            border-radius: 100rpx;
+            position: relative;
+
+            button {
+                position: absolute;
+                top: 0;
+                left: 0;
+                width: 100%;
+                height: 100%;
+                opacity: 0;
+            }
+        }
+    }
+
+    .content {
+        width: 100%;
+        height: 67%;
+        background-color: #f7f7f7;
+
+        .storeBox {
+            width: 90%;
+            margin: 0 auto;
+            display: flex;
+            align-items: center;
+            border-bottom: 2rpx solid #e7e7e7;
+            padding-bottom: 30rpx;
+            padding-top: 30rpx;
+
+            .store {
+                width: 70%;
+                display: flex;
+                flex-direction: column;
+                align-content: center;
+                justify-content: center;
+
+                .name {
+                    color: #343434;
+                    width: 100%;
+                    text-overflow: ellipsis;
+                    white-space: nowrap;
+                    overflow: hidden;
+                }
+
+                .adds {
+                    color: #999;
+                    font-size: 26rpx;
+                    overflow: hidden;
+                    text-overflow: ellipsis;
+                    display: -webkit-box;
+                    -webkit-line-clamp: 2;
+                    -webkit-box-orient: vertical;
+                }
+            }
+
+            .buttonBox {
+                width: 30%;
+                display: flex;
+                align-items: center;
+                justify-content: flex-end;
+
+                .button {
+                    width: 80rpx;
+                    height: 80rpx;
+                    border-radius: 100%;
+                    display: flex;
+                    align-items: center;
+                    justify-content: center;
+                    margin-left: 20rpx;
+                }
+            }
+        }
+
+        .goodsBox {
+            margin-top: 12rpx;
+            min-height: 250rpx;
+
+            .goods {
+                display: flex;
+                width: 90%;
+                margin: 0 auto;
+                color: #343434;
+                padding-bottom: 30rpx;
+
+                .infoBox {
+                    width: 50%;
+
+                    .title {
+                        width: 100%;
+                        text-overflow: ellipsis;
+                        white-space: nowrap;
+                        overflow: hidden;
+
+                        text {
+                            font-size: 24rpx;
+                            padding-left: 10rpx;
+                        }
+                    }
+
+                    .label {
+                        color: #999;
+                        font-size: 26rpx;
+                        overflow: hidden;
+                        text-overflow: ellipsis;
+                        display: -webkit-box;
+                        -webkit-line-clamp: 2;
+                        -webkit-box-orient: vertical;
+                    }
+                }
+
+                .number {
+                    width: 25%;
+                    display: flex;
+                    justify-content: flex-end;
+                    padding-right: 10rpx;
+                }
+
+                .price {
+                    width: 25%;
+                    display: flex;
+                    justify-content: flex-end;
+                }
+            }
+
+            .total {
+                width: 90%;
+                display: flex;
+                margin: 0 auto;
+                border-top: 1px dashed #e7e7e7;
+                height: 90rpx;
+                align-items: center;
+
+                .name {
+                    width: 50%;
+                    display: flex;
+                    justify-content: flex-start;
+                    color: #343434;
+                }
+
+                .price {
+                    width: 50%;
+                    display: flex;
+                    justify-content: flex-end;
+                    color: #343434;
+                }
+            }
+        }
+
+        .footer {
+            border-top: 2rpx solid #e7e7e7;
+            width: 90%;
+            margin: 0 auto;
+            margin-top: -16rpx;
+            padding-top: 30rpx;
+            color: #999;
+            font-size: 26rpx;
+            line-height: 42rpx;
+            padding-bottom: 30rpx;
+
+            .label {
+                display: flex;
+                align-items: center;
+                height: 70rpx;
+
+                .title {
+                    flex: 0 0 25%;
+                }
+
+                .nums {
+                    flex: 0 0 75%;
+                    display: flex;
+                    justify-content: flex-end;
+                }
+            }
+        }
+    }
+}
+
+.showContent {
+    position: fixed;
+    bottom: -2000rpx;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    z-index: 1000;
+    transition: all .5s;
+
+    .bg {
+        position: absolute;
+        z-index: 1001;
+        width: 100%;
+        height: 100%;
+        top: 0;
+        left: 0;
+    }
+
+    .showBox {
+        position: absolute;
+        bottom: 0;
+        width: 100%;
+        min-height: 600rpx;
+        z-index: 1002;
+        background-color: #fff;
+        border-top-left-radius: 20rpx;
+        border-top-right-radius: 20rpx;
+        box-shadow: 0 0 20rpx rgba(0, 0, 0, .08);
+
+        .pheader {
+            font-size: 32rpx;
+            text-align: center;
+
+            padding: 20rpx 0 10rpx;
+        }
+
+        .qrText {
+            background-color: #CAB88F;
+            width: 300rpx;
+            margin: 0 auto;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            height: 60rpx;
+            border-radius: 6rpx;
+            color: #fff;
+
+            font-size: 30rpx;
+        }
+
+        .images {
+            width: 400rpx;
+            height: 350rpx;
+            margin: 0 auto;
+            overflow: hidden;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+
+            image {
+                width: 400rpx;
+                height: 400rpx;
+            }
+        }
+
+        .payTime {
+            text-align: center;
+            padding: 20rpx 0 0;
+
+        }
+
+        .paypalList {
+            padding-top: 20rpx;
+            padding-bottom: 80rpx;
+
+            .paypal {
+                display: flex;
+                align-items: center;
+                width: 90%;
+                margin: 0 auto;
+                position: relative;
+                padding: 20rpx 0;
+
+                .left {
+                    flex: 0 0 18%;
+                    display: flex;
+                    align-items: center;
+                    justify-content: center;
+                }
+
+                .right {
+                    flex: 0 0 75%;
+
+                    .info {
+                        font-size: 26rpx;
+                    }
+                }
+
+                .icon {
+                    flex: 0 0 7%;
+                }
+            }
+        }
+    }
+}
+
+.loadingBox {
+    .loading {
+        width: 100%;
+        height: 100vw;
+    }
+}
+</style>

+ 138 - 0
src/pagesB/orderingfood/group.vue

@@ -0,0 +1,138 @@
+<template>
+    <div class="l_group">
+        <div class="headbox">
+            <div class="r_btn">
+                <div class="btn" @click="goto('/pagesB/orderingfood/activationcode')">生成激活码</div>
+            </div>
+            <div class="tit">团队人数</div>
+            <div class="usernum f_dinB">{{ num.team }}</div>
+            <div class="tabs flex_r flex_jse">
+                <div class="tab" @click="getTeamList(s)" :class="{active:type==s}" v-for="(i,s) in num.tab" :key="s">{{ i }}</div>
+            </div>
+        </div>
+        <div class="list">
+            <div class="user_info flex_r flex_jb" v-for="(i,s) in users" :key="s">
+                <img class="userimg" :src="i.head_pic" />
+                <div class="u_info">
+                    <div class="p1">{{ i.nickname || num.tab[type] }}</div>
+                    <div class="p1">手机号:{{ i.mobile }}</div>
+                    <div class="p3">加入时间:{{ i.create_time }}</div>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+import { post } from "@/request/api.js";
+export default {
+    name: "l_group",
+    props: {},
+    components: {},
+    data() {
+        return {
+            num: {},
+            type: '',
+            users: []
+        };
+    },
+    methods: {
+        getTeamNum() {
+            post("local/getTeamNum").then(res => {
+                if (res.code == 0) {
+                    this.num = res.data
+                    for (const key in res.data.tab) {
+                        this.getTeamList(key);
+                        break;
+                    }
+                }
+            })
+        },
+        getTeamList(type) {
+            this.type = type;
+            post("local/getTeamList",{type}).then(res => {
+                if (res.code == 0) {
+                    this.users = res.data
+                }
+            })
+        },
+    },
+    onLoad(da) {
+        this.getTeamNum();
+    },
+    onShow() {},
+    mounted() {},
+};
+</script>
+<style scoped lang='scss'>
+.headbox {
+    background-color: #18bb88;
+    height: 400rpx;
+    padding: 30rpx 36rpx;
+    position: relative;
+
+    .r_btn {
+        text-align: right;
+        margin-bottom: 20rpx;
+    }
+
+    .btn {
+        display: inline-block;
+        color: #fff;
+        font-size: 28rpx;
+        padding: 6rpx 32rpx;
+        border-radius: 8rpx;
+        background-color: #d3aa79;
+    }
+
+    .tit {
+        color: #fff;
+        font-size: 40rpx;
+    }
+
+    .usernum {
+        color: #fff;
+        font-size: 56rpx;
+        margin-top: 30rpx;
+        text-align: center;
+    }
+}
+.tabs{
+    width: 100%;
+    position: absolute;
+    left: 0;
+    bottom: 0;
+    .tab{
+        padding: 18rpx 60rpx;
+        background-color: #d3aa79;
+        border-radius: 16rpx 16rpx 0 0;
+        color: #fff;
+        &.active{
+            background-color: #fff;
+            color: #000;
+        }
+    }
+}
+.user_info{
+    padding: 38rpx 32rpx;
+    border-bottom: 1px solid #e5e5e5;
+    .userimg{
+        width: 160rpx;
+        height: 160rpx;
+        border-radius: 10rpx;
+    }
+    .u_info{
+        width: calc(100% - 160rpx);
+        padding: 4rpx 0 4rpx 30rpx;
+        display: flex;
+        flex-direction: column;
+        justify-content: space-between;
+        .p1{
+            font-size: 36rpx;
+        }
+        .p3{
+            font-size: 28rpx;
+            color: #999;
+        }
+    }
+}
+</style>

+ 53 - 92
src/pagesB/orderingfood/orderingfood.vue

@@ -2,17 +2,15 @@
     <view class="content">
         <block v-if="loading">
             <view class="loadingBox">
-                <view class="loading">
-                    <image lazy-load :src="template.overall.loading"></image>
-                </view>
+                <img class="loading" lazy-load src="http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/3a96ff52efce6661adb41c54c29a87241b6e72f5gif" />
             </view>
         </block>
         <block v-else>
             <view class="header">
                 <view class="left">
-                    <view class="title" :style="'color:'+template.color.color2">{{MerchantInfo.restaurant_name}}</view>
-                    <view v-if="distance" class="address" :style="'color:'+template.color.color3">距离您 {{(distance/1000)>1?distance/1000+'千米':distance+'米'}}</view>
-                    <view v-else class="address" :style="'color:'+template.color.color3">{{MerchantInfo.restaurant_address}}</view>
+                    <view class="title ellipsis">{{MerchantInfo.restaurant_name}}</view>
+                    <view v-if="distance" class="address">距离您 {{(distance/1000)>1?distance/1000+'千米':distance+'米'}}</view>
+                    <view v-else class="address">{{MerchantInfo.restaurant_address}}</view>
                 </view>
                 <view class="right">
 					
@@ -75,12 +73,12 @@
                                 </view>
                             </view>
                         </view>
-                        <view style="height: 150rpx;"></view>
+                        <view style="height: 180rpx;"></view>
                     </scroll-view>
                 </view>
             </view>
             <!-- 购物袋 - 底部栏 -->
-            <view v-if="openStoreStatus && cartList.length>0" class="footer" :class="IphoneX>=0?'footerX':''">
+            <view v-if="openStoreStatus && cartList.length>0" class="footer" :class="ios>=0?'footerX':''">
                 <view class="left">
                     <view class="cart" @click="cartShow=!cartShow" :style="'color:'+template.color.color2">
                         <icon type="liwu" size="18" color="#343434"></icon>购物袋<text :style="'background-color:'+template.color.color1">{{cartNumber}}</text>
@@ -95,7 +93,7 @@
             <!-- 购物袋 - 弹窗列表 -->
             <view v-if="cartShow && cartList.length>0" class="showPopBox" style="z-index: 898;">
                 <view class="bg" @click="cartShow=false"></view>
-                <view class="showContent" :style="IphoneX>=0?'bottom:146rpx;':''">
+                <view class="showContent" :style="ios>=0?'bottom:96rpx;':''">
                     <view class="sheade">
                         <view class="left">
                             <view class="text">共{{cartNumber}}件商品</view>
@@ -104,7 +102,7 @@
                             <view class="text" @click="delNoneCartTap()"><icon type="shanchu" size="14"/>清空购物袋</view>
                         </view>
                     </view>
-                    <view class="sconten" :style="IphoneX>=0?'padding-bottom:146rpx;':'padding-bottom: 120rpx;'">
+                    <view class="sconten">
                         <view class="goods" v-for="(item, index) in cartList" :key="index" :style="cartList.length==(index+1)?'border-bottom: none;':''">
                             <view class="left">
                                 <view class="title">{{item.product_name}}</view>
@@ -137,7 +135,7 @@
                     </view>
                 </view>
             </view>
-            <view v-if="!openStoreStatus" class="footer" :class="IphoneX>=0?'footerX':''" style="overflow: hidden;">
+            <view v-if="!openStoreStatus" class="footer" :class="ios>=0?'footerX':''" style="overflow: hidden;">
                 <view class="label" :style="'background-color:'+template.color.color2">本店已休息,营业时间:{{openStoreTime}}</view>
             </view>
 			<!-- 选规格-看详情 -->
@@ -207,7 +205,7 @@ export default {
     data() {
         return {
             loading: true,
-            IphoneX: this.IphoneX,
+            ios: 1,
             template: {
                 color: {
                     color1: "#d3aa79",
@@ -216,7 +214,6 @@ export default {
                     color5: "#d3aa79"
                 }
             },
-            // MerchantInfo: uni.getStorageSync('__yipinShopInfo'),
             userData: uni.getStorageSync('__yipinUserInfo'),
             goodsHeight: 812,
             menuCurrent: 0,
@@ -259,6 +256,15 @@ export default {
 		this.distance = this.MerchantInfo.distance.toFixed(2);
         uni.setNavigationBarTitle({ title: this.MerchantInfo.restaurant_name });
         this.getCartList();
+
+        let that = this;
+        uni.getSystemInfo({
+            success: function(e) {
+                console.log('e',e);
+                // that.ios = e.model.search("iPhone");
+                that.ios = -1;
+            }
+        })
     },
     onLoad(da) {
         this.getGoodsAllList(da)
@@ -269,19 +275,21 @@ export default {
             post("local/getMerchantMenu", da).then(res => {
                 if (res.code == 0) {
                     this.loading = false;
-                    let da = res.data.data.products;
-                    let arr = [],
-                        obj = [];
-                    for (const it of da) {
-                        if (!arr.includes(it.category_name)) arr.push(it.category_name)
-                    }
-                    for (const i of arr) {
-                        obj.push({ title: i, goods: [] })
-                    }
-                    for (const it of da) {
-                        obj[arr.indexOf(it.category_name)].goods.push(it)
+                    if(res.data.error_code == 200){
+                        let da = res.data.data.products;
+                        let arr = [],
+                            obj = [];
+                        for (const it of da) {
+                            if (!arr.includes(it.category_name)) arr.push(it.category_name)
+                        }
+                        for (const i of arr) {
+                            obj.push({ title: i, goods: [] })
+                        }
+                        for (const it of da) {
+                            obj[arr.indexOf(it.category_name)].goods.push(it)
+                        }
+                        this.goodsAllList = obj
                     }
-                    this.goodsAllList = obj
                 }
             })
         },
@@ -387,6 +395,7 @@ export default {
             let json = {
                 restaurant_id: this.MerchantInfo.restaurant_id,
                 product_id: da.product_id,
+                product_img: da.product_img,
                 product_name: da.product_name,
                 user_price: da.user_price,
 				spec_price: spec.spec_price,
@@ -488,9 +497,6 @@ page {
 }
 
 .header {
-    display: flex;
-    align-items: center;
-    justify-content: center;
     width: 100%;
     height: 130rpx;
     position: fixed;
@@ -498,21 +504,17 @@ page {
     z-index: 900;
     background-color: #fff;
     box-shadow: 0 0 10rpx rgba(0, 0, 0, .05);
+    padding: 0 32rpx;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
 
     .left {
-        flex: 0 0 60%;
-        display: flex;
-        flex-direction: column;
-        justify-content: center;
-
         .title {
             width: 90%;
             color: #343434;
             font-size: 30rpx;
             font-weight: bold;
-            text-overflow: ellipsis;
-            white-space: nowrap;
-            overflow: hidden;
         }
 
         .address {
@@ -525,55 +527,6 @@ page {
             overflow: hidden;
         }
     }
-
-    .right {
-        flex: 0 0 35%;
-        display: flex;
-        flex-direction: column;
-        align-items: flex-end;
-
-        .type {
-            display: flex;
-            width: 180rpx;
-            height: 60rpx;
-            border-radius: 100rpx;
-            align-items: center;
-            justify-content: center;
-            font-size: 26rpx;
-
-            .name {
-                background-color: #343434;
-                color: #fff;
-                width: 86rpx;
-                border-radius: 100rpx;
-                display: flex;
-                align-items: center;
-                justify-content: center;
-                height: 54rpx;
-                transition: all .3s;
-            }
-
-            .text {
-                width: 86rpx;
-                display: flex;
-                align-items: center;
-                justify-content: center;
-                color: #fff;
-            }
-        }
-
-        .more {
-            color: #999;
-            font-size: 24rpx;
-            display: flex;
-            align-items: center;
-            padding-top: 6rpx;
-
-            icon {
-                padding-left: 4rpx;
-            }
-        }
-    }
 }
 
 .goodsBox {
@@ -586,7 +539,6 @@ page {
 
         .menuList {
             overflow-y: scroll;
-            // padding-bottom: 20rpx;
             height: calc(100vh - 130rpx);
 
             .menu {
@@ -595,7 +547,7 @@ page {
                 padding: 30rpx 10rpx;
                 text-align: center;
                 background-color: transparent;
-                border-left: 6rpx solid transparent;
+                border-left: 16rpx solid transparent;
                 transition: all 0.6s;
             }
 
@@ -767,11 +719,11 @@ page {
 
 .footer {
     position: fixed;
-    bottom: 140rpx;
+    bottom: 80rpx;
     width: 92%;
     left: 0;
     right: 0;
-    height: 80rpx;
+    height: 100rpx;
     margin: 0 auto;
     border-radius: 100rpx;
     background-color: #fff;
@@ -859,7 +811,7 @@ page {
 }
 
 .footerX {
-    bottom: 166rpx;
+    bottom: 106rpx;
 }
 
 .showPopBox {
@@ -883,7 +835,7 @@ page {
 
     .showContent {
         position: absolute;
-        bottom: 120rpx;
+        bottom: 70rpx;
         left: 0;
         z-index: 972;
         width: 100%;
@@ -927,6 +879,7 @@ page {
         }
 
         .sconten {
+            padding: 20rpx 0 120rpx;
             max-height: 544rpx;
             overflow-y: scroll;
 
@@ -936,7 +889,7 @@ page {
                 display: flex;
                 align-items: center;
                 border-bottom: 1px dashed #f5f5f5;
-				padding: 10rpx 0;
+				padding: 15rpx 0;
 
                 .left {
                     flex: 0 0 60%;
@@ -1199,6 +1152,7 @@ page {
     width: 100%;
     height: 100%;
 }
+
 .good_spec {
 	color: #999;
 	font-size: 22rpx;
@@ -1208,4 +1162,11 @@ page {
 		margin-right: 0;
 	}
 }
+
+.loadingBox{
+    .loading{
+        width: 100%;
+        height: 100vw;
+    }
+}
 </style>

+ 130 - 0
src/pagesB/orderingfood/orderlist.vue

@@ -0,0 +1,130 @@
+<template>
+  <div class="orderlist">
+    <div class="o_item" v-for="(i,s) in orderList" :key="s" @click="goto('/pagesB/orderingfood/detail',{trade_no:i.trade_no,brand_id:i.brand_id})">
+        <div class="p1 flex_r flex_jb">
+            <span class="name_tit ellipsis">{{ i.restaurant_name }}</span>
+            <span class="status">{{ typeto(i.status) }}</span>
+        </div>
+        <div class="p2 flex_r flex_jb">
+            <div class="goods">
+                <div class="imgs" v-for="(a,b) in i.orderGoods" :key="b">
+                    <img :src="a.product_img" alt="" class="g_img">
+                    <div class="na ellipsis">{{ a.product_name }}</div>
+                </div>
+            </div>
+            <div class="g_amount"><span class="amount f_dinB">{{ i.order_amount }}</span></div>
+        </div>
+        <div class="p3">下单时间:{{ i.create_time }}</div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { post } from "@/request/api.js";
+export default {
+  name: "orderlist",
+  props: {},
+  components: {},
+  data() {
+    return {
+        orderList: [],
+    };
+  },
+  methods: {
+    getorderList() {
+        post("local/orderList").then(res => {
+            if (res.code == 0) {
+                this.orderList = res.data
+            }
+        })
+    },
+    typeto(va) {
+        switch (va) {
+            case 0: return "待支付";
+            case 1: return "已下单";
+            case 2: return "已出餐";
+            case 3: return "下单失败";
+            case 4: return "出餐失败";
+            default: return ""
+        }
+    }
+  },
+  onLoad(da) {
+    this.getorderList()
+  },
+  onShow() {},
+  mounted() {},
+};
+</script>
+
+<style scoped lang='scss'>
+.orderlist{
+    padding: 28rpx 32rpx;
+}
+.o_item{
+    background-color: #fff;
+    padding: 25rpx 30rpx;
+    border-radius: 16rpx;
+    margin-bottom: 20rpx;
+    &:last-child{
+        margin-bottom: 0;
+    }
+    .p1{
+        .name_tit{
+            font-size: 36rpx;
+            margin-bottom: 16rpx;
+            width: calc(100% - 110rpx);
+        }
+        .status{
+            font-size: 26rpx;
+            color: #666;
+            width: 110rpx;
+            text-align: right;
+        }
+    }
+    .p2{
+        background-color: rgba($color: #000, $alpha: 0.06);
+        border-radius: 10rpx;
+        padding: 20rpx;
+        margin-bottom: 16rpx;
+    }
+    .goods{
+        width: calc(100% - 160rpx);
+        .imgs{
+            width: 150rpx;
+            margin-right: 16rpx;
+            display: inline-block;
+            &:last-child{
+                margin-right: 0;
+            }
+            .g_img{
+                width: 150rpx;
+                height: 100rpx;
+                border-radius: 8rpx;
+                object-fit: cover;
+            }
+            .na{
+                font-size: 24rpx;
+            }
+        }
+    }
+    .g_amount{
+        display: flex;
+        flex-direction: column;
+        justify-content: center;
+    }
+    .amount{
+        font-size: 32rpx;
+        width: 160rpx;
+        text-align: right;
+        &::before{
+            content: "¥";
+            font-size: 24rpx;
+        }
+    }
+    .p3{
+        font-size: 24rpx;
+        color: #999;
+    }
+}
+</style>

+ 11 - 4
src/pagesB/orderingfood/payTheBill.vue

@@ -26,13 +26,17 @@
                 <span>¥{{ cartTotal || 0 }}</span>
             </div>
             <div class="li flex_r flex_jb">
-                <span>消费积分抵扣<span class="corg">{{Integral}}%</span></span>
+                <span>消费抵扣<span class="corg">{{Integral}}%</span></span>
                 <span>-¥{{ deduction || 0 }}</span>
             </div>
             <div class="li flex_r flex_jb">
                 <span>实付金额</span>
                 <span>¥{{ actuallypaid || 0 }}</span>
             </div>
+            <div class="li flex_r flex_jb">
+                <span>赠送茶宝</span>
+                <span>{{ chabao || 0 }}</span>
+            </div>
         </div>
         <div class="btnbar">
             <div class="btn" @click="payBill">确认支付</div>
@@ -58,6 +62,7 @@ export default {
 
             deduction: 0,
             actuallypaid: 0,
+            chabao: 0,
         };
     },
     methods: {
@@ -71,10 +76,11 @@ export default {
         getIntegral(){
             post("local/getIntegral").then(res=>{
                 if (res.code == 0) {
-                    let va = res.data
+                    let va = res.data.integral
                     this.Integral = this.$h.Mul(va,100);
-                    this.deduction = this.$h.Mul(this.cartTotal,va);
+                    this.deduction = this.$h.Mul(this.cartTotal,va).toFixed(2);
                     this.actuallypaid = this.$h.Sub(this.cartTotal,this.deduction);
+                    this.chabao = this.$h.Mul(this.actuallypaid,va).toFixed(2);
                 }
             })
         },
@@ -116,7 +122,7 @@ export default {
                 Arr.push({
                     product_id: it.product_id,
                     amount: it.number,
-                    // product_details
+                    product_details
                 })
             }
             let product_detail = JSON.stringify(Arr)
@@ -155,6 +161,7 @@ export default {
 </script>
 <style scoped lang='scss'>
 page {
+    min-height: 100%;
     background-color: #ECECEC;
 }
 

+ 2 - 1
src/request/config.js

@@ -8,6 +8,8 @@ if (process.env.UNI_PLATFORM === "h5") {
 	let envV = accountInfo.miniProgram.envVersion;
 	if (envV === "release") apis = 1
 	else apis = 0
+	// if (envV === "develop") apis = 0
+	// else apis = 1
 }
 
 export default apis == 1 ? {
@@ -15,5 +17,4 @@ export default apis == 1 ? {
 } : {
 	// Hhost: "https://shop-api.haocha13.cn/",  //正式接口
 	Hhost: "https://test-api.haocha13.cn/",
-	// Hhost: "https://tea-api.otcpay12.top/",
 }

二進制
src/static/img/load.gif


二進制
src/static/my/assistant.png


二進制
src/static/my/assistantHistory.png


二進制
src/static/my/l_group.png


二進制
src/static/my/order_history.png