@sugarat/easypicker2-client 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/.env +6 -0
  2. package/.env.production +3 -0
  3. package/.env.test +4 -0
  4. package/.eslintignore +0 -0
  5. package/.eslintrc.json +57 -0
  6. package/.github/workflows/main.yml +61 -0
  7. package/.prettierrc.js +9 -0
  8. package/LICENSE +21 -0
  9. package/README.md +86 -0
  10. package/auto-imports.d.ts +6 -0
  11. package/components.d.ts +56 -0
  12. package/docker/ep_backup/easypicker2.sql +214 -0
  13. package/docker/ep_backup/mongodb/easypicker2/action.bson +0 -0
  14. package/docker/ep_backup/mongodb/easypicker2/action.metadata.json +1 -0
  15. package/docker/ep_backup/mongodb/easypicker2/log.bson +0 -0
  16. package/docker/ep_backup/mongodb/easypicker2/log.metadata.json +1 -0
  17. package/docker/ep_backup/user-config.json +176 -0
  18. package/docs/.env +1 -0
  19. package/docs/.env.production +2 -0
  20. package/docs/.vitepress/config.ts +204 -0
  21. package/docs/.vitepress/theme/bg.png +0 -0
  22. package/docs/.vitepress/theme/index.scss +41 -0
  23. package/docs/.vitepress/theme/index.ts +5 -0
  24. package/docs/author.md +24 -0
  25. package/docs/auto-imports.d.ts +6 -0
  26. package/docs/components.d.ts +17 -0
  27. package/docs/deploy/design/api.md +3 -0
  28. package/docs/deploy/design/db.md +3 -0
  29. package/docs/deploy/design/index.md +3 -0
  30. package/docs/deploy/design/shell.md +9 -0
  31. package/docs/deploy/faq.md +86 -0
  32. package/docs/deploy/index.md +9 -0
  33. package/docs/deploy/local.md +275 -0
  34. package/docs/deploy/online-new.md +610 -0
  35. package/docs/deploy/online.md +683 -0
  36. package/docs/deploy/qiniu.md +183 -0
  37. package/docs/index.md +40 -0
  38. package/docs/introduction/about/code.md +26 -0
  39. package/docs/introduction/about/index.md +33 -0
  40. package/docs/introduction/feature/index.md +3 -0
  41. package/docs/plan/log.md +333 -0
  42. package/docs/plan/todo.md +127 -0
  43. package/docs/plan/wish.md +29 -0
  44. package/docs/praise/index.md +45 -0
  45. package/docs/public/favicon.ico +0 -0
  46. package/docs/public/logo.png +0 -0
  47. package/docs/public/robots.txt +2 -0
  48. package/docs/src/apis/ajax.ts +66 -0
  49. package/docs/src/apis/index.ts +1 -0
  50. package/docs/src/apis/modules/wish.ts +20 -0
  51. package/docs/src/components/Avatar.vue +60 -0
  52. package/docs/src/components/Home.vue +85 -0
  53. package/docs/src/components/Picture.vue +13 -0
  54. package/docs/src/components/Praise.vue +52 -0
  55. package/docs/src/components/WishBtn.vue +98 -0
  56. package/docs/src/components/WishPanel.vue +170 -0
  57. package/docs/src/components/callme/index.vue +72 -0
  58. package/docs/vite.config.ts +42 -0
  59. package/index.html +127 -0
  60. package/package.json +52 -0
  61. package/public/favicon.ico +0 -0
  62. package/public/logo.png +0 -0
  63. package/scripts/deploy/docs.mjs +24 -0
  64. package/scripts/deploy/prod.mjs +24 -0
  65. package/scripts/deploy/test.mjs +26 -0
  66. package/src/@types/ajax.d.ts +5 -0
  67. package/src/@types/api.d.ts +305 -0
  68. package/src/@types/lib.d.ts +26 -0
  69. package/src/@types/page.d.ts +18 -0
  70. package/src/App.vue +36 -0
  71. package/src/apis/ajax.ts +70 -0
  72. package/src/apis/index.ts +20 -0
  73. package/src/apis/modules/action.ts +17 -0
  74. package/src/apis/modules/category.ts +20 -0
  75. package/src/apis/modules/config.ts +19 -0
  76. package/src/apis/modules/file.ts +150 -0
  77. package/src/apis/modules/people.ts +81 -0
  78. package/src/apis/modules/public.ts +49 -0
  79. package/src/apis/modules/super/overview.ts +56 -0
  80. package/src/apis/modules/super/user.ts +62 -0
  81. package/src/apis/modules/task.ts +67 -0
  82. package/src/apis/modules/user.ts +56 -0
  83. package/src/apis/modules/wish.ts +31 -0
  84. package/src/assets/i/EasyPicker.png +0 -0
  85. package/src/assets/logo.png +0 -0
  86. package/src/assets/styles/app.css +69 -0
  87. package/src/components/HomeFooter/index.vue +134 -0
  88. package/src/components/HomeHeader/index.vue +156 -0
  89. package/src/components/InfosForm/index.vue +73 -0
  90. package/src/components/MessageList/index.vue +155 -0
  91. package/src/components/MessagePanel/index.vue +42 -0
  92. package/src/components/Praise/index.vue +102 -0
  93. package/src/components/QrCode.vue +44 -0
  94. package/src/components/linkDialog.vue +104 -0
  95. package/src/components/loginPanel.vue +92 -0
  96. package/src/constants/index.ts +83 -0
  97. package/src/env.d.ts +8 -0
  98. package/src/main.ts +19 -0
  99. package/src/pages/404/index.vue +59 -0
  100. package/src/pages/about/index.vue +152 -0
  101. package/src/pages/callme/index.vue +155 -0
  102. package/src/pages/dashboard/config/index.vue +264 -0
  103. package/src/pages/dashboard/files/index.vue +1152 -0
  104. package/src/pages/dashboard/index.vue +335 -0
  105. package/src/pages/dashboard/manage/config/index.vue +97 -0
  106. package/src/pages/dashboard/manage/index.vue +105 -0
  107. package/src/pages/dashboard/manage/overview/index.vue +488 -0
  108. package/src/pages/dashboard/manage/user/index.vue +679 -0
  109. package/src/pages/dashboard/manage/wish/index.vue +257 -0
  110. package/src/pages/dashboard/tasks/components/CategoryPanel.vue +208 -0
  111. package/src/pages/dashboard/tasks/components/CreateTask.vue +93 -0
  112. package/src/pages/dashboard/tasks/components/TaskInfo.vue +129 -0
  113. package/src/pages/dashboard/tasks/components/infoPanel/ddl.vue +96 -0
  114. package/src/pages/dashboard/tasks/components/infoPanel/file.vue +175 -0
  115. package/src/pages/dashboard/tasks/components/infoPanel/info.vue +477 -0
  116. package/src/pages/dashboard/tasks/components/infoPanel/people.vue +567 -0
  117. package/src/pages/dashboard/tasks/components/infoPanel/template.vue +146 -0
  118. package/src/pages/dashboard/tasks/components/infoPanel/tip.vue +55 -0
  119. package/src/pages/dashboard/tasks/components/infoPanel/tipInfo.vue +196 -0
  120. package/src/pages/dashboard/tasks/index.vue +302 -0
  121. package/src/pages/dashboard/tasks/public.ts +32 -0
  122. package/src/pages/disabled/index.vue +47 -0
  123. package/src/pages/feedback/index.vue +5 -0
  124. package/src/pages/home/index.vue +72 -0
  125. package/src/pages/login/index.vue +270 -0
  126. package/src/pages/register/index.vue +211 -0
  127. package/src/pages/reset/index.vue +186 -0
  128. package/src/pages/task/index.vue +897 -0
  129. package/src/pages/wish/index.vue +152 -0
  130. package/src/router/Interceptor/index.ts +112 -0
  131. package/src/router/index.ts +13 -0
  132. package/src/router/routes/index.ts +197 -0
  133. package/src/shims-vue.d.ts +6 -0
  134. package/src/store/index.ts +17 -0
  135. package/src/store/modules/category.ts +44 -0
  136. package/src/store/modules/public.ts +27 -0
  137. package/src/store/modules/task.ts +55 -0
  138. package/src/store/modules/user.ts +57 -0
  139. package/src/utils/elementUI.ts +8 -0
  140. package/src/utils/networkUtil.ts +236 -0
  141. package/src/utils/other.ts +25 -0
  142. package/src/utils/regExp.ts +11 -0
  143. package/src/utils/stringUtil.ts +242 -0
  144. package/tsconfig.json +24 -0
  145. package/vite.config.ts +55 -0
