diff --git a/package-lock.json b/package-lock.json index a0df40e..a1eaf8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,12 +16,17 @@ "big.js": "^6.1.1", "qs": "^6.10.3", "react": "^17.0.0", - "react-dom": "^17.0.0" + "react-dom": "^17.0.0", + "react-redux": "^8.0.1", + "redux": "^4.2.0", + "redux-logger": "^3.0.6", + "redux-thunk": "^2.4.1" }, "devDependencies": { "@babel/core": "^7.8.0", "@tarojs/mini-runner": "3.3.10", "@tarojs/webpack-runner": "3.3.10", + "@types/qs": "^6.9.7", "@types/react": "^17.0.2", "@types/webpack-env": "^1.13.6", "@typescript-eslint/eslint-plugin": "^4.15.1", @@ -3915,6 +3920,15 @@ "@types/node": "*" } }, + "node_modules/@types/hoist-non-react-statics": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", + "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==", + "dependencies": { + "@types/react": "*", + "hoist-non-react-statics": "^3.3.0" + } + }, "node_modules/@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", @@ -3978,14 +3992,18 @@ "version": "15.7.4", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.4.tgz", "integrity": "sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ==", - "dev": true, "license": "MIT" }, + "node_modules/@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", + "dev": true + }, "node_modules/@types/react": { "version": "17.0.43", "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.43.tgz", "integrity": "sha512-8Q+LNpdxf057brvPu1lMtC5Vn7J119xrP1aq4qiaefNioQUYANF/CYeK4NsKorSZyUGJ66g0IM+4bbjwx45o2A==", - "dev": true, "license": "MIT", "dependencies": { "@types/prop-types": "*", @@ -4007,9 +4025,13 @@ "version": "0.16.2", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", - "dev": true, "license": "MIT" }, + "node_modules/@types/use-sync-external-store": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz", + "integrity": "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==" + }, "node_modules/@types/webpack-env": { "version": "1.16.3", "resolved": "https://registry.npmjs.org/@types/webpack-env/-/webpack-env-1.16.3.tgz", @@ -7507,7 +7529,6 @@ "version": "3.0.11", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.11.tgz", "integrity": "sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw==", - "dev": true, "license": "MIT" }, "node_modules/cuint": { @@ -7623,6 +7644,11 @@ "node": ">=0.10" } }, + "node_modules/deep-diff": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/deep-diff/-/deep-diff-0.3.8.tgz", + "integrity": "sha1-wB3mPvsO7JeYgB1Ax+Da4ltYLIQ=" + }, "node_modules/deep-equal": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", @@ -10324,6 +10350,14 @@ "minimalistic-crypto-utils": "^1.0.1" } }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "dependencies": { + "react-is": "^16.7.0" + } + }, "node_modules/hosted-git-info": { "version": "2.8.9", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", @@ -15759,7 +15793,6 @@ "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true, "license": "MIT" }, "node_modules/react-reconciler": { @@ -15779,6 +15812,49 @@ "react": "^17.0.1" } }, + "node_modules/react-redux": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-8.0.1.tgz", + "integrity": "sha512-LMZMsPY4DYdZfLJgd7i79n5Kps5N9XVLCJJeWAaPYTV+Eah2zTuBjTxKtNEbjiyitbq80/eIkm55CYSLqAub3w==", + "dependencies": { + "@babel/runtime": "^7.12.1", + "@types/hoist-non-react-statics": "^3.3.1", + "@types/use-sync-external-store": "^0.0.3", + "hoist-non-react-statics": "^3.3.2", + "react-is": "^18.0.0", + "use-sync-external-store": "^1.0.0" + }, + "peerDependencies": { + "@types/react": "^16.8 || ^17.0 || ^18.0", + "@types/react-dom": "^16.8 || ^17.0 || ^18.0", + "react": "^16.8 || ^17.0 || ^18.0", + "react-dom": "^16.8 || ^17.0 || ^18.0", + "react-native": ">=0.59", + "redux": "^4" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + }, + "react-dom": { + "optional": true + }, + "react-native": { + "optional": true + }, + "redux": { + "optional": true + } + } + }, + "node_modules/react-redux/node_modules/react-is": { + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.0.0.tgz", + "integrity": "sha512-yUcBYdBBbo3QiPsgYDcfQcIkGZHfxOaoE6HLSnr1sPzMhdyxusbfKOSUbSd/ocGi32dxcj366PsTj+5oggeKKw==" + }, "node_modules/react-refresh": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.9.0.tgz", @@ -15898,6 +15974,30 @@ "node": ">=4" } }, + "node_modules/redux": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.0.tgz", + "integrity": "sha512-oSBmcKKIuIR4ME29/AeNUnl5L+hvBq7OaJWzaptTQJAntaPvxIJqfnjbaEiCzzaIz+XmVILfqAM3Ob0aXLPfjA==", + "dependencies": { + "@babel/runtime": "^7.9.2" + } + }, + "node_modules/redux-logger": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/redux-logger/-/redux-logger-3.0.6.tgz", + "integrity": "sha1-91VZZvMJjzyIYExEnPC69XeCdL8=", + "dependencies": { + "deep-diff": "^0.3.5" + } + }, + "node_modules/redux-thunk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-2.4.1.tgz", + "integrity": "sha512-OOYGNY5Jy2TWvTL1KgAlVy6dcx3siPJ1wTq741EPyUKfn6W6nChdICjZwCd0p8AZBs5kWpZlbkXW2nE/zjUa+Q==", + "peerDependencies": { + "redux": "^4" + } + }, "node_modules/reflect-metadata": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", @@ -19807,6 +19907,14 @@ "node": ">=0.10.0" } }, + "node_modules/use-sync-external-store": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.0.0.tgz", + "integrity": "sha512-AFVsxg5GkFg8GDcxnl+Z0lMAz9rE8DGJCc28qnBuQF7lac57B5smLcT37aXpXIIPz75rW4g3eXHPjhHwdGskOw==", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0-rc" + } + }, "node_modules/util": { "version": "0.11.1", "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", @@ -23660,6 +23768,15 @@ "@types/node": "*" } }, + "@types/hoist-non-react-statics": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", + "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==", + "requires": { + "@types/react": "*", + "hoist-non-react-statics": "^3.3.0" + } + }, "@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", @@ -23714,14 +23831,18 @@ "@types/prop-types": { "version": "15.7.4", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.4.tgz", - "integrity": "sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ==", + "integrity": "sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ==" + }, + "@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", "dev": true }, "@types/react": { "version": "17.0.43", "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.43.tgz", "integrity": "sha512-8Q+LNpdxf057brvPu1lMtC5Vn7J119xrP1aq4qiaefNioQUYANF/CYeK4NsKorSZyUGJ66g0IM+4bbjwx45o2A==", - "dev": true, "requires": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -23740,8 +23861,12 @@ "@types/scheduler": { "version": "0.16.2", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", - "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", - "dev": true + "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" + }, + "@types/use-sync-external-store": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz", + "integrity": "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==" }, "@types/webpack-env": { "version": "1.16.3", @@ -26291,8 +26416,7 @@ "csstype": { "version": "3.0.11", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.11.tgz", - "integrity": "sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw==", - "dev": true + "integrity": "sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw==" }, "cuint": { "version": "0.2.2", @@ -26383,6 +26507,11 @@ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" }, + "deep-diff": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/deep-diff/-/deep-diff-0.3.8.tgz", + "integrity": "sha1-wB3mPvsO7JeYgB1Ax+Da4ltYLIQ=" + }, "deep-equal": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", @@ -28374,6 +28503,14 @@ "minimalistic-crypto-utils": "^1.0.1" } }, + "hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "requires": { + "react-is": "^16.7.0" + } + }, "hosted-git-info": { "version": "2.8.9", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", @@ -32314,8 +32451,7 @@ "react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "react-reconciler": { "version": "0.26.1", @@ -32327,6 +32463,26 @@ "scheduler": "^0.20.1" } }, + "react-redux": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-8.0.1.tgz", + "integrity": "sha512-LMZMsPY4DYdZfLJgd7i79n5Kps5N9XVLCJJeWAaPYTV+Eah2zTuBjTxKtNEbjiyitbq80/eIkm55CYSLqAub3w==", + "requires": { + "@babel/runtime": "^7.12.1", + "@types/hoist-non-react-statics": "^3.3.1", + "@types/use-sync-external-store": "^0.0.3", + "hoist-non-react-statics": "^3.3.2", + "react-is": "^18.0.0", + "use-sync-external-store": "^1.0.0" + }, + "dependencies": { + "react-is": { + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.0.0.tgz", + "integrity": "sha512-yUcBYdBBbo3QiPsgYDcfQcIkGZHfxOaoE6HLSnr1sPzMhdyxusbfKOSUbSd/ocGi32dxcj366PsTj+5oggeKKw==" + } + } + }, "react-refresh": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.9.0.tgz", @@ -32422,6 +32578,28 @@ "strip-indent": "^2.0.0" } }, + "redux": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.0.tgz", + "integrity": "sha512-oSBmcKKIuIR4ME29/AeNUnl5L+hvBq7OaJWzaptTQJAntaPvxIJqfnjbaEiCzzaIz+XmVILfqAM3Ob0aXLPfjA==", + "requires": { + "@babel/runtime": "^7.9.2" + } + }, + "redux-logger": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/redux-logger/-/redux-logger-3.0.6.tgz", + "integrity": "sha1-91VZZvMJjzyIYExEnPC69XeCdL8=", + "requires": { + "deep-diff": "^0.3.5" + } + }, + "redux-thunk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-2.4.1.tgz", + "integrity": "sha512-OOYGNY5Jy2TWvTL1KgAlVy6dcx3siPJ1wTq741EPyUKfn6W6nChdICjZwCd0p8AZBs5kWpZlbkXW2nE/zjUa+Q==", + "requires": {} + }, "reflect-metadata": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", @@ -35261,6 +35439,12 @@ "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", "dev": true }, + "use-sync-external-store": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.0.0.tgz", + "integrity": "sha512-AFVsxg5GkFg8GDcxnl+Z0lMAz9rE8DGJCc28qnBuQF7lac57B5smLcT37aXpXIIPz75rW4g3eXHPjhHwdGskOw==", + "requires": {} + }, "util": { "version": "0.11.1", "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", diff --git a/package.json b/package.json index 9258dd5..215c2f7 100644 --- a/package.json +++ b/package.json @@ -43,12 +43,17 @@ "big.js": "^6.1.1", "qs": "^6.10.3", "react": "^17.0.0", - "react-dom": "^17.0.0" + "react-dom": "^17.0.0", + "react-redux": "^8.0.1", + "redux": "^4.2.0", + "redux-logger": "^3.0.6", + "redux-thunk": "^2.4.1" }, "devDependencies": { "@babel/core": "^7.8.0", "@tarojs/mini-runner": "3.3.10", "@tarojs/webpack-runner": "3.3.10", + "@types/qs": "^6.9.7", "@types/react": "^17.0.2", "@types/webpack-env": "^1.13.6", "@typescript-eslint/eslint-plugin": "^4.15.1", diff --git a/src/api/banner.ts b/src/api/banner.ts new file mode 100644 index 0000000..dc8a8ff --- /dev/null +++ b/src/api/banner.ts @@ -0,0 +1,12 @@ +import { useRequest } from "@/use/useHttp" + +/** + * 获取轮播图列表 + * @returns + */ + export const GetBannerList = () => { + return useRequest({ + url: `/v1/mall/carouselBanner/list`, + method: "get", + }) +} diff --git a/src/api/login.ts b/src/api/login.ts new file mode 100644 index 0000000..a7cb935 --- /dev/null +++ b/src/api/login.ts @@ -0,0 +1,12 @@ +import { useRequest } from "@/use/useHttp" + +/** + * 登录 + * @returns +*/ +export const LoginApi = () => { + return useRequest({ + url: `/v1/mall/login`, + method: "post", + }) +} diff --git a/src/api/material.ts b/src/api/material.ts new file mode 100644 index 0000000..1b47f30 --- /dev/null +++ b/src/api/material.ts @@ -0,0 +1,47 @@ +import { useRequest } from "@/use/useHttp" + +/** + * 获取面料分类列表 + * @returns +*/ +export const GetCategoryList = () => { + return useRequest({ + url: `/v1/mall/category/list`, + method: "get", + }) +} + + +/** + * 获取面料种类列表 + * @returns +*/ +export const GetProductKindListApi = () => { + return useRequest({ + url: `/v1/mall/product/kind/list`, + method: "get", + }) +} + +/** + * 获取面料列表 + * @returns +*/ +export const GetProductListApi = () => { + return useRequest({ + url: `/v1/mall/product/list`, + method: "get", + }) +} + +/** + * 获取面料详情 + * @returns +*/ +export const GetProductDetailApi = () => { + return useRequest({ + url: `/v1/mall/product`, + method: "get", + }) +} + diff --git a/src/api/materialColor.ts b/src/api/materialColor.ts new file mode 100644 index 0000000..589241e --- /dev/null +++ b/src/api/materialColor.ts @@ -0,0 +1,12 @@ +import { useRequest } from "@/use/useHttp" + +/** + * 获取面料颜色列表 + * @returns +*/ +export const GetColorList = () => { + return useRequest({ + url: `/v1/mall/product/color/list`, + method: "get", + }) +} diff --git a/src/api/shopCart.ts b/src/api/shopCart.ts new file mode 100644 index 0000000..8d292bf --- /dev/null +++ b/src/api/shopCart.ts @@ -0,0 +1,12 @@ +import { useRequest } from "@/use/useHttp" + +/** + * 获取购物车列表 + * @returns +*/ +export const GetShoppingCartApi = () => { + return useRequest({ + url: `/v1/mall/shoppingCart/productColor`, + method: "get", + }) +} \ No newline at end of file diff --git a/src/api/user.ts b/src/api/user.ts new file mode 100644 index 0000000..c97e29e --- /dev/null +++ b/src/api/user.ts @@ -0,0 +1,31 @@ +import { useRequest } from "@/use/useHttp" + +/** + * 解密用户微信信息 + */ + export const GetWxUserInfoApi = () => { + return useRequest({ + url: `/v1/mall/user/decrypt`, + method: "post", + }) +} + +/** + * 获取后台返回的用户信息 + */ + export const GetSelfUserInfoApi = () => { + return useRequest({ + url: `/v1/mall/user/info`, + method: "get", + }) +} + +/** + * 获取后台返回的用户手机号码信息 + */ + export const GetPhoneNumberApi = () => { + return useRequest({ + url: `/v1/mall/user/phoneNumber`, + method: "post", + }) +} diff --git a/src/app.config.ts b/src/app.config.ts index 28257f6..1f73284 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -1,7 +1,7 @@ export default { pages: [ 'pages/index/index', - 'pages/user/index' + 'pages/user/index', ], window: { backgroundTextStyle: 'light', @@ -51,7 +51,9 @@ export default { { root: "pages/searchList", pages: [ - "index" + "searchList", + "hightSearchList", + "search" ] }, { @@ -85,7 +87,7 @@ export default { ] }, { - root: "pages/weightListAdd", + root: "pages/order", pages: [ "index" ] diff --git a/src/app.tsx b/src/app.tsx index c9fd660..563e573 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -1,13 +1,32 @@ -import { MovableArea, View } from '@tarojs/components' +import { Component } from 'react' +import ContextBlueTooth from "@/use/contextBlueTooth" +import { Provider } from 'react-redux' +import configStore from './store' + import './app.scss' +const store = configStore() +class App extends Component { -const App = ({ children }) => { - return ( - <> - {children} - - ) -} + componentDidMount () {} -export default App + componentDidShow () {} + + componentDidHide () {} + + componentDidCatchError () {} + + // this.props.children 是将要会渲染的页面 + render () { + return ( + + + + {this.props.children} + + + ) + } +} + +export default App \ No newline at end of file diff --git a/src/common/bluetooth/color/colorDiff.js b/src/common/bluetooth/color/colorDiff.js new file mode 100644 index 0000000..73e380d --- /dev/null +++ b/src/common/bluetooth/color/colorDiff.js @@ -0,0 +1,86 @@ +module.exports = function(lab1, lab2){ + + var rgb2labArray1 = lab1; + var rgb2labArray2 = lab2; + + var l1 = rgb2labArray1[0]; + var a1 = rgb2labArray1[1]; + var b1 = rgb2labArray1[2]; + + var l2 = rgb2labArray2[0]; + var a2 = rgb2labArray2[1]; + var b2 = rgb2labArray2[2]; + + + var avg_lp = (l1 + l2) / 2; + var c1 = Math.sqrt(Math.pow(a1, 2) + Math.pow(b1, 2)); + var c2 = Math.sqrt(Math.pow(a2, 2) + Math.pow(b2, 2)); + var avg_c = (c1 + c2) / 2; + var g = (1- Math.sqrt(Math.pow(avg_c, 7) / (Math.pow(avg_c, 7) + Math.pow(25, 7)))) / 2; + + var a1p = a1 * (1 + g); + var a2p = a2 * (1 + g); + + var c1p = Math.sqrt(Math.pow(a1p, 2) + Math.pow(b1, 2)); + var c2p = Math.sqrt(Math.pow(a2p, 2) + Math.pow(b2, 2)); + + var avg_cp = (c1p + c2p) / 2; + + var h1p = rad2deg(Math.atan2(b1, a1p)); + if(h1p < 0){ + + h1p = h1p + 360; + } + + var h2p = rad2deg(Math.atan2(b2, a2p)); + if(h2p < 0){ + + h2p = h2p + 360; + } + + var avg_hp = Math.abs(h1p - h2p) > 180 ? (h1p + h2p + 360) / 2 : (h1p + h1p) / 2; + + var t = 1 - 0.17 * Math.cos(deg2rad(avg_hp - 30)) + 0.24 * Math.cos(deg2rad(2 * avg_hp)) + 0.32 * Math.cos(deg2rad(3 * avg_hp + 6)) - 0.2 * Math.cos(deg2rad(4 * avg_hp - 63)) + + var delta_hp = h2p - h1p; + if(Math.abs(delta_hp) > 180){ + if (h2p <= h1p) { + delta_hp += 360; + } + else { + delta_hp -= 360; + } + } + + var delta_lp = l2 - l1; + var delta_cp = c2p - c1p; + + delta_hp = 2 * Math.sqrt(c1p * c2p) * Math.sin(deg2rad(delta_hp) / 2); + + var s_l = 1 + ((0.015 * Math.pow(avg_lp - 50, 2)) / Math.sqrt(20 + Math.pow(avg_lp - 50, 2))); + var s_c = 1 + 0.045 * avg_cp + var s_h = 1 + 0.015 * avg_cp * t; + + var delta_ro = 30 * Math.exp( - (Math.pow((avg_hp - 275) / 25, 2))); + var r_c = 2 * Math.sqrt(Math.pow(avg_cp, 7) / (Math.pow(avg_cp, 7) + Math.pow(25, 7))); + var r_t = -r_c * Math.sin(2 * deg2rad(delta_ro)); + + var kl = 1, kc =1, kh = 1; + + var delta_e = Math.sqrt(Math.pow(delta_lp / (kl * s_l), 2) + Math.pow(delta_cp / (kc * s_c), 2) + Math.pow(delta_hp / (kh * s_h), 2) + r_t * (delta_cp / (kc * s_c)) * (delta_hp / (kh * s_h))) + + return delta_e + + + function rad2deg(rad){ + + return 360 * rad / (2 * Math.PI); + } + function deg2rad(deg){ + + return (2 * Math.PI * deg) / 360; + } +} + + + diff --git a/src/common/bluetooth/color/colorSpace.js b/src/common/bluetooth/color/colorSpace.js new file mode 100644 index 0000000..8d05344 --- /dev/null +++ b/src/common/bluetooth/color/colorSpace.js @@ -0,0 +1,13 @@ + +import LabCom from './lab' +import XyzCom from './xyz' +import ColorDiff from './colorDiff' + +export const toRgb = (lab) => { + let xyz = LabCom.xyz(lab) + return XyzCom.rgb(xyz) +} + +export const Ediff = (lab1, lab2) => { + return ColorDiff(lab1, lab2) +} \ No newline at end of file diff --git a/src/common/bluetooth/color/lab.js b/src/common/bluetooth/color/lab.js new file mode 100644 index 0000000..b4c0eab --- /dev/null +++ b/src/common/bluetooth/color/lab.js @@ -0,0 +1,54 @@ + +var xyz = require('./xyz'); + +module.exports = { + name: 'lab', + min: [0,-100,-100], + max: [100,100,100], + channel: ['lightness', 'a', 'b'], + alias: ['LAB', 'cielab'], + + xyz: function(lab) { + var l = lab[0], + a = lab[1], + b = lab[2], + x, y, z, y2; + + if (l <= 8) { + y = (l * 100) / 903.3; + y2 = (7.787 * (y / 100)) + (16 / 116); + } else { + y = 100 * Math.pow((l + 16) / 116, 3); + y2 = Math.pow(y / 100, 1/3); + } + + x = x / 95.047 <= 0.008856 ? x = (95.047 * ((a / 500) + y2 - (16 / 116))) / 7.787 : 95.047 * Math.pow((a / 500) + y2, 3); + + z = z / 108.883 <= 0.008859 ? z = (108.883 * (y2 - (b / 200) - (16 / 116))) / 7.787 : 108.883 * Math.pow(y2 - (b / 200), 3); + + return [x, y, z]; + } +}; + + +//extend xyz +xyz.lab = function(xyz){ + var x = xyz[0], + y = xyz[1], + z = xyz[2], + l, a, b; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? Math.pow(x, 1/3) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? Math.pow(y, 1/3) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? Math.pow(z, 1/3) : (7.787 * z) + (16 / 116); + + l = (116 * y) - 16; + a = 500 * (x - y); + b = 200 * (y - z); + + return [l, a, b]; +}; diff --git a/src/common/bluetooth/color/rgb.js b/src/common/bluetooth/color/rgb.js new file mode 100644 index 0000000..60ff577 --- /dev/null +++ b/src/common/bluetooth/color/rgb.js @@ -0,0 +1,9 @@ + + +module.exports = { + name: 'rgb', + min: [0,0,0], + max: [255,255,255], + channel: ['red', 'green', 'blue'], + alias: ['RGB'] +}; diff --git a/src/common/bluetooth/color/xyz.js b/src/common/bluetooth/color/xyz.js new file mode 100644 index 0000000..c6e2bee --- /dev/null +++ b/src/common/bluetooth/color/xyz.js @@ -0,0 +1,138 @@ + +var rgb = require('./rgb'); + +var xyz = { + name: 'xyz', + min: [0,0,0], + channel: ['X','Y','Z'], + alias: ['XYZ', 'ciexyz', 'cie1931'] +}; + + +/** + * Whitepoint reference values with observer/illuminant + * + * http://en.wikipedia.org/wiki/Standard_illuminant + */ +xyz.whitepoint = { + //1931 2° + 2: { + //incadescent + A:[109.85, 100, 35.585], + // B:[], + C: [98.074, 100, 118.232], + D50: [96.422, 100, 82.521], + D55: [95.682, 100, 92.149], + //daylight + D65: [95.045592705167, 100, 108.9057750759878], + D75: [94.972, 100, 122.638], + //flourescent + // F1: [], + F2: [99.187, 100, 67.395], + // F3: [], + // F4: [], + // F5: [], + // F6:[], + F7: [95.044, 100, 108.755], + // F8: [], + // F9: [], + // F10: [], + F11: [100.966, 100, 64.370], + // F12: [], + E: [100,100,100] + }, + + //1964 10° + 10: { + //incadescent + A:[111.144, 100, 35.200], + C: [97.285, 100, 116.145], + D50: [96.720, 100, 81.427], + D55: [95.799, 100, 90.926], + //daylight + D65: [94.811, 100, 107.304], + D75: [94.416, 100, 120.641], + //flourescent + F2: [103.280, 100, 69.026], + F7: [95.792, 100, 107.687], + F11: [103.866, 100, 65.627], + E: [100,100,100] + } +}; + + +/** + * Top values are the whitepoint’s top values, default are D65 + */ +xyz.max = xyz.whitepoint[2].D65; + + +/** + * Transform xyz to rgb + * + * @param {Array} xyz Array of xyz values + * + * @return {Array} RGB values + */ +xyz.rgb = function (_xyz, white) { + //FIXME: make sure we have to divide like this. Probably we have to replace matrix as well then + white = white || xyz.whitepoint[2].E; + + var x = _xyz[0] / white[0], + y = _xyz[1] / white[1], + z = _xyz[2] / white[2], + r, g, b; + + // assume sRGB + // http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html + r = (x * 3.240969941904521) + (y * -1.537383177570093) + (z * -0.498610760293); + g = (x * -0.96924363628087) + (y * 1.87596750150772) + (z * 0.041555057407175); + b = (x * 0.055630079696993) + (y * -0.20397695888897) + (z * 1.056971514242878); + + r = r > 0.0031308 ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055) + : r = (r * 12.92); + + g = g > 0.0031308 ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055) + : g = (g * 12.92); + + b = b > 0.0031308 ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055) + : b = (b * 12.92); + + r = Math.min(Math.max(0, r), 1); + g = Math.min(Math.max(0, g), 1); + b = Math.min(Math.max(0, b), 1); + + return [r * 255, g * 255, b * 255]; +} + + + +/** + * RGB to XYZ + * + * @param {Array} rgb RGB channels + * + * @return {Array} XYZ channels + */ +rgb.xyz = function(rgb, white) { + var r = rgb[0] / 255, + g = rgb[1] / 255, + b = rgb[2] / 255; + + // assume sRGB + r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92); + g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92); + b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92); + + var x = (r * 0.41239079926595) + (g * 0.35758433938387) + (b * 0.18048078840183); + var y = (r * 0.21263900587151) + (g * 0.71516867876775) + (b * 0.072192315360733); + var z = (r * 0.019330818715591) + (g * 0.11919477979462) + (b * 0.95053215224966); + + white = white || xyz.whitepoint[2].E; + + return [x * white[0], y * white[1], z * white[2]]; +}; + + + +module.exports = xyz; diff --git a/src/common/bluetooth/command.js b/src/common/bluetooth/command.js new file mode 100644 index 0000000..97292d0 --- /dev/null +++ b/src/common/bluetooth/command.js @@ -0,0 +1,146 @@ +import { uint32ToUint8Array, uint8ArrayToHex } from "./utils"; + +export class Command { + // 测量序号 + static measureId = 1; + + // 命令完整响应的长度 + responseSize = 0; + // 命令发送的数据 + content = new Uint8Array(0); + // 命令响应的数据 + response = new Uint8Array(0); + // 等待响应的超时时间 + timeout = 3000; + // 发送的数据是否需要生成和校验值 + needSign = true; + + + /** + * @param {Uint8Array|ArrayBuffer|number[]} content + * @param {number} responseSize + * @param {number} timeout + * @param {boolean} needSign + */ + constructor(content, responseSize, timeout = 3000, needSign = true) { + if (content instanceof Uint8Array) { + this.content = content; + } else { + this.content = new Uint8Array(content); + } + this.responseSize = responseSize; + if (typeof timeout === 'number' && timeout >= 0) { + this.timeout = timeout; + } + this.needSign = needSign; + } + + /** + * 返回一个 ArrayBuffer 数组, 用于发送 + * @returns {ArrayBuffer[]} + */ + get data() { + if (this.content.length === 0) throw new Error('正文内容不能为空'); + const data = []; + const b = new Uint8Array(this.content.buffer); + if (this.needSign) { + b[b.length - 1] = Command.getSign(b); + } + for (let i = 0; i < b.length; i += 20) { + data.push(b.slice(i, i + 20).buffer); + } + return data; + } + + /** 是否接收完成 */ + get isComplete() { + return this.response.length >= this.responseSize; + } + + /** 是否有效 */ + get isValid() { + return Command.getSign(this.response) === this.response[this.response.length - 1]; + } + + /** + * 填充响应数组 + * @param {ArrayBuffer} buffer + */ + fillResponse(buffer) { + this.response = new Uint8Array([...this.response, ...(new Uint8Array(buffer))]); + } + + + /** + * 获取和校验值 + * @param {ArrayBuffer|Uint8Array} buffer + */ + static getSign(buffer) { + const _b = buffer instanceof Uint8Array ? buffer : new Uint8Array(buffer); + let sum = 0; + _b.slice(0, _b.length - 1).forEach(i => sum += i); + return new Uint8Array([sum])[0]; + } + + // 唤醒命令 + static WakeUp = new Command([0xf0], 0, 0, false); + + /** + * 获取测量命令 + * @param {number} mode + */ + static measure(mode = 0) { + Command.measureId += 1; + const measureId = uint32ToUint8Array(Command.measureId); + return new Command([0xbb, 1, mode, ...measureId, 0, 0xff, 0], 10, 1500); + } + + /** + * 获取测量数据 (Lab) + * @param {number} mode + */ + static getLab(mode = 0) { + return new Command([0xbb, 3, mode, 0, 0, 0, 0, 0, 0xff, 0], 20, 1500); + } + + /** + * 获取测量数据 (RGB) + * @param {number} mode + */ + static getRGB(mode = 0) { + return new Command([0xbb, 4, mode, 0, 0, 0, 0, 0, 0xff, 0], 20, 1500); + } + + /** + * 获取测量的光谱数据 + * @param {number} mode + */ + static getSpectral(mode = 0) { + return new Command([0xbb, 2, 0x10 + mode, 0, 0, 0 ,0 ,0, 0xff, 0], 200, 5000); + } + + /** + * 白校准 + * @param {number} check 是否判断校准成功 1 判断 0 不判断 + */ + static whiteCalibrate(check = 1) { + return new Command([0xbb, 0x11, check, 0, 0, 0, 0, 0, 0xff, 0], 10, 1500); + } + + + /** + * 黑校准 + * @param {number} check 是否判断校准成功 + */ + static blackCalibrate(check = 1) { + return new Command([0xbb, 0x10, check, 0, 0, 0, 0, 0, 0xff, 0], 10, 1500); + } + + + /** 获取校准状态 */ + static GetCalibrationInf = new Command([0xbb, 0x1e, 0, 0, 0, 0, 0, 0, 0xff, 0], 20, 1500); + + + + static GetDeviceInf = new Command([0xbb, 0x12, 0x01, 0, 0, 0, 0, 0, 0xff, 0], 200, 5000); +} \ No newline at end of file diff --git a/src/common/bluetooth/utils.js b/src/common/bluetooth/utils.js new file mode 100644 index 0000000..9c4b018 --- /dev/null +++ b/src/common/bluetooth/utils.js @@ -0,0 +1,70 @@ +/** + * Uint32 转 Uint8 数组 + * @param {number} n + */ +export function uint32ToUint8Array(n) { + return new Uint8Array(new Uint32Array([n]).buffer); +} + +/** + * Uint8 数组 转 Float32 + * @param {Uint8Array} raw + */ +export function uint8ArrayToFloat32(raw) { + return new Float32Array(raw.buffer)[0]; +} + + +/** + * Uint8 数组 转 Uint16 + * @param {Uint8Array} raw + */ +export function uint8ArrayToUint16(raw) { + return new Uint16Array(raw.buffer)[0]; +} + + +/** + * Uint8 数组转 Uint32 + * @param {Uint8Array} raw + * @returns + */ +export function uint8ArrayToUnit32(raw) { + return new Uint32Array(raw.buffer)[0]; +} + + +/** + * 等待指定时长 + * @param {number} duration + */ +export function waitFor(duration) { + return new Promise(resolve => { + setTimeout(resolve, duration); + }); +} + + +/** + * uint8 数组转 hex 字符串 + * @param {Uint8Array} raw + */ +export function uint8ArrayToHex(raw) { + const s = []; + raw.forEach(i => { + const b = i.toString(16); + s.push(b.length > 1 ? b : `0${b}`); + }); + return s.join(' '); +} + + +// 二进制转字符串(ascii) +export function bufferToString(buffer) { + let str = ""; + for (let code of buffer) { + if (code === 0) break; + str += utf82string(code); + } + return str; +} \ No newline at end of file diff --git a/src/common/client.js b/src/common/client.js new file mode 100644 index 0000000..0aefa83 --- /dev/null +++ b/src/common/client.js @@ -0,0 +1,17 @@ +import Taro from "@tarojs/taro"; + + +/** + * 设置 客户 本地存储 + * @param {Object} clientInfo + */ +export const setClient = (clientInfo) => { + Taro.setStorageSync('client', clientInfo) +} + +/** + * 返回 客户 本地存储 + */ +export const getClient = () => { + Taro.getStorageSync('client') || null +} diff --git a/src/common/common.ts b/src/common/common.ts index a5a7bc8..e2ba671 100644 --- a/src/common/common.ts +++ b/src/common/common.ts @@ -86,4 +86,17 @@ export const retrieval = (data: any, message: string="请填写完信息", rules } resolve(null); }) - } \ No newline at end of file + } + +// 金额千位分割符 +export const formatKbPrice = (number: string) => { + const ret = Array.from(number).reverse().reduce((result: string[],next,i,arr) => { + if((i+1)%3 === 0 && (i+1) !== arr.length) { + result.push(next,',') + return result; + } + result.push(next); + return result; + },[]) + return ret.reverse().join(''); +} diff --git a/src/common/constant.js b/src/common/constant.js new file mode 100644 index 0000000..4ce9f4c --- /dev/null +++ b/src/common/constant.js @@ -0,0 +1,27 @@ +// export const BASE_URL = CURRENT_ENV.includes('development') ? `https://test.zzfzyc.com/lymarket` : `https://www.zzfzyc.com/lymarket` +// export const BASE_URL = `http://192.168.0.75:50001/lymarket` +// export const BASE_URL = `http://192.168.0.89:50001/lymarket` +// export const BASE_URL = `http://10.0.0.5:50001/lymarket` +// export const BASE_URL = `http://192.168.0.89:40001/lymarket` +// export const BASE_URL = `http://192.168.1.165:40001/lymarket` // 王霞 +// export const BASE_URL = `https://test.zzfzyc.com/lymarket` // 测试环境 +// export const BASE_URL = `http://192.168.1.30:40001/lymarket` // 发 +// export const BASE_URL = `https://dev.zzfzyc.com/lymarket` // 开发环境 +// export const BASE_URL = `https://www.zzfzyc.com/lymarket` // 正式环境 +// export const BASE_URL = `http://192.168.1.165:40001/lymarket` // 王霞 +export const BASE_URL = `http://192.168.1.224:50001/lymarket` // 添 + +// CDN +// 生成密钥 +export const GET_UPLOAD_SIGN = `/upyun/getsign` // 请求签名 url +export const UPLOAD_CDN_URL = `https://v0.api.upyun.com/` + +// 前缀 +export const IMG_CND_Prefix = "http://test.cdn.zzfzyc.com/" + + +// 上传图片视频 +export const CDN_UPLOAD_IMG = `${UPLOAD_CDN_URL || ''}`; + +//appid +export const WX_APPID = 'wx68d92d7cbf0b6963' \ No newline at end of file diff --git a/src/common/fotmat.js b/src/common/fotmat.js new file mode 100644 index 0000000..8bef05c --- /dev/null +++ b/src/common/fotmat.js @@ -0,0 +1,135 @@ +/** + * 移除井号 + * @param {String} val code 编码 + * @returns + */ +export const formatRemoveHashTag = (val = "") => { + // console.log('移除标签',val,val.endsWith("#")); + return val.endsWith("#") ? val.replace("#", "") : val; +}; + + +/** + * 格式化编码+名称显示方式 + * @param {String} code 编码 + * @param {String} name 名称 + * @param {*} mode 模式 both:code + 名称 name: 仅显示名称 + * @returns + */ +export const formatHashTag = (code = "", name = "", mode = "both") => { + if (mode == 'both') { + return `${formatRemoveHashTag(code)}# ${name}` + } else if (mode == 'name') { + return `${name}` + } +} + +const Digit = 10 * 10 + +/** + * 重量 进退位 单位 + */ +export const weightDigit = 1000 + +/** + * 除以 + * @param {*} val + * @param {*} digit + * @returns + */ +export const formatPriceDiv = (val, digit = Digit) => { + return strip(Number(val / digit)) || 0 +} +/** + * 乘以 + * @param {*} val + * @param {*} digit + * @returns + */ +export const formatPriceMul = (val, digit = Digit) => { + return strip(Number(val * digit)) || 0 +} + +/** + * 格式化重量单位 (乘以) + * @param {Number} val + * @returns + */ +export const formatWeightMul = (val, digit = weightDigit) => { + return strip(Number(val * digit)) || 0 +} + +/** + * 格式化重量单位 (除以) + * @param {*} val + */ +export const formatWeightDiv = (val, digit = weightDigit) => { + return strip(Number(val / digit)) || 0 +} + +export const formatDateTime = (val, fmt = "YYYY-MM-DD HH:mm:ss") => { + if (val) { + let time = new Date(val) + let Y = time.getFullYear() + let M = time.getMonth() + 1 + let d = time.getDate() + let h = time.getHours() + let m = time.getMinutes() + let s = time.getSeconds() + + fmt = fmt.replace('YYYY', Y).replace('MM', M.toString().padStart(2, '0')).replace('DD', d.toString().padStart(2, '0')).replace('HH', h.toString().padStart(2, '0')).replace('mm', m.toString().padStart(2, '0')).replace('ss', s.toString().padStart(2, '0')) + // fmt = fmt.replace('MM', M) + // fmt = fmt.replace('DD', d) + // fmt = fmt.replace('HH', h) + // fmt = fmt.replace('mm', m) + // fmt = fmt.replace('ss', s) + + return fmt + } else { + return val + } + +} + +/** + * 精度 + * @param {*} num + * @param {*} precision + * @returns + */ +export const strip = (num, precision = 12) => { + return +parseFloat(num.toPrecision(precision)); +} + +/** + * 转换金额单位 + * @param {*} num 金额 / 数值 + * @param {*} digit 转换单位 + * @returns + */ +export const formatMillionYuan = (num, digit = 10000) => { + return num / digit > 1 ? { num: toDecimal2(num / digit), million: true } : { num, million: false } +} + +/** + * 数值保留两位小数 + * @param {*} x + * @returns + */ +export const toDecimal2 = (x) => { + var f = parseFloat(x); + if (isNaN(f)) { + return 0; + } + f = f + ""; + let index = f.lastIndexOf('.'); + if (index >= 0) { + let decimal = f.substring(index + 1); + if (decimal.length == 1) { + f = f.substring(0, index + 1) + decimal + "0"; + } else { + f = f.substring(0, index + 1) + decimal.substring(0, 2); + } + } + return f; +} diff --git a/src/common/system.js b/src/common/system.js new file mode 100644 index 0000000..12e2036 --- /dev/null +++ b/src/common/system.js @@ -0,0 +1,34 @@ +import Taro from "@tarojs/taro"; + + +/** + * 设置 系统 本地存储 + * @param {Object} systemInfo + */ +export const setSystem = (systemInfo) => { + Taro.setStorageSync('system', JSON.stringify(systemInfo)) +} + +/** + * 返回 系统 本地存储 + */ +export const getSystem = () => { + const result = Taro.getStorageSync('system') + return result ? JSON.parse(result) : null +} + +/** + * 设置 小程序 本地存储 + * @param {Object} systemInfo + */ +export const setAccountInfo = (systemInfo) => { + Taro.setStorageSync('accountInfo', JSON.stringify(systemInfo)) +} + +/** + * 返回 系统 本地存储 + */ +export const getAccountInfo = () => { + const result = Taro.getStorageSync('accountInfo') + return result ? JSON.parse(result) : null +} diff --git a/src/common/uploadImage.js b/src/common/uploadImage.js new file mode 100644 index 0000000..6a6cf8a --- /dev/null +++ b/src/common/uploadImage.js @@ -0,0 +1,150 @@ +import Taro from '@tarojs/taro'; +import { GET_UPLOAD_SIGN, CDN_UPLOAD_IMG, UPLOAD_CDN_URL } from './constant' + +import { GetSignApi } from '@/api/cdn' + + +const { fetchData: GetSign, success, data: resData, msg, code } = GetSignApi() + + +// 上传图片 获取auth,Policy +/* + scene 场景值,区分上传文件的根路径 + type 类型值,区分上传业务bucket +*/ +const getSecret = (scene, type) => { + return new Promise(async (resolve, reject) => { + + const SAVE_PATH = `/${scene}/{filemd5}{day}{hour}{min}{sec}{.suffix}`; + + + let params = { + 'method': 'post', + 'save_key': SAVE_PATH + } + + // 获取签名 + await GetSign(params) + if (success.value) { + // console.log('返回签名',resData.value); + resolve(resData.value) + } else { + reject({ + code: code.value || '9999', + msg: msg.value + }); + } + + }) +} +const getFileType = (name) => { + if (!name) return false; + var imgType = ["gif", "jpeg", "jpg", "bmp", "png"]; + var videoType = ["avi", "wmv", "mkv", "mp4", "mov", "rm", "3gp", "flv", "mpg", "rmvb", "quicktime"]; + + if (RegExp("\.?(" + imgType.join("|") + ")$", "i").test(name.toLowerCase())) { + return 'image'; + } else if (RegExp("\.(" + videoType.join("|") + ")$", "i").test(name.toLowerCase())) { + return 'video'; + } else { + return false; + } +} + +const upYunbucket = (type) => { + var bucket = "" + switch (type) { + case "product": + bucket = "testzzfzyc" + break; + } + return bucket +} + + +/** + * + * @param {*} file 传入文件 + * @param {String} secene 传入 'product' + * @param {String} type 传入 'product' + * @returns + */ +const uploadCDNImg = (file, secene, type) => { + // var file = event.target.files[0]; + // var filetype = file.type + let filetype = file.tempFilePath + + if (!getFileType(filetype)) { + Taro.showToast({ + title: "上传文件类型错误", + icon: "none", + duration: 3800 + }) + return false + } + return new Promise((resolve, reject, race) => { + getSecret(secene, type) + .then(result => { + + console.log('bucket', result.bucket); + var formdata = { + 'authorization': result.authorization, + 'policy': result.policy, + // "file": file.tempFilePath, + } + + const uploadTask = Taro.uploadFile({ + url: `${UPLOAD_CDN_URL}${result.bucket}`, + formData: formdata, + filePath: file.tempFilePath, + name: 'file', + success: res => { + resolve(JSON.parse(`${res.data}`)) + }, + fail: err => { + console.log(err) + reject(err) + } + }) + + uploadTask.progress(res => { + console.log('上传进度', res.progress); + if (res.progress < 100) { + Taro.showLoading({ + title: '上传中...' + }) + } else { + Taro.hideLoading() + } + }) + }) + .catch(result => { + reject(result) + Taro.showToast({ + title: "获取密钥失败!", + icon: "none", + duration: 3800 + }) + }) + }) +} + +const taroChooseImg = () => { + Taro.chooseImage({ + count: 1, + sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 + sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 + success: (res) => { + console.log('res:', res) + Taro.chooseMessageFile({ + count: 1, + + }) + }, + fail: (err) => { + console.log('图片选择失败:', err) + } + }) +} + +export default uploadCDNImg \ No newline at end of file diff --git a/src/common/user.js b/src/common/user.js new file mode 100644 index 0000000..aabdbfc --- /dev/null +++ b/src/common/user.js @@ -0,0 +1,36 @@ +import Taro from "@tarojs/taro"; +import { useStore } from "vuex"; +import { computed } from "@vue/runtime-core"; + +/** + * + * @param {String} token + */ +export const setToken = (token) => { + Taro.setStorageSync('token', token) +} +/** + * + * @param {Object} userinfo + */ +export const setUserInfo = (userinfo) => { + Taro.setStorageSync('userInfo', userinfo) +} + + +/** + * 检查登录 + */ +export const checkLogin = () => { + const store = useStore() + const token = computed(() => store.state.token) + console.log('checklogin token', token); + + // 本地调试屏蔽 + if (token == '') { + Taro.redirectTo({ + url: '/pages/login/index', + }) + } + +} \ No newline at end of file diff --git a/src/common/util.js b/src/common/util.js new file mode 100644 index 0000000..14921f7 --- /dev/null +++ b/src/common/util.js @@ -0,0 +1,93 @@ +/** + * 防抖 + * @param {*} fn + * @param {*} delay + * @returns + */ +export const debounce = (fn, delay) => { + let timer = null; + return (...param) => { + if (timer) clearTimeout(timer); + timer = setTimeout(() => { + fn(...param); + }, delay); + }; +} + +/** + * 节流 + * @param {*} fn + * @param {*} delay + * @returns + */ +export const throttle = (fn, delay) => { + let pre = 0; + return (...params) => { + let now = new Date().getTime(); + console.log('相差:',now-pre) + if (now - pre > delay) { + fn(...params); + pre = now; + } + }; +} + + +/** + * 批量过滤对象值为空的属性 + * @param {Object} val 需要过滤的对象 + * @param {Array} arr 排除过滤的属性 + * @returns + */ + export const getFilterData = (val = {}, arr = []) => { + let res = {} + for(let key in val) { + if(val[key]!=undefined&&val[key]!=null&&(!arr.includes(key))){ + if(val[key] instanceof Number){ + if(!isNaN(val[key])) { + res[key] = val[key] + } + }else{ + res[key] = val[key] + } + } + } + return res +} +/** + * 对象深拷贝 + * @param {*} object + * @returns + */ + export const copyObject = (object)=>{ + if(object.constructor==Object){ + let keys = Object.keys(object); + let newObject = {}; + keys.map(key=>{ + newObject[key]= copyObject(object[key]); + }) + return newObject; + }else if(object.constructor==Array){ + return object.map(item=>{ + return copyObject(item); + }) + }else{ + return object; + } +} + +/** + * + * @param {*} suffix + * !w80 + !w100 + !w160 + !w200 + !w400 + !w800 + !wh400 + !w600 + */ + export const screenshot = (url, suffix="!w200")=>{ + return url+suffix; + } \ No newline at end of file diff --git a/src/components/swiper/index.module.scss b/src/components/banner/index.module.scss similarity index 100% rename from src/components/swiper/index.module.scss rename to src/components/banner/index.module.scss diff --git a/src/components/banner/index.tsx b/src/components/banner/index.tsx new file mode 100644 index 0000000..594ebb8 --- /dev/null +++ b/src/components/banner/index.tsx @@ -0,0 +1,51 @@ +import { Image, Swiper, SwiperItem, View } from "@tarojs/components" +import { goLink } from "@/common/common" +import {GetBannerList} from "@/api/banner" +import styles from './index.module.scss' +import { useEffect, useState } from "react" + +type item = {title:string, img:string, url:string, id:number} + +type params = { + list?: item[] + swiperOnClick?: (val: item) => void, + style?: Object +} +export default (props:params) => { + let {swiperOnClick, style = {}} = props + + const [list, setList] = useState([]) + const {fetchData, state} = GetBannerList() + + useEffect(() => { + getData() + }, []) + + const getData = async () => { + const res = await fetchData() + setList(res.data.list) + } + + return ( + + + { + list?.map(item => { + return + goLink(item.link)}> + + + + }) + } + + + ) + +} \ No newline at end of file diff --git a/src/components/bluetooth/LinkBlueTooth.tsx b/src/components/bluetooth/LinkBlueTooth.tsx new file mode 100644 index 0000000..66f01a7 --- /dev/null +++ b/src/components/bluetooth/LinkBlueTooth.tsx @@ -0,0 +1,90 @@ +import { View } from "@tarojs/components"; +import { memo, useEffect, useMemo, useState } from "react"; +import Taro from "@tarojs/taro"; +import {useBluetooth} from "@/use/contextBlueTooth" +import SearchInput from "@/components/searchInput"; +import Popup from "@/components/bluetooth/Popup" +import classnames from "classnames"; +import styles from "./css/linkBlueTooth.module.scss" + +export default memo(() => { + const {state, init, startScan, connect, disconnect} = useBluetooth() + + useEffect(() => { + init() + }, []) + + const [linkStatus, setLinkStatus] = useState(1) + useEffect(() => { + if(!state.available) { + setLinkStatus(1) + } else if(state.available&&state.connected?.name) { + setLinkStatus(3) + } else { + setLinkStatus(2) + } + console.log('aaa:::',state.connected) + }, [state.available, state.connected]) + + const linkName = useMemo(() => { + return state.connected?.localName||'' + }, [state.connected]) + + //链接设备 + const onLinkListen = (item) => { + if(!state.connected&&!state.connecting) + connect(item) + } + + const [popupShow, setPopupShow] = useState(false) + //显示设备列表 + const onFindDevice = () => { + if(linkStatus == 1) { + Taro.showToast({ + title:'请打开蓝牙', + icon:'none' + }) + } else { + setPopupShow(true) + onFindEven() + } + + } + const onFindEven = () => { + if(!state.discovering&&!state.connected&&!state.connecting) + startScan() + } + + //断开链接 + const onDisconnect = () => { + disconnect() + setPopupShow(false) + } + + return ( + <> + + + + + { + linkStatus == 1&&请开启蓝牙|| + linkStatus == 2&&未连接设备|| + linkStatus == 3&&{linkName} + } + + + setPopupShow(false)} + onLink={item => onLinkListen(item)} + onOff={onDisconnect} + onFind={onFindEven} + /> + + + + ); + +}) diff --git a/src/components/bluetooth/Popup.tsx b/src/components/bluetooth/Popup.tsx new file mode 100644 index 0000000..8a5070a --- /dev/null +++ b/src/components/bluetooth/Popup.tsx @@ -0,0 +1,73 @@ +import { ScrollView, View } from "@tarojs/components" +import { memo, useEffect, useState } from "react" +import Loading from "@/components/loading" +import style from "./css/popup.module.scss" + +interface params { + state: any, + show: Boolean, + onClose: (Boolean) => void, + onLink: (any) => void, + children?: React.ReactNode + onOff: () => void, + onFind: () => void, +} + +export default memo(({state, show=false, onClose, onLink, onOff, onFind}:params) => { + const [popupShow, setPopupShow] = useState(show) + useEffect(() => { + setPopupShow(show) + }, [show]) + const onCloseListener = () => { + onClose(false) + } + + return ( + <> + { + popupShow&& + + 搜索设备 + + + { + (state.devices&&state.devices.length > 0)&&state?.devices.map(item => { + return ( + onLink(item)}> + {item.name} + { + (!state.connecting&&!state.connected)&&链接|| + (state.connecting&&item.deviceId == state.connecting.deviceId)&&正在链接...|| + (state.connected&&item.deviceId == state.connected.deviceId)&&链接成功 + } + + ) + })|| + + { + (!state.discovering)&& <> + 暂无设备,请按以下条件检查 + 1.请确保取色仪处于激活状态 + 2.请确保取色仪没有链接其他设备 + 3.请打开手机定位 + || + 设备搜索中 + } + + + + } + + + { + state.connected&&断开链接|| + (!state.connected&&state.discovering)&&搜索中|| + 重新搜索 + } + + + + } + + ) +}) \ No newline at end of file diff --git a/src/components/bluetooth/css/linkBlueTooth.module.scss b/src/components/bluetooth/css/linkBlueTooth.module.scss new file mode 100644 index 0000000..4156811 --- /dev/null +++ b/src/components/bluetooth/css/linkBlueTooth.module.scss @@ -0,0 +1,30 @@ + +.main{ + .bluetooth_link{ + display: flex; + align-items: center; + .link_status{ + width: 12px; + height: 12px; + background: #f02409; + border-radius: 50%; + } + .link_statused{ + background: #07C160; + } + .link_statused_no{ + background: #f0ec09; + } + .link_name{ + font-size: $font_size; + margin-left: 20px; + + } + .link_name_no{ + color: #f02409; + } + .link_name_no_link{ + color: #f0ec09; + } + } +} \ No newline at end of file diff --git a/src/components/bluetooth/css/popup.module.scss b/src/components/bluetooth/css/popup.module.scss new file mode 100644 index 0000000..04eecb7 --- /dev/null +++ b/src/components/bluetooth/css/popup.module.scss @@ -0,0 +1,90 @@ +.popup{ + width: 100vw; + height: 100vh; + position: absolute; + top: 0; + left: 0; + .mask{ + width: 100%; + height: 100%; + background-color: rgba(0,0,0,0.5); + position: fixed; + top:0; + left:0; + z-index: 9; + } + .content{ + z-index: 99; + background-color: #fff; + width: 75vw; + height: 600px; + position: fixed; + top: 50%; + left: 50%; + border-radius: 20px; + transform: translateX(-50%) translateY(-50%); + display: flex; + flex-direction: column; + font-size: 28px; + .title{ + text-align: center; + margin: 20px; + } + .list{ + height: 480px; + padding: 0 20px; + .scroll{ + height: 100%; + } + .item{ + margin-bottom: 20px; + display: flex; + justify-content: space-between; + border-bottom: 1px dashed #ccc; + padding: 15px 0; + color: #3b3b3b; + @mixin link{ + font-size: 25px; + } + .link_success{ + @include link; + color: green; + } + .link_ing { + color: orange; + } + } + .noDevice{ + height: 100%; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + color: #a8a8a8; + .n_item{ + width: 100%; + text-align: left; + margin-top: 20px; + padding: 0 30px; + box-sizing: border-box; + } + } + + } + .footer{ + text-align: center; + padding: 20px 0; + background-color: #f1f1f1; + border-radius: 0 0 10px 10px; + display: flex; + justify-content: center; + align-items: center; + } + .finding{ + color: orange; + } + .footer_off{ + color: red; + } + } +} diff --git a/src/components/infiniteScroll/index.module.scss b/src/components/infiniteScroll/index.module.scss index be3ffd3..d72d954 100644 --- a/src/components/infiniteScroll/index.module.scss +++ b/src/components/infiniteScroll/index.module.scss @@ -1,6 +1,7 @@ .scroll_main{ height: 100%; + .infinite_scroll{ font-size: $font_size_medium; color: $color_font_two; diff --git a/src/components/infiniteScroll/index.tsx b/src/components/infiniteScroll/index.tsx index 1624ad8..4dc2197 100644 --- a/src/components/infiniteScroll/index.tsx +++ b/src/components/infiniteScroll/index.tsx @@ -7,6 +7,7 @@ type Params = { styleObj?: Object, selfonScrollToLower?: () => void, hasMore?: false|true, + moreStatus?: false|true, children?: ReactNode, lowerThresholdNum?: number, selfOnScrollToUpper?:() => void @@ -17,7 +18,7 @@ type Params = { selfOnRefresherAbort?: () => void paddingBottom?: number, refresherTriggered?: true|false, - refresherEnabled?: true|false + refresherEnabled?: true|false, } export default memo(({ styleObj, @@ -33,7 +34,8 @@ export default memo(({ lowerThresholdNum = 5, paddingBottom = 0, refresherTriggered = false, - refresherEnabled = false + refresherEnabled = false, + moreStatus = true }: Params) => { const scrollToLower = () => { selfonScrollToLower?.() @@ -73,16 +75,16 @@ export default memo(({ onRefresherRefresh = {() => refresherRefresh()} onRefresherRestore = {() => refresherRestore()} onRefresherAbort = {() => refresherAbort()} - refresherBackground ='#ccc' + refresherBackground ='#F8F8F8' > {children} - + {moreStatus&& { hasMore&&加载中|| - 没有更多了 + 没有更多数据了 } - + } diff --git a/src/components/moveBtn/index.module.scss b/src/components/moveBtn/index.module.scss index 9400687..f04d5be 100644 --- a/src/components/moveBtn/index.module.scss +++ b/src/components/moveBtn/index.module.scss @@ -12,6 +12,7 @@ display: flex; justify-content: center; align-items: center; + z-index:999; .shop_icon{ font-size: 50px; color: $color_main; diff --git a/src/components/product/index.tsx b/src/components/product/index.tsx index d7d6d3b..64a951f 100644 --- a/src/components/product/index.tsx +++ b/src/components/product/index.tsx @@ -3,27 +3,27 @@ import Taro from "@tarojs/taro" import { goLink } from "@/common/common" import styles from './index.module.scss' -type params = { - desStatus?: true|false +type Params = { + desStatus?: true|false, + productList?: any[] } -export default ({desStatus = true}: params) => { - +export default ({desStatus = true, productList = []}:Params) => { return ( - {new Array(10).fill('').map(item => { - return goLink('/pages/details/index?id=1')}> + {productList?.map(item => { + return goLink(`/pages/details/index?id=${item.id}`)}> - - 230色 + + {item.product_color_count}色 - 0770#21S单面平纹(食毛) + {item.code}#{item.name} - 160cm - 110g + {item.width} + {item.weight_density} - 67.6%棉24%涤纶6.4%氨纶 - {desStatus&&产品描述产品描述产品描述产品描述产品描述} + {item.component} + {desStatus&&{item.describe}} })} diff --git a/src/components/search/index.module.scss b/src/components/search/index.module.scss index 2121879..46a8c27 100644 --- a/src/components/search/index.module.scss +++ b/src/components/search/index.module.scss @@ -20,6 +20,7 @@ border-radius: 50px; padding: 0 60px; box-sizing: border-box; + z-index:0; &::-webkit-input-placeholder { /* WebKit browsers */ color: #999; font-size: 16px; @@ -55,7 +56,7 @@ position: absolute; left: 10px; margin-right: 0; - + z-index: 10; } .icon_out{ margin-right: 10px; diff --git a/src/components/search/index.tsx b/src/components/search/index.tsx index 6f539d9..0138c7e 100644 --- a/src/components/search/index.tsx +++ b/src/components/search/index.tsx @@ -2,7 +2,8 @@ import { Input, View } from "@tarojs/components"; import styles from "./index.module.scss" import CloseBtn from "@/components/closeBtn" import classnames from "classnames"; -import { memo, useEffect, useState } from "react"; +import { debounce } from "@/common/util"; +import { memo, useEffect, useRef, useState } from "react"; type Params = { clickOnSearch?: (val: string) => void @@ -14,7 +15,8 @@ type Params = { style?: Object, showBtn?: false|true, btnStyle?: Object, - btnTitle?: string + btnTitle?: string, + debounceTime?: number //防抖时间,不设默认为零 } export default memo(({ @@ -24,17 +26,21 @@ export default memo(({ placeholder = '输入搜索内容', showIcon = true, showBtn = false, - style = {}, btnStyle = {}, placeIcon = 'inner', - btnTitle = '搜索' + btnTitle = '搜索', + debounceTime = 0 }:Params) => { const [inputCon , setInputCon] = useState('') - + const debounceTimeRef = useRef(0) + + useEffect(() => { + debounceTimeRef.current = debounceTime + }, [debounceTime]) + const onInputEven = (e) => { const value = e.detail.value - setInputCon(value) - changeOnSearch?.(value) + changeData(value) } const clearInput = () => { @@ -42,13 +48,18 @@ export default memo(({ changeOnSearch?.('') } + const changeData = debounce((value) => { + setInputCon(value) + changeOnSearch?.(value) + }, debounceTimeRef.current) + const onSearch = () => { clickOnSearch?.(inputCon) } return ( <> - onSearch()} style={style}> + clickOnSearch?.(inputCon)}> {showIcon&&} onInputEven(e)}> diff --git a/src/components/searchInput/index.module.scss b/src/components/searchInput/index.module.scss new file mode 100644 index 0000000..c381191 --- /dev/null +++ b/src/components/searchInput/index.module.scss @@ -0,0 +1,37 @@ + +.searchInput_main{ + display: flex; + align-items: center; + min-height: 62px; + padding: 10px 0; + border-bottom: 1px solid #F0F0F0; + .searchInput_title { + width: 150px; + min-height: 50px; + font-size: 28px; + border-right: 1px solid #F0F0F0; + color: $color_font_two; + margin-right: 20px; + padding-left: 20px; + display: flex; + align-items: center; + + // &::before{ + // content: ""; + // height: 50px; + // width: 1px; + // background-color: #F0F0F0; + // } + } + .searchInput_con{ + flex:1; + width: 100%; + input{ + font-size: 26px; + } + } + .icon_more_self{ + font-size: 28px; + color: $color_font_two; + } +} \ No newline at end of file diff --git a/src/components/searchInput/index.tsx b/src/components/searchInput/index.tsx new file mode 100644 index 0000000..35d507c --- /dev/null +++ b/src/components/searchInput/index.tsx @@ -0,0 +1,48 @@ +import { Input, View } from "@tarojs/components"; +import { memo, ReactHTMLElement, ReactNode, useDebugValue, useMemo } from "react"; +import styles from './index.module.scss'; + +type Params = { + showIcon?: false|true, + disabled?: false|true, + placeholder?: string, + title?: string, + showTitle?: false|true, + showBorder?: false|true, + changeOnInput?: (string) => void, + clickOnInput?: () => void, + children?: ReactNode + +} + +export default memo((props: Params) => { + let { + showTitle = true, + title = '标题', + showIcon = false, + disabled = false, + placeholder = '请输入', + showBorder = true, + changeOnInput, + clickOnInput + } = props + + let stylen = useMemo(() => { + if(!showBorder) { + return { borderBottom: 0 } + } + return {} + }, [showBorder]) + console.log('searchInput::') + return ( + + {showTitle&&{title}} + + {!props.children&& clickOnInput?.()} onInput={(e) => changeOnInput?.(e.detail.value)}/> + ||{props.children} + } + + {showIcon&&} + + ) +}) \ No newline at end of file diff --git a/src/components/shopCart/index.tsx b/src/components/shopCart/index.tsx index 8e22413..5dba441 100644 --- a/src/components/shopCart/index.tsx +++ b/src/components/shopCart/index.tsx @@ -7,6 +7,8 @@ import InfiniteScroll from "@/components/infiniteScroll"; import styles from "./index.module.scss" import { useEffect, useState } from "react"; import Taro from "@tarojs/taro"; +import { goLink } from "@/common/common"; +import {GetShoppingCartApi} from "@/api/shopCart" type param = { show?: true|false, @@ -19,21 +21,21 @@ export default ({show = false, onClose}: param) => { setSelectIndex(index) } + //获取数据 const [list, setList] = useState([]) const [loading, setLoading] = useState(false) + const {fetchData} = GetShoppingCartApi() + const getShoppingCart = async () => { + setLoading(true) + const {data} = await fetchData() + setList(data) + setLoading(false) + } + useEffect(() => { if(!show) return - let lists:any[] = [] - for(let i = 0; i < 20; i++) { - lists = [...lists, { - title:`${i}#薄荷绿`, - subtitle: '0770# 21S单面平纹(食毛)', - tag: '剪板', - select: i%2?true: false - }] - } - setList([...lists]) + getShoppingCart() }, [show]) useEffect(() => { @@ -91,6 +93,8 @@ export default ({show = false, onClose}: param) => { } }) } + + return ( @@ -111,7 +115,7 @@ export default ({show = false, onClose}: param) => { {loading&&} - {!loading&&list.length > 0&& {console.log('触底了')}} paddingBottom={100}> + {!loading&&list.length > 0&& {console.log('触底了')}} paddingBottom={100}> {list.map((item, index) => { return @@ -123,7 +127,7 @@ export default ({show = false, onClose}: param) => { {item.title} - 0770# 21S单面平纹(食毛) + 07703# 21S单面平纹(食毛) 剪板 @@ -134,7 +138,7 @@ export default ({show = false, onClose}: param) => { })} } - {!loading&&list.length > 0&& + {!loading&&list.length == 0 && 暂未选择商品 去选购 } @@ -149,7 +153,7 @@ export default ({show = false, onClose}: param) => { 200 预估金额 - + goLink('/pages/order/index')}> 去结算 diff --git a/src/components/sideBar/index.tsx b/src/components/sideBar/index.tsx index 4330f9d..2729e92 100644 --- a/src/components/sideBar/index.tsx +++ b/src/components/sideBar/index.tsx @@ -1,42 +1,57 @@ import { ScrollView, View } from "@tarojs/components" -import { memo, ReactNode, useRef, useState } from "react" +import { memo, ReactNode, useEffect, useRef, useState } from "react" import styles from "./index.module.scss" import classnames from "classnames"; import Taro, { useReady } from "@tarojs/taro"; import InfiniteScroll from "../infiniteScroll"; -type ListProps = { - title: string, - value: number -} + type Params = { - list?: ListProps[], + list?: any[], defaultValue?: number|string, children?: ReactNode, height?: string, heightItem?: number, - sideBarOnClick?: (ListProps) => void + sideBarOnClick?: (val:any) => void, + refresherTriggered?: true|false, + selfOnRefresherRefresh?: () => void + selfOnScrolltolower?: () => void, + hasMore?: true|false } -export default memo(({list = [], defaultValue = 0, height='100vh', sideBarOnClick, children, heightItem = 100}: Params) => { +export default memo(({list = [], + defaultValue = 0, + height='100vh', + sideBarOnClick, + children, + heightItem = 100, + refresherTriggered = false, + selfOnRefresherRefresh, + selfOnScrolltolower, + hasMore = true +}: Params) => { let num_half = useRef(0) const [selected, setSelected] = useState(defaultValue) const [tabId, setTabId] = useState('') + useEffect(() => { + setSelected(defaultValue) + }, [defaultValue]) + const init = () => { const index = list?.findIndex(item => { - return item.value == defaultValue + return item.id == defaultValue }) if(index !== -1) { computeSelectTab(index) } } - const clickEvent = ({item, index}: {item:ListProps, index:number}) => { - setSelected(item.value) + const clickEvent = ({item, index}: {item, index:number}) => { + setSelected(item.id) sideBarOnClick?.(item) computeSelectTab(index) } @@ -44,9 +59,10 @@ export default memo(({list = [], defaultValue = 0, height='100vh', sideBarOnClic const computeSelectTab = (index) => { if((index + 1) > num_half.current) { let num = index + 1 - num_half.current - setTabId(list[num].value.toString()) + setTabId(list[num].id.toString()) } else { - setTabId(list[0].value.toString()) + setTabId(list[0].id.toString()) + } } @@ -65,10 +81,7 @@ export default memo(({list = [], defaultValue = 0, height='100vh', sideBarOnClic }) }) - //触底事件 - const onScrolltolower = () => { - console.log('触底了') - } + return ( <> @@ -78,14 +91,14 @@ export default memo(({list = [], defaultValue = 0, height='100vh', sideBarOnClic list?.map((item, index) => { return( clickEvent({item, index})} - id={`tab_${item.value}`} - key={item.value} + id={`tab_${item.id}`} + key={item.id} style={{height:heightItem+'rpx'}} > - {item.title} + {item.name} ) @@ -94,7 +107,7 @@ export default memo(({list = [], defaultValue = 0, height='100vh', sideBarOnClic - onScrolltolower()}> + selfOnScrolltolower?.()} refresherTriggered={refresherTriggered} refresherEnabled={true} selfOnRefresherRefresh={() => selfOnRefresherRefresh?.()}> {children} diff --git a/src/components/swiper/index.tsx b/src/components/swiper/index.tsx deleted file mode 100644 index af56652..0000000 --- a/src/components/swiper/index.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import { Image, Swiper, SwiperItem, View } from "@tarojs/components" -import { goLink } from "@/common/common" -import Taro from "@tarojs/taro" -import styles from './index.module.scss' - -type item = {title:string, img:string, url:string, id:number} - -type params = { - list?: item[] - swiperOnClick?: (val: item) => void, - style?: Object -} -export default (props:params) => { - let {list = [], swiperOnClick, style = {}} = props - list = [ - { - title:'数据', - img:'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2F811%2F021315104H2%2F150213104H2-3-1200.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1651817947&t=5467a207f845ddfc7737d55934e6b26d', - url:'', - id:1 - }, - { - title:'数据', - img:'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2F811%2F021315104H2%2F150213104H2-3-1200.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1651817947&t=5467a207f845ddfc7737d55934e6b26d', - url:'', - id:2 - } - ] - - return ( - - - { - list.map(item => { - return - goLink(`/pages/classList/index?id=${item.id}`)}> - - - - }) - } - - - ) - -} \ No newline at end of file diff --git a/src/components/tabs/index.module.scss b/src/components/tabs/index.module.scss index c04b80f..2f0bc2d 100644 --- a/src/components/tabs/index.module.scss +++ b/src/components/tabs/index.module.scss @@ -1,20 +1,28 @@ .tabs_main{ display: flex; + width: 100%; .tabs_scroll{ width: 100%; display: flex; white-space: nowrap; - border-bottom: 1px solid $color_font_two; - border-top: 1px solid $color_font_two; - height: 102px; - + ::-webkit-scrollbar { + display:none; + width:0; + height:0; + color:transparent; + } .tabs_item{ flex:1; display: inline-block; - padding: 10px 20px; - height: 100%; - box-sizing: border-box; - position: relative; + font-size: 24rpx; + background-color: #F0F0F0; + border-radius: 24rpx; + min-width: 126rpx; + height: 46.93rpx; + text-align: center; + line-height: 46.93rpx; + color: #707070; + margin-right: 20px; .tabs_item_con{ height: 100%; display: flex; diff --git a/src/components/tabs/index.tsx b/src/components/tabs/index.tsx index 71a1bc5..3c7492e 100644 --- a/src/components/tabs/index.tsx +++ b/src/components/tabs/index.tsx @@ -13,10 +13,12 @@ type Params = { list?: ListProps[], defaultValue?: number|string, children?: ReactNode, - tabsOnClick?: (ListProps) => void + tabsOnClick?: (ListProps) => void, + style?:Object, + } -export default memo(({list = [], defaultValue = 0, tabsOnClick}: Params) => { +export default memo(({list = [], defaultValue = 0, tabsOnClick, style={}}: Params) => { const [selected, setSelected] = useState(defaultValue) const [tabId, setTabId] = useState('') @@ -46,8 +48,7 @@ export default memo(({list = [], defaultValue = 0, tabsOnClick}: Params) => { list.map((item, index) => { return ( clickEvent({item,index})}> - {item.title} - {(selected == item.value) && } + {item.title} ) }) diff --git a/src/constants/userInfo.ts b/src/constants/userInfo.ts new file mode 100644 index 0000000..77585a2 --- /dev/null +++ b/src/constants/userInfo.ts @@ -0,0 +1,6 @@ +export const SET_USERINFO = 'setUserInfo' +export const SET_TOKEN = 'setToken' +export const SET_SESSIONKEY = 'setSessionkey' +export const CLEAR_TOKEN = 'clearToken' +export const CLEAR_SESSIONKEY = 'clearSessionkey' +export const CLEAR_USERINFO = 'clearUserInfo' \ No newline at end of file diff --git a/src/pages/classList/index.module.scss b/src/pages/classList/index.module.scss index b8028e4..7b62533 100644 --- a/src/pages/classList/index.module.scss +++ b/src/pages/classList/index.module.scss @@ -15,6 +15,8 @@ color: $color_font_three; .text_one{ color: $color_main; + display: flex; + align-items: center; } .text_two{ position: relative; @@ -33,20 +35,11 @@ } } } - .filter_btn{ + .filter_btns{ display: flex; justify-content: space-between; padding: 20px; - view{ - font-size: $font_size_medium; - background-color: #F0F0F0; - border-radius: 24px; - width: 126px; - height: 46.93px; - text-align: center; - line-height: 46.93px; - color: $color_font_three; - } + .selected{ background-color: #ecf5ff; border: 2px solid #cde5ff; diff --git a/src/pages/classList/index.tsx b/src/pages/classList/index.tsx index f9a60b7..bb497cc 100644 --- a/src/pages/classList/index.tsx +++ b/src/pages/classList/index.tsx @@ -7,9 +7,22 @@ import Popup from "@/components/popup"; import styles from './index.module.scss' import { useState } from "react"; import Filter from "./components/filter"; +import Tabs from "@/components/tabs"; +import SortBtn from "@/components/sortBtn"; export default () => { const [showPopup, setShowPopup] = useState(false) + const [selectList, setSelectList] = useState([ + {title: '系列', value:1}, + {title: '系列', value:2}, + {title: '系列', value:3}, + {title: '系列', value:4}, + {title: '系列', value:6}, + {title: '系列', value:7}, + {title: '系列', value:8}, + {title: '系列', value:9}, + {title: '系列', value:10}, + ]) return ( @@ -17,17 +30,17 @@ export default () => { - 综合 + + 综合 + + setShowPopup(true)}> 筛选 - - 系列 - 幅宽 - 克重 - 成分 + + diff --git a/src/pages/details/components/counter/index.tsx b/src/pages/details/components/counter/index.tsx index 3640a59..d7f632d 100644 --- a/src/pages/details/components/counter/index.tsx +++ b/src/pages/details/components/counter/index.tsx @@ -3,18 +3,19 @@ import { useEffect, useMemo, useRef, useState } from "react" import Big from 'big.js' import styles from "./index.module.scss" type params = { - minNum?: number, - maxNum?: number, - step?: number, - defaultNum?: number, + minNum?: number, //最小值 + maxNum?: number, //最大值 + step?: number, //步长 + defaultNum?: number, //默认值 digits?: number //多少位小数 - onChange?:(val:number) => void, - onBlue?:(val:number) => void, - onClickBtn?:(val:number) => void, + onChange?:(val:number) => void, + onBlue?:(val:number) => void, //失去焦点触发 + onClickBtn?:(val:number) => void, unit?: string } export default ({minNum = 0, maxNum = 100, step=1, digits = 0, defaultNum = 0, onChange, onBlue, onClickBtn, unit = ''}: params) => { const [value, setValue] = useState({count:defaultNum}) + const onPlus = () => { let {count} = value let num_res = Big(count).add(step).toNumber() @@ -27,7 +28,7 @@ export default ({minNum = 0, maxNum = 100, step=1, digits = 0, defaultNum = 0, o const minus = () => { let {count} = value let num_res = Big(count).minus(step).toNumber() - num_res = num_res <= minNum?minNum:num_res + num_res = num_res < minNum?0:num_res setValue({...value, count:num_res}) onChange?.(parseFloat(num_res)) onClickBtn?.(parseFloat(num_res)) diff --git a/src/pages/details/components/orderCount/index.module.scss b/src/pages/details/components/orderCount/index.module.scss index 25fef03..8c745e2 100644 --- a/src/pages/details/components/orderCount/index.module.scss +++ b/src/pages/details/components/orderCount/index.module.scss @@ -102,6 +102,12 @@ font-size: $font_size; color: $color_main; } + .priceText{ + font-size: $font_size_big; + Text{ + font-size: $font_size_min; + } + } } .btn_con{ display: flex; diff --git a/src/pages/details/components/orderCount/index.tsx b/src/pages/details/components/orderCount/index.tsx index eb5c0c4..9ebddbf 100644 --- a/src/pages/details/components/orderCount/index.tsx +++ b/src/pages/details/components/orderCount/index.tsx @@ -1,4 +1,4 @@ -import {Image, ScrollView, View } from "@tarojs/components" +import {Image, ScrollView, View, Text } from "@tarojs/components" import Popup from "@/components/popup" import LoadingCard from "@/components/loadingCard"; import Search from "@/components/search"; @@ -7,62 +7,65 @@ import Counter from "../counter"; import Big from 'big.js' import classnames from "classnames"; import styles from "./index.module.scss" -import { memo, useEffect, useState } from "react"; +import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react"; +import {GetColorList} from "@/api/materialColor" +import { useRouter } from "@tarojs/taro"; +import UseLogin from "@/use/useLogin" +import { formatHashTag, formatMillionYuan } from "@/common/fotmat"; +import { getFilterData } from "@/common/util"; type param = { show?: true|false, - onClose?: () => void + onClose?: () => void, + title?: string, + productId?: number } -export default memo(({show = false, onClose}: param) => { +export default memo(({show = false, onClose, title = '', productId = 0}: param) => { const selectList = [ - {step:1, digits:2, title:'剪板', unit:'米'}, - {step:1, digits:2, title:'散剪', unit:'米'}, - {step:1, digits:0, title:'大货', unit:'件'} + {id: 0, step:1, digits:0, maxNum:100000, defaultNum:1, title:'大货', unit:'件', eunit:'kg'}, + {id: 1, step:1, digits:2, maxNum:9.99, defaultNum:1, title:'剪板', unit:'米', eunit:'m'}, + {id: 2, step:1, digits:2, minNum:10, maxNum:100000, defaultNum:10, title:'散剪', unit:'米', eunit:'kg'}, ] const [selectIndex, setSelectIndex] = useState(0) const selectProduct = (index:number) => { setSelectIndex(index) } - + + //获取面料颜色列表 + const {fetchData:colorFetchData} = GetColorList() const [list, setList] = useState([]) const [loading, setLoading] = useState(false) - - console.log('执行执行') - + const condition = useRef({physical_warehouse:1, sale_mode:selectIndex, product_id:0, code_or_name:null}) + const getColorList = async () => { + setLoading(() => true) + console.log('数据:::',getFilterData(condition.current)) + let {data} = await colorFetchData(getFilterData(condition.current)) + setList([...data.list]) + setLoading(() => false) + } + const [showPopup, setShowPopup] = useState(false) + //显示获取 useEffect(() => { - if(!show) return - let lists:any[] = [] - for(let i = 0; i < 20; i++) { - lists = [...lists, { - title:`${i}#薄荷绿`, - subtitle: '0770# 21S单面平纹(食毛)', - tag: '剪板', - count:0, - show: false, - }] + if(show) { + condition.current.product_id = productId + getColorList() } - setList([...lists]) + setShowPopup(show) }, [show]) + //卸载清空 useEffect(() => { return () => { setList([]) } }, []) - const [showPopup, setShowPopup] = useState(false) - useEffect(() => { - setShowPopup(show) - }, [show]) - - //popup关闭 const closePopup = () => { onClose?.() setShowPopup(false) } - //计算总数量和总米/件数 const [selectCount, setSelectCount] = useState({ sumCount: 0, @@ -88,8 +91,9 @@ export default memo(({show = false, onClose}: param) => { } const onAdd = (item) => { item.show = true - item.count = item.count == 0?1:item.count - setList([...list]) + item.count = selectList[selectIndex].defaultNum + console.log('aa:::',item.count) + setList((list) => [...list]) } //搜索显示与隐藏 @@ -98,12 +102,47 @@ export default memo(({show = false, onClose}: param) => { setSearchShow(true) } - + //添加购物车 + const {getSelfUserInfo} = UseLogin() + const addShopCart = () => { + getSelfUserInfo() + } + + //显示金额 + const priceFormat = useCallback((item) => { + let price = 0 + if(selectIndex == 0) { + price = formatMillionYuan(item.bulk_price, 100).num + } else if(selectIndex == 1) { + price = formatMillionYuan(item.length_cut_price, 100).num + } else { + price = formatMillionYuan(item.weight_cut_price, 100).num + } + return ¥{Number(price) }{' /' + selectList[selectIndex].eunit} + }, [list, selectIndex]) + + //重置数据 + useEffect(() => { + const newList = list.map(item => { + item.count = 0 + item.show = false + return item + }) + setList([...newList]) + }, [selectIndex]) + + //筛选数据 + const searchInput = (e) => { + condition.current.code_or_name = e + getColorList() + } + return ( + closePopup()}> - 0770# 21S单面平纹(食毛) + {title} 下单类型: @@ -114,25 +153,26 @@ export default memo(({show = false, onClose}: param) => { {searchShow&& - + searchInput(e)} debounceTime={400}/> setSearchShow(false)}>取消 } - 颜色分类 (13) - changeSearchShow()}> + 颜色分类 (13) {list.length} + {!searchShow&& changeSearchShow()}>} + - {list.length > 0&& + {list.length > 0&& {list.map(item => { return - + - {item.title} - ¥25.5/m + {formatHashTag(item.code, item.name)} + {priceFormat(item)} {!item.show&& onAdd(item)}>添加 @@ -144,6 +184,8 @@ export default memo(({show = false, onClose}: param) => { digits={selectList[selectIndex].digits} onClickBtn={(e) => getInputValue(e, item)} unit={selectList[selectIndex].unit} + minNum={selectList[selectIndex].minNum} + maxNum={selectList[selectIndex].maxNum} /> } @@ -156,7 +198,7 @@ export default memo(({show = false, onClose}: param) => { 当前已选{selectCount.kindCount}种,共{selectCount.sumCount}{selectList[selectIndex].unit} - 加入购物车 + addShopCart()}>加入购物车 diff --git a/src/pages/details/components/preview/index.module.scss b/src/pages/details/components/preview/index.module.scss index 5b57efc..cab4ce5 100644 --- a/src/pages/details/components/preview/index.module.scss +++ b/src/pages/details/components/preview/index.module.scss @@ -30,7 +30,7 @@ margin-top: 10px; background-color: rgba(0,0,0, 0.5); padding: 0 10px; - @include common_ellipsis + @include common_ellipsis(1); } } } \ No newline at end of file diff --git a/src/pages/details/components/swiper/index.tsx b/src/pages/details/components/swiper/index.tsx index c05ed1a..f0788dd 100644 --- a/src/pages/details/components/swiper/index.tsx +++ b/src/pages/details/components/swiper/index.tsx @@ -1,15 +1,16 @@ import { Image, Swiper, SwiperItem, View } from "@tarojs/components" -import { useMemo, useState } from "react" +import { useMemo, useRef, useState } from "react" import styles from './index.module.scss' type item = {title:string, img:string, url:string, id:number} type params = { list?: item[] - } +} export default ({list = []}: params) => { const [pageIndex, setPageIndex] = useState(1) + const pageRef = useRef(null) const pageCount = useMemo(() => { return list.length @@ -17,7 +18,9 @@ export default ({list = []}: params) => { const swiperChange = (e) => { setPageIndex(e.detail.current + 1) + pageRef.current.innerHTML = 2 } + return ( @@ -30,7 +33,7 @@ export default ({list = []}: params) => { })} - {pageIndex+'/'+pageCount} + {pageIndex+'/'+pageCount} ) } \ No newline at end of file diff --git a/src/pages/details/index.config.ts b/src/pages/details/index.config.ts index b12380e..f0757fd 100644 --- a/src/pages/details/index.config.ts +++ b/src/pages/details/index.config.ts @@ -1,3 +1,5 @@ export default { - navigationBarTitleText: '详情' + navigationBarTitleText: '详情', + enablePullDownRefresh: true, + backgroundTextStyle: 'dark' } diff --git a/src/pages/details/index.module.scss b/src/pages/details/index.module.scss index 1c1f42a..2ac32b4 100644 --- a/src/pages/details/index.module.scss +++ b/src/pages/details/index.module.scss @@ -28,11 +28,20 @@ font-size: $font_size_min; text-align: center; color: $color_font_three; + position: relative; .text{ margin-top: 10px; font-size: $font_size_medium; } } + .shareBtn { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: 0; + } .miconfont{ font-size: 36px; } @@ -53,9 +62,16 @@ .con{ display: grid; grid-template-columns: 260px auto; - grid-template-rows: 50px 50px; font-size: $font_size_medium; color: $color_font_three; + .des_text{ + display: flex; + margin-bottom: 16px; + text{ + flex:1; + @include common_ellipsis(1); + } + } } } .product_color{ diff --git a/src/pages/details/index.tsx b/src/pages/details/index.tsx index 29ade99..b2210cb 100644 --- a/src/pages/details/index.tsx +++ b/src/pages/details/index.tsx @@ -1,13 +1,20 @@ -import { Image, RichText, Swiper, SwiperItem, View } from '@tarojs/components' -import Taro from '@tarojs/taro'; +import { Button, Image, RichText, ScrollView, Swiper, SwiperItem, Text, View } from '@tarojs/components' +import Taro, { useDidShow, useRouter, useShareAppMessage } from '@tarojs/taro'; import classnames from "classnames"; import DesSwiper from './components/swiper'; import OrderCount from './components/orderCount'; import ShopCart from '@/components/shopCart'; import Preview,{colorItem} from './components/preview'; import styles from './index.module.scss' -import { useMemo, useState } from 'react'; +import { useEffect, useMemo, useState } from 'react'; +import {formatHashTag} from '@/common/fotmat' +import useManualPullDownRefresh from '@/use/useManualPullDownRefresh'; +import { goLink } from '@/common/common'; +import useUserInfo from '@/use/useUserInfo'; +import {GetProductDetailApi} from '@/api/material' +import useLogin from '@/use/useLogin'; + type item = {title:string, img:string, url:string, id:number} type params = { @@ -16,6 +23,28 @@ type params = { style?: Object } export default (props:params) => { + const {checkLogin} = useLogin() + useDidShow(() => { + checkLogin() + }) + + const router = useRouter() + + //获取数据 + const [productInfo, setProductInfo] = useState({}) + const {fetchData} = GetProductDetailApi() + useEffect(() => { + getProductDetail() + }, []) + const getProductDetail = async () => { + let {data} = await fetchData({id: router.params.id}) + setProductInfo(data) + } + + //面料名称 + const productName = useMemo(() => { + return formatHashTag(productInfo.code, productInfo.name) + },[productInfo]) const list = [ { @@ -34,39 +63,20 @@ export default (props:params) => { const [showCart, setShowCart] = useState(false) - - const [showOrderCount, setShowOrderCount] = useState(false) - // const showCartmemo = useMemo(() => { - // return showCart - // },[showCart]) const html = `

