Compare commits
6 Commits
Author | SHA1 | Date |
---|---|---|
|
66a3d55f14 | |
|
b73d2a1ead | |
|
a8df35e175 | |
|
2c167bf638 | |
|
c44f99684b | |
|
c76d3d3f1f |
|
@ -10,7 +10,6 @@
|
|||
"dependencies": {
|
||||
"@babel/core": "^7.16.0",
|
||||
"@craco/craco": "^6.4.5",
|
||||
"@grpc/grpc-js": "^1.10.10",
|
||||
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
|
||||
"@svgr/webpack": "^6.5.0",
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
|
@ -2404,73 +2403,6 @@
|
|||
"integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==",
|
||||
"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": {
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz",
|
||||
|
@ -3272,15 +3204,6 @@
|
|||
"@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": {
|
||||
"version": "2.0.4",
|
||||
"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": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.0.2.tgz",
|
||||
|
@ -14808,11 +14677,6 @@
|
|||
"integrity": "sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA==",
|
||||
"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": {
|
||||
"version": "4.0.8",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"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": {
|
||||
"version": "1.4.0",
|
||||
"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",
|
||||
"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": {
|
||||
"version": "2.0.7",
|
||||
"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==",
|
||||
"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": {
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz",
|
||||
|
@ -34164,11 +33949,6 @@
|
|||
"@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": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz",
|
||||
|
@ -34265,60 +34045,6 @@
|
|||
"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": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.0.2.tgz",
|
||||
|
@ -42968,11 +42694,6 @@
|
|||
"integrity": "sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA==",
|
||||
"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": {
|
||||
"version": "4.0.8",
|
||||
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
|
||||
|
@ -43029,11 +42750,6 @@
|
|||
"integrity": "sha512-G6A/nJLRgWOuuwdNuA6koovfEV1YpqqAG4pRUlFaz3jj2QNZ8M4vBqnVA+HBTmU/AMNUtlOsMmSpF6NyOjztbA==",
|
||||
"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": {
|
||||
"version": "1.4.0",
|
||||
"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": {
|
||||
"version": "2.0.7",
|
||||
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
"dependencies": {
|
||||
"@babel/core": "^7.16.0",
|
||||
"@craco/craco": "^6.4.5",
|
||||
"@grpc/grpc-js": "^1.10.10",
|
||||
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
|
||||
"@svgr/webpack": "^6.5.0",
|
||||
"@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 { useEffect, useState } from "react";
|
||||
import baseHttp from "@/service/base";
|
||||
import SystemConfig from "@/service/apiConfig/systemConfig";
|
||||
import SystemConfig from "@/service/apiConfig/system_config";
|
||||
|
||||
interface UploadFileProps {
|
||||
imgList: Array<UploadFileEx>;
|
|
@ -1,4 +1,4 @@
|
|||
import { PaginationProps, Table } from "antd";
|
||||
import { Pagination, PaginationProps, Table } from "antd";
|
||||
import { useState } from "react";
|
||||
const BTable = (props: any) => {
|
||||
const { store, dataSource } = props;
|
||||
|
@ -24,20 +24,27 @@ const BTable = (props: any) => {
|
|||
});
|
||||
};
|
||||
return (
|
||||
<Table
|
||||
pagination={{
|
||||
size: "small",
|
||||
total: store.total,
|
||||
defaultCurrent: 1,
|
||||
pageSize: 20,
|
||||
showSizeChanger: true,
|
||||
onShowSizeChange: onShowSizeChange,
|
||||
onChange: onChange,
|
||||
}}
|
||||
rowSelection={rowSelection}
|
||||
columns={props.columns}
|
||||
dataSource={dataSource}
|
||||
/>
|
||||
<>
|
||||
<Table
|
||||
style={{height:"100%",overflow:"auto"}}
|
||||
pagination={false}
|
||||
loading={store.listStatus}
|
||||
rowSelection={rowSelection}
|
||||
columns={props.columns}
|
||||
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("keydown", handleKeyword);
|
||||
};
|
||||
}, [props, props.show]);
|
||||
}, [props.show]);
|
||||
const handleClose = () => {
|
||||
showState(false);
|
||||
props.close();
|
||||
|
|
|
@ -22,9 +22,9 @@ const EditorComponent = (props:EditorPropsData) => {
|
|||
props.updateChange(content)
|
||||
};
|
||||
return (
|
||||
<Editor
|
||||
<Editor
|
||||
initialValue={value}
|
||||
apiKey="q8rtoa7ai0fkub3hx1a6qtvq8qmned4vgueyt6699gczi2g8"
|
||||
apiKey="hq72bjfug6s56a5qxa2oxpbqsxc58nv4v7nfruyd5ndpgu72"
|
||||
init={{
|
||||
menubar: false,
|
||||
statusbar: false, // 隐藏底部状态栏
|
||||
|
|
|
@ -1,29 +1,28 @@
|
|||
import { Form, Select } from "antd";
|
||||
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) => {
|
||||
const [list] = useState([
|
||||
{
|
||||
value: "1",
|
||||
label: "卡片一",
|
||||
},
|
||||
{
|
||||
value: "2",
|
||||
label: "卡片二",
|
||||
},
|
||||
{
|
||||
value: "3",
|
||||
label: "卡片三",
|
||||
},
|
||||
{
|
||||
value: "4",
|
||||
label: "卡片四",
|
||||
},
|
||||
]);
|
||||
|
||||
const [list, setList] = useState([]);
|
||||
useEffect(() => {
|
||||
baseHttp
|
||||
.get(`${v.selectUrl}/?pageSize=100&pageNum=1` ?? "", "")
|
||||
.then((res) => {
|
||||
setList(res.data.list ?? []);
|
||||
});
|
||||
}, [v.selectUrl]);
|
||||
return (
|
||||
<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>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -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 { SimpleFormData } from "./interface";
|
||||
import { FormSelect } from "./select";
|
||||
import AliUpload from "../aliUpload";
|
||||
import AliUpload from "../ali_upload";
|
||||
const { TextArea } = Input;
|
||||
const SimpleForm = (props: SimpleFormData) => {
|
||||
const [form] = Form.useForm();
|
||||
|
@ -20,9 +20,10 @@ const SimpleForm = (props: SimpleFormData) => {
|
|||
name={props.formName}
|
||||
ref={props.formRef}
|
||||
form={form}
|
||||
labelCol={{ span: 4 }}
|
||||
wrapperCol={{ span: 8 }}
|
||||
layout="horizontal"
|
||||
initialValues={{ menubar: true }}
|
||||
labelCol={{ span: props.colProps }}
|
||||
wrapperCol={{ span: 16 }}
|
||||
onFinish={onFinish}
|
||||
autoComplete="on"
|
||||
>
|
||||
|
@ -35,6 +36,7 @@ const SimpleForm = (props: SimpleFormData) => {
|
|||
label={v.label}
|
||||
name={v.name}
|
||||
rules={v.rules}
|
||||
|
||||
>
|
||||
<Input defaultValue={v.value} value={v.value} />
|
||||
</Form.Item>
|
||||
|
@ -116,17 +118,6 @@ const SimpleForm = (props: SimpleFormData) => {
|
|||
</Radio.Group>
|
||||
</Form.Item>
|
||||
);
|
||||
case "switch":
|
||||
return (
|
||||
<Form.Item
|
||||
key={v.label}
|
||||
label={v.label}
|
||||
name={v.name}
|
||||
rules={v.rules}
|
||||
>
|
||||
<Switch/>
|
||||
</Form.Item>
|
||||
);
|
||||
case "Date":
|
||||
return (
|
||||
<Form.Item
|
||||
|
@ -138,7 +129,6 @@ const SimpleForm = (props: SimpleFormData) => {
|
|||
<DatePicker />
|
||||
</Form.Item>
|
||||
);
|
||||
|
||||
default:
|
||||
return (
|
||||
<Form.Item
|
||||
|
|
|
@ -8,7 +8,7 @@ const appMenu = {
|
|||
label: "app管理",
|
||||
children: [
|
||||
{
|
||||
key: "/app-list",
|
||||
key: "/app/list",
|
||||
icon: <VideoCameraOutlined />,
|
||||
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 { UserOutlined } from "@ant-design/icons";
|
||||
import userMenu from "./user";
|
||||
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[] = [
|
||||
{
|
||||
key: "/",
|
||||
icon: <UserOutlined />,
|
||||
label: "首页",
|
||||
},
|
||||
cardMenu,
|
||||
userMenu,
|
||||
demand,
|
||||
contentMenu,
|
||||
dynimacStateMenu,
|
||||
activeMenu,
|
||||
merchant,
|
||||
system,
|
||||
rbac,
|
||||
taskMenu,
|
||||
app,
|
||||
];
|
||||
|
||||
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{
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.projectContent {
|
||||
box-sizing: border-box;
|
||||
margin: 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
code {
|
||||
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
||||
monospace;
|
||||
|
|
|
@ -20,4 +20,5 @@ export interface UserDataType {
|
|||
startTime: any;
|
||||
endTime: 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 type { ColumnsType } from "antd/es/table";
|
||||
import BTable from "@/components/BTable";
|
||||
import BTable from "@/components/b_table";
|
||||
import { useEffect, useState } from "react";
|
||||
import { UserDataType } from "@/model/userModel";
|
||||
import { Store } from "antd/lib/form/interface";
|
||||
|
@ -11,7 +11,7 @@ import React from "react";
|
|||
import ActiveConfig from "@/service/apiConfig/active";
|
||||
import dayjs from "dayjs";
|
||||
const Active = (props: Store) => {
|
||||
const { activeStore } = props;
|
||||
const { activityStore } = props;
|
||||
const [projectConfig, setProjectConfig] = useState<any>([]);
|
||||
const [id, setId] = useState<any>(null);
|
||||
const [record, setRecord] = useState<any>(null);
|
||||
|
@ -20,35 +20,67 @@ const Active = (props: Store) => {
|
|||
const columns: ColumnsType<UserDataType> = [
|
||||
{
|
||||
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: "折扣",
|
||||
dataIndex: "discount",
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
title: "活动开始时间",
|
||||
dataIndex: "startTime",
|
||||
width: 200,
|
||||
},
|
||||
|
||||
{
|
||||
title: "活动结束时间",
|
||||
dataIndex: "endTime",
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
title: "活动状态",
|
||||
render: (any, record) => (
|
||||
<div>
|
||||
<span>{record.status ? "开启" : "关闭"}</span>
|
||||
</div>
|
||||
),
|
||||
width: 200,
|
||||
render: (any, record) => <span>{record.status ? "开启" : "关闭"}</span>,
|
||||
},
|
||||
{
|
||||
width: 200,
|
||||
title: "发起人",
|
||||
dataIndex: "userId",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
width: 200,
|
||||
fixed: "right",
|
||||
dataIndex: "id",
|
||||
ellipsis: {
|
||||
showTitle: false,
|
||||
},
|
||||
render: (any, record) => (
|
||||
<div>
|
||||
<Space direction="vertical">
|
||||
|
@ -64,7 +96,7 @@ const Active = (props: Store) => {
|
|||
danger
|
||||
size="small"
|
||||
onClick={() => {
|
||||
activeStore.deleteItem(record.id);
|
||||
activityStore.deleteItem(record.id);
|
||||
}}
|
||||
>
|
||||
删除
|
||||
|
@ -94,7 +126,7 @@ const Active = (props: Store) => {
|
|||
setId(record.id);
|
||||
};
|
||||
const onChange = (bools, record) => {
|
||||
activeStore.putItem(record.id, {
|
||||
activityStore.putItem(record.id, {
|
||||
status: bools,
|
||||
activeName: record.activeName,
|
||||
discount: record.discount,
|
||||
|
@ -129,24 +161,18 @@ const Active = (props: Store) => {
|
|||
name: "endTime",
|
||||
value: "",
|
||||
},
|
||||
{
|
||||
type: "switch",
|
||||
label: "是否开启",
|
||||
name: "status",
|
||||
value: false,
|
||||
},
|
||||
];
|
||||
|
||||
useEffect(() => {
|
||||
activeStore.getlist(ActiveConfig.LIST);
|
||||
}, [activeStore]);
|
||||
activityStore.getlist(ActiveConfig.LIST);
|
||||
}, [activityStore]);
|
||||
const onFinish = (values: any) => {
|
||||
values["startTime"] = values["startTime"].format("YYYY.MM.DD");
|
||||
values["endTime"] = values["endTime"].format("YYYY.MM.DD");
|
||||
if (!id) {
|
||||
activeStore.add(values);
|
||||
activityStore.add(values);
|
||||
} else {
|
||||
activeStore.putItem(id, values);
|
||||
activityStore.putItem(id, values);
|
||||
}
|
||||
setIsModalOpen(false);
|
||||
};
|
||||
|
@ -154,14 +180,17 @@ const Active = (props: Store) => {
|
|||
const addAction = () => {
|
||||
setProjectConfig(defaultConfig);
|
||||
setId(null);
|
||||
setRecord(null)
|
||||
setRecord(null);
|
||||
setIsModalOpen(true);
|
||||
formRef.current?.setFieldsValue(record);
|
||||
|
||||
};
|
||||
return (
|
||||
<div className="projectContent">
|
||||
<Button className="projectContentAdd" onClick={() => addAction()}>
|
||||
<div style={{ padding: "10px" }}>
|
||||
<Button
|
||||
style={{ marginBottom: "10px" }}
|
||||
className="projectContentAdd"
|
||||
onClick={() => addAction()}
|
||||
>
|
||||
添加活动
|
||||
</Button>
|
||||
<Modal
|
||||
|
@ -188,13 +217,13 @@ const Active = (props: Store) => {
|
|||
</Modal>
|
||||
<Space direction="vertical" size="middle" style={{ display: "flex" }}>
|
||||
<BTable
|
||||
store={activeStore}
|
||||
store={activityStore}
|
||||
columns={columns}
|
||||
dataSource={activeStore.list}
|
||||
dataSource={activityStore.list}
|
||||
/>
|
||||
</Space>
|
||||
</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 { inject, observer } from "mobx-react";
|
||||
import type { ColumnsType } from "antd/es/table";
|
||||
import BTable from "@/components/BTable";
|
||||
import BTable from "@/components/b_table";
|
||||
import { useEffect, useState } from "react";
|
||||
import UserConfig from "@/service/apiConfig/userConfig";
|
||||
import UserConfig from "@/service/apiConfig/user_config";
|
||||
import { UserDataType } from "@/model/userModel";
|
||||
import { Store } from "antd/lib/form/interface";
|
||||
import SimpleForm from "@/components/form/simple_form";
|
||||
|
@ -17,15 +17,8 @@ const ActiveType = (props: Store) => {
|
|||
const [record, setRecord] = useState<any>(null);
|
||||
const [userId, setId] = useState<Number | null>(null);
|
||||
const columns: ColumnsType<UserDataType> = [
|
||||
{
|
||||
title: "类型名称",
|
||||
dataIndex: "name",
|
||||
},
|
||||
{
|
||||
title: "类型描述",
|
||||
dataIndex: "desc",
|
||||
},
|
||||
|
||||
{ title: "类型名称", dataIndex: "name" },
|
||||
{ title: "类型描述", dataIndex: "desc" },
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "id",
|
||||
|
@ -36,32 +29,41 @@ const ActiveType = (props: Store) => {
|
|||
<div>
|
||||
<Space direction="vertical">
|
||||
<Space wrap>
|
||||
<Button
|
||||
type="dashed"
|
||||
size="small"
|
||||
onClick={() => {
|
||||
edit(record);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
type="dashed"
|
||||
danger
|
||||
size="small"
|
||||
onClick={() => {
|
||||
activityTypeStore.deleteItem(record.id);
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</Button>
|
||||
<EditBtn />
|
||||
<DeBtn />
|
||||
</Space>
|
||||
</Space>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
];
|
||||
const EditBtn = () => {
|
||||
return (
|
||||
<Button
|
||||
type="dashed"
|
||||
size="small"
|
||||
onClick={() => {
|
||||
edit(record);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
);
|
||||
};
|
||||
const DeBtn = () => {
|
||||
return (
|
||||
<Button
|
||||
type="dashed"
|
||||
danger
|
||||
size="small"
|
||||
onClick={() => {
|
||||
activityTypeStore.deleteItem(record.id);
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</Button>
|
||||
);
|
||||
};
|
||||
const edit = (record) => {
|
||||
record = {
|
||||
...record,
|
||||
|
@ -84,6 +86,7 @@ const ActiveType = (props: Store) => {
|
|||
}
|
||||
setIsModalOpen(false);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
activityTypeStore.getlist(UserConfig.LIST);
|
||||
}, [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 { inject, observer } from "mobx-react";
|
||||
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 = () => {};
|
||||
import { Outlet } from "react-router";
|
||||
const AppManage = () => {
|
||||
return (
|
||||
<div className="contentBox">
|
||||
<Button
|
||||
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>
|
||||
<Outlet></Outlet>
|
||||
</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 { CardDataType } from "@/util/model/interface";
|
||||
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 "./index.less"
|
||||
import { useEffect, useState } from "react";
|
||||
import React from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import CardConfig from "@/service/apiConfig/cardConfig";
|
||||
import CardConfig from "@/service/apiConfig/card_config";
|
||||
const CardPageList = (props) => {
|
||||
const { cardStore } = props;
|
||||
const [projectConfig, setProjectConfig] = useState<any>([])
|
||||
|
@ -112,12 +112,11 @@ const CardPageList = (props) => {
|
|||
type: "select",
|
||||
label: "请选择卡片类型",
|
||||
name: "cardType",
|
||||
value: ""
|
||||
value: "",
|
||||
},
|
||||
]
|
||||
|
||||
const onFinish = (values: any) => {
|
||||
values.cardType = `${values.cardType}`;
|
||||
if (!id) {
|
||||
cardStore.add(values);
|
||||
} else {
|
||||
|
|
|
@ -2,14 +2,14 @@ import { Button, Space, Modal, FormInstance } from "antd";
|
|||
import type { ColumnsType } from "antd/es/table";
|
||||
import { CardDataType } from "@/util/model/interface";
|
||||
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 "./index.less";
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
import React from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import CardConfig from "@/service/apiConfig/cardConfig";
|
||||
import CardConfig from "@/service/apiConfig/card_config";
|
||||
const CharacterPageList = (props) => {
|
||||
const { characterStore } = props;
|
||||
const [projectConfig, setProjectConfig] = useState<any>([]);
|
||||
|
|
|
@ -3,12 +3,12 @@ import "./index.less";
|
|||
import type { ColumnsType } from "antd/es/table";
|
||||
import { CardDataType } from "@/util/model/interface";
|
||||
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 { useEffect, useState } from "react";
|
||||
import React from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import CardConfig from "@/service/apiConfig/cardConfig";
|
||||
import CardConfig from "@/service/apiConfig/card_config";
|
||||
const CurrentEventPageList = (props) => {
|
||||
const currentEventStore = props.currentEventStore;
|
||||
const [projectConfig, setProjectConfig] = useState<any>([]);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { useEffect, useState } from "react";
|
||||
import "./index.less"
|
||||
import baseHttp from "@/service/base";
|
||||
|
||||
import { Editor } from '@tinymce/tinymce-react';
|
||||
import Button from "antd/lib/button";
|
||||
import { useNavigate, useParams } from "react-router-dom";
|
||||
|
@ -13,12 +14,11 @@ const Editors = (props) => {
|
|||
const navigate = useNavigate();
|
||||
useEffect(() => {
|
||||
if (type === "1") {
|
||||
setValue(currentEventStore?.item?.content)
|
||||
setValue(currentEventStore.item.content)
|
||||
} 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) => {
|
||||
setSaceValue(content);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ const Editors = (props) => {
|
|||
}}>保存</Button>
|
||||
<Editor
|
||||
initialValue={value}
|
||||
apiKey="q8rtoa7ai0fkub3hx1a6qtvq8qmned4vgueyt6699gczi2g8"
|
||||
apiKey="hq72bjfug6s56a5qxa2oxpbqsxc58nv4v7nfruyd5ndpgu72"
|
||||
init={{
|
||||
menubar: false,
|
||||
statusbar: false, // 隐藏底部状态栏
|
||||
|
|
|
@ -2,7 +2,7 @@ import { Button, Modal, Popconfirm } from "antd";
|
|||
import type { ColumnsType } from "antd/es/table";
|
||||
import { CardDataType } from "@/util/model/interface";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import BTable from "@/components/BTable";
|
||||
import BTable from "@/components/b_table";
|
||||
import "./index.less";
|
||||
import { useEffect, useState } from "react";
|
||||
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 { ColumnsType } from "antd/lib/table";
|
||||
import { inject, observer } from "mobx-react";
|
||||
|
@ -17,7 +17,7 @@ const DymiticState = (props: Store) => {
|
|||
{ title: "操作", dataIndex: "id", render: (id: any) => render(id) },
|
||||
];
|
||||
const render = (id) => (
|
||||
<div>
|
||||
<div >
|
||||
<Space align="center">
|
||||
<Button
|
||||
type="dashed"
|
||||
|
@ -36,8 +36,9 @@ const DymiticState = (props: Store) => {
|
|||
dynamicStore.getlist();
|
||||
}, [dynamicStore]);
|
||||
return (
|
||||
<div style={{ margin: 10 }}>
|
||||
<div style={{ margin: 10 }} className="projectContent">
|
||||
<BTable
|
||||
loading={dynamicStore.listStatus}
|
||||
columns={columns}
|
||||
store={dynamicStore}
|
||||
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 { ColumnsType } from "antd/lib/table";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Store } from "antd/lib/form/interface";
|
||||
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 React from "react";
|
||||
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 { ColumnsType } from "antd/lib/table";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Store } from "antd/lib/form/interface";
|
||||
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 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 { ColumnsType } from "antd/lib/table";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Store } from "antd/lib/form/interface";
|
||||
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 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 { ColumnsType } from "antd/lib/table";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Store } from "antd/lib/form/interface";
|
||||
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 React from "react";
|
||||
import EditorComponent from "@/components/edittor";
|
||||
import projectTypeConfig from "@/service/apiConfig/projectTypeConfig";
|
||||
import projectTypeConfig from "@/service/apiConfig/project_type_config";
|
||||
|
||||
const Project = (props: Store) => {
|
||||
const { projectStore } = props;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React, { useEffect, useState } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Store } from "antd/lib/form/interface";
|
||||
import AliUpload from "@/components/aliUpload";
|
||||
import AliUpload from "@/components/ali_upload";
|
||||
import { UploadFile } from "antd";
|
||||
|
||||
const Banner = (props: Store) => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React, { useEffect, useState } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Store } from "antd/lib/form/interface";
|
||||
import AliUpload from "@/components/aliUpload";
|
||||
import AliUpload from "@/components/ali_upload";
|
||||
import { UploadFile } from "antd";
|
||||
|
||||
const Logs = (props: Store) => {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { Button, Tooltip, Image, Space, Modal, FormInstance } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import type { ColumnsType } from "antd/es/table";
|
||||
import BTable from "@/components/BTable";
|
||||
import BTable from "@/components/b_table";
|
||||
import { useEffect, useState } from "react";
|
||||
import UserConfig from "@/service/apiConfig/userConfig";
|
||||
import UserConfig from "@/service/apiConfig/user_config";
|
||||
import { UserDataType } from "@/model/userModel";
|
||||
import { Store } from "antd/lib/form/interface";
|
||||
import "./user.less";
|
||||
|
|
|
@ -1,13 +1,28 @@
|
|||
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 = [
|
||||
{
|
||||
path: "/app-list",
|
||||
index: true,
|
||||
element: (
|
||||
<Suspense>
|
||||
<AppManage />
|
||||
</Suspense>
|
||||
),
|
||||
path: "/app",
|
||||
children: [
|
||||
{
|
||||
path: "/app/list",
|
||||
index: true,
|
||||
element: (
|
||||
<Suspense>
|
||||
<AppManageList />
|
||||
</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 {
|
||||
static LOGINURI: string = "user/login/system"
|
||||
static LOGINURI: string = "login"
|
||||
static LIST: string = "user/list"
|
||||
static ADD: string = "user"
|
||||
static DELETE: string = "user"
|
|
@ -1,12 +1,10 @@
|
|||
import store from "@/store";
|
||||
import axios, { AxiosResponse } from "axios";
|
||||
|
||||
// 添加请求拦截器
|
||||
|
||||
axios.defaults.headers.common["CommonType"] = "shouka";
|
||||
axios.defaults.headers.common["Content-Type"] = "application/json; charset=utf8";
|
||||
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;
|
||||
let token = window.localStorage.getItem("token")
|
||||
config.headers.Authorization = 'Bearer ' + token
|
||||
|
@ -58,7 +56,6 @@ class BaseHttp {
|
|||
data: params
|
||||
});
|
||||
return res.data;
|
||||
|
||||
};
|
||||
async put(url: string, params: any) {
|
||||
let res = await axios({
|
||||
|
@ -67,7 +64,6 @@ class BaseHttp {
|
|||
data: params
|
||||
});
|
||||
return res.data;
|
||||
|
||||
};
|
||||
async delete(url: string, params: any) {
|
||||
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 BaseStore from "../baseStore";
|
||||
import { action, makeObservable } from "mobx";
|
||||
import ActivityTypeConfig from "@/service/apiConfig/activityTypeConfig";
|
||||
import ActivityTypeConfig from "@/service/apiConfig/activity_type_config";
|
||||
|
||||
class ActivityType extends BaseStore<CardDataType>{
|
||||
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
|
||||
page: Pages
|
||||
setPages(pages: Pages): any
|
||||
listStatus:boolean | null | undefined
|
||||
}
|
||||
|
||||
class BaseStore<B> implements BaseStoreInterface<B> {
|
||||
|
@ -25,18 +26,20 @@ class BaseStore<B> implements BaseStoreInterface<B> {
|
|||
item: observable,
|
||||
total: observable,
|
||||
page: observable,
|
||||
add: action
|
||||
add: action,
|
||||
listStatus:observable,
|
||||
})
|
||||
this.urlConfig = urlConfig;
|
||||
}
|
||||
|
||||
// 删除
|
||||
async deleteItem(id: number) {
|
||||
await baseHttp.delete(this.urlConfig.DELETE + "/" + id, {})
|
||||
this.getlist()
|
||||
}
|
||||
// 分页
|
||||
setPages(params: Pages) {
|
||||
this.page = params
|
||||
setPages(page: Pages) {
|
||||
this.page = page
|
||||
this.getlist()
|
||||
}
|
||||
// 添加
|
||||
|
@ -53,34 +56,43 @@ class BaseStore<B> implements BaseStoreInterface<B> {
|
|||
|
||||
// 获取列表
|
||||
async getlist() {
|
||||
this.listStatus = true;
|
||||
let res = await baseHttp.get(this.urlConfig.LIST, {
|
||||
pageIndex: this.page?.PageNum ?? 1,
|
||||
pageSize: this.page?.PageSize ?? 20,
|
||||
isSelf: 0
|
||||
pageNum: this.page?.PageNum | 1,
|
||||
pageSize: this.page?.PageSize | 20,
|
||||
isSelf:0
|
||||
});
|
||||
console.log(this.page?.PageNum)
|
||||
|
||||
this.page = {
|
||||
PageNum: res.data?.pageNum,
|
||||
PageSize: res.data?.pageSize
|
||||
}
|
||||
let data: Array<B> = []
|
||||
if (!res.data.records) {
|
||||
if (!res.data.list) {
|
||||
runInAction(() => {
|
||||
this.list = data;
|
||||
})
|
||||
this.listStatus = false;
|
||||
return;
|
||||
}
|
||||
for (let i = 0; i < res.data.records.length; i++) {
|
||||
for (let i = 0; i < res.data.list.length; i++) {
|
||||
data.push({
|
||||
key: res.data.records[i].id,
|
||||
...res.data.records[i]
|
||||
key: res.data.list[i].id,
|
||||
...res.data.list[i]
|
||||
})
|
||||
}
|
||||
|
||||
runInAction(() => {
|
||||
this.list = data;
|
||||
this.total = res.data.total | res.data.totals
|
||||
})
|
||||
this.listStatus = false;
|
||||
}
|
||||
list!: Array<B>;
|
||||
item!: B | null | string
|
||||
total!: number;
|
||||
page!: Pages;
|
||||
listStatus: boolean | null | undefined;
|
||||
}
|
||||
|
||||
export default BaseStore
|
|
@ -1,5 +1,5 @@
|
|||
import { CardDataType } from "@/util/model/interface";
|
||||
import CardConfig from "@/service/apiConfig/cardConfig";
|
||||
import CardConfig from "@/service/apiConfig/card_config";
|
||||
import BaseStore from "../baseStore";
|
||||
import { action, makeObservable } from "mobx";
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { CardDataType } from "@/util/model/interface";
|
||||
import CardConfig from "@/service/apiConfig/cardConfig";
|
||||
import CardConfig from "@/service/apiConfig/card_config";
|
||||
import BaseStore from "../baseStore";
|
||||
import { action, makeObservable } from "mobx";
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import { action, makeAutoObservable, observable } from "mobx";
|
||||
import baseHttp from "@/service/base";
|
||||
import { CardDataType, Pages, ComponsitionDataType } from "@/util/model/interface";
|
||||
import componsitionConfig from "@/service/apiConfig/componsitionConfig";
|
||||
import componsitionConfig from "@/service/apiConfig/componsition_config";
|
||||
class ComponSitionStore {
|
||||
datalist: ComponsitionDataType[] = [];
|
||||
total: number | null | undefined;
|
|
@ -1,5 +1,5 @@
|
|||
import { CardDataType } from "@/util/model/interface";
|
||||
import CardConfig from "@/service/apiConfig/cardConfig";
|
||||
import CardConfig from "@/service/apiConfig/card_config";
|
||||
import BaseStore from "../baseStore";
|
||||
import { action, makeObservable } from "mobx";
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import { CardDataType } from "@/util/model/interface";
|
||||
import BaseStore from "../baseStore";
|
||||
import { makeObservable } from "mobx";
|
||||
import DynamicConfig from "@/service/apiConfig/dynamicConfig";
|
||||
import DynamicConfig from "@/service/apiConfig/dynamic_config";
|
||||
|
||||
class DynamicStore extends BaseStore<CardDataType>{
|
||||
constructor() {
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
import usrStore from '@/store/user'
|
||||
import projectStore from '@/store/project'
|
||||
import cardStore from '@/store/cardStore'
|
||||
import characterStore from '@/store/characterStore'
|
||||
import currentEventStore from '@/store/currentEventStore'
|
||||
import componSitionStore from '@/store/componsitionStroe'
|
||||
import cardStore from '@/store/card'
|
||||
import characterStore from '@/store/character'
|
||||
import currentEventStore from '@/store/current_event'
|
||||
import componSitionStore from '@/store/componsition'
|
||||
import systemStore from '@/store/system'
|
||||
import merchantStore from '@/store/merchantsStore'
|
||||
import projectTypeStore from '@/store/projectTypeStore'
|
||||
import productUnitStore from '@/store/productUnitStore'
|
||||
import merchantStore from '@/store/merchants'
|
||||
import projectTypeStore from '@/store/project_type'
|
||||
import productUnitStore from '@/store/product_unit'
|
||||
import dynamicStore from '@/store/dynamic'
|
||||
import activityStore from '@/store/activityStore'
|
||||
import activityTypeStore from '@/store/activityTypeStore'
|
||||
import appStore from '@/store/appStore'
|
||||
import activityStore from '@/store/activity'
|
||||
import activityTypeStore from '@/store/activity_type'
|
||||
import appStore from '@/store/app'
|
||||
import activeStore from '@/store/active'
|
||||
|
||||
const store = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { makeObservable } from "mobx";
|
||||
import BaseStore from "@/store/baseStore";
|
||||
import merchantsConfig from '@/service/apiConfig/merchantsConfig';
|
||||
import merchantsConfig from '@/service/apiConfig/merchants_config';
|
||||
class MerchantStore extends BaseStore<any> {
|
||||
constructor() {
|
||||
super(merchantsConfig)
|
|
@ -1,5 +1,5 @@
|
|||
import { makeObservable } from "mobx";
|
||||
import productUnit from "@/service/apiConfig/productUnitConfig";
|
||||
import productUnit from "@/service/apiConfig/product_unit_config";
|
||||
import BaseStore from "@/store/baseStore";
|
||||
|
||||
class ProductUnitStore extends BaseStore<any> {
|
|
@ -1,5 +1,5 @@
|
|||
import { makeObservable } from "mobx";
|
||||
import ProjectConfig from "@/service/apiConfig/projectConfig";
|
||||
import ProjectConfig from "@/service/apiConfig/project_config";
|
||||
import BaseStore from "@/store/baseStore";
|
||||
|
||||
class ProjectStore extends BaseStore<any> {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { makeObservable } from "mobx";
|
||||
import projectTypeConfig from "@/service/apiConfig/projectTypeConfig";
|
||||
import projectTypeConfig from "@/service/apiConfig/project_type_config";
|
||||
import BaseStore from "@/store/baseStore";
|
||||
|
||||
class ProjectTypeStore extends BaseStore<any> {
|
|
@ -1,7 +1,7 @@
|
|||
import { action, makeObservable } from "mobx";
|
||||
import baseHttp from "@/service/base";
|
||||
import BaseStore from "../baseStore";
|
||||
import SystemConfig from '../../service/apiConfig/systemConfig';
|
||||
import SystemConfig from '../../service/apiConfig/system_config';
|
||||
class SystemStore extends BaseStore<any> {
|
||||
constructor() {
|
||||
super(SystemConfig)
|
||||
|
@ -10,7 +10,7 @@ class SystemStore extends BaseStore<any> {
|
|||
addBanner: action,
|
||||
addImage: action,
|
||||
})
|
||||
}
|
||||
}
|
||||
// 获取banner
|
||||
async getBanner() {
|
||||
return await baseHttp.get( SystemConfig.BannerList, {})
|
||||
|
|
|
@ -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 baseHttp from "@/service/base";
|
||||
|
@ -29,9 +29,10 @@ class UserStore extends BaseStore<UserDataType> {
|
|||
this.item = "";
|
||||
}
|
||||
async login(params: UserInfos) {
|
||||
let data = await baseHttp.forms(UserConfig.LOGINURI, {
|
||||
let data = await baseHttp.post(UserConfig.LOGINURI, {
|
||||
acount: params.userName,
|
||||
password: params.passWord,
|
||||
passwd: params.passWord,
|
||||
loginType:5
|
||||
})
|
||||
this._userinfo = {
|
||||
userName: data.data.name,
|
||||
|
|
Loading…
Reference in New Issue