Selaa lähdekoodia

perf(client): 文件修改优化

yizhiyang 10 kuukautta sitten
vanhempi
commit
f13d108679

+ 0 - 0
src/PageMine/orderModules/orderComment.vue → src/PageMine/orderComment/index.vue


+ 0 - 0
src/PageMine/orderModules/orderComment - 副本.vue → src/PageMine/orderComment/orderComment - 副本.vue


+ 1 - 1
src/PageMine/orderModules/orderDetail.vue → src/PageMine/orderDetail/index.vue

@@ -111,7 +111,7 @@ export default {
     // 点击跳转到预约
     handlerSkipReserve() {
       uni.navigateTo({
-        url: '/PageMine/orderModules/orderReserve',
+        url: '/PageMine/orderReserve/index',
       });
     },
   },

+ 0 - 0
src/PageMine/orderModules/orderDetail - 副本.vue → src/PageMine/orderDetail/orderDetail - 副本.vue


+ 311 - 302
src/PageMine/orderModules/index - 副本.vue

@@ -1,339 +1,348 @@
 <template>
-	<view class="container">
-		<u-sticky style="margin-top: 15rpx; margin-left: 20rpx" bgColor="#fff">
-			<u-tabs lineWidth="40" :list="list" :current="current" @change="handlerChangeItem"
-				itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;" />
-		</u-sticky>
+  <view class="container">
+    <u-sticky style="margin-top: 15rpx; margin-left: 20rpx" bgColor="#fff">
+      <u-tabs
+        lineWidth="40"
+        :list="list"
+        :current="current"
+        @change="handlerChangeItem"
+        itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;"
+      />
+    </u-sticky>
 
-		<!-- 订单 -->
-		<view class="order">
-			<view class="order-box">
-				<view class="order-item" v-for="(item, index) of init_list" :key="index">
-					<view class="" @click="handlerSkipDetail(item)">
-						<view class="item-top">
-							<view class="top-left gray-color">订单编号 : {{ item.orderSn }}</view>
-							<view class="top-right">{{ type_name }}</view>
-						</view>
-						<view class="item-top">
-							<view class="top-left gray-color">支付时间 : {{ item.createTimeText }}</view>
-							<view class="top-right"></view>
-						</view>
-					</view>
+    <!-- 订单 -->
+    <view class="order">
+      <view class="order-box">
+        <view class="order-item" v-for="(item, index) of init_list" :key="index">
+          <view class="" @click="handlerSkipDetail(item)">
+            <view class="item-top">
+              <view class="top-left gray-color">订单编号 : {{ item.orderSn }}</view>
+              <view class="top-right">{{ type_name }}</view>
+            </view>
+            <view class="item-top">
+              <view class="top-left gray-color">支付时间 : {{ item.createTimeText }}</view>
+              <view class="top-right"></view>
+            </view>
+          </view>
 
-					<u-line margin="20rpx 0"></u-line>
+          <u-line margin="20rpx 0"></u-line>
 
-					<view class="item-center" :key="idx" v-for="(itm, idx) of item.goodsInfo">
-						<view class="center-left">
-							<image :src="itm.goodsPic" class="img"></image>
-						</view>
-						<view class="center-right">
-							<view class="r-l">
-								<view class="right-name"> {{ itm.goodsName }} </view>
-								<view class="right-descript"> 测试商品描述111 </view>
-								<view class="l-box">
-									<view class="right-price"> ¥{{ itm.goodsPrice }} </view>
-									<view class="right-numb"> ×{{ itm.goodsQuantity }} </view>
-								</view>
-							</view>
-							<view class="r-r">
-								<view class="r-item" @click.stop="handlerSkipComment(item, itm)"
-									v-if="type == 4 && itm.assessStatus == 0">
-									<u-icon name="chat" color="#000" size="28"></u-icon>
-									<span>评价</span>
-								</view>
-							</view>
-						</view>
-					</view>
+          <view class="item-center" :key="idx" v-for="(itm, idx) of item.goodsInfo">
+            <view class="center-left">
+              <image :src="itm.goodsPic" class="img"></image>
+            </view>
+            <view class="center-right">
+              <view class="r-l">
+                <view class="right-name"> {{ itm.goodsName }} </view>
+                <view class="right-descript"> 测试商品描述111 </view>
+                <view class="l-box">
+                  <view class="right-price"> ¥{{ itm.goodsPrice }} </view>
+                  <view class="right-numb"> ×{{ itm.goodsQuantity }} </view>
+                </view>
+              </view>
+              <view class="r-r">
+                <view
+                  class="r-item"
+                  @click.stop="handlerSkipComment(item, itm)"
+                  v-if="type == 4 && itm.assessStatus == 0"
+                >
+                  <u-icon name="chat" color="#000" size="28"></u-icon>
+                  <span>评价</span>
+                </view>
+              </view>
+            </view>
+          </view>
 
-					<u-line margin="20rpx 0" dashed="true"></u-line>
+          <u-line margin="20rpx 0" dashed="true"></u-line>
 
-					<view class="item-allnumb-box">
-						<view class="allnumb-left"> {{ item.allNumb }}件商品 </view>
-						<view class="allnumb-right">
-							<span class="r-text">共计</span>¥{{ item.allPrice }}
-						</view>
-					</view>
+          <view class="item-allnumb-box">
+            <view class="allnumb-left"> {{ item.allNumb }}件商品 </view>
+            <view class="allnumb-right">
+              <span class="r-text">共计</span>¥{{ item.allPrice }}
+            </view>
+          </view>
 
-					<view class="item-bottom">
-						<button class="btn" v-if="current == 0" @click='handlerCancelOrder(item)'>取消订单</button>
-						<!-- <button class="btn" v-if='current == 1' @click='handlerOrderBtn(1)'>申请退款</button> -->
-						<!-- <button class="btn" v-if='current == 2' @click='handlerOrderBtn(2)'>售后</button> -->
-					</view>
-				</view>
-			</view>
-			<view v-if="init_list.length == 0" style="margin-top: 40rpx">
-				<u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" />
-			</view>
-		</view>
-	</view>
+          <view class="item-bottom">
+            <button class="btn" v-if="current == 0" @click="handlerCancelOrder(item)">
+              取消订单
+            </button>
+            <!-- <button class="btn" v-if='current == 1' @click='handlerOrderBtn(1)'>申请退款</button> -->
+            <!-- <button class="btn" v-if='current == 2' @click='handlerOrderBtn(2)'>售后</button> -->
+          </view>
+        </view>
+      </view>
+      <view v-if="init_list.length == 0" style="margin-top: 40rpx">
+        <u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" />
+      </view>
+    </view>
+  </view>
 </template>
 
 <script>
