Compare commits
6 Commits
Author | SHA1 | Date |
---|---|---|
|
66a3d55f14 | |
|
b73d2a1ead | |
|
a8df35e175 | |
|
2c167bf638 | |
|
c44f99684b | |
|
c76d3d3f1f |
|
@ -10,7 +10,6 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "^7.16.0",
|
"@babel/core": "^7.16.0",
|
||||||
"@craco/craco": "^6.4.5",
|
"@craco/craco": "^6.4.5",
|
||||||
"@grpc/grpc-js": "^1.10.10",
|
|
||||||
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
|
||||||
"@svgr/webpack": "^6.5.0",
|
"@svgr/webpack": "^6.5.0",
|
||||||
"@testing-library/jest-dom": "^5.16.5",
|
"@testing-library/jest-dom": "^5.16.5",
|
||||||
|
@ -2404,73 +2403,6 @@
|
||||||
"integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==",
|
"integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==",
|
||||||
"peer": true
|
"peer": true
|
||||||
},
|
},
|
||||||
"node_modules/@grpc/grpc-js": {
|
|
||||||
"version": "1.10.10",
|
|
||||||
"resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.10.10.tgz",
|
|
||||||
"integrity": "sha512-HPa/K5NX6ahMoeBv15njAc/sfF4/jmiXLar9UlC2UfHFKZzsCVLc3wbe7+7qua7w9VPh2/L6EBxyAV7/E8Wftg==",
|
|
||||||
"dependencies": {
|
|
||||||
"@grpc/proto-loader": "^0.7.13",
|
|
||||||
"@js-sdsl/ordered-map": "^4.4.2"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12.10.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@grpc/proto-loader": {
|
|
||||||
"version": "0.7.13",
|
|
||||||
"resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.13.tgz",
|
|
||||||
"integrity": "sha512-AiXO/bfe9bmxBjxxtYxFAXGZvMaN5s8kO+jBHAJCON8rJoB5YS/D6X7ZNc6XQkuHNmyl4CYaMI1fJ/Gn27RGGw==",
|
|
||||||
"dependencies": {
|
|
||||||
"lodash.camelcase": "^4.3.0",
|
|
||||||
"long": "^5.0.0",
|
|
||||||
"protobufjs": "^7.2.5",
|
|
||||||
"yargs": "^17.7.2"
|
|
||||||
},
|
|
||||||
"bin": {
|
|
||||||
"proto-loader-gen-types": "build/bin/proto-loader-gen-types.js"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@grpc/proto-loader/node_modules/cliui": {
|
|
||||||
"version": "8.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
|
|
||||||
"integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
|
|
||||||
"dependencies": {
|
|
||||||
"string-width": "^4.2.0",
|
|
||||||
"strip-ansi": "^6.0.1",
|
|
||||||
"wrap-ansi": "^7.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@grpc/proto-loader/node_modules/yargs": {
|
|
||||||
"version": "17.7.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
|
|
||||||
"integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
|
|
||||||
"dependencies": {
|
|
||||||
"cliui": "^8.0.1",
|
|
||||||
"escalade": "^3.1.1",
|
|
||||||
"get-caller-file": "^2.0.5",
|
|
||||||
"require-directory": "^2.1.1",
|
|
||||||
"string-width": "^4.2.3",
|
|
||||||
"y18n": "^5.0.5",
|
|
||||||
"yargs-parser": "^21.1.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@grpc/proto-loader/node_modules/yargs-parser": {
|
|
||||||
"version": "21.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
|
|
||||||
"integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@hapi/address": {
|
"node_modules/@hapi/address": {
|
||||||
"version": "2.1.4",
|
"version": "2.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz",
|
||||||
|
@ -3272,15 +3204,6 @@
|
||||||
"@jridgewell/sourcemap-codec": "1.4.14"
|
"@jridgewell/sourcemap-codec": "1.4.14"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@js-sdsl/ordered-map": {
|
|
||||||
"version": "4.4.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz",
|
|
||||||
"integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==",
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/js-sdsl"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@leichtgewicht/ip-codec": {
|
"node_modules/@leichtgewicht/ip-codec": {
|
||||||
"version": "2.0.4",
|
"version": "2.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz",
|
||||||
|
@ -3430,60 +3353,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@protobufjs/aspromise": {
|
|
||||||
"version": "1.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
|
|
||||||
"integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ=="
|
|
||||||
},
|
|
||||||
"node_modules/@protobufjs/base64": {
|
|
||||||
"version": "1.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz",
|
|
||||||
"integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg=="
|
|
||||||
},
|
|
||||||
"node_modules/@protobufjs/codegen": {
|
|
||||||
"version": "2.0.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz",
|
|
||||||
"integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg=="
|
|
||||||
},
|
|
||||||
"node_modules/@protobufjs/eventemitter": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz",
|
|
||||||
"integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q=="
|
|
||||||
},
|
|
||||||
"node_modules/@protobufjs/fetch": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz",
|
|
||||||
"integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==",
|
|
||||||
"dependencies": {
|
|
||||||
"@protobufjs/aspromise": "^1.1.1",
|
|
||||||
"@protobufjs/inquire": "^1.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@protobufjs/float": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz",
|
|
||||||
"integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ=="
|
|
||||||
},
|
|
||||||
"node_modules/@protobufjs/inquire": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz",
|
|
||||||
"integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q=="
|
|
||||||
},
|
|
||||||
"node_modules/@protobufjs/path": {
|
|
||||||
"version": "1.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz",
|
|
||||||
"integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA=="
|
|
||||||
},
|
|
||||||
"node_modules/@protobufjs/pool": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz",
|
|
||||||
"integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw=="
|
|
||||||
},
|
|
||||||
"node_modules/@protobufjs/utf8": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz",
|
|
||||||
"integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw=="
|
|
||||||
},
|
|
||||||
"node_modules/@remix-run/router": {
|
"node_modules/@remix-run/router": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.0.2.tgz",
|
||||||
|
@ -14808,11 +14677,6 @@
|
||||||
"integrity": "sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA==",
|
"integrity": "sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA==",
|
||||||
"peer": true
|
"peer": true
|
||||||
},
|
},
|
||||||
"node_modules/lodash.camelcase": {
|
|
||||||
"version": "4.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz",
|
|
||||||
"integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA=="
|
|
||||||
},
|
|
||||||
"node_modules/lodash.debounce": {
|
"node_modules/lodash.debounce": {
|
||||||
"version": "4.0.8",
|
"version": "4.0.8",
|
||||||
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
|
||||||
|
@ -14876,11 +14740,6 @@
|
||||||
"url": "https://tidelift.com/funding/github/npm/loglevel"
|
"url": "https://tidelift.com/funding/github/npm/loglevel"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/long": {
|
|
||||||
"version": "5.2.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz",
|
|
||||||
"integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q=="
|
|
||||||
},
|
|
||||||
"node_modules/loose-envify": {
|
"node_modules/loose-envify": {
|
||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
|
||||||
|
@ -18120,29 +17979,6 @@
|
||||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
|
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
|
||||||
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
|
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
|
||||||
},
|
},
|
||||||
"node_modules/protobufjs": {
|
|
||||||
"version": "7.3.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.3.2.tgz",
|
|
||||||
"integrity": "sha512-RXyHaACeqXeqAKGLDl68rQKbmObRsTIn4TYVUUug1KfS47YWCo5MacGITEryugIgZqORCvJWEk4l449POg5Txg==",
|
|
||||||
"hasInstallScript": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@protobufjs/aspromise": "^1.1.2",
|
|
||||||
"@protobufjs/base64": "^1.1.2",
|
|
||||||
"@protobufjs/codegen": "^2.0.4",
|
|
||||||
"@protobufjs/eventemitter": "^1.1.0",
|
|
||||||
"@protobufjs/fetch": "^1.1.0",
|
|
||||||
"@protobufjs/float": "^1.0.2",
|
|
||||||
"@protobufjs/inquire": "^1.1.0",
|
|
||||||
"@protobufjs/path": "^1.1.2",
|
|
||||||
"@protobufjs/pool": "^1.1.0",
|
|
||||||
"@protobufjs/utf8": "^1.1.0",
|
|
||||||
"@types/node": ">=13.7.0",
|
|
||||||
"long": "^5.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/proxy-addr": {
|
"node_modules/proxy-addr": {
|
||||||
"version": "2.0.7",
|
"version": "2.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
|
||||||
|
@ -33513,57 +33349,6 @@
|
||||||
"integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==",
|
"integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==",
|
||||||
"peer": true
|
"peer": true
|
||||||
},
|
},
|
||||||
"@grpc/grpc-js": {
|
|
||||||
"version": "1.10.10",
|
|
||||||
"resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.10.10.tgz",
|
|
||||||
"integrity": "sha512-HPa/K5NX6ahMoeBv15njAc/sfF4/jmiXLar9UlC2UfHFKZzsCVLc3wbe7+7qua7w9VPh2/L6EBxyAV7/E8Wftg==",
|
|
||||||
"requires": {
|
|
||||||
"@grpc/proto-loader": "^0.7.13",
|
|
||||||
"@js-sdsl/ordered-map": "^4.4.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@grpc/proto-loader": {
|
|
||||||
"version": "0.7.13",
|
|
||||||
"resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.13.tgz",
|
|
||||||
"integrity": "sha512-AiXO/bfe9bmxBjxxtYxFAXGZvMaN5s8kO+jBHAJCON8rJoB5YS/D6X7ZNc6XQkuHNmyl4CYaMI1fJ/Gn27RGGw==",
|
|
||||||
"requires": {
|
|
||||||
"lodash.camelcase": "^4.3.0",
|
|
||||||
"long": "^5.0.0",
|
|
||||||
"protobufjs": "^7.2.5",
|
|
||||||
"yargs": "^17.7.2"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"cliui": {
|
|
||||||
"version": "8.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
|
|
||||||
"integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
|
|
||||||
"requires": {
|
|
||||||
"string-width": "^4.2.0",
|
|
||||||
"strip-ansi": "^6.0.1",
|
|
||||||
"wrap-ansi": "^7.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"yargs": {
|
|
||||||
"version": "17.7.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
|
|
||||||
"integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
|
|
||||||
"requires": {
|
|
||||||
"cliui": "^8.0.1",
|
|
||||||
"escalade": "^3.1.1",
|
|
||||||
"get-caller-file": "^2.0.5",
|
|
||||||
"require-directory": "^2.1.1",
|
|
||||||
"string-width": "^4.2.3",
|
|
||||||
"y18n": "^5.0.5",
|
|
||||||
"yargs-parser": "^21.1.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"yargs-parser": {
|
|
||||||
"version": "21.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
|
|
||||||
"integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw=="
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@hapi/address": {
|
"@hapi/address": {
|
||||||
"version": "2.1.4",
|
"version": "2.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz",
|
||||||
|
@ -34164,11 +33949,6 @@
|
||||||
"@jridgewell/sourcemap-codec": "1.4.14"
|
"@jridgewell/sourcemap-codec": "1.4.14"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@js-sdsl/ordered-map": {
|
|
||||||
"version": "4.4.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz",
|
|
||||||
"integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw=="
|
|
||||||
},
|
|
||||||
"@leichtgewicht/ip-codec": {
|
"@leichtgewicht/ip-codec": {
|
||||||
"version": "2.0.4",
|
"version": "2.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz",
|
||||||
|
@ -34265,60 +34045,6 @@
|
||||||
"source-map": "^0.7.3"
|
"source-map": "^0.7.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@protobufjs/aspromise": {
|
|
||||||
"version": "1.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
|
|
||||||
"integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ=="
|
|
||||||
},
|
|
||||||
"@protobufjs/base64": {
|
|
||||||
"version": "1.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz",
|
|
||||||
"integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg=="
|
|
||||||
},
|
|
||||||
"@protobufjs/codegen": {
|
|
||||||
"version": "2.0.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz",
|
|
||||||
"integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg=="
|
|
||||||
},
|
|
||||||
"@protobufjs/eventemitter": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz",
|
|
||||||
"integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q=="
|
|
||||||
},
|
|
||||||
"@protobufjs/fetch": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz",
|
|
||||||
"integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==",
|
|
||||||
"requires": {
|
|
||||||
"@protobufjs/aspromise": "^1.1.1",
|
|
||||||
"@protobufjs/inquire": "^1.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@protobufjs/float": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz",
|
|
||||||
"integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ=="
|
|
||||||
},
|
|
||||||
"@protobufjs/inquire": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz",
|
|
||||||
"integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q=="
|
|
||||||
},
|
|
||||||
"@protobufjs/path": {
|
|
||||||
"version": "1.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz",
|
|
||||||
"integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA=="
|
|
||||||
},
|
|
||||||
"@protobufjs/pool": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz",
|
|
||||||
"integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw=="
|
|
||||||
},
|
|
||||||
"@protobufjs/utf8": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz",
|
|
||||||
"integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw=="
|
|
||||||
},
|
|
||||||
"@remix-run/router": {
|
"@remix-run/router": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.0.2.tgz",
|
||||||
|
@ -42968,11 +42694,6 @@
|
||||||
"integrity": "sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA==",
|
"integrity": "sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA==",
|
||||||
"peer": true
|
"peer": true
|
||||||
},
|
},
|
||||||
"lodash.camelcase": {
|
|
||||||
"version": "4.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz",
|
|
||||||
"integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA=="
|
|
||||||
},
|
|
||||||
"lodash.debounce": {
|
"lodash.debounce": {
|
||||||
"version": "4.0.8",
|
"version": "4.0.8",
|
||||||
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
|
||||||
|
@ -43029,11 +42750,6 @@
|
||||||
"integrity": "sha512-G6A/nJLRgWOuuwdNuA6koovfEV1YpqqAG4pRUlFaz3jj2QNZ8M4vBqnVA+HBTmU/AMNUtlOsMmSpF6NyOjztbA==",
|
"integrity": "sha512-G6A/nJLRgWOuuwdNuA6koovfEV1YpqqAG4pRUlFaz3jj2QNZ8M4vBqnVA+HBTmU/AMNUtlOsMmSpF6NyOjztbA==",
|
||||||
"peer": true
|
"peer": true
|
||||||
},
|
},
|
||||||
"long": {
|
|
||||||
"version": "5.2.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz",
|
|
||||||
"integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q=="
|
|
||||||
},
|
|
||||||
"loose-envify": {
|
"loose-envify": {
|
||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
|
||||||
|
@ -45293,25 +45009,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"protobufjs": {
|
|
||||||
"version": "7.3.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.3.2.tgz",
|
|
||||||
"integrity": "sha512-RXyHaACeqXeqAKGLDl68rQKbmObRsTIn4TYVUUug1KfS47YWCo5MacGITEryugIgZqORCvJWEk4l449POg5Txg==",
|
|
||||||
"requires": {
|
|
||||||
"@protobufjs/aspromise": "^1.1.2",
|
|
||||||
"@protobufjs/base64": "^1.1.2",
|
|
||||||
"@protobufjs/codegen": "^2.0.4",
|
|
||||||
"@protobufjs/eventemitter": "^1.1.0",
|
|
||||||
"@protobufjs/fetch": "^1.1.0",
|
|
||||||
"@protobufjs/float": "^1.0.2",
|
|
||||||
"@protobufjs/inquire": "^1.1.0",
|
|
||||||
"@protobufjs/path": "^1.1.2",
|
|
||||||
"@protobufjs/pool": "^1.1.0",
|
|
||||||
"@protobufjs/utf8": "^1.1.0",
|
|
||||||
"@types/node": ">=13.7.0",
|
|
||||||
"long": "^5.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"proxy-addr": {
|
"proxy-addr": {
|
||||||
"version": "2.0.7",
|
"version": "2.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "^7.16.0",
|
"@babel/core": "^7.16.0",
|
||||||
"@craco/craco": "^6.4.5",
|
"@craco/craco": "^6.4.5",
|
||||||
"@grpc/grpc-js": "^1.10.10",
|
|
||||||
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
|
||||||
"@svgr/webpack": "^6.5.0",
|
"@svgr/webpack": "^6.5.0",
|
||||||
"@testing-library/jest-dom": "^5.16.5",
|
"@testing-library/jest-dom": "^5.16.5",
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { PlusOutlined } from "@ant-design/icons";
|
||||||
import Upload, { RcFile, UploadFile, UploadProps } from "antd/lib/upload";
|
import Upload, { RcFile, UploadFile, UploadProps } from "antd/lib/upload";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import baseHttp from "@/service/base";
|
import baseHttp from "@/service/base";
|
||||||
import SystemConfig from "@/service/apiConfig/systemConfig";
|
import SystemConfig from "@/service/apiConfig/system_config";
|
||||||
|
|
||||||
interface UploadFileProps {
|
interface UploadFileProps {
|
||||||
imgList: Array<UploadFileEx>;
|
imgList: Array<UploadFileEx>;
|
|
@ -1,4 +1,4 @@
|
||||||
import { PaginationProps, Table } from "antd";
|
import { Pagination, PaginationProps, Table } from "antd";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
const BTable = (props: any) => {
|
const BTable = (props: any) => {
|
||||||
const { store, dataSource } = props;
|
const { store, dataSource } = props;
|
||||||
|
@ -24,20 +24,27 @@ const BTable = (props: any) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
<Table
|
<Table
|
||||||
pagination={{
|
style={{height:"100%",overflow:"auto"}}
|
||||||
size: "small",
|
pagination={false}
|
||||||
total: store.total,
|
loading={store.listStatus}
|
||||||
defaultCurrent: 1,
|
|
||||||
pageSize: 20,
|
|
||||||
showSizeChanger: true,
|
|
||||||
onShowSizeChange: onShowSizeChange,
|
|
||||||
onChange: onChange,
|
|
||||||
}}
|
|
||||||
rowSelection={rowSelection}
|
rowSelection={rowSelection}
|
||||||
columns={props.columns}
|
columns={props.columns}
|
||||||
dataSource={dataSource}
|
dataSource={dataSource}
|
||||||
/>
|
/>
|
||||||
|
<div style={{textAlign:"right",padding:"10px"}}>
|
||||||
|
<Pagination
|
||||||
|
size="small"
|
||||||
|
defaultCurrent={1}
|
||||||
|
pageSize={20}
|
||||||
|
showSizeChanger={true}
|
||||||
|
total={store.total}
|
||||||
|
onShowSizeChange= {onShowSizeChange}
|
||||||
|
onChange={onChange}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -34,7 +34,7 @@ const Dilog = (props: DilogModel) => {
|
||||||
document.documentElement.removeEventListener("click", onClick);
|
document.documentElement.removeEventListener("click", onClick);
|
||||||
document.documentElement.removeEventListener("keydown", handleKeyword);
|
document.documentElement.removeEventListener("keydown", handleKeyword);
|
||||||
};
|
};
|
||||||
}, [props, props.show]);
|
}, [props.show]);
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
showState(false);
|
showState(false);
|
||||||
props.close();
|
props.close();
|
||||||
|
|
|
@ -24,7 +24,7 @@ const EditorComponent = (props:EditorPropsData) => {
|
||||||
return (
|
return (
|
||||||
<Editor
|
<Editor
|
||||||
initialValue={value}
|
initialValue={value}
|
||||||
apiKey="q8rtoa7ai0fkub3hx1a6qtvq8qmned4vgueyt6699gczi2g8"
|
apiKey="hq72bjfug6s56a5qxa2oxpbqsxc58nv4v7nfruyd5ndpgu72"
|
||||||
init={{
|
init={{
|
||||||
menubar: false,
|
menubar: false,
|
||||||
statusbar: false, // 隐藏底部状态栏
|
statusbar: false, // 隐藏底部状态栏
|
||||||
|
|
|
@ -1,29 +1,28 @@
|
||||||
import { Form, Select } from "antd";
|
import { Form, Select } from "antd";
|
||||||
import { FormDatas } from "./interface";
|
import { FormDatas } from "./interface";
|
||||||
import { useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
import baseHttp from "@/service/base";
|
||||||
|
const { Option } = Select;
|
||||||
export const FormSelect = (v: FormDatas) => {
|
export const FormSelect = (v: FormDatas) => {
|
||||||
const [list] = useState([
|
const [list, setList] = useState([]);
|
||||||
{
|
useEffect(() => {
|
||||||
value: "1",
|
baseHttp
|
||||||
label: "卡片一",
|
.get(`${v.selectUrl}/?pageSize=100&pageNum=1` ?? "", "")
|
||||||
},
|
.then((res) => {
|
||||||
{
|
setList(res.data.list ?? []);
|
||||||
value: "2",
|
});
|
||||||
label: "卡片二",
|
}, [v.selectUrl]);
|
||||||
},
|
|
||||||
{
|
|
||||||
value: "3",
|
|
||||||
label: "卡片三",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: "4",
|
|
||||||
label: "卡片四",
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Form.Item key={v.label} label={v.label} name={v.name} rules={v.rules}>
|
<Form.Item key={v.label} label={v.label} name={v.name} rules={v.rules}>
|
||||||
<Select placeholder="" options={list} value={v.value} />
|
<Select placeholder="">
|
||||||
|
{list?.map((v: any) => {
|
||||||
|
return (
|
||||||
|
<Option key={v.id} value={v.id}>
|
||||||
|
{v.productTypeName}
|
||||||
|
</Option>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</Select>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { Checkbox, DatePicker, Form, Input, Radio, Switch } from "antd";
|
import { Checkbox, DatePicker, Form, Input, Radio } from "antd";
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import { SimpleFormData } from "./interface";
|
import { SimpleFormData } from "./interface";
|
||||||
import { FormSelect } from "./select";
|
import { FormSelect } from "./select";
|
||||||
import AliUpload from "../aliUpload";
|
import AliUpload from "../ali_upload";
|
||||||
const { TextArea } = Input;
|
const { TextArea } = Input;
|
||||||
const SimpleForm = (props: SimpleFormData) => {
|
const SimpleForm = (props: SimpleFormData) => {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
|
@ -20,9 +20,10 @@ const SimpleForm = (props: SimpleFormData) => {
|
||||||
name={props.formName}
|
name={props.formName}
|
||||||
ref={props.formRef}
|
ref={props.formRef}
|
||||||
form={form}
|
form={form}
|
||||||
|
labelCol={{ span: 4 }}
|
||||||
|
wrapperCol={{ span: 8 }}
|
||||||
|
layout="horizontal"
|
||||||
initialValues={{ menubar: true }}
|
initialValues={{ menubar: true }}
|
||||||
labelCol={{ span: props.colProps }}
|
|
||||||
wrapperCol={{ span: 16 }}
|
|
||||||
onFinish={onFinish}
|
onFinish={onFinish}
|
||||||
autoComplete="on"
|
autoComplete="on"
|
||||||
>
|
>
|
||||||
|
@ -35,6 +36,7 @@ const SimpleForm = (props: SimpleFormData) => {
|
||||||
label={v.label}
|
label={v.label}
|
||||||
name={v.name}
|
name={v.name}
|
||||||
rules={v.rules}
|
rules={v.rules}
|
||||||
|
|
||||||
>
|
>
|
||||||
<Input defaultValue={v.value} value={v.value} />
|
<Input defaultValue={v.value} value={v.value} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
@ -116,17 +118,6 @@ const SimpleForm = (props: SimpleFormData) => {
|
||||||
</Radio.Group>
|
</Radio.Group>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
);
|
);
|
||||||
case "switch":
|
|
||||||
return (
|
|
||||||
<Form.Item
|
|
||||||
key={v.label}
|
|
||||||
label={v.label}
|
|
||||||
name={v.name}
|
|
||||||
rules={v.rules}
|
|
||||||
>
|
|
||||||
<Switch/>
|
|
||||||
</Form.Item>
|
|
||||||
);
|
|
||||||
case "Date":
|
case "Date":
|
||||||
return (
|
return (
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
@ -138,7 +129,6 @@ const SimpleForm = (props: SimpleFormData) => {
|
||||||
<DatePicker />
|
<DatePicker />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
);
|
);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return (
|
return (
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
|
|
@ -8,7 +8,7 @@ const appMenu = {
|
||||||
label: "app管理",
|
label: "app管理",
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
key: "/app-list",
|
key: "/app/list",
|
||||||
icon: <VideoCameraOutlined />,
|
icon: <VideoCameraOutlined />,
|
||||||
label: "app列表",
|
label: "app列表",
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
import {
|
||||||
|
UploadOutlined,
|
||||||
|
UserOutlined,
|
||||||
|
VideoCameraOutlined,
|
||||||
|
} from "@ant-design/icons";
|
||||||
|
const demand = {
|
||||||
|
key: "/demand",
|
||||||
|
icon: <UserOutlined />,
|
||||||
|
label: "需求池",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
key: "/shop1",
|
||||||
|
icon: <VideoCameraOutlined />,
|
||||||
|
label: "go to home",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "/shop2",
|
||||||
|
icon: <UploadOutlined />,
|
||||||
|
label: "go test",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
export default demand;
|
|
@ -1,15 +1,32 @@
|
||||||
import { ItemType } from "antd/lib/menu/hooks/useItems";
|
import { ItemType } from "antd/lib/menu/hooks/useItems";
|
||||||
import { UserOutlined } from "@ant-design/icons";
|
import { UserOutlined } from "@ant-design/icons";
|
||||||
|
import userMenu from "./user";
|
||||||
import activeMenu from "./active";
|
import activeMenu from "./active";
|
||||||
import cardMenu from "./card";
|
import taskMenu from "./task";
|
||||||
|
import contentMenu from "./content_menu";
|
||||||
|
import system from "./system";
|
||||||
|
import merchant from "./merchant";
|
||||||
|
import dynimacStateMenu from "./dynimac_state";
|
||||||
|
import rbac from "./rbac";
|
||||||
|
import app from "./app";
|
||||||
|
import demand from "./demand";
|
||||||
|
// demand
|
||||||
const menuList: ItemType[] = [
|
const menuList: ItemType[] = [
|
||||||
{
|
{
|
||||||
key: "/",
|
key: "/",
|
||||||
icon: <UserOutlined />,
|
icon: <UserOutlined />,
|
||||||
label: "首页",
|
label: "首页",
|
||||||
},
|
},
|
||||||
cardMenu,
|
userMenu,
|
||||||
|
demand,
|
||||||
|
contentMenu,
|
||||||
|
dynimacStateMenu,
|
||||||
activeMenu,
|
activeMenu,
|
||||||
|
merchant,
|
||||||
|
system,
|
||||||
|
rbac,
|
||||||
|
taskMenu,
|
||||||
|
app,
|
||||||
];
|
];
|
||||||
|
|
||||||
export default menuList;
|
export default menuList;
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
import { useEffect, useRef } from "react"
|
|
||||||
|
|
||||||
// 判断组件挂载状态
|
|
||||||
export const useMountedStatus = () => {
|
|
||||||
const status = useRef(false)
|
|
||||||
useEffect(() => {
|
|
||||||
status.current = true;
|
|
||||||
return ()=>{
|
|
||||||
status.current = false;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
|
@ -10,7 +10,14 @@ body {
|
||||||
#root{
|
#root{
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
.projectContent {
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 10px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
code {
|
code {
|
||||||
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
||||||
monospace;
|
monospace;
|
||||||
|
|
|
@ -20,4 +20,5 @@ export interface UserDataType {
|
||||||
startTime: any;
|
startTime: any;
|
||||||
endTime: any;
|
endTime: any;
|
||||||
status: any;
|
status: any;
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
import { Button, Space, Modal, Switch } from "antd";
|
import { Button, Space, Modal, Switch, Tooltip } from "antd";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import type { ColumnsType } from "antd/es/table";
|
import type { ColumnsType } from "antd/es/table";
|
||||||
import BTable from "@/components/BTable";
|
import BTable from "@/components/b_table";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { UserDataType } from "@/model/userModel";
|
import { UserDataType } from "@/model/userModel";
|
||||||
import { Store } from "antd/lib/form/interface";
|
import { Store } from "antd/lib/form/interface";
|
||||||
|
@ -11,7 +11,7 @@ import React from "react";
|
||||||
import ActiveConfig from "@/service/apiConfig/active";
|
import ActiveConfig from "@/service/apiConfig/active";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
const Active = (props: Store) => {
|
const Active = (props: Store) => {
|
||||||
const { activeStore } = props;
|
const { activityStore } = props;
|
||||||
const [projectConfig, setProjectConfig] = useState<any>([]);
|
const [projectConfig, setProjectConfig] = useState<any>([]);
|
||||||
const [id, setId] = useState<any>(null);
|
const [id, setId] = useState<any>(null);
|
||||||
const [record, setRecord] = useState<any>(null);
|
const [record, setRecord] = useState<any>(null);
|
||||||
|
@ -20,35 +20,67 @@ const Active = (props: Store) => {
|
||||||
const columns: ColumnsType<UserDataType> = [
|
const columns: ColumnsType<UserDataType> = [
|
||||||
{
|
{
|
||||||
title: "活动标题",
|
title: "活动标题",
|
||||||
dataIndex: "activeName",
|
dataIndex: "title",
|
||||||
|
width: 200,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "活动描述",
|
||||||
|
dataIndex: "desc",
|
||||||
|
width: 200,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "活动图片",
|
||||||
|
dataIndex: "activeIcon",
|
||||||
|
width: 200,
|
||||||
|
ellipsis: {
|
||||||
|
showTitle: false,
|
||||||
|
},
|
||||||
|
render: (address) => (
|
||||||
|
<Tooltip placement="topLeft" title={address}>
|
||||||
|
{address}
|
||||||
|
</Tooltip>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "活动人数",
|
||||||
|
dataIndex: "peopleNum",
|
||||||
|
width: 200,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "活动地址",
|
||||||
|
dataIndex: "address",
|
||||||
|
width: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "折扣",
|
title: "折扣",
|
||||||
dataIndex: "discount",
|
dataIndex: "discount",
|
||||||
|
width: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "活动开始时间",
|
title: "活动开始时间",
|
||||||
dataIndex: "startTime",
|
dataIndex: "startTime",
|
||||||
|
width: 200,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: "活动结束时间",
|
title: "活动结束时间",
|
||||||
dataIndex: "endTime",
|
dataIndex: "endTime",
|
||||||
|
width: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "活动状态",
|
title: "活动状态",
|
||||||
render: (any, record) => (
|
width: 200,
|
||||||
<div>
|
render: (any, record) => <span>{record.status ? "开启" : "关闭"}</span>,
|
||||||
<span>{record.status ? "开启" : "关闭"}</span>
|
},
|
||||||
</div>
|
{
|
||||||
),
|
width: 200,
|
||||||
|
title: "发起人",
|
||||||
|
dataIndex: "userId",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
|
width: 200,
|
||||||
|
fixed: "right",
|
||||||
dataIndex: "id",
|
dataIndex: "id",
|
||||||
ellipsis: {
|
|
||||||
showTitle: false,
|
|
||||||
},
|
|
||||||
render: (any, record) => (
|
render: (any, record) => (
|
||||||
<div>
|
<div>
|
||||||
<Space direction="vertical">
|
<Space direction="vertical">
|
||||||
|
@ -64,7 +96,7 @@ const Active = (props: Store) => {
|
||||||
danger
|
danger
|
||||||
size="small"
|
size="small"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
activeStore.deleteItem(record.id);
|
activityStore.deleteItem(record.id);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
|
@ -94,7 +126,7 @@ const Active = (props: Store) => {
|
||||||
setId(record.id);
|
setId(record.id);
|
||||||
};
|
};
|
||||||
const onChange = (bools, record) => {
|
const onChange = (bools, record) => {
|
||||||
activeStore.putItem(record.id, {
|
activityStore.putItem(record.id, {
|
||||||
status: bools,
|
status: bools,
|
||||||
activeName: record.activeName,
|
activeName: record.activeName,
|
||||||
discount: record.discount,
|
discount: record.discount,
|
||||||
|
@ -129,24 +161,18 @@ const Active = (props: Store) => {
|
||||||
name: "endTime",
|
name: "endTime",
|
||||||
value: "",
|
value: "",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
type: "switch",
|
|
||||||
label: "是否开启",
|
|
||||||
name: "status",
|
|
||||||
value: false,
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
activeStore.getlist(ActiveConfig.LIST);
|
activityStore.getlist(ActiveConfig.LIST);
|
||||||
}, [activeStore]);
|
}, [activityStore]);
|
||||||
const onFinish = (values: any) => {
|
const onFinish = (values: any) => {
|
||||||
values["startTime"] = values["startTime"].format("YYYY.MM.DD");
|
values["startTime"] = values["startTime"].format("YYYY.MM.DD");
|
||||||
values["endTime"] = values["endTime"].format("YYYY.MM.DD");
|
values["endTime"] = values["endTime"].format("YYYY.MM.DD");
|
||||||
if (!id) {
|
if (!id) {
|
||||||
activeStore.add(values);
|
activityStore.add(values);
|
||||||
} else {
|
} else {
|
||||||
activeStore.putItem(id, values);
|
activityStore.putItem(id, values);
|
||||||
}
|
}
|
||||||
setIsModalOpen(false);
|
setIsModalOpen(false);
|
||||||
};
|
};
|
||||||
|
@ -154,14 +180,17 @@ const Active = (props: Store) => {
|
||||||
const addAction = () => {
|
const addAction = () => {
|
||||||
setProjectConfig(defaultConfig);
|
setProjectConfig(defaultConfig);
|
||||||
setId(null);
|
setId(null);
|
||||||
setRecord(null)
|
setRecord(null);
|
||||||
setIsModalOpen(true);
|
setIsModalOpen(true);
|
||||||
formRef.current?.setFieldsValue(record);
|
formRef.current?.setFieldsValue(record);
|
||||||
|
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<div className="projectContent">
|
<div style={{ padding: "10px" }}>
|
||||||
<Button className="projectContentAdd" onClick={() => addAction()}>
|
<Button
|
||||||
|
style={{ marginBottom: "10px" }}
|
||||||
|
className="projectContentAdd"
|
||||||
|
onClick={() => addAction()}
|
||||||
|
>
|
||||||
添加活动
|
添加活动
|
||||||
</Button>
|
</Button>
|
||||||
<Modal
|
<Modal
|
||||||
|
@ -188,13 +217,13 @@ const Active = (props: Store) => {
|
||||||
</Modal>
|
</Modal>
|
||||||
<Space direction="vertical" size="middle" style={{ display: "flex" }}>
|
<Space direction="vertical" size="middle" style={{ display: "flex" }}>
|
||||||
<BTable
|
<BTable
|
||||||
store={activeStore}
|
store={activityStore}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
dataSource={activeStore.list}
|
dataSource={activityStore.list}
|
||||||
/>
|
/>
|
||||||
</Space>
|
</Space>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default inject("activeStore")(observer(Active));
|
export default inject("activityStore")(observer(Active));
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { Button, Space, Modal, FormInstance } from "antd";
|
import { Button, Space, Modal, FormInstance } from "antd";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import type { ColumnsType } from "antd/es/table";
|
import type { ColumnsType } from "antd/es/table";
|
||||||
import BTable from "@/components/BTable";
|
import BTable from "@/components/b_table";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import UserConfig from "@/service/apiConfig/userConfig";
|
import UserConfig from "@/service/apiConfig/user_config";
|
||||||
import { UserDataType } from "@/model/userModel";
|
import { UserDataType } from "@/model/userModel";
|
||||||
import { Store } from "antd/lib/form/interface";
|
import { Store } from "antd/lib/form/interface";
|
||||||
import SimpleForm from "@/components/form/simple_form";
|
import SimpleForm from "@/components/form/simple_form";
|
||||||
|
@ -17,15 +17,8 @@ const ActiveType = (props: Store) => {
|
||||||
const [record, setRecord] = useState<any>(null);
|
const [record, setRecord] = useState<any>(null);
|
||||||
const [userId, setId] = useState<Number | null>(null);
|
const [userId, setId] = useState<Number | null>(null);
|
||||||
const columns: ColumnsType<UserDataType> = [
|
const columns: ColumnsType<UserDataType> = [
|
||||||
{
|
{ title: "类型名称", dataIndex: "name" },
|
||||||
title: "类型名称",
|
{ title: "类型描述", dataIndex: "desc" },
|
||||||
dataIndex: "name",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "类型描述",
|
|
||||||
dataIndex: "desc",
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
dataIndex: "id",
|
dataIndex: "id",
|
||||||
|
@ -36,6 +29,16 @@ const ActiveType = (props: Store) => {
|
||||||
<div>
|
<div>
|
||||||
<Space direction="vertical">
|
<Space direction="vertical">
|
||||||
<Space wrap>
|
<Space wrap>
|
||||||
|
<EditBtn />
|
||||||
|
<DeBtn />
|
||||||
|
</Space>
|
||||||
|
</Space>
|
||||||
|
</div>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
];
|
||||||
|
const EditBtn = () => {
|
||||||
|
return (
|
||||||
<Button
|
<Button
|
||||||
type="dashed"
|
type="dashed"
|
||||||
size="small"
|
size="small"
|
||||||
|
@ -45,7 +48,10 @@ const ActiveType = (props: Store) => {
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</Button>
|
</Button>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
const DeBtn = () => {
|
||||||
|
return (
|
||||||
<Button
|
<Button
|
||||||
type="dashed"
|
type="dashed"
|
||||||
danger
|
danger
|
||||||
|
@ -56,12 +62,8 @@ const ActiveType = (props: Store) => {
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
</Button>
|
</Button>
|
||||||
</Space>
|
);
|
||||||
</Space>
|
};
|
||||||
</div>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
];
|
|
||||||
const edit = (record) => {
|
const edit = (record) => {
|
||||||
record = {
|
record = {
|
||||||
...record,
|
...record,
|
||||||
|
@ -84,6 +86,7 @@ const ActiveType = (props: Store) => {
|
||||||
}
|
}
|
||||||
setIsModalOpen(false);
|
setIsModalOpen(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
activityTypeStore.getlist(UserConfig.LIST);
|
activityTypeStore.getlist(UserConfig.LIST);
|
||||||
}, [activityTypeStore]);
|
}, [activityTypeStore]);
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
import { Space, Tabs, TabsProps } from "antd";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { Store } from "antd/lib/form/interface";
|
||||||
|
import PayConfig from "./config/pay-config";
|
||||||
|
import PushConfig from "./config/push-config";
|
||||||
|
import ImConfig from "./config/im-config";
|
||||||
|
import { useEffect } from "react";
|
||||||
|
import { useParams } from "react-router";
|
||||||
|
const AppManageConfig = (props: Store) => {
|
||||||
|
const { appStore } = props
|
||||||
|
const { id } = useParams();
|
||||||
|
useEffect(()=>{
|
||||||
|
appStore.getApp(id)
|
||||||
|
},[appStore,id])
|
||||||
|
const items: TabsProps["items"] = [
|
||||||
|
{
|
||||||
|
key: "1",
|
||||||
|
label: "支付配置",
|
||||||
|
children: <PayConfig />,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "2",
|
||||||
|
label: "推送配置",
|
||||||
|
children: <PushConfig />,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "3",
|
||||||
|
label: "im配置",
|
||||||
|
children: <ImConfig />,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
const onChange = ()=>{
|
||||||
|
appStore.getApp(id)
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<div className="contentBox">
|
||||||
|
<Space direction="vertical" size="middle" style={{ display: "flex" }}>
|
||||||
|
<Tabs defaultActiveKey="1" type="card" items={items} onChange={onChange}/>
|
||||||
|
</Space>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default inject("appStore")(observer(AppManageConfig));
|
|
@ -0,0 +1,162 @@
|
||||||
|
import { Space, Button, FormInstance } from "antd";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import type { ColumnsType } from "antd/es/table";
|
||||||
|
import BTable from "@/components/b_table";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import UserConfig from "@/service/apiConfig/user_config";
|
||||||
|
import { UserDataType } from "@/model/userModel";
|
||||||
|
import { Store } from "antd/lib/form/interface";
|
||||||
|
import Modal from "antd/lib/modal/Modal";
|
||||||
|
import SimpleForm from "@/components/form/simple_form";
|
||||||
|
import React from "react";
|
||||||
|
import { useNavigate } from "react-router";
|
||||||
|
const AppManageList = (props: Store) => {
|
||||||
|
const { appStore } = props;
|
||||||
|
const navigate = useNavigate();
|
||||||
|
const [id, setId] = useState<any>(null);
|
||||||
|
const [projectConfig, setProjectConfig] = useState<any>([]);
|
||||||
|
const [record, setRecord] = useState<any>(null);
|
||||||
|
const formRef = React.useRef<FormInstance>(null);
|
||||||
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
||||||
|
const columns: ColumnsType<UserDataType> = [
|
||||||
|
{ title: "app名称", dataIndex: "appName" },
|
||||||
|
{ title: "图标", dataIndex: "appIcon" },
|
||||||
|
{ title: "预览图片", dataIndex: "activeIcon" },
|
||||||
|
{
|
||||||
|
title: "操作",
|
||||||
|
dataIndex: "id",
|
||||||
|
ellipsis: {
|
||||||
|
showTitle: false,
|
||||||
|
},
|
||||||
|
render: (any, record) => (
|
||||||
|
<div>
|
||||||
|
<Space direction="vertical">
|
||||||
|
<Space wrap>
|
||||||
|
<Button
|
||||||
|
type="dashed"
|
||||||
|
size="small"
|
||||||
|
onClick={() => {
|
||||||
|
edit(record);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
type="dashed"
|
||||||
|
size="small"
|
||||||
|
onClick={() => {
|
||||||
|
navigate("/app/config/" + record.id);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
信息配置
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
type="dashed"
|
||||||
|
danger
|
||||||
|
size="small"
|
||||||
|
onClick={() => {
|
||||||
|
appStore.deleteItem(record.id);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
</Space>
|
||||||
|
</div>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
];
|
||||||
|
const edit = (record) => {
|
||||||
|
setProjectConfig(defaultConfig);
|
||||||
|
setIsModalOpen(true);
|
||||||
|
formRef.current?.setFieldsValue(record);
|
||||||
|
setRecord(record);
|
||||||
|
setId(record.id);
|
||||||
|
};
|
||||||
|
const defaultConfig = [
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "app名称",
|
||||||
|
name: "appName",
|
||||||
|
value: "",
|
||||||
|
rules: [{ required: true, message: "请输入卡片名称!" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "upload",
|
||||||
|
label: "icon",
|
||||||
|
name: "appIcon",
|
||||||
|
value: [],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "upload",
|
||||||
|
label: "图片",
|
||||||
|
name: "photosIds",
|
||||||
|
value: [],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
useEffect(() => {
|
||||||
|
appStore.getlist(UserConfig.LIST);
|
||||||
|
}, [appStore]);
|
||||||
|
const onFinish = (values: any) => {
|
||||||
|
let ids = values.photosIds.map((item) => {
|
||||||
|
return item.id;
|
||||||
|
});
|
||||||
|
let appIcon = values.appIcon.map((item) => {
|
||||||
|
return item.id;
|
||||||
|
});
|
||||||
|
console.log(values);
|
||||||
|
values = {
|
||||||
|
...values,
|
||||||
|
photosIds: ids.join(","),
|
||||||
|
appIcon: appIcon.join(","),
|
||||||
|
};
|
||||||
|
if (!id) {
|
||||||
|
appStore.add(values);
|
||||||
|
} else {
|
||||||
|
appStore.putItem(id, values);
|
||||||
|
}
|
||||||
|
setIsModalOpen(false);
|
||||||
|
};
|
||||||
|
const onFinishFailed = () => {};
|
||||||
|
return (
|
||||||
|
<div className="contentBox">
|
||||||
|
<Button
|
||||||
|
className="projectContentAdd"
|
||||||
|
style={{ marginBottom: "10px" }}
|
||||||
|
onClick={() => {
|
||||||
|
setProjectConfig(defaultConfig);
|
||||||
|
setIsModalOpen(true);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
添加app
|
||||||
|
</Button>
|
||||||
|
<Modal
|
||||||
|
title="app信息"
|
||||||
|
width={800}
|
||||||
|
open={isModalOpen}
|
||||||
|
onCancel={() => setIsModalOpen(false)}
|
||||||
|
afterClose={() => formRef.current?.resetFields()}
|
||||||
|
onOk={() => formRef.current?.submit()}
|
||||||
|
>
|
||||||
|
<SimpleForm
|
||||||
|
formRef={formRef}
|
||||||
|
createCallback={() => {
|
||||||
|
formRef.current?.setFieldsValue(record);
|
||||||
|
}}
|
||||||
|
formName="card_basic"
|
||||||
|
colProps={4}
|
||||||
|
subBtnName="提交"
|
||||||
|
formDatas={projectConfig}
|
||||||
|
onFinish={onFinish}
|
||||||
|
initialValues={true}
|
||||||
|
onFinishFailed={onFinishFailed}
|
||||||
|
/>
|
||||||
|
</Modal>
|
||||||
|
<Space direction="vertical" size="middle" style={{ display: "flex" }}>
|
||||||
|
<BTable store={appStore} columns={columns} dataSource={appStore.list} />
|
||||||
|
</Space>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default inject("appStore")(observer(AppManageList));
|
|
@ -0,0 +1,19 @@
|
||||||
|
import { Space } from "antd";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { useEffect } from "react";
|
||||||
|
import { Store } from "antd/lib/form/interface";
|
||||||
|
const ImConfig = (props: Store) => {
|
||||||
|
useEffect(() => {
|
||||||
|
console.log("im");
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="contentBox">
|
||||||
|
<Space direction="vertical" size="middle" style={{ display: "flex" }}>
|
||||||
|
im配置
|
||||||
|
</Space>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default inject("appStore")(observer(ImConfig));
|
|
@ -0,0 +1,139 @@
|
||||||
|
import { Button, FormInstance, Space } from "antd";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { useEffect } from "react";
|
||||||
|
import { Store } from "antd/lib/form/interface";
|
||||||
|
import SimpleForm from "@/components/form/simple_form";
|
||||||
|
import React from "react";
|
||||||
|
import { useParams } from "react-router";
|
||||||
|
const PayConfig = (props: Store) => {
|
||||||
|
const { appStore } = props;
|
||||||
|
const { id } = useParams();
|
||||||
|
const wxformRef = React.useRef<FormInstance>(null);
|
||||||
|
const aliformRef = React.useRef<FormInstance>(null);
|
||||||
|
useEffect(() => {
|
||||||
|
wxformRef.current?.setFieldsValue(appStore.item?.wechat)
|
||||||
|
aliformRef.current?.setFieldsValue(appStore.item?.ali)
|
||||||
|
}, [appStore.item,id]);
|
||||||
|
const onFinishFailed = () => {};
|
||||||
|
const onwxFinish = (values: any) => {
|
||||||
|
appStore.setWechatConfig(id,values)
|
||||||
|
};
|
||||||
|
const onAliFinish = (values: any) => {
|
||||||
|
appStore.setAlConfig(id,values)
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<div className="contentBox">
|
||||||
|
<Space direction="vertical" size="middle" style={{ display: "flex" }}>
|
||||||
|
<div style={{ backgroundColor: "#fff", padding: "10px" }}>
|
||||||
|
<div style={{ display: "flex", justifyContent: "space-between" }}>
|
||||||
|
<p>微信支付</p>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
onClick={() => {
|
||||||
|
wxformRef.current?.submit();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
保存
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
<SimpleForm
|
||||||
|
formName={""}
|
||||||
|
colProps={0}
|
||||||
|
formRef={wxformRef}
|
||||||
|
onFinish={onwxFinish}
|
||||||
|
onFinishFailed={onFinishFailed}
|
||||||
|
formDatas={[
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "wechatAppid",
|
||||||
|
name: "wechatAppid",
|
||||||
|
value: "",
|
||||||
|
rules: [{ required: true, message: "请输入卡片名称!" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "mchid",
|
||||||
|
name: "mchid",
|
||||||
|
value: "",
|
||||||
|
rules: [{ required: true, message: "请输入卡片名称!" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "body",
|
||||||
|
name: "body",
|
||||||
|
value: "",
|
||||||
|
rules: [{ required: true, message: "请输入卡片名称!" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "notifyURL",
|
||||||
|
name: "notifyURL",
|
||||||
|
value: "",
|
||||||
|
rules: [{ required: true, message: "请输入卡片名称!" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "key",
|
||||||
|
name: "key",
|
||||||
|
value: "",
|
||||||
|
rules: [{ required: true, message: "请输入卡片名称!" }],
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div style={{ backgroundColor: "#fff", padding: "10px" }}>
|
||||||
|
<div style={{ display: "flex", justifyContent: "space-between" }}>
|
||||||
|
<p>支付宝支付</p>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
onClick={() => {
|
||||||
|
aliformRef.current?.submit();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
保存
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
<SimpleForm
|
||||||
|
formRef={aliformRef}
|
||||||
|
formName={""}
|
||||||
|
colProps={0}
|
||||||
|
onFinish={onAliFinish}
|
||||||
|
onFinishFailed={onFinishFailed}
|
||||||
|
formDatas={[
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "AliAppId",
|
||||||
|
name: "appid",
|
||||||
|
value: "",
|
||||||
|
rules: [{ required: true, message: "请输入卡片名称!" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "AliKey",
|
||||||
|
name: "aliKey",
|
||||||
|
value: "",
|
||||||
|
rules: [{ required: true, message: "请输入卡片名称!" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "returnUrl",
|
||||||
|
name: "returnUrl",
|
||||||
|
value: "",
|
||||||
|
rules: [{ required: true, message: "请输入卡片名称!" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "notifyURL",
|
||||||
|
name: "notifyURL",
|
||||||
|
value: "",
|
||||||
|
rules: [{ required: true, message: "请输入卡片名称!" }],
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</Space>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default inject("appStore")(observer(PayConfig));
|
|
@ -0,0 +1,259 @@
|
||||||
|
import { Button, FormInstance, Space } from "antd";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { useEffect } from "react";
|
||||||
|
import { Store } from "antd/lib/form/interface";
|
||||||
|
import SimpleForm from "@/components/form/simple_form";
|
||||||
|
import React from "react";
|
||||||
|
import { useParams } from "react-router";
|
||||||
|
const PushConfig = (props: Store) => {
|
||||||
|
const { appStore } = props;
|
||||||
|
const { id } = useParams();
|
||||||
|
const hwformRef = React.useRef<FormInstance>(null);
|
||||||
|
const iosformRef = React.useRef<FormInstance>(null);
|
||||||
|
const opformRef = React.useRef<FormInstance>(null);
|
||||||
|
const vivoformRef = React.useRef<FormInstance>(null);
|
||||||
|
const xmformRef = React.useRef<FormInstance>(null);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
hwformRef.current?.setFieldsValue(appStore.item.pushHwawei);
|
||||||
|
iosformRef.current?.setFieldsValue(appStore.item.pushIos);
|
||||||
|
opformRef.current?.setFieldsValue(appStore.item.pushOppo);
|
||||||
|
vivoformRef.current?.setFieldsValue(appStore.item.pushVivo);
|
||||||
|
xmformRef.current?.setFieldsValue(appStore.item.pushXiaomi);
|
||||||
|
}, [appStore.item, id]);
|
||||||
|
|
||||||
|
const onFinishFailed = () => {};
|
||||||
|
|
||||||
|
const iosOnFinish = (values: any) => {
|
||||||
|
appStore.setIosConfig(id, values);
|
||||||
|
};
|
||||||
|
const xmOnFinish = (values: any) => {
|
||||||
|
appStore.setXmConfig(id, values);
|
||||||
|
};
|
||||||
|
const hwOnFinish = (values: any) => {
|
||||||
|
appStore.setHwConfig(id, values);
|
||||||
|
};
|
||||||
|
const oppoOnFinish = (values: any) => {
|
||||||
|
appStore.setOPConfig(id, values);
|
||||||
|
};
|
||||||
|
const vivoOnFinish = (values: any) => {
|
||||||
|
appStore.setVivoConfig(id, values);
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<div className="contentBox">
|
||||||
|
<Space direction="vertical" size="middle" style={{ display: "flex" }}>
|
||||||
|
<div style={{ backgroundColor: "#fff", padding: "10px" }}>
|
||||||
|
<div style={{ display: "flex", justifyContent: "space-between" }}>
|
||||||
|
<p>苹果推送</p>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
onClick={() => {
|
||||||
|
iosformRef.current?.submit();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
保存
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
<SimpleForm
|
||||||
|
formRef={iosformRef}
|
||||||
|
formName={""}
|
||||||
|
colProps={0}
|
||||||
|
onFinish={iosOnFinish}
|
||||||
|
onFinishFailed={onFinishFailed}
|
||||||
|
formDatas={[
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "appleBundleId",
|
||||||
|
name: "appleBundleId",
|
||||||
|
value: "",
|
||||||
|
rules: [{ required: true, message: "请输入appleBundleId!" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "password",
|
||||||
|
name: "password",
|
||||||
|
value: "",
|
||||||
|
rules: [{ required: true, message: "请输入推送密码!" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "upload",
|
||||||
|
label: "推送证书",
|
||||||
|
name: "centerFile",
|
||||||
|
value: [],
|
||||||
|
rules: [{ required: true, message: "请上传推送证书!" }],
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div style={{ backgroundColor: "#fff", padding: "10px" }}>
|
||||||
|
<div style={{ display: "flex", justifyContent: "space-between" }}>
|
||||||
|
<p>华为推送</p>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
onClick={() => {
|
||||||
|
hwformRef.current?.submit();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
保存
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
<SimpleForm
|
||||||
|
formName={""}
|
||||||
|
formRef={hwformRef}
|
||||||
|
colProps={0}
|
||||||
|
onFinish={hwOnFinish}
|
||||||
|
onFinishFailed={onFinishFailed}
|
||||||
|
formDatas={[
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "huaWeiClientID",
|
||||||
|
name: "huaWeiClientID",
|
||||||
|
value: "",
|
||||||
|
rules: [{ required: true, message: "请输入卡片名称!" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "huaWeiClientSecret",
|
||||||
|
name: "huaWeiClientSecret",
|
||||||
|
value: "",
|
||||||
|
rules: [{ required: true, message: "请输入卡片名称!" }],
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div style={{ backgroundColor: "#fff", padding: "10px" }}>
|
||||||
|
<div style={{ display: "flex", justifyContent: "space-between" }}>
|
||||||
|
<p>oppo推送</p>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
onClick={() => {
|
||||||
|
opformRef.current?.submit();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
保存
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<SimpleForm
|
||||||
|
formRef={opformRef}
|
||||||
|
formName={""}
|
||||||
|
colProps={0}
|
||||||
|
onFinish={oppoOnFinish}
|
||||||
|
onFinishFailed={onFinishFailed}
|
||||||
|
formDatas={[
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "oppoAppKey",
|
||||||
|
name: "oppoAppKey",
|
||||||
|
value: "",
|
||||||
|
rules: [{ required: true, message: "请输入卡片名称!" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "oppoMasterSecret",
|
||||||
|
name: "oppoMasterSecret",
|
||||||
|
value: "",
|
||||||
|
rules: [{ required: true, message: "请输入卡片名称!" }],
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div style={{ backgroundColor: "#fff", padding: "10px" }}>
|
||||||
|
<div style={{ display: "flex", justifyContent: "space-between" }}>
|
||||||
|
<p>vivo推送</p>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
onClick={() => {
|
||||||
|
vivoformRef.current?.submit();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
保存
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
<SimpleForm
|
||||||
|
formRef={vivoformRef}
|
||||||
|
formName={""}
|
||||||
|
colProps={0}
|
||||||
|
onFinish={vivoOnFinish}
|
||||||
|
onFinishFailed={onFinishFailed}
|
||||||
|
formDatas={[
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "vivoappId",
|
||||||
|
name: "vivoappId",
|
||||||
|
value: "",
|
||||||
|
rules: [{ required: true, message: "请输入卡片名称!" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "vivoAppKey",
|
||||||
|
name: "vivoAppKey",
|
||||||
|
value: "",
|
||||||
|
rules: [{ required: true, message: "请输入卡片名称!" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "vivoAppSecret",
|
||||||
|
name: "vivoAppSecret",
|
||||||
|
value: "",
|
||||||
|
rules: [{ required: true, message: "请输入卡片名称!" }],
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div style={{ backgroundColor: "#fff", padding: "10px" }}>
|
||||||
|
<div style={{ display: "flex", justifyContent: "space-between" }}>
|
||||||
|
<p>小米推送</p>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
onClick={() => {
|
||||||
|
xmformRef.current?.submit();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
保存
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
<SimpleForm
|
||||||
|
formRef={xmformRef}
|
||||||
|
formName={""}
|
||||||
|
colProps={0}
|
||||||
|
onFinish={xmOnFinish}
|
||||||
|
onFinishFailed={onFinishFailed}
|
||||||
|
formDatas={[
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "xiaoMiappId",
|
||||||
|
name: "xiaoMiappId",
|
||||||
|
value: "",
|
||||||
|
rules: [{ required: true, message: "请输入卡片名称!" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "xiaoMiAppKey",
|
||||||
|
name: "xiaoMiAppKey",
|
||||||
|
value: "",
|
||||||
|
rules: [{ required: true, message: "请输入卡片名称!" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "xiaoMiAppSecret",
|
||||||
|
name: "xiaoMiAppSecret",
|
||||||
|
value: "",
|
||||||
|
rules: [{ required: true, message: "请输入卡片名称!" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "xiaoMiAppChannelId",
|
||||||
|
name: "xiaoMiAppChannelId",
|
||||||
|
value: "",
|
||||||
|
rules: [{ required: true, message: "请输入卡片名称!" }],
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</Space>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default inject("appStore")(observer(PushConfig));
|
|
@ -1,158 +1,10 @@
|
||||||
import { Tooltip, Space, Button, FormInstance } from "antd";
|
import { Outlet } from "react-router";
|
||||||
import { inject, observer } from "mobx-react";
|
const AppManage = () => {
|
||||||
import type { ColumnsType } from "antd/es/table";
|
|
||||||
import BTable from "@/components/BTable";
|
|
||||||
import { useEffect, useState } from "react";
|
|
||||||
import UserConfig from "@/service/apiConfig/userConfig";
|
|
||||||
import { UserDataType } from "@/model/userModel";
|
|
||||||
import { Store } from "antd/lib/form/interface";
|
|
||||||
import Modal from "antd/lib/modal/Modal";
|
|
||||||
import SimpleForm from "@/components/form/simple_form";
|
|
||||||
import React from "react";
|
|
||||||
const AppManage = (props: Store) => {
|
|
||||||
const { appStore } = props;
|
|
||||||
const [id, setId] = useState<any>(null);
|
|
||||||
const [projectConfig, setProjectConfig] = useState<any>([]);
|
|
||||||
const [record, setRecord] = useState<any>(null);
|
|
||||||
const formRef = React.useRef<FormInstance>(null);
|
|
||||||
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
||||||
const columns: ColumnsType<UserDataType> = [
|
|
||||||
{
|
|
||||||
title: "app名称",
|
|
||||||
dataIndex: "title",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "图标",
|
|
||||||
dataIndex: "desc",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "预览图片",
|
|
||||||
dataIndex: "activeIcon",
|
|
||||||
ellipsis: {
|
|
||||||
showTitle: false,
|
|
||||||
},
|
|
||||||
render: (address) => (
|
|
||||||
<Tooltip placement="topLeft" title={address}>
|
|
||||||
{address}
|
|
||||||
</Tooltip>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "操作",
|
|
||||||
dataIndex: "id",
|
|
||||||
ellipsis: {
|
|
||||||
showTitle: false,
|
|
||||||
},
|
|
||||||
render: (any, record) => (
|
|
||||||
<div>
|
|
||||||
<Space direction="vertical">
|
|
||||||
<Space wrap>
|
|
||||||
<Button
|
|
||||||
type="dashed"
|
|
||||||
size="small"
|
|
||||||
onClick={() => {
|
|
||||||
edit(record);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
编辑
|
|
||||||
</Button>
|
|
||||||
{/* <Button type="dashed" size="small" onClick={() => {
|
|
||||||
navigate("/card/componsition/" + record.id)
|
|
||||||
}}>用户作文</Button> */}
|
|
||||||
<Button
|
|
||||||
type="dashed"
|
|
||||||
danger
|
|
||||||
size="small"
|
|
||||||
onClick={() => {
|
|
||||||
appStore.deleteItem(record.id);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
删除
|
|
||||||
</Button>
|
|
||||||
</Space>
|
|
||||||
</Space>
|
|
||||||
</div>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
];
|
|
||||||
const edit = (record) => {
|
|
||||||
setProjectConfig(defaultConfig);
|
|
||||||
setIsModalOpen(true);
|
|
||||||
formRef.current?.setFieldsValue(record);
|
|
||||||
setRecord(record);
|
|
||||||
setId(record.id);
|
|
||||||
};
|
|
||||||
const defaultConfig = [
|
|
||||||
{
|
|
||||||
type: "input",
|
|
||||||
label: "app名称",
|
|
||||||
name: "appName",
|
|
||||||
value: "",
|
|
||||||
rules: [{ required: true, message: "请输入卡片名称!" }],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: "upload",
|
|
||||||
label: "icon",
|
|
||||||
name: "appIcon",
|
|
||||||
value:[],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: "upload",
|
|
||||||
label: "图片",
|
|
||||||
name: "photosIds",
|
|
||||||
value: [],
|
|
||||||
},
|
|
||||||
];
|
|
||||||
useEffect(() => {
|
|
||||||
appStore.getlist(UserConfig.LIST);
|
|
||||||
}, [appStore]);
|
|
||||||
const onFinish = (values: any) => {
|
|
||||||
if (!id) {
|
|
||||||
appStore.add(values);
|
|
||||||
} else {
|
|
||||||
appStore.putItem(id, values);
|
|
||||||
}
|
|
||||||
setIsModalOpen(false);
|
|
||||||
};
|
|
||||||
const onFinishFailed = () => {};
|
|
||||||
return (
|
return (
|
||||||
<div className="contentBox">
|
<div className="contentBox">
|
||||||
<Button
|
<Outlet></Outlet>
|
||||||
className="projectContentAdd"
|
|
||||||
onClick={() => {
|
|
||||||
setProjectConfig(defaultConfig);
|
|
||||||
setIsModalOpen(true);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
添加app
|
|
||||||
</Button>
|
|
||||||
<Modal
|
|
||||||
title="app信息"
|
|
||||||
width={800}
|
|
||||||
open={isModalOpen}
|
|
||||||
onCancel={() => setIsModalOpen(false)}
|
|
||||||
afterClose={() => formRef.current?.resetFields()}
|
|
||||||
onOk={() => formRef.current?.submit()}
|
|
||||||
>
|
|
||||||
<SimpleForm
|
|
||||||
formRef={formRef}
|
|
||||||
createCallback={() => {
|
|
||||||
formRef.current?.setFieldsValue(record);
|
|
||||||
}}
|
|
||||||
formName="card_basic"
|
|
||||||
colProps={4}
|
|
||||||
subBtnName="提交"
|
|
||||||
formDatas={projectConfig}
|
|
||||||
onFinish={onFinish}
|
|
||||||
initialValues={true}
|
|
||||||
onFinishFailed={onFinishFailed}
|
|
||||||
/>
|
|
||||||
</Modal>
|
|
||||||
<Space direction="vertical" size="middle" style={{ display: "flex" }}>
|
|
||||||
<BTable store={appStore} columns={columns} dataSource={appStore.list} />
|
|
||||||
</Space>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default inject("appStore")(observer(AppManage));
|
export default AppManage;
|
||||||
|
|
|
@ -2,13 +2,13 @@ import { Button, Space, Modal, FormInstance } from "antd";
|
||||||
import type { ColumnsType } from 'antd/es/table';
|
import type { ColumnsType } from 'antd/es/table';
|
||||||
import { CardDataType } from "@/util/model/interface";
|
import { CardDataType } from "@/util/model/interface";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import BTable from "@/components/BTable";
|
import BTable from "@/components/b_table";
|
||||||
import SimpleForm from "@/components/form/simple_form";
|
import SimpleForm from "@/components/form/simple_form";
|
||||||
import "./index.less"
|
import "./index.less"
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import CardConfig from "@/service/apiConfig/cardConfig";
|
import CardConfig from "@/service/apiConfig/card_config";
|
||||||
const CardPageList = (props) => {
|
const CardPageList = (props) => {
|
||||||
const { cardStore } = props;
|
const { cardStore } = props;
|
||||||
const [projectConfig, setProjectConfig] = useState<any>([])
|
const [projectConfig, setProjectConfig] = useState<any>([])
|
||||||
|
@ -112,12 +112,11 @@ const CardPageList = (props) => {
|
||||||
type: "select",
|
type: "select",
|
||||||
label: "请选择卡片类型",
|
label: "请选择卡片类型",
|
||||||
name: "cardType",
|
name: "cardType",
|
||||||
value: ""
|
value: "",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
const onFinish = (values: any) => {
|
const onFinish = (values: any) => {
|
||||||
values.cardType = `${values.cardType}`;
|
|
||||||
if (!id) {
|
if (!id) {
|
||||||
cardStore.add(values);
|
cardStore.add(values);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -2,14 +2,14 @@ import { Button, Space, Modal, FormInstance } from "antd";
|
||||||
import type { ColumnsType } from "antd/es/table";
|
import type { ColumnsType } from "antd/es/table";
|
||||||
import { CardDataType } from "@/util/model/interface";
|
import { CardDataType } from "@/util/model/interface";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import BTable from "@/components/BTable";
|
import BTable from "@/components/b_table";
|
||||||
import SimpleForm from "@/components/form/simple_form";
|
import SimpleForm from "@/components/form/simple_form";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import CardConfig from "@/service/apiConfig/cardConfig";
|
import CardConfig from "@/service/apiConfig/card_config";
|
||||||
const CharacterPageList = (props) => {
|
const CharacterPageList = (props) => {
|
||||||
const { characterStore } = props;
|
const { characterStore } = props;
|
||||||
const [projectConfig, setProjectConfig] = useState<any>([]);
|
const [projectConfig, setProjectConfig] = useState<any>([]);
|
||||||
|
|
|
@ -3,12 +3,12 @@ import "./index.less";
|
||||||
import type { ColumnsType } from "antd/es/table";
|
import type { ColumnsType } from "antd/es/table";
|
||||||
import { CardDataType } from "@/util/model/interface";
|
import { CardDataType } from "@/util/model/interface";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import BTable from "@/components/BTable";
|
import BTable from "@/components/b_table";
|
||||||
import SimpleForm from "@/components/form/simple_form";
|
import SimpleForm from "@/components/form/simple_form";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import CardConfig from "@/service/apiConfig/cardConfig";
|
import CardConfig from "@/service/apiConfig/card_config";
|
||||||
const CurrentEventPageList = (props) => {
|
const CurrentEventPageList = (props) => {
|
||||||
const currentEventStore = props.currentEventStore;
|
const currentEventStore = props.currentEventStore;
|
||||||
const [projectConfig, setProjectConfig] = useState<any>([]);
|
const [projectConfig, setProjectConfig] = useState<any>([]);
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import "./index.less"
|
import "./index.less"
|
||||||
import baseHttp from "@/service/base";
|
import baseHttp from "@/service/base";
|
||||||
|
|
||||||
import { Editor } from '@tinymce/tinymce-react';
|
import { Editor } from '@tinymce/tinymce-react';
|
||||||
import Button from "antd/lib/button";
|
import Button from "antd/lib/button";
|
||||||
import { useNavigate, useParams } from "react-router-dom";
|
import { useNavigate, useParams } from "react-router-dom";
|
||||||
|
@ -13,12 +14,11 @@ const Editors = (props) => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (type === "1") {
|
if (type === "1") {
|
||||||
setValue(currentEventStore?.item?.content)
|
setValue(currentEventStore.item.content)
|
||||||
} else {
|
} else {
|
||||||
setValue(characterStore?.item?.content)
|
setValue(characterStore.item.content)
|
||||||
}
|
}
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
}, [characterStore.item.content, currentEventStore.item.content, type])
|
||||||
}, [])
|
|
||||||
const handleEditorChange = (content, editor) => {
|
const handleEditorChange = (content, editor) => {
|
||||||
setSaceValue(content);
|
setSaceValue(content);
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ const Editors = (props) => {
|
||||||
}}>保存</Button>
|
}}>保存</Button>
|
||||||
<Editor
|
<Editor
|
||||||
initialValue={value}
|
initialValue={value}
|
||||||
apiKey="q8rtoa7ai0fkub3hx1a6qtvq8qmned4vgueyt6699gczi2g8"
|
apiKey="hq72bjfug6s56a5qxa2oxpbqsxc58nv4v7nfruyd5ndpgu72"
|
||||||
init={{
|
init={{
|
||||||
menubar: false,
|
menubar: false,
|
||||||
statusbar: false, // 隐藏底部状态栏
|
statusbar: false, // 隐藏底部状态栏
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { Button, Modal, Popconfirm } from "antd";
|
||||||
import type { ColumnsType } from "antd/es/table";
|
import type { ColumnsType } from "antd/es/table";
|
||||||
import { CardDataType } from "@/util/model/interface";
|
import { CardDataType } from "@/util/model/interface";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import BTable from "@/components/BTable";
|
import BTable from "@/components/b_table";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { useParams } from "react-router-dom";
|
import { useParams } from "react-router-dom";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import BTable from "@/components/BTable";
|
import BTable from "@/components/b_table";
|
||||||
import { Button, Space } from "antd";
|
import { Button, Space } from "antd";
|
||||||
import { ColumnsType } from "antd/lib/table";
|
import { ColumnsType } from "antd/lib/table";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
|
@ -17,7 +17,7 @@ const DymiticState = (props: Store) => {
|
||||||
{ title: "操作", dataIndex: "id", render: (id: any) => render(id) },
|
{ title: "操作", dataIndex: "id", render: (id: any) => render(id) },
|
||||||
];
|
];
|
||||||
const render = (id) => (
|
const render = (id) => (
|
||||||
<div>
|
<div >
|
||||||
<Space align="center">
|
<Space align="center">
|
||||||
<Button
|
<Button
|
||||||
type="dashed"
|
type="dashed"
|
||||||
|
@ -36,8 +36,9 @@ const DymiticState = (props: Store) => {
|
||||||
dynamicStore.getlist();
|
dynamicStore.getlist();
|
||||||
}, [dynamicStore]);
|
}, [dynamicStore]);
|
||||||
return (
|
return (
|
||||||
<div style={{ margin: 10 }}>
|
<div style={{ margin: 10 }} className="projectContent">
|
||||||
<BTable
|
<BTable
|
||||||
|
loading={dynamicStore.listStatus}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
store={dynamicStore}
|
store={dynamicStore}
|
||||||
dataSource={dynamicStore.list}
|
dataSource={dynamicStore.list}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import BTable from "@/components/BTable";
|
import BTable from "@/components/b_table";
|
||||||
import { Button, FormInstance, Modal, Space } from "antd";
|
import { Button, FormInstance, Modal, Space } from "antd";
|
||||||
import { ColumnsType } from "antd/lib/table";
|
import { ColumnsType } from "antd/lib/table";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { Store } from "antd/lib/form/interface";
|
import { Store } from "antd/lib/form/interface";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import merchantsConfig from "@/service/apiConfig/merchantsConfig";
|
import merchantsConfig from "@/service/apiConfig/merchants_config";
|
||||||
import SimpleForm from "@/components/form/simple_form";
|
import SimpleForm from "@/components/form/simple_form";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import EditorComponent from "@/components/edittor";
|
import EditorComponent from "@/components/edittor";
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import BTable from "@/components/BTable";
|
import BTable from "@/components/b_table";
|
||||||
import { Button, FormInstance, Modal, Space } from "antd";
|
import { Button, FormInstance, Modal, Space } from "antd";
|
||||||
import { ColumnsType } from "antd/lib/table";
|
import { ColumnsType } from "antd/lib/table";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { Store } from "antd/lib/form/interface";
|
import { Store } from "antd/lib/form/interface";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import merchantsConfig from "@/service/apiConfig/merchantsConfig";
|
import merchantsConfig from "@/service/apiConfig/merchants_config";
|
||||||
import SimpleForm from "@/components/form/simple_form";
|
import SimpleForm from "@/components/form/simple_form";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
|
|
||||||
import BTable from "@/components/BTable";
|
import BTable from "@/components/b_table";
|
||||||
import { Button, FormInstance, Modal, Space } from "antd";
|
import { Button, FormInstance, Modal, Space } from "antd";
|
||||||
import { ColumnsType } from "antd/lib/table";
|
import { ColumnsType } from "antd/lib/table";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { Store } from "antd/lib/form/interface";
|
import { Store } from "antd/lib/form/interface";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import merchantsConfig from "@/service/apiConfig/merchantsConfig";
|
import merchantsConfig from "@/service/apiConfig/merchants_config";
|
||||||
import SimpleForm from "@/components/form/simple_form";
|
import SimpleForm from "@/components/form/simple_form";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import BTable from "@/components/BTable";
|
import BTable from "@/components/b_table";
|
||||||
import { Button, FormInstance, Modal, Space } from "antd";
|
import { Button, FormInstance, Modal, Space } from "antd";
|
||||||
import { ColumnsType } from "antd/lib/table";
|
import { ColumnsType } from "antd/lib/table";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { Store } from "antd/lib/form/interface";
|
import { Store } from "antd/lib/form/interface";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import merchantsConfig from "@/service/apiConfig/merchantsConfig";
|
import merchantsConfig from "@/service/apiConfig/merchants_config";
|
||||||
import SimpleForm from "@/components/form/simple_form";
|
import SimpleForm from "@/components/form/simple_form";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import EditorComponent from "@/components/edittor";
|
import EditorComponent from "@/components/edittor";
|
||||||
import projectTypeConfig from "@/service/apiConfig/projectTypeConfig";
|
import projectTypeConfig from "@/service/apiConfig/project_type_config";
|
||||||
|
|
||||||
const Project = (props: Store) => {
|
const Project = (props: Store) => {
|
||||||
const { projectStore } = props;
|
const { projectStore } = props;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { Store } from "antd/lib/form/interface";
|
import { Store } from "antd/lib/form/interface";
|
||||||
import AliUpload from "@/components/aliUpload";
|
import AliUpload from "@/components/ali_upload";
|
||||||
import { UploadFile } from "antd";
|
import { UploadFile } from "antd";
|
||||||
|
|
||||||
const Banner = (props: Store) => {
|
const Banner = (props: Store) => {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { Store } from "antd/lib/form/interface";
|
import { Store } from "antd/lib/form/interface";
|
||||||
import AliUpload from "@/components/aliUpload";
|
import AliUpload from "@/components/ali_upload";
|
||||||
import { UploadFile } from "antd";
|
import { UploadFile } from "antd";
|
||||||
|
|
||||||
const Logs = (props: Store) => {
|
const Logs = (props: Store) => {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { Button, Tooltip, Image, Space, Modal, FormInstance } from "antd";
|
import { Button, Tooltip, Image, Space, Modal, FormInstance } from "antd";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import type { ColumnsType } from "antd/es/table";
|
import type { ColumnsType } from "antd/es/table";
|
||||||
import BTable from "@/components/BTable";
|
import BTable from "@/components/b_table";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import UserConfig from "@/service/apiConfig/userConfig";
|
import UserConfig from "@/service/apiConfig/user_config";
|
||||||
import { UserDataType } from "@/model/userModel";
|
import { UserDataType } from "@/model/userModel";
|
||||||
import { Store } from "antd/lib/form/interface";
|
import { Store } from "antd/lib/form/interface";
|
||||||
import "./user.less";
|
import "./user.less";
|
||||||
|
|
|
@ -1,13 +1,28 @@
|
||||||
import { Suspense, lazy } from "react";
|
import { Suspense, lazy } from "react";
|
||||||
const AppManage = lazy(() => import("@/pages/app"));
|
const AppManageList = lazy(() => import("@/pages/app/app-list"));
|
||||||
|
const AppManageConfig = lazy(() => import("@/pages/app/app-config"));
|
||||||
export const appRouter = [
|
export const appRouter = [
|
||||||
{
|
{
|
||||||
path: "/app-list",
|
path: "/app",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: "/app/list",
|
||||||
index: true,
|
index: true,
|
||||||
element: (
|
element: (
|
||||||
<Suspense>
|
<Suspense>
|
||||||
<AppManage />
|
<AppManageList />
|
||||||
</Suspense>
|
</Suspense>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/app/config/:id",
|
||||||
|
index: true,
|
||||||
|
element: (
|
||||||
|
<Suspense>
|
||||||
|
<AppManageConfig />
|
||||||
|
</Suspense>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
class AppConfig {
|
|
||||||
static LIST = "app/list"
|
|
||||||
static LISTPo = "app"
|
|
||||||
static ADD = "app"
|
|
||||||
static DELETE = "app"
|
|
||||||
static EDIT = "app"
|
|
||||||
static XIAOMIAPPPUSH = "app/push/xiaomi/" // 小米推送配置信息
|
|
||||||
static VIVOAPPPUSH = "app/push/vivo/" // 小米推送配置信息
|
|
||||||
static OPPOAPPPUSH = "app/push/oppo/" // 小米推送配置信息
|
|
||||||
static HUAWEIAPPPUSH = "app/push/huawei/" // 小米推送配置信息
|
|
||||||
static IOSAPPPUSH = "app/push/ios/" // 小米推送配置信息
|
|
||||||
static WechatConfig = "app/wechatConfig/" // 小米推送配置信息
|
|
||||||
}
|
|
||||||
export default AppConfig;
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
class AppConfig {
|
||||||
|
static LIST = "app/list"
|
||||||
|
static LISTPo = "app"
|
||||||
|
static ADD = "app"
|
||||||
|
static DELETE = "app"
|
||||||
|
static EDIT = "app"
|
||||||
|
static XIAOMIAPPPUSH = "app/push/xiaomi/" // 小米推送配置信息
|
||||||
|
static VIVOAPPPUSH = "app/push/vivo/" // vivo推送配置信息
|
||||||
|
static OPPOAPPPUSH = "app/push/oppo/" // oppo推送配置信息
|
||||||
|
static HUAWEIAPPPUSH = "app/push/huawei/" // huawei推送配置信息
|
||||||
|
static IOSAPPPUSH = "app/push/ios/" // ios推送配置信息
|
||||||
|
static WechatConfig = "app/wechatConfig/" // 微信配置信息
|
||||||
|
static ALCONFIG = "app/alConfig/" // 微信配置信息
|
||||||
|
|
||||||
|
}
|
||||||
|
export default AppConfig;
|
|
@ -1,5 +1,5 @@
|
||||||
class UserConfig {
|
class UserConfig {
|
||||||
static LOGINURI: string = "user/login/system"
|
static LOGINURI: string = "login"
|
||||||
static LIST: string = "user/list"
|
static LIST: string = "user/list"
|
||||||
static ADD: string = "user"
|
static ADD: string = "user"
|
||||||
static DELETE: string = "user"
|
static DELETE: string = "user"
|
|
@ -1,12 +1,10 @@
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
import axios, { AxiosResponse } from "axios";
|
import axios, { AxiosResponse } from "axios";
|
||||||
|
|
||||||
// 添加请求拦截器
|
// 添加请求拦截器
|
||||||
|
|
||||||
axios.defaults.headers.common["CommonType"] = "shouka";
|
axios.defaults.headers.common["CommonType"] = "shouka";
|
||||||
axios.defaults.headers.common["Content-Type"] = "application/json; charset=utf8";
|
axios.defaults.headers.common["Content-Type"] = "application/json; charset=utf8";
|
||||||
axios.interceptors.request.use((config) => {
|
axios.interceptors.request.use((config) => {
|
||||||
config.baseURL = "http://81.68.81.205:8181/apis/v1/";
|
config.baseURL = "http://quwanya.cn:8899/v1/api/";
|
||||||
config.timeout = 5000;
|
config.timeout = 5000;
|
||||||
let token = window.localStorage.getItem("token")
|
let token = window.localStorage.getItem("token")
|
||||||
config.headers.Authorization = 'Bearer ' + token
|
config.headers.Authorization = 'Bearer ' + token
|
||||||
|
@ -58,7 +56,6 @@ class BaseHttp {
|
||||||
data: params
|
data: params
|
||||||
});
|
});
|
||||||
return res.data;
|
return res.data;
|
||||||
|
|
||||||
};
|
};
|
||||||
async put(url: string, params: any) {
|
async put(url: string, params: any) {
|
||||||
let res = await axios({
|
let res = await axios({
|
||||||
|
@ -67,7 +64,6 @@ class BaseHttp {
|
||||||
data: params
|
data: params
|
||||||
});
|
});
|
||||||
return res.data;
|
return res.data;
|
||||||
|
|
||||||
};
|
};
|
||||||
async delete(url: string, params: any) {
|
async delete(url: string, params: any) {
|
||||||
let res = await axios({
|
let res = await axios({
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
import { CardDataType } from "@/util/model/interface";
|
||||||
|
import BaseStore from "../baseStore";
|
||||||
|
import { makeObservable } from "mobx";
|
||||||
|
import ActivityConfig from "@/service/apiConfig/activity_config";
|
||||||
|
|
||||||
|
class ActivityStore extends BaseStore<CardDataType> {
|
||||||
|
constructor() {
|
||||||
|
super(ActivityConfig)
|
||||||
|
makeObservable(this, {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
export default new ActivityStore();
|
|
@ -1,17 +0,0 @@
|
||||||
import { CardDataType } from "@/util/model/interface";
|
|
||||||
import BaseStore from "../baseStore";
|
|
||||||
import { action, makeObservable } from "mobx";
|
|
||||||
import ActivityConfig from "@/service/apiConfig/activityConfig";
|
|
||||||
|
|
||||||
class ActivityStore extends BaseStore<CardDataType>{
|
|
||||||
constructor() {
|
|
||||||
super(ActivityConfig)
|
|
||||||
makeObservable(this, {
|
|
||||||
otherAction: action,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
otherAction() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
export default new ActivityStore();
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { CardDataType } from "@/util/model/interface";
|
import { CardDataType } from "@/util/model/interface";
|
||||||
import BaseStore from "../baseStore";
|
import BaseStore from "../baseStore";
|
||||||
import { action, makeObservable } from "mobx";
|
import { action, makeObservable } from "mobx";
|
||||||
import ActivityTypeConfig from "@/service/apiConfig/activityTypeConfig";
|
import ActivityTypeConfig from "@/service/apiConfig/activity_type_config";
|
||||||
|
|
||||||
class ActivityType extends BaseStore<CardDataType>{
|
class ActivityType extends BaseStore<CardDataType>{
|
||||||
constructor() {
|
constructor() {
|
|
@ -0,0 +1,53 @@
|
||||||
|
import { CardDataType } from "@/util/model/interface";
|
||||||
|
import BaseStore from "../baseStore";
|
||||||
|
import baseHttp from "@/service/base";
|
||||||
|
import { action, makeObservable } from "mobx";
|
||||||
|
import AppConfig from "@/service/apiConfig/app_config";
|
||||||
|
|
||||||
|
class AppStore extends BaseStore<CardDataType> {
|
||||||
|
constructor() {
|
||||||
|
super(AppConfig)
|
||||||
|
makeObservable(this, {
|
||||||
|
getApp: action
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 设置Ios 配置
|
||||||
|
async setIosConfig(id: number, param) {
|
||||||
|
return await baseHttp.put(AppConfig.IOSAPPPUSH + id, param)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置hw 配置
|
||||||
|
async setHwConfig(id: number, param) {
|
||||||
|
return await baseHttp.put(AppConfig.HUAWEIAPPPUSH + id, param)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置op 配置
|
||||||
|
async setOPConfig(id: number, param) {
|
||||||
|
return await baseHttp.put(AppConfig.OPPOAPPPUSH + id, param)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置op 配置
|
||||||
|
async setVivoConfig(id: number, param) {
|
||||||
|
return await baseHttp.put(AppConfig.VIVOAPPPUSH + id, param)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置wx 配置
|
||||||
|
async setWechatConfig(id: number, param) {
|
||||||
|
return await baseHttp.put(AppConfig.WechatConfig + id, param)
|
||||||
|
}
|
||||||
|
// 设置wx 配置
|
||||||
|
async setXmConfig(id: number, param) {
|
||||||
|
return await baseHttp.put(AppConfig.XIAOMIAPPPUSH + id, param)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置wx 配置
|
||||||
|
async setAlConfig(id: number, param) {
|
||||||
|
return await baseHttp.put(AppConfig.ALCONFIG + id, param)
|
||||||
|
}
|
||||||
|
|
||||||
|
async getApp(id: number) {
|
||||||
|
let data = await baseHttp.get(AppConfig.ADD + "/" + id, {})
|
||||||
|
this.item = data.data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export default new AppStore();
|
|
@ -1,17 +0,0 @@
|
||||||
import { CardDataType } from "@/util/model/interface";
|
|
||||||
import BaseStore from "../baseStore";
|
|
||||||
import { action, makeObservable } from "mobx";
|
|
||||||
import AppConfig from "@/service/apiConfig/appConfig";
|
|
||||||
|
|
||||||
class AppStore extends BaseStore<CardDataType>{
|
|
||||||
constructor() {
|
|
||||||
super(AppConfig)
|
|
||||||
makeObservable(this, {
|
|
||||||
otherAction: action,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
otherAction() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
export default new AppStore();
|
|
|
@ -11,6 +11,7 @@ interface BaseStoreInterface<T> {
|
||||||
total: number
|
total: number
|
||||||
page: Pages
|
page: Pages
|
||||||
setPages(pages: Pages): any
|
setPages(pages: Pages): any
|
||||||
|
listStatus:boolean | null | undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
class BaseStore<B> implements BaseStoreInterface<B> {
|
class BaseStore<B> implements BaseStoreInterface<B> {
|
||||||
|
@ -25,18 +26,20 @@ class BaseStore<B> implements BaseStoreInterface<B> {
|
||||||
item: observable,
|
item: observable,
|
||||||
total: observable,
|
total: observable,
|
||||||
page: observable,
|
page: observable,
|
||||||
add: action
|
add: action,
|
||||||
|
listStatus:observable,
|
||||||
})
|
})
|
||||||
this.urlConfig = urlConfig;
|
this.urlConfig = urlConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
async deleteItem(id: number) {
|
async deleteItem(id: number) {
|
||||||
await baseHttp.delete(this.urlConfig.DELETE + "/" + id, {})
|
await baseHttp.delete(this.urlConfig.DELETE + "/" + id, {})
|
||||||
this.getlist()
|
this.getlist()
|
||||||
}
|
}
|
||||||
// 分页
|
// 分页
|
||||||
setPages(params: Pages) {
|
setPages(page: Pages) {
|
||||||
this.page = params
|
this.page = page
|
||||||
this.getlist()
|
this.getlist()
|
||||||
}
|
}
|
||||||
// 添加
|
// 添加
|
||||||
|
@ -53,34 +56,43 @@ class BaseStore<B> implements BaseStoreInterface<B> {
|
||||||
|
|
||||||
// 获取列表
|
// 获取列表
|
||||||
async getlist() {
|
async getlist() {
|
||||||
|
this.listStatus = true;
|
||||||
let res = await baseHttp.get(this.urlConfig.LIST, {
|
let res = await baseHttp.get(this.urlConfig.LIST, {
|
||||||
pageIndex: this.page?.PageNum ?? 1,
|
pageNum: this.page?.PageNum | 1,
|
||||||
pageSize: this.page?.PageSize ?? 20,
|
pageSize: this.page?.PageSize | 20,
|
||||||
isSelf: 0
|
isSelf:0
|
||||||
});
|
});
|
||||||
console.log(this.page?.PageNum)
|
|
||||||
|
this.page = {
|
||||||
|
PageNum: res.data?.pageNum,
|
||||||
|
PageSize: res.data?.pageSize
|
||||||
|
}
|
||||||
let data: Array<B> = []
|
let data: Array<B> = []
|
||||||
if (!res.data.records) {
|
if (!res.data.list) {
|
||||||
runInAction(() => {
|
runInAction(() => {
|
||||||
this.list = data;
|
this.list = data;
|
||||||
})
|
})
|
||||||
|
this.listStatus = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (let i = 0; i < res.data.records.length; i++) {
|
for (let i = 0; i < res.data.list.length; i++) {
|
||||||
data.push({
|
data.push({
|
||||||
key: res.data.records[i].id,
|
key: res.data.list[i].id,
|
||||||
...res.data.records[i]
|
...res.data.list[i]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
runInAction(() => {
|
runInAction(() => {
|
||||||
this.list = data;
|
this.list = data;
|
||||||
this.total = res.data.total | res.data.totals
|
this.total = res.data.total | res.data.totals
|
||||||
})
|
})
|
||||||
|
this.listStatus = false;
|
||||||
}
|
}
|
||||||
list!: Array<B>;
|
list!: Array<B>;
|
||||||
item!: B | null | string
|
item!: B | null | string
|
||||||
total!: number;
|
total!: number;
|
||||||
page!: Pages;
|
page!: Pages;
|
||||||
|
listStatus: boolean | null | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default BaseStore
|
export default BaseStore
|
|
@ -1,5 +1,5 @@
|
||||||
import { CardDataType } from "@/util/model/interface";
|
import { CardDataType } from "@/util/model/interface";
|
||||||
import CardConfig from "@/service/apiConfig/cardConfig";
|
import CardConfig from "@/service/apiConfig/card_config";
|
||||||
import BaseStore from "../baseStore";
|
import BaseStore from "../baseStore";
|
||||||
import { action, makeObservable } from "mobx";
|
import { action, makeObservable } from "mobx";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { CardDataType } from "@/util/model/interface";
|
import { CardDataType } from "@/util/model/interface";
|
||||||
import CardConfig from "@/service/apiConfig/cardConfig";
|
import CardConfig from "@/service/apiConfig/card_config";
|
||||||
import BaseStore from "../baseStore";
|
import BaseStore from "../baseStore";
|
||||||
import { action, makeObservable } from "mobx";
|
import { action, makeObservable } from "mobx";
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { action, makeAutoObservable, observable } from "mobx";
|
import { action, makeAutoObservable, observable } from "mobx";
|
||||||
import baseHttp from "@/service/base";
|
import baseHttp from "@/service/base";
|
||||||
import { CardDataType, Pages, ComponsitionDataType } from "@/util/model/interface";
|
import { CardDataType, Pages, ComponsitionDataType } from "@/util/model/interface";
|
||||||
import componsitionConfig from "@/service/apiConfig/componsitionConfig";
|
import componsitionConfig from "@/service/apiConfig/componsition_config";
|
||||||
class ComponSitionStore {
|
class ComponSitionStore {
|
||||||
datalist: ComponsitionDataType[] = [];
|
datalist: ComponsitionDataType[] = [];
|
||||||
total: number | null | undefined;
|
total: number | null | undefined;
|
|
@ -1,5 +1,5 @@
|
||||||
import { CardDataType } from "@/util/model/interface";
|
import { CardDataType } from "@/util/model/interface";
|
||||||
import CardConfig from "@/service/apiConfig/cardConfig";
|
import CardConfig from "@/service/apiConfig/card_config";
|
||||||
import BaseStore from "../baseStore";
|
import BaseStore from "../baseStore";
|
||||||
import { action, makeObservable } from "mobx";
|
import { action, makeObservable } from "mobx";
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { CardDataType } from "@/util/model/interface";
|
import { CardDataType } from "@/util/model/interface";
|
||||||
import BaseStore from "../baseStore";
|
import BaseStore from "../baseStore";
|
||||||
import { makeObservable } from "mobx";
|
import { makeObservable } from "mobx";
|
||||||
import DynamicConfig from "@/service/apiConfig/dynamicConfig";
|
import DynamicConfig from "@/service/apiConfig/dynamic_config";
|
||||||
|
|
||||||
class DynamicStore extends BaseStore<CardDataType>{
|
class DynamicStore extends BaseStore<CardDataType>{
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
import usrStore from '@/store/user'
|
import usrStore from '@/store/user'
|
||||||
import projectStore from '@/store/project'
|
import projectStore from '@/store/project'
|
||||||
import cardStore from '@/store/cardStore'
|
import cardStore from '@/store/card'
|
||||||
import characterStore from '@/store/characterStore'
|
import characterStore from '@/store/character'
|
||||||
import currentEventStore from '@/store/currentEventStore'
|
import currentEventStore from '@/store/current_event'
|
||||||
import componSitionStore from '@/store/componsitionStroe'
|
import componSitionStore from '@/store/componsition'
|
||||||
import systemStore from '@/store/system'
|
import systemStore from '@/store/system'
|
||||||
import merchantStore from '@/store/merchantsStore'
|
import merchantStore from '@/store/merchants'
|
||||||
import projectTypeStore from '@/store/projectTypeStore'
|
import projectTypeStore from '@/store/project_type'
|
||||||
import productUnitStore from '@/store/productUnitStore'
|
import productUnitStore from '@/store/product_unit'
|
||||||
import dynamicStore from '@/store/dynamic'
|
import dynamicStore from '@/store/dynamic'
|
||||||
import activityStore from '@/store/activityStore'
|
import activityStore from '@/store/activity'
|
||||||
import activityTypeStore from '@/store/activityTypeStore'
|
import activityTypeStore from '@/store/activity_type'
|
||||||
import appStore from '@/store/appStore'
|
import appStore from '@/store/app'
|
||||||
import activeStore from '@/store/active'
|
import activeStore from '@/store/active'
|
||||||
|
|
||||||
const store = {
|
const store = {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { makeObservable } from "mobx";
|
import { makeObservable } from "mobx";
|
||||||
import BaseStore from "@/store/baseStore";
|
import BaseStore from "@/store/baseStore";
|
||||||
import merchantsConfig from '@/service/apiConfig/merchantsConfig';
|
import merchantsConfig from '@/service/apiConfig/merchants_config';
|
||||||
class MerchantStore extends BaseStore<any> {
|
class MerchantStore extends BaseStore<any> {
|
||||||
constructor() {
|
constructor() {
|
||||||
super(merchantsConfig)
|
super(merchantsConfig)
|
|
@ -1,5 +1,5 @@
|
||||||
import { makeObservable } from "mobx";
|
import { makeObservable } from "mobx";
|
||||||
import productUnit from "@/service/apiConfig/productUnitConfig";
|
import productUnit from "@/service/apiConfig/product_unit_config";
|
||||||
import BaseStore from "@/store/baseStore";
|
import BaseStore from "@/store/baseStore";
|
||||||
|
|
||||||
class ProductUnitStore extends BaseStore<any> {
|
class ProductUnitStore extends BaseStore<any> {
|
|
@ -1,5 +1,5 @@
|
||||||
import { makeObservable } from "mobx";
|
import { makeObservable } from "mobx";
|
||||||
import ProjectConfig from "@/service/apiConfig/projectConfig";
|
import ProjectConfig from "@/service/apiConfig/project_config";
|
||||||
import BaseStore from "@/store/baseStore";
|
import BaseStore from "@/store/baseStore";
|
||||||
|
|
||||||
class ProjectStore extends BaseStore<any> {
|
class ProjectStore extends BaseStore<any> {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { makeObservable } from "mobx";
|
import { makeObservable } from "mobx";
|
||||||
import projectTypeConfig from "@/service/apiConfig/projectTypeConfig";
|
import projectTypeConfig from "@/service/apiConfig/project_type_config";
|
||||||
import BaseStore from "@/store/baseStore";
|
import BaseStore from "@/store/baseStore";
|
||||||
|
|
||||||
class ProjectTypeStore extends BaseStore<any> {
|
class ProjectTypeStore extends BaseStore<any> {
|
|
@ -1,7 +1,7 @@
|
||||||
import { action, makeObservable } from "mobx";
|
import { action, makeObservable } from "mobx";
|
||||||
import baseHttp from "@/service/base";
|
import baseHttp from "@/service/base";
|
||||||
import BaseStore from "../baseStore";
|
import BaseStore from "../baseStore";
|
||||||
import SystemConfig from '../../service/apiConfig/systemConfig';
|
import SystemConfig from '../../service/apiConfig/system_config';
|
||||||
class SystemStore extends BaseStore<any> {
|
class SystemStore extends BaseStore<any> {
|
||||||
constructor() {
|
constructor() {
|
||||||
super(SystemConfig)
|
super(SystemConfig)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import UserConfig from "@/service/apiConfig/userConfig";
|
import UserConfig from "@/service/apiConfig/user_config";
|
||||||
import { action, computed, makeObservable, observable } from "mobx";
|
import { action, computed, makeObservable, observable } from "mobx";
|
||||||
// 用户信息
|
// 用户信息
|
||||||
import baseHttp from "@/service/base";
|
import baseHttp from "@/service/base";
|
||||||
|
@ -29,9 +29,10 @@ class UserStore extends BaseStore<UserDataType> {
|
||||||
this.item = "";
|
this.item = "";
|
||||||
}
|
}
|
||||||
async login(params: UserInfos) {
|
async login(params: UserInfos) {
|
||||||
let data = await baseHttp.forms(UserConfig.LOGINURI, {
|
let data = await baseHttp.post(UserConfig.LOGINURI, {
|
||||||
acount: params.userName,
|
acount: params.userName,
|
||||||
password: params.passWord,
|
passwd: params.passWord,
|
||||||
|
loginType:5
|
||||||
})
|
})
|
||||||
this._userinfo = {
|
this._userinfo = {
|
||||||
userName: data.data.name,
|
userName: data.data.name,
|
||||||
|
|
Loading…
Reference in New Issue