diff --git a/manifest.config.ts b/manifest.config.ts index ce66424..716a00c 100644 --- a/manifest.config.ts +++ b/manifest.config.ts @@ -48,7 +48,8 @@ export default defineManifestConfig({ "privacyDescription": { "NSLocalNetworkUsageDescription": "需要本地网络进行服务使用", "NSPhotoLibraryAddUsageDescription": "需要保存二维码海报" - } + }, + "idfa": false }, /* SDK配置 */ "sdkConfigs": { @@ -89,6 +90,18 @@ export default defineManifestConfig({ "spotlight@3x": "static/icons/120x120.png" } } + }, + splashscreen: { + androidStyle: "default", + android: { + hdpi: "static/launchImg/android@480x762.png", + xhdpi: "static/launchImg/android@720x1242.png", + xxhdpi: "static/launchImg/android@1080x1882.png" + }, + iosStyle: "storyboard", + ios: { + storyboard: "static/launchImg/storyboard.zip" + }, } }, }, diff --git a/pages.config.ts b/pages.config.ts index fba2455..eb5476f 100644 --- a/pages.config.ts +++ b/pages.config.ts @@ -8,7 +8,7 @@ export default defineUniPages({ { path: 'pages/agent', style: { navigationBarTitleText: '代理中心' } }, { path: 'pages/agent-manage-agreement', style: { navigationBarTitleText: '代理管理协议', navigationStyle: 'default' } }, { path: 'pages/agent-promote-details', auth: true, style: { navigationBarTitleText: '直推收益明细' } }, - { path: 'pages/agent-rewards-details', auth: true, style: { navigationBarTitleText: '代理奖励明细' } }, + { path: 'pages/agent-rewards-details', auth: true, style: { navigationBarTitleText: '代理奖励收益明细' } }, { path: 'pages/agent-service-agreement', style: { navigationBarTitleText: '信息技术服务合同', navigationStyle: 'default' } }, { path: 'pages/agent-vip', auth: true, style: { navigationBarTitleText: '代理会员' } }, { path: 'pages/agent-vip-apply', auth: true, style: { navigationBarTitleText: 'VIP申请' } }, diff --git a/src/auto-imports.d.ts b/src/auto-imports.d.ts index c32656b..62acd5b 100644 --- a/src/auto-imports.d.ts +++ b/src/auto-imports.d.ts @@ -12,6 +12,7 @@ declare global { const aesEncrypt: typeof import('./utils/crypto.js')['aesEncrypt'] const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] const autoResetRef: typeof import('@vueuse/core')['autoResetRef'] + const calculatePromotionPricing: typeof import('./utils/promotionPricing.js')['calculatePromotionPricing'] const chatCrypto: typeof import('./utils/chatCrypto.js')['default'] const chatEncrypt: typeof import('./utils/chatEncrypt.js')['default'] const clearAuthStorage: typeof import('./utils/storage')['clearAuthStorage'] @@ -143,6 +144,7 @@ declare global { const resolveUnref: typeof import('@vueuse/core')['resolveUnref'] const resolveUserAvatarUrl: typeof import('./utils/avatarUrl')['resolveUserAvatarUrl'] const resolveWebToUni: typeof import('./composables/uni-router')['resolveWebToUni'] + const safeTruncate: typeof import('./utils/promotionPricing.js')['safeTruncate'] const setAgentInfo: typeof import('./utils/storage')['setAgentInfo'] const setAuthSession: typeof import('./utils/storage')['setAuthSession'] const setPosterMergePending: typeof import('./utils/posterRenderMergeBridge')['setPosterMergePending'] @@ -401,13 +403,11 @@ declare module 'vue' { interface GlobalComponents {} interface ComponentCustomProperties { readonly EffectScope: UnwrapRef - readonly ZoomAdapter: UnwrapRef readonly aesDecrypt: UnwrapRef readonly aesEncrypt: UnwrapRef readonly asyncComputed: UnwrapRef readonly autoResetRef: UnwrapRef - readonly chatCrypto: UnwrapRef - readonly chatEncrypt: UnwrapRef + readonly calculatePromotionPricing: UnwrapRef readonly clearAuthStorage: UnwrapRef readonly clearToken: UnwrapRef readonly computed: UnwrapRef @@ -537,6 +537,7 @@ declare module 'vue' { readonly resolveUnref: UnwrapRef readonly resolveUserAvatarUrl: UnwrapRef readonly resolveWebToUni: UnwrapRef + readonly safeTruncate: UnwrapRef readonly setAgentInfo: UnwrapRef readonly setAuthSession: UnwrapRef readonly setPosterMergePending: UnwrapRef @@ -586,7 +587,6 @@ declare module 'vue' { readonly useAsyncQueue: UnwrapRef readonly useAsyncState: UnwrapRef readonly useAttrs: UnwrapRef - readonly useAuthGuard: UnwrapRef readonly useAuthStore: UnwrapRef readonly useBase64: UnwrapRef readonly useBattery: UnwrapRef @@ -684,7 +684,6 @@ declare module 'vue' { readonly usePreferredReducedMotion: UnwrapRef readonly usePreferredReducedTransparency: UnwrapRef readonly usePrevious: UnwrapRef - readonly useQuery: UnwrapRef readonly useRafFn: UnwrapRef readonly useRefHistory: UnwrapRef readonly useReportWebview: UnwrapRef @@ -761,6 +760,5 @@ declare module 'vue' { readonly watchWithFilter: UnwrapRef readonly whenever: UnwrapRef readonly writePngBase64ToLocal: UnwrapRef - readonly zoomAdapter: UnwrapRef } } \ No newline at end of file diff --git a/src/components/LoginDialog.vue b/src/components/LoginDialog.vue index 8e231cf..8a1d39a 100644 --- a/src/components/LoginDialog.vue +++ b/src/components/LoginDialog.vue @@ -1,17 +1,17 @@ @@ -212,14 +246,7 @@ onMounted(() => { 暂无记录 - + @@ -235,6 +262,6 @@ onMounted(() => { } .detail-scroll { - height: calc(100vh - 110px); + min-height: calc(100vh - 110px); } diff --git a/src/pages/agent-rewards-details.vue b/src/pages/agent-rewards-details.vue index 90c84cd..2e6aa15 100644 --- a/src/pages/agent-rewards-details.vue +++ b/src/pages/agent-rewards-details.vue @@ -1,5 +1,6 @@ @@ -106,14 +142,7 @@ onMounted(() => { 暂无记录 - + @@ -129,6 +158,6 @@ onMounted(() => { } .reward-scroll { - height: calc(100vh - 110px); + min-height: calc(100vh - 110px); } diff --git a/src/pages/agent-vip-apply.vue b/src/pages/agent-vip-apply.vue index 3b79ddf..cacb6c0 100644 --- a/src/pages/agent-vip-apply.vue +++ b/src/pages/agent-vip-apply.vue @@ -132,18 +132,18 @@ const revenueData = computed(() => { // 计算月总收益 const vipMonthlyTotal = baseRevenue - + vipCommissionRevenue - + vipFloatingRevenue - + vipConversionRevenue - + vipExtraRevenue + + vipCommissionRevenue + + vipFloatingRevenue + + vipConversionRevenue + + vipExtraRevenue const svipMonthlyTotal = baseRevenue - + svipCommissionRevenue - + svipFloatingRevenue - + withdrawReward - + svipConversionRevenue - + svipExtraRevenue + + svipCommissionRevenue + + svipFloatingRevenue + + withdrawReward + + svipConversionRevenue + + svipExtraRevenue // 计算VIP和SVIP之间的差额 const monthlyDifference = svipMonthlyTotal - vipMonthlyTotal @@ -239,12 +239,6 @@ function selectType(type) { // 申请VIP或SVIP async function applyVip() { - // 如果是VIP想升级到SVIP,提示联系客服 - if (isVip.value && selectedType.value === 'svip') { - contactService() - return - } - // 如果是SVIP要降级到VIP,提示不能降级 if (isSvip.value && selectedType.value === 'vip') { showToast('SVIP会员不能降级到VIP会员') @@ -289,24 +283,20 @@ function formatExpiryTime(expiryTimeStr) { + class="absolute right-0 top-0 h-32 w-32 rounded-bl-full from-amber-300 to-amber-500 bg-gradient-to-br opacity-20" /> + class="absolute left-0 top-40 h-16 w-16 rounded-tr-full from-amber-400 to-amber-600 bg-gradient-to-tr opacity-20" /> + class="absolute bottom-60 right-0 h-24 w-24 rounded-tl-full from-amber-300 to-amber-500 bg-gradient-to-bl opacity-20" /> - + class="absolute left-1/2 h-1 w-24 animate-pulse rounded-full from-amber-300 via-amber-500 to-amber-300 bg-gradient-to-r -top-2 -translate-x-1/2" /> + {{ isVipOrSvip ? '代理会员续费' : 'VIP代理申请' }} - - + + @@ -204,9 +224,6 @@ onMounted(async () => { } .pagination-wrap { - position: sticky; - bottom: 0; - z-index: 10; border-top: 1px solid #f1f5f9; background: #fff; padding: 8px 12px 12px; diff --git a/src/static/images/shot_nonal.png b/src/static/images/shot_nornal.png similarity index 100% rename from src/static/images/shot_nonal.png rename to src/static/images/shot_nornal.png diff --git a/src/static/launchImg/LaunchScreen.storyboard b/src/static/launchImg/LaunchScreen.storyboard new file mode 100644 index 0000000..f488b7e --- /dev/null +++ b/src/static/launchImg/LaunchScreen.storyboard @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/static/launchImg/android@1080x1882.png b/src/static/launchImg/android@1080x1882.png new file mode 100644 index 0000000..baf3767 Binary files /dev/null and b/src/static/launchImg/android@1080x1882.png differ diff --git a/src/static/launchImg/android@480x762.png b/src/static/launchImg/android@480x762.png new file mode 100644 index 0000000..0f86996 Binary files /dev/null and b/src/static/launchImg/android@480x762.png differ diff --git a/src/static/launchImg/android@720x1242.png b/src/static/launchImg/android@720x1242.png new file mode 100644 index 0000000..393f966 Binary files /dev/null and b/src/static/launchImg/android@720x1242.png differ diff --git a/src/static/launchImg/launchscreen@2x.png b/src/static/launchImg/launchscreen@2x.png new file mode 100644 index 0000000..a26f1bd Binary files /dev/null and b/src/static/launchImg/launchscreen@2x.png differ diff --git a/src/static/launchImg/launchscreen@3x.png b/src/static/launchImg/launchscreen@3x.png new file mode 100644 index 0000000..1f75ac9 Binary files /dev/null and b/src/static/launchImg/launchscreen@3x.png differ diff --git a/src/static/launchImg/storyboard.zip b/src/static/launchImg/storyboard.zip new file mode 100644 index 0000000..10e9d10 Binary files /dev/null and b/src/static/launchImg/storyboard.zip differ diff --git a/src/utils/promotionPricing.js b/src/utils/promotionPricing.js new file mode 100644 index 0000000..523ada8 --- /dev/null +++ b/src/utils/promotionPricing.js @@ -0,0 +1,46 @@ +export function safeTruncate(num, decimals = 2) { + if (Number.isNaN(num) || !Number.isFinite(num)) + return '0.00' + + const factor = 10 ** decimals + const scaled = Math.trunc(num * factor) + return (scaled / factor).toFixed(decimals) +} + +function calculatePlatformOverpricingCost(price, config) { + if (price <= config.p_pricing_standard) + return 0 + return (price - config.p_pricing_standard) * config.p_overpricing_ratio +} + +function calculateSuperiorOverpricingCost(price, config) { + if (config.a_overpricing_ratio <= 0) + return 0 + if (price <= config.a_pricing_standard) + return 0 + if (config.a_pricing_end <= config.a_pricing_standard) + return 0 + + const superiorRangeAmount = Math.min(price, config.a_pricing_end) - config.a_pricing_standard + return Math.max(0, superiorRangeAmount) * config.a_overpricing_ratio +} + +export function calculatePromotionPricing(priceInput, config) { + if (!config) + return { costPrice: '0.00', promotionRevenue: '0.00' } + + const price = Number(priceInput) + if (!Number.isFinite(price)) + return { costPrice: '0.00', promotionRevenue: '0.00' } + + const baseCost = Number(config.cost_price) || 0 + const platformOverpricingCost = calculatePlatformOverpricingCost(price, config) + const superiorOverpricingCost = calculateSuperiorOverpricingCost(price, config) + const totalCost = baseCost + platformOverpricingCost + superiorOverpricingCost + const revenue = price - totalCost + + return { + costPrice: safeTruncate(totalCost), + promotionRevenue: safeTruncate(revenue), + } +}