DaMowang 2 роки тому
батько
коміт
e9b96eb62a
50 змінених файлів з 138 додано та 77 видалено
  1. 3 3
      src/app.scss
  2. 2 1
      src/manifest.json
  3. 2 0
      src/pages/accountDetails/teaBaby.vue
  4. 1 1
      src/pages/integral-list/index.vue
  5. 5 0
      src/pages/orderingfood/merchantlist.vue
  6. 1 1
      src/pagesB/address/list.vue
  7. 1 1
      src/pagesB/invoice/invoiceList.vue
  8. 1 1
      src/pagesB/my/assistant.vue
  9. 2 2
      src/pagesB/orderingfood/detail.vue
  10. 104 56
      src/pagesB/orderingfood/orderingfood.vue
  11. 16 11
      src/pagesB/orderingfood/payTheBill.vue
  12. BIN
      src/static/img/add.png
  13. BIN
      src/static/img/con_nothing.png
  14. BIN
      src/static/img/down.png
  15. BIN
      src/static/img/invoice.png
  16. BIN
      src/static/img/weixuanzhong.png
  17. BIN
      src/static/img/weixuanzhong_icon.png
  18. BIN
      src/static/img/xuanzhong_icon.png
  19. BIN
      src/static/img/zanwu.png
  20. BIN
      src/static/my/about.png
  21. BIN
      src/static/my/assistant.png
  22. BIN
      src/static/my/assistantHistory.png
  23. BIN
      src/static/my/consign.png
  24. BIN
      src/static/my/deliver.png
  25. BIN
      src/static/my/dingdan_icon.png
  26. BIN
      src/static/my/dizhi.png
  27. BIN
      src/static/my/evaluate.png
  28. BIN
      src/static/my/f_close.png
  29. BIN
      src/static/my/f_img_code.png
  30. BIN
      src/static/my/feedback.png
  31. BIN
      src/static/my/fund.png
  32. BIN
      src/static/my/give.png
  33. BIN
      src/static/my/green.png
  34. BIN
      src/static/my/huangguan.png
  35. BIN
      src/static/my/inte-list.png
  36. BIN
      src/static/my/l_group.png
  37. BIN
      src/static/my/more.png
  38. BIN
      src/static/my/myBack.png
  39. BIN
      src/static/my/my_pintuan.png
  40. BIN
      src/static/my/order_history.png
  41. BIN
      src/static/my/payment.png
  42. BIN
      src/static/my/pickInStore.png
  43. BIN
      src/static/my/pindou_icon.png
  44. BIN
      src/static/my/pintaun_icon.png
  45. BIN
      src/static/my/pintaunjin_icon.png
  46. BIN
      src/static/my/recharge.png
  47. BIN
      src/static/my/refund.png
  48. BIN
      src/static/my/regional.png
  49. BIN
      src/static/my/service.png
  50. BIN
      src/static/my/setting.png

+ 3 - 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_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');
+    src: url('//at.alicdn.com/t/c/font_3748689_reb152v2m2q.woff2?t=1684829670696') format('woff2'),
+         url('//at.alicdn.com/t/c/font_3748689_reb152v2m2q.woff?t=1684829670696') format('woff'),
+         url('//at.alicdn.com/t/c/font_3748689_reb152v2m2q.ttf?t=1684829670696') format('truetype');
   }
 
 .iconfont {

+ 2 - 1
src/manifest.json

@@ -70,7 +70,8 @@
                 "desc": "你的位置信息将用于搜索附近商家"
             }
         },
-        "requiredPrivateInfos" : [ "chooseLocation", "getLocation", "chooseAddress" ]
+        "requiredPrivateInfos" : [ "chooseLocation", "getLocation", "chooseAddress" ],
+        "lazyCodeLoading": "requiredComponents"
     },
     "mp-alipay" : {
         "usingComponents" : true,

+ 2 - 0
src/pages/accountDetails/teaBaby.vue

@@ -116,6 +116,8 @@ export default {
           case 10: return "收到赠送茶宝";
           case 11: return is ? "实名送茶宝" : "注册送茶宝";
           case 12: return "分享用户送茶宝";
+          case 13: return "联合发起人赠送";
+          case 14: return "权限激活赠送";
           default: return "";
         }
       }

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

