Browse Source

消费金电商细节优化

xiaomei 1 year ago
parent
commit
0f7721f656

+ 11 - 9
src/pages/consumerGold/index.vue

@@ -105,13 +105,15 @@
                 <span class="corFE2C15">¥{{ Number(i.consume) }}</span>
               </view>
               <!-- <view class="product-txt" v-if="i.type == 1">赠送{{ i.give_integral + "批发券" }}</view> -->
-              <view class="product-txt"
-                >限时赠送<text class="corFE2C15">{{ i.teac }}</text
-                >TeaC</view
-              >
-              <view class="product-txt fenxiang">
-                <text class="iconfont red">&#xe62b;</text>
-                <text class="red">分享约获得 {{ i.first_teac }} 现金</text>
+              <view class="flex_r flex_ac">
+                <view class="product-txt"
+                  >赠<text class="corFE2C15">{{ i.teac }}</text
+                  >TeaC</view
+                >
+                <view class="product-txt fenxiang">
+                  <text class="iconfont red">&#xe62b;</text>
+                  <text class="red">{{ i.first_teac }}</text>
+                </view>
               </view>
             </view>
           </view>
@@ -545,7 +547,7 @@ export default {
     color: #787878;
 
     .iconfont {
-      margin-right: 6rpx;
+      margin-right: 3rpx;
     }
   }
 
@@ -564,7 +566,7 @@ export default {
 
   .fenxiang {
     font-size: 20rpx;
-    background: rgba(250, 46, 24, 0.08);
+    // background: rgba(250, 46, 24, 0.08);
     display: inline-block;
     border-radius: 6rpx;
     padding: 0 16rpx;

+ 15 - 3
src/pages/consumerGold/specialCategory.vue

@@ -31,17 +31,29 @@
             >每<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)"
+          <view class="product-txt" v-if="['3'].includes(type)"
             >限时赠送<text class="corFE2C15">{{ i.teac }}</text
             >TeaC</view
           >
-          <view class="product-txt fenxiang" v-if="['3', '4'].includes(type)">
+          <view class="product-txt fenxiang" v-if="['3'].includes(type)">
             <text class="iconfont red">&#xe62b;</text>
             <text class="red"
               >分享约获得{{ i.first_teac
               }}{{ type == 3 ? "TeaC" : "现金" }}</text
             >
           </view>
+          <view v-if="['4'].includes(type)" class="flex_r flex_ac">
+            <view class="product-txt"
+              >赠<text class="corFE2C15">{{ i.teac }}</text
+              >TeaC</view
+            >
+            <view class="product-txt fenxiang" style="background-color: rgba(0, 0, 0, 0);">
+              <text class="iconfont red">&#xe62b;</text>
+              <text class="red"
+                >{{ i.first_teac }}</text
+              >
+            </view>
+          </view>
         </view>
       </view>
     </view>
@@ -269,7 +281,7 @@ page {
     color: #787878;
 
     .iconfont {
-      margin-right: 6rpx;
+      margin-right: 3rpx;
     }
   }
 

+ 10 - 3
src/pages/index/index.vue

@@ -75,11 +75,18 @@
                             <span class="corFE2C15">¥{{ Number(i.consume) }}</span>
                         </view>
                         <!-- <view class="product-txt" v-if="i.type == 1">赠送{{ i.give_integral + "批发券" }}</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)">
+                        <view class="product-txt" v-if="[3].includes(i.type)">限时赠送<text class="corFE2C15">{{ i.teac }}</text>TeaC</view>
+                        <view class="product-txt fenxiang" v-if="[3].includes(i.type)">
                             <text class="iconfont red">&#xe62b;</text>
                             <text class="red">分享约获得 {{ i.first_teac }} {{i.type==3?'TeaC':'现金'}}</text>
                         </view>
+                        <view v-if="[4].includes(i.type)" class="flex_r flex_ac">
+                            <view class="product-txt">赠<text class="corFE2C15">{{ i.teac }}</text>TeaC</view>
+                            <view class="product-txt fenxiang flex_r flex_ac" style="background-color: rgba(0, 0, 0, 0);">
+                                <text class="iconfont red">&#xe62b;</text>
+                                <text class="red">{{ i.first_teac }}</text>
+                            </view>
+                        </view>
                     </view>
                 </view>
             </view>
@@ -636,7 +643,7 @@ export default {
         color: #787878;
 
         .iconfont {
-            margin-right: 6rpx;
+            margin-right: 3rpx;
         }
     }
 

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

@@ -45,13 +45,20 @@
         <!-- 标题信息栏 -->
         <view class="title_info">
             <view class="goods_name">{{ detail.goods_name }}</view>
-            <view class="goods_teac flex_r flex_jb" v-if="['3','4'].includes(type)">
+            <view class="goods_teac flex_r flex_jb" v-if="['3'].includes(type)">
                 <view class="product-txt">限时赠送{{ detail.teac }}TeaC</view>
                 <view class="product-txt fenxiang">
                     <text class="iconfont red">&#xe62b;</text>
                     <text class="red">分享约获得 {{ detail.first_teac }} {{type==3?'TeaC':'现金'}}</text>
                 </view>
             </view>
+            <view class="goods_teac flex_r" v-if="['4'].includes(type)">
+                <view class="product-txt">赠{{ detail.teac }}TeaC</view>
+                <view class="product-txt fenxiang" style="margin-left: 30rpx; background-color: rgba(0, 0, 0, 0);">
+                    <text class="iconfont red">&#xe62b;</text>
+                    <text class="red">{{ detail.first_teac }}</text>
+                </view>
+            </view>
             <view class="goods_teac flex_r flex_jb" v-if="['7'].includes(type)">
                 <view class="product-txt"></view>
                 <view class="product-txt fenxiang">

