修改小宝模拟器bug

This commit is contained in:
tangxinyue 2026-03-02 14:36:46 +08:00
parent c6dcc7ab4d
commit d8f440ed1f
7 changed files with 629 additions and 1171 deletions

View File

@ -27,7 +27,7 @@ export function createApp() {
const systemInfo = uni.getStorageSync('systemInfo') || {} const systemInfo = uni.getStorageSync('systemInfo') || {}
app.config.globalProperties.$system = systemInfo.platform == 'ios' ? 'iOS' : 'Android' app.config.globalProperties.$system = systemInfo.platform == 'ios' ? 'iOS' : 'Android'
app.config.globalProperties.$systemInfo = systemInfo app.config.globalProperties.$systemInfo = systemInfo
uni.setStorageSync('version', '1.0.2.sp4') uni.setStorageSync('version', '1.0.2.sp8')
app.config.globalProperties.$version = uni.getStorageSync('version') app.config.globalProperties.$version = uni.getStorageSync('version')
app.use(globalMethods); app.use(globalMethods);

View File

@ -1,37 +1,38 @@
{ {
"name": "alipay-emulator", "name" : "alipay-emulator",
"appid": "__UNI__D535736", "appid" : "__UNI__D535736",
"description": "", "description" : "",
"versionName": "1.0.0", "versionName" : "1.0.0",
"versionCode": 100, "versionCode" : 100,
"transformPx": false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus": { "app-plus" : {
"darkmode": false, "darkmode" : false,
"usingComponents": true, "usingComponents" : true,
"nvueStyleCompiler": "uni-app", "nvueStyleCompiler" : "uni-app",
"compilerVersion": 3, "compilerVersion" : 3,
"splashscreen": { "splashscreen" : {
"alwaysShowBeforeRender": true, "alwaysShowBeforeRender" : true,
"waiting": true, "waiting" : true,
"autoclose": true, "autoclose" : true,
"delay": 0 "delay" : 0
}, },
"optimization": { "optimization" : {
"subPackages": true "subPackages" : true
}, },
"runmode": "liberate", // "runmode" : "liberate", //
/* */ /* */
"modules": { "modules" : {
"Camera": {}, "Camera" : {},
"Payment": {}, "Payment" : {},
"LivePusher": {} "LivePusher" : {}
}, },
/* */ /* */
"distribute": { "distribute" : {
/* android */ /* android */
"android": { "android" : {
"permissions": [ "permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
@ -50,52 +51,46 @@
] ]
}, },
/* ios */ /* ios */
"ios": { "ios" : {
"dSYMs": false "dSYMs" : false
}, },
/* SDK */ /* SDK */
"sdkConfigs": { "sdkConfigs" : {
"payment": { "payment" : {
"weixin": { "weixin" : {
"__platform__": [ "__platform__" : [ "ios", "android" ],
"ios", "appid" : "123456",
"android" "UniversalLinks" : "https://hhhhh.com/apple-app-site-association/"
],
"appid": "123456",
"UniversalLinks": "https://hhhhh.com/apple-app-site-association/"
}, },
"alipay": { "alipay" : {
"__platform__": [ "__platform__" : [ "ios", "android" ]
"ios",
"android"
]
} }
} }
} }
}, },
"nvueLaunchMode": "" "nvueLaunchMode" : ""
}, },
/* */ /* */
"quickapp": {}, "quickapp" : {},
/* */ /* */
"mp-weixin": { "mp-weixin" : {
"appid": "", "appid" : "",
"setting": { "setting" : {
"urlCheck": false "urlCheck" : false
}, },
"usingComponents": true "usingComponents" : true
}, },
"mp-alipay": { "mp-alipay" : {
"usingComponents": true "usingComponents" : true
}, },
"mp-baidu": { "mp-baidu" : {
"usingComponents": true "usingComponents" : true
}, },
"mp-toutiao": { "mp-toutiao" : {
"usingComponents": true "usingComponents" : true
}, },
"uniStatistics": { "uniStatistics" : {
"enable": false "enable" : false
}, },
"vueVersion": "3" "vueVersion" : "3"
} }

576
package-lock.json generated
View File

