完成理财

This commit is contained in:
tangxinyue 2026-01-28 14:03:34 +08:00
parent 4da4c4de84
commit 1cf45b73cb
5 changed files with 1075 additions and 1688 deletions

View File

@ -6,8 +6,8 @@
"type" : "uni-app:app-ios"
},
{
"customPlaygroundType" : "device",
"playground" : "standard",
"customPlaygroundType" : "local",
"playground" : "custom",
"type" : "uni-app:app-android"
}
]

View File

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

View File

@ -7,17 +7,6 @@
"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",
@ -29,9 +18,10 @@
"delay": 0
},
"optimization": {
"subPackages": false
"subPackages": true
},
"runmode": "liberate", //
/* */
"modules": {
"Camera": {},
@ -67,18 +57,12 @@
"sdkConfigs": {
"payment": {
"weixin": {
"__platform__": [
"ios",
"android"
],
"__platform__": ["ios", "android"],
"appid": "123456",
"UniversalLinks": "https://hhhhh.com/apple-app-site-association/"
},
"alipay": {
"__platform__": [
"ios",
"android"
]
"__platform__": ["ios", "android"]
}
}
}

620
package-lock.json generated
View File

@ -1,620 +0,0 @@
{
"name": "alipay-emulator",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "alipay-emulator",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"@dcloudio/uni-app": "^2.0.2-4080720251210002",
"@dcloudio/uni-cli-shared": "^2.0.2-4080720251210002",
"@dcloudio/uni-ui": "^1.5.11",
"crypto-js": "^4.2.0",
"lottie-web": "^5.13.0",
"uuid": "^13.0.0"
},
"devDependencies": {
"less": "^4.5.1",
"less-loader": "^12.3.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": {
"escape-string-regexp": "^4.0.0",
"fast-glob": "^3.2.11",
"fs-extra": "^10.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": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz",
"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": {
"version": "5.13.0",
"resolved": "https://registry.npmjs.org/lottie-web/-/lottie-web-5.13.0.tgz",
"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": {
"version": "13.0.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-13.0.0.tgz",
"integrity": "sha512-XQegIaBTVUjSHliKqcnFqYypAd4S+WCYt5NIeRs6w/UAry7z8Y9j5ZwRRL4kzq9U3sD6v+85er9FvkEaBpji2w==",
"funding": [
"https://github.com/sponsors/broofa",
"https://github.com/sponsors/ctavan"
],
"bin": {
"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

@ -258,53 +258,59 @@
</template>
<script setup>
import navBar from '@/components/nav-bar/nav-bar.vue'
import addBillJson from '@/static/json/add-bill.json'
import DateTimePicker from '@/components/dengrq-datetime-picker/dateTimePicker/index.vue';
import billManagementPopup from '@/components/bill-management-popup/bill-management-popup.vue'
import { stringUtil, randomUtil, util, uiUtil } from '@/utils/common.js';
import hotIcon from "@/static/json/hot-icon.json"
import { useStore } from '@/store/index.js'
import navBar from '@/components/nav-bar/nav-bar.vue'
import addBillJson from '@/static/json/add-bill.json'
import DateTimePicker from '@/components/dengrq-datetime-picker/dateTimePicker/index.vue';
import billManagementPopup from '@/components/bill-management-popup/bill-management-popup.vue'
import {
stringUtil,
randomUtil,
util,
uiUtil
} from '@/utils/common.js';
import hotIcon from "@/static/json/hot-icon.json"
import {
useStore
} from '@/store/index.js'
import {
import {
reactive,
toRefs,
ref,
onMounted,
watch,
nextTick
} from 'vue'
import {
} from 'vue'
import {
onLoad,
onShow,
onUnload
} from '@dcloudio/uni-app'
} from '@dcloudio/uni-app'
//
const timepopup = ref(null)
//
const billManagementPopupRef = ref(null)
//
const timepopup = ref(null)
//
const billManagementPopupRef = ref(null)
const {
const {
addBill,
getBillList,
updateBill
} = useStore()
} = useStore()
// tabBar
const classifyTabBar = ref(addBillJson.classifyTabBar)
// tabBar
const classifyTabBar = ref(addBillJson.classifyTabBar)
//
const billClassifyOptions = ref(addBillJson.billClassify)
//
const billClassifyOptions = ref(addBillJson.billClassify)
// icon
const billBottomIconList = ref(addBillJson.billBottomIconList)
// icon
const billBottomIconList = ref(addBillJson.billBottomIconList)
//
const serviceDetailRightTextList = [
{
//
const serviceDetailRightTextList = [{
"value": 0,
"text": "进入小程序"
},
@ -312,10 +318,9 @@ const serviceDetailRightTextList = [
"value": 1,
"text": "查看详情"
}
]
// switch
const switchOptions = [
{
]
// switch
const switchOptions = [{
"id": 7,
"name": "账单分类",
"isSwitch": false,
@ -385,13 +390,13 @@ const switchOptions = [
key: 'countInAndOut',
},
]
]
//key
let allFieldsList = ref([])
//key
let allFieldsList = ref([])
const defaultImage = "/static/image/bill/add-bill/add-avatar.png"
const data = reactive({
const defaultImage = "/static/image/bill/add-bill/add-avatar.png"
const data = reactive({
navBar: {
title: '新增账单',
bgColor: '#F5F5F5',
@ -467,25 +472,28 @@ const data = reactive({
showTagInput: false,
// switch
switchOptions: switchOptions
})
})
let { billData, datePickerData, selectItemInfo } = toRefs(data)
let {
billData,
datePickerData,
selectItemInfo
} = toRefs(data)
onShow(() => {
onShow(() => {
// #ifdef APP-PLUS
util.setAndroidSystemBarColor('#F5F5F5')
setTimeout(() => {
plus.navigator.setStatusBarStyle("dark");
}, 500);
// #endif
// #endif
})
})
onUnload(() => {
onUnload(() => {
uni.$off('addBillDetail')
})
})
onLoad((option) => {
onLoad((option) => {
uni.$on('addBillDetail', (res) => {
console.log("billData", billData.value);
billData.value.imgUrl = res.url
@ -533,11 +541,11 @@ onLoad((option) => {
}
setAllFieldsList()
})
})
// selectId
watch(() => billData.value.selectId, (newVal, oldVal) => {
// selectId
watch(() => billData.value.selectId, (newVal, oldVal) => {
if (data.isEdit) return
//
allFieldsList.value.forEach(item => {
@ -552,7 +560,8 @@ watch(() => billData.value.selectId, (newVal, oldVal) => {
let currentItemInfoList = []
classifyTabBar.value.forEach(item => {
if (item.selectId == newVal) {
currentItemInfoList = item.itemInfoList ? JSON.parse(JSON.stringify(item.itemInfoList)) : []
currentItemInfoList = item.itemInfoList ? JSON.parse(JSON.stringify(item.itemInfoList)) :
[]
}
})
//
@ -592,10 +601,10 @@ watch(() => billData.value.selectId, (newVal, oldVal) => {
}
console.log("头像图片", billData.value.imgUrl)
setItemInfoValue(newVal)
})
})
//
function setAllFieldsList() {
//
function setAllFieldsList() {
const keySet = new Set()
classifyTabBar.value.forEach(item => {
if (item.itemInfoList) {
@ -620,12 +629,12 @@ function setAllFieldsList() {
})
}
})
}
}
/**
/**
* 设置每个字段信息值
*/
const setItemInfoValue = (id) => {
const setItemInfoValue = (id) => {
//
billData.value.itemInfoList.forEach(item => {
if (item.key == 'orderNumber') {
@ -665,20 +674,20 @@ const setItemInfoValue = (id) => {
break;
}
})
}
}
/**
/**
* 切换头像
*/
const changeAvatar = () => {
const changeAvatar = () => {
util.goPage("/pages/common/hot-icon/hot-icon" + "?page=addBillDetail")
}
}
/**
/**
* 随机生成账单信息
*/
const randomBillInfo = () => {
const randomBillInfo = () => {
if (data.type == 1) {
billData.value.balance = randomUtil.randomMoney(100000)
}
@ -686,7 +695,8 @@ const randomBillInfo = () => {
billData.value.money = randomUtil.randomMoney()
console.log("allFieldsList", allFieldsList.value)
//
const hotIconList = hotIcon.moneyHotIcon.filter(item => item.classify != '系统图标' && item.classify != '自定义' && item.classify != '银行卡')
const hotIconList = hotIcon.moneyHotIcon.filter(item => item.classify != '系统图标' && item.classify != '自定义' &&
item.classify != '银行卡')
if (hotIconList.length > 0) {
const randomIcon = hotIconList[randomUtil.random(0, hotIconList.length - 1)]
billData.value.imgUrl = `/static/image/common/hot-icon/${randomIcon.label}.png`
@ -714,12 +724,12 @@ const randomBillInfo = () => {
})
console.log("随机生成账单信息", billData.value)
}
}
/**
/**
* 校验表单数据
*/
const validateBillData = () => {
const validateBillData = () => {
if (!billData.value.name) {
uiUtil.showError("请输入名称")
return false
@ -748,7 +758,16 @@ const validateBillData = () => {
}
}
console.log("校验表单数据", billData.value)
const merchantOptionKeys = [{ key: 'serviceDetail', label: '服务详情' }, { key: 'serviceRecommend', label: '服务推荐' }, { key: 'recommendService', label: '推荐服务' }]
const merchantOptionKeys = [{
key: 'serviceDetail',
label: '服务详情'
}, {
key: 'serviceRecommend',
label: '服务推荐'
}, {
key: 'recommendService',
label: '推荐服务'
}]
for (let i = 0; i < merchantOptionKeys.length; i++) {
const item = merchantOptionKeys[i]
console.log("校验表单数据key", billData.value.merchantOption[item.key], item.key)
@ -759,13 +778,16 @@ const validateBillData = () => {
billData.value.merchantOption[infoKey] = {}
}
if (!billData.value.merchantOption[infoKey].text || billData.value.merchantOption[infoKey].text == '') {
if (!billData.value.merchantOption[infoKey].text || billData.value.merchantOption[infoKey].text ==
'') {
uiUtil.showError(`请输入${item.label}`)
return false
}
if (item.key == "serviceDetail") {
console.log("校验表单数据keyInfo", !billData.value.merchantOption[infoKey].imgUrl || billData.value.merchantOption[infoKey].imgUrl == '')
if (!billData.value.merchantOption[infoKey].imgUrl || billData.value.merchantOption[infoKey].imgUrl == '') {
console.log("校验表单数据keyInfo", !billData.value.merchantOption[infoKey].imgUrl || billData.value
.merchantOption[infoKey].imgUrl == '')
if (!billData.value.merchantOption[infoKey].imgUrl || billData.value.merchantOption[infoKey]
.imgUrl == '') {
uiUtil.showError("请上传服务详情图片")
return false
}
@ -773,15 +795,16 @@ const validateBillData = () => {
}
}
return true
}
}
/**
/**
* 保存账单
*/
const onRightClick = async () => {
const onRightClick = async () => {
if (!validateBillData()) return
console.log("1111111111");
if (billData.value.merchantOption.serviceDetail && billData.value.merchantOption.serviceDetailInfo && billData.value.merchantOption.serviceDetailInfo.imgUrl) {
if (billData.value.merchantOption.serviceDetail && billData.value.merchantOption.serviceDetailInfo &&
billData.value.merchantOption.serviceDetailInfo.imgUrl) {
const url = await saveAndDisplayImage(billData.value.merchantOption.serviceDetailInfo.imgUrl)
billData.value.merchantOption.serviceDetailInfo.imgUrl = url
}
@ -814,10 +837,10 @@ const onRightClick = async () => {
setTimeout(() => {
uni.navigateBack()
}, 500)
}
}
// itemInfo
const onClickItemInfo = async (item, action) => {
// itemInfo
const onClickItemInfo = async (item, action) => {
console.log(item)
if (item.type == 'time') {
datePickerData.value.selectDate = item.value;
@ -852,22 +875,22 @@ const onClickItemInfo = async (item, action) => {
}
billManagementPopupRef.value.open('tagAndNote', initData)
}
}
}
/**
/**
* switch按钮上传图片
* @param key
*/
const switchUploadImage = async (key) => {
const switchUploadImage = async (key) => {
if (key == 'serviceDetail') {
billData.value.merchantOption.serviceDetailInfo.imgUrl = await uploadImage()
}
}
}
/**
/**
* 上传图片
*/
const uploadImage = () => {
const uploadImage = () => {
return new Promise((resolve, reject) => {
uni.chooseImage({
count: 1,
@ -881,13 +904,13 @@ const uploadImage = () => {
}
})
})
}
}
/**
/**
* @param {Object} file
* 保存图片到本地
*/
const saveAndDisplayImage = (file) => {
const saveAndDisplayImage = (file) => {
// #ifdef H5
return Promise.resolve(file)
// #endif
@ -906,45 +929,45 @@ const saveAndDisplayImage = (file) => {
})
})
// #endif
}
}
/**
/**
* 底部icon点击选择
* @param option
*/
const onBottomIconClick = (option) => {
const onBottomIconClick = (option) => {
if (billData.value.bottomIcons.includes(option.id)) {
billData.value.bottomIcons = billData.value.bottomIcons.filter(item => item != option.id)
} else {
billData.value.bottomIcons.push(option.id)
}
console.log(billData.value.bottomIcons)
}
}
/**
/**
* switch切换
*/
const onSwitchChange = (e, option) => {
const onSwitchChange = (e, option) => {
const value = e.detail.value
billData.value.merchantOption[option.key] = value
console.log(billData.value.merchantOption)
if (option.change) {
option.change(value)
}
}
}
/**
/**
* 判断是否需要移除下边框
*/
const isNoBorderBottom = (option) => {
const isNoBorderBottom = (option) => {
const keys = ['serviceDetail', 'recommendService', 'serviceRecommend'];
return billData.value.merchantOption[option.key] && keys.includes(option.key);
}
}
/**
/**
* 格式化时间
*/
function formatTime(time) {
function formatTime(time) {
const newTime = new Date(time)
const year = newTime.getFullYear()
const month = newTime.getMonth() + 1
@ -953,18 +976,18 @@ function formatTime(time) {
const minutes = newTime.getMinutes()
const seconds = newTime.getSeconds()
return `${year}-${month}-${date} ${hours}:${minutes}:${seconds}`
}
/**
}
/**
* 关闭时间选择器
*/
const closeTimePicker = () => {
const closeTimePicker = () => {
timepopup.value.close()
}
}
/**
/**
* 设置时间
*/
const settmes = () => {
const settmes = () => {
console.log(datePickerData.value.selectDate)
billData.value.itemInfoList.forEach(item => {
if (item.type == 'time' && selectItemInfo.value.key == item.key) {
@ -973,21 +996,21 @@ const settmes = () => {
})
timepopup.value.close()
data.popupType = ''
}
}
/**
/**
* @param {Object} date
* 切换时间
*/
function onChangeStartDate(date) {
function onChangeStartDate(date) {
datePickerData.value.selectDate = date;
}
}
/**
/**
* 确认账单管理弹窗
* @param data
*/
const handleBillManagementConfirm = (data) => {
const handleBillManagementConfirm = (data) => {
console.log("确认账单管理弹窗", data)
if (data.type == 'billClassify') {
billData.value.merchantOption.billClassify = data.value
@ -995,19 +1018,19 @@ const handleBillManagementConfirm = (data) => {
billData.value.merchantOption.tag = data.tags
billData.value.merchantOption.note = data.note
}
}
}
</script>
<style lang="less">
@import "@/common/main.css";
@import "@/common/specify-style.less";
@import "@/common/main.css";
@import "@/common/specify-style.less";
page {
page {
background-color: #F5F5F5;
}
}
</style>
<style lang="less" scoped>
.tab-bar {
.tab-bar {
display: flex;
align-items: center;
flex-wrap: nowrap;
@ -1039,9 +1062,9 @@ page {
.blue {
color: #1B71F8;
}
}
}
.add-bill-container {
.add-bill-container {
background-color: #ffffff;
margin: 24rpx;
margin-top: 34rpx;
@ -1057,11 +1080,11 @@ page {
height: 64rpx;
}
}
}
}
.avatar-box {
.avatar-box {
margin-top: 12rpx;
text-align: center;
margin-bottom: 26rpx;
@ -1071,9 +1094,9 @@ page {
height: 80rpx;
border-radius: 50%;
}
}
}
.main-info {
.main-info {
color: #1a1a1a;
font-size: 64rpx;
@ -1085,9 +1108,9 @@ page {
.isRefund {
color: #EA6B48;
}
}
}
.detail-info-container {
.detail-info-container {
padding-top: 36rpx;
.info-item-input {
@ -1140,9 +1163,9 @@ page {
}
}
}
}
}
.info-item-box {
.info-item-box {
display: flex;
align-items: center;
margin: 20rpx 0;
@ -1153,9 +1176,9 @@ page {
font-size: 26rpx;
color: var(--text-secondary);
}
}
}
.info-item-input {
.info-item-input {
display: inline-flex;
align-items: center;
position: relative;
@ -1187,20 +1210,20 @@ page {
position: absolute;
width: calc(100%);
}
}
}
.edit-image {
.edit-image {
width: 28rpx;
height: 28rpx;
margin-left: 10rpx;
flex-shrink: 0;
}
}
.money {
.money {
// margin-top: 14rpx;
}
}
.switch-option-container {
.switch-option-container {
margin: 16rpx 24rpx;
background-color: #ffffff;
border-radius: 16rpx 16rpx 16rpx 16rpx;
@ -1351,9 +1374,9 @@ page {
color: #123D72;
}
}
}
}
.bill-bottom-icon-options {
.bill-bottom-icon-options {
display: flex;
flex-wrap: wrap;
margin: 16rpx 24rpx;
@ -1390,5 +1413,5 @@ page {
}
}
}
</style>