这里是详情

你好啊啊
` - const colorList = [ - { - title:'#1', - img:'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2F811%2F021315104H2%2F150213104H2-3-1200.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1651817947&t=5467a207f845ddfc7737d55934e6b26d', - url:'', - id:1 - }, - { - title:'#1', - img:'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2F811%2F021315104H2%2F150213104H2-3-1200.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1651817947&t=5467a207f845ddfc7737d55934e6b26d', - url:'', - id:1 - }, - - ] + const [colorInfo, setColorInfo] = useState() const [showPreview, setShowPreview] = useState(false) const getColorItem = (item) => { setColorInfo({ - title: item.title, - img: item.img, + title: item.code, + img: item.texture_url, }) setShowPreview(true) } @@ -80,44 +90,61 @@ export default (props:params) => { duration: 2000 }) } + + useShareAppMessage(res => { + if (res.from === 'button') { + // 来自页面内转发按钮 + console.log(res.target) + } + return { + title: '自定义转发标题', + path: '/pages/details/index?id=10', + imageUrl: list[0].img + } + }) + + return ( - 0770# 21S单面平纹(食毛) - 面料描述,疯狂描述。。。 + {productName} + {productInfo.describe} 分享 + + changeCollect()}> 收藏 + 详情参数 - 编号:0770 - 幅宽:160cm - 克重:160g - 成分:67.6%棉24%涤纶6.4%氨纶%氨纶 + 编号:{productInfo.code} + 幅宽:{productInfo.width} + 克重:{productInfo.weight_density} + 成分:{productInfo.component} 色号 (10) - - {colorList.map(item => { - return getColorItem(item)}> - - - - {item.title} - - })} - + + {productInfo?.product_color_list?.map(item => { + return getColorItem(item)}> + + + + {item.code} + + })} + @@ -129,7 +156,7 @@ export default (props:params) => { setShowOrderCount(true)}>开始下单 - setShowOrderCount(false)}/> + setShowOrderCount(false)} title={productName} productId={productInfo.id}/> setShowCart(false)}/> setShowPreview(false)}/> diff --git a/src/pages/index/index.config.ts b/src/pages/index/index.config.ts index 0b7f3f1..1f88149 100644 --- a/src/pages/index/index.config.ts +++ b/src/pages/index/index.config.ts @@ -1,3 +1,5 @@ export default { - navigationBarTitleText: '电子商城' + navigationBarTitleText: '电子商城', + enablePullDownRefresh: true, + backgroundTextStyle: 'dark' } diff --git a/src/pages/index/index.module.scss b/src/pages/index/index.module.scss index 3e1e5c9..b1732f8 100644 --- a/src/pages/index/index.module.scss +++ b/src/pages/index/index.module.scss @@ -20,6 +20,9 @@ text-align: center; line-height: 44px; } + .search_input{ + width: 300px; + } } .products{ flex:1; diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index 985a864..9222be9 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -1,51 +1,113 @@ import {View} from '@tarojs/components' -import Swiper from '@/components/swiper' +import Banner from '@/components/banner' import Search from '@/components/search' import SideBar from '@/components/sideBar' import Product from '@/components/product' import MoveBtn from '@/components/moveBtn' import ShopCart from '@/components/shopCart' -import styles from './index.module.scss' import { goLink } from '@/common/common' -import { useState } from 'react' -import Taro from '@tarojs/taro' +import styles from './index.module.scss' +import { useEffect, useRef, useState } from 'react' +import Taro, { Events, useDidShow, usePullDownRefresh, useRouter } from '@tarojs/taro' +import useManualPullDownRefresh from '@/use/useManualPullDownRefresh' + +import {GetProductKindListApi, GetProductListApi} from '@/api/material' +import useLogin from '@/use/useLogin' export default () => { - const tabs_list = [ - {title:'平纹系列', value: 1}, - {title:'平纹系列', value: 2}, - {title:'平纹系列', value: 3}, - {title:'平纹系列', value: 4}, - {title:'平纹系列', value: 5}, - {title:'平纹系列', value: 6}, - {title:'平纹系列', value: 7}, - {title:'平纹系列', value: 8}, - {title:'平纹系列', value: 9}, - {title:'平纹系列', value: 10}, - {title:'平纹系列', value: 11}, - {title:'平纹系列', value: 12}, - {title:'平纹系列', value: 13}, - {title:'平纹系列', value: 14}, - {title:'平纹系列', value: 15}, - {title:'平纹系列', value: 16}, - {title:'平纹系列', value: 17}, - ] + + const {checkLogin} = useLogin() + + useDidShow(async () => { + await checkLogin() + }) + + useEffect(() => { + categoryList() + }, []) + + //获取面料种类 + const [kindData, setKindData] = useState({list:[], defaultId:0}) + const {fetchData} = GetProductKindListApi() + const categoryList = async () => { + const res = await fetchData() + if(res.data?.list) { + setKindData({...kindData, list:res.data.list, defaultId: res.data.list[0].id}) + setFiltrate({...filtrate, product_kind_id:res.data.list[0].id}) + } + + } + + //获取面料列表 + const [productData, setProductData] = useState({list:[], total:0}) + const [hasMore, setHasMore] = useState(true) + const [filtrate, setFiltrate] = useState({product_kind_id:0, size: 5,page: 1}) + const pageNum = useRef(1) + const {fetchData: productFetchData, state: productState} = GetProductListApi() + //获取数据方法 + const getProductList = async () => { + const {data,total} = await productFetchData(filtrate) + setProductData({...productData,list:data.list,total}) + setRefresherTriggeredStatus(() => false) + } + //监听查询条件 + useEffect(() => { + if(filtrate.product_kind_id) + getProductList() + }, [filtrate]) + + //点击面料类型 + const getProductKindId = async (e) => { + pageNum.current = 1 + setFiltrate({...filtrate, size:5, product_kind_id:e.id}) + setHasMore(true) + } + + //上拉加载数据 + const getScrolltolower = () => { + if(productData.list.length >= productData.total) { + setHasMore(false) + } else { + pageNum.current++ + const newSize = filtrate.size * pageNum.current + setFiltrate({...filtrate, size:newSize}) + } + } + const [showShopCart, setShowShopCart] = useState(false) + + //列表下拉刷新 + const [refresherTriggeredStatus, setRefresherTriggeredStatus] = useState(false) + const getRefresherRefresh = async () => { + pageNum.current = 1 + setFiltrate({...filtrate, size:5}) + setHasMore(true) + setRefresherTriggeredStatus(true) + } + + + + //页面下拉刷新 + // const res = useManualPullDownRefresh() + usePullDownRefresh(() => { + console.log('123') + }) + return ( setShowShopCart(!showShopCart)}> - + 我的收藏 - goLink('/pages/search/index')}/> + goLink('/pages/searchList/search')}/> - - + getScrolltolower()} sideBarOnClick={(e) => getProductKindId(e)} heightItem={150} refresherTriggered={refresherTriggeredStatus} selfOnRefresherRefresh={() => getRefresherRefresh()}> + diff --git a/src/pages/order/components/addressInfo/index.module.scss b/src/pages/order/components/addressInfo/index.module.scss new file mode 100644 index 0000000..8273d60 --- /dev/null +++ b/src/pages/order/components/addressInfo/index.module.scss @@ -0,0 +1,54 @@ +.order_address{ + height: 178px; + background: #ffffff; + border-radius: 20px; + display: flex; + align-items: center; + padding: 30px; + box-sizing: border-box; + margin-top: 20px; + .order_address_icon{ + font-size: 60px; + } + .order_address_text_con{ + flex:1; + padding: 0 30px; + box-sizing: border-box; + .order_address_text_title{ + font-size: $font_size; + font-weight: 700; + @include common_ellipsis; + } + .order_address_text_name{ + margin-top: 20px; + color: $color_font_three; + font-size: $font_size_medium; + text{ + &:nth-child(1) { + margin-right: 40px; + } + } + } + } + .order_address_text_no{ + flex: 1; + font-size: $font_size; + font-weight: 700; + margin-left: 30px; + } + .order_address_more_icon{ + color: $color_font_three; + font-size: $font_size; + } + +} +.order_address_list { + height: 900px; + .order_address_title{ + font-size: $font_size; + font-weight: 700; + width: 100%; + text-align: center; + padding: 20px 0 30px 0; + } +} \ No newline at end of file diff --git a/src/pages/order/components/addressInfo/index.tsx b/src/pages/order/components/addressInfo/index.tsx new file mode 100644 index 0000000..9bcd9e0 --- /dev/null +++ b/src/pages/order/components/addressInfo/index.tsx @@ -0,0 +1,32 @@ +import AddressList from "@/components/AddressList"; +import Popup from "@/components/popup"; +import { Text, View } from "@tarojs/components" +import classnames from "classnames"; +import { useState } from "react"; +import styles from './index.module.scss' + +export default () => { + const [showAddressList, setShowAddressList] = useState(false) + return ( + + setShowAddressList(true)}> + + {/* 请选择收货地址及信息 */} + + **省**市**区**街道****仓库**省**市**区**街道****仓库 + + 陈先生 + 1818877790 + + + + + setShowAddressList(false)}> + + 选择收货地址 + console.log(index, item)}/> + + + + ) +} \ No newline at end of file diff --git a/src/pages/order/components/estimatedAmount/index.module.scss b/src/pages/order/components/estimatedAmount/index.module.scss new file mode 100644 index 0000000..f12d646 --- /dev/null +++ b/src/pages/order/components/estimatedAmount/index.module.scss @@ -0,0 +1,23 @@ +.order_price{ + font-weight: 700; + display: flex; + align-items: center; + .order_price_text{ + font-size: $font_size_medium; + margin-right: 10px; + } + .order_price_num{ + text{ + &:nth-child(1) { + font-size: $font_size_min; + } + &:nth-child(2) { + font-size: $font_size_big; + } + &:nth-child(3) { + font-size: $font_size_medium; + } + } + } + +} \ No newline at end of file diff --git a/src/pages/order/components/estimatedAmount/index.tsx b/src/pages/order/components/estimatedAmount/index.tsx new file mode 100644 index 0000000..7e9ae1b --- /dev/null +++ b/src/pages/order/components/estimatedAmount/index.tsx @@ -0,0 +1,33 @@ +import { Text, View } from "@tarojs/components" +import { useCallback, useEffect, useMemo } from "react" +import {formatKbPrice} from '@/common/common' +import styles from './index.module.scss' +type Param = { + style?: Object, + number?: number +} +export default ({style, number = 0}:Param) => { + const priceDom = useCallback(() => { + let res = number.toFixed(2).split('.') + let int_num = parseInt(res[0]) + '' + let decimals_num = res[1] + return ( + <> + ¥ + {formatPrice(int_num)} + .{decimals_num} + + ) + }, [number]) + const formatPrice = useCallback((number: string) => { + return formatKbPrice(number) + }, []) + return ( + + 预估金额 + + {priceDom()} + + + ) +} \ No newline at end of file diff --git a/src/pages/order/components/kindList/index.module.scss b/src/pages/order/components/kindList/index.module.scss new file mode 100644 index 0000000..ad8a7b2 --- /dev/null +++ b/src/pages/order/components/kindList/index.module.scss @@ -0,0 +1,100 @@ +.orders_list_con{ + margin-top: 20px; + background-color: #fff; + border-radius: 20px; + padding: 20px; + .order_list{ + &:nth-child(n+2) { + margin-top: 30px; + } + .order_list_title{ + display: flex; + align-items: center; + .tag{ + font-size: $font_size_min; + background-color: #CDE5FF; + padding: 5px 10px; + border-radius: 6px; + color: $color_main; + } + .title{ + font-weight: 700; + font-size: $font_size; + margin-left: 20px; + flex:1; + } + .num{ + color: $color_font_two; + font-size: $font_size_min; + } + } + } + .order_list_scroll{ + margin-top: 30px; + + .order_list_item { + display: flex; + &:nth-child(2) { + margin-top: 30px; + } + .order_list_item_img{ + width: 126px; + height: 126px; + border-radius: 20px; + background-color: red; + } + .order_list_item_con{ + display: flex; + width: 100%; + flex:1; + border-bottom: 1px solid #f0f0f0; + height: 150px; + padding-top: 20px; + box-sizing: border-box; + } + .order_list_item_des{ + flex:1; + box-sizing: border-box; + padding-left: 30px; + .order_list_item_title{ + font-weight: 700; + font-size: $font_size; + margin-bottom: 15px; + } + .order_list_item_price{ + font-size: 26px; + color: $color_font_three; + } + } + .order_list_item_count{ + .count_num{ + color: $color_main; + font-size: $font_size; + margin-bottom: 15px; + font-weight: 400; + text{ + font-size: $font_size_min; + } + } + .count_price { + font-size: $font_size; + font-weight: 700; + text{ + font-size: $font_size_min; + } + } + } + } + } + + .order_estimated_amount{ + display: flex; + align-items: flex-end; + flex-direction: column; + padding: 30px 0; + .order_price_des{ + font-size: $font_size_medium; + color: $color_font_two; + } + } +} diff --git a/src/pages/order/components/kindList/index.tsx b/src/pages/order/components/kindList/index.tsx new file mode 100644 index 0000000..17d026a --- /dev/null +++ b/src/pages/order/components/kindList/index.tsx @@ -0,0 +1,88 @@ +import { View } from "@tarojs/components" +import { useState } from "react" +import EstimatedAmount from "../estimatedAmount" +import styles from './index.module.scss' + +export default () => { + const [price, setPrice] = useState(123000.33) + return ( + <> + + + + 大货 + 0770# 21S单面平纹(食毛) + 共3种 + + + + + + + 1# 薄荷绿 + ¥40/kg + + + ×1 + ¥1,000.5 + + + + + + + + 1# 薄荷绿 + ¥40/kg + + + ×1 + ¥1,000.5 + + + + + + + + 大货 + 0770# 21S单面平纹(食毛) + 共3种 + + + + + + + 1# 薄荷绿 + ¥40/kg + + + ×1 + ¥1,000.5 + + + + + + + + 1# 薄荷绿 + ¥40/kg + + + ×1 + ¥1,000.5 + + + + + + + + (按照25kg/条, 预估金额) + + + + ) +} \ No newline at end of file diff --git a/src/pages/order/components/orderState/index.module.scss b/src/pages/order/components/orderState/index.module.scss new file mode 100644 index 0000000..78bda44 --- /dev/null +++ b/src/pages/order/components/orderState/index.module.scss @@ -0,0 +1,18 @@ +.order_flow_state{ + display: flex; + align-items: center; + padding: 0 30px; + height: 116px; + background-color: #fff; + border-radius: 20px; + .order_flow_state_text{ + color: $color_main; + font-size:$font_size; + font-weight: 700; + } + .order_flow_state_desc{ + color: $color_font_three; + font-size: $font_size_medium; + margin-left: 50px; + } +} \ No newline at end of file diff --git a/src/pages/order/components/orderState/index.tsx b/src/pages/order/components/orderState/index.tsx new file mode 100644 index 0000000..58fec4d --- /dev/null +++ b/src/pages/order/components/orderState/index.tsx @@ -0,0 +1,14 @@ +import { View } from "@tarojs/components" +import styles from './index.module.scss' + +export default ({ + state = '', + desc = '' +}) => { + return ( + + {state} + {desc} + + ) +} \ No newline at end of file diff --git a/src/pages/order/components/remark/index.module.scss b/src/pages/order/components/remark/index.module.scss new file mode 100644 index 0000000..d624050 --- /dev/null +++ b/src/pages/order/components/remark/index.module.scss @@ -0,0 +1,48 @@ +.order_popup{ + display: flex; + flex-direction: column; + align-items: center; + padding: 20px 0; + .order_popup_title{ + color: $font_size_big; + font-weight: 700; + color: #000000; + padding-bottom: 20px; + } + .order_popup_input{ + width: 100%; + padding: 0 25px; + box-sizing: border-box; + margin-top: 43px; + position: relative; + .descDataNum{ + position: absolute; + right: 40px; + bottom: 10px; + height: 39px; + font-size: $font_size_medium; + color: $color_font_two; + } + textarea{ + background-color: #f3f3f3; + border-radius: 10px; + width: 100%; + height: 313px; + padding: 20px; + padding-bottom: 50px; + box-sizing: border-box; + font-size: $font_size; + border: 2px solid #e6e6e6; + } + } + .order_save_address{ + height: 82px; + background: #007aff; + border-radius: 40px; + width: 668px; + text-align: center; + line-height: 82px; + color: #fff; + margin-top: 60px; + } +} \ No newline at end of file diff --git a/src/pages/order/components/remark/index.tsx b/src/pages/order/components/remark/index.tsx new file mode 100644 index 0000000..67d6bb6 --- /dev/null +++ b/src/pages/order/components/remark/index.tsx @@ -0,0 +1,38 @@ +import Popup from "@/components/popup" +import { Textarea, View } from "@tarojs/components" +import { useCallback, useState } from "react" +import styles from './index.module.scss' + +type Param = { + onBlur?: (val:any) => void + onSave?: (val: string) => void +} +export default ({onBlur, onSave}:Param) => { + const [descData, setDescData] = useState({ + number: 0, + value: '', + count: 200 + }) + const getDesc = useCallback((e) => { + let value = e.detail.value + let res = value + if(value.length > descData.count) { + res = value.slice(0, descData.count) + } + setDescData({...descData, number:res.length, value: res}) + },[]) + + const setSave = () => { + onSave?.(descData.value) + } + return ( + + 添加备注 + + + {descData.number}/{descData.count} + + setSave()}>保存 + + ) +} \ No newline at end of file diff --git a/src/pages/order/index.config.ts b/src/pages/order/index.config.ts new file mode 100644 index 0000000..b0cb522 --- /dev/null +++ b/src/pages/order/index.config.ts @@ -0,0 +1,3 @@ +export default { + navigationBarTitleText: '确认订单' +} diff --git a/src/pages/order/index.module.scss b/src/pages/order/index.module.scss new file mode 100644 index 0000000..d6246e0 --- /dev/null +++ b/src/pages/order/index.module.scss @@ -0,0 +1,118 @@ +.order_main{ + min-height: 100%; + background-color:$color_bg_one; + padding: 20px; + padding-bottom: 190px; + box-sizing: border-box; + + .order_title{ + display: flex; + align-items: center; + padding: 20px 30px; + box-sizing: border-box; + background-color: #fff; + height: 116px; + border-radius: 20px; + margin-top: 20px; + text{ + flex:1; + font-size: $font_size; + font-weight: 700; + } + .order_status{ + background-color: #F0F0F0; + width: 148px; + height: 55px; + color: $color_font_three; + text-align: center; + line-height: 55px; + font-size: $font_size_medium; + border-radius: 30px; + &:nth-last-child(1) { + margin-left: 20px; + } + } + } + .order_desc{ + display: flex; + align-items: center; + background-color: #fff; + padding: 0 20px; + height: 116px; + border-radius: 20px; + margin-top: 20px; + .order_desc_con{ + flex:1; + font-size: $font_size; + font-weight: 700; + } + .order_desc_text{ + font-size: $font_size_medium; + color: $color_font_two; + margin-right: 10px; + } + .miconfont{ + font-size: 20px; + color: $color_font_two; + } + } + .submit_order{ + display: flex; + position: fixed; + bottom: 0; + left: 0; + justify-content: space-between; + width: 100%; + height: 175px; + align-items: center; + background-color: #fff; + box-shadow: 6px 0px 12px 0px rgba(0,0,0,0.16); + padding: 20px 50px; + box-sizing: border-box; + padding-bottom: constant(safe-area-inset-bottom); + padding-bottom: env(safe-area-inset-bottom); + .order_btn { + width: 250px; + height: 90px; + opacity: 0.6; + background: linear-gradient(38deg,#007aff, #4fa6ff 100%, #68b4ff 100%); + border-radius: 46px; + display: flex; + justify-content: center; + align-items: center; + color: #fff; + } + .order_number_desc{ + font-size: $font_size_medium; + color: $color_font_two; + } + } + .order_info{ + background-color: #fff; + margin-top: 20px; + border-radius: 20px; + padding: 20px; + .order_info_title{ + font-size: $font_size; + font-weight: 700; + margin-bottom: 20px; + + } + .order_num{ + display: flex; + justify-content: space-between; + align-items: center; + .order_num_btn{ + font-size: $font_size_medium; + padding: 5px 10px; + border: 2px solid #007cf7; + border-radius: 10px; + color: $color_main; + } + } + text{ + font-size: $font_size; + } + + } +} \ No newline at end of file diff --git a/src/pages/order/index.tsx b/src/pages/order/index.tsx new file mode 100644 index 0000000..bc303c0 --- /dev/null +++ b/src/pages/order/index.tsx @@ -0,0 +1,68 @@ +import Popup from "@/components/popup"; +import SearchInput from "@/components/searchInput"; +import { Text, Textarea, View } from "@tarojs/components" +import Taro from "@tarojs/taro"; +import classnames from "classnames"; +import { useCallback, useEffect, useState } from "react"; +import AddressInfo from "./components/addressInfo"; +import EstimatedAmount from "./components/estimatedAmount"; +import KindList from "./components/kindList"; +import OrderState from "./components/orderState"; +import Remark from "./components/remark"; +import styles from './index.module.scss' + + export default () => { + const [price, setPrice] = useState(123000.33) + const [showDesc, setShowDesc] = useState(false) + const clipboardData = () => { + Taro.setClipboardData({ + data: '123123121321', + success: function (res) { + Taro.showToast({ + icon: 'none', + title: '复制成功' + }) + } + }) + } + return ( + + + + 收货方式 + 物流 + 上门自提 + + + + setShowDesc(true)}> + 订单备注 + 点击填写 + + + + 订单备注 + + + 13535359535 + clipboardData()}>复制 + + + + 2022-4-5 10:11:55 + + + + + + 2种面料,6种颜色,共6条 + + 提交订单 + + setShowDesc(false)} > + console.log(e)}/> + + + + ) + } \ No newline at end of file diff --git a/src/pages/search/index.tsx b/src/pages/search/index.tsx index 2c19f4b..d342443 100644 --- a/src/pages/search/index.tsx +++ b/src/pages/search/index.tsx @@ -4,12 +4,13 @@ import Search from '@/components/search' import { goLink } from '@/common/common'; import classnames from "classnames"; import styles from './index.module.scss' +import { useEffect } from 'react'; export default () => { return ( - goLink('/pages/searchList/index')}/> + console.log(e)} placeholder="请输入面料关键词" placeIcon="out" showBtn={true} /> diff --git a/src/pages/searchList/components/selectData/index.module.scss b/src/pages/searchList/components/selectData/index.module.scss new file mode 100644 index 0000000..0d19650 --- /dev/null +++ b/src/pages/searchList/components/selectData/index.module.scss @@ -0,0 +1,51 @@ +.tabs_main{ + display: flex; + width: 100%; + .tabs_scroll{ + width: 100%; + display: flex; + white-space: nowrap; + ::-webkit-scrollbar { + display:none; + width:0; + height:0; + color:transparent; + } + .tabs_item{ + flex:1; + display: inline-block; + font-size: 24rpx; + background-color: #ecf5ff; + border-radius: 24rpx; + min-width: 126rpx; + height: 46.93rpx; + text-align: center; + line-height: 46.93rpx; + color: #707070; + margin-right: 20px; + border: 2px solid #cde5ff; + .tabs_item_con{ + height: 100%; + display: flex; + align-items: center; + justify-content: center; + font-size: $font_size_medium; + + } + .tabs_index{ + height: 5px; + width: 100%; + background-color:$color_main; + position:absolute; + bottom: 0; + left:0; + border-radius: 50px; + } + .tabs_item_select{ + color: $color_main; + } + } + + + } +} \ No newline at end of file diff --git a/src/pages/searchList/components/selectData/index.tsx b/src/pages/searchList/components/selectData/index.tsx new file mode 100644 index 0000000..60db6ee --- /dev/null +++ b/src/pages/searchList/components/selectData/index.tsx @@ -0,0 +1,57 @@ +import { ScrollView, View } from "@tarojs/components"; +import { memo, useState, ReactNode, useEffect } from "react"; +import classnames from "classnames"; +import styles from './index.module.scss' + + +type ListProps = { + title: string, + value: number +} + +type Params = { + list?: ListProps[], + defaultValue?: number|string, + children?: ReactNode, + tabsOnClick?: (ListProps) => void, + +} + +export default memo(({list = [], defaultValue = 0, tabsOnClick}: Params) => { + + const [tabId, setTabId] = useState('') + + useEffect(() => { + const index = list?.findIndex(item => { + return item.value == defaultValue + }) + if(index !== -1) { + const num = index > 0?( index - 1) : 0 + setTabId(list[num].value.toString()) + } + }, []) + + const clickEvent = ({item, index}: {item:ListProps, index:number}) => { + tabsOnClick?.(item) + setTabId(index.toString()) + } + return ( + <> + + + + { + list.map((item, index) => { + return ( + clickEvent({item,index})}> + {item.title} + + ) + }) + } + + + + + ) +}) \ No newline at end of file diff --git a/src/pages/searchList/hightSearchList.config.ts b/src/pages/searchList/hightSearchList.config.ts new file mode 100644 index 0000000..34c8c61 --- /dev/null +++ b/src/pages/searchList/hightSearchList.config.ts @@ -0,0 +1,5 @@ +export default { + navigationBarTitleText: '搜索', + enablePullDownRefresh: true, + backgroundTextStyle: 'dark' +} diff --git a/src/pages/searchList/hightSearchList.module.scss b/src/pages/searchList/hightSearchList.module.scss new file mode 100644 index 0000000..b40fa10 --- /dev/null +++ b/src/pages/searchList/hightSearchList.module.scss @@ -0,0 +1,216 @@ +.main{ + display: flex; + flex-direction: column; + height: 100vh; + background-color: $color_bg_one; + .search{ + padding: 20px; + .SearchInput{ + background-color: #fff; + padding: 10px 20px; + box-sizing: border-box; + border-radius: 10px; + } + + .bluetooth_color{ + .color_bock{ + width: 100px; + height: 46px; + } + .color_bock_no{ + font-size: $font_size_medium; + color: $color_font_three; + } + } + } + .filter{ + .filter_all { + display: flex; + justify-content: space-between; + align-items: center; + padding: 20px 130px; + font-size: $font_size_medium; + color: $color_font_three; + .text_zh, .text_sc{ + color: $color_main; + display: flex; + align-items: center; + .sortIcon{ + display: flex; + flex-direction: column; + position: relative; + .icon_one{ + font-size: $font_size_medium; + position: absolute; + margin:auto; + top:0; + } + } + } + .text_ss{ + position: relative; + .miconfont{ + font-size: 20px; + margin-left: 5px; + } + &::before{ + content: ''; + width: 2px; + height: 32px; + background-color: #C2C2C2; + position: absolute; + top: 0; + left: -30px; + } + } + } + .filter_btn_con{ + display: flex; + justify-content: space-between; + align-items: center; + height: 86px; + + } + .filter_scroll{ + flex:1; + width: 0; + ::-webkit-scrollbar { + display:none; + width:0; + height:0; + color:transparent; + } + } + .filter_btn{ + display: flex; + justify-content: space-between; + padding: 20px; + margin-right: 20px; + flex:1; + view{ + font-size: $font_size_medium; + background-color: #F0F0F0; + border-radius: 24px; + min-width: 126px; + height: 46.93px; + text-align: center; + line-height: 46.93px; + color: $color_font_three; + &:nth-last-child(n+2) { + margin-right: 10px; + } + &:nth-last-child(1) { + margin-right: 30px; + } + } + .selected{ + background-color: #ecf5ff; + border: 2px solid #cde5ff; + color: $color_main; + width: 122px; + height: 42.93px; + } + } + .filter_more{ + font-size: $font_size_medium; + color: $color_font_three; + padding: 0 30px 0 20px; + position: relative; + height: 100%; + line-height: 86px; + &::before{ + content: ''; + opacity: 1; + width: 30px; + height: 100%; + position: absolute; + left: -15px; + background-image: linear-gradient(to right, rgba(248, 248, 248, 0.3), rgba(248, 248, 248, 1) 60% ); + // z-index: 99; + } + .miconfont{ + font-size: 27px; + } + } + } + .list{ + flex:1; + display: flex; + flex-direction: column; + .list_num { + font-size: $font_size_min; + color:$color_font_two; + padding: 10px 38px; + + } + .list_num_shadow { + box-shadow: 0px 5px 5px #ccc; + } + .scroll{ + flex:1; + height:0; + padding-top: 3px; + } + .product_list{ + padding: 38px; + display: grid; + grid-template-columns: 321px 321px; + justify-content: space-between; + .product_item{ + width: 321px; + background-color: #fff; + border-radius: 20px; + margin-bottom: 20px; + .product_img{ + width: 100%; + height: 224px; + background: #e5ad3a; + border-radius: 20px 20px 0px 0px; + position: relative; + image{ + width: 100%; + height: 100%; + border-radius: 20px 20px 0px 0px; + } + .color_num { + background: rgba(0,0,0, 0.5); + border-radius: 0px 50px 0px 0px; + font-size: $font_size_min; + color: #fff; + position: absolute; + left:0; + bottom:0; + padding: 5px 20px; + box-sizing: border-box; + } + } + } + .product_info{ + padding: 20px; + .title{ + font-size: $font_size; + color: $color_font_three; + } + .tag_list{ + display: flex; + margin-top: 16px; + .tag{ + padding: 3px 10px; + background-color: #CDE5FF; + font-size: $font_size_min; + border-radius: 5px; + color: $color_main; + &:nth-child(2) { + margin-left: 10px; + } + } + } + .introduce{ + font-size: $font_size_medium; + color: $color_font_two; + margin-top: 16px; + } + } + } + } +} \ No newline at end of file diff --git a/src/pages/searchList/hightSearchList.tsx b/src/pages/searchList/hightSearchList.tsx new file mode 100644 index 0000000..34b8614 --- /dev/null +++ b/src/pages/searchList/hightSearchList.tsx @@ -0,0 +1,132 @@ +import { Image, ScrollView, Text, View } from "@tarojs/components" +import classnames from "classnames"; +import Search from '@/components/search' +import Filter from "@/components/filter"; +import InfiniteScroll from '@/components/infiniteScroll' +import SortBtn from "@/components/sortBtn"; +import SearchInput from "@/components/searchInput"; +import LinkBlueTooth from "@/components/bluetooth/LinkBlueTooth"; +import {useBluetooth} from "@/use/contextBlueTooth" +import {toRgb} from '@/common/bluetooth/color/colorSpace' +import Tabs from "@/components/tabs"; +import styles from './hightSearchList.module.scss' +import { useCallback, useEffect, useState } from "react"; +import Taro, { useReady } from "@tarojs/taro"; +import useManualPullDownRefresh from "@/use/useManualPullDownRefresh"; + +export default () => { + const [showFilter, setShowFilter] = useState(false) + const [selectList, setSelectList] = useState([ + {title: '系列', value:1}, + {title: '系列', value:2}, + {title: '系列', value:3}, + {title: '系列', value:4}, + {title: '系列', value:5}, + {title: '系列', value:5}, + {title: '系列', value:5}, + {title: '系列', value:5}, + {title: '系列', value:5}, + ]) + const [scrollStatus, setScrollStatus] = useState(false) + const onscroll = useCallback((e) => { + if(e.detail.scrollTop > 20) { + setScrollStatus(true) + } else { + setScrollStatus(false) + } + },[]) + + const {state, measureAndGetLab} = useBluetooth() + const getLab = () => { + if(state.connected) { + measureAndGetLab() + } else { + Taro.showToast({ + title: '请链接设备', + icon: 'none' + }) + } + } + + const [blueToothColor, setBlueToothColor] = useState('') + useEffect(() => { + if(state.deviceLab) { + console.log('颜色:',state.deviceLab) + const rgb = toRgb([state.deviceLab.L, state.deviceLab.a, state.deviceLab.b]) + setBlueToothColor(`rgb(${rgb[0]}, ${rgb[1]}, ${rgb[2]})`) + } + }, [state.deviceLab]) + + //页面下拉刷新 + const res = useManualPullDownRefresh() + return ( + + + + + + getLab()}> + {blueToothColor&&|| + 请取色 + } + + + + + + + + 综合 + + + + 收藏 + + + + + + + + 系列 + 幅宽 + 克重 + 克重 + 克重 + 成分 + + + setShowFilter(true)}> + 筛选 + + + + + + 搜索结果 (2条记录) + + console.log('123123')} + selfOnScroll={(e) => onscroll(e)} + > + + {new Array(9).fill(' ').map(item => { + return + + + 25色 + + + 0770#21S精棉平纹 + 平纹系列 + + + })} + + + + + setShowFilter(false)}/> + + ) +} \ No newline at end of file diff --git a/src/pages/searchList/index.config.ts b/src/pages/searchList/index.config.ts deleted file mode 100644 index 2a9c72b..0000000 --- a/src/pages/searchList/index.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - navigationBarTitleText: '搜索' -} diff --git a/src/pages/searchList/search.config.ts b/src/pages/searchList/search.config.ts new file mode 100644 index 0000000..6241274 --- /dev/null +++ b/src/pages/searchList/search.config.ts @@ -0,0 +1,3 @@ +export default { + navigationBarTitleText: '搜索', +} diff --git a/src/pages/searchList/search.module.scss b/src/pages/searchList/search.module.scss new file mode 100644 index 0000000..2e4ede6 --- /dev/null +++ b/src/pages/searchList/search.module.scss @@ -0,0 +1,72 @@ +.main{ + .search{ + display: flex; + justify-content: space-between; + padding: 20px; + padding-bottom: 50px; + } + + .hot { + padding: 0 20px; + .hot_header { + width:100%; + display: flex; + justify-content: space-between; + font-size: $font_size_medium; + .hot_header_title { + font-size: $font_size; + color: $color_font_one; + font-weight: 700; + } + .hot_header_up{ + color: $color_main; + } + } + .list{ + display: flex; + font-size: $font_size_medium; + flex-wrap: wrap; + padding: 20px 0; + .item{ + margin-right: 20px; + margin-bottom: 20px; + padding: 10px 20px; + background-color: #F0F0F0; + color: $color_font_three; + border-radius: 50px; + } + } + } + .history { + padding: 0 20px; + .history_header { + width:100%; + display: flex; + justify-content: space-between; + font-size: $font_size_medium; + .history_header_title { + font-size: $font_size; + color: $color_font_one; + font-weight: 700; + } + .miconfont{ + font-size: 30px; + color: $color_font_three; + } + } + .list{ + display: flex; + font-size: $font_size_medium; + flex-wrap: wrap; + padding: 20px 0; + .item{ + margin-right: 20px; + margin-bottom: 20px; + padding: 10px 20px; + background-color: #F0F0F0; + color: $color_font_three; + border-radius: 50px; + } + } + } +} \ No newline at end of file diff --git a/src/pages/searchList/search.tsx b/src/pages/searchList/search.tsx new file mode 100644 index 0000000..787d428 --- /dev/null +++ b/src/pages/searchList/search.tsx @@ -0,0 +1,44 @@ + +import { View } from '@tarojs/components' +import Search from '@/components/search' +import { goLink } from '@/common/common'; +import classnames from "classnames"; +import styles from './search.module.scss' + +export default () => { + return ( + + + {}}/> + + + + 热门面料 + goLink('/pages/searchList/searchList')}>高级搜索 + + + 9265 + 全棉双卫衣 + 全棉双卫衣 + 全棉双卫衣 + 全棉双卫衣 + 26s + + + + + 历史搜索 + + + + 9265 + 全棉双卫衣 + 全棉双卫衣 + 全棉双卫衣 + 全棉双卫衣 + 26s + + + + ) +} diff --git a/src/pages/searchList/searchList.config.ts b/src/pages/searchList/searchList.config.ts new file mode 100644 index 0000000..51b40a0 --- /dev/null +++ b/src/pages/searchList/searchList.config.ts @@ -0,0 +1,5 @@ +export default { + navigationBarTitleText: '高级搜索', + enablePullDownRefresh: true, + backgroundTextStyle: 'dark' +} diff --git a/src/pages/searchList/index.module.scss b/src/pages/searchList/searchList.module.scss similarity index 85% rename from src/pages/searchList/index.module.scss rename to src/pages/searchList/searchList.module.scss index fe0e4de..11f55be 100644 --- a/src/pages/searchList/index.module.scss +++ b/src/pages/searchList/searchList.module.scss @@ -57,6 +57,7 @@ .filter_scroll{ flex:1; width: 0; + padding-left: 20px; ::-webkit-scrollbar { display:none; width:0; @@ -149,6 +150,23 @@ height: 224px; background: #e5ad3a; border-radius: 20px 20px 0px 0px; + position: relative; + image{ + width: 100%; + height: 100%; + border-radius: 20px 20px 0px 0px; + } + .color_num { + background: rgba(0,0,0, 0.5); + border-radius: 50px 0px 0px 0px; + font-size: $font_size_min; + color: #fff; + position: absolute; + right:0; + bottom:0; + padding: 5px 20px; + box-sizing: border-box; + } } } .product_info{ diff --git a/src/pages/searchList/index.tsx b/src/pages/searchList/searchList.tsx similarity index 72% rename from src/pages/searchList/index.tsx rename to src/pages/searchList/searchList.tsx index 762ee3a..bfc274a 100644 --- a/src/pages/searchList/index.tsx +++ b/src/pages/searchList/searchList.tsx @@ -1,12 +1,14 @@ -import { ScrollView, Text, View } from "@tarojs/components" +import { Image, ScrollView, Text, View } from "@tarojs/components" import classnames from "classnames"; import Search from '@/components/search' import Filter from "@/components/filter"; import InfiniteScroll from '@/components/infiniteScroll' import SortBtn from "@/components/sortBtn"; -import Tabs from "@/components/tabs"; -import styles from './index.module.scss' +import SelectData from "./components/selectData"; +import { goLink } from "@/common/common"; +import styles from './searchList.module.scss' import { useCallback, useState } from "react"; +import useManualPullDownRefresh from "@/use/useManualPullDownRefresh"; export default () => { const [showFilter, setShowFilter] = useState(false) @@ -15,11 +17,11 @@ export default () => { {title: '系列', value:2}, {title: '系列', value:3}, {title: '系列', value:4}, - {title: '系列', value:5}, - {title: '系列', value:5}, - {title: '系列', value:5}, - {title: '系列', value:5}, - {title: '系列', value:5}, + {title: '系列', value:6}, + {title: '系列', value:7}, + {title: '系列', value:8}, + {title: '系列', value:9}, + {title: '系列', value:10}, ]) const [scrollStatus, setScrollStatus] = useState(false) const onscroll = useCallback((e) => { @@ -29,6 +31,9 @@ export default () => { setScrollStatus(false) } },[]) + + //页面下拉刷新 + const res = useManualPullDownRefresh() return ( @@ -44,28 +49,21 @@ export default () => { 收藏 - + goLink('/pages/searchList/hightSearchList')}> 高级搜索 + - - - 系列 - 幅宽 - 克重 - 克重 - 克重 - 成分 - - + + + setShowFilter(true)}> 筛选 - 搜索结果 (2条记录) @@ -77,7 +75,10 @@ export default () => { {new Array(9).fill(' ').map(item => { return - + + + 25色 + 0770#21S精棉平纹 diff --git a/src/reducers/index.ts b/src/reducers/index.ts new file mode 100644 index 0000000..8964c5d --- /dev/null +++ b/src/reducers/index.ts @@ -0,0 +1,6 @@ +import { combineReducers } from 'redux' +import userInfo from './userInfo' + +export default combineReducers({ + userInfo +}) \ No newline at end of file diff --git a/src/reducers/userInfo.ts b/src/reducers/userInfo.ts new file mode 100644 index 0000000..107eab3 --- /dev/null +++ b/src/reducers/userInfo.ts @@ -0,0 +1,67 @@ + +import Taro from '@tarojs/taro' +import { + SET_USERINFO, + SET_TOKEN, + SET_SESSIONKEY, + CLEAR_TOKEN, + CLEAR_USERINFO, + CLEAR_SESSIONKEY +} from '../constants/userInfo' + +export type UserParam = { + nickName?:string, + phone?:string, + avatarUrl?:string, + city?: string, + country?: string, + province?: string, + gender?: number, + language?: string, + timestamp?: number +} + +export type DataParam = { + token?: string + session_key?: string, + userInfo: UserParam + } + +type Action = { + type?: string, + data?: DataParam +} + + + +const INIT_USER = { + userInfo: Taro.getStorageSync('userInfo')?JSON.parse(Taro.getStorageSync('userInfo')):null, + token: Taro.getStorageSync('token')||'', + session_key: Taro.getStorageSync('session_key')||'', +} + +export default function counter (state = INIT_USER, action: Action) { + const {type, data} = action + switch (type) { + case SET_USERINFO: + Taro.setStorageSync('userInfo',JSON.stringify(data?.userInfo)) + return {...state,...data} + case SET_TOKEN: + Taro.setStorageSync('token',data?.token) + return {...state,...data} + case SET_SESSIONKEY: + Taro.setStorageSync('session_key',data?.session_key) + return {...state,...data} + case CLEAR_TOKEN: + Taro.removeStorageSync('token') + return {...state, token:''} + case CLEAR_SESSIONKEY: + Taro.removeStorageSync('session_key') + return {...state, session_key:''} + case CLEAR_USERINFO: + Taro.removeStorageSync('userInfo') + return {...state, userInfo: null} + default: + return state + } +} \ No newline at end of file diff --git a/src/store/index.ts b/src/store/index.ts new file mode 100644 index 0000000..63bf194 --- /dev/null +++ b/src/store/index.ts @@ -0,0 +1,27 @@ +import { createStore, applyMiddleware, compose } from 'redux' +import thunkMiddleware from 'redux-thunk' +import rootReducer from '@/reducers' + +const composeEnhancers = + typeof window === 'object' && + (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? + (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({ + // Specify extension’s options like name, actionsBlacklist, actionsCreators, serialize... + }) : compose + +const middlewares = [ + thunkMiddleware +] + +if (process.env.NODE_ENV === 'development' && process.env.TARO_ENV !== 'quickapp') { + middlewares.push(require('redux-logger').createLogger()) +} + +const enhancer = composeEnhancers( + applyMiddleware(...middlewares), +) + +export default function configStore () { + const store = createStore(rootReducer, enhancer) + return store +} \ No newline at end of file diff --git a/src/styles/common.scss b/src/styles/common.scss index 247c736..0000577 100644 --- a/src/styles/common.scss +++ b/src/styles/common.scss @@ -19,13 +19,15 @@ $font_size_min: 22px; //省略号 @mixin common_ellipsis($params:1) { + overflow: hidden; display: -webkit-box; white-space:normal; + text-overflow:ellipsis; word-break:break-all; -webkit-box-orient: vertical; -webkit-line-clamp: $params; - text-overflow:ellipsis; + } diff --git a/src/use/contextBlueTooth.tsx b/src/use/contextBlueTooth.tsx new file mode 100644 index 0000000..518c5cc --- /dev/null +++ b/src/use/contextBlueTooth.tsx @@ -0,0 +1,477 @@ +import React, {useRef, useState } from "react" +import Taro from "@tarojs/taro"; +import { Command } from "@/common/bluetooth/command"; +import { uint8ArrayToFloat32, uint8ArrayToHex, waitFor } from "@/common/bluetooth/utils"; + + +interface params { + init: () => void + state: Object, + startScan: () => void, + measureAndGetLab: () => any, + getAdapterState: () => void, + connect: (any) => void, + disconnect: () => void +} +const Context = React.createContext(null) + +interface stateStype { + listeners: any, + discovering: boolean, + available: boolean, + connected: any, + connecting: any, + serviceRule: any, + serviceId: any, + characteristicRule: any, + characteristicId: any, + + /** 正在执行的命令 */ + command: any, + responseResolve: any, + responseReject: any, + responseTimer: any, + + /** 是否显示蓝牙调试信息 */ + debug: any, + //搜索到的设备 + devices: any, + //取色仪主动返回的数据 + deviceLab: any +} + +let stateObj: stateStype = { + /** 事件监听器 */ + listeners: new Set(), + /** 正在扫描设备 */ + discovering: false, + /** 蓝牙是否可用 */ + available: true, + /** 当前连接的设备 */ + connected: null, + /** 正在连接的设备 */ + connecting: null, + + serviceRule: /^0000FFE0/, + serviceId: null, + characteristicRule: /^0000FFE1/, + characteristicId: null, + + /** 正在执行的命令 */ + command: null, + responseResolve: null, + responseReject: null, + responseTimer: null, + + /** 是否显示蓝牙调试信息 */ + debug: true, + //搜索到的设备 + devices: [], + //取色仪主动返回的数据 + deviceLab: null +} + +export default (props) => { + let refStatus = useRef(stateObj) + let [state, setState] = useState(refStatus.current) + + const changeStatus = (obj:Object): void => { + refStatus.current = {...refStatus.current, ...obj} + setState({...refStatus.current}) + } + + const init = async () => { + try{ + await openAdapter(); + }catch(e) { + changeStatus({available:false}) + } + + // 绑定事件通知 + Taro.onBluetoothAdapterStateChange(res => { + emit({ type: 'stateUpdate', detail: res }); + }); + Taro.onBLEConnectionStateChange(res => { + emit({ type: res.connected ? 'connected' : 'disconnect', detail: res }); + }); + Taro.onBLECharacteristicValueChange(({ value }) => notifySubscriber(value)); + subscribe(async ev => { + if (ev.type === 'stateUpdate') { + // 蓝牙状态发生的变化 + changeStatus({discovering:ev.detail.discovering, available:ev.detail.available}) + } else if (ev.type === 'disconnect' && refStatus.current.connected && refStatus.current.connected.deviceId === ev.detail.deviceId) { + // 断开连接 + changeStatus({ + connected:null, + serviceId:null, + characteristicId:null, + deviceLab:null, + devices:[] + }) + Taro.showToast({ icon: 'none', title: '蓝牙连接已断开' }); + } else if (ev.type === 'connected' && refStatus.current.connecting) { + // 连接成功 + changeStatus({connected: refStatus.current.connecting, connecting: null}) + Taro.showToast({ title: '蓝牙已连接' }); + } else if (ev.type === 'measure') { + //监听取色仪主动推送lab + await measureAndGetLab() + } + + }); + } + + /** 打开蓝牙适配器 */ + const openAdapter = () => { + return new Promise((resolve, reject) => { + Taro.openBluetoothAdapter({ + success: resolve, + fail: reject + }); + }); + } + + /** + * 推送事件 + * @param {{type: string; data: any}} event + */ + const emit = (event) => { + refStatus.current.listeners.forEach(cb => { + cb && cb(event); + }); + } + + const subscribe = (cb) => { + if (cb) { + changeStatus({ + listeners: refStatus.current.listeners.add(cb) + }) + } + } + + /** + * 获取蓝牙适配器状态 + * @returns {Promise<{discovering: boolean; available: boolean}>} + */ + const getAdapterState = () => { + return new Promise((resolve, reject) => { + Taro.getBluetoothAdapterState({ + success: resolve, + fail: reject + }) + }) + } + + /** + * 启动设备扫描 + * @param {(res: { devices: { name: string, deviceId: string, RSSI: number }[] }) => void} cb + * @param {number} duration + */ + const startScan = (duration = 30000) => { + console.log('开始寻找') + changeStatus({devices:[]}) + Taro.onBluetoothDeviceFound(getDevices); + return new Promise((resolve, reject) => { + Taro.startBluetoothDevicesDiscovery({ + allowDuplicatesKey: true, + success: resolve, + fail: reject + }); + + if (duration > 0) { + setTimeout(() => { + Taro.offBluetoothDeviceFound(getDevices); + Taro.stopBluetoothDevicesDiscovery(); + console.log("停止搜索") + }, duration); + } + }); + } + + //获取搜索到的设备 + const getDevices = (res) => { + res.devices.forEach(device => { + // 排除掉已搜索到的设备和名称不合法的设备, 将新发现的设备添加到列表中 + if (/^CM/.test(device.name) && !refStatus.current.devices.find(i => i.deviceId === device.deviceId)) { + changeStatus({devices: [ ...refStatus.current.devices, device ]}) + } + }); + } + + /** + * 连接设备 + * @param {{ name: string, deviceId: string, RSSI: number }} device + */ + const connect = async (device) => { + try { + changeStatus({connecting: device}) + console.log('connecting::', device) + await createConnection(device.deviceId); + await discoverService(device.deviceId); + await discoverCharacteristic(device.deviceId); + await notifyCharacteristicValueChange(device.deviceId); + } catch (e) { + changeStatus({connecting: null}) + Taro.showToast({ icon: 'none', title: '蓝牙连接失败' }); + throw e; + } + } + + /** 断开当前连接的设备 */ + const disconnect = async () => { + if (!refStatus.current.connected && !refStatus.current.connecting) return; + if (refStatus.current.connected) { + await closeConnection(refStatus.current.connected.deviceId); + resetCommand(); + changeStatus({ + connected: null, + serviceId: null, + characteristicId: null, + devices: [], + deviceLab: null + }) + } + + if (refStatus.current.connecting) { + await closeConnection(refStatus.current.connecting.deviceId); + changeStatus({connecting:null}) + } + } + + /** 创建 BLE 连接 */ + function createConnection(deviceId) { + return new Promise((resolve, reject) => { + Taro.createBLEConnection({ + deviceId, + timeout: 2000, + success: resolve, + fail: reject + }); + }); + } + + /** 关闭 BLE 连接 */ + function closeConnection(deviceId) { + return new Promise((resolve, reject) => { + Taro.closeBLEConnection({ + deviceId, + success: resolve, + fail: reject + }); + }); + } + + /** 搜索服务 */ + function discoverService(deviceId) { + return new Promise((resolve, reject) => { + Taro.getBLEDeviceServices({ + deviceId, + success: ({ services }) => { + const service = services.find(i => refStatus.current.serviceRule.test(i.uuid)); + if (!service) { + reject(new Error('服务不可用')); + } else { + changeStatus({serviceId: service.uuid}) + resolve(service); + } + }, + fail: reject + }); + }); + } + + /** 搜索特征 */ + function discoverCharacteristic(deviceId) { + return new Promise((resolve, reject) => { + Taro.getBLEDeviceCharacteristics({ + deviceId, + serviceId: refStatus.current.serviceId, + success: ({ characteristics }) => { + const characteristic = characteristics.find(i => refStatus.current.characteristicRule.test(i.uuid)); + if (!characteristic) { + reject(new Error('特征不可用')); + } else { + changeStatus({characteristicId: characteristic.uuid}) + resolve(characteristic); + } + }, + fail: reject + }) + }); + } + + /** 启动特征通知 */ + function notifyCharacteristicValueChange(deviceId, stateParm = true) { + return new Promise((resolve, reject) => { + Taro.notifyBLECharacteristicValueChange({ + deviceId, + serviceId: refStatus.current.serviceId, + characteristicId: refStatus.current.characteristicId, + state:stateParm, + success: resolve, + fail: reject + }); + }); + } + + /** + * 通知订阅器 + * @param {ArrayBuffer} buffer + */ + function notifySubscriber(buffer) { + if (refStatus.current.command) { + if (refStatus.current.debug) { + console.log(`[BLE RESP] ${uint8ArrayToHex(new Uint8Array(buffer))}`); + } + refStatus.current.command.fillResponse(buffer); + if (refStatus.current.command.isComplete) { + if (refStatus.current.command.isValid && refStatus.current.responseResolve) { + refStatus.current.responseResolve(refStatus.current.command.response); + } else if (!refStatus.current.command.isValid) { + refStatus.current.responseReject(new Error('无效数据')); + } + resetCommand(); + } + } else { + const uint8Array = new Uint8Array(buffer); + if (uint8Array[0] === 0xbb && uint8Array[1] === 1 && uint8Array[3] === 0) { + const ev = { type: 'measure', detail: { mode: uint8Array[2] } }; + emit(ev); + } + } + } + + /** + * 发送命令 + * @param {Command}} command + * @returns {Promise} + */ + function exec(command) { + return new Promise(async (resolve, reject) => { + if (refStatus.current.command) { + reject(new Error('正在执行其他命令')); + } else { + try { + refStatus.current.command = command; + const data = command.data; + for (let i = 0; i < data.length; i++) { + await sendData(data[i]); + } + + if (command.responseSize <= 0) { + resolve(true); + resetCommand(); + } else { + refStatus.current.responseReject = reject; + refStatus.current.responseResolve = resolve; + refStatus.current.responseTimer = setTimeout(() => { + reject(new Error('命令响应超时')); + resetCommand(); + }, command.timeout); + } + } catch (e) { + reject(e); + } + } + + }); + } + + /** + * 发送命令 + * @param {ArrayBuffer} buffer + */ + function sendData(buffer) { + if (refStatus.current.debug) { + console.log(`[BLE SEND] ${uint8ArrayToHex(new Uint8Array(buffer))}`); + } + return new Promise((resolve, reject) => { + console.log('current:::',refStatus.current) + Taro.writeBLECharacteristicValue({ + deviceId: refStatus.current.connected.deviceId, + serviceId: refStatus.current.serviceId, + characteristicId: refStatus.current.characteristicId, + value: buffer, + success: resolve, + fail: reject + }) + }); + } + + function resetCommand() { + if (refStatus.current.responseTimer) { + clearTimeout(refStatus.current.responseTimer); + } + changeStatus({ + command: null, + responseResolve: null, + responseReject: null, + responseTimer: null + }) + } + + /** + * 测量 + * @param {number} mode + * @returns {Promise} + */ + async function measure (mode = 0) { + console.log('current1:::',Command.WakeUp) + await exec(Command.WakeUp); + console.log('current2:::',Command.WakeUp) + await waitFor(50); + console.log('current3:::',Command.WakeUp) + return await exec(Command.measure(mode)); + } + + /** + * 获取测量的 lab 值 + * @param {number} mode + * @returns {Promise<{ L: number, a: number, b: number }>} + */ + async function getLab(mode = 0) { + await exec(Command.WakeUp); + await waitFor(50); + const data: any = await exec(Command.getLab(mode)); + return { + L: uint8ArrayToFloat32(data.slice(5, 9)), + a: uint8ArrayToFloat32(data.slice(9, 13)), + b: uint8ArrayToFloat32(data.slice(13, 17)), + }; + } + + /** + * 测量并获取 lab 值 + * @param {number} mode + * @returns {Promise<{L: number, a: number, b: number}>} + */ + async function measureAndGetLab(mode = 0) { + await measure(mode); + await waitFor(50); + const lab = await getLab(mode); + console.log('lab2::',lab) + changeStatus({deviceLab:lab}) + return lab + } + + return +} + + +export const useBluetooth = () => { + const res = React.useContext(Context) + if(res) { + return {...res} + } else { + return {} + } + +} \ No newline at end of file diff --git a/src/use/useHttp.ts b/src/use/useHttp.ts new file mode 100644 index 0000000..feea9e9 --- /dev/null +++ b/src/use/useHttp.ts @@ -0,0 +1,202 @@ + + +import Taro, { useRouter } from '@tarojs/taro' +import { useRef, useState } from 'react' +import {BASE_URL, WX_APPID} from '@/common/constant' +import useUserInfo from "./useUserInfo" +import qs from 'qs'; + + +type Params = { + code: string|null + success: true|false + data: any, + msg: string, + loading: true|false, + error: any, + query: any, + filter: any, + sort: any, + total: number, + multiple: true|false, // 请求多次 + count: number, // 第几次请求 + token: string, // token + page?: number, + pageSize?: number +} + +type option = { + url?: string, + method?: 'get'|'post'|'put'|'delete', + type?: string, + data?: any, + page?: number, + pageSize?: number, + pagination?: true|false +} + +/** + * 返回状态信息,根据 http 状态错 + * @param {Number} status + * @returns + */ +const showStatus = (status) => { + let message = '' + switch (status) { + case 400: + message = '请求错误(400)' + break + case 401: + message = '未授权,请重新登录(401)' + break + case 403: + message = '拒绝访问(403)' + break + case 404: + message = '请求出错(404)' + break + case 408: + message = '请求超时(408)' + break + case 500: + message = '服务器错误(500)' + break + case 501: + message = '服务未实现(501)' + break + case 502: + message = '网络错误(502)' + break + case 503: + message = '服务不可用(503)' + break + case 504: + message = '网络超时(504)' + break + case 505: + message = 'HTTP版本不受支持(505)' + break + default: + message = `连接出错(${status})!` + } + return `${message},请检查网络或联系管理员!` +} + + +/** + * axios 请求状态封装,返回响应式数据 fetch(), loading, error, code, msg 等常用方法/状态 + * @param {Object} options 对象 + * @param {String} options.url 请求的URL + * @param {String} options.method 请求的方法 + * @param {Object} options.data 请求的参数 + * @returns {Object} 返回fetch(), loading, error, code, msg + */ +export const useRequest = (options:option = { + url: '/', + method: 'get', + type: 'json', + data: {}, + page: 1, + pageSize: 24, + pagination: false, // 是否分页 +}) => { + + options.url = `${BASE_URL}${options.url}` + let params:Params = { + code: null, // 业务码 + success: false, // 请求是否成功 + data: {}, + msg: '', + loading: false, + error: null, + query: {}, + filter: null, + sort: '', + total: 0, + multiple: true, // 请求多次 + count: 0, // 第几次请求 + token: '', // token + } + + const stateRef = useRef({...params}) + const [state, setState] = useState({...stateRef.current}) + const {removeToken, removeSessionKey} = useUserInfo() + const router = useRouter() + // 请求函数 + const fetchData = async (sub_options?:any) => { + stateRef.current.loading = true + setState((e) => ({...e, loading:true})) + stateRef.current.query = { + ...sub_options, + ...options.pagination && { + page: stateRef.current.page, + size: stateRef.current.pageSize, + }, + ...stateRef.current.filter, + ...stateRef.current.sort + } + try { + let token = Taro.getStorageSync('token') + const q = { + ...options, + ...{ + header: { + "Platform": 6, + "Appid": WX_APPID, + "Authorization": token || stateRef.current.token, + } + }, + ...options.method?.toUpperCase() == 'GET' ? { + data: stateRef.current.query + } : { + data: options.type?.toUpperCase() == 'FORMDATA' ? qs.stringify(stateRef.current.query) : stateRef.current.query + } + } + const result = await Taro.request(q as any) + const { statusCode } = result + const { + code, + msg, + data + } = result.data + console.log(code, msg, data, statusCode); + if (statusCode === 200) { + stateRef.current.success = (code === 0 ? true : false) + stateRef.current.code = code + stateRef.current.msg = msg + stateRef.current.data = data + stateRef.current.total = data?.list ? data?.total : 0 + }else{ + if (statusCode === 401) { + removeToken() + removeSessionKey() + // remove + // Taro.reLaunch({ + // url: router.path +'?' + qs.stringify(router.params) + // }) + } else { + Taro.showToast({ + title: `错误:${showStatus(statusCode)}`, + icon: 'none' + }) + } + } + + } catch (e) { + stateRef.current.success = false + stateRef.current.error = true + stateRef.current.msg = e.errMsg + + } + stateRef.current.error = false + stateRef.current.loading = false + setState(() => stateRef.current) + return stateRef.current + } + + return { + fetchData, + state, + } + +} \ No newline at end of file diff --git a/src/use/useLogin.ts b/src/use/useLogin.ts new file mode 100644 index 0000000..386657d --- /dev/null +++ b/src/use/useLogin.ts @@ -0,0 +1,126 @@ +import { useEffect, useState } from "react" +import { WX_APPID } from "@/common/constant" +import useUserInfo from "./useUserInfo" +import Taro, { useRouter } from "@tarojs/taro" +import { LoginApi } from "@/api/login" +import { GetWxUserInfoApi } from "@/api/user" +import qs from 'qs'; + +export default () => { + const {setToken, setSessionKey, setUserInfo, userInfo} = useUserInfo() + + useEffect(() => { + console.log('userInfo::',userInfo.token) + }, [userInfo]) + + const router = useRouter() + //登录请求 + const {fetchData} = LoginApi() + //微信登录 + const wxLogin = () => { + return new Promise((reslove, reject) => { + Taro.login({ + success: async (res) => { + if (res.code) { + const {data, success, msg} = await fetchData({js_code: res.code}) + if(success) { + console.log('token::',data.token) + setToken(data.token) + setSessionKey(data.session_key) + reslove(data) + let params = router.params + delete params.$taroTimestamp + console.log('params::',params) + if(router.path === '/pages/index/index' || router.path === '/pages/user/index') { + Taro.reLaunch({ + url: router.path +'?' + qs.stringify(params) + }) + } else { + Taro.redirectTo({ + url: router.path +'?' + qs.stringify(params) + }) + } + + } else { + Taro.showToast({ + title:'登录失败', + icon:"none" + }) + reject(msg) + } + } else { + console.log('登录失败!' + res.errMsg) + reject(res.errMsg) + } + }, + fail: function(e) { + console.log('登录失败!::',e) + reject(e) + } + }) + }) + + } + + + //登录加checkLogin检查 + const checkLogin = () => { + return new Promise( async (reslove) => { + if(!userInfo.token) { + await wxLogin() + reslove(true) + } else { + Taro.checkSession({ + success: async () => { + reslove(true) + }, + fail: async () => { + await wxLogin() + reslove(true) + } + }) + } + }) + + + } + + //获取用户头像等信息数据 + const {fetchData: fetchDataUserInfo} = GetWxUserInfoApi() + const getSelfUserInfo = async () => { + return new Promise((reslove, reject) => { + if(!userInfo.userInfo) { + Taro.getUserProfile({ + desc: '用于完善会员资料', + success: async (res) => { + if(!userInfo.session_key) { + await wxLogin() + } + const {data} = await fetchDataUserInfo({ + session_key: userInfo.session_key, + raw_data: res.rawData, + signature: res.signature, + encrypted_data: res.encryptedData, + iv: res.iv + }) + setUserInfo({...data}) + reslove(data) + }, + fail:(e) => { + reject(e) + } + }) + } else { + reslove(true) + } + }) + + + } + + return { + checkLogin, + wxLogin, + getSelfUserInfo + } +} diff --git a/src/use/useManualPullDownRefresh.ts b/src/use/useManualPullDownRefresh.ts new file mode 100644 index 0000000..4ff1ff3 --- /dev/null +++ b/src/use/useManualPullDownRefresh.ts @@ -0,0 +1,24 @@ +import Taro, { usePullDownRefresh } from "@tarojs/taro" +import { useCallback, useState } from "react" + +type Arg = {[index:string]:any} +export default (fn?:(val:Arg) => any, arg?:Arg) => { + const [data, setData] = useState({}) + + usePullDownRefresh(() => { + getData() + }) + + const getData = useCallback(() => { + setTimeout(() => { + const res = fn?.({...arg}) + setData((e) => ({...e, res})) + Taro.stopPullDownRefresh() + }, 1000) + }, []) + + return { + getData, + data + } +} \ No newline at end of file diff --git a/src/use/useUserInfo.ts b/src/use/useUserInfo.ts new file mode 100644 index 0000000..690a8ce --- /dev/null +++ b/src/use/useUserInfo.ts @@ -0,0 +1,41 @@ +import { useDispatch, useSelector } from 'react-redux' +import { CLEAR_SESSIONKEY, SET_USERINFO, SET_TOKEN, SET_SESSIONKEY, CLEAR_USERINFO, CLEAR_TOKEN} from '@/constants/userInfo' +import {DataParam, UserParam} from '@/reducers/userInfo' +export default () => { + const userInfo = useSelector((state:DataParam) => state.userInfo) as DataParam + const dispatch = useDispatch() + + const setToken = (token: string) => { + dispatch({type:SET_TOKEN, data:{token}}) + } + + const setSessionKey = (sessionkey: string) => { + dispatch({type:SET_SESSIONKEY, data:{session_key: sessionkey}}) + } + + const setUserInfo = (userInfo: UserParam) => { + dispatch({type:SET_USERINFO, data:{userInfo}}) + } + + const removeUserInfo = () => { + dispatch({type:CLEAR_USERINFO}) + } + + const removeToken = () => { + dispatch({type:CLEAR_TOKEN}) + } + + const removeSessionKey = () => { + dispatch({type:CLEAR_SESSIONKEY}) + } + + return { + setToken, + setUserInfo, + setSessionKey, + removeUserInfo, + removeToken, + removeSessionKey, + userInfo, //响应式数据返回 + } +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 1759e5f..0ccd5f2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1058,10 +1058,17 @@ core-js-pure "^3.20.2" regenerator-runtime "^0.13.4" +<<<<<<< HEAD "@babel/runtime@^7.11.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.7.7", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": version "7.17.8" resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.8.tgz" integrity sha512-dQpEpK0O9o6lj6oPu0gRDbbnk+4LeHlNcBpspf6Olzt3GIX4P1lWF1gS+pHLDFlaJvbR6q7jCfQ08zA4QJBnmA== +======= +"@babel/runtime@^7.11.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.7.6", "@babel/runtime@^7.7.7", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": + "integrity" "sha512-dQpEpK0O9o6lj6oPu0gRDbbnk+4LeHlNcBpspf6Olzt3GIX4P1lWF1gS+pHLDFlaJvbR6q7jCfQ08zA4QJBnmA==" + "resolved" "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.8.tgz" + "version" "7.17.8" +>>>>>>> d7b4e57 (登录封装) dependencies: regenerator-runtime "^0.13.4" @@ -1554,6 +1561,14 @@ "@types/minimatch" "*" "@types/node" "*" +"@types/hoist-non-react-statics@^3.3.1": + "integrity" "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==" + "resolved" "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz" + "version" "3.3.1" + dependencies: + "@types/react" "*" + "hoist-non-react-statics" "^3.3.0" + "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.7", "@types/json-schema@^7.0.8": version "7.0.11" resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz" @@ -1601,10 +1616,22 @@ resolved "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.4.tgz" integrity sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ== +"@types/qs@^6.9.7": + "integrity" "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==" + "resolved" "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz" + "version" "6.9.7" + +<<<<<<< HEAD "@types/react@^17.0.2": version "17.0.43" resolved "https://registry.npmjs.org/@types/react/-/react-17.0.43.tgz" integrity sha512-8Q+LNpdxf057brvPu1lMtC5Vn7J119xrP1aq4qiaefNioQUYANF/CYeK4NsKorSZyUGJ66g0IM+4bbjwx45o2A== +======= +"@types/react@*", "@types/react@^16.8 || ^17.0 || ^18.0", "@types/react@^17.0.2": + "integrity" "sha512-8Q+LNpdxf057brvPu1lMtC5Vn7J119xrP1aq4qiaefNioQUYANF/CYeK4NsKorSZyUGJ66g0IM+4bbjwx45o2A==" + "resolved" "https://registry.npmjs.org/@types/react/-/react-17.0.43.tgz" + "version" "17.0.43" +>>>>>>> d7b4e57 (登录封装) dependencies: "@types/prop-types" "*" "@types/scheduler" "*" @@ -1622,6 +1649,11 @@ resolved "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz" integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew== +"@types/use-sync-external-store@^0.0.3": + "integrity" "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==" + "resolved" "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz" + "version" "0.0.3" + "@types/webpack-env@^1.13.6": version "1.16.3" resolved "https://registry.npmjs.org/@types/webpack-env/-/webpack-env-1.16.3.tgz" @@ -3816,10 +3848,106 @@ define-property@^2.0.2: is-descriptor "^1.0.2" isobject "^3.0.1" +<<<<<<< HEAD del@^4.1.1: version "4.1.1" resolved "https://registry.npmjs.org/del/-/del-4.1.1.tgz" integrity sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ== +======= +"decamelize-keys@^1.0.0": + "integrity" "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=" + "resolved" "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz" + "version" "1.1.0" + dependencies: + "decamelize" "^1.1.0" + "map-obj" "^1.0.0" + +"decamelize@^1.1.0", "decamelize@^1.2.0": + "integrity" "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + "resolved" "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" + "version" "1.2.0" + +"decode-uri-component@^0.2.0": + "integrity" "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + "resolved" "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz" + "version" "0.2.0" + +"deep-diff@^0.3.5": + "integrity" "sha1-wB3mPvsO7JeYgB1Ax+Da4ltYLIQ=" + "resolved" "https://registry.npmjs.org/deep-diff/-/deep-diff-0.3.8.tgz" + "version" "0.3.8" + +"deep-equal@^1.0.1": + "integrity" "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==" + "resolved" "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz" + "version" "1.1.1" + dependencies: + "is-arguments" "^1.0.4" + "is-date-object" "^1.0.1" + "is-regex" "^1.0.4" + "object-is" "^1.0.1" + "object-keys" "^1.1.1" + "regexp.prototype.flags" "^1.2.0" + +"deep-is@~0.1.3": + "integrity" "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" + "resolved" "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" + "version" "0.1.4" + +"deepmerge@^1.5.2": + "integrity" "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==" + "resolved" "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz" + "version" "1.5.2" + +"default-gateway@^4.2.0": + "integrity" "sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA==" + "resolved" "https://registry.npmjs.org/default-gateway/-/default-gateway-4.2.0.tgz" + "version" "4.2.0" + dependencies: + "execa" "^1.0.0" + "ip-regex" "^2.1.0" + +"defaults@^1.0.3": + "integrity" "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=" + "resolved" "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz" + "version" "1.0.3" + dependencies: + "clone" "^1.0.2" + +"define-properties@^1.1.2", "define-properties@^1.1.3": + "integrity" "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==" + "resolved" "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz" + "version" "1.1.3" + dependencies: + "object-keys" "^1.0.12" + +"define-property@^0.2.5": + "integrity" "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=" + "resolved" "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz" + "version" "0.2.5" + dependencies: + "is-descriptor" "^0.1.0" + +"define-property@^1.0.0": + "integrity" "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=" + "resolved" "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz" + "version" "1.0.0" + dependencies: + "is-descriptor" "^1.0.0" + +"define-property@^2.0.2": + "integrity" "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==" + "resolved" "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz" + "version" "2.0.2" + dependencies: + "is-descriptor" "^1.0.2" + "isobject" "^3.0.1" + +"del@^4.1.1": + "integrity" "sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==" + "resolved" "https://registry.npmjs.org/del/-/del-4.1.1.tgz" + "version" "4.1.1" +>>>>>>> d7b4e57 (登录封装) dependencies: "@types/glob" "^7.1.1" globby "^6.1.0" @@ -5267,6 +5395,7 @@ history@^5.0.0: dependencies: "@babel/runtime" "^7.7.6" +<<<<<<< HEAD hmac-drbg@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz" @@ -5741,6 +5870,513 @@ is-data-descriptor@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz" integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== +======= +"hmac-drbg@^1.0.1": + "integrity" "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=" + "resolved" "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz" + "version" "1.0.1" + dependencies: + "hash.js" "^1.0.3" + "minimalistic-assert" "^1.0.0" + "minimalistic-crypto-utils" "^1.0.1" + +"hoist-non-react-statics@^3.3.0", "hoist-non-react-statics@^3.3.2": + "integrity" "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==" + "resolved" "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz" + "version" "3.3.2" + dependencies: + "react-is" "^16.7.0" + +"hosted-git-info@^2.1.4": + "integrity" "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" + "resolved" "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz" + "version" "2.8.9" + +"hpack.js@^2.1.6": + "integrity" "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=" + "resolved" "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz" + "version" "2.1.6" + dependencies: + "inherits" "^2.0.1" + "obuf" "^1.0.0" + "readable-stream" "^2.0.1" + "wbuf" "^1.1.0" + +"html-encoding-sniffer@^1.0.2": + "integrity" "sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw==" + "resolved" "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz" + "version" "1.0.2" + dependencies: + "whatwg-encoding" "^1.0.1" + +"html-entities@^1.2.1", "html-entities@^1.3.1": + "integrity" "sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA==" + "resolved" "https://registry.npmjs.org/html-entities/-/html-entities-1.4.0.tgz" + "version" "1.4.0" + +"html-minifier@^3.2.3": + "integrity" "sha512-LKUKwuJDhxNa3uf/LPR/KVjm/l3rBqtYeCOAekvG8F1vItxMUpueGd94i/asDDr8/1u7InxzFA5EeGjhhG5mMA==" + "resolved" "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.21.tgz" + "version" "3.5.21" + dependencies: + "camel-case" "3.0.x" + "clean-css" "4.2.x" + "commander" "2.17.x" + "he" "1.2.x" + "param-case" "2.1.x" + "relateurl" "0.2.x" + "uglify-js" "3.4.x" + +"html-minifier@^4.0.0": + "integrity" "sha512-aoGxanpFPLg7MkIl/DDFYtb0iWz7jMFGqFhvEDZga6/4QTjneiD8I/NXL1x5aaoCp7FSIT6h/OhykDdPsbtMig==" + "resolved" "https://registry.npmjs.org/html-minifier/-/html-minifier-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "camel-case" "^3.0.0" + "clean-css" "^4.2.1" + "commander" "^2.19.0" + "he" "^1.2.0" + "param-case" "^2.1.1" + "relateurl" "^0.2.7" + "uglify-js" "^3.5.1" + +"html-tags@^2.0.0": + "integrity" "sha1-ELMKOGCF9Dzt41PMj6fLDe7qZos=" + "resolved" "https://registry.npmjs.org/html-tags/-/html-tags-2.0.0.tgz" + "version" "2.0.0" + +"html-tags@^3.1.0": + "integrity" "sha512-1qYz89hW3lFDEazhjW0yVAV87lw8lVkrJocr72XmBkMKsoSVJCQx3W8BXsC7hO2qAt8BoVjYjtAcZ9perqGnNg==" + "resolved" "https://registry.npmjs.org/html-tags/-/html-tags-3.1.0.tgz" + "version" "3.1.0" + +"html-webpack-include-assets-plugin@1.0.5": + "integrity" "sha512-YkkzE+QfYAuEq8/yEnfTcpCeSLyJ8XmB2LlQzY1GV7/ovDxavcCIKSMF4kIMRrWmFMPU8qog/zvBaQ1RJFFw/g==" + "resolved" "https://registry.npmjs.org/html-webpack-include-assets-plugin/-/html-webpack-include-assets-plugin-1.0.5.tgz" + "version" "1.0.5" + dependencies: + "glob" "^7.1.3" + "minimatch" "^3.0.4" + "slash" "^2.0.0" + +"html-webpack-plugin@3.2.0": + "integrity" "sha1-sBq71yOsqqeze2r0SS69oD2d03s=" + "resolved" "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz" + "version" "3.2.0" + dependencies: + "html-minifier" "^3.2.3" + "loader-utils" "^0.2.16" + "lodash" "^4.17.3" + "pretty-error" "^2.0.2" + "tapable" "^1.0.0" + "toposort" "^1.0.0" + "util.promisify" "1.0.0" + +"htmlparser2@^3.9.2": + "integrity" "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==" + "resolved" "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz" + "version" "3.10.1" + dependencies: + "domelementtype" "^1.3.1" + "domhandler" "^2.3.0" + "domutils" "^1.5.1" + "entities" "^1.1.1" + "inherits" "^2.0.1" + "readable-stream" "^3.1.1" + +"htmlparser2@^6.1.0": + "integrity" "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==" + "resolved" "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz" + "version" "6.1.0" + dependencies: + "domelementtype" "^2.0.1" + "domhandler" "^4.0.0" + "domutils" "^2.5.2" + "entities" "^2.0.0" + +"http-deceiver@^1.2.7": + "integrity" "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=" + "resolved" "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz" + "version" "1.2.7" + +"http-errors@~1.6.2": + "integrity" "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=" + "resolved" "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz" + "version" "1.6.3" + dependencies: + "depd" "~1.1.2" + "inherits" "2.0.3" + "setprototypeof" "1.1.0" + "statuses" ">= 1.4.0 < 2" + +"http-errors@1.8.1": + "integrity" "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==" + "resolved" "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz" + "version" "1.8.1" + dependencies: + "depd" "~1.1.2" + "inherits" "2.0.4" + "setprototypeof" "1.2.0" + "statuses" ">= 1.5.0 < 2" + "toidentifier" "1.0.1" + +"http-parser-js@>=0.5.1": + "integrity" "sha512-vDlkRPDJn93swjcjqMSaGSPABbIarsr1TLAui/gLDXzV5VsJNdXNzMYDyNBLQkjWQCJ1uizu8T2oDMhmGt0PRA==" + "resolved" "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.6.tgz" + "version" "0.5.6" + +"http-proxy-middleware@0.19.1": + "integrity" "sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==" + "resolved" "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz" + "version" "0.19.1" + dependencies: + "http-proxy" "^1.17.0" + "is-glob" "^4.0.0" + "lodash" "^4.17.11" + "micromatch" "^3.1.10" + +"http-proxy@^1.17.0": + "integrity" "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==" + "resolved" "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz" + "version" "1.18.1" + dependencies: + "eventemitter3" "^4.0.0" + "follow-redirects" "^1.0.0" + "requires-port" "^1.0.0" + +"http-signature@~1.2.0": + "integrity" "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=" + "resolved" "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz" + "version" "1.2.0" + dependencies: + "assert-plus" "^1.0.0" + "jsprim" "^1.2.2" + "sshpk" "^1.7.0" + +"https-browserify@^1.0.0": + "integrity" "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" + "resolved" "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz" + "version" "1.0.0" + +"iconv-lite@^0.4.24", "iconv-lite@^0.4.4", "iconv-lite@0.4.24": + "integrity" "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==" + "resolved" "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz" + "version" "0.4.24" + dependencies: + "safer-buffer" ">= 2.1.2 < 3" + +"icss-utils@^4.0.0", "icss-utils@^4.1.1": + "integrity" "sha512-4aFq7wvWyMHKgxsH8QQtGpvbASCf+eM3wPRLI6R+MgAnTCZ6STYsRvttLvRWK0Nfif5piF394St3HeJDaljGPA==" + "resolved" "https://registry.npmjs.org/icss-utils/-/icss-utils-4.1.1.tgz" + "version" "4.1.1" + dependencies: + "postcss" "^7.0.14" + +"ieee754@^1.1.4": + "integrity" "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + "resolved" "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz" + "version" "1.2.1" + +"iferr@^0.1.5": + "integrity" "sha1-xg7taebY/bazEEofy8ocGS3FtQE=" + "resolved" "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz" + "version" "0.1.5" + +"ignore@^3.3.3", "ignore@^3.3.5": + "integrity" "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==" + "resolved" "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz" + "version" "3.3.10" + +"ignore@^4.0.6": + "integrity" "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" + "resolved" "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz" + "version" "4.0.6" + +"ignore@^5.1.8": + "integrity" "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==" + "resolved" "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz" + "version" "5.2.0" + +"ignore@^5.2.0": + "integrity" "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==" + "resolved" "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz" + "version" "5.2.0" + +"image-size@~0.5.0": + "integrity" "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=" + "resolved" "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz" + "version" "0.5.5" + +"immutable@^4.0.0": + "integrity" "sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==" + "resolved" "https://registry.npmjs.org/immutable/-/immutable-4.0.0.tgz" + "version" "4.0.0" + +"import-fresh@^2.0.0": + "integrity" "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=" + "resolved" "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz" + "version" "2.0.0" + dependencies: + "caller-path" "^2.0.0" + "resolve-from" "^3.0.0" + +"import-fresh@^3.0.0", "import-fresh@^3.2.1": + "integrity" "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==" + "resolved" "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" + "version" "3.3.0" + dependencies: + "parent-module" "^1.0.0" + "resolve-from" "^4.0.0" + +"import-lazy@^3.1.0": + "integrity" "sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ==" + "resolved" "https://registry.npmjs.org/import-lazy/-/import-lazy-3.1.0.tgz" + "version" "3.1.0" + +"import-local@^2.0.0": + "integrity" "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==" + "resolved" "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz" + "version" "2.0.0" + dependencies: + "pkg-dir" "^3.0.0" + "resolve-cwd" "^2.0.0" + +"imurmurhash@^0.1.4": + "integrity" "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + "resolved" "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" + "version" "0.1.4" + +"indent-string@^3.0.0": + "integrity" "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=" + "resolved" "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz" + "version" "3.2.0" + +"indent-string@^4.0.0": + "integrity" "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==" + "resolved" "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz" + "version" "4.0.0" + +"indexes-of@^1.0.1": + "integrity" "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=" + "resolved" "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz" + "version" "1.0.1" + +"infer-owner@^1.0.3", "infer-owner@^1.0.4": + "integrity" "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==" + "resolved" "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz" + "version" "1.0.4" + +"inflight@^1.0.4": + "integrity" "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=" + "resolved" "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" + "version" "1.0.6" + dependencies: + "once" "^1.3.0" + "wrappy" "1" + +"inherits@^2.0.0", "inherits@^2.0.1", "inherits@^2.0.3", "inherits@^2.0.4", "inherits@~2.0.1", "inherits@~2.0.3", "inherits@2", "inherits@2.0.4": + "integrity" "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "resolved" "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" + "version" "2.0.4" + +"inherits@2.0.1": + "integrity" "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" + "resolved" "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + "version" "2.0.1" + +"inherits@2.0.3": + "integrity" "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "resolved" "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + "version" "2.0.3" + +"inquirer@^7.0.0": + "integrity" "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==" + "resolved" "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz" + "version" "7.3.3" + dependencies: + "ansi-escapes" "^4.2.1" + "chalk" "^4.1.0" + "cli-cursor" "^3.1.0" + "cli-width" "^3.0.0" + "external-editor" "^3.0.3" + "figures" "^3.0.0" + "lodash" "^4.17.19" + "mute-stream" "0.0.8" + "run-async" "^2.4.0" + "rxjs" "^6.6.0" + "string-width" "^4.1.0" + "strip-ansi" "^6.0.0" + "through" "^2.3.6" + +"internal-ip@^4.3.0": + "integrity" "sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg==" + "resolved" "https://registry.npmjs.org/internal-ip/-/internal-ip-4.3.0.tgz" + "version" "4.3.0" + dependencies: + "default-gateway" "^4.2.0" + "ipaddr.js" "^1.9.0" + +"internal-slot@^1.0.3": + "integrity" "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==" + "resolved" "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz" + "version" "1.0.3" + dependencies: + "get-intrinsic" "^1.1.0" + "has" "^1.0.3" + "side-channel" "^1.0.4" + +"intersection-observer@^0.7.0": + "integrity" "sha512-Id0Fij0HsB/vKWGeBe9PxeY45ttRiBmhFyyt/geBdDHBYNctMRTE3dC1U3ujzz3lap+hVXlEcVaB56kZP/eEUg==" + "resolved" "https://registry.npmjs.org/intersection-observer/-/intersection-observer-0.7.0.tgz" + "version" "0.7.0" + +"inversify@5.1.1": + "integrity" "sha512-j8grHGDzv1v+8T1sAQ+3boTCntFPfvxLCkNcxB1J8qA0lUN+fAlSyYd+RXKvaPRL4AGyPxViutBEJHNXOyUdFQ==" + "resolved" "https://registry.npmjs.org/inversify/-/inversify-5.1.1.tgz" + "version" "5.1.1" + +"ip-regex@^2.1.0": + "integrity" "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=" + "resolved" "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz" + "version" "2.1.0" + +"ip@^1.1.0", "ip@^1.1.5": + "integrity" "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" + "resolved" "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz" + "version" "1.1.5" + +"ipaddr.js@^1.9.0", "ipaddr.js@1.9.1": + "integrity" "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" + "resolved" "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz" + "version" "1.9.1" + +"is-absolute-url@^3.0.3": + "integrity" "sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==" + "resolved" "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-3.0.3.tgz" + "version" "3.0.3" + +"is-accessor-descriptor@^0.1.6": + "integrity" "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=" + "resolved" "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz" + "version" "0.1.6" + dependencies: + "kind-of" "^3.0.2" + +"is-accessor-descriptor@^1.0.0": + "integrity" "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==" + "resolved" "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz" + "version" "1.0.0" + dependencies: + "kind-of" "^6.0.0" + +"is-alphabetical@^1.0.0": + "integrity" "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==" + "resolved" "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz" + "version" "1.0.4" + +"is-alphanumeric@^1.0.0": + "integrity" "sha1-Spzvcdr0wAHB2B1j0UDPU/1oifQ=" + "resolved" "https://registry.npmjs.org/is-alphanumeric/-/is-alphanumeric-1.0.0.tgz" + "version" "1.0.0" + +"is-alphanumerical@^1.0.0": + "integrity" "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==" + "resolved" "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz" + "version" "1.0.4" + dependencies: + "is-alphabetical" "^1.0.0" + "is-decimal" "^1.0.0" + +"is-arguments@^1.0.4": + "integrity" "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==" + "resolved" "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz" + "version" "1.1.1" + dependencies: + "call-bind" "^1.0.2" + "has-tostringtag" "^1.0.0" + +"is-arrayish@^0.2.1": + "integrity" "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + "resolved" "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" + "version" "0.2.1" + +"is-bigint@^1.0.1": + "integrity" "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==" + "resolved" "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz" + "version" "1.0.4" + dependencies: + "has-bigints" "^1.0.1" + +"is-binary-path@^1.0.0": + "integrity" "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=" + "resolved" "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz" + "version" "1.0.1" + dependencies: + "binary-extensions" "^1.0.0" + +"is-binary-path@~2.1.0": + "integrity" "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==" + "resolved" "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz" + "version" "2.1.0" + dependencies: + "binary-extensions" "^2.0.0" + +"is-boolean-object@^1.1.0": + "integrity" "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==" + "resolved" "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz" + "version" "1.1.2" + dependencies: + "call-bind" "^1.0.2" + "has-tostringtag" "^1.0.0" + +"is-buffer@^1.1.4", "is-buffer@^1.1.5", "is-buffer@~1.1.6": + "integrity" "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + "resolved" "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz" + "version" "1.1.6" + +"is-callable@^1.1.4", "is-callable@^1.2.4": + "integrity" "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==" + "resolved" "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz" + "version" "1.2.4" + +"is-core-module@^2.2.0", "is-core-module@^2.8.1": + "integrity" "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==" + "resolved" "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz" + "version" "2.8.1" + dependencies: + "has" "^1.0.3" + +"is-data-descriptor@^0.1.4": + "integrity" "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=" + "resolved" "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz" + "version" "0.1.4" + dependencies: + "kind-of" "^3.0.2" + +"is-data-descriptor@^1.0.0": + "integrity" "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==" + "resolved" "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz" + "version" "1.0.0" + dependencies: + "kind-of" "^6.0.0" + +"is-date-object@^1.0.1": + "integrity" "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==" + "resolved" "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz" + "version" "1.0.5" + dependencies: + "has-tostringtag" "^1.0.0" + +"is-decimal@^1.0.0": + "integrity" "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==" + "resolved" "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz" + "version" "1.0.4" + +"is-descriptor@^0.1.0": + "integrity" "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==" + "resolved" "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz" + "version" "0.1.6" +>>>>>>> d7b4e57 (登录封装) dependencies: kind-of "^6.0.0" @@ -7545,6 +8181,7 @@ parse-json@^5.0.0: integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== dependencies: "@babel/code-frame" "^7.0.0" +<<<<<<< HEAD error-ex "^1.3.1" json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" @@ -8360,6 +8997,941 @@ regenerator-transform@^0.14.2: version "0.14.5" resolved "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz" integrity sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw== +======= + "error-ex" "^1.3.1" + "json-parse-even-better-errors" "^2.3.0" + "lines-and-columns" "^1.1.6" + +"parse-node-version@^1.0.1": + "integrity" "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==" + "resolved" "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz" + "version" "1.0.1" + +"parse5@5.1.0": + "integrity" "sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==" + "resolved" "https://registry.npmjs.org/parse5/-/parse5-5.1.0.tgz" + "version" "5.1.0" + +"parseurl@~1.3.2", "parseurl@~1.3.3": + "integrity" "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + "resolved" "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz" + "version" "1.3.3" + +"pascalcase@^0.1.1": + "integrity" "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" + "resolved" "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz" + "version" "0.1.1" + +"path-browserify@0.0.1": + "integrity" "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==" + "resolved" "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz" + "version" "0.0.1" + +"path-dirname@^1.0.0": + "integrity" "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" + "resolved" "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz" + "version" "1.0.2" + +"path-exists@^3.0.0": + "integrity" "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + "resolved" "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz" + "version" "3.0.0" + +"path-exists@^4.0.0": + "integrity" "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + "resolved" "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" + "version" "4.0.0" + +"path-is-absolute@^1.0.0": + "integrity" "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "resolved" "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + "version" "1.0.1" + +"path-is-inside@^1.0.2": + "integrity" "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=" + "resolved" "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz" + "version" "1.0.2" + +"path-key@^2.0.0", "path-key@^2.0.1": + "integrity" "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" + "resolved" "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz" + "version" "2.0.1" + +"path-key@^3.1.0": + "integrity" "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + "resolved" "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" + "version" "3.1.1" + +"path-parse@^1.0.6", "path-parse@^1.0.7": + "integrity" "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + "resolved" "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" + "version" "1.0.7" + +"path-to-regexp@^3.1.0": + "integrity" "sha512-jczvQbCUS7XmS7o+y1aEO9OBVFeZBQ1MDSEqmO7xSoPgOPoowY/SxLpZ6Vh97/8qHZOteiCKb7gkG9gA2ZUxJA==" + "resolved" "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.2.0.tgz" + "version" "3.2.0" + +"path-to-regexp@0.1.7": + "integrity" "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + "resolved" "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz" + "version" "0.1.7" + +"path-type@^3.0.0": + "integrity" "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==" + "resolved" "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz" + "version" "3.0.0" + dependencies: + "pify" "^3.0.0" + +"path-type@^4.0.0": + "integrity" "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" + "resolved" "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" + "version" "4.0.0" + +"pbkdf2@^3.0.3": + "integrity" "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==" + "resolved" "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz" + "version" "3.1.2" + dependencies: + "create-hash" "^1.1.2" + "create-hmac" "^1.1.4" + "ripemd160" "^2.0.1" + "safe-buffer" "^5.0.1" + "sha.js" "^2.4.8" + +"pend@~1.2.0": + "integrity" "sha1-elfrVQpng/kRUzH89GY9XI4AelA=" + "resolved" "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz" + "version" "1.2.0" + +"performance-now@^2.1.0": + "integrity" "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + "resolved" "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz" + "version" "2.1.0" + +"picocolors@^0.2.1": + "integrity" "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==" + "resolved" "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz" + "version" "0.2.1" + +"picocolors@^1.0.0": + "integrity" "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "resolved" "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz" + "version" "1.0.0" + +"picomatch@^2.0.4", "picomatch@^2.0.7", "picomatch@^2.2.1", "picomatch@^2.3.1": + "integrity" "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" + "resolved" "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" + "version" "2.3.1" + +"pify@^2.0.0": + "integrity" "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + "resolved" "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz" + "version" "2.3.0" + +"pify@^2.3.0": + "integrity" "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + "resolved" "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz" + "version" "2.3.0" + +"pify@^3.0.0": + "integrity" "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + "resolved" "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz" + "version" "3.0.0" + +"pify@^4.0.1": + "integrity" "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" + "resolved" "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz" + "version" "4.0.1" + +"pinkie-promise@^2.0.0": + "integrity" "sha1-ITXW36ejWMBprJsXh3YogihFD/o=" + "resolved" "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz" + "version" "2.0.1" + dependencies: + "pinkie" "^2.0.0" + +"pinkie@^2.0.0": + "integrity" "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + "resolved" "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz" + "version" "2.0.4" + +"pirates@^4.0.0": + "integrity" "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==" + "resolved" "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz" + "version" "4.0.5" + +"pkg-dir@^3.0.0": + "integrity" "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==" + "resolved" "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz" + "version" "3.0.0" + dependencies: + "find-up" "^3.0.0" + +"pkg-dir@^4.1.0": + "integrity" "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==" + "resolved" "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz" + "version" "4.2.0" + dependencies: + "find-up" "^4.0.0" + +"pn@^1.1.0": + "integrity" "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==" + "resolved" "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz" + "version" "1.1.0" + +"portfinder@^1.0.26": + "integrity" "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==" + "resolved" "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz" + "version" "1.0.28" + dependencies: + "async" "^2.6.2" + "debug" "^3.1.1" + "mkdirp" "^0.5.5" + +"posix-character-classes@^0.1.0": + "integrity" "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" + "resolved" "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz" + "version" "0.1.1" + +"postcss-html-transform@3.3.10": + "integrity" "sha512-WVbSe4CmzI9FoGZUaMQUM4H6LR61jhr1aE4iSf74Iv3g8YAzrfSrQD78WjpiLYOF9XPR9vpVAbY38c8jB+YOxQ==" + "resolved" "https://registry.npmjs.org/postcss-html-transform/-/postcss-html-transform-3.3.10.tgz" + "version" "3.3.10" + dependencies: + "postcss" "^6.0.22" + +"postcss-html@^0.28.0": + "integrity" "sha512-H+ucbGVR+lsZySspOApeQU9yC6Q3t75lwJYa3Im93fKAUt5DScKOSErShC0aC7USdn2jsT1LxubcC5vYu/VJYw==" + "resolved" "https://registry.npmjs.org/postcss-html/-/postcss-html-0.28.0.tgz" + "version" "0.28.0" + dependencies: + "htmlparser2" "^3.9.2" + +"postcss-import@12.0.1": + "integrity" "sha512-3Gti33dmCjyKBgimqGxL3vcV8w9+bsHwO5UrBawp796+jdardbcFl4RP5w/76BwNL7aGzpKstIfF9I+kdE8pTw==" + "resolved" "https://registry.npmjs.org/postcss-import/-/postcss-import-12.0.1.tgz" + "version" "12.0.1" + dependencies: + "postcss" "^7.0.1" + "postcss-value-parser" "^3.2.3" + "read-cache" "^1.0.0" + "resolve" "^1.1.7" + +"postcss-less@^2.0.0": + "integrity" "sha512-pPNsVnpCB13nBMOcl5GVh8JGmB0JGFjqkLUDzKdVpptFFKEe9wFdEzvh2j4lD2AD+7qcrUfw9Ta+oi5+Fw7jjQ==" + "resolved" "https://registry.npmjs.org/postcss-less/-/postcss-less-2.0.0.tgz" + "version" "2.0.0" + dependencies: + "postcss" "^5.2.16" + +"postcss-loader@4.3.0": + "integrity" "sha512-M/dSoIiNDOo8Rk0mUqoj4kpGq91gcxCfb9PoyZVdZ76/AuhxylHDYZblNE8o+EQ9AMSASeMFEKxZf5aU6wlx1Q==" + "resolved" "https://registry.npmjs.org/postcss-loader/-/postcss-loader-4.3.0.tgz" + "version" "4.3.0" + dependencies: + "cosmiconfig" "^7.0.0" + "klona" "^2.0.4" + "loader-utils" "^2.0.0" + "schema-utils" "^3.0.0" + "semver" "^7.3.4" + +"postcss-markdown@^0.28.0": + "integrity" "sha512-F0Vc8eHKDKTmensntXpd35LSAoXXtykhPY+IRfn4AnN4m+irav3QawmtSWLhsmbElKna8l1/HObYnbiM/Wok9Q==" + "resolved" "https://registry.npmjs.org/postcss-markdown/-/postcss-markdown-0.28.0.tgz" + "version" "0.28.0" + dependencies: + "remark" "^9.0.0" + "unist-util-find-all-after" "^1.0.2" + +"postcss-media-query-parser@^0.2.3": + "integrity" "sha1-J7Ocb02U+Bsac7j3Y1HGCeXO8kQ=" + "resolved" "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz" + "version" "0.2.3" + +"postcss-modules-extract-imports@^2.0.0": + "integrity" "sha512-LaYLDNS4SG8Q5WAWqIJgdHPJrDDr/Lv775rMBFUbgjTz6j34lUznACHcdRWroPvXANP2Vj7yNK57vp9eFqzLWQ==" + "resolved" "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz" + "version" "2.0.0" + dependencies: + "postcss" "^7.0.5" + +"postcss-modules-local-by-default@^3.0.2": + "integrity" "sha512-e3xDq+LotiGesympRlKNgaJ0PCzoUIdpH0dj47iWAui/kyTgh3CiAr1qP54uodmJhl6p9rN6BoNcdEDVJx9RDw==" + "resolved" "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-3.0.3.tgz" + "version" "3.0.3" + dependencies: + "icss-utils" "^4.1.1" + "postcss" "^7.0.32" + "postcss-selector-parser" "^6.0.2" + "postcss-value-parser" "^4.1.0" + +"postcss-modules-scope@^2.1.1", "postcss-modules-scope@^2.2.0": + "integrity" "sha512-YyEgsTMRpNd+HmyC7H/mh3y+MeFWevy7V1evVhJWewmMbjDHIbZbOXICC2y+m1xI1UVfIT1HMW/O04Hxyu9oXQ==" + "resolved" "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-2.2.0.tgz" + "version" "2.2.0" + dependencies: + "postcss" "^7.0.6" + "postcss-selector-parser" "^6.0.0" + +"postcss-modules-values@^3.0.0": + "integrity" "sha512-1//E5jCBrZ9DmRX+zCtmQtRSV6PV42Ix7Bzj9GbwJceduuf7IqP8MgeTXuRDHOWj2m0VzZD5+roFWDuU8RQjcg==" + "resolved" "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-3.0.0.tgz" + "version" "3.0.0" + dependencies: + "icss-utils" "^4.0.0" + "postcss" "^7.0.6" + +"postcss-plugin-constparse@3.3.10": + "integrity" "sha512-fVwKKX/S8IT0n8CU6f2b2MAUxQ9LHUnOxKGv+Amtt10cB2fIgB02WuXD9XoITEyG2q0TdJ1VESgnUF6/VxqUAw==" + "resolved" "https://registry.npmjs.org/postcss-plugin-constparse/-/postcss-plugin-constparse-3.3.10.tgz" + "version" "3.3.10" + dependencies: + "postcss" "^6.0.22" + +"postcss-pxtorem@^4.0.1": + "integrity" "sha1-nGTQ7+SIVHPMHLAwXG/8PrtFsc0=" + "resolved" "https://registry.npmjs.org/postcss-pxtorem/-/postcss-pxtorem-4.0.1.tgz" + "version" "4.0.1" + dependencies: + "object-assign" "^4.1.0" + "postcss" "^5.2.10" + +"postcss-pxtransform@3.3.10": + "integrity" "sha512-PBTHjah1CZXMBLYNAqTGj/c4eYoY7MZ0mGBhZwv4c/Lbe6fcTU4sN/dYWotjnvHVcUmxe2wmzQcw6kI5PwlltQ==" + "resolved" "https://registry.npmjs.org/postcss-pxtransform/-/postcss-pxtransform-3.3.10.tgz" + "version" "3.3.10" + dependencies: + "postcss" "^6.0.16" + "postcss-pxtorem" "^4.0.1" + +"postcss-reporter@^5.0.0": + "integrity" "sha512-rBkDbaHAu5uywbCR2XE8a25tats3xSOsGNx6mppK6Q9kSFGKc/FyAzfci+fWM2l+K402p1D0pNcfDGxeje5IKg==" + "resolved" "https://registry.npmjs.org/postcss-reporter/-/postcss-reporter-5.0.0.tgz" + "version" "5.0.0" + dependencies: + "chalk" "^2.0.1" + "lodash" "^4.17.4" + "log-symbols" "^2.0.0" + "postcss" "^6.0.8" + +"postcss-resolve-nested-selector@^0.1.1": + "integrity" "sha1-Kcy8fDfe36wwTp//C/FZaz9qDk4=" + "resolved" "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz" + "version" "0.1.1" + +"postcss-safe-parser@^3.0.1": + "integrity" "sha1-t1Pv9sfArqXoN1++TN6L+QY/8UI=" + "resolved" "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-3.0.1.tgz" + "version" "3.0.1" + dependencies: + "postcss" "^6.0.6" + +"postcss-sass@^0.3.0": + "integrity" "sha512-B5z2Kob4xBxFjcufFnhQ2HqJQ2y/Zs/ic5EZbCywCkxKd756Q40cIQ/veRDwSrw1BF6+4wUgmpm0sBASqVi65A==" + "resolved" "https://registry.npmjs.org/postcss-sass/-/postcss-sass-0.3.5.tgz" + "version" "0.3.5" + dependencies: + "gonzales-pe" "^4.2.3" + "postcss" "^7.0.1" + +"postcss-scss@^1.0.2": + "integrity" "sha512-4EFYGHcEw+H3E06PT/pQQri06u/1VIIPjeJQaM8skB80vZuXMhp4cSNV5azmdNkontnOID/XYWEvEEELLFB1ww==" + "resolved" "https://registry.npmjs.org/postcss-scss/-/postcss-scss-1.0.6.tgz" + "version" "1.0.6" + dependencies: + "postcss" "^6.0.23" + +"postcss-selector-parser@^3.1.0": + "integrity" "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==" + "resolved" "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz" + "version" "3.1.2" + dependencies: + "dot-prop" "^5.2.0" + "indexes-of" "^1.0.1" + "uniq" "^1.0.1" + +"postcss-selector-parser@^6.0.0", "postcss-selector-parser@^6.0.2": + "integrity" "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==" + "resolved" "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz" + "version" "6.0.10" + dependencies: + "cssesc" "^3.0.0" + "util-deprecate" "^1.0.2" + +"postcss-syntax@^0.28.0", "postcss-syntax@>=0.28.0": + "integrity" "sha512-9W3T1fSE9QWKyW6s84kZapv0BP5uvj7mNBp34kwI93uGWULzZjaKv4xR4phubBD53cRgaM/qnvquVK1KLsl+Kg==" + "resolved" "https://registry.npmjs.org/postcss-syntax/-/postcss-syntax-0.28.0.tgz" + "version" "0.28.0" + +"postcss-url@8.0.0": + "integrity" "sha512-E2cbOQ5aii2zNHh8F6fk1cxls7QVFZjLPSrqvmiza8OuXLzIpErij8BDS5Y3STPfJgpIMNCPEr8JlKQWEoozUw==" + "resolved" "https://registry.npmjs.org/postcss-url/-/postcss-url-8.0.0.tgz" + "version" "8.0.0" + dependencies: + "mime" "^2.3.1" + "minimatch" "^3.0.4" + "mkdirp" "^0.5.0" + "postcss" "^7.0.2" + "xxhashjs" "^0.2.1" + +"postcss-value-parser@^3.2.3", "postcss-value-parser@^3.3.0": + "integrity" "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" + "resolved" "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz" + "version" "3.3.1" + +"postcss-value-parser@^4.0.2": + "integrity" "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" + "resolved" "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz" + "version" "4.2.0" + +"postcss-value-parser@^4.1.0": + "integrity" "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" + "resolved" "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz" + "version" "4.2.0" + +"postcss@^5.2.10": + "integrity" "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==" + "resolved" "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz" + "version" "5.2.18" + dependencies: + "chalk" "^1.1.3" + "js-base64" "^2.1.9" + "source-map" "^0.5.6" + "supports-color" "^3.2.3" + +"postcss@^5.2.16": + "integrity" "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==" + "resolved" "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz" + "version" "5.2.18" + dependencies: + "chalk" "^1.1.3" + "js-base64" "^2.1.9" + "source-map" "^0.5.6" + "supports-color" "^3.2.3" + +"postcss@^6.0.14": + "integrity" "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==" + "resolved" "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz" + "version" "6.0.23" + dependencies: + "chalk" "^2.4.1" + "source-map" "^0.6.1" + "supports-color" "^5.4.0" + +"postcss@^6.0.16", "postcss@^6.0.23", "postcss@>=5.0.0": + "integrity" "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==" + "resolved" "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz" + "version" "6.0.23" + dependencies: + "chalk" "^2.4.1" + "source-map" "^0.6.1" + "supports-color" "^5.4.0" + +"postcss@^6.0.22": + "integrity" "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==" + "resolved" "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz" + "version" "6.0.23" + dependencies: + "chalk" "^2.4.1" + "source-map" "^0.6.1" + "supports-color" "^5.4.0" + +"postcss@^6.0.6": + "integrity" "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==" + "resolved" "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz" + "version" "6.0.23" + dependencies: + "chalk" "^2.4.1" + "source-map" "^0.6.1" + "supports-color" "^5.4.0" + +"postcss@^6.0.8": + "integrity" "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==" + "resolved" "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz" + "version" "6.0.23" + dependencies: + "chalk" "^2.4.1" + "source-map" "^0.6.1" + "supports-color" "^5.4.0" + +"postcss@^7.0.0 || ^8.0.1", "postcss@8.3.5": + "integrity" "sha512-NxTuJocUhYGsMiMFHDUkmjSKT3EdH4/WbGF6GCi1NDGk+vbcUTun4fpbOqaPtD8IIsztA2ilZm2DhYCuyN58gA==" + "resolved" "https://registry.npmjs.org/postcss/-/postcss-8.3.5.tgz" + "version" "8.3.5" + dependencies: + "colorette" "^1.2.2" + "nanoid" "^3.1.23" + "source-map-js" "^0.6.2" + +"postcss@^7.0.1", "postcss@^7.0.14", "postcss@^7.0.2", "postcss@^7.0.23", "postcss@^7.0.26", "postcss@^7.0.32", "postcss@^7.0.5", "postcss@^7.0.6": + "integrity" "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==" + "resolved" "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz" + "version" "7.0.39" + dependencies: + "picocolors" "^0.2.1" + "source-map" "^0.6.1" + +"postcss@^7.0.35": + "integrity" "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==" + "resolved" "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz" + "version" "7.0.39" + dependencies: + "picocolors" "^0.2.1" + "source-map" "^0.6.1" + +"postcss@7.0.21": + "integrity" "sha512-uIFtJElxJo29QC753JzhidoAhvp/e/Exezkdhfmt8AymWT6/5B7W1WmponYWkHk2eg6sONyTch0A3nkMPun3SQ==" + "resolved" "https://registry.npmjs.org/postcss/-/postcss-7.0.21.tgz" + "version" "7.0.21" + dependencies: + "chalk" "^2.4.2" + "source-map" "^0.6.1" + "supports-color" "^6.1.0" + +"prelude-ls@~1.1.2": + "integrity" "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" + "resolved" "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz" + "version" "1.1.2" + +"prepend-http@^1.0.0": + "integrity" "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" + "resolved" "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz" + "version" "1.0.4" + +"preserve@^0.2.0": + "integrity" "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" + "resolved" "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz" + "version" "0.2.0" + +"pretty-bytes@^5.3.0": + "integrity" "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==" + "resolved" "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz" + "version" "5.6.0" + +"pretty-error@^2.0.2": + "integrity" "sha512-EY5oDzmsX5wvuynAByrmY0P0hcp+QpnAKbJng2A2MPjVKXCxrDSUkzghVJ4ZGPIv+JC4gX8fPUWscC0RtjsWGw==" + "resolved" "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.2.tgz" + "version" "2.1.2" + dependencies: + "lodash" "^4.17.20" + "renderkid" "^2.0.4" + +"process-nextick-args@~2.0.0": + "integrity" "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + "resolved" "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz" + "version" "2.0.1" + +"process@^0.11.10": + "integrity" "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + "resolved" "https://registry.npmjs.org/process/-/process-0.11.10.tgz" + "version" "0.11.10" + +"progress@^2.0.0": + "integrity" "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" + "resolved" "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz" + "version" "2.0.3" + +"promise-inflight@^1.0.1": + "integrity" "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" + "resolved" "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz" + "version" "1.0.1" + +"prop-types@^15.8.1": + "integrity" "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==" + "resolved" "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz" + "version" "15.8.1" + dependencies: + "loose-envify" "^1.4.0" + "object-assign" "^4.1.1" + "react-is" "^16.13.1" + +"proxy-addr@~2.0.7": + "integrity" "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==" + "resolved" "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz" + "version" "2.0.7" + dependencies: + "forwarded" "0.2.0" + "ipaddr.js" "1.9.1" + +"prr@~1.0.1": + "integrity" "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" + "resolved" "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz" + "version" "1.0.1" + +"psl@^1.1.28": + "integrity" "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + "resolved" "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz" + "version" "1.8.0" + +"public-encrypt@^4.0.0": + "integrity" "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==" + "resolved" "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz" + "version" "4.0.3" + dependencies: + "bn.js" "^4.1.0" + "browserify-rsa" "^4.0.0" + "create-hash" "^1.1.0" + "parse-asn1" "^5.0.0" + "randombytes" "^2.0.1" + "safe-buffer" "^5.1.2" + +"pump@^2.0.0": + "integrity" "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==" + "resolved" "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz" + "version" "2.0.1" + dependencies: + "end-of-stream" "^1.1.0" + "once" "^1.3.1" + +"pump@^3.0.0": + "integrity" "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==" + "resolved" "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz" + "version" "3.0.0" + dependencies: + "end-of-stream" "^1.1.0" + "once" "^1.3.1" + +"pumpify@^1.3.3": + "integrity" "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==" + "resolved" "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz" + "version" "1.5.1" + dependencies: + "duplexify" "^3.6.0" + "inherits" "^2.0.3" + "pump" "^2.0.0" + +"punycode@^1.2.4": + "integrity" "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + "resolved" "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz" + "version" "1.4.1" + +"punycode@^2.1.0", "punycode@^2.1.1": + "integrity" "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + "resolved" "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz" + "version" "2.1.1" + +"punycode@1.3.2": + "integrity" "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + "resolved" "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz" + "version" "1.3.2" + +"qs@^6.10.3": + "integrity" "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==" + "resolved" "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz" + "version" "6.10.3" + dependencies: + "side-channel" "^1.0.4" + +"qs@~6.5.2": + "integrity" "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==" + "resolved" "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz" + "version" "6.5.3" + +"qs@6.9.7": + "integrity" "sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw==" + "resolved" "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz" + "version" "6.9.7" + +"query-string@^4.1.0": + "integrity" "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=" + "resolved" "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz" + "version" "4.3.4" + dependencies: + "object-assign" "^4.1.0" + "strict-uri-encode" "^1.0.0" + +"query-string@^6.13.8": + "integrity" "sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw==" + "resolved" "https://registry.npmjs.org/query-string/-/query-string-6.14.1.tgz" + "version" "6.14.1" + dependencies: + "decode-uri-component" "^0.2.0" + "filter-obj" "^1.1.0" + "split-on-first" "^1.0.0" + "strict-uri-encode" "^2.0.0" + +"querystring-es3@^0.2.0": + "integrity" "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" + "resolved" "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz" + "version" "0.2.1" + +"querystring@^0.2.0": + "integrity" "sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg==" + "resolved" "https://registry.npmjs.org/querystring/-/querystring-0.2.1.tgz" + "version" "0.2.1" + +"querystring@0.2.0": + "integrity" "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + "resolved" "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz" + "version" "0.2.0" + +"querystringify@^2.1.1": + "integrity" "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" + "resolved" "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz" + "version" "2.2.0" + +"queue-microtask@^1.2.2": + "integrity" "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" + "resolved" "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" + "version" "1.2.3" + +"quick-lru@^1.0.0": + "integrity" "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=" + "resolved" "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz" + "version" "1.1.0" + +"raf@^3.4.1": + "integrity" "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==" + "resolved" "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz" + "version" "3.4.1" + dependencies: + "performance-now" "^2.1.0" + +"randomatic@^3.0.0": + "integrity" "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==" + "resolved" "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz" + "version" "3.1.1" + dependencies: + "is-number" "^4.0.0" + "kind-of" "^6.0.0" + "math-random" "^1.0.1" + +"randombytes@^2.0.0", "randombytes@^2.0.1", "randombytes@^2.0.5", "randombytes@^2.1.0": + "integrity" "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==" + "resolved" "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz" + "version" "2.1.0" + dependencies: + "safe-buffer" "^5.1.0" + +"randomfill@^1.0.3": + "integrity" "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==" + "resolved" "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz" + "version" "1.0.4" + dependencies: + "randombytes" "^2.0.5" + "safe-buffer" "^5.1.0" + +"range-parser@^1.2.1", "range-parser@~1.2.1": + "integrity" "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + "resolved" "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz" + "version" "1.2.1" + +"raw-body@2.4.3": + "integrity" "sha512-UlTNLIcu0uzb4D2f4WltY6cVjLi+/jEN4lgEUj3E04tpMDpUlkBo/eSn6zou9hum2VMNpCCUone0O0WeJim07g==" + "resolved" "https://registry.npmjs.org/raw-body/-/raw-body-2.4.3.tgz" + "version" "2.4.3" + dependencies: + "bytes" "3.1.2" + "http-errors" "1.8.1" + "iconv-lite" "0.4.24" + "unpipe" "1.0.0" + +"react-dom@^16.8 || ^17.0 || ^18.0", "react-dom@^17.0.0": + "integrity" "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==" + "resolved" "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz" + "version" "17.0.2" + dependencies: + "loose-envify" "^1.1.0" + "object-assign" "^4.1.1" + "scheduler" "^0.20.2" + +"react-is@^16.13.1", "react-is@^16.7.0": + "integrity" "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + "resolved" "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz" + "version" "16.13.1" + +"react-is@^18.0.0": + "integrity" "sha512-yUcBYdBBbo3QiPsgYDcfQcIkGZHfxOaoE6HLSnr1sPzMhdyxusbfKOSUbSd/ocGi32dxcj366PsTj+5oggeKKw==" + "resolved" "https://registry.npmjs.org/react-is/-/react-is-18.0.0.tgz" + "version" "18.0.0" + +"react-reconciler@0.26.1": + "integrity" "sha512-6E/CvH9zcDmHjhiNJlP0qJ8+3ufnY2b5RWs774Uy8XKWN0l6qfnlkz0XnDacxqj2rbJdq76w9dlFXjPPOQrmqA==" + "resolved" "https://registry.npmjs.org/react-reconciler/-/react-reconciler-0.26.1.tgz" + "version" "0.26.1" + dependencies: + "loose-envify" "^1.1.0" + "object-assign" "^4.1.1" + "scheduler" "^0.20.1" + +"react-redux@^8.0.1": + "integrity" "sha512-LMZMsPY4DYdZfLJgd7i79n5Kps5N9XVLCJJeWAaPYTV+Eah2zTuBjTxKtNEbjiyitbq80/eIkm55CYSLqAub3w==" + "resolved" "https://registry.npmjs.org/react-redux/-/react-redux-8.0.1.tgz" + "version" "8.0.1" + dependencies: + "@babel/runtime" "^7.12.1" + "@types/hoist-non-react-statics" "^3.3.1" + "@types/use-sync-external-store" "^0.0.3" + "hoist-non-react-statics" "^3.3.2" + "react-is" "^18.0.0" + "use-sync-external-store" "^1.0.0" + +"react-refresh@^0.4.0": + "integrity" "sha512-Hwln1VNuGl/6bVwnd0Xdn1e84gT/8T9aYNL+HAKDArLCS7LWjwr7StE30IEYbIkx0Vi3vs+coQxe+SQDbGbbpA==" + "resolved" "https://registry.npmjs.org/react-refresh/-/react-refresh-0.4.3.tgz" + "version" "0.4.3" + +"react-refresh@>=0.8.3 <0.10.0", "react-refresh@0.9.0": + "integrity" "sha512-Gvzk7OZpiqKSkxsQvO/mbTN1poglhmAV7gR/DdIrRrSMXraRQQlfikRJOr3Nb9GTMPC5kof948Zy6jJZIFtDvQ==" + "resolved" "https://registry.npmjs.org/react-refresh/-/react-refresh-0.9.0.tgz" + "version" "0.9.0" + +"react@^16.8 || ^17.0 || ^18.0", "react@^16.8.0 || ^17.0.0 || ^18.0.0-rc", "react@^17.0.0", "react@^17.0.1", "react@17.0.2": + "integrity" "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==" + "resolved" "https://registry.npmjs.org/react/-/react-17.0.2.tgz" + "version" "17.0.2" + dependencies: + "loose-envify" "^1.1.0" + "object-assign" "^4.1.1" + +"read-cache@^1.0.0": + "integrity" "sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=" + "resolved" "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz" + "version" "1.0.0" + dependencies: + "pify" "^2.3.0" + +"read-pkg-up@^3.0.0": + "integrity" "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=" + "resolved" "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz" + "version" "3.0.0" + dependencies: + "find-up" "^2.0.0" + "read-pkg" "^3.0.0" + +"read-pkg@^3.0.0": + "integrity" "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=" + "resolved" "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz" + "version" "3.0.0" + dependencies: + "load-json-file" "^4.0.0" + "normalize-package-data" "^2.3.2" + "path-type" "^3.0.0" + +"readable-stream@^2.0.0", "readable-stream@^2.0.1", "readable-stream@^2.0.2", "readable-stream@^2.1.5", "readable-stream@^2.2.2", "readable-stream@^2.3.3", "readable-stream@^2.3.6", "readable-stream@~2.3.6", "readable-stream@1 || 2": + "integrity" "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==" + "resolved" "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz" + "version" "2.3.7" + dependencies: + "core-util-is" "~1.0.0" + "inherits" "~2.0.3" + "isarray" "~1.0.0" + "process-nextick-args" "~2.0.0" + "safe-buffer" "~5.1.1" + "string_decoder" "~1.1.1" + "util-deprecate" "~1.0.1" + +"readable-stream@^3.0.6": + "integrity" "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==" + "resolved" "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz" + "version" "3.6.0" + dependencies: + "inherits" "^2.0.3" + "string_decoder" "^1.1.1" + "util-deprecate" "^1.0.1" + +"readable-stream@^3.1.1": + "integrity" "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==" + "resolved" "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz" + "version" "3.6.0" + dependencies: + "inherits" "^2.0.3" + "string_decoder" "^1.1.1" + "util-deprecate" "^1.0.1" + +"readable-stream@^3.6.0": + "integrity" "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==" + "resolved" "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz" + "version" "3.6.0" + dependencies: + "inherits" "^2.0.3" + "string_decoder" "^1.1.1" + "util-deprecate" "^1.0.1" + +"readdirp@^2.2.1": + "integrity" "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==" + "resolved" "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz" + "version" "2.2.1" + dependencies: + "graceful-fs" "^4.1.11" + "micromatch" "^3.1.10" + "readable-stream" "^2.0.2" + +"readdirp@~3.3.0": + "integrity" "sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ==" + "resolved" "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz" + "version" "3.3.0" + dependencies: + "picomatch" "^2.0.7" + +"readdirp@~3.6.0": + "integrity" "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==" + "resolved" "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz" + "version" "3.6.0" + dependencies: + "picomatch" "^2.2.1" + +"redent@^2.0.0": + "integrity" "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=" + "resolved" "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz" + "version" "2.0.0" + dependencies: + "indent-string" "^3.0.0" + "strip-indent" "^2.0.0" + +"redux-logger@^3.0.6": + "integrity" "sha1-91VZZvMJjzyIYExEnPC69XeCdL8=" + "resolved" "https://registry.npmjs.org/redux-logger/-/redux-logger-3.0.6.tgz" + "version" "3.0.6" + dependencies: + "deep-diff" "^0.3.5" + +"redux-thunk@^2.4.1": + "integrity" "sha512-OOYGNY5Jy2TWvTL1KgAlVy6dcx3siPJ1wTq741EPyUKfn6W6nChdICjZwCd0p8AZBs5kWpZlbkXW2nE/zjUa+Q==" + "resolved" "https://registry.npmjs.org/redux-thunk/-/redux-thunk-2.4.1.tgz" + "version" "2.4.1" + +"redux@^4", "redux@^4.2.0": + "integrity" "sha512-oSBmcKKIuIR4ME29/AeNUnl5L+hvBq7OaJWzaptTQJAntaPvxIJqfnjbaEiCzzaIz+XmVILfqAM3Ob0aXLPfjA==" + "resolved" "https://registry.npmjs.org/redux/-/redux-4.2.0.tgz" + "version" "4.2.0" + dependencies: + "@babel/runtime" "^7.9.2" + +"reflect-metadata@^0.1.13": + "integrity" "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==" + "resolved" "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz" + "version" "0.1.13" + +"regenerate-unicode-properties@^10.0.1": + "integrity" "sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw==" + "resolved" "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz" + "version" "10.0.1" + dependencies: + "regenerate" "^1.4.2" + +"regenerate@^1.4.2": + "integrity" "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==" + "resolved" "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz" + "version" "1.4.2" + +"regenerator-runtime@^0.11.0", "regenerator-runtime@0.11": + "integrity" "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + "resolved" "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz" + "version" "0.11.1" + +"regenerator-runtime@^0.13.4": + "integrity" "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" + "resolved" "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz" + "version" "0.13.9" + +"regenerator-transform@^0.14.2": + "integrity" "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==" + "resolved" "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz" + "version" "0.14.5" +>>>>>>> d7b4e57 (登录封装) dependencies: "@babel/runtime" "^7.8.4" @@ -9877,6 +11449,7 @@ tsconfig-paths@^3.14.1: integrity sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ== dependencies: "@types/json5" "^0.0.29" +<<<<<<< HEAD json5 "^1.0.1" minimist "^1.2.6" strip-bom "^3.0.0" @@ -10311,6 +11884,447 @@ watchpack@^1.7.4: dependencies: graceful-fs "^4.1.2" neo-async "^2.5.0" +======= + "json5" "^1.0.1" + "minimist" "^1.2.6" + "strip-bom" "^3.0.0" + +"tslib@^1.10.0", "tslib@^1.8.1", "tslib@^1.9.0": + "integrity" "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + "resolved" "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" + "version" "1.14.1" + +"tslib@^2.3.0": + "integrity" "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + "resolved" "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz" + "version" "2.3.1" + +"tsutils@^3.21.0": + "integrity" "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==" + "resolved" "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz" + "version" "3.21.0" + dependencies: + "tslib" "^1.8.1" + +"tty-browserify@0.0.0": + "integrity" "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" + "resolved" "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz" + "version" "0.0.0" + +"tunnel-agent@^0.6.0": + "integrity" "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=" + "resolved" "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz" + "version" "0.6.0" + dependencies: + "safe-buffer" "^5.0.1" + +"tweetnacl@^0.14.3", "tweetnacl@~0.14.0": + "integrity" "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + "resolved" "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz" + "version" "0.14.5" + +"type-check@~0.3.2": + "integrity" "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=" + "resolved" "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz" + "version" "0.3.2" + dependencies: + "prelude-ls" "~1.1.2" + +"type-fest@^0.13.1", "type-fest@^0.8.1": + "integrity" "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" + "resolved" "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz" + "version" "0.8.1" + +"type-fest@^0.21.3": + "integrity" "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==" + "resolved" "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz" + "version" "0.21.3" + +"type-is@~1.6.18": + "integrity" "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==" + "resolved" "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz" + "version" "1.6.18" + dependencies: + "media-typer" "0.3.0" + "mime-types" "~2.1.24" + +"type@^1.0.1": + "integrity" "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + "resolved" "https://registry.npmjs.org/type/-/type-1.2.0.tgz" + "version" "1.2.0" + +"type@^2.5.0": + "integrity" "sha512-eiDBDOmkih5pMbo9OqsqPRGMljLodLcwd5XD5JbtNB0o89xZAwynY9EdCDsJU7LtcVCClu9DvM7/0Ep1hYX3EQ==" + "resolved" "https://registry.npmjs.org/type/-/type-2.6.0.tgz" + "version" "2.6.0" + +"typedarray@^0.0.6": + "integrity" "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + "resolved" "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" + "version" "0.0.6" + +"typescript@^4.1.0", "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta": + "integrity" "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==" + "resolved" "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz" + "version" "4.6.3" + +"uglify-js@^3.5.1": + "integrity" "sha512-6iCVm2omGJbsu3JWac+p6kUiOpg3wFO2f8lIXjfEb8RrmLjzog1wTPMmwKB7swfzzqxj9YM+sGUM++u1qN4qJg==" + "resolved" "https://registry.npmjs.org/uglify-js/-/uglify-js-3.15.3.tgz" + "version" "3.15.3" + +"uglify-js@3.4.x": + "integrity" "sha512-Y2VsbPVs0FIshJztycsO2SfPk7/KAF/T72qzv9u5EpQ4kB2hQoHlhNQTsNyy6ul7lQtqJN/AoWeS23OzEiEFxw==" + "resolved" "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz" + "version" "3.4.10" + dependencies: + "commander" "~2.19.0" + "source-map" "~0.6.1" + +"unbox-primitive@^1.0.1": + "integrity" "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==" + "resolved" "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz" + "version" "1.0.1" + dependencies: + "function-bind" "^1.1.1" + "has-bigints" "^1.0.1" + "has-symbols" "^1.0.2" + "which-boxed-primitive" "^1.0.2" + +"unescape-js@^1.1.1": + "integrity" "sha512-42SD8NOQEhdYntEiUQdYq/1V/YHwr1HLwlHuTJB5InVVdOSbgI6xu8jK5q65yIzuFCfczzyDF/7hbGzVbyCw0g==" + "resolved" "https://registry.npmjs.org/unescape-js/-/unescape-js-1.1.4.tgz" + "version" "1.1.4" + dependencies: + "string.fromcodepoint" "^0.2.1" + +"unherit@^1.0.4": + "integrity" "sha512-Ft16BJcnapDKp0+J/rqFC3Rrk6Y/Ng4nzsC028k2jdDII/rdZ7Wd3pPT/6+vIIxRagwRc9K0IUX0Ra4fKvw+WQ==" + "resolved" "https://registry.npmjs.org/unherit/-/unherit-1.1.3.tgz" + "version" "1.1.3" + dependencies: + "inherits" "^2.0.0" + "xtend" "^4.0.0" + +"unicode-canonical-property-names-ecmascript@^2.0.0": + "integrity" "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==" + "resolved" "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz" + "version" "2.0.0" + +"unicode-match-property-ecmascript@^2.0.0": + "integrity" "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==" + "resolved" "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz" + "version" "2.0.0" + dependencies: + "unicode-canonical-property-names-ecmascript" "^2.0.0" + "unicode-property-aliases-ecmascript" "^2.0.0" + +"unicode-match-property-value-ecmascript@^2.0.0": + "integrity" "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==" + "resolved" "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz" + "version" "2.0.0" + +"unicode-property-aliases-ecmascript@^2.0.0": + "integrity" "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==" + "resolved" "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz" + "version" "2.0.0" + +"unified@^6.0.0": + "integrity" "sha512-1k+KPhlVtqmG99RaTbAv/usu85fcSRu3wY8X+vnsEhIxNP5VbVIDiXnLqyKIG+UMdyTg0ZX9EI6k2AfjJkHPtA==" + "resolved" "https://registry.npmjs.org/unified/-/unified-6.2.0.tgz" + "version" "6.2.0" + dependencies: + "bail" "^1.0.0" + "extend" "^3.0.0" + "is-plain-obj" "^1.1.0" + "trough" "^1.0.0" + "vfile" "^2.0.0" + "x-is-string" "^0.1.0" + +"union-value@^1.0.0": + "integrity" "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==" + "resolved" "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz" + "version" "1.0.1" + dependencies: + "arr-union" "^3.1.0" + "get-value" "^2.0.6" + "is-extendable" "^0.1.1" + "set-value" "^2.0.1" + +"uniq@^1.0.1": + "integrity" "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=" + "resolved" "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz" + "version" "1.0.1" + +"unique-filename@^1.1.1": + "integrity" "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==" + "resolved" "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz" + "version" "1.1.1" + dependencies: + "unique-slug" "^2.0.0" + +"unique-slug@^2.0.0": + "integrity" "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==" + "resolved" "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz" + "version" "2.0.2" + dependencies: + "imurmurhash" "^0.1.4" + +"unist-util-find-all-after@^1.0.2": + "integrity" "sha512-lWgIc3rrTMTlK1Y0hEuL+k+ApzFk78h+lsaa2gHf63Gp5Ww+mt11huDniuaoq1H+XMK2lIIjjPkncxXcDp3QDw==" + "resolved" "https://registry.npmjs.org/unist-util-find-all-after/-/unist-util-find-all-after-1.0.5.tgz" + "version" "1.0.5" + dependencies: + "unist-util-is" "^3.0.0" + +"unist-util-is@^3.0.0": + "integrity" "sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==" + "resolved" "https://registry.npmjs.org/unist-util-is/-/unist-util-is-3.0.0.tgz" + "version" "3.0.0" + +"unist-util-remove-position@^1.0.0": + "integrity" "sha512-tLqd653ArxJIPnKII6LMZwH+mb5q+n/GtXQZo6S6csPRs5zB0u79Yw8ouR3wTw8wxvdJFhpP6Y7jorWdCgLO0A==" + "resolved" "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-1.1.4.tgz" + "version" "1.1.4" + dependencies: + "unist-util-visit" "^1.1.0" + +"unist-util-stringify-position@^1.0.0", "unist-util-stringify-position@^1.1.1": + "integrity" "sha512-pNCVrk64LZv1kElr0N1wPiHEUoXNVFERp+mlTg/s9R5Lwg87f9bM/3sQB99w+N9D/qnM9ar3+AKDBwo/gm/iQQ==" + "resolved" "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-1.1.2.tgz" + "version" "1.1.2" + +"unist-util-visit-parents@^2.0.0": + "integrity" "sha512-DyN5vD4NE3aSeB+PXYNKxzGsfocxp6asDc2XXE3b0ekO2BaRUpBicbbUygfSvYfUz1IkmjFR1YF7dPklraMZ2g==" + "resolved" "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-2.1.2.tgz" + "version" "2.1.2" + dependencies: + "unist-util-is" "^3.0.0" + +"unist-util-visit@^1.1.0": + "integrity" "sha512-AvGNk7Bb//EmJZyhtRUnNMEpId/AZ5Ph/KUpTI09WHQuDZHKovQ1oEv3mfmKpWKtoMzyMC4GLBm1Zy5k12fjIw==" + "resolved" "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.4.1.tgz" + "version" "1.4.1" + dependencies: + "unist-util-visit-parents" "^2.0.0" + +"universal-router@^8.3.0": + "integrity" "sha512-cBkihRoHvRQAjdUnDE1GGuuw/TPAIi8z2pEsSmUVAWLeZdgjHzzAb1+0VOO6NvBOvySItOTQikzaGlRxRdJBnA==" + "resolved" "https://registry.npmjs.org/universal-router/-/universal-router-8.3.0.tgz" + "version" "8.3.0" + dependencies: + "path-to-regexp" "^3.1.0" + +"universalify@^0.1.0": + "integrity" "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + "resolved" "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz" + "version" "0.1.2" + +"unpipe@~1.0.0", "unpipe@1.0.0": + "integrity" "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + "resolved" "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" + "version" "1.0.0" + +"unset-value@^1.0.0": + "integrity" "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=" + "resolved" "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz" + "version" "1.0.0" + dependencies: + "has-value" "^0.3.1" + "isobject" "^3.0.0" + +"upath@^1.1.1": + "integrity" "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==" + "resolved" "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz" + "version" "1.2.0" + +"upper-case@^1.1.1": + "integrity" "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=" + "resolved" "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz" + "version" "1.1.3" + +"uri-js@^4.2.2": + "integrity" "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==" + "resolved" "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" + "version" "4.4.1" + dependencies: + "punycode" "^2.1.0" + +"urix@^0.1.0": + "integrity" "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" + "resolved" "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz" + "version" "0.1.0" + +"url-loader@^4.1.0": + "integrity" "sha512-3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA==" + "resolved" "https://registry.npmjs.org/url-loader/-/url-loader-4.1.1.tgz" + "version" "4.1.1" + dependencies: + "loader-utils" "^2.0.0" + "mime-types" "^2.1.27" + "schema-utils" "^3.0.0" + +"url-parse@^1.4.3", "url-parse@^1.4.7": + "integrity" "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==" + "resolved" "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz" + "version" "1.5.10" + dependencies: + "querystringify" "^2.1.1" + "requires-port" "^1.0.0" + +"url@^0.11.0": + "integrity" "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=" + "resolved" "https://registry.npmjs.org/url/-/url-0.11.0.tgz" + "version" "0.11.0" + dependencies: + "punycode" "1.3.2" + "querystring" "0.2.0" + +"use-sync-external-store@^1.0.0": + "integrity" "sha512-AFVsxg5GkFg8GDcxnl+Z0lMAz9rE8DGJCc28qnBuQF7lac57B5smLcT37aXpXIIPz75rW4g3eXHPjhHwdGskOw==" + "resolved" "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.0.0.tgz" + "version" "1.0.0" + +"use@^3.1.0": + "integrity" "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" + "resolved" "https://registry.npmjs.org/use/-/use-3.1.1.tgz" + "version" "3.1.1" + +"util-deprecate@^1.0.1", "util-deprecate@^1.0.2", "util-deprecate@~1.0.1": + "integrity" "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "resolved" "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + "version" "1.0.2" + +"util.promisify@1.0.0": + "integrity" "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==" + "resolved" "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz" + "version" "1.0.0" + dependencies: + "define-properties" "^1.1.2" + "object.getownpropertydescriptors" "^2.0.3" + +"util@^0.11.0": + "integrity" "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==" + "resolved" "https://registry.npmjs.org/util/-/util-0.11.1.tgz" + "version" "0.11.1" + dependencies: + "inherits" "2.0.3" + +"util@0.10.3": + "integrity" "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=" + "resolved" "https://registry.npmjs.org/util/-/util-0.10.3.tgz" + "version" "0.10.3" + dependencies: + "inherits" "2.0.1" + +"utila@~0.4": + "integrity" "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=" + "resolved" "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz" + "version" "0.4.0" + +"utils-merge@1.0.1": + "integrity" "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + "resolved" "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz" + "version" "1.0.1" + +"uuid@^3.3.2", "uuid@^3.4.0": + "integrity" "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + "resolved" "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz" + "version" "3.4.0" + +"v8-compile-cache@^2.0.3": + "integrity" "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==" + "resolved" "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz" + "version" "2.3.0" + +"validate-npm-package-license@^3.0.1": + "integrity" "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==" + "resolved" "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz" + "version" "3.0.4" + dependencies: + "spdx-correct" "^3.0.0" + "spdx-expression-parse" "^3.0.0" + +"vary@~1.1.2": + "integrity" "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + "resolved" "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz" + "version" "1.1.2" + +"verror@1.10.0": + "integrity" "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=" + "resolved" "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz" + "version" "1.10.0" + dependencies: + "assert-plus" "^1.0.0" + "core-util-is" "1.0.2" + "extsprintf" "^1.2.0" + +"vfile-location@^2.0.0": + "integrity" "sha512-sSFdyCP3G6Ka0CEmN83A2YCMKIieHx0EDaj5IDP4g1pa5ZJ4FJDvpO0WODLxo4LUX4oe52gmSCK7Jw4SBghqxA==" + "resolved" "https://registry.npmjs.org/vfile-location/-/vfile-location-2.0.6.tgz" + "version" "2.0.6" + +"vfile-message@^1.0.0": + "integrity" "sha512-1WmsopSGhWt5laNir+633LszXvZ+Z/lxveBf6yhGsqnQIhlhzooZae7zV6YVM1Sdkw68dtAW3ow0pOdPANugvA==" + "resolved" "https://registry.npmjs.org/vfile-message/-/vfile-message-1.1.1.tgz" + "version" "1.1.1" + dependencies: + "unist-util-stringify-position" "^1.1.1" + +"vfile@^2.0.0": + "integrity" "sha512-ASt4mBUHcTpMKD/l5Q+WJXNtshlWxOogYyGYYrg4lt/vuRjC1EFQtlAofL5VmtVNIZJzWYFJjzGWZ0Gw8pzW1w==" + "resolved" "https://registry.npmjs.org/vfile/-/vfile-2.3.0.tgz" + "version" "2.3.0" + dependencies: + "is-buffer" "^1.1.4" + "replace-ext" "1.0.0" + "unist-util-stringify-position" "^1.0.0" + "vfile-message" "^1.0.0" + +"vm-browserify@^1.0.1": + "integrity" "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==" + "resolved" "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz" + "version" "1.1.2" + +"vm2@^3.8.4": + "integrity" "sha512-xwTm7NLh/uOjARRBs8/95H0e8fT3Ukw5D/JJWhxMbhKzNh1Nu981jQKvkep9iKYNxzlVrdzD0mlBGkDKZWprlw==" + "resolved" "https://registry.npmjs.org/vm2/-/vm2-3.9.9.tgz" + "version" "3.9.9" + dependencies: + "acorn" "^8.7.0" + "acorn-walk" "^8.2.0" + +"w3c-hr-time@^1.0.1": + "integrity" "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==" + "resolved" "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz" + "version" "1.0.2" + dependencies: + "browser-process-hrtime" "^1.0.0" + +"w3c-xmlserializer@^1.1.2": + "integrity" "sha512-p10l/ayESzrBMYWRID6xbuCKh2Fp77+sA0doRuGn4tTIMrrZVeqfpKjXHY+oDh3K4nLdPgNwMTVP6Vp4pvqbNg==" + "resolved" "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-1.1.2.tgz" + "version" "1.1.2" + dependencies: + "domexception" "^1.0.1" + "webidl-conversions" "^4.0.2" + "xml-name-validator" "^3.0.0" + +"watchpack-chokidar2@^2.0.1": + "integrity" "sha512-nCFfBIPKr5Sh61s4LPpy1Wtfi0HE8isJ3d2Yb5/Ppw2P2B/3eVSEBjKfN0fmHJSK14+31KwMKmcrzs2GM4P0Ww==" + "resolved" "https://registry.npmjs.org/watchpack-chokidar2/-/watchpack-chokidar2-2.0.1.tgz" + "version" "2.0.1" + dependencies: + "chokidar" "^2.1.8" + +"watchpack@^1.7.4": + "integrity" "sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ==" + "resolved" "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz" + "version" "1.7.5" + dependencies: + "graceful-fs" "^4.1.2" + "neo-async" "^2.5.0" +>>>>>>> d7b4e57 (登录封装) optionalDependencies: chokidar "^3.4.1" watchpack-chokidar2 "^2.0.1"