Quellcode durchsuchen

perf(client): 修改文件夹

yizhiyang vor 1 Jahr
Ursprung
Commit
6398b4b217

+ 3 - 3
src/App.vue

@@ -5,16 +5,16 @@ export default {
     store.dispatch('getAppSystemInfo');
     // if (store.getters.scope === 'CUSTOMER') {
     //   uni.switchTab({
-    //     url: '/pages/client/tabBar/home/index',
+    //     url: '/pages/home/index',
     //   });
     // } else {
-    //   uni.navigateTo({   
+    //   uni.navigateTo({
     //     url: '/pages/merchant/order/index',
     //   });
     // }
   },
   mounted() {},
-}; 
+};
 </script>
 
 <style lang="scss">

+ 1 - 1
src/PageMine/personInfo/index.vue

@@ -144,7 +144,7 @@ export default {
     },
     handlePromotionCode() {
       uni.switchTab({
-        url: '/pages/tabbar/promotionCode',
+        url: '/pages/extend/index',
       });
     },
   },

+ 1 - 1
src/PageMine/reserveSuccess/index.vue

@@ -51,7 +51,7 @@ export default {
   methods: {
     handlerBack() {
       uni.switchTab({
-        url: '/pages/tabbar/mine/index',
+        url: '/pages/mine/index',
       });
     },
   },

+ 1 - 1
src/components/page-navbar/page-navbar.vue

@@ -142,7 +142,7 @@ export default {
     handleGoHome() {
       uni.$u.route({
         type: 'switchTab',
-        url: '/pages/tabbar/home.vue',
+        url: '/pages/home/index',
       });
     },
   },

+ 103 - 100
src/pageMerchant/mineModule/certification/messageSubmit.vue

@@ -1,120 +1,123 @@
 <template>
-	<view class="container">
-		<view class="top-box">
-			<img class="img" src="@/static/mine/icon_mine_success.png" alt="" />
-			<p class="top-text">提交成功</p>
-		</view>
+  <view class="container">
+    <view class="top-box">
+      <img class="img" src="@/static/mine/icon_mine_success.png" alt="" />
+      <p class="top-text">提交成功</p>
+    </view>
 
-		<view class="content-box">
-			<view class="content-item">
-				<view class="item-l">店铺名称</view>
-				<view class="item-r">{{ listInfo.storeName }}</view>
-			</view>
-			<view class="content-item">
-				<view class="item-l">法人名称</view>
-				<view class="item-r">{{ listInfo.legalRepresentativeName }}</view>
-			</view>
-			<view class="content-item">
-				<view class="item-l">详情地址</view>
-				<view class="item-r">{{ listInfo.storeAddressDetail }}</view>
-			</view>
-		</view>
+    <view class="content-box">
+      <view class="content-item">
+        <view class="item-l">店铺名称</view>
+        <view class="item-r">{{ listInfo.storeName }}</view>
+      </view>
+      <view class="content-item">
+        <view class="item-l">法人名称</view>
+        <view class="item-r">{{ listInfo.legalRepresentativeName }}</view>
+      </view>
+      <view class="content-item">
+        <view class="item-l">详情地址</view>
+        <view class="item-r">{{ listInfo.storeAddressDetail }}</view>
+      </view>
+    </view>
 
-		<button class="btn" @click="handlerBackHome">返回首页</button>
-		<button class="btn" @click="handlerViewDetail">查看详情</button>
-	</view>
+    <button class="btn" @click="handlerBackHome">返回首页</button>
+    <button class="btn" @click="handlerViewDetail">查看详情</button>
+  </view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				listInfo: {},
-			};
-		},
-		onShow() {
-			let legalInfo = this.$store.state.data.legalInfo;
-			let storeInfo = this.$store.state.data.storeInfo;
-			let aptitudeInfo = this.$store.state.data.aptitudeInfo;
+export default {
+  data() {
+    return {
+      listInfo: {},
+    };
+  },
+  onShow() {
+    let legalInfo = this.$store.state.data.legalInfo;
+    let storeInfo = this.$store.state.data.storeInfo;
+    let aptitudeInfo = this.$store.state.data.aptitudeInfo;
 
-			this.listInfo = Object.assign({}, {
-				...legalInfo,
-				...storeInfo,
-				...aptitudeInfo,
-			}, );
-			console.log(this.listInfo);
-		},
-		methods: {
-			// 点击跳转到开店详情页面
-			handlerViewDetail() {
-				uni.redirectTo({
-					url: '/pageMerchant/mineModule/certification/openStoreAppealDetail',
-				});
-			},
-			// 点击跳转到首页
-			handlerBackHome() {
-				// uni.redirectTo({
-				// 	url: '/pageMerchant/tabbar/mine',
+    this.listInfo = Object.assign(
+      {},
+      {
+        ...legalInfo,
+        ...storeInfo,
+        ...aptitudeInfo,
+      },
+    );
+    console.log(this.listInfo);
+  },
+  methods: {
+    // 点击跳转到开店详情页面
+    handlerViewDetail() {
+      uni.redirectTo({
+        url: '/pageMerchant/mineModule/certification/openStoreAppealDetail',
+      });
+    },
+    // 点击跳转到首页
+    handlerBackHome() {
+      // uni.redirectTo({
+      // 	url: '/pageMerchant/tabbar/mine',
 
-				// });
-				uni.switchTab({
-					url: '/pages/tabbar/home'
-				});
-			}
-		},
-	};
+      // });
+      uni.switchTab({
+        url: '/pages/home/index',
+      });
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>
-	.container {
-		.top-box {
-			text-align: center;
-			margin-top: 100rpx;
+.container {
+  .top-box {
+    text-align: center;
+    margin-top: 100rpx;
 
-			.img {
-				width: 200rpx;
-				height: 200rpx;
-			}
+    .img {
+      width: 200rpx;
+      height: 200rpx;
+    }
 
-			.top-text {
-				font-size: 40rpx;
-				font-weight: bold;
-				margin-top: 20rpx;
-			}
-		}
+    .top-text {
+      font-size: 40rpx;
+      font-weight: bold;
+      margin-top: 20rpx;
+    }
+  }
 
-		.content-box {
-			margin: 200rpx auto 50rpx;
-			width: 80%;
-			border-top: 2rpx solid #f3f3f3;
-			border-bottom: 2rpx solid #f3f3f3;
-			padding: 20rpx;
+  .content-box {
+    margin: 200rpx auto 50rpx;
+    width: 80%;
+    border-top: 2rpx solid #f3f3f3;
+    border-bottom: 2rpx solid #f3f3f3;
+    padding: 20rpx;
 
-			.content-item {
-				display: flex;
-				justify-content: space-between;
-				margin: 20rpx 0;
-				font-size: 28rpx;
+    .content-item {
+      display: flex;
+      justify-content: space-between;
+      margin: 20rpx 0;
+      font-size: 28rpx;
 
-				.item-l {
-					color: #000;
-				}
+      .item-l {
+        color: #000;
+      }
 
-				.item-r {
-					color: #9a9a9a;
-				}
-			}
-		}
+      .item-r {
+        color: #9a9a9a;
+      }
+    }
+  }
 
-		.btn {
-			background-color: #5992bb !important;
-			color: #fff;
-			font-size: 32rpx;
-			border-radius: 40rpx;
-			margin-top: 100rpx;
-			margin-bottom: 100rpx;
-			width: 90%;
-		}
-	}
+  .btn {
+    background-color: #5992bb !important;
+    color: #fff;
+    font-size: 32rpx;
+    border-radius: 40rpx;
+    margin-top: 100rpx;
+    margin-bottom: 100rpx;
+    width: 90%;
+  }
+}
 </style>
 s

+ 2 - 2
src/pageMerchant/mineModule/setting/index.vue

@@ -33,7 +33,7 @@
     <view class="item-content">
       <view
         class="item-box"
-        v-for="(item, index) of privacy_list"
+        v-for="item of privacy_list"
         :key="item.id"
         @click="handlerSkipPrivacy(item)"
       >
@@ -115,7 +115,7 @@ export default {
       // 处理身份切换逻辑
       // this.$store.dispatch('SwitchIdentity', 'CUSTOMER');
       uni.switchTab({
-        url: '/pages/tabbar/mine/index',
+        url: '/pages/mine/index',
       });
       // ... 其他操作
     },

+ 10 - 11
src/pages.json

@@ -7,7 +7,7 @@
   },
   "pages": [
     {
-      "path": "pages/tabbar/home",
+      "path": "pages/home/index",
       "style": {
         "navigationBarTitleText": "",
         "navigationStyle": "custom"
@@ -33,30 +33,29 @@
       }
     },
     {
-      "path": "pages/tabbar/community",
+      "path": "pages/community/index",
       "style": {
-        "navigationBarTitleText": "",
         "navigationStyle": "custom",
         "enablePullDownRefresh": true,
         "onReachBottomDistance": 50
       }
     },
     {
-      "path": "pages/tabbar/message",
+      "path": "pages/message/index",
       "style": {
         "navigationBarTitleText": "",
         "navigationStyle": "custom"
       }
     },
     {
-      "path": "pages/tabbar/mine/index",
+      "path": "pages/mine/index",
       "style": {
         "navigationBarTitleText": "",
         "navigationStyle": "custom"
       }
     },
     {
-      "path": "pages/tabbar/promotionCode",
+      "path": "pages/extend/index",
       "style": {
         "navigationStyle": "custom"
       }
@@ -456,31 +455,31 @@
     "borderStyle": "black",
     "list": [
       {
-        "pagePath": "pages/tabbar/home",
+        "pagePath": "pages/home/index",
         "iconPath": "static/tabbar/client/home.png",
         "selectedIconPath": "static/tabbar/client/home-select.png",
         "text": "首页"
       },
       {
-        "pagePath": "pages/tabbar/community",
+        "pagePath": "pages/community/index",
         "iconPath": "static/tabbar/client/community.png",
         "selectedIconPath": "static/tabbar/client/community-select.png",
         "text": "社区"
       },
       {
-        "pagePath": "pages/tabbar/promotionCode",
+        "pagePath": "pages/extend/index",
         "iconPath": "static/tabbar/client/rqcode.png",
         "selectedIconPath": "static/tabbar/client/rqcode-select.png",
         "text": "推广"
       },
       {
-        "pagePath": "pages/tabbar/message",
+        "pagePath": "pages/message/index",
         "iconPath": "static/tabbar/client/message.png",
         "selectedIconPath": "static/tabbar/client/message-select.png",
         "text": "消息"
       },
       {
-        "pagePath": "pages/tabbar/mine/index",
+        "pagePath": "pages/mine/index",
         "iconPath": "static/tabbar/client/mine.png",
         "selectedIconPath": "static/tabbar/client/mine-select.png",
         "text": "我的"

+ 0 - 0
src/pages/tabbar/components/communityPop.vue → src/pages/community/communityPop.vue


+ 1 - 1
src/pages/tabbar/community.vue → src/pages/community/index.vue

@@ -95,7 +95,7 @@
 
 <script>
 import { clientContentList, addEvaulateRecords } from '@/api/client/community.js';
-import communityPop from './components/communityPop.vue';
+import communityPop from './communityPop.vue';
 import { GetDateToNewData } from '@/utils/tools.js';
 export default {
   components: { communityPop },

+ 0 - 0
src/pages/tabbar/promotionCode copy.vue → src/pages/extend/index copy.vue


+ 127 - 127
src/pages/tabbar/promotionCode.vue → src/pages/extend/index.vue

@@ -1,128 +1,128 @@
-<template>
-  <view class="client-promotionCode">
-    <page-navbar :hasBack="false" bgColor="transparent" title="推广"></page-navbar>
-    <base-card marginBottom="48rpx">
-      <view class="promotionCode-qrcode">
-        <view class="promotionCode-avatar">
-          <u-avatar :src="avatar" size="90" />
-        </view>
-        <view class="u-m-t-70 text-center">
-          <view class="f-s-28 text-primary">{{ nickname }}</view>
-          <view class="f-s-24 text-999 u-m-t-8">{{ location.address }}</view>
-        </view>
-
-        <view class="u-m-t-40">
-          <uQrcode ref="qr" canvas-id="qr" :value="text" :options="options"> </uQrcode>
-        </view>
-        <view class="f-s-24 text-999 u-m-t-10">扫描上方二维码,加入我的团队</view>
-      </view>
-    </base-card>
-    <base-card padding="0rpx">
-      <view class="fl-flex-item promotionCode-share">
-        <view class="direction" @click="handleShare">
-          <u--image
-            src="/static/pages/promotionCode/weixin.png"
-            width="48rpx"
-            height="48rpx"
-          ></u--image>
-          <view class="f-s-28 text-primary u-m-t-16">分享到微信</view>
-        </view>
-        <view class="promotionCode-line"></view>
-        <view class="direction" @click="handleSave">
-          <u--image
-            src="/static/pages/promotionCode/phone.png"
-            width="48rpx"
-            height="48rpx"
-          ></u--image>
-          <view class="f-s-28 text-primary u-m-t-16">下载到相册</view>
-        </view>
-      </view>
-    </base-card>
-  </view>
-</template>
-
-<script>
-import uQrcode from '@/uni_modules/Sansnn-uQRCode/components/u-qrcode/u-qrcode.vue';
-import { mapGetters } from 'vuex';
-export default {
-  data() {
-    return {
-      text: `https://test.chelvc.com/static/${this.userId}`,
-      options: {
-        size: 142,
-        margin: 10,
-      },
-    };
-  },
-  components: {
-    uQrcode,
-  },
-  computed: {
-    ...mapGetters(['location', 'avatar', 'nickname', 'userId']),
-  },
-  methods: {
-    handleShare() {
-      this.$u.toast('该功能暂未开发,尽情期待!');
-    },
-    handleSave() {
-      uni.showLoading({
-        title: '保存中',
-        mask: true,
-        foregroundImageSrc: this.avatar,
-      });
-      const ref = this.$refs['qr'];
-      ref.save({
-        success: res => {
-          uni.hideLoading();
-          uni.showToast({
-            icon: 'success',
-            title: '保存成功',
-          });
-        },
-        fail: err => {
-          uni.showToast({
-            icon: 'none',
-            title: JSON.stringify(err),
-          });
-        },
-      });
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.client-promotionCode {
-  height: 100vh;
-  padding: 144rpx 48rpx 0 48rpx;
-  box-sizing: border-box;
-  background-image: linear-gradient(#e9f4ff, #dee6ff);
-  .promotionCode-qrcode {
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    position: relative;
-    .promotionCode-avatar {
-      position: absolute;
-      left: 50%;
-      top: -120rpx;
-      transform: translate(-50%);
-      background-color: #fff;
-      width: 180rpx;
-      height: 180rpx;
-      padding: 10rpx;
-      border-radius: 50%;
-      box-sizing: border-box;
-    }
-  }
-  .promotionCode-share {
-    padding: 32rpx 96rpx;
-  }
-
-  .promotionCode-line {
-    height: 96rpx;
-    width: 1rpx;
-    background-color: #d8d8d8;
-  }
-}
+<template>
+  <view class="client-promotionCode">
+    <page-navbar :hasBack="false" bgColor="transparent" title="推广"></page-navbar>
+    <base-card marginBottom="48rpx">
+      <view class="promotionCode-qrcode">
+        <view class="promotionCode-avatar">
+          <u-avatar :src="avatar" size="90" />
+        </view>
+        <view class="u-m-t-70 text-center">
+          <view class="f-s-28 text-primary">{{ nickname }}</view>
+          <view class="f-s-24 text-999 u-m-t-8">{{ location.address }}</view>
+        </view>
+
+        <view class="u-m-t-40">
+          <uQrcode ref="qr" canvas-id="qr" :value="text" :options="options"> </uQrcode>
+        </view>
+        <view class="f-s-24 text-999 u-m-t-10">扫描上方二维码,加入我的团队</view>
+      </view>
+    </base-card>
+    <base-card padding="0rpx">
+      <view class="fl-flex-item promotionCode-share">
+        <view class="direction" @click="handleShare">
+          <u--image
+            src="/static/pages/promotionCode/weixin.png"
+            width="48rpx"
+            height="48rpx"
+          ></u--image>
+          <view class="f-s-28 text-primary u-m-t-16">分享到微信</view>
+        </view>
+        <view class="promotionCode-line"></view>
+        <view class="direction" @click="handleSave">
+          <u--image
+            src="/static/pages/promotionCode/phone.png"
+            width="48rpx"
+            height="48rpx"
+          ></u--image>
+          <view class="f-s-28 text-primary u-m-t-16">下载到相册</view>
+        </view>
+      </view>
+    </base-card>
+  </view>
+</template>
+
+<script>
+import uQrcode from '@/uni_modules/Sansnn-uQRCode/components/u-qrcode/u-qrcode.vue';
+import { mapGetters } from 'vuex';
+export default {
+  data() {
+    return {
+      text: `https://test.chelvc.com/static/${this.userId}`,
+      options: {
+        size: 142,
+        margin: 10,
+      },
+    };
+  },
+  components: {
+    uQrcode,
+  },
+  computed: {
+    ...mapGetters(['location', 'avatar', 'nickname', 'userId']),
+  },
+  methods: {
+    handleShare() {
+      this.$u.toast('该功能暂未开发,尽情期待!');
+    },
+    handleSave() {
+      uni.showLoading({
+        title: '保存中',
+        mask: true,
+        foregroundImageSrc: this.avatar,
+      });
+      const ref = this.$refs['qr'];
+      ref.save({
+        success: res => {
+          uni.hideLoading();
+          uni.showToast({
+            icon: 'success',
+            title: '保存成功',
+          });
+        },
+        fail: err => {
+          uni.showToast({
+            icon: 'none',
+            title: JSON.stringify(err),
+          });
+        },
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.client-promotionCode {
+  height: 100vh;
+  padding: 144rpx 48rpx 0 48rpx;
+  box-sizing: border-box;
+  background-image: linear-gradient(#e9f4ff, #dee6ff);
+  .promotionCode-qrcode {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    position: relative;
+    .promotionCode-avatar {
+      position: absolute;
+      left: 50%;
+      top: -120rpx;
+      transform: translate(-50%);
+      background-color: #fff;
+      width: 180rpx;
+      height: 180rpx;
+      padding: 10rpx;
+      border-radius: 50%;
+      box-sizing: border-box;
+    }
+  }
+  .promotionCode-share {
+    padding: 32rpx 96rpx;
+  }
+
+  .promotionCode-line {
+    height: 96rpx;
+    width: 1rpx;
+    background-color: #d8d8d8;
+  }
+}
 </style>

+ 0 - 0
src/pages/tabbar/home copy.vue → src/pages/home/home copy.vue


+ 0 - 0
src/pages/tabbar/home.vue → src/pages/home/index.vue


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

@@ -144,7 +144,7 @@ export default {
         .dispatch('LoginByWxCode', data)
         .then(() => {
           // this.$store.dispatch('SwitchIdentity', 'CUSTOMER');
-          this.$Router.pushTab('/pages/tabbar/home');
+          this.$Router.pushTab('/pages/home/index');
           this.loading = false;
           this.$store.dispatch('GetUserInfo');
           uni.$u.toast('登录成功');

+ 0 - 0
src/pages/tabbar/message.vue → src/pages/message/index.vue


+ 0 - 0
src/pages/tabbar/message copy.vue → src/pages/message/message copy.vue


+ 198 - 198
src/pages/tabbar/components/TapList.vue → src/pages/mine/TapList.vue

@@ -1,199 +1,199 @@
-<template>
-  <view>
-    <!-- 预约列表 -->
-    <view class="appointList">
-      <template>
-        <u-cell
-          v-for="item in isLinkList1"
-          :key="item.id"
-          :border="false"
-          :icon="item.icon"
-          :title="item.title"
-          isLink
-          :url="item.url"
-        />
-      </template>
-    </view>
-
-    <view class="other-out-box">
-      <u-cell
-        v-for="item in isLinkList2"
-        :key="item.id"
-        :border="false"
-        :icon="item.icon"
-        :title="item.title"
-        :isLink="item.isLink"
-        :url="item.url"
-        @click="handleCellClick(item)"
-      />
-    </view>
-
-    <u-modal
-      :show="showSwitchDialog"
-      :showCancelButton="true"
-      :title="title"
-      :content="content"
-      @confirm="confirmSwitch"
-      @cancel="cancelSwitch"
-    ></u-modal>
-  </view>
-</template>
-
-<script>
-import { getMerchantAuthData } from '@/api/merchant/merchantAuth';
-export default {
-  data() {
-    return {
-      isLinkList1: [
-        {
-          id: '0',
-          icon: 'list-dot',
-          title: '预约列表',
-          url: '/PageMine/goodsReserve/index',
-        },
-        // ,
-        // {
-        //   id: '1',
-        //   icon: 'list',
-        //   title: '询价列表',
-        //   url: '/pages/client/clientUser/inquiryList',
-        // },
-      ],
-      isLinkList2: [
-        {
-          id: '0',
-          icon: 'home-fill',
-          title: '我的店铺',
-          url: '',
-          isLink: true,
-        },
-        {
-          id: '1',
-          icon: 'plus-people-fill',
-          title: '我的团队',
-          url: '/PageMine/myTeam/index',
-          isLink: true,
-        },
-        {
-          id: '2',
-          icon: 'server-man',
-          title: '客服中心',
-          url: '/PageMine/serviceCenter/index',
-          isLink: true,
-        },
-        {
-          id: '3',
-          icon: 'share-square',
-          title: '意见反馈',
-          url: '/PageMine/feedback/index',
-          isLink: true,
-        },
-        {
-          id: '4',
-          icon: 'thumb-up',
-          title: '关于我们',
-          url: '/PageMine/about/index',
-          isLink: true,
-        },
-      ],
-
-      showSwitchDialog: false,
-      title: '提醒',
-      content: '您确定要从用户端切换到商家端吗?',
-    };
-  },
-
-  methods: {
-    handleCellClick(item) {
-      console.log('item', item);
-      if (item.id == 0) {
-        this.showSwitchDialog = true;
-      } else {
-        // console.log('点击了非链接项');
-      }
-    },
-    //点击取消时
-    cancelSwitch() {
-      this.showSwitchDialog = false;
-      this.title = '提醒';
-      this.content = '您确定要从用户端切换到商家端吗?';
-    },
-    // 点击确认时
-    confirmSwitch() {
-      if (this.title == '提醒') {
-        this.getMerchantAuth();
-      } else if (this.title == '警告!') {
-        //进入审核未通过详情
-        uni.navigateTo({
-          url: 'pageMerchant/mineModule/openStoreAppealDetail',
-        });
-        this.cancelSwitch();
-      } else {
-        // 进入开店流程页面
-        uni.navigateTo({
-          url: '/pageMerchant/mineModule/certification/index',
-        });
-        this.cancelSwitch();
-      }
-    },
-
-    /*===========================================================*/
-    // 获取商家信息
-    async getMerchantAuth() {
-      let res = await getMerchantAuthData();
-      if (res.code === 'OK' && res.data) {
-        console.log(res, '获取商家信息');
-        this.$store.dispatch('SwitchIdentity', 'MERCHANT');
-        // 将数据存储到vuex中
-        this.merchantInfo = Object.assign(
-          {},
-          {
-            ...res.data,
-            mobileNumber: res.data.mobileNumber,
-          },
-        );
-        this.$store.commit('SET_MERCHANTINFO', res.data);
-        if (res.data.reviewStatus == 2) {
-          //跳转认证中页面
-          uni.navigateTo({
-            // url: '/pageMerchant/mineModule/certification/openStoreAppealDetail'
-            url: 'pageMerchant/mineModule/openStoreAppealDetail',
-          });
-          this.cancelSwitch();
-        } else if (res.data.reviewStatus == 1) {
-          uni.navigateTo({
-            url: '/pageMerchant/index',
-          });
-          this.cancelSwitch();
-        } else {
-          this.title = '警告!';
-          this.content = `认证未通过, ${
-            res.data.message ? '审核意见:' + res.data.message : ''
-          }. 点击确认进入查看信息`;
-        }
-      } else {
-        this.title = '温馨提示!';
-        this.content = '您还没有自己的店铺,如果您确定要开店,请点击确定进入开店流程';
-      }
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.appointList {
-  margin: 20rpx;
-  padding: 20rpx 10rpx;
-  border-radius: 10rpx;
-  background-color: #fff;
-}
-
-.other-out-box {
-  margin: 20rpx;
-  padding: 20rpx 10rpx;
-  border-radius: 10rpx;
-  margin-top: 0;
-  box-sizing: border-box;
-  background-color: $uni-bg-color;
-}
+<template>
+  <view>
+    <!-- 预约列表 -->
+    <view class="appointList">
+      <template>
+        <u-cell
+          v-for="item in isLinkList1"
+          :key="item.id"
+          :border="false"
+          :icon="item.icon"
+          :title="item.title"
+          isLink
+          :url="item.url"
+        />
+      </template>
+    </view>
+
+    <view class="other-out-box">
+      <u-cell
+        v-for="item in isLinkList2"
+        :key="item.id"
+        :border="false"
+        :icon="item.icon"
+        :title="item.title"
+        :isLink="item.isLink"
+        :url="item.url"
+        @click="handleCellClick(item)"
+      />
+    </view>
+
+    <u-modal
+      :show="showSwitchDialog"
+      :showCancelButton="true"
+      :title="title"
+      :content="content"
+      @confirm="confirmSwitch"
+      @cancel="cancelSwitch"
+    ></u-modal>
+  </view>
+</template>
+
+<script>
+import { getMerchantAuthData } from '@/api/merchant/merchantAuth';
+export default {
+  data() {
+    return {
+      isLinkList1: [
+        {
+          id: '0',
+          icon: 'list-dot',
+          title: '预约列表',
+          url: '/PageMine/goodsReserve/index',
+        },
+        // ,
+        // {
+        //   id: '1',
+        //   icon: 'list',
+        //   title: '询价列表',
+        //   url: '/pages/client/clientUser/inquiryList',
+        // },
+      ],
+      isLinkList2: [
+        {
+          id: '0',
+          icon: 'home-fill',
+          title: '我的店铺',
+          url: '',
+          isLink: true,
+        },
+        {
+          id: '1',
+          icon: 'plus-people-fill',
+          title: '我的团队',
+          url: '/PageMine/myTeam/index',
+          isLink: true,
+        },
+        {
+          id: '2',
+          icon: 'server-man',
+          title: '客服中心',
+          url: '/PageMine/serviceCenter/index',
+          isLink: true,
+        },
+        {
+          id: '3',
+          icon: 'share-square',
+          title: '意见反馈',
+          url: '/PageMine/feedback/index',
+          isLink: true,
+        },
+        {
+          id: '4',
+          icon: 'thumb-up',
+          title: '关于我们',
+          url: '/PageMine/about/index',
+          isLink: true,
+        },
+      ],
+
+      showSwitchDialog: false,
+      title: '提醒',
+      content: '您确定要从用户端切换到商家端吗?',
+    };
+  },
+
+  methods: {
+    handleCellClick(item) {
+      console.log('item', item);
+      if (item.id == 0) {
+        this.showSwitchDialog = true;
+      } else {
+        // console.log('点击了非链接项');
+      }
+    },
+    //点击取消时
+    cancelSwitch() {
+      this.showSwitchDialog = false;
+      this.title = '提醒';
+      this.content = '您确定要从用户端切换到商家端吗?';
+    },
+    // 点击确认时
+    confirmSwitch() {
+      if (this.title == '提醒') {
+        this.getMerchantAuth();
+      } else if (this.title == '警告!') {
+        //进入审核未通过详情
+        uni.navigateTo({
+          url: 'pageMerchant/mineModule/openStoreAppealDetail',
+        });
+        this.cancelSwitch();
+      } else {
+        // 进入开店流程页面
+        uni.navigateTo({
+          url: '/pageMerchant/mineModule/certification/index',
+        });
+        this.cancelSwitch();
+      }
+    },
+
+    /*===========================================================*/
+    // 获取商家信息
+    async getMerchantAuth() {
+      let res = await getMerchantAuthData();
+      if (res.code === 'OK' && res.data) {
+        console.log(res, '获取商家信息');
+        this.$store.dispatch('SwitchIdentity', 'MERCHANT');
+        // 将数据存储到vuex中
+        this.merchantInfo = Object.assign(
+          {},
+          {
+            ...res.data,
+            mobileNumber: res.data.mobileNumber,
+          },
+        );
+        this.$store.commit('SET_MERCHANTINFO', res.data);
+        if (res.data.reviewStatus == 2) {
+          //跳转认证中页面
+          uni.navigateTo({
+            // url: '/pageMerchant/mineModule/certification/openStoreAppealDetail'
+            url: 'pageMerchant/mineModule/openStoreAppealDetail',
+          });
+          this.cancelSwitch();
+        } else if (res.data.reviewStatus == 1) {
+          uni.navigateTo({
+            url: '/pageMerchant/index',
+          });
+          this.cancelSwitch();
+        } else {
+          this.title = '警告!';
+          this.content = `认证未通过, ${
+            res.data.message ? '审核意见:' + res.data.message : ''
+          }. 点击确认进入查看信息`;
+        }
+      } else {
+        this.title = '温馨提示!';
+        this.content = '您还没有自己的店铺,如果您确定要开店,请点击确定进入开店流程';
+      }
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.appointList {
+  margin: 20rpx;
+  padding: 20rpx 10rpx;
+  border-radius: 10rpx;
+  background-color: #fff;
+}
+
+.other-out-box {
+  margin: 20rpx;
+  padding: 20rpx 10rpx;
+  border-radius: 10rpx;
+  margin-top: 0;
+  box-sizing: border-box;
+  background-color: $uni-bg-color;
+}
 </style>

+ 0 - 0
src/pages/tabbar/mine/data.js → src/pages/mine/data.js


+ 0 - 0
src/pages/tabbar/mine/index.vue → src/pages/mine/index.vue


+ 0 - 0
src/pages/tabbar/mine/mine-copy.vue → src/pages/mine/mine-copy.vue


+ 60 - 62
src/pages/phoneLogin/index.vue

@@ -4,27 +4,22 @@
     <view class="t-b2">欢迎使用车旅程,为你提供便捷服务</view>
     <!-- 表单数据 -->
     <view class="form-box">
-      <u-form >
-        <u-form-item >
+      <u-form>
+        <u-form-item>
           <u-input v-model="mobile" border="none" placeholder="请输入手机号" />
         </u-form-item>
         <view class="line"></view>
         <u-form-item>
-          <u-input v-model="captcha" border="none"  placeholder="请输入验证码">
+          <u-input v-model="captcha" border="none" placeholder="请输入验证码">
             <template slot="suffix">
               <u-code
-              ref="uCode"
-              @change="codeChange"
-              seconds="20"
-              unique-key="loginCode"
-              changeText="X秒重新获取"
-            ></u-code>
-            <u-button
-              @tap="getCode"
-              :text="tips"
-              type="success"
-              size="mini"
-            ></u-button>
+                ref="uCode"
+                @change="codeChange"
+                seconds="20"
+                unique-key="loginCode"
+                changeText="X秒重新获取"
+              ></u-code>
+              <u-button @tap="getCode" :text="tips" type="success" size="mini"></u-button>
             </template>
           </u-input>
         </u-form-item>
@@ -32,7 +27,14 @@
     </view>
 
     <view class="submit-box">
-      <u-button @click="login" :loading="loading" loadingText="登录中..." shape="circle" type="primary">确定</u-button>
+      <u-button
+        @click="login"
+        :loading="loading"
+        loadingText="登录中..."
+        shape="circle"
+        type="primary"
+        >确定</u-button
+      >
     </view>
 
     <view class="agree">
@@ -46,72 +48,69 @@
 </template>
 
 <script>
-import { getSmsCodeByPhone } from '@/api/login'
+import { getSmsCodeByPhone } from '@/api/login';
 
-const MOBILE_REG = /^[1][3-9][0-9]{9}$/
-const SMS_REG = /^\d{6}$/
+const MOBILE_REG = /^[1][3-9][0-9]{9}$/;
+const SMS_REG = /^\d{6}$/;
 export default {
   data() {
     return {
-      code:'', // 短信标识
-      mobile:'', // 手机号码
-      captcha:'', // 验证码
+      code: '', // 短信标识
+      mobile: '', // 手机号码
+      captcha: '', // 验证码
       agree: [],
       tips: '',
       seconds: 120,
-      loading:false,
-    }
+      loading: false,
+    };
   },
-  computed:{
-    checked(){
-      return this.agree && this.agree.length > 0
-    }
+  computed: {
+    checked() {
+      return this.agree && this.agree.length > 0;
+    },
   },
   methods: {
     async getCode() {
-      if(!MOBILE_REG.test(this.mobile)){
-        return uni.$u.toast('请输入合法手机号')
+      if (!MOBILE_REG.test(this.mobile)) {
+        return uni.$u.toast('请输入合法手机号');
       }
       if (this.$refs.uCode.canGetCode) {
-        const res = await getSmsCodeByPhone({mobile:this.mobile})
-        if(res.code === 'OK'){
-          uni.$u.toast('短信验证码已发送,请注意查收')
-          this.$refs.uCode.start()
-          this.code = res.data.id
-        }else{
-          uni.$u.toast(res.message)
+        const res = await getSmsCodeByPhone({ mobile: this.mobile });
+        if (res.code === 'OK') {
+          uni.$u.toast('短信验证码已发送,请注意查收');
+          this.$refs.uCode.start();
+          this.code = res.data.id;
+        } else {
+          uni.$u.toast(res.message);
         }
       }
     },
     login() {
-      if(!this.checked){
-        return uni.$u.toast('请阅读并勾选底部协议')
+      if (!this.checked) {
+        return uni.$u.toast('请阅读并勾选底部协议');
       }
-      if(!MOBILE_REG.test(this.mobile)){
-        return uni.$u.toast('请输入合法手机号')
+      if (!MOBILE_REG.test(this.mobile)) {
+        return uni.$u.toast('请输入合法手机号');
       }
       // if(!SMS_REG.test(this.captcha)){
       //   return uni.$u.toast('请输入6位数字验证码')
       // }
       const data = {
-        mobile:this.mobile,
-        captcha:this.captcha,
-        code:this.code,
-      }
+        mobile: this.mobile,
+        captcha: this.captcha,
+        code: this.code,
+      };
       // this.loading = true
-      this.$store.dispatch('LoginBySmsCode', data)
+      this.$store
+        .dispatch('LoginBySmsCode', data)
         .then(() => {
           // this.$store.dispatch('SwitchIdentity','CUSTOMER')
-          this.$Router.pushTab('/pages/client/tabBar/home/index');
+          this.$Router.pushTab('/pages/home/index');
           // this.loading = false;
-          this.$store.dispatch('GetUserInfo')
+          this.$store.dispatch('GetUserInfo');
           uni.$u.toast('登录成功');
         })
         .catch(() => {
-
-
-
-
           // this.loading = false;
           uni.$u.toast('登录失败');
         });
@@ -119,9 +118,8 @@ export default {
     codeChange(text) {
       this.tips = text;
     },
-
   },
-}
+};
 </script>
 
 <style scoped lang="scss">
@@ -144,17 +142,17 @@ export default {
     color: #aaaaaa;
     padding: 0rpx 0 120rpx 0;
   }
-  .form-box{
-    background-color:#fff;
-    padding:10rpx 20rpx;
+  .form-box {
+    background-color: #fff;
+    padding: 10rpx 20rpx;
     box-sizing: border-box;
-    border-radius:20rpx;
-    .line{
-      height:1rpx;
-      background-color:lightgray;
+    border-radius: 20rpx;
+    .line {
+      height: 1rpx;
+      background-color: lightgray;
     }
   }
-  .submit-box{
+  .submit-box {
     margin: 40rpx 0;
   }
 }

+ 2 - 2
src/pagesHome/settleStatus/index.vue

@@ -22,12 +22,12 @@ export default {
       switch (e) {
         case 1:
           uni.switchTab({
-            url: '/pages/tabbar/home',
+            url: '/pages/home/index',
           });
           break;
         case 2:
           uni.switchTab({
-            url: '/pages/tabbar/mine/index',
+            url: '/pages/mine/index',
           });
           break;
       }