@@ -27,7 +27,7 @@
       <view class="const_con">
         <image
           class="closePopup"
-          src="/static/f_close.png"
+          src="/static/my/f_close.png"
           mode=""
           @tap="closePopup"
         ></image>

+ 5 - 0
src/pages/orderingfood/merchantlist.vue

@@ -26,6 +26,7 @@
     </view>
     <div class="list" v-else>
       <div class="li_item" v-for="(i,s) in merchantList" :key="s" @click="goMerchant(i)">
+        <div class="li_title">{{ i.brand_name }}</div>
         <div class="logo_img">
           <img :src="i.restaurant_img" alt="">
         </div>
@@ -257,6 +258,10 @@ export default {
     border-radius: 10rpx;
     box-shadow: 4rpx 4rpx 26rpx 2rpx rgba(17, 18, 29, 0.1);
   }
+  .li_title{
+    font-size: 36rpx;
+    margin-bottom: 16rpx;
+  }
   .logo_img,.con_box{
     display: inline-block;
     vertical-align: top;

+ 1 - 1
src/pagesB/address/list.vue

@@ -35,7 +35,7 @@
       </uni-swipe-action-item>
     </uni-swipe-action>
     <div class="zanwu" v-else>
-      <img src="@/static/img/zanwu.png" alt="" class="zanwuimg">
+      <img src="http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/5a3c6b1e2d098aa6695394c927c38586545188b8png" alt="" class="zanwuimg">
       <view class="zanwutxt">暂无地址信息</view>
     </div>
     <div class="footbtn" @click="goto('/pagesB/address/addaddress')">添加地址</div>

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

@@ -15,7 +15,7 @@
       </div>
     </div>
     <div class="zanwu" v-else>
-      <img src="@/static/img/zanwu.png" alt="" class="zanwuimg">
+      <img src="http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/5a3c6b1e2d098aa6695394c927c38586545188b8png" alt="" class="zanwuimg">
       <view class="zanwutxt">暂无开票历史</view>
     </div>
   </div>

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

@@ -42,7 +42,7 @@
       </div>
     </div>
     <div class="zanwu" v-else>
-      <img src="@/static/img/zanwu.png" alt="" class="zanwuimg">
+      <img src="http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/5a3c6b1e2d098aa6695394c927c38586545188b8png" alt="" class="zanwuimg">
       <view class="zanwutxt">暂无可开票订单</view>
     </div>
     <div class="bottom" v-if="list.length">

+ 2 - 2
src/pagesB/orderingfood/detail.vue

@@ -210,9 +210,9 @@ 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.orderTotal,va);
+                    this.deduction = this.$h.Mul(this.orderTotal,va).toFixed(2);
                     this.actuallypaid = this.$h.Sub(this.orderTotal,this.deduction);
                 }
             })

+ 104 - 56
src/pagesB/orderingfood/orderingfood.vue

@@ -6,18 +6,18 @@
             </view>
         </block>
         <block v-else>
-            <view class="header">
-                <view class="left">
+            <view class="header flex_r flex_jb">
+                <view class="left flex_c flex_jc">
                     <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">
-					
+                <view class="right flex_c flex_jc">
+					<span @click="openm" class="iconfont">&#xe634;</span>
                 </view>
             </view>
             <view style="height: 130rpx;"></view>
-            <view class="goodsBox">
+            <view class="goodsBox" v-if="goodsAllList.length">
                 <view class="left">
                     <scroll-view scroll-y scroll-with-animation class="menuList">
                         <view class="menu" :class="menuCurrent==index?'active':''" :style="menuCurrent==index?'color:'+template.color.color2+';border-color:'+template.color.color1:'color:'+template.color.color3" @click="selectMenuTap(index)" v-for="(item, index) in goodsAllList" :key="index">{{item.title}}</view>
@@ -53,7 +53,7 @@
                                         <view class="title" :style="'color:'+template.color.color2">{{itm.product_name}}</view>
                                         <view class="intro" :style="'color:'+template.color.color3">{{itm.product_description || ""}}</view>
                                         <view class="box">
-                                            <view class="price" :style="'color:'+template.color.color1">¥{{itm.product_price}}</view>
+                                            <view class="price" :style="'color:'+template.color.color1">¥{{itm.user_price}}</view>
                                             <view class="button">
                                                 <block v-if="openStoreStatus">
                                                     <block v-if="itm.product_choose">
