Browse Source

首页版块儿调整

DaMowang 2 years ago
parent
commit
61236133aa

+ 6 - 0
src/pages.json

@@ -242,6 +242,12 @@
 		{
 			"root": "pagesB",
 			"pages": [
+				{
+					"path": "specialregion/index",
+					"style": {
+						"navigationBarTitleText": "茶付宝"
+					}
+				},
 				{
 					"path": "orderingfood/orderingfood",
 					"style": {

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

@@ -2,12 +2,6 @@
     <div class="Appindex">
         <!-- 顶部 -->
         <view class="head">
-            <!-- 搜索框 -->
-            <!-- <view class="head_search">
-                <text class="iconfont">&#xe661;</text>
-                <text class="search_text">请输入搜索关键字</text>
-            </view> -->
-            <!-- 搜索框-end -->
             <!-- 轮播图 -->
             <swiper-banner :radius="1" imgScale="5:2" :imgArr="BannerImg" :duration="1000" :interval="5000" :circular="true" :autoplay="true" @goList="goList" :indicator-dots="true" indicator-active-color="#12B280" indicator-color="rgba(255, 255, 255, .82)"></swiper-banner>
             <!-- 轮播图-end -->
@@ -25,7 +19,7 @@
             </view>
             <!-- 公告-end -->
             <!-- 金刚区 -->
-            <view class="head_area">
+            <view class="head_area flex_r flex_jse">
                 <view class="area_list" v-for="(item, index) in area_list" :key="index" @click="setPageUrl(item)">
                     <image class="area_img" :src="item.url"></image>
                     <view class="area_name">{{ item.name }}</view>
@@ -36,7 +30,7 @@
             <view class="activity" v-if="spc_list.length">
                 <image class="act_img act_one_img" :src="spc_list[0].url" @click="setPageUrl({ type: 4 })" mode=""></image>
                 <view class="act_other">
-                    <image class="act_img act_two_img" :src="spc_list[1].url" @click="setPageUrl({ type: 6 })" mode=""></image>
+                    <image class="act_img act_two_img" :src="spc_list[1].url" @click="goto('/pagesB/specialregion/index')" mode=""></image>
                     <image class="act_img act_two_img" :src="spc_list[2].url" mode="" @click="goNoticeList"></image>
                 </view>
             </view>
@@ -86,32 +80,38 @@ export default {
             BannerImg: [], // 轮播图列表
             not_list: [], // 公告列表
             // 金刚区
-            area_list: [{
-                    name: "零售区",
-                    url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/menu/cart.png",
-                    type: 1,
-                },
-                {
-                    name: "批发区",
-                    url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/menu/wholesale.png",
-                    type: 2,
-                },
+            area_list: [
+                // {
+                //     name: "零售区",
+                //     url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/menu/cart.png",
+                //     type: 1,
+                // },
+                // {
+                //     name: "批发区",
+                //     url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/menu/wholesale.png",
+                //     type: 2,
+                // },
                 {
-                    name: "精品优选",
-                    url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/menu/preferred.png",
+                    name: "货易优选",
+                    url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/menu/ss.png",
                     type: 3,
                 },
                 {
                     name: "茶宝兑换",
-                    url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/menu/integral.png",
+                    url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/menu/n_tea.png",
                     type: 5,
                 },
+                {
+                    name: "天天捡漏",
+                    url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/menu/n_day.png",
+                    type: 6,
+                },
             ],
             spc_list: [{
-                    url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/ShuZiTea/ShuZiTeaHT/202210/f70cd8e0-e468-45eb-a9f7-2c42713cd607.jpg",
+                    url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/menu/01.jpg",
                 },
                 {
-                    url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/ShuZiTea/ShuZiTeaHT/202210/b13c0186-fdfc-4b87-b466-5c9fc336cc54.jpg",
+                    url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/menu/02.jpg",
                 },
                 {
                     url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/ShuZiTea/ShuZiTeaHT/202210/49886d9c-ce5a-49ca-a281-12910541344f.jpg",

+ 1 - 1
src/pages/szw-order-list/index.vue

@@ -267,7 +267,7 @@ export default {
           case 2:
             return "批发专区";
           case 3:
-            return "精品优选";
+            return "货易优选";
           case 4:
             return "甄选好物";
           case 5:

+ 249 - 0
src/pagesB/specialregion/index.vue

@@ -0,0 +1,249 @@
+<template>
+    <div class="specialregion">
+        <div class="head">
+            <div class="card">
+                <div class="p1">
+                    <img :src="userinfo.head_pic" class="hpic" />
+                    <span class="num">{{ userinfo.mobile }}</span>
+                    <span class="copy" @click="copyText(userinfo.nickname)">复制</span>
+                    <div class="live">
+                        <img src="/static/my/huangguan.png" class="hico" />
+                        <span class="txt">{{ userinfo.level_name }}</span>
+                    </div>
+                </div>
+                <view class="regional">
+                    <template v-if="userinfo.regionalNode">
+                        <span class="ico iconfont">&#xf727;</span>
+                        <span class="txtinfo">区域节点:{{ userinfo.regionalNode.regional_name }}</span>
+                    </template>
+                </view>
+                <div class="p2 flex_r flex_jse flex_ac">
+                    <div class="i_num">
+                        <p>余额</p>
+                        <p class="dinB">{{ userinfo.user_money }}</p>
+                    </div>
+                    <div class="i_num">
+                        <p>批发券</p>
+                        <p class="dinB">{{ userinfo.integral }}</p>
+                    </div>
+                    <div class="i_num">
+                        <p>昨日收益</p>
+                        <p class="dinB">{{ userinfo.yesterdayProfit }}</p>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div class="muu">
+            <image src="https://teaclub.oss-cn-chengdu.aliyuncs.com/static/02.jpg" @click="gt(1)" mode="widthFix" class="img" />
+            <image src="https://teaclub.oss-cn-chengdu.aliyuncs.com/static/01.jpg" @click="gt(2)" mode="widthFix" class="img" />
+        </div>
+        <div class="muus">
+            <view class="fun mar_t30">
+                <view class="fun_title">云店服务</view>
+                <view class="fun_con mar_t50 flex_r flex_ac">
+                    <navigator class="fun_list flex_c flex_ac" url="/pages/szw-order-list/index" hover-class="none">
+                        <image class="fun_img" src="https://teaclub.oss-cn-chengdu.aliyuncs.com/static/2.png"></image>
+                        <view class="fun_text">订单</view>
+                    </navigator>
+                    <navigator class="fun_list flex_c flex_ac" url="/pages/account/consignment" hover-class="none">
+                        <image class="fun_img" src="/static/my/consign.png"></image>
+                        <view class="fun_text">寄卖</view>
+                    </navigator>
+                    <navigator class="fun_list flex_c flex_ac" url="/pages/account/conversion" hover-class="none">
+                        <image class="fun_img" src="/static/my/10.png"></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"></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"></image>
+                        <view class="fun_text">开票助手</view>
+                    </navigator>
+                </view>
+            </view>
+        </div>
+    </div>
+</template>
+<script>
+// import { post } from "@/request/api.js";
+import uniCopy from "@/utils/copy";
+export default {
+    name: "specialregion",
+    props: {},
+    components: {},
+    data() {
+        return {
+            userinfo: {}, // 获取用户信息
+        };
+    },
+    methods: {
+        gt(va) {
+            if (va == 1) {
+                this.goto("/pages/product/productRetail", { type: 1 });
+            } else if (va == 2) {
+                this.goto("/pages/product/productWholesale", { type: 2 });
+            }
+        },
+        // 获取userinfo
+        async getuserInfo() {
+            this.userinfo = await uni.userfun();
+        },
+        // 复制账号
+        copyText(e) {
+            uniCopy({
+                content: e,
+                success: (res) => {},
+                error: (e) => {},
+            });
+        },
+    },
+    onLoad(da) {},
+    onShow() {
+        this.getuserInfo();
+    },
+    mounted() {},
+};
+</script>
+<style scoped lang='scss'>
+.head {
+    padding: 28rpx 30rpx;
+
+    .card {
+        background: url("https://teaclub.oss-cn-chengdu.aliyuncs.com/static/04.jpg");
+        background-size: 100% 100%;
+        border-radius: 16rpx;
+        padding: 28rpx 0;
+        height: 300rpx;
+    }
+
+    .hpic {
+        width: 66rpx;
+        height: 66rpx;
+        border-radius: 50%;
+        margin-right: 10rpx;
+    }
+
+    .hico {
+        width: 32rpx;
+        height: 32rpx;
+        margin-right: 8rpx;
+    }
+
+    .num {
+        font-size: 36rpx;
+    }
+
+    .live {
+        float: right;
+
+        .txt {
+            font-size: 28rpx;
+        }
+    }
+
+    img,
+    span {
+        vertical-align: middle;
+        color: #fff;
+    }
+
+    .copy {
+        font-size: 20rpx;
+        padding: 0 12rpx;
+        margin-left: 12rpx;
+        border-radius: 6rpx;
+        color: #d44b41;
+        background: #ffc67d;
+    }
+
+    .p1 {
+        padding: 0 30rpx;
+    }
+
+    .p2 {
+        height: calc(100% - 110rpx);
+
+        .i_num {
+            text-align: center;
+            font-size: 30rpx;
+
+            p {
+                color: #fff;
+                font-size: 24rpx;
+            }
+
+            .dinB {
+                margin-top: 10rpx;
+                font-size: 36rpx;
+            }
+        }
+    }
+}
+
+.muu {
+    padding: 0 30rpx;
+    margin: 0 -15rpx;
+
+    .img {
+        margin: 0 15rpx;
+        width: calc(50% - 30rpx);
+        border-radius: 12rpx;
+    }
+}
+
+.fun {
+    width: 100%;
+    overflow: hidden;
+    border-radius: 16rpx;
+    background: #fff;
+    padding: 30rpx 0;
+    box-sizing: border-box;
+
+    .fun_title {
+        padding: 0 30rpx;
+        font-size: 32rpx;
+        color: #333;
+        font-weight: bold;
+    }
+
+    .fun_con {
+        width: 100%;
+        overflow: hidden;
+    }
+
+    .fun_list {
+        width: 25%;
+    }
+
+    .fun_img {
+        width: 50rpx;
+        height: 50rpx;
+        margin-bottom: 10rpx;
+    }
+
+    .fun_text {
+        font-size: 24rpx;
+        color: #333333;
+    }
+}
+.muus{
+    padding: 0 30rpx;
+}
+.regional {
+    height: 30rpx;
+    line-height: 30rpx;
+    padding: 0 30rpx;
+    margin-top: 8rpx;
+
+    .ico {
+        font-size: 26rpx;
+        margin-right: 12rpx;
+    }
+
+    .txtinfo {
+        font-size: 22rpx;
+    }
+}
+</style>

+ 1 - 1
src/utils/myfun.js

@@ -70,7 +70,7 @@ export function tidyTpye(va) {
     switch (va) {
         case '1': return "零售专区";
         case '2': return "批发专区";
-        case '3': return "精品优选";
+        case '3': return "货易优选";
         case '4': return "甄选好物";
         case '5': return "茶宝兑换";
         case '6': return "天天捡漏";