create-young-proj 0.12.0 → 0.13.0
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.
- package/package.json +1 -1
- package/template-nuxt-admin/package.json +5 -5
- package/template-nuxt-admin/yarn.lock +706 -854
- package/template-uni-app/auto-imports.d.ts +9 -6
- package/template-uni-app/custom-plugins/index.ts +1 -2
- package/template-uni-app/dist/dev/mp-weixin/apis/index.js +5 -6
- package/template-uni-app/dist/dev/mp-weixin/apis/requests/get.js +2 -2
- package/template-uni-app/dist/dev/mp-weixin/apis/requests/post.js +4 -4
- package/template-uni-app/dist/dev/mp-weixin/app.js +4 -5
- package/template-uni-app/dist/dev/mp-weixin/common/vendor.js +1448 -2471
- package/template-uni-app/dist/dev/mp-weixin/components/young-navbar/young-navbar.js +7 -8
- package/template-uni-app/dist/dev/mp-weixin/components/young-navbar/young-navbar.wxml +1 -1
- package/template-uni-app/dist/dev/mp-weixin/components/young-tabbar/young-tabbar.js +7 -8
- package/template-uni-app/dist/dev/mp-weixin/components/young-tabbar/young-tabbar.wxml +1 -1
- package/template-uni-app/dist/dev/mp-weixin/layouts/default.js +1 -2
- package/template-uni-app/dist/dev/mp-weixin/layouts/tabbar.wxml +1 -1
- package/template-uni-app/dist/dev/mp-weixin/pages/demo/index.js +4 -5
- package/template-uni-app/dist/dev/mp-weixin/pages/demo/index.wxml +1 -1
- package/template-uni-app/dist/dev/mp-weixin/pages/index.js +4 -5
- package/template-uni-app/dist/dev/mp-weixin/pages/index.wxml +1 -1
- package/template-uni-app/dist/dev/mp-weixin/pages/my.wxml +1 -1
- package/template-uni-app/dist/dev/mp-weixin/project.config.json +1 -2
- package/template-uni-app/dist/dev/mp-weixin/project.private.config.json +6 -0
- package/template-uni-app/dist/dev/mp-weixin/store/local/index.js +3 -1
- package/template-uni-app/dist/dev/mp-weixin/utils/modal.js +10 -14
- package/template-uni-app/dist/dev/mp-weixin/utils/route.js +4 -6
- package/template-uni-app/dist/dev/mp-weixin/utils/system.js +4 -4
- package/template-uni-app/package.json +2 -3
- package/template-uni-app/pnpm-lock.yaml +154 -105
- package/template-uni-app/src/apis/index.ts +2 -2
- package/template-uni-app/src/apis/requests/get.ts +5 -5
- package/template-uni-app/src/apis/requests/post.ts +5 -5
- package/template-uni-app/vite.config.ts +2 -3
- package/template-uni-app/custom-plugins/polyfill.ts +0 -32
- package/template-uni-app/dist/dev/mp-weixin/apis/lib/index.js +0 -90
- package/template-uni-app/src/apis/lib/index.ts +0 -235
@@ -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,5 +1,5 @@
|
|
1
1
|
"use strict";
|
2
|
-
const
|
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
|
-
|
12
|
-
|
13
|
-
|
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
|
-
|
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
|
-
|
3
|
-
const AuthReq = (args) => http.authReq({ method: "
|
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:
|
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(
|
53
|
+
updateManager.onCheckForUpdate((res) => {
|
55
54
|
console.log(res.hasUpdate, "onCheckForUpdate hasUpdate");
|
56
55
|
});
|
57
|
-
updateManager.onUpdateReady(
|
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(
|
67
|
+
updateManager.onUpdateFailed(() => {
|
69
68
|
utils_modal.showModal({ title: "更新提示", content: "新版本下载失败", showCancel: false });
|
70
69
|
});
|
71
70
|
console.log("App Show");
|