@@ -77,6 +77,9 @@
                     </scroll-view>
                 </view>
             </view>
+            <div class="hahaha">
+                <img src="http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/769023cde4b820d36e75baf7b3faef6ea3095cb3png" alt="">
+            </div>
             <!-- 购物袋 - 底部栏 -->
             <view v-if="openStoreStatus && cartList.length>0" class="footer" :class="ios>=0?'footerX':''">
                 <view class="left">
@@ -116,19 +119,6 @@
                                     <icon type="jian" @click="editGoods(item, 'jian')" size="23" :color="item.number==1?'#cccccc':'#d3aa79'"></icon>
                                     <input type="number" :value="item.number" disabled />
                                     <icon type="jia" @click="editGoods(item, 'jia')" size="23" color="#d3aa79"></icon>
-                                    <!-- <block v-if="item.shelve_status">
-										<block v-if="item.stock_number">
-											<icon type="jian" @click="editGoods(item, 'jian')" size="23" :color="item.num==1?'#cccccc':'#d3aa79'"></icon>
-											<input type="number" :value="item.num" disabled />
-											<icon type="jia" @click="editGoods(item, 'jia')" size="23" :color="item.num>=item.stock_number?'#cccccc':'#d3aa79'"></icon>
-										</block>
-										<block v-else>
-											<text>商品已售罄</text>
-										</block>
-									</block>
-									<block v-else>
-										<text>商品已下架</text>
-									</block> -->
                                 </view>
                             </view>
                         </view>
@@ -136,14 +126,14 @@
                 </view>
             </view>
             <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 class="label" :style="'background-color:'+template.color.color2">本店已休息,<block v-if="MerchantInfo.open_time">营业时间{{MerchantInfo.open_time}}</block></view>
             </view>
 			<!-- 选规格-看详情 -->
             <view v-if="goodShow" class="showPopBox" style="display: flex;align-items: center;justify-content: center;">
                 <view class="bg" @click="goodShow=false"></view>
                 <view class="goodsConten">
                     <view class="image">
-                        <image :src="goodsOneData.product_img" lazy-load mode="aspectFit"></image>
+                        <img :src="goodsOneData.product_img" class="img" />
                         <icon @click="goodShow=false" type="close" size="25" :color="template.color.color5" style="top: 10rpx; right: 10rpx;"></icon>
                     </view>
                     <view class="title" :style="'color:'+template.color.color2">{{goodsOneData.product_name}}</view>
@@ -178,7 +168,6 @@
                         </view>
                         <block v-if="openStoreStatus">
                                 <view class="button" @click="addShopCar()" :style="'background-color:'+template.color.color1">加入购物袋</view>
-                            <!-- <view v-else class="button none" :style="'background-color:'+template.color.color5">{{goodsOneData.stock_number===0?'商品已售罄':'加入购物袋'}}</view> -->
                         </block>
                         <block v-else>
                             <view class="button none" :style="'background-color:'+template.color.color5">本店已休息</view>
@@ -273,12 +262,11 @@ export default {
 		// 获取当下店铺所有商品
         getGoodsAllList(da) {
             post("local/getMerchantMenu", da).then(res => {
+                this.loading = false;
                 if (res.code == 0) {
-                    this.loading = false;
                     if(res.data.error_code == 200){
                         let da = res.data.data.products;
-                        let arr = [],
-                            obj = [];
+                        let arr = [], obj = [];
                         for (const it of da) {
                             if (!arr.includes(it.category_name)) arr.push(it.category_name)
                         }
@@ -291,13 +279,15 @@ export default {
                         this.goodsAllList = obj
                     }
                 }
+                else if (res.code == -1) {
+                    this.openStoreStatus = false
+                }
             })
         },
 		// 获取商品详情 - 展开规格选择
         getDteailsTap(index, idx) {
-            let self = this;
-            let data = self.goodsAllList[index].goods[idx];
-            self.childProductData = {};
+            let data = this.goodsAllList[index].goods[idx];
+            this.childProductData = {};
             let info = this.MerchantInfo;
             if (data.product_choose) {
                 post("local/getProduct", {
@@ -306,14 +296,45 @@ export default {
                     product_id: data.product_id
                 }).then(res => {
                     if (res.code === 0) {
-                        self.goodsOneData = res.data.data;
-                        self.buyNumber = 1;
-                        self.goodShow = true;
+                        let da = res.data.data
+                        if(da.brand_id == 13){
+                            let arr = []
+                            for (let it of da.details.specifications) {
+                                arr.push({
+                                    name: it.name,
+                                    sku_infos: it.ingredients
+                                })
+                            }
+                            da.details.optional = arr
+                        }
+                        if(da.brand_id == 19){
+                            let arr = []
+                            for (let it of da.details.specifications) {
+                                arr.push({
+                                    name: it.name,
+                                    sku_infos: it.values
+                                })
+                            }
+                            da.details.optional = arr
+                        }
+                        if(da.brand_id == 2){
+                            let arr = []
+                            for (let it of da.details.spu_specs) {
+                                arr.push({
+                                    name: it.name,
+                                    sku_infos: it.values
+                                })
+                            }
+                            da.details.optional = arr
+                        }
+                        this.goodsOneData = da;
+                        this.buyNumber = 1;
+                        this.goodShow = true;
                     }
                 })
             } else {
-                self.goodsOneData = data;
-                self.goodShow = true;
+                this.goodsOneData = data;
+                this.goodShow = true;
             }
         },
 		// 商品类别导航跳转
@@ -323,8 +344,7 @@ export default {
         },
 		// 选择规格标签
         selectSpecsTap(index, idx) {
-            let self = this;
-            let specification = self.goodsOneData.details.optional;
+            let specification = this.goodsOneData.details.optional;
             for (let i = 0; i < specification.length; i++) {
                 if (i == index) {
                     specification[i].active = true;
@@ -337,7 +357,7 @@ export default {
                     }
                 }
             }
-            self.$set(self.goodsOneData.details.optional, index, self.goodsOneData.details.optional[index])
+            this.$set(this.goodsOneData.details.optional, index, this.goodsOneData.details.optional[index])
             let curSelectNum = 0;
 			let spec_price = 0;
             let selectSpecArr = [];
@@ -357,12 +377,11 @@ export default {
                 }
             }
             if (curSelectNum == specification.length) {
-                self.canSubmit = true;
+                this.canSubmit = true;
             } else {
-                self.canSubmit = false;
+                this.canSubmit = false;
             }
-			
-            self.childProductData = { selectSpecArr, selectSpecification, spec_price };
+            this.childProductData = { selectSpecArr, selectSpecification, spec_price };
         },
 		// 添加购物袋前  修改购买数量
         editGoodsOne(type) {
@@ -377,18 +396,20 @@ export default {
         },
 		// 添加进购物袋
         addShopCar() {
-            let self = this;
-            let data = self.goodsOneData;
-            if (data.product_choose) {
-                if (self.canSubmit) {
-                    self.addCartGoods(data, self.buyNumber, self.childProductData);
-                } else {
-                    uni.showToast({ title: '请选择规格', icon: 'none' });
-                    return
-                }
-            } else {
-                self.addCartGoods(data, self.buyNumber);
-            }
+            let data = this.goodsOneData;
+
+            this.addCartGoods(data, this.buyNumber, this.childProductData);
+            
+            // if (data.product_choose) {
+            //     if (this.canSubmit) {
+            //         this.addCartGoods(data, this.buyNumber, this.childProductData);
+            //     } else {
+            //         uni.showToast({ title: '请选择规格', icon: 'none' });
+            //         return
+            //     }
+            // } else {
+            //     this.addCartGoods(data, this.buyNumber);
+            // }
         },
 		// 添加购物袋
         addCartGoods(da, num, spec = []) {
@@ -486,7 +507,19 @@ export default {
                 restaurant_id: this.MerchantInfo.restaurant_id,
                 brand_id: this.MerchantInfo.brand_id,
             })
-        }
+        },
+        openm(){
+            let latitude = parseFloat(this.MerchantInfo.latitude);
+            let longitude = parseFloat(this.MerchantInfo.longitude);
+            let name = this.MerchantInfo.brand_name;
+            let address = this.MerchantInfo.restaurant_address;
+            uni.openLocation({
+                latitude, longitude, scale: 5, name, address,
+                success: function () {
+                    console.log('success');
+                }
+            });
+        },
     }
 }
 </script>
