@uxda/appkit 4.2.81 → 4.2.82
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/dist/index.js
CHANGED
|
@@ -135,7 +135,6 @@ function requestWxH5Pay(options) {
|
|
|
135
135
|
timeStamp: options.timeStamp
|
|
136
136
|
},
|
|
137
137
|
function(res) {
|
|
138
|
-
console.log(res, "-------res");
|
|
139
138
|
if (res.err_msg == "get_brand_wcpay_request:ok") {
|
|
140
139
|
resolve(true);
|
|
141
140
|
} else {
|
|
@@ -335,10 +334,8 @@ const transformFields = (row) => {
|
|
|
335
334
|
};
|
|
336
335
|
const useUpload = (config) => {
|
|
337
336
|
const appkitOptions = useAppKitOptions();
|
|
338
|
-
console.log("===config", config);
|
|
339
337
|
const upload = (url, file) => {
|
|
340
338
|
return new Promise((resolve, reject) => {
|
|
341
|
-
console.log(file, "----file");
|
|
342
339
|
uploadFile({
|
|
343
340
|
url: config.baseUrl + url,
|
|
344
341
|
filePath: file.path,
|
|
@@ -352,7 +349,6 @@ const useUpload = (config) => {
|
|
|
352
349
|
},
|
|
353
350
|
success: (rsp) => {
|
|
354
351
|
const { data } = rsp;
|
|
355
|
-
console.log("===data", data);
|
|
356
352
|
try {
|
|
357
353
|
const response = JSON.parse(data);
|
|
358
354
|
console.log("===response", response);
|
|
@@ -1401,11 +1397,14 @@ var HttpMethod = /* @__PURE__ */ ((HttpMethod2) => {
|
|
|
1401
1397
|
const request = (config) => {
|
|
1402
1398
|
const c = {
|
|
1403
1399
|
...clientConfig,
|
|
1404
|
-
...config
|
|
1400
|
+
...config,
|
|
1401
|
+
headers: {
|
|
1402
|
+
...clientConfig.headers,
|
|
1403
|
+
...config.headers
|
|
1404
|
+
}
|
|
1405
1405
|
};
|
|
1406
1406
|
return new Promise((resolve, reject) => {
|
|
1407
1407
|
const data = config.data && clientConfig.translates && clientConfig.translates[c.url] ? clientConfig.translates[c.url](c.data || {}) : c.data;
|
|
1408
|
-
console.log(`[][][][][]HTTP.${c.method}, ${c.baseUrl}${c.url}`, data);
|
|
1409
1408
|
clientConfig.vendor && clientConfig.vendor.request({
|
|
1410
1409
|
url: `${c.baseUrl}${c.url}`,
|
|
1411
1410
|
data,
|
|
@@ -6735,7 +6734,6 @@ var script$a = /* @__PURE__ */ defineComponent({
|
|
|
6735
6734
|
function onAuth() {
|
|
6736
6735
|
const $http = useHttp();
|
|
6737
6736
|
$http.post("/cas/sysAccount/verify", { verifyCode: authState.code }).then((res) => {
|
|
6738
|
-
console.log(res, "res");
|
|
6739
6737
|
if (typeof res !== "boolean") return;
|
|
6740
6738
|
showToast({ title: "\u8EAB\u4EFD\u8BA4\u8BC1\u6210\u529F", icon: "success" });
|
|
6741
6739
|
current.value++;
|
|
@@ -7988,7 +7986,6 @@ var script$6 = /* @__PURE__ */ defineComponent({
|
|
|
7988
7986
|
mediaType: ["mix"],
|
|
7989
7987
|
maxDuration: 60,
|
|
7990
7988
|
success: async (res) => {
|
|
7991
|
-
console.log(res.tempFiles, "res.tempFiles");
|
|
7992
7989
|
for (const item of res.tempFiles) {
|
|
7993
7990
|
if (item.fileType === "video") {
|
|
7994
7991
|
if (item.size > 1024 * 1024 * 50) {
|
package/package.json
CHANGED
|
@@ -26,11 +26,9 @@ type UploadFunction = (url: string, file: Media) => Promise<Media>
|
|
|
26
26
|
|
|
27
27
|
export const useUpload = (config: UploadConfig) => {
|
|
28
28
|
const appkitOptions = useAppKitOptions()
|
|
29
|
-
console.log('===config', config)
|
|
30
29
|
|
|
31
30
|
const upload: UploadFunction = (url: string, file: Media) => {
|
|
32
31
|
return new Promise<Media>((resolve, reject) => {
|
|
33
|
-
console.log(file, '----file')
|
|
34
32
|
uploadFile({
|
|
35
33
|
url: config.baseUrl + url,
|
|
36
34
|
filePath: file.path!,
|
|
@@ -44,7 +42,6 @@ export const useUpload = (config: UploadConfig) => {
|
|
|
44
42
|
},
|
|
45
43
|
success: (rsp: any) => {
|
|
46
44
|
const { data } = rsp
|
|
47
|
-
console.log('===data', data)
|
|
48
45
|
try {
|
|
49
46
|
const response = JSON.parse(data)
|
|
50
47
|
console.log('===response', response)
|
package/src/shared/http/Http.ts
CHANGED
|
@@ -29,13 +29,17 @@ const request: HttpInstance['request'] = <T>(config: HttpRequestConfig) => {
|
|
|
29
29
|
const c = {
|
|
30
30
|
...clientConfig,
|
|
31
31
|
...config,
|
|
32
|
+
headers: {
|
|
33
|
+
...clientConfig.headers,
|
|
34
|
+
...config.headers,
|
|
35
|
+
},
|
|
32
36
|
}
|
|
33
37
|
return new Promise<T>((resolve, reject) => {
|
|
34
38
|
const data =
|
|
35
39
|
config.data && clientConfig.translates && clientConfig.translates[c.url]
|
|
36
40
|
? (clientConfig.translates[c.url] as HttpTranslate)(c.data || {})
|
|
37
41
|
: c.data
|
|
38
|
-
console.log(`[][][][][]HTTP.${c.method}, ${c.baseUrl}${c.url}`, data)
|
|
42
|
+
// console.log(`[][][][][]HTTP.${c.method}, ${c.baseUrl}${c.url}`, data)
|
|
39
43
|
|
|
40
44
|
clientConfig.vendor &&
|
|
41
45
|
clientConfig.vendor
|
|
@@ -67,7 +67,6 @@ function requestWxH5Pay(options: PrePayOptions) {
|
|
|
67
67
|
timeStamp: options.timeStamp,
|
|
68
68
|
},
|
|
69
69
|
function (res) {
|
|
70
|
-
console.log(res, '-------res')
|
|
71
70
|
if (res.err_msg == 'get_brand_wcpay_request:ok') {
|
|
72
71
|
//res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠,商户需进一步调用后端查单确认支付结果。
|
|
73
72
|
resolve(true)
|
|
@@ -112,7 +112,6 @@ function toUpload() {
|
|
|
112
112
|
mediaType: ['mix'],
|
|
113
113
|
maxDuration: 60,
|
|
114
114
|
success: async (res) => {
|
|
115
|
-
console.log(res.tempFiles, 'res.tempFiles')
|
|
116
115
|
for (const item of res.tempFiles) {
|
|
117
116
|
if (item.fileType === 'video') {
|
|
118
117
|
if (item.size > 1024 * 1024 * 50) {
|