Bläddra i källkod

feat: 回收订单开发完善

liangan 1 månad sedan
förälder
incheckning
a4545d53de

+ 4 - 4
env/.env.development

@@ -7,10 +7,10 @@ VITE_SHOW_SOURCEMAP = true
 
 VITE_UNI_APPID = '__UNI__F0919F6'
 
-VITE_SERVER_BASEURL = 'http://192.168.0.110:8110' # mall
-VITE_API_SECONDARY_URL = 'http://192.168.0.110:8110' # cif
-VITE_API_THIRD_URL = 'http://192.168.0.110:8110' # operating
-VITE_UPLOAD_BASEURL = 'http://192.168.0.110:8110/operating/file/upload'
+VITE_SERVER_BASEURL = 'http://124.222.152.234:8101' # mall
+VITE_API_SECONDARY_URL = 'http://124.222.152.234:8101' # cif
+VITE_API_THIRD_URL = 'http://124.222.152.234:8101' # operating
+VITE_UPLOAD_BASEURL = 'http://124.222.152.234:8101/operating/file/upload'
 
 # 极光key
 VITE_MTPUSH_APPKEY_ANDROID = 'c95a2cb077c243ebbfa896f5'

+ 5 - 0
src/locale/bn.json

@@ -55,6 +55,9 @@
   "orderDetail.sorry": "দুঃখিত, আপনি এই গ্রুপে জিততে পারেননি",
   "orderDetail.waiting": "অনুগ্রহ করে এই গ্রুপের ড্র এর জন্য অপেক্ষা করুন",
   "orderDetail.paymentCountdown": "অনুগ্রহ করে এই সময়ের মধ্যে পেমেন্ট করুন:",
+  "orderDetail.status9.sellBackPrefix": "পণ্যটি সেল ব্যাক করা হয়েছে",
+  "orderDetail.status9.receivePrefix": "আপনি পেয়েছেন",
+  "orderDetail.status9.rewardSuffix": "গ্রুপ ওপেনিং রিওয়ার্ড",
   "orderDetail.address.add": "অনুগ্রহ করে আপনার শিপিং ঠিকানা প্রদান করুন",
   "orderDetail.address.name": "প্রাপক",
   "orderDetail.address.orderNo": "অর্ডার আইডি",
@@ -313,6 +316,8 @@
   "notifications.order.groupBuyFail.content": "আপনার অংশগ্রহণ করা গ্রুপ অর্ডার [{orderId}] ব্যর্থ হয়েছে",
   "notifications.order.shipped.title": "অর্ডার সফলভাবে শিপ হয়েছে",
   "notifications.order.shipped.content": "আপনার অংশগ্রহণ করা গ্রুপ অর্ডার [{orderId}] সফলভাবে শিপ হয়েছে",
+  "notifications.order.recycleReward.title": "অর্ডার রিসাইকেল পুরস্কার",
+  "notifications.order.recycleReward.content": "আপনি অর্ডার রিসাইকেলের জন্য পুরস্কার পেয়েছেন",
   "notifications.reward.referFriends.title": "বন্ধু রেফার পুরস্কার",
   "notifications.reward.referFriends.content": "আপনি বন্ধু রেফারের জন্য পুরস্কার পেয়েছেন",
   "notifications.reward.groupBuy.title": "গ্রুপ বাই যোগ দিন পুরস্কার",

+ 5 - 0
src/locale/en.json

@@ -55,6 +55,9 @@
   "orderDetail.sorry": "So sorry, You didn't win in this group",
   "orderDetail.waiting": "Please wait for the draw of this group",
   "orderDetail.paymentCountdown": "Please make payment within:",
+  "orderDetail.status9.sellBackPrefix": "Product has been sell back for",
+  "orderDetail.status9.receivePrefix": "You have received",
+  "orderDetail.status9.rewardSuffix": "group opening reward",
   "orderDetail.address.add": "Please provide your shipping address",
   "orderDetail.address.name": "Recipient",
   "orderDetail.address.orderNo": "Order ID",
@@ -313,6 +316,8 @@
   "notifications.order.groupBuyFail.content": "The group order you participated in [{orderId}] has failed",
   "notifications.order.shipped.title": "Order shipped successfully",
   "notifications.order.shipped.content": "The group order you participated in [{orderId}] has been successfully shipped",
+  "notifications.order.recycleReward.title": "Order Recycle Reward",
+  "notifications.order.recycleReward.content": "You have received the reward for order recycle",
   "notifications.reward.referFriends.title": "Refer Friends Reward",
   "notifications.reward.referFriends.content": "You have received the reward for refer friends",
   "notifications.reward.groupBuy.title": "Join Group Buy Reward",

+ 5 - 0
src/locale/zh-Hans.json

@@ -55,6 +55,9 @@
   "orderDetail.sorry": "抱歉,您在这个团中未中奖",
   "orderDetail.waiting": "请等待本团开奖",
   "orderDetail.paymentCountdown": "请在以下时间内完成支付:",
