liangan пре 3 недеља
родитељ
комит
2cf46a509a
2 измењених фајлова са 18 додато и 7 уклоњено
  1. 1 1
      src/interceptors/request.ts
  2. 17 6
      src/pages/wallet/myWallet.vue

+ 1 - 1
src/interceptors/request.ts

@@ -90,7 +90,7 @@ const httpInterceptor = {
       platform, // 可选,与 uniapp 定义的平台一致,告诉后台来源
       ...options.header,
     }
-    options.header.language = i18n.global.locale
+    options.header['accept-language'] = i18n.global.locale
     // 判断是否为登录接口
     const isLoginApi = options.url?.includes('/login') || options.url?.includes('/register')
 

+ 17 - 6
src/pages/wallet/myWallet.vue

@@ -13,6 +13,7 @@
 // eslint-disable-next-line unused-imports/no-unused-imports
 import { onPageScroll, onReachBottom } from '@dcloudio/uni-app' // 必须导入需要用到的页面生命周期(即使在当前页面上没有直接使用到)
 import useZPaging from 'z-paging/components/z-paging/js/hooks/useZPaging.js'
+import { getEnum as _getEnum } from '@/api/common'
 import { getWalletAccountInfo, unpaidOrder, walletFlowList } from '@/api/wallet'
 import DialogBox from '@/components/DialogBox/DialogBox.vue'
 import { DialogUtils } from '@/components/DialogBox/utils'
@@ -93,7 +94,13 @@ async function getUnpaidOrder() {
     console.log(error)
   }
 }
+const typeEnum = ref<any[]>([])
+async function getEnum() {
+  const res = await _getEnum({ id: 1 })
+  typeEnum.value = res.data
+}
 onShow(() => {
+  getEnum()
   getWalletInfo()
   getUnpaidOrder()
 })
@@ -141,7 +148,7 @@ onShow(() => {
           {{ $t('wallet.record') }}
         </view>
         <view class="mb-20rpx">
-          <wd-radio-group v-model="dayType" shape="button">
+          <wd-radio-group v-model="dayType" shape="button" @change="() => getWalletFlowList(1, 20)">
             <wd-radio :value="1">
               DT
             </wd-radio>
@@ -166,17 +173,17 @@ onShow(() => {
           >
             <view class="mb-8rpx flex items-center justify-between text-24rpx">
               <text class="truncate">
-                Group Buying Reward:PPB123456789Reward:PPB123456789Reward:PPB123456789
+                Order ID:{{ item.bizNo }}
               </text>
               <text class="flex-shrink-0 pl-16rpx">
-                ৳ 8
+                {{ item.type === 1 ? '-' : '+' }}৳{{ formatNumber(item.amount) }}
               </text>
             </view>
             <view class="flex items-center justify-between text-22rpx">
               <text class="text-#5B5B5B">
-                2025/05/05 12:30:30
+                {{ item.createTime }}
               </text>
-              <wd-text type="success" text="Completed" />
+              <wd-text :type="item.bizType === 8001 || item.bizType === 9001 ? 'primary' : 'success'" :text="item.bizType === 8001 || item.bizType === 9001 ? typeEnum.find(i => i.code === item.bizType)?.name : 'Completed'" />
             </view>
           </view>
         </view>
@@ -205,8 +212,12 @@ onShow(() => {
 
   .wd-radio__label {
     width: 100rpx !important;
-    height: 40rpx !important;
+    min-width: 100rpx !important;
+    max-width: 100rpx !important;
+    height: 36rpx !important;
+    line-height: 36rpx !important;
     padding: 0 !important;
+    font-size: 22rpx !important;
     background: rgba(255, 255, 255, 0.2) !important;
     border-color: rgba(151, 151, 151, 0.2) !important;
   }