@@ -232,8 +238,10 @@
- 取消
- 提交
+ {{ $t('page.weightShared.btnCancel') }}
+ {{
+ $t('page.weightShared.btnSubmit')
+ }}
@@ -242,6 +250,9 @@
import api from '../../../api/reward/index'
import ArtBarChart from '@/components/core/charts/art-bar-chart/index.vue'
import { ElMessage } from 'element-plus'
+ import { useI18n } from 'vue-i18n'
+
+ const { t } = useI18n()
const TIER_KEYS = ['T1', 'T2', 'T3', 'T4', 'T5'] as const
/** 供模板 v-for 使用 */
@@ -430,7 +441,7 @@
grouped.value = parsePayload(res)
})
.catch(() => {
- ElMessage.error('获取权重数据失败')
+ ElMessage.error(t('page.weightShared.fetchFail'))
})
.finally(() => {
loading.value = false
@@ -456,19 +467,19 @@
function handleSubmit() {
const items = collectItems()
if (items.length === 0) {
- ElMessage.info('没有可提交的配置')
+ ElMessage.info(t('page.weightShared.nothingToSubmit'))
return
}
submitting.value = true
api
.batchUpdateWeights(items)
.then(() => {
- ElMessage.success('保存成功')
+ ElMessage.success(t('page.weightShared.saveSuccess'))
emit('success')
handleClose()
})
.catch((e: { message?: string }) => {
- ElMessage.error(e?.message ?? '保存失败')
+ ElMessage.error(e?.message ?? t('page.weightShared.submitFail'))
})
.finally(() => {
submitting.value = false
diff --git a/saiadmin-artd/src/views/plugin/dice/reward/index/modules/weight-ratio-dialog.vue b/saiadmin-artd/src/views/plugin/dice/reward/index/modules/weight-ratio-dialog.vue
index 94ac467..50c666f 100644
--- a/saiadmin-artd/src/views/plugin/dice/reward/index/modules/weight-ratio-dialog.vue
+++ b/saiadmin-artd/src/views/plugin/dice/reward/index/modules/weight-ratio-dialog.vue
@@ -1,78 +1,76 @@
- 配置奖励对照表(dice_reward)的权重,一级按方向(顺时针/逆时针),二级按档位(T1-T5);各条权重
- 1-10000,档位内按权重比抽取。
+ {{ $t('page.weightRatio.globalTip') }}
-
+
- 该档位暂无配置数据
+ {{ $t('page.weightShared.emptyTier') }}
- 当前档位权重合计:{{ getTierSumForCurrentDirection(t) }}
- (各条 1-10000,档位内按权重比抽取,和不限制)
+ {{
+ $t('page.weightShared.sumLineSingle', { sum: getTierSumForCurrentDirection(t) })
+ }}
- T4、T5 仅单一结果,无需配置权重。
+ {{ $t('page.weightShared.t4t5NoteSingle') }}
@@ -156,65 +154,64 @@
-
+
- 该档位暂无配置数据
+ {{ $t('page.weightShared.emptyTier') }}
- 当前档位权重合计:{{ getTierSumForCurrentDirection(t) }}
- (各条 1-10000,档位内按权重比抽取,和不限制)
+ {{
+ $t('page.weightShared.sumLineSingle', { sum: getTierSumForCurrentDirection(t) })
+ }}
- T4、T5 仅单一结果,无需配置权重。
+ {{ $t('page.weightShared.t4t5NoteSingle') }}
@@ -301,13 +298,14 @@
- 取消
+ {{ $t('page.weightShared.btnCancel') }}
提交
+ >{{ $t('page.weightShared.btnSubmit') }}
@@ -316,6 +314,9 @@
import api from '../../../api/reward/index'
import ArtBarChart from '@/components/core/charts/art-bar-chart/index.vue'
import { ElMessage } from 'element-plus'
+ import { useI18n } from 'vue-i18n'
+
+ const { t, locale } = useI18n()
const TIER_KEYS = ['T1', 'T2', 'T3', 'T4', 'T5'] as const
type DirectionKey = 'clockwise' | 'counterclockwise'
@@ -366,9 +367,14 @@
T5: { '0': [], '1': [] }
})
- const currentDirectionLabel = computed(() =>
- activeDirection.value === '0' ? '顺时针' : '逆时针'
- )
+ const currentWeightColumnLabel = computed(() => {
+ locale.value
+ const dirLabel =
+ activeDirection.value === '0'
+ ? t('page.weightRatio.tabClockwise')
+ : t('page.weightRatio.tabCounterclockwise')
+ return `${dirLabel} ${t('page.weightShared.weightColSuffix')}`
+ })
const tierKeys = TIER_KEYS
@@ -470,7 +476,7 @@
grouped.value = parsePayload(res)
})
.catch(() => {
- ElMessage.error('获取权重数据失败')
+ ElMessage.error(t('page.weightShared.fetchFail'))
})
.finally(() => {
loading.value = false
@@ -499,19 +505,19 @@
function handleSubmit() {
const items = collectItems()
if (items.length === 0) {
- ElMessage.info('没有可提交的配置')
+ ElMessage.info(t('page.weightShared.nothingToSubmit'))
return
}
submitting.value = true
api
.batchUpdateWeights(items)
.then(() => {
- ElMessage.success('保存成功')
+ ElMessage.success(t('page.weightShared.saveSuccess'))
emit('success')
handleClose()
})
.catch((e: { message?: string }) => {
- ElMessage.error(e?.message ?? '保存失败')
+ ElMessage.error(e?.message ?? t('page.weightShared.submitFail'))
})
.finally(() => {
submitting.value = false
diff --git a/saiadmin-artd/src/views/plugin/dice/reward/index/modules/weight-test-dialog.vue b/saiadmin-artd/src/views/plugin/dice/reward/index/modules/weight-test-dialog.vue
index 209acfd..af3455a 100644
--- a/saiadmin-artd/src/views/plugin/dice/reward/index/modules/weight-test-dialog.vue
+++ b/saiadmin-artd/src/views/plugin/dice/reward/index/modules/weight-test-dialog.vue
@@ -1,33 +1,31 @@
-
- 彩金池逻辑说明
- 与 playStart 抽奖逻辑一致:使用 name=default 的安全线、杀分开关;盈利未达安全线时,付费抽奖券使用玩家自身权重(下方自定义档位),免费抽奖券使用 killScore 配置;盈利达到安全线且杀分开启时,付费/免费均使用 killScore 配置。
+
+ {{ $t('page.weightTest.alertTitle') }}
+ {{ $t('page.weightTest.alertBody') }}
-
-
+
+
-
+
- 自定义档位概率(T1~T5),每档 0-100%,五档之和不能超过 100%
+ {{ $t('page.weightTest.tierProbHint') }}
-
+
-
当前五档之和为 {{ paidTierSum }}%,不能超过 100%
+
{{
+ $t('page.weightTest.tierSumError', { sum: paidTierSum })
+ }}
-
-
+
+
-
-
+
+
@@ -76,10 +84,13 @@
-
+
- 自定义档位概率(T1~T5),每档 0-100%,五档之和不能超过 100%
+ {{ $t('page.weightTest.tierProbHint') }}
-
+
-
当前五档之和为 {{ freeTierSum }}%,不能超过 100%
+
{{
+ $t('page.weightTest.tierSumError', { sum: freeTierSum })
+ }}
-
-
+
+
-
-
+
+
@@ -128,19 +149,23 @@
- 上一步
- 下一步
+ {{
+ $t('page.weightTest.btnPrev')
+ }}
+ {{
+ $t('page.weightTest.btnNext')
+ }}
开始测试{{ $t('page.weightTest.btnStart') }}
- 取消
+ {{
+ $t('page.weightTest.btnCancel')
+ }}
@@ -148,6 +173,10 @@