@@ -0,0 +1,170 @@
1
+ <template>
2
+ <div class="wish-panel" v-show="data.length">
3
+ <div class="tips">
4
+ <div>
5
+ <i class="circle"></i>
6
+ <span>规划中</span>
7
+ </div>
8
+ <div>
9
+ <i class="circle start"></i>
10
+ <span>开发中</span>
11
+ </div>
12
+ <div>
13
+ <i class="circle end"></i>
14
+ <span>已上线</span>
15
+ </div>
16
+ </div>
17
+ <ul>
18
+ <li v-for="d in showData" :key="d.id">
19
+ <hr />
20
+ <div class="wish">
21
+ <div class="content">
22
+ <div class="title">
23
+ <i class="circle" :class="d.status" />
24
+ <span>{{ d.title }}</span>
25
+ </div>
26
+ <div class="des">
27
+ <span>{{ d.des }}</span>
28
+ </div>
29
+ </div>
30
+ <el-button type="primary" @click="praise(d.id, d.alreadyPraise)">
31
+ <el-icon>
32
+ <Flag />
33
+ </el-icon>
34
+ {{ d.count }}票
35
+ </el-button>
36
+ </div>
37
+ </li>
38
+ <!-- 已上线 -->
39
+ <li><hr /></li>
40
+ <details class="details custom-block">
41
+ <summary>💐 已处理完毕的反馈归档 💐</summary>
42
+ <li v-for="d in successData" :key="d.id">
43
+ <hr />
44
+ <div class="wish">
45
+ <div class="content">
46
+ <div class="title">
47
+ <i class="circle" :class="d.status" />
48
+ <span>{{ d.title }}</span>
49
+ </div>
50
+ <div class="des">
51
+ <span>{{ d.des }}</span>
52
+ </div>
53
+ </div>
54
+ <el-button type="primary" @click="praise(d.id, d.alreadyPraise)">
55
+ <el-icon>
56
+ <Flag />
57
+ </el-icon>
58
+ {{ d.count }}票
59
+ </el-button>
60
+ </div>
61
+ </li>
62
+ </details>
63
+ </ul>
64
+ </div>
65
+ </template>
66
+ <script lang="ts" setup>
67
+ import { computed, onMounted, reactive } from 'vue'
68
+ import { ElButton, ElIcon, ElMessage } from 'element-plus'
69
+ import { Flag } from '@element-plus/icons-vue'
70
+ import { WishStatus } from '@/constants'
71
+ import { WishApi } from '../apis'
72
+
73
+ const data = reactive<WishApiTypes.DocsWishItem[]>([])
74
+
75
+ const showData = computed(() =>
76
+ data
77
+ .map((v) => ({
78
+ ...v,
79
+ status: WishStatus[v.status].toLowerCase()
80
+ }))
81
+ .filter((v) => v.status !== 'end')
82
+ )
83
+ const successData = computed(() =>
84
+ data
85
+ .map((v) => ({
86
+ ...v,
87
+ status: WishStatus[v.status].toLowerCase()
88
+ }))
89
+ .filter((v) => v.status === 'end')
90
+ )
91
+
92
+ const praise = (id: string, alreadyPraise: boolean) => {
93
+ if (alreadyPraise) {
94
+ ElMessage.error('你已经投过票了')
95
+ return
96
+ }
97
+ const wish = data.find((v) => v.id === id)!
98
+ wish.alreadyPraise = true
99
+ WishApi.praiseWish(id)
100
+ .then(() => {
101
+ ElMessage.success('投票成功')
102
+ wish.count += 1
103
+ })
104
+ .catch(() => {
105
+ ElMessage.error('你已经投过票了')
106
+ })
107
+ }
108
+
109
+ onMounted(() => {
110
+ WishApi.getDocsWish().then((res) => {
111
+ data.push(...res.data)
112
+ })
113
+ })
114
+ </script>
115
+ <style lang="scss" scoped>
116
+ .wish-panel {
117
+ ul {
118
+ list-style: none;
119
+ }
120
+
121
+ .wish {
122
+ display: flex;
123
+ align-items: center;
124
+ justify-content: space-between;
125
+ min-height: 40px;
126
+
127
+ .content {
128
+ display: flex;
129
+ flex-direction: column;
130
+ max-width: 70%;
131
+
132
+ .title {
133
+ display: flex;
134
+ align-items: center;
135
+ }
136
+
137
+ .des {
138
+ margin-top: 5px;
139
+ font-size: 14px;
140
+ color: #999;
141
+ }
142
+ }
143
+ }
144
+
145
+ .circle {
146
+ display: inline-block;
147
+ background-color: #f5222d;
148
+ min-width: 10px;
149
+ width: 10px;
150
+ height: 10px;
151
+ border-radius: 50%;
152
+ margin-right: 10px;
153
+
154
+ &.end {
155
+ background-color: #52c41a;
156
+ }
157
+
158
+ &.start {
159
+ background-color: #1890ff;
160
+ }
161
+ }
162
+
163
+ .tips {
164
+ display: flex;
165
+ justify-content: space-around;
166
+ flex-wrap: wrap;
167
+ margin-top: 10px;
168
+ }
169
+ }
170
+ </style>
@@ -0,0 +1,72 @@
1
+ <template>
2
+ <div class="callme">
3
+ <!-- 一堆二维码 -->
4
+ <div class="qq-wechat">
5
+ <ul>
6
+ <li v-for="(qrcode, idx) in qrCOdes" :key="idx">
7
+ <div class="title">{{ qrcode.text }}</div>
8
+ <div class="content">
9
+ <img :src="qrcode.img" />
10
+ </div>
11
+ </li>
12
+ </ul>
13
+ </div>
14
+ <div class="description">
15
+ <p>如遇无法解决的账号/使用问题,欢迎小窗联系我</p>
16
+ </div>
17
+ </div>
18
+ </template>
19
+ <script lang="ts" setup>
20
+
21
+ const qrCOdes = [
22
+ {
23
+ text: '微信',
24
+ img: 'https://img.cdn.sugarat.top/mdImg/MTYxOTE1NTk3MTkyNA==619155971925',
25
+ },
26
+ {
27
+ text: '公众号',
28
+ img: 'https://img.cdn.sugarat.top/mdImg/MTYxOTE1NTYwNzQ5MQ==619155607491',
29
+ },
30
+ {
31
+ text: 'QQ',
32
+ img: 'https://img.cdn.sugarat.top/mdImg/MTYxOTE1NjQ5ODczOQ==619156498739',
33
+ },
34
+ {
35
+ text: '交流群',
36
+ img: 'https://img.cdn.sugarat.top/mdImg/MTY0Nzc2MTE2MTE2NA==ep-group.png',
37
+ },
38
+ ]
39
+
40
+ </script>
41
+ <style lang="scss" scoped>
42
+
43
+ .qq-wechat ul {
44
+ list-style: none;
45
+ display: flex;
46
+ flex-wrap: wrap;
47
+ margin-bottom: 10px;
48
+ align-items: center;
49
+ justify-content: center;
50
+ li {
51
+ text-align: center;
52
+
53
+ .title {
54
+ font-weight: 600;
55
+ }
56
+
57
+ .content {
58
+ padding: 0.5em;
59
+ }
60
+
61
+ img {
62
+ width: 150px;
63
+ }
64
+ }
65
+ }
66
+
67
+ .description {
68
+ font-size: 15px;
69
+ margin-bottom: 10px;
70
+ text-align: center;
71
+ }
72
+ </style>
@@ -0,0 +1,42 @@
1
+ import { defineConfig } from 'vite'
2
+ import Components from 'unplugin-vue-components/vite'
3
+ import AutoImport from 'unplugin-auto-import/vite'
4
+ import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
5
+ import path from 'path'
6
+
7
+ // https://vitejs.dev/config/
8
+ export default defineConfig({
9
+ plugins: [
10
+ Components({
11
+ include: [/\.vue/, /\.md/],
12
+ dts: true,
13
+ }),
14
+ AutoImport({
15
+ resolvers: [ElementPlusResolver()],
16
+ }),
17
+ Components({
18
+ resolvers: [ElementPlusResolver()],
19
+ }),
20
+ ],
21
+ optimizeDeps: {
22
+ include: [
23
+ 'vue',
24
+ 'element-plus',
25
+ ],
26
+ },
27
+ server: {
28
+ proxy: {
29
+ '/api/': {
30
+ target: 'http://localhost:3000',
31
+ changeOrigin: true,
32
+ rewrite: (p) => p.replace(/^\/api/, ''),
33
+ },
34
+ },
35
+ },
36
+ resolve: {
37
+ alias: {
38
+ '@': path.resolve(__dirname, './../src'),
39
+ '@components': path.resolve(__dirname, './../src/components'),
40
+ },
41
+ },
42
+ })
package/index.html ADDED
@@ -0,0 +1,127 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8" />
6
+ <link rel="icon" href="/logo.png" />
7
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
+ <meta name="description"
10
+ content="EasyPicker-轻取,方便的在线文件收取助手,文件收取, 轻取, 在线文件收取, EasyPicker, 文件搜集, 文件收取, 文档收取, 在线文档收取,EasyPicker简洁实用且方便的在线文件收取Web应用 " />
11
+ <meta name="keywords" content="文件收取, 轻取, 在线文件收取, EasyPicker, 文件搜集, 文件收取, 文档收取, 在线文档收取" />
12
+ <title>EasyPicker-轻取</title>
13
+ <link rel="dns-prefetch" href="//img.cdn.sugarat.top">
14
+ <link rel="dns-prefetch" href="//sdk.51.la">
15
+ <link rel="dns-prefetch" href="//collect-v6.51.la">
16
+ <link rel="dns-prefetch" href="//frontjs-static.pgyer.com">
17
+ <!-- 垫片服务 -->
18
+ <!-- <script
19
+ src="https://polyfill.alicdn.com/polyfill.min.js?features=es2019%2Ces2018%2Ces2017%2Ces5%2Ces6%2Ces7%2Cdefault"></script> -->
20
+ <!-- 七牛云 -->
21
+ <script defer src="https://img.cdn.sugarat.top/qiniu-js/3.4.0/qiniu.min.js"></script>
22
+ <!-- 二维码 -->
23
+ <script defer src="https://img.cdn.sugarat.top/arale-qrcode/3.0.5/index.js"></script>
24
+ <!-- frontjs监控 -->
25
+ <script type="text/javascript">
26
+ (function (w) {
27
+ w.frontjsConfig = {
28
+ token:
29
+ 'a2fb9a863532b2da4c2052404a3a9684',
30
+ behaviour: 15,
31
+ captureConsoleLog: true,
32
+ trustVendor: true,
33
+ useHistory: true,
34
+ FPSThreshold: 10,
35
+ };
36
+ w.frontjsTmpData = {
37
+ r: [],
38
+ e: [],
39
+ l: [],
40
+ };
41
+ w.frontjsTmpCollector =
42
+ function (ev) {
43
+ (ev.message
44
+ ? window.frontjsTmpData.e
45
+ : window.frontjsTmpData.r
46
+ ).push([
47
+ new Date().getTime(),
48
+ ev,
49
+ ]);
50
+ };
51
+ w.FrontJS = {
52
+ addEventListener: function (
53
+ t,
54
+ f
55
+ ) {
56
+ w.frontjsTmpData.l.push([
57
+ t,
58
+ f,
59
+ ]);
60
+ return f;
61
+ },
62
+ removeEventListener:
63
+ function (t, f) {
64
+ for (
65
+ var i = 0;
66
+ i <
67
+ w.frontjsTmpData.l
68
+ .length;
69
+ i++
70
+ ) {
71
+ t ===
72
+ w.frontjsTmpData.l[
73
+ i
74
+ ][0] &&
75
+ f ===
76
+ w.frontjsTmpData.l[
77
+ i
78
+ ][1] &&
79
+ w.frontjsTmpData.l.splice(
80
+ i,
81
+ 1
82
+ );
83
+ }
84
+ return f;
85
+ },
86
+ };
87
+ w.document.addEventListener(
88
+ 'error',
89
+ w.frontjsTmpCollector,
90
+ true
91
+ );
92
+ w.addEventListener(
93
+ 'error',
94
+ w.frontjsTmpCollector,
95
+ true
96
+ );
97
+ w.addEventListener(
98
+ 'load',
99
+ function () {
100
+ var n =
101
+ w.document.createElement(
102
+ 'script'
103
+ );
104
+ n.src =
105
+ 'https://frontjs-static.pgyer.com/dist/current/frontjs.web.min.js';
106
+ w.document.body.appendChild(
107
+ n
108
+ );
109
+ },
110
+ true
111
+ );
112
+ })(window);
113
+ </script>
114
+ <!-- 统计分析 -->
115
+ <script>
116
+ !function (p) { "use strict"; !function (t) { var s = window, e = document, i = p, c = "".concat("https:" === e.location.protocol ? "https://" : "http://", "sdk.51.la/js-sdk-pro.min.js"), n = e.createElement("script"), r = e.getElementsByTagName("script")[0]; n.type = "text/javascript", n.setAttribute("charset", "UTF-8"), n.async = !0, n.src = c, n.id = "LA_COLLECT", i.d = n; var o = function () { s.LA.ids.push(i) }; s.LA ? s.LA.ids && o() : (s.LA = p, s.LA.ids = [], o()), r.parentNode.insertBefore(n, r) }() }({ id: "JecPaSrYsEHrPGjw", ck: "JecPaSrYsEHrPGjw", hashMode: true });
117
+ </script>
118
+ <!-- xlsx支持 -->
119
+ <script src="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/xlsx/0.18.2/xlsx.full.min.js"></script>
120
+ </head>
121
+
122
+ <body>
123
+ <div id="app"></div>
124
+ <script defer type="module" src="/src/main.ts"></script>
125
+ </body>
126
+
127
+ </html>
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@sugarat/easypicker2-client",
3
+ "version": "2.4.1",
4
+ "scripts": {
5
+ "dev": "vite",
6
+ "dev:test": "VITE_APP_AXIOS_BASE_URL=/api-test/ vite --mode test",
7
+ "build": "vite build",
8
+ "serve": "vite preview",
9
+ "lint": "eslint src --fix",
10
+ "docs:dev": "vitepress dev docs",
11
+ "docs:build": "vitepress build docs",
12
+ "docs:serve": "vitepress serve docs",
13
+ "docs:deploy": "zx scripts/deploy/docs.mjs",
14
+ "deploy:prod": "zx scripts/deploy/prod.mjs",
15
+ "deploy:test": "zx scripts/deploy/test.mjs"
16
+ },
17
+ "dependencies": {
18
+ "@element-plus/icons-vue": "^1.1.4",
19
+ "@sugarat/theme": "^0.1.5",
20
+ "axios": "^0.27.2",
21
+ "clipboard-copy": "^4.0.1",
22
+ "element-plus": "^2.2.13",
23
+ "spark-md5": "^3.0.2",
24
+ "vitepress": "^1.0.0-alpha.46",
25
+ "vue": "^3.2.37",
26
+ "vue-json-viewer": "^3.0.4",
27
+ "vue-router": "^4.1.2",
28
+ "vuex": "^4.0.2"
29
+ },
30
+ "devDependencies": {
31
+ "@types/node": "^16.11.45",
32
+ "@typescript-eslint/eslint-plugin": "^4.33.0",
33
+ "@typescript-eslint/parser": "^4.33.0",
34
+ "@vitejs/plugin-legacy": "^2.0.0",
35
+ "@vitejs/plugin-vue": "^3.0.1",
36
+ "eslint": "^7.32.0",
37
+ "eslint-config-airbnb-base": "^14.2.1",
38
+ "eslint-config-prettier": "^8.5.0",
39
+ "eslint-plugin-import": "^2.26.0",
40
+ "eslint-plugin-prettier": "^4.2.1",
41
+ "eslint-plugin-todo-ddl": "^1.1.1",
42
+ "eslint-plugin-vue": "^7.20.0",
43
+ "prettier": "^2.7.1",
44
+ "sass": "^1.54.0",
45
+ "terser": "^5.14.2",
46
+ "typescript": "^4.7.4",
47
+ "unplugin-auto-import": "^0.6.9",
48
+ "unplugin-element-plus": "^0.4.1",
49
+ "unplugin-vue-components": "^0.17.21",
50
+ "vite": "^3.0.9"
51
+ }
52
+ }
Binary file
Binary file
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env zx
2
+
3
+ // user config
4
+ const originName = 'docs.ep'
5
+
6
+ // not care
7
+ const compressPkgName = `${originName}.tar.gz`
8
+ const user = 'root'
9
+ const origin = 'sugarat.top'
10
+ const fullOrigin = `${originName}.${origin}`
11
+ const baseServerDir = '/www/wwwroot'
12
+ const destDir = ''
13
+
14
+ await $`pnpm docs:build`
15
+
16
+ await $`echo ==🔧 压缩dist ==`
17
+ await $`cd docs/.vitepress && tar -zvcf ${compressPkgName} dist && rm -rf dist && mv ${compressPkgName} ./../../`
18
+
19
+ await $`echo ==🚀 上传到服务器 ==`
20
+ await $`scp ${compressPkgName} ${user}@${origin}:./`
21
+ await $`rm -rf ${compressPkgName}`
22
+
23
+ await $`echo ==✅ 部署代码 ==`
24
+ await $`ssh -p22 ${user}@${origin} "tar -xf ${compressPkgName} -C ${baseServerDir}/${fullOrigin}/${destDir}"`
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env zx
2
+
3
+ // user config
4
+ const originName = 'ep'
5
+
6
+ // not care
7
+ const compressPkgName = `${originName}.tar.gz`
8
+ const user = 'root'
9
+ const origin = 'sugarat.top'
10
+ const fullOrigin = `${originName}.${origin}`
11
+ const baseServerDir = '/www/wwwroot'
12
+ const destDir = ''
13
+
14
+ await $`pnpm build`
15
+
16
+ await $`echo ==🔧 压缩dist ==`
17
+ await $`tar -zvcf ${compressPkgName} dist && rm -rf dist`
18
+
19
+ await $`echo ==🚀 上传到服务器 ==`
20
+ await $`scp ${compressPkgName} ${user}@${origin}:./`
21
+ await $`rm -rf ${compressPkgName}`
22
+
23
+ await $`echo ==✅ 部署代码 ==`
24
+ await $`ssh -p22 ${user}@${origin} "tar -xf ${compressPkgName} -C ${baseServerDir}/${fullOrigin}/${destDir}"`
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env zx
2
+ /* eslint-disable no-await-in-loop */
3
+
4
+ // user config
5
+ const originName = ['ep.test', 'ep.dev']
6
+
7
+ // not care
8
+ const compressPkgName = `${originName}.tar.gz`
9
+ const user = 'root'
10
+ const origin = 'sugarat.top'
11
+ const baseServerDir = '/www/wwwroot'
12
+ const destDir = ''
13
+
14
+ await $`pnpm build`
15
+
16
+ await $`echo ==🔧 压缩dist ==`
17
+ await $`tar -zvcf ${compressPkgName} dist && rm -rf dist`
18
+
19
+ await $`echo ==🚀 上传到服务器 ==`
20
+ await $`scp ${compressPkgName} ${user}@${origin}:./`
21
+ await $`rm -rf ${compressPkgName}`
22
+
23
+ await $`echo ==✅ 部署代码 ==`
24
+ for (const name of originName) {
25
+ await $`ssh -p22 ${user}@${origin} "tar -xf ${compressPkgName} -C ${baseServerDir}/${name}.${origin}/${destDir}"`
26
+ }
@@ -0,0 +1,5 @@
1
+ interface BaseResponse<T = any> {
2
+ code: number
3
+ errMsg: string
4
+ data: T
5
+ }