@@ -505,11 +538,9 @@ page {
     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 {
+        width: calc(100% - 60rpx);
         .title {
             width: 90%;
             color: #343434;
@@ -527,6 +558,14 @@ page {
             overflow: hidden;
         }
     }
+    .right{
+        width: 60rpx;
+        text-align: right;
+        .iconfont{
+            font-size: 50rpx;
+            color: #666;
+        }
+    }
 }
 
 .goodsBox {
@@ -717,6 +756,11 @@ page {
     }
 }
 
+.hahaha{
+    text-align: center;
+    margin-top: calc(30vh - 150rpx);
+}
+
 .footer {
     position: fixed;
     bottom: 80rpx;
@@ -1008,6 +1052,10 @@ page {
             align-items: center;
             justify-content: center;
             position: relative;
+            .img{
+                object-fit: cover;
+                border-radius: 10rpx 10rpx 0 0;
+            }
 
             icon {
                 position: absolute;

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

@@ -27,12 +27,14 @@
             </div>
             <div class="li flex_r flex_jb">
                 <span>消费金抵扣<span class="corg">{{Integral}}%</span></span>
-                <span>-¥{{ deduction || 0 }}</span>
+                <span class="corg">-¥{{ deduction || 0 }}</span>
             </div>
             <div class="li flex_r flex_jb">
                 <span>实付金额</span>
                 <span>¥{{ actuallypaid || 0 }}</span>
             </div>
+        </div>
+        <div class="money card">
             <div class="li flex_r flex_jb">
                 <span>赠送茶宝</span>
                 <span>{{ chabao || 0 }}</span>
@@ -108,17 +110,15 @@ export default {
             for (const it of this.cartList) {
                 let product_details = []
                 let spec = JSON.parse(it.spec)
-                // let ar = [], ar2 = [];
-                // for (const i of spec.selectSpecArr) {
-                //     ar.push(i.pid);
-                //     ar2.push(i.id);
-                // }
-                for (const i of spec.selectSpecArr) {
-                    product_details.push({
-                        specification_id: i.pid,
-                        sku_id: i.id
-                    })
+                if(spec.selectSpecArr){
+                    for (const i of spec.selectSpecArr) {
+                        product_details.push({
+                            specification_id: i.pid,
+                            sku_id: i.id
+                        })
+                    }
                 }
+                console.log('product_details',product_details);
                 Arr.push({
                     product_id: it.product_id,
                     amount: it.number,
@@ -235,6 +235,11 @@ page {
     }
 }
 
+.mag{
+    font-size: 26rpx;
+    color: #999;
+}
+
 .card {
     background-color: #fff;
     border-radius: 26rpx;

BIN
src/static/img/add.png


BIN
src/static/img/con_nothing.png


BIN
src/static/img/down.png


BIN
src/static/img/invoice.png


BIN
src/static/img/weixuanzhong.png


BIN
src/static/img/weixuanzhong_icon.png


BIN
src/static/img/xuanzhong_icon.png


BIN
src/static/img/zanwu.png


BIN
src/static/my/about.png


BIN
src/static/my/assistant.png


BIN
src/static/my/assistantHistory.png


BIN
src/static/my/consign.png


BIN
src/static/my/deliver.png


BIN
src/static/my/dingdan_icon.png


BIN
src/static/my/dizhi.png


BIN
src/static/my/evaluate.png


BIN
src/static/my/f_close.png


BIN
src/static/my/f_img_code.png


BIN
src/static/my/feedback.png


BIN
src/static/my/fund.png


BIN
src/static/my/give.png


BIN
src/static/my/green.png


BIN
src/static/my/huangguan.png


BIN
src/static/my/inte-list.png


BIN
src/static/my/l_group.png


BIN
src/static/my/more.png


BIN
src/static/my/myBack.png


BIN
src/static/my/my_pintuan.png


BIN
src/static/my/order_history.png


BIN
src/static/my/payment.png


BIN
src/static/my/pickInStore.png


BIN
src/static/my/pindou_icon.png


BIN
src/static/my/pintaun_icon.png


BIN
src/static/my/pintaunjin_icon.png


BIN
src/static/my/recharge.png


BIN
src/static/my/refund.png


BIN
src/static/my/regional.png


BIN
src/static/my/service.png


BIN
src/static/my/setting.png