diff --git a/main.js b/main.js index c21b151..562fb95 100644 --- a/main.js +++ b/main.js @@ -2,10 +2,13 @@ import App from './App'; // 全局mixins,用于实现setData等功能,请勿删除!'; import zpMixins from '@/uni_modules/zp-mixins/index.js'; +import {VueJsonp} from 'vue-jsonp'; + // #ifndef VUE3 import Vue from 'vue'; Vue.use(zpMixins); +Vue.use(VueJsonp); Vue.config.productionTip = false; App.mpType = 'app'; // main.js diff --git a/package-lock.json b/package-lock.json index deadbed..0451c36 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,10 +10,12 @@ "license": "ISC", "dependencies": { "@vant/weapp": "^1.11.4", + "tencentcloud-sdk-nodejs": "^4.0.962", + "ts-md5": "^1.3.1", "uview-ui": "^2.0.36", - "vant": "^4.9.8" - }, - "devDependencies": {} + "vant": "^4.9.8", + "vue-jsonp": "^2.0.0" + } }, "node_modules/@babel/helper-string-parser": { "version": "7.25.9", @@ -184,12 +186,71 @@ "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.5.12.tgz", "integrity": "sha512-L2RPSAwUFbgZH20etwrXyVyCBu9OxRSi8T/38QsvnkJyvq2LufW2lDCOzm7t/U9C1mkhJGWYfCuFBCmIuNivrg==" }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmmirror.com/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/bignumber.js": { + "version": "9.1.2", + "resolved": "https://registry.npmmirror.com/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", + "engines": { + "node": "*" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/csstype": { "version": "3.1.3", "resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.1.3.tgz", "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", "peer": true }, + "node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz", @@ -208,6 +269,61 @@ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", "peer": true }, + "node_modules/form-data": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/form-data/-/form-data-3.0.2.tgz", + "integrity": "sha512-sJe+TQb2vIaIyO783qN6BlMYWMw3WBOHA1Ay2qxsnjuafEOQFJ2JakedOQirT6D5XPRxDvS7AHYyem9fTpb4LQ==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/json-bigint": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/json-bigint/-/json-bigint-1.0.0.tgz", + "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", + "dependencies": { + "bignumber.js": "^9.0.0" + } + }, "node_modules/magic-string": { "version": "0.30.12", "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.12.tgz", @@ -217,6 +333,30 @@ "@jridgewell/sourcemap-codec": "^1.5.0" } }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, "node_modules/nanoid": { "version": "3.3.7", "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.7.tgz", @@ -235,6 +375,25 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmmirror.com/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz", @@ -278,6 +437,54 @@ "node": ">=0.10.0" } }, + "node_modules/tencentcloud-sdk-nodejs": { + "version": "4.0.962", + "resolved": "https://registry.npmmirror.com/tencentcloud-sdk-nodejs/-/tencentcloud-sdk-nodejs-4.0.962.tgz", + "integrity": "sha512-5JLdbRDSWWojHokhY4C7iiP82DllLM+H2W7T9iWBM7+8CZKrbaXCFA5cEKCgVUqiOIMIychgfCAEplWk6ZkewQ==", + "dependencies": { + "form-data": "^3.0.0", + "get-stream": "^6.0.0", + "https-proxy-agent": "^5.0.0", + "is-stream": "^2.0.0", + "json-bigint": "^1.0.0", + "node-fetch": "^2.2.0", + "tslib": "1.13.0", + "uuid": "^9.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmmirror.com/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/ts-md5": { + "version": "1.3.1", + "resolved": "https://registry.npmmirror.com/ts-md5/-/ts-md5-1.3.1.tgz", + "integrity": "sha512-DiwiXfwvcTeZ5wCE0z+2A9EseZsztaiZtGrtSaY5JOD7ekPnR/GoIVD5gXZAlK9Na9Kvpo9Waz5rW64WKAWApg==", + "engines": { + "node": ">=12" + } + }, + "node_modules/tslib": { + "version": "1.13.0", + "resolved": "https://registry.npmmirror.com/tslib/-/tslib-1.13.0.tgz", + "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==" + }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmmirror.com/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/uview-ui": { "version": "2.0.36", "resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.36.tgz", @@ -319,6 +526,25 @@ "optional": true } } + }, + "node_modules/vue-jsonp": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/vue-jsonp/-/vue-jsonp-2.0.0.tgz", + "integrity": "sha512-Mzd9GNeuKP5hHFDWZNMWOsCuMILSkA6jo2l4A02wheFz3qqBzH7aSEFTey1BRCZCLizlaf1EqJ5YUtF392KspA==" + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } } }, "dependencies": { @@ -471,12 +697,51 @@ "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.5.12.tgz", "integrity": "sha512-L2RPSAwUFbgZH20etwrXyVyCBu9OxRSi8T/38QsvnkJyvq2LufW2lDCOzm7t/U9C1mkhJGWYfCuFBCmIuNivrg==" }, + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmmirror.com/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "requires": { + "debug": "4" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "bignumber.js": { + "version": "9.1.2", + "resolved": "https://registry.npmmirror.com/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, "csstype": { "version": "3.1.3", "resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.1.3.tgz", "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", "peer": true }, + "debug": { + "version": "4.3.7", + "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "requires": { + "ms": "^2.1.3" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" + }, "entities": { "version": "4.5.0", "resolved": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz", @@ -489,6 +754,43 @@ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", "peer": true }, + "form-data": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/form-data/-/form-data-3.0.2.tgz", + "integrity": "sha512-sJe+TQb2vIaIyO783qN6BlMYWMw3WBOHA1Ay2qxsnjuafEOQFJ2JakedOQirT6D5XPRxDvS7AHYyem9fTpb4LQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==" + }, + "https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "requires": { + "agent-base": "6", + "debug": "4" + } + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" + }, + "json-bigint": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/json-bigint/-/json-bigint-1.0.0.tgz", + "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", + "requires": { + "bignumber.js": "^9.0.0" + } + }, "magic-string": { "version": "0.30.12", "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.12.tgz", @@ -498,12 +800,38 @@ "@jridgewell/sourcemap-codec": "^1.5.0" } }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, "nanoid": { "version": "3.3.7", "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.7.tgz", "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "peer": true }, + "node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmmirror.com/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "requires": { + "whatwg-url": "^5.0.0" + } + }, "picocolors": { "version": "1.1.1", "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz", @@ -527,6 +855,41 @@ "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "peer": true }, + "tencentcloud-sdk-nodejs": { + "version": "4.0.962", + "resolved": "https://registry.npmmirror.com/tencentcloud-sdk-nodejs/-/tencentcloud-sdk-nodejs-4.0.962.tgz", + "integrity": "sha512-5JLdbRDSWWojHokhY4C7iiP82DllLM+H2W7T9iWBM7+8CZKrbaXCFA5cEKCgVUqiOIMIychgfCAEplWk6ZkewQ==", + "requires": { + "form-data": "^3.0.0", + "get-stream": "^6.0.0", + "https-proxy-agent": "^5.0.0", + "is-stream": "^2.0.0", + "json-bigint": "^1.0.0", + "node-fetch": "^2.2.0", + "tslib": "1.13.0", + "uuid": "^9.0.1" + } + }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmmirror.com/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "ts-md5": { + "version": "1.3.1", + "resolved": "https://registry.npmmirror.com/ts-md5/-/ts-md5-1.3.1.tgz", + "integrity": "sha512-DiwiXfwvcTeZ5wCE0z+2A9EseZsztaiZtGrtSaY5JOD7ekPnR/GoIVD5gXZAlK9Na9Kvpo9Waz5rW64WKAWApg==" + }, + "tslib": { + "version": "1.13.0", + "resolved": "https://registry.npmmirror.com/tslib/-/tslib-1.13.0.tgz", + "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==" + }, + "uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmmirror.com/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==" + }, "uview-ui": { "version": "2.0.36", "resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.36.tgz", @@ -554,6 +917,25 @@ "@vue/server-renderer": "3.5.12", "@vue/shared": "3.5.12" } + }, + "vue-jsonp": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/vue-jsonp/-/vue-jsonp-2.0.0.tgz", + "integrity": "sha512-Mzd9GNeuKP5hHFDWZNMWOsCuMILSkA6jo2l4A02wheFz3qqBzH7aSEFTey1BRCZCLizlaf1EqJ5YUtF392KspA==" + }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } } } } diff --git a/package.json b/package.json index 336faf7..4d9f129 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,15 @@ "author": "", "dependencies": { "@vant/weapp": "^1.11.4", + "tencentcloud-sdk-nodejs": "^4.0.962", + "ts-md5": "^1.3.1", "uview-ui": "^2.0.36", - "vant": "^4.9.8" + "vant": "^4.9.8", + "vue-jsonp": "^2.0.0", + "crypto-js": "^3.1.9-1", + "log4node": "^0.1.6", + "request": "^2.88.2", + "request-promise": "^4.2.5" }, "license": "ISC", "repository": { diff --git a/pages/index/index.vue b/pages/index/index.vue index 58a16ce..5a92f23 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -228,19 +228,19 @@ export default { share: app.globalData.share }); this.getInspRecord(); - uni.loadFontFace({ - family: 'PingFangSC-regular', - source: 'url("https://www.your-server.com/PingFangSC-Medium.ttf")', - success: function () { - console.log('Font loaded successfully'); - }, - fail: function (error) { - console.error('Font loading failed', error); - }, - complete: function () { - console.log('Font loading process complete'); - } - }); + // uni.loadFontFace({ + // family: 'PingFangSC-regular', + // source: 'url("https://www.your-server.com/PingFangSC-Medium.ttf")', + // success: function () { + // console.log('Font loaded successfully'); + // }, + // fail: function (error) { + // console.error('Font loading failed', error); + // }, + // complete: function () { + // console.log('Font loading process complete'); + // } + // }); }, onShareAppMessage() { return { diff --git a/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.vue b/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.vue index 4c9c479..7f26d8f 100644 --- a/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.vue +++ b/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.vue @@ -434,7 +434,11 @@ import { formatTime } from '../../../../../utils/util'; + import { Md5 } from 'ts-md5' + import CryptoJS from 'crypto-js' import MumuRecorder from '@/uni_modules/mumu-recorder/components/mumu-recorder/mumu-recorder.vue' + var innerAudioContext = uni.createInnerAudioContext(); + var timer; export default { components: { @@ -627,7 +631,7 @@ * 生命周期函数--监听页面加载 */ onLoad(options) { - + this.uploadxfyun() this.setData({ angencyId: app.globalData.user.agencyId, reportUserName: app.globalData.user.realName, @@ -654,8 +658,20 @@ this.qqMapWX = new QQMapWX({ key: 'CMJBZ-4DECI-JXGGN-5B4WU-QLV2H-B5BEJ' }); - - this.reverseLocation(); + let than = this + uni.getLocation({ + type: 'wgs84', + success: function (res) { + than.setData({ + 'fmData.latitude': res.latitude, + 'fmData.longitude': res.longitude, + }) + than.reverseLocation(); + }, + fail:function(err){ + console.log(err); + } + }); }, // 触底函数 onReachBottom() { @@ -713,19 +729,15 @@ // /page/user?id=123 onShareAppMessage() {}, methods: { - change(e) { - console.log(e); - /** - * layer: 0 第几级 index - src: '/static/images/basic/color.png' - subIndex: 2 //当前层级下选中项index - subText: '30人' //选中项数据 - text: '高一(3)班' - value: 103 //选中项value数据 - * */ - - }, - completeGrid(e) { + uploadxfyun(){ + const baseString = CryptoJS.SHA1(Md5.hashStr('e0810427' + Math.floor(Date.now() / 1000)),'d432ed34d99fc02d4608063a2fb22d49'); + var base64 = CryptoJS.enc.Base64.stringify(baseString); + console.log(base64); + let url = `https://raasr.xfyun.cn/v2/api/upload?signa=${base64}&duration=200&fileName=ces&fileSize=11895&sysDicts=uncivilizedLanguage&appId=e0810427` + let data = {} + uni.request({url,data,header: { 'Content-Type': 'application/json' }}) + }, + completeGrid(e) { this.fmData.gridId = e.result[0].value console.log('您选择的数据为:' + e.text); }, @@ -861,7 +873,104 @@ this.getProcess(res.data); }); }, - + downLoadAudio() { + var _this = this; + uni.downloadFile({ + url: _this.uploadRecord.url, + header: { + Authorization: uni.getStorageSync('token') + }, + success(res) { + console.log(res); + if (res.statusCode === 200) { + console.log('res2222222', res); + _this.setData({ + playUrl: res.tempFilePath + }); + _this.initAudio(); + } else { + // wx.showToast({ + // title: '音频加载失败', + // icon: 'none', + // duration: 1500 + // }); + } + }, + fail(err) { + console.log(err); + // wx.showToast({ + // title: '音频加载失败', + // icon: 'none', + // duration: 1500 + // }); + } + }); + }, + initAudio() { + var _this = this; + innerAudioContext.src = this.playUrl; + innerAudioContext.autoplay = false; + this.initDuration(); + console.log('ppppplllaaa', innerAudioContext); + innerAudioContext.onCanplay(() => { + console.log('初始化播放', innerAudioContext.duration); + }); + innerAudioContext.onPlay(() => { + console.log('开始播放', innerAudioContext.duration); + }); + innerAudioContext.onTimeUpdate(() => { + console.log('duration-onTimeUpdate', innerAudioContext.duration); + console.log('currentTime', innerAudioContext.currentTime); + if (innerAudioContext.duration) { + _this.setData({ + totalMax: innerAudioContext.duration * 1000 + }); + } + _this.setData({ + stepValue: innerAudioContext.currentTime * 1000 + }); + console.log('stepValue', _this.stepValue); + console.log('totalTime', _this.totalTime); + console.log('totalMax', _this.totalMax); + }); + innerAudioContext.onEnded(function () { + console.log('end'); + _this.setData({ + hasPlay: false + }); + }); + innerAudioContext.onError((res) => { + console.log('errMsg', res.errMsg); + uni.showToast({ + title: res.errMsg, + icon: 'none', + duration: 1500 + }); + }); + }, + + handlePlay() { + var hasPlay = this.hasPlay; + if (hasPlay) { + this.audioPause(); + } else { + this.audioPlay(); + } + }, + audioPause() { + innerAudioContext.pause(); + this.setData({ + hasPlay: false + }); + }, + + audioPlay() { + innerAudioContext.play(); + this.setData({ + hasPlay: true + }); + console.log('innerAudioContext', innerAudioContext); + }, getProcess(data) { // 处理数据 const processedData = data.map((item) => { @@ -1185,7 +1294,6 @@ }; api.getGridoptionDict(parm) .then((res) => { - console.log(res); this.setData({ angencyList: this.convertLabelToText(res.data) }); @@ -1235,7 +1343,6 @@ getDictList() { api.getDictList('user_demand_report_type') .then((res) => { - console.log(res); this.setData({ reportTypeList: res.data, reportTypeListOrg: [res.data.map(item => item.label)] @@ -1442,7 +1549,6 @@ console.log(parm, '事件'); api.addEvent(parm) .then((res) => { - console.log(res); if (res.code === 0) { uni.showModal({ title: '提示', @@ -1554,7 +1660,6 @@ console.log(parm, '服务'); api.addMeasure(parm) .then((res) => { - console.log(res); if (res.data) { uni.showModal({ title: '提示', @@ -1675,7 +1780,6 @@ sizeType: ['original', 'compressed'], sourceType: ['camera'], success(res) { - console.log(res); const uploadImageList = [..._this.uploadImageList]; if (res.tempFiles[0].size <= 5242880) { uploadImageList.push({ @@ -1907,21 +2011,25 @@ // 逆地址解析 reverseLocation() { - const _this = this; - this.qqMapWX.reverseGeocoder({ - success(res) { - console.log(res); - _this.setData({ - addressContent: res.result.address, - 'fmData.address': res.result.address, - 'fmData.longitude': res.result.location.lng, - 'fmData.latitude': res.result.location.lat - }); - }, - fail(err) { - console.debug(err); - } - }); + + let url = 'https://apis.map.qq.com/ws/geocoder/v1/'; + let data = { + location:this.fmData.latitude + "%2C" + this.fmData.longitude, + key: 'UDOBZ-KWRKZ-XCZXE-ZFSTS-QPNKV-VKBK7', + coord_type: 5, + output: 'jsonp', + get_poi:0 + }; + //使用jsonp解决跨域问题 + console.log(data); + this.$jsonp(url,data).then(data=>{ + console.log(data,'当前地址'); + this.setData({ + addressContent:data.result.address + }) + }).catch(err=>{ + console.log(err,'获取地理位置错误') + }) }, onConfirmDate(e) { @@ -2016,6 +2124,8 @@ }, 1000); }, handlerSuccess(res) { + console.log(res,'录音组件完成'); + this.setData({ mp3File:res.data, mp3Duration:res.duration @@ -2047,7 +2157,7 @@ file: blobToFile(than.mp3File,than.mp3File.name), name: 'file', header: { - Authorization: uni.getStorageSync('token') + Authorization: uni.getStorageSync('token'), }, success: (fileRes) => { uni.hideLoading(); @@ -2109,33 +2219,39 @@ // 录音结束 - recordStop() { - const { - url, - recordingLength, - hasStop - } = this; - this.setData({ - hasStart: false - }); - uni.showLoading({ - title: '录音上传中...' - }); - console.log(url, recordingLength, hasStop); - if (hasStop) { - this.uploadRecordFun(); - console.log('hasStop', hasStop); - } else { - console.log('hasStopeee', hasStop); - clearInterval(timer); - timer = null; - this.uploadRecordFun(); - this.setData({ - recordingLength: 0, - totalTime: this.format(duration) - }); - } - }, + recordStop() { + clearInterval(timer); + this.$refs.recorder.stop(); + const { mp3File, mp3Duration, hasStop } = this; + + if (!mp3File) { + console.log('mp3File 未定义,500 毫秒后重试...'); + setTimeout(() => { + this.recordStop(); // 500 毫秒后再次调用 + }, 500); + return; // 阻止后续代码执行,等待重试 + } + + this.setData({ hasStart: false }); + uni.showLoading({ title: '录音上传中...' }); + + console.log(mp3File, mp3Duration, hasStop); + + if (hasStop) { + this.uploadRecordFun(); + console.log('hasStop', hasStop); + } else { + console.log('hasStopeee', hasStop); + clearInterval(timer); + timer = null; + this.uploadRecordFun(); + this.setData({ + recordingLength: 0, + totalTime: this.format(duration), + }); + } + }, + formatTime(num) { @@ -2243,6 +2359,10 @@ const url = event.currentTarget.dataset.url; uni.downloadFile({ url: url, + header:{ + 'Access-Control-Allow-Origin': '*', + Authorization: uni.getStorageSync('token'), + }, success: function(res) { if (res.statusCode === 200) { uni.saveFile({ diff --git a/vue.config.js b/vue.config.js new file mode 100644 index 0000000..abb7beb --- /dev/null +++ b/vue.config.js @@ -0,0 +1,12 @@ +// vue.config.js +module.exports = { + devServer: { + proxy: { + '/map-api': { + target: 'https://apis.map.qq.com', + changeOrigin: true, + pathRewrite: { '^map-api': '' } + } + } + } +};