@zfqh/uniapp-x 0.0.5 → 0.0.7
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/CHANGELOG.md +16 -0
- package/lib/apis/request.d.ts +1 -1
- package/lib/apis/request.js +3 -4
- package/lib/stores/login.js +1 -1
- package/lib/utils/consts.d.ts +2 -21
- package/lib/utils/consts.js +1 -0
- package/lib/utils/request.js +1 -1
- package/lib/utils/uni.js +1 -1
- package/package.json +3 -3
- package/types/index.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.0.7](http://10.10.10.16/caoben/front-end-tools/compare/@zfqh/uniapp-x@0.0.6...@zfqh/uniapp-x@0.0.7) (2026-11-11)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @zfqh/uniapp-x
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.0.6](http://10.10.10.16/caoben/front-end-tools/compare/@zfqh/uniapp-x@0.0.5...@zfqh/uniapp-x@0.0.6) (2026-11-11)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @zfqh/uniapp-x
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [0.0.5](http://10.10.10.16/caoben/front-end-tools/compare/@zfqh/uniapp-x@0.0.4...@zfqh/uniapp-x@0.0.5) (2026-11-11)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @zfqh/uniapp-x
|
package/lib/apis/request.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import http from '@zfqh/uview-x
|
|
1
|
+
import { http } from '@zfqh/uview-x';
|
|
2
2
|
declare const GET: (url: string, data?: {}, options?: {}) => any, POST: (url: string, data?: {}, options?: {}) => any, PUT: (url: string, data?: {}, options?: {}) => any, DELETE: (url: string, data?: {}, options?: {}) => any;
|
|
3
3
|
export { GET, POST, PUT, DELETE };
|
|
4
4
|
export default http;
|
package/lib/apis/request.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import api from '../configs/api';
|
|
2
2
|
import app from '../configs/app';
|
|
3
3
|
import { createRequest, createInterceptors } from '../utils/request';
|
|
4
|
-
import {
|
|
5
|
-
import { getLocale } from '@zfqh/uview-x';
|
|
4
|
+
import { SYSTEM_INFO, LANGUAGE } from '../utils/consts';
|
|
5
|
+
import { getLocale, http } from '@zfqh/uview-x';
|
|
6
6
|
import query from '../utils/query';
|
|
7
|
-
import http from '@zfqh/uview-x/utils/http';
|
|
8
7
|
import { pinia } from '../stores/pinia';
|
|
9
8
|
import { useLoginStore } from '../stores/login';
|
|
10
9
|
// uview-x 的 http 实例来自 @ts-nocheck 源码,这里补一次显式类型豁免
|
|
@@ -41,7 +40,7 @@ request.interceptors.request.use((conf) => {
|
|
|
41
40
|
}
|
|
42
41
|
// #endif
|
|
43
42
|
const header = {
|
|
44
|
-
'X-Language': query.xLanguage || LANGUAGE[
|
|
43
|
+
'X-Language': query.xLanguage || LANGUAGE[getLocale()],
|
|
45
44
|
'Tenant-Id': tenantId || 1,
|
|
46
45
|
channel,
|
|
47
46
|
terminal,
|
package/lib/stores/login.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, ref } from 'vue';
|
|
2
2
|
import { defineStore } from 'pinia';
|
|
3
|
-
import throttle from '@zfqh/uview-x
|
|
3
|
+
import { throttle } from '@zfqh/uview-x';
|
|
4
4
|
import { getStorageSync, setStorage, removeStorage } from '../utils/storage';
|
|
5
5
|
import { TYPES } from '../utils/consts';
|
|
6
6
|
import query from '../utils/query';
|
package/lib/utils/consts.d.ts
CHANGED
|
@@ -26,27 +26,8 @@ export declare enum CHANNEL {
|
|
|
26
26
|
医生端 = 2,
|
|
27
27
|
门店端 = 3
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
'zh-Hant': string;
|
|
32
|
-
ja: string;
|
|
33
|
-
ko: string;
|
|
34
|
-
ar: string;
|
|
35
|
-
fa: string;
|
|
36
|
-
th: string;
|
|
37
|
-
vi: string;
|
|
38
|
-
my: string;
|
|
39
|
-
km: string;
|
|
40
|
-
en: string;
|
|
41
|
-
fr: string;
|
|
42
|
-
es: string;
|
|
43
|
-
ru: string;
|
|
44
|
-
pt: string;
|
|
45
|
-
de: string;
|
|
46
|
-
it: string;
|
|
47
|
-
el: string;
|
|
48
|
-
pl: string;
|
|
49
|
-
};
|
|
29
|
+
/** getLocale() 语言标识 -> 标准语言码 */
|
|
30
|
+
export declare const LANGUAGE: Record<string, string>;
|
|
50
31
|
export declare const TYPES: {
|
|
51
32
|
readonly MESSAGE: {
|
|
52
33
|
readonly LOGIN: "LOGIN";
|
package/lib/utils/consts.js
CHANGED
|
@@ -59,6 +59,7 @@ export var CHANNEL;
|
|
|
59
59
|
CHANNEL[CHANNEL["\u533B\u751F\u7AEF"] = 2] = "\u533B\u751F\u7AEF";
|
|
60
60
|
CHANNEL[CHANNEL["\u95E8\u5E97\u7AEF"] = 3] = "\u95E8\u5E97\u7AEF";
|
|
61
61
|
})(CHANNEL || (CHANNEL = {}));
|
|
62
|
+
/** getLocale() 语言标识 -> 标准语言码 */
|
|
62
63
|
export const LANGUAGE = {
|
|
63
64
|
// 亚洲语言
|
|
64
65
|
'zh-Hans': 'zh-CN', // 简体中文
|
package/lib/utils/request.js
CHANGED
package/lib/utils/uni.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// #ifdef H5
|
|
2
2
|
import { config } from '@zfqh/uview-x';
|
|
3
|
-
import { colorGradient } from '@zfqh/uview-x/utils/
|
|
3
|
+
import { colorGradient } from '@zfqh/uview-x/utils/color';
|
|
4
4
|
// #endif
|
|
5
5
|
import mp from '../configs/mp';
|
|
6
6
|
import { IS_WEBVIEW_ENV } from './consts';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zfqh/uniapp-x",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "uniapp x 公共模块",
|
|
5
5
|
"author": "yinjiazeng@163.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"README.md"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@zfqh/uview-x": "0.0.
|
|
27
|
+
"@zfqh/uview-x": "0.0.7",
|
|
28
28
|
"crypto-es": "^3.1.3",
|
|
29
29
|
"pinia": "2.1.7",
|
|
30
30
|
"qs": "^6.13.0",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"@types/qs": "^6.9.16",
|
|
37
37
|
"@types/url-parse": "^1.4.11"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "59595760375b8c8c71d6abe4e860d4ba8ca915a1"
|
|
40
40
|
}
|