Compare commits
10 Commits
fb8f4ca52b
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 899b66840e | |||
| 27c7e5d451 | |||
| a5c56f7541 | |||
| 704706c643 | |||
| e9fc86b956 | |||
| aac53793ba | |||
| f5c9ebf7d5 | |||
| e950f49fee | |||
| 4b187ca025 | |||
| b1c57cd62e |
@@ -24,21 +24,21 @@ interface VersionConfig {
|
|||||||
// 版本配置 - 直接在这里管理版本信息
|
// 版本配置 - 直接在这里管理版本信息
|
||||||
const versionConfig: VersionConfig = {
|
const versionConfig: VersionConfig = {
|
||||||
ios: {
|
ios: {
|
||||||
version: "0.0.2",
|
version: "0.0.4",
|
||||||
forceUpdate: false,
|
forceUpdate: false,
|
||||||
updateMessage: "修复了一些问题并优化了性能",
|
updateMessage: "修复了一些问题并优化了性能",
|
||||||
updateUrl: "https://apps.apple.com/app/id123456789",
|
updateUrl: "https://apps.apple.com/app/id123456789",
|
||||||
minSupportVersion: "0.0.1",
|
minSupportVersion: "0.0.1",
|
||||||
},
|
},
|
||||||
android: {
|
android: {
|
||||||
version: "0.0.2",
|
version: "0.0.4",
|
||||||
forceUpdate: false,
|
forceUpdate: false,
|
||||||
updateMessage: "修复了一些问题并优化了性能",
|
updateMessage: "修复了一些问题并优化了性能",
|
||||||
updateUrl: "https://play.google.com/store/apps/details?id=riwa.ionic.app",
|
updateUrl: "https://play.google.com/store/apps/details?id=riwa.ionic.app",
|
||||||
minSupportVersion: "0.0.1",
|
minSupportVersion: "0.0.1",
|
||||||
},
|
},
|
||||||
browser: {
|
browser: {
|
||||||
version: "0.0.2",
|
version: "0.0.4",
|
||||||
forceUpdate: false,
|
forceUpdate: false,
|
||||||
updateMessage: "修复了一些问题并优化了性能",
|
updateMessage: "修复了一些问题并优化了性能",
|
||||||
updateUrl: "",
|
updateUrl: "",
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<meta name="format-detection" content="telephone=no" />
|
<meta name="format-detection" content="telephone=no" />
|
||||||
<meta name="msapplication-tap-highlight" content="no" />
|
<meta name="msapplication-tap-highlight" content="no" />
|
||||||
|
|
||||||
<link rel="shortcut icon" type="image/svg" href="/favicon.svg" />
|
<link rel="shortcut icon" type="image/jpeg" href="/riwsan.jpg" />
|
||||||
|
|
||||||
<!-- add to homescreen for ios -->
|
<!-- add to homescreen for ios -->
|
||||||
<meta name="mobile-web-app-capable" content="yes" />
|
<meta name="mobile-web-app-capable" content="yes" />
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "riwa-ionic",
|
"name": "riwa-ionic",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.0.2",
|
"version": "0.0.4",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "An Ionic project",
|
"description": "An Ionic project",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export const apps: AppInfo[] = [
|
|||||||
{
|
{
|
||||||
id: "riwsan-app",
|
id: "riwsan-app",
|
||||||
name: "Riwsan 瑞讯",
|
name: "Riwsan 瑞讯",
|
||||||
icon: "https://pub-e6e293168296455aa6fb1b7148767038.r2.dev/riwa.png",
|
icon: "https://pub-d64aa74d10b04b7e9125ee9e571d2638.r2.dev/app-store/icons/riwsan.jpg",
|
||||||
shortDescription: {
|
shortDescription: {
|
||||||
"zh-CN": "数字资产交易平台",
|
"zh-CN": "数字资产交易平台",
|
||||||
"en-US": "Digital Asset Trading Platform",
|
"en-US": "Digital Asset Trading Platform",
|
||||||
@@ -24,7 +24,7 @@ export const apps: AppInfo[] = [
|
|||||||
"en-US": "Riwsan is a secure and fast digital asset trading platform with professional trading tools and real-time market data.",
|
"en-US": "Riwsan is a secure and fast digital asset trading platform with professional trading tools and real-time market data.",
|
||||||
},
|
},
|
||||||
category: "finance",
|
category: "finance",
|
||||||
version: "0.0.2",
|
version: "0.0.4",
|
||||||
buildNumber: "100",
|
buildNumber: "100",
|
||||||
releaseDate: "2026-1-15",
|
releaseDate: "2026-1-15",
|
||||||
releaseNotes: {
|
releaseNotes: {
|
||||||
@@ -64,7 +64,7 @@ export const apps: AppInfo[] = [
|
|||||||
{
|
{
|
||||||
id: "riwsan-wallet",
|
id: "riwsan-wallet",
|
||||||
name: "Riwsan 钱包",
|
name: "Riwsan 钱包",
|
||||||
icon: "https://pub-e6e293168296455aa6fb1b7148767038.r2.dev/riwa.png",
|
icon: "https://pub-d64aa74d10b04b7e9125ee9e571d2638.r2.dev/app-store/icons/riwsan.png",
|
||||||
shortDescription: {
|
shortDescription: {
|
||||||
"zh-CN": "安全的数字资产钱包",
|
"zh-CN": "安全的数字资产钱包",
|
||||||
"en-US": "Secure Digital Asset Wallet",
|
"en-US": "Secure Digital Asset Wallet",
|
||||||
@@ -109,7 +109,7 @@ export const apps: AppInfo[] = [
|
|||||||
{
|
{
|
||||||
id: "chat-freely",
|
id: "chat-freely",
|
||||||
name: "畅聊",
|
name: "畅聊",
|
||||||
icon: "https://pub-e6e293168296455aa6fb1b7148767038.r2.dev/chat-origin.png",
|
icon: "https://pub-d64aa74d10b04b7e9125ee9e571d2638.r2.dev/app-store/icons/Group%206.png",
|
||||||
shortDescription: {
|
shortDescription: {
|
||||||
"zh-CN": "加密即时通讯工具",
|
"zh-CN": "加密即时通讯工具",
|
||||||
"en-US": "Encrypted Instant Messaging",
|
"en-US": "Encrypted Instant Messaging",
|
||||||
@@ -153,7 +153,7 @@ export const apps: AppInfo[] = [
|
|||||||
{
|
{
|
||||||
id: "riwsan-conference",
|
id: "riwsan-conference",
|
||||||
name: "信达会议",
|
name: "信达会议",
|
||||||
icon: "https://pub-d64aa74d10b04b7e9125ee9e571d2638.r2.dev/app-store/icons/%E8%A7%86%E9%A2%91%E4%BC%9A%E8%AE%AE.png",
|
icon: "https://pub-d64aa74d10b04b7e9125ee9e571d2638.r2.dev/app-store/icons/Group%203.png",
|
||||||
shortDescription: {
|
shortDescription: {
|
||||||
"zh-CN": "会议与协作工具",
|
"zh-CN": "会议与协作工具",
|
||||||
"en-US": "Conference and Collaboration Tool",
|
"en-US": "Conference and Collaboration Tool",
|
||||||
|
|||||||
@@ -22,21 +22,15 @@ export default defineNuxtConfig({
|
|||||||
start_url: "/",
|
start_url: "/",
|
||||||
icons: [
|
icons: [
|
||||||
{
|
{
|
||||||
src: "/favicon.svg",
|
src: "/riwsan.png",
|
||||||
sizes: "512x512",
|
|
||||||
type: "image/svg+xml",
|
|
||||||
purpose: "any",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
src: "/favicon.svg",
|
|
||||||
sizes: "192x192",
|
sizes: "192x192",
|
||||||
type: "image/svg+xml",
|
type: "image/png",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
workbox: {
|
workbox: {
|
||||||
navigateFallback: "/",
|
navigateFallback: "/",
|
||||||
globPatterns: ["**/*.{js,css,html,png,svg,ico}"],
|
globPatterns: ["**/*.{js,css,html,png,svg,ico,jpg}"],
|
||||||
cleanupOutdatedCaches: true,
|
cleanupOutdatedCaches: true,
|
||||||
runtimeCaching: [
|
runtimeCaching: [
|
||||||
{
|
{
|
||||||
@@ -122,7 +116,7 @@ export default defineNuxtConfig({
|
|||||||
{ name: "description", content: "Riwa App 下载 - iOS, Android, H5" },
|
{ name: "description", content: "Riwa App 下载 - iOS, Android, H5" },
|
||||||
],
|
],
|
||||||
link: [
|
link: [
|
||||||
{ rel: "icon", type: "image/svg+xml", href: "/favicon.svg" },
|
{ rel: "icon", type: "image/png", href: "/riwsan.png" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -106,11 +106,7 @@ useHead({
|
|||||||
<header class="sticky top-0 z-50">
|
<header class="sticky top-0 z-50">
|
||||||
<div class="flex items-center justify-between py-4">
|
<div class="flex items-center justify-between py-4">
|
||||||
<div class="flex items-center gap-3 group">
|
<div class="flex items-center gap-3 group">
|
||||||
<div class="size-10 rounded-xl bg-linear-to-br from-blue-500 to-blue-600 flex items-center justify-center text-white font-bold text-xl relative overflow-hidden shadow-lg shadow-blue-500/50">
|
<img src="/riwsan.png" alt="Riwa" class="w-10 h-10">
|
||||||
<div class="absolute inset-0 bg-linear-to-tr from-white/0 via-white/20 to-white/0 -translate-x-full group-hover:translate-x-full transition-transform duration-700" />
|
|
||||||
<div class="absolute -inset-1 bg-blue-400/30 rounded-xl blur-md opacity-0 group-hover:opacity-100 animate-pulse-ring" />
|
|
||||||
<span class="relative z-10">R</span>
|
|
||||||
</div>
|
|
||||||
<h1 class="text-xl font-bold bg-linear-to-r from-gray-900 via-primary-600 to-purple-600 dark:from-white dark:via-primary-400 dark:to-purple-400 bg-clip-text text-transparent animate-gradient">
|
<h1 class="text-xl font-bold bg-linear-to-r from-gray-900 via-primary-600 to-purple-600 dark:from-white dark:via-primary-400 dark:to-purple-400 bg-clip-text text-transparent animate-gradient">
|
||||||
{{ t('appName') }}
|
{{ t('appName') }}
|
||||||
</h1>
|
</h1>
|
||||||
@@ -185,11 +181,8 @@ useHead({
|
|||||||
|
|
||||||
<div class="flex items-start gap-4 relative z-10">
|
<div class="flex items-start gap-4 relative z-10">
|
||||||
<!-- App Icon -->
|
<!-- App Icon -->
|
||||||
<div class="size-16 rounded-2xl bg-linear-to-br from-blue-500 to-blue-600 flex items-center justify-center text-white font-bold text-2xl shrink-0 shadow-lg shadow-blue-500/50 relative overflow-hidden group-hover:shadow-2xl group-hover:shadow-blue-500/60 transition-all duration-500 group-hover:scale-110 group-hover:rotate-3 group-active:scale-105 group-active:rotate-1 p-2">
|
<!-- 动态发光效果 -->
|
||||||
<!-- 动态发光效果 -->
|
<img :src="app.icon" :alt="app.name" class="size-16 object-contain relative z-10 rounded-lg transition-all duration-300 group-active:scale-95 group-hover:-rotate-3">
|
||||||
<div class="absolute inset-0 bg-linear-to-tr from-white/0 via-white/30 to-white/0 -translate-x-full group-hover:translate-x-full group-active:translate-x-[50%] transition-transform duration-700" />
|
|
||||||
<img :src="app.icon" :alt="app.name" class="size-full object-contain relative z-10 rounded-lg transition-all duration-300 group-active:scale-95 group-hover:-rotate-3">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- App Info -->
|
<!-- App Info -->
|
||||||
<div class="flex-1 min-w-0">
|
<div class="flex-1 min-w-0">
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
|
||||||
<defs>
|
|
||||||
<linearGradient id="grad" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
||||||
<stop offset="0%" style="stop-color:#3b82f6;stop-opacity:1" />
|
|
||||||
<stop offset="100%" style="stop-color:#2563eb;stop-opacity:1" />
|
|
||||||
</linearGradient>
|
|
||||||
</defs>
|
|
||||||
<rect width="100" height="100" rx="20" fill="url(#grad)"/>
|
|
||||||
<text x="50" y="70" font-family="Arial, sans-serif" font-size="60" font-weight="bold" fill="white" text-anchor="middle">R</text>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 510 B |
BIN
packages/distribute/public/riwsan.png
Normal file
BIN
packages/distribute/public/riwsan.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
BIN
public/riwsan.jpg
Normal file
BIN
public/riwsan.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
@@ -1,11 +1,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { App as CapacitorApp } from "@capacitor/app";
|
import { App as CapacitorApp } from "@capacitor/app";
|
||||||
import { tradeWebSocket } from "./tradingview/websocket";
|
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const { isAuthenticated } = storeToRefs(userStore);
|
const { isAuthenticated } = storeToRefs(userStore);
|
||||||
const { locale, loadSavedLanguage } = useLanguage();
|
const { locale, loadSavedLanguage } = useLanguage();
|
||||||
const { initializeWallet } = useWalletStore();
|
|
||||||
const { updateProfile } = useUserStore();
|
const { updateProfile } = useUserStore();
|
||||||
const platform = usePlatform();
|
const platform = usePlatform();
|
||||||
const { checkAndPromptUpdate } = useAppUpdate();
|
const { checkAndPromptUpdate } = useAppUpdate();
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ export const countries: PhoneCountry[] = [
|
|||||||
name: "中国大陆",
|
name: "中国大陆",
|
||||||
pattern: /^1[3-9]\d{9}$/,
|
pattern: /^1[3-9]\d{9}$/,
|
||||||
maxLength: 11,
|
maxLength: 11,
|
||||||
placeholder: "13800138000",
|
|
||||||
icon: CircleFlagsZh,
|
icon: CircleFlagsZh,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -50,7 +49,6 @@ export const countries: PhoneCountry[] = [
|
|||||||
name: "中国香港",
|
name: "中国香港",
|
||||||
pattern: /^[5-9]\d{7}$/,
|
pattern: /^[5-9]\d{7}$/,
|
||||||
maxLength: 8,
|
maxLength: 8,
|
||||||
placeholder: "51234567",
|
|
||||||
icon: CircleFlagsCnHk,
|
icon: CircleFlagsCnHk,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -59,7 +57,6 @@ export const countries: PhoneCountry[] = [
|
|||||||
name: "中国台湾",
|
name: "中国台湾",
|
||||||
pattern: /^9\d{8}$/,
|
pattern: /^9\d{8}$/,
|
||||||
maxLength: 9,
|
maxLength: 9,
|
||||||
placeholder: "912345678",
|
|
||||||
icon: CircleFlagsTw,
|
icon: CircleFlagsTw,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -68,7 +65,6 @@ export const countries: PhoneCountry[] = [
|
|||||||
name: "美国",
|
name: "美国",
|
||||||
pattern: /^\d{10}$/,
|
pattern: /^\d{10}$/,
|
||||||
maxLength: 10,
|
maxLength: 10,
|
||||||
placeholder: "2025550123",
|
|
||||||
icon: CircleFlagsEnUs,
|
icon: CircleFlagsEnUs,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -14,6 +14,5 @@ export interface PhoneCountry {
|
|||||||
name: string;
|
name: string;
|
||||||
pattern: RegExp;
|
pattern: RegExp;
|
||||||
maxLength: number;
|
maxLength: number;
|
||||||
placeholder: string;
|
|
||||||
icon: FunctionalComponent<SVGAttributes>;
|
icon: FunctionalComponent<SVGAttributes>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,10 @@
|
|||||||
"wallet": "المحفظة",
|
"wallet": "المحفظة",
|
||||||
"recharge": "إيداع",
|
"recharge": "إيداع",
|
||||||
"withdraw": "سحب",
|
"withdraw": "سحب",
|
||||||
"transfer": "تحويل",
|
"transfer": {
|
||||||
|
"selectCurrency": "اختر العملة",
|
||||||
|
"all": "الكل"
|
||||||
|
},
|
||||||
"balance": "الرصيد",
|
"balance": "الرصيد",
|
||||||
"funding": {
|
"funding": {
|
||||||
"title": "حساب التمويل",
|
"title": "حساب التمويل",
|
||||||
@@ -1015,6 +1018,7 @@
|
|||||||
"nativeAppDesc": "بالفعل أحدث إصدار",
|
"nativeAppDesc": "بالفعل أحدث إصدار",
|
||||||
"notSupportedTitle": "المتصفح غير مدعوم",
|
"notSupportedTitle": "المتصفح غير مدعوم",
|
||||||
"notSupportedDesc": "يرجى استخدام Chrome أو Safari أو Edge",
|
"notSupportedDesc": "يرجى استخدام Chrome أو Safari أو Edge",
|
||||||
|
"loading": "جاري التحميل...",
|
||||||
"iosInstallHeader": "دليل التثبيت على iOS",
|
"iosInstallHeader": "دليل التثبيت على iOS",
|
||||||
"iosInstallMessage": "اضغط على زر المشاركة في الأسفل واختر 'إضافة إلى الشاشة الرئيسية'",
|
"iosInstallMessage": "اضغط على زر المشاركة في الأسفل واختر 'إضافة إلى الشاشة الرئيسية'",
|
||||||
"iosInstallButton": "حسناً",
|
"iosInstallButton": "حسناً",
|
||||||
|
|||||||
@@ -3,7 +3,10 @@
|
|||||||
"wallet": "Wallet",
|
"wallet": "Wallet",
|
||||||
"recharge": "Deposit",
|
"recharge": "Deposit",
|
||||||
"withdraw": "Withdraw",
|
"withdraw": "Withdraw",
|
||||||
"transfer": "Transfer",
|
"transfer": {
|
||||||
|
"selectCurrency": "Select Currency",
|
||||||
|
"all": "All"
|
||||||
|
},
|
||||||
"balance": "Balance",
|
"balance": "Balance",
|
||||||
"funding": {
|
"funding": {
|
||||||
"title": "Funding Account",
|
"title": "Funding Account",
|
||||||
@@ -1015,6 +1018,7 @@
|
|||||||
"nativeAppDesc": "Already latest version",
|
"nativeAppDesc": "Already latest version",
|
||||||
"notSupportedTitle": "Browser not supported",
|
"notSupportedTitle": "Browser not supported",
|
||||||
"notSupportedDesc": "Please use Chrome, Safari, or Edge",
|
"notSupportedDesc": "Please use Chrome, Safari, or Edge",
|
||||||
|
"loading": "Loading...",
|
||||||
"iosInstallHeader": "iOS Installation Guide",
|
"iosInstallHeader": "iOS Installation Guide",
|
||||||
"iosInstallMessage": "Tap the share button at the bottom and select 'Add to Home Screen'",
|
"iosInstallMessage": "Tap the share button at the bottom and select 'Add to Home Screen'",
|
||||||
"iosInstallButton": "Got it",
|
"iosInstallButton": "Got it",
|
||||||
|
|||||||
@@ -3,7 +3,10 @@
|
|||||||
"wallet": "钱包",
|
"wallet": "钱包",
|
||||||
"recharge": "充值",
|
"recharge": "充值",
|
||||||
"withdraw": "提现",
|
"withdraw": "提现",
|
||||||
"transfer": "转账",
|
"transfer": {
|
||||||
|
"selectCurrency": "选择币种",
|
||||||
|
"all": "全部"
|
||||||
|
},
|
||||||
"balance": "余额",
|
"balance": "余额",
|
||||||
"funding": {
|
"funding": {
|
||||||
"title": "资金账户",
|
"title": "资金账户",
|
||||||
@@ -1015,6 +1018,7 @@
|
|||||||
"nativeAppDesc": "已经是最新版本,无需下载",
|
"nativeAppDesc": "已经是最新版本,无需下载",
|
||||||
"notSupportedTitle": "当前浏览器暂不支持应用安装",
|
"notSupportedTitle": "当前浏览器暂不支持应用安装",
|
||||||
"notSupportedDesc": "建议使用 Chrome、Safari 或 Edge 浏览器",
|
"notSupportedDesc": "建议使用 Chrome、Safari 或 Edge 浏览器",
|
||||||
|
"loading": "加载中...",
|
||||||
"iosInstallHeader": "iOS 安装指引",
|
"iosInstallHeader": "iOS 安装指引",
|
||||||
"iosInstallMessage": "请点击浏览器底部的分享按钮,然后选择\"添加到主屏幕\"",
|
"iosInstallMessage": "请点击浏览器底部的分享按钮,然后选择\"添加到主屏幕\"",
|
||||||
"iosInstallButton": "知道了",
|
"iosInstallButton": "知道了",
|
||||||
|
|||||||
@@ -3,7 +3,10 @@
|
|||||||
"wallet": "錢包",
|
"wallet": "錢包",
|
||||||
"recharge": "充值",
|
"recharge": "充值",
|
||||||
"withdraw": "提現",
|
"withdraw": "提現",
|
||||||
"transfer": "轉賬",
|
"transfer": {
|
||||||
|
"selectCurrency": "選擇幣種",
|
||||||
|
"all": "全部"
|
||||||
|
},
|
||||||
"balance": "餘額",
|
"balance": "餘額",
|
||||||
"funding": {
|
"funding": {
|
||||||
"title": "資金賬戶",
|
"title": "資金賬戶",
|
||||||
@@ -1015,6 +1018,7 @@
|
|||||||
"nativeAppDesc": "已經是最新版本,無需下載",
|
"nativeAppDesc": "已經是最新版本,無需下載",
|
||||||
"notSupportedTitle": "當前瀏覽器暫不支持應用安裝",
|
"notSupportedTitle": "當前瀏覽器暫不支持應用安裝",
|
||||||
"notSupportedDesc": "建議使用 Chrome、Safari 或 Edge 瀏覽器",
|
"notSupportedDesc": "建議使用 Chrome、Safari 或 Edge 瀏覽器",
|
||||||
|
"loading": "加載中...",
|
||||||
"iosInstallHeader": "iOS 安裝指引",
|
"iosInstallHeader": "iOS 安裝指引",
|
||||||
"iosInstallMessage": "請點擊瀏覽器底部的分享按鈕,然後選擇\"添加到主屏幕\"",
|
"iosInstallMessage": "請點擊瀏覽器底部的分享按鈕,然後選擇\"添加到主屏幕\"",
|
||||||
"iosInstallButton": "知道了",
|
"iosInstallButton": "知道了",
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ onUnmounted(() => {
|
|||||||
<ui-input
|
<ui-input
|
||||||
v-bind="field"
|
v-bind="field"
|
||||||
v-model="phoneNumber"
|
v-model="phoneNumber"
|
||||||
:placeholder="currentCountry.placeholder"
|
placeholder="请输入手机号"
|
||||||
:maxlength="currentCountry.maxLength"
|
:maxlength="currentCountry.maxLength"
|
||||||
type="tel"
|
type="tel"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -29,13 +29,20 @@ const wasUninstalled = computed(() => {
|
|||||||
return wasInstalled === "true" && !isInstalled.value;
|
return wasInstalled === "true" && !isInstalled.value;
|
||||||
});
|
});
|
||||||
|
|
||||||
// 显示下载按钮的条件
|
// 显示下载按钮的条件:浏览器环境 + 未安装 + (能安装 或 非iOS)
|
||||||
const shouldShowDownloadButton = computed(() => {
|
const shouldShowDownloadButton = computed(() => {
|
||||||
const result = platform === "browser" && !isInstalled.value && (canInstall.value || isIOSSafari);
|
const result = platform === "browser" && !isInstalled.value && (canInstall.value || !isIOS);
|
||||||
console.log("[Download Page] shouldShowDownloadButton:", result);
|
console.log("[Download Page] shouldShowDownloadButton:", result);
|
||||||
return result;
|
return result;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 是否显示不支持提示:浏览器环境 + 不能安装 + 非iOS
|
||||||
|
const shouldShowNotSupported = computed(() => {
|
||||||
|
const result = platform === "browser" && !canInstall.value && !isIOS && !isInstalled.value;
|
||||||
|
console.log("[Download Page] shouldShowNotSupported:", result);
|
||||||
|
return result;
|
||||||
|
});
|
||||||
|
|
||||||
// 处理安装
|
// 处理安装
|
||||||
async function handleInstall() {
|
async function handleInstall() {
|
||||||
if (isIOSSafari) {
|
if (isIOSSafari) {
|
||||||
@@ -99,7 +106,7 @@ watch(isInstalled, (installed) => {
|
|||||||
<div class="flex flex-col items-center min-h-full px-6 py-12">
|
<div class="flex flex-col items-center min-h-full px-6 py-12">
|
||||||
<!-- App Logo & Name -->
|
<!-- App Logo & Name -->
|
||||||
<div class="flex flex-col items-center mb-8">
|
<div class="flex flex-col items-center mb-8">
|
||||||
<img alt="Riwsan 瑞讯" src="/favicon.svg" class="w-16 h-16">
|
<img alt="Riwsan 瑞讯" src="/riwsan.jpg" class="w-16 h-16">
|
||||||
<h1 class="text-3xl font-bold mb-2">
|
<h1 class="text-3xl font-bold mb-2">
|
||||||
{{ appName }}
|
{{ appName }}
|
||||||
</h1>
|
</h1>
|
||||||
@@ -243,7 +250,7 @@ watch(isInstalled, (installed) => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 浏览器不支持提示 -->
|
<!-- 浏览器不支持提示 -->
|
||||||
<div v-else class="w-full max-w-md">
|
<div v-else-if="shouldShowNotSupported" class="w-full max-w-md">
|
||||||
<div class="bg-warning/10 border border-warning/20 rounded-2xl p-6 text-center">
|
<div class="bg-warning/10 border border-warning/20 rounded-2xl p-6 text-center">
|
||||||
<p class="text-sm text-text-600">
|
<p class="text-sm text-text-600">
|
||||||
{{ t("pwa.download.notSupportedTitle") }}
|
{{ t("pwa.download.notSupportedTitle") }}
|
||||||
@@ -253,6 +260,16 @@ watch(isInstalled, (installed) => {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 其他情况:加载中或未知状态 -->
|
||||||
|
<div v-else class="w-full max-w-md">
|
||||||
|
<div class="bg-background-secondary rounded-2xl p-6 text-center">
|
||||||
|
<ion-spinner name="crescent" class="mx-auto mb-4" />
|
||||||
|
<p class="text-sm text-text-500">
|
||||||
|
{{ t("pwa.download.loading") }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
</ion-page>
|
</ion-page>
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ export default defineConfig(({ mode }) => {
|
|||||||
VitePWA({
|
VitePWA({
|
||||||
registerType: "autoUpdate",
|
registerType: "autoUpdate",
|
||||||
injectRegister: "auto",
|
injectRegister: "auto",
|
||||||
includeAssets: ["favicon.svg"],
|
includeAssets: ["riwsan.png"],
|
||||||
devOptions: {
|
devOptions: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
type: "module",
|
type: "module",
|
||||||
@@ -63,15 +63,15 @@ export default defineConfig(({ mode }) => {
|
|||||||
prefer_related_applications: false,
|
prefer_related_applications: false,
|
||||||
icons: [
|
icons: [
|
||||||
{
|
{
|
||||||
src: "/favicon.svg",
|
src: "/riwsan.jpg",
|
||||||
sizes: "any",
|
sizes: "any",
|
||||||
type: "image/svg+xml",
|
type: "image/jpeg",
|
||||||
purpose: "any maskable",
|
purpose: "any maskable",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
workbox: {
|
workbox: {
|
||||||
globPatterns: ["**/*.{js,css,html,ico,png,svg,woff2}"],
|
globPatterns: ["**/*.{js,css,html,ico,png,svg,jpg,woff2}"],
|
||||||
navigateFallback: "/index.html",
|
navigateFallback: "/index.html",
|
||||||
navigateFallbackDenylist: [/^\/api/],
|
navigateFallbackDenylist: [/^\/api/],
|
||||||
cleanupOutdatedCaches: true,
|
cleanupOutdatedCaches: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user