Browse Source

feat: update

叶静 2 tuần trước cách đây
mục cha
commit
ea58d10229

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

@@ -69,7 +69,7 @@ function handleClick() {
       }"
     >
       <view class="mb-3px truncate">
-        {{ item.productName }}
+        {{ item.productName || item.storeName }}
       </view>
       <view class="flex items-center justify-between">
         <view class="text-#FF334A font-bold" :style="{ fontSize: Number.isFinite(titleFontSize) ? `${titleFontSize}rpx` : titleFontSize }">

+ 8 - 2
src/locale/bn.json

@@ -284,8 +284,10 @@
   "notifications.order.shipped.content": "আপনার অংশগ্রহণ করা গ্রুপ অর্ডার [{orderId}] সফলভাবে শিপ হয়েছে",
   "notifications.reward.referFriends.title": "বন্ধু রেফার পুরস্কার",
   "notifications.reward.referFriends.content": "আপনি বন্ধু রেফারের জন্য পুরস্কার পেয়েছেন",
-  "notifications.reward.groupBuy.title": "গ্রুপ বাই পুরস্কার",
+  "notifications.reward.groupBuy.title": "গ্রুপ বাই যোগ দিন পুরস্কার",
   "notifications.reward.groupBuy.content": "আপনি একটি পুরস্কার পেয়েছেন, অর্ডার আইডি [{orderId}]",
+  "notifications.reward.openGroupBuy.title": "গ্রুপ বাই খোলা পুরস্কার",
+  "notifications.reward.openGroupBuy.content": "আপনি একটি পুরস্কার পেয়েছেন, অর্ডার আইডি [{orderId}]",
   "notifications.reward.directReferral.title": "সরাসরি রেফারেল পুরস্কার",
   "notifications.reward.directReferral.content": "আপনি সরাসরি রেফারেলের জন্য পুরস্কার পেয়েছেন",
   "notifications.reward.checkin.title": "চেক-ইন পুরস্কার",
@@ -407,5 +409,9 @@
   "wallet.record.type.L7D": "L7D",
   "wallet.record.type.MTD": "MTD",
   "wallet.record.type.YTD": "YTD",
-  "login.slogan": "আরও বেশি গ্রুপ ক্রয়, আরও বেশি পুরস্কার"
+  "login.slogan": "আরও বেশি গ্রুপ ক্রয়, আরও বেশি পুরস্কার",
+  "orderDetail": {
+    "walletBalanceText": "ব্যালেন্স",
+    "paymentMethod": "পেমেন্ট"
+  }
 }

+ 8 - 2
src/locale/en.json

@@ -285,8 +285,10 @@
   "notifications.order.shipped.content": "The group order you participated in [{orderId}] has been successfully shipped",
   "notifications.reward.referFriends.title": "Refer Friends Reward",
   "notifications.reward.referFriends.content": "You have received the reward for refer friends",
-  "notifications.reward.groupBuy.title": "Group Buying Reward",
+  "notifications.reward.groupBuy.title": "Join Group Buy Reward",
   "notifications.reward.groupBuy.content": "You have received a reward, order ID [{orderId}]",
+  "notifications.reward.openGroupBuy.title": "Open Group Buy Reward",
+  "notifications.reward.openGroupBuy.content": "You have received a reward, order ID [{orderId}]",
   "notifications.reward.directReferral.title": "Direct Referral Reward",
   "notifications.reward.directReferral.content": "You have received the reward for Direct Referral",
   "notifications.reward.checkin.title": "Check-in Reward",
@@ -408,5 +410,9 @@
   "wallet.record.type.L7D": "L7D",
   "wallet.record.type.MTD": "MTD",
   "wallet.record.type.YTD": "YTD",
-  "login.slogan": "More group purchases, bigger rewards"
+  "login.slogan": "More group purchases, bigger rewards",
+  "orderDetail": {
+    "walletBalanceText": "Balance",
+    "paymentMethod": "Payment"
+  }
 }

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

@@ -284,8 +284,10 @@
   "notifications.order.shipped.content": "您参与的团购订单[{orderId}]已成功发货",
   "notifications.reward.referFriends.title": "推荐好友奖励",
   "notifications.reward.referFriends.content": "您已获得推荐好友奖励",
