create-young-proj 0.10.2 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. package/dist/index.mjs +9 -9
  2. package/package.json +1 -1
  3. package/template-nuxt-admin/README.md +42 -1
  4. package/template-nuxt-admin/components/layout/Main.vue +2 -2
  5. package/template-nuxt-admin/components/layout/NavBar.vue +11 -2
  6. package/template-nuxt-admin/components/layout/SideBar.vue +6 -2
  7. package/template-nuxt-admin/components/layout/SubMenu.vue +9 -2
  8. package/template-nuxt-admin/components/layout/TabsBar.vue +4 -5
  9. package/template-nuxt-admin/composables/api.ts +17 -3
  10. package/template-nuxt-admin/composables/nav.ts +20 -3
  11. package/template-nuxt-admin/composables/tags.ts +29 -1
  12. package/template-nuxt-admin/middleware/auth.global.ts +16 -4
  13. package/template-nuxt-admin/nuxt.config.ts +5 -1
  14. package/template-nuxt-admin/package.json +5 -5
  15. package/template-nuxt-admin/pages/home/[id].vue +2 -2
  16. package/template-nuxt-admin/pages/index.vue +2 -7
  17. package/template-nuxt-admin/pages/login.vue +2 -2
  18. package/template-nuxt-admin/pages/system/menuList.vue +0 -1
  19. package/template-nuxt-admin/public/bg.webp +0 -0
  20. package/template-nuxt-admin/public/favicon.svg +2 -0
  21. package/template-nuxt-admin/public/logo.svg +2 -0
  22. package/template-nuxt-admin/server/plugins/env.ts +3 -4
  23. package/template-nuxt-admin/utils/tool.ts +17 -1
  24. package/template-nuxt-admin/yarn.lock +706 -854
  25. package/template-uni-app/auto-imports.d.ts +9 -6
  26. package/template-uni-app/custom-plugins/index.ts +1 -2
  27. package/template-uni-app/dist/dev/mp-weixin/apis/index.js +5 -6
  28. package/template-uni-app/dist/dev/mp-weixin/apis/requests/get.js +2 -2
  29. package/template-uni-app/dist/dev/mp-weixin/apis/requests/post.js +4 -4
  30. package/template-uni-app/dist/dev/mp-weixin/app.js +4 -5
  31. package/template-uni-app/dist/dev/mp-weixin/common/vendor.js +1448 -2471
  32. package/template-uni-app/dist/dev/mp-weixin/components/young-navbar/young-navbar.js +7 -8
  33. package/template-uni-app/dist/dev/mp-weixin/components/young-navbar/young-navbar.wxml +1 -1
  34. package/template-uni-app/dist/dev/mp-weixin/components/young-tabbar/young-tabbar.js +7 -8
  35. package/template-uni-app/dist/dev/mp-weixin/components/young-tabbar/young-tabbar.wxml +1 -1
  36. package/template-uni-app/dist/dev/mp-weixin/layouts/default.js +1 -2
  37. package/template-uni-app/dist/dev/mp-weixin/layouts/tabbar.wxml +1 -1
  38. package/template-uni-app/dist/dev/mp-weixin/pages/demo/index.js +4 -5
  39. package/template-uni-app/dist/dev/mp-weixin/pages/demo/index.wxml +1 -1
  40. package/template-uni-app/dist/dev/mp-weixin/pages/index.js +4 -5
  41. package/template-uni-app/dist/dev/mp-weixin/pages/index.wxml +1 -1
  42. package/template-uni-app/dist/dev/mp-weixin/pages/my.wxml +1 -1
  43. package/template-uni-app/dist/dev/mp-weixin/project.config.json +1 -2
  44. package/template-uni-app/dist/dev/mp-weixin/project.private.config.json +6 -0
  45. package/template-uni-app/dist/dev/mp-weixin/store/local/index.js +3 -1
  46. package/template-uni-app/dist/dev/mp-weixin/utils/modal.js +10 -14
  47. package/template-uni-app/dist/dev/mp-weixin/utils/route.js +4 -6
  48. package/template-uni-app/dist/dev/mp-weixin/utils/system.js +4 -4
  49. package/template-uni-app/package.json +2 -3
  50. package/template-uni-app/pnpm-lock.yaml +154 -105
  51. package/template-uni-app/src/apis/index.ts +2 -2
  52. package/template-uni-app/src/apis/requests/get.ts +5 -5
  53. package/template-uni-app/src/apis/requests/post.ts +5 -5
  54. package/template-uni-app/vite.config.ts +2 -3
  55. package/template-nuxt-admin/public/favicon.ico +0 -0
  56. package/template-uni-app/custom-plugins/polyfill.ts +0 -32
  57. package/template-uni-app/dist/dev/mp-weixin/apis/lib/index.js +0 -90
  58. package/template-uni-app/src/apis/lib/index.ts +0 -235
  59. package/template-vue-admin/.vscode/extensions.json +0 -10
  60. package/template-vue-admin/.vscode/list-add.code-snippets +0 -108
  61. package/template-vue-admin/.vscode/list-export.code-snippets +0 -72
  62. package/template-vue-admin/.vscode/list.code-snippets +0 -61
  63. package/template-vue-admin/.vscode/settings.json +0 -7
  64. package/template-vue-admin/Dockerfile +0 -42
  65. package/template-vue-admin/README.md +0 -75
  66. package/template-vue-admin/_env +0 -8
  67. package/template-vue-admin/_gitignore +0 -30
  68. package/template-vue-admin/boot.mjs +0 -16
  69. package/template-vue-admin/build/custom-plugin.ts +0 -57
  70. package/template-vue-admin/build/index.ts +0 -7
  71. package/template-vue-admin/build/plugins.ts +0 -59
  72. package/template-vue-admin/config/.devrc +0 -2
  73. package/template-vue-admin/config/.onlinerc +0 -2
  74. package/template-vue-admin/config/.testrc +0 -2
  75. package/template-vue-admin/index.html +0 -21
  76. package/template-vue-admin/nitro.config.ts +0 -19
  77. package/template-vue-admin/package.json +0 -51
  78. package/template-vue-admin/plugins/init.ts +0 -31
  79. package/template-vue-admin/public/vite.svg +0 -1
  80. package/template-vue-admin/rome.json +0 -26
  81. package/template-vue-admin/routes/api/[...all].ts +0 -49
  82. package/template-vue-admin/routes/get/env.ts +0 -18
  83. package/template-vue-admin/src/App.vue +0 -14
  84. package/template-vue-admin/src/apis/delete.ts +0 -36
  85. package/template-vue-admin/src/apis/get.ts +0 -83
  86. package/template-vue-admin/src/apis/index.ts +0 -10
  87. package/template-vue-admin/src/apis/patch.ts +0 -78
  88. package/template-vue-admin/src/apis/post.ts +0 -76
  89. package/template-vue-admin/src/assets/img/login_background.jpg +0 -0
  90. package/template-vue-admin/src/auto-components.d.ts +0 -38
  91. package/template-vue-admin/src/auto-imports.d.ts +0 -302
  92. package/template-vue-admin/src/layouts/blank.vue +0 -9
  93. package/template-vue-admin/src/layouts/default/components/Link.vue +0 -23
  94. package/template-vue-admin/src/layouts/default/components/Logo.vue +0 -20
  95. package/template-vue-admin/src/layouts/default/components/Menu.vue +0 -54
  96. package/template-vue-admin/src/layouts/default/components/NavSearch.vue +0 -52
  97. package/template-vue-admin/src/layouts/default/components/ScrollPane.vue +0 -79
  98. package/template-vue-admin/src/layouts/default/components/TagsView.vue +0 -137
  99. package/template-vue-admin/src/layouts/default/components/TopMenu.vue +0 -21
  100. package/template-vue-admin/src/layouts/default/components/UserCenter.vue +0 -50
  101. package/template-vue-admin/src/layouts/default/index.vue +0 -95
  102. package/template-vue-admin/src/main.ts +0 -46
  103. package/template-vue-admin/src/modules/1-router.ts +0 -48
  104. package/template-vue-admin/src/modules/2-pinia.ts +0 -10
  105. package/template-vue-admin/src/modules/3-net.ts +0 -79
  106. package/template-vue-admin/src/modules/4-auth.ts +0 -124
  107. package/template-vue-admin/src/modules/5-checkupdate.ts +0 -38
  108. package/template-vue-admin/src/shims.d.ts +0 -12
  109. package/template-vue-admin/src/stores/index.ts +0 -9
  110. package/template-vue-admin/src/stores/local/index.ts +0 -31
  111. package/template-vue-admin/src/stores/session/index.ts +0 -63
  112. package/template-vue-admin/src/stores/tags.ts +0 -109
  113. package/template-vue-admin/src/typings/global.d.ts +0 -70
  114. package/template-vue-admin/src/typings/index.ts +0 -13
  115. package/template-vue-admin/src/typings/system.d.ts +0 -46
  116. package/template-vue-admin/src/views/403.vue +0 -33
  117. package/template-vue-admin/src/views/[...all_404].vue +0 -557
  118. package/template-vue-admin/src/views/base/login.vue +0 -194
  119. package/template-vue-admin/src/views/dashboard/[name].vue +0 -28
  120. package/template-vue-admin/src/views/index.vue +0 -25
  121. package/template-vue-admin/src/views/system/api.vue +0 -160
  122. package/template-vue-admin/src/views/system/hooks/useRole.ts +0 -286
  123. package/template-vue-admin/src/views/system/menuList.vue +0 -194
  124. package/template-vue-admin/src/views/system/role.vue +0 -131
  125. package/template-vue-admin/src/views/system/user.vue +0 -192
  126. package/template-vue-admin/src/vite-env.d.ts +0 -52
  127. package/template-vue-admin/tsconfig.json +0 -21
  128. package/template-vue-admin/tsconfig.node.json +0 -9
  129. package/template-vue-admin/unocss.config.ts +0 -47
  130. package/template-vue-admin/vite.config.ts +0 -32
