Explorar o código

本地生活修改、商品分类修改、购物车修改

chengjunhui hai 6 días
pai
achega
9659e3bd33

+ 1 - 1
components/RegionSelection/RegionSelection.vue

@@ -168,7 +168,7 @@ const areaConfirm = (e) => {
 };
 
 const open = () => {
-  initColumns();
+  // initColumns();
   pickerRef.value?.open?.();
 };
 

+ 2 - 2
pages/nearbyShop/list.vue

@@ -153,8 +153,8 @@ const getLoca = async () => {
     type: "gcj02",
     geocode: true,
     success: (res) => {
-      param.longitude = res.longitude;
-      param.latitude = res.latitude;
+      // param.longitude = res.longitude;
+      // param.latitude = res.latitude;
     },
     fail: () => {},
   });

+ 29 - 29
pages/set/index.vue

@@ -28,7 +28,7 @@
       <text class="iconfont icon-right1">&#xe671;</text>
     </view>
 
-    <view
+    <!-- <view
       class="operation-item"
       key="versionUpdate"
       @click.stop="handleOperation({ type: 'versionUpdate' })"
@@ -42,7 +42,7 @@
         <text v-if="appInfo.appUpdate" style="color: #08be5d">有新版本</text>
         <text class="iconfont icon-right1">&#xe671;</text>
       </view>
-    </view>
+    </view> -->
   </view>
   <!-- <uv-gap height="12" bgColor="#F7F7F7" v-if="!weiXinShow"></uv-gap>
   <view class="body-operation" v-if="!weiXinShow">
