提交 bdf20de1 编写于 作者: fxy060608's avatar fxy060608

feat: add interceptors

上级 78ea1a78
import { isArray, isFunction, isPromise, isPlainObject } from '@vue/shared'
import { isArray, isFunction, isPlainObject } from '@vue/shared'
import {
HOOKS,
......@@ -113,23 +113,4 @@ export const removeInterceptor = defineSyncApi(
RemoveInterceptorProtocol
)
const promiseInterceptor = {
returnValue(res: unknown) {
if (!isPromise(res)) {
return res
}
return new Promise((resolve, reject) => {
res.then((res) => {
if (res[0]) {
reject(res[0])
} else {
resolve(res[1])
}
})
})
},
}
export const interceptors = {
promiseInterceptor,
}
export const interceptors = {}
......@@ -2732,23 +2732,7 @@ var serviceContext = (function (vue) {
removeInterceptorHook(globalInterceptors, method);
}
}, RemoveInterceptorProtocol);
const promiseInterceptor = {
returnValue(res) {
if (!isPromise(res)) {
return res;
}
return new Promise((resolve, reject) => {
res.then((res) => {
if (res[0]) {
reject(res[0]);
}
else {
resolve(res[1]);
}
});
});
},
};
const interceptors = {};
const API_ON = '$on';
const OnProtocol = [
......@@ -9942,8 +9926,44 @@ var serviceContext = (function (vue) {
});
}
let realAtob;
const b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
const b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
if (typeof atob !== 'function') {
realAtob = function (str) {
str = String(str).replace(/[\t\n\f\r ]+/g, '');
if (!b64re.test(str)) {
throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
}
// Adding the padding if missing, for semplicity
str += '=='.slice(2 - (str.length & 3));
var bitmap;
var result = '';
var r1;
var r2;
var i = 0;
for (; i < str.length;) {
bitmap =
(b64.indexOf(str.charAt(i++)) << 18) |
(b64.indexOf(str.charAt(i++)) << 12) |
((r1 = b64.indexOf(str.charAt(i++))) << 6) |
(r2 = b64.indexOf(str.charAt(i++)));
result +=
r1 === 64
? String.fromCharCode((bitmap >> 16) & 255)
: r2 === 64
? String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255)
: String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255, bitmap & 255);
}
return result;
};
}
else {
// 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
realAtob = atob;
}
function b64DecodeUnicode(str) {
return decodeURIComponent(atob(str)
return decodeURIComponent(realAtob(str)
.split('')
.map(function (c) {
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
......@@ -12573,7 +12593,7 @@ var serviceContext = (function (vue) {
upx2px: upx2px,
addInterceptor: addInterceptor,
removeInterceptor: removeInterceptor,
promiseInterceptor: promiseInterceptor,
interceptors: interceptors,
arrayBufferToBase64: arrayBufferToBase64,
base64ToArrayBuffer: base64ToArrayBuffer,
createIntersectionObserver: createIntersectionObserver,
......
......@@ -80,7 +80,7 @@ export {
upx2px,
addInterceptor,
removeInterceptor,
promiseInterceptor,
interceptors,
arrayBufferToBase64,
base64ToArrayBuffer,
createIntersectionObserver,
......
......@@ -70,7 +70,7 @@ const ssrServerRef = (value, key, shallow = false) => {
state = globalData;
}
state[key] = sanitise(value);
// SSR 模式下 watchEffect 不生效 https://github.com/vuejs/vue-next/blob/master/packages/runtime-core/src/apiWatch.ts#L253
// SSR 模式下 watchEffect 不生效 https://github.com/vuejs/vue-next/blob/master/packages/runtime-core/src/apiWatch.ts#L283
// 故自定义ref
return vue.customRef((track, trigger) => {
const customTrigger = () => (trigger(), (state[key] = sanitise(value)));
......
......@@ -61,6 +61,7 @@
"hideTabBarRedDot",
"hideToast",
"hideTopWindow",
"interceptors",
"loadFontFace",
"login",
"makePhoneCall",
......@@ -89,7 +90,6 @@
"pageScrollTo",
"preloadPage",
"previewImage",
"promiseInterceptor",
"reLaunch",
"redirectTo",
"removeInterceptor",
......
......@@ -6539,8 +6539,32 @@ function initOptionMergeStrategies(optionMergeStrategies) {
optionMergeStrategies[name] = mergeAsArray;
});
}
let realAtob;
const b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
const b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
if (typeof atob !== "function") {
realAtob = function(str) {
str = String(str).replace(/[\t\n\f\r ]+/g, "");
if (!b64re.test(str)) {
throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
}
str += "==".slice(2 - (str.length & 3));
var bitmap;
var result = "";
var r1;
var r2;
var i = 0;
for (; i < str.length; ) {
bitmap = b64.indexOf(str.charAt(i++)) << 18 | b64.indexOf(str.charAt(i++)) << 12 | (r1 = b64.indexOf(str.charAt(i++))) << 6 | (r2 = b64.indexOf(str.charAt(i++)));
result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) : r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) : String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
}
return result;
};
} else {
realAtob = atob;
}
function b64DecodeUnicode(str) {
return decodeURIComponent(atob(str).split("").map(function(c) {
return decodeURIComponent(realAtob(str).split("").map(function(c) {
return "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2);
}).join(""));
}
......
......@@ -2455,9 +2455,9 @@ function queue(hooks, data) {
}
};
}
function wrapperOptions(interceptors, options = {}) {
function wrapperOptions(interceptors2, options = {}) {
[HOOK_SUCCESS, HOOK_FAIL, HOOK_COMPLETE].forEach((name) => {
const hooks = interceptors[name];
const hooks = interceptors2[name];
if (!isArray(hooks)) {
return;
}
......@@ -2766,20 +2766,20 @@ const AddInterceptorProtocol = [
}
];
const RemoveInterceptorProtocol = AddInterceptorProtocol;
function mergeInterceptorHook(interceptors, interceptor) {
function mergeInterceptorHook(interceptors2, interceptor) {
Object.keys(interceptor).forEach((hook) => {
if (isFunction(interceptor[hook])) {
interceptors[hook] = mergeHook(interceptors[hook], interceptor[hook]);
interceptors2[hook] = mergeHook(interceptors2[hook], interceptor[hook]);
}
});
}
function removeInterceptorHook(interceptors, interceptor) {
if (!interceptors || !interceptor) {
function removeInterceptorHook(interceptors2, interceptor) {
if (!interceptors2 || !interceptor) {
return;
}
Object.keys(interceptor).forEach((hook) => {
if (isFunction(interceptor[hook])) {
removeHook(interceptors[hook], interceptor[hook]);
removeHook(interceptors2[hook], interceptor[hook]);
}
});
}
......@@ -2823,22 +2823,7 @@ const removeInterceptor = /* @__PURE__ */ defineSyncApi(API_REMOVE_INTERCEPTOR,
removeInterceptorHook(globalInterceptors, method);
}
}, RemoveInterceptorProtocol);
const promiseInterceptor = {
returnValue(res) {
if (!isPromise(res)) {
return res;
}
return new Promise((resolve, reject) => {
res.then((res2) => {
if (res2[0]) {
reject(res2[0]);
} else {
resolve(res2[1]);
}
});
});
}
};
const interceptors = {};
const API_ON = "$on";
const OnProtocol = [
{
......@@ -11825,8 +11810,10 @@ function useScrollViewLoader(props2, state2, scrollTopNumber, scrollLeftNumber,
state2.refreshState = _state;
}
onMounted(() => {
nextTick(() => {
_scrollTopChanged(scrollTopNumber.value);
_scrollLeftChanged(scrollLeftNumber.value);
});
_scrollIntoViewChanged(props2.scrollIntoView);
let __handleScroll = function(event) {
event.stopPropagation();
......@@ -13257,8 +13244,32 @@ function initOptionMergeStrategies(optionMergeStrategies) {
optionMergeStrategies[name] = mergeAsArray;
});
}
let realAtob;
const b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
const b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
if (typeof atob !== "function") {
realAtob = function(str) {
str = String(str).replace(/[\t\n\f\r ]+/g, "");
if (!b64re.test(str)) {
throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
}
str += "==".slice(2 - (str.length & 3));
var bitmap;
var result = "";
var r1;
var r2;
var i = 0;
for (; i < str.length; ) {
bitmap = b64.indexOf(str.charAt(i++)) << 18 | b64.indexOf(str.charAt(i++)) << 12 | (r1 = b64.indexOf(str.charAt(i++))) << 6 | (r2 = b64.indexOf(str.charAt(i++)));
result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) : r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) : String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
}
return result;
};
} else {
realAtob = atob;
}
function b64DecodeUnicode(str) {
return decodeURIComponent(atob(str).split("").map(function(c) {
return decodeURIComponent(realAtob(str).split("").map(function(c) {
return "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2);
}).join(""));
}
......@@ -19345,7 +19356,7 @@ var api = {
upx2px,
addInterceptor,
removeInterceptor,
promiseInterceptor,
interceptors,
arrayBufferToBase64,
base64ToArrayBuffer,
createIntersectionObserver,
......@@ -21527,4 +21538,4 @@ var index = /* @__PURE__ */ defineSystemComponent({
return openBlock(), createBlock("div", clazz, [loadingVNode]);
}
});
export { $emit, $off, $on, $once, index$8 as Ad, index$7 as AdContentPage, index$6 as AdDraw, index$1 as AsyncErrorComponent, index as AsyncLoadingComponent, index$y as Button, index$5 as Camera, index$w as Canvas, index$u as Checkbox, index$v as CheckboxGroup, index$a as CoverImage, index$b as CoverView, index$t as Editor, index$A as Form, index$s as Icon, index$r as Image, Input, index$z as Label, LayoutComponent, index$4 as LivePlayer, index$3 as LivePusher, Map$1 as Map, MovableArea, MovableView, index$q as Navigator, index$2 as PageComponent, index$9 as Picker, PickerView, PickerViewColumn, index$p as Progress, index$n as Radio, index$o as RadioGroup, ResizeSensor, index$m as RichText, ScrollView, index$l as Slider, Swiper, SwiperItem, index$k as Switch, index$j as Text, index$i as Textarea, UniServiceJSBridge$1 as UniServiceJSBridge, UniViewJSBridge$1 as UniViewJSBridge, index$e as Video, index$h as View, index$d as WebView, addInterceptor, addPhoneContact, arrayBufferToBase64, base64ToArrayBuffer, canIUse, canvasGetImageData, canvasPutImageData, canvasToTempFilePath, chooseFile, chooseImage, chooseLocation, chooseVideo, clearStorage, clearStorageSync, closeSocket, connectSocket, createAnimation$1 as createAnimation, createCameraContext, createCanvasContext, createInnerAudioContext, createIntersectionObserver, createLivePlayerContext, createMapContext, createMediaQueryObserver, createSelectorQuery, createVideoContext, cssBackdropFilter, cssConstant, cssEnv, cssVar, downloadFile, getApp$1 as getApp, getCurrentPages$1 as getCurrentPages, getFileInfo, getImageInfo, getLeftWindowStyle, getLocale, getLocation, getNetworkType, getProvider, getRealPath, getRecorderManager, getRightWindowStyle, getSavedFileInfo, getSavedFileList, getScreenBrightness, getSelectedTextRange$1 as getSelectedTextRange, getStorage, getStorageInfo, getStorageInfoSync, getStorageSync, getSystemInfo, getSystemInfoSync, getTopWindowStyle, getVideoInfo, hideKeyboard, hideLeftWindow, hideLoading, hideNavigationBarLoading, hideRightWindow, hideTabBar, hideTabBarRedDot, hideToast, hideTopWindow, loadFontFace, login, makePhoneCall, navigateBack, navigateTo, offAccelerometerChange, offCompassChange, offNetworkStatusChange, offWindowResize, onAccelerometerChange, onAppLaunch, onCompassChange, onGyroscopeChange, onLocaleChange, onMemoryWarning, onNetworkStatusChange, onSocketClose, onSocketError, onSocketMessage, onSocketOpen, onTabBarMidButtonTap, onUserCaptureScreen, onWindowResize, openDocument, openLocation, pageScrollTo, index$f as plugin, preloadPage, previewImage, promiseInterceptor, reLaunch, redirectTo, removeInterceptor, removeSavedFileInfo, removeStorage, removeStorageSync, removeTabBarBadge, request, saveFile, saveImageToPhotosAlbum, saveVideoToPhotosAlbum, scanCode, sendSocketMessage, setKeepScreenOn, setLeftWindowStyle, setLocale, setNavigationBarColor, setNavigationBarTitle, setRightWindowStyle, setScreenBrightness, setStorage, setStorageSync, setTabBarBadge, setTabBarItem, setTabBarStyle, setTopWindowStyle, setupApp, setupPage, setupWindow, showActionSheet, showLeftWindow, showLoading, showModal, showNavigationBarLoading, showRightWindow, showTabBar, showTabBarRedDot, showToast, showTopWindow, startAccelerometer, startCompass, startGyroscope, startPullDownRefresh, stopAccelerometer, stopCompass, stopGyroscope, stopPullDownRefresh, switchTab, uni$1 as uni, uploadFile, upx2px, useI18n, useTabBar, vibrateLong, vibrateShort };
export { $emit, $off, $on, $once, index$8 as Ad, index$7 as AdContentPage, index$6 as AdDraw, index$1 as AsyncErrorComponent, index as AsyncLoadingComponent, index$y as Button, index$5 as Camera, index$w as Canvas, index$u as Checkbox, index$v as CheckboxGroup, index$a as CoverImage, index$b as CoverView, index$t as Editor, index$A as Form, index$s as Icon, index$r as Image, Input, index$z as Label, LayoutComponent, index$4 as LivePlayer, index$3 as LivePusher, Map$1 as Map, MovableArea, MovableView, index$q as Navigator, index$2 as PageComponent, index$9 as Picker, PickerView, PickerViewColumn, index$p as Progress, index$n as Radio, index$o as RadioGroup, ResizeSensor, index$m as RichText, ScrollView, index$l as Slider, Swiper, SwiperItem, index$k as Switch, index$j as Text, index$i as Textarea, UniServiceJSBridge$1 as UniServiceJSBridge, UniViewJSBridge$1 as UniViewJSBridge, index$e as Video, index$h as View, index$d as WebView, addInterceptor, addPhoneContact, arrayBufferToBase64, base64ToArrayBuffer, canIUse, canvasGetImageData, canvasPutImageData, canvasToTempFilePath, chooseFile, chooseImage, chooseLocation, chooseVideo, clearStorage, clearStorageSync, closeSocket, connectSocket, createAnimation$1 as createAnimation, createCameraContext, createCanvasContext, createInnerAudioContext, createIntersectionObserver, createLivePlayerContext, createMapContext, createMediaQueryObserver, createSelectorQuery, createVideoContext, cssBackdropFilter, cssConstant, cssEnv, cssVar, downloadFile, getApp$1 as getApp, getCurrentPages$1 as getCurrentPages, getFileInfo, getImageInfo, getLeftWindowStyle, getLocale, getLocation, getNetworkType, getProvider, getRealPath, getRecorderManager, getRightWindowStyle, getSavedFileInfo, getSavedFileList, getScreenBrightness, getSelectedTextRange$1 as getSelectedTextRange, getStorage, getStorageInfo, getStorageInfoSync, getStorageSync, getSystemInfo, getSystemInfoSync, getTopWindowStyle, getVideoInfo, hideKeyboard, hideLeftWindow, hideLoading, hideNavigationBarLoading, hideRightWindow, hideTabBar, hideTabBarRedDot, hideToast, hideTopWindow, interceptors, loadFontFace, login, makePhoneCall, navigateBack, navigateTo, offAccelerometerChange, offCompassChange, offNetworkStatusChange, offWindowResize, onAccelerometerChange, onAppLaunch, onCompassChange, onGyroscopeChange, onLocaleChange, onMemoryWarning, onNetworkStatusChange, onSocketClose, onSocketError, onSocketMessage, onSocketOpen, onTabBarMidButtonTap, onUserCaptureScreen, onWindowResize, openDocument, openLocation, pageScrollTo, index$f as plugin, preloadPage, previewImage, reLaunch, redirectTo, removeInterceptor, removeSavedFileInfo, removeStorage, removeStorageSync, removeTabBarBadge, request, saveFile, saveImageToPhotosAlbum, saveVideoToPhotosAlbum, scanCode, sendSocketMessage, setKeepScreenOn, setLeftWindowStyle, setLocale, setNavigationBarColor, setNavigationBarTitle, setRightWindowStyle, setScreenBrightness, setStorage, setStorageSync, setTabBarBadge, setTabBarItem, setTabBarStyle, setTopWindowStyle, setupApp, setupPage, setupWindow, showActionSheet, showLeftWindow, showLoading, showModal, showNavigationBarLoading, showRightWindow, showTabBar, showTabBarRedDot, showToast, showTopWindow, startAccelerometer, startCompass, startGyroscope, startPullDownRefresh, stopAccelerometer, stopCompass, stopGyroscope, stopPullDownRefresh, switchTab, uni$1 as uni, uploadFile, upx2px, useI18n, useTabBar, vibrateLong, vibrateShort };
......@@ -68,7 +68,7 @@ export {
upx2px,
addInterceptor,
removeInterceptor,
promiseInterceptor,
interceptors,
arrayBufferToBase64,
base64ToArrayBuffer,
createIntersectionObserver,
......
......@@ -474,6 +474,7 @@ const removeInterceptor = defineSyncApi(API_REMOVE_INTERCEPTOR, (method, interce
removeInterceptorHook(globalInterceptors, method);
}
}, RemoveInterceptorProtocol);
const interceptors = {};
const API_ON = '$on';
const OnProtocol = [
......@@ -761,6 +762,7 @@ const baseApis = {
$once,
$emit,
upx2px,
interceptors,
addInterceptor,
removeInterceptor,
onAppLaunch,
......
......@@ -474,6 +474,7 @@ const removeInterceptor = defineSyncApi(API_REMOVE_INTERCEPTOR, (method, interce
removeInterceptorHook(globalInterceptors, method);
}
}, RemoveInterceptorProtocol);
const interceptors = {};
const API_ON = '$on';
const OnProtocol = [
......@@ -761,6 +762,7 @@ const baseApis = {
$once,
$emit,
upx2px,
interceptors,
addInterceptor,
removeInterceptor,
onAppLaunch,
......
......@@ -4,6 +4,7 @@ import { upx2px } from '@dcloudio/uni-api/src/service/base/upx2px'
import {
addInterceptor,
removeInterceptor,
interceptors,
} from '@dcloudio/uni-api/src/service/base/interceptor'
import {
$on,
......@@ -24,6 +25,7 @@ const baseApis = {
$once,
$emit,
upx2px,
interceptors,
addInterceptor,
removeInterceptor,
onAppLaunch,
......
......@@ -474,6 +474,7 @@ const removeInterceptor = defineSyncApi(API_REMOVE_INTERCEPTOR, (method, interce
removeInterceptorHook(globalInterceptors, method);
}
}, RemoveInterceptorProtocol);
const interceptors = {};
const API_ON = '$on';
const OnProtocol = [
......@@ -761,6 +762,7 @@ const baseApis = {
$once,
$emit,
upx2px,
interceptors,
addInterceptor,
removeInterceptor,
onAppLaunch,
......
......@@ -474,6 +474,7 @@ const removeInterceptor = defineSyncApi(API_REMOVE_INTERCEPTOR, (method, interce
removeInterceptorHook(globalInterceptors, method);
}
}, RemoveInterceptorProtocol);
const interceptors = {};
const API_ON = '$on';
const OnProtocol = [
......@@ -761,6 +762,7 @@ const baseApis = {
$once,
$emit,
upx2px,
interceptors,
addInterceptor,
removeInterceptor,
onAppLaunch,
......
......@@ -474,6 +474,7 @@ const removeInterceptor = defineSyncApi(API_REMOVE_INTERCEPTOR, (method, interce
removeInterceptorHook(globalInterceptors, method);
}
}, RemoveInterceptorProtocol);
const interceptors = {};
const API_ON = '$on';
const OnProtocol = [
......@@ -761,6 +762,7 @@ const baseApis = {
$once,
$emit,
upx2px,
interceptors,
addInterceptor,
removeInterceptor,
onAppLaunch,
......
......@@ -4818,8 +4818,44 @@ function initOptionMergeStrategies(optionMergeStrategies) {
});
}
let realAtob;
const b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
const b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
if (typeof atob !== 'function') {
realAtob = function (str) {
str = String(str).replace(/[\t\n\f\r ]+/g, '');
if (!b64re.test(str)) {
throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
}
// Adding the padding if missing, for semplicity
str += '=='.slice(2 - (str.length & 3));
var bitmap;
var result = '';
var r1;
var r2;
var i = 0;
for (; i < str.length;) {
bitmap =
(b64.indexOf(str.charAt(i++)) << 18) |
(b64.indexOf(str.charAt(i++)) << 12) |
((r1 = b64.indexOf(str.charAt(i++))) << 6) |
(r2 = b64.indexOf(str.charAt(i++)));
result +=
r1 === 64
? String.fromCharCode((bitmap >> 16) & 255)
: r2 === 64
? String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255)
: String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255, bitmap & 255);
}
return result;
};
}
else {
// 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
realAtob = atob;
}
function b64DecodeUnicode(str) {
return decodeURIComponent(atob(str)
return decodeURIComponent(realAtob(str)
.split('')
.map(function (c) {
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
......
......@@ -438,6 +438,7 @@ const removeInterceptor = defineSyncApi(API_REMOVE_INTERCEPTOR, (method, interce
removeInterceptorHook(globalInterceptors, method);
}
}, RemoveInterceptorProtocol);
const interceptors = {};
const API_ON = '$on';
const OnProtocol = [
......@@ -725,6 +726,7 @@ const baseApis = {
$once,
$emit,
upx2px,
interceptors,
addInterceptor,
removeInterceptor,
onAppLaunch,
......
......@@ -474,6 +474,7 @@ const removeInterceptor = defineSyncApi(API_REMOVE_INTERCEPTOR, (method, interce
removeInterceptorHook(globalInterceptors, method);
}
}, RemoveInterceptorProtocol);
const interceptors = {};
const API_ON = '$on';
const OnProtocol = [
......@@ -761,6 +762,7 @@ const baseApis = {
$once,
$emit,
upx2px,
interceptors,
addInterceptor,
removeInterceptor,
onAppLaunch,
......
'use strict';
var version = "3.0.0-alpha-3020920210926001";
var version = "3.0.0-alpha-3020920210927001";
const STAT_VERSION = version;
const STAT_URL = 'https://tongji.dcloud.io/uni/stat';
......
var version = "3.0.0-alpha-3020920210926001";
var version = "3.0.0-alpha-3020920210927001";
const STAT_VERSION = version;
const STAT_URL = 'https://tongji.dcloud.io/uni/stat';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册