+ 82 - 4
src/pages/settledMerchant/index.vue

@@ -7,11 +7,21 @@
             </div>
             <div class="search flex_r flex_jb flex_ac">
                 <span class="iconfont">&#xe661;</span>
-                <input v-model="Query.name" @confirm="navSearch" class="inp" placeholder="搜索你要的内容">
-                <span class="search_btn" @click="navSearch">搜索</span>
+                <input v-model="Query.name" @confirm="navSearch(Query.business)" class="inp" placeholder="搜索你要的内容">
+                <span class="search_btn" @click="navSearch(Query.business)">搜索</span>
             </div>
             <!-- <div class="scan-ico iconfont">&#xe8cf;</div> -->
         </div>
+        <div class="tabs flex_r flex_ac flex_jb flex_wrap">
+            <div class="tabs_item" v-for="(i,s) in tabs" :key="s" @click="navSearch(i.business)">
+                <img :src="i.image" alt="" class="ico">
+            </div>
+        </div>
+        <view class="bou_head flex_r flex_ac flex_jc">
+            <image class="bou_img" src="/static/img/splite.png" mode=""></image>
+            <view class="bou_title">{{  tabVlue }}</view>
+            <image class="bou_img" src="/static/img/splite.png" mode=""></image>
+        </view>
         <div class="list" v-if="list.length">
             <div class="li_item" v-for="(i,s) in list" :key="s" @click="goMerchant(i)">
                 <div class="logo_img">
@@ -45,11 +55,15 @@ export default {
                 longitude: "",
                 page: 1,
                 rows: 20,
-                city: ""
+                city: "",
+                business: -1
             },
             pageData: {},
             LocationCity: "中国",
             showAddress: false,
+            tabs: [],
+            tabObj: {},
+            tabVlue: '全部'
         };
     },
     methods: {
@@ -64,6 +78,20 @@ export default {
             this.Query.longitude = adres.lng;
             this.getList();
         },
+        getTabs() {
+            post("v1/merchant/business", {}).then(res => {
+                if (res.code == 0) {
+                    this.tabs = res.data
+                    this.getTypeDesc()
+                }
+            })
+        },
+        async getTypeDesc() {
+            let res = await post("v1/merchant/typeDesc");
+            if (res.code == 0) {
+                this.tabObj = res.data.business
+            }
+        },
         getList(page) {
             if (page) {
                 this.list = []
@@ -80,8 +108,21 @@ export default {
             })
         },
         // 搜索
-        navSearch() {
+        navSearch(business) {
+            console.log(business,business+''!='');
+            if(business+'' != '') {
+                if (business != -1) {
+                    let obj = this.tabObj
+                    obj = obj.filter(item=>{
+                        return item.value == business
+                    })
+                    this.tabVlue = obj[0].text || '全部'
+                }
+                
+                this.Query.business = business
+            }
             if (!this.Query.name) delete this.Query.name
+            
             this.getList(1);
         },
         // 获取当前城市
@@ -109,7 +150,13 @@ export default {
     onLoad(da) {
         this.getToCity();
     },
+    onTabItemTap(item) {
+        this.tabVlue = '全部'
+        this.Query.business = -1;
+        this.getList(1)
+    },
     onShow() {
+        this.getTabs();
         this.getLocation();
     },
     mounted() {},
@@ -166,6 +213,18 @@ export default {
     }
 }
 
+.tabs{
+    padding: 30rpx 40rpx 0;
+    &_item {
+        width: 105rpx;
+        margin: 10rpx 10rpx;
+        .ico {
+            width: 100%;
+            height: 138rpx;
+        }
+    }
+}
+
 .list {
     padding: 30rpx;
 
@@ -223,4 +282,23 @@ export default {
         }
     }
 }
+.bou_head {
+  width: 100%;
+  height: 114rpx;
+  // margin-top: 50rpx;
+
+  .bou_img {
+    width: 92rpx;
+    height: 30rpx;
+  }
+
+  .bou_title {
+    height: 30rpx;
+    line-height: 30rpx;
+    font-size: 36rpx;
+    color: #121212;
+    font-weight: bold;
+    margin: 0 36rpx;
+  }
+}
 </style>

+ 9 - 2
src/pages/sign/index.vue

@@ -79,11 +79,18 @@
                         <span class="corFE2C15">¥{{ Number(i.consume) }}</span>
                     </view>
                     <!-- <view class="product-txt" v-if="i.type == 1">赠送{{ i.give_integral + "批发券" }}</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)">
+                    <view class="product-txt" v-if="['3'].includes(i.type)">限时赠送<text class="corFE2C15">{{ i.teac }}</text>TeaC</view>
+                    <view class="product-txt fenxiang" v-if="['3'].includes(i.type)">
                         <text class="iconfont red">&#xe62b;</text>
                         <text class="red">分享约获得 {{ i.first_teac }} {{i.type==3?'TeaC':'现金'}}</text>
                     </view>
+                    <view v-if="['4'].includes(i.type)" class="flex_r flex_ac">
+                        <view class="product-txt">赠<text class="corFE2C15">{{ i.teac }}</text>TeaC</view>
+                        <view class="product-txt fenxiang flex_r flex_ac" style="background-color: rgba(0, 0, 0, 0);">
+                            <text class="iconfont red">&#xe62b;</text>
+                            <text class="red">{{ i.first_teac }}</text>
+                        </view>
+                    </view>
                 </view>
             </view>
         </view>