+  "orderDetail.status9.sellBackPrefix": "商品已回收,回收价",
+  "orderDetail.status9.receivePrefix": "您已获得",
+  "orderDetail.status9.rewardSuffix": "开团奖励",
   "orderDetail.address.add": "请填写收货地址",
   "orderDetail.address.name": "收件人",
   "orderDetail.address.orderNo": "订单号",
@@ -313,6 +316,8 @@
   "notifications.order.groupBuyFail.content": "您参与的团购订单[{orderId}]已失败",
   "notifications.order.shipped.title": "订单发货成功",
   "notifications.order.shipped.content": "您参与的团购订单[{orderId}]已成功发货",
+  "notifications.order.recycleReward.title": "订单回收奖励",
+  "notifications.order.recycleReward.content": "您已收到订单回收奖励",
   "notifications.reward.referFriends.title": "推荐好友奖励",
   "notifications.reward.referFriends.content": "您已获得推荐好友奖励",
   "notifications.reward.groupBuy.title": "参团奖励",

+ 15 - 3
src/pages/myOrders/orderDetail.vue

@@ -436,10 +436,22 @@ onUnmounted(() => {
     <!-- 实际内容 -->
     <template v-else>
       <view class="pt-20rpx">
-        <!-- 状态显示 -->
+        <!-- 状态显示 lId=1是中奖0是未中奖。storePink?.status是拼团状态 detail?.status是订单状态 -->
         <template v-if="detail.status !== 4 && detail?.status !== 2">
+          <view v-if="detail?.status === 9" class="mb-20rpx bg-#17AA68/80 py-20rpx text-center text-28rpx text-white">
+            {{ t('orderDetail.status9.sellBackPrefix') }}
+            <text class="text-[var(--wot-color-theme)]">
+              ৳{{ formatNumber(detail?.recycleAmount) }}
+            </text>
+            <br>
+            {{ t('orderDetail.status9.receivePrefix') }}
+            <text class="text-[var(--wot-color-theme)]">
+              ৳{{ formatNumber(detail?.brokerage) }}
+            </text>
+            {{ t('orderDetail.status9.rewardSuffix') }}
+          </view>
           <!-- 已中奖 -->
-          <view v-if="detail?.storePink?.status === 2 && detail?.storePink?.lId === 1" class="mb-20rpx bg-#17AA68/80 py-20rpx text-center text-28rpx text-white">
+          <view v-else-if="detail?.storePink?.status === 2 && detail?.storePink?.lId === 1" class="mb-20rpx bg-#17AA68/80 py-20rpx text-center text-28rpx text-white">
             {{ t('orderDetail.congrats') }}
             <br>
             {{ t('orderDetail.receiveReward') }}
@@ -471,7 +483,7 @@ onUnmounted(() => {
           </view>
         </template>
         <!-- 地址 -->
-        <view v-if="detail?.storePink?.status === 2 && detail?.storePink?.lId === 1" class="mb-20rpx bg-white px-24rpx py-20rpx">
+        <view v-if="detail?.storePink?.status === 2 && detail?.storePink?.lId === 1 && detail?.status !== 9" class="mb-20rpx bg-white px-24rpx py-20rpx">
           <!-- 无地址 -->
           <template v-if="!detail.orderAddressVO">
             <view class="flex items-center justify-between" @click="selectAddress">

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

@@ -48,7 +48,7 @@ const tabs = computed(() => {
 
 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_OPEN_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', 'ORDER_RECYCLE_REWARD'],
   wallet: ['MONEY_RECHARGE_SUCCESS', 'MONEY_WITHDRAWAL_ACCOUNT_SUCCESS', 'MONEY_WITHDRAWAL_WALLET_SUCCESS', 'MONEY_WITHDRAWAL_FAIL'],
   other: ['OTHER'],
 }
@@ -84,6 +84,11 @@ const contentTypeMap = {
     contentKey: 'notifications.order.shipped.content',
     link: '/pages/myOrders/orderDetail',
   },
+  ORDER_RECYCLE_REWARD: {
+    titleKey: 'notifications.order.recycleReward.title',
+    contentKey: 'notifications.order.recycleReward.content',
+    link: '/pages/income/income',
+  },
   REWARD_REFER_FRIENDS: {
     titleKey: 'notifications.reward.referFriends.title',
     contentKey: 'notifications.reward.referFriends.content',
@@ -212,7 +217,7 @@ function handleNoticeClick(item: any) {
     const config = contentTypeMap[item.noticeType]
     const link = config?.link
     if (link) {
-      toPage({ url: link, params: typeMap.order.includes(item.noticeType) ? { orderNo: item.noticeMessage } : {} })
+      toPage({ url: link, params: link === '/pages/myOrders/orderDetail' ? { orderNo: item.noticeMessage } : {} })
     }
   }
 }