diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..ab4c0eb
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,8 @@
+[*.{js,jsx,ts,tsx,vue}]
+indent_style = space
+indent_size = 2
+end_of_line = lf
+trim_trailing_whitespace = true
+insert_final_newline = true
+max_line_length = 140
+root = true
diff --git a/.eslintignore b/.eslintignore
new file mode 100644
index 0000000..5c40e6a
--- /dev/null
+++ b/.eslintignore
@@ -0,0 +1,13 @@
+node_modules
+dist/
+test
+build/
+unpackage/
+babel.config.js
+package.json
+postcss.config.js
+.eslint.js
+vue.config.js
+src/common/styles/index.css
+src/pages.json
+src/manifest.json
diff --git a/.eslintrc.js b/.eslintrc.js
new file mode 100644
index 0000000..71a1637
--- /dev/null
+++ b/.eslintrc.js
@@ -0,0 +1,21 @@
+module.exports = {
+ "env": {
+ "browser": true,
+ "es2021": true
+ },
+ "extends": [
+ "plugin:vue/essential",
+ "airbnb-base"
+ ],
+ "parserOptions": {
+ "ecmaVersion": 13,
+ "parser": "@typescript-eslint/parser",
+ "sourceType": "module"
+ },
+ "plugins": [
+ "vue",
+ "@typescript-eslint"
+ ],
+ "rules": {
+ }
+};
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ccf2ca7
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,27 @@
+.DS_Store
+node_modules/
+unpackage/
+dist/
+
+# local env files
+.env.local
+.env.*.local
+
+# Log files
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+yarn.lock
+package-lock.json
+
+# Editor directories and files
+.project
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw*
+.eslintcache
diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json
new file mode 100644
index 0000000..32f4dc5
--- /dev/null
+++ b/.hbuilderx/launch.json
@@ -0,0 +1,20 @@
+{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
+ // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
+ "version": "0.0",
+ "configurations": [{
+ "default" :
+ {
+ "launchtype" : "local"
+ },
+ "h5" :
+ {
+ "launchtype" : "local"
+ },
+ "mp-weixin" :
+ {
+ "launchtype" : "local"
+ },
+ "type" : "uniCloud"
+ }
+ ]
+}
diff --git a/.npmrc b/.npmrc
new file mode 100644
index 0000000..e7afe10
--- /dev/null
+++ b/.npmrc
@@ -0,0 +1 @@
+registry=https://registry.npm.taobao.org
\ No newline at end of file
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 0000000..8967f13
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,9 @@
+node_modules
+dist/
+test
+build/
+unpackage/
+babel.config.js
+package.json
+postcss.config.js
+.eslint.js
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 0000000..ae624c3
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,13 @@
+{
+ "printWidth": 140,
+ "singleQuote": true,
+ "semi": true,
+ "trailingComma": "all",
+ "arrowParens": "avoid",
+ "tabWidth": 2,
+ "useTabs": false,
+ "bracketSpacing": true,
+ "jsxBracketSameLine": false,
+ "proseWrap": "always",
+ "endOfLine": "lf"
+}
diff --git a/App.vue b/App.vue
new file mode 100644
index 0000000..f5f2c79
--- /dev/null
+++ b/App.vue
@@ -0,0 +1,36 @@
+
+
+
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..06d1258
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,6 @@
+# 1.0.0 (2021-12-31)
+
+范围|描述|commitId
+--|--|--
+ - | Initial commit | 52b8f49
+
diff --git a/commitlint.config.js b/commitlint.config.js
new file mode 100644
index 0000000..2086441
--- /dev/null
+++ b/commitlint.config.js
@@ -0,0 +1 @@
+module.exports = { extends: ['./node_modules/vue-cli-plugin-commitlint/lib/lint'] };
diff --git a/common/styles/app.scss b/common/styles/app.scss
new file mode 100644
index 0000000..8eb73dd
--- /dev/null
+++ b/common/styles/app.scss
@@ -0,0 +1,155 @@
+.min-0 {
+ min-width: 0;
+}
+.border-b-1 {
+ border-bottom-width: 1px;
+}
+
+/* 列表 */
+.uni-list {
+ background-color: #ffffff;
+ position: relative;
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ border: 1px solid #afbed1;
+ height: 80rpx;
+ line-height: 80rpx;
+}
+.uni-list-cell {
+ position: relative;
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ align-items: center;
+}
+.uni-list-cell-hover {
+ background-color: #eee;
+}
+.uni-list-cell-pd {
+ padding: 22rpx 30rpx;
+}
+.uni-list-cell-left {
+ white-space: nowrap;
+ font-size: 28rpx;
+ padding: 0 30rpx;
+}
+.uni-list-cell-db,
+.uni-list-cell-right {
+ flex: 1;
+}
+.uni-list-cell::after {
+ position: absolute;
+ z-index: 3;
+ right: 0;
+ bottom: 0;
+ left: 30rpx;
+ height: 1px;
+ content: '';
+ -webkit-transform: scaleY(0.5);
+ transform: scaleY(0.5);
+ background-color: #c8c7cc;
+}
+.uni-list .uni-list-cell:last-child::after {
+ height: 0rpx;
+}
+.uni-list-cell-last.uni-list-cell::after {
+ height: 0rpx;
+}
+.uni-list-cell-divider {
+ position: relative;
+ display: flex;
+ color: #999;
+ background-color: #f7f7f7;
+ padding: 15rpx 20rpx;
+}
+.uni-list-cell-divider::before {
+ position: absolute;
+ right: 0;
+ top: 0;
+ left: 0;
+ height: 1px;
+ content: '';
+ -webkit-transform: scaleY(0.5);
+ transform: scaleY(0.5);
+ background-color: #c8c7cc;
+}
+.uni-list-cell-divider::after {
+ position: absolute;
+ right: 0;
+ bottom: 0;
+ left: 0rpx;
+ height: 1px;
+ content: '';
+ -webkit-transform: scaleY(0.5);
+ transform: scaleY(0.5);
+ background-color: #c8c7cc;
+}
+.uni-list-cell-navigate {
+ font-size: 30rpx;
+ padding: 22rpx 30rpx;
+ line-height: 48rpx;
+ position: relative;
+ display: flex;
+ box-sizing: border-box;
+ width: 100%;
+ flex: 1;
+ justify-content: space-between;
+ align-items: center;
+}
+.uni-list-cell-navigate {
+ padding-right: 36rpx;
+}
+.uni-navigate-badge {
+ padding-right: 50rpx;
+}
+.uni-list-cell-navigate.uni-navigate-right:after {
+ font-family: uniicons;
+ content: '\e583';
+ position: absolute;
+ right: 24rpx;
+ top: 50%;
+ color: #bbb;
+ -webkit-transform: translateY(-50%);
+ transform: translateY(-50%);
+}
+.uni-list-cell-navigate.uni-navigate-bottom:after {
+ font-family: uniicons;
+ content: '\e581';
+ position: absolute;
+ right: 24rpx;
+ top: 50%;
+ color: #bbb;
+ -webkit-transform: translateY(-50%);
+ transform: translateY(-50%);
+}
+.uni-list-cell-navigate.uni-navigate-bottom.uni-active::after {
+ font-family: uniicons;
+ content: '\e580';
+ position: absolute;
+ right: 24rpx;
+ top: 50%;
+ color: #bbb;
+ -webkit-transform: translateY(-50%);
+ transform: translateY(-50%);
+}
+.uni-collapse.uni-list-cell {
+ flex-direction: column;
+}
+.uni-list-cell-navigate.uni-active {
+ background: #eee;
+}
+.uni-list.uni-collapse {
+ box-sizing: border-box;
+ height: 0;
+ overflow: hidden;
+}
+.uni-collapse .uni-list-cell {
+ padding-left: 20rpx;
+}
+.uni-collapse .uni-list-cell::after {
+ left: 52rpx;
+}
+.uni-list.uni-active {
+ height: auto;
+}
diff --git a/common/styles/iconfont.css b/common/styles/iconfont.css
new file mode 100644
index 0000000..69b157e
--- /dev/null
+++ b/common/styles/iconfont.css
@@ -0,0 +1,257 @@
+@font-face {
+ font-family: 'custom-icon'; /* Project id 2470633 */
+ src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAABtkAAsAAAAAOUwAABsUAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACLcArVAMZ0ATYCJAOBeAt+AAQgBYULB4VqG/4wZYYYbBwAztjfDRGVolD2/5+Sk8OVq3WAUrkNnX91ggHvSjUso8vOcS1BMNC4Sz1yp+0l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iGiVZEVF7VfRf2amZTuu5wdhFCdplhdlVTdt1w/zxXK13mx3+8PxdL5cZcGXDHzrhP1+mcy2m6UuwyXwbn5j70uAPKYYczLSVS9MV5QYCW31yqUuB+O9vLx45QIbeYU4R4jEDehuTnXO3lOyRU6kSBs+XQ4Rrg6DYqRpTymBp+weOZWPUx+ILq/cNV8DLxrJdaRMtLZMstHgO5tRjGFIIT145T6vV/kRgtdAgumbi467FUZJJLZmaaE/DNicQTmw92cdpSvjQikKNAzrLqkJ5tL/PBtN6DKI2uRD/9lphR3h8XZqLdqQjmxzmDQUyWjUSdFtA0TJbLXIcYagepVss0aRKlSfG5cHRbMuwAyw64ltJLHhgYEfW6iOTO57Pw+jRs48lknGpqTMYQA1ZnRXeQy7pfA4mSsw9yQRKHYPXzkGaU/877V3DdzmmnjUyJbZK9eGCKh1sOWah7Bb+EptCmmklJav3C0fAvD+yW5pk9XBCQyUtBn1JTqlJl/WqZOMwL5E/x0AAA==')
+ format('woff2');
+}
+
+.custom-icon {
+ font-family: 'custom-icon' !important;
+ font-size: 16px;
+ font-style: normal;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+.custom-icon-xuanzhong2:before {
+ content: '\e63a';
+}
+
+.custom-icon-xuanzhong21:before {
+ content: '\e714';
+}
+
+.custom-icon-shuaxin1:before {
+ content: '\e6a8';
+}
+
+.custom-icon-xuanxiang:before {
+ content: '\e611';
+}
+
+.custom-icon-cluster:before {
+ content: '\e7d7';
+}
+
+.custom-icon-moneycollect:before {
+ content: '\e7cd';
+}
+
+.custom-icon-C-shangchuan:before {
+ content: '\e6c5';
+}
+
+.custom-icon-C-integral:before {
+ content: '\e6f9';
+}
+
+.custom-icon-calendar1:before {
+ content: '\e746';
+}
+
+.custom-icon-C-suggest:before {
+ content: '\e767';
+}
+
+.custom-icon-usercenter:before {
+ content: '\e773';
+}
+
+.custom-icon-play-circle:before {
+ content: '\e782';
+}
+
+.custom-icon-message:before {
+ content: '\e78a';
+}
+
+.custom-icon-plus-circle:before {
+ content: '\e781';
+}
+
+.custom-icon-smile:before {
+ content: '\e783';
+}
+
+.custom-icon-C-yuyin:before {
+ content: '\e79a';
+}
+
+.custom-icon-doubleleft:before {
+ content: '\e7ef';
+}
+
+.custom-icon-doubleright:before {
+ content: '\e7f0';
+}
+
+.custom-icon-ellipsis:before {
+ content: '\e7fe';
+}
+
+.custom-icon-C-L:before {
+ content: '\e601';
+}
+
+.custom-icon-C-kaiguanguan:before {
+ content: '\e66c';
+}
+
+.custom-icon-C-kaiguanguan1:before {
+ content: '\e60c';
+}
+
+.custom-icon-close-circle:before {
+ content: '\e77d';
+}
+
+.custom-icon-time-circle:before {
+ content: '\e784';
+}
+
+.custom-icon-warning-circle:before {
+ content: '\e785';
+}
+
+.custom-icon-sync:before {
+ content: '\e786';
+}
+
+.custom-icon-reloadtime:before {
+ content: '\e789';
+}
+
+.custom-icon-edit-square:before {
+ content: '\e791';
+}
+
+.custom-icon-export:before {
+ content: '\e792';
+}
+
+.custom-icon-Import:before {
+ content: '\e793';
+}
+
+.custom-icon-check-square:before {
+ content: '\e7a8';
+}
+
+.custom-icon-border:before {
+ content: '\e7a9';
+}
+
+.custom-icon-user:before {
+ content: '\e7ae';
+}
+
+.custom-icon-delete:before {
+ content: '\e7c3';
+}
+
+.custom-icon-home:before {
+ content: '\e7c6';
+}
+
+.custom-icon-accountbook:before {
+ content: '\e7d3';
+}
+
+.custom-icon-carryout:before {
+ content: '\e7d4';
+}
+
+.custom-icon-calendar:before {
+ content: '\e7d5';
+}
+
+.custom-icon-cloud-upload:before {
+ content: '\e7d9';
+}
+
+.custom-icon-attachment:before {
+ content: '\e7e1';
+}
+
+.custom-icon-edit:before {
+ content: '\e7e2';
+}
+
+.custom-icon-tag:before {
+ content: '\e7e4';
+}
+
+.custom-icon-right:before {
+ content: '\e7eb';
+}
+
+.custom-icon-left:before {
+ content: '\e7ec';
+}
+
+.custom-icon-up:before {
+ content: '\e7ed';
+}
+
+.custom-icon-down:before {
+ content: '\e7ee';
+}
+
+.custom-icon-check:before {
+ content: '\e7fc';
+}
+
+.custom-icon-close:before {
+ content: '\e7fd';
+}
+
+.custom-icon-apartment:before {
+ content: '\e897';
+}
+
+.custom-icon-rili1:before {
+ content: '\e617';
+}
+
+.custom-icon-caret-right:before {
+ content: '\e8ec';
+}
+
+.custom-icon-search:before {
+ content: '\e8ef';
+}
+
+.custom-icon-C-naozhong_huabanfuben:before {
+ content: '\e655';
+}
+
+.custom-icon-plus:before {
+ content: '\e8fe';
+}
+
+.custom-icon-C-filter:before {
+ content: '\e667';
+}
+
+.custom-icon-C-tongji1:before {
+ content: '\e69b';
+}
+
+.custom-icon-genderless:before {
+ content: '\e888';
+}
+
+.custom-icon-C-zujian251:before {
+ content: '\e61e';
+}
+
+.custom-icon-user-avatar:before {
+ content: '\e61d';
+}
+
+.custom-icon-C-bxl-redux:before {
+ content: '\e608';
+}
+
+.custom-icon-shoucangfuben:before {
+ content: '\e600';
+}
diff --git a/common/styles/iconfont.scss b/common/styles/iconfont.scss
new file mode 100644
index 0000000..69b157e
--- /dev/null
+++ b/common/styles/iconfont.scss
@@ -0,0 +1,257 @@
+@font-face {
+ font-family: 'custom-icon'; /* Project id 2470633 */
+ src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAABtkAAsAAAAAOUwAABsUAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACLcArVAMZ0ATYCJAOBeAt+AAQgBYULB4VqG/4wZYYYbBwAztjfDRGVolD2/5+Sk8OVq3WAUrkNnX91ggHvSjUso8vOcS1BMNC4Sz1yp+0lLpG3m7aGra+emcUkqufPWuxcw9FW3drczGWm0iwZiNid0SEZkGYbSsnD/+/36b7w/hBBwgMqKzpFVV3FPi6qKnWmRgE5lve0LFxneNrmP+6IW6CCNoqAYFAiIqFsHnCE0RiNzomfVTljYOTmIq1F6rqdq2hd1Rei2t38KgZmjUeaZRFfAEC007JPpjdJMpLcl4GV5PPcH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MtLZMstHgO5tRjGFIIT145T6vV/kRgtdAgumbi467FUZJJLZmaaE/DNicQTmw92cdpSvjQikKNAzrLqkJ5tL/PBtN6DKI2uRD/9lphR3h8XZqLdqQjmxzmDQUyWjUSdFtA0TJbLXIcYagepVss0aRKlSfG5cHRbMuwAyw64ltJLHhgYEfW6iOTO57Pw+jRs48lknGpqTMYQA1ZnRXeQy7pfA4mSsw9yQRKHYPXzkGaU/877V3DdzmmnjUyJbZK9eGCKh1sOWah7Bb+EptCmmklJav3C0fAvD+yW5pk9XBCQyUtBn1JTqlJl/WqZOMwL5E/x0AAA==')
+ format('woff2');
+}
+
+.custom-icon {
+ font-family: 'custom-icon' !important;
+ font-size: 16px;
+ font-style: normal;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+.custom-icon-xuanzhong2:before {
+ content: '\e63a';
+}
+
+.custom-icon-xuanzhong21:before {
+ content: '\e714';
+}
+
+.custom-icon-shuaxin1:before {
+ content: '\e6a8';
+}
+
+.custom-icon-xuanxiang:before {
+ content: '\e611';
+}
+
+.custom-icon-cluster:before {
+ content: '\e7d7';
+}
+
+.custom-icon-moneycollect:before {
+ content: '\e7cd';
+}
+
+.custom-icon-C-shangchuan:before {
+ content: '\e6c5';
+}
+
+.custom-icon-C-integral:before {
+ content: '\e6f9';
+}
+
+.custom-icon-calendar1:before {
+ content: '\e746';
+}
+
+.custom-icon-C-suggest:before {
+ content: '\e767';
+}
+
+.custom-icon-usercenter:before {
+ content: '\e773';
+}
+
+.custom-icon-play-circle:before {
+ content: '\e782';
+}
+
+.custom-icon-message:before {
+ content: '\e78a';
+}
+
+.custom-icon-plus-circle:before {
+ content: '\e781';
+}
+
+.custom-icon-smile:before {
+ content: '\e783';
+}
+
+.custom-icon-C-yuyin:before {
+ content: '\e79a';
+}
+
+.custom-icon-doubleleft:before {
+ content: '\e7ef';
+}
+
+.custom-icon-doubleright:before {
+ content: '\e7f0';
+}
+
+.custom-icon-ellipsis:before {
+ content: '\e7fe';
+}
+
+.custom-icon-C-L:before {
+ content: '\e601';
+}
+
+.custom-icon-C-kaiguanguan:before {
+ content: '\e66c';
+}
+
+.custom-icon-C-kaiguanguan1:before {
+ content: '\e60c';
+}
+
+.custom-icon-close-circle:before {
+ content: '\e77d';
+}
+
+.custom-icon-time-circle:before {
+ content: '\e784';
+}
+
+.custom-icon-warning-circle:before {
+ content: '\e785';
+}
+
+.custom-icon-sync:before {
+ content: '\e786';
+}
+
+.custom-icon-reloadtime:before {
+ content: '\e789';
+}
+
+.custom-icon-edit-square:before {
+ content: '\e791';
+}
+
+.custom-icon-export:before {
+ content: '\e792';
+}
+
+.custom-icon-Import:before {
+ content: '\e793';
+}
+
+.custom-icon-check-square:before {
+ content: '\e7a8';
+}
+
+.custom-icon-border:before {
+ content: '\e7a9';
+}
+
+.custom-icon-user:before {
+ content: '\e7ae';
+}
+
+.custom-icon-delete:before {
+ content: '\e7c3';
+}
+
+.custom-icon-home:before {
+ content: '\e7c6';
+}
+
+.custom-icon-accountbook:before {
+ content: '\e7d3';
+}
+
+.custom-icon-carryout:before {
+ content: '\e7d4';
+}
+
+.custom-icon-calendar:before {
+ content: '\e7d5';
+}
+
+.custom-icon-cloud-upload:before {
+ content: '\e7d9';
+}
+
+.custom-icon-attachment:before {
+ content: '\e7e1';
+}
+
+.custom-icon-edit:before {
+ content: '\e7e2';
+}
+
+.custom-icon-tag:before {
+ content: '\e7e4';
+}
+
+.custom-icon-right:before {
+ content: '\e7eb';
+}
+
+.custom-icon-left:before {
+ content: '\e7ec';
+}
+
+.custom-icon-up:before {
+ content: '\e7ed';
+}
+
+.custom-icon-down:before {
+ content: '\e7ee';
+}
+
+.custom-icon-check:before {
+ content: '\e7fc';
+}
+
+.custom-icon-close:before {
+ content: '\e7fd';
+}
+
+.custom-icon-apartment:before {
+ content: '\e897';
+}
+
+.custom-icon-rili1:before {
+ content: '\e617';
+}
+
+.custom-icon-caret-right:before {
+ content: '\e8ec';
+}
+
+.custom-icon-search:before {
+ content: '\e8ef';
+}
+
+.custom-icon-C-naozhong_huabanfuben:before {
+ content: '\e655';
+}
+
+.custom-icon-plus:before {
+ content: '\e8fe';
+}
+
+.custom-icon-C-filter:before {
+ content: '\e667';
+}
+
+.custom-icon-C-tongji1:before {
+ content: '\e69b';
+}
+
+.custom-icon-genderless:before {
+ content: '\e888';
+}
+
+.custom-icon-C-zujian251:before {
+ content: '\e61e';
+}
+
+.custom-icon-user-avatar:before {
+ content: '\e61d';
+}
+
+.custom-icon-C-bxl-redux:before {
+ content: '\e608';
+}
+
+.custom-icon-shoucangfuben:before {
+ content: '\e600';
+}
diff --git a/components/Globals/Globals.vue b/components/Globals/Globals.vue
new file mode 100644
index 0000000..48d48ea
--- /dev/null
+++ b/components/Globals/Globals.vue
@@ -0,0 +1,8 @@
+
+
+
+
+
+
diff --git a/components/Roles/Roles.vue b/components/Roles/Roles.vue
new file mode 100644
index 0000000..48d48ea
--- /dev/null
+++ b/components/Roles/Roles.vue
@@ -0,0 +1,8 @@
+
+
+
+
+
+
diff --git a/components/TimeLine/TimeLine.vue b/components/TimeLine/TimeLine.vue
new file mode 100644
index 0000000..48d48ea
--- /dev/null
+++ b/components/TimeLine/TimeLine.vue
@@ -0,0 +1,8 @@
+
+
+
+
+
+
diff --git a/components/Title/Title.vue b/components/Title/Title.vue
new file mode 100644
index 0000000..48d48ea
--- /dev/null
+++ b/components/Title/Title.vue
@@ -0,0 +1,8 @@
+
+
+
+
+
+
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..b61f63e
--- /dev/null
+++ b/index.html
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/main.js b/main.js
new file mode 100644
index 0000000..a3bb48d
--- /dev/null
+++ b/main.js
@@ -0,0 +1,23 @@
+import App from './App'
+import uView from './uni_modules/vk-uview-ui'; // 引入 uView UI
+
+// #ifndef VUE3
+import Vue from 'vue'
+Vue.config.productionTip = false
+App.mpType = 'app'
+const app = new Vue({
+ ...App
+})
+app.$mount()
+// #endif
+
+// #ifdef VUE3
+import { createSSRApp } from 'vue'
+export function createApp() {
+ const app = createSSRApp(App)
+ app.use(uView) // 使用 uView UI
+ return {
+ app
+ }
+}
+// #endif
\ No newline at end of file
diff --git a/manifest.json b/manifest.json
new file mode 100644
index 0000000..5dc57cd
--- /dev/null
+++ b/manifest.json
@@ -0,0 +1,72 @@
+{
+ "name" : "tall-4-project",
+ "appid" : "__UNI__1EC8558",
+ "description" : "",
+ "versionName" : "1.0.0",
+ "versionCode" : "100",
+ "transformPx" : false,
+ /* 5+App特有相关 */
+ "app-plus" : {
+ "usingComponents" : true,
+ "nvueStyleCompiler" : "uni-app",
+ "compilerVersion" : 3,
+ "splashscreen" : {
+ "alwaysShowBeforeRender" : true,
+ "waiting" : true,
+ "autoclose" : true,
+ "delay" : 0
+ },
+ /* 模块配置 */
+ "modules" : {},
+ /* 应用发布信息 */
+ "distribute" : {
+ /* android打包配置 */
+ "android" : {
+ "permissions" : [
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+ ]
+ },
+ /* ios打包配置 */
+ "ios" : {},
+ /* SDK配置 */
+ "sdkConfigs" : {}
+ }
+ },
+ /* 快应用特有相关 */
+ "quickapp" : {},
+ /* 小程序特有相关 */
+ "mp-weixin" : {
+ "appid" : "",
+ "setting" : {
+ "urlCheck" : false
+ },
+ "usingComponents" : true
+ },
+ "mp-alipay" : {
+ "usingComponents" : true
+ },
+ "mp-baidu" : {
+ "usingComponents" : true
+ },
+ "mp-toutiao" : {
+ "usingComponents" : true
+ },
+ "uniStatistics" : {
+ "enable" : false
+ },
+ "vueVersion" : "3"
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..c81c930
--- /dev/null
+++ b/package.json
@@ -0,0 +1,54 @@
+{
+ "name": "tall-4",
+ "version": "1.0.0",
+ "description": "",
+ "main": "main.js",
+ "dependencies": {},
+ "devDependencies": {
+ "@typescript-eslint/eslint-plugin": "^5.8.1",
+ "@typescript-eslint/parser": "^5.8.1",
+ "commitizen": "^4.2.4",
+ "commitlint": "^16.0.1",
+ "conventional-changelog": "^3.1.25",
+ "conventional-changelog-cli": "^2.2.2",
+ "eslint": "^7.32.0",
+ "eslint-config-airbnb-base": "^15.0.0",
+ "eslint-plugin-import": "^2.25.3",
+ "eslint-plugin-prettier": "^4.0.0",
+ "eslint-plugin-vue": "^8.2.0",
+ "husky": "^7.0.4",
+ "lint-staged": "^12.1.4",
+ "prettier": "^2.5.1",
+ "right-pad": "^1.0.1",
+ "vue-cli-plugin-commitlint": "^1.0.12"
+ },
+ "browserslist": [
+ "Android >= 4",
+ "ios >= 8"
+ ],
+ "config": {
+ "commitizen": {
+ "path": "./node_modules/vue-cli-plugin-commitlint/lib/cz"
+ }
+ },
+ "husky": {
+ "hooks": {
+ "commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
+ "pre-commit": "lint-staged"
+ }
+ },
+ "lint-staged": {
+ "src/**/*.{js,json,css,vue}": [
+ "eslint --fix",
+ "git add"
+ ],
+ "*.js": "eslint --cache --fix"
+ },
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1",
+ "cz": "npm run log && git add . && git cz",
+ "log": "conventional-changelog --config ./node_modules/vue-cli-plugin-commitlint/lib/log -i CHANGELOG.md -s -r 0"
+ },
+ "author": "",
+ "license": "ISC"
+}
diff --git a/pages.json b/pages.json
new file mode 100644
index 0000000..1aea851
--- /dev/null
+++ b/pages.json
@@ -0,0 +1,16 @@
+{
+ "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
+ {
+ "path": "pages/index/index",
+ "style": {
+ "navigationBarTitleText": "uni-app"
+ }
+ }
+ ],
+ "globalStyle": {
+ "navigationBarTextStyle": "black",
+ "navigationBarTitleText": "uni-app",
+ "navigationBarBackgroundColor": "#F8F8F8",
+ "backgroundColor": "#F8F8F8"
+ }
+}
diff --git a/pages/index/index.vue b/pages/index/index.vue
new file mode 100644
index 0000000..eac473f
--- /dev/null
+++ b/pages/index/index.vue
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/static/logo.png b/static/logo.png
new file mode 100644
index 0000000..b5771e2
Binary files /dev/null and b/static/logo.png differ
diff --git a/store/db/actions.js b/store/db/actions.js
new file mode 100644
index 0000000..5dfa3d4
--- /dev/null
+++ b/store/db/actions.js
@@ -0,0 +1,3 @@
+const actions = {};
+
+export default actions;
diff --git a/store/db/getters.js b/store/db/getters.js
new file mode 100644
index 0000000..56c8c75
--- /dev/null
+++ b/store/db/getters.js
@@ -0,0 +1,3 @@
+const getters = {};
+
+export default getters;
diff --git a/store/db/index.js b/store/db/index.js
new file mode 100644
index 0000000..d22f64a
--- /dev/null
+++ b/store/db/index.js
@@ -0,0 +1,12 @@
+import state from './state';
+import getters from './getters';
+import mutations from './mutations';
+import actions from './actions';
+
+export default {
+ namespaced: true,
+ state,
+ getters,
+ mutations,
+ actions,
+};
diff --git a/store/db/mutations.js b/store/db/mutations.js
new file mode 100644
index 0000000..ea2bcc2
--- /dev/null
+++ b/store/db/mutations.js
@@ -0,0 +1,3 @@
+const mutations = {};
+
+export default mutations;
diff --git a/store/db/state.js b/store/db/state.js
new file mode 100644
index 0000000..51d33c8
--- /dev/null
+++ b/store/db/state.js
@@ -0,0 +1,7 @@
+const state = {
+ db: null, // indexedDB对象
+ name: 'TALL_indexedDB',
+ version: 1,
+};
+
+export default state;
diff --git a/store/index.js b/store/index.js
new file mode 100644
index 0000000..acddb3c
--- /dev/null
+++ b/store/index.js
@@ -0,0 +1,36 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import messages from './messages/index';
+import project from './project/index';
+import role from './role/index';
+import socket from './socket/index';
+import task from './task/index';
+import user from './user/index';
+
+// 不属于具体模块的 应用级的 store内容
+const state = {
+ networkConnected: true, // 网络是否连接
+ forceUseStorage: true, // 强制启用storage
+};
+
+const getters = {
+ // 是否启用本地存储
+ // 设置了强制启用本地存储 或者 没有网络连接的时候
+ useStorage({ networkConnected, forceUseStorage }) {
+ return forceUseStorage || !networkConnected;
+ },
+};
+
+const mutations = {
+ /**
+ * 设置网络是否连接的变量
+ * @param {*} state
+ * @param {boolean} networkConnected
+ */
+ setNetworkConnected(state, networkConnected) {
+ state.networkConnected = networkConnected;
+ },
+};
+
+Vue.use(Vuex);
+export default new Vuex.Store({ state, getters, mutations, modules: { user, messages, socket, project, role, task } });
diff --git a/store/messages/getters.js b/store/messages/getters.js
new file mode 100644
index 0000000..56c8c75
--- /dev/null
+++ b/store/messages/getters.js
@@ -0,0 +1,3 @@
+const getters = {};
+
+export default getters;
diff --git a/store/messages/index.js b/store/messages/index.js
new file mode 100644
index 0000000..48fb83c
--- /dev/null
+++ b/store/messages/index.js
@@ -0,0 +1,4 @@
+import state from './state';
+import mutations from './mutations';
+
+export default { namespaced: true, state, mutations };
diff --git a/store/messages/mutations.js b/store/messages/mutations.js
new file mode 100644
index 0000000..296bca0
--- /dev/null
+++ b/store/messages/mutations.js
@@ -0,0 +1,85 @@
+import storage from '@/utils/storage';
+const { setStorageSync, getStorageSync, removeStorageSync } = storage;
+
+const mutations = {
+ /**
+ * 初始化消息栈
+ * @param {object} state
+ * @param {string} type
+ * type:
+ * syncMessages 同步消息栈
+ * faultMessages 故障消息 未处理消息栈
+ * faults 所有的故障消息栈
+ */
+ messagesInit(state, type) {
+ const messages = getStorageSync(type) ? JSON.parse(getStorageSync(type)) : [];
+ state[type] = messages;
+ },
+
+ /**
+ * 将新 消息添加到 消息栈 最前边
+ * @param { object } state
+ * @param { object } data
+ * data: message, type
+ * message 消息对象
+ * type:
+ * syncMessages 同步消息栈
+ * faultMessages 故障消息 未处理消息栈
+ * faults 所有的故障消息栈
+ * game 游戏的消息
+ *
+ * cache: boolean true 本地存储 false 不存储
+ */
+ messagesAdd(state, data) {
+ const messages = state[data.type];
+ if (messages.length > 0) {
+ const result = messages.find(msg => msg.id === data.message.id);
+ if (result) return;
+ }
+ messages.unshift(data.message);
+ // eslint-disable-next-line no-param-reassign
+ state[data.type] = messages;
+ if (data.cache) {
+ setStorageSync(data.type, JSON.stringify(messages));
+ }
+ },
+
+ /**
+ * 通过消息id移除指定 同步 消息
+ * @param { object } state
+ * @param { object } data
+ * data: messageId, type
+ * messageId: 要移除的消息的messageId
+ * type:
+ * syncMessages 同步消息栈
+ * faultMessages 故障消息 未处理消息栈
+ * faults 所有的故障消息栈
+ * cache: boolean true 本地存储 false 不存储
+ */
+ messagesRemoveById(state, data) {
+ const messages = state[data.type];
+ const index = messages.findIndex(msg => msg.id === data.messageId);
+ if (index < 0) return;
+ messages.splice(index, 1);
+ // eslint-disable-next-line no-param-reassign
+ state[data.type] = messages;
+ if (data.cache) {
+ setStorageSync(data.type, JSON.stringify(messages));
+ }
+ },
+
+ /**
+ * 清除指定type的消息
+ * @param {any} state
+ * @param {object} data
+ * data: type, cache
+ */
+ messagesClear(state, data) {
+ state[data.type] = [];
+ if (data.cache) {
+ removeStorageSync(data.type);
+ }
+ },
+};
+
+export default mutations;
diff --git a/store/messages/state.js b/store/messages/state.js
new file mode 100644
index 0000000..de25201
--- /dev/null
+++ b/store/messages/state.js
@@ -0,0 +1,8 @@
+const state = {
+ syncMessages: [], // 同步消息
+ faultMessages: [], // 新收到的未处理的 故障消息
+ faults: [], // 所有的故障消息
+ game: [], // 游戏的消息
+};
+
+export default state;
diff --git a/store/project/actions.js b/store/project/actions.js
new file mode 100644
index 0000000..5dfa3d4
--- /dev/null
+++ b/store/project/actions.js
@@ -0,0 +1,3 @@
+const actions = {};
+
+export default actions;
diff --git a/store/project/getters.js b/store/project/getters.js
new file mode 100644
index 0000000..b8aee5d
--- /dev/null
+++ b/store/project/getters.js
@@ -0,0 +1,12 @@
+const getters = {
+ /**
+ * 当前项目的id
+ * @param {object} project
+ */
+ projectId({ project }) {
+ uni.$t.storage.setStorageSync('projectId', project.id);
+ return project.id;
+ },
+};
+
+export default getters;
diff --git a/store/project/index.js b/store/project/index.js
new file mode 100644
index 0000000..d22f64a
--- /dev/null
+++ b/store/project/index.js
@@ -0,0 +1,12 @@
+import state from './state';
+import getters from './getters';
+import mutations from './mutations';
+import actions from './actions';
+
+export default {
+ namespaced: true,
+ state,
+ getters,
+ mutations,
+ actions,
+};
diff --git a/store/project/mutations.js b/store/project/mutations.js
new file mode 100644
index 0000000..c208b5f
--- /dev/null
+++ b/store/project/mutations.js
@@ -0,0 +1,43 @@
+const mutations = {
+ /**
+ * 设置state projects书籍
+ * @param {object} state
+ * @param {array} projects 项目列表
+ */
+ setProjects(state, projects) {
+ if (!projects || !projects.length) {
+ state.projects = [];
+ } else {
+ state.projects = [...projects];
+ }
+ },
+
+ /**
+ * 设置当前项目信息
+ * @param { object } state
+ * @param { object } data
+ */
+ setProject(state, data) {
+ state.project = data || { name: '加载中...' };
+ },
+
+ /**
+ * 设置当前项目名称
+ * @param { object } state
+ * @param { string } data
+ */
+ setProjectName(state, data) {
+ state.project.name = data;
+ },
+
+ /**
+ * 设置小红点
+ * @param { object } state
+ * @param { string } data
+ */
+ setDotList(state, data) {
+ state.dotList = data;
+ },
+};
+
+export default mutations;
diff --git a/store/project/state.js b/store/project/state.js
new file mode 100644
index 0000000..d33be86
--- /dev/null
+++ b/store/project/state.js
@@ -0,0 +1,8 @@
+/* eslint-disable */
+const state = {
+ project: { name: '加载中...' }, // 当前项目信息
+ projects: [], // 项目列表
+ dotList: [], // 小红点
+};
+
+export default state;
diff --git a/store/role/actions.js b/store/role/actions.js
new file mode 100644
index 0000000..6d279b0
--- /dev/null
+++ b/store/role/actions.js
@@ -0,0 +1,17 @@
+const actions = {
+ /**
+ * 根据项目id查找所有成员信息
+ * @param {*} commit
+ * @param {object} params
+ */
+ async getAllMembers({ commit }, params) {
+ try {
+ const data = await uni.$u.api.queryChecker(params);
+ commit('setMembers', data);
+ } catch (error) {
+ uni.$t.ui.showToast(error.msg || '成员查询失败');
+ }
+ },
+};
+
+export default actions;
diff --git a/store/role/getters.js b/store/role/getters.js
new file mode 100644
index 0000000..6552b4a
--- /dev/null
+++ b/store/role/getters.js
@@ -0,0 +1,13 @@
+const getters = {
+ // 是不是负责人
+ isMine({ roleId, invisibleRoles, visibleRoles }) {
+ if (!visibleRoles || !visibleRoles.length) return false;
+ const visible = visibleRoles.find(visible => visible.id === roleId);
+ if (visible) return visible.mine;
+ const invisible = invisibleRoles.find(invisible => invisible.id === roleId);
+ if (invisible) return visible.mine;
+ return false;
+ },
+};
+
+export default getters;
diff --git a/store/role/index.js b/store/role/index.js
new file mode 100644
index 0000000..d22f64a
--- /dev/null
+++ b/store/role/index.js
@@ -0,0 +1,12 @@
+import state from './state';
+import getters from './getters';
+import mutations from './mutations';
+import actions from './actions';
+
+export default {
+ namespaced: true,
+ state,
+ getters,
+ mutations,
+ actions,
+};
diff --git a/store/role/mutations.js b/store/role/mutations.js
new file mode 100644
index 0000000..83bd215
--- /dev/null
+++ b/store/role/mutations.js
@@ -0,0 +1,39 @@
+const mutations = {
+ /**
+ * 设置不展示的角色信息
+ * @param {Object} state
+ * @param {Array} data 服务端返回的模板数组
+ */
+ setInvisibleRoles(state, data) {
+ state.invisibleRoles = data || [];
+ },
+
+ /**
+ * 设置展示的角色信息
+ * @param {Object} state
+ * @param {Array} data 服务端返回的模板数组
+ */
+ setVisibleRoles(state, data) {
+ state.visibleRoles = data || [];
+ },
+
+ /**
+ * 设置当前角色信息
+ * @param {Object} state
+ * @param {string} roleId 当前正在展示的角色的id
+ */
+ setRoleId(state, roleId) {
+ state.roleId = roleId;
+ },
+
+ /**
+ * 设置项目下所有成员信息
+ * @param {Object} state
+ * @param {Array} data 服务端返回的模板数组
+ */
+ setMembers(state, data) {
+ state.members = data || [];
+ },
+};
+
+export default mutations;
diff --git a/store/role/state.js b/store/role/state.js
new file mode 100644
index 0000000..1117de7
--- /dev/null
+++ b/store/role/state.js
@@ -0,0 +1,8 @@
+const state = {
+ invisibleRoles: [], // 不展示的角色信息
+ visibleRoles: [], // 展示的角色信息
+ roleId: '', // 当前展示查看的角色id
+ members: [], // 项目下所有成员
+};
+
+export default state;
diff --git a/store/socket/actions.js b/store/socket/actions.js
new file mode 100644
index 0000000..43df52b
--- /dev/null
+++ b/store/socket/actions.js
@@ -0,0 +1,154 @@
+const WS_BASE_URL = process.env.VUE_APP_MSG_URL;
+
+let prevTime = 0;
+let socketMsgQueue = []; // socket消息队列
+let sendHeartTimer = null;
+
+const actions = {
+ // 初始化socket
+ initSocket({ commit, dispatch, state, rootState }) {
+ if (state.lockSocket) return;
+ const { token } = rootState.user;
+ if (!token) return;
+ commit('setLockSocket', true);
+ commit('setSocket', uni.connectSocket({ url: WS_BASE_URL, complete: () => {} }));
+ dispatch('onSocketOpen');
+ dispatch('onSocketMessage');
+ dispatch('onSocketClose');
+ state.socket.onError(errMsg => console.error(errMsg));
+ commit('setLockSocket', false);
+ },
+
+ // 监听ws打开
+ onSocketOpen({ dispatch, commit, state }) {
+ // eslint-disable-next-line no-unused-vars
+ state.socket.onOpen(res => {
+ // console.log('ws open: ', res);
+ commit('setConnected', true);
+ prevTime = Date.now();
+ // this.auth();
+ dispatch('auth');
+ for (let i = 0; i < socketMsgQueue.length; i++) {
+ dispatch('sendSocketMessage', socketMsgQueue[i]);
+ }
+ socketMsgQueue = [];
+ });
+ },
+
+ // 监听收到的ws消息
+ onSocketMessage({ dispatch, state }) {
+ state.socket.onMessage(res => {
+ // console.log('收到消息:', res);
+ prevTime = Date.now();
+ if (!res || !res.data || !JSON.parse(res.data)) return;
+ const resData = JSON.parse(res.data);
+ const { messageSet, ackId } = resData;
+ // 处理消息体对象
+ messageSet.forEach(item => dispatch('handleMessagesData', item));
+ ackId && dispatch('sendSocketMessage', { type: 'Ack', data: { ackId } });
+ });
+ },
+
+ /**
+ * 处理收到的消息内容
+ * @param {object} item 单个消息体对象
+ */
+ handleMessagesData({ dispatch, commit }, item) {
+ const data = JSON.parse(item.data);
+ switch (data.type) {
+ case 'Sync': // 开始某个节点
+ commit('messages/messagesAdd', { message: data, type: 'syncMessages' }, { root: true });
+ break;
+ case 'taskStatus': // 任务状态修改相关消息
+ commit('task/setTaskStatus', data.data, { root: true });
+ break;
+ case 'switchoverProject': // 打开新项目消息
+ commit('task/setNewProjectInfo', data.data, { root: true });
+ break;
+ // case 'Chrome': // !收到开始游戏的消息
+ // console.log('handleMessagesData', data);
+ // // @ts-ignore
+ // util.openGameApp({
+ // type: data.data.type,
+ // projectId: data.data.projectId,
+ // id: data.data.recordId,
+ // token: rootState.user.token,
+ // });
+ // break;
+ // case 'Deliver': // 交付物相关消息
+ // commit('messages/messagesAdd', { type: 'checkMessages', message: data }, { root: true });
+ // break;
+ case 'ChannelStatus':
+ dispatch('handleAuthMessage', data);
+ break;
+ // case 'switchoverProject': // 康复相关消息
+ // dispatch('home/getProjectById', data.data.projectId, { root: true });
+ // break;
+ // case 'startDrill': // 康复开始训练相关消息
+ // console.log('setStartDrillInfo', data.data);
+ // commit('home/setStartDrillMessages', data.data, { root: true });
+ // break;
+ default:
+ break;
+ }
+ },
+
+ // 发送消息
+ sendSocketMessage({ state }, data) {
+ if (state.connected) {
+ const msg = JSON.stringify({ toDomain: 'Server', data: JSON.stringify(data) });
+ state.socket.send({ data: msg });
+ } else {
+ socketMsgQueue.push(data);
+ }
+ },
+
+ // 监听关闭事件
+ onSocketClose({ dispatch, commit, state }) {
+ // console.log('onSocketClose');
+ state.socket.onClose(() => {
+ commit('setConnected', false);
+ if (sendHeartTimer) clearInterval(sendHeartTimer);
+ setTimeout(() => {
+ dispatch('initSocket');
+ }, 300);
+ });
+ },
+
+ // websocket发送channelId进行认证
+ auth({ dispatch, rootState }) {
+ const { token } = rootState.user;
+ if (!token) return;
+ const data = { type: 'Auth', data: { token } };
+ dispatch('sendSocketMessage', data);
+ },
+
+ // 心跳检测
+ sendHeart({ dispatch, state }) {
+ if (sendHeartTimer) clearInterval(sendHeartTimer);
+ sendHeartTimer = setInterval(() => {
+ if (Date.now() - prevTime >= 15000) {
+ dispatch('sendSocketMessage', { type: 'Ping' });
+ if (Date.now() - prevTime >= 20000) {
+ state.socket.close();
+ }
+ }
+ }, 5000);
+ },
+
+ /**
+ * 处理auth认证返回的ChannelStatus消息
+ * @param {object} data 消息内容对象
+ */
+ handleAuthMessage({ commit, dispatch }, data) {
+ if (data.data.authed) {
+ dispatch('sendHeart');
+ } else {
+ uni.$u.toast('消息系统认证失败, 请退出重新登录');
+ uni.$t.removeStorageSync('anyringToken');
+ commit('setSocket', null);
+ }
+ },
+};
+
+export default actions;
diff --git a/store/socket/index.js b/store/socket/index.js
new file mode 100644
index 0000000..f5a4ee5
--- /dev/null
+++ b/store/socket/index.js
@@ -0,0 +1,5 @@
+import state from './state';
+import mutations from './mutations';
+import actions from './actions';
+
+export default { namespaced: true, state, mutations, actions };
diff --git a/store/socket/mutations.js b/store/socket/mutations.js
new file mode 100644
index 0000000..7e53b1b
--- /dev/null
+++ b/store/socket/mutations.js
@@ -0,0 +1,26 @@
+const mutations = {
+ // 设置socket实例
+ setSocket(state, socket) {
+ state.socket = socket;
+ },
+
+ /**
+ * 设置socket连接状态
+ * @param {Object} state
+ * @param {boolean} connected 是否连接 true -> 连接
+ */
+ setConnected(state, connected) {
+ state.connected = connected;
+ },
+
+ /**
+ * 设置连接锁 正在连接中 锁上 避免多个连接同时发出
+ * @param {Object} state
+ * @param {boolean} lockSocket 是否正在连接的过程中
+ */
+ setLockSocket(state, lockSocket) {
+ state.lockSocket = lockSocket;
+ },
+};
+
+export default mutations;
diff --git a/store/socket/state.js b/store/socket/state.js
new file mode 100644
index 0000000..d4aa6e3
--- /dev/null
+++ b/store/socket/state.js
@@ -0,0 +1,7 @@
+const state = {
+ socket: null, // websocket实例
+ connected: false, // 是否处于连接状态
+ lockSocket: false, // 是否正在连接状态
+};
+
+export default state;
diff --git a/store/task/actions.js b/store/task/actions.js
new file mode 100644
index 0000000..40cdb31
--- /dev/null
+++ b/store/task/actions.js
@@ -0,0 +1,33 @@
+const actions = {
+ /**
+ * 根据角色查找永久的日常任务
+ * @param {*} commit
+ * @param {string} roleId 角色id
+ */
+ getPermanent({ commit }, param) {
+ uni.$t.$q.getPermanent(param, (err, data) => {
+ if (err) {
+ console.error('err: ', err);
+ } else {
+ commit('setPermanents', data);
+ }
+ });
+ },
+
+ /**
+ * 根据时间和角色查找日常任务
+ * @param {*} commit
+ * @param {object} param 请求参数 roleId, timeNode, timeUnit
+ */
+ getGlobal({ commit }, param) {
+ uni.$t.$q.getGlobal(param, (err, data) => {
+ if (err) {
+ console.error('err: ', err);
+ } else {
+ commit('setDailyTasks', data);
+ }
+ });
+ },
+};
+
+export default actions;
diff --git a/store/task/getters.js b/store/task/getters.js
new file mode 100644
index 0000000..10fc1e5
--- /dev/null
+++ b/store/task/getters.js
@@ -0,0 +1,23 @@
+const getters = {
+ // 所有的日常任务 永久 + 可变 日常任务
+ globals({ dailyTasks, permanents }) {
+ return [...permanents, ...dailyTasks];
+ },
+
+ unitConfig({ timeUnit }) {
+ const target = uni.$t.timeConfig.timeUnits.find(item => item.id === timeUnit);
+ return target;
+ },
+
+ // 计算任务开始时间的格式
+ startTimeFormat(state, { unitConfig }) {
+ return unitConfig.format || 'M月D日 HH:mm';
+ },
+
+ // 计算颗粒度 对应的 dayjs add 的单位
+ timeGranularity(state, { unitConfig }) {
+ return unitConfig.granularity;
+ },
+};
+
+export default getters;
diff --git a/store/task/index.js b/store/task/index.js
new file mode 100644
index 0000000..d22f64a
--- /dev/null
+++ b/store/task/index.js
@@ -0,0 +1,12 @@
+import state from './state';
+import getters from './getters';
+import mutations from './mutations';
+import actions from './actions';
+
+export default {
+ namespaced: true,
+ state,
+ getters,
+ mutations,
+ actions,
+};
diff --git a/store/task/mutations.js b/store/task/mutations.js
new file mode 100644
index 0000000..01d9dd7
--- /dev/null
+++ b/store/task/mutations.js
@@ -0,0 +1,238 @@
+const mutations = {
+ /**
+ * 记录时间轴向上滚动的距离
+ * @param { object } state
+ * @param { number } num
+ */
+ setScrollTop(state, num) {
+ state.scrollTop = num;
+ },
+
+ /**
+ * 记录时间轴向上滚动的距离
+ * @param { object } state
+ * @param {string} taskId
+ */
+ setScrollToTaskId(state, taskId) {
+ state.scrollToTaskId = taskId;
+ },
+
+ /**
+ * 设置日常任务当前是否应该处于收缩状态
+ * @param { object } state
+ * @param { boolean } data
+ */
+ setShrink(state, data) {
+ state.isShrink = data;
+ },
+
+ /**
+ * 设置tip的值
+ * @param {object} state
+ * @param {object} data
+ */
+ setTip(state, data) {
+ if (!data) return;
+ state.tip = { ...data };
+ },
+
+ /**
+ * 是否显示tips
+ * @param { object } state
+ * @param { boolean } show
+ */
+ setTipShow(state, show) {
+ state.tip.show = show;
+ },
+
+ /**
+ * 是否显示tips
+ * @param { object } state
+ * @param { number } status
+ */
+ setStatus(state, status) {
+ state.tip.status = status;
+ },
+
+ /**
+ * 设置时间基准点
+ * @param { object } state
+ * @param { number } data
+ */
+ setTimeNode(state, data) {
+ state.timeNode = data;
+ },
+
+ /**
+ * 设置时间颗粒度
+ * @param { object } state
+ * @param { number } data
+ */
+ setTimeUnit(state, data) {
+ state.timeUnit = data;
+ },
+
+ /**
+ * 设置向上查到的定期任务数据
+ * @param {Object} state
+ * @param {Array} data 服务端返回的模板数组
+ */
+ setUpTasks(state, data) {
+ if (!state.tasks.length) {
+ state.tasks = [...data]; // 原来没有数据
+ } else {
+ state.tasks = [...data, ...state.tasks];
+
+ let arr = [],
+ flag = false;
+ state.tasks.forEach(task => {
+ arr.forEach(item => {
+ if (task.id == item.id) {
+ flag = true;
+ }
+ });
+
+ if (!flag) {
+ arr.push(task);
+ }
+ });
+
+ state.tasks = [...arr];
+ // state.tasks = [...data.concat(state.tasks)];
+ }
+ },
+
+ /**
+ * 设置向下查到的定期任务数据
+ * @param {Object} state
+ * @param {Array} data 服务端返回的模板数组
+ */
+ setDownTasks(state, data) {
+ if (!state.tasks && !state.tasks.length) {
+ state.tasks = [...data];
+ } else {
+ state.tasks = [...state.tasks, ...data];
+
+ let arr = [],
+ flag = false;
+ state.tasks.forEach(task => {
+ arr.forEach(item => {
+ if (task.id == item.id) {
+ flag = true;
+ }
+ });
+
+ if (!flag) {
+ arr.push(task);
+ }
+ });
+
+ state.tasks = [...arr];
+ // state.tasks = [...state.tasks.concat(data)];
+ }
+ },
+
+ /**
+ * 添加任务后更新tasks
+ * @param {Object} state
+ * @param {Array} data 新添加的task
+ */
+ updateTasks(state, data) {
+ state.tasks = [...data];
+ },
+
+ /**
+ * 设置添加任务的位置
+ * @param {*} state
+ * @param {*} data
+ */
+ setAddPosition(state, data) {
+ console.log('data: ', data);
+ },
+
+ /**
+ * 设置日常任务数据
+ * @param {Object} state
+ * @param {Array} data 服务端返回的模板数组
+ */
+ setDailyTasks(state, data) {
+ state.dailyTasks = data || [];
+ },
+
+ /**
+ * 设置永久固定任务
+ * @param {object} state
+ * @param {array} tasks 服务端查询到的永久日常任务书籍
+ */
+ setPermanents(state, tasks) {
+ state.permanents = tasks || [];
+ },
+
+ /**
+ * 设置时间轴是否继续向上查任务
+ * @param {Object} state
+ * @param {Boolean} show
+ */
+ setTopEnd(state, show) {
+ state.topEnd = show;
+ },
+
+ /**
+ * 设置时间轴是否继续向下查任务
+ * @param {Object} state
+ * @param {Boolean} show
+ */
+ setBottomEnd(state, show) {
+ state.bottomEnd = show;
+ },
+
+ // 清空标志位 如切换角色等使用
+ clearEndFlag(state) {
+ state.topEnd = false;
+ state.bottomEnd = false;
+ },
+
+ // 清空定期任务
+ clearTasks(state) {
+ state.tasks = [];
+ },
+
+ /**
+ * 收到消息设置任务状态
+ * @param {Object} state
+ * @param {Array} data 服务端返回的模板数组
+ */
+ setTaskStatus(state, data) {
+ const item = state.tasks.find(i => i.id === data.id);
+ item.process = data.taskStatus;
+ },
+
+ /**
+ * 收到打开新项目消息状态
+ * @param {Object} state
+ * @param {Array} data 服务端返回的模板数组
+ */
+ setNewProjectInfo(state, data) {
+ state.newProjectInfo = data;
+ },
+
+ /**
+ * 设置骨架屏是否显示
+ * @param {Object} state
+ * @param {Boolean} show
+ */
+ setShowSkeleton(state, show) {
+ state.showSkeleton = show;
+ },
+
+ /**
+ * 是否设置时间轴自动滚动的位置
+ * @param {Object} state
+ * @param {Boolean} show
+ */
+ setShowScrollTo(state, show) {
+ state.showScrollTo = show;
+ },
+};
+
+export default mutations;
diff --git a/store/task/state.js b/store/task/state.js
new file mode 100644
index 0000000..023378d
--- /dev/null
+++ b/store/task/state.js
@@ -0,0 +1,25 @@
+const state = {
+ scrollTop: 0,
+ scrollToTaskId: '', // 时间轴自动滚动的位置
+ isShrink: false, // true: 收起, false:展开
+ tip: {
+ taskId: '', // 当前正在修改状态的任务的id
+ show: false,
+ status: 0, // 所点击任务的当前状态码
+ text: '',
+ left: 0, // 鼠标点击位置距离左边的距离
+ top: 0, // 鼠标点击位置距离上边的距离
+ },
+ timeNode: new Date().getTime(), // 时间基准点
+ timeUnit: 4, // 时间颗粒度
+ topEnd: false, // 时间轴向上查任务到顶了
+ bottomEnd: false, // 时间轴向下查任务到底了
+ permanents: [], // 永久日常任务
+ dailyTasks: [], // 日常任务
+ tasks: [], // 所有的定期任务
+ showSkeleton: false, // 定期任务骨架屏
+ newProjectInfo: {},
+ showScrollTo: false, // 是否可以设置时间轴自动滚动的位置
+};
+
+export default state;
diff --git a/store/user/actions.js b/store/user/actions.js
new file mode 100644
index 0000000..cdb2ca0
--- /dev/null
+++ b/store/user/actions.js
@@ -0,0 +1,19 @@
+const actions = {
+ /**
+ * 通过userId获取token
+ * @param {any} commit
+ * @param {string} userId 用户id
+ */
+ async getToken({ commit }, userId) {
+ try {
+ const data = await uni.$u.api.getToken(userId);
+ commit('setToken', data.token);
+ commit('setUser', data);
+ return data;
+ } catch (error) {
+ uni.$t.ui.showToast(error.msg || '获取个人信息失败');
+ }
+ },
+};
+
+export default actions;
diff --git a/store/user/getters.js b/store/user/getters.js
new file mode 100644
index 0000000..f7988ce
--- /dev/null
+++ b/store/user/getters.js
@@ -0,0 +1,14 @@
+const getters = {
+ // 获取用户的id
+ userId({ user }) {
+ try {
+ if (!user) return '';
+ return user.id;
+ } catch (error) {
+ console.warn("user's getters 获取userId失败", error);
+ return '';
+ }
+ },
+};
+
+export default getters;
diff --git a/store/user/index.js b/store/user/index.js
new file mode 100644
index 0000000..d22f64a
--- /dev/null
+++ b/store/user/index.js
@@ -0,0 +1,12 @@
+import state from './state';
+import getters from './getters';
+import mutations from './mutations';
+import actions from './actions';
+
+export default {
+ namespaced: true,
+ state,
+ getters,
+ mutations,
+ actions,
+};
diff --git a/store/user/mutations.js b/store/user/mutations.js
new file mode 100644
index 0000000..6073c99
--- /dev/null
+++ b/store/user/mutations.js
@@ -0,0 +1,24 @@
+const mutations = {
+ /**
+ * 设置存储token
+ * @param {object} state
+ * @param {string} token
+ */
+ setToken(state, token) {
+ state.token = token || '';
+ uni.$t.storage.setStorageSync(uni.$t.app.tokenKey, token || '');
+ },
+
+ /**
+ * 设置user数据
+ * @param {object} state
+ * @param {object} user
+ */
+ setUser(state, user) {
+ if (!user) return;
+ state.user = { ...user };
+ uni.$t.storage.setStorageSync('user', JSON.stringify(user));
+ },
+};
+
+export default mutations;
diff --git a/store/user/state.js b/store/user/state.js
new file mode 100644
index 0000000..39f592e
--- /dev/null
+++ b/store/user/state.js
@@ -0,0 +1,5 @@
+const state = {
+ token: '',
+ user: null,
+};
+export default state;
diff --git a/uni.scss b/uni.scss
new file mode 100644
index 0000000..d53a89f
--- /dev/null
+++ b/uni.scss
@@ -0,0 +1,76 @@
+/**
+ * 这里是uni-app内置的常用样式变量
+ *
+ * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
+ * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
+ *
+ */
+
+/**
+ * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
+ *
+ * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
+ */
+@import "@/uni_modules/vk-uview-ui/theme.scss";
+/* 颜色变量 */
+
+/* 行为相关颜色 */
+$uni-color-primary: #007aff;
+$uni-color-success: #4cd964;
+$uni-color-warning: #f0ad4e;
+$uni-color-error: #dd524d;
+
+/* 文字基本颜色 */
+$uni-text-color:#333;//基本色
+$uni-text-color-inverse:#fff;//反色
+$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
+$uni-text-color-placeholder: #808080;
+$uni-text-color-disable:#c0c0c0;
+
+/* 背景颜色 */
+$uni-bg-color:#ffffff;
+$uni-bg-color-grey:#f8f8f8;
+$uni-bg-color-hover:#f1f1f1;//点击状态颜色
+$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
+
+/* 边框颜色 */
+$uni-border-color:#c8c7cc;
+
+/* 尺寸变量 */
+
+/* 文字尺寸 */
+$uni-font-size-sm:12px;
+$uni-font-size-base:14px;
+$uni-font-size-lg:16;
+
+/* 图片尺寸 */
+$uni-img-size-sm:20px;
+$uni-img-size-base:26px;
+$uni-img-size-lg:40px;
+
+/* Border Radius */
+$uni-border-radius-sm: 2px;
+$uni-border-radius-base: 3px;
+$uni-border-radius-lg: 6px;
+$uni-border-radius-circle: 50%;
+
+/* 水平间距 */
+$uni-spacing-row-sm: 5px;
+$uni-spacing-row-base: 10px;
+$uni-spacing-row-lg: 15px;
+
+/* 垂直间距 */
+$uni-spacing-col-sm: 4px;
+$uni-spacing-col-base: 8px;
+$uni-spacing-col-lg: 12px;
+
+/* 透明度 */
+$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
+
+/* 文章场景相关 */
+$uni-color-title: #2C405A; // 文章标题颜色
+$uni-font-size-title:20px;
+$uni-color-subtitle: #555555; // 二级标题颜色
+$uni-font-size-subtitle:26px;
+$uni-color-paragraph: #3F536E; // 文章段落颜色
+$uni-font-size-paragraph:15px;
diff --git a/uni_modules/vk-uview-ui/changelog.md b/uni_modules/vk-uview-ui/changelog.md
new file mode 100644
index 0000000..a94c54f
--- /dev/null
+++ b/uni_modules/vk-uview-ui/changelog.md
@@ -0,0 +1,10 @@
+## 1.0.3(2021-12-20)
+【优化】u-icon在微信小程序下可能会显示null字符串的问题
+## 1.0.2(2021-12-09)
+* 1、【优化】`u-button` 组件新增 `timerId` 属性
+* 之前的效果是:所有按钮一定时间内只能点击1次(`共用计算时间`)导致点击按钮A后无法马上点击按钮B
+* 优化的效果是:每个按钮一定时间内只能点击1次(`分开计算时间`)且支持设置相同的 timerId 来达到指定按钮 `共用计算时间`
+## 1.0.1(2021-11-22)
+* 修复 u-parse 组件在微信小程序上的显示问题。
+## 1.0.0(2021-11-18)
+uView Vue3.0 横空出世,继承uView1.0意志,再战江湖,风云再起!by vk 2021-11-18
diff --git a/uni_modules/vk-uview-ui/components/u-action-sheet/u-action-sheet.vue b/uni_modules/vk-uview-ui/components/u-action-sheet/u-action-sheet.vue
new file mode 100644
index 0000000..0624a91
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-action-sheet/u-action-sheet.vue
@@ -0,0 +1,219 @@
+
+
+
+ {{tips.text}}
+
+
+
+ {{item.text}}
+ {{item.subText}}
+
+
+
+
+ {{cancelText}}
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-alert-tips/u-alert-tips.vue b/uni_modules/vk-uview-ui/components/u-alert-tips/u-alert-tips.vue
new file mode 100644
index 0000000..48b3d85
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-alert-tips/u-alert-tips.vue
@@ -0,0 +1,257 @@
+
+
+
+
+
+
+
+ {{title}}
+
+
+ {{description}}
+
+
+
+
+
+ {{closeText}}
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-avatar-cropper/u-avatar-cropper.vue b/uni_modules/vk-uview-ui/components/u-avatar-cropper/u-avatar-cropper.vue
new file mode 100644
index 0000000..a48dd54
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-avatar-cropper/u-avatar-cropper.vue
@@ -0,0 +1,290 @@
+
+
+
+
+
+
+
+
+ 选择图片
+
+
+ 重新选择
+
+ 确定
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-avatar-cropper/weCropper.js b/uni_modules/vk-uview-ui/components/u-avatar-cropper/weCropper.js
new file mode 100644
index 0000000..df02483
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-avatar-cropper/weCropper.js
@@ -0,0 +1,1265 @@
+/**
+ * we-cropper v1.3.9
+ * (c) 2020 dlhandsome
+ * @license MIT
+ */
+(function(global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define(factory) :
+ (global.WeCropper = factory());
+}(this, (function() {
+ 'use strict';
+
+ var device = void 0;
+ var TOUCH_STATE = ['touchstarted', 'touchmoved', 'touchended'];
+
+ function firstLetterUpper(str) {
+ return str.charAt(0).toUpperCase() + str.slice(1)
+ }
+
+ function setTouchState(instance) {
+ var arg = [],
+ len = arguments.length - 1;
+ while (len-- > 0) arg[len] = arguments[len + 1];
+
+ TOUCH_STATE.forEach(function(key, i) {
+ if (arg[i] !== undefined) {
+ instance[key] = arg[i];
+ }
+ });
+ }
+
+ function validator(instance, o) {
+ Object.defineProperties(instance, o);
+ }
+
+ function getDevice() {
+ if (!device) {
+ device = uni.getSystemInfoSync();
+ }
+ return device
+ }
+
+ var tmp = {};
+
+ var ref = getDevice();
+ var pixelRatio = ref.pixelRatio;
+
+ var DEFAULT = {
+ id: {
+ default: 'cropper',
+ get: function get() {
+ return tmp.id
+ },
+ set: function set(value) {
+ if (typeof(value) !== 'string') {
+ console.error(("id:" + value + " is invalid"));
+ }
+ tmp.id = value;
+ }
+ },
+ width: {
+ default: 750,
+ get: function get() {
+ return tmp.width
+ },
+ set: function set(value) {
+ if (typeof(value) !== 'number') {
+ console.error(("width:" + value + " is invalid"));
+ }
+ tmp.width = value;
+ }
+ },
+ height: {
+ default: 750,
+ get: function get() {
+ return tmp.height
+ },
+ set: function set(value) {
+ if (typeof(value) !== 'number') {
+ console.error(("height:" + value + " is invalid"));
+ }
+ tmp.height = value;
+ }
+ },
+ pixelRatio: {
+ default: pixelRatio,
+ get: function get() {
+ return tmp.pixelRatio
+ },
+ set: function set(value) {
+ if (typeof(value) !== 'number') {
+ console.error(("pixelRatio:" + value + " is invalid"));
+ }
+ tmp.pixelRatio = value;
+ }
+ },
+ scale: {
+ default: 2.5,
+ get: function get() {
+ return tmp.scale
+ },
+ set: function set(value) {
+ if (typeof(value) !== 'number') {
+ console.error(("scale:" + value + " is invalid"));
+ }
+ tmp.scale = value;
+ }
+ },
+ zoom: {
+ default: 5,
+ get: function get() {
+ return tmp.zoom
+ },
+ set: function set(value) {
+ if (typeof(value) !== 'number') {
+ console.error(("zoom:" + value + " is invalid"));
+ } else if (value < 0 || value > 10) {
+ console.error("zoom should be ranged in 0 ~ 10");
+ }
+ tmp.zoom = value;
+ }
+ },
+ src: {
+ default: '',
+ get: function get() {
+ return tmp.src
+ },
+ set: function set(value) {
+ if (typeof(value) !== 'string') {
+ console.error(("src:" + value + " is invalid"));
+ }
+ tmp.src = value;
+ }
+ },
+ cut: {
+ default: {},
+ get: function get() {
+ return tmp.cut
+ },
+ set: function set(value) {
+ if (typeof(value) !== 'object') {
+ console.error(("cut:" + value + " is invalid"));
+ }
+ tmp.cut = value;
+ }
+ },
+ boundStyle: {
+ default: {},
+ get: function get() {
+ return tmp.boundStyle
+ },
+ set: function set(value) {
+ if (typeof(value) !== 'object') {
+ console.error(("boundStyle:" + value + " is invalid"));
+ }
+ tmp.boundStyle = value;
+ }
+ },
+ onReady: {
+ default: null,
+ get: function get() {
+ return tmp.ready
+ },
+ set: function set(value) {
+ tmp.ready = value;
+ }
+ },
+ onBeforeImageLoad: {
+ default: null,
+ get: function get() {
+ return tmp.beforeImageLoad
+ },
+ set: function set(value) {
+ tmp.beforeImageLoad = value;
+ }
+ },
+ onImageLoad: {
+ default: null,
+ get: function get() {
+ return tmp.imageLoad
+ },
+ set: function set(value) {
+ tmp.imageLoad = value;
+ }
+ },
+ onBeforeDraw: {
+ default: null,
+ get: function get() {
+ return tmp.beforeDraw
+ },
+ set: function set(value) {
+ tmp.beforeDraw = value;
+ }
+ }
+ };
+
+ var ref$1 = getDevice();
+ var windowWidth = ref$1.windowWidth;
+
+ function prepare() {
+ var self = this;
+
+ // v1.4.0 版本中将不再自动绑定we-cropper实例
+ self.attachPage = function() {
+ var pages = getCurrentPages();
+ // 获取到当前page上下文
+ var pageContext = pages[pages.length - 1];
+ // 把this依附在Page上下文的wecropper属性上,便于在page钩子函数中访问
+ Object.defineProperty(pageContext, 'wecropper', {
+ get: function get() {
+ console.warn(
+ 'Instance will not be automatically bound to the page after v1.4.0\n\n' +
+ 'Please use a custom instance name instead\n\n' +
+ 'Example: \n' +
+ 'this.mycropper = new WeCropper(options)\n\n' +
+ '// ...\n' +
+ 'this.mycropper.getCropperImage()'
+ );
+ return self
+ },
+ configurable: true
+ });
+ };
+
+ self.createCtx = function() {
+ var id = self.id;
+ var targetId = self.targetId;
+
+ if (id) {
+ self.ctx = self.ctx || uni.createCanvasContext(id);
+ self.targetCtx = self.targetCtx || uni.createCanvasContext(targetId);
+ } else {
+ console.error("constructor: create canvas context failed, 'id' must be valuable");
+ }
+ };
+
+ self.deviceRadio = windowWidth / 750;
+ }
+
+ var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !==
+ 'undefined' ? self : {};
+
+
+
+
+
+ function createCommonjsModule(fn, module) {
+ return module = {
+ exports: {}
+ }, fn(module, module.exports), module.exports;
+ }
+
+ var tools = createCommonjsModule(function(module, exports) {
+ /**
+ * String type check
+ */
+ exports.isStr = function(v) {
+ return typeof v === 'string';
+ };
+ /**
+ * Number type check
+ */
+ exports.isNum = function(v) {
+ return typeof v === 'number';
+ };
+ /**
+ * Array type check
+ */
+ exports.isArr = Array.isArray;
+ /**
+ * undefined type check
+ */
+ exports.isUndef = function(v) {
+ return v === undefined;
+ };
+
+ exports.isTrue = function(v) {
+ return v === true;
+ };
+
+ exports.isFalse = function(v) {
+ return v === false;
+ };
+ /**
+ * Function type check
+ */
+ exports.isFunc = function(v) {
+ return typeof v === 'function';
+ };
+ /**
+ * Quick object check - this is primarily used to tell
+ * Objects from primitive values when we know the value
+ * is a JSON-compliant type.
+ */
+ exports.isObj = exports.isObject = function(obj) {
+ return obj !== null && typeof obj === 'object'
+ };
+
+ /**
+ * Strict object type check. Only returns true
+ * for plain JavaScript objects.
+ */
+ var _toString = Object.prototype.toString;
+ exports.isPlainObject = function(obj) {
+ return _toString.call(obj) === '[object Object]'
+ };
+
+ /**
+ * Check whether the object has the property.
+ */
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
+ exports.hasOwn = function(obj, key) {
+ return hasOwnProperty.call(obj, key)
+ };
+
+ /**
+ * Perform no operation.
+ * Stubbing args to make Flow happy without leaving useless transpiled code
+ * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/)
+ */
+ exports.noop = function(a, b, c) {};
+
+ /**
+ * Check if val is a valid array index.
+ */
+ exports.isValidArrayIndex = function(val) {
+ var n = parseFloat(String(val));
+ return n >= 0 && Math.floor(n) === n && isFinite(val)
+ };
+ });
+
+ var tools_7 = tools.isFunc;
+ var tools_10 = tools.isPlainObject;
+
+ var EVENT_TYPE = ['ready', 'beforeImageLoad', 'beforeDraw', 'imageLoad'];
+
+ function observer() {
+ var self = this;
+
+ self.on = function(event, fn) {
+ if (EVENT_TYPE.indexOf(event) > -1) {
+ if (tools_7(fn)) {
+ event === 'ready' ?
+ fn(self) :
+ self[("on" + (firstLetterUpper(event)))] = fn;
+ }
+ } else {
+ console.error(("event: " + event + " is invalid"));
+ }
+ return self
+ };
+ }
+
+ function wxPromise(fn) {
+ return function(obj) {
+ var args = [],
+ len = arguments.length - 1;
+ while (len-- > 0) args[len] = arguments[len + 1];
+
+ if (obj === void 0) obj = {};
+ return new Promise(function(resolve, reject) {
+ obj.success = function(res) {
+ resolve(res);
+ };
+ obj.fail = function(err) {
+ reject(err);
+ };
+ fn.apply(void 0, [obj].concat(args));
+ })
+ }
+ }
+
+ function draw(ctx, reserve) {
+ if (reserve === void 0) reserve = false;
+
+ return new Promise(function(resolve) {
+ ctx.draw(reserve, resolve);
+ })
+ }
+
+ var getImageInfo = wxPromise(uni.getImageInfo);
+
+ var canvasToTempFilePath = wxPromise(uni.canvasToTempFilePath);
+
+ var base64 = createCommonjsModule(function(module, exports) {
+ /*! http://mths.be/base64 v0.1.0 by @mathias | MIT license */
+ (function(root) {
+
+ // Detect free variables `exports`.
+ var freeExports = 'object' == 'object' && exports;
+
+ // Detect free variable `module`.
+ var freeModule = 'object' == 'object' && module &&
+ module.exports == freeExports && module;
+
+ // Detect free variable `global`, from Node.js or Browserified code, and use
+ // it as `root`.
+ var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal;
+ if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
+ root = freeGlobal;
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ var InvalidCharacterError = function(message) {
+ this.message = message;
+ };
+ InvalidCharacterError.prototype = new Error;
+ InvalidCharacterError.prototype.name = 'InvalidCharacterError';
+
+ var error = function(message) {
+ // Note: the error messages used throughout this file match those used by
+ // the native `atob`/`btoa` implementation in Chromium.
+ throw new InvalidCharacterError(message);
+ };
+
+ var TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+ // http://whatwg.org/html/common-microsyntaxes.html#space-character
+ var REGEX_SPACE_CHARACTERS = /[\t\n\f\r ]/g;
+
+ // `decode` is designed to be fully compatible with `atob` as described in the
+ // HTML Standard. http://whatwg.org/html/webappapis.html#dom-windowbase64-atob
+ // The optimized base64-decoding algorithm used is based on @atk’s excellent
+ // implementation. https://gist.github.com/atk/1020396
+ var decode = function(input) {
+ input = String(input)
+ .replace(REGEX_SPACE_CHARACTERS, '');
+ var length = input.length;
+ if (length % 4 == 0) {
+ input = input.replace(/==?$/, '');
+ length = input.length;
+ }
+ if (
+ length % 4 == 1 ||
+ // http://whatwg.org/C#alphanumeric-ascii-characters
+ /[^+a-zA-Z0-9/]/.test(input)
+ ) {
+ error(
+ 'Invalid character: the string to be decoded is not correctly encoded.'
+ );
+ }
+ var bitCounter = 0;
+ var bitStorage;
+ var buffer;
+ var output = '';
+ var position = -1;
+ while (++position < length) {
+ buffer = TABLE.indexOf(input.charAt(position));
+ bitStorage = bitCounter % 4 ? bitStorage * 64 + buffer : buffer;
+ // Unless this is the first of a group of 4 characters…
+ if (bitCounter++ % 4) {
+ // …convert the first 8 bits to a single ASCII character.
+ output += String.fromCharCode(
+ 0xFF & bitStorage >> (-2 * bitCounter & 6)
+ );
+ }
+ }
+ return output;
+ };
+
+ // `encode` is designed to be fully compatible with `btoa` as described in the
+ // HTML Standard: http://whatwg.org/html/webappapis.html#dom-windowbase64-btoa
+ var encode = function(input) {
+ input = String(input);
+ if (/[^\0-\xFF]/.test(input)) {
+ // Note: no need to special-case astral symbols here, as surrogates are
+ // matched, and the input is supposed to only contain ASCII anyway.
+ error(
+ 'The string to be encoded contains characters outside of the ' +
+ 'Latin1 range.'
+ );
+ }
+ var padding = input.length % 3;
+ var output = '';
+ var position = -1;
+ var a;
+ var b;
+ var c;
+ var buffer;
+ // Make sure any padding is handled outside of the loop.
+ var length = input.length - padding;
+
+ while (++position < length) {
+ // Read three bytes, i.e. 24 bits.
+ a = input.charCodeAt(position) << 16;
+ b = input.charCodeAt(++position) << 8;
+ c = input.charCodeAt(++position);
+ buffer = a + b + c;
+ // Turn the 24 bits into four chunks of 6 bits each, and append the
+ // matching character for each of them to the output.
+ output += (
+ TABLE.charAt(buffer >> 18 & 0x3F) +
+ TABLE.charAt(buffer >> 12 & 0x3F) +
+ TABLE.charAt(buffer >> 6 & 0x3F) +
+ TABLE.charAt(buffer & 0x3F)
+ );
+ }
+
+ if (padding == 2) {
+ a = input.charCodeAt(position) << 8;
+ b = input.charCodeAt(++position);
+ buffer = a + b;
+ output += (
+ TABLE.charAt(buffer >> 10) +
+ TABLE.charAt((buffer >> 4) & 0x3F) +
+ TABLE.charAt((buffer << 2) & 0x3F) +
+ '='
+ );
+ } else if (padding == 1) {
+ buffer = input.charCodeAt(position);
+ output += (
+ TABLE.charAt(buffer >> 2) +
+ TABLE.charAt((buffer << 4) & 0x3F) +
+ '=='
+ );
+ }
+
+ return output;
+ };
+
+ var base64 = {
+ 'encode': encode,
+ 'decode': decode,
+ 'version': '0.1.0'
+ };
+
+ // Some AMD build optimizers, like r.js, check for specific condition patterns
+ // like the following:
+ if (
+ typeof undefined == 'function' &&
+ typeof undefined.amd == 'object' &&
+ undefined.amd
+ ) {
+ undefined(function() {
+ return base64;
+ });
+ } else if (freeExports && !freeExports.nodeType) {
+ if (freeModule) { // in Node.js or RingoJS v0.8.0+
+ freeModule.exports = base64;
+ } else { // in Narwhal or RingoJS v0.7.0-
+ for (var key in base64) {
+ base64.hasOwnProperty(key) && (freeExports[key] = base64[key]);
+ }
+ }
+ } else { // in Rhino or a web browser
+ root.base64 = base64;
+ }
+
+ }(commonjsGlobal));
+ });
+
+ function makeURI(strData, type) {
+ return 'data:' + type + ';base64,' + strData
+ }
+
+ function fixType(type) {
+ type = type.toLowerCase().replace(/jpg/i, 'jpeg');
+ var r = type.match(/png|jpeg|bmp|gif/)[0];
+ return 'image/' + r
+ }
+
+ function encodeData(data) {
+ var str = '';
+ if (typeof data === 'string') {
+ str = data;
+ } else {
+ for (var i = 0; i < data.length; i++) {
+ str += String.fromCharCode(data[i]);
+ }
+ }
+ return base64.encode(str)
+ }
+
+ /**
+ * 获取图像区域隐含的像素数据
+ * @param canvasId canvas标识
+ * @param x 将要被提取的图像数据矩形区域的左上角 x 坐标
+ * @param y 将要被提取的图像数据矩形区域的左上角 y 坐标
+ * @param width 将要被提取的图像数据矩形区域的宽度
+ * @param height 将要被提取的图像数据矩形区域的高度
+ * @param done 完成回调
+ */
+ function getImageData(canvasId, x, y, width, height, done) {
+ uni.canvasGetImageData({
+ canvasId: canvasId,
+ x: x,
+ y: y,
+ width: width,
+ height: height,
+ success: function success(res) {
+ done(res, null);
+ },
+ fail: function fail(res) {
+ done(null, res);
+ }
+ });
+ }
+
+ /**
+ * 生成bmp格式图片
+ * 按照规则生成图片响应头和响应体
+ * @param oData 用来描述 canvas 区域隐含的像素数据 { data, width, height } = oData
+ * @returns {*} base64字符串
+ */
+ function genBitmapImage(oData) {
+ //
+ // BITMAPFILEHEADER: http://msdn.microsoft.com/en-us/library/windows/desktop/dd183374(v=vs.85).aspx
+ // BITMAPINFOHEADER: http://msdn.microsoft.com/en-us/library/dd183376.aspx
+ //
+ var biWidth = oData.width;
+ var biHeight = oData.height;
+ var biSizeImage = biWidth * biHeight * 3;
+ var bfSize = biSizeImage + 54; // total header size = 54 bytes
+
+ //
+ // typedef struct tagBITMAPFILEHEADER {
+ // WORD bfType;
+ // DWORD bfSize;
+ // WORD bfReserved1;
+ // WORD bfReserved2;
+ // DWORD bfOffBits;
+ // } BITMAPFILEHEADER;
+ //
+ var BITMAPFILEHEADER = [
+ // WORD bfType -- The file type signature; must be "BM"
+ 0x42, 0x4D,
+ // DWORD bfSize -- The size, in bytes, of the bitmap file
+ bfSize & 0xff, bfSize >> 8 & 0xff, bfSize >> 16 & 0xff, bfSize >> 24 & 0xff,
+ // WORD bfReserved1 -- Reserved; must be zero
+ 0, 0,
+ // WORD bfReserved2 -- Reserved; must be zero
+ 0, 0,
+ // DWORD bfOffBits -- The offset, in bytes, from the beginning of the BITMAPFILEHEADER structure to the bitmap bits.
+ 54, 0, 0, 0
+ ];
+
+ //
+ // typedef struct tagBITMAPINFOHEADER {
+ // DWORD biSize;
+ // LONG biWidth;
+ // LONG biHeight;
+ // WORD biPlanes;
+ // WORD biBitCount;
+ // DWORD biCompression;
+ // DWORD biSizeImage;
+ // LONG biXPelsPerMeter;
+ // LONG biYPelsPerMeter;
+ // DWORD biClrUsed;
+ // DWORD biClrImportant;
+ // } BITMAPINFOHEADER, *PBITMAPINFOHEADER;
+ //
+ var BITMAPINFOHEADER = [
+ // DWORD biSize -- The number of bytes required by the structure
+ 40, 0, 0, 0,
+ // LONG biWidth -- The width of the bitmap, in pixels
+ biWidth & 0xff, biWidth >> 8 & 0xff, biWidth >> 16 & 0xff, biWidth >> 24 & 0xff,
+ // LONG biHeight -- The height of the bitmap, in pixels
+ biHeight & 0xff, biHeight >> 8 & 0xff, biHeight >> 16 & 0xff, biHeight >> 24 & 0xff,
+ // WORD biPlanes -- The number of planes for the target device. This value must be set to 1
+ 1, 0,
+ // WORD biBitCount -- The number of bits-per-pixel, 24 bits-per-pixel -- the bitmap
+ // has a maximum of 2^24 colors (16777216, Truecolor)
+ 24, 0,
+ // DWORD biCompression -- The type of compression, BI_RGB (code 0) -- uncompressed
+ 0, 0, 0, 0,
+ // DWORD biSizeImage -- The size, in bytes, of the image. This may be set to zero for BI_RGB bitmaps
+ biSizeImage & 0xff, biSizeImage >> 8 & 0xff, biSizeImage >> 16 & 0xff, biSizeImage >> 24 & 0xff,
+ // LONG biXPelsPerMeter, unused
+ 0, 0, 0, 0,
+ // LONG biYPelsPerMeter, unused
+ 0, 0, 0, 0,
+ // DWORD biClrUsed, the number of color indexes of palette, unused
+ 0, 0, 0, 0,
+ // DWORD biClrImportant, unused
+ 0, 0, 0, 0
+ ];
+
+ var iPadding = (4 - ((biWidth * 3) % 4)) % 4;
+
+ var aImgData = oData.data;
+
+ var strPixelData = '';
+ var biWidth4 = biWidth << 2;
+ var y = biHeight;
+ var fromCharCode = String.fromCharCode;
+
+ do {
+ var iOffsetY = biWidth4 * (y - 1);
+ var strPixelRow = '';
+ for (var x = 0; x < biWidth; x++) {
+ var iOffsetX = x << 2;
+ strPixelRow += fromCharCode(aImgData[iOffsetY + iOffsetX + 2]) +
+ fromCharCode(aImgData[iOffsetY + iOffsetX + 1]) +
+ fromCharCode(aImgData[iOffsetY + iOffsetX]);
+ }
+
+ for (var c = 0; c < iPadding; c++) {
+ strPixelRow += String.fromCharCode(0);
+ }
+
+ strPixelData += strPixelRow;
+ } while (--y)
+
+ var strEncoded = encodeData(BITMAPFILEHEADER.concat(BITMAPINFOHEADER)) + encodeData(strPixelData);
+
+ return strEncoded
+ }
+
+ /**
+ * 转换为图片base64
+ * @param canvasId canvas标识
+ * @param x 将要被提取的图像数据矩形区域的左上角 x 坐标
+ * @param y 将要被提取的图像数据矩形区域的左上角 y 坐标
+ * @param width 将要被提取的图像数据矩形区域的宽度
+ * @param height 将要被提取的图像数据矩形区域的高度
+ * @param type 转换图片类型
+ * @param done 完成回调
+ */
+ function convertToImage(canvasId, x, y, width, height, type, done) {
+ if (done === void 0) done = function() {};
+
+ if (type === undefined) {
+ type = 'png';
+ }
+ type = fixType(type);
+ if (/bmp/.test(type)) {
+ getImageData(canvasId, x, y, width, height, function(data, err) {
+ var strData = genBitmapImage(data);
+ tools_7(done) && done(makeURI(strData, 'image/' + type), err);
+ });
+ } else {
+ console.error('暂不支持生成\'' + type + '\'类型的base64图片');
+ }
+ }
+
+ var CanvasToBase64 = {
+ convertToImage: convertToImage,
+ // convertToPNG: function (width, height, done) {
+ // return convertToImage(width, height, 'png', done)
+ // },
+ // convertToJPEG: function (width, height, done) {
+ // return convertToImage(width, height, 'jpeg', done)
+ // },
+ // convertToGIF: function (width, height, done) {
+ // return convertToImage(width, height, 'gif', done)
+ // },
+ convertToBMP: function(ref, done) {
+ if (ref === void 0) ref = {};
+ var canvasId = ref.canvasId;
+ var x = ref.x;
+ var y = ref.y;
+ var width = ref.width;
+ var height = ref.height;
+ if (done === void 0) done = function() {};
+
+ return convertToImage(canvasId, x, y, width, height, 'bmp', done)
+ }
+ };
+
+ function methods() {
+ var self = this;
+
+ var boundWidth = self.width; // 裁剪框默认宽度,即整个画布宽度
+ var boundHeight = self.height; // 裁剪框默认高度,即整个画布高度
+
+ var id = self.id;
+ var targetId = self.targetId;
+ var pixelRatio = self.pixelRatio;
+
+ var ref = self.cut;
+ var x = ref.x;
+ if (x === void 0) x = 0;
+ var y = ref.y;
+ if (y === void 0) y = 0;
+ var width = ref.width;
+ if (width === void 0) width = boundWidth;
+ var height = ref.height;
+ if (height === void 0) height = boundHeight;
+
+ self.updateCanvas = function(done) {
+ if (self.croperTarget) {
+ // 画布绘制图片
+ self.ctx.drawImage(
+ self.croperTarget,
+ self.imgLeft,
+ self.imgTop,
+ self.scaleWidth,
+ self.scaleHeight
+ );
+ }
+ tools_7(self.onBeforeDraw) && self.onBeforeDraw(self.ctx, self);
+
+ self.setBoundStyle(self.boundStyle); // 设置边界样式
+
+ self.ctx.draw(false, done);
+ return self
+ };
+
+ self.pushOrigin = self.pushOrign = function(src) {
+ self.src = src;
+
+ tools_7(self.onBeforeImageLoad) && self.onBeforeImageLoad(self.ctx, self);
+
+ return getImageInfo({
+ src: src
+ })
+ .then(function(res) {
+ var innerAspectRadio = res.width / res.height;
+ var customAspectRadio = width / height;
+
+ self.croperTarget = res.path;
+
+ if (innerAspectRadio < customAspectRadio) {
+ self.rectX = x;
+ self.baseWidth = width;
+ self.baseHeight = width / innerAspectRadio;
+ self.rectY = y - Math.abs((height - self.baseHeight) / 2);
+ } else {
+ self.rectY = y;
+ self.baseWidth = height * innerAspectRadio;
+ self.baseHeight = height;
+ self.rectX = x - Math.abs((width - self.baseWidth) / 2);
+ }
+
+ self.imgLeft = self.rectX;
+ self.imgTop = self.rectY;
+ self.scaleWidth = self.baseWidth;
+ self.scaleHeight = self.baseHeight;
+
+ self.update();
+
+ return new Promise(function(resolve) {
+ self.updateCanvas(resolve);
+ })
+ })
+ .then(function() {
+ tools_7(self.onImageLoad) && self.onImageLoad(self.ctx, self);
+ })
+ };
+
+ self.removeImage = function() {
+ self.src = '';
+ self.croperTarget = '';
+ return draw(self.ctx)
+ };
+
+ self.getCropperBase64 = function(done) {
+ if (done === void 0) done = function() {};
+
+ CanvasToBase64.convertToBMP({
+ canvasId: id,
+ x: x,
+ y: y,
+ width: width,
+ height: height
+ }, done);
+ };
+
+ self.getCropperImage = function(opt, fn) {
+ var customOptions = opt;
+
+ var canvasOptions = {
+ canvasId: id,
+ x: x,
+ y: y,
+ width: width,
+ height: height
+ };
+
+ var task = function() {
+ return Promise.resolve();
+ };
+
+ if (
+ tools_10(customOptions) &&
+ customOptions.original
+ ) {
+ // original mode
+ task = function() {
+ self.targetCtx.drawImage(
+ self.croperTarget,
+ self.imgLeft * pixelRatio,
+ self.imgTop * pixelRatio,
+ self.scaleWidth * pixelRatio,
+ self.scaleHeight * pixelRatio
+ );
+
+ canvasOptions = {
+ canvasId: targetId,
+ x: x * pixelRatio,
+ y: y * pixelRatio,
+ width: width * pixelRatio,
+ height: height * pixelRatio
+ };
+
+ return draw(self.targetCtx)
+ };
+ }
+
+ return task()
+ .then(function() {
+ if (tools_10(customOptions)) {
+ canvasOptions = Object.assign({}, canvasOptions, customOptions);
+ }
+
+ if (tools_7(customOptions)) {
+ fn = customOptions;
+ }
+
+ var arg = canvasOptions.componentContext ?
+ [canvasOptions, canvasOptions.componentContext] :
+ [canvasOptions];
+
+ return canvasToTempFilePath.apply(null, arg)
+ })
+ .then(function(res) {
+ var tempFilePath = res.tempFilePath;
+
+ return tools_7(fn) ?
+ fn.call(self, tempFilePath, null) :
+ tempFilePath
+ })
+ .catch(function(err) {
+ if (tools_7(fn)) {
+ fn.call(self, null, err);
+ } else {
+ throw err
+ }
+ })
+ };
+ }
+
+ /**
+ * 获取最新缩放值
+ * @param oldScale 上一次触摸结束后的缩放值
+ * @param oldDistance 上一次触摸结束后的双指距离
+ * @param zoom 缩放系数
+ * @param touch0 第一指touch对象
+ * @param touch1 第二指touch对象
+ * @returns {*}
+ */
+ var getNewScale = function(oldScale, oldDistance, zoom, touch0, touch1) {
+ var xMove, yMove, newDistance;
+ // 计算二指最新距离
+ xMove = Math.round(touch1.x - touch0.x);
+ yMove = Math.round(touch1.y - touch0.y);
+ newDistance = Math.round(Math.sqrt(xMove * xMove + yMove * yMove));
+
+ return oldScale + 0.001 * zoom * (newDistance - oldDistance)
+ };
+
+ function update() {
+ var self = this;
+
+ if (!self.src) {
+ return
+ }
+
+ self.__oneTouchStart = function(touch) {
+ self.touchX0 = Math.round(touch.x);
+ self.touchY0 = Math.round(touch.y);
+ };
+
+ self.__oneTouchMove = function(touch) {
+ var xMove, yMove;
+ // 计算单指移动的距离
+ if (self.touchended) {
+ return self.updateCanvas()
+ }
+ xMove = Math.round(touch.x - self.touchX0);
+ yMove = Math.round(touch.y - self.touchY0);
+
+ var imgLeft = Math.round(self.rectX + xMove);
+ var imgTop = Math.round(self.rectY + yMove);
+
+ self.outsideBound(imgLeft, imgTop);
+
+ self.updateCanvas();
+ };
+
+ self.__twoTouchStart = function(touch0, touch1) {
+ var xMove, yMove, oldDistance;
+
+ self.touchX1 = Math.round(self.rectX + self.scaleWidth / 2);
+ self.touchY1 = Math.round(self.rectY + self.scaleHeight / 2);
+
+ // 计算两指距离
+ xMove = Math.round(touch1.x - touch0.x);
+ yMove = Math.round(touch1.y - touch0.y);
+ oldDistance = Math.round(Math.sqrt(xMove * xMove + yMove * yMove));
+
+ self.oldDistance = oldDistance;
+ };
+
+ self.__twoTouchMove = function(touch0, touch1) {
+ var oldScale = self.oldScale;
+ var oldDistance = self.oldDistance;
+ var scale = self.scale;
+ var zoom = self.zoom;
+
+ self.newScale = getNewScale(oldScale, oldDistance, zoom, touch0, touch1);
+
+ // 设定缩放范围
+ self.newScale <= 1 && (self.newScale = 1);
+ self.newScale >= scale && (self.newScale = scale);
+
+ self.scaleWidth = Math.round(self.newScale * self.baseWidth);
+ self.scaleHeight = Math.round(self.newScale * self.baseHeight);
+ var imgLeft = Math.round(self.touchX1 - self.scaleWidth / 2);
+ var imgTop = Math.round(self.touchY1 - self.scaleHeight / 2);
+
+ self.outsideBound(imgLeft, imgTop);
+
+ self.updateCanvas();
+ };
+
+ self.__xtouchEnd = function() {
+ self.oldScale = self.newScale;
+ self.rectX = self.imgLeft;
+ self.rectY = self.imgTop;
+ };
+ }
+
+ var handle = {
+ // 图片手势初始监测
+ touchStart: function touchStart(e) {
+ var self = this;
+ var ref = e.touches;
+ var touch0 = ref[0];
+ var touch1 = ref[1];
+
+ if (!self.src) {
+ return
+ }
+
+ setTouchState(self, true, null, null);
+
+ // 计算第一个触摸点的位置,并参照改点进行缩放
+ self.__oneTouchStart(touch0);
+
+ // 两指手势触发
+ if (e.touches.length >= 2) {
+ self.__twoTouchStart(touch0, touch1);
+ }
+ },
+
+ // 图片手势动态缩放
+ touchMove: function touchMove(e) {
+ var self = this;
+ var ref = e.touches;
+ var touch0 = ref[0];
+ var touch1 = ref[1];
+
+ if (!self.src) {
+ return
+ }
+
+ setTouchState(self, null, true);
+
+ // 单指手势时触发
+ if (e.touches.length === 1) {
+ self.__oneTouchMove(touch0);
+ }
+ // 两指手势触发
+ if (e.touches.length >= 2) {
+ self.__twoTouchMove(touch0, touch1);
+ }
+ },
+
+ touchEnd: function touchEnd(e) {
+ var self = this;
+
+ if (!self.src) {
+ return
+ }
+
+ setTouchState(self, false, false, true);
+ self.__xtouchEnd();
+ }
+ };
+
+ function cut() {
+ var self = this;
+ var boundWidth = self.width; // 裁剪框默认宽度,即整个画布宽度
+ var boundHeight = self.height;
+ // 裁剪框默认高度,即整个画布高度
+ var ref = self.cut;
+ var x = ref.x;
+ if (x === void 0) x = 0;
+ var y = ref.y;
+ if (y === void 0) y = 0;
+ var width = ref.width;
+ if (width === void 0) width = boundWidth;
+ var height = ref.height;
+ if (height === void 0) height = boundHeight;
+
+ /**
+ * 设置边界
+ * @param imgLeft 图片左上角横坐标值
+ * @param imgTop 图片左上角纵坐标值
+ */
+ self.outsideBound = function(imgLeft, imgTop) {
+ self.imgLeft = imgLeft >= x ?
+ x :
+ self.scaleWidth + imgLeft - x <= width ?
+ x + width - self.scaleWidth :
+ imgLeft;
+
+ self.imgTop = imgTop >= y ?
+ y :
+ self.scaleHeight + imgTop - y <= height ?
+ y + height - self.scaleHeight :
+ imgTop;
+ };
+
+ /**
+ * 设置边界样式
+ * @param color 边界颜色
+ */
+ self.setBoundStyle = function(ref) {
+ if (ref === void 0) ref = {};
+ var color = ref.color;
+ if (color === void 0) color = '#04b00f';
+ var mask = ref.mask;
+ if (mask === void 0) mask = 'rgba(0, 0, 0, 0.3)';
+ var lineWidth = ref.lineWidth;
+ if (lineWidth === void 0) lineWidth = 1;
+
+ var half = lineWidth / 2;
+ var boundOption = [{
+ start: {
+ x: x - half,
+ y: y + 10 - half
+ },
+ step1: {
+ x: x - half,
+ y: y - half
+ },
+ step2: {
+ x: x + 10 - half,
+ y: y - half
+ }
+ },
+ {
+ start: {
+ x: x - half,
+ y: y + height - 10 + half
+ },
+ step1: {
+ x: x - half,
+ y: y + height + half
+ },
+ step2: {
+ x: x + 10 - half,
+ y: y + height + half
+ }
+ },
+ {
+ start: {
+ x: x + width - 10 + half,
+ y: y - half
+ },
+ step1: {
+ x: x + width + half,
+ y: y - half
+ },
+ step2: {
+ x: x + width + half,
+ y: y + 10 - half
+ }
+ },
+ {
+ start: {
+ x: x + width + half,
+ y: y + height - 10 + half
+ },
+ step1: {
+ x: x + width + half,
+ y: y + height + half
+ },
+ step2: {
+ x: x + width - 10 + half,
+ y: y + height + half
+ }
+ }
+ ];
+
+ // 绘制半透明层
+ self.ctx.beginPath();
+ self.ctx.setFillStyle(mask);
+ self.ctx.fillRect(0, 0, x, boundHeight);
+ self.ctx.fillRect(x, 0, width, y);
+ self.ctx.fillRect(x, y + height, width, boundHeight - y - height);
+ self.ctx.fillRect(x + width, 0, boundWidth - x - width, boundHeight);
+ self.ctx.fill();
+
+ boundOption.forEach(function(op) {
+ self.ctx.beginPath();
+ self.ctx.setStrokeStyle(color);
+ self.ctx.setLineWidth(lineWidth);
+ self.ctx.moveTo(op.start.x, op.start.y);
+ self.ctx.lineTo(op.step1.x, op.step1.y);
+ self.ctx.lineTo(op.step2.x, op.step2.y);
+ self.ctx.stroke();
+ });
+ };
+ }
+
+ var version = "1.3.9";
+
+ var WeCropper = function WeCropper(params) {
+ var self = this;
+ var _default = {};
+
+ validator(self, DEFAULT);
+
+ Object.keys(DEFAULT).forEach(function(key) {
+ _default[key] = DEFAULT[key].default;
+ });
+ Object.assign(self, _default, params);
+
+ self.prepare();
+ self.attachPage();
+ self.createCtx();
+ self.observer();
+ self.cutt();
+ self.methods();
+ self.init();
+ self.update();
+
+ return self
+ };
+
+ WeCropper.prototype.init = function init() {
+ var self = this;
+ var src = self.src;
+
+ self.version = version;
+
+ typeof self.onReady === 'function' && self.onReady(self.ctx, self);
+
+ if (src) {
+ self.pushOrign(src);
+ } else {
+ self.updateCanvas();
+ }
+ setTouchState(self, false, false, false);
+
+ self.oldScale = 1;
+ self.newScale = 1;
+
+ return self
+ };
+
+ Object.assign(WeCropper.prototype, handle);
+
+ WeCropper.prototype.prepare = prepare;
+ WeCropper.prototype.observer = observer;
+ WeCropper.prototype.methods = methods;
+ WeCropper.prototype.cutt = cut;
+ WeCropper.prototype.update = update;
+
+ return WeCropper;
+
+})));
diff --git a/uni_modules/vk-uview-ui/components/u-avatar/u-avatar.vue b/uni_modules/vk-uview-ui/components/u-avatar/u-avatar.vue
new file mode 100644
index 0000000..ab21c46
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-avatar/u-avatar.vue
@@ -0,0 +1,263 @@
+
+
+
+
+ {{ uText }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-back-top/u-back-top.vue b/uni_modules/vk-uview-ui/components/u-back-top/u-back-top.vue
new file mode 100644
index 0000000..7970fc7
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-back-top/u-back-top.vue
@@ -0,0 +1,153 @@
+
+
+
+
+
+ {{tips}}
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-badge/u-badge.vue b/uni_modules/vk-uview-ui/components/u-badge/u-badge.vue
new file mode 100644
index 0000000..e85b133
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-badge/u-badge.vue
@@ -0,0 +1,216 @@
+
+
+ {{showText}}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uni_modules/vk-uview-ui/components/u-button/u-button.vue b/uni_modules/vk-uview-ui/components/u-button/u-button.vue
new file mode 100644
index 0000000..2647afc
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-button/u-button.vue
@@ -0,0 +1,602 @@
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-calendar/u-calendar.vue b/uni_modules/vk-uview-ui/components/u-calendar/u-calendar.vue
new file mode 100644
index 0000000..f2a280f
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-calendar/u-calendar.vue
@@ -0,0 +1,661 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ showTitle }}
+
+
+
+
+
+
+
+
+ {{item}}
+
+
+
+
+
+
+
+
+ {{ index + 1 }}
+
+ {{startText}}
+ {{endText}}
+
+ {{month}}
+
+
+
+ {{mode == 'date' ? activeDate : startDate}}
+ 至{{endDate}}
+
+
+ 确定
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uni_modules/vk-uview-ui/components/u-car-keyboard/u-car-keyboard.vue b/uni_modules/vk-uview-ui/components/u-car-keyboard/u-car-keyboard.vue
new file mode 100644
index 0000000..2a3454d
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-car-keyboard/u-car-keyboard.vue
@@ -0,0 +1,261 @@
+
+ {}">
+
+
+
+ {{ item }}
+
+
+
+
+
+
+ 中
+ /
+ 英
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-card/u-card.vue b/uni_modules/vk-uview-ui/components/u-card/u-card.vue
new file mode 100644
index 0000000..b4ad301
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-card/u-card.vue
@@ -0,0 +1,300 @@
+
+
+
+
+
+
+
+ {{ title }}
+
+
+
+
+ {{ subTitle }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-cell-group/u-cell-group.vue b/uni_modules/vk-uview-ui/components/u-cell-group/u-cell-group.vue
new file mode 100644
index 0000000..3fbca72
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-cell-group/u-cell-group.vue
@@ -0,0 +1,70 @@
+
+
+
+ {{title}}
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-cell-item/u-cell-item.vue b/uni_modules/vk-uview-ui/components/u-cell-item/u-cell-item.vue
new file mode 100644
index 0000000..90ee117
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-cell-item/u-cell-item.vue
@@ -0,0 +1,317 @@
+
+
+
+
+
+
+
+ {{ title }}
+
+
+
+ {{ label }}
+
+
+
+
+
+ {{ value }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-checkbox-group/u-checkbox-group.vue b/uni_modules/vk-uview-ui/components/u-checkbox-group/u-checkbox-group.vue
new file mode 100644
index 0000000..b7c15f7
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-checkbox-group/u-checkbox-group.vue
@@ -0,0 +1,148 @@
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-checkbox/u-checkbox.vue b/uni_modules/vk-uview-ui/components/u-checkbox/u-checkbox.vue
new file mode 100644
index 0000000..063502f
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-checkbox/u-checkbox.vue
@@ -0,0 +1,299 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-circle-progress/u-circle-progress.vue b/uni_modules/vk-uview-ui/components/u-circle-progress/u-circle-progress.vue
new file mode 100644
index 0000000..46e7c18
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-circle-progress/u-circle-progress.vue
@@ -0,0 +1,220 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-col/u-col.vue b/uni_modules/vk-uview-ui/components/u-col/u-col.vue
new file mode 100644
index 0000000..3b6cc64
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-col/u-col.vue
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-collapse-item/u-collapse-item.vue b/uni_modules/vk-uview-ui/components/u-collapse-item/u-collapse-item.vue
new file mode 100644
index 0000000..bdce879
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-collapse-item/u-collapse-item.vue
@@ -0,0 +1,205 @@
+
+
+
+
+
+ {{ title }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-collapse/u-collapse.vue b/uni_modules/vk-uview-ui/components/u-collapse/u-collapse.vue
new file mode 100644
index 0000000..f6e4bf0
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-collapse/u-collapse.vue
@@ -0,0 +1,100 @@
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-column-notice/u-column-notice.vue b/uni_modules/vk-uview-ui/components/u-column-notice/u-column-notice.vue
new file mode 100644
index 0000000..709ca5c
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-column-notice/u-column-notice.vue
@@ -0,0 +1,238 @@
+
+
+
+
+
+
+
+
+ {{ item }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-count-down/u-count-down.vue b/uni_modules/vk-uview-ui/components/u-count-down/u-count-down.vue
new file mode 100644
index 0000000..0d7cc21
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-count-down/u-count-down.vue
@@ -0,0 +1,175 @@
+
+
+
+ {{ formattedTime }}
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-count-down/utils.js b/uni_modules/vk-uview-ui/components/u-count-down/utils.js
new file mode 100644
index 0000000..8c75005
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-count-down/utils.js
@@ -0,0 +1,62 @@
+// 补0,如1 -> 01
+function padZero(num, targetLength = 2) {
+ let str = `${num}`
+ while (str.length < targetLength) {
+ str = `0${str}`
+ }
+ return str
+}
+const SECOND = 1000
+const MINUTE = 60 * SECOND
+const HOUR = 60 * MINUTE
+const DAY = 24 * HOUR
+export function parseTimeData(time) {
+ const days = Math.floor(time / DAY)
+ const hours = Math.floor((time % DAY) / HOUR)
+ const minutes = Math.floor((time % HOUR) / MINUTE)
+ const seconds = Math.floor((time % MINUTE) / SECOND)
+ const milliseconds = Math.floor(time % SECOND)
+ return {
+ days,
+ hours,
+ minutes,
+ seconds,
+ milliseconds
+ }
+}
+export function parseFormat(format, timeData) {
+ let {
+ days,
+ hours,
+ minutes,
+ seconds,
+ milliseconds
+ } = timeData
+ // 如果格式化字符串中不存在DD(天),则将天的时间转为小时中去
+ if (format.indexOf('DD') === -1) {
+ hours += days * 24
+ } else {
+ // 对天补0
+ format = format.replace('DD', padZero(days))
+ }
+ // 其他同理于DD的格式化处理方式
+ if (format.indexOf('HH') === -1) {
+ minutes += hours * 60
+ } else {
+ format = format.replace('HH', padZero(hours))
+ }
+ if (format.indexOf('mm') === -1) {
+ seconds += minutes * 60
+ } else {
+ format = format.replace('mm', padZero(minutes))
+ }
+ if (format.indexOf('ss') === -1) {
+ milliseconds += seconds * 1000
+ } else {
+ format = format.replace('ss', padZero(seconds))
+ }
+ return format.replace('SSS', padZero(milliseconds, 3))
+}
+export function isSameSecond(time1, time2) {
+ return Math.floor(time1 / 1000) === Math.floor(time2 / 1000)
+}
diff --git a/uni_modules/vk-uview-ui/components/u-count-to/u-count-to.vue b/uni_modules/vk-uview-ui/components/u-count-to/u-count-to.vue
new file mode 100644
index 0000000..2cad97c
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-count-to/u-count-to.vue
@@ -0,0 +1,266 @@
+
+
+ {{ displayValueCom }}
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-divider/u-divider.vue b/uni_modules/vk-uview-ui/components/u-divider/u-divider.vue
new file mode 100644
index 0000000..6f8d7e6
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-divider/u-divider.vue
@@ -0,0 +1,153 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-dropdown-item/u-dropdown-item.vue b/uni_modules/vk-uview-ui/components/u-dropdown-item/u-dropdown-item.vue
new file mode 100644
index 0000000..2ca23fe
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-dropdown-item/u-dropdown-item.vue
@@ -0,0 +1,147 @@
+
+ {}" @tap.stop.prevent="() => {}">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-dropdown/u-dropdown.vue b/uni_modules/vk-uview-ui/components/u-dropdown/u-dropdown.vue
new file mode 100644
index 0000000..b9438b4
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-dropdown/u-dropdown.vue
@@ -0,0 +1,299 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-empty/u-empty.vue b/uni_modules/vk-uview-ui/components/u-empty/u-empty.vue
new file mode 100644
index 0000000..2c77b24
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-empty/u-empty.vue
@@ -0,0 +1,193 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-field/u-field.vue b/uni_modules/vk-uview-ui/components/u-field/u-field.vue
new file mode 100644
index 0000000..a26c9dd
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-field/u-field.vue
@@ -0,0 +1,397 @@
+
+
+
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ errorMessage }}
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-form-item/u-form-item.vue b/uni_modules/vk-uview-ui/components/u-form-item/u-form-item.vue
new file mode 100644
index 0000000..99c8a3c
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-form-item/u-form-item.vue
@@ -0,0 +1,448 @@
+
+
+
+
+
+
+
+
+ *
+
+
+
+
+ {{label}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{validateMessage}}
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-form/u-form.vue b/uni_modules/vk-uview-ui/components/u-form/u-form.vue
new file mode 100644
index 0000000..bdbafaf
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-form/u-form.vue
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-full-screen/u-full-screen.vue b/uni_modules/vk-uview-ui/components/u-full-screen/u-full-screen.vue
new file mode 100644
index 0000000..4f7e7d9
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-full-screen/u-full-screen.vue
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-gap/u-gap.vue b/uni_modules/vk-uview-ui/components/u-gap/u-gap.vue
new file mode 100644
index 0000000..6c01f94
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-gap/u-gap.vue
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-grid-item/u-grid-item.vue b/uni_modules/vk-uview-ui/components/u-grid-item/u-grid-item.vue
new file mode 100644
index 0000000..c5b3033
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-grid-item/u-grid-item.vue
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-grid/u-grid.vue b/uni_modules/vk-uview-ui/components/u-grid/u-grid.vue
new file mode 100644
index 0000000..125b6f1
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-grid/u-grid.vue
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-icon/u-icon.vue b/uni_modules/vk-uview-ui/components/u-icon/u-icon.vue
new file mode 100644
index 0000000..e7ca0f9
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-icon/u-icon.vue
@@ -0,0 +1,341 @@
+
+
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-image/u-image.vue b/uni_modules/vk-uview-ui/components/u-image/u-image.vue
new file mode 100644
index 0000000..6b00bd2
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-image/u-image.vue
@@ -0,0 +1,267 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-index-anchor/u-index-anchor.vue b/uni_modules/vk-uview-ui/components/u-index-anchor/u-index-anchor.vue
new file mode 100644
index 0000000..5038827
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-index-anchor/u-index-anchor.vue
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+ {{ index }}
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-index-list/u-index-list.vue b/uni_modules/vk-uview-ui/components/u-index-list/u-index-list.vue
new file mode 100644
index 0000000..30fcda0
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-index-list/u-index-list.vue
@@ -0,0 +1,315 @@
+
+
+
+
+
+
+
+ {{indexList[touchmoveIndex]}}
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-input/u-input.vue b/uni_modules/vk-uview-ui/components/u-input/u-input.vue
new file mode 100644
index 0000000..0f541cc
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-input/u-input.vue
@@ -0,0 +1,434 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-keyboard/u-keyboard.vue b/uni_modules/vk-uview-ui/components/u-keyboard/u-keyboard.vue
new file mode 100644
index 0000000..83b8c1f
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-keyboard/u-keyboard.vue
@@ -0,0 +1,244 @@
+
+
+
+
+
+ {{cancelBtn ? cancelText : ''}}
+
+
+ {{tips ? tips : mode == 'number' ? '数字键盘' : mode == 'card' ? '身份证键盘' : '车牌号键盘'}}
+
+
+ {{confirmBtn ? confirmText : ''}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-lazy-load/u-lazy-load.vue b/uni_modules/vk-uview-ui/components/u-lazy-load/u-lazy-load.vue
new file mode 100644
index 0000000..f872922
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-lazy-load/u-lazy-load.vue
@@ -0,0 +1,254 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-line-progress/u-line-progress.vue b/uni_modules/vk-uview-ui/components/u-line-progress/u-line-progress.vue
new file mode 100644
index 0000000..77e2da2
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-line-progress/u-line-progress.vue
@@ -0,0 +1,147 @@
+
+
+
+
+
+ {{percent + '%'}}
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-line/u-line.vue b/uni_modules/vk-uview-ui/components/u-line/u-line.vue
new file mode 100644
index 0000000..c56fbc3
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-line/u-line.vue
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-link/u-link.vue b/uni_modules/vk-uview-ui/components/u-link/u-link.vue
new file mode 100644
index 0000000..2dd2a73
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-link/u-link.vue
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-loading-page/u-loading-page.vue b/uni_modules/vk-uview-ui/components/u-loading-page/u-loading-page.vue
new file mode 100644
index 0000000..7e04401
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-loading-page/u-loading-page.vue
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-loading/u-loading.vue b/uni_modules/vk-uview-ui/components/u-loading/u-loading.vue
new file mode 100644
index 0000000..c747f64
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-loading/u-loading.vue
@@ -0,0 +1,103 @@
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-loadmore/u-loadmore.vue b/uni_modules/vk-uview-ui/components/u-loadmore/u-loadmore.vue
new file mode 100644
index 0000000..e7cbbea
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-loadmore/u-loadmore.vue
@@ -0,0 +1,204 @@
+
+
+
+
+
+
+
+
+
+
+ {{ showText }}
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-mask/u-mask.vue b/uni_modules/vk-uview-ui/components/u-mask/u-mask.vue
new file mode 100644
index 0000000..0b55d9d
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-mask/u-mask.vue
@@ -0,0 +1,123 @@
+
+ {}" :class="{
+ 'u-mask-zoom': zoom,
+ 'u-mask-show': show
+ }">
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-message-input/u-message-input.vue b/uni_modules/vk-uview-ui/components/u-message-input/u-message-input.vue
new file mode 100644
index 0000000..09f8904
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-message-input/u-message-input.vue
@@ -0,0 +1,327 @@
+
+
+
+
+
+
+
+
+
+ {{ charArr[index] ? charArr[index] : ''}}
+
+ {{ charArr[index] ? '●' : ''}}
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-modal/u-modal.vue b/uni_modules/vk-uview-ui/components/u-modal/u-modal.vue
new file mode 100644
index 0000000..fbfafc7
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-modal/u-modal.vue
@@ -0,0 +1,306 @@
+
+
+
+
+ {{ title }}
+
+
+
+
+ {{ content }}
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-navbar/u-navbar.vue b/uni_modules/vk-uview-ui/components/u-navbar/u-navbar.vue
new file mode 100644
index 0000000..450242e
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-navbar/u-navbar.vue
@@ -0,0 +1,315 @@
+
+
+
+
+
+
+
+
+
+ {{ backText }}
+
+
+
+ {{ title }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-no-network/u-no-network.vue b/uni_modules/vk-uview-ui/components/u-no-network/u-no-network.vue
new file mode 100644
index 0000000..51d9f4f
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-no-network/u-no-network.vue
@@ -0,0 +1,233 @@
+
+ {}">
+
+
+
+ {{tips}}
+
+
+
+
+ 请检查网络,或前往设置
+
+
+
+ 重试
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-notice-bar/u-notice-bar.vue b/uni_modules/vk-uview-ui/components/u-notice-bar/u-notice-bar.vue
new file mode 100644
index 0000000..65425da
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-notice-bar/u-notice-bar.vue
@@ -0,0 +1,273 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-number-box/u-number-box.vue b/uni_modules/vk-uview-ui/components/u-number-box/u-number-box.vue
new file mode 100644
index 0000000..9ee56cc
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-number-box/u-number-box.vue
@@ -0,0 +1,476 @@
+
+
+
+
+ -
+
+
+
+ +
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-number-keyboard/u-number-keyboard.vue b/uni_modules/vk-uview-ui/components/u-number-keyboard/u-number-keyboard.vue
new file mode 100644
index 0000000..6b2801e
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-number-keyboard/u-number-keyboard.vue
@@ -0,0 +1,168 @@
+
+
+
+
+ {{ item }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/vk-uview-ui/components/u-parse/libs/CssHandler.js b/uni_modules/vk-uview-ui/components/u-parse/libs/CssHandler.js
new file mode 100644
index 0000000..ad3add0
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-parse/libs/CssHandler.js
@@ -0,0 +1,100 @@
+import cfg from './config.js'
+var isLetter = c => (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
+
+function CssHandler(tagStyle) {
+ var styles = Object.assign(Object.create(null), cfg.userAgentStyles);
+ for (var item in tagStyle)
+ styles[item] = (styles[item] ? styles[item] + ';' : '') + tagStyle[item];
+ this.styles = styles;
+}
+CssHandler.prototype.getStyle = function(data) {
+ this.styles = new parser(data, this.styles).parse();
+}
+CssHandler.prototype.match = function(name, attrs) {
+ var tmp, matched = (tmp = this.styles[name]) ? tmp + ';' : '';
+ if (attrs.class) {
+ var items = attrs.class.split(' ');
+ for (var i = 0, item; item = items[i]; i++)
+ if (tmp = this.styles['.' + item])
+ matched += tmp + ';';
+ }
+ if (tmp = this.styles['#' + attrs.id])
+ matched += tmp + ';';
+ return matched;
+}
+export default CssHandler;
+
+function parser(data, init) {
+ this.data = data;
+ this.floor = 0;
+ this.i = 0;
+ this.list = [];
+ this.res = init;
+ this.state = this.Space;
+}
+parser.prototype.parse = function() {
+ for (var c; c = this.data[this.i]; this.i++)
+ this.state(c);
+ return this.res;
+}
+parser.prototype.section = function() {
+ return this.data.substring(this.start, this.i);
+}
+// 状态机
+parser.prototype.Space = function(c) {
+ if (c == '.' || c == '#' || isLetter(c)) {
+ this.start = this.i;
+ this.state = this.Name;
+ } else if (c == '/' && this.data[this.i + 1] == '*')
+ this.Comment();
+ else if (!cfg.blankChar[c] && c != ';')
+ this.state = this.Ignore;
+}
+parser.prototype.Comment = function() {
+ this.i = this.data.indexOf('*/', this.i) + 1;
+ if (!this.i) this.i = this.data.length;
+ this.state = this.Space;
+}
+parser.prototype.Ignore = function(c) {
+ if (c == '{') this.floor++;
+ else if (c == '}' && !--this.floor) {
+ this.list = [];
+ this.state = this.Space;
+ }
+}
+parser.prototype.Name = function(c) {
+ if (cfg.blankChar[c]) {
+ this.list.push(this.section());
+ this.state = this.NameSpace;
+ } else if (c == '{') {
+ this.list.push(this.section());
+ this.Content();
+ } else if (c == ',') {
+ this.list.push(this.section());
+ this.Comma();
+ } else if (!isLetter(c) && (c < '0' || c > '9') && c != '-' && c != '_')
+ this.state = this.Ignore;
+}
+parser.prototype.NameSpace = function(c) {
+ if (c == '{') this.Content();
+ else if (c == ',') this.Comma();
+ else if (!cfg.blankChar[c]) this.state = this.Ignore;
+}
+parser.prototype.Comma = function() {
+ while (cfg.blankChar[this.data[++this.i]]);
+ if (this.data[this.i] == '{') this.Content();
+ else {
+ this.start = this.i--;
+ this.state = this.Name;
+ }
+}
+parser.prototype.Content = function() {
+ this.start = ++this.i;
+ if ((this.i = this.data.indexOf('}', this.i)) == -1) this.i = this.data.length;
+ var content = this.section();
+ for (var i = 0, item; item = this.list[i++];)
+ if (this.res[item]) this.res[item] += ';' + content;
+ else this.res[item] = content;
+ this.list = [];
+ this.state = this.Space;
+}
diff --git a/uni_modules/vk-uview-ui/components/u-parse/libs/MpHtmlParser.js b/uni_modules/vk-uview-ui/components/u-parse/libs/MpHtmlParser.js
new file mode 100644
index 0000000..a829fab
--- /dev/null
+++ b/uni_modules/vk-uview-ui/components/u-parse/libs/MpHtmlParser.js
@@ -0,0 +1,581 @@
+/**
+ * html 解析器
+ * @tutorial https://github.com/jin-yufeng/Parser
+ * @version 20201029
+ * @author JinYufeng
+ * @listens MIT
+ */
+import cfg from './config.js'
+import CssHandler from './CssHandler.js'
+
+var blankChar = cfg.blankChar
+var windowWidth = uni.getSystemInfoSync().windowWidth;
+var emoji;
+
+function MpHtmlParser(data, options = {}) {
+ this.attrs = {};
+ this.CssHandler = new CssHandler(options.tagStyle, windowWidth);
+ this.data = data;
+ this.domain = options.domain;
+ this.DOM = [];
+ this.i = this.start = this.audioNum = this.imgNum = this.videoNum = 0;
+ options.prot = (this.domain || '').includes('://') ? this.domain.split('://')[0] : 'http';
+ this.options = options;
+ this.state = this.Text;
+ this.STACK = [];
+ // 工具函数
+ this.bubble = () => {
+ for (var i = this.STACK.length, item; item = this.STACK[--i];) {
+ if (cfg.richOnlyTags[item.name]) return false;
+ item.c = 1;
+ }
+ return true;
+ }
+ this.decode = (val, amp) => {
+ var i = -1,
+ j, en;
+ while (1) {
+ if ((i = val.indexOf('&', i + 1)) == -1) break;
+ if ((j = val.indexOf(';', i + 2)) == -1) break;
+ if (val[i + 1] == '#') {
+ en = parseInt((val[i + 2] == 'x' ? '0' : '') + val.substring(i + 2, j));
+ if (!isNaN(en)) val = val.substr(0, i) + String.fromCharCode(en) + val.substr(j + 1);
+ } else {
+ en = val.substring(i + 1, j);
+ if (cfg.entities[en] || en == amp)
+ val = val.substr(0, i) + (cfg.entities[en] || '&') + val.substr(j + 1);
+ }
+ }
+ return val;
+ }
+ this.getUrl = url => {
+ if (url[0] == '/') {
+ if (url[1] == '/') url = this.options.prot + ':' + url;
+ else if (this.domain) url = this.domain + url;
+ } else if (this.domain && url.indexOf('data:') != 0 && !url.includes('://'))
+ url = this.domain + '/' + url;
+ return url;
+ }
+ this.isClose = () => this.data[this.i] == '>' || (this.data[this.i] == '/' && this.data[this.i + 1] == '>');
+ this.section = () => this.data.substring(this.start, this.i);
+ this.parent = () => this.STACK[this.STACK.length - 1];
+ this.siblings = () => this.STACK.length ? this.parent().children : this.DOM;
+}
+MpHtmlParser.prototype.parse = function() {
+ if (emoji) this.data = emoji.parseEmoji(this.data);
+ for (var c; c = this.data[this.i]; this.i++)
+ this.state(c);
+ if (this.state == this.Text) this.setText();
+ while (this.STACK.length) this.popNode(this.STACK.pop());
+ return this.DOM;
+}
+// 设置属性
+MpHtmlParser.prototype.setAttr = function() {
+ var name = this.attrName.toLowerCase(),
+ val = this.attrVal;
+ if (cfg.boolAttrs[name]) this.attrs[name] = 'T';
+ else if (val) {
+ if (name == 'src' || (name == 'data-src' && !this.attrs.src)) this.attrs.src = this.getUrl(this.decode(val, 'amp'));
+ else if (name == 'href' || name == 'style') this.attrs[name] = this.decode(val, 'amp');
+ else if (name.substr(0, 5) != 'data-') this.attrs[name] = val;
+ }
+ this.attrVal = '';
+ while (blankChar[this.data[this.i]]) this.i++;
+ if (this.isClose()) this.setNode();
+ else {
+ this.start = this.i;
+ this.state = this.AttrName;
+ }
+}
+// 设置文本节点
+MpHtmlParser.prototype.setText = function() {
+ var back, text = this.section();
+ if (!text) return;
+ text = (cfg.onText && cfg.onText(text, () => back = true)) || text;
+ if (back) {
+ this.data = this.data.substr(0, this.start) + text + this.data.substr(this.i);
+ let j = this.start + text.length;
+ for (this.i = this.start; this.i < j; this.i++) this.state(this.data[this.i]);
+ return;
+ }
+ if (!this.pre) {
+ // 合并空白符
+ var flag, tmp = [];
+ for (let i = text.length, c; c = text[--i];)
+ if (!blankChar[c]) {
+ tmp.unshift(c);
+ if (!flag) flag = 1;
+ } else {
+ if (tmp[0] != ' ') tmp.unshift(' ');
+ if (c == '\n' && flag == void 0) flag = 0;
+ }
+ if (flag == 0) return;
+ text = tmp.join('');
+ }
+ this.siblings().push({
+ type: 'text',
+ text: this.decode(text)
+ });
+}
+// 设置元素节点
+MpHtmlParser.prototype.setNode = function() {
+ var node = {
+ name: this.tagName.toLowerCase(),
+ attrs: this.attrs
+ },
+ close = cfg.selfClosingTags[node.name];
+ if (this.options.nodes.length) node.type = 'node';
+ this.attrs = {};
+ if (!cfg.ignoreTags[node.name]) {
+ // 处理属性
+ var attrs = node.attrs,
+ style = this.CssHandler.match(node.name, attrs, node) + (attrs.style || ''),
+ styleObj = {};
+ if (attrs.id) {
+ if (this.options.compress & 1) attrs.id = void 0;
+ else if (this.options.useAnchor) this.bubble();
+ }
+ if ((this.options.compress & 2) && attrs.class) attrs.class = void 0;
+ switch (node.name) {
+ case 'a':
+ case 'ad': // #ifdef APP-PLUS
+ case 'iframe':
+ // #endif
+ this.bubble();
+ break;
+ case 'font':
+ if (attrs.color) {
+ styleObj['color'] = attrs.color;
+ attrs.color = void 0;
+ }
+ if (attrs.face) {
+ styleObj['font-family'] = attrs.face;
+ attrs.face = void 0;
+ }
+ if (attrs.size) {
+ var size = parseInt(attrs.size);
+ if (size < 1) size = 1;
+ else if (size > 7) size = 7;
+ var map = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'];
+ styleObj['font-size'] = map[size - 1];
+ attrs.size = void 0;
+ }
+ break;
+ case 'embed':
+ // #ifndef APP-PLUS
+ var src = node.attrs.src || '',
+ type = node.attrs.type || '';
+ if (type.includes('video') || src.includes('.mp4') || src.includes('.3gp') || src.includes('.m3u8'))
+ node.name = 'video';
+ else if (type.includes('audio') || src.includes('.m4a') || src.includes('.wav') || src.includes('.mp3') || src.includes(
+ '.aac'))
+ node.name = 'audio';
+ else break;
+ if (node.attrs.autostart)
+ node.attrs.autoplay = 'T';
+ node.attrs.controls = 'T';
+ // #endif
+ // #ifdef APP-PLUS
+ this.bubble();
+ break;
+ // #endif
+ case 'video':
+ case 'audio':
+ if (!attrs.id) attrs.id = node.name + (++this[`${node.name}Num`]);
+ else this[`${node.name}Num`]++;
+ if (node.name == 'video') {
+ if (this.videoNum > 3)
+ node.lazyLoad = 1;
+ if (attrs.width) {
+ styleObj.width = parseFloat(attrs.width) + (attrs.width.includes('%') ? '%' : 'px');
+ attrs.width = void 0;
+ }
+ if (attrs.height) {
+ styleObj.height = parseFloat(attrs.height) + (attrs.height.includes('%') ? '%' : 'px');
+ attrs.height = void 0;
+ }
+ }
+ if (!attrs.controls && !attrs.autoplay) attrs.controls = 'T';
+ attrs.source = [];
+ if (attrs.src) {
+ attrs.source.push(attrs.src);
+ attrs.src = void 0;
+ }
+ this.bubble();
+ break;
+ case 'td':
+ case 'th':
+ if (attrs.colspan || attrs.rowspan)
+ for (var k = this.STACK.length, item; item = this.STACK[--k];)
+ if (item.name == 'table') {
+ item.flag = 1;
+ break;
+ }
+ }
+ if (attrs.align) {
+ if (node.name == 'table') {
+ if (attrs.align == 'center') styleObj['margin-inline-start'] = styleObj['margin-inline-end'] = 'auto';
+ else styleObj['float'] = attrs.align;
+ } else styleObj['text-align'] = attrs.align;
+ attrs.align = void 0;
+ }
+ // 压缩 style
+ var styles = style.split(';');
+ style = '';
+ for (var i = 0, len = styles.length; i < len; i++) {
+ var info = styles[i].split(':');
+ if (info.length < 2) continue;
+ let key = info[0].trim().toLowerCase(),
+ value = info.slice(1).join(':').trim();
+ if (value[0] == '-' || value.includes('safe'))
+ style += `;${key}:${value}`;
+ else if (!styleObj[key] || value.includes('import') || !styleObj[key].includes('import'))
+ styleObj[key] = value;
+ }
+ if (node.name == 'img') {
+ if (attrs.src && !attrs.ignore) {
+ if (this.bubble())
+ attrs.i = (this.imgNum++).toString();
+ else attrs.ignore = 'T';
+ }
+ if (attrs.ignore) {
+ style += ';-webkit-touch-callout:none';
+ styleObj['max-width'] = '100%';
+ }
+ var width;
+ if (styleObj.width) width = styleObj.width;
+ else if (attrs.width) width = attrs.width.includes('%') ? attrs.width : parseFloat(attrs.width) + 'px';
+ if (width) {
+ styleObj.width = width;
+ attrs.width = '100%';
+ if (parseInt(width) > windowWidth) {
+ styleObj.height = '';
+ if (attrs.height) attrs.height = void 0;
+ }
+ }
+ if (styleObj.height) {
+ attrs.height = styleObj.height;
+ styleObj.height = '';
+ } else if (attrs.height && !attrs.height.includes('%'))
+ attrs.height = parseFloat(attrs.height) + 'px';
+ }
+ for (var key in styleObj) {
+ var value = styleObj[key];
+ if (!value) continue;
+ if (key.includes('flex') || key == 'order' || key == 'self-align') node.c = 1;
+ // 填充链接
+ if (value.includes('url')) {
+ var j = value.indexOf('(');
+ if (j++ != -1) {
+ while (value[j] == '"' || value[j] == "'" || blankChar[value[j]]) j++;
+ value = value.substr(0, j) + this.getUrl(value.substr(j));
+ }
+ }
+ // 转换 rpx
+ else if (value.includes('rpx'))
+ value = value.replace(/[0-9.]+\s*rpx/g, $ => parseFloat($) * windowWidth / 750 + 'px');
+ else if (key == 'white-space' && value.includes('pre') && !close)
+ this.pre = node.pre = true;
+ style += `;${key}:${value}`;
+ }
+ style = style.substr(1);
+ if (style) attrs.style = style;
+ if (!close) {
+ node.children = [];
+ if (node.name == 'pre' && cfg.highlight) {
+ this.remove(node);
+ this.pre = node.pre = true;
+ }
+ this.siblings().push(node);
+ this.STACK.push(node);
+ } else if (!cfg.filter || cfg.filter(node, this) != false)
+ this.siblings().push(node);
+ } else {
+ if (!close) this.remove(node);
+ else if (node.name == 'source') {
+ var parent = this.parent();
+ if (parent && (parent.name == 'video' || parent.name == 'audio') && node.attrs.src)
+ parent.attrs.source.push(node.attrs.src);
+ } else if (node.name == 'base' && !this.domain) this.domain = node.attrs.href;
+ }
+ if (this.data[this.i] == '/') this.i++;
+ this.start = this.i + 1;
+ this.state = this.Text;
+}
+// 移除标签
+MpHtmlParser.prototype.remove = function(node) {
+ var name = node.name,
+ j = this.i;
+ // 处理 svg
+ var handleSvg = () => {
+ var src = this.data.substring(j, this.i + 1);
+ node.attrs.xmlns = 'http://www.w3.org/2000/svg';
+ for (var key in node.attrs) {
+ if (key == 'viewbox') src = ` viewBox="${node.attrs.viewbox}"` + src;
+ else if (key != 'style') src = ` ${key}="${node.attrs[key]}"` + src;
+ }
+ src = '