@@ -89,41 +89,41 @@ const weiXinShow = ref(false);
 const userDetails = ref({});
 const appInfo = ref({}); // app信息
 const operationList = [
-  {
-    label: "更换手机号",
-    needToken: true,
-    type: "updatePhone",
-  },
-  {
-    label: "设置支付密码",
-    needToken: true,
-    type: "setPayPassword",
-  },
+  // {
+  //   label: "更换手机号",
+  //   needToken: true,
+  //   type: "updatePhone",
+  // },
+  // {
+  //   label: "设置支付密码",
+  //   needToken: true,
+  //   type: "setPayPassword",
+  // },
   {
     label: "关于我们",
     needToken: false,
     type: "aboutUs",
   },
-  {
-    label: "注销账户",
-    needToken: true,
-    type: "logOut",
-  },
+  // {
+  //   label: "注销账户",
+  //   needToken: true,
+  //   type: "logOut",
+  // },
 ];
 
 const bindList = ref([
-  {
-    label: "微信",
-    needToken: true,
-    type: "wxBind",
-    bindShow: false,
-  },
-  {
-    label: "支付宝",
-    needToken: true,
-    type: "zfbBind",
-    bindShow: false,
-  },
+  // {
+  //   label: "微信",
+  //   needToken: true,
+  //   type: "wxBind",
+  //   bindShow: false,
+  // },
+  // {
+  //   label: "支付宝",
+  //   needToken: true,
+  //   type: "zfbBind",
+  //   bindShow: false,
+  // },
 ]);
 
 const setAppInfo = (data) => {

+ 2 - 2
pages/shop/goodsList.vue

@@ -69,7 +69,7 @@
 </template>
 
 <script setup>
-import { productList } from "@/api/shop.js"
+import { shopProductPage_Api } from "@/api/shop.js"
 import ldLoading from '@/components/ld-Loading/ld-loading.vue'
 import { ref, getCurrentInstance } from 'vue'
 import { onShow, onLoad, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
@@ -155,7 +155,7 @@ const screening = (e) => {
 const getList = () => {
   status.value = 'loading';
   loading.value = true;
-  productList(params.value).then(res => {
+  shopProductPage_Api(params.value).then(res => {
     if (params.value.pageNum == 1) {
       list.value = res.rows
       if (res.rows.length > 0) {

+ 8 - 7
pages/tabtar/city.vue

@@ -1,6 +1,6 @@
 <template>
   <view class="container">
-    <uv-sticky>
+    <uv-sticky :top="0" :customNavHeight="0">
       <uv-navbar
         title="本地生活"
         leftIconSize="0"
@@ -8,6 +8,7 @@
         bgColor="#fbcd17"
         titleStyle="font-weight: 700;color: #1A1A1A;"
         placeholder
+        :fixed="false"
       ></uv-navbar>
       <view class="search-top">
         <view class="city-text" @click="regionSelectionRef.open()">
@@ -202,13 +203,13 @@ onLoad(() => {
     console.log("当前位置", res);
     param.longitude = res.longitude;
     param.latitude = res.latitude;
-    initData({
-      latitude: res.latitude,
-      longitude: res.longitude,
-    });
+    // initData({
+    //   latitude: res.latitude,
+    //   longitude: res.longitude,
+    // });
   });
   skeletonShow.value = false;
-  // initData();
+  initData();
 });
 
 onPullDownRefresh(() => {
@@ -226,7 +227,7 @@ onPullDownRefresh(() => {
     // display: flex;
     // justify-content: space-between;
     // align-items: center;
-    padding: 10rpx 30rpx 26rpx 30rpx;
+    padding: 0 30rpx 26rpx 30rpx;
     background-color: #fbcd17;
     // z-index: 3;
     box-sizing: border-box;

+ 1 - 1
pages/tabtar/components/CartGuessYouLike.vue

@@ -5,7 +5,7 @@
     :style="{
       padding: RowsList && RowsList.length
         ? '0 30rpx 150rpx 30rpx'
-        : '100rpx 30rpx 0 30rpx',
+        : '20rpx 30rpx 0 30rpx',
     }"
   >
     <view class="guess-top">

+ 95 - 68
pages/tabtar/goodsType.vue

@@ -1,84 +1,49 @@
 <template>
   <view class="goodsType">
-    <uv-navbar
-      title="商品分类"
-      placeholder
-      leftIcon=""
-      bgColor="rgba(0,0,0,0)"
-    ></uv-navbar>
-    <view
-      class="topsearch u-p30 u-flex-center-sb"
-      style="paddingtop: 20rpx"
-      @click="goSearch()"
-    >
-      <view class="u-flex1 u-flex-center leftbox">
-        <text class="iconfont u-font30 u-666 u-ml30">&#xe618;</text>
-        <text class="u-font22 u-CCC u-ml20">请输入搜索关键字</text>
-        <text class="search-btn">搜索</text>
+    <view class="goodsHeader">
+      <view :style="{ height: `${statusBarHeight}px` }"></view>
+      <view class="classification-title" :style="[
+        { height: `${menuButtonHeight}px`, lineHeight: `${menuButtonHeight}px` },
+      ]">
+        <text class="title-txt">商品分类</text>
+      </view>
+      <view class="topsearch u-p30 u-flex-center-sb" @click="goSearch()">
+        <view class="u-flex1 u-flex-center leftbox">
+          <text class="iconfont u-font30 u-666 u-ml30">&#xe618;</text>
+          <text class="u-font22 u-CCC u-ml20">请输入搜索关键字</text>
+          <text class="search-btn">搜索</text>
+        </view>
       </view>
-      <!-- <text class="u-font28 u-1A1A1A u-ml30">搜索</text> -->
     </view>
-    <!-- <view
-      class=""
-      style="height: 13rpx; background-color: rgba(230, 230, 230, 0.4)"
-    ></view> -->
+
     <view class="goodsBox">
       <scroll-view scroll-y="true" class="goodsBox_lScroll">
         <view class="goodsBox_l">
-          <view
-            v-for="(v, i) in firstList"
-            :key="i"
-            :class="activeFirst.categoryId === v.categoryId ? 'active' : ''"
-            @click="clickFirst(v)"
-            >{{ v.categoryName }}</view
-          >
+          <view v-for="(v, i) in firstList" :key="i" :class="activeFirst.categoryId === v.categoryId ? 'active' : ''"
+            @click="clickFirst(v)">{{ v.categoryName }}</view>
         </view>
       </scroll-view>
       <view class="goodsBox_r">
         <scroll-view scroll-x="true" class="goodsBox_r_t">
           <view class="goodsBox_r_t_box">
-            <view
-              class="goodsBox_r_t_item"
-              v-for="(v, i) in secondList"
-              :key="'a' + i"
-              :class="activeSecond.categoryId === v.categoryId ? 'active' : ''"
-              @click="clickSecond(v)"
-              >{{ v.categoryName }}</view
-            >
+            <view class="goodsBox_r_t_item" v-for="(v, i) in secondList" :key="'a' + i"
+              :class="activeSecond.categoryId === v.categoryId ? 'active' : ''" @click="clickSecond(v)">{{
+                v.categoryName }}</view>
           </view>
         </scroll-view>
-        <scroll-view
-          scroll-y="true"
-          class="listScroll"
-          @scrolltolower="loadMore"
-        >
+        <scroll-view scroll-y="true" class="listScroll" @scrolltolower="loadMore">
           <view class="list">
-            <view
-              class="item"
-              v-for="(v, i) in list"
-              :key="i"
-              @click="goDetails(v)"
-            >
+            <view class="item" v-for="(v, i) in list" :key="i" @click="goDetails(v)">
               <image :src="v.coverImage" mode=""></image>
               <view class="item_r">
                 <view class="item_r_title">{{ v.title }}</view>
                 <view class="item_r_price">
-                  <text
-                    v-if="v.productPaymentMode == 1"
-                    style="font-size: 28rpx"
-                    >{{ v.minPoints }}积分</text
-                  >
-                  <rich-text
-                    v-else
-                    :nodes="$mUtil.priceBigSmall(v.salePrice || v.minSalePrice)"
-                  ></rich-text>
+                  <text v-if="v.productPaymentMode == 1" style="font-size: 28rpx">{{ v.minPoints }}积分</text>
+                  <rich-text v-else :nodes="$mUtil.priceBigSmall(v.salePrice || v.minSalePrice)"></rich-text>
                 </view>
               </view>
             </view>
-            <noData
-              v-if="list.length <= 0"
-              :config="{ top: 20, content: '暂无商品~' }"
-            ></noData>
+            <noData v-if="list.length <= 0" :config="{ top: 20, content: '暂无商品~' }"></noData>
             <uv-load-more v-else :status="status" />
           </view>
         </scroll-view>
@@ -90,10 +55,9 @@
 <script setup>
 import { merchantCategoryTree_Api, shopProductPage_Api } from "@/api/shop.js";
 import { ref, getCurrentInstance } from "vue";
-const { proxy } = getCurrentInstance();
 import { onShow, onLoad } from "@dcloudio/uni-app";
 const status = ref("nomore"); //loadmore - 加载前,loading - 加载中,nomore - 没有数据
-const tabTop = ref(0);
+
 const firstList = ref([]);
 const secondList = ref([]);
 const activeFirst = ref({});
@@ -104,12 +68,24 @@ const params = ref({
   pageNum: 1,
   productCategoryId: undefined,
 });
+const statusBarHeight = ref(0);
+const menuButtonHeight = ref(44);
+
 onLoad((options) => {
   uni.getSystemInfo({
     success: (res) => {
-      tabTop.value = res.statusBarHeight + 44;
+      statusBarHeight.value = res.statusBarHeight;
+      // console.log("statusBarHeight==>", res.statusBarHeight);
     },
   });
+  // #ifdef APP-PLUS
+  try {
+    let menuButtonInfo = uni.getMenuButtonBoundingClientRect()
+    // console.log("menuButtonInfo", menuButtonInfo);
+    menuButtonHeight.value = menuButtonInfo.height + 10;
+  } catch (error) {
+  }
+  // #endif
   getTypeList();
 });
 const goBack = () => {
@@ -185,9 +161,32 @@ const goSearch = () => {
 </script>
 
 <style lang='scss' scoped>
+page {
+  height: 100vh;
+  overflow: hidden;
+}
+
 .goodsType {
   background: linear-gradient(180deg, #fffaec, #ffffff 36%);
+  height: 100vh;
+  overflow: hidden;
+  display: flex;
+  flex-direction: column;
 }
+
+.goodsHeader {
+  flex-shrink: 0;
+}
+
+.classification-title {
+  font-size: 36rpx;
+  font-family: PingFang SC, PingFang SC-Bold;
+  font-weight: 700;
+  text-align: center;
+  color: #1a1a1a;
+  box-sizing: border-box;
+}
+
 .leftbox {
   height: 80rpx;
   line-height: 80rpx;
@@ -196,6 +195,7 @@ const goSearch = () => {
   border-radius: 35rpx;
   padding: 5rpx;
   box-sizing: border-box;
+
   .search-btn {
     margin-left: auto;
     width: 124rpx;
@@ -207,15 +207,22 @@ const goSearch = () => {
     color: #1a1a1a;
   }
 }
+
 .goodsBox {
   // background-color: rgba(230, 230, 230, 0.4);
   display: flex;
+  flex: 1;
+  min-height: 0;
+
   .goodsBox_lScroll {
+    width: 176rpx;
     background-color: #f4f4f4;
-    height: calc(100vh - 150rpx - v-bind(tabTop) * 1rpx);
+    height: 100%;
+    flex-shrink: 0;
   }
+
   .goodsBox_l {
-    > view {
+    >view {
       width: 176rpx;
       height: 100rpx;
       text-align: center;
@@ -227,13 +234,15 @@ const goSearch = () => {
       text-overflow: ellipsis;
       font-size: 24rpx;
     }
-    > .active {
+
+    >.active {
       position: relative;
       background-color: #fff;
       color: #fa6137;
       font-size: 24rpx;
       font-weight: bold;
       border-radius: 0rpx 20rpx 20rpx 0rpx;
+
       &::after {
         width: 8rpx;
         height: 40rpx;
@@ -247,23 +256,34 @@ const goSearch = () => {
       }
     }
   }
+
   .goodsBox_r {
     // background: #fff;
     width: 570rpx;
     padding: 0 30rpx;
+    box-sizing: border-box;
+    display: flex;
+    flex-direction: column;
+    flex: 1;
+    min-height: 0;
+
     .goodsBox_r_t {
       width: 510rpx;
       height: 90rpx;
       line-height: 90rpx;
       border-bottom: 1px solid #e7e7e7;
+      flex-shrink: 0;
+
       .goodsBox_r_t_box {
         display: flex;
         flex-wrap: nowrap;
+
         .active {
           color: #fa6138;
           font-weight: bold;
         }
       }
+
       .goodsBox_r_t_item {
         margin-right: 45rpx;
         display: inline-block;
@@ -273,11 +293,13 @@ const goSearch = () => {
     }
   }
 }
+
 .list {
   .item {
     display: flex;
     justify-content: space-between;
     margin-top: 30rpx;
+
     image {
       width: 160rpx;
       height: 160rpx;
@@ -285,6 +307,7 @@ const goSearch = () => {
       overflow: hidden;
       flex-shrink: 0;
     }
+
     .item_r {
       padding-bottom: 25rpx;
       border-bottom: 1px solid #e7e7e7;
@@ -293,6 +316,7 @@ const goSearch = () => {
       flex-direction: column;
       align-items: flex-start;
       flex: 1;
+
       .item_r_title {
         overflow: hidden;
         text-overflow: ellipsis;
@@ -301,9 +325,10 @@ const goSearch = () => {
         -webkit-box-orient: vertical;
         word-wrap: break-word;
         word-break: break-all;
-        white-space: normal !important ;
+        white-space: normal !important;
         font-size: 28rpx;
       }
+
       .item_r_price {
         font-size: 32rpx;
         color: #ff6600;
@@ -315,7 +340,9 @@ const goSearch = () => {
     }
   }
 }
+
 .listScroll {
-  height: calc(100vh - 220rpx - v-bind(tabTop) * 1rpx);
+  flex: 1;
+  min-height: 0;
 }
-</style>
+</style>

+ 8 - 4
pages/tabtar/home.vue

@@ -178,12 +178,16 @@ const monthlyBestSellerRef = ref(null);
 
 // 响应式数据
 const statusBarHeight = ref(uni.getSystemInfoSync().statusBarHeight);
-const menuButtonHeight = ref(0);
+const menuButtonHeight = ref(44);
+// #ifdef APP-PLUS
 try {
-  menuButtonHeight.value = uni.getSystemInfoSync().menuButtonHeight + 10;
+  let menuButtonInfo = uni.getMenuButtonBoundingClientRect()
+    // console.log("menuButtonInfo", menuButtonInfo);
+  menuButtonHeight.value = menuButtonInfo.height + 10;
 } catch (error) {
   console.log(error);
 }
+// #endif
 const showTopSearch = ref(true);
 const shopBanner = ref([]); //轮播图
 const goodsList = ref([]); //猜你喜欢
@@ -238,7 +242,7 @@ const goToMsg = () => {
 
 const searchClick = () => {
   uni.navigateTo({
-    url: "/pages/research/homepage/search",
+    url: "/pages/shop/goodSearch",
   });
 };
 
@@ -620,7 +624,7 @@ onShareAppMessage((res) => {
     top: 0;
     z-index: 100;
     width: 100%;
-    padding: 23rpx 30rpx 30rpx;
+    padding: 0rpx 30rpx 30rpx;
     box-sizing: border-box;
 
     .text {

+ 36 - 16
pages/tabtar/personalCenter.vue

@@ -36,7 +36,7 @@
             <view class="pc-user-phone u-flex-center" v-if="userInformation.id">
               <image
                 class="pc-user-phone-icon"
-                :src="handleImageUrl('/personalCenter/icon_phone.png')"
+                src="/static/image/personalCenter/icon_phone.png"
                 mode="aspectFill"
               />
               <text class="pc-user-phone-text">{{
@@ -50,28 +50,40 @@
             class="pc-nav-icon"
             @tap.stop="goJump('/pages/user/myMsg', true)"
           >
-            <uv-icon name="chat" color="#1a1a1a" size="40rpx"></uv-icon>
+            <uv-icon name="chat" color="#1a1a1a" size="44rpx"></uv-icon>
             <view class="pc-nav-badge" v-if="myMsgText">{{ myMsgText }}</view>
           </view>
           <view
             class="pc-nav-icon"
             @tap.stop="goJump('/pages/set/index', true)"
           >
-            <uv-icon name="setting" color="#1a1a1a" size="40rpx"></uv-icon>
+            <uv-icon name="setting" color="#1a1a1a" size="44rpx"></uv-icon>
           </view>
-          <uv-icon name="arrow-right" color="#1a1a1a" size="40rpx"></uv-icon>
+          <!-- <uv-icon name="arrow-right" color="#1a1a1a" size="44rpx"></uv-icon> -->
         </view>
       </view>
 
       <view class="pc-assets u-flex-center-sb">
-        <view class="pc-assets-card" @tap.stop="goMypoints">
-          <view class="pc-assets-value">{{ integralAble || 0 }}</view>
+        <view
+          class="pc-assets-card"
+          style="
+            background-image: url('/static/image/personalCenter/icon_points.png');
+          "
+          @tap.stop="goMypoints"
+        >
+          <view class="pc-assets-value">{{ integralAble || 0 }} <text class="unit">积分</text></view>
           <view class="pc-assets-label">我的积分</view>
         </view>
-        <view class="pc-assets-card" @tap.stop="goToMyWallet">
+        <view
+          class="pc-assets-card"
+          style="
+            background-image: url('/static/image/personalCenter/icon_amount.png');
+          "
+          @tap.stop="goToMyWallet"
+        >
           <view class="pc-assets-value">{{
             $addDecimals(userInformation.balance || 0, 2)
-          }}</view>
+          }} <text class="unit">元</text></view>
           <view class="pc-assets-label">我的钱包</view>
         </view>
       </view>
@@ -385,7 +397,7 @@ onPullDownRefresh(() => {
 .pc {
   min-height: 100vh;
   // background-color: #f7f7f7;
-  background: linear-gradient(0deg,#f4f4f4 55%, #ffb700) no-repeat;
+  background: linear-gradient(0deg, #f4f4f4 55%, #ffb700) no-repeat;
 }
 
 .pc-header {
@@ -406,6 +418,7 @@ onPullDownRefresh(() => {
   display: flex;
   align-items: center;
   justify-content: center;
+  margin-right: 20rpx;
 }
 
 .pc-nav-badge {
@@ -483,15 +496,18 @@ onPullDownRefresh(() => {
 }
 
 .pc-assets-card {
-  flex: 1;
-  height: 150rpx;
-  background: rgba(255, 255, 255, 0.88);
-  border-radius: 16rpx;
+  width: 329rpx;
+  min-height: 176rpx;
+  // background: rgba(255, 255, 255, 0.88);
+  border-radius: 10rpx;
   padding: 24rpx 26rpx;
   box-sizing: border-box;
   display: flex;
   flex-direction: column;
-  justify-content: center;
+  // justify-content: center;
+  background-size: 100% 100%;
+  // background-position: center;
+  background-repeat: no-repeat;
 }
 
 .pc-assets-card + .pc-assets-card {
@@ -499,10 +515,14 @@ onPullDownRefresh(() => {
 }
 
 .pc-assets-value {
-  font-size: 44rpx;
-  font-weight: 900;
+  font-size: 43rpx;
+  font-weight: 700;
   color: #ff6a00;
   line-height: 1.1;
+  .unit{
+    font-size: 26rpx;
+    font-weight: 400;
+  }
 }
 
 .pc-assets-label {

static/image/personalCenter/组 69799.png → static/image/personalCenter/icon_amount.png


static/image/personalCenter/组 69798.png → static/image/personalCenter/icon_points.png