@@ -11,12 +11,12 @@ declare global {
11
11
  const SubscribeMessage: typeof import('./src/config/enum')['SubscribeMessage']
12
12
  const TabbarArr: typeof import('./src/config/enum')['TabbarArr']
13
13
  const UIEvents: typeof import('./src/config/enum')['UIEvents']
14
- const UsefulContentTypes: typeof import('./src/apis/lib/index')['UsefulContentTypes']
15
14
  const YoungStorageKeys: typeof import('./src/config/enum')['YoungStorageKeys']
16
15
  const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']
17
16
  const apis: typeof import('./src/apis/index')['apis']
18
17
  const authLocation: typeof import('./src/utils/auth')['authLocation']
19
18
  const back: typeof import('./src/utils/route')['back']
19
+ const checkFingerPrint: typeof import('./src/utils/auth')['checkFingerPrint']
20
20
  const computed: typeof import('vue')['computed']
21
21
  const createApp: typeof import('vue')['createApp']
22
22
  const createPinia: typeof import('pinia')['createPinia']
@@ -25,8 +25,10 @@ declare global {
25
25
  const defineComponent: typeof import('vue')['defineComponent']
26
26
  const defineStore: typeof import('pinia')['defineStore']
27
27
  const effectScope: typeof import('vue')['effectScope']
28
+ const fingerPrintAuth: typeof import('./src/utils/auth')['fingerPrintAuth']
28
29
  const geocoderLocation: typeof import('./src/utils/map')['geocoderLocation']
29
30
  const getActivePinia: typeof import('pinia')['getActivePinia']
31
+ const getAuthInfo: typeof import('./src/utils/auth')['getAuthInfo']
30
32
  const getCurrentInstance: typeof import('vue')['getCurrentInstance']
31
33
  const getCurrentScope: typeof import('vue')['getCurrentScope']
32
34
  const getLocationInfo: typeof import('./src/store/local/index')['getLocationInfo']
@@ -125,7 +127,6 @@ declare global {
125
127
  const useCssModule: typeof import('vue')['useCssModule']
126
128
  const useCssVars: typeof import('vue')['useCssVars']
127
129
  const useGet: typeof import('./src/apis/requests/get')['useGet']
128
- const useHttp: typeof import('./src/apis/lib/index')['useHttp']
129
130
  const useHttpLoading: typeof import('./src/store/system')['useHttpLoading']
130
131
  const usePost: typeof import('./src/apis/requests/post')['usePost']
131
132
  const useSlots: typeof import('vue')['useSlots']
@@ -150,12 +151,12 @@ declare module 'vue' {
150
151
  readonly SubscribeMessage: UnwrapRef<typeof import('./src/config/enum')['SubscribeMessage']>
151
152
  readonly TabbarArr: UnwrapRef<typeof import('./src/config/enum')['TabbarArr']>
152
153
  readonly UIEvents: UnwrapRef<typeof import('./src/config/enum')['UIEvents']>
153
- readonly UsefulContentTypes: UnwrapRef<typeof import('./src/apis/lib/index')['UsefulContentTypes']>
154
154
  readonly YoungStorageKeys: UnwrapRef<typeof import('./src/config/enum')['YoungStorageKeys']>
155
155
  readonly acceptHMRUpdate: UnwrapRef<typeof import('pinia')['acceptHMRUpdate']>
156
156
  readonly apis: UnwrapRef<typeof import('./src/apis/index')['apis']>
157
157
  readonly authLocation: UnwrapRef<typeof import('./src/utils/auth')['authLocation']>
158
158
  readonly back: UnwrapRef<typeof import('./src/utils/route')['back']>
159
+ readonly checkFingerPrint: UnwrapRef<typeof import('./src/utils/auth')['checkFingerPrint']>
159
160
  readonly computed: UnwrapRef<typeof import('vue')['computed']>
160
161
  readonly createApp: UnwrapRef<typeof import('vue')['createApp']>
161
162
  readonly createPinia: UnwrapRef<typeof import('pinia')['createPinia']>
@@ -164,8 +165,10 @@ declare module 'vue' {
164
165
  readonly defineComponent: UnwrapRef<typeof import('vue')['defineComponent']>
165
166
  readonly defineStore: UnwrapRef<typeof import('pinia')['defineStore']>
166
167
  readonly effectScope: UnwrapRef<typeof import('vue')['effectScope']>
168
+ readonly fingerPrintAuth: UnwrapRef<typeof import('./src/utils/auth')['fingerPrintAuth']>
167
169
  readonly geocoderLocation: UnwrapRef<typeof import('./src/utils/map')['geocoderLocation']>
168
170
  readonly getActivePinia: UnwrapRef<typeof import('pinia')['getActivePinia']>
171
+ readonly getAuthInfo: UnwrapRef<typeof import('./src/utils/auth')['getAuthInfo']>
169
172
  readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']>
170
173
  readonly getCurrentScope: UnwrapRef<typeof import('vue')['getCurrentScope']>
171
174
  readonly getLocationInfo: UnwrapRef<typeof import('./src/store/local/index')['getLocationInfo']>
@@ -264,7 +267,6 @@ declare module 'vue' {
264
267
  readonly useCssModule: UnwrapRef<typeof import('vue')['useCssModule']>
265
268
  readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']>
266
269
  readonly useGet: UnwrapRef<typeof import('./src/apis/requests/get')['useGet']>
267
- readonly useHttp: UnwrapRef<typeof import('./src/apis/lib/index')['useHttp']>
268
270
  readonly useHttpLoading: UnwrapRef<typeof import('./src/store/system')['useHttpLoading']>
269
271
  readonly usePost: UnwrapRef<typeof import('./src/apis/requests/post')['usePost']>
270
272
  readonly useSlots: UnwrapRef<typeof import('vue')['useSlots']>
@@ -283,12 +285,12 @@ declare module '@vue/runtime-core' {
283
285
  readonly SubscribeMessage: UnwrapRef<typeof import('./src/config/enum')['SubscribeMessage']>
284
286
  readonly TabbarArr: UnwrapRef<typeof import('./src/config/enum')['TabbarArr']>
285
287
  readonly UIEvents: UnwrapRef<typeof import('./src/config/enum')['UIEvents']>
286
- readonly UsefulContentTypes: UnwrapRef<typeof import('./src/apis/lib/index')['UsefulContentTypes']>
287
288
  readonly YoungStorageKeys: UnwrapRef<typeof import('./src/config/enum')['YoungStorageKeys']>
288
289
  readonly acceptHMRUpdate: UnwrapRef<typeof import('pinia')['acceptHMRUpdate']>
289
290
  readonly apis: UnwrapRef<typeof import('./src/apis/index')['apis']>
290
291
  readonly authLocation: UnwrapRef<typeof import('./src/utils/auth')['authLocation']>
291
292
  readonly back: UnwrapRef<typeof import('./src/utils/route')['back']>
293
+ readonly checkFingerPrint: UnwrapRef<typeof import('./src/utils/auth')['checkFingerPrint']>
292
294
  readonly computed: UnwrapRef<typeof import('vue')['computed']>
293
295
  readonly createApp: UnwrapRef<typeof import('vue')['createApp']>
294
296
  readonly createPinia: UnwrapRef<typeof import('pinia')['createPinia']>
@@ -297,8 +299,10 @@ declare module '@vue/runtime-core' {
297
299
  readonly defineComponent: UnwrapRef<typeof import('vue')['defineComponent']>
298
300
  readonly defineStore: UnwrapRef<typeof import('pinia')['defineStore']>
299
301
  readonly effectScope: UnwrapRef<typeof import('vue')['effectScope']>
302
+ readonly fingerPrintAuth: UnwrapRef<typeof import('./src/utils/auth')['fingerPrintAuth']>
300
303
  readonly geocoderLocation: UnwrapRef<typeof import('./src/utils/map')['geocoderLocation']>
301
304
  readonly getActivePinia: UnwrapRef<typeof import('pinia')['getActivePinia']>
305
+ readonly getAuthInfo: UnwrapRef<typeof import('./src/utils/auth')['getAuthInfo']>
302
306
  readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']>
303
307
  readonly getCurrentScope: UnwrapRef<typeof import('vue')['getCurrentScope']>
304
308
  readonly getLocationInfo: UnwrapRef<typeof import('./src/store/local/index')['getLocationInfo']>
@@ -397,7 +401,6 @@ declare module '@vue/runtime-core' {
397
401
  readonly useCssModule: UnwrapRef<typeof import('vue')['useCssModule']>
398
402
  readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']>
399
403
  readonly useGet: UnwrapRef<typeof import('./src/apis/requests/get')['useGet']>
400
- readonly useHttp: UnwrapRef<typeof import('./src/apis/lib/index')['useHttp']>
401
404
  readonly useHttpLoading: UnwrapRef<typeof import('./src/store/system')['useHttpLoading']>
402
405
  readonly usePost: UnwrapRef<typeof import('./src/apis/requests/post')['usePost']>
403
406
  readonly useSlots: UnwrapRef<typeof import('vue')['useSlots']>
@@ -1,8 +1,7 @@
1
1
  /*
2
2
  * @Author: zhangyang
3
3
  * @Date: 2023-07-18 15:59:13
4
- * @LastEditTime: 2023-07-19 14:40:50
4
+ * @LastEditTime: 2023-09-19 10:18:19
5
5
  * @Description:
6
6
  */
7
- export * from './polyfill'
8
7
  export * from './multiconf'
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const apis_lib_index = require("./lib/index.js");
2
+ const common_vendor = require("../common/vendor.js");
3
3
  const apis_requests_get = require("./requests/get.js");
4
4
  const apis_requests_post = require("./requests/post.js");
5
5
  const utils_modal = require("../utils/modal.js");
@@ -8,11 +8,10 @@ const EnvConfig = {
8
8
  trial: "https://test.req.cn",
9
9
  release: "https://online.req.cn"
10
10
  };
11
- const getReqUrl = () => (
12
- // @ts-ignore
13
- {}.VITE_API_BASE_URL || EnvConfig[__wxConfig.envVersion]
14
- );
15
- const http = apis_lib_index.useHttp({
11
+ function getReqUrl() {
12
+ return {}.VITE_API_BASE_URL || EnvConfig[__wxConfig.envVersion];
13
+ }
14
+ const http = common_vendor.ie({
16
15
  baseURL: getReqUrl(),
17
16
  loading: {
18
17
  start: () => {
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
- const useGet = (http) => {
2
+ function useGet(http) {
3
3
  const FreeReq = (args) => http.freeReq({ method: "GET", ...args });
4
4
  return {
5
5
  getByUserName: (name) => FreeReq({
6
6
  url: `/users/${name}`
7
7
  })
8
8
  };
9
- };
9
+ }
10
10
  exports.useGet = useGet;
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
- const usePost = (http) => {
3
- const AuthReq = (args) => http.authReq({ method: "POST", ...args });
2
+ function usePost(http) {
3
+ const AuthReq = (args) => http.authReq({ method: "GET", ...args });
4
4
  return {
5
5
  createRepo: async (name) => {
6
6
  await AuthReq({
7
- url: `/user/repos`,
7
+ url: "/user/repos",
8
8
  params: {
9
9
  name
10
10
  }
11
11
  });
12
12
  }
13
13
  };
14
- };
14
+ }
15
15
  exports.usePost = usePost;
@@ -44,17 +44,16 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
44
44
  console.log("环境变量:", { "VITE_USER_NODE_ENV": "development", "VITE_ROOT_DIR": "/mnt/f/young/young-project/create-young-proj/template-uni-app", "BASE_URL": "/", "MODE": "development", "DEV": true, "PROD": false });
45
45
  const { pagesInfo } = common_vendor.storeToRefs(store_system.useSystemInfo());
46
46
  pagesInfo.value = pages;
47
- if (!store_local_index.getUuid()) {
47
+ if (!store_local_index.getUuid())
48
48
  store_local_index.setUuid();
49
- }
50
49
  await utils_system.getSystemInfo();
51
50
  });
52
51
  common_vendor.onShow(async () => {
53
52
  const updateManager = common_vendor.index.getUpdateManager();
54
- updateManager.onCheckForUpdate(function(res) {
53
+ updateManager.onCheckForUpdate((res) => {
55
54
  console.log(res.hasUpdate, "onCheckForUpdate hasUpdate");
56
55
  });
57
- updateManager.onUpdateReady(function() {
56
+ updateManager.onUpdateReady(() => {
58
57
  utils_modal.showModal({
59
58
  title: "更新提示",
60
59
  content: "新版本已经准备好,是否重启应用?",
@@ -65,7 +64,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
65
64
  }
66
65
  });
67
66
  });
68
- updateManager.onUpdateFailed(function() {
67
+ updateManager.onUpdateFailed(() => {
69
68
  utils_modal.showModal({ title: "更新提示", content: "新版本下载失败", showCancel: false });
70
69
  });
71
70
  console.log("App Show");