ソースを参照

✨ feat:自定义tabbar,商家端待解决

yizhiyang 1 年間 前
コミット
70022066de

+ 1 - 3
src/api/client/community.js

@@ -8,14 +8,13 @@ export function clientContentList(data) {
   return request({
     url: '/maintain/client/content/page',
     method: 'get',
-	data:data,
+    data: data,
     header: {
       'content-type': 'application/x-www-form-urlencoded',
     },
   });
 }
 
-
 // // 动态评论 - 新增
 // export function addClientContent(data) {
 //   return request({
@@ -40,4 +39,3 @@ export function clientContentList(data) {
 //     },
 //   });
 // }
-

+ 2 - 4
src/api/client/message.js

@@ -7,23 +7,21 @@ export function clientCommentList(data) {
   return request({
     url: '/maintain/client/comment/page',
     methods: 'get',
-	data:data,
+    data: data,
     header: {
       'content-type': 'application/x-www-form-urlencoded',
     },
   });
 }
 
-
 // 动态评论 - 新增
 export function addClientComment(data) {
   return request({
     url: `/maintain/client/comment/add`,
     method: 'post',
-	data: data,
+    data: data,
     header: {
       'Content-Type': 'application/json',
     },
   });
 }
-

+ 131 - 0
src/components/tabbar/index.vue

@@ -0,0 +1,131 @@
+<template>
+  <view>
+    <view v-show="true">
+      <u-tabbar :value="currentTab" activeColor="#2D73F0" inactiveColor="#333">
+        <u-tabbar-item
+          v-for="item in clientList"
+          :key="item.name"
+          :text="item.text"
+          :name="item.name"
+          @click="handTab(item)"
+        >
+          <image class="bar_img" slot="active-icon" :src="item.selectedIconPath"></image>
+          <image class="bar_img" slot="inactive-icon" :src="item.iconPath"></image>
+        </u-tabbar-item>
+      </u-tabbar>
+    </view>
+    <view v-show="false">
+      <u-tabbar :value="currentTab" activeColor="#2D73F0" inactiveColor="#333" :border="true">
+        <u-tabbar-item
+          v-for="item in merchantList"
+          :key="item.name"
+          :text="item.text"
+          :name="item.name"
+          @click="handTab(item)"
+        >
+          <image class="bar_img" slot="active-icon" :src="item.selectedIconPath"></image>
+          <image class="bar_img" slot="inactive-icon" :src="item.iconPath"></image>
+        </u-tabbar-item>
+      </u-tabbar>
+    </view>
+  </view>
+</template>
+
+<script>
+// TODO: 商家端自定义tabbar待处理
+export default {
+  name: 'TabBar',
+  props: {
+    currentTab: {
+      type: String,
+      default: 'clientHome',
+    },
+  },
+
+  data() {
+    return {
+      clientList: [
+        {
+          text: '首页',
+          name: 'clientHome',
+          pagePath: 'pages/client/tabBar/home/index',
+          iconPath: '/static/images/home.png',
+          selectedIconPath: '/static/images/home-select.png',
+        },
+        {
+          text: '社区',
+          name: 'clientCommunity',
+          pagePath: 'pages/client/tabBar/community/index',
+          iconPath: '/static/images/community.png',
+          selectedIconPath: '/static/images/community-select.png',
+        },
+        {
+          text: '消息',
+          name: 'clientMessage',
+          pagePath: 'pages/client/tabBar/message/index',
+          iconPath: '/static/images/message.png',
+          selectedIconPath: '/static/images/message-select.png',
+        },
+        {
+          text: '我的',
+          name: 'clientMine',
+          pagePath: 'pages/client/tabBar/mine/index',
+          iconPath: '/static/images/mine.png',
+          selectedIconPath: '/static/images/mine-select.png',
+        },
+      ],
+      merchantList: [
+        {
+          text: '订单',
+          name: 'merchantOrder',
+          pagePath: 'pages/merchant/tabBar/order/index',
+          iconPath: '/static/images/home.png',
+          selectedIconPath: '/static/images/home-select.png',
+        },
+        {
+          text: '消息',
+          name: 'merchantMessage',
+          pagePath: 'pages/merchant/tabBar/message/index',
+          iconPath: '/static/images/community.png',
+          selectedIconPath: '/static/images/community-select.png',
+        },
+        {
+          text: '推广',
+          name: 'merchantExtend',
+          pagePath: 'pages/merchant/tabBar/extend/index',
+          iconPath: '/static/images/community.png',
+          selectedIconPath: '/static/images/community-select.png',
+        },
+        {
+          text: '店铺',
+          name: 'merchantStore',
+          pagePath: 'pages/merchant/tabBar/store/index',
+          iconPath: '/static/images/message.png',
+          selectedIconPath: '/static/images/message-select.png',
+        },
+        {
+          text: '我的',
+          name: 'merchantMine',
+          pagePath: 'pages/merchant/tabBar/mine/index',
+          iconPath: '/static/images/mine.png',
+          selectedIconPath: '/static/images/mine-select.png',
+        },
+      ],
+    };
+  },
+  methods: {
+    handTab(row) {
+      uni.switchTab({
+        url: row.pagePath,
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.bar_img {
+  width: 54rpx;
+  height: 54rpx;
+}
+</style>

+ 75 - 0
src/components/tabbar/tabbar.js

@@ -0,0 +1,75 @@
+// TODO:待处理
+
+// const clientList = [
+//   {
+//     text: '首页',
+//     name: 'clientHome',
+//     pagePath: 'pages/client/tabBar/home/index',
+//     iconPath: '/static/images/home.png',
+//     selectedIconPath: '/static/images/home-select.png',
+//   },
+//   {
+//     text: '社区',
+//     name: 'clientCommunity',
+//     pagePath: 'pages/client/tabBar/community/index',
+//     iconPath: '/static/images/community.png',
+//     selectedIconPath: '/static/images/community-select.png',
+//   },
+//   {
+//     text: '消息',
+//     name: 'clientMessage',
+//     pagePath: 'pages/client/tabBar/message/index',
+//     iconPath: '/static/images/message.png',
+//     selectedIconPath: '/static/images/message-select.png',
+//   },
+//   {
+//     text: '我的',
+//     name: 'clientMine',
+//     pagePath: 'pages/client/tabBar/mine/index',
+//     iconPath: '/static/images/mine.png',
+//     selectedIconPath: '/static/images/mine-select.png',
+//   },
+// ];
+
+// const merchantList = [
+//   {
+//     text: '订单',
+//     name: 'merchantOrder',
+//     pagePath: 'pages/merchant/tabBar/order/index',
+//     iconPath: '/static/images/home.png',
+//     selectedIconPath: '/static/images/home-select.png',
+//   },
+//   {
+//     text: '消息',
+//     name: 'merchantMessage',
+//     pagePath: 'pages/merchant/tabBar/message/index',
+//     iconPath: '/static/images/community.png',
+//     selectedIconPath: '/static/images/community-select.png',
+//   },
+//   {
+//     text: '推广',
+//     name: 'merchantExtend',
+//     pagePath: 'pages/merchant/tabBar/extend/index',
+//     iconPath: '/static/images/community.png',
+//     selectedIconPath: '/static/images/community-select.png',
+//   },
+//   {
+//     text: '店铺',
+//     name: 'merchantStore',
+//     pagePath: 'pages/merchant/tabBar/store/index',
+//     iconPath: '/static/images/message.png',
+//     selectedIconPath: '/static/images/message-select.png',
+//   },
+//   {
+//     text: '我的',
+//     name: 'merchantMine',
+//     pagePath: 'pages/merchant/tabBar/mine/index',
+//     iconPath: '/static/images/mine.png',
+//     selectedIconPath: '/static/images/mine-select.png',
+//   },
+// ];
+
+// export default {
+//   clientList,
+//   merchantList,
+// };

+ 9 - 4
src/main.js

@@ -1,24 +1,29 @@
 import Vue from 'vue';
 import App from './App';
 import uView from 'uview-ui';
-import { router, RouterMount } from '@/router'; //路径换成自己的
 import store from '@/store';
 import cache from '@/mixin/cache';
 import empty from '@/components/empty';
-App.mpType = 'app';
-
+import tabbar from '@/components/tabbar';
+import { router, RouterMount } from '@/router'; //路径换成自己的
 import '@/static/iconfont/iconfont.css'; // iconfont的引入
+App.mpType = 'app';
 
 Vue.use(router);
 Vue.use(uView);
 Vue.mixin(cache);
 Vue.component('empty', empty);
+Vue.component('tabbar', tabbar);
 Vue.config.productionTip = false;
 
 App.mpType = 'app';
 
 function isPromise(obj) {
-  return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
+  return (
+    !!obj &&
+    (typeof obj === 'object' || typeof obj === 'function') &&
+    typeof obj.then === 'function'
+  );
 }
 
 uni.addInterceptor({

+ 44 - 22
src/pages.json

@@ -10,34 +10,68 @@
       }
     },
     {
-      "path": "pages/client/tabBar/home",
+      "path": "pages/client/tabBar/home/index",
       "style": {
         "navigationBarTitleText": "首页",
         "navigationStyle": "custom"
       }
     },
     {
-      "path": "pages/client/tabBar/community",
+      "path": "pages/client/tabBar/community/index",
       "style": {
         "navigationBarTitleText": "社区",
         "navigationStyle": "custom"
       }
     },
     {
-      "path": "pages/client/tabBar/message",
+      "path": "pages/client/tabBar/message/index",
       "style": {
         "navigationBarTitleText": "消息",
         "navigationStyle": "custom"
       }
     },
     {
-      "path": "pages/client/tabBar/mine",
+      "path": "pages/client/tabBar/mine/index",
       "style": {
         "navigationBarTitleText": "我的",
         "navigationStyle": "custom"
       }
     },
-
+    {
+      "path": "pages/merchant/tabBar/extend/index",
+      "style": {
+        "navigationBarTitleText": "推广",
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      "path": "pages/merchant/tabBar/mine/index",
+      "style": {
+        "navigationBarTitleText": "我的",
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      "path": "pages/merchant/tabBar/message/index",
+      "style": {
+        "navigationBarTitleText": "消息",
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      "path": "pages/merchant/tabBar/store/index",
+      "style": {
+        "navigationBarTitleText": "店铺",
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      "path": "pages/merchant/tabBar/order/index",
+      "style": {
+        "navigationBarTitleText": "店铺",
+        "navigationStyle": "custom"
+      }
+    },
     {
       "path": "pages/login/register",
       "style": {
@@ -218,7 +252,7 @@
           }
         },
         {
-          "path": "mine/setting/privacypolicy",
+          "path": "mine/setting/privacyPolicy",
           "style": {
             "navigationBarTitleText": "隐私政策"
           }
@@ -233,28 +267,16 @@
     "backgroundColor": "#ffffff",
     "list": [
       {
-        "text": "首页",
-        "pagePath": "pages/client/tabBar/home",
-        "iconPath": "static/images/home.png",
-        "selectedIconPath": "static/images/home-select.png"
+        "pagePath": "pages/client/tabBar/home/index"
       },
       {
-        "pagePath": "pages/client/tabBar/community",
-        "text": "社区",
-        "iconPath": "static/images/community.png",
-        "selectedIconPath": "static/images/community-select.png"
+        "pagePath": "pages/client/tabBar/community/index"
       },
       {
-        "pagePath": "pages/client/tabBar/message",
-        "text": "消息",
-        "iconPath": "static/images/message.png",
-        "selectedIconPath": "static/images/message-select.png"
+        "pagePath": "pages/client/tabBar/message/index"
       },
       {
-        "pagePath": "pages/client/tabBar/mine",
-        "text": "我的",
-        "iconPath": "static/images/mine.png",
-        "selectedIconPath": "static/images/mine-select.png"
+        "pagePath": "pages/client/tabBar/mine/index"
       }
     ]
   },

+ 0 - 5
src/pages/client/clientUser/inquiryList.vue

@@ -1,8 +1,3 @@
-<!--
- * @Author: yizhiyang
- * @Date: 2023-12-27 10:55:25
- * @Description: 
--->
 <template>
   <view class="container"> - 暂无 - </view>
 </template>

+ 0 - 1
src/pages/client/clientUser/mine/appoint/appoint.vue

@@ -5,7 +5,6 @@
         <view class="appoint-title">{{ item.simpleMerchantVO.name }}</view>
         <view class="appoint-address">{{ item.simpleMerchantVO.address }}</view>
         <view class="appoint-flex">
-          <!-- <Image src="https://cdn.uviewui.com/uview/album/1.jpg" /> -->
           <image
             class="img"
             :src="

+ 1 - 1
src/pages/client/clientUser/mine/setting.vue

@@ -41,7 +41,7 @@
             icon="file-text"
             title="隐私政策"
             isLink
-            url="/pages/client/clientUser/mine/setting/privacypolicy"
+            url="/pages/client/clientUser/mine/setting/privacyPolicy"
           />
           <u-cell icon="integral-fill" title="版本信息" value="V0.0.1" />
         </u-cell-group>

+ 1 - 3
src/pages/client/clientUser/mine/setting/agreement.vue

@@ -7,11 +7,9 @@
           <p>
             欢迎使用车旅程科技有限公司的产品服务!车旅程科技有限公司(以下简称“本公司”)提供的产品服务由车旅程科技有限公司及其关联方通过网站、移动应用程序等方式向您提供。
           </p>
-
           <p>
             在使用本公司的产品/服务之前,请您仔细阅读并理解本用户协议。如果您不同意本协议的任何内容,请您停止使用本公司的产品/服务。
           </p>
-
           <p class="title-p">1、服务内容</p>
           <p>
             本公司提供的产品/服务包括但不限于:提供在线购物平台,用户可以在平台上浏览和购买商品;提供用户注册和登录功能,用户可以通过注册和登录账号来使用本公司的产品/服务;提供用户个人信息管理功能,用户可以在个人中心管理和修改个人信息;提供订单管理功能,用户可以查看和管理自己的订单;提供售后服务,用户可以申请退款、退货等售后服务.
@@ -66,7 +64,7 @@
   padding: 5px;
   font-size: 14px;
   line-height: 1.6;
-  text-indent: 2em; 
+  text-indent: 2em;
 }
 .title-p {
   font-size: 16px;

+ 1 - 5
src/pages/client/clientUser/mine/setting/privacypolicy.vue

@@ -1,4 +1,3 @@
-
 <template>
   <view class="page">
     <scroll-view class="content" scroll-y>
@@ -8,11 +7,9 @@
           <p class="head">版本号:V0.0.1</p>
           <p class="head">更新日期:2024年01月31日</p>
           <p class="head">生效日期:2024年01月31日</p>
-
           <p>
             欢迎使用车旅程科技有限公司的产品服务!车旅程科技有限公司(以下简称“本公司”)非常重视您的个人信息保护。本隐私政策将告知您本公司如何收集、使用、存储和保护您的个人信息。
           </p>
-
           <p>
             请在使用本公司的产品服务之前仔细阅读并理解本隐私政策。如果您不同意本政策的任何内容,请您停止使用本公司的产品/服务。
           </p>
@@ -45,7 +42,6 @@
           <p>
             本隐私政策适用中华人民共和国的法律。任何因本隐私政策引起的争议,应通过友好协商解决;协商不成的,可以向有管辖权的人民法院提起诉讼。
           </p>
-
           <p>
             请您在使用本公司的产品/服务之前,仔细阅读并理解本隐私政策。如果您对政策内容有任何疑问,请随时联系我们。
           </p>
@@ -71,4 +67,4 @@
 .head {
   font-size: 14px;
 }
-</style>
+</style>

+ 1 - 0
src/pages/client/clientUser/myScore.vue

@@ -8,6 +8,7 @@
         <u-icon name="arrow-right" color="#fff" size="16"></u-icon>
       </view>
     </view>
+
     <!-- 积分列表 -->
     <view class="integral">
       <u-grid :border="false" col="4">

+ 42 - 36
src/pages/client/tabBar/community.vue → src/pages/client/tabBar/community/index.vue

@@ -1,44 +1,47 @@
 <template>
   <view>
-    <!-- 关注和推荐 -->
-    <u-navbar :autoBack="true" leftIconSize="0">
-      <view slot="center">
-        <u-tabs :list="list" lineWidth="32" @change="tabChange" v-if="!player" />
-        <u-tabs
-          :list="list.filter(tab => tab.name !== '关注')"
-          lineWidth="32"
-          @change="tabChange"
-          v-else
-        />
-      </view>
-    </u-navbar>
+    <view>
+      <!-- 关注和推荐 -->
+      <u-navbar :autoBack="true" leftIconSize="0">
+        <view slot="center">
+          <u-tabs :list="list" lineWidth="32" @change="tabChange" v-if="!player" />
+          <u-tabs
+            :list="list.filter(tab => tab.name !== '关注')"
+            lineWidth="32"
+            @change="tabChange"
+            v-else
+          />
+        </view>
+      </u-navbar>
 
-    <!-- 消息列表 -->
-    <view class="content" :style="{ marginTop: totalHeight + 'px' }">
-      <swiper class="swiper" style="height: 100vh" :duration="duration">
-        <swiper-item>
-          <scroll-view
-            scroll-y="true"
-            class="scroll-y"
-            @scrolltoupper="upper"
-            @scrolltolower="lower"
-            @scroll="scroll"
-          >
-            <view style="padding: 10rpx 20rpx; background-color: #ffffff">
-              <comment-list></comment-list>
-            </view>
-          </scroll-view>
-        </swiper-item>
+      <!-- 消息列表 -->
+      <view class="content" :style="{ marginTop: totalHeight + 'px' }">
+        <swiper class="swiper" style="height: 100vh" :duration="duration">
+          <swiper-item>
+            <scroll-view
+              scroll-y="true"
+              class="scroll-y"
+              @scrolltoupper="upper"
+              @scrolltolower="lower"
+              @scroll="scroll"
+            >
+              <view style="padding: 10rpx 20rpx; background-color: #ffffff">
+                <comment-list></comment-list>
+              </view>
+            </scroll-view>
+          </swiper-item>
 
-        <swiper-item>
-          <scroll-view scroll-y="true">
-            <view style="padding: 10rpx 20rpx">
-              <comment-list></comment-list>
-            </view>
-          </scroll-view>
-        </swiper-item>
-      </swiper>
+          <swiper-item>
+            <scroll-view scroll-y="true">
+              <view style="padding: 10rpx 20rpx">
+                <comment-list></comment-list>
+              </view>
+            </scroll-view>
+          </swiper-item>
+        </swiper>
+      </view>
     </view>
+    <tabbar currentTab="clientCommunity" />
   </view>
 </template>
 <script>
@@ -92,6 +95,9 @@ export default {
   },
   onShow() {
     this.handlerInitList();
+    uni.hideTabBar({
+      animation: false,
+    });
   },
   methods: {
     // 初始化社区列表

+ 0 - 333
src/pages/client/tabBar/home.vue

@@ -1,333 +0,0 @@
-<template>
-	<view class="home">
-		<!-- 顶部导航 -->
-		<view class="nav-bar">
-			<u-navbar :bgColor="'#ffffff'" :placeholder="true">
-				<view slot="left" @click="manualGetLocation">
-					<text>地址</text>
-					<text class="iconfont icon-chevron-down" />
-				</view>
-				<view slot="center">
-					<u-search placeholder="请输入搜索内容" :showAction="false" v-model="keyword"
-						@click="$Router.push('/pages/client/clientPackage/search')" :disabled='true'/>
-				</view>
-			</u-navbar>
-		</view>
-
-		<!-- 轮播图 -->
-		<view class="home-swiper">
-			<u-swiper :list="swiperList" indicator @change="change" @click="click" />
-		</view>
-
-		<!-- 商品分类 -->
-		<view class="home-list">
-			<u-grid :border="false" col="5">
-				<u-grid-item v-for="item in categories" :key="item.id" @tap="handleMenuClick(item)">
-					<u-icon :customStyle="{ paddingTop: 20 + 'rpx' }" :name="item.icon" :size="25"></u-icon>
-					<text class="grid-text">{{ item.name }}</text>
-				</u-grid-item>
-			</u-grid>
-			<u-toast ref="uToast" />
-		</view>
-
-		<!-- 热门推荐 -->
-		<view class="hot">
-			<u-cell :border="false" value="查看更多" isLink @click="$Router.push('/pages/client/clientPackage/storeHot')">
-				<view slot="title" class="hot-title"> 热门推荐 </view>
-			</u-cell>
-			<block v-if="homeData.recommends && homeData.recommends.length > 0">
-				<view>
-					<u-grid :border="false" col="2">
-						<u-grid-item @click="$Router.push(`/pages/client/clientPackage/storeDetail?id=${item.id}`)"
-							v-for="item in homeData.recommends" :key="item.id">
-							<recommend-item :item="item"></recommend-item>
-						</u-grid-item>
-					</u-grid>
-				</view>
-			</block>
-			<block v-else>
-				<u-empty icon="/static/default-graph/no-business.png" text="暂无推荐商家"></u-empty>
-			</block>
-		</view>
-
-		<!-- 附近商家 -->
-		<view class="near">
-			<u-cell :border="false" value="查看更多" isLink
-				@click="$Router.push('/pages/client/clientPackage/storeNearby')">
-				<view slot="title" class="near-title"> 附近商家 </view>
-			</u-cell>
-			<block v-if="homeData.nears && homeData.nears.length > 0">
-				<view>
-					<u-grid :border="false" col="2">
-						<u-grid-item @click="$Router.push(`/pages/client/clientPackage/storeDetail?id=${item.id}`)"
-							v-for="item in homeData.nears" :key="item.id">
-							<hot-item :item="item"></hot-item>
-						</u-grid-item>
-					</u-grid>
-				</view>
-			</block>
-			<block v-else>
-				<u-empty icon="/static/default-graph/no-business.png" text="暂无附近商家"></u-empty>
-			</block>
-		</view>
-
-		<!-- 询价 -->
-		<drag-button :isDock="true" :existTabBar="true" @btnClick="btnClick" />
-	</view>
-</template>
-
-<script>
-	import {
-		getCurrentLocation,
-		getHomePageApi
-	} from '@/api/client/home';
-	import {
-		mapGetters
-	} from 'vuex';
-	import RecommendItem from '@/components/merchant/RecommendItem.vue';
-	import HotItem from '@/components/merchant/HotItem.vue';
-	import dragButton from '@/components/drag/drag-button.vue';
-
-	export default {
-		components: {
-			RecommendItem,
-			HotItem,
-			dragButton,
-		},
-		data() {
-			return {
-				list: [],
-				keyword: '',
-				swiperList: [
-					'https://cdn.uviewui.com/uview/swiper/swiper1.png',
-					'https://cdn.uviewui.com/uview/swiper/swiper2.png',
-					'https://cdn.uviewui.com/uview/swiper/swiper3.png',
-				],
-				homeData: {
-					categories: [],
-					nears: [],
-					recommends: [],
-				},
-			};
-		},
-
-		computed: {
-			...mapGetters(['location']),
-			categories() {
-				let initData = this.homeData.categories.map(item => {
-					if (!item.icon) {
-						item.icon = 'level';
-					}
-					return item;
-				});
-				let result =
-					initData.length > 14 ?
-					initData.splice(0, 14).concat([{
-						id: 'all',
-						icon: 'grid-fill',
-						name: '全部',
-						type: {
-							code: 'ALL',
-							description: '全部',
-						},
-					}, ]) :
-					initData.push({
-						id: 'all',
-						icon: 'grid-fill',
-						name: '全部',
-					});
-				return result;
-			},
-		},
-
-		watch: {
-			location: {
-				handler: async function(newVal, oldVal) {
-					const result = await getCurrentLocation(newVal);
-					const param = Object.assign({}, {
-							region: result.data.id,
-						},
-						newVal,
-					);
-					this.getHomeData(param);
-				},
-			},
-		},
-
-		//页面加载
-		async onLoad() {
-			setTimeout(() => {
-				this.list = new Array(10000).fill(1);
-			}, 5000);
-			uni.getLocation({
-				type: 'gcj02',
-				success: res => {
-					this.location.longitude = res.longitude;
-					this.location.latitude = res.latitude;
-					this.$store.commit('SET_LOCATION', {
-						longitude: res.longitude,
-						latitude: res.latitude,
-					});
-				},
-				fail: () => {
-					this.manualGetLocation();
-				},
-			});
-		},
-
-		methods: {
-			//轮播图切换
-			change() {},
-
-			//轮播图点击
-			click(name) {
-				this.$refs.uToast.success(`点击了第${name}个`);
-			},
-
-			// 获取首页数据
-			getHomeData(location) {
-				getHomePageApi(location)
-					.then(res => {
-						this.homeData = res.data;
-						// 将分类数据做缓存处理
-						this.$store.commit('SET_CATEGORIES', this.homeData.categories);
-					})
-					.catch(err => {});
-			},
-
-			// 手动选择城市
-			manualGetLocation() {
-				uni.chooseLocation({
-					success: res => {
-						this.$store.commit('SET_LOCATION', {
-							longitude: res.longitude,
-							latitude: res.latitude,
-						});
-					},
-				});
-			},
-
-			// 点击菜单
-			handleMenuClick(item) {
-				if (item.id === 'all') {
-					this.$Router.push('/pages/client/clientPackage/category');
-				} else {
-					uni.navigateTo({
-						url: `/pages/client/clientPackage/storeList?id=${item.id}`,
-					});
-				}
-			},
-
-			/* 询价 */
-			btnClick() {
-				// uni.chooseImage({
-				//   count: 9,
-				//   sizeType: ['original', 'compressed'],
-				//   sourceType: ['camera', 'album'],
-				//   success: res => {
-				//     const tempFilePaths = res.tempFilePaths;
-				//     this.uploadFileAlbum();
-				//   },
-				// });
-
-				uni.navigateTo({
-					url: `/pages/client/clientUser/inquiry`,
-				});
-			},
-
-			uploadFileAlbum() {
-				uni.uploadFile({
-					url: '', //服务器地址
-					fileType: 'image', //ZFB必填,不然报错
-					filePath: tempFilePaths[0], //这个就是我们上面拍照返回或者先中照片返回的数组
-					name: 'imgFile',
-					success: uploadFileRes => {
-						let imgData = JSON.parse(uploadFileRes.data);
-						this.imgDataUrl = imgData.data.imgUrl;
-					},
-				});
-			},
-		},
-	};
-</script>
-
-<style lang="scss" scoped>
-	.home {
-		background-color: #f0efef;
-
-		.nav-bar {
-			::v-deep .u-navbar__content {
-				background-color: #ffffff;
-			}
-		}
-	}
-
-	/* 头部搜索栏 */
-	.home-header {
-		display: flex;
-		align-items: center;
-		height: 90rpx;
-		line-height: 90rpx;
-		padding: 0 20rpx;
-		background-color: #ffffff;
-
-		.goto-address {
-			display: flex;
-			align-items: center;
-
-			.icon-sanjiaoxing1 {
-				font-size: 24rpx;
-				margin: 17rpx 10rpx 0 6rpx;
-			}
-		}
-
-		.search-item {
-			flex: 1;
-		}
-	}
-
-	/* 轮播图 */
-	.home-swiper {
-		padding: 20rpx;
-		margin-bottom: 10rpx;
-	}
-
-	/* 商品分类 */
-	.home-list {
-		background-color: #ffffff;
-		height: 360rpx;
-		margin: 0 20rpx 20rpx 20rpx;
-		padding: 20rpx 0 50rpx 0;
-		border-radius: 10rpx;
-
-		.grid-text {
-			font-size: 12px;
-			color: #909399;
-			padding: 10rpx 0 20rpx 0rpx;
-			box-sizing: border-box;
-		}
-	}
-
-	/* 热门推荐 */
-	.hot {
-		::v-deep .u-cell__body {
-			padding: 10rpx 20rpx;
-
-			.hot-title {
-				border-left: 4px solid $uni-color-primary;
-				padding-left: 20rpx;
-			}
-		}
-	}
-
-	.near {
-		::v-deep .u-cell__body {
-			padding: 10rpx 20rpx;
-
-			.near-title {
-				border-left: 4px solid $uni-color-primary;
-				padding-left: 20rpx;
-			}
-		}
-	}
-</style>

+ 360 - 0
src/pages/client/tabBar/home/index.vue

@@ -0,0 +1,360 @@
+<template>
+  <view class="home">
+    <view>
+      <!-- 顶部导航 -->
+      <view class="nav-bar">
+        <u-navbar :bgColor="'#ffffff'" :placeholder="true">
+          <view slot="left" @click="manualGetLocation">
+            <text>地址</text>
+            <text class="iconfont icon-chevron-down" />
+          </view>
+          <view slot="center">
+            <u-search
+              placeholder="请输入搜索内容"
+              :showAction="false"
+              v-model="keyword"
+              @click="$Router.push('/pages/client/clientPackage/search')"
+              :disabled="true"
+            />
+          </view>
+        </u-navbar>
+      </view>
+
+      <!-- 轮播图 -->
+      <view class="home-swiper">
+        <u-swiper :list="swiperList" indicator @change="change" @click="click" />
+      </view>
+
+      <!-- 商品分类 -->
+      <view class="home-list">
+        <u-grid :border="false" col="5">
+          <u-grid-item v-for="item in categories" :key="item.id" @tap="handleMenuClick(item)">
+            <u-icon :customStyle="{ paddingTop: 20 + 'rpx' }" :name="item.icon" :size="25"></u-icon>
+            <text class="grid-text">{{ item.name }}</text>
+          </u-grid-item>
+        </u-grid>
+        <u-toast ref="uToast" />
+      </view>
+
+      <!-- 热门推荐 -->
+      <view class="hot">
+        <u-cell
+          :border="false"
+          value="查看更多"
+          isLink
+          @click="$Router.push('/pages/client/clientPackage/storeHot')"
+        >
+          <view slot="title" class="hot-title"> 热门推荐 </view>
+        </u-cell>
+        <block v-if="homeData.recommends && homeData.recommends.length > 0">
+          <view>
+            <u-grid :border="false" col="2">
+              <u-grid-item
+                @click="$Router.push(`/pages/client/clientPackage/storeDetail?id=${item.id}`)"
+                v-for="item in homeData.recommends"
+                :key="item.id"
+              >
+                <recommend-item :item="item"></recommend-item>
+              </u-grid-item>
+            </u-grid>
+          </view>
+        </block>
+        <block v-else>
+          <u-empty icon="/static/default-graph/no-business.png" text="暂无推荐商家"></u-empty>
+        </block>
+      </view>
+
+      <!-- 附近商家 -->
+      <view class="near">
+        <u-cell
+          :border="false"
+          value="查看更多"
+          isLink
+          @click="$Router.push('/pages/client/clientPackage/storeNearby')"
+        >
+          <view slot="title" class="near-title"> 附近商家 </view>
+        </u-cell>
+        <block v-if="homeData.nears && homeData.nears.length > 0">
+          <view>
+            <u-grid :border="false" col="2">
+              <u-grid-item
+                @click="$Router.push(`/pages/client/clientPackage/storeDetail?id=${item.id}`)"
+                v-for="item in homeData.nears"
+                :key="item.id"
+              >
+                <hot-item :item="item"></hot-item>
+              </u-grid-item>
+            </u-grid>
+          </view>
+        </block>
+        <block v-else>
+          <u-empty icon="/static/default-graph/no-business.png" text="暂无附近商家"></u-empty>
+        </block>
+      </view>
+
+      <!-- 询价 -->
+      <drag-button :isDock="true" :existTabBar="true" @btnClick="btnClick" />
+    </view>
+
+    <tabbar currentTab="clientHome" />
+  </view>
+</template>
+
+<script>
+import { getCurrentLocation, getHomePageApi } from '@/api/client/home';
+import { mapGetters } from 'vuex';
+import RecommendItem from '@/components/merchant/RecommendItem.vue';
+import HotItem from '@/components/merchant/HotItem.vue';
+import dragButton from '@/components/drag/drag-button.vue';
+
+export default {
+  components: {
+    RecommendItem,
+    HotItem,
+    dragButton,
+  },
+  data() {
+    return {
+      list: [],
+      keyword: '',
+      swiperList: [
+        'https://cdn.uviewui.com/uview/swiper/swiper1.png',
+        'https://cdn.uviewui.com/uview/swiper/swiper2.png',
+        'https://cdn.uviewui.com/uview/swiper/swiper3.png',
+      ],
+      homeData: {
+        categories: [],
+        nears: [],
+        recommends: [],
+      },
+    };
+  },
+
+  computed: {
+    ...mapGetters(['location']),
+    categories() {
+      let initData = this.homeData.categories.map(item => {
+        if (!item.icon) {
+          item.icon = 'level';
+        }
+        return item;
+      });
+      let result =
+        initData.length > 14
+          ? initData.splice(0, 14).concat([
+              {
+                id: 'all',
+                icon: 'grid-fill',
+                name: '全部',
+                type: {
+                  code: 'ALL',
+                  description: '全部',
+                },
+              },
+            ])
+          : initData.push({
+              id: 'all',
+              icon: 'grid-fill',
+              name: '全部',
+            });
+      return result;
+    },
+  },
+
+  watch: {
+    location: {
+      handler: async function (newVal, oldVal) {
+        const result = await getCurrentLocation(newVal);
+        const param = Object.assign(
+          {},
+          {
+            region: result.data.id,
+          },
+          newVal,
+        );
+        this.getHomeData(param);
+      },
+    },
+  },
+  onShow() {
+    uni.hideTabBar({
+      animation: false,
+    });
+  },
+  //页面加载
+  async onLoad() {
+    setTimeout(() => {
+      this.list = new Array(10000).fill(1);
+    }, 5000);
+    uni.getLocation({
+      type: 'gcj02',
+      success: res => {
+        this.location.longitude = res.longitude;
+        this.location.latitude = res.latitude;
+        this.$store.commit('SET_LOCATION', {
+          longitude: res.longitude,
+          latitude: res.latitude,
+        });
+      },
+      fail: () => {
+        this.manualGetLocation();
+      },
+    });
+  },
+
+  methods: {
+    //轮播图切换
+    change() {},
+
+    //轮播图点击
+    click(name) {
+      this.$refs.uToast.success(`点击了第${name}个`);
+    },
+
+    // 获取首页数据
+    getHomeData(location) {
+      getHomePageApi(location)
+        .then(res => {
+          this.homeData = res.data;
+          // 将分类数据做缓存处理
+          this.$store.commit('SET_CATEGORIES', this.homeData.categories);
+        })
+        .catch(err => {});
+    },
+
+    // 手动选择城市
+    manualGetLocation() {
+      uni.chooseLocation({
+        success: res => {
+          this.$store.commit('SET_LOCATION', {
+            longitude: res.longitude,
+            latitude: res.latitude,
+          });
+        },
+      });
+    },
+
+    // 点击菜单
+    handleMenuClick(item) {
+      if (item.id === 'all') {
+        this.$Router.push('/pages/client/clientPackage/category');
+      } else {
+        uni.navigateTo({
+          url: `/pages/client/clientPackage/storeList?id=${item.id}`,
+        });
+      }
+    },
+
+    /* 询价 */
+    btnClick() {
+      // uni.chooseImage({
+      //   count: 9,
+      //   sizeType: ['original', 'compressed'],
+      //   sourceType: ['camera', 'album'],
+      //   success: res => {
+      //     const tempFilePaths = res.tempFilePaths;
+      //     this.uploadFileAlbum();
+      //   },
+      // });
+
+      uni.navigateTo({
+        url: `/pages/client/clientUser/inquiry`,
+      });
+    },
+
+    uploadFileAlbum() {
+      uni.uploadFile({
+        url: '', //服务器地址
+        fileType: 'image', //ZFB必填,不然报错
+        filePath: tempFilePaths[0], //这个就是我们上面拍照返回或者先中照片返回的数组
+        name: 'imgFile',
+        success: uploadFileRes => {
+          let imgData = JSON.parse(uploadFileRes.data);
+          this.imgDataUrl = imgData.data.imgUrl;
+        },
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.home {
+  background-color: #f0efef;
+
+  .nav-bar {
+    ::v-deep .u-navbar__content {
+      background-color: #ffffff;
+    }
+  }
+}
+
+/* 头部搜索栏 */
+.home-header {
+  display: flex;
+  align-items: center;
+  height: 90rpx;
+  line-height: 90rpx;
+  padding: 0 20rpx;
+  background-color: #ffffff;
+
+  .goto-address {
+    display: flex;
+    align-items: center;
+
+    .icon-sanjiaoxing1 {
+      font-size: 24rpx;
+      margin: 17rpx 10rpx 0 6rpx;
+    }
+  }
+
+  .search-item {
+    flex: 1;
+  }
+}
+
+/* 轮播图 */
+.home-swiper {
+  padding: 20rpx;
+  margin-bottom: 10rpx;
+}
+
+/* 商品分类 */
+.home-list {
+  background-color: #ffffff;
+  height: 360rpx;
+  margin: 0 20rpx 20rpx 20rpx;
+  padding: 20rpx 0 50rpx 0;
+  border-radius: 10rpx;
+
+  .grid-text {
+    font-size: 12px;
+    color: #909399;
+    padding: 10rpx 0 20rpx 0rpx;
+    box-sizing: border-box;
+  }
+}
+
+/* 热门推荐 */
+.hot {
+  ::v-deep .u-cell__body {
+    padding: 10rpx 20rpx;
+
+    .hot-title {
+      border-left: 4px solid $uni-color-primary;
+      padding-left: 20rpx;
+    }
+  }
+}
+
+.near {
+  ::v-deep .u-cell__body {
+    padding: 10rpx 20rpx;
+
+    .near-title {
+      border-left: 4px solid $uni-color-primary;
+      padding-left: 20rpx;
+    }
+  }
+}
+</style>

+ 35 - 27
src/pages/client/tabBar/message.vue → src/pages/client/tabBar/message/index.vue

@@ -1,39 +1,42 @@
 <template>
   <view>
-    <u-navbar :autoBack="true" leftIconSize="0">
-      <view slot="center">
-        <u-tabs :list="list" lineWidth="60" :current="current" @change="changeInfo" />
-      </view>
-    </u-navbar>
-
-    <view :style="{ marginTop: totalHeight + 'px' }">
-      <view v-if="current == 0">
-        <!-- <view class="orderList" v-for="item in orderList" :key="item.id" @tap="$Router.push(item.url)"> -->
-        <view class="orderList" v-for="item in orderList" :key="item.id">
-          <image :src="item.img" style="width: 40px; height: 40px" />
-          <view class="orderItem">
-            <view class="order1">{{ item.name }}</view>
-            <view class="order2">{{ item.text }}</view>
+    <view>
+      <u-navbar :autoBack="true" leftIconSize="0">
+        <view slot="center">
+          <u-tabs :list="list" lineWidth="60" :current="current" @change="changeInfo" />
+        </view>
+      </u-navbar>
+
+      <view :style="{ marginTop: totalHeight + 'px' }">
+        <view v-if="current == 0">
+          <!-- <view class="orderList" v-for="item in orderList" :key="item.id" @tap="$Router.push(item.url)"> -->
+          <view class="orderList" v-for="item in orderList" :key="item.id">
+            <image :src="item.img" style="width: 40px; height: 40px" />
+            <view class="orderItem">
+              <view class="order1">{{ item.name }}</view>
+              <view class="order2">{{ item.text }}</view>
+            </view>
+            <u-icon name="arrow-right"></u-icon>
           </view>
-          <u-icon name="arrow-right"></u-icon>
         </view>
-      </view>
 
-      <!-- 消息通知 -->
-      <view v-if="current == 1">
-        <view class="message" @click="notification">
-          <image src="/static/images/home-select.png" style="width: 40px; height: 40px" />
-          <view class="business">
-            <view class="businessItem">商家</view>
-            <view class="messages">您好,请问有什么需要帮助的吗?</view>
-          </view>
-          <view class="time">
-            <view class="timeItem">17:00</view>
-            <u-badge numberType="overflow" :type="type" max="99" :value="value" />
+        <!-- 消息通知 -->
+        <view v-if="current == 1">
+          <view class="message" @click="notification">
+            <image src="/static/images/home-select.png" style="width: 40px; height: 40px" />
+            <view class="business">
+              <view class="businessItem">商家</view>
+              <view class="messages">您好,请问有什么需要帮助的吗?</view>
+            </view>
+            <view class="time">
+              <view class="timeItem">17:00</view>
+              <u-badge numberType="overflow" :type="type" max="99" :value="value" />
+            </view>
           </view>
         </view>
       </view>
     </view>
+    <tabbar currentTab="clientMessage" />
   </view>
 </template>
 
@@ -87,6 +90,11 @@ export default {
       flag: true,
     };
   },
+  onShow() {
+    uni.hideTabBar({
+      animation: false,
+    });
+  },
   computed: {
     totalHeight() {
       return uni.getSystemInfoSync().statusBarHeight + 44;

+ 130 - 192
src/pages/client/tabBar/mine.vue → src/pages/client/tabBar/mine/index.vue

@@ -1,235 +1,168 @@
 <template>
   <view class="container">
-    <view class="head-wrap">
-      <view class="content">
-        <view class="avatar-wrap">
-          <u-avatar :src="user_info.avatar" @click="onClickAvatar" size="80"></u-avatar>
-        </view>
-        <view class="user-nickname">
-          <u--text
-            size="18"
-            bold
-            :text="user_info.nickname ? user_info.nickname : 'fadsfdaf'"
-          ></u--text>
-          <u--text size="12" text="欢迎加入车旅程"></u--text>
-        </view>
-        <view>
-          <!-- 已登录 -->
-          <!-- <view class="user-base" v-if="user_info.nickname"> -->
-          <view class="user-base">
-            <view class="btn-wrap">
-              <u-icon
-                size="30"
-                @tap="$Router.push('/pages/client/clientUser/mine/setting')"
-                name="setting"
-              ></u-icon>
-            </view>
+    <view>
+      <view class="head-wrap">
+        <view class="content">
+          <view class="avatar-wrap">
+            <u-avatar :src="user_info.avatar" @click="onClickAvatar" size="80"></u-avatar>
+          </view>
+          <view class="user-nickname">
+            <u--text
+              size="18"
+              bold
+              :text="user_info.nickname ? user_info.nickname : 'fadsfdaf'"
+            ></u--text>
+            <u--text size="12" text="欢迎加入车旅程"></u--text>
           </view>
+          <view>
+            <!-- 已登录 -->
+            <!-- <view class="user-base" v-if="user_info.nickname"> -->
+            <view class="user-base">
+              <view class="btn-wrap">
+                <u-icon
+                  size="30"
+                  @tap="$Router.push('/pages/client/clientUser/mine/setting')"
+                  name="setting"
+                ></u-icon>
+              </view>
+            </view>
 
-          <!-- 未登录 -->
-          <!-- <view class="clickLogin" v-else @tap="$Router.push('/pages/login/index')">
+            <!-- 未登录 -->
+            <!-- <view class="clickLogin" v-else @tap="$Router.push('/pages/login/index')">
             点击登录/注册
           </view> -->
+          </view>
         </view>
-      </view>
-
-      <!-- 收藏 -->
-      <view class="Collect">
-        <u-grid :border="false" col="4">
-          <u-grid-item
-            v-for="(listItem, listIndex) in collectList"
-            :key="listIndex"
-            @tap="$Router.push(listItem.url)"
-          >
-            <u-icon
-              :customStyle="{ paddingTop: 20 + 'rpx' }"
-              :name="listItem.name"
-              :size="24"
-              color="#fff"
-            />
-            <text class="grid-text">{{ listItem.title }}</text>
-          </u-grid-item>
-        </u-grid>
-      </view>
 
-      <view class="order-out-box">
-        <view class="order-inner-box">
-          <u-grid :border="false" col="4" style="background-color: #fff">
+        <!-- 收藏 -->
+        <view class="Collect">
+          <u-grid :border="false" col="4">
             <u-grid-item
-              v-for="(listItem, listIndex) in oderList"
+              v-for="(listItem, listIndex) in collectList"
               :key="listIndex"
-              @tap="gotoOrder(listItem)"
+              @tap="$Router.push(listItem.url)"
             >
               <u-icon
                 :customStyle="{ paddingTop: 20 + 'rpx' }"
                 :name="listItem.name"
-                :size="34"
-              ></u-icon>
+                :size="24"
+                color="#fff"
+              />
               <text class="grid-text">{{ listItem.title }}</text>
             </u-grid-item>
           </u-grid>
         </view>
-      </view>
-    </view>
 
-    <!-- 我的收益 -->
-    <view class="income-out-box">
-      <view class="income-inner-box" @click="handlerSkipMyProfit">
-        <view class="income-head">
-          <text class="my-income">我的钱包</text>
-          <u-icon name="arrow-right" />
+        <view class="order-out-box">
+          <view class="order-inner-box">
+            <u-grid :border="false" col="4" style="background-color: #fff">
+              <u-grid-item
+                v-for="(listItem, listIndex) in oderList"
+                :key="listIndex"
+                @tap="gotoOrder(listItem)"
+              >
+                <u-icon
+                  :customStyle="{ paddingTop: 20 + 'rpx' }"
+                  :name="listItem.name"
+                  :size="34"
+                ></u-icon>
+                <text class="grid-text">{{ listItem.title }}</text>
+              </u-grid-item>
+            </u-grid>
+          </view>
         </view>
-        <view class="income-content">
-          <u-grid :border="false" col="4" bgColor="#fff">
-            <u-grid-item v-for="(listItem, listIndex) in incomeList" :key="listIndex">
-              <view class="num-box">{{ listItem.num }}元</view>
-              <view class="num-title">{{ listItem.title }}</view>
-            </u-grid-item>
-          </u-grid>
+      </view>
+
+      <!-- 我的收益 -->
+      <view class="income-out-box">
+        <view class="income-inner-box" @click="handlerSkipMyProfit">
+          <view class="income-head">
+            <text class="my-income">我的钱包</text>
+            <u-icon name="arrow-right" />
+          </view>
+          <view class="income-content">
+            <u-grid :border="false" col="4" bgColor="#fff">
+              <u-grid-item v-for="(listItem, listIndex) in incomeList" :key="listIndex">
+                <view class="num-box">{{ listItem.num }}元</view>
+                <view class="num-title">{{ listItem.title }}</view>
+              </u-grid-item>
+            </u-grid>
+          </view>
         </view>
       </view>
-    </view>
 
-    <!-- 预约列表 -->
-    <view class="appointList">
-      <u-cell
-        icon="setting-fill"
-        title="预约列表"
-        isLink
-        url="/pages/client/clientUser/mine/appoint/appoint"
-      />
-      <u-cell icon="setting-fill" title="我要开店" isLink />
-    </view>
+      <!-- 预约列表 -->
+      <view class="appointList">
+        <u-cell
+          icon="setting-fill"
+          title="预约列表"
+          isLink
+          url="/pages/client/clientUser/mine/appoint/appoint"
+        />
+        <u-cell icon="setting-fill" title="我要开店" isLink />
+      </view>
 
-    <view class="other-out-box">
-      <view class="other-inner-box">
-        <u-cell-group :border="false">
-          <u-cell
-            v-for="(item, index) in listData"
-            :key="index"
-            size="large"
-            :border="false"
-            :icon="item.icon"
-            :title="item.title"
-            isLink
-            :url="item.url"
-          ></u-cell>
-          <u-cell
-            :border="false"
-            icon="setting-fill"
-            title="客服中心"
-            size="large"
-            isLink
-            @tap="handleServiceCenterClick"
-          />
-          <u-cell
-            :border="false"
-            icon="setting-fill"
-            title="商务合作"
-            size="large"
-            isLink
-            @tap="handleBusinessCooperationClick"
-          />
-          <u-cell
-            icon="setting-fill"
-            title="意见反馈"
-            size="large"
-            isLink
-            @tap="handleFeedbackClick"
-          />
-        </u-cell-group>
+      <view class="other-out-box">
+        <view class="other-inner-box">
+          <u-cell-group :border="false">
+            <u-cell
+              v-for="(item, index) in listData"
+              :key="index"
+              size="large"
+              :border="false"
+              :icon="item.icon"
+              :title="item.title"
+              isLink
+              :url="item.url"
+            ></u-cell>
+            <u-cell
+              :border="false"
+              icon="setting-fill"
+              title="客服中心"
+              size="large"
+              isLink
+              @tap="handleServiceCenterClick"
+            />
+            <u-cell
+              :border="false"
+              icon="setting-fill"
+              title="商务合作"
+              size="large"
+              isLink
+              @tap="handleBusinessCooperationClick"
+            />
+            <u-cell
+              icon="setting-fill"
+              title="意见反馈"
+              size="large"
+              isLink
+              @tap="handleFeedbackClick"
+            />
+          </u-cell-group>
+        </view>
       </view>
     </view>
+    <tabbar currentTab="clientMessage" />
   </view>
 </template>
 
 <script>
 import { maintainUserInfo } from '@/api/client/mine.js';
 import RichTextWithCopy from '@/components/RichTextWithCopy/RichTextWithCopy';
+import { collectList, oderList, incomeList, listData } from './mine';
 
 export default {
   components: {
     RichTextWithCopy,
   },
+
   data() {
     return {
       content: '这里是客服中心内容,用户可以复制<br>第一行文本<br>第二行文本<br>第三行文本',
-      collectList: [
-        {
-          name: 'photo',
-          title: '收藏',
-          url: '/pages/client/clientUser/collectList',
-        },
-        {
-          name: 'lock',
-          title: '积分',
-          url: '/pages/client/clientUser/myScore',
-        },
-        {
-          name: 'star',
-          title: '询价记录',
-          url: '/pages/client/clientUser/inquiryList',
-        },
-        {
-          name: 'hourglass',
-          title: '优惠券',
-          url: '/pages/client/clientUser/coupon',
-        },
-      ],
-      oderList: [
-        {
-          name: 'order',
-          title: '全部订单',
-          type: 0,
-        },
-        {
-          name: 'bag-fill',
-          title: '待付款',
-          type: 1,
-        },
-        {
-          name: 'car-fill',
-          title: '已付款',
-          type: 2,
-        },
-        {
-          name: 'heart',
-          title: '待评价',
-          type: 3,
-        },
-      ],
-      incomeList: [
-        {
-          num: '0.00',
-          title: '总收益',
-        },
-        {
-          num: '0.00',
-          title: '本月收益',
-        },
-        {
-          num: '0.00',
-          title: '本周收益',
-        },
-        {
-          num: '0.00',
-          title: '可提现',
-        },
-      ],
-      listData: [
-        {
-          id: '0',
-          icon: 'setting-fill',
-          title: '我的团队',
-          url: '/pages/client/clientUser/myGroup',
-        },
-        {
-          id: '1',
-          icon: 'setting-fill',
-          title: '我要推广',
-          url: '/pages/client/clientUser/myGroup',
-        },
-      ],
+      collectList,
+      oderList,
+      incomeList,
+      listData,
       user_info: {}, // 个人信息
       avatar: '/pages/static', // 用于存储图片路径
     };
@@ -238,6 +171,11 @@ export default {
   async mounted() {
     await this.handlerInitUserMessage();
   },
+  onShow() {
+    uni.hideTabBar({
+      animation: false,
+    });
+  },
   methods: {
     // 获取当前用户信息
     handlerInitUserMessage() {

+ 79 - 0
src/pages/client/tabBar/mine/mine.js

@@ -0,0 +1,79 @@
+export const collectList = [
+  {
+    name: 'photo',
+    title: '收藏',
+    url: '/pages/client/clientUser/collectList',
+  },
+  {
+    name: 'lock',
+    title: '积分',
+    url: '/pages/client/clientUser/myScore',
+  },
+  {
+    name: 'star',
+    title: '询价记录',
+    url: '/pages/client/clientUser/inquiryList',
+  },
+  {
+    name: 'hourglass',
+    title: '优惠券',
+    url: '/pages/client/clientUser/coupon',
+  },
+];
+
+export const oderList = [
+  {
+    name: 'order',
+    title: '全部订单',
+    type: 0,
+  },
+  {
+    name: 'bag-fill',
+    title: '待付款',
+    type: 1,
+  },
+  {
+    name: 'car-fill',
+    title: '已付款',
+    type: 2,
+  },
+  {
+    name: 'heart',
+    title: '待评价',
+    type: 3,
+  },
+];
+
+export const incomeList = [
+  {
+    num: '0.00',
+    title: '总收益',
+  },
+  {
+    num: '0.00',
+    title: '本月收益',
+  },
+  {
+    num: '0.00',
+    title: '本周收益',
+  },
+  {
+    num: '0.00',
+    title: '可提现',
+  },
+];
+
+export const listData = [
+  {
+    id: '0',
+    icon: 'setting-fill',
+    title: '我的团队',
+    url: '/pages/client/clientUser/myGroup',
+  },
+  {
+    id: '1',
+    icon: 'setting-fill',
+    title: '我要推广',
+    url: '/pages/client/clientUser/myGroup',
+  },
+];

+ 1 - 1
src/pages/index.vue

@@ -24,7 +24,7 @@ export default {
       });
       // TODO: 获取用户信息
       // await this.$store.dispatch('GetUserInfo');
-      this.$Router.pushTab('/pages/client/tabBar/home');
+      this.$Router.pushTab('/pages/client/tabBar/home/index');
       this.loading = false;
     } catch (error) {
       this.loading = false;

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

@@ -89,7 +89,7 @@ export default {
         uni.$u.toast('请阅读并同意《用户协议》和 《隐私政策》');
         return;
       }
-      this.$Router.pushTab('/pages/client/tabBar/home');
+      this.$Router.pushTab('/pages/client/tabBar/home/index');
       // return;
       if (this.checked.length !== 0) {
         this.loading = true;

+ 1 - 1
src/pages/login/phoneLogin.vue

@@ -161,7 +161,7 @@ export default {
       const res = await maintainSmsCaptcha(params).catch(err => err);
       this.loading = false;
       if (res.code == 200) {
-        this.$Router.pushTab('/pages/client/tabBar/home');
+        this.$Router.pushTab('/pages/client/tabBar/home/index');
         uni.$u.toast('登录成功');
       }
     },

+ 1 - 1
src/pages/login/register.vue

@@ -181,7 +181,7 @@ export default {
             this.$store.commit('SET_ACCESS_TOKEN', res.access_token);
             this.$store.commit('SET_REFRESH_TOKEN', res.refresh_token);
             setTimeout(() => {
-              this.$Router.pushTab('/pages/client/tabBar/home');
+              this.$Router.pushTab('/pages/client/tabBar/home/index');
             }, 1500);
           }
         })

+ 12 - 0
src/pages/merchant/tabBar/extend/index.vue

@@ -0,0 +1,12 @@
+<template>
+  <div>
+    <view>推广</view>
+    <tabbar currentTab="merchantExtend" />
+  </div>
+</template>
+
+<script>
+export default {};
+</script>
+
+<style lang="scss" scoped></style>

+ 12 - 0
src/pages/merchant/tabBar/message/index.vue

@@ -0,0 +1,12 @@
+<template>
+  <div>
+    <view>消息</view>
+    <tabbar currentTab="merchantMessage" />
+  </div>
+</template>
+
+<script>
+export default {};
+</script>
+
+<style lang="scss" scoped></style>

+ 12 - 0
src/pages/merchant/tabBar/mine/index.vue

@@ -0,0 +1,12 @@
+<template>
+  <div>
+    <view>我的</view>
+    <tabbar currentTab="merchantMine" />
+  </div>
+</template>
+
+<script>
+export default {};
+</script>
+
+<style lang="scss" scoped></style>

+ 12 - 0
src/pages/merchant/tabBar/order/index.vue

@@ -0,0 +1,12 @@
+<template>
+  <div>
+    <view>订单</view>
+    <tabbar currentTab="merchantOrder" />
+  </div>
+</template>
+
+<script>
+export default {};
+</script>
+
+<style lang="scss" scoped></style>

+ 12 - 0
src/pages/merchant/tabBar/store/index.vue

@@ -0,0 +1,12 @@
+<template>
+  <div>
+    <view>店铺</view>
+    <tabbar currentTab="merchantStore" />
+  </div>
+</template>
+
+<script>
+export default {};
+</script>
+
+<style lang="scss" scoped></style>