liangan пре 2 недеља
родитељ
комит
c0179190d8

+ 1 - 0
env/.env

@@ -12,6 +12,7 @@ VITE_LOGIN_URL = '/pages/login/login'
 # 第一个请求地址
 VITE_SERVER_BASEURL = 'http://124.222.152.234:8101'
 # VITE_SERVER_BASEURL = 'http://124.222.152.234:8101'
+# VITE_SERVER_BASEURL = 'http://124.222.152.234:8101'
 VITE_SERVER_BASEURL_PREFIX = '/mall'
 # 是否替换第一个前缀
 VITE_SERVER_BASEURL_PREFIX_REPLACE = false

+ 1 - 0
manifest.config.ts

@@ -49,6 +49,7 @@ export default defineManifestConfig({
       alwaysShowBeforeRender: true,
       waiting: true,
       autoclose: true,
+      delay: 0,
       androidStyle: 'default',
       android: {
         hdpi: 'src/static/app/start/start-480.png',

+ 1 - 1
src/api/product.ts

@@ -6,7 +6,7 @@ const pre = import.meta.env.VITE_SERVER_BASEURL_PREFIX
  * @returns data.list[]
  */
 export function getList(data: any) {
-  return http.post<any>(`${pre}/app/combination/app/list`, data)
+  return http.get<any>(`${pre}/app/combination/app/list`, data)
 }
 /**
  * 获取商品排名列表

+ 2 - 2
src/components/product/product.vue

@@ -32,7 +32,7 @@ function handleClick() {
 
 <template>
   <view
-    class="flex flex-col items-center pb-8rpx"
+    class="flex flex-col items-center"
     :style="{ maxWidth: Number.isFinite(width) ? `${width}rpx` : width, width: Number.isFinite(width) ? `${width}rpx` : width }"
     @click="handleClick"
   >
@@ -43,7 +43,7 @@ function handleClick() {
         mode="aspectFit"
       />
     </view>
-    <view class="box-border w-full bg-white px-14rpx pt-10rpx" :style="{ fontSize: Number.isFinite(titleFontSize) ? `${titleFontSize}rpx` : titleFontSize }">
+    <view class="box-border w-full bg-white px-14rpx pb-8rpx pt-10rpx" :style="{ fontSize: Number.isFinite(titleFontSize) ? `${titleFontSize}rpx` : titleFontSize }">
       <view class="mb-3px truncate">
         {{ item.productName }}
       </view>

+ 2 - 1
src/locale/bn.json

@@ -165,7 +165,8 @@
   "search.placeholder": "অনুসন্ধান",
   "search.filterPrice": "সব দাম",
   "search.filterCategory": "সব বিভাগ",
-  "search.filterSellers": "সেরা বিক্রেতা",
+  "search.filterSellers": "গরম বিক্রয়",
+  "search.filterSellers1": "নতুন পণ্য",
   "mine.pages.share.title": "শেয়ার",
   "mine.pages.share.referrerCode": "আমার রেফারার কোড",
   "mine.pages.share.qrCode": "QR কোড",

+ 2 - 1
src/locale/en.json

@@ -112,7 +112,8 @@
   "search.placeholder": "Search",
   "search.filterPrice": "All Price",
   "search.filterCategory": "Category",
-  "search.filterSellers": "Best Sellers",
+  "search.filterSellers": "BestSellers",
+  "search.filterSellers1": "Latest",
   "app.name": "En Title",
   "income.title": "Revenue Center",
   "mine.auth.register": "Register",

+ 2 - 1
src/locale/zh-Hans.json

@@ -173,7 +173,8 @@
   "search.placeholder": "搜索",
   "search.filterPrice": "全部价格",
   "search.filterCategory": "全部分类",
-  "search.filterSellers": "热销排序",
+  "search.filterSellers": "热销",
+  "search.filterSellers1": "上新",
   "auth.login.title": "登录",
   "auth.login.username.placeholder": "手机号码 / 用户名",
   "auth.login.password.placeholder": "密码 6-20位字符",

+ 1 - 1
src/pages/forgotPassword/forgotPassword.vue

@@ -216,7 +216,7 @@ onUnmounted(() => {
       <view class="pb-40rpx pt-134rpx text-center">
         <view class="mb-20rpx flex flex-col items-center justify-center">
           <image src="/static/login-logo.png" class="mb-18rpx h-56rpx w-350.48rpx" />
-          <view>More group purchases, bigger rewards</view>
+          <view>{{ $t('login.slogan') }}</view>
         </view>
       </view>
     </view>

+ 16 - 12
src/pages/index/index.vue

@@ -85,13 +85,13 @@ const navIcons = ref([
 const newProducts = ref<any>([])
 
 async function getNewList() {
-  const res = await getList({ page: 1, size: 20 })
+  const res = await getList({ page: 1, size: 20, sort: 'CREATE_DESC' })
   console.log(res)
   newProducts.value = res.data.list
 }
 
 //  商品列表
-const priceTab = ref<number>(0)
+const priceTab = ref<number>(300)
 
 // 300Spot    500Spot    1000Spot    2000Spot
 const priceTabList = ref([
@@ -130,15 +130,17 @@ const priceTabList = ref([
 const dataList = ref<any>([])
 async function queryList(pageNo: number, pageSize: number) {
   // 获取当前选中tab的价格范围,默认为第一个tab (0-300)
-  const currentTab = priceTabList.value[priceTab.value] || priceTabList.value[0]
-  const minPrice = currentTab?.minPrice ?? 0
-  const maxPrice = currentTab?.maxPrice ?? 300
+  // const currentTab = priceTabList.value[priceTab.value] || priceTabList.value[0]
+  // const minPrice = currentTab?.minPrice ?? 0
+  // const maxPrice = currentTab?.maxPrice ?? 300
 
   const params = {
     page: pageNo,
     size: pageSize,
-    minPrice,
-    maxPrice,
+    sort: 'SALES_DESC',
+    price: priceTab.value,
+    // minPrice,
+    // maxPrice,
   }
   const res = await getList(params)
   paging.value.complete(res.data.list)
@@ -241,10 +243,10 @@ onShow(() => {
       <view class="productList">
         <wd-tabs v-model="priceTab" slidable="always" :line-width="0" :line-height="0" @change="onPriceTabChange">
           <template v-for="item in priceTabList" :key="item">
-            <wd-tab :title="$t(item.title)" />
+            <wd-tab :title="$t(item.title)" :name="item.value" />
           </template>
         </wd-tabs>
-        <view class="grid grid-cols-2 gap-22rpx">
+        <view class="grid grid-cols-2 gap-20rpx">
           <Product
             v-for="(item, index) in dataList"
             :key="index"
@@ -263,11 +265,13 @@ onShow(() => {
 :deep(.productList) {
   .wd-tabs {
     background: none;
-    .wd-tabs__nav-item {
-      padding-left: 0 !important;
-    }
     .wd-tabs__nav {
       background: none;
+      height: 72rpx;
+    }
+    .wd-tabs__nav-item {
+      padding-left: 0 !important;
+      height: 72rpx;
     }
   }
 }

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

@@ -103,7 +103,7 @@ onLoad((options) => {
       <view class="pb-40rpx pt-134rpx text-center">
         <view class="mb-20rpx flex flex-col items-center justify-center">
           <image src="/static/login-logo.png" class="mb-18rpx h-56rpx w-350.48rpx" />
-          <view>More group purchases, bigger rewards</view>
+          <view>{{ $t('login.slogan') }}</view>
         </view>
       </view>
     </view>

+ 1 - 1
src/pages/mine/myFavorite.vue

@@ -46,7 +46,7 @@ async function queryList(pageNo: number, pageSize: number) {
   <z-paging ref="paging" v-model="dataList" use-page-scroll @query="queryList">
     <template v-if="dataList.length">
       <view class="px-24rpx py-24rpx">
-        <view class="grid grid-cols-2 gap-22rpx">
+        <view class="grid grid-cols-2 gap-20rpx">
           <Product v-for="(item, index) in dataList" :key="index" width="100%" :height="340" :item="item" @item-click="toPage('/pages/productDetail/productDetail', { productId: item.productId })" />
         </view>
       </view>

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

@@ -198,7 +198,7 @@ onUnmounted(() => {
       <view class="pb-40rpx pt-134rpx text-center">
         <view class="mb-20rpx flex flex-col items-center justify-center">
           <image src="/static/login-logo.png" class="mb-18rpx h-56rpx w-350.48rpx" />
-          <view>More group purchases, bigger rewards</view>
+          <view>{{ $t('login.slogan') }}</view>
         </view>
       </view>
     </view>

+ 20 - 18
src/pages/search/search.vue

@@ -31,9 +31,9 @@ useZPaging(paging)
 // 搜索关键词
 const formData = ref<any>({
   storeName: '',
-  prices: 0,
+  price: 0,
   cateId: 0,
-  sortWay: 0, // 3=销量升序,4=销量降序
+  sort: 'SALES_DESC',
 })
 
 const { closeOutside } = useQueue()
@@ -75,6 +75,11 @@ const option1 = ref<Record<string, any>[]>([
 const option2 = ref<Record<string, any>[]>([
   { label: t('search.filterCategory'), value: 0 },
 ])
+
+const option3 = ref<Record<string, any>[]>([
+  { label: t('search.filterSellers'), value: 'SALES_DESC' },
+  { label: t('search.filterSellers1'), value: 'CREATE_DESC' },
+])
 async function getCategoryList() {
   const res = await categoryList({ page: 1, size: 20 })
   console.log(res)
@@ -85,18 +90,19 @@ async function getCategoryList() {
 const dataList = ref([])
 async function queryList(pageNo: number, pageSize: number) {
   try {
-    const currentTab = option1.value.find((i: any) => i.value === formData.value.prices) || option1.value[0]
-    console.log(currentTab)
-    const minPrice = currentTab?.minPrice ?? undefined
-    const maxPrice = currentTab?.maxPrice ?? undefined
+    // const currentTab = option1.value.find((i: any) => i.value === formData.value.price) || option1.value[0]
+    // console.log(currentTab)
+    // const minPrice = currentTab?.minPrice ?? undefined
+    // const maxPrice = currentTab?.maxPrice ?? undefined
     const params = {
       page: pageNo,
       size: pageSize,
+      price: formData.value.price || undefined,
+      sort: formData.value.sort,
       storeName: formData.value.storeName,
       cateId: formData.value.cateId ? formData.value.cateId : undefined,
-      sortWay: formData.value.sortWay === 1 ? 3 : formData.value.sortWay === -1 ? 4 : 0,
-      minPrice,
-      maxPrice,
+      // minPrice,
+      // maxPrice,
     }
     const res = await getList(params)
     paging.value.complete(res.data.list)
@@ -127,21 +133,17 @@ onLoad(() => {
             </view>
           </template>
         </wd-navbar>
-        <view class="flex bg-white text-center">
-          <wd-drop-menu class="flex-1">
-            <wd-drop-menu-item v-model="formData.prices" :options="option1" @change="queryList(1, 20)" />
-          </wd-drop-menu>
-          <wd-drop-menu class="flex-1">
+        <view class="bg-white text-center">
+          <wd-drop-menu>
+            <wd-drop-menu-item v-model="formData.price" :options="option1" @change="queryList(1, 20)" />
             <wd-drop-menu-item v-model="formData.cateId" :options="option2" @change="queryList(1, 20)" />
+            <wd-drop-menu-item v-model="formData.sort" :options="option3" @change="queryList(1, 20)" />
           </wd-drop-menu>
-          <view class="flex-1">
-            <wd-sort-button v-model="formData.sortWay" :title="t('search.filterSellers')" @change="queryList(1, 20)" />
-          </view>
         </view>
       </view>
     </template>
     <view class="mt-24rpx px-24rpx pb-24rpx">
-      <view class="grid grid-cols-2 gap-22rpx">
+      <view class="grid grid-cols-2 gap-20rpx">
         <Product v-for="(item, index) in dataList" :key="index" width="100%" :height="340" :item="item" />
       </view>
     </view>

+ 7 - 7
src/pages/topChampions/topChampions.vue

@@ -106,8 +106,8 @@ async function queryList(pageNo: number, pageSize: number) {
           </view>
         </view>
         <view class="w-30% flex flex-col items-center justify-center text-center font-bold">
-          <wd-img width="80rpx" height="80rpx" round :src="item.headPic" />
-          <view class="mb-3px text-28rpx">
+          <wd-img width="80rpx" height="80rpx" custom-class="mb-3px" round :src="item.headPic" />
+          <view class="mb-3px text-24rpx">
             {{ item.name }}
           </view>
           <view class="text-24rpx">
@@ -120,7 +120,7 @@ async function queryList(pageNo: number, pageSize: number) {
             <view class="mb-3px text-22rpx text-#5B5B5B">
               {{ $t('topChampions.invitedFriends') }}
             </view>
-            <view class="text-26rpx font-bold">
+            <view class="text-24rpx font-bold">
               {{ formatNumber(item.inviteNum, 0) }}
             </view>
           </view>
@@ -128,15 +128,15 @@ async function queryList(pageNo: number, pageSize: number) {
             <view class="mb-3px text-22rpx text-#5B5B5B">
               {{ $t('topChampions.l7dEarnings') }}
             </view>
-            <view class="text-26rpx text-[var(--wot-color-theme)] font-bold">
-              {{ formatNumber(item.L7DEarnings) }}
+            <view class="text-24rpx text-[var(--wot-color-theme)] font-bold">
+              {{ formatNumber(item.l7DEarnings) }}
             </view>
           </view>
           <view class="flex flex-col items-center">
             <view class="mb-3px text-22rpx text-#5B5B5B">
               {{ $t('topChampions.teamMembers') }}
             </view>
-            <view class="text-26rpx font-bold">
+            <view class="text-24rpx font-bold">
               {{ formatNumber(item.teamNum, 0) }}
             </view>
           </view>
@@ -144,7 +144,7 @@ async function queryList(pageNo: number, pageSize: number) {
             <view class="mb-3px text-22rpx text-#5B5B5B">
               {{ $t('topChampions.joinedGroups') }}
             </view>
-            <view class="text-26rpx font-bold">
+            <view class="text-24rpx font-bold">
               {{ formatNumber(item.groupNum, 0) }}
             </view>
           </view>