@impui/imp 1.0.16-beta.0 → 1.0.16
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/axios/index.es.js +1 -143
- package/dist/config/index.es.js +1 -127
- package/dist/core/index.es.js +1 -34
- package/dist/gotool/go2/index.es.js +1 -510
- package/dist/gotool/index/index.es.js +1 -164
- package/dist/imph5/index.es.js +1 -324
- package/dist/index.es.js +1 -49
- package/dist/login/index.es.js +1 -711
- package/dist/node_modules/axios/index/index.es.js +1 -38
- package/dist/node_modules/axios/lib/adapters/adapters/index.es.js +1 -71
- package/dist/node_modules/axios/lib/adapters/fetch/index.es.js +1 -219
- package/dist/node_modules/axios/lib/adapters/xhr/index.es.js +1 -141
- package/dist/node_modules/axios/lib/axios/index.es.js +1 -50
- package/dist/node_modules/axios/lib/cancel/CancelToken/index.es.js +1 -99
- package/dist/node_modules/axios/lib/cancel/CanceledError/index.es.js +1 -12
- package/dist/node_modules/axios/lib/cancel/isCancel/index.es.js +1 -6
- package/dist/node_modules/axios/lib/core/Axios/index.es.js +1 -180
- package/dist/node_modules/axios/lib/core/AxiosError/index.es.js +1 -80
- package/dist/node_modules/axios/lib/core/AxiosHeaders/index.es.js +1 -231
- package/dist/node_modules/axios/lib/core/InterceptorManager/index.es.js +1 -65
- package/dist/node_modules/axios/lib/core/buildFullPath/index.es.js +1 -12
- package/dist/node_modules/axios/lib/core/dispatchRequest/index.es.js +1 -52
- package/dist/node_modules/axios/lib/core/mergeConfig/index.es.js +1 -83
- package/dist/node_modules/axios/lib/core/settle/index.es.js +1 -18
- package/dist/node_modules/axios/lib/core/transformData/index.es.js +1 -17
- package/dist/node_modules/axios/lib/defaults/index/index.es.js +1 -116
- package/dist/node_modules/axios/lib/defaults/transitional/index.es.js +1 -8
- package/dist/node_modules/axios/lib/env/data/index.es.js +1 -4
- package/dist/node_modules/axios/lib/helpers/AxiosURLSearchParams/index.es.js +1 -34
- package/dist/node_modules/axios/lib/helpers/HttpStatusCode/index.es.js +1 -77
- package/dist/node_modules/axios/lib/helpers/bind/index.es.js +1 -8
- package/dist/node_modules/axios/lib/helpers/buildURL/index.es.js +1 -34
- package/dist/node_modules/axios/lib/helpers/combineURLs/index.es.js +1 -6
- package/dist/node_modules/axios/lib/helpers/composeSignals/index.es.js +1 -39
- package/dist/node_modules/axios/lib/helpers/cookies/index.es.js +1 -49
- package/dist/node_modules/axios/lib/helpers/formDataToJSON/index.es.js +1 -54
- package/dist/node_modules/axios/lib/helpers/isAbsoluteURL/index.es.js +1 -6
- package/dist/node_modules/axios/lib/helpers/isAxiosError/index.es.js +1 -7
- package/dist/node_modules/axios/lib/helpers/isURLSameOrigin/index.es.js +1 -11
- package/dist/node_modules/axios/lib/helpers/null/index.es.js +1 -4
- package/dist/node_modules/axios/lib/helpers/parseHeaders/index.es.js +1 -47
- package/dist/node_modules/axios/lib/helpers/parseProtocol/index.es.js +1 -7
- package/dist/node_modules/axios/lib/helpers/progressEventReducer/index.es.js +1 -41
- package/dist/node_modules/axios/lib/helpers/resolveConfig/index.es.js +1 -46
- package/dist/node_modules/axios/lib/helpers/speedometer/index.es.js +1 -36
- package/dist/node_modules/axios/lib/helpers/spread/index.es.js +1 -8
- package/dist/node_modules/axios/lib/helpers/throttle/index.es.js +1 -35
- package/dist/node_modules/axios/lib/helpers/toFormData/index.es.js +1 -117
- package/dist/node_modules/axios/lib/helpers/toURLEncodedForm/index.es.js +1 -18
- package/dist/node_modules/axios/lib/helpers/trackStream/index.es.js +1 -80
- package/dist/node_modules/axios/lib/helpers/validator/index.es.js +1 -67
- package/dist/node_modules/axios/lib/platform/browser/classes/Blob/index.es.js +1 -4
- package/dist/node_modules/axios/lib/platform/browser/classes/FormData/index.es.js +1 -4
- package/dist/node_modules/axios/lib/platform/browser/classes/URLSearchParams/index.es.js +1 -5
- package/dist/node_modules/axios/lib/platform/browser/index/index.es.js +1 -15
- package/dist/node_modules/axios/lib/platform/common/utils/index.es.js +1 -15
- package/dist/node_modules/axios/lib/platform/index/index.es.js +1 -9
- package/dist/node_modules/axios/lib/utils/index.es.js +1 -387
- package/dist/packages/com/dist/cache/index.es/index.es.js +1 -145
- package/dist/packages/com/dist/core/index.es/index.es.js +1 -154
- package/dist/packages/com/dist/data/index.es/index.es.js +1 -26
- package/dist/packages/com/dist/date/index.es/index.es.js +2 -194
- package/dist/packages/com/dist/log/index.es/index.es.js +1 -110
- package/dist/packages/com/dist/message/index.es/index.es.js +1 -90
- package/dist/packages/com/dist/req/index.es/index.es.js +1 -35
- package/dist/packages/com/dist/str/index.es/index.es.js +1 -25
- package/dist/packages/com/dist/typetool/index.es/index.es.js +1 -53
- package/dist/packages/com/dist/url/index.es/index.es.js +1 -238
- package/dist/restool/index/index.es.js +1 -266
- package/dist/restool/index.css/index.es.js +1 -4
- package/package.json +5 -1
package/dist/imph5/index.es.js
CHANGED
|
@@ -1,324 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { isBoolean, isObject } from "@impui/com/typetool";
|
|
3
|
-
import { isAndroid, isIOS } from "@impui/com/browser";
|
|
4
|
-
const holdLink = function() {
|
|
5
|
-
document.addEventListener("click", function(e) {
|
|
6
|
-
var link = e.target.closest("a");
|
|
7
|
-
if (!link) return;
|
|
8
|
-
if (link.getAttribute("target") === "window") {
|
|
9
|
-
var href = link.getAttribute("href");
|
|
10
|
-
windowOpen(href);
|
|
11
|
-
e.preventDefault();
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
const sliderRes = async function(res) {
|
|
16
|
-
const { layer: layer2 } = await impui.loadAsync(["layer"]);
|
|
17
|
-
if (isAndroid()) {
|
|
18
|
-
window.AndroidJs.sliderRes(JSON.stringify(res));
|
|
19
|
-
} else if (isIOS()) {
|
|
20
|
-
window.webkit.messageHandlers.sliderRes.postMessage(res);
|
|
21
|
-
} else {
|
|
22
|
-
layer2.msg("sliderRes滑块回调接口,web端暂不支持!");
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
const msg = function(msg2) {
|
|
26
|
-
if (window.layer) {
|
|
27
|
-
layer.msg(msg2);
|
|
28
|
-
} else {
|
|
29
|
-
alert(msg2);
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
const getUrl = function(url) {
|
|
33
|
-
if (url.indexOf("http://") < 0 && url.indexOf("https://") < 0) {
|
|
34
|
-
var firststr = url.substring(0, 1);
|
|
35
|
-
if (firststr === "/") {
|
|
36
|
-
return location.origin + url;
|
|
37
|
-
} else if (firststr === "#" || url.indexOf("javascript:;") >= 0) {
|
|
38
|
-
return url;
|
|
39
|
-
}
|
|
40
|
-
return location.origin + "/static/" + url;
|
|
41
|
-
}
|
|
42
|
-
return url;
|
|
43
|
-
};
|
|
44
|
-
const windowOpen = function(url, addclose, title, goType) {
|
|
45
|
-
url = getUrl(url);
|
|
46
|
-
addclose = addclose || false;
|
|
47
|
-
title = title || "";
|
|
48
|
-
if (isAndroid()) {
|
|
49
|
-
window.AndroidJs.appGoNewWin(url, addclose);
|
|
50
|
-
} else if (isIOS()) {
|
|
51
|
-
window.webkit.messageHandlers.appGoNewWin.postMessage({ "url": url, "addclose": addclose, "title": title });
|
|
52
|
-
} else {
|
|
53
|
-
switch (goType) {
|
|
54
|
-
case 1:
|
|
55
|
-
window.open(getUrl(url));
|
|
56
|
-
break;
|
|
57
|
-
default:
|
|
58
|
-
location.href = getUrl(url);
|
|
59
|
-
break;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
const GoWebView = function(url, issso, options) {
|
|
64
|
-
var defaultOptions = {
|
|
65
|
-
url,
|
|
66
|
-
type: "page",
|
|
67
|
-
title: "",
|
|
68
|
-
rate: 1,
|
|
69
|
-
addclose: true,
|
|
70
|
-
sso: false
|
|
71
|
-
};
|
|
72
|
-
if (isBoolean(issso)) {
|
|
73
|
-
defaultOptions.sso = issso;
|
|
74
|
-
} else if (!options && isObject(issso)) {
|
|
75
|
-
options = issso;
|
|
76
|
-
}
|
|
77
|
-
options = extend(true, defaultOptions, options);
|
|
78
|
-
if (isAndroid()) {
|
|
79
|
-
window.AndroidJs.appGoView(JSON.stringify(options));
|
|
80
|
-
} else if (isIOS()) {
|
|
81
|
-
window.webkit.messageHandlers.appGoView.postMessage(options);
|
|
82
|
-
} else {
|
|
83
|
-
console.warn("pc端不支持GoWebView方法!");
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
const appGoToLiveRoom = function() {
|
|
87
|
-
if (isAndroid()) {
|
|
88
|
-
window.AndroidJs.appGoToLiveRoom();
|
|
89
|
-
} else if (isIOS()) {
|
|
90
|
-
window.webkit.messageHandlers.appGoToLiveRoom.postMessage(null);
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
const appGoRoom = function(cno) {
|
|
94
|
-
if (isAndroid()) {
|
|
95
|
-
window.AndroidJs.appGoRoom(cno);
|
|
96
|
-
} else if (isIOS()) {
|
|
97
|
-
window.webkit.messageHandlers.appGoRoom.postMessage(cno);
|
|
98
|
-
} else {
|
|
99
|
-
window.open("/" + cno);
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
const appGoRoomV2 = function(opt) {
|
|
103
|
-
if (!isObject(opt)) {
|
|
104
|
-
opt = { cno: opt };
|
|
105
|
-
}
|
|
106
|
-
if (isAndroid()) {
|
|
107
|
-
window.AndroidJs.appGoRoomV2(JSON.stringify(opt));
|
|
108
|
-
} else if (isIOS()) {
|
|
109
|
-
window.webkit.messageHandlers.appGoRoomV2.postMessage(opt);
|
|
110
|
-
} else {
|
|
111
|
-
var url = "/" + opt.cno;
|
|
112
|
-
if (opt.tuiid) {
|
|
113
|
-
url += "?infrom=" + opt.tuiid;
|
|
114
|
-
}
|
|
115
|
-
window.open(url);
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
const shareBtn = function(data) {
|
|
119
|
-
var shareDate = {
|
|
120
|
-
targetUrl: data.url || "",
|
|
121
|
-
title: data.title || "",
|
|
122
|
-
description: data.desc || "",
|
|
123
|
-
imgUrl: data.imgsrc || ""
|
|
124
|
-
};
|
|
125
|
-
if (isAndroid()) {
|
|
126
|
-
window.AndroidJs.appShareBtnShow(JSON.stringify(shareDate));
|
|
127
|
-
} else if (isIOS()) {
|
|
128
|
-
window.webkit.messageHandlers.appShareBtnShow.postMessage(shareDate);
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
const share = function(data) {
|
|
132
|
-
var shareDate = {
|
|
133
|
-
targetUrl: data.url || "",
|
|
134
|
-
title: data.title || "",
|
|
135
|
-
description: data.desc || "",
|
|
136
|
-
imgUrl: data.imgsrc || ""
|
|
137
|
-
};
|
|
138
|
-
if (isAndroid()) {
|
|
139
|
-
window.AndroidJs.appShare(JSON.stringify(shareDate));
|
|
140
|
-
} else if (isIOS()) {
|
|
141
|
-
window.webkit.messageHandlers.appShare.postMessage(shareDate);
|
|
142
|
-
} else {
|
|
143
|
-
msg("请在app中分享");
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
const shareV2 = function(data) {
|
|
147
|
-
var shareDate = {
|
|
148
|
-
targetUrl: data.url || "",
|
|
149
|
-
title: data.title || "",
|
|
150
|
-
description: data.desc || "",
|
|
151
|
-
imgUrl: data.imgsrc || ""
|
|
152
|
-
};
|
|
153
|
-
if (isAndroid()) {
|
|
154
|
-
window.AndroidJs.appShareV2(JSON.stringify(shareDate));
|
|
155
|
-
} else if (isIOS()) {
|
|
156
|
-
window.webkit.messageHandlers.appShareV2.postMessage(shareDate);
|
|
157
|
-
} else {
|
|
158
|
-
msg("请在app中分享");
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
const appEmptyClick = function() {
|
|
162
|
-
if (isAndroid()) {
|
|
163
|
-
return;
|
|
164
|
-
} else if (isIOS()) {
|
|
165
|
-
window.webkit.messageHandlers.appEmptyClick.postMessage(null);
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
const appInviteShare = function(url) {
|
|
169
|
-
if (isAndroid()) {
|
|
170
|
-
window.AndroidJs.appInviteShare(url);
|
|
171
|
-
} else if (isIOS()) {
|
|
172
|
-
window.webkit.messageHandlers.appInviteShare.postMessage(url);
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
|
-
const openWxSappPay = function(amount) {
|
|
176
|
-
if (isAndroid()) {
|
|
177
|
-
msg("安卓端暂无小程序唤起功能!");
|
|
178
|
-
} else if (isIOS()) {
|
|
179
|
-
window.webkit.messageHandlers.appWxMiniChongZhi.postMessage(String(amount));
|
|
180
|
-
}
|
|
181
|
-
};
|
|
182
|
-
const sendGift = function(data) {
|
|
183
|
-
if (isAndroid()) {
|
|
184
|
-
window.AndroidJs.handLuckSendGift(JSON.stringify(data));
|
|
185
|
-
} else if (isIOS()) {
|
|
186
|
-
window.webkit.messageHandlers.handLuckSendGift.postMessage(data);
|
|
187
|
-
} else if (parent.jw) {
|
|
188
|
-
parent.jw.Comm.sendGift.send(data);
|
|
189
|
-
}
|
|
190
|
-
};
|
|
191
|
-
const copy = function(text) {
|
|
192
|
-
if (isAndroid()) {
|
|
193
|
-
window.AndroidJs.appClipData(text);
|
|
194
|
-
return false;
|
|
195
|
-
} else if (isIOS()) {
|
|
196
|
-
window.webkit.messageHandlers.appClipData.postMessage(text);
|
|
197
|
-
return false;
|
|
198
|
-
} else {
|
|
199
|
-
return navigator.clipboard.writeText(text);
|
|
200
|
-
}
|
|
201
|
-
};
|
|
202
|
-
const setTitle = function(title) {
|
|
203
|
-
document.title = title;
|
|
204
|
-
try {
|
|
205
|
-
if (isAndroid()) {
|
|
206
|
-
window.AndroidJs.appSetTitle(title);
|
|
207
|
-
} else if (isIOS()) {
|
|
208
|
-
window.webkit.messageHandlers.appSetTitle.postMessage(title);
|
|
209
|
-
}
|
|
210
|
-
} catch (e) {
|
|
211
|
-
console.error(e);
|
|
212
|
-
}
|
|
213
|
-
};
|
|
214
|
-
const closeFrame = function(boxname) {
|
|
215
|
-
if (isAndroid()) {
|
|
216
|
-
window.AndroidJs.appGoBack();
|
|
217
|
-
} else if (isIOS()) {
|
|
218
|
-
window.webkit.messageHandlers.appGoBack.postMessage(null);
|
|
219
|
-
} else if (parent.closeFrame) {
|
|
220
|
-
parent.closeFrame(boxname);
|
|
221
|
-
} else if (parent.hidepanelPop) {
|
|
222
|
-
parent.hidepanelPop(boxname);
|
|
223
|
-
}
|
|
224
|
-
};
|
|
225
|
-
const appGoBack = function() {
|
|
226
|
-
if (isAndroid()) {
|
|
227
|
-
window.AndroidJs.appGoBack();
|
|
228
|
-
} else if (isIOS()) {
|
|
229
|
-
window.webkit.messageHandlers.appGoBack.postMessage(null);
|
|
230
|
-
} else {
|
|
231
|
-
history.back();
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
const goUserHome = function(useridx) {
|
|
235
|
-
if (isAndroid()) {
|
|
236
|
-
window.AndroidJs.userHomePage(String(useridx));
|
|
237
|
-
} else if (isIOS()) {
|
|
238
|
-
window.webkit.messageHandlers.userHomePage.postMessage(String(useridx));
|
|
239
|
-
} else {
|
|
240
|
-
console.warn("web端暂时没有接受goUserHome此消息!");
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
const appGoDressUpCenter = function() {
|
|
244
|
-
if (isAndroid()) {
|
|
245
|
-
window.AndroidJs.appGoDressUpCenter();
|
|
246
|
-
} else if (isIOS()) {
|
|
247
|
-
window.webkit.messageHandlers.appGoDressUpCenter.postMessage(null);
|
|
248
|
-
} else {
|
|
249
|
-
console.warn("web端暂时没有接受appGoDressUpCenter此消息!");
|
|
250
|
-
}
|
|
251
|
-
};
|
|
252
|
-
const appGoPay = function() {
|
|
253
|
-
if (isAndroid()) {
|
|
254
|
-
window.AndroidJs.appGoPay();
|
|
255
|
-
} else if (isIOS()) {
|
|
256
|
-
window.webkit.messageHandlers.appGoPay.postMessage(null);
|
|
257
|
-
} else {
|
|
258
|
-
console.warn("web端暂时没有接受appGoPay此消息!");
|
|
259
|
-
}
|
|
260
|
-
};
|
|
261
|
-
const goAppPage = async function(key) {
|
|
262
|
-
var config = await impui.get("config");
|
|
263
|
-
if (isAndroid()) {
|
|
264
|
-
window.AndroidJs.goAppPage(String(config.config.openAPP.Android[key]));
|
|
265
|
-
} else if (isIOS()) {
|
|
266
|
-
window.webkit.messageHandlers.goAppPage.postMessage(String(config.config.openAPP.IOS[key]));
|
|
267
|
-
} else {
|
|
268
|
-
console.warn("web端暂时不需要定义goAppPage的方法跳转!");
|
|
269
|
-
}
|
|
270
|
-
};
|
|
271
|
-
const playMP4 = function(url, options) {
|
|
272
|
-
if (isObject(url)) {
|
|
273
|
-
options = url;
|
|
274
|
-
url = options.url;
|
|
275
|
-
}
|
|
276
|
-
options = options || {};
|
|
277
|
-
options.url = url;
|
|
278
|
-
if (isAndroid()) {
|
|
279
|
-
window.AndroidJs.appPlayMP4(JSON.stringify(options));
|
|
280
|
-
} else if (isIOS()) {
|
|
281
|
-
window.webkit.messageHandlers.appPlayMP4.postMessage(options);
|
|
282
|
-
} else {
|
|
283
|
-
console.warn("pc端不支持playMP4方法!");
|
|
284
|
-
}
|
|
285
|
-
};
|
|
286
|
-
const appNotify = function(notifyName, data) {
|
|
287
|
-
data = data || {};
|
|
288
|
-
data.notifyName = notifyName;
|
|
289
|
-
if (isAndroid()) {
|
|
290
|
-
window.AndroidJs.appNotify(JSON.stringify(data));
|
|
291
|
-
} else if (isIOS()) {
|
|
292
|
-
window.webkit.messageHandlers.appNotify.postMessage(data);
|
|
293
|
-
} else {
|
|
294
|
-
console.warn("web端暂时没有接受此消息!notifyName:" + notifyName + ", data:", data);
|
|
295
|
-
}
|
|
296
|
-
};
|
|
297
|
-
export {
|
|
298
|
-
GoWebView,
|
|
299
|
-
appEmptyClick,
|
|
300
|
-
appGoBack,
|
|
301
|
-
appGoDressUpCenter,
|
|
302
|
-
appGoPay,
|
|
303
|
-
appGoRoom,
|
|
304
|
-
appGoRoomV2,
|
|
305
|
-
appGoToLiveRoom,
|
|
306
|
-
appInviteShare,
|
|
307
|
-
appNotify,
|
|
308
|
-
closeFrame,
|
|
309
|
-
copy,
|
|
310
|
-
getUrl,
|
|
311
|
-
goAppPage,
|
|
312
|
-
goUserHome,
|
|
313
|
-
holdLink,
|
|
314
|
-
msg,
|
|
315
|
-
openWxSappPay,
|
|
316
|
-
playMP4,
|
|
317
|
-
sendGift,
|
|
318
|
-
setTitle,
|
|
319
|
-
share,
|
|
320
|
-
shareBtn,
|
|
321
|
-
shareV2,
|
|
322
|
-
sliderRes,
|
|
323
|
-
windowOpen
|
|
324
|
-
};
|
|
1
|
+
import{extend as e}from"@impui/com/core";import{isBoolean as n,isObject as i}from"@impui/com/typetool";import{isAndroid as o,isIOS as s}from"@impui/com/browser";const a=function(){document.addEventListener("click",function(e){var n=e.target.closest("a");if(n&&"window"===n.getAttribute("target")){var i=n.getAttribute("href");d(i),e.preventDefault()}})},t=async function(e){const{layer:n}=await impui.loadAsync(["layer"]);o()?window.AndroidJs.sliderRes(JSON.stringify(e)):s()?window.webkit.messageHandlers.sliderRes.postMessage(e):n.msg("sliderRes滑块回调接口,web端暂不支持!")},r=function(e){window.layer?layer.msg(e):alert(e)},p=function(e){if(e.indexOf("http://")<0&&e.indexOf("https://")<0){var n=e.substring(0,1);return"/"===n?location.origin+e:"#"===n||e.indexOf("javascript:;")>=0?e:location.origin+"/static/"+e}return e},d=function(e,n,i,a){if(e=p(e),n=n||!1,i=i||"",o())window.AndroidJs.appGoNewWin(e,n);else if(s())window.webkit.messageHandlers.appGoNewWin.postMessage({url:e,addclose:n,title:i});else if(1===a)window.open(p(e));else location.href=p(e)},w=function(a,t,r){var p={url:a,type:"page",title:"",rate:1,addclose:!0,sso:!1};n(t)?p.sso=t:!r&&i(t)&&(r=t),r=e(!0,p,r),o()?window.AndroidJs.appGoView(JSON.stringify(r)):s()?window.webkit.messageHandlers.appGoView.postMessage(r):console.warn("pc端不支持GoWebView方法!")},l=function(){o()?window.AndroidJs.appGoToLiveRoom():s()&&window.webkit.messageHandlers.appGoToLiveRoom.postMessage(null)},g=function(e){o()?window.AndroidJs.appGoRoom(e):s()?window.webkit.messageHandlers.appGoRoom.postMessage(e):window.open("/"+e)},c=function(e){if(i(e)||(e={cno:e}),o())window.AndroidJs.appGoRoomV2(JSON.stringify(e));else if(s())window.webkit.messageHandlers.appGoRoomV2.postMessage(e);else{var n="/"+e.cno;e.tuiid&&(n+="?infrom="+e.tuiid),window.open(n)}},m=function(e){var n={targetUrl:e.url||"",title:e.title||"",description:e.desc||"",imgUrl:e.imgsrc||""};o()?window.AndroidJs.appShareBtnShow(JSON.stringify(n)):s()&&window.webkit.messageHandlers.appShareBtnShow.postMessage(n)},f=function(e){var n={targetUrl:e.url||"",title:e.title||"",description:e.desc||"",imgUrl:e.imgsrc||""};o()?window.AndroidJs.appShare(JSON.stringify(n)):s()?window.webkit.messageHandlers.appShare.postMessage(n):r("请在app中分享")},u=function(e){var n={targetUrl:e.url||"",title:e.title||"",description:e.desc||"",imgUrl:e.imgsrc||""};o()?window.AndroidJs.appShareV2(JSON.stringify(n)):s()?window.webkit.messageHandlers.appShareV2.postMessage(n):r("请在app中分享")},b=function(){o()||s()&&window.webkit.messageHandlers.appEmptyClick.postMessage(null)},k=function(e){o()?window.AndroidJs.appInviteShare(e):s()&&window.webkit.messageHandlers.appInviteShare.postMessage(e)},y=function(e){o()?r("安卓端暂无小程序唤起功能!"):s()&&window.webkit.messageHandlers.appWxMiniChongZhi.postMessage(String(e))},A=function(e){o()?window.AndroidJs.handLuckSendGift(JSON.stringify(e)):s()?window.webkit.messageHandlers.handLuckSendGift.postMessage(e):parent.jw&&parent.jw.Comm.sendGift.send(e)},J=function(e){return o()?(window.AndroidJs.appClipData(e),!1):s()?(window.webkit.messageHandlers.appClipData.postMessage(e),!1):navigator.clipboard.writeText(e)},S=function(e){document.title=e;try{o()?window.AndroidJs.appSetTitle(e):s()&&window.webkit.messageHandlers.appSetTitle.postMessage(e)}catch(n){console.error(n)}},M=function(e){o()?window.AndroidJs.appGoBack():s()?window.webkit.messageHandlers.appGoBack.postMessage(null):parent.closeFrame?parent.closeFrame(e):parent.hidepanelPop&&parent.hidepanelPop(e)},H=function(){o()?window.AndroidJs.appGoBack():s()?window.webkit.messageHandlers.appGoBack.postMessage(null):history.back()},G=function(e){o()?window.AndroidJs.userHomePage(String(e)):s()?window.webkit.messageHandlers.userHomePage.postMessage(String(e)):console.warn("web端暂时没有接受goUserHome此消息!")},h=function(){o()?window.AndroidJs.appGoDressUpCenter():s()?window.webkit.messageHandlers.appGoDressUpCenter.postMessage(null):console.warn("web端暂时没有接受appGoDressUpCenter此消息!")},P=function(){o()?window.AndroidJs.appGoPay():s()?window.webkit.messageHandlers.appGoPay.postMessage(null):console.warn("web端暂时没有接受appGoPay此消息!")},v=async function(e){var n=await impui.get("config");o()?window.AndroidJs.goAppPage(String(n.config.openAPP.Android[e])):s()?window.webkit.messageHandlers.goAppPage.postMessage(String(n.config.openAPP.IOS[e])):console.warn("web端暂时不需要定义goAppPage的方法跳转!")},N=function(e,n){i(e)&&(e=(n=e).url),(n=n||{}).url=e,o()?window.AndroidJs.appPlayMP4(JSON.stringify(n)):s()?window.webkit.messageHandlers.appPlayMP4.postMessage(n):console.warn("pc端不支持playMP4方法!")},O=function(e,n){(n=n||{}).notifyName=e,o()?window.AndroidJs.appNotify(JSON.stringify(n)):s()?window.webkit.messageHandlers.appNotify.postMessage(n):console.warn("web端暂时没有接受此消息!notifyName:"+e+", data:",n)};export{w as GoWebView,b as appEmptyClick,H as appGoBack,h as appGoDressUpCenter,P as appGoPay,g as appGoRoom,c as appGoRoomV2,l as appGoToLiveRoom,k as appInviteShare,O as appNotify,M as closeFrame,J as copy,p as getUrl,v as goAppPage,G as goUserHome,a as holdLink,r as msg,y as openWxSappPay,N as playMP4,A as sendGift,S as setTitle,f as share,m as shareBtn,u as shareV2,t as sliderRes,d as windowOpen};
|
package/dist/index.es.js
CHANGED
|
@@ -1,49 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { gotool } from "./gotool/index/index.es.js";
|
|
3
|
-
import { Login, default as default2 } from "./login/index.es.js";
|
|
4
|
-
import "./axios/index.es.js";
|
|
5
|
-
import { handleUrl } from "./core/index.es.js";
|
|
6
|
-
import { restool } from "./restool/index/index.es.js";
|
|
7
|
-
import { GoWebView, appEmptyClick, appGoBack, appGoDressUpCenter, appGoPay, appGoRoom, appGoRoomV2, appGoToLiveRoom, appInviteShare, appNotify, closeFrame, copy, getUrl, goAppPage, goUserHome, holdLink, msg, openWxSappPay, playMP4, sendGift, setTitle, share, shareBtn, shareV2, sliderRes, windowOpen } from "./imph5/index.es.js";
|
|
8
|
-
import { default as default3 } from "./node_modules/axios/lib/axios/index.es.js";
|
|
9
|
-
export {
|
|
10
|
-
GoWebView,
|
|
11
|
-
Login,
|
|
12
|
-
appEmptyClick,
|
|
13
|
-
appGoBack,
|
|
14
|
-
appGoDressUpCenter,
|
|
15
|
-
appGoPay,
|
|
16
|
-
appGoRoom,
|
|
17
|
-
appGoRoomV2,
|
|
18
|
-
appGoToLiveRoom,
|
|
19
|
-
appInviteShare,
|
|
20
|
-
appNotify,
|
|
21
|
-
default3 as axios,
|
|
22
|
-
closeFrame,
|
|
23
|
-
copy,
|
|
24
|
-
getAllConfig,
|
|
25
|
-
getApiurl,
|
|
26
|
-
getCodeVer,
|
|
27
|
-
getConfig,
|
|
28
|
-
getDomainConfig,
|
|
29
|
-
getEvnConfig,
|
|
30
|
-
getSimplifyConfig,
|
|
31
|
-
getUrl,
|
|
32
|
-
goAppPage,
|
|
33
|
-
goUserHome,
|
|
34
|
-
gotool,
|
|
35
|
-
handleUrl,
|
|
36
|
-
holdLink,
|
|
37
|
-
default2 as login,
|
|
38
|
-
msg,
|
|
39
|
-
openWxSappPay,
|
|
40
|
-
playMP4,
|
|
41
|
-
restool,
|
|
42
|
-
sendGift,
|
|
43
|
-
setTitle,
|
|
44
|
-
share,
|
|
45
|
-
shareBtn,
|
|
46
|
-
shareV2,
|
|
47
|
-
sliderRes,
|
|
48
|
-
windowOpen
|
|
49
|
-
};
|
|
1
|
+
import{getAllConfig as o,getApiurl as i,getCodeVer as s,getConfig as e,getDomainConfig as r,getEvnConfig as m,getSimplifyConfig as x}from"./config/index.es.js";import{gotool as d}from"./gotool/index/index.es.js";import{Login as n,default as t}from"./login/index.es.js";import"./axios/index.es.js";import{handleUrl as a}from"./core/index.es.js";import{restool as f}from"./restool/index/index.es.js";import{GoWebView as p,appEmptyClick as j,appGoBack as l,appGoDressUpCenter as g,appGoPay as u,appGoRoom as c,appGoRoomV2 as b,appGoToLiveRoom as h,appInviteShare as _,appNotify as k,closeFrame as q,copy as v,getUrl as w,goAppPage as y,goUserHome as z,holdLink as A,msg as B,openWxSappPay as C,playMP4 as D,sendGift as E,setTitle as F,share as G,shareBtn as H,shareV2 as I,sliderRes as J,windowOpen as K}from"./imph5/index.es.js";import{default as L}from"./node_modules/axios/lib/axios/index.es.js";export{p as GoWebView,n as Login,j as appEmptyClick,l as appGoBack,g as appGoDressUpCenter,u as appGoPay,c as appGoRoom,b as appGoRoomV2,h as appGoToLiveRoom,_ as appInviteShare,k as appNotify,L as axios,q as closeFrame,v as copy,o as getAllConfig,i as getApiurl,s as getCodeVer,e as getConfig,r as getDomainConfig,m as getEvnConfig,x as getSimplifyConfig,w as getUrl,y as goAppPage,z as goUserHome,d as gotool,a as handleUrl,A as holdLink,t as login,B as msg,C as openWxSappPay,D as playMP4,f as restool,E as sendGift,F as setTitle,G as share,H as shareBtn,I as shareV2,J as sliderRes,K as windowOpen};
|