提交
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"><!--app-html--></div>
|
||||
|
||||
<script type="module" src="/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
251
node_modules/.package-lock.json
generated
vendored
251
node_modules/.package-lock.json
generated
vendored
@@ -1107,6 +1107,23 @@
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/call-bind": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.8.tgz",
|
||||
"integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==",
|
||||
"dependencies": {
|
||||
"call-bind-apply-helpers": "^1.0.0",
|
||||
"es-define-property": "^1.0.0",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"set-function-length": "^1.2.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/call-bind-apply-helpers": {
|
||||
"version": "1.0.2",
|
||||
"license": "MIT",
|
||||
@@ -1264,6 +1281,14 @@
|
||||
"wrap-ansi": "^7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/clone": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/clone/-/clone-2.1.2.tgz",
|
||||
"integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==",
|
||||
"engines": {
|
||||
"node": ">=0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
|
||||
@@ -1578,12 +1603,63 @@
|
||||
"integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/deep-equal": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/deep-equal/-/deep-equal-1.1.2.tgz",
|
||||
"integrity": "sha512-5tdhKF6DbU7iIzrIOa1AOUt39ZRm13cmL1cGEh//aqR8x9+tNfbywRf0n5FD/18OKMdo7DNEtrX2t22ZAkI+eg==",
|
||||
"dependencies": {
|
||||
"is-arguments": "^1.1.1",
|
||||
"is-date-object": "^1.0.5",
|
||||
"is-regex": "^1.1.4",
|
||||
"object-is": "^1.1.5",
|
||||
"object-keys": "^1.1.1",
|
||||
"regexp.prototype.flags": "^1.5.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/deep-is": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmmirror.com/deep-is/-/deep-is-0.1.4.tgz",
|
||||
"integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/define-data-property": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmmirror.com/define-data-property/-/define-data-property-1.1.4.tgz",
|
||||
"integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
|
||||
"dependencies": {
|
||||
"es-define-property": "^1.0.0",
|
||||
"es-errors": "^1.3.0",
|
||||
"gopd": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/define-properties": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmmirror.com/define-properties/-/define-properties-1.2.1.tgz",
|
||||
"integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==",
|
||||
"dependencies": {
|
||||
"define-data-property": "^1.0.1",
|
||||
"has-property-descriptors": "^1.0.0",
|
||||
"object-keys": "^1.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/deflate-js": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmmirror.com/deflate-js/-/deflate-js-0.2.3.tgz",
|
||||
@@ -2106,8 +2182,7 @@
|
||||
"node_modules/extend": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/extend/-/extend-3.0.2.tgz",
|
||||
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
|
||||
"dev": true
|
||||
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
|
||||
},
|
||||
"node_modules/external-editor": {
|
||||
"version": "3.1.0",
|
||||
@@ -2150,6 +2225,11 @@
|
||||
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/fast-diff": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/fast-diff/-/fast-diff-1.1.2.tgz",
|
||||
"integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig=="
|
||||
},
|
||||
"node_modules/fast-json-stable-stringify": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
|
||||
@@ -2426,6 +2506,14 @@
|
||||
"integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/functions-have-names": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmmirror.com/functions-have-names/-/functions-have-names-1.2.3.tgz",
|
||||
"integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/gaze": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmmirror.com/gaze/-/gaze-1.1.3.tgz",
|
||||
@@ -3609,6 +3697,17 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/has-property-descriptors": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
|
||||
"integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
|
||||
"dependencies": {
|
||||
"es-define-property": "^1.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/has-symbols": {
|
||||
"version": "1.1.0",
|
||||
"license": "MIT",
|
||||
@@ -3623,7 +3722,6 @@
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
|
||||
"integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"has-symbols": "^1.0.3"
|
||||
},
|
||||
@@ -4021,6 +4119,21 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/is-arguments": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/is-arguments/-/is-arguments-1.2.0.tgz",
|
||||
"integrity": "sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==",
|
||||
"dependencies": {
|
||||
"call-bound": "^1.0.2",
|
||||
"has-tostringtag": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/is-arrayish": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmmirror.com/is-arrayish/-/is-arrayish-0.2.1.tgz",
|
||||
@@ -4081,6 +4194,21 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/is-date-object": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/is-date-object/-/is-date-object-1.1.0.tgz",
|
||||
"integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==",
|
||||
"dependencies": {
|
||||
"call-bound": "^1.0.2",
|
||||
"has-tostringtag": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/is-docker": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmmirror.com/is-docker/-/is-docker-2.2.1.tgz",
|
||||
@@ -4157,7 +4285,6 @@
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmmirror.com/is-regex/-/is-regex-1.2.1.tgz",
|
||||
"integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bound": "^1.0.2",
|
||||
"gopd": "^1.2.0",
|
||||
@@ -5146,6 +5273,29 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/object-is": {
|
||||
"version": "1.1.6",
|
||||
"resolved": "https://registry.npmmirror.com/object-is/-/object-is-1.1.6.tgz",
|
||||
"integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==",
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/object-keys": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmmirror.com/object-keys/-/object-keys-1.1.1.tgz",
|
||||
"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/object.defaults": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/object.defaults/-/object.defaults-1.1.0.tgz",
|
||||
@@ -5254,6 +5404,11 @@
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/parchment": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmmirror.com/parchment/-/parchment-1.1.4.tgz",
|
||||
"integrity": "sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg=="
|
||||
},
|
||||
"node_modules/parent-module": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/parent-module/-/parent-module-1.0.1.tgz",
|
||||
@@ -5809,6 +5964,37 @@
|
||||
"integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/quill": {
|
||||
"version": "1.3.7",
|
||||
"resolved": "https://registry.npmmirror.com/quill/-/quill-1.3.7.tgz",
|
||||
"integrity": "sha512-hG/DVzh/TiknWtE6QmWAF/pxoZKYxfe3J/d/+ShUWkDvvkZQVTPeVmUJVu1uE6DDooC4fWTiCLh84ul89oNz5g==",
|
||||
"dependencies": {
|
||||
"clone": "^2.1.1",
|
||||
"deep-equal": "^1.0.1",
|
||||
"eventemitter3": "^2.0.3",
|
||||
"extend": "^3.0.2",
|
||||
"parchment": "^1.1.4",
|
||||
"quill-delta": "^3.6.2"
|
||||
}
|
||||
},
|
||||
"node_modules/quill-delta": {
|
||||
"version": "3.6.3",
|
||||
"resolved": "https://registry.npmmirror.com/quill-delta/-/quill-delta-3.6.3.tgz",
|
||||
"integrity": "sha512-wdIGBlcX13tCHOXGMVnnTVFtGRLoP0imqxM696fIPwIf5ODIYUHIvHbZcyvGlZFiFhK5XzDC2lpjbxRhnM05Tg==",
|
||||
"dependencies": {
|
||||
"deep-equal": "^1.0.1",
|
||||
"extend": "^3.0.2",
|
||||
"fast-diff": "1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/quill/node_modules/eventemitter3": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-2.0.3.tgz",
|
||||
"integrity": "sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg=="
|
||||
},
|
||||
"node_modules/qunit": {
|
||||
"version": "2.9.2",
|
||||
"resolved": "https://registry.npmmirror.com/qunit/-/qunit-2.9.2.tgz",
|
||||
@@ -5970,6 +6156,25 @@
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/regexp.prototype.flags": {
|
||||
"version": "1.5.4",
|
||||
"resolved": "https://registry.npmmirror.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz",
|
||||
"integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==",
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.8",
|
||||
"define-properties": "^1.2.1",
|
||||
"es-errors": "^1.3.0",
|
||||
"get-proto": "^1.0.1",
|
||||
"gopd": "^1.2.0",
|
||||
"set-function-name": "^2.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/regexpp": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/regexpp/-/regexpp-2.0.1.tgz",
|
||||
@@ -6314,6 +6519,36 @@
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/set-function-length": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmmirror.com/set-function-length/-/set-function-length-1.2.2.tgz",
|
||||
"integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
|
||||
"dependencies": {
|
||||
"define-data-property": "^1.1.4",
|
||||
"es-errors": "^1.3.0",
|
||||
"function-bind": "^1.1.2",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"gopd": "^1.0.1",
|
||||
"has-property-descriptors": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/set-function-name": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/set-function-name/-/set-function-name-2.0.2.tgz",
|
||||
"integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==",
|
||||
"dependencies": {
|
||||
"define-data-property": "^1.1.4",
|
||||
"es-errors": "^1.3.0",
|
||||
"functions-have-names": "^1.2.3",
|
||||
"has-property-descriptors": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/setprototypeof": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/setprototypeof/-/setprototypeof-1.2.0.tgz",
|
||||
@@ -7268,6 +7503,14 @@
|
||||
"uuid": "dist/bin/uuid"
|
||||
}
|
||||
},
|
||||
"node_modules/uview-ui": {
|
||||
"version": "2.0.38",
|
||||
"resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.38.tgz",
|
||||
"integrity": "sha512-6egHDf9lXHKpG3hEjRE0vMx4+VWwKk/ReTf5x18KrIKqdvdPRqO3+B8Unh7vYYwrIxzAWIlmhZ9RJpKI/4UqPQ==",
|
||||
"engines": {
|
||||
"HBuilderX": "^3.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/v8-compile-cache": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmmirror.com/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz",
|
||||
|
||||
5
node_modules/quill/package.json
generated
vendored
5
node_modules/quill/package.json
generated
vendored
@@ -95,8 +95,5 @@
|
||||
"editor",
|
||||
"rich text",
|
||||
"wysiwyg"
|
||||
],
|
||||
"__npminstall_done": true,
|
||||
"_from": "quill@1.3.7",
|
||||
"_resolved": "https://registry.npmmirror.com/quill/-/quill-1.3.7.tgz"
|
||||
]
|
||||
}
|
||||
|
||||
255
package-lock.json
generated
255
package-lock.json
generated
@@ -7,7 +7,9 @@
|
||||
"dependencies": {
|
||||
"jquery": "^3.7.1",
|
||||
"lodash": "^4.17.21",
|
||||
"qs": "^6.14.0"
|
||||
"qs": "^6.14.0",
|
||||
"quill": "^1.3.7",
|
||||
"uview-ui": "^2.0.38"
|
||||
}
|
||||
},
|
||||
"node_modules/.store/eventemitter3@5.0.1/node_modules/eventemitter3": {
|
||||
@@ -1114,6 +1116,23 @@
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/call-bind": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.8.tgz",
|
||||
"integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==",
|
||||
"dependencies": {
|
||||
"call-bind-apply-helpers": "^1.0.0",
|
||||
"es-define-property": "^1.0.0",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"set-function-length": "^1.2.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/call-bind-apply-helpers": {
|
||||
"version": "1.0.2",
|
||||
"license": "MIT",
|
||||
@@ -1271,6 +1290,14 @@
|
||||
"wrap-ansi": "^7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/clone": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/clone/-/clone-2.1.2.tgz",
|
||||
"integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==",
|
||||
"engines": {
|
||||
"node": ">=0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
|
||||
@@ -1585,12 +1612,63 @@
|
||||
"integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/deep-equal": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/deep-equal/-/deep-equal-1.1.2.tgz",
|
||||
"integrity": "sha512-5tdhKF6DbU7iIzrIOa1AOUt39ZRm13cmL1cGEh//aqR8x9+tNfbywRf0n5FD/18OKMdo7DNEtrX2t22ZAkI+eg==",
|
||||
"dependencies": {
|
||||
"is-arguments": "^1.1.1",
|
||||
"is-date-object": "^1.0.5",
|
||||
"is-regex": "^1.1.4",
|
||||
"object-is": "^1.1.5",
|
||||
"object-keys": "^1.1.1",
|
||||
"regexp.prototype.flags": "^1.5.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/deep-is": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmmirror.com/deep-is/-/deep-is-0.1.4.tgz",
|
||||
"integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/define-data-property": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmmirror.com/define-data-property/-/define-data-property-1.1.4.tgz",
|
||||
"integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
|
||||
"dependencies": {
|
||||
"es-define-property": "^1.0.0",
|
||||
"es-errors": "^1.3.0",
|
||||
"gopd": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/define-properties": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmmirror.com/define-properties/-/define-properties-1.2.1.tgz",
|
||||
"integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==",
|
||||
"dependencies": {
|
||||
"define-data-property": "^1.0.1",
|
||||
"has-property-descriptors": "^1.0.0",
|
||||
"object-keys": "^1.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/deflate-js": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmmirror.com/deflate-js/-/deflate-js-0.2.3.tgz",
|
||||
@@ -2113,8 +2191,7 @@
|
||||
"node_modules/extend": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/extend/-/extend-3.0.2.tgz",
|
||||
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
|
||||
"dev": true
|
||||
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
|
||||
},
|
||||
"node_modules/external-editor": {
|
||||
"version": "3.1.0",
|
||||
@@ -2157,6 +2234,11 @@
|
||||
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/fast-diff": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/fast-diff/-/fast-diff-1.1.2.tgz",
|
||||
"integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig=="
|
||||
},
|
||||
"node_modules/fast-json-stable-stringify": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
|
||||
@@ -2447,6 +2529,14 @@
|
||||
"integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/functions-have-names": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmmirror.com/functions-have-names/-/functions-have-names-1.2.3.tgz",
|
||||
"integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/gaze": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmmirror.com/gaze/-/gaze-1.1.3.tgz",
|
||||
@@ -3630,6 +3720,17 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/has-property-descriptors": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
|
||||
"integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
|
||||
"dependencies": {
|
||||
"es-define-property": "^1.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/has-symbols": {
|
||||
"version": "1.1.0",
|
||||
"license": "MIT",
|
||||
@@ -3644,7 +3745,6 @@
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
|
||||
"integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"has-symbols": "^1.0.3"
|
||||
},
|
||||
@@ -4042,6 +4142,21 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/is-arguments": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/is-arguments/-/is-arguments-1.2.0.tgz",
|
||||
"integrity": "sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==",
|
||||
"dependencies": {
|
||||
"call-bound": "^1.0.2",
|
||||
"has-tostringtag": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/is-arrayish": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmmirror.com/is-arrayish/-/is-arrayish-0.2.1.tgz",
|
||||
@@ -4102,6 +4217,21 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/is-date-object": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/is-date-object/-/is-date-object-1.1.0.tgz",
|
||||
"integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==",
|
||||
"dependencies": {
|
||||
"call-bound": "^1.0.2",
|
||||
"has-tostringtag": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/is-docker": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmmirror.com/is-docker/-/is-docker-2.2.1.tgz",
|
||||
@@ -4178,7 +4308,6 @@
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmmirror.com/is-regex/-/is-regex-1.2.1.tgz",
|
||||
"integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bound": "^1.0.2",
|
||||
"gopd": "^1.2.0",
|
||||
@@ -5167,6 +5296,29 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/object-is": {
|
||||
"version": "1.1.6",
|
||||
"resolved": "https://registry.npmmirror.com/object-is/-/object-is-1.1.6.tgz",
|
||||
"integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==",
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/object-keys": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmmirror.com/object-keys/-/object-keys-1.1.1.tgz",
|
||||
"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/object.defaults": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/object.defaults/-/object.defaults-1.1.0.tgz",
|
||||
@@ -5275,6 +5427,11 @@
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/parchment": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmmirror.com/parchment/-/parchment-1.1.4.tgz",
|
||||
"integrity": "sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg=="
|
||||
},
|
||||
"node_modules/parent-module": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/parent-module/-/parent-module-1.0.1.tgz",
|
||||
@@ -5830,6 +5987,37 @@
|
||||
"integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/quill": {
|
||||
"version": "1.3.7",
|
||||
"resolved": "https://registry.npmmirror.com/quill/-/quill-1.3.7.tgz",
|
||||
"integrity": "sha512-hG/DVzh/TiknWtE6QmWAF/pxoZKYxfe3J/d/+ShUWkDvvkZQVTPeVmUJVu1uE6DDooC4fWTiCLh84ul89oNz5g==",
|
||||
"dependencies": {
|
||||
"clone": "^2.1.1",
|
||||
"deep-equal": "^1.0.1",
|
||||
"eventemitter3": "^2.0.3",
|
||||
"extend": "^3.0.2",
|
||||
"parchment": "^1.1.4",
|
||||
"quill-delta": "^3.6.2"
|
||||
}
|
||||
},
|
||||
"node_modules/quill-delta": {
|
||||
"version": "3.6.3",
|
||||
"resolved": "https://registry.npmmirror.com/quill-delta/-/quill-delta-3.6.3.tgz",
|
||||
"integrity": "sha512-wdIGBlcX13tCHOXGMVnnTVFtGRLoP0imqxM696fIPwIf5ODIYUHIvHbZcyvGlZFiFhK5XzDC2lpjbxRhnM05Tg==",
|
||||
"dependencies": {
|
||||
"deep-equal": "^1.0.1",
|
||||
"extend": "^3.0.2",
|
||||
"fast-diff": "1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/quill/node_modules/eventemitter3": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-2.0.3.tgz",
|
||||
"integrity": "sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg=="
|
||||
},
|
||||
"node_modules/qunit": {
|
||||
"version": "2.9.2",
|
||||
"resolved": "https://registry.npmmirror.com/qunit/-/qunit-2.9.2.tgz",
|
||||
@@ -5991,6 +6179,25 @@
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/regexp.prototype.flags": {
|
||||
"version": "1.5.4",
|
||||
"resolved": "https://registry.npmmirror.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz",
|
||||
"integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==",
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.8",
|
||||
"define-properties": "^1.2.1",
|
||||
"es-errors": "^1.3.0",
|
||||
"get-proto": "^1.0.1",
|
||||
"gopd": "^1.2.0",
|
||||
"set-function-name": "^2.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/regexpp": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/regexpp/-/regexpp-2.0.1.tgz",
|
||||
@@ -6335,6 +6542,36 @@
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/set-function-length": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmmirror.com/set-function-length/-/set-function-length-1.2.2.tgz",
|
||||
"integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
|
||||
"dependencies": {
|
||||
"define-data-property": "^1.1.4",
|
||||
"es-errors": "^1.3.0",
|
||||
"function-bind": "^1.1.2",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"gopd": "^1.0.1",
|
||||
"has-property-descriptors": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/set-function-name": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/set-function-name/-/set-function-name-2.0.2.tgz",
|
||||
"integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==",
|
||||
"dependencies": {
|
||||
"define-data-property": "^1.1.4",
|
||||
"es-errors": "^1.3.0",
|
||||
"functions-have-names": "^1.2.3",
|
||||
"has-property-descriptors": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/setprototypeof": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/setprototypeof/-/setprototypeof-1.2.0.tgz",
|
||||
@@ -7289,6 +7526,14 @@
|
||||
"uuid": "dist/bin/uuid"
|
||||
}
|
||||
},
|
||||
"node_modules/uview-ui": {
|
||||
"version": "2.0.38",
|
||||
"resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.38.tgz",
|
||||
"integrity": "sha512-6egHDf9lXHKpG3hEjRE0vMx4+VWwKk/ReTf5x18KrIKqdvdPRqO3+B8Unh7vYYwrIxzAWIlmhZ9RJpKI/4UqPQ==",
|
||||
"engines": {
|
||||
"HBuilderX": "^3.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/v8-compile-cache": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmmirror.com/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz",
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
"jquery": "^3.7.1",
|
||||
"lodash": "^4.17.21",
|
||||
"qs": "^6.14.0",
|
||||
"quill": "^1.3.7"
|
||||
"quill": "^1.3.7",
|
||||
"uview-ui": "^2.0.38",
|
||||
"vue-quill-editor": "^3.0.6"
|
||||
}
|
||||
}
|
||||
|
||||
25
pages.json
25
pages.json
@@ -35,6 +35,18 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/articleList/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的文章",
|
||||
"enablePullDownRefresh": true, // 禁止下拉刷新
|
||||
"app-plus": {
|
||||
"bounce": "none",
|
||||
"titleNView": false,
|
||||
"popGesture": "none"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/medicalRecords/medical",
|
||||
"style": {
|
||||
@@ -48,6 +60,19 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "pages/articleList/article",
|
||||
"style": {
|
||||
"navigationBarTitleText": "文章",
|
||||
"enablePullDownRefresh": true, // 禁止下拉刷新
|
||||
"app-plus": {
|
||||
"bounce": "none",
|
||||
"titleNView": false,
|
||||
"popGesture": "none"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "pages/user/login",
|
||||
"style": {
|
||||
|
||||
1731
pages/articleList/article.vue
Normal file
1731
pages/articleList/article.vue
Normal file
File diff suppressed because it is too large
Load Diff
1948
pages/articleList/articleDetail.vue
Normal file
1948
pages/articleList/articleDetail.vue
Normal file
File diff suppressed because it is too large
Load Diff
70
pages/articleList/common-editor.vue
Normal file
70
pages/articleList/common-editor.vue
Normal file
@@ -0,0 +1,70 @@
|
||||
<template>
|
||||
<view class="richtext" style="height: 100%;">
|
||||
<piaoyiEditor :height="height" :placeholder="placeholder" :values="values" @changes="saveContens" :readOnly="readOnly" :photoUrl="photoUrl" :api="api" :name="name"/>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import piaoyiEditor from '@/uni_modules/piaoyi-editor/components/piaoyi-editor/piaoyi-editor.vue';
|
||||
export default {
|
||||
props: {
|
||||
content: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
readOnly: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
photoUrl: 'https://api.nuttyreading.com', //服务器图片域名或者ip
|
||||
api: '/oss/fileoss', //上传图片接口地址
|
||||
txt: '',
|
||||
name: 'file',
|
||||
values: ''
|
||||
};
|
||||
},
|
||||
components: {
|
||||
piaoyiEditor
|
||||
},
|
||||
methods: {
|
||||
saveContens(e) {
|
||||
this.txt = e.html
|
||||
}
|
||||
},
|
||||
onShareAppMessage(res) {
|
||||
if (res.from === 'button') { // 来自页面内分享按钮
|
||||
console.log(res.target)
|
||||
}
|
||||
return {
|
||||
title: '多功能富文本编辑器!',
|
||||
path: '/pages/editor/editor'
|
||||
}
|
||||
},
|
||||
onShareTimeline(res) {
|
||||
if (res.from === 'button') { // 来自页面内分享按钮
|
||||
console.log(res.target)
|
||||
}
|
||||
return {
|
||||
title: '多功能富文本编辑器!'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
511
pages/articleList/index.vue
Normal file
511
pages/articleList/index.vue
Normal file
@@ -0,0 +1,511 @@
|
||||
<template>
|
||||
<view class="content" style="background-color: #d8e6ff57">
|
||||
<z-nav-bar title="我的文章" bgColor="#5188e5" fontColor="#fff">
|
||||
<template v-slot:right>
|
||||
<view class="top_right" @tap="createFolder">
|
||||
<uni-icons type="folder-add" size="17" color="#fff"></uni-icons>
|
||||
<text>新建文章</text>
|
||||
</view>
|
||||
</template>
|
||||
</z-nav-bar>
|
||||
|
||||
<scroll-view
|
||||
scroll-y="true"
|
||||
:scroll-top="scrollTop"
|
||||
@scrolltolower="loadMore"
|
||||
style="
|
||||
height: calc(100vh - 220rpx);
|
||||
margin-top: 100rpx;
|
||||
padding-bottom: 120rpx;
|
||||
"
|
||||
v-if="show == true"
|
||||
>
|
||||
<view class="doctors_list" id="top">
|
||||
<view
|
||||
class="doctors_item"
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
@click="goToDetail(item)"
|
||||
>
|
||||
<view class="flex">
|
||||
<view class="flex">
|
||||
<!-- <image
|
||||
v-if="item.squareImage"
|
||||
:src="item.squareImage"
|
||||
class="item_image"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
<image
|
||||
v-else
|
||||
src="../../static/logo_zi.png"
|
||||
class="item_image"
|
||||
mode="aspectFit"
|
||||
></image> -->
|
||||
|
||||
<view class="item_right">
|
||||
<view style="display: flex; align-items: center">
|
||||
<text class="card_label" v-if="statusTitle" :style="`background-color:${statusColor} ;`">{{ statusTitle }}</text>
|
||||
<text class="item_time">{{ item.createTime }}</text></view
|
||||
>
|
||||
|
||||
<view class="item_top">
|
||||
<view class="item_name">{{ item.title }}</view>
|
||||
<rich-text
|
||||
class="item_content"
|
||||
:nodes="item.information"
|
||||
></rich-text>
|
||||
<!-- <rich-text
|
||||
class="item_content"
|
||||
:nodes="item.chiefComplaint"
|
||||
></rich-text> -->
|
||||
</view>
|
||||
<view style="margin-top: 20rpx" v-if="item.img">
|
||||
<u-upload
|
||||
:fileList="item.fileList1"
|
||||
multiple
|
||||
width="50"
|
||||
height="50"
|
||||
:disabled="true"
|
||||
:previewFullImage="true"
|
||||
@click.stop="handleClick"
|
||||
>
|
||||
</u-upload>
|
||||
</view>
|
||||
|
||||
<view class="list_item_bt">
|
||||
<text class="list_item_study" v-if="taihumedId == 0"
|
||||
>编辑文章</text
|
||||
>
|
||||
<text class="list_item_study" v-else>文章详情</text>
|
||||
</view>
|
||||
<!-- <text class="item_con">{{ item.taihuTalent.map(talent => talent.name).join(' ') }}</text> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<text v-show="showText && count > list.length" class="show-more"
|
||||
>加载更多</text
|
||||
>
|
||||
<text v-show="noMore" class="no-more">没有更多了</text>
|
||||
</scroll-view>
|
||||
<text class="null_text" v-else>{{ null_text }}</text>
|
||||
<z-navigation></z-navigation>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import $http from "@/config/requestConfig.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tabsList: [],
|
||||
currentCateIndex: 0,
|
||||
list: [],
|
||||
null_text: "",
|
||||
|
||||
current: 1,
|
||||
limit: 10,
|
||||
courseName: "",
|
||||
taihumedId: null,
|
||||
statusTitle: '',
|
||||
statusColor: '',
|
||||
|
||||
timer: null,
|
||||
showText: false,
|
||||
noMore: false,
|
||||
show: null,
|
||||
count: 0,
|
||||
scrollTop: 0, //滚动位置
|
||||
isRefreshing: false, //刷新状态
|
||||
};
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.isRefreshing = true;
|
||||
console.log("下拉刷新");
|
||||
|
||||
setTimeout(() => {
|
||||
this.current = 1;
|
||||
this.list = [];
|
||||
this.noMore = false;
|
||||
|
||||
this.getListData(this.tabsList[this.currentCateIndex].id);
|
||||
uni.stopPullDownRefresh();
|
||||
this.isRefreshing = false;
|
||||
console.log("下拉刷新已停止");
|
||||
}, 800);
|
||||
},
|
||||
onLoad() {
|
||||
uni.hideTabBar();
|
||||
this.getTabData();
|
||||
},
|
||||
onShow() {
|
||||
this.getListData(this.taihumedId);
|
||||
},
|
||||
methods: {
|
||||
createFolder() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/articleList/article?navTitle=创建文章&title=创建文章&type=add`,
|
||||
});
|
||||
},
|
||||
//判断显示‘上/中/下’
|
||||
formatContent(content) {
|
||||
const keywords = ["上部", "中部", "下部"];
|
||||
let result = [];
|
||||
|
||||
// 判断是否包含关键字
|
||||
keywords.forEach((keyword) => {
|
||||
if (content.includes(keyword)) {
|
||||
result.push(keyword.substring(0, 1));
|
||||
}
|
||||
});
|
||||
return result.join("");
|
||||
},
|
||||
//获取tab数据
|
||||
getTabData() {
|
||||
// this.$http.request({
|
||||
// url: 'taihumed/course/getCourseTaihumedList',
|
||||
// method: "POST",
|
||||
// data: {},
|
||||
// header: {
|
||||
// "Content-Type": "application/json",
|
||||
// },
|
||||
// })
|
||||
// .then(res=> {
|
||||
// if (res.list&&res.list.length>0) {
|
||||
this.tabsList = [
|
||||
{ id: 0, title: "草稿箱", statusTitle: '' },
|
||||
{ id: 1, title: "待审核",statusTitle: '待审核',color:'#f59442' },
|
||||
{ id: 3, title: "已通过",statusTitle: '已通过' ,color:'#22be98' },
|
||||
{ id: 2, title: "未通过",statusTitle: '未通过',color:"#e78084" },
|
||||
];
|
||||
this.taihumedId = this.tabsList[0].id;
|
||||
this.statusTitle = '';
|
||||
this.statusColor = '';
|
||||
this.getListData(this.taihumedId);
|
||||
// }
|
||||
// });
|
||||
},
|
||||
//获取列表数据
|
||||
getListData(taihumedId, type) {
|
||||
if (type) {
|
||||
this.current = 1;
|
||||
this.list = [];
|
||||
this.noMore = false;
|
||||
}
|
||||
if (this.noMore) {
|
||||
return false;
|
||||
}
|
||||
uni.showLoading({
|
||||
title: "加载中",
|
||||
});
|
||||
this.$http
|
||||
.request({
|
||||
url: "common/articleList/articleRecordsList",
|
||||
method: "POST",
|
||||
data: {
|
||||
state: taihumedId,
|
||||
},
|
||||
header: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
uni.hideLoading();
|
||||
this.list=[...res.medicalRecordsList].filter(e=>e.data)
|
||||
this.list = [...this.list].map((e) => {
|
||||
return {
|
||||
...e,
|
||||
fileList1: e.img
|
||||
? e.img.split(",").map((image, i) => ({
|
||||
uid: i, // 假设 id 是唯一标识符
|
||||
name: i, // 文件名
|
||||
status: "done", // 状态
|
||||
url: image, // 文件 URL
|
||||
}))
|
||||
: [],
|
||||
};
|
||||
});
|
||||
this.count = this.list.length; //总数
|
||||
let length = this.list.length;
|
||||
if (res.medicalRecordsList && length > 0) {
|
||||
this.show = true;
|
||||
// //如果返回的数据少于每页数量,表示没有更多数据
|
||||
// if(this.count==length || length < this.limit ||this.count/this.current==this.limit){
|
||||
// this.noMore = true;
|
||||
// }
|
||||
// this.list = [...this.list, ...res.pageRes.records];
|
||||
// this.current += 1; //更新页码
|
||||
// //显示提示语
|
||||
// this.showText = true;
|
||||
|
||||
// if(this.current==2||type){
|
||||
// this.scrollTop = 0
|
||||
// this.$nextTick(() => {
|
||||
// this.scrollTop = 0.1; // 确保触发滚动
|
||||
// })
|
||||
// }
|
||||
} else {
|
||||
this.show = false;
|
||||
this.null_text = "暂无数据";
|
||||
}
|
||||
});
|
||||
},
|
||||
//加载更多
|
||||
loadMore() {
|
||||
this.getListData(this.taihumedId);
|
||||
},
|
||||
//切换tab状态
|
||||
ordersTabCLi(data, index) {
|
||||
this.currentCateIndex = index;
|
||||
this.courseName = "";
|
||||
this.taihumedId = data.id;
|
||||
this.statusTitle = data.statusTitle;
|
||||
this.statusColor = data.color;
|
||||
//重置
|
||||
this.list = [];
|
||||
this.noMore = false;
|
||||
this.show = false;
|
||||
this.count = 0;
|
||||
this.current = 1;
|
||||
this.getListData(this.taihumedId);
|
||||
},
|
||||
//详情
|
||||
goToDetail(item) {
|
||||
if (this.isRefreshing) return;
|
||||
var navTitle = "";
|
||||
var type = "";
|
||||
|
||||
switch (this.taihumedId) {
|
||||
case 0:
|
||||
navTitle = "编辑文章";
|
||||
type = "edit";
|
||||
break;
|
||||
case 1:
|
||||
navTitle = "文章详情";
|
||||
type = "detail";
|
||||
break;
|
||||
case 3:
|
||||
navTitle = "文章详情";
|
||||
type = "detail";
|
||||
break;
|
||||
case 2:
|
||||
navTitle = "文章详情";
|
||||
type = "detail";
|
||||
break;
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: `/pages/articleList/article?navTitle=${navTitle}&title=${navTitle}&id=${item.id}&type=${type}&statusId=${this.taihumedId}`,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "@/static/mixin.scss";
|
||||
.content {
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
background-color: #fff;
|
||||
}
|
||||
.doctors_list {
|
||||
margin: 0 20rpx 20rpx;
|
||||
}
|
||||
.doctors_item {
|
||||
// border: 1rpx solid $themeColor;
|
||||
border-radius: 15rpx;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 12rpx 30rpx 60rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 1px 8px #e3e1e1;
|
||||
}
|
||||
.item_image {
|
||||
display: block;
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
flex-shrink: 0;
|
||||
background: #f3f3f3;
|
||||
}
|
||||
.item_right {
|
||||
width: calc(100%);
|
||||
// margin-left: 30rpx;
|
||||
// padding-bottom: 20rpx;
|
||||
}
|
||||
.item_top {
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
// line-height: 30rpx;
|
||||
margin-top: 8rpx;
|
||||
}
|
||||
.item_name {
|
||||
font-size: 34rpx;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word; /* 避免长单词造成溢出 */
|
||||
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
.item_content {
|
||||
h1 {
|
||||
font-size: 28rpx;
|
||||
line-height: 30px;
|
||||
}
|
||||
}
|
||||
.item_title {
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
}
|
||||
.item_time {
|
||||
font-size: 26rpx;
|
||||
color: #aaacab;
|
||||
}
|
||||
.item_con {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-top: 10rpx;
|
||||
line-height: 40rpx;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.null_text {
|
||||
display: block;
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
color: #999;
|
||||
padding-top: 300rpx;
|
||||
}
|
||||
.doctors_module {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
z-index: 99;
|
||||
left: 0;
|
||||
}
|
||||
.cateList {
|
||||
background: #f3f3f3;
|
||||
}
|
||||
.flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.name_search {
|
||||
background-color: #fff;
|
||||
padding: 20rpx 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
/deep/.is-input-border {
|
||||
background-color: #f3f3f3;
|
||||
border-radius: 50rpx;
|
||||
height: 60rpx;
|
||||
line-height: 30rpx;
|
||||
padding: 15rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
}
|
||||
/deep/.uni-easyinput__content-input {
|
||||
}
|
||||
.name-placeholder {
|
||||
font-size: 28rpx;
|
||||
text-align: center;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
button {
|
||||
background-color: $themeBgColor;
|
||||
font-size: 26rpx;
|
||||
line-height: 36rpx;
|
||||
border-radius: 15rpx;
|
||||
color: #fff;
|
||||
padding: 5rpx 20rpx;
|
||||
margin-left: 15rpx;
|
||||
}
|
||||
}
|
||||
.show-more,
|
||||
.no-more {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
font-size: 24rpx;
|
||||
padding-top: 5rpx;
|
||||
color: #ccc;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.list_item_study {
|
||||
line-height: 48rpx;
|
||||
background: $themeBgColor;
|
||||
color: #fff;
|
||||
border-radius: 40rpx;
|
||||
font-size: 24rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
.list_item_bt {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
bottom: 16rpx;
|
||||
}
|
||||
.list_item_price {
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
margin-right: 30rpx;
|
||||
color: red;
|
||||
line-height: 54rpx;
|
||||
}
|
||||
.top_right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-right: 30rpx;
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
padding-left: 2rpx;
|
||||
}
|
||||
}
|
||||
/deep/.u-upload__deletable {
|
||||
display: none !important;
|
||||
}
|
||||
/deep/.u-upload__button {
|
||||
display: none !important;
|
||||
}
|
||||
/* 状态样式 */
|
||||
.card_label {
|
||||
display: inline-block;
|
||||
padding: 0px 16rpx;
|
||||
background-color: #4caf50; /* 绿色背景 */
|
||||
color: white;
|
||||
// font-weight: bold;
|
||||
font-size: 12px;
|
||||
border-radius: 4px; /* 圆角 */
|
||||
position: relative; /* 用于斜角效果 */
|
||||
text-align: center;
|
||||
transform: skew(-20deg); /* 倾斜效果 */
|
||||
margin-right: 20rpx; /* 如果有多个标签时,之间保持间距 */
|
||||
line-height: 38rpx;
|
||||
}
|
||||
|
||||
/* 斜角效果 */
|
||||
// .card_label::after {
|
||||
// content: '';
|
||||
// position: absolute;
|
||||
// top: 0;
|
||||
// right: -10px;
|
||||
// width: 20px;
|
||||
// height: 20px;
|
||||
// background-color: inherit;
|
||||
// transform: rotate(45deg); /* 旋转45度,形成斜角 */
|
||||
// z-index: -1;
|
||||
// }
|
||||
</style>
|
||||
214
pages/articleList/tag.vue
Normal file
214
pages/articleList/tag.vue
Normal file
@@ -0,0 +1,214 @@
|
||||
<template>
|
||||
<view>
|
||||
<uni-drawer ref="showRight" mode="right" :width="240" @change="changeD($event,'showRight')">
|
||||
|
||||
<view class="close">
|
||||
<view class="zhan" style="width: 100%;"></view>
|
||||
<u-icon name="close" @click="closeDrawer('showRight')" color="#2979ff" size="24"></u-icon>
|
||||
</view>
|
||||
<view class="proTitle">
|
||||
<text>请选择医案分类</text>
|
||||
</view>
|
||||
<scroll-view class="warp" scroll-y="true" style="max-height: 80vh;">
|
||||
<uni-collapse accordion v-if="treeList.length > 0" @change="collapseChange">
|
||||
<uni-collapse-item v-for="(item, index) in treeList" :key="index" :title="item.title"
|
||||
:show-animation="true" :showArrow="item.isLast==1?false:true">
|
||||
|
||||
<view class="content" >
|
||||
<!-- <text class="text">{{item.title}}</text> -->
|
||||
<view class="sub1List">
|
||||
<!-- <view class="item leve2" @click.stop="clickCourseInfo(item)" >
|
||||
<text class="textss"> {{item.title}}</text>
|
||||
</view> -->
|
||||
<view :class="['item', 'leve2']"
|
||||
v-for="(item1, index1) in item.children" :key="index1"
|
||||
@click.stop="clickCourseInfo(item1)">
|
||||
<text class="textss" style="padding-left: 80rpx;"> {{item1.title}}</text>
|
||||
<view class="sub2List" v-if="item1.children">
|
||||
<view :class="['item', 'leve3']"
|
||||
v-for="(item2, index2) in item1.children" :key="index2"
|
||||
@click.stop="clickCourseInfo(item2)">
|
||||
<text class="textss">{{item2.title}}</text>
|
||||
<view class="sub3List" v-if="item2.isLast == 0 && item2.children && item2.children.length > 0">
|
||||
<!-- <view :class="['item', 'leve4']" -->
|
||||
<!-- <template> -->
|
||||
<text class="textss" v-for="(item3, index3) in item2.children"
|
||||
:key="index3"
|
||||
@click.stop="clickCourseInfo(item3)">{{item3.title}}</text>
|
||||
<!-- </view> -->
|
||||
<!-- </template> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-collapse-item>
|
||||
</uni-collapse>
|
||||
</scroll-view>
|
||||
</uni-drawer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name:"tagTree",
|
||||
// props:['treeList'],
|
||||
data() {
|
||||
return {
|
||||
treeList:[]
|
||||
};
|
||||
},methods:{
|
||||
showDrawer(e) {
|
||||
this.$refs[e].open()
|
||||
// this.videoContext.pause()
|
||||
// this.showTemp = true
|
||||
console.log('打开抽屉')
|
||||
},
|
||||
getData() {
|
||||
this.$http
|
||||
.post('common/medicalRecords/getMedicalRecordsLabelList')
|
||||
.then(res => {
|
||||
if (res.code == 0 && res.Medicals.length > 0) {
|
||||
this.treeList = res.Medicals
|
||||
} else {
|
||||
this.treeList = []
|
||||
}
|
||||
this.showDrawer('showRight')
|
||||
}).catch(e => {
|
||||
console.log(e, '报错')
|
||||
uni.showToast({
|
||||
title:"获取课程分类失败",
|
||||
icon:"none"
|
||||
})
|
||||
});
|
||||
},
|
||||
handleCollapseChange(e){
|
||||
console.log(e,'1111111111111')
|
||||
},
|
||||
clickCourseInfo(val){
|
||||
|
||||
this.$emit('clickCourseInfo',val)
|
||||
if(val.isLast==1){
|
||||
this.closeDrawer('showRight')
|
||||
}
|
||||
|
||||
},
|
||||
closeDrawer(e) {
|
||||
this.$refs[e].close()
|
||||
},
|
||||
changeD(e, type) {
|
||||
// console.log((type === 'showRight' ? '左窗口' : '右窗口') + (e ? '打开' : '关闭'));
|
||||
this[type] = e
|
||||
if (!e) {
|
||||
console.log('关闭弹窗')
|
||||
}
|
||||
|
||||
},
|
||||
collapseChange(event) {
|
||||
// 打印所有展开的索引
|
||||
|
||||
var val=this.treeList[event]
|
||||
this.$emit('clickCourseInfo',val)
|
||||
if(val.isLast==1){
|
||||
this.closeDrawer('showRight')
|
||||
}
|
||||
|
||||
// 如果你想获取展开的项的数据:
|
||||
// event.detail返回的是一个包含展开项信息的数组
|
||||
// 你可以通过索引或具体数据进行处理
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
// ::v-deep uni-drawer{ height: 50vh !important;
|
||||
// .uni-drawer__content{
|
||||
// overflow-y: scroll !important;
|
||||
// }
|
||||
// }
|
||||
.sub1List {
|
||||
background-color: #f7f7f7;
|
||||
// padding-left: 20rpx;
|
||||
}
|
||||
|
||||
.content {
|
||||
|
||||
.item {
|
||||
background-color: #fff;
|
||||
line-height: 80rpx;
|
||||
font-size: 28rpx;
|
||||
color: #1b2a32;
|
||||
// border-bottom: 1px solid #dae8f0;
|
||||
|
||||
text {
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
|
||||
.item:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.item.active {
|
||||
// background-color: #aed1ec;
|
||||
color: #fff;
|
||||
background-image: linear-gradient(90deg, #258feb 0%, #00e1ec 100%) !important;
|
||||
}
|
||||
|
||||
.textss {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
}
|
||||
|
||||
.leve2 {
|
||||
.textss {
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.leve2 {
|
||||
.textss {
|
||||
padding-left: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.leve3 {
|
||||
|
||||
.sub3List{
|
||||
border-bottom: 1px solid #ebeef5; padding-left: 60rpx;
|
||||
.textss{background-color: #ebeef5; border-radius: 20rpx; padding: 10rpx 14rpx !important;}
|
||||
}
|
||||
.textss {
|
||||
padding-left: 60rpx; display: inline; margin-right: 20rpx; border:none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.leve4 {
|
||||
.textss {
|
||||
padding-left: 80rpx;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.proTitle {
|
||||
text-align: center;
|
||||
padding: 20rpx 0;
|
||||
// margin-top: 60rpx;
|
||||
// margin-bottom: 20rpx;
|
||||
color: #888;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.close {
|
||||
display: flex;
|
||||
justify-content: right;
|
||||
padding-top: 60rpx;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
470
pages/doctors/article.vue
Normal file
470
pages/doctors/article.vue
Normal file
@@ -0,0 +1,470 @@
|
||||
<template>
|
||||
|
||||
|
||||
|
||||
|
||||
<scroll-view
|
||||
scroll-y="true"
|
||||
:scroll-top="scrollTop"
|
||||
@scrolltolower="loadMore"
|
||||
style="
|
||||
height: calc(100vh - 320rpx);
|
||||
margin-top: 260rpx;
|
||||
padding-bottom: 140rpx;
|
||||
"
|
||||
v-if="show == true"
|
||||
>
|
||||
<view class="doctors_list" id="top">
|
||||
<view
|
||||
class="doctors_item"
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
@click="goToDetail(item)"
|
||||
>
|
||||
<view class="flex">
|
||||
<view class="flex">
|
||||
<image
|
||||
v-if="item.squareImage"
|
||||
:src="item.squareImage"
|
||||
class="item_image"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
<image
|
||||
v-else
|
||||
src="../../static/logo_zi.png"
|
||||
class="item_image"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
|
||||
<view class="item_right" v-if="currentCateIndex != 2">
|
||||
<view class="item_top">
|
||||
<text
|
||||
class="item_name"
|
||||
v-if="item.taihuTalent && item.taihuTalent.length > 0"
|
||||
>{{ item.taihuTalent[0].name }}</text
|
||||
>
|
||||
</view>
|
||||
<text class="item_con">{{ item.title }}</text>
|
||||
</view>
|
||||
|
||||
<view class="item_right" v-else>
|
||||
<view class="item_top">
|
||||
<text class="item_name">{{ item.title }}</text>
|
||||
</view>
|
||||
<text class="item_con">{{
|
||||
item.taihuTalent.map((talent) => talent.name).join(" ")
|
||||
}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="list_item_bt">
|
||||
<view
|
||||
class="list_item_price"
|
||||
v-if="item.courseCatalogueEntityList.length == 1"
|
||||
>
|
||||
<text v-if="item.courseCatalogueEntityList[0].halfFee == 0"
|
||||
>免费</text
|
||||
>
|
||||
<text v-else
|
||||
>¥{{ item.courseCatalogueEntityList[0].halfFee }}/{{
|
||||
item.courseCatalogueEntityList[0].fee
|
||||
}}</text
|
||||
>
|
||||
</view>
|
||||
<view
|
||||
class="list_item_price"
|
||||
v-if="item.courseCatalogueEntityList.length > 1"
|
||||
>
|
||||
<text v-for="(v, i) in item.courseCatalogueEntityList" :key="i">
|
||||
{{ formatContent(v.title)
|
||||
}}<text v-if="i !== item.courseCatalogueEntityList.length - 1"
|
||||
>/</text
|
||||
>
|
||||
</text>
|
||||
<text
|
||||
v-if="item.courseCatalogueEntityList[0].halfFee == 0"
|
||||
style="padding-left: 20rpx"
|
||||
>免费</text
|
||||
>
|
||||
<text v-else style="margin-left: 20rpx"
|
||||
>各{{ item.courseCatalogueEntityList[0].halfFee }}/{{
|
||||
item.courseCatalogueEntityList[0].fee
|
||||
}}</text
|
||||
>
|
||||
</view>
|
||||
<text class="list_item_study">了解课程</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<text v-show="showText && count > list.length" class="show-more"
|
||||
>加载更多</text
|
||||
>
|
||||
<text v-show="noMore" class="no-more">没有更多了</text>
|
||||
</scroll-view>
|
||||
<text class="null_text" v-else>{{ null_text }}</text>
|
||||
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import $http from "@/config/requestConfig.js";
|
||||
export default {
|
||||
props: {
|
||||
activeTab: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
tabsList: [],
|
||||
currentCateIndex: 0,
|
||||
list: [],
|
||||
null_text: "",
|
||||
|
||||
current: 1,
|
||||
limit: 10,
|
||||
courseName: "",
|
||||
taihumedId: null,
|
||||
|
||||
timer: null,
|
||||
showText: false,
|
||||
noMore: false,
|
||||
show: null,
|
||||
count: 0,
|
||||
scrollTop: 0, //滚动位置
|
||||
isRefreshing: false, //刷新状态
|
||||
};
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.isRefreshing = true;
|
||||
console.log("下拉刷新");
|
||||
|
||||
setTimeout(() => {
|
||||
this.current = 1;
|
||||
this.list = [];
|
||||
this.noMore = false;
|
||||
|
||||
this.getListData(this.tabsList[this.currentCateIndex].id);
|
||||
uni.stopPullDownRefresh();
|
||||
this.isRefreshing = false;
|
||||
console.log("下拉刷新已停止");
|
||||
}, 800);
|
||||
},
|
||||
onLoad() {
|
||||
uni.hideTabBar();
|
||||
this.getTabData();
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
//判断显示‘上/中/下’
|
||||
formatContent(content) {
|
||||
const keywords = ["上部", "中部", "下部"];
|
||||
let result = [];
|
||||
|
||||
// 判断是否包含关键字
|
||||
keywords.forEach((keyword) => {
|
||||
if (content.includes(keyword)) {
|
||||
result.push(keyword.substring(0, 1));
|
||||
}
|
||||
});
|
||||
return result.join("");
|
||||
},
|
||||
//获取tab数据
|
||||
getTabData() {
|
||||
this.$http
|
||||
.request({
|
||||
url: "taihumed/course/getCourseTaihumedList",
|
||||
method: "POST",
|
||||
data: {},
|
||||
header: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.list && res.list.length > 0) {
|
||||
this.tabsList = res.list;
|
||||
this.taihumedId = this.tabsList[0].id;
|
||||
this.getListData(this.taihumedId);
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取列表数据
|
||||
getListData(taihumedId, type) {
|
||||
if (type) {
|
||||
this.current = 1;
|
||||
this.list = [];
|
||||
this.noMore = false;
|
||||
}
|
||||
if (this.noMore) {
|
||||
return false;
|
||||
}
|
||||
uni.showLoading({
|
||||
title: "加载中",
|
||||
});
|
||||
this.$http
|
||||
.request({
|
||||
url: "taihumed/course/getCourseToTaihumedList",
|
||||
method: "POST",
|
||||
data: {
|
||||
current: this.current,
|
||||
limit: this.limit,
|
||||
taihumedId: taihumedId,
|
||||
userName: "",
|
||||
courseName: this.courseName,
|
||||
},
|
||||
header: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
uni.hideLoading();
|
||||
|
||||
this.count = res.pageRes.total; //总数
|
||||
let length = res.pageRes.records.length;
|
||||
if (res.pageRes.records && length > 0) {
|
||||
this.show = true;
|
||||
//如果返回的数据少于每页数量,表示没有更多数据
|
||||
if (
|
||||
this.count == length ||
|
||||
length < this.limit ||
|
||||
this.count / this.current == this.limit
|
||||
) {
|
||||
this.noMore = true;
|
||||
}
|
||||
this.list = [...this.list, ...res.pageRes.records];
|
||||
this.current += 1; //更新页码
|
||||
//显示提示语
|
||||
this.showText = true;
|
||||
|
||||
if (this.current == 2 || type) {
|
||||
this.scrollTop = 0;
|
||||
this.$nextTick(() => {
|
||||
this.scrollTop = 0.1; // 确保触发滚动
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.show = false;
|
||||
this.null_text = "暂无数据";
|
||||
}
|
||||
});
|
||||
},
|
||||
//加载更多
|
||||
loadMore() {
|
||||
this.getListData(this.taihumedId);
|
||||
},
|
||||
//切换tab状态
|
||||
ordersTabCLi(data, index) {
|
||||
this.currentCateIndex = index;
|
||||
this.courseName = "";
|
||||
this.taihumedId = data.id;
|
||||
//重置
|
||||
this.list = [];
|
||||
this.noMore = false;
|
||||
this.show = false;
|
||||
this.count = 0;
|
||||
this.current = 1;
|
||||
this.getListData(this.taihumedId);
|
||||
},
|
||||
//详情
|
||||
goToDetail(item) {
|
||||
if (this.isRefreshing) return;
|
||||
uni.navigateTo({
|
||||
url: `/pages/curriculum/index?navTitle=${item.title}&title=${item.title}&id=${item.id}`,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "@/static/mixin.scss";
|
||||
.content {
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
background-color: #fff;
|
||||
}
|
||||
.doctors_list {
|
||||
margin: 0 30rpx 20rpx;
|
||||
}
|
||||
.doctors_item {
|
||||
border: 1rpx solid $themeColor;
|
||||
border-radius: 15rpx;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 25rpx 25rpx 60rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
}
|
||||
.item_image {
|
||||
display: block;
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
flex-shrink: 0;
|
||||
background: #f3f3f3;
|
||||
}
|
||||
.item_right {
|
||||
width: calc(100% - 200rpx);
|
||||
margin-left: 30rpx;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
.item_top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
.item_name {
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
}
|
||||
.item_title {
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
}
|
||||
.item_con {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-top: 10rpx;
|
||||
line-height: 40rpx;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.null_text {
|
||||
display: block;
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
color: #999;
|
||||
padding-top: 300rpx;
|
||||
}
|
||||
.doctors_module {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
z-index: 99;
|
||||
left: 0;
|
||||
}
|
||||
.cateList {
|
||||
background: #f3f3f3;
|
||||
}
|
||||
.flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.name_search {
|
||||
background-color: #fff;
|
||||
padding: 20rpx 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
/deep/.is-input-border {
|
||||
background-color: #f3f3f3;
|
||||
border-radius: 50rpx;
|
||||
height: 60rpx;
|
||||
line-height: 30rpx;
|
||||
padding: 15rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
}
|
||||
/deep/.uni-easyinput__content-input {
|
||||
}
|
||||
.name-placeholder {
|
||||
font-size: 28rpx;
|
||||
text-align: center;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
button {
|
||||
background-color: $themeBgColor;
|
||||
font-size: 26rpx;
|
||||
line-height: 36rpx;
|
||||
border-radius: 15rpx;
|
||||
color: #fff;
|
||||
padding: 5rpx 20rpx;
|
||||
margin-left: 15rpx;
|
||||
}
|
||||
}
|
||||
.show-more,
|
||||
.no-more {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
font-size: 24rpx;
|
||||
padding-top: 5rpx;
|
||||
color: #ccc;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.list_item_study {
|
||||
line-height: 48rpx;
|
||||
background: $themeBgColor;
|
||||
color: #fff;
|
||||
border-radius: 40rpx;
|
||||
font-size: 24rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
.list_item_bt {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
bottom: 20rpx;
|
||||
}
|
||||
.list_item_price {
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
margin-right: 30rpx;
|
||||
color: red;
|
||||
line-height: 54rpx;
|
||||
}
|
||||
.tab-bar {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
// margin:0 0 30rpx;
|
||||
background-color: #f5f5f5;
|
||||
// border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
border-bottom: 1px solid #f2f6ff;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
font-size: 32rpx;
|
||||
color: #666;
|
||||
font-weight: bold;
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
/* 左边tab的圆角 */
|
||||
.left-tab.active {
|
||||
background-color: #ffffff;
|
||||
color: #0552c5;
|
||||
background-color: #e9f0ff;
|
||||
box-shadow: 0 0 8rpx rgba(0, 0, 0, 0.04),
|
||||
/* 外部柔光阴影 */ inset -4rpx 0 6rpx rgba(0, 0, 0, 0.03); /* 内阴影模拟夹层效果 */
|
||||
}
|
||||
|
||||
/* 右边tab的重点样式 */
|
||||
.right-tab.active {
|
||||
background-color: #ffffff;
|
||||
background-color: #e9f0ff;
|
||||
color: #0552c5;
|
||||
// border-left: 1px solid #e0e0e0;
|
||||
|
||||
font-weight: bold;
|
||||
z-index: 1;
|
||||
box-shadow: 0 0 8rpx rgba(0, 0, 0, 0.04),
|
||||
/* 外部柔光阴影 */ inset -4rpx 0 6rpx rgba(0, 0, 0, 0.03); /* 内阴影模拟夹层效果 */
|
||||
}
|
||||
</style>
|
||||
@@ -1,10 +1,37 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<z-nav-bar title="名医精彩" bgColor="#5188e5" fontColor="#fff" :backState="2000"></z-nav-bar>
|
||||
<z-nav-bar
|
||||
title="名医精彩"
|
||||
bgColor="#5188e5"
|
||||
fontColor="#fff"
|
||||
:backState="2000"
|
||||
></z-nav-bar>
|
||||
<view class="doctors_module" :style="`top: ${42 + statusBarHeight}px;`">
|
||||
<view class="cateList flexbox">
|
||||
<common-sticky itemStyle="width:33.3%; height: 38px;font-size:24rpx;" :list="tabsList" label="title"
|
||||
:currentCateIndex="currentCateIndex" @handleselectCate="ordersTabCLi"></common-sticky>
|
||||
<view class="tab-bar">
|
||||
<view
|
||||
class="tab-item left-tab"
|
||||
:class="{ active: activeTab === 0 }"
|
||||
@click="changeActiveTab(0)"
|
||||
>
|
||||
名医讲堂
|
||||
</view>
|
||||
<view
|
||||
class="tab-item right-tab"
|
||||
:class="{ active: activeTab === 1 }"
|
||||
@click="changeActiveTab(1)"
|
||||
>
|
||||
名医天地
|
||||
</view>
|
||||
</view>
|
||||
<template v-if="activeTab == 0">
|
||||
<view class="cateList flexbox" style="background-color: #fff">
|
||||
<common-sticky
|
||||
itemStyle="width:33.3%; height: 38px;font-size:24rpx;"
|
||||
:list="tabsList"
|
||||
label="title"
|
||||
:currentCateIndex="currentCateIndex"
|
||||
@handleselectCate="ordersTabCLi"
|
||||
></common-sticky>
|
||||
</view>
|
||||
<view class="name_search">
|
||||
<uni-easyinput
|
||||
@@ -16,22 +43,62 @@
|
||||
/>
|
||||
<button @click="getListData(taihumedId, true)">查询</button>
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="activeTab == 1">
|
||||
|
||||
<view class="name_search">
|
||||
<uni-easyinput
|
||||
v-model="courseName"
|
||||
prefixIcon="search"
|
||||
placeholder="按文章标题搜索"
|
||||
placeholderClass="name-placeholder"
|
||||
class="center-input"
|
||||
/>
|
||||
<button @click="getArticleListData(true)">查询</button>
|
||||
</view>
|
||||
<scroll-view scroll-y="true"
|
||||
</template>
|
||||
</view>
|
||||
|
||||
<scroll-view
|
||||
scroll-y="true"
|
||||
:scroll-top="scrollTop"
|
||||
@scrolltolower="loadMore"
|
||||
style="height: calc(100vh - 300rpx); margin-top: 185rpx; padding-bottom: 140rpx;"
|
||||
v-if="show==true">
|
||||
:style="`
|
||||
height: calc(100vh - ${activeTab==0?320:280}rpx);
|
||||
margin-top: ${activeTab==0?260:180}rpx;
|
||||
padding-bottom: 140rpx;`
|
||||
"
|
||||
v-if="show == true"
|
||||
>
|
||||
<view class="doctors_list" id="top">
|
||||
<view class="doctors_item" v-for="(item,index) in list" :key="index" @click="goToDetail(item)">
|
||||
<view
|
||||
class="doctors_item"
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
@click="goToDetail(item)"
|
||||
>
|
||||
<view class="flex">
|
||||
<view class="flex">
|
||||
<image v-if="item.squareImage" :src="item.squareImage" class="item_image" mode="aspectFit"></image>
|
||||
<image v-else src="../../static/logo_zi.png" class="item_image" mode="aspectFit"></image>
|
||||
<image
|
||||
v-if="item.squareImage"
|
||||
:src="item.squareImage"
|
||||
class="item_image"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
<image
|
||||
v-else
|
||||
src="../../static/logo_zi.png"
|
||||
class="item_image"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
|
||||
<view class="item_right" v-if="currentCateIndex != 2">
|
||||
<view class="item_top">
|
||||
<text class="item_name" v-if="item.taihuTalent&&item.taihuTalent.length>0">{{item.taihuTalent[0].name}}</text>
|
||||
<text
|
||||
class="item_name"
|
||||
v-if="item.taihuTalent && item.taihuTalent.length > 0"
|
||||
>{{ item.taihuTalent[0].name }}</text
|
||||
>
|
||||
</view>
|
||||
<text class="item_con">{{ item.title }}</text>
|
||||
</view>
|
||||
@@ -40,48 +107,79 @@
|
||||
<view class="item_top">
|
||||
<text class="item_name">{{ item.title }}</text>
|
||||
</view>
|
||||
<text class="item_con">{{ item.taihuTalent.map(talent => talent.name).join(' ') }}</text>
|
||||
<text class="item_con">{{
|
||||
item.taihuTalent.map((talent) => talent.name).join(" ")
|
||||
}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="list_item_bt">
|
||||
<view class="list_item_price" v-if="item.courseCatalogueEntityList.length==1">
|
||||
<text v-if="item.courseCatalogueEntityList[0].halfFee==0">免费</text>
|
||||
<text v-else>¥{{item.courseCatalogueEntityList[0].halfFee}}/{{item.courseCatalogueEntityList[0].fee}}</text>
|
||||
<view
|
||||
class="list_item_price"
|
||||
v-if="item.courseCatalogueEntityList.length == 1"
|
||||
>
|
||||
<text v-if="item.courseCatalogueEntityList[0].halfFee == 0"
|
||||
>免费</text
|
||||
>
|
||||
<text v-else
|
||||
>¥{{ item.courseCatalogueEntityList[0].halfFee }}/{{
|
||||
item.courseCatalogueEntityList[0].fee
|
||||
}}</text
|
||||
>
|
||||
</view>
|
||||
<view class="list_item_price" v-if="item.courseCatalogueEntityList.length>1">
|
||||
<view
|
||||
class="list_item_price"
|
||||
v-if="item.courseCatalogueEntityList.length > 1"
|
||||
>
|
||||
<text v-for="(v, i) in item.courseCatalogueEntityList" :key="i">
|
||||
{{formatContent(v.title)}}<text v-if="i !== item.courseCatalogueEntityList.length - 1">/</text>
|
||||
{{ formatContent(v.title)
|
||||
}}<text v-if="i !== item.courseCatalogueEntityList.length - 1"
|
||||
>/</text
|
||||
>
|
||||
</text>
|
||||
<text v-if="item.courseCatalogueEntityList[0].halfFee==0" style="padding-left: 20rpx;">免费</text>
|
||||
<text v-else style="margin-left: 20rpx;">各{{item.courseCatalogueEntityList[0].halfFee}}/{{item.courseCatalogueEntityList[0].fee}}</text>
|
||||
<text
|
||||
v-if="item.courseCatalogueEntityList[0].halfFee == 0"
|
||||
style="padding-left: 20rpx"
|
||||
>免费</text
|
||||
>
|
||||
<text v-else style="margin-left: 20rpx"
|
||||
>各{{ item.courseCatalogueEntityList[0].halfFee }}/{{
|
||||
item.courseCatalogueEntityList[0].fee
|
||||
}}</text
|
||||
>
|
||||
</view>
|
||||
<text class="list_item_study">了解课程</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<text v-show="showText&&count>list.length" class="show-more">加载更多</text>
|
||||
<text v-show="showText && count > list.length" class="show-more"
|
||||
>加载更多</text
|
||||
>
|
||||
<text v-show="noMore" class="no-more">没有更多了</text>
|
||||
</scroll-view>
|
||||
<text class="null_text" v-else>{{ null_text }}</text>
|
||||
|
||||
|
||||
<z-navigation></z-navigation>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import $http from "@/config/requestConfig.js";
|
||||
import commonArticle from "./article.vue";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
activeTab: 0,
|
||||
tabsList: [],
|
||||
currentCateIndex: 0,
|
||||
list: [],
|
||||
null_text: '',
|
||||
null_text: "",
|
||||
|
||||
current: 1,
|
||||
limit: 10,
|
||||
courseName: '',
|
||||
courseName: "",
|
||||
taihumedId: null,
|
||||
|
||||
timer: null,
|
||||
@@ -91,8 +189,13 @@ export default {
|
||||
count: 0,
|
||||
scrollTop: 0, //滚动位置
|
||||
isRefreshing: false, //刷新状态
|
||||
}
|
||||
};
|
||||
},
|
||||
components: {
|
||||
commonArticle,
|
||||
},
|
||||
|
||||
|
||||
onPullDownRefresh() {
|
||||
this.isRefreshing = true;
|
||||
console.log("下拉刷新");
|
||||
@@ -112,10 +215,18 @@ export default {
|
||||
uni.hideTabBar();
|
||||
this.getTabData();
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
changeActiveTab(e){
|
||||
this.activeTab=e
|
||||
if(e==0){
|
||||
this.taihumedId = this.tabsList[0].id;
|
||||
this.getListData(this.taihumedId);
|
||||
}
|
||||
else{
|
||||
this.getArticleListData(true);
|
||||
}
|
||||
},
|
||||
//判断显示‘上/中/下’
|
||||
formatContent(content) {
|
||||
const keywords = ["上部", "中部", "下部"];
|
||||
@@ -131,20 +242,85 @@ export default {
|
||||
},
|
||||
//获取tab数据
|
||||
getTabData() {
|
||||
this.$http.request({
|
||||
url: 'taihumed/course/getCourseTaihumedList',
|
||||
if(this.activeTab==0){
|
||||
this.$http
|
||||
.request({
|
||||
url: "taihumed/course/getCourseTaihumedList",
|
||||
method: "POST",
|
||||
data: {},
|
||||
header: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(res=> {
|
||||
.then((res) => {
|
||||
if (res.list && res.list.length > 0) {
|
||||
this.tabsList = res.list;
|
||||
this.taihumedId = this.tabsList[0].id;
|
||||
this.getListData(this.taihumedId);
|
||||
}
|
||||
});
|
||||
}
|
||||
else if(this.activeTab==1){
|
||||
this.getArticleListData();
|
||||
}
|
||||
|
||||
},
|
||||
//获取列表数据
|
||||
getArticleListData(type) {
|
||||
if (type) {
|
||||
this.current = 1;
|
||||
this.list = [];
|
||||
this.noMore = false;
|
||||
}
|
||||
if (this.noMore) {
|
||||
return false;
|
||||
}
|
||||
uni.showLoading({
|
||||
title: "加载中",
|
||||
});
|
||||
this.$http
|
||||
.request({
|
||||
url: "common/taihuTalentArticle/getArticleList",
|
||||
method: "POST",
|
||||
data: {
|
||||
current: this.current,
|
||||
limit: this.limit,
|
||||
|
||||
},
|
||||
header: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
uni.hideLoading();
|
||||
|
||||
this.count = res.pageRes.total; //总数
|
||||
let length = res.pageRes.records.length;
|
||||
if (res.pageRes.records && length > 0) {
|
||||
this.show = true;
|
||||
//如果返回的数据少于每页数量,表示没有更多数据
|
||||
if (
|
||||
this.count == length ||
|
||||
length < this.limit ||
|
||||
this.count / this.current == this.limit
|
||||
) {
|
||||
this.noMore = true;
|
||||
}
|
||||
this.list = [...this.list, ...res.pageRes.records];
|
||||
this.current += 1; //更新页码
|
||||
//显示提示语
|
||||
this.showText = true;
|
||||
|
||||
if (this.current == 2 || type) {
|
||||
this.scrollTop = 0;
|
||||
this.$nextTick(() => {
|
||||
this.scrollTop = 0.1; // 确保触发滚动
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.show = false;
|
||||
this.null_text = "暂无数据";
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取列表数据
|
||||
@@ -156,25 +332,26 @@ export default {
|
||||
}
|
||||
if (this.noMore) {
|
||||
return false;
|
||||
};
|
||||
}
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
})
|
||||
this.$http.request({
|
||||
url: 'taihumed/course/getCourseToTaihumedList',
|
||||
title: "加载中",
|
||||
});
|
||||
this.$http
|
||||
.request({
|
||||
url: "taihumed/course/getCourseToTaihumedList",
|
||||
method: "POST",
|
||||
data: {
|
||||
current: this.current,
|
||||
limit: this.limit,
|
||||
taihumedId: taihumedId,
|
||||
userName: '',
|
||||
courseName: this.courseName
|
||||
userName: "",
|
||||
courseName: this.courseName,
|
||||
},
|
||||
header: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(res=> {
|
||||
.then((res) => {
|
||||
uni.hideLoading();
|
||||
|
||||
this.count = res.pageRes.total; //总数
|
||||
@@ -182,7 +359,11 @@ export default {
|
||||
if (res.pageRes.records && length > 0) {
|
||||
this.show = true;
|
||||
//如果返回的数据少于每页数量,表示没有更多数据
|
||||
if(this.count==length || length < this.limit ||this.count/this.current==this.limit){
|
||||
if (
|
||||
this.count == length ||
|
||||
length < this.limit ||
|
||||
this.count / this.current == this.limit
|
||||
) {
|
||||
this.noMore = true;
|
||||
}
|
||||
this.list = [...this.list, ...res.pageRes.records];
|
||||
@@ -191,25 +372,30 @@ export default {
|
||||
this.showText = true;
|
||||
|
||||
if (this.current == 2 || type) {
|
||||
this.scrollTop = 0
|
||||
this.scrollTop = 0;
|
||||
this.$nextTick(() => {
|
||||
this.scrollTop = 0.1; // 确保触发滚动
|
||||
})
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.show = false;
|
||||
this.null_text = '暂无数据';
|
||||
this.null_text = "暂无数据";
|
||||
}
|
||||
});
|
||||
},
|
||||
//加载更多
|
||||
loadMore() {
|
||||
if(this.activeTab==0){
|
||||
this.getListData(this.taihumedId);
|
||||
}else{
|
||||
this.getArticleListData();
|
||||
}
|
||||
|
||||
},
|
||||
//切换tab状态
|
||||
ordersTabCLi(data, index) {
|
||||
this.currentCateIndex = index;
|
||||
this.courseName = '';
|
||||
this.courseName = "";
|
||||
this.taihumedId = data.id;
|
||||
//重置
|
||||
this.list = [];
|
||||
@@ -223,16 +409,15 @@ export default {
|
||||
goToDetail(item) {
|
||||
if (this.isRefreshing) return;
|
||||
uni.navigateTo({
|
||||
url: `/pages/curriculum/index?navTitle=${item.title}&title=${item.title}&id=${item.id}`
|
||||
url: `/pages/curriculum/index?navTitle=${item.title}&title=${item.title}&id=${item.id}`,
|
||||
});
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '@/static/mixin.scss';
|
||||
@import "@/static/mixin.scss";
|
||||
.content {
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
@@ -326,7 +511,6 @@ export default {
|
||||
color: #666;
|
||||
}
|
||||
/deep/.uni-easyinput__content-input {
|
||||
|
||||
}
|
||||
.name-placeholder {
|
||||
font-size: 28rpx;
|
||||
@@ -344,7 +528,8 @@ export default {
|
||||
margin-left: 15rpx;
|
||||
}
|
||||
}
|
||||
.show-more,.no-more{
|
||||
.show-more,
|
||||
.no-more {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
font-size: 24rpx;
|
||||
@@ -353,7 +538,6 @@ export default {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
.list_item_study {
|
||||
line-height: 48rpx;
|
||||
background: $themeBgColor;
|
||||
@@ -376,4 +560,46 @@ export default {
|
||||
color: red;
|
||||
line-height: 54rpx;
|
||||
}
|
||||
.tab-bar {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
// margin:0 0 30rpx;
|
||||
background-color: #f5f5f5;
|
||||
// border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
border-bottom: 1px solid #f2f6ff;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
font-size: 32rpx;
|
||||
color: #666;
|
||||
font-weight: bold;
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
/* 左边tab的圆角 */
|
||||
.left-tab.active {
|
||||
background-color: #ffffff;
|
||||
color: #0552c5;
|
||||
background-color: #e9f0ff;
|
||||
box-shadow: 0 0 8rpx rgba(0, 0, 0, 0.04),
|
||||
/* 外部柔光阴影 */ inset -4rpx 0 6rpx rgba(0, 0, 0, 0.03); /* 内阴影模拟夹层效果 */
|
||||
}
|
||||
|
||||
/* 右边tab的重点样式 */
|
||||
.right-tab.active {
|
||||
background-color: #ffffff;
|
||||
background-color: #e9f0ff;
|
||||
color: #0552c5;
|
||||
// border-left: 1px solid #e0e0e0;
|
||||
|
||||
font-weight: bold;
|
||||
z-index: 1;
|
||||
box-shadow: 0 0 8rpx rgba(0, 0, 0, 0.04),
|
||||
/* 外部柔光阴影 */ inset -4rpx 0 6rpx rgba(0, 0, 0, 0.03); /* 内阴影模拟夹层效果 */
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -145,6 +145,11 @@ export default {
|
||||
url: "/pages/order/index",
|
||||
type: "pageJump"
|
||||
},
|
||||
{
|
||||
name: "我的文章",
|
||||
url: "/pages/articleList/index",
|
||||
type: "pageJump"
|
||||
},
|
||||
{
|
||||
name: "我的医案",
|
||||
url: "/pages/medicalRecords/index",
|
||||
|
||||
10
uni_modules/piaoyi-editor/changelog.md
Normal file
10
uni_modules/piaoyi-editor/changelog.md
Normal file
@@ -0,0 +1,10 @@
|
||||
## 1.1.0(2024-04-19)
|
||||
解决不存在问题
|
||||
## 1.0.9(2024-02-04)
|
||||
更新使用文档说明
|
||||
## 1.0.8(2023-12-28)
|
||||
修改文档使用注意事项
|
||||
## 1.0.7(2023-12-05)
|
||||
优化
|
||||
## 1.0.6(2023-12-05)
|
||||
优化
|
||||
@@ -0,0 +1,784 @@
|
||||
<template>
|
||||
<view v-if="show" class="t-wrapper" @touchmove.stop.prevent="moveHandle">
|
||||
<view class="t-mask" :class="{active:active}" @click.stop="close"></view>
|
||||
<view class="t-box" :class="{active:active}">
|
||||
<view class="t-header">
|
||||
<view class="t-header-button" @click="close">取消</view>
|
||||
<view class="t-header-button" @click="confirm">确认</view>
|
||||
</view>
|
||||
<view class="t-color__box" :style="{ background: 'rgb(' + bgcolor.r + ',' + bgcolor.g + ',' + bgcolor.b + ')'}">
|
||||
<view class="t-background boxs" @touchstart="touchstart($event, 0)" @touchmove="touchmove($event, 0)" @touchend="touchend($event, 0)">
|
||||
<view class="t-color-mask"></view>
|
||||
<view class="t-pointer" :style="{ top: site[0].top - 8 + 'px', left: site[0].left - 8 + 'px' }"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="t-control__box">
|
||||
<view class="t-control__color">
|
||||
<view class="t-control__color-content" :style="{ background: 'rgba(' + rgba.r + ',' + rgba.g + ',' + rgba.b + ',' + rgba.a + ')' }"></view>
|
||||
</view>
|
||||
<view class="t-control-box__item">
|
||||
<view class="t-controller boxs" @touchstart="touchstart($event, 1)" @touchmove="touchmove($event, 1)" @touchend="touchend($event, 1)">
|
||||
<view class="t-hue">
|
||||
<view class="t-circle" :style="{ left: site[1].left - 12 + 'px' }"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="t-controller boxs" @touchstart="touchstart($event, 2)" @touchmove="touchmove($event, 2)" @touchend="touchend($event, 2)">
|
||||
<view class="t-transparency">
|
||||
<view class="t-circle" :style="{ left: site[2].left - 12 + 'px' }"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="t-result__box">
|
||||
<view v-if="mode" class="t-result__item">
|
||||
<view class="t-result__box-input">{{hex}}</view>
|
||||
<view class="t-result__box-text">HEX</view>
|
||||
</view>
|
||||
<template v-else>
|
||||
<view class="t-result__item">
|
||||
<view class="t-result__box-input">{{rgba.r}}</view>
|
||||
<view class="t-result__box-text">R</view>
|
||||
</view>
|
||||
<view class="t-result__item">
|
||||
<view class="t-result__box-input">{{rgba.g}}</view>
|
||||
<view class="t-result__box-text">G</view>
|
||||
</view>
|
||||
<view class="t-result__item">
|
||||
<view class="t-result__box-input">{{rgba.b}}</view>
|
||||
<view class="t-result__box-text">B</view>
|
||||
</view>
|
||||
<view class="t-result__item">
|
||||
<view class="t-result__box-input">{{rgba.a}}</view>
|
||||
<view class="t-result__box-text">A</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<view class="t-result__item t-select" @click="select">
|
||||
<view class="t-result__box-input">
|
||||
<view>切换</view>
|
||||
<view>模式</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="t-alternative">
|
||||
<view class="t-alternative__item" v-for="(item,index) in colorList" :key="index">
|
||||
<view class="t-alternative__item-content" :style="{ background: 'rgba(' + item.r + ',' + item.g + ',' + item.b + ',' + item.a + ')' }"
|
||||
@click="selectColor(item)">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
color: {
|
||||
type: Object,
|
||||
default () {
|
||||
return {
|
||||
r: 0,
|
||||
g: 0,
|
||||
b: 0,
|
||||
a: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
spareColor: {
|
||||
type: Array,
|
||||
default () {
|
||||
return []
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
active: false,
|
||||
// rgba 颜色
|
||||
rgba: {
|
||||
r: 0,
|
||||
g: 0,
|
||||
b: 0,
|
||||
a: 1
|
||||
},
|
||||
// hsb 颜色
|
||||
hsb: {
|
||||
h: 0,
|
||||
s: 0,
|
||||
b: 0
|
||||
},
|
||||
site: [{
|
||||
top: 0,
|
||||
left: 0
|
||||
}, {
|
||||
left: 0
|
||||
}, {
|
||||
left: 0
|
||||
}],
|
||||
index: 0,
|
||||
bgcolor: {
|
||||
r: 255,
|
||||
g: 0,
|
||||
b: 0,
|
||||
a: 1
|
||||
},
|
||||
hex: '#000000',
|
||||
mode: true,
|
||||
colorList: [{
|
||||
r: 244,
|
||||
g: 67,
|
||||
b: 54,
|
||||
a: 1
|
||||
}, {
|
||||
r: 233,
|
||||
g: 30,
|
||||
b: 99,
|
||||
a: 1
|
||||
}, {
|
||||
r: 156,
|
||||
g: 39,
|
||||
b: 176,
|
||||
a: 1
|
||||
}, {
|
||||
r: 103,
|
||||
g: 58,
|
||||
b: 183,
|
||||
a: 1
|
||||
}, {
|
||||
r: 63,
|
||||
g: 81,
|
||||
b: 181,
|
||||
a: 1
|
||||
}, {
|
||||
r: 33,
|
||||
g: 150,
|
||||
b: 243,
|
||||
a: 1
|
||||
}, {
|
||||
r: 3,
|
||||
g: 169,
|
||||
b: 244,
|
||||
a: 1
|
||||
}, {
|
||||
r: 0,
|
||||
g: 188,
|
||||
b: 212,
|
||||
a: 1
|
||||
}, {
|
||||
r: 0,
|
||||
g: 150,
|
||||
b: 136,
|
||||
a: 1
|
||||
}, {
|
||||
r: 76,
|
||||
g: 175,
|
||||
b: 80,
|
||||
a: 1
|
||||
}, {
|
||||
r: 139,
|
||||
g: 195,
|
||||
b: 74,
|
||||
a: 1
|
||||
}, {
|
||||
r: 205,
|
||||
g: 220,
|
||||
b: 57,
|
||||
a: 1
|
||||
}, {
|
||||
r: 255,
|
||||
g: 235,
|
||||
b: 59,
|
||||
a: 1
|
||||
}, {
|
||||
r: 255,
|
||||
g: 193,
|
||||
b: 7,
|
||||
a: 1
|
||||
}, {
|
||||
r: 255,
|
||||
g: 152,
|
||||
b: 0,
|
||||
a: 1
|
||||
}, {
|
||||
r: 255,
|
||||
g: 87,
|
||||
b: 34,
|
||||
a: 1
|
||||
}, {
|
||||
r: 121,
|
||||
g: 85,
|
||||
b: 72,
|
||||
a: 1
|
||||
}, {
|
||||
r: 158,
|
||||
g: 158,
|
||||
b: 158,
|
||||
a: 1
|
||||
}, {
|
||||
r: 0,
|
||||
g: 0,
|
||||
b: 0,
|
||||
a: 0.5
|
||||
}, {
|
||||
r: 0,
|
||||
g: 0,
|
||||
b: 0,
|
||||
a: 0
|
||||
}, ]
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.rgba = this.color;
|
||||
if (this.spareColor.length !== 0) {
|
||||
this.colorList = this.spareColor;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 初始化
|
||||
*/
|
||||
init() {
|
||||
// hsb 颜色
|
||||
this.hsb = this.rgbToHex(this.rgba);
|
||||
// this.setColor();
|
||||
this.setValue(this.rgba);
|
||||
},
|
||||
moveHandle() {},
|
||||
open() {
|
||||
this.show = true;
|
||||
this.$nextTick(() => {
|
||||
this.init();
|
||||
setTimeout(() => {
|
||||
this.active = true;
|
||||
setTimeout(() => {
|
||||
this.getSelectorQuery();
|
||||
}, 350)
|
||||
}, 50)
|
||||
})
|
||||
|
||||
},
|
||||
close() {
|
||||
this.active = false;
|
||||
this.$nextTick(() => {
|
||||
setTimeout(() => {
|
||||
this.show = false;
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
confirm() {
|
||||
this.close();
|
||||
this.$emit('confirm', {
|
||||
rgba: this.rgba,
|
||||
hex: this.hex
|
||||
})
|
||||
},
|
||||
// 选择模式
|
||||
select() {
|
||||
this.mode = !this.mode
|
||||
},
|
||||
// 常用颜色选择
|
||||
selectColor(item) {
|
||||
this.setColorBySelect(item)
|
||||
},
|
||||
touchstart(e, index) {
|
||||
const {
|
||||
pageX,
|
||||
pageY
|
||||
} = e.touches[0];
|
||||
this.pageX = pageX;
|
||||
this.pageY = pageY;
|
||||
this.setPosition(pageX, pageY, index);
|
||||
},
|
||||
touchmove(e, index) {
|
||||
const {
|
||||
pageX,
|
||||
pageY
|
||||
} = e.touches[0];
|
||||
this.moveX = pageX;
|
||||
this.moveY = pageY;
|
||||
this.setPosition(pageX, pageY, index);
|
||||
},
|
||||
touchend(e, index) {},
|
||||
/**
|
||||
* 设置位置
|
||||
*/
|
||||
setPosition(x, y, index) {
|
||||
this.index = index;
|
||||
const {
|
||||
top,
|
||||
left,
|
||||
width,
|
||||
height
|
||||
} = this.position[index];
|
||||
// 设置最大最小值
|
||||
|
||||
this.site[index].left = Math.max(0, Math.min(parseInt(x - left), width));
|
||||
if (index === 0) {
|
||||
this.site[index].top = Math.max(0, Math.min(parseInt(y - top), height));
|
||||
// 设置颜色
|
||||
this.hsb.s = parseInt((100 * this.site[index].left) / width);
|
||||
this.hsb.b = parseInt(100 - (100 * this.site[index].top) / height);
|
||||
this.setColor();
|
||||
this.setValue(this.rgba);
|
||||
} else {
|
||||
this.setControl(index, this.site[index].left);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 设置 rgb 颜色
|
||||
*/
|
||||
setColor() {
|
||||
const rgb = this.HSBToRGB(this.hsb);
|
||||
this.rgba.r = rgb.r;
|
||||
this.rgba.g = rgb.g;
|
||||
this.rgba.b = rgb.b;
|
||||
},
|
||||
/**
|
||||
* 设置二进制颜色
|
||||
* @param {Object} rgb
|
||||
*/
|
||||
setValue(rgb) {
|
||||
this.hex = '#' + this.rgbToHex(rgb);
|
||||
},
|
||||
setControl(index, x) {
|
||||
const {
|
||||
top,
|
||||
left,
|
||||
width,
|
||||
height
|
||||
} = this.position[index];
|
||||
|
||||
if (index === 1) {
|
||||
this.hsb.h = parseInt((360 * x) / width);
|
||||
this.bgcolor = this.HSBToRGB({
|
||||
h: this.hsb.h,
|
||||
s: 100,
|
||||
b: 100
|
||||
});
|
||||
this.setColor()
|
||||
} else {
|
||||
this.rgba.a = (x / width).toFixed(1);
|
||||
}
|
||||
this.setValue(this.rgba);
|
||||
},
|
||||
/**
|
||||
* rgb 转 二进制 hex
|
||||
* @param {Object} rgb
|
||||
*/
|
||||
rgbToHex(rgb) {
|
||||
let hex = [rgb.r.toString(16), rgb.g.toString(16), rgb.b.toString(16)];
|
||||
hex.map(function(str, i) {
|
||||
if (str.length == 1) {
|
||||
hex[i] = '0' + str;
|
||||
}
|
||||
});
|
||||
return hex.join('');
|
||||
},
|
||||
setColorBySelect(getrgb) {
|
||||
const {
|
||||
r,
|
||||
g,
|
||||
b,
|
||||
a
|
||||
} = getrgb;
|
||||
let rgb = {}
|
||||
rgb = {
|
||||
r: r ? parseInt(r) : 0,
|
||||
g: g ? parseInt(g) : 0,
|
||||
b: b ? parseInt(b) : 0,
|
||||
a: a ? a : 0,
|
||||
};
|
||||
this.rgba = rgb;
|
||||
this.hsb = this.rgbToHsb(rgb);
|
||||
this.changeViewByHsb();
|
||||
},
|
||||
changeViewByHsb() {
|
||||
const [a, b, c] = this.position;
|
||||
this.site[0].left = parseInt(this.hsb.s * a.width / 100);
|
||||
this.site[0].top = parseInt((100 - this.hsb.b) * a.height / 100);
|
||||
this.setColor(this.hsb.h);
|
||||
this.setValue(this.rgba);
|
||||
this.bgcolor = this.HSBToRGB({
|
||||
h: this.hsb.h,
|
||||
s: 100,
|
||||
b: 100
|
||||
});
|
||||
|
||||
this.site[1].left = this.hsb.h / 360 * b.width;
|
||||
this.site[2].left = this.rgba.a * c.width;
|
||||
|
||||
},
|
||||
/**
|
||||
* hsb 转 rgb
|
||||
* @param {Object} 颜色模式 H(hues)表示色相,S(saturation)表示饱和度,B(brightness)表示亮度
|
||||
*/
|
||||
HSBToRGB(hsb) {
|
||||
let rgb = {};
|
||||
let h = Math.round(hsb.h);
|
||||
let s = Math.round((hsb.s * 255) / 100);
|
||||
let v = Math.round((hsb.b * 255) / 100);
|
||||
if (s == 0) {
|
||||
rgb.r = rgb.g = rgb.b = v;
|
||||
} else {
|
||||
let t1 = v;
|
||||
let t2 = ((255 - s) * v) / 255;
|
||||
let t3 = ((t1 - t2) * (h % 60)) / 60;
|
||||
if (h == 360) h = 0;
|
||||
if (h < 60) {
|
||||
rgb.r = t1;
|
||||
rgb.b = t2;
|
||||
rgb.g = t2 + t3;
|
||||
} else if (h < 120) {
|
||||
rgb.g = t1;
|
||||
rgb.b = t2;
|
||||
rgb.r = t1 - t3;
|
||||
} else if (h < 180) {
|
||||
rgb.g = t1;
|
||||
rgb.r = t2;
|
||||
rgb.b = t2 + t3;
|
||||
} else if (h < 240) {
|
||||
rgb.b = t1;
|
||||
rgb.r = t2;
|
||||
rgb.g = t1 - t3;
|
||||
} else if (h < 300) {
|
||||
rgb.b = t1;
|
||||
rgb.g = t2;
|
||||
rgb.r = t2 + t3;
|
||||
} else if (h < 360) {
|
||||
rgb.r = t1;
|
||||
rgb.g = t2;
|
||||
rgb.b = t1 - t3;
|
||||
} else {
|
||||
rgb.r = 0;
|
||||
rgb.g = 0;
|
||||
rgb.b = 0;
|
||||
}
|
||||
}
|
||||
return {
|
||||
r: Math.round(rgb.r),
|
||||
g: Math.round(rgb.g),
|
||||
b: Math.round(rgb.b)
|
||||
};
|
||||
},
|
||||
rgbToHsb(rgb) {
|
||||
let hsb = {
|
||||
h: 0,
|
||||
s: 0,
|
||||
b: 0
|
||||
};
|
||||
let min = Math.min(rgb.r, rgb.g, rgb.b);
|
||||
let max = Math.max(rgb.r, rgb.g, rgb.b);
|
||||
let delta = max - min;
|
||||
hsb.b = max;
|
||||
hsb.s = max != 0 ? 255 * delta / max : 0;
|
||||
if (hsb.s != 0) {
|
||||
if (rgb.r == max) hsb.h = (rgb.g - rgb.b) / delta;
|
||||
else if (rgb.g == max) hsb.h = 2 + (rgb.b - rgb.r) / delta;
|
||||
else hsb.h = 4 + (rgb.r - rgb.g) / delta;
|
||||
} else hsb.h = -1;
|
||||
hsb.h *= 60;
|
||||
if (hsb.h < 0) hsb.h = 0;
|
||||
hsb.s *= 100 / 255;
|
||||
hsb.b *= 100 / 255;
|
||||
return hsb;
|
||||
},
|
||||
getSelectorQuery() {
|
||||
const views = uni.createSelectorQuery().in(this);
|
||||
views
|
||||
.selectAll('.boxs')
|
||||
.boundingClientRect(data => {
|
||||
if (!data || data.length === 0) {
|
||||
setTimeout(() => this.getSelectorQuery(), 20)
|
||||
return
|
||||
}
|
||||
this.position = data;
|
||||
// this.site[0].top = data[0].height;
|
||||
// this.site[0].left = 0;
|
||||
// this.site[1].left = data[1].width;
|
||||
// this.site[2].left = data[2].width;
|
||||
this.setColorBySelect(this.rgba);
|
||||
})
|
||||
.exec();
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
spareColor(newVal) {
|
||||
this.colorList = newVal;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.t-wrapper {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.t-box {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
padding: 30upx 0;
|
||||
padding-top: 0;
|
||||
background: #fff;
|
||||
transition: all 0.3s;
|
||||
transform: translateY(100%);
|
||||
}
|
||||
|
||||
.t-box.active {
|
||||
transform: translateY(0%);
|
||||
}
|
||||
|
||||
.t-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
height: 100upx;
|
||||
border-bottom: 1px #eee solid;
|
||||
box-shadow: 1px 0 2px rgba(0, 0, 0, 0.1);
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.t-header-button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 150upx;
|
||||
height: 100upx;
|
||||
font-size: 30upx;
|
||||
color: #666;
|
||||
padding-left: 20upx;
|
||||
}
|
||||
|
||||
.t-header-button:last-child {
|
||||
justify-content: flex-end;
|
||||
padding-right: 20upx;
|
||||
}
|
||||
|
||||
.t-mask {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
z-index: -1;
|
||||
transition: all 0.3s;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.t-mask.active {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.t-color__box {
|
||||
position: relative;
|
||||
height: 400upx;
|
||||
background: rgb(255, 0, 0);
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
margin: 0 20upx;
|
||||
margin-top: 20upx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.t-background {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
|
||||
}
|
||||
|
||||
.t-color-mask {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 400upx;
|
||||
background: linear-gradient(to top, #000, rgba(0, 0, 0, 0));
|
||||
}
|
||||
|
||||
.t-pointer {
|
||||
position: absolute;
|
||||
bottom: -8px;
|
||||
left: -8px;
|
||||
z-index: 2;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
border: 1px #fff solid;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.t-show-color {
|
||||
width: 100upx;
|
||||
height: 50upx;
|
||||
}
|
||||
|
||||
.t-control__box {
|
||||
margin-top: 50upx;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
padding-left: 20upx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.t-control__color {
|
||||
flex-shrink: 0;
|
||||
width: 100upx;
|
||||
height: 100upx;
|
||||
border-radius: 50%;
|
||||
background-color: #fff;
|
||||
background-image: linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%, #eee),
|
||||
linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%, #eee);
|
||||
background-size: 36upx 36upx;
|
||||
background-position: 0 0, 18upx 18upx;
|
||||
border: 1px #eee solid;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.t-control__color-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.t-control-box__item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
padding: 0 30upx;
|
||||
}
|
||||
|
||||
.t-controller {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 16px;
|
||||
background-color: #fff;
|
||||
background-image: linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%, #eee),
|
||||
linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%, #eee);
|
||||
background-size: 32upx 32upx;
|
||||
background-position: 0 0, 16upx 16upx;
|
||||
}
|
||||
|
||||
.t-hue {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
||||
}
|
||||
|
||||
.t-transparency {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgb(0, 0, 0));
|
||||
}
|
||||
|
||||
.t-circle {
|
||||
position: absolute;
|
||||
/* right: -10px; */
|
||||
top: -2px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
box-sizing: border-box;
|
||||
border-radius: 50%;
|
||||
background: #fff;
|
||||
box-shadow: 0 0 2px 1px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.t-result__box {
|
||||
margin-top: 20upx;
|
||||
padding: 10upx;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.t-result__item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 10upx;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.t-result__box-input {
|
||||
padding: 10upx 0;
|
||||
width: 100%;
|
||||
font-size: 28upx;
|
||||
box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.1);
|
||||
color: #999;
|
||||
text-align: center;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.t-result__box-text {
|
||||
margin-top: 10upx;
|
||||
font-size: 28upx;
|
||||
line-height: 2;
|
||||
}
|
||||
|
||||
.t-select {
|
||||
flex-shrink: 0;
|
||||
width: 150upx;
|
||||
padding: 0 30upx;
|
||||
}
|
||||
|
||||
.t-select .t-result__box-input {
|
||||
border-radius: 10upx;
|
||||
border: none;
|
||||
color: #999;
|
||||
box-shadow: 1px 1px 2px 1px rgba(0, 0, 0, 0.1);
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.t-select .t-result__box-input:active {
|
||||
box-shadow: 0px 0px 1px 0px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.t-alternative {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
/* justify-content: space-between; */
|
||||
width: 100%;
|
||||
padding-right: 10upx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.t-alternative__item {
|
||||
margin-left: 12upx;
|
||||
margin-top: 10upx;
|
||||
width: 50upx;
|
||||
height: 50upx;
|
||||
border-radius: 10upx;
|
||||
background-color: #fff;
|
||||
background-image: linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%, #eee),
|
||||
linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%, #eee);
|
||||
background-size: 36upx 36upx;
|
||||
background-position: 0 0, 18upx 18upx;
|
||||
border: 1px #eee solid;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.t-alternative__item-content {
|
||||
width: 50upx;
|
||||
height: 50upx;
|
||||
background: rgba(255, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.t-alternative__item:active {
|
||||
transition: all 0.3s;
|
||||
transform: scale(1.1);
|
||||
}
|
||||
</style>
|
||||
123
uni_modules/piaoyi-editor/components/piaoyi-editor/iconfont.css
Normal file
123
uni_modules/piaoyi-editor/components/piaoyi-editor/iconfont.css
Normal file
@@ -0,0 +1,123 @@
|
||||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 4040150 */
|
||||
src: url('iconfont.woff2?t=1682491617906') format('woff2'),
|
||||
url('iconfont.woff?t=1682491617906') format('woff'),
|
||||
url('iconfont.ttf?t=1682491617906') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-checklist:before {
|
||||
content: "\e600";
|
||||
}
|
||||
|
||||
.icon-zitiyanse:before {
|
||||
content: "\e646";
|
||||
}
|
||||
|
||||
.icon-formatheader1:before {
|
||||
content: "\e860";
|
||||
}
|
||||
|
||||
.icon-formatheader2:before {
|
||||
content: "\e861";
|
||||
}
|
||||
|
||||
.icon-undo:before {
|
||||
content: "\e787";
|
||||
}
|
||||
|
||||
.icon-redo:before {
|
||||
content: "\e788";
|
||||
}
|
||||
|
||||
.icon-indent:before {
|
||||
content: "\e7f3";
|
||||
}
|
||||
|
||||
.icon-outdent:before {
|
||||
content: "\e7f4";
|
||||
}
|
||||
|
||||
.icon-zitijiacu:before {
|
||||
content: "\ec83";
|
||||
}
|
||||
|
||||
.icon-zuoyouduiqi:before {
|
||||
content: "\ec87";
|
||||
}
|
||||
|
||||
.icon-Character-Spacing:before {
|
||||
content: "\ed91";
|
||||
}
|
||||
|
||||
.icon-format:before {
|
||||
content: "\e6da";
|
||||
}
|
||||
|
||||
.icon-font-size:before {
|
||||
content: "\e7b9";
|
||||
}
|
||||
|
||||
.icon-duanhouju:before {
|
||||
content: "\e61a";
|
||||
}
|
||||
|
||||
.icon-duanqianju:before {
|
||||
content: "\e61b";
|
||||
}
|
||||
|
||||
.icon-shanchuxian:before {
|
||||
content: "\e602";
|
||||
}
|
||||
|
||||
.icon-charutupian:before {
|
||||
content: "\e603";
|
||||
}
|
||||
|
||||
.icon-fengexian:before {
|
||||
content: "\e60e";
|
||||
}
|
||||
|
||||
.icon-juzhongduiqi:before {
|
||||
content: "\e620";
|
||||
}
|
||||
|
||||
.icon-wuxupailie:before {
|
||||
content: "\e63e";
|
||||
}
|
||||
|
||||
.icon-youduiqi:before {
|
||||
content: "\e64b";
|
||||
}
|
||||
|
||||
.icon-youxupailie:before {
|
||||
content: "\e64c";
|
||||
}
|
||||
|
||||
.icon-zitixiahuaxian:before {
|
||||
content: "\e657";
|
||||
}
|
||||
|
||||
.icon-zitixieti:before {
|
||||
content: "\e658";
|
||||
}
|
||||
|
||||
.icon-zuoduiqi:before {
|
||||
content: "\e65a";
|
||||
}
|
||||
|
||||
.icon-LineHeight:before {
|
||||
content: "\e624";
|
||||
}
|
||||
|
||||
.icon-editor-background-color:before {
|
||||
content: "\e829";
|
||||
}
|
||||
|
||||
BIN
uni_modules/piaoyi-editor/components/piaoyi-editor/iconfont.ttf
Normal file
BIN
uni_modules/piaoyi-editor/components/piaoyi-editor/iconfont.ttf
Normal file
Binary file not shown.
BIN
uni_modules/piaoyi-editor/components/piaoyi-editor/iconfont.woff
Normal file
BIN
uni_modules/piaoyi-editor/components/piaoyi-editor/iconfont.woff
Normal file
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,425 @@
|
||||
<template>
|
||||
<view class="container-editor" style="height: 100%;">
|
||||
<view class="textarea" style="height: 100%;">
|
||||
<view class="page-body" style="height: 100%;">
|
||||
<view class='wrapper' style="height: 100%;">
|
||||
<PickerColor ref="colorPicker" :color="{r: 255,g: 0,b: 0,a: 0.6}" @confirm="confirm"></PickerColor>
|
||||
<view class='toolbar' @tap="format">
|
||||
<view :class="formats.fontSize === '24px' ? 'ql-active' : ''" class="iconfont icon-font-size"
|
||||
data-name="fontSize" data-value="24px"></view>
|
||||
<view :class="formats.color? 'ql-active' : ''" class="iconfont icon-zitiyanse" data-name="color" :data-value="formats.color">
|
||||
</view>
|
||||
<view :class="formats.header === 1 ? 'ql-active' : ''" class="iconfont icon-formatheader1"
|
||||
data-name="header" :data-value="1"></view>
|
||||
<view :class="formats.header === 2 ? 'ql-active' : ''" class="iconfont icon-formatheader2"
|
||||
data-name="header" :data-value="2"></view>
|
||||
<view :class="formats.bold ? 'ql-active' : ''" class="iconfont icon-zitijiacu" data-name="bold">
|
||||
</view>
|
||||
<view :class="formats.italic ? 'ql-active' : ''" class="iconfont icon-zitixieti"
|
||||
data-name="italic"></view>
|
||||
<view :class="formats.underline ? 'ql-active' : ''" class="iconfont icon-zitixiahuaxian"
|
||||
data-name="underline"></view>
|
||||
<view :class="formats.strike ? 'ql-active' : ''" class="iconfont icon-shanchuxian"
|
||||
data-name="strike"></view>
|
||||
<view :class="formats.align === 'left' ? 'ql-active' : ''" class="iconfont icon-zuoduiqi"
|
||||
data-name="align" data-value="left"></view>
|
||||
<view :class="formats.align === 'center' ? 'ql-active' : ''" class="iconfont icon-juzhongduiqi"
|
||||
data-name="align" data-value="center"></view>
|
||||
<view :class="formats.align === 'right' ? 'ql-active' : ''" class="iconfont icon-youduiqi"
|
||||
data-name="align" data-value="right"></view>
|
||||
<view :class="formats.align === 'justify' ? 'ql-active' : ''" class="iconfont icon-zuoyouduiqi"
|
||||
data-name="align" data-value="justify"></view>
|
||||
<view :class="formats.lineHeight ? 'ql-active' : ''" class="iconfont icon-LineHeight"
|
||||
data-name="lineHeight" data-value="2"></view>
|
||||
<view :class="formats.letterSpacing ? 'ql-active' : ''" class="iconfont icon-Character-Spacing"
|
||||
data-name="letterSpacing" data-value="2em">
|
||||
</view>
|
||||
<view :class="formats.marginTop ? 'ql-active' : ''" class="iconfont icon-duanqianju"
|
||||
data-name="marginTop" data-value="10px"></view>
|
||||
<view :class="formats.previewarginBottom ? 'ql-active' : ''" class="iconfont icon-duanhouju"
|
||||
data-name="marginBottom" data-value="10px"></view>
|
||||
<!-- <view class="iconfont icon-rili4" @tap="insertDate"></view> -->
|
||||
<view class="iconfont icon-checklist" data-name="list" data-value="check"></view>
|
||||
<view :class="formats.list === 'ordered' ? 'ql-active' : ''" class="iconfont icon-youxupailie"
|
||||
data-name="list" data-value="ordered"></view>
|
||||
<view :class="formats.list === 'bullet' ? 'ql-active' : ''" class="iconfont icon-wuxupailie"
|
||||
data-name="list" data-value="bullet"></view>
|
||||
<view class="iconfont icon-outdent" data-name="indent" data-value="-1"></view>
|
||||
<view class="iconfont icon-indent" data-name="indent" data-value="+1"></view>
|
||||
<view class="iconfont icon-fengexian" @tap="insertDivider"></view>
|
||||
<view class="iconfont icon-charutupian" @tap="insertImage"></view>
|
||||
<view class="iconfont icon-undo" @tap="undo"></view>
|
||||
<view class="iconfont icon-redo" @tap="redo"></view>
|
||||
<view class="iconfont icon-format" @tap="clear"></view>
|
||||
</view>
|
||||
<editor :style="`height:${height}`" style="overflow: auto;padding: 6px;box-sizing: border-box;margin-top: 10px;background-color: transparent;" id="editor" class="editor" :placeholder="placeholder" showImgSize showImgToolbar showImgResize
|
||||
@statuschange="onStatusChange" :read-only="readOnly" @ready="onEditorReady"
|
||||
@input="saveContens">
|
||||
</editor>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PickerColor from "./color-picker.vue"
|
||||
export default {
|
||||
components: {
|
||||
PickerColor
|
||||
},
|
||||
props: {
|
||||
api: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
photoUrl: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
values: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
readOnly: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
maxlength: {
|
||||
type: Number,
|
||||
default: -1
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: '100vh'
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
default: 'file'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentTab: 0,
|
||||
curColor: '#000000',
|
||||
show: true,
|
||||
hdid: "",
|
||||
myHtml: "",
|
||||
formats: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showPicker() {
|
||||
this.$refs.colorPicker.open()
|
||||
},
|
||||
confirm(e) {
|
||||
this.editorCtx.format('color', e.hex)
|
||||
},
|
||||
saveContens() {
|
||||
let that = this;
|
||||
let maxlength = parseInt(that.maxlength);
|
||||
that.editorCtx.getContents({
|
||||
success: function(res) {
|
||||
let html_text = res.html;
|
||||
let html_length = html_text.length;
|
||||
that.$emit("changes", {
|
||||
html: res.html,
|
||||
length: html_length
|
||||
});
|
||||
},
|
||||
})
|
||||
},
|
||||
update() {
|
||||
//获取一下是否有数据
|
||||
let that = this;
|
||||
setTimeout(() => {
|
||||
that.editorCtx.setContents({
|
||||
"html": that.values
|
||||
});
|
||||
}, 1000)
|
||||
},
|
||||
onEditorReady() {
|
||||
let that = this;
|
||||
console.log(uni.createSelectorQuery().in(this).select('#editor'))
|
||||
uni.createSelectorQuery().in(this).select('#editor').context((res) => {
|
||||
that.editorCtx = res.context;
|
||||
that.update();
|
||||
}).exec((result) => {});
|
||||
},
|
||||
undo() {
|
||||
this.editorCtx.undo()
|
||||
},
|
||||
redo() {
|
||||
this.editorCtx.redo()
|
||||
},
|
||||
format(e) {
|
||||
let {
|
||||
name,
|
||||
value
|
||||
} = e.target.dataset
|
||||
if (!name) return
|
||||
if (name == 'color') {
|
||||
this.showPicker()
|
||||
} else {
|
||||
this.editorCtx.format(name, value)
|
||||
}
|
||||
},
|
||||
onStatusChange(e) {
|
||||
const formats = e.detail
|
||||
this.formats = formats
|
||||
},
|
||||
insertDivider() {
|
||||
this.editorCtx.insertDivider();
|
||||
},
|
||||
clear() {
|
||||
this.editorCtx.clear();
|
||||
this.$emit()
|
||||
},
|
||||
insertDate() {
|
||||
const date = new Date()
|
||||
const formatDate = `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`
|
||||
this.editorCtx.insertText({
|
||||
text: formatDate
|
||||
})
|
||||
},
|
||||
insertImage() {
|
||||
let that = this;
|
||||
// #ifdef APP-PLUS || H5
|
||||
uni.chooseImage({
|
||||
count: 1, //默认9
|
||||
sizeType: ['original'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album'], //从相册或者相机选择
|
||||
success: (res) => {
|
||||
const tempFilePaths = res.tempFilePaths[0]
|
||||
if (!this.api || !this.photoUrl) {
|
||||
that.editorCtx.insertImage({
|
||||
src: tempFilePaths,
|
||||
alt: '图像',
|
||||
success: function() {}
|
||||
})
|
||||
uni.showToast({
|
||||
title: '未传入api字段或者photoUrl字段,此为临时图片路径',
|
||||
duration: 3000,
|
||||
icon: 'none'
|
||||
})
|
||||
} else {
|
||||
uni.showLoading({
|
||||
title: "加载中",
|
||||
});
|
||||
uni.uploadFile({
|
||||
url: this.photoUrl + this.api,
|
||||
filePath: tempFilePaths,
|
||||
name: this.name,
|
||||
formData: {},
|
||||
success: (uploadFileRes) => {
|
||||
var obj = JSON.parse(uploadFileRes.data)
|
||||
if (obj.code == 0) {
|
||||
uni.hideLoading()
|
||||
this.img = obj.url
|
||||
console.log('this.img at line 218:', this.img)
|
||||
wx.showToast({
|
||||
title: obj.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
this.editorCtx.insertImage({
|
||||
src: this.img,
|
||||
alt: '图像',
|
||||
success: function() {}
|
||||
})
|
||||
} else {uni.hideLoading()
|
||||
wx.showToast({
|
||||
title: obj.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
fail() {uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '未授权访问相册权限,请授权后使用',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
uni.chooseMedia({
|
||||
count: 1,
|
||||
mediaType: ['image'],
|
||||
sourceType: ['album'],
|
||||
sizeType: 'compressed',
|
||||
success: (chooseImageRes) => {
|
||||
const tempFilePaths = chooseImageRes.tempFiles[0].tempFilePath;
|
||||
console.log(tempFilePaths)
|
||||
if (!this.api || !this.photoUrl) {
|
||||
that.editorCtx.insertImage({
|
||||
src: tempFilePaths,
|
||||
alt: '图像',
|
||||
success: function() {}
|
||||
})
|
||||
uni.showToast({
|
||||
title: '未传入api字段或者photoUrl字段,此为临时图片路径',
|
||||
duration: 3000,
|
||||
icon: 'none'
|
||||
})
|
||||
} else {
|
||||
uni.showLoading({
|
||||
title: "加载中",
|
||||
});
|
||||
uni.uploadFile({
|
||||
url: this.photoUrl + this.api,
|
||||
filePath: tempFilePaths,
|
||||
name: this.name,
|
||||
formData: {},
|
||||
success: (uploadFileRes) => {
|
||||
var obj = JSON.parse(uploadFileRes.data)
|
||||
console.log('obj at line 274:', obj)
|
||||
if (obj.code == 0) {
|
||||
uni.hideLoading()
|
||||
this.img = obj.url
|
||||
wx.showToast({
|
||||
title: obj.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
this.editorCtx.insertImage({
|
||||
src: this.img,
|
||||
alt: '图像',
|
||||
success: function() {}
|
||||
})
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
wx.showToast({
|
||||
title: obj.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
fail(err) {
|
||||
console.log(err)
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: err.errMsg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url('iconfont.css');
|
||||
|
||||
.tabs {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.tabs .current {
|
||||
border-bottom: 2px solid #0369D6;
|
||||
}
|
||||
|
||||
.tabs .tab {
|
||||
font-size: 32upx;
|
||||
}
|
||||
|
||||
.main {
|
||||
padding: 20upx;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.main .item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
line-height: 80upx;
|
||||
border-bottom: 1px solid #F2F2F2;
|
||||
}
|
||||
|
||||
.main .item .left {
|
||||
min-width: 200upx;
|
||||
}
|
||||
|
||||
.main .title {
|
||||
padding-bottom: 20upx;
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid #F2F2F2;
|
||||
}
|
||||
|
||||
.main .textarea {
|
||||
border: 1px solid #F2F2F2;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
padding: 0 10upx;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
display: inline-block;
|
||||
width: 9%;
|
||||
cursor: pointer;
|
||||
font-size: 40upx !important;
|
||||
text-align: center;
|
||||
padding: 10upx 0;
|
||||
}
|
||||
|
||||
.icon-rili4 {
|
||||
font-size: 48upx !important;
|
||||
}
|
||||
|
||||
.icon-duanqianju,
|
||||
.icon-duanhouju,
|
||||
.icon-zitijiacu,
|
||||
.icon-zitixieti,
|
||||
.icon-zitixiahuaxian,
|
||||
.icon-shanchuxian {
|
||||
font-size: 36upx !important;
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
box-sizing: border-box;
|
||||
border-bottom: 0;
|
||||
margin-bottom: 10upx;
|
||||
}
|
||||
|
||||
.ql-container {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
min-height: 300upx;
|
||||
height: auto;
|
||||
background: #fff;
|
||||
font-size: 32upx;
|
||||
line-height: 1;
|
||||
padding-bottom: 60upx;
|
||||
}
|
||||
|
||||
/deep/ .ql-editor.ql-blank:before {
|
||||
font-size: 28upx;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
.ql-active {
|
||||
color: #ff0000;
|
||||
}
|
||||
|
||||
button {
|
||||
width: 150upx;
|
||||
font-size: 30upx;
|
||||
}
|
||||
|
||||
.editor {
|
||||
color: #333;
|
||||
}
|
||||
</style>
|
||||
15
uni_modules/piaoyi-editor/package.json
Normal file
15
uni_modules/piaoyi-editor/package.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"id": "piaoyi-editor",
|
||||
"name": "多功能富文本编辑器",
|
||||
"displayName": "多功能富文本编辑器",
|
||||
"version": "1.1.0",
|
||||
"description": "富文本编辑器,内置上传图片以及更改颜色, 多样化等功能",
|
||||
"keywords": [
|
||||
"富文本编辑器",
|
||||
"上传图片",
|
||||
"字体颜色"
|
||||
],
|
||||
"dcloudext": {
|
||||
"type": "component-vue"
|
||||
}
|
||||
}
|
||||
101
uni_modules/piaoyi-editor/readme.md
Normal file
101
uni_modules/piaoyi-editor/readme.md
Normal file
@@ -0,0 +1,101 @@
|
||||
### piaoyiEditor 富文本编辑器
|
||||
|
||||
**使用方法:**
|
||||
|
||||
```
|
||||
<template>
|
||||
<view class="richtext">
|
||||
<piaoyiEditor :values="values" :maxlength="3000" @changes="saveContens" :readOnly="readOnly" :photoUrl="photoUrl" :api="api" :name="name"/>
|
||||
<view class="">
|
||||
{{txt}}
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import piaoyiEditor from '@/uni_modules/piaoyi-editor/components/piaoyi-editor/piaoyi-editor.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
readOnly: false, //是否只读
|
||||
photoUrl: 'http://test.com', //服务器图片域名或者ip
|
||||
api: '/upload', //上传图片接口地址
|
||||
txt: '',
|
||||
name: 'file',
|
||||
values: '<div>11111222</div>'
|
||||
};
|
||||
},
|
||||
components: {
|
||||
piaoyiEditor
|
||||
},
|
||||
methods: {
|
||||
saveContens(e) {
|
||||
this.txt = e.html
|
||||
}
|
||||
},
|
||||
onShareAppMessage(res) {
|
||||
if (res.from === 'button') { // 来自页面内分享按钮
|
||||
console.log(res.target)
|
||||
}
|
||||
return {
|
||||
title: '多功能富文本编辑器!',
|
||||
path: '/pages/editor/editor'
|
||||
}
|
||||
},
|
||||
onShareTimeline(res) {
|
||||
if (res.from === 'button') { // 来自页面内分享按钮
|
||||
console.log(res.target)
|
||||
}
|
||||
return {
|
||||
title: '多功能富文本编辑器!'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
|
||||
```
|
||||
|
||||
#### 事件说明
|
||||
|
||||
1、**使用上传图片功能时需要注意查看代码里面的uni.uploadFile方法,因为它的返回值取决于自己后端接口的值,所以可以根据实际情况就行更改即可**
|
||||
|
||||
| 事件名 | 返回值 | 描述 |
|
||||
| :---------: | :----: | :------------: |
|
||||
| @saveContens | {html: html片段, length: html长度} | 文本框内容回调 |
|
||||
|
||||
#### Prop
|
||||
|
||||
| 参数名称 | 默认值 | 描述 |
|
||||
| -------- | ------------------------------ |
|
||||
| maxlength| 300 | 输入最大长度 |
|
||||
| readOnly | false | 是否只读 |
|
||||
| api | 空 | 上传图片接口地址 |
|
||||
| photoUrl | 空 | 服务器图片域名或者ip |
|
||||
| name | 'file' | 上传图片接口的key |
|
||||
| values | '' | 富文本编辑器默认值 |
|
||||
|
||||
### 注:近期收到使用用户反馈,存在以下四个问题(如有好的建议,期待私信,谢谢)
|
||||
|
||||
1、当组件在页面中部或者底部的时候,进入页面,页面会自动滚动到富文本编辑器的区域
|
||||
属于正常现象;
|
||||
官网文档有这么一句话:编辑器聚焦时页面会被上推,系统行为以保证编辑区可见;
|
||||
作者建议这种情况,进入页面初始设置富文本编辑器为只读,然后页面滚动到一定距离的时候取消这个只读;
|
||||
|
||||
2、组件粘贴文字出现软键盘闪烁,导致文字粘贴不了
|
||||
目前暂未发现解决方法,本插件是在官方的editor基础上开发的,这个组件存在这个问题;
|
||||
经测试长按出现粘贴后,手不松开滑动到粘贴字样上就不会出现闪烁,然后松开手,点击粘贴就可以;
|
||||
|
||||
3、有些上传图片接口是需要token的,接口需要token的话可以在组件内搜索uni.uploadFile,加上headers头部参数
|
||||
|
||||
4、H5有时候会出现插件异常情况,不要慌,查看[editor组件官网](https://uniapp.dcloud.net.cn/component/editor.html)官网下的注意事项(原话是:H5 端需要动态引入 quill.min.js、image-resize.min.js 依赖,默认情况下浏览器会从 unpkg.com 加载。如果依赖加载较慢或失败,uni-app 建议使用通过测试的 js 依赖保证效果一致,访问 github.com 或者 gitee.com 选择下载。可以放入 static 目录进行托管,或者使用 CDN 服务商。为了保证服务的稳定性,推荐开发者将所有前端资源使用 uniCloud 前端网页托管 服务进行托管,然后在 自定义模板 的 head 标签内引入相关 js 依赖。)
|
||||
|
||||
(1)上面H5这种情况我推荐一种方法进行测试:把所需要的静态资源下载到本地,在APP.vue里面的onLunch下进行dom操作插入这些静态资源
|
||||
(2)使用官方提供的自定义模板(hx新建项目的Hello uni-app模板里面有示例):使用官方的自定义模板引入静态资源,亲测引入静态资源成功了(即引入js和css都是本地的静态资源,不再请求远程CDN文件),但是原来页面样式全丢失了,目前还没有找到问题所在没有成功的朋友欢迎加群交流一下,谢谢
|
||||
|
||||
### 可接定制化组件开发
|
||||
### 右侧有本人代表作小程序二维码,可以扫码体验
|
||||
### 如使用过程中有问题或有一些好的建议,欢迎加QQ群互相学习交流:120594820
|
||||
Reference in New Issue
Block a user