-	import {
-		userOrdersApi,
-		getUserOrderList,
-		cancelOrder
-	} from '@/api/client/order';
-	export default {
-		data() {
-			return {
-				current: 0,
-				type: 0,
-				type_name: '',
-				size: 20,
-				// 订单状态:0->待付款;1->已付款;2->已发货;3->已完成;4->已关闭;5->无效订单
-				list: [{
-						name: '待付款',
-						type: 0,
-					},
-					{
-						name: '已付款',
-						type: 1,
-					},
-					// {
-					// 	name: '待发货',
-					// 	type: 2,
-					// },
-					// {
-					// 	name: '已发货',
-					// 	type: 3,
-					// },
-					{
-						name: '已完成',
-						type: 3,
-					},
-					{
-						name: '已关闭',
-						type: 4,
-					}
-					// ,
-					//       {
-					//         name: '无效订单',
-					//         type: 5,
-					//       },
-				],
-				init_list: [],
-			};
-		},
-		mounted() {
-			// this.userOrdersPage();
-		},
-		onShow() {
-			let cur = this.$store.state.order.skip_order_type.type;
-			switch (cur) {
-				case 0:
-					this.current = 0;
-					this.userOrdersPage(cur);
-					break;
-				case 1:
-					this.current = 2;
-					this.userOrdersPage(cur);
-					break;
-				case 2:
-					this.current = 3;
-					this.userOrdersPage(cur);
-					break;
-			}
-		},
-		computed: {
-			allNumber() {
-				this.init_list.map(rs => {
-					let sum = 0;
-					let price = 0;
-					rs.goodsInfo.map(rc => {
-						sum += rc.goodsQuantity;
-						price += rc.goodsPrice;
-					});
-					rs.allNumb = sum;
-					rs.allPrice = price;
-				});
-				return;
-			},
-		},
-		methods: {
-			handlerChangeItem(data) {
-				this.current = data.index;
-				this.type = data.type;
-				this.type_name = data.name;
-				this.userOrdersPage(this.type);
-			},
+import { userOrdersApi, getUserOrderList, cancelOrder } from '@/api/client/order';
+export default {
+  data() {
+    return {
+      current: 0,
+      type: 0,
+      type_name: '',
+      size: 20,
+      // 订单状态:0->待付款;1->已付款;2->已发货;3->已完成;4->已关闭;5->无效订单
+      list: [
+        {
+          name: '待付款',
+          type: 0,
+        },
+        {
+          name: '已付款',
+          type: 1,
+        },
+        // {
+        // 	name: '待发货',
+        // 	type: 2,
+        // },
+        // {
+        // 	name: '已发货',
+        // 	type: 3,
+        // },
+        {
+          name: '已完成',
+          type: 3,
+        },
+        {
+          name: '已关闭',
+          type: 4,
+        },
+        // ,
+        //       {
+        //         name: '无效订单',
+        //         type: 5,
+        //       },
+      ],
+      init_list: [],
+    };
+  },
+  mounted() {
+    // this.userOrdersPage();
+  },
+  onShow() {
+    let cur = this.$store.state.order.skip_order_type.type;
+    switch (cur) {
+      case 0:
+        this.current = 0;
+        this.userOrdersPage(cur);
+        break;
+      case 1:
+        this.current = 2;
+        this.userOrdersPage(cur);
+        break;
+      case 2:
+        this.current = 3;
+        this.userOrdersPage(cur);
+        break;
+    }
+  },
+  computed: {
+    allNumber() {
+      this.init_list.map(rs => {
+        let sum = 0;
+        let price = 0;
+        rs.goodsInfo.map(rc => {
+          sum += rc.goodsQuantity;
+          price += rc.goodsPrice;
+        });
+        rs.allNumb = sum;
+        rs.allPrice = price;
+      });
+      return;
+    },
+  },
+  methods: {
+    handlerChangeItem(data) {
+      this.current = data.index;
+      this.type = data.type;
+      this.type_name = data.name;
+      this.userOrdersPage(this.type);
+    },
 
-			async userOrdersPage(type) {
-				let orderStatus = type == undefined ? 0 : `${type}`;
-				let res = await getUserOrderList({
-					status: orderStatus,
-					paging: '1,20',
-				});
-				if ((res.code = 200 && res.data)) {
-					this.init_list = res.data.records;
-					this.init_list.map(rs => {
-						rs.createTimeText = uni.$u.timeFormat(rs.createTime, 'yyyy-mm-dd hh:MM:ss');
-					})
-				}
-			},
+    async userOrdersPage(type) {
+      let orderStatus = type == undefined ? 0 : `${type}`;
+      let res = await getUserOrderList({
+        status: orderStatus,
+        paging: '1,20',
+      });
+      if ((res.code = 200 && res.data)) {
+        this.init_list = res.data.records;
+        this.init_list.map(rs => {
+          rs.createTimeText = uni.$u.timeFormat(rs.createTime, 'yyyy-mm-dd hh:MM:ss');
+        });
+      }
+    },
 
-			// 跳转到订单详情
-			handlerSkipDetail(e) {
-				uni.navigateTo({
-					url: `/PageMine/orderModules/orderDetail?orderList=${JSON.stringify(e)}`,
-				});
-			},
-			// 取消订单
-			handlerCancelOrder(e) {
-				cancelOrder(e.id).then(res => {
-					if (res.code == 'OK') {
-						uni.showToast({
-							title: '订单取消成功',
-							icon: 'none',
-						});
-						this.userOrdersPage(this.type);
-					} else {
-						uni.showToast({
-							title: res.message,
-							icon: 'none',
-						});
-						return
-					}
-				});
-			},
-			// 点击跳转到商品评价
-			handlerSkipComment(item, itm) {
-				uni.navigateTo({
-					url: `/PageMine/orderModules/orderComment?orderList=${JSON.stringify(item)}&goodsList=${JSON.stringify(itm)}`,
-				});
-			},
-		},
-	};
+    // 跳转到订单详情
+    handlerSkipDetail(e) {
+      uni.navigateTo({
+        url: `/PageMine/orderDetail/index?orderList=${JSON.stringify(e)}`,
+      });
+    },
+    // 取消订单
+    handlerCancelOrder(e) {
+      cancelOrder(e.id).then(res => {
+        if (res.code == 'OK') {
+          uni.showToast({
+            title: '订单取消成功',
+            icon: 'none',
+          });
+          this.userOrdersPage(this.type);
+        } else {
+          uni.showToast({
+            title: res.message,
+            icon: 'none',
+          });
+          return;
+        }
+      });
+    },
+    // 点击跳转到商品评价
+    handlerSkipComment(item, itm) {
+      uni.navigateTo({
+        url: `/PageMine/orderComment/index?orderList=${JSON.stringify(
+          item,
+        )}&goodsList=${JSON.stringify(itm)}`,
+      });
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>
-	.order {
-		margin-top: 10px;
-		padding: 10rpx 20rpx 20rpx;
-		box-sizing: border-box;
+.order {
+  margin-top: 10px;
+  padding: 10rpx 20rpx 20rpx;
+  box-sizing: border-box;
 
-		.order-box {
-			.order-item {
-				margin-bottom: 20rpx;
-				background-color: #fff;
-				border-radius: 20rpx;
-				padding: 20rpx;
-				box-shadow: 0 8rpx 15rpx 0 rgba(0, 0, 0, 0.08);
+  .order-box {
+    .order-item {
+      margin-bottom: 20rpx;
+      background-color: #fff;
+      border-radius: 20rpx;
+      padding: 20rpx;
+      box-shadow: 0 8rpx 15rpx 0 rgba(0, 0, 0, 0.08);
 
-				.item-top {
-					display: flex;
-					justify-content: space-between;
-					margin-bottom: 10rpx;
-				}
+      .item-top {
+        display: flex;
+        justify-content: space-between;
+        margin-bottom: 10rpx;
+      }
 
-				.item-center {
-					display: flex;
-					align-items: center;
-					margin-bottom: 10rpx;
+      .item-center {
+        display: flex;
+        align-items: center;
+        margin-bottom: 10rpx;
 
-					.center-left {
-						height: 160rpx;
+        .center-left {
+          height: 160rpx;
 
-						.img {
-							width: 160rpx;
-							height: 160rpx;
-						}
-					}
+          .img {
+            width: 160rpx;
+            height: 160rpx;
+          }
+        }
 
-					.center-right {
-						width: 100%;
-						height: 160rpx;
-						display: flex;
-						justify-content: space-between;
-						margin-left: 20rpx;
+        .center-right {
+          width: 100%;
+          height: 160rpx;
+          display: flex;
+          justify-content: space-between;
+          margin-left: 20rpx;
 
-						.r-l {
-							display: flex;
-							flex-direction: column;
-							justify-content: space-around;
+          .r-l {
+            display: flex;
+            flex-direction: column;
+            justify-content: space-around;
 
-							.right-name {
-								color: #4d5671;
-								font-size: 32rpx;
-								font-weight: bold;
-							}
+            .right-name {
+              color: #4d5671;
+              font-size: 32rpx;
+              font-weight: bold;
+            }
 
-							.right-descript {
-								font-size: 28rpx;
-								color: #858797;
-							}
+            .right-descript {
+              font-size: 28rpx;
+              color: #858797;
+            }
 
-							.l-box {
-								display: flex;
-								font-size: 24rpx;
-								align-items: center;
-								font-style: italic;
+            .l-box {
+              display: flex;
+              font-size: 24rpx;
+              align-items: center;
+              font-style: italic;
 
-								.right-price {
-									margin-right: 20rpx;
-									font-weight: bold;
-									font-size: 28rpx;
-									color: #f57f32;
-								}
+              .right-price {
+                margin-right: 20rpx;
+                font-weight: bold;
+                font-size: 28rpx;
+                color: #f57f32;
+              }
 
-								.right-numb {
-									font-size: 24rpx;
-									color: #858797;
-								}
-							}
-						}
+              .right-numb {
+                font-size: 24rpx;
+                color: #858797;
+              }
+            }
+          }
 
-						.r-r {
-							.r-item {
-								align-items: center;
-							}
-						}
-					}
-				}
+          .r-r {
+            .r-item {
+              align-items: center;
+            }
+          }
+        }
+      }
 
-				.item-allnumb-box {
-					display: flex;
-					justify-content: space-between;
-					align-items: center;
-					font-weight: bold;
+      .item-allnumb-box {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        font-weight: bold;
 
-					.allnumb-left {
-						font-size: 32rpx;
-					}
+        .allnumb-left {
+          font-size: 32rpx;
+        }
 
-					.allnumb-right {
-						font-size: 26rpx;
-						color: #f57f32;
+        .allnumb-right {
+          font-size: 26rpx;
+          color: #f57f32;
 
-						.r-text {
-							color: #000;
-						}
-					}
-				}
-			}
-		}
-	}
+          .r-text {
+            color: #000;
+          }
+        }
+      }
+    }
+  }
+}
 
-	.item-bottom {
-		width: 100%;
-		margin-top: 20rpx;
+.item-bottom {
+  width: 100%;
+  margin-top: 20rpx;
 
-		.btn {
-			height: 70rpx;
-			background-color: rgba(248, 213, 53, 0.8);
-			color: #4e5059;
-			font-size: 28rpx;
-			text-align: center;
-			line-height: 70rpx;
-			border-radius: 20rpx;
-		}
-	}
+  .btn {
+    height: 70rpx;
+    background-color: rgba(248, 213, 53, 0.8);
+    color: #4e5059;
+    font-size: 28rpx;
+    text-align: center;
+    line-height: 70rpx;
+    border-radius: 20rpx;
+  }
+}
 
-	.gray-color {
-		color: #858797;
-	}
+.gray-color {
+  color: #858797;
+}
 
-	::deep .u-tabs__wrapper__nav__item__text {
-		font-size: 30px;
-	}
+::deep .u-tabs__wrapper__nav__item__text {
+  font-size: 30px;
+}
 </style>

+ 149 - 146
src/PageMine/orderModules/index.vue

@@ -1,28 +1,32 @@
 <template>
   <view class="container">
-    <u-sticky style="margin-top: 15rpx; margin-left: 20rpx" bgColor="#fff">
-      <u-tabs lineWidth="40" :list="list" :current="current"
-        itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;" />
+    <page-navbar bgColor="#fff" title="我的订单"></page-navbar>
+
+    <u-sticky bgColor="#fff">
+      <u-tabs
+        lineWidth="40"
+        :list="list"
+        :current="current"
+        itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;"
+      />
     </u-sticky>
 
-    <view class='order-box'>
-      <view class="order-item" v-for="(item,index) of 3">
+    <view class="order-box">
+      <view class="order-item" v-for="(item, index) of 3" :key="index">
         <view class="item-top">
           <view class="top-left">
-            <image src="@/static/home/icon_home_detail_shop.png" class='img'></image>
+            <image src="@/static/home/icon_home_detail_shop.png" class="img"></image>
             <view class="left-name"> 聚鑫(途虎养车店)</view>
           </view>
           <view class="top-right"> 待付款 </view>
         </view>
 
-        <view class="goods-item" v-for="item of 3">
-          <view class='item-left'>
-            <image src="@/static/QR57a.jpg" class='img'></image>
+        <view class="goods-item" v-for="(item, index) of 3" :key="index">
+          <view class="item-left">
+            <image src="@/static/QR57a.jpg" class="img"></image>
           </view>
-          <view class='item-right'>
-            <view class="right-top">
-              38号轮胎38号轮胎38号轮胎38号轮胎38号轮号轮号轮胎
-            </view>
+          <view class="item-right">
+            <view class="right-top"> 38号轮胎38号轮胎38号轮胎38号轮胎38号轮号轮号轮胎 </view>
             <view class="right-bottom">
               <view class="bottom-left"> ¥20.00 </view>
               <view class="bottom-right"> X1 </view>
@@ -30,183 +34,182 @@
           </view>
         </view>
 
-        <u-line margin='24rpx 0'></u-line>
+        <u-line margin="24rpx 0"></u-line>
 
-        <view class='price-box'>
+        <view class="price-box">
           <view class="price">需付款¥1559.9</view>
         </view>
 
         <view class="btn-box">
-          <button class='btn btn2'>继续付款</button>
-          <button class='btn btn1'>查看卷码</button>
-          <button class='btn btn2'>再来一单</button>
-          <button class='btn btn2'>退款进度</button>
+          <button class="btn btn2">继续付款</button>
+          <!-- <button class="btn btn1">查看卷码</button>
+          <button class="btn btn2">再来一单</button>
+          <button class="btn btn2">退款进度</button> -->
         </view>
       </view>
     </view>
-
   </view>
 </template>
 
 <script>
-  export default {
-    data() {
-      return {
-        current: 0,
-        list: [{
-            name: '待付款',
-            type: 0,
-          },
-          {
-            name: '已付款',
-            type: 1,
-          },
-          {
-            name: '已完成',
-            type: 3,
-          },
-          {
-            name: '已关闭',
-            type: 4,
-          }
-
-        ],
-      };
-    },
-  };
+export default {
+  data() {
+    return {
+      current: 0,
+      list: [
+        {
+          name: '待付款',
+          type: 0,
+        },
+        {
+          name: '已付款',
+          type: 1,
+        },
+        {
+          name: '已完成',
+          type: 3,
+        },
+        {
+          name: '已关闭',
+          type: 4,
+        },
+      ],
+    };
+  },
+};
 </script>
 
 <style lang="scss" scoped>
-  .container {
-    font-size: 28rpx;
-    padding: 0 0 30rpx;
-    .order-box {
-      margin-top: 18rpx;
-
-      .order-item {
-        padding: 34rpx 32rpx;
-        background-color: #fff;
-        margin-bottom: 18rpx;
-        .item-top {
+.container {
+  font-size: 28rpx;
+  padding: 0 0 30rpx;
+  .order-box {
+    margin-top: 18rpx;
+
+    .order-item {
+      padding: 34rpx 32rpx;
+      background-color: #fff;
+      margin-bottom: 18rpx;
+      .item-top {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        margin-bottom: 24rpx;
+
+        .top-left {
           display: flex;
-          justify-content: space-between;
           align-items: center;
-          margin-bottom: 24rpx;
 
-          .top-left {
-            display: flex;
-            align-items: center;
-
-            .img {
-              width: 32rpx;
-              height: 32rpx;
-            }
+          .img {
+            width: 32rpx;
+            height: 32rpx;
+          }
 
-            .left-name {
-              margin-left: 8rpx;
-              font-weight: bold;
-            }
+          .left-name {
+            margin-left: 8rpx;
+            font-weight: bold;
           }
+        }
+
+        .top-right {
+          color: #ed4444;
+        }
+      }
+
+      .goods-item {
+        display: flex;
+        margin-bottom: 24rpx;
+        .item-left {
+          margin-right: 24rpx;
 
-          .top-right {
-            color: #ED4444;
+          .img {
+            width: 160rpx;
+            height: 160rpx;
+            border-radius: 16rpx;
           }
         }
 
-        .goods-item {
+        .item-right {
           display: flex;
-          margin-bottom: 24rpx;
-          .item-left {
-            margin-right: 24rpx;
-
-            .img {
-              width: 160rpx;
-              height: 160rpx;
-              border-radius: 16rpx;
-            }
+          flex-direction: column;
+          justify-content: space-between;
+
+          .right-top {
+            color: #333333;
           }
 
-          .item-right {
+          .right-bottom {
             display: flex;
-            flex-direction: column;
             justify-content: space-between;
+            align-items: center;
 
-            .right-top {
-              color: #333333;
+            .bottom-left {
+              color: #eb3636;
+              font-weight: bold;
+              font-size: 32rpx;
             }
 
-            .right-bottom {
-              display: flex;
-              justify-content: space-between;
-              align-items: center;
-
-              .bottom-left {
-                color: #EB3636;
-                font-weight: bold;
-                font-size: 32rpx;
-              }
-
-              .bottom-right {
-                color: #616570;
-                font-size: 24rpx;
-              }
+            .bottom-right {
+              color: #616570;
+              font-size: 24rpx;
             }
           }
         }
-        .goods-item:last-child{
-          margin:0;
-        }
-        .price-box {
-          display: flex;
-          justify-content: flex-end;
-          margin-bottom: 24rpx;
-          font-size: 30rpx;
-          font-weight: bold;
-        }
+      }
+      .goods-item:last-child {
+        margin: 0;
+      }
+      .price-box {
+        display: flex;
+        justify-content: flex-end;
+        margin-bottom: 24rpx;
+        font-size: 30rpx;
+        font-weight: bold;
+      }
 
-        .btn-box {
-          display: flex;
-          justify-content: flex-end;
-
-          .btn {
-            padding: 0 24rpx;
-            border-radius: 8rpx;
-            box-sizing: border-box;
-            margin-right: 24rpx;
-            height: 60rpx;
-            line-height: 60rpx;
-            font-size: 28rpx;
-          }
+      .btn-box {
+        display: flex;
+        justify-content: flex-end;
+
+        .btn {
+          padding: 0 24rpx;
+          border-radius: 8rpx;
+          box-sizing: border-box;
+          margin-right: 24rpx;
+          height: 60rpx;
+          line-height: 60rpx;
+          font-size: 28rpx;
+        }
 
-          .btn:last-child {
-            margin: 0;
-          }
+        .btn:last-child {
+          margin: 0;
+        }
 
-          .btn1 {
-            color: #616570;
-            border: 2rpx solid #616570;
-          }
+        .btn1 {
+          color: #616570;
+          border: 2rpx solid #616570;
+        }
 
-          .btn2 {
-            color: #215EBE;
-            border: 2rpx solid #215EBE;
-          }
+        .btn2 {
+          color: #215ebe;
+          border: 2rpx solid #215ebe;
         }
       }
     }
   }
+}
 </style>
 
 <style scope>
-  ::v-deep .u-tabs__wrapper__nav[data-v-48634e29] {
-    display: flex;
-    flex-direction: row;
-    position: relative;
-    justify-content: space-between;
-  }
-
-  /* //选中蓝色滑块对应 */
-  ::v-deep .u-tabs__wrapper__nav__item {
-    flex: 1 1 0% !important;
-  }
+::v-deep .u-tabs__wrapper__nav[data-v-48634e29] {
+  display: flex;
+  flex-direction: row;
+  position: relative;
+  justify-content: space-between;
+}
+
+/* //选中蓝色滑块对应 */
+::v-deep .u-tabs__wrapper__nav__item {
+  flex: 1 1 0% !important;
+}
 </style>

+ 0 - 129
src/PageMine/orderModules/orderReserve.vue

@@ -1,129 +0,0 @@
-<template>
-  <view class="container">
-    <view class="container-box">
-      <view class="title">汽车美容</view>
-      <view class="item-box" v-for="(item,index) of 3">
-        <view class="item-left">
-          <image src="@/static/QR57a.jpg" class="img"></image>
-        </view>
-        <view class="item-right">
-          <view class="right1">水洗轿车</view>
-          <view class="right1">X1</view>
-          <view class="right2">汽车美容</view>
-        </view>
-      </view>
-    </view>
-    <view class="container-box">
-      <view class="title">预约信息</view>
-      <view class="input-item">
-        <view class="item-top">联系方式</view>
-        <view class="item-bottom">
-          <u--input placeholder="请输入联系方式" border="surround" v-model="value"></u--input>
-        </view>
-      </view>
-      <view class="input-item">
-        <view class="item-top">预约时间</view>
-        <view class="item-bottom">
-          <u--input placeholder="请输入联系方式" border="surround" v-model="value"></u--input>
-        </view>
-      </view>
-      <view class="input-item">
-        <view class="item-top">备注</view>
-        <view class="item-bottom">
-          <u--input placeholder="请输入备注信息" border="surround" v-model="value"></u--input>
-        </view>
-      </view>
-    </view>
-    <button class='btn' @click='handlerReserve'>立即预约</button>
-  </view>
-</template>
-
-<script>
-  export default {
-    data() {
-      return {
-        value: ''
-      }
-    },
-    methods:{
-      // 立即预约
-      handlerReserve(){
-        uni.navigateTo({
-          url:'/PageMine/orderModules/orderReserveSuccess'
-        })
-      }
-    }
-  }
-</script>
-
-<style lang="scss" scoped>
-  .container {
-    padding: 24rpx 32rpx;
-    box-sizing: border-box;
-    background-color: #F9F9F9;
-    font-size: 28rpx;
-
-    .container-box {
-      padding: 24rpx;
-      border-radius: 16rpx;
-      background-color: #fff;
-
-      .title {
-        margin-bottom: 24rpx;
-        font-weight: bold;
-      }
-
-      .item-box {
-        display: flex;
-        margin-bottom: 24rpx;
-
-        .item-left {
-          margin-right: 32rpx;
-
-          .img {
-            width: 160rpx;
-            height: 160rpx;
-            border-radius: 16rpx;
-          }
-        }
-
-        .item-right {
-          display: flex;
-          flex-direction: column;
-          justify-content: space-between;
-
-          .right1 {}
-
-          .right2 {
-            padding: 2rpx 12rpx;
-            background-color: #E9EFF9;
-            color: #215EBE;
-            border: 2rpx solid #215EBE;
-          }
-        }
-      }
-
-      .item-box:last-child {
-        margin: 0;
-      }
-
-      .input-item {
-        margin-bottom: 24rpx;
-
-        .item-top {
-          margin-bottom: 16rpx;
-        }
-      }
-    }
-
-    .btn {
-      width: 100%;
-      background-color: #215EBE;
-      text-align: center;
-      color: #fff;
-      margin-top:50rpx;
-      height:80rpx;
-      line-height: 80rpx;
-    }
-  }
-</style>

+ 130 - 0
src/PageMine/orderReserve/index.vue

@@ -0,0 +1,130 @@
+<template>
+  <view class="container">
+    <view class="container-box">
+      <view class="title">汽车美容</view>
+      <view class="item-box" v-for="(item, index) of 3" :key="index">
+        <view class="item-left">
+          <image src="@/static/QR57a.jpg" class="img"></image>
+        </view>
+        <view class="item-right">
+          <view class="right1">水洗轿车</view>
+          <view class="right1">X1</view>
+          <view class="right2">汽车美容</view>
+        </view>
+      </view>
+    </view>
+    <view class="container-box">
+      <view class="title">预约信息</view>
+      <view class="input-item">
+        <view class="item-top">联系方式</view>
+        <view class="item-bottom">
+          <u--input placeholder="请输入联系方式" border="surround" v-model="value"></u--input>
+        </view>
+      </view>
+      <view class="input-item">
+        <view class="item-top">预约时间</view>
+        <view class="item-bottom">
+          <u--input placeholder="请输入联系方式" border="surround" v-model="value"></u--input>
+        </view>
+      </view>
+      <view class="input-item">
+        <view class="item-top">备注</view>
+        <view class="item-bottom">
+          <u--input placeholder="请输入备注信息" border="surround" v-model="value"></u--input>
+        </view>
+      </view>
+    </view>
+    <button class="btn" @click="handlerReserve">立即预约</button>
+  </view>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      value: '',
+    };
+  },
+  methods: {
+    // 立即预约
+    handlerReserve() {
+      uni.navigateTo({
+        url: '/PageMine/orderModules/orderReserveSuccess',
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.container {
+  padding: 24rpx 32rpx;
+  box-sizing: border-box;
+  background-color: #f9f9f9;
+  font-size: 28rpx;
+
+  .container-box {
+    padding: 24rpx;
+    border-radius: 16rpx;
+    background-color: #fff;
+
+    .title {
+      margin-bottom: 24rpx;
+      font-weight: bold;
+    }
+
+    .item-box {
+      display: flex;
+      margin-bottom: 24rpx;
+
+      .item-left {
+        margin-right: 32rpx;
+
+        .img {
+          width: 160rpx;
+          height: 160rpx;
+          border-radius: 16rpx;
+        }
+      }
+
+      .item-right {
+        display: flex;
+        flex-direction: column;
+        justify-content: space-between;
+
+        .right1 {
+        }
+
+        .right2 {
+          padding: 2rpx 12rpx;
+          background-color: #e9eff9;
+          color: #215ebe;
+          border: 2rpx solid #215ebe;
+        }
+      }
+    }
+
+    .item-box:last-child {
+      margin: 0;
+    }
+
+    .input-item {
+      margin-bottom: 24rpx;
+
+      .item-top {
+        margin-bottom: 16rpx;
+      }
+    }
+  }
+
+  .btn {
+    width: 100%;
+    background-color: #215ebe;
+    text-align: center;
+    color: #fff;
+    margin-top: 50rpx;
+    height: 80rpx;
+    line-height: 80rpx;
+  }
+}
+</style>

+ 1 - 1
src/PageMine/orderModules/orderReserveSuccess.vue → src/PageMine/reserveSuccess/index.vue

@@ -12,7 +12,7 @@
     </view>
     <view class="container-box">
       <view class="title">汽车美容</view>
-      <view class="item-box" v-for="(item, index) of 3">
+      <view class="item-box" v-for="(item, index) of 3" :key="index">
         <view class="item-left">
           <image src="@/static/QR57a.jpg" class="img"></image>
         </view>

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

@@ -97,7 +97,7 @@ export default {
     handleLogout() {
       this.$store.dispatch('Logout').then(() => {
         uni.navigateTo({
-          url: `pages/login/login`,
+          url: `pages/login/index`,
         });
       });
     },

+ 24 - 27
src/pageMerchant/components/customizeTabbar.vue

@@ -1,38 +1,35 @@
 <template>
   <view class="container">
     <u-tabbar
-    	:value="tabbarValue"
-    	@change="name => tabbarValue = name"
-    	:fixed="true"
-    	:placeholder="true"
-    	:safeAreaInsetBottom="true"
+      :value="tabbarValue"
+      @change="name => (tabbarValue = name)"
+      :fixed="true"
+      :placeholder="true"
+      :safeAreaInsetBottom="true"
     >
-      <u-tabbar-item text="订单" icon="order" ></u-tabbar-item>
-    	<!-- <u-tabbar-item text="消息" icon="chat" ></u-tabbar-item> -->
-    	<!-- <u-tabbar-item text="推广" icon="man-add" ></u-tabbar-item> -->
-      <u-tabbar-item text="店铺" icon="bag" ></u-tabbar-item>
-      <u-tabbar-item text="我的" icon="home" ></u-tabbar-item>
+      <u-tabbar-item text="订单" icon="order"></u-tabbar-item>
+      <!-- <u-tabbar-item text="消息" icon="chat" ></u-tabbar-item> -->
+      <!-- <u-tabbar-item text="推广" icon="man-add" ></u-tabbar-item> -->
+      <u-tabbar-item text="店铺" icon="bag"></u-tabbar-item>
+      <u-tabbar-item text="我的" icon="home"></u-tabbar-item>
     </u-tabbar>
   </view>
 </template>
 
 <script>
-  export default{
-    data(){
-      return{
-        tabbarValue:2
-      }
+export default {
+  data() {
+    return {
+      tabbarValue: 2,
+    };
+  },
+  watch: {
+    tabbarValue: {
+      immediate: true,
+      handler(newValue) {
+        this.$emit('tabbarChange', newValue);
+      },
     },
-    watch:{
-      tabbarValue:{
-        immediate:true,
-        handler(newValue){
-          this.$emit('tabbarChange',newValue)
-        }
-      }
-    }
-  }
+  },
+};
 </script>
-
-<style>
-</style>

+ 283 - 291
src/pageMerchant/components/orderList.vue

@@ -1,301 +1,293 @@
 <template>
-	<view class="container">
-		<!-- 订单 -->
-		<view class="order">
-			<view class="order-box">
-				<view class="order-item" v-for="(item, index) of list" :key="index" @click="toDetail(item)">
-					<view class="item-allnumb-box">
-						<view class="allnumb-left">
-							<image class="img" :src="item.avatar || '@/tatic/logo.png' "
-								style="width: 50rpx; height: 50rpx" />
-							<span style="margin-left:20rpx">{{item.memberUsername || '--'}}</span>
-						</view>
-						<view class="allnumb-right" :style="{color: getStatusColor(item.status)}">
-							{{ getStatusText(item.status)  }}
-						</view>
-					</view>
-
-					<u-line margin="20rpx 0"></u-line>
-
-					<view class="item-center" :key="idx" v-for="(itm, idx) of item.goodsInfo">
-						<view class="center-left">
-							<image :src="itm.goodsPic" class="img"></image>
-						</view>
-						<view class="center-right">
-							<view class="r-l">
-								<view class="right-name"> {{ itm.goodsName || '--'}} </view>
-								<!-- <view class="right-descript"> 测试商品描述111 </view> -->
-								<view class="l-box">
-									<view class="right-price"> ¥{{ itm.goodsPrice || '--' }} </view>
-									<view class="right-numb"> ×{{ itm.goodsQuantity || '--' }} </view>
-								</view>
-							</view>
-						</view>
-					</view>
-
-					<view class="item-allnumb-box">
-						<view class="allnumb-left"></view>
-						<view class="allnumb-right">
-							<span class="r-text">实付款</span>¥{{ item.payAmount || '--' }}
-						</view>
-					</view>
-
-					<u-line margin="20rpx 0" dashed="true"></u-line>
-
-					<view class="item-top">
-						<view class="top-left gray-color">订单编号 : {{ item.id || '--' }}</view>
-						<view class="top-right">{{ type_name }}</view>
-					</view>
-					<view class="item-top">
-						<view class="top-left gray-color">下单时间 : {{ formatTime1(item.createTime) || '--' }}</view>
-						<view class="top-right"></view>
-					</view>
-					<view class="item-top">
-						<view v-if="item.status == 2" class="top-left gray-color">核销时间:
-							{{ formatTime1(item.receiveTime) || '--' }}
-						</view>
-						<view v-if="item.status == 3" class="top-left gray-color">退款时间:
-							{{ formatTime1(item.updateTime) || '--' }}
-						</view>
-						<!-- <view v-if="item.status == 4" class="top-left gray-color">过期时间:
+  <view class="container">
+    <!-- 订单 -->
+    <view class="order">
+      <view class="order-box">
+        <view class="order-item" v-for="(item, index) of list" :key="index" @click="toDetail(item)">
+          <view class="item-allnumb-box">
+            <view class="allnumb-left">
+              <image
+                class="img"
+                :src="item.avatar || '@/tatic/logo.png'"
+                style="width: 50rpx; height: 50rpx"
+              />
+              <span style="margin-left: 20rpx">{{ item.memberUsername || '--' }}</span>
+            </view>
+            <view class="allnumb-right" :style="{ color: getStatusColor(item.status) }">
+              {{ getStatusText(item.status) }}
+            </view>
+          </view>
+
+          <u-line margin="20rpx 0"></u-line>
+
+          <view class="item-center" :key="idx" v-for="(itm, idx) of item.goodsInfo">
+            <view class="center-left">
+              <image :src="itm.goodsPic" class="img"></image>
+            </view>
+            <view class="center-right">
+              <view class="r-l">
+                <view class="right-name"> {{ itm.goodsName || '--' }} </view>
+                <!-- <view class="right-descript"> 测试商品描述111 </view> -->
+                <view class="l-box">
+                  <view class="right-price"> ¥{{ itm.goodsPrice || '--' }} </view>
+                  <view class="right-numb"> ×{{ itm.goodsQuantity || '--' }} </view>
+                </view>
+              </view>
+            </view>
+          </view>
+
+          <view class="item-allnumb-box">
+            <view class="allnumb-left"></view>
+            <view class="allnumb-right">
+              <span class="r-text">实付款</span>¥{{ item.payAmount || '--' }}
+            </view>
+          </view>
+
+          <u-line margin="20rpx 0" dashed="true"></u-line>
+
+          <view class="item-top">
+            <view class="top-left gray-color">订单编号 : {{ item.id || '--' }}</view>
+            <view class="top-right">{{ type_name }}</view>
+          </view>
+          <view class="item-top">
+            <view class="top-left gray-color"
+              >下单时间 : {{ formatTime1(item.createTime) || '--' }}</view
+            >
+            <view class="top-right"></view>
+          </view>
+          <view class="item-top">
+            <view v-if="item.status == 2" class="top-left gray-color"
+              >核销时间:
+              {{ formatTime1(item.receiveTime) || '--' }}
+            </view>
+            <view v-if="item.status == 3" class="top-left gray-color"
+              >退款时间:
+              {{ formatTime1(item.updateTime) || '--' }}
+            </view>
+            <!-- <view v-if="item.status == 4" class="top-left gray-color">过期时间:
 							{{ formatTime1(item.createTime) }}</view> -->
-						<!--    <view v-else class="top-left gray-color"></view>
+            <!--    <view v-else class="top-left gray-color"></view>
 						    <view class="top-right"></view> -->
-					</view>
-
-
-				</view>
-			</view>
-			<view style="margin-top: 40rpx" v-if="list.length === 0">
-				<u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" />
-			</view>
-
-		</view>
-	</view>
+          </view>
+        </view>
+      </view>
+      <view style="margin-top: 40rpx" v-if="list.length === 0">
+        <u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" />
+      </view>
+    </view>
+  </view>
 </template>
 
 <script>
-	import {
-		userOrdersApi,
-		getUserOrderList,
-		cancelOrder
-	} from '@/api/client/order';
-	export default {
-		props: {
-			typeStyle: {
-				type: Number,
-				default: 0,
-			},
-			list: {
-				type: Array,
-				default: [],
-			},
-		},
-		data() {
-			return {
-
-			};
-		},
-		mounted() {
-
-		},
-		onShow() {
-
-		},
-		computed: {
-
-		},
-		methods: {
-			toDetail(item){
-				console.log(item,"item")
-				uni.navigateTo({
-					url: `/pageMerchant/components/orderDetail?detailDate=${JSON.stringify(item)}`,
-				});
-			},
-			getStatusColor(status) {
-				switch (status) {
-					case 1:
-						return 'blue';
-					case 4:
-						return 'red';
-					case 3:
-						return 'orange';
-					// case 4:
-					// 	return 'green';
-					default:
-						return 'green';
-				}
-			},
-			getStatusText(status) {
-				switch (status) {
-					case 1:
-						return '待核销';
-					case 4:
-						return '已核销';
-					case 3:
-						return '已退款';
-					// case 4:
-					// 	return '已过期';
-					default:
-						return '无效订单';
-				}
-			},
-			// 跳转到订单详情
-			handlerSkipDetail(e) {
-				uni.navigateTo({
-					url: `/PageMine/orderModules/orderDetail?orderList=${JSON.stringify(e)}`,
-				});
-			},
-			formatTime1(timestamp) {
-				const date = new Date(timestamp); // 转换为毫秒
-				const year = date.getFullYear();
-				const month = ('0' + (date.getMonth() + 1)).slice(-2);
-				const day = ('0' + date.getDate()).slice(-2);
-				const hour = ('0' + date.getHours()).slice(-2);
-				const minute = ('0' + date.getMinutes()).slice(-2);
-				const second = ('0' + date.getSeconds()).slice(-2);
-
-				return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
-			}
-		},
-	};
+import { userOrdersApi, getUserOrderList, cancelOrder } from '@/api/client/order';
+export default {
+  props: {
+    typeStyle: {
+      type: Number,
+      default: 0,
+    },
+    list: {
+      type: Array,
+      default: [],
+    },
+  },
+  data() {
+    return {};
+  },
+  mounted() {},
+  onShow() {},
+  computed: {},
+  methods: {
+    toDetail(item) {
+      console.log(item, 'item');
+      uni.navigateTo({
+        url: `/pageMerchant/components/orderDetail?detailDate=${JSON.stringify(item)}`,
+      });
+    },
+    getStatusColor(status) {
+      switch (status) {
+        case 1:
+          return 'blue';
+        case 4:
+          return 'red';
+        case 3:
+          return 'orange';
+        // case 4:
+        // 	return 'green';
+        default:
+          return 'green';
+      }
+    },
+    getStatusText(status) {
+      switch (status) {
+        case 1:
+          return '待核销';
+        case 4:
+          return '已核销';
+        case 3:
+          return '已退款';
+        // case 4:
+        // 	return '已过期';
+        default:
+          return '无效订单';
+      }
+    },
+    // 跳转到订单详情
+    handlerSkipDetail(e) {
+      uni.navigateTo({
+        url: `/PageMine/orderDetail/index?orderList=${JSON.stringify(e)}`,
+      });
+    },
+    formatTime1(timestamp) {
+      const date = new Date(timestamp); // 转换为毫秒
+      const year = date.getFullYear();
+      const month = ('0' + (date.getMonth() + 1)).slice(-2);
+      const day = ('0' + date.getDate()).slice(-2);
+      const hour = ('0' + date.getHours()).slice(-2);
+      const minute = ('0' + date.getMinutes()).slice(-2);
+      const second = ('0' + date.getSeconds()).slice(-2);
+
+      return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>
-	.order {
-		margin-top: 10px;
-		padding: 10rpx 20rpx 20rpx;
-		box-sizing: border-box;
-
-		.order-box {
-			.order-item {
-				margin-bottom: 20rpx;
-				background-color: #fff;
-				border-radius: 20rpx;
-				padding: 20rpx;
-				box-shadow: 0 8rpx 15rpx 0 rgba(0, 0, 0, 0.08);
-
-				.item-top {
-					display: flex;
-					justify-content: space-between;
-					margin-bottom: 10rpx;
-				}
-
-				.item-center {
-					display: flex;
-					align-items: center;
-					margin-bottom: 10rpx;
-
-					.center-left {
-						height: 160rpx;
-
-						.img {
-							width: 160rpx;
-							height: 160rpx;
-						}
-					}
-
-					.center-right {
-						width: 100%;
-						height: 160rpx;
-						display: flex;
-						justify-content: space-between;
-						margin-left: 20rpx;
-
-						.r-l {
-							display: flex;
-							flex-direction: column;
-							justify-content: space-around;
-
-							.right-name {
-								color: #4d5671;
-								font-size: 32rpx;
-								font-weight: bold;
-							}
-
-							.right-descript {
-								font-size: 28rpx;
-								color: #858797;
-							}
-
-							.l-box {
-								display: flex;
-								font-size: 24rpx;
-								align-items: center;
-								font-style: italic;
-
-								.right-price {
-									margin-right: 20rpx;
-									font-weight: bold;
-									font-size: 28rpx;
-									color: #f57f32;
-								}
-
-								.right-numb {
-									font-size: 24rpx;
-									color: #858797;
-								}
-							}
-						}
-
-						.r-r {
-							.r-item {
-								align-items: center;
-							}
-						}
-					}
-				}
-
-				.item-allnumb-box {
-					display: flex;
-					justify-content: space-between;
-					align-items: center;
-					font-weight: bold;
-
-					.allnumb-left {
-						display: flex;
-						justify-content: start;
-						align-items: center;
-						font-size: 32rpx;
-
-						.img {
-							display: block;
-						}
-					}
-
-					.allnumb-right {
-						font-size: 26rpx;
-						color: #f57f32;
-
-						.r-text {
-							color: #000;
-						}
-					}
-				}
-			}
-		}
-	}
-
-	.item-bottom {
-		width: 100%;
-		margin-top: 20rpx;
-
-		.btn {
-			height: 70rpx;
-			background-color: rgba(248, 213, 53, 0.8);
-			color: #4e5059;
-			font-size: 28rpx;
-			text-align: center;
-			line-height: 70rpx;
-			border-radius: 20rpx;
-		}
-	}
-
-	.gray-color {
-		color: #858797;
-	}
-
-	::deep .u-tabs__wrapper__nav__item__text {
-		font-size: 30px;
-	}
+.order {
+  margin-top: 10px;
+  padding: 10rpx 20rpx 20rpx;
+  box-sizing: border-box;
+
+  .order-box {
+    .order-item {
+      margin-bottom: 20rpx;
+      background-color: #fff;
+      border-radius: 20rpx;
+      padding: 20rpx;
+      box-shadow: 0 8rpx 15rpx 0 rgba(0, 0, 0, 0.08);
+
+      .item-top {
+        display: flex;
+        justify-content: space-between;
+        margin-bottom: 10rpx;
+      }
+
+      .item-center {
+        display: flex;
+        align-items: center;
+        margin-bottom: 10rpx;
+
+        .center-left {
+          height: 160rpx;
+
+          .img {
+            width: 160rpx;
+            height: 160rpx;
+          }
+        }
+
+        .center-right {
+          width: 100%;
+          height: 160rpx;
+          display: flex;
+          justify-content: space-between;
+          margin-left: 20rpx;
+
+          .r-l {
+            display: flex;
+            flex-direction: column;
+            justify-content: space-around;
+
+            .right-name {
+              color: #4d5671;
+              font-size: 32rpx;
+              font-weight: bold;
+            }
+
+            .right-descript {
+              font-size: 28rpx;
+              color: #858797;
+            }
+
+            .l-box {
+              display: flex;
+              font-size: 24rpx;
+              align-items: center;
+              font-style: italic;
+
+              .right-price {
+                margin-right: 20rpx;
+                font-weight: bold;
+                font-size: 28rpx;
+                color: #f57f32;
+              }
+
+              .right-numb {
+                font-size: 24rpx;
+                color: #858797;
+              }
+            }
+          }
+
+          .r-r {
+            .r-item {
+              align-items: center;
+            }
+          }
+        }
+      }
+
+      .item-allnumb-box {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        font-weight: bold;
+
+        .allnumb-left {
+          display: flex;
+          justify-content: start;
+          align-items: center;
+          font-size: 32rpx;
+
+          .img {
+            display: block;
+          }
+        }
+
+        .allnumb-right {
+          font-size: 26rpx;
+          color: #f57f32;
+
+          .r-text {
+            color: #000;
+          }
+        }
+      }
+    }
+  }
+}
+
+.item-bottom {
+  width: 100%;
+  margin-top: 20rpx;
+
+  .btn {
+    height: 70rpx;
+    background-color: rgba(248, 213, 53, 0.8);
+    color: #4e5059;
+    font-size: 28rpx;
+    text-align: center;
+    line-height: 70rpx;
+    border-radius: 20rpx;
+  }
+}
+
+.gray-color {
+  color: #858797;
+}
+
+::deep .u-tabs__wrapper__nav__item__text {
+  font-size: 30px;
+}
 </style>

+ 7 - 7
src/pages.json

@@ -14,14 +14,14 @@
       }
     },
     {
-      "path": "pages/login/login",
+      "path": "pages/login/index",
       "style": {
         "navigationBarTitleText": "登录",
         "navigationStyle": "custom"
       }
     },
     {
-      "path": "pages/login/phoneLogin",
+      "path": "pages/phoneLogin/index",
       "style": {
         "navigationBarTitleText": "账号登录"
       }
@@ -171,30 +171,30 @@
         {
           "path": "orderModules/index",
           "style": {
-            "navigationBarTitleText": "我的订单"
+            "navigationStyle": "custom"
           }
         },
         {
-          "path": "orderModules/orderDetail",
+          "path": "orderDetail/index",
           "style": {
             "navigationBarTitleText": "订单详情"
           }
         },
         {
-          "path": "orderModules/orderReserve",
+          "path": "orderReserve/index",
           "style": {
             "navigationBarTitleText": "订单预约"
           }
         },
         {
-          "path": "orderModules/orderReserveSuccess",
+          "path": "reserveSuccess/index",
           "style": {
             "navigationBarTitleText": "预约成功",
             "navigationStyle": "custom"
           }
         },
         {
-          "path": "orderModules/orderComment",
+          "path": "orderComment/index",
           "style": {
             "navigationBarTitleText": "订单评价"
           }

+ 253 - 0
src/pages/login/index.vue

@@ -0,0 +1,253 @@
+<template>
+  <view class="container">
+    <view class="t-b">欢迎登录车旅程!</view>
+    <view class="t-b2">欢迎使用车旅程,为你提供便捷服务</view>
+
+    <!-- 中间登录注册按钮 -->
+    <view class="login-btn-wrap">
+      <u-button
+        v-if="!checked"
+        shape="circle"
+        type="primary"
+        :customStyle="buttonStyleTop"
+        @click="checkAgree"
+      >
+        微信用户一键登录
+      </u-button>
+      <u-button
+        v-else
+        shape="circle"
+        type="primary"
+        :loading="loading"
+        loadingText="登录中..."
+        :customStyle="buttonStyleTop"
+        open-type="getPhoneNumber"
+        @getphonenumber="login"
+      >
+        微信用户一键登录
+      </u-button>
+      <u-button
+        shape="circle"
+        :customStyle="buttonStyleButton"
+        @tap="$Router.push('/pages/phoneLogin/index')"
+      >
+        手机号登录/注册
+      </u-button>
+    </view>
+    <br />
+
+    <!-- 底部协议 -->
+    <view class="agree">
+      <u-checkbox-group v-model="agree">
+        <u-checkbox shape="circle" name="1" label="我已阅读并同意" />
+      </u-checkbox-group>
+      <view
+        @click="$Router.push('/pages/webview/index?target=http://8.137.122.65:88/用户协议.html')"
+        class="agreement"
+      >
+        《用户协议》</view
+      >
+      <view
+        @click="$Router.push('/pages/webview/index?target=http://8.137.122.65:88/隐私政策.html')"
+        class="agreement"
+      >
+        《隐私政策》</view
+      >
+    </view>
+
+    <!-- 第三方 -->
+    <view class="t-f"><text>————— 第三方账号登录 —————</text></view>
+    <view class="t-e cl">
+      <view class="t-g" @click="$Router.push('/pages/phoneLogin/index')">
+        <image src="@/static//icon/phone.png" />
+      </view>
+      <view class="t-g">
+        <image src="@/static//icon/qq.png" />
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+import { getWxLoginCode } from '@/api/login.js';
+
+export default {
+  data() {
+    return {
+      agree: [],
+      code: '',
+      mobile: '', // 手机号密文并非真实手机号
+      isUserAgreement: false,
+      loading: false,
+      title: '',
+      buttonStyleTop: {
+        'font-size': '28rpx',
+        background: '#5677fc',
+        color: '#fff',
+        height: '90rpx',
+        'line-height': '90rpx',
+        'border-radius': '50rpx',
+        'box-shadow': '0 5px 7px 0 rgba(86, 119, 252, 0.2)',
+        marginTop: '30rpx',
+      },
+      buttonStyleButton: {
+        'font-size': '28rpx',
+        background: '#fff',
+        color: '#333',
+        height: '90rpx',
+        'line-height': '90rpx',
+        'border-radius': '50rpx',
+        'box-shadow': '0 5px 7px 0 rgba(235, 237, 245, 0.2)',
+        marginTop: '30rpx',
+      },
+    };
+  },
+  computed: {
+    checked() {
+      return this.agree && this.agree.length > 0;
+    },
+  },
+  methods: {
+    onLoad: function (options) {
+      console.log('options========>', options.q);
+      if (options.q) {
+        const urlString = decodeURIComponent(options.q);
+        const pathSegments = urlString.split('/');
+        const promoterId = pathSegments[pathSegments.length - 1];
+        this.$store.commit('SET_INVITATIONCODE', promoterId);
+      }
+    },
+
+    checkAgree() {
+      if (!this.checked) {
+        return uni.$u.toast('请阅读并勾选底部协议');
+      }
+    },
+    //点击微信用户一键登录
+    async login(e) {
+      if (e.detail.errMsg != 'getPhoneNumber:ok') {
+        return uni.$u.toast('您已取消登录');
+      }
+      this.mobile = e.detail.code;
+      this.code = await getWxLoginCode();
+      if (!this.code || !this.mobile) {
+        this.loading = false;
+        uni.$u.toast('微信授权失败,请稍后重试');
+        return;
+      }
+      this.loading = true;
+      const data = {
+        code: this.code,
+        mobile: this.mobile,
+      };
+      this.$store
+        .dispatch('LoginByWxCode', data)
+        .then(() => {
+          // this.$store.dispatch('SwitchIdentity', 'CUSTOMER');
+          this.$Router.pushTab('/pages/tabbar/home');
+          this.loading = false;
+          this.$store.dispatch('GetUserInfo');
+          uni.$u.toast('登录成功');
+        })
+        .catch(err => {
+          this.loading = false;
+          uni.$u.toast(`${err.message}`);
+        });
+    },
+    confirmUserAgreement() {
+      // 确认按钮点击事件处理
+      if (!this.checked.length) {
+        this.showUserAgreementDialog = true;
+      } else {
+        this.showPrivacyPolicyDialog = true;
+      }
+
+      // 在确认按钮点击后执行页面跳转的代码
+      this.$Router.back();
+    },
+
+    //点击用户协议
+    clickAgreement(title) {
+      this.show = true; //打开弹框
+      this.title = title; //赋值标题
+    },
+
+    //点击用户协议弹框内的确定
+    handleConfirm() {
+      this.show = false; //关闭弹框
+    },
+  },
+};
+</script>
+
+<style scoped lang="scss">
+.container {
+  height: 100vh;
+  padding: 0 70rpx;
+  background-color: #f2f5f9;
+  background-color: #fff;
+  padding-top: 150rpx;
+  box-sizing: border-box;
+
+  .t-b {
+    text-align: left;
+    font-size: 46rpx;
+    color: #000;
+    padding: 150rpx 0 30rpx 0;
+    font-weight: bold;
+  }
+
+  .t-b2 {
+    text-align: left;
+    font-size: 32rpx;
+    color: #aaaaaa;
+    padding: 0rpx 0 80rpx 0;
+  }
+
+  .login-btn-wrap {
+    margin-top: 50rpx;
+    width: 100%;
+  }
+}
+
+.agree {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  font-size: 27rpx;
+  margin-top: 20rpx;
+
+  .agreement {
+    color: #3c9cff;
+    cursor: pointer;
+  }
+}
+
+.t-f {
+  text-align: center;
+  margin: 200rpx 0 0 0;
+  color: #666;
+
+  text {
+    margin-left: 20rpx;
+    color: #aaaaaa;
+    font-size: 27rpx;
+  }
+}
+
+.t-e {
+  text-align: center;
+  width: 250rpx;
+  margin: 20rpx auto 0;
+
+  .t-g {
+    float: left;
+    width: 50%;
+  }
+
+  image {
+    width: 50rpx;
+    height: 50rpx;
+  }
+}
+</style>

+ 0 - 232
src/pages/login/login.vue

@@ -1,232 +0,0 @@
-<template>
-	<view class="container">
-		<view class="t-b">欢迎登录车旅程!</view>
-		<view class="t-b2">欢迎使用车旅程,为你提供便捷服务</view>
-
-		<!-- 中间登录注册按钮 -->
-		<view class="login-btn-wrap">
-			<u-button v-if="!checked" shape="circle" type="primary" :customStyle="buttonStyleTop" @click="checkAgree">
-				微信用户一键登录
-			</u-button>
-			<u-button v-else shape="circle" type="primary" :loading="loading" loadingText="登录中..."
-				:customStyle="buttonStyleTop" open-type="getPhoneNumber" @getphonenumber="login">
-				微信用户一键登录
-			</u-button>
-			<u-button shape="circle" :customStyle="buttonStyleButton" @tap="$Router.push('/pages/login/phoneLogin')">
-				手机号登录/注册
-			</u-button>
-		</view>
-		<br />
-
-		<!-- 底部协议 -->
-		<view class="agree">
-			<u-checkbox-group v-model="agree">
-				<u-checkbox shape="circle" name="1" label="我已阅读并同意" />
-			</u-checkbox-group>
-			<view @click="$Router.push('/pages/webview/index?target=http://8.137.122.65:88/用户协议.html')"
-				class="agreement">
-				《用户协议》</view>
-			<view @click="$Router.push('/pages/webview/index?target=http://8.137.122.65:88/隐私政策.html')"
-				class="agreement">
-				《隐私政策》</view>
-		</view>
-
-		<!-- 第三方 -->
-		<view class="t-f"><text>————— 第三方账号登录 —————</text></view>
-		<view class="t-e cl">
-			<view class="t-g" @click="$Router.push('/pages/login/phoneLogin')">
-				<image src="@/static//icon/phone.png" />
-			</view>
-			<view class="t-g">
-				<image src="@/static//icon/qq.png" />
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import {
-		getWxLoginCode
-	} from '@/api/login.js';
-
-	export default {
-		data() {
-			return {
-				agree: [],
-				code: '',
-				mobile: '', // 手机号密文并非真实手机号
-				isUserAgreement: false,
-				loading: false,
-				title: '',
-				buttonStyleTop: {
-					'font-size': '28rpx',
-					background: '#5677fc',
-					color: '#fff',
-					height: '90rpx',
-					'line-height': '90rpx',
-					'border-radius': '50rpx',
-					'box-shadow': '0 5px 7px 0 rgba(86, 119, 252, 0.2)',
-					marginTop: '30rpx',
-				},
-				buttonStyleButton: {
-					'font-size': '28rpx',
-					background: '#fff',
-					color: '#333',
-					height: '90rpx',
-					'line-height': '90rpx',
-					'border-radius': '50rpx',
-					'box-shadow': '0 5px 7px 0 rgba(235, 237, 245, 0.2)',
-					marginTop: '30rpx',
-				},
-			};
-		},
-		computed: {
-			checked() {
-				return this.agree && this.agree.length > 0;
-			},
-		},
-		methods: {
-
-			onLoad: function(options) {
-				console.log('options========>', options.q);
-				if (options.q) {
-					const urlString = decodeURIComponent(options.q)
-					const pathSegments = urlString.split('/');
-					const promoterId = pathSegments[pathSegments.length - 1];
-					this.$store.commit('SET_INVITATIONCODE', promoterId)
-				}
-
-
-			},
-
-			checkAgree() {
-				if (!this.checked) {
-					return uni.$u.toast('请阅读并勾选底部协议');
-				}
-			},
-			//点击微信用户一键登录
-			async login(e) {
-				if (e.detail.errMsg != 'getPhoneNumber:ok') {
-					return uni.$u.toast('您已取消登录');
-				}
-				this.mobile = e.detail.code;
-				this.code = await getWxLoginCode();
-				if (!this.code || !this.mobile) {
-					this.loading = false;
-					uni.$u.toast('微信授权失败,请稍后重试');
-					return;
-				}
-				this.loading = true;
-				const data = {
-					code: this.code,
-					mobile: this.mobile,
-				};
-				this.$store.dispatch('LoginByWxCode', data).then(() => {
-						// this.$store.dispatch('SwitchIdentity', 'CUSTOMER');
-						this.$Router.pushTab('/pages/tabbar/home');
-						this.loading = false;
-						this.$store.dispatch('GetUserInfo');
-						uni.$u.toast('登录成功');
-					})
-					.catch(err => {
-						this.loading = false;
-						uni.$u.toast(`${err.message}`);
-					});
-			},
-			confirmUserAgreement() {
-				// 确认按钮点击事件处理
-				if (!this.checked.length) {
-					this.showUserAgreementDialog = true;
-				} else {
-					this.showPrivacyPolicyDialog = true;
-				}
-
-				// 在确认按钮点击后执行页面跳转的代码
-				this.$Router.back();
-			},
-
-			//点击用户协议
-			clickAgreement(title) {
-				this.show = true; //打开弹框
-				this.title = title; //赋值标题
-			},
-
-			//点击用户协议弹框内的确定
-			handleConfirm() {
-				this.show = false; //关闭弹框
-			},
-		},
-	};
-</script>
-
-<style scoped lang="scss">
-	.container {
-		height: 100vh;
-		padding: 0 70rpx;
-		background-color: #f2f5f9;
-		background-color: #fff;
-		padding-top: 150rpx;
-		box-sizing: border-box;
-
-		.t-b {
-			text-align: left;
-			font-size: 46rpx;
-			color: #000;
-			padding: 150rpx 0 30rpx 0;
-			font-weight: bold;
-		}
-
-		.t-b2 {
-			text-align: left;
-			font-size: 32rpx;
-			color: #aaaaaa;
-			padding: 0rpx 0 80rpx 0;
-		}
-
-		.login-btn-wrap {
-			margin-top: 50rpx;
-			width: 100%;
-		}
-	}
-
-	.agree {
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		font-size: 27rpx;
-		margin-top: 20rpx;
-
-		.agreement {
-			color: #3c9cff;
-			cursor: pointer;
-		}
-	}
-
-	.t-f {
-		text-align: center;
-		margin: 200rpx 0 0 0;
-		color: #666;
-
-		text {
-			margin-left: 20rpx;
-			color: #aaaaaa;
-			font-size: 27rpx;
-		}
-	}
-
-	.t-e {
-		text-align: center;
-		width: 250rpx;
-		margin: 20rpx auto 0;
-
-		.t-g {
-			float: left;
-			width: 50%;
-		}
-
-		image {
-			width: 50rpx;
-			height: 50rpx;
-		}
-	}
-</style>

+ 0 - 0
src/pages/login/phoneLogin.vue → src/pages/phoneLogin/index.vue


+ 57 - 66
src/pagesHome/home/popularRecommend.vue

@@ -1,77 +1,68 @@
 <template>
   <view class="container">
-    <serviceItem :item="init_list" :skipType="0"/>
-    <view v-if='init_list.length == 0' style="margin-top: 40rpx">
+    <serviceItem :item="init_list" :skipType="0" />
+    <view v-if="init_list.length == 0" style="margin-top: 40rpx">
       <u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" />
     </view>
   </view>
 </template>
 
 <script>
-  import {
-    getHomePageApi,
-    indexMerchantPaging
-  } from '@/api/client/home';
-  import serviceItem from '@/components/service/serviceItem.vue';
-  import {
-    mapGetters
-  } from "vuex"
-  export default {
-    data() {
-      return {
-        queryParams: {
-          region: null, //地区编码
-          longitude: null, //经度
-          latitude: null, //纬度
-          paging:'1,10',
-          queryType:1, //查询类型 0-附近商家 1- 推荐商家
-        },
-        init_list: [],
-      };
-    },
-    components: {
-      serviceItem,
-    },
-    computed: {
-      ...mapGetters(['location'])
-    },
-    // 上滑刷新
-    onReachBottom(){
-      let { paging } = this.queryParams
-      let pageNum = paging.split(',')[0]
-      let pageSize = paging.split(',')[1]
-      if( pageNum * pageSize > this.total ){
-        uni.showToast({
-          title:'没有更多啦~',
-          icon:'none'
-        })
-        return
-      }else{
-        pageNum ++
-        this.queryParams.paging = `${pageNum},${pageSize}`
-        this.handlerInitList()
-      }
-    },
-    mounted() {
-      let {
-        latitude,
-        longitude,
-        region
-      } = this.location
-      this.queryParams.latitude = latitude
-      this.queryParams.longitude = longitude
-      this.queryParams.region = region
-      this.handlerInitList();
-    },
-    methods: {
-      // 初始化列表信息
-      handlerInitList() {
-        indexMerchantPaging(this.queryParams).then(res => {
-          let { records , total } = res.data
-          this.init_list = [...this.init_list , ...records]
-          this.total = total
-        });
+import { indexMerchantPaging } from '@/api/client/home';
+import serviceItem from '@/components/service/serviceItem.vue';
+import { mapGetters } from 'vuex';
+export default {
+  data() {
+    return {
+      queryParams: {
+        region: null, //地区编码
+        longitude: null, //经度
+        latitude: null, //纬度
+        paging: '1,10',
+        queryType: 1, //查询类型 0-附近商家 1- 推荐商家
       },
+      init_list: [],
+    };
+  },
+  components: {
+    serviceItem,
+  },
+  computed: {
+    ...mapGetters(['location']),
+  },
+  // 上滑刷新
+  onReachBottom() {
+    let { paging } = this.queryParams;
+    let pageNum = paging.split(',')[0];
+    let pageSize = paging.split(',')[1];
+    if (pageNum * pageSize > this.total) {
+      uni.showToast({
+        title: '没有更多啦~',
+        icon: 'none',
+      });
+      return;
+    } else {
+      pageNum++;
+      this.queryParams.paging = `${pageNum},${pageSize}`;
+      this.handlerInitList();
+    }
+  },
+  mounted() {
+    let { latitude, longitude, region } = this.location;
+    this.queryParams.latitude = latitude;
+    this.queryParams.longitude = longitude;
+    this.queryParams.region = region;
+    this.handlerInitList();
+  },
+  methods: {
+    // 初始化列表信息
+    handlerInitList() {
+      indexMerchantPaging(this.queryParams).then(res => {
+        let { records, total } = res.data;
+        this.init_list = [...this.init_list, ...records];
+        this.total = total;
+      });
     },
-  };
+  },
+};
 </script>

+ 3 - 3
src/utils/request.js

@@ -94,14 +94,14 @@ instance.interceptors.response.use(
     // 未登录
     if (code === 'UNAUTHORIZED') {
       uni.navigateTo({
-        url: '/pages/login/login',
+        url: '/pages/login/index',
       });
       return res.data;
     }
     // 身份切换
     if (code === 'SCOPE_CHANGED') {
       uni.reLaunch({
-        url: '/pages/login/login',
+        url: '/pages/login/index',
       });
       uni.showToast({
         title: '您的身份信息已切换',
@@ -141,7 +141,7 @@ instance.interceptors.response.use(
           showCancel: false,
           success: res => {
             uni.navigateTo({
-              url: '/pages/login/login',
+              url: '/pages/login/index',
             });
           },
         });