@ -6,104 +6,11 @@
"packages": { "packages": {
"": { "": {
"name": "video-player 视频播放器 html5视频播放器-解决频层级、覆盖", "name": "video-player 视频播放器 html5视频播放器-解决频层级、覆盖",
"version": "2.0.0" "version": "2.0.0",
},
"node_modules/@dcloudio/types": {
"version": "3.4.28",
"resolved": "https://registry.npmjs.org/@dcloudio/types/-/types-3.4.28.tgz",
"integrity": "sha512-uVIRp1VLBkrL0LaGLgIS/sT3bl1zzVTKZQbfqJEQcSAvBffRdirbSh5OvOHfA1WV5lmCAGfjhKsUQouNEVUQHg==",
"peer": true
},
"node_modules/@dcloudio/uni-app": {
"version": "2.0.2-4080720251210002",
"resolved": "https://registry.npmjs.org/@dcloudio/uni-app/-/uni-app-2.0.2-4080720251210002.tgz",
"integrity": "sha512-FUw/bJJwBPl/scKBog21wusICrU9T4TFwyKKVbtNbWIO98IBzjRIin0mmwzhqHNL1kZO0LbwnoRe7LtusW8LQw==",
"peerDependencies": {
"@dcloudio/types": "^3.0.15",
"@vue/composition-api": "^1.7.0"
}
},
"node_modules/@dcloudio/uni-cli-shared": {
"version": "2.0.2-4080720251210002",
"resolved": "https://registry.npmjs.org/@dcloudio/uni-cli-shared/-/uni-cli-shared-2.0.2-4080720251210002.tgz",
"integrity": "sha512-EIvkRTpB/aRP3bZZYAtiBdXrM1IBqhJDgCf13TAuE84F9ma1b2kD088yAi2Hf0hqv3X+368eX5E2aqyficSZvg==",
"dependencies": { "dependencies": {
"escape-string-regexp": "^4.0.0", "crypto-js": "^4.2.0",
"fast-glob": "^3.2.11", "lottie-web": "^5.13.0",
"fs-extra": "^10.0.0", "uuid": "^13.0.0"
"glob-escape": "^0.0.2",
"hash-sum": "^1.0.2",
"postcss-urlrewrite": "^0.2.2",
"strip-json-comments": "^2.0.1"
}
},
"node_modules/@dcloudio/uni-ui": {
"version": "1.5.11",
"resolved": "https://registry.npmjs.org/@dcloudio/uni-ui/-/uni-ui-1.5.11.tgz",
"integrity": "sha512-DBtk046ofmeFd82zRI7d89SoEwrAxYzUN3WVPm1DIBkpLPG5F5QDNkHMnZGu2wNrMEmGBjBpUh3vqEY1L3jaMw=="
},
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
"integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
"dependencies": {
"@nodelib/fs.stat": "2.0.5",
"run-parallel": "^1.1.9"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/@nodelib/fs.stat": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
"integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
"engines": {
"node": ">= 8"
}
},
"node_modules/@nodelib/fs.walk": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
"integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
"dependencies": {
"@nodelib/fs.scandir": "2.1.5",
"fastq": "^1.6.0"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/@vue/composition-api": {
"version": "1.7.2",
"resolved": "https://registry.npmjs.org/@vue/composition-api/-/composition-api-1.7.2.tgz",
"integrity": "sha512-M8jm9J/laYrYT02665HkZ5l2fWTK4dcVg3BsDHm/pfz+MjDYwX+9FUaZyGwEyXEDonQYRCo0H7aLgdklcIELjw==",
"peer": true,
"peerDependencies": {
"vue": ">= 2.5 < 2.7"
}
},
"node_modules/braces": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"dependencies": {
"fill-range": "^7.1.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/copy-anything": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.6.tgz",
"integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==",
"dev": true,
"dependencies": {
"is-what": "^3.14.1"
},
"funding": {
"url": "https://github.com/sponsors/mesqueeb"
} }
}, },
"node_modules/crypto-js": { "node_modules/crypto-js": {
@ -111,479 +18,11 @@
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz",
"integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==" "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
}, },
"node_modules/errno": {
"version": "0.1.8",
"resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz",
"integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==",
"dev": true,
"optional": true,
"dependencies": {
"prr": "~1.0.1"
},
"bin": {
"errno": "cli.js"
}
},
"node_modules/escape-string-regexp": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
"integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/fast-glob": {
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz",
"integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==",
"dependencies": {
"@nodelib/fs.stat": "^2.0.2",
"@nodelib/fs.walk": "^1.2.3",
"glob-parent": "^5.1.2",
"merge2": "^1.3.0",
"micromatch": "^4.0.8"
},
"engines": {
"node": ">=8.6.0"
}
},
"node_modules/fastq": {
"version": "1.20.1",
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz",
"integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==",
"dependencies": {
"reusify": "^1.0.4"
}
},
"node_modules/fill-range": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"dependencies": {
"to-regex-range": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/fs-extra": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
"dependencies": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/glob-escape": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/glob-escape/-/glob-escape-0.0.2.tgz",
"integrity": "sha512-L/cXYz8x7qer1HAyUQ+mbjcUsJVdpRxpAf7CwqHoNBs9vTpABlGfNN4tzkDxt+u3Z7ZncVyKlCNPtzb0R/7WbA==",
"engines": {
"node": ">= 0.10"
}
},
"node_modules/glob-parent": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
"dependencies": {
"is-glob": "^4.0.1"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/graceful-fs": {
"version": "4.2.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="
},
"node_modules/hash-sum": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz",
"integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA=="
},
"node_modules/iconv-lite": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
"dev": true,
"optional": true,
"dependencies": {
"safer-buffer": ">= 2.1.2 < 3.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/image-size": {
"version": "0.5.5",
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz",
"integrity": "sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==",
"dev": true,
"optional": true,
"bin": {
"image-size": "bin/image-size.js"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-extglob": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-glob": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
"dependencies": {
"is-extglob": "^2.1.1"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-number": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"engines": {
"node": ">=0.12.0"
}
},
"node_modules/is-what": {
"version": "3.14.1",
"resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz",
"integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==",
"dev": true
},
"node_modules/jsonfile": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz",
"integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==",
"dependencies": {
"universalify": "^2.0.0"
},
"optionalDependencies": {
"graceful-fs": "^4.1.6"
}
},
"node_modules/less": {
"version": "4.5.1",
"resolved": "https://registry.npmjs.org/less/-/less-4.5.1.tgz",
"integrity": "sha512-UKgI3/KON4u6ngSsnDADsUERqhZknsVZbnuzlRZXLQCmfC/MDld42fTydUE9B+Mla1AL6SJ/Pp6SlEFi/AVGfw==",
"dev": true,
"hasInstallScript": true,
"dependencies": {
"copy-anything": "^2.0.1",
"parse-node-version": "^1.0.1",
"tslib": "^2.3.0"
},
"bin": {
"lessc": "bin/lessc"
},
"engines": {
"node": ">=14"
},
"optionalDependencies": {
"errno": "^0.1.1",
"graceful-fs": "^4.1.2",
"image-size": "~0.5.0",
"make-dir": "^2.1.0",
"mime": "^1.4.1",
"needle": "^3.1.0",
"source-map": "~0.6.0"
}
},
"node_modules/less-loader": {
"version": "12.3.0",
"resolved": "https://registry.npmjs.org/less-loader/-/less-loader-12.3.0.tgz",
"integrity": "sha512-0M6+uYulvYIWs52y0LqN4+QM9TqWAohYSNTo4htE8Z7Cn3G/qQMEmktfHmyJT23k+20kU9zHH2wrfFXkxNLtVw==",
"dev": true,
"engines": {
"node": ">= 18.12.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/webpack"
},
"peerDependencies": {
"@rspack/core": "0.x || 1.x",
"less": "^3.5.0 || ^4.0.0",
"webpack": "^5.0.0"
},
"peerDependenciesMeta": {
"@rspack/core": {
"optional": true
},
"webpack": {
"optional": true
}
}
},
"node_modules/lottie-web": { "node_modules/lottie-web": {
"version": "5.13.0", "version": "5.13.0",
"resolved": "https://registry.npmjs.org/lottie-web/-/lottie-web-5.13.0.tgz", "resolved": "https://registry.npmjs.org/lottie-web/-/lottie-web-5.13.0.tgz",
"integrity": "sha512-+gfBXl6sxXMPe8tKQm7qzLnUy5DUPJPKIyRHwtpCpyUEYjHYRJC/5gjUvdkuO2c3JllrPtHXH5UJJK8LRYl5yQ==" "integrity": "sha512-+gfBXl6sxXMPe8tKQm7qzLnUy5DUPJPKIyRHwtpCpyUEYjHYRJC/5gjUvdkuO2c3JllrPtHXH5UJJK8LRYl5yQ=="
}, },
"node_modules/make-dir": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
"integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
"dev": true,
"optional": true,
"dependencies": {
"pify": "^4.0.1",
"semver": "^5.6.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/merge2": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
"integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
"engines": {
"node": ">= 8"
}
},
"node_modules/micromatch": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
"integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
"dependencies": {
"braces": "^3.0.3",
"picomatch": "^2.3.1"
},
"engines": {
"node": ">=8.6"
}
},
"node_modules/mime": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
"dev": true,
"optional": true,
"bin": {
"mime": "cli.js"
},
"engines": {
"node": ">=4"
}
},
"node_modules/needle": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/needle/-/needle-3.3.1.tgz",
"integrity": "sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q==",
"dev": true,
"optional": true,
"dependencies": {
"iconv-lite": "^0.6.3",
"sax": "^1.2.4"
},
"bin": {
"needle": "bin/needle"
},
"engines": {
"node": ">= 4.4.x"
}
},
"node_modules/parse-node-version": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz",
"integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==",
"dev": true,
"engines": {
"node": ">= 0.10"
}
},
"node_modules/picomatch": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"engines": {
"node": ">=8.6"
},
"funding": {
"url": "https://github.com/sponsors/jonschlinkert"
}
},
"node_modules/pify": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
"dev": true,
"optional": true,
"engines": {
"node": ">=6"
}
},
"node_modules/postcss-helpers": {
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/postcss-helpers/-/postcss-helpers-0.3.3.tgz",
"integrity": "sha512-VumiUcrpbxGlTBNQj6fUOkb/HNRUk/xYz8bNlhgVOdvk3yWEy4B+0nlDUZZM9mTVZ5bJoxUy7WT6z/4E7oMTgw==",
"dependencies": {
"urijs": "^1.18.12"
},
"engines": {
"node": ">=0.12.9"
}
},
"node_modules/postcss-urlrewrite": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/postcss-urlrewrite/-/postcss-urlrewrite-0.2.2.tgz",
"integrity": "sha512-DxPSgykgHjoV4Z+ygvq2C5HkiuiKQQD74xpoNQSQuyi8zab9nODVtNKfnCN6BEv9VZrjpOGLGAf8BDvgG6EtHg==",
"dependencies": {
"postcss-helpers": "^0.3.2"
},
"engines": {
"node": ">=0.12.9"
}
},
"node_modules/prr": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
"integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==",
"dev": true,
"optional": true
},
"node_modules/queue-microtask": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
"integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/reusify": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz",
"integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==",
"engines": {
"iojs": ">=1.0.0",
"node": ">=0.10.0"
}
},
"node_modules/run-parallel": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
"integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"dependencies": {
"queue-microtask": "^1.2.2"
}
},
"node_modules/safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
"dev": true,
"optional": true
},
"node_modules/sax": {
"version": "1.4.3",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.4.3.tgz",
"integrity": "sha512-yqYn1JhPczigF94DMS+shiDMjDowYO6y9+wB/4WgO0Y19jWYk0lQ4tuG5KI7kj4FTp1wxPj5IFfcrz/s1c3jjQ==",
"dev": true,
"optional": true
},
"node_modules/semver": {
"version": "5.7.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
"integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
"dev": true,
"optional": true,
"bin": {
"semver": "bin/semver"
}
},
"node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
"optional": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/strip-json-comments": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
"integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dependencies": {
"is-number": "^7.0.0"
},
"engines": {
"node": ">=8.0"
}
},
"node_modules/tslib": {
"version": "2.8.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
"dev": true
},
"node_modules/universalify": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
"integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",
"engines": {
"node": ">= 10.0.0"
}
},
"node_modules/urijs": {
"version": "1.19.11",
"resolved": "https://registry.npmjs.org/urijs/-/urijs-1.19.11.tgz",
"integrity": "sha512-HXgFDgDommxn5/bIv0cnQZsPhHDA90NPHD6+c/v21U5+Sx5hoP8+dP9IZXBU1gIfvdRfhG8cel9QNPeionfcCQ=="
},
"node_modules/uuid": { "node_modules/uuid": {
"version": "13.0.0", "version": "13.0.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-13.0.0.tgz", "resolved": "https://registry.npmjs.org/uuid/-/uuid-13.0.0.tgz",
@ -595,13 +34,6 @@
"bin": { "bin": {
"uuid": "dist-node/bin/uuid" "uuid": "dist-node/bin/uuid"
} }
},
"node_modules/vue": {
"version": "2.6.14",
"resolved": "https://registry.npmjs.org/vue/-/vue-2.6.14.tgz",
"integrity": "sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ==",
"deprecated": "Vue 2 has reached EOL and is no longer actively maintained. See https://v2.vuejs.org/eol/ for more details.",
"peer": true
} }
} }
} }

