diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json index 81b430e..d43c75c 100644 --- a/.hbuilderx/launch.json +++ b/.hbuilderx/launch.json @@ -6,7 +6,8 @@ "type" : "uni-app:app-ios" }, { - "playground" : "custom", + "customPlaygroundType" : "device", + "playground" : "standard", "type" : "uni-app:app-android" } ] diff --git a/manifest.json b/manifest.json index ef5b69c..27b22e4 100644 --- a/manifest.json +++ b/manifest.json @@ -1,95 +1,111 @@ { - "name" : "alipay-emulator", - "appid" : "__UNI__D535736", - "description" : "", - "versionName" : "1.0.0", - "versionCode" : "100", - "transformPx" : false, - /* 5+App特有相关 */ - "app-plus" : { - "darkmode" : false, - "usingComponents" : true, - "nvueStyleCompiler" : "uni-app", - "compilerVersion" : 3, - "splashscreen" : { - "alwaysShowBeforeRender" : true, - "waiting" : true, - "autoclose" : true, - "delay" : 0 - }, - "optimization" : { - "subPackages" : true - }, - "runmode" : "liberate", // 开启分包优化后,必须配置资源释放模式 - - /* 模块配置 */ - "modules" : { - "Camera" : {}, - "Payment" : {} - }, - /* 应用发布信息 */ - "distribute" : { - /* android打包配置 */ - "android" : { - "permissions" : [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - /* ios打包配置 */ - "ios" : { - "dSYMs" : false - }, - /* SDK配置 */ - "sdkConfigs" : { - "payment" : { - "weixin" : { - "__platform__" : [ "ios", "android" ], - "appid" : "123456", - "UniversalLinks" : "https://hhhhh.com/apple-app-site-association/" - }, - "alipay" : { - "__platform__" : [ "ios", "android" ] - } - } - } - }, - "nvueLaunchMode" : "" - }, - /* 快应用特有相关 */ - "quickapp" : {}, - /* 小程序特有相关 */ - "mp-weixin" : { - "appid" : "", - "setting" : { - "urlCheck" : false - }, - "usingComponents" : true - }, - "mp-alipay" : { - "usingComponents" : true - }, - "mp-baidu" : { - "usingComponents" : true - }, - "mp-toutiao" : { - "usingComponents" : true - }, - "uniStatistics" : { - "enable" : false - }, - "vueVersion" : "3" -} + "name": "alipay-emulator", + "appid": "__UNI__D535736", + "description": "", + "versionName": "1.0.0", + "versionCode": "100", + "transformPx": false, + /* 5+App特有相关 */ + "app-plus": { + "confusion": { + "resources": { + "app-service.js": {} + } + }, + "encryption": { + "wgt": true, + "files": [ + "app-service.js" + ] + }, + "darkmode": false, + "usingComponents": true, + "nvueStyleCompiler": "uni-app", + "compilerVersion": 3, + "splashscreen": { + "alwaysShowBeforeRender": true, + "waiting": true, + "autoclose": true, + "delay": 0 + }, + "optimization": { + "subPackages": false + }, + "runmode": "liberate", // 开启分包优化后,必须配置资源释放模式 + /* 模块配置 */ + "modules": { + "Camera": {}, + "Payment": {} + }, + /* 应用发布信息 */ + "distribute": { + /* android打包配置 */ + "android": { + "permissions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + /* ios打包配置 */ + "ios": { + "dSYMs": false + }, + /* SDK配置 */ + "sdkConfigs": { + "payment": { + "weixin": { + "__platform__": [ + "ios", + "android" + ], + "appid": "123456", + "UniversalLinks": "https://hhhhh.com/apple-app-site-association/" + }, + "alipay": { + "__platform__": [ + "ios", + "android" + ] + } + } + } + }, + "nvueLaunchMode": "" + }, + /* 快应用特有相关 */ + "quickapp": {}, + /* 小程序特有相关 */ + "mp-weixin": { + "appid": "", + "setting": { + "urlCheck": false + }, + "usingComponents": true + }, + "mp-alipay": { + "usingComponents": true + }, + "mp-baidu": { + "usingComponents": true + }, + "mp-toutiao": { + "usingComponents": true + }, + "uniStatistics": { + "enable": false + }, + "vueVersion": "3" +} \ No newline at end of file diff --git a/pages.json b/pages.json index 3801605..6e9478f 100644 --- a/pages.json +++ b/pages.json @@ -73,12 +73,27 @@ }, { "root": "pages/finance-management", "pages": [{ - "path": "index", - "style": { - "navigationBarTitleText": "理财首页", - "navigationStyle": "custom" + "path": "index", + "style": { + "navigationBarTitleText": "理财首页", + "navigationStyle": "custom" + } + }, + { + "path": "select-image/select-image", + "style": { + "navigationBarTitleText": "选择理财图片", + "navigationStyle": "custom" + } + }, + { + "path": "edit/edit", + "style": { + "navigationBarTitleText": "编辑理财数据", + "navigationStyle": "custom" + } } - }] + ] }, { "root": "pages/common", @@ -119,7 +134,9 @@ "packages": [ "pages/balance", "pages/bill", - "pages/common" + "pages/common", + "pages/finance-management", + "pages/ant-credit-pay" ] } }, diff --git a/pages/ant-credit-pay/index.vue b/pages/ant-credit-pay/index.vue index 7a5ca83..a716837 100644 --- a/pages/ant-credit-pay/index.vue +++ b/pages/ant-credit-pay/index.vue @@ -507,13 +507,25 @@ const chooseImage = () => { // 长按事件定时器 let longPressTimer = null -const handleTouchStart = () => { +const handleTouchStart = (e) => { + // 兼容iOS上滑HOME条,如果有底部安全区且触摸位置在底部安全区内,则不触发 + const systemInfo = uni.getSystemInfoSync() + if (systemInfo.platform === 'ios' && systemInfo.safeAreaInsets?.bottom) { + const clientY = e.touches[0].clientY + const windowHeight = systemInfo.windowHeight + // 如果触摸点在底部安全区范围内(通常是34px),则忽略 + if (clientY > windowHeight - systemInfo.safeAreaInsets.bottom) { + return + } + } + longPressTimer = setTimeout(() => { uni.vibrateShort() chooseImage() }, 1200) // 长按时间大于1s } + const handleTouchEnd = () => { if (longPressTimer) { clearTimeout(longPressTimer) diff --git a/pages/balance/index.vue b/pages/balance/index.vue index 1c7f4fd..72e369e 100644 --- a/pages/balance/index.vue +++ b/pages/balance/index.vue @@ -38,7 +38,7 @@ - {{ Number(balance).toFixed(2) }} + {{ numberUtil.formatMoneyWithThousand(balance) }} @@ -116,7 +116,8 @@ import BalanceList from '@/components/balance-list/balance-list.vue' import { fastEntranceList } from '@/static/json/initial.json' import { util, - deviceUtil + deviceUtil, + numberUtil } from '@/utils/common'; import { storage @@ -212,7 +213,9 @@ onLoad(async () => { onShow(() => { // #ifdef APP-PLUS util.setAndroidSystemBarColor('#F0F3F8') - plus.navigator.setStatusBarStyle("light"); + setTimeout(() => { + plus.navigator.setStatusBarStyle("light"); + }, 500) // #endif // 获取快速入口配置 diff --git a/pages/finance-management/edit/edit.vue b/pages/finance-management/edit/edit.vue new file mode 100644 index 0000000..ffa8b76 --- /dev/null +++ b/pages/finance-management/edit/edit.vue @@ -0,0 +1,222 @@ + + + + + + + diff --git a/pages/finance-management/index.vue b/pages/finance-management/index.vue index 32ce99f..2bd295f 100644 --- a/pages/finance-management/index.vue +++ b/pages/finance-management/index.vue @@ -8,10 +8,12 @@ + - + @@ -27,8 +29,12 @@ + + + @@ -65,12 +71,14 @@ + {{ item.title }} + + \ No newline at end of file diff --git a/pages/finance-management/select-image/select-image.vue b/pages/finance-management/select-image/select-image.vue new file mode 100644 index 0000000..e2c73a1 --- /dev/null +++ b/pages/finance-management/select-image/select-image.vue @@ -0,0 +1,162 @@ + + + + + diff --git a/pages/index/index.nvue b/pages/index/index.nvue index ef4cdca..82e0716 100644 --- a/pages/index/index.nvue +++ b/pages/index/index.nvue @@ -42,7 +42,7 @@ - + @@ -306,13 +306,16 @@ const setUserData = () => { // 配置信息 - 安全访问 const configData = storage.get("config") if (configData && configData.config) { + console.log("公告牌配置信息", configData.config['client.uniapp.notice']) data.noticeInfo = configData.config['client.uniapp.notice'] || { text: '加载中...', - url: '' + url: '', + enable: false } data.noticeInfo = configData.config['client.uniapp.notice'] || { text: '加载中...', - url: '' + url: '', + enable: false } // 启动走马灯 startMarquee(); @@ -320,7 +323,8 @@ const setUserData = () => { } else { data.noticeInfo = { text: '加载中...', - url: '' + url: '', + enable: false } data.videoHelpList = [] } diff --git a/static/image/finance-management/active.png b/static/image/finance-management/active.png new file mode 100644 index 0000000..c56cd47 Binary files /dev/null and b/static/image/finance-management/active.png differ diff --git a/static/image/finance-management/bg-style/style-1.png b/static/image/finance-management/bg-style/style-1.png new file mode 100644 index 0000000..d6ae727 Binary files /dev/null and b/static/image/finance-management/bg-style/style-1.png differ diff --git a/static/image/finance-management/bg-style/style-2.png b/static/image/finance-management/bg-style/style-2.png new file mode 100644 index 0000000..88a5ce5 Binary files /dev/null and b/static/image/finance-management/bg-style/style-2.png differ diff --git a/static/image/finance-management/bg-style/style-3.png b/static/image/finance-management/bg-style/style-3.png new file mode 100644 index 0000000..7a13d63 Binary files /dev/null and b/static/image/finance-management/bg-style/style-3.png differ diff --git a/static/image/finance-management/bg-style/style-4.png b/static/image/finance-management/bg-style/style-4.png new file mode 100644 index 0000000..3c94f43 Binary files /dev/null and b/static/image/finance-management/bg-style/style-4.png differ diff --git a/static/image/finance-management/bg-style/style-5.png b/static/image/finance-management/bg-style/style-5.png new file mode 100644 index 0000000..fe1ea50 Binary files /dev/null and b/static/image/finance-management/bg-style/style-5.png differ diff --git a/static/image/finance-management/bg-style/style-6.png b/static/image/finance-management/bg-style/style-6.png new file mode 100644 index 0000000..0b6892f Binary files /dev/null and b/static/image/finance-management/bg-style/style-6.png differ diff --git a/static/image/finance-management/bg-style/style.png b/static/image/finance-management/bg-style/style.png new file mode 100644 index 0000000..e4b5627 Binary files /dev/null and b/static/image/finance-management/bg-style/style.png differ diff --git a/static/image/finance-management/covers/cover-1.png b/static/image/finance-management/covers/cover-1.png new file mode 100644 index 0000000..85af47c Binary files /dev/null and b/static/image/finance-management/covers/cover-1.png differ diff --git a/static/image/finance-management/covers/cover-2.png b/static/image/finance-management/covers/cover-2.png new file mode 100644 index 0000000..d1907e4 Binary files /dev/null and b/static/image/finance-management/covers/cover-2.png differ diff --git a/static/image/finance-management/covers/cover-3.png b/static/image/finance-management/covers/cover-3.png new file mode 100644 index 0000000..6744e33 Binary files /dev/null and b/static/image/finance-management/covers/cover-3.png differ diff --git a/static/image/finance-management/covers/cover-4.png b/static/image/finance-management/covers/cover-4.png new file mode 100644 index 0000000..1de35d1 Binary files /dev/null and b/static/image/finance-management/covers/cover-4.png differ diff --git a/static/image/finance-management/covers/cover-5.png b/static/image/finance-management/covers/cover-5.png new file mode 100644 index 0000000..2c9e34b Binary files /dev/null and b/static/image/finance-management/covers/cover-5.png differ diff --git a/static/image/finance-management/covers/cover-6.png b/static/image/finance-management/covers/cover-6.png new file mode 100644 index 0000000..c1bc6ea Binary files /dev/null and b/static/image/finance-management/covers/cover-6.png differ diff --git a/store/index.js b/store/index.js index 4cfcb91..b254c61 100644 --- a/store/index.js +++ b/store/index.js @@ -70,34 +70,6 @@ export const useStore = () => { return JSON.parse(JSON.stringify(store.billList)) } - - // 优化后的监听:使用防抖减少存储频率 - const debouncedSaveSettings = debounce((newValue) => { - storage.set('settings', newValue) - }, 500) - - watch( - () => store.userInfo, - (newValue) => storage.set('userInfo', newValue), - { deep: true } - ); - - watch( - () => store.settings, - (newValue) => debouncedSaveSettings(newValue), - { deep: true } - ); - - // 监听billList改变自动保存 - watch( - () => store.billList, - (newValue) => { - console.log("store.billList") - storage.set('bill_list', newValue) - }, - { deep: true } - ); - return { store, addBill, @@ -106,3 +78,31 @@ export const useStore = () => { getBillList }; }; + +// 优化后的监听:使用防抖减少存储频率 +const debouncedSaveSettings = debounce((newValue) => { + storage.set('settings', newValue) +}, 500) + +watch( + () => store.userInfo, + (newValue) => storage.set('userInfo', newValue), + { deep: true } +); + +watch( + () => store.settings, + (newValue) => debouncedSaveSettings(newValue), + { deep: true } +); + +// 监听billList改变自动保存 +watch( + () => store.billList, + (newValue) => { + console.log("store.billList changed, saving...") + storage.set('bill_list', newValue) + }, + { deep: true } +); + diff --git a/utils/common.js b/utils/common.js index 6d408e4..2e62542 100644 --- a/utils/common.js +++ b/utils/common.js @@ -393,9 +393,11 @@ export const util = { * @returns {void} */ setAndroidSystemBarColor(backgroundColor, frontColor = "#000000") { - if (deviceUtil.isAndroid()) { + // 使用同步方式判断或直接通过编译宏/plus判断 + const isAndroid = uni.getSystemInfoSync().platform === 'android'; + if (isAndroid) { try { - // #ifndef APP-IOS + // #ifdef APP-PLUS if (plus.os.name === 'Android') { let color = plus.android.newObject("android.graphics.Color"); let activity = plus.android.runtimeMainActivity();