diff --git a/src/api/goodId.js b/src/api/goodId.js new file mode 100644 index 0000000..0a9db1a --- /dev/null +++ b/src/api/goodId.js @@ -0,0 +1,25 @@ +import { get, post } from '../utils/http.js' + +// 获取用户消费等级 +export const apiGetUserWealthLevel = async (userId) => { + try { + const response = await get(`/user-level/client/getByUserId?sysOrigin=LIKEI&userId=${userId}`) + return response + } catch (error) { + console.error('Failed to fetch get user wealth level:', error) + console.error('error:' + error.response.errorMsg) + throw error + } +} + +// 申请靓号 +export const applyGoodID = async (data) => { + try { + const response = await post(`/user/beautiful-number/apply`, data) + return response + } catch (error) { + console.error('Failed to fetch apply goodID:', error) + console.error('error:' + error.response.errorMsg) + throw error + } +} diff --git a/src/locales/ar.json b/src/locales/ar.json index a6c5c3f..ebddac1 100644 --- a/src/locales/ar.json +++ b/src/locales/ar.json @@ -353,5 +353,8 @@ "ranking_daily": "اليومي", "ranking_weekly": "الأسبوعي", "ranking_monthly": "الشهري", - "ranking_hourly": "بالساعة" + "ranking_hourly": "بالساعة", + + "good_id_placeholder": "أدخل من 2 إلى 8 أرقام", + "my_wealth_level": "مستوى الثراء الخاص بي:" } diff --git a/src/locales/en.json b/src/locales/en.json index 39716fc..14f55ce 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -353,5 +353,8 @@ "ranking_daily": "Daily", "ranking_weekly": "Weekly", "ranking_monthly": "Monthly", - "ranking_hourly": "Hourly" + "ranking_hourly": "Hourly", + + "good_id_placeholder": "Enter 2 To 8 Digits", + "my_wealth_level": "My wealth level:" } diff --git a/src/locales/zh.json b/src/locales/zh.json index c794d7a..152a20a 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -353,5 +353,8 @@ "ranking_daily": "日榜", "ranking_weekly": "周榜", "ranking_monthly": "月榜", - "ranking_hourly": "小时榜" + "ranking_hourly": "小时榜", + + "good_id_placeholder": "输入2到8位数字", + "my_wealth_level": "我的财富等级:" } diff --git a/src/router/index.js b/src/router/index.js index a2e7a91..64995d2 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -196,6 +196,14 @@ const router = createRouter({ meta: { requiresAuth: true }, }, + // 靓号 + { + path: '/good-ID', + name: 'good-ID', + component: () => import('../views/GoodID/index.vue'), + meta: { requiresAuth: true }, + }, + // 收支相关页面 { path: '/available-income', diff --git a/src/utils/permissionManager.js b/src/utils/permissionManager.js index 8d9a959..7b20590 100644 --- a/src/utils/permissionManager.js +++ b/src/utils/permissionManager.js @@ -73,15 +73,19 @@ export const ROLE_PERMISSIONS = { PAGES.MAP, // 地图选择页面 ...RANKING_PAGES, //排行榜 ...ACTIVITIES, //活动页面 + '/recharge', //搜索充值对象页面 '/recharge-pay-way', //充值方式页面 '/recharge-guide', //充值引导页面 '/recharge-agency-recruit', //充值代理介绍页面 + '/search-payee', //搜索收款人 '/cash-out', // 提现页面 '/cash-out-details', //提现详情页面 '/KYC', //提现资料提交 '/bank-card', //选择银行卡 + + '/good-ID', //靓号申请页 ], // Admin(管理员) diff --git a/src/utils/routeGuard.js b/src/utils/routeGuard.js index 95d43b0..f3f821b 100644 --- a/src/utils/routeGuard.js +++ b/src/utils/routeGuard.js @@ -421,16 +421,20 @@ class RouteGuard { ...ACTIVITIES, // 活动页面 '/404', // 404页面 '/error', // 通用错误页面 + '/recharge', //搜索充值对象页面 '/recharge-pay-way', //充值方式页面 '/recharge-guide', //充值引导页面 '/recharge-agency-recruit', //充值代理介绍页面 - '/pay-result', + + '/pay-result', //支付结果页 '/search-payee', //搜索收款人 '/cash-out', // 提现页面 '/cash-out-details', //提现详情页面 '/KYC', //提现资料提交 '/bank-card', //选择银行卡 + + '/good-ID', //靓号申请页 ] return publicPages.includes(path) } diff --git a/src/views/GoodID/index.vue b/src/views/GoodID/index.vue new file mode 100644 index 0000000..91ba451 --- /dev/null +++ b/src/views/GoodID/index.vue @@ -0,0 +1,280 @@ + + + + + + + + + + + + + + + {{ t('my_wealth_level') }} {{ wealthLevel }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +