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
@@ -36,13 +36,12 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
36
36
  }
37
37
  return res;
38
38
  });
39
- const handleLeftClick = () => {
40
- if (pagesCount.value === 1) {
39
+ function handleLeftClick() {
40
+ if (pagesCount.value === 1)
41
41
  utils_route.relaunch(config_enum.Pages.首页);
42
- } else {
42
+ else
43
43
  utils_route.back();
44
- }
45
- };
44
+ }
46
45
  return (_ctx, _cache) => {
47
46
  return common_vendor.e({
48
47
  a: __props.ishow
@@ -66,14 +65,14 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
66
65
  }, {
67
66
  k: __props.custom ? 1 : "",
68
67
  l: __props.fixed || __props.placeholder ? 1 : "",
69
- m: common_vendor.unref(navHeight).customBarH + "px",
70
- n: common_vendor.unref(navHeight).statusBarH + "px",
68
+ m: `${common_vendor.unref(navHeight).customBarH}px`,
69
+ n: `${common_vendor.unref(navHeight).statusBarH}px`,
71
70
  o: __props.bgcolor,
72
71
  p: __props.color,
73
72
  q: __props.zIndex,
74
73
  r: __props.placeholder
75
74
  }, __props.placeholder ? {
76
- s: common_vendor.unref(navHeight).customBarH + "px"
75
+ s: `${common_vendor.unref(navHeight).customBarH}px`
77
76
  } : {}) : {});
78
77
  };
79
78
  }
@@ -1 +1 @@
1
- <view wx:if="{{a}}" class="data-v-1047ead9"><view class="y__navbar data-v-1047ead9"><view class="{{['y__navbar-wrap', 'flex', 'items-center', 'relative', 'box-border', 'left-0', 'data-v-1047ead9', k && 'custom', l && 'fixed']}}" style="{{'height:' + m + ';' + ('padding-top:' + n) + ';' + ('background:' + o) + ';' + ('color:' + p) + ';' + ('z-index:' + q)}}"><view wx:if="{{b}}" class="action navbar-action__left data-v-1047ead9" bindtap="{{g}}"><block wx:if="{{c}}"><slot name="back"/></block><block wx:else class="v-else"><image wx:if="{{d}}" src="{{e}}" class="w20px h20px data-v-1047ead9"></image><image wx:else src="{{f}}" class="w20px h20px v-else data-v-1047ead9"></image></block><slot name="backText"/></view><slot name="left"/><view class="navbar-title absolute data-v-1047ead9"><block wx:if="{{h}}"><slot name="title"/></block><block wx:else class="v-else"><text class="data-v-1047ead9" style="{{'color:' + j}}">{{i}}</text></block></view><view class="action navbar-action__right data-v-1047ead9"><slot name="right"/></view></view></view><view wx:if="{{r}}" class="data-v-1047ead9" style="{{'height:' + s}}"></view></view>
1
+ <view wx:if="{{a}}" class="data-v-1047ead9"><view class="y__navbar data-v-1047ead9"><view class="{{['y__navbar-wrap', 'flex', 'items-center', 'relative', 'box-border', 'left-0', 'data-v-1047ead9', k && 'custom', l && 'fixed']}}" style="{{'height:' + m + ';' + ('padding-top:' + n) + ';' + ('background:' + o) + ';' + ('color:' + p) + ';' + ('z-index:' + q)}}"><view wx:if="{{b}}" class="action navbar-action__left data-v-1047ead9" bindtap="{{g}}"><block wx:if="{{c}}"><slot name="back"/></block><block wx:else class="v-else"><image wx:if="{{d}}" src="{{e}}" class="w20px h20px data-v-1047ead9"/><image wx:else src="{{f}}" class="w20px h20px v-else data-v-1047ead9"/></block><slot name="backText"/></view><slot name="left"/><view class="navbar-title absolute data-v-1047ead9"><block wx:if="{{h}}"><slot name="title"/></block><block wx:else class="v-else"><text class="data-v-1047ead9" style="{{'color:' + j}}">{{i}}</text></block></view><view class="action navbar-action__right data-v-1047ead9"><slot name="right"/></view></view></view><view wx:if="{{r}}" class="data-v-1047ead9" style="{{'height:' + s}}"/></view>
@@ -26,15 +26,14 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
26
26
  const current = common_vendor.computed(() => {
27
27
  const [page] = getCurrentPages();
28
28
  const route = page.route;
29
- const index = list.value.findIndex((path) => path.pagePath === "/" + route);
29
+ const index = list.value.findIndex((path) => path.pagePath === `/${route}`);
30
30
  return index;
31
31
  });
32
- const tabChange = (index) => {
33
- if (index === current.value) {
32
+ function tabChange(index) {
33
+ if (index === current.value)
34
34
  return;
35
- }
36
35
  utils_route.tabbar(list.value[index].pagePath);
37
- };
36
+ }
38
37
  common_vendor.index.hideTabBar();
39
38
  return (_ctx, _cache) => {
40
39
  return {
@@ -42,9 +41,9 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
42
41
  return {
43
42
  a: common_vendor.unref(current) === index ? item.selectedIconPath : item.iconPath,
44
43
  b: common_vendor.t(item.text),
45
- c: common_vendor.o(($event) => tabChange(index), index),
46
- d: index,
47
- e: index === common_vendor.unref(current) ? 1 : ""
44
+ c: index,
45
+ d: index === common_vendor.unref(current) ? 1 : "",
46
+ e: common_vendor.o(($event) => tabChange(index), index)
48
47
  };
49
48
  }),
50
49
  b: __props.z
@@ -1 +1 @@
1
- <view class="t-tabbar data-v-4df9e9ce" style="{{'z-index:' + b}}"><view wx:for="{{a}}" wx:for-item="item" wx:key="d" bindtap="{{item.c}}" class="{{['t-tabbar__item', 'data-v-4df9e9ce', item.e && 't-bar__item_on']}}"><view class="data-v-4df9e9ce" style="position:relative;display:inline-block"><image src="{{item.a}}" class="t-tabbar__icon data-v-4df9e9ce"></image></view><view class="t-tabbar__label data-v-4df9e9ce">{{item.b}}</view></view></view>
1
+ <view class="t-tabbar data-v-4df9e9ce" style="{{'z-index:' + b}}"><view wx:for="{{a}}" wx:for-item="item" wx:key="c" class="{{['t-tabbar__item', 'data-v-4df9e9ce', item.d && 't-bar__item_on']}}" bindtap="{{item.e}}"><view class="data-v-4df9e9ce" style="position:relative;display:inline-block"><image src="{{item.a}}" class="t-tabbar__icon data-v-4df9e9ce"/></view><view class="t-tabbar__label data-v-4df9e9ce">{{item.b}}</view></view></view>
@@ -17,9 +17,8 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
17
17
  common_vendor.onLoad(() => {
18
18
  const [page] = getCurrentPages();
19
19
  const pageConf = pagesInfo.value.find((p) => p.path === page.route);
20
- if (pageConf && pageConf.needLogin) {
20
+ if (pageConf && pageConf.needLogin)
21
21
  console.log("todo: 这个页面需要登录,进行登录条件判断");
22
- }
23
22
  });
24
23
  return (_ctx, _cache) => {
25
24
  return {};
@@ -1 +1 @@
1
- <young-navbar wx:if="{{a}}" u-i="199e550e-0" bind:__l="__l" u-p="{{b}}"/><young-loading u-i="199e550e-1" bind:__l="__l"/><young-loading-mini u-i="199e550e-2" bind:__l="__l"/><scroll-view scroll-y class="flex flex-col bg-transparent scroll-y" style="{{'height:' + c}}"><slot></slot></scroll-view><young-tabbar wx:if="{{d}}" u-i="199e550e-3" bind:__l="__l" u-p="{{d}}"/>
1
+ <young-navbar wx:if="{{a}}" u-i="199e550e-0" bind:__l="__l" u-p="{{b}}"/><young-loading u-i="199e550e-1" bind:__l="__l"/><young-loading-mini u-i="199e550e-2" bind:__l="__l"/><scroll-view scroll-y class="flex flex-col bg-transparent scroll-y" style="{{'height:' + c}}"><slot/></scroll-view><young-tabbar wx:if="{{d}}" u-i="199e550e-3" bind:__l="__l" u-p="{{d}}"/>
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  const common_vendor = require("../../common/vendor.js");
3
3
  const apis_index = require("../../apis/index.js");
4
- require("../../apis/lib/index.js");
5
4
  require("../../apis/requests/get.js");
6
5
  require("../../apis/requests/post.js");
7
6
  require("../../utils/modal.js");
@@ -19,13 +18,13 @@ if (!Math) {
19
18
  const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
20
19
  __name: "index",
21
20
  setup(__props) {
22
- const testGet = async () => {
21
+ async function testGet() {
23
22
  const res = await apis_index.apis.get.getByUserName("BluesYoung-web");
24
23
  console.log("🚀 ~ file: index.vue:12 ~ test ~ res:", res);
25
- };
26
- const testPost = async () => {
24
+ }
25
+ async function testPost() {
27
26
  await apis_index.apis.post.createRepo("BluesYoung-web");
28
- };
27
+ }
29
28
  return (_ctx, _cache) => {
30
29
  return {
31
30
  a: common_vendor.o(testGet),
@@ -1 +1 @@
1
- <layout-default-uni u-s="{{['d']}}" u-i="8c384434-0" bind:__l="__l"><young-navbar u-i="8c384434-1,8c384434-0" bind:__l="__l"/><view class="text-32">我是子页面 demo</view><button bindtap="{{a}}">点我测试 Get 请求</button><button bindtap="{{b}}">点我测试 Post 请求</button></layout-default-uni>
1
+ <layout-default-uni u-s="{{['d']}}" u-i="8c384434-0" bind:__l="__l"><young-navbar u-i="8c384434-1,8c384434-0" bind:__l="__l"/><view class="text-32"> 我是子页面 demo </view><button bindtap="{{a}}"> 点我测试 Get 请求 </button><button bindtap="{{b}}"> 点我测试 Post 请求 </button></layout-default-uni>
@@ -4,7 +4,6 @@ const config_enum = require("../config/enum.js");
4
4
  const common_vendor = require("../common/vendor.js");
5
5
  const apis_index = require("../apis/index.js");
6
6
  const store_system = require("../store/system.js");
7
- require("../apis/lib/index.js");
8
7
  require("../apis/requests/get.js");
9
8
  require("../apis/requests/post.js");
10
9
  require("../utils/modal.js");
@@ -20,13 +19,13 @@ if (!Math) {
20
19
  const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
21
20
  __name: "index",
22
21
  setup(__props) {
23
- const testGet = async () => {
22
+ async function testGet() {
24
23
  const res = await apis_index.apis.get.getByUserName("BluesYoung-web");
25
24
  console.log("🚀 ~ file: index.vue:12 ~ test ~ res:", res);
26
- };
27
- const testPost = async () => {
25
+ }
26
+ async function testPost() {
28
27
  await apis_index.apis.post.createRepo("BluesYoung-web");
29
- };
28
+ }
30
29
  const { fullscreenLoading } = common_vendor.storeToRefs(store_system.useHttpLoading());
31
30
  fullscreenLoading.value = true;
32
31
  setTimeout(() => {
@@ -1 +1 @@
1
- <layout-tabbar-uni u-s="{{['d']}}" u-i="1106be7c-0" bind:__l="__l"><view class="text-32">我是页面</view><view class="uni-primary">主色</view><view class="uni-success">成功色</view><view class="uni-warning">警告色</view><view class="uni-error">错误色</view><button bindtap="{{a}}">点我测试 Get 请求</button><button bindtap="{{b}}">点我测试 Post 请求</button><uni-card wx:if="{{d}}" u-s="{{['d']}}" bindclick="{{c}}" u-i="1106be7c-1,1106be7c-0" bind:__l="__l" u-p="{{d}}"><text>这是一个带头像和双标题的基础卡片,此示例展示了一个完整的卡片。</text></uni-card></layout-tabbar-uni>
1
+ <layout-tabbar-uni u-s="{{['d']}}" u-i="1106be7c-0" bind:__l="__l"><view class="text-32"> 我是页面 </view><view class="uni-primary"> 主色 </view><view class="uni-success"> 成功色 </view><view class="uni-warning"> 警告色 </view><view class="uni-error"> 错误色 </view><button bindtap="{{a}}"> 点我测试 Get 请求 </button><button bindtap="{{b}}"> 点我测试 Post 请求 </button><uni-card wx:if="{{d}}" u-s="{{['d']}}" bindclick="{{c}}" u-i="1106be7c-1,1106be7c-0" bind:__l="__l" u-p="{{d}}"><text>这是一个带头像和双标题的基础卡片,此示例展示了一个完整的卡片。</text></uni-card></layout-tabbar-uni>
@@ -1 +1 @@
1
- <layout-tabbar-uni u-s="{{['d']}}" u-i="2d9e2a28-0" bind:__l="__l"><view class="text-32">我是个人中心</view></layout-tabbar-uni>
1
+ <layout-tabbar-uni u-s="{{['d']}}" u-i="2d9e2a28-0" bind:__l="__l"><view class="text-32"> 我是个人中心 </view></layout-tabbar-uni>
@@ -33,8 +33,7 @@
33
33
  "minifyWXML": true,
34
34
  "useMultiFrameRuntime": true,
35
35
  "ignoreUploadUnusedFiles": false,
36
- "ignoreDevUnusedFiles": false,
37
- "condition": false
36
+ "ignoreDevUnusedFiles": false
38
37
  },
39
38
  "compileType": "miniprogram",
40
39
  "libVersion": "2.33.0",
@@ -0,0 +1,6 @@
1
+ {
2
+ "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
3
+ "setting": {
4
+ "urlCheck": false
5
+ }
6
+ }
@@ -2,7 +2,9 @@
2
2
  const common_vendor = require("../../common/vendor.js");
3
3
  const config_enum = require("../../config/enum.js");
4
4
  const getUuid = () => common_vendor.index.getStorageSync(config_enum.YoungStorageKeys.唯一标识);
5
- const setUuid = () => common_vendor.index.setStorageSync(config_enum.YoungStorageKeys.唯一标识, common_vendor.Q() + common_vendor.Q() + common_vendor.Q() + common_vendor.Q());
5
+ function setUuid() {
6
+ return common_vendor.index.setStorageSync(config_enum.YoungStorageKeys.唯一标识, common_vendor.oe() + common_vendor.oe() + common_vendor.oe() + common_vendor.oe());
7
+ }
6
8
  const setNavbarHeihgt = (v) => common_vendor.index.setStorageSync(config_enum.YoungStorageKeys.导航栏高度, v);
7
9
  const getNavbarHeihgt = () => common_vendor.index.getStorageSync(config_enum.YoungStorageKeys.导航栏高度);
8
10
  exports.getNavbarHeihgt = getNavbarHeihgt;
@@ -4,9 +4,8 @@ const store_system = require("../store/system.js");
4
4
  let loadingCount = 0;
5
5
  function showLoading(title = "加载中...", mask = true) {
6
6
  const { fullscreenLoading, smallLoading } = common_vendor.storeToRefs(store_system.useHttpLoading());
7
- if (fullscreenLoading.value) {
7
+ if (fullscreenLoading.value)
8
8
  return;
9
- }
10
9
  loadingCount++;
11
10
  if ({}.VITE_CUSTOM_LOADING) {
12
11
  smallLoading.value = true;
@@ -19,22 +18,21 @@ function showLoading(title = "加载中...", mask = true) {
19
18
  }
20
19
  function hideLoading() {
21
20
  const { smallLoading, fullscreenLoading } = common_vendor.storeToRefs(store_system.useHttpLoading());
22
- if (fullscreenLoading.value) {
21
+ if (fullscreenLoading.value)
23
22
  return;
24
- }
25
23
  if (--loadingCount === 0) {
26
- if ({}.VITE_CUSTOM_LOADING) {
24
+ if ({}.VITE_CUSTOM_LOADING)
27
25
  smallLoading.value = false;
28
- } else {
26
+ else
29
27
  common_vendor.index.hideLoading();
30
- }
31
28
  }
32
29
  }
33
30
  let hasModel = false;
34
31
  const modalPage = /* @__PURE__ */ new Set();
35
32
  async function showModal(options) {
33
+ var _a;
36
34
  const page = getCurrentPages();
37
- const route = page[page.length - 1].route || "";
35
+ const route = ((_a = page[page.length - 1]) == null ? void 0 : _a.route) || "";
38
36
  if (modalPage.has(route)) {
39
37
  hasModel = true;
40
38
  } else {
@@ -42,9 +40,8 @@ async function showModal(options) {
42
40
  modalPage.add(route);
43
41
  }
44
42
  const { title = "提示", showCancel = true, complete } = options;
45
- while (hasModel) {
46
- await common_vendor.G(0.5);
47
- }
43
+ while (hasModel)
44
+ await common_vendor.ee(0.5);
48
45
  return new Promise((resolve, reject) => {
49
46
  hasModel = true;
50
47
  common_vendor.index.showModal({
@@ -53,11 +50,10 @@ async function showModal(options) {
53
50
  success(res) {
54
51
  hasModel = false;
55
52
  modalPage.delete(route);
56
- if (res.confirm) {
53
+ if (res.confirm)
57
54
  resolve(res);
58
- } else if (res.cancel) {
55
+ else if (res.cancel)
59
56
  reject(res);
60
- }
61
57
  },
62
58
  fail(err) {
63
59
  hasModel = false;
@@ -1,17 +1,15 @@
1
1
  "use strict";
2
2
  const common_vendor = require("../common/vendor.js");
3
3
  const config_enum = require("../config/enum.js");
4
- const params2Url = (params, encode = false) => {
4
+ function params2Url(params, encode = false) {
5
5
  const arr = [];
6
- for (const key in params) {
6
+ for (const key in params)
7
7
  arr.push(`${key}=${encode ? encodeURIComponent(params[key]) : params[key]}`);
8
- }
9
8
  return arr.join("&");
10
- };
9
+ }
11
10
  function route({ type, url, params, delta = 1, encode }) {
12
- if (type !== "navigateBack" && params) {
11
+ if (type !== "navigateBack" && params)
13
12
  url = `${url}?${params2Url(params, encode)}`;
14
- }
15
13
  switch (type) {
16
14
  case "navigateTo":
17
15
  common_vendor.index.navigateTo({
@@ -2,16 +2,16 @@
2
2
  const common_vendor = require("../common/vendor.js");
3
3
  const store_system = require("../store/system.js");
4
4
  const store_local_index = require("../store/local/index.js");
5
- const getSystemInfo = () => {
5
+ function getSystemInfo() {
6
6
  const { systemInfo } = common_vendor.storeToRefs(store_system.useSystemInfo());
7
7
  return new Promise((_resolve) => {
8
8
  common_vendor.index.getSystemInfo({
9
9
  success: (e) => {
10
10
  console.log(e, "getSystemInfo");
11
11
  systemInfo.value = e;
12
- let statusBar = e.statusBarHeight || 0;
12
+ const statusBar = e.statusBarHeight || 0;
13
13
  let customBar;
14
- let menu = common_vendor.index.getMenuButtonBoundingClientRect();
14
+ const menu = common_vendor.index.getMenuButtonBoundingClientRect();
15
15
  customBar = menu.bottom + menu.top - statusBar;
16
16
  const safeBottom = e.screenHeight - (e.safeArea ? e.safeArea.height + e.safeArea.top : 0);
17
17
  store_local_index.setNavbarHeihgt({
@@ -23,5 +23,5 @@ const getSystemInfo = () => {
23
23
  }
24
24
  });
25
25
  });
26
- };
26
+ }
27
27
  exports.getSystemInfo = getSystemInfo;
@@ -44,6 +44,7 @@
44
44
  "build:quickapp-webview-union": "uni build -p quickapp-webview-union"
45
45
  },
46
46
  "dependencies": {
47
+ "@bluesyoung/http": "^1.0.1",
47
48
  "@bluesyoung/utils": "^0.2.1",
48
49
  "@dcloudio/uni-app": "3.0.0-3080720230703001",
49
50
  "@dcloudio/uni-app-plus": "3.0.0-3080720230703001",
@@ -58,7 +59,6 @@
58
59
  "@dcloudio/uni-mp-toutiao": "3.0.0-3080720230703001",
59
60
  "@dcloudio/uni-mp-weixin": "3.0.0-3080720230703001",
60
61
  "@dcloudio/uni-quickapp-webview": "3.0.0-3080720230703001",
61
- "@uni-helper/axios-adapter": "^1.4.0",
62
62
  "dayjs": "^1.11.9",
63
63
  "js-base64": "^3.7.5",
64
64
  "lodash": "^4.17.21",
@@ -73,7 +73,7 @@
73
73
  "vue": "^3.2.45"
74
74
  },
75
75
  "devDependencies": {
76
- "@antfu/eslint-config": "^0.41.0",
76
+ "@antfu/eslint-config": "^0.42.0",
77
77
  "@dcloudio/types": "^3.3.2",
78
78
  "@dcloudio/uni-automator": "3.0.0-3080720230703001",
79
79
  "@dcloudio/uni-cli-shared": "3.0.0-3080720230703001",
@@ -89,7 +89,6 @@
89
89
  "@uni-helper/vite-plugin-uni-pages": "^0.2.3",
90
90
  "@uni-helper/volar-service-uni-pages": "^0.2.3",
91
91
  "@vue/tsconfig": "^0.1.3",
92
- "axios": "^1.4.0",
93
92
  "eslint": "^8.48.0",
94
93
  "lint-staged": "^14.0.1",
95
94
  "simple-git-hooks": "^2.9.0",