Эх сурвалжийг харах

✨ feat(orderAll):订单接口对接

yizhiyang 1 жил өмнө
parent
commit
78b46747f5

+ 16 - 0
src/api/client/order.js

@@ -0,0 +1,16 @@
+import { request } from '@/utils/request';
+
+/**
+ * 订单接口 - 获取用户的订单列表
+ * @returns
+ */
+export function userOrdersApi(data) {
+  return request({
+    url: '/maintain/userorders',
+    method: 'get',
+    data: data,
+    header: {
+      'content-type': 'application/x-www-form-urlencoded',
+    },
+  });
+}

+ 0 - 2
src/components/drag-button.vue

@@ -55,7 +55,6 @@ export default {
     if (sys.windowTop) {
       this.windowHeight += sys.windowTop;
     }
-    // console.log(sys);
     const query = uni.createSelectorQuery().in(this);
     query
       .select('#_drag_button')
@@ -71,7 +70,6 @@ export default {
   },
   methods: {
     click() {
-      console.log(1);
       this.$emit('btnClick');
     },
     touchstart(e) {

+ 1 - 3
src/components/service/index.vue

@@ -47,9 +47,7 @@ export default {
   props: ['item', 'skipType'],
 
   methods: {
-    click(item) {
-      console.log('item', item);
-    },
+    click(item) {},
     open() {},
     close() {
       this.show = false;

+ 0 - 1
src/pages/client/clientPackage/category.vue

@@ -83,7 +83,6 @@ export default {
   },
   onLoad() {
     this.cateList = buildTree(this.getCache('categories'));
-    console.log('cateList', this.cateList);
   },
   onReady() {
     this.getMenuItemTop();

+ 48 - 39
src/pages/client/clientPackage/orderAll.vue

@@ -1,70 +1,79 @@
 <template>
   <view class="container">
-    <view class="top-tab">
-      <u-tabs
-        class="tab"
-        :list="list"
-        :current="current"
-        @click="handlerChangeItem"
-        :activeStyle="{
-          color: '#007AFF',
-          fontWeight: 'bold',
-          transform: 'scale(1.05)',
-        }"
-        :inactiveStyle="{
-          color: '#000',
-          transform: 'scale(1)',
-        }"
-        itemStyle="height: 34px; width:19%;"
-        lineColor="#007AFF"
-      ></u-tabs>
-    </view>
+    <u-sticky bgColor="#fff">
+      <u-tabs :list="list" :current="current" @change="handlerChangeItem" />
+    </u-sticky>
 
-    <view class="item-box">
-      <u-empty v-if="init_list.length == 0" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"></u-empty>
+    <!-- 订单 -->
+    <view>
+      <view v-if="init_list.length > 0"> 1111111111 </view>
+      <view v-else style="margin-top: 40rpx">
+        <u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" />
+      </view>
     </view>
   </view>
 </template>
 
 <script>
+import { userOrdersApi } from '@/api/client/order';
 export default {
   data() {
     return {
       current: 0,
+      type: 'ALL',
+      size: 20,
       list: [
         {
-          id: 0,
-          name: '全部订单',
+          name: '所有订单',
+          type: 'ALL',
         },
         {
-          id: 1,
           name: '待付款',
+          type: 'WAIT_PAY',
+        },
+        {
+          name: '待使用',
+          type: 'WAIT_USE',
         },
         {
-          id: 2,
-          name: '待发货',
+          name: '待评价',
+          type: 'WAIT_EVALUATE',
         },
         {
-          id: 3,
-          name: '退货/售后',
+          name: '已完成',
+          type: 'COMPLETE',
+        },
+        {
+          name: '已取消',
+          type: 'CANCELLED',
         },
       ],
-      init_list: [], // 订单列表
+      init_list: [],
     };
   },
-  onLoad(option) {
-    this.current = option.type;
+
+  mounted() {
+    this.userOrdersPage();
   },
+
   methods: {
-    // 选择导航栏
-    handlerChangeItem(e) {
-      this.current = e.index;
+    handlerChangeItem(data) {
+      this.current = data.index;
+      this.type = data.type;
+      this.userOrdersPage(this.type);
+    },
+
+    async userOrdersPage(type) {
+      let orderStatus = type == undefined ? 'ALL' : `${type}`;
+      let res = await userOrdersApi({
+        orderStatus,
+        size: this.size,
+      });
+
+      if ((res.code = 200 && res.data)) {
+        this.init_list = res.data;
+      }
     },
   },
 };
 </script>
-
-<style lang="scss" scoped>
-.container {
-}
-</style>

+ 87 - 54
src/pages/client/clientPackage/storeDetail.vue

@@ -3,7 +3,7 @@
     <!-- 轮播图 -->
     <view class="carousel-map">
       <u-swiper
-        :list="list3"
+        :list="swiperList"
         previousMargin="0"
         nextMargin="100"
         circular
@@ -41,62 +41,71 @@
         </view>
         <view class="info-icon">
           <view class="info-map">
-            <u-icon name="map" size="25"></u-icon>
-            <view>导航</view>
+            <u-icon name="map" size="20"></u-icon>
+            <view style="font-size: 20rpx; margin-top: 5rpx">导航</view>
           </view>
           <view class="info-map" @click="handlerMakeCall">
-            <u-icon name="phone" size="25"></u-icon>
-            <view>电话</view>
+            <u-icon name="phone" size="20"></u-icon>
+            <view style="font-size: 20rpx; margin-top: 5rpx">电话</view>
           </view>
         </view>
       </view>
     </view>
 
-    <view
-      class="list"
-      :key="index"
-      v-for="(item, index) of goods"
-      @click="handlerSkipGoodsDetail(item, index)"
-    >
-      <!-- <image class="img" :src="
+    <!-- 商家分类 -->
+    <view class="categoryList">
+      <u-tabs :list="categoryList"></u-tabs>
+    </view>
+
+    <view>
+      <view
+        class="list"
+        :key="index"
+        v-for="(item, index) of goods"
+        @click="handlerSkipGoodsDetail(item, index)"
+      >
+        <!-- <image class="img" :src="
 		      error || !loaded
 		        ? 'https://cdn.uviewui.com/uview/album/10.jpg'
 		        : goods.logo
 		    " mode="scaleToFill" @click="$Router.push(`/pages/client/clientPackage/storeDetail?id=${item.id}`)"></image> -->
-      <image class="img" src="../../static/logo.png"></image>
-      <view>
-        <view class="item-text">{{ item.name }}</view>
-        <view class="item-flex">
-          <view class="star">
-            <u-rate :count="item.score" :size="14" />
-            <text class="line">|</text>
-            <text class="points">{{ item.score }}分</text>
-          </view>
-          <view>{{ item.score }}单</view>
-        </view>
-        <view class="list-item">
-          <view class="list-price">
-            <view class="item-l"
-              >券后价 <span>¥{{ item.originalPrice.toFixed(2) }}</span>
+        <image class="img" src="@/static/logo.png"></image>
+        <view class="listDetail">
+          <view class="item-text">{{ item.name }}</view>
+          <view class="item-flex">
+            <view class="star">
+              <u-rate :count="item.score" :size="14" />
+              <text class="line">|</text>
+              <text class="points">{{ item.score }}分</text>
             </view>
-            <view class="item-r"
-              >门市价 <span>¥{{ item.specialPrice.toFixed(2) }}</span></view
-            >
+            <view>{{ item.score }}单</view>
           </view>
-          <view class="btn-box">
-            <button class="btn btn1" @click.stop="handlerService(item, index)">预约</button>
-            <button class="btn btn2" @click.stop="handlerSkipBuy(item, index)">购买</button>
+          <view class="list-item">
+            <view class="list-price">
+              <view class="item-l">
+                券后价 <span>¥{{ item.originalPrice.toFixed(2) }}</span>
+              </view>
+              <view class="item-r">
+                门市价 <span>¥{{ item.specialPrice.toFixed(2) }}</span>
+              </view>
+            </view>
+            <view class="btn-box">
+              <button class="btn btn1" @click.stop="handlerService(item, index)">预约</button>
+              <button class="btn btn2" @click.stop="handlerSkipBuy(item, index)">购买</button>
+            </view>
           </view>
         </view>
       </view>
+
+      <u-empty
+        v-show="goods.length == 0"
+        mode="data"
+        icon="http://cdn.uviewui.com/uview/empty/data.png"
+      >
+      </u-empty>
     </view>
-    <u-empty
-      v-if="goods.length == 0"
-      mode="data"
-      icon="http://cdn.uviewui.com/uview/empty/data.png"
-    >
-    </u-empty>
 
+    <!-- 弹窗 -->
     <u-popup
       :show="reserve_show"
       @close="reserve_show = false"
@@ -130,6 +139,7 @@
       </view>
     </u-popup>
 
+    <!-- 时间 -->
     <u-datetime-picker
       :show="time_show"
       :minDate="Number(new Date())"
@@ -154,8 +164,15 @@ export default {
       goods: [],
       count: 5,
       value: 3,
-      list3: [],
-
+      swiperList: [],
+      categoryList: [
+        { id: 1, name: '全部' },
+        { id: 2, name: '养车' },
+        { id: 2, name: '维修' },
+        { id: 2, name: '改装' },
+        { id: 2, name: '补胎' },
+        { id: 2, name: '其他' },
+      ],
       queryParams: {
         //请求参数
         id: null, //商家ID
@@ -163,12 +180,10 @@ export default {
         longitude: null, //经度
         latitude: null, //纬度
       },
-
       template_value: '',
       time_show: false,
       reserve_show: false,
       value: '',
-
       addParams: {
         merchantId: '',
         mobile: '',
@@ -219,26 +234,31 @@ export default {
     handlerInitList() {
       getSellsDetail(this.queryParams.id, this.queryParams).then(res => {
         this.merchant = res.data.merchant;
-        (this.goods = res.data.goods), (this.list3 = res.data.merchant.banners.map(h => h.url));
+        (this.goods = res.data.goods),
+          (this.swiperList = res.data.merchant.banners.map(h => h.url));
       });
     },
+
     // 点击拨打电话
     handlerMakeCall() {
       uni.makePhoneCall({
         phoneNumber: this.merchant.mobile,
       });
     },
+
     // 点击跳转到商品详情
     handlerSkipGoodsDetail(item, index) {
       uni.navigateTo({
         url: `/pages/business/service/detail?id=${item.id}`,
       });
     },
+
     // 预约
     handlerService(item, index) {
       this.addParams.merchantId = item.id;
       this.reserve_show = true;
     },
+
     // 购买
     handlerSkipBuy(item, index) {
       uni.navigateTo({
@@ -246,11 +266,11 @@ export default {
       });
     },
 
-    open() {},
     // 点击选择时间
     handlerSelectTime() {
       this.time_show = true;
     },
+
     // 点击预约确定按钮
     handlerDrawConfirmBtn() {
       if (this.addParams.appointTime == '') {
@@ -290,12 +310,14 @@ export default {
         });
       }
     },
+
     formatter(type, value) {
       if (type === 'minute') {
         return `00`;
       }
       return value;
     },
+
     // 选择时间
     handlerTimeChange(e) {
       if (e) {
@@ -354,8 +376,9 @@ export default {
   .info-title {
     display: flex;
     justify-content: center;
-    font-size: 40rpx;
+    font-size: 36rpx;
     font-weight: bold;
+    margin: 20rpx 0;
 
     .info-mark {
       font-size: 12px;
@@ -366,7 +389,7 @@ export default {
   }
 
   .info-tag {
-    width: 160rpx;
+    width: 140rpx;
     padding: 10rpx;
     text-align: center;
     border: 1px solid #5992bb;
@@ -379,10 +402,10 @@ export default {
     justify-content: space-between;
 
     .info-text {
-      font-size: 30rpx;
+      font-size: 28rpx;
       line-height: 58rpx;
       color: #212020;
-      font-weight: 600;
+      margin-left: 20rpx;
 
       .distance {
         font-size: 26rpx;
@@ -393,6 +416,7 @@ export default {
 
     .info-icon {
       display: flex;
+      align-items: center;
     }
 
     .info-map {
@@ -404,18 +428,21 @@ export default {
 }
 
 .list {
-  height: 250rpx;
+  height: 220rpx;
   background-color: #fff;
   padding: 20rpx;
   margin-bottom: 20rpx;
   display: flex;
 
   .img {
-    width: 120px;
-    height: calc(100% - 20rpx);
-    margin: 10rpx 20rpx 10rpx 0;
+    width: 140px;
+    height: 100%;
+    display: block;
+    margin-right: 10rpx;
+  }
+  .listDetail {
+    width: calc(100% - 160rpx);
   }
-
   .item-text {
     font-weight: bold;
     margin: 10rpx 0 10rpx;
@@ -537,4 +564,10 @@ export default {
 .time-text {
   color: #d4d6dc;
 }
+
+/* 分类 */
+
+.categoryList {
+  background-color: #fff;
+}
 </style>

+ 2 - 7
src/pages/client/clientPackage/storeList.vue

@@ -130,9 +130,7 @@ export default {
       let obj = await getCurrentLocation(data);
       this.sellerListParams.region = obj.data.id;
       this.getData();
-    } catch (e) {
-      console.log(e, 'error');
-    }
+    } catch (e) {}
   },
   computed: {
     ...mapState({
@@ -207,12 +205,9 @@ export default {
       this.sellerListParams.longitude = this.longitude;
       getSellerList(this.sellerListParams)
         .then(res => {
-          console.log('res', res);
           this.sellerList = res.data;
         })
-        .catch(err => {
-          console.log(err);
-        });
+        .catch(err => {});
     },
     // 点击进入详情
     goSellerDetail(id) {

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

@@ -60,7 +60,6 @@ export default {
     handlerInitList() {
       maintainReservations(this.queryParams).then(res => {
         this.init_list = res.data;
-        console.log('init_list', this.init_list);
       });
     },
     // 点击取消商品

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

@@ -64,7 +64,6 @@ export default {
         res.data.map(rs => {
           this.init_list.push(rs.simpleMerchantVO);
         });
-        console.log('getHomePageApi', this.init_list);
       });
     },
   },

+ 0 - 350
src/pages/client/tabBar/home copy.vue

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

+ 1 - 8
src/pages/client/tabBar/home.vue

@@ -159,7 +159,6 @@ export default {
   watch: {
     location: {
       handler: async function (newVal, oldVal) {
-        console.log('newVal', newVal);
         const result = await getCurrentLocation(newVal);
         const param = Object.assign(
           {},
@@ -211,9 +210,7 @@ export default {
           // 将分类数据做缓存处理
           this.$store.commit('SET_CATEGORIES', this.homeData.categories);
         })
-        .catch(err => {
-          console.log(err);
-        });
+        .catch(err => {});
     },
 
     // 手动选择城市
@@ -246,9 +243,7 @@ export default {
       //   sizeType: ['original', 'compressed'],
       //   sourceType: ['camera', 'album'],
       //   success: res => {
-      //     console.log(res);
       //     const tempFilePaths = res.tempFilePaths;
-      //     console.log('tempFilePaths:', tempFilePaths);
       //     this.uploadFileAlbum();
       //   },
       // });
@@ -266,8 +261,6 @@ export default {
         name: 'imgFile',
         success: uploadFileRes => {
           let imgData = JSON.parse(uploadFileRes.data);
-          console.log(imgData.data.imgUrl);
-          console.log(this);
           this.imgDataUrl = imgData.data.imgUrl;
         },
       });

+ 1 - 3
src/pages/client/tabBar/message.vue

@@ -103,9 +103,7 @@ export default {
     },
   },
   methods: {
-    change(e) {
-      console.log('-----------', e);
-    },
+    change(e) {},
     changeInfo(index) {
       this.current = index.index;
     },

+ 1 - 1
src/pages/client/tabBar/mine.vue

@@ -84,7 +84,7 @@
     <!-- 预约列表 -->
     <view class="appointList">
       <u-cell icon="setting-fill" title="预约列表" isLink url="/pages/client/clientUser/appoint" />
-      <u-cell icon="setting-fill" title="我要开店" isLink url="" />
+      <u-cell icon="setting-fill" title="我的店铺" isLink url="" />
     </view>
 
     <view class="other-out-box">

+ 0 - 1
src/pages/index.vue

@@ -29,7 +29,6 @@ export default {
     } catch (error) {
       this.loading = false;
       this.$Router.push('/pages/login/index');
-      console.log('初始化登录异常', error);
     }
   },
 };

+ 11 - 4
src/pages/login/index.vue

@@ -2,15 +2,23 @@
   <view class="container">
     <u-image src="@/static/logo.png" mode="widthFix" class="logo-image"></u-image>
     <view class="login-btn-wrap">
-      <u-button shape="circle" type="primary" :loading="loading" @tap="login">微信用户一键登录</u-button>
-      <u-button shape="circle" :customStyle="{ 'margin-top': '20rpx' }" @tap="$Router.push('/pages/login/phoneLogin')">
+      <u-button shape="circle" type="primary" :loading="loading" @tap="login"
+        >微信用户一键登录</u-button
+      >
+      <u-button
+        shape="circle"
+        :customStyle="{ 'margin-top': '20rpx' }"
+        @tap="$Router.push('/pages/login/phoneLogin')"
+      >
         手机号登录/注册
       </u-button>
     </view>
     <br />
     <view style="display: flex; justify-content: space-between">
       <u-icon name="gift-fill" color="#2979ff" size="28"></u-icon>
-      <text @click="userAgreementClick" style="font-weight: bold; margin-right: 135rpx">随便看看</text>
+      <text @click="userAgreementClick" style="font-weight: bold; margin-right: 135rpx"
+        >随便看看</text
+      >
       <u-icon name="gift-fill" color="#2979ff" size="28"></u-icon>
       <text @click="userAgreementClick" style="font-weight: bold">联系客服</text>
     </view>
@@ -54,7 +62,6 @@ export default {
           // this.$store.dispatch('GetUserInfo').then(() => {
           //   })
           //   .catch(err => {
-          //     console.log(err);
           //   });
         })
         .catch(() => {

+ 0 - 2
src/pages/login/phoneLogin.vue

@@ -178,7 +178,6 @@ export default {
         mobile: mobile,
       })
         .then(res => {
-          console.log('res', res);
           //   this.loading = false;
           //   if (res.access_token) {
           //     uni.$u.toast('登录成功');
@@ -217,7 +216,6 @@ export default {
 
     //点击我已阅读
     checkboxChange(v) {
-      console.log('vvvfv', v);
       this.isChecked = v;
     },
 

+ 0 - 1
src/router/index.js

@@ -11,7 +11,6 @@ const router = createRouter({
       next([router.currentRoute.query]);
     },
     onShow([options], next) {
-      console.log(this);
       const args = options || router.currentRoute.query;
       next([args]);
     },

+ 1 - 0
src/store/modules/data.js

@@ -8,6 +8,7 @@ export default {
     },
     categories: getCache('categories') || [],
   }),
+
   mutations: {
     SET_LOCATION(state, data) {
       state.location = data;

+ 3 - 0
src/store/modules/login.js

@@ -9,6 +9,7 @@ export default {
     access_token: getCache('access_token') || '',
     refresh_token: getCache('refresh_token') || '',
   }),
+
   mutations: {
     SET_ACCESS_TOKEN(state, data) {
       state.access_token = data;
@@ -19,6 +20,7 @@ export default {
       setCache('refresh_token', state.refresh_token);
     },
   },
+
   actions: {
     LoginByWxCode({ commit }, data) {
       return new Promise((resolve, reject) => {
@@ -35,6 +37,7 @@ export default {
           });
       });
     },
+
     RefreshToken({ commit }, data) {
       return new Promise((resolve, reject) => {
         refreshToken(data)

+ 0 - 1
src/store/modules/user.js

@@ -23,7 +23,6 @@ export default {
       return new Promise((resolve, reject) => {
         getUserInfo()
           .then(res => {
-            console.log('res', res);
             commit('SET_USER_INFO', res.data);
             resolve(res);
           })

+ 14 - 22
src/uni.scss

@@ -1,21 +1,8 @@
-/**
- * 这里是uni-app内置的常用样式变量
- *
- * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
- * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
- *
- */
-
-/**
- * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
- *
- * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
- */
 @import 'uview-ui/theme.scss';
 /* 颜色变量 */
 
 /* 行为相关颜色 */
-$uni-color-primary: #007aff;
+$uni-color-primary: #5992bb;
 $uni-color-success: #4cd964;
 $uni-color-warning: #f0ad4e;
 $uni-color-error: #dd524d;
@@ -29,15 +16,26 @@ $uni-text-color-disable: #c0c0c0;
 
 /* 背景颜色 */
 $uni-bg-color: #fff;
+$uni-bg-color-page: #f5f5f5;
+$uni-bg-color-primary: #5992bb;
 $uni-bg-color-grey: #f8f8f8;
 $uni-bg-color-hover: #f1f1f1; // 点击状态颜色
 $uni-bg-color-mask: rgba(0, 0, 0, 0.4); // 遮罩颜色
 
+/* 内间距 */
+$uni-bg-padding-sm: 20rpx;
+$uni-bg-padding-base: 30rpx;
+$uni-bg-padding-lg: 40rpx;
+
+/* Border Radius */
+$uni-border-radius-sm: 10rpx;
+$uni-border-radius-base: 20rpx;
+$uni-border-radius-lg: 30rpx;
+$uni-border-radius-circle: 50%;
+
 /* 边框颜色 */
 $uni-border-color: #c8c7cc;
 
-/* 尺寸变量 */
-
 /* 文字尺寸 */
 $uni-font-size-sm: 12px;
 $uni-font-size-base: 14px;
@@ -48,12 +46,6 @@ $uni-img-size-sm: 20px;
 $uni-img-size-base: 26px;
 $uni-img-size-lg: 40px;
 
-/* Border Radius */
-$uni-border-radius-sm: 2px;
-$uni-border-radius-base: 3px;
-$uni-border-radius-lg: 6px;
-$uni-border-radius-circle: 50%;
-
 /* 水平间距 */
 $uni-spacing-row-sm: 5px;
 $uni-spacing-row-base: 10px;

+ 0 - 1
src/utils/request.js

@@ -59,7 +59,6 @@ export function request(options) {
         }
       },
       fail: err => {
-        console.log('fail:err', err);
         if (err.errMsg.includes('timeout')) {
           uni.showToast({
             icon: 'none',

+ 5 - 1
src/utils/system.js

@@ -1,3 +1,8 @@
+/*
+ * @Author: yizhiyang
+ * @Date: 2023-12-02 12:12:39
+ * @Description:
+ */
 //获取系统信息
 function getSystemInfoAsync() {
   return new Promise((resolve, reject) => {
@@ -19,7 +24,6 @@ function updateVersion() {
 
   updateManager.onCheckForUpdate(function (res) {
     // 请求完新版本信息的回调
-    console.log(res.hasUpdate);
   });
 
   updateManager.onUpdateReady(function () {