diff --git a/package-lock.json b/package-lock.json index c0cf991..8f3b0dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3232,12 +3232,76 @@ "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "optional": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "optional": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "optional": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "optional": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "optional": true + }, "hash-sum": { "version": "2.0.0", "resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-2.0.0.tgz", "integrity": "sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==", "dev": true }, + "json5": { + "version": "2.2.1", + "resolved": "https://registry.npmmirror.com/json5/-/json5-2.2.1.tgz", + "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "dev": true, + "optional": true + }, + "loader-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.3.tgz", + "integrity": "sha512-THWqIsn8QRnvLl0shHYVBN9syumU8pYWEHPTmkiVGd+7K5eFNVSY6AJhRvgGF70gg1Dz+l/k8WicvFCxdEs60A==", + "dev": true, + "optional": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, "ssri": { "version": "8.0.1", "resolved": "https://registry.npmmirror.com/ssri/-/ssri-8.0.1.tgz", @@ -3246,6 +3310,28 @@ "requires": { "minipass": "^3.1.1" } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "optional": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "vue-loader-v16": { + "version": "npm:vue-loader@16.8.3", + "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz", + "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", + "dev": true, + "optional": true, + "requires": { + "chalk": "^4.1.0", + "hash-sum": "^2.0.0", + "loader-utils": "^2.0.0" + } } } }, @@ -5275,6 +5361,14 @@ "keygrip": "~1.1.0" } }, + "copy-anything": { + "version": "2.0.6", + "resolved": "https://registry.npmmirror.com/copy-anything/-/copy-anything-2.0.6.tgz", + "integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==", + "requires": { + "is-what": "^3.14.1" + } + }, "copy-concurrently": { "version": "1.0.5", "resolved": "https://registry.npmmirror.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz", @@ -8042,6 +8136,12 @@ "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", "dev": true }, + "image-size": { + "version": "0.5.5", + "resolved": "https://registry.npmmirror.com/image-size/-/image-size-0.5.5.tgz", + "integrity": "sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==", + "optional": true + }, "immediate": { "version": "3.0.6", "resolved": "https://registry.npmmirror.com/immediate/-/immediate-3.0.6.tgz", @@ -8587,6 +8687,11 @@ "call-bind": "^1.0.2" } }, + "is-what": { + "version": "3.14.1", + "resolved": "https://registry.npmmirror.com/is-what/-/is-what-3.14.1.tgz", + "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==" + }, "is-windows": { "version": "1.0.2", "resolved": "https://registry.npmmirror.com/is-windows/-/is-windows-1.0.2.tgz", @@ -10710,6 +10815,69 @@ "invert-kv": "^3.0.0" } }, + "less": { + "version": "4.1.3", + "resolved": "https://registry.npmmirror.com/less/-/less-4.1.3.tgz", + "integrity": "sha512-w16Xk/Ta9Hhyei0Gpz9m7VS8F28nieJaL/VyShID7cYvP6IL5oHeL6p4TXSDJqZE/lNv0oJ2pGVjJsRkfwm5FA==", + "requires": { + "copy-anything": "^2.0.1", + "errno": "^0.1.1", + "graceful-fs": "^4.1.2", + "image-size": "~0.5.0", + "make-dir": "^2.1.0", + "mime": "^1.4.1", + "needle": "^3.1.0", + "parse-node-version": "^1.0.1", + "source-map": "~0.6.0", + "tslib": "^2.3.0" + }, + "dependencies": { + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "optional": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmmirror.com/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "optional": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmmirror.com/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "optional": true + } + } + }, + "less-loader": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/less-loader/-/less-loader-4.1.0.tgz", + "integrity": "sha512-KNTsgCE9tMOM70+ddxp9yyt9iHqgmSs0yTZc5XH5Wo+g80RWRIYNqE58QJKm/yMud5wZEvz50ugRDuzVIkyahg==", + "requires": { + "clone": "^2.1.1", + "loader-utils": "^1.1.0", + "pify": "^3.0.0" + }, + "dependencies": { + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmmirror.com/clone/-/clone-2.1.2.tgz", + "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==" + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==" + } + } + }, "leven": { "version": "3.1.0", "resolved": "https://registry.npmmirror.com/leven/-/leven-3.1.0.tgz", @@ -11273,6 +11441,12 @@ "thenify-all": "^1.0.0" } }, + "nan": { + "version": "2.17.0", + "resolved": "https://registry.npmmirror.com/nan/-/nan-2.17.0.tgz", + "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", + "optional": true + }, "nanoid": { "version": "3.3.4", "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.4.tgz", @@ -11302,6 +11476,37 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, + "needle": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/needle/-/needle-3.1.0.tgz", + "integrity": "sha512-gCE9weDhjVGCRqS8dwDR/D3GTAeyXLXuqp7I8EzH6DllZGXSUyxuqqLh+YX9rMAWaaTFyVAg6rHGL25dqvczKw==", + "optional": true, + "requires": { + "debug": "^3.2.6", + "iconv-lite": "^0.6.3", + "sax": "^1.2.4" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmmirror.com/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "optional": true, + "requires": { + "ms": "^2.1.1" + } + }, + "iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + } + } + }, "negotiator": { "version": "0.6.3", "resolved": "https://registry.npmmirror.com/negotiator/-/negotiator-0.6.3.tgz", @@ -11797,6 +12002,11 @@ "lines-and-columns": "^1.1.6" } }, + "parse-node-version": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/parse-node-version/-/parse-node-version-1.0.1.tgz", + "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==" + }, "parse5": { "version": "5.1.1", "resolved": "https://registry.npmmirror.com/parse5/-/parse5-5.1.1.tgz", @@ -13400,8 +13610,7 @@ "sax": { "version": "1.2.4", "resolved": "https://registry.npmmirror.com/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" }, "saxes": { "version": "3.1.11", @@ -14780,8 +14989,7 @@ "tslib": { "version": "2.4.0", "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", - "dev": true + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" }, "tsscmp": { "version": "1.0.6", @@ -15220,101 +15428,6 @@ "vue-style-loader": "^4.1.0" } }, - "vue-loader-v16": { - "version": "npm:vue-loader@16.8.3", - "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz", - "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", - "dev": true, - "optional": true, - "requires": { - "chalk": "^4.1.0", - "hash-sum": "^2.0.0", - "loader-utils": "^2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "optional": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "optional": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "optional": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "optional": true - }, - "hash-sum": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-2.0.0.tgz", - "integrity": "sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==", - "dev": true, - "optional": true - }, - "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmmirror.com/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", - "dev": true, - "optional": true - }, - "loader-utils": { - "version": "2.0.3", - "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.3.tgz", - "integrity": "sha512-THWqIsn8QRnvLl0shHYVBN9syumU8pYWEHPTmkiVGd+7K5eFNVSY6AJhRvgGF70gg1Dz+l/k8WicvFCxdEs60A==", - "dev": true, - "optional": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "optional": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, "vue-style-loader": { "version": "4.1.3", "resolved": "https://registry.npmmirror.com/vue-style-loader/-/vue-style-loader-4.1.3.tgz", @@ -15443,7 +15556,10 @@ "version": "1.2.13", "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-1.2.13.tgz", "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", - "optional": true + "optional": true, + "requires": { + "nan": "^2.12.1" + } }, "glob-parent": { "version": "3.1.0", @@ -15759,7 +15875,10 @@ "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-1.2.13.tgz", "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", "dev": true, - "optional": true + "optional": true, + "requires": { + "nan": "^2.12.1" + } }, "glob-parent": { "version": "3.1.0", diff --git a/package.json b/package.json index 40b44d9..77ed897 100644 --- a/package.json +++ b/package.json @@ -70,6 +70,8 @@ "@vue/shared": "^3.0.0", "core-js": "^3.6.5", "flyio": "^0.6.2", + "less": "^4.1.3", + "less-loader": "^4.1.0", "regenerator-runtime": "^0.12.1", "vue": "^2.6.11", "vuex": "^3.2.0" diff --git a/src/App.vue b/src/App.vue index ff175f3..32967bb 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,17 +1,45 @@ - diff --git a/src/common/config.js b/src/common/config.js deleted file mode 100644 index e1aa22b..0000000 --- a/src/common/config.js +++ /dev/null @@ -1,5 +0,0 @@ -const config = { - name: "熊熊安装", -} - -export default config \ No newline at end of file diff --git a/src/common/utils.js b/src/common/utils.js deleted file mode 100644 index 1d95e42..0000000 --- a/src/common/utils.js +++ /dev/null @@ -1,10 +0,0 @@ -const utils = { - demo() { - uni.showToast({ - title: '测试tips', - icon: 'none' - }) - } -} - -export default utils diff --git a/src/components/app-banner/app-banner.vue b/src/components/app-banner/app-banner.vue new file mode 100644 index 0000000..2a2d65a --- /dev/null +++ b/src/components/app-banner/app-banner.vue @@ -0,0 +1,105 @@ + + + + + \ No newline at end of file diff --git a/src/components/app-layout/app-layout.vue b/src/components/app-layout/app-layout.vue new file mode 100644 index 0000000..70063d7 --- /dev/null +++ b/src/components/app-layout/app-layout.vue @@ -0,0 +1,172 @@ + + + + + \ No newline at end of file diff --git a/src/components/app-layout/app-login/app-login.vue b/src/components/app-layout/app-login/app-login.vue new file mode 100644 index 0000000..3bb21cd --- /dev/null +++ b/src/components/app-layout/app-login/app-login.vue @@ -0,0 +1,44 @@ + + + + + \ No newline at end of file diff --git a/src/components/page-layout.vue b/src/components/page-layout.vue deleted file mode 100644 index 8cb52c6..0000000 --- a/src/components/page-layout.vue +++ /dev/null @@ -1,32 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/common/apis.js b/src/core/apis.js similarity index 100% rename from src/common/apis.js rename to src/core/apis.js diff --git a/src/core/config.js b/src/core/config.js new file mode 100644 index 0000000..441d0d0 --- /dev/null +++ b/src/core/config.js @@ -0,0 +1,6 @@ +const config = { + name: "熊熊安装", + root: "http://127.0.0.1/api.php" +} + +export default config \ No newline at end of file diff --git a/src/core/libs/event.js b/src/core/libs/event.js new file mode 100644 index 0000000..5a862c9 --- /dev/null +++ b/src/core/libs/event.js @@ -0,0 +1,70 @@ +function MyPromise(resolve) { + this.resolveFunc = function () { + }; + this.rejectFunc = function () { + }; + resolve(this.resolve.bind(this), this.reject.bind(this)); +} + +MyPromise.prototype.resolve = function (val) { + setTimeout(() => { + this.resolveFunc(val); + }, 0); +}; + +MyPromise.prototype.reject = function (val) { + setTimeout(() => { + this.rejectFunc(val); + }, 0); +}; + +MyPromise.prototype.then = function (resolve, reject) { + this.resolveFunc = resolve; + this.rejectFunc = reject; + return this; +}; + +module.exports = { + _resolveStorage: {}, + _addResolve(eventName, resolve, removeEventAfterTrigger) { + if (!this._resolveStorage[eventName]) { + this._resolveStorage[eventName] = []; + } + this._resolveStorage[eventName].push({ + resolve: resolve, + removeEventAfterTrigger: removeEventAfterTrigger, + }); + }, + /** + * 定义触发器 + * @param eventName + * @param removeEventAfterTrigger + * @returns {Promise} + */ + on(eventName, removeEventAfterTrigger) { + return new MyPromise(fn => { + if (typeof removeEventAfterTrigger === 'undefined') { + removeEventAfterTrigger = true; + } + this._addResolve(eventName, fn, removeEventAfterTrigger); + }); + }, + /** + * 触发事件 + * @param eventName + * @param e 传入数据(可选) + */ + trigger(eventName, e) { + if (!this._resolveStorage[eventName] || !this._resolveStorage[eventName].length) { + return; + } + let saveEvens = []; + for (let i in this._resolveStorage[eventName]) { + this._resolveStorage[eventName][i].resolve(e); + if (!this._resolveStorage[eventName][i].removeEventAfterTrigger) { + saveEvens.push(this._resolveStorage[eventName][i]); + } + } + this._resolveStorage[eventName] = saveEvens; + }, +}; diff --git a/src/core/libs/request.js b/src/core/libs/request.js new file mode 100644 index 0000000..3762cbc --- /dev/null +++ b/src/core/libs/request.js @@ -0,0 +1,17 @@ +const request = async (args) => { + const header = { + 'X-Requested-With': 'XMLHttpRequest', + 'content-type': 'application/x-www-form-urlencoded', + }; + + const [error, response] = await uni.request({ + url: args.url, + method: args.method || 'get', + data: args.data, + header: header + }); + + return Promise.resolve(response); +}; + +export default request \ No newline at end of file diff --git a/src/core/libs/test.js b/src/core/libs/test.js new file mode 100644 index 0000000..3fa9fc9 --- /dev/null +++ b/src/core/libs/test.js @@ -0,0 +1,166 @@ +function email(value) { + return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value); +} + +function mobile(value) { + return /^1[23456789]\d{9}$/.test(value) +} + +function url(value) { + return /^((https|http|ftp|rtsp|mms):\/\/)(([0-9a-zA-Z_!~*'().&=+$%-]+: )?[0-9a-zA-Z_!~*'().&=+$%-]+@)?(([0-9]{1,3}.){3}[0-9]{1,3}|([0-9a-zA-Z_!~*'()-]+.)*([0-9a-zA-Z][0-9a-zA-Z-]{0,61})?[0-9a-zA-Z].[a-zA-Z]{2,6})(:[0-9]{1,4})?((\/?)|(\/[0-9a-zA-Z_!~*'().;?:@&=+$,%#-]+)+\/?)$/ + .test(value) +} + +function date(value) { + return !/Invalid|NaN/.test(new Date(value.replace(/-/g, '/')).toString()) +} + +function dateISO(value) { + return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value) +} + +function number(value) { + return /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value) +} + +function digits(value) { + return /^\d+$/.test(value) +} + +function idCard(value) { + return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test( + value) +} + +function carNo(value) { + // 新能源车牌 + const xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/; + // 旧车牌 + const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/; + if (value.length === 7) { + return creg.test(value); + } else if (value.length === 8) { + return xreg.test(value); + } else { + return false; + } +} + +function amount(value) { + //金额,只允许保留两位小数 + return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value); +} + +function chinese(value) { + let reg = /^[\u4e00-\u9fa5]+$/gi; + return reg.test(value); +} + +function letter(value) { + return /^[a-zA-Z]*$/.test(value); +} + +function enOrNum(value) { + //英文或者数字 + let reg = /^[0-9a-zA-Z]*$/g; + return reg.test(value); +} + +function contains(value, param) { + return value.indexOf(param) >= 0 +} + +function range(value, param) { + return value >= param[0] && value <= param[1] +} + +function rangeLength(value, param) { + return value.length >= param[0] && value.length <= param[1] +} + +function landline(value) { + let reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/; + return reg.test(value); +} + +function umobile(value){ + let reg = /(^\d+$)|(^$)|(^([0-9]{3,4}-)?\d{7,8}$)|(^400[0-9]{7}$)|(^800[0-9]{7}$)|(^(400)-(\d{3})-(\d{4})(.)(\d{1,4})$)|(^(400)-(\d{3})-(\d{4}$))/; + return reg.test(value); +} + +function empty(value) { + switch (typeof value) { + case 'undefined': + return true; + case 'string': + if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '').length == 0) return true; + break; + case 'boolean': + if (!value) return true; + break; + case 'number': + if (0 === value || isNaN(value)) return true; + break; + case 'object': + if (null === value || value.length === 0) return true; + for (var i in value) { + return false; + } + return true; + } + return false; +} + +function jsonString(value) { + if (typeof value == 'string') { + try { + var obj = JSON.parse(value); + if (typeof obj == 'object' && obj) { + return true; + } else { + return false; + } + } catch (e) { + return false; + } + } + return false; +} + +function array(value) { + if (typeof Array.isArray === "function") { + return Array.isArray(value); + } else { + return Object.prototype.toString.call(value) === "[object Array]"; + } +} + +function object(value) { + return Object.prototype.toString.call(value) === '[object Object]'; +} + +export default { + email, + mobile, + url, + date, + dateISO, + number, + digits, + idCard, + carNo, + amount, + chinese, + letter, + enOrNum, + contains, + range, + rangeLength, + empty, + isEmpty: empty, + jsonString, + landline, + object, + array, + umobile, +} diff --git a/src/core/libs/utils.js b/src/core/libs/utils.js new file mode 100644 index 0000000..c763718 --- /dev/null +++ b/src/core/libs/utils.js @@ -0,0 +1,153 @@ +function time() { + return parseInt(Math.round(new Date() / 1000)); +}; + +function datetime(format, timestamp) { + if (typeof format === 'undefined' || format === null) { + format = 'Y-m-d h:i:s'; + } + if (typeof timestamp === 'undefined' || timestamp === null) { + timestamp = this.time(); + } + const d = new Date(); + d.setTime(timestamp * 1000); + const date = { + "Y": d.getFullYear(), + "m+": (d.getMonth() + 1) < 10 ? `0${d.getMonth() + 1}` : (d.getMonth() + 1), + "d+": d.getDate() < 10 ? `0${d.getDate()}` : d.getDate(), + "h+": d.getHours() < 10 ? `0${d.getHours()}` : d.getHours(), + "i+": d.getMinutes() < 10 ? `0${d.getMinutes()}` : d.getMinutes(), + "s+": d.getSeconds() < 10 ? `0${d.getSeconds()}` : d.getSeconds(), + "q+": Math.floor((d.getMonth() + 3) / 3), + "S+": d.getMilliseconds(), + }; + for (let k in date) { + if (new RegExp("(" + k + ")").test(format)) { + format = format.replace(RegExp.$1, RegExp.$1.length === 1 ? + date[k] : ("00" + date[k]).substr(("" + date[k]).length)); + } + } + return format; +}; + +function timeDifference(start_at, end_at) { + let times = parseInt((end_at - start_at) / 1000); + let day = 0, + hour = 0, + minute = 0, + second = 0; + + if (times > 0) { + day = Math.floor(times / (60 * 60 * 24)); + hour = Math.floor(times / (60 * 60)) - (day * 24); + minute = Math.floor(times / 60) - (day * 24 * 60) - (hour * 60); + second = Math.floor(times) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60); + } else { + return null; + } + + return { + d: day, + h: hour < 10 ? ('0' + hour) : hour, + m: minute < 10 ? ('0' + minute) : minute, + s: second < 10 ? ('0' + second) : second, + }; +}; + +function earthDistance(location1, location2) { + const lat1 = parseFloat(location1.lat); + const lng1 = parseFloat(location1.lng); + const lat2 = parseFloat(location2.lat); + const lng2 = parseFloat(location2.lng); + + const EARTH_RADIUS = 6378137.0; //单位M + const PI = Math.PI; + + function getRad(d) { + return d * PI / 180.0; + } + + let f = getRad((lat1 + lat2) / 2); + let g = getRad((lat1 - lat2) / 2); + let l = getRad((lng1 - lng2) / 2); + + let sg = Math.sin(g); + let sl = Math.sin(l); + let sf = Math.sin(f); + + let s, c, w, r, d, h1, h2; + let a = EARTH_RADIUS; + let fl = 1 / 298.257; + + sg = sg * sg; + sl = sl * sl; + sf = sf * sf; + + s = sg * (1 - sl) + (1 - sf) * sl; + c = (1 - sg) * (1 - sl) + sf * sl; + + w = Math.atan(Math.sqrt(s / c)); + r = Math.sqrt(s * c) / w; + d = 2 * w * a; + h1 = (3 * r - 1) / 2 / c; + h2 = (3 * r + 1) / 2 / s; + + return d * (1 + fl * (h1 * sf * (1 - sg) - h2 * (1 - sf) * sg)); +}; + +function randomString(length) { + const chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + let result = ''; + for (var i = length; i > 0; --i) result += chars[Math.floor(Math.random() * chars.length)]; + return result; +}; + +let timer, flag; + +function throttle(func, wait = 500, immediate = true) { + if (immediate) { + if (!flag) { + flag = true; + typeof func === 'function' && func(); + timer = setTimeout(() => { + flag = false; + }, wait); + } + } else { + if (!flag) { + flag = true + timer = setTimeout(() => { + flag = false + typeof func === 'function' && func(); + }, wait); + } + + } +} + +let timeout = null; + +function debounce(func, wait = 500, immediate = false) { + if (timeout !== null) clearTimeout(timeout); + if (immediate) { + let callNow = !timeout; + timeout = setTimeout(function () { + timeout = null; + }, wait); + if (callNow) typeof func === 'function' && func(); + } else { + timeout = setTimeout(function () { + typeof func === 'function' && func(); + }, wait); + } +} + +export { + time, + datetime, + timeDifference, + earthDistance, + randomString, + throttle, + debounce, +} diff --git a/src/core/user.js b/src/core/user.js new file mode 100644 index 0000000..8688588 --- /dev/null +++ b/src/core/user.js @@ -0,0 +1,62 @@ +import Vue from 'vue' + +export default { + /** + * 获取平台用户信息 + */ + platformInfo() { + return new Promise((resolve, reject) => { + // 获取用户信息 + uni.getUserProfile({ + provider: 'weixin', + desc: "获取用户信息", + success: function (info) { + console.log(info); + uni.login({ + provider: "weixin", + success: (result) => { + resolve({ + code: result.code, + userInfo: { + avatarUrl: info.userInfo.avatarUrl, + city: info.userInfo.city, + country: info.userInfo.country, + gender: info.userInfo.gender, + language: info.userInfo.language, + nickName: info.userInfo.nickName, + province: info.userInfo.province + } + // encryptedData: info.encryptedData, + // iv: info.iv, + }); + }, + fail: e => { + reject(e); + }, + }); + }, + fail: e => { + reject(e); + }, + }); + }); + }, + register() { + this.platformInfo().then(platfromUser => { + console.log(platfromUser); + }).catch(e => { }); + }, + login() { + uni.navigateTo({ + url: '/pages/auth/login' + }); + }, + getInfo() { + return new Promise((resolve, reject) => { + resolve({ + id: 123, + name: '李四' + }); + }); + } +} diff --git a/src/main.js b/src/main.js index e425921..661eebb 100644 --- a/src/main.js +++ b/src/main.js @@ -2,13 +2,17 @@ import Vue from 'vue' import App from './App' import store from "./store/index" - -import utils from './common/utils' -import config from './common/config' -import apis from './common/apis' +import request from './core/libs/request' +import event from './core/libs/event' +import utils from './core/libs/utils' +import config from './core/config' +import apis from './core/apis' +import './static/iconfont/iconfont.css' Vue.use({ install(Vue, options) { + Vue.prototype.$request = request + Vue.prototype.$event = event Vue.prototype.$utils = utils Vue.prototype.$config = config Vue.prototype.$apis = apis diff --git a/src/manifest.json b/src/manifest.json index 972bd1e..803d82e 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -54,11 +54,19 @@ }, "mp-weixin": { /* 微信小程序特有相关 */ - "appid": "", + "appid": "wx239055764f21ba10", "setting": { - "urlCheck": false + "urlCheck": false, + "es6" : true, + "minified" : true, + "postcss" : true }, - "usingComponents": true + "usingComponents": true, + "permission" : { + "scope.userLocation" : { + "desc" : "请求获取您的位置信息" + } + } }, "mp-alipay" : { "usingComponents" : true diff --git a/src/pages.json b/src/pages.json index 37c678f..66a63db 100644 --- a/src/pages.json +++ b/src/pages.json @@ -3,15 +3,85 @@ { "path": "pages/index/index", "style": { - "navigationBarTitleText": "熊熊安装" + "navigationBarTitleText": "熊熊安装队", + "enablePullDownRefresh": true + } + }, + { + "path": "pages/auth/auth", + "style": { + "navigationBarTitleText": "登录" + } + }, + { + "path": "pages/member/member", + "style": { + "navigationBarTitleText": "我的" + } + }, + { + "path": "pages/auth/pageA", + "style": { + "navigationBarTitleText": "我的" + } + }, + { + "path": "pages/auth/pageB", + "style": { + "navigationBarTitleText": "我的" } } - ], + ], "globalStyle": { "navigationBarTextStyle": "black", "navigationBarTitleText": "熊熊安装", "navigationBarBackgroundColor": "#F8F8F8", "backgroundColor": "#F8F8F8", "navigationStyle": "custom" + // #ifdef H5 + , + "rpxCalcMaxDeviceWidth": 750, + "rpxCalcBaseDeviceWidth": 750, + "rpxCalcIncludeWidth": 750, + "maxWidth": 750 + // #endif + }, + "tabBar": { + "color": "#B5B5B5", + "selectedColor": "#7286F1", + "borderStyle": "white", + "backgroundColor": "#ffffff", + "list": [ + { + "pagePath": "pages/index/index", + "iconPath": "static/temp/tabbar/1.png", + "selectedIconPath": "static/temp/tabbar/1a.png", + "text": "首页" + }, + { + "pagePath": "pages/auth/auth", + "iconPath": "static/temp/tabbar/2.png", + "selectedIconPath": "static/temp/tabbar/2a.png", + "text": "分类" + }, + { + "pagePath": "pages/auth/pageA", + "iconPath": "static/temp/tabbar/3.png", + "selectedIconPath": "static/temp/tabbar/3a.png", + "text": "联保" + }, + { + "pagePath": "pages/auth/pageB", + "iconPath": "static/temp/tabbar/4.png", + "selectedIconPath": "static/temp/tabbar/4a.png", + "text": "订单" + }, + { + "pagePath": "pages/member/member", + "iconPath": "static/temp/tabbar/5.png", + "selectedIconPath": "static/temp/tabbar/5a.png", + "text": "我的" + } + ] } -} +} \ No newline at end of file diff --git a/src/pages/auth/auth.vue b/src/pages/auth/auth.vue new file mode 100644 index 0000000..5620b0b --- /dev/null +++ b/src/pages/auth/auth.vue @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/src/pages/auth/pageA.vue b/src/pages/auth/pageA.vue new file mode 100644 index 0000000..28fe774 --- /dev/null +++ b/src/pages/auth/pageA.vue @@ -0,0 +1,20 @@ + + + + + \ No newline at end of file diff --git a/src/pages/auth/pageB.vue b/src/pages/auth/pageB.vue new file mode 100644 index 0000000..91b8ae4 --- /dev/null +++ b/src/pages/auth/pageB.vue @@ -0,0 +1,20 @@ + + + + + \ No newline at end of file diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index f2b3883..56220c4 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -1,37 +1,366 @@ +.search { + width: 100%; + height: 100rpx; + background-color: #4b65ed; + display: flex; + align-items: center; + justify-content: center; + .input-box { + width: 670rpx; + height: auto; + background-color: #fff; + border-radius: 10rpx; + display: flex; + justify-content: space-between; + line-height: 65rpx; + .icon, + .input, + .placeholder { + color: #bebebe; + } + .icon { + width: 85rpx; + height: 65rpx; + font-size: 30rpx; + text-align: center; + } + .input { + width: 585rpx; + height: 65rpx; + font-size: 28rpx; + } + } +} +.banner { + width: 100%; + height: 283rpx; + margin: 0 auto; + background-color: #4b65ed; +} +.notify { + width: 670rpx; + height: auto; + display: flex; + margin: 27rpx auto 0 auto; + line-height: 63rpx; + .icon { + width: 80rpx; + text-align: center; + font-size: 40rpx; + color: #f9b060; + } + .slide-box { + width: 590rpx; + .notify-swiper { + display: block; + width: 100%; + height: 100%; + } + .notify-item { + font-size: 24rpx; + color: #6a6a6a; + } + } +} +.service-group { + font-size: 0; + width: 670rpx; + margin: 40rpx auto 0 auto; + padding-bottom: 45rpx; + border-bottom: 4rpx solid #f8f8f8; + .section-title { + font-size: 30rpx; + font-weight: bold; + color: #333333; + display: flex; + align-items: center; + } + .section-title::before { + content: ""; + display: inline-block; + width: 6rpx; + height: 30rpx; + background: #f9b162; + margin-right: 12rpx; + } +} +.group { + width: 100%; + .service-item { + display: inline-block; + text-align: center; + .service-name { + font-size: 24rpx; + color: #333333; + margin-top: 15rpx; + } + } +} +.group.g1 { + .service-item { + width: 145rpx; + margin-top: 40rpx; + margin-right: 30rpx; + .service-icon { + width: 100rpx; + height: 100rpx; + } + } + .service-item:nth-child(4n) { + margin-right: 0; + } +} +.group.g2 { + .service-item { + width: 100rpx; + margin-top: 40rpx; + margin-right: 42.5rpx; + .service-icon { + width: 100rpx; + height: 100rpx; + } + } + .service-item:nth-child(5n) { + margin-right: 0; + } +} +.group.g3 { + .service-item { + width: 320rpx; + height: auto; + margin-top: 40rpx; + margin-right: 30rpx; + .service-icon { + width: 320rpx; + height: 170rpx; + } + } + .service-item:nth-child(2n) { + margin-right: 0; + } +} + \ No newline at end of file diff --git a/src/pages/member/member.vue b/src/pages/member/member.vue new file mode 100644 index 0000000..8dfe069 --- /dev/null +++ b/src/pages/member/member.vue @@ -0,0 +1,29 @@ + + + + + \ No newline at end of file diff --git a/src/static/iconfont/iconfont.css b/src/static/iconfont/iconfont.css new file mode 100644 index 0000000..98a8b46 --- /dev/null +++ b/src/static/iconfont/iconfont.css @@ -0,0 +1,282 @@ +@font-face { + font-family: "iconfont"; /* Project id 3642656 */ + src: url('@/static/iconfont/iconfont.woff2?t=1666835957947') format('woff2'), + url('@/static/iconfont/iconfont.woff?t=1666835957947') format('woff'), + url('@/static/iconfont/iconfont.ttf?t=1666835957947') format('truetype'); +} + +.iconfont { + font-family: "iconfont" !important; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-guanbi:before { + content: "\e64d"; +} + +.icon-qingchu:before { + content: "\e633"; +} + +.icon-shezhi:before { + content: "\e6a9"; +} + +.icon-shuaxin:before { + content: "\e80b"; +} + +.icon-xiaoxizhongxin:before { + content: "\e8be"; +} + +.icon-dingdan:before { + content: "\e737"; +} + +.icon-guizeshezhi:before { + content: "\e6dc"; +} + +.icon-kefu1:before { + content: "\e644"; +} + +.icon-gonggao:before { + content: "\e647"; +} + +.icon-shenfenzhengzhengmian:before { + content: "\e68d"; +} + +.icon-shenfenzhengfanmian:before { + content: "\e68e"; +} + +.icon-icon-truck:before { + content: "\e60b"; +} + +.icon-cailiaogongcheng:before { + content: "\e61c"; +} + +.icon-kefufill:before { + content: "\e740"; +} + +.icon-shezhixitongshezhigongnengshezhishuxing:before { + content: "\e795"; +} + +.icon-tousu:before { + content: "\e632"; +} + +.icon-morentouxiang:before { + content: "\e630"; +} + +.icon-fl-ju:before { + content: "\e61f"; +} + +.icon-star:before { + content: "\e9a1"; +} + +.icon-jingdiananli_wujiaoxing_shoucanghou:before { + content: "\e64a"; +} + +.icon-fenxiang:before { + content: "\e8b0"; +} + +.icon-guanbishixin:before { + content: "\e8dc"; +} + +.icon-shuoming:before { + content: "\e63c"; +} + +.icon-huore:before { + content: "\1001d"; +} + +.icon-zy_peisong:before { + content: "\e60a"; +} + +.icon-shangchuantupian:before { + content: "\e628"; +} + +.icon-kefu:before { + content: "\e665"; +} + +.icon-bianji:before { + content: "\e609"; +} + +.icon-xiala:before { + content: "\e6b9"; +} + +.icon-24gf-telephone:before { + content: "\e96c"; +} + +.icon-shanchu:before { + content: "\e718"; +} + +.icon-kaiguan-kai:before { + content: "\e608"; +} + +.icon-kaiguan-guan:before { + content: "\e60f"; +} + +.icon-fenfabaoxian:before { + content: "\e607"; +} + +.icon-shijian:before { + content: "\e8c5"; +} + +.icon-dingwei:before { + content: "\e8c4"; +} + +.icon-xuanzeweixuanze:before { + content: "\e67b"; +} + +.icon-xuanzeyixuanze:before { + content: "\e67c"; +} + +.icon-tixing:before { + content: "\e64e"; +} + +.icon-fanhui:before { + content: "\e605"; +} + +.icon-jiahao-:before { + content: "\e606"; +} + +.icon-jianhao:before { + content: "\e617"; +} + +.icon-jiahao2fill:before { + content: "\e728"; +} + +.icon-31dingwei:before { + content: "\e604"; +} + +.icon-gouwuche:before { + content: "\e70b"; +} + +.icon-quanbudingdan:before { + content: "\e601"; +} + +.icon-31wode:before { + content: "\e602"; +} + +.icon-shouye:before { + content: "\e62e"; +} + +.icon-fenlei:before { + content: "\e62f"; +} + +.icon-qiye:before { + content: "\e637"; +} + +.icon-gongren:before { + content: "\e6db"; +} + +.icon-jinru:before { + content: "\e646"; +} + +.icon-weixiu:before { + content: "\e68c"; +} + +.icon-guandao1:before { + content: "\ec51"; +} + +.icon-jiazhengfuwu:before { + content: "\e661"; +} + +.icon-jiazheng:before { + content: "\e662"; +} + +.icon-jiayongdianqi:before { + content: "\e619"; +} + +.icon-dibandiaodinganzhuang:before { + content: "\e61a"; +} + +.icon-iconmoshiyugangreshuiqi:before { + content: "\e653"; +} + +.icon-jingshuiqianzhuang:before { + content: "\e61d"; +} + +.icon-menchuangmenchuangwujinanzhuang:before { + content: "\e61e"; +} + +.icon-shuidianmei:before { + content: "\e631"; +} + +.icon-anzhuangshigong:before { + content: "\e8d7"; +} + +.icon-guandao:before { + content: "\e603"; +} + +.icon-jiadiandianqi:before { + content: "\e60e"; +} + +.icon-classchuangjuanzhuang:before { + content: "\e7f8"; +} + +.icon-sousuo:before { + content: "\e600"; +} + diff --git a/src/static/iconfont/iconfont.ttf b/src/static/iconfont/iconfont.ttf new file mode 100644 index 0000000..6846903 Binary files /dev/null and b/src/static/iconfont/iconfont.ttf differ diff --git a/src/static/iconfont/iconfont.woff b/src/static/iconfont/iconfont.woff new file mode 100644 index 0000000..f1b1763 Binary files /dev/null and b/src/static/iconfont/iconfont.woff differ diff --git a/src/static/iconfont/iconfont.woff2 b/src/static/iconfont/iconfont.woff2 new file mode 100644 index 0000000..f305d11 Binary files /dev/null and b/src/static/iconfont/iconfont.woff2 differ diff --git a/src/static/temp/banner.png b/src/static/temp/banner.png new file mode 100644 index 0000000..8679eb5 Binary files /dev/null and b/src/static/temp/banner.png differ diff --git a/src/static/temp/index/1.png b/src/static/temp/index/1.png new file mode 100644 index 0000000..85e8225 Binary files /dev/null and b/src/static/temp/index/1.png differ diff --git a/src/static/temp/index/2.png b/src/static/temp/index/2.png new file mode 100644 index 0000000..eba5c9d Binary files /dev/null and b/src/static/temp/index/2.png differ diff --git a/src/static/temp/index/3.png b/src/static/temp/index/3.png new file mode 100644 index 0000000..cbf7db3 Binary files /dev/null and b/src/static/temp/index/3.png differ diff --git a/src/static/temp/index/4.png b/src/static/temp/index/4.png new file mode 100644 index 0000000..1c43cae Binary files /dev/null and b/src/static/temp/index/4.png differ diff --git a/src/static/temp/index/5.png b/src/static/temp/index/5.png new file mode 100644 index 0000000..577e19a Binary files /dev/null and b/src/static/temp/index/5.png differ diff --git a/src/static/temp/index/6.png b/src/static/temp/index/6.png new file mode 100644 index 0000000..9e234ad Binary files /dev/null and b/src/static/temp/index/6.png differ diff --git a/src/static/temp/index/7.png b/src/static/temp/index/7.png new file mode 100644 index 0000000..e9ecaf3 Binary files /dev/null and b/src/static/temp/index/7.png differ diff --git a/src/static/temp/index/8.png b/src/static/temp/index/8.png new file mode 100644 index 0000000..992b352 Binary files /dev/null and b/src/static/temp/index/8.png differ diff --git a/src/static/temp/index/a1.png b/src/static/temp/index/a1.png new file mode 100644 index 0000000..a62051b Binary files /dev/null and b/src/static/temp/index/a1.png differ diff --git a/src/static/temp/index/a2.png b/src/static/temp/index/a2.png new file mode 100644 index 0000000..c7f5562 Binary files /dev/null and b/src/static/temp/index/a2.png differ diff --git a/src/static/temp/index/a3.png b/src/static/temp/index/a3.png new file mode 100644 index 0000000..77497c7 Binary files /dev/null and b/src/static/temp/index/a3.png differ diff --git a/src/static/temp/index/a4.png b/src/static/temp/index/a4.png new file mode 100644 index 0000000..7bb98dd Binary files /dev/null and b/src/static/temp/index/a4.png differ diff --git a/src/static/temp/index/a5.png b/src/static/temp/index/a5.png new file mode 100644 index 0000000..e97ef7b Binary files /dev/null and b/src/static/temp/index/a5.png differ diff --git a/src/static/temp/index/b1.png b/src/static/temp/index/b1.png new file mode 100644 index 0000000..5b15040 Binary files /dev/null and b/src/static/temp/index/b1.png differ diff --git a/src/static/temp/index/b2.png b/src/static/temp/index/b2.png new file mode 100644 index 0000000..21bdf1a Binary files /dev/null and b/src/static/temp/index/b2.png differ diff --git a/src/static/temp/tabbar/1.png b/src/static/temp/tabbar/1.png new file mode 100644 index 0000000..bf607a1 Binary files /dev/null and b/src/static/temp/tabbar/1.png differ diff --git a/src/static/temp/tabbar/1a.png b/src/static/temp/tabbar/1a.png new file mode 100644 index 0000000..00c19d1 Binary files /dev/null and b/src/static/temp/tabbar/1a.png differ diff --git a/src/static/temp/tabbar/2.png b/src/static/temp/tabbar/2.png new file mode 100644 index 0000000..3bd0eb4 Binary files /dev/null and b/src/static/temp/tabbar/2.png differ diff --git a/src/static/temp/tabbar/2a.png b/src/static/temp/tabbar/2a.png new file mode 100644 index 0000000..e44b4ec Binary files /dev/null and b/src/static/temp/tabbar/2a.png differ diff --git a/src/static/temp/tabbar/3.png b/src/static/temp/tabbar/3.png new file mode 100644 index 0000000..6b21f0f Binary files /dev/null and b/src/static/temp/tabbar/3.png differ diff --git a/src/static/temp/tabbar/3a.png b/src/static/temp/tabbar/3a.png new file mode 100644 index 0000000..4213e4f Binary files /dev/null and b/src/static/temp/tabbar/3a.png differ diff --git a/src/static/temp/tabbar/4.png b/src/static/temp/tabbar/4.png new file mode 100644 index 0000000..cd307eb Binary files /dev/null and b/src/static/temp/tabbar/4.png differ diff --git a/src/static/temp/tabbar/4a.png b/src/static/temp/tabbar/4a.png new file mode 100644 index 0000000..1ec2ba3 Binary files /dev/null and b/src/static/temp/tabbar/4a.png differ diff --git a/src/static/temp/tabbar/5.png b/src/static/temp/tabbar/5.png new file mode 100644 index 0000000..08b156d Binary files /dev/null and b/src/static/temp/tabbar/5.png differ diff --git a/src/static/temp/tabbar/5a.png b/src/static/temp/tabbar/5a.png new file mode 100644 index 0000000..4908e72 Binary files /dev/null and b/src/static/temp/tabbar/5a.png differ diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6f00a13..b24b100 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,24 +1,35 @@ +import user from '@/core/user' + export default { namespaced: true, state: { - isLogin: false, + showLoginModal: false, + userInfo: null, }, getters: { - isLogin(state) { - return state.isLogin - } + showLoginModal(state) { + return state.showLoginModal; + }, + userInfo(state) { + return state.userInfo; + }, }, mutations: { - setLoginState(state, loginState) { - state.isLogin = loginState + showLoginModal(state, data) { + state.showLoginModal = data; + }, + userInfo(state, data) { + state.userInfo = data; } }, actions: { - login(context) { - context.commit('setLoginState', true) - }, logout(context) { - context.commit('setLoginState', false) + context.commit('userInfo', null); + }, + userInfo(context) { + user.getInfo().then(info => { + context.commit('userInfo', info); + }); } } } diff --git a/vue.config.js b/vue.config.js new file mode 100644 index 0000000..957df4c --- /dev/null +++ b/vue.config.js @@ -0,0 +1,14 @@ +module.exports = { + css: { + loaderOptions: { + less: { + globalVars: { + tabBarHeight: '115rpx', + tabBarIconWidth: '40rpx', + tabBarIconHeight: '40rpx', + tabBarFontSize: '22rpx' + } + } + } + } +} \ No newline at end of file