View File

@ -16,5 +16,10 @@
"前端组件", "前端组件",
"通用组件" "通用组件"
] ]
},
"dependencies": {
"crypto-js": "^4.2.0",
"lottie-web": "^5.13.0",
"uuid": "^13.0.0"
} }
} }

View File

@ -86,10 +86,10 @@
<text class="label">到达机场</text> <text class="label">到达机场</text>
<input class="input" v-model="ticketsInfo.flightInfo.endAirport" /> <input class="input" v-model="ticketsInfo.flightInfo.endAirport" />
</view> </view>
<!-- <view class="form-item"> <view class="form-item">
<text class="label">时长</text> <text class="label">时长</text>
<input class="input" v-model="ticketsInfo.flightInfo.duration" placeholder="例: 2时5分" /> <input class="input" v-model="ticketsInfo.flightInfo.duration" placeholder="例: 2时5分" />
</view> --> </view>
<view class="form-item"> <view class="form-item">
<text class="label">机型</text> <text class="label">机型</text>
<input class="input" v-model="ticketsInfo.flightInfo.aircraftType" /> <input class="input" v-model="ticketsInfo.flightInfo.aircraftType" />

View File

@ -205,7 +205,7 @@
<view class="info" @click="goEdit"> <view class="info" @click="goEdit">
<text class="name">{{ item.name }}</text> <text class="name">{{ item.name }}</text>
<text class="id-card">{{ item.idType }}{{ item.idType === '身份证' ? <text class="id-card">{{ item.idType }}{{ item.idType === '身份证' ?
stringUtil.maskIdCard(item.idNumber) : (item.idType === '护照' ? showFristAndLastNumber(item.idNumber) : (item.idType === '护照' ?
stringUtil.maskPassport(item.idNumber) : item.idNumber) }}</text> stringUtil.maskPassport(item.idNumber) : item.idNumber) }}</text>
<view class="ticket-row"> <view class="ticket-row">
<text class="ticket-no">票号{{ item.ticketNo }}</text> <text class="ticket-no">票号{{ item.ticketNo }}</text>
@ -371,6 +371,17 @@ const deepMerge = (target, source) => {
return target; return target;
}; };
const showFristAndLastNumber = (str) => {
if (!str) {
return '';
}
const len = str.length;
if (len <= 2) {
return str;
}
return str.slice(0, 1) + '*'.repeat(len - 2) + str.slice(-1);
}
onShow(() => { onShow(() => {
const stored = uni.getStorageSync(data.STORAGE_KEY) || ""; const stored = uni.getStorageSync(data.STORAGE_KEY) || "";
if (stored) { if (stored) {

View File

@ -71,10 +71,10 @@
<view class="input">{{ ticketsInfo.ticketInfo.arrivalTime }}</view> <view class="input">{{ ticketsInfo.ticketInfo.arrivalTime }}</view>
</view> </view>
</picker> </picker>
<!-- <view class="form-item"> <view class="form-item">
<text class="label">历时</text> <text class="label">历时</text>
<input class="input" v-model="ticketsInfo.ticketInfo.duration" disabled /> <input class="input" v-model="ticketsInfo.ticketInfo.duration" />
</view> --> </view>
</view> </view>
</view> </view>
@ -162,10 +162,15 @@
</template> </template>
<script setup> <script setup>
import NavBar from '@/components/nav-bar/nav-bar.vue' import NavBar from '@/components/nav-bar/nav-bar.vue'
import { reactive, toRefs, onMounted, computed } from 'vue'; import {
reactive,
toRefs,
onMounted,
computed
} from 'vue';
const defaultData = { const defaultData = {
"orderInfo": { "orderInfo": {
"orderNo": "EJ66223536", "orderNo": "EJ66223536",
"orderTime": "2026.01.01" "orderTime": "2026.01.01"
@ -181,8 +186,7 @@ const defaultData = {
"weekDay": "星期四", "weekDay": "星期四",
"gate": "6B" "gate": "6B"
}, },
"passengerList": [ "passengerList": [{
{
"name": "张元英", "name": "张元英",
"type": "成人票", "type": "成人票",
"seatType": "商务座", "seatType": "商务座",
@ -192,17 +196,15 @@ const defaultData = {
"price": "2110", "price": "2110",
"status": "已支付", "status": "已支付",
"isMe": true "isMe": true
} }],
],
"hotelInfo": { "hotelInfo": {
"city": "上海", "city": "上海",
"startDay": "01-01", "startDay": "01-01",
"endDay": "01-02" "endDay": "01-02"
} }
} }
// //
const ticketType = [ const ticketType = [{
{
label: '成人票', label: '成人票',
value: '1' value: '1'
}, },
@ -218,9 +220,9 @@ const ticketType = [
label: '残疾军人票', label: '残疾军人票',
value: '4' value: '4'
} }
] ]
const data = reactive({ const data = reactive({
ticketsInfo: JSON.parse(JSON.stringify(defaultData)), ticketsInfo: JSON.parse(JSON.stringify(defaultData)),
collapsed: { collapsed: {
orderInfo: true, orderInfo: true,
@ -228,28 +230,33 @@ const data = reactive({
passengerList: false, passengerList: false,
hotelInfo: true hotelInfo: true
} }
}) })
const { ticketsInfo, collapsed } = toRefs(data) const {
ticketsInfo,
collapsed
} = toRefs(data)
const ticketYear = computed(() => { const ticketYear = computed(() => {
const dateStr = data.ticketsInfo.ticketInfo.date; const dateStr = data.ticketsInfo.ticketInfo.date;
if (dateStr && dateStr.length >= 4) { if (dateStr && dateStr.length >= 4) {
return dateStr.substring(0, 4); return dateStr.substring(0, 4);
} }
return new Date().getFullYear().toString(); return new Date().getFullYear().toString();
}) })
/** /**
* 获取酒店日期范围 * 获取酒店日期范围
*/ */
const hotelDateRange = computed({ const hotelDateRange = computed({
get() { get() {
const year = ticketYear.value; const year = ticketYear.value;
const start = data.ticketsInfo.hotelInfo.startDay ? `${year}-${data.ticketsInfo.hotelInfo.startDay}` : ''; const start = data.ticketsInfo.hotelInfo.startDay ?
const end = data.ticketsInfo.hotelInfo.endDay ? `${year}-${data.ticketsInfo.hotelInfo.endDay}` : ''; `${year}-${data.ticketsInfo.hotelInfo.startDay}` : '';
const end = data.ticketsInfo.hotelInfo.endDay ? `${year}-${data.ticketsInfo.hotelInfo.endDay}` :
'';
if (start && end) { if (start && end) {
return [start, end]; return [start, end];
} }
@ -261,19 +268,19 @@ const hotelDateRange = computed({
data.ticketsInfo.hotelInfo.endDay = val[1].substring(5); data.ticketsInfo.hotelInfo.endDay = val[1].substring(5);
} }
} }
}) })
onMounted(() => { onMounted(() => {
const stored = uni.getStorageSync('ticketsInfo') const stored = uni.getStorageSync('ticketsInfo')
if (stored) { if (stored) {
Object.assign(data.ticketsInfo, stored) Object.assign(data.ticketsInfo, stored)
} }
updateDuration(); updateDuration();
}) })
/** /**
* 确认 * 确认
*/ */
const handleRightButtonClick = () => { const handleRightButtonClick = () => {
console.log("handleRightButtonClick", data.ticketsInfo) console.log("handleRightButtonClick", data.ticketsInfo)
const orderTimeStr = data.ticketsInfo.orderInfo.orderTime; const orderTimeStr = data.ticketsInfo.orderInfo.orderTime;
const ticketDateStr = data.ticketsInfo.ticketInfo.date; const ticketDateStr = data.ticketsInfo.ticketInfo.date;
@ -307,21 +314,21 @@ const handleRightButtonClick = () => {
uni.setStorageSync('ticketsInfo', data.ticketsInfo) uni.setStorageSync('ticketsInfo', data.ticketsInfo)
uni.navigateBack() uni.navigateBack()
} }
/** /**
* 切换折叠状态 * 切换折叠状态
* @param {string} key * @param {string} key
*/ */
const toggleSection = (key) => { const toggleSection = (key) => {
data.collapsed[key] = !data.collapsed[key] data.collapsed[key] = !data.collapsed[key]
} }
/** /**
* 删除乘客 * 删除乘客
* @param {number} index * @param {number} index
*/ */
const removePassenger = (index) => { const removePassenger = (index) => {
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '确定要删除该乘客吗?', content: '确定要删除该乘客吗?',
@ -331,12 +338,12 @@ const removePassenger = (index) => {
} }
} }
}) })
} }
/** /**
* 添加乘客 * 添加乘客
*/ */
const addPassenger = () => { const addPassenger = () => {
const oldPassenger = data.ticketsInfo.passengerList[data.ticketsInfo.passengerList.length - 1] const oldPassenger = data.ticketsInfo.passengerList[data.ticketsInfo.passengerList.length - 1]
const newPassenger = { const newPassenger = {
name: '新乘客', name: '新乘客',
@ -350,14 +357,14 @@ const addPassenger = () => {
isMe: false isMe: false
} }
data.ticketsInfo.passengerList.push(newPassenger) data.ticketsInfo.passengerList.push(newPassenger)
} }
/** /**
* 获取选择器日期 * 获取选择器日期
* @param {string} dateStr * @param {string} dateStr
* @returns {string} * @returns {string}
*/ */
const getPickerDate = (dateStr) => { const getPickerDate = (dateStr) => {
if (!dateStr) return ''; if (!dateStr) return '';
// Handle YYYY.MM.DD format // Handle YYYY.MM.DD format
if (dateStr.includes('.')) { if (dateStr.includes('.')) {
@ -370,34 +377,34 @@ const getPickerDate = (dateStr) => {
return `${year}-${dateStr}`; return `${year}-${dateStr}`;
} }
return dateStr; return dateStr;
} }
/** /**
* 切换下单时间 * 切换下单时间
* @param {*} e * @param {*} e
*/ */
const onOrderTimeChange = (e) => { const onOrderTimeChange = (e) => {
const val = e.detail.value; const val = e.detail.value;
if (val) { if (val) {
data.ticketsInfo.orderInfo.orderTime = val.replace(/-/g, '.'); data.ticketsInfo.orderInfo.orderTime = val.replace(/-/g, '.');
} }
} }
/** /**
* 切换乘客类型 * 切换乘客类型
* @param {*} e * @param {*} e
* @param {*} index * @param {*} index
*/ */
const onTicketTypeChange = (e, index) => { const onTicketTypeChange = (e, index) => {
const val = e.detail.value; const val = e.detail.value;
data.ticketsInfo.passengerList[index].type = ticketType[val].label; data.ticketsInfo.passengerList[index].type = ticketType[val].label;
} }
/** /**
* 切换出发日期 * 切换出发日期
* @param {*} e * @param {*} e
*/ */
const onTicketDateChange = (e) => { const onTicketDateChange = (e) => {
const val = e.detail.value; // YYYY-MM-DD const val = e.detail.value; // YYYY-MM-DD
if (val) { if (val) {
// Update Date: YYYY.MM.DD // Update Date: YYYY.MM.DD
@ -408,39 +415,43 @@ const onTicketDateChange = (e) => {
const days = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']; const days = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
data.ticketsInfo.ticketInfo.weekDay = days[dateObj.getDay()]; data.ticketsInfo.ticketInfo.weekDay = days[dateObj.getDay()];
} }
} }
/** /**
* 获取时间 * 获取时间
* @param {string} fullStr * @param {string} fullStr
* @returns {string} * @returns {string}
*/ */
const getTimeHHMM = (fullStr) => { const getTimeHHMM = (fullStr) => {
if (!fullStr) return ''; if (!fullStr) return '';
if (fullStr.length > 5) return fullStr.split(' ')[1]; if (fullStr.length > 5) return fullStr.split(' ')[1];
return fullStr; return fullStr;
} }
/** /**
* 获取出发时间 * 获取出发时间
*/ */
const departureTimeHHMM = computed(() => { const departureTimeHHMM = computed(() => {
return getTimeHHMM(data.ticketsInfo.ticketInfo.departureTime); return getTimeHHMM(data.ticketsInfo.ticketInfo.departureTime);
}) })
/** /**
* 获取出发时间选择器范围 * 获取出发时间选择器范围
*/ */
const departureTimeRange = computed(() => { const departureTimeRange = computed(() => {
const hours = Array.from({ length: 24 }, (_, i) => i < 10 ? '0' + i : '' + i); const hours = Array.from({
const minutes = Array.from({ length: 60 }, (_, i) => i < 10 ? '0' + i : '' + i); length: 24
}, (_, i) => i < 10 ? '0' + i : '' + i);
const minutes = Array.from({
length: 60
}, (_, i) => i < 10 ? '0' + i : '' + i);
return [hours, minutes]; return [hours, minutes];
}) })
/** /**
* 获取出发时间索引 * 获取出发时间索引
*/ */
const departureTimeIndex = computed(() => { const departureTimeIndex = computed(() => {
const timeStr = getTimeHHMM(data.ticketsInfo.ticketInfo.departureTime); const timeStr = getTimeHHMM(data.ticketsInfo.ticketInfo.departureTime);
if (!timeStr) return [0, 0]; if (!timeStr) return [0, 0];
const [h, m] = timeStr.split(':'); const [h, m] = timeStr.split(':');
@ -451,12 +462,12 @@ const departureTimeIndex = computed(() => {
let mIdx = minutes.indexOf(m); let mIdx = minutes.indexOf(m);
if (mIdx === -1) mIdx = 0; if (mIdx === -1) mIdx = 0;
return [hIdx, mIdx]; return [hIdx, mIdx];
}) })
/** /**
* 获取到达时间日期范围 * 获取到达时间日期范围
*/ */
const arrivalRange = computed(() => { const arrivalRange = computed(() => {
const dateStr = data.ticketsInfo.ticketInfo.date; // YYYY.MM.DD const dateStr = data.ticketsInfo.ticketInfo.date; // YYYY.MM.DD
const dates = []; const dates = [];
if (dateStr) { if (dateStr) {
@ -470,15 +481,19 @@ const arrivalRange = computed(() => {
} else { } else {
dates.push('MM-DD'); dates.push('MM-DD');
} }
const hours = Array.from({ length: 24 }, (_, i) => i < 10 ? '0' + i : '' + i); const hours = Array.from({
const minutes = Array.from({ length: 60 }, (_, i) => i < 10 ? '0' + i : '' + i); length: 24
}, (_, i) => i < 10 ? '0' + i : '' + i);
const minutes = Array.from({
length: 60
}, (_, i) => i < 10 ? '0' + i : '' + i);
return [dates, hours, minutes]; return [dates, hours, minutes];
}) })
/** /**
* 获取到达时间索引 * 获取到达时间索引
*/ */
const arrivalIndex = computed(() => { const arrivalIndex = computed(() => {
const arrTime = data.ticketsInfo.ticketInfo.arrivalTime; const arrTime = data.ticketsInfo.ticketInfo.arrivalTime;
if (!arrTime || arrTime.length < 5) return [0, 0, 0]; if (!arrTime || arrTime.length < 5) return [0, 0, 0];
// Might be HH:mm or MM-DD HH:mm // Might be HH:mm or MM-DD HH:mm
@ -509,13 +524,13 @@ const arrivalIndex = computed(() => {
if (mIdx === -1) mIdx = 0; if (mIdx === -1) mIdx = 0;
return [dateIdx, hIdx, mIdx]; return [dateIdx, hIdx, mIdx];
}) })
/** /**
* 切换到达时间 * 切换到达时间
* @param {*} e * @param {*} e
*/ */
const onArrivalChange = (e) => { const onArrivalChange = (e) => {
const idxs = e.detail.value; const idxs = e.detail.value;
const range = arrivalRange.value; const range = arrivalRange.value;
if (!range[0][idxs[0]]) return; if (!range[0][idxs[0]]) return;
@ -547,17 +562,17 @@ const onArrivalChange = (e) => {
data.ticketsInfo.ticketInfo.arrivalTime = newArrTime; data.ticketsInfo.ticketInfo.arrivalTime = newArrTime;
updateDuration(); updateDuration();
} }
/** /**
* 切换出发时间 * 切换出发时间
* @param e * @param e
*/ */
/** /**
* 切换出发时间 * 切换出发时间
* @param e * @param e
*/ */
const onDepartureTimeChange = (e) => { const onDepartureTimeChange = (e) => {
let val = e.detail.value; // Array [hIdx, mIdx] let val = e.detail.value; // Array [hIdx, mIdx]
// Convert array to HH:mm string // Convert array to HH:mm string
@ -610,12 +625,12 @@ const onDepartureTimeChange = (e) => {
let mmdd = `${dateParts[1]}-${dateParts[2]}`; let mmdd = `${dateParts[1]}-${dateParts[2]}`;
data.ticketsInfo.ticketInfo.departureTime = `${mmdd} ${val}`; data.ticketsInfo.ticketInfo.departureTime = `${mmdd} ${val}`;
updateDuration(); updateDuration();
} }
/** /**
* 更新时长 * 更新时长
*/ */
const updateDuration = () => { const updateDuration = () => {
// Helper to parse MM-DD HH:mm to timestamp (using current year) // Helper to parse MM-DD HH:mm to timestamp (using current year)
// Safer to use "/" for cross-platform compatibility // Safer to use "/" for cross-platform compatibility
const getTs = (str) => { const getTs = (str) => {
@ -634,53 +649,53 @@ const updateDuration = () => {
const diffMins = Math.floor((diffMs % (1000 * 60 * 60)) / (1000 * 60)); const diffMins = Math.floor((diffMs % (1000 * 60 * 60)) / (1000 * 60));
data.ticketsInfo.ticketInfo.duration = `${diffHrs}${diffMins}`; data.ticketsInfo.ticketInfo.duration = `${diffHrs}${diffMins}`;
} }
} }
</script> </script>
<style> <style>
@import "@/common/main.css"; @import "@/common/main.css";
page { page {
background-color: #F8F8F8; background-color: #F8F8F8;
height: 100vh; height: 100vh;
overflow: hidden; overflow: hidden;
} }
</style> </style>
<style lang="less" scoped> <style lang="less" scoped>
.container { .container {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100vh; height: 100vh;
} }
.form-content { .form-content {
flex: 1; flex: 1;
height: 0; height: 0;
padding: 24rpx; padding: 24rpx;
box-sizing: border-box; box-sizing: border-box;
} }
.section-container { .section-container {
margin-bottom: 24rpx; margin-bottom: 24rpx;
} }
.section-header { .section-header {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 24rpx 12rpx 16rpx; padding: 24rpx 12rpx 16rpx;
background-color: transparent; background-color: transparent;
} }
.section-title { .section-title {
font-size: 28rpx; font-size: 28rpx;
color: #666; color: #666;
font-weight: 500; font-weight: 500;
} }
.card { .card {
background-color: #fff; background-color: #fff;
border-radius: 16rpx; border-radius: 16rpx;
padding: 0 24rpx; padding: 0 24rpx;
@ -707,9 +722,9 @@ page {
color: #FF4D4F; color: #FF4D4F;
padding: 4rpx 12rpx; padding: 4rpx 12rpx;
} }
} }
.form-item { .form-item {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
@ -732,9 +747,9 @@ page {
color: #333; color: #333;
text-align: right; text-align: right;
} }
} }
.add-btn-box { .add-btn-box {
background-color: #fff; background-color: #fff;
border-radius: 16rpx; border-radius: 16rpx;
padding: 24rpx; padding: 24rpx;
@ -749,9 +764,9 @@ page {
font-size: 30rpx; font-size: 30rpx;
margin-left: 8rpx; margin-left: 8rpx;
} }
} }
.placeholder { .placeholder {
height: 60rpx; height: 60rpx;
} }
</style> </style>