-  "notifications.reward.groupBuy.title": "团奖励",
+  "notifications.reward.groupBuy.title": "团奖励",
   "notifications.reward.groupBuy.content": "您已获得奖励,订单号[{orderId}]",
+  "notifications.reward.openGroupBuy.title": "开团奖励",
+  "notifications.reward.openGroupBuy.content": "您已获得开团奖励,订单号[{orderId}]",
   "notifications.reward.directReferral.title": "直接推荐奖励",
   "notifications.reward.directReferral.content": "您已获得直接推荐奖励",
   "notifications.reward.checkin.title": "签到奖励",

+ 20 - 15
src/pages/index/index.vue

@@ -160,17 +160,8 @@ async function getBannerList() {
 const unread = ref(0)
 const isPageLoading = ref(true) // 页面加载状态
 
-async function getUnread() {
-  try {
-    const res = await noticeUnread()
-    if (res.code === '200') {
-      unread.value = Number(res.data) || 0
-    }
-  }
-  catch {}
-}
-
-onShow(async () => {
+// 创建一个通用方法来处理所有初始数据加载
+async function loadData() {
   try {
     isPageLoading.value = true
     await Promise.all([
@@ -182,11 +173,25 @@ onShow(async () => {
   finally {
     isPageLoading.value = false
   }
+}
+
+async function getUnread() {
+  try {
+    const res = await noticeUnread()
+    if (res.code === '200') {
+      unread.value = Number(res.data) || 0
+    }
+  }
+  catch {}
+}
+
+onLoad(async () => {
+  await loadData()
 })
 </script>
 
 <template>
-  <z-paging ref="paging" v-model="dataList" use-page-scroll @query="queryList">
+  <z-paging ref="paging" v-model="dataList" use-page-scroll @query="queryList" @on-refresh="loadData">
     <template #top>
       <view
         class="flex items-center justify-between bg-white pb-40rpx pl-42rpx pr-34rpx pt-26rpx"
@@ -197,14 +202,14 @@ onShow(async () => {
           <wd-badge :model-value="0">
             <image
               src="/static/icons/search.png"
-              class="mr-20rpx h-36rpx w-36rpx"
+              class="mr-20rpx h-40rpx w-40rpx"
               @click="toPage('/pages/search/search')"
             />
           </wd-badge>
           <wd-badge :model-value="unread" :max="99">
             <image
               src="/static/icons/notifications.png"
-              class="h-36rpx w-36rpx"
+              class="h-40rpx w-40rpx"
               @click="toPage('/pages/notifications/notifications')"
             />
           </wd-badge>
@@ -323,7 +328,7 @@ onShow(async () => {
             {{ $t('home.news') }}
           </view>
           <scroll-view scroll-x class="whitespace-nowrap">
-            <view class="flex items-center gap-16rpx pb-20rpx" style="min-width: max-content;">
+            <view class="flex items-center gap-16rpx" style="min-width: max-content;">
               <Product
                 v-for="(item, index) in newProducts"
                 :key="index"

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

@@ -56,7 +56,7 @@ async function queryList(pageNo: number, pageSize: number) {
 
 <style>
 page {
-  background: #fff;
+  background: #f8f8f8;
 }
 </style>
 

+ 1 - 1
src/pages/myOrders/orderDetail.vue

@@ -575,7 +575,7 @@ onUnmounted(() => {
     >
       <view v-if="dialogType === 'pay'">
         <view class="font-blod relative text-32rpx">
-          <text>{{ $t('orderDetail.bandhuBuyWallet') }} {{ $t('orderDetail.paymentMethod') }}</text>
+          <text> {{ $t('orderDetail.paymentMethod') }}</text>
           <wd-icon name="close-normal" custom-class="absolute right-0 top-1/2 -translate-y-1/2" size="40rpx" @click="handleDialogClose" />
         </view>
         <view class="py-60rpx">

+ 7 - 2
src/pages/notifications/notifications.vue

@@ -38,7 +38,7 @@ const tabs = [
 
 const typeMap = {
   order: ['ORDER_GROUP_BUY_PAYMENT_SUCCESS', 'ORDER_GROUP_BUY_SUCCESS_WIN', 'ORDER_GROUP_BUY_SUCCESS_LOSE', 'ORDER_PROVIDE_SHIPPING_ADDRESS', 'ORDER_GROUP_BUY_FAIL', 'ORDER_SHIPPED_SUCCESS'],
-  income: ['REWARD_REFER_FRIENDS', 'REWARD_GROUP_BUY', 'REWARD_DIRECT_REFERRAL', 'REWARD_CHECKIN', 'REWARD_FIRST_COMMISSION', 'REWARD_SECONDARY_COMMISSION'],
+  income: ['REWARD_REFER_FRIENDS', 'REWARD_GROUP_BUY', 'REWARD_OPEN_GROUP_BUY', 'REWARD_DIRECT_REFERRAL', 'REWARD_CHECKIN', 'REWARD_FIRST_COMMISSION', 'REWARD_SECONDARY_COMMISSION'],
   wallet: ['MONEY_RECHARGE_SUCCESS', 'MONEY_WITHDRAWAL_ACCOUNT_SUCCESS', 'MONEY_WITHDRAWAL_WALLET_SUCCESS', 'MONEY_WITHDRAWAL_FAIL'],
   other: ['OTHER'],
 }
@@ -104,6 +104,11 @@ const contentTypeMap = {
     contentKey: 'notifications.reward.secondaryCommission.content',
     link: '/pages/income/income',
   },
+  REWARD_OPEN_GROUP_BUY: {
+    titleKey: 'notifications.reward.openGroupBuy.title',
+    contentKey: 'notifications.reward.openGroupBuy.content',
+    link: '/pages/income/income',
+  },
   MONEY_RECHARGE_SUCCESS: {
     titleKey: 'notifications.money.rechargeSuccess.title',
     contentKey: 'notifications.money.rechargeSuccess.content',
@@ -217,7 +222,7 @@ async function handleAction(action: string, item: any) {
 <template>
   <z-paging ref="paging" v-model="dataList" use-page-scroll @query="queryList">
     <template #top>
-      <wd-tabs v-model="tab" custom-class="bg-transparent!" @click="() => queryList(1, 20)">
+      <wd-tabs v-model="tab" custom-class="bg-transparent!" slidable="always" @click="() => queryList(1, 20)">
         <wd-tab v-for="tabItem in tabs" :key="tabItem.value" :name="tabItem.value" :title="tabItem.title" />
       </wd-tabs>
     </template>

+ 2 - 2
src/pages/productDetail/checkOut.vue

@@ -125,10 +125,10 @@ async function handlePlaceOrder() {
             <view class="flex items-center">
               <image
                 src="/static/icons/logo.png"
-                class="mr-32rpx h-68rpx w-68rpx rounded-full"
+                class="mr-12rpx h-48rpx w-48rpx rounded-full"
               />
               <view class="text-24rpx">
-                <text>{{ $t('orderDetail.bandhuBuyWallet') }}(</text>
+                <text>{{ $t('orderDetail.bandhuBuyWallet') }} (</text>
                 <text class="text-[var(--wot-color-theme)]">
                   {{ $t('orderDetail.walletBalanceText') }}: ৳ {{ formatNumber(walletBalance) }}
                 </text>

+ 9 - 2
src/pages/search/search.vue

@@ -15,7 +15,7 @@ import { useQueue } from 'wot-design-uni'
 import useZPaging from 'z-paging/components/z-paging/js/hooks/useZPaging.js'
 import { categoryList, getList } from '@/api/product'
 import { t } from '@/locale'
-import { goBack } from '@/utils/page'
+import { goBack, toPage } from '@/utils/page'
 
 defineOptions({
   name: 'SearchPage', // 搜索
@@ -144,7 +144,14 @@ onLoad(() => {
     </template>
     <view class="mt-24rpx px-24rpx pb-24rpx">
       <view class="grid grid-cols-2 gap-20rpx">
-        <Product v-for="(item, index) in dataList" :key="index" width="100%" :height="340" :item="item" />
+        <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>
   </z-paging>