ソースを参照

fix:用户详情

叶静 3 週間 前
コミット
39b0c2fb98

+ 19 - 18
src/app/shop/admin/user/list/detail.vue

@@ -285,16 +285,20 @@
           <el-tab-pane :label="t('modules.user.rechargeRecords')" name="recharges">
             <el-skeleton v-if="state.loading.recharges" :rows="5" animated />
             <el-table v-else class="sa-table" :data="state.recharges" stripe border>
-              <el-table-column prop="orderNo" :label="t('modules.user.rechargeOrderNo')" min- sortable="custom">
+              <el-table-column prop="orderNo" :label="t('modules.user.rechargeOrderNo')" min-width="100"
+                sortable="custom">
                 <template #default="{ row }">
                   <span class="sa-table-line-1">{{ row.orderNo || '-' }}</span>
                 </template>
               </el-table-column>
-              <el-table-column :label="t('modules.user.rechargeChannel')" min-width="100" align="center">
+              <el-table-column :label="t('modules.user.rechargeChannel')" align="center">
                 <template #default="{ row }">
-                  <el-tag :type="getChannelType(row.channel)">
-                    {{ getChannelText(row.channel) }}
-                  </el-tag>
+                  {{ row.channelName || '-' }}
+                </template>
+              </el-table-column>
+              <el-table-column :label="t('modules.user.rechargeMethod')" min-width="100" align="center">
+                <template #default="{ row }">
+                  {{ row.methodName || '-' }}
                 </template>
               </el-table-column>
               <el-table-column :label="t('modules.user.currency')" min-width="80" align="center">
@@ -334,7 +338,8 @@
           <el-tab-pane :label="t('modules.user.withdrawRecords')" name="withdraws">
             <el-skeleton v-if="state.loading.withdraws" :rows="5" animated />
             <el-table v-else class="sa-table" :data="state.withdraws" stripe border>
-              <el-table-column prop="orderNo" :label="t('modules.user.withdrawOrderNo')" min- sortable="custom">
+              <el-table-column prop="orderNo" :label="t('modules.user.withdrawOrderNo')" min-width="150"
+                sortable="custom">
                 <template #default="{ row }">
                   <span class="sa-table-line-1">{{ row.orderNo || '-' }}</span>
                 </template>
@@ -346,11 +351,14 @@
                   </el-tag>
                 </template>
               </el-table-column>
-              <el-table-column :label="t('modules.user.withdrawChannel')" align="center">
+              <el-table-column :label="t('modules.withdraw.channel')" min-width="130" align="center">
                 <template #default="{ row }">
-                  <el-tag :type="getChannelType(row.channel)">
-                    {{ getChannelText(row.channel) }}
-                  </el-tag>
+                  {{ row.channel || '-' }}
+                </template>
+              </el-table-column>
+              <el-table-column :label="t('modules.withdraw.method')" min-width="130" align="center">
+                <template #default="{ row }">
+                  {{ row.bank || '-' }}
                 </template>
               </el-table-column>
               <el-table-column :label="t('modules.user.currency')" min-width="80" align="center">
@@ -368,11 +376,6 @@
                   </el-tag>
                 </template>
               </el-table-column>
-              <el-table-column :label="t('modules.user.paymentBank')" min- align="center">
-                <template #default="{ row }">
-                  {{ row.bank || '-' }}
-                </template>
-              </el-table-column>
               <el-table-column :label="t('modules.user.accountName')" min-width="130" align="center">
                 <template #default="{ row }">
                   {{ row.bankAccountName || '-' }}
@@ -562,8 +565,6 @@ const getStatusType = (type, value) => {
 };
 
 // 财务相关工具函数(保持不变,因为这些是工具函数而非状态函数)
-const getChannelText = financeUtils.getChannelText;
-const getChannelType = financeUtils.getChannelType;
 const getCurrencyText = financeUtils.getCurrencyText;
 const getAccountTypeText = financeUtils.getAccountTypeText;
 const getBizTypeText = financeUtils.getBizTypeText;
@@ -626,7 +627,7 @@ const fetchTabData = async (tabType, page = 1) => {
         response = await financeApi.commission.list(
           {
             ...requestData,
-            userPhone: state.userDetail.phoneNo, // 使用用户手机号筛选
+            phoneNo: state.userDetail.phoneNo, // 使用用户手机号筛选
           },
           false,
         );

+ 3 - 1
src/locales/en-US/index.json

@@ -841,7 +841,8 @@
       "followSystem": "Follow System",
       "cache": "Cache",
       "clearCache": "Clear Cache",
-      "confirmClearCache": "Are you sure to clear cache?"
+      "confirmClearCache": "Are you sure to clear cache?",
+      "cacheCleared": "Cache cleared successfully"
     },
     "recharge": {
       "basicInfo": "Basic Information",
@@ -1054,6 +1055,7 @@
       "rechargeRecords": "Recharge Records",
       "rechargeOrderNo": "Recharge Order No.",
       "rechargeChannel": "Recharge Channel",
+      "rechargeMethod": "Recharge Method",
       "currency": "Currency",
       "amount": "Amount",
       "successTime": "Success Time",

+ 4 - 2
src/locales/zh-CN/index.json

@@ -784,7 +784,8 @@
       "followSystem": "跟随系统",
       "cache": "缓存",
       "clearCache": "清除缓存",
-      "confirmClearCache": "确定清除缓存?"
+      "confirmClearCache": "确定清除缓存?",
+      "cacheCleared": "缓存清除成功"
     },
     "recharge": {
       "basicInfo": "基本信息",
@@ -1050,7 +1051,8 @@
       "commissionTime": "佣金发放时间",
       "rechargeRecords": "充值记录",
       "rechargeOrderNo": "充值订单号",
-      "rechargeChannel": "充值渠道",
+      "rechargeChannel": "充值通道",
+      "rechargeMethod": "充值方式",
       "currency": "币种",
       "amount": "金额",
       "successTime": "成功时间",

+ 12 - 3
src/sheep/layouts/setting.vue

@@ -65,14 +65,16 @@
 <script setup>
 import { reactive, ref } from 'vue';
 import admin from '@/app/admin/api';
-import { ElMessageBox } from 'element-plus';
+import { ElMessageBox, ElMessage } from 'element-plus';
 import { useI18n } from 'vue-i18n';
 import { useApp } from '@/sheep/hooks';
 import { setTheme, setDarkMode } from '@/sheep/hooks/useTheme';
+import sheep from '@/sheep';
 
 const { t } = useI18n();
 
 const { appInfo, appLayout } = useApp();
+const accountStore = sheep.$store('account');
 
 const emit = defineEmits(['modalCallBack']);
 const props = defineProps(['modal']);
@@ -102,8 +104,15 @@ function clearCache() {
     confirmButtonText: t('common.confirm'),
     cancelButtonText: t('common.cancel'),
     type: 'warning',
-  }).then(async () => {
-    await admin.clearCache();
+  }).then(() => {
+    // 清除localStorage
+    localStorage.clear();
+
+    // 显示成功消息
+    ElMessage.success(t('modules.setting.cacheCleared'));
+
+    // 退出到登录页
+    accountStore.logout();
   });
 }
 </script>