提交 9a4a8e7c 编写于 作者: Q qiang

chore: build

上级 5b3156ee
......@@ -461,6 +461,7 @@ var en = {
"uni.scanCode.flash.on": "Tap to turn light on",
"uni.scanCode.flash.off": "Tap to turn light off",
"uni.startSoterAuthentication.authContent": "Fingerprint recognition",
"uni.startSoterAuthentication.waitingContent": "Unrecognizable",
"uni.picker.done": "Done",
"uni.picker.cancel": "Cancel",
"uni.video.danmu": "Danmu",
......@@ -497,6 +498,7 @@ var es = {
"uni.scanCode.flash.on": "Toque para encender la luz",
"uni.scanCode.flash.off": "Toque para apagar la luz",
"uni.startSoterAuthentication.authContent": "Reconocimiento de huellas dactilares",
"uni.startSoterAuthentication.waitingContent": "Irreconocible",
"uni.picker.done": "OK",
"uni.picker.cancel": "Cancelar",
"uni.video.danmu": "Danmu",
......@@ -533,6 +535,7 @@ var fr = {
"uni.scanCode.flash.on": "Appuyez pour activer l'éclairage",
"uni.scanCode.flash.off": "Appuyez pour désactiver l'éclairage",
"uni.startSoterAuthentication.authContent": "Reconnaissance de l'empreinte digitale",
"uni.startSoterAuthentication.waitingContent": "Méconnaissable",
"uni.picker.done": "OK",
"uni.picker.cancel": "Annuler",
"uni.video.danmu": "Danmu",
......@@ -569,6 +572,7 @@ var zhHans = {
"uni.scanCode.flash.on": "轻触照亮",
"uni.scanCode.flash.off": "轻触关闭",
"uni.startSoterAuthentication.authContent": "指纹识别中...",
"uni.startSoterAuthentication.waitingContent": "无法识别",
"uni.picker.done": "完成",
"uni.picker.cancel": "取消",
"uni.video.danmu": "弹幕",
......@@ -605,6 +609,7 @@ var zhHant = {
"uni.scanCode.flash.on": "輕觸照亮",
"uni.scanCode.flash.off": "輕觸關閉",
"uni.startSoterAuthentication.authContent": "指紋識別中...",
"uni.startSoterAuthentication.waitingContent": "無法識別",
"uni.picker.done": "完成",
"uni.picker.cancel": "取消",
"uni.video.danmu": "彈幕",
......@@ -1857,15 +1862,10 @@ class EventChannel {
const eventChannels = {};
const eventChannelStack = [];
function getEventChannel (id) {
if (id) {
const eventChannel = eventChannels[id];
delete eventChannels[id];
return eventChannel
}
return eventChannelStack.shift()
const eventChannel = eventChannels[id];
delete eventChannels[id];
return eventChannel
}
const hooks = [
......@@ -1923,7 +1923,10 @@ function parseBaseApp (vm, {
delete this.$options.mpType;
delete this.$options.mpInstance;
if (this.mpType === 'page' && typeof getApp === 'function') { // hack vue-i18n
if (
( this.mpType === 'page') &&
typeof getApp === 'function'
) { // hack vue-i18n
const app = getApp();
if (app.$vm && app.$vm.$i18n) {
this._i18n = app.$vm.$i18n;
......
......@@ -687,8 +687,6 @@ class EventChannel {
const eventChannels = {};
const eventChannelStack = [];
let id = 0;
function initEventChannel (events, cache = true) {
......@@ -696,31 +694,30 @@ function initEventChannel (events, cache = true) {
const eventChannel = new EventChannel(id, events);
if (cache) {
eventChannels[id] = eventChannel;
eventChannelStack.push(eventChannel);
}
return eventChannel
}
function getEventChannel (id) {
if (id) {
const eventChannel = eventChannels[id];
delete eventChannels[id];
return eventChannel
}
return eventChannelStack.shift()
const eventChannel = eventChannels[id];
delete eventChannels[id];
return eventChannel
}
var navigateTo = {
args (fromArgs, toArgs) {
const id = initEventChannel(fromArgs.events).id;
if (fromArgs.url) {
fromArgs.url = fromArgs.url + (fromArgs.url.indexOf('?') === -1 ? '?' : '&') + '__id__=' + id;
function navigateTo () {
let eventChannel;
return {
args (fromArgs, toArgs) {
eventChannel = initEventChannel(fromArgs.events);
if (fromArgs.url) {
fromArgs.url = fromArgs.url + (fromArgs.url.indexOf('?') === -1 ? '?' : '&') + '__id__=' + eventChannel.id;
}
},
returnValue (fromRes, toRes) {
fromRes.eventChannel = eventChannel;
}
},
returnValue (fromRes, toRes) {
fromRes.eventChannel = getEventChannel();
}
};
}
function findExistsPageIndex (url) {
const pages = getCurrentPages();
......@@ -1010,7 +1007,7 @@ function _handleNetworkInfo (result) {
}
const protocols = { // 需要做转换的 API 列表
navigateTo,
navigateTo: navigateTo(),
redirectTo,
returnValue (methodName, res = {}) { // 通用 returnValue 解析
if (res.error || res.errorMessage) {
......@@ -2878,6 +2875,9 @@ const hooks = [
function initEventChannel$1 () {
Vue.prototype.getOpenerEventChannel = function () {
{
if (my.canIUse('getOpenerEventChannel')) { return this.$scope.getOpenerEventChannel() }
}
if (!this.__eventChannel__) {
this.__eventChannel__ = new EventChannel();
}
......@@ -2996,7 +2996,10 @@ function parseBaseApp (vm, {
delete this.$options.mpType;
delete this.$options.mpInstance;
if (this.mpType === 'page' && typeof getApp === 'function') { // hack vue-i18n
if (
( this.mpType === 'page') &&
typeof getApp === 'function'
) { // hack vue-i18n
const app = getApp();
if (app.$vm && app.$vm.$i18n) {
this._i18n = app.$vm.$i18n;
......@@ -3483,7 +3486,7 @@ if (typeof Proxy !== 'undefined' && "mp-alipay" !== 'app-plus') {
uni[name] = promisify(name, todoApis[name]);
});
Object.keys(extraApi).forEach(name => {
uni[name] = promisify(name, todoApis[name]);
uni[name] = promisify(name, extraApi[name]);
});
}
......
......@@ -687,8 +687,6 @@ class EventChannel {
const eventChannels = {};
const eventChannelStack = [];
let id = 0;
function initEventChannel (events, cache = true) {
......@@ -696,31 +694,30 @@ function initEventChannel (events, cache = true) {
const eventChannel = new EventChannel(id, events);
if (cache) {
eventChannels[id] = eventChannel;
eventChannelStack.push(eventChannel);
}
return eventChannel
}
function getEventChannel (id) {
if (id) {
const eventChannel = eventChannels[id];
delete eventChannels[id];
return eventChannel
}
return eventChannelStack.shift()
const eventChannel = eventChannels[id];
delete eventChannels[id];
return eventChannel
}
var navigateTo = {
args (fromArgs, toArgs) {
const id = initEventChannel(fromArgs.events).id;
if (fromArgs.url) {
fromArgs.url = fromArgs.url + (fromArgs.url.indexOf('?') === -1 ? '?' : '&') + '__id__=' + id;
function navigateTo () {
let eventChannel;
return {
args (fromArgs, toArgs) {
eventChannel = initEventChannel(fromArgs.events);
if (fromArgs.url) {
fromArgs.url = fromArgs.url + (fromArgs.url.indexOf('?') === -1 ? '?' : '&') + '__id__=' + eventChannel.id;
}
},
returnValue (fromRes, toRes) {
fromRes.eventChannel = eventChannel;
}
},
returnValue (fromRes, toRes) {
fromRes.eventChannel = getEventChannel();
}
};
}
function findExistsPageIndex (url) {
const pages = getCurrentPages();
......@@ -1022,7 +1019,7 @@ const protocols = {
method: false
}
},
navigateTo,
navigateTo: navigateTo(),
redirectTo,
previewImage,
getSystemInfo,
......@@ -2412,7 +2409,10 @@ function parseBaseApp (vm, {
delete this.$options.mpType;
delete this.$options.mpInstance;
if (this.mpType === 'page' && typeof getApp === 'function') { // hack vue-i18n
if (
( this.mpType === 'page') &&
typeof getApp === 'function'
) { // hack vue-i18n
const app = getApp();
if (app.$vm && app.$vm.$i18n) {
this._i18n = app.$vm.$i18n;
......@@ -2945,7 +2945,7 @@ if (typeof Proxy !== 'undefined' && "mp-baidu" !== 'app-plus') {
uni[name] = promisify(name, todoApis[name]);
});
Object.keys(extraApi).forEach(name => {
uni[name] = promisify(name, todoApis[name]);
uni[name] = promisify(name, extraApi[name]);
});
}
......
......@@ -1940,15 +1940,10 @@ class EventChannel {
const eventChannels = {};
const eventChannelStack = [];
function getEventChannel (id) {
if (id) {
const eventChannel = eventChannels[id];
delete eventChannels[id];
return eventChannel
}
return eventChannelStack.shift()
const eventChannel = eventChannels[id];
delete eventChannels[id];
return eventChannel
}
const hooks = [
......@@ -2080,7 +2075,10 @@ function parseBaseApp (vm, {
delete this.$options.mpType;
delete this.$options.mpInstance;
if (this.mpType === 'page' && typeof getApp === 'function') { // hack vue-i18n
if (
( this.mpType === 'page') &&
typeof getApp === 'function'
) { // hack vue-i18n
const app = getApp();
if (app.$vm && app.$vm.$i18n) {
this._i18n = app.$vm.$i18n;
......@@ -2465,7 +2463,7 @@ if (typeof Proxy !== 'undefined' && "mp-jd" !== 'app-plus') {
uni[name] = promisify(name, todoApis[name]);
});
Object.keys(extraApi).forEach(name => {
uni[name] = promisify(name, todoApis[name]);
uni[name] = promisify(name, extraApi[name]);
});
}
......
......@@ -687,8 +687,6 @@ class EventChannel {
const eventChannels = {};
const eventChannelStack = [];
let id = 0;
function initEventChannel (events, cache = true) {
......@@ -696,31 +694,30 @@ function initEventChannel (events, cache = true) {
const eventChannel = new EventChannel(id, events);
if (cache) {
eventChannels[id] = eventChannel;
eventChannelStack.push(eventChannel);
}
return eventChannel
}
function getEventChannel (id) {
if (id) {
const eventChannel = eventChannels[id];
delete eventChannels[id];
return eventChannel
}
return eventChannelStack.shift()
const eventChannel = eventChannels[id];
delete eventChannels[id];
return eventChannel
}
var navigateTo = {
args (fromArgs, toArgs) {
const id = initEventChannel(fromArgs.events).id;
if (fromArgs.url) {
fromArgs.url = fromArgs.url + (fromArgs.url.indexOf('?') === -1 ? '?' : '&') + '__id__=' + id;
function navigateTo () {
let eventChannel;
return {
args (fromArgs, toArgs) {
eventChannel = initEventChannel(fromArgs.events);
if (fromArgs.url) {
fromArgs.url = fromArgs.url + (fromArgs.url.indexOf('?') === -1 ? '?' : '&') + '__id__=' + eventChannel.id;
}
},
returnValue (fromRes, toRes) {
fromRes.eventChannel = eventChannel;
}
},
returnValue (fromRes, toRes) {
fromRes.eventChannel = getEventChannel();
}
};
}
function findExistsPageIndex (url) {
const pages = getCurrentPages();
......@@ -952,7 +949,7 @@ var getUserProfile = {
};
const protocols = {
navigateTo,
navigateTo: navigateTo(),
redirectTo,
previewImage,
getSystemInfo,
......@@ -2176,7 +2173,10 @@ function parseBaseApp (vm, {
delete this.$options.mpType;
delete this.$options.mpInstance;
if (this.mpType === 'page' && typeof getApp === 'function') { // hack vue-i18n
if (
( this.mpType === 'page') &&
typeof getApp === 'function'
) { // hack vue-i18n
const app = getApp();
if (app.$vm && app.$vm.$i18n) {
this._i18n = app.$vm.$i18n;
......@@ -2606,7 +2606,7 @@ if (typeof Proxy !== 'undefined' && "mp-kuaishou" !== 'app-plus') {
uni[name] = promisify(name, todoApis[name]);
});
Object.keys(extraApi).forEach(name => {
uni[name] = promisify(name, todoApis[name]);
uni[name] = promisify(name, extraApi[name]);
});
}
......
......@@ -687,8 +687,6 @@ class EventChannel {
const eventChannels = {};
const eventChannelStack = [];
let id = 0;
function initEventChannel (events, cache = true) {
......@@ -696,31 +694,30 @@ function initEventChannel (events, cache = true) {
const eventChannel = new EventChannel(id, events);
if (cache) {
eventChannels[id] = eventChannel;
eventChannelStack.push(eventChannel);
}
return eventChannel
}
function getEventChannel (id) {
if (id) {
const eventChannel = eventChannels[id];
delete eventChannels[id];
return eventChannel
}
return eventChannelStack.shift()
const eventChannel = eventChannels[id];
delete eventChannels[id];
return eventChannel
}
var navigateTo = {
args (fromArgs, toArgs) {
const id = initEventChannel(fromArgs.events).id;
if (fromArgs.url) {
fromArgs.url = fromArgs.url + (fromArgs.url.indexOf('?') === -1 ? '?' : '&') + '__id__=' + id;
function navigateTo () {
let eventChannel;
return {
args (fromArgs, toArgs) {
eventChannel = initEventChannel(fromArgs.events);
if (fromArgs.url) {
fromArgs.url = fromArgs.url + (fromArgs.url.indexOf('?') === -1 ? '?' : '&') + '__id__=' + eventChannel.id;
}
},
returnValue (fromRes, toRes) {
fromRes.eventChannel = eventChannel;
}
},
returnValue (fromRes, toRes) {
fromRes.eventChannel = getEventChannel();
}
};
}
function findExistsPageIndex (url) {
const pages = getCurrentPages();
......@@ -953,7 +950,7 @@ var getUserProfile = {
// 需要做转换的 API 列表
const protocols = {
navigateTo,
navigateTo: navigateTo(),
redirectTo,
previewImage,
getSystemInfo,
......@@ -2214,7 +2211,11 @@ function parseBaseApp (vm, {
delete this.$options.mpType;
delete this.$options.mpInstance;
if (this.mpType === 'page' && typeof getApp === 'function') { // hack vue-i18n
if (
( this.mpType !== 'app'
) &&
typeof getApp === 'function'
) { // hack vue-i18n
const app = getApp();
if (app.$vm && app.$vm.$i18n) {
this._i18n = app.$vm.$i18n;
......@@ -2716,7 +2717,7 @@ if (typeof Proxy !== 'undefined' && "mp-lark" !== 'app-plus') {
uni[name] = promisify(name, todoApis[name]);
});
Object.keys(extraApi).forEach(name => {
uni[name] = promisify(name, todoApis[name]);
uni[name] = promisify(name, extraApi[name]);
});
}
......
......@@ -687,8 +687,6 @@ class EventChannel {
const eventChannels = {};
const eventChannelStack = [];
let id = 0;
function initEventChannel (events, cache = true) {
......@@ -696,31 +694,30 @@ function initEventChannel (events, cache = true) {
const eventChannel = new EventChannel(id, events);
if (cache) {
eventChannels[id] = eventChannel;
eventChannelStack.push(eventChannel);
}
return eventChannel
}
function getEventChannel (id) {
if (id) {
const eventChannel = eventChannels[id];
delete eventChannels[id];
return eventChannel
}
return eventChannelStack.shift()
const eventChannel = eventChannels[id];
delete eventChannels[id];
return eventChannel
}
var navigateTo = {
args (fromArgs, toArgs) {
const id = initEventChannel(fromArgs.events).id;
if (fromArgs.url) {
fromArgs.url = fromArgs.url + (fromArgs.url.indexOf('?') === -1 ? '?' : '&') + '__id__=' + id;
function navigateTo () {
let eventChannel;
return {
args (fromArgs, toArgs) {
eventChannel = initEventChannel(fromArgs.events);
if (fromArgs.url) {
fromArgs.url = fromArgs.url + (fromArgs.url.indexOf('?') === -1 ? '?' : '&') + '__id__=' + eventChannel.id;
}
},
returnValue (fromRes, toRes) {
fromRes.eventChannel = eventChannel;
}
},
returnValue (fromRes, toRes) {
fromRes.eventChannel = getEventChannel();
}
};
}
function findExistsPageIndex (url) {
const pages = getCurrentPages();
......@@ -952,7 +949,7 @@ var getUserProfile = {
};
const protocols = {
navigateTo,
navigateTo: navigateTo(),
redirectTo,
previewImage,
getSystemInfo,
......@@ -2334,7 +2331,10 @@ function parseBaseApp (vm, {
delete this.$options.mpType;
delete this.$options.mpInstance;
if (this.mpType === 'page' && typeof getApp === 'function') { // hack vue-i18n
if (
( this.mpType === 'page') &&
typeof getApp === 'function'
) { // hack vue-i18n
const app = getApp();
if (app.$vm && app.$vm.$i18n) {
this._i18n = app.$vm.$i18n;
......@@ -2725,7 +2725,7 @@ if (typeof Proxy !== 'undefined' && "mp-qq" !== 'app-plus') {
uni[name] = promisify(name, todoApis[name]);
});
Object.keys(extraApi).forEach(name => {
uni[name] = promisify(name, todoApis[name]);
uni[name] = promisify(name, extraApi[name]);
});
}
......
......@@ -2406,7 +2406,11 @@ function parseBaseApp (vm, {
delete this.$options.mpType;
delete this.$options.mpInstance;
if (this.mpType === 'page' && typeof getApp === 'function') { // hack vue-i18n
if (
( this.mpType !== 'app'
) &&
typeof getApp === 'function'
) { // hack vue-i18n
const app = getApp();
if (app.$vm && app.$vm.$i18n) {
this._i18n = app.$vm.$i18n;
......
......@@ -2073,7 +2073,10 @@ function parseBaseApp (vm, {
delete this.$options.mpType;
delete this.$options.mpInstance;
if (this.mpType === 'page' && typeof getApp === 'function') { // hack vue-i18n
if (
( this.mpType === 'page') &&
typeof getApp === 'function'
) { // hack vue-i18n
const app = getApp();
if (app.$vm && app.$vm.$i18n) {
this._i18n = app.$vm.$i18n;
......
......@@ -687,8 +687,6 @@ class EventChannel {
const eventChannels = {};
const eventChannelStack = [];
let id = 0;
function initEventChannel (events, cache = true) {
......@@ -696,31 +694,30 @@ function initEventChannel (events, cache = true) {
const eventChannel = new EventChannel(id, events);
if (cache) {
eventChannels[id] = eventChannel;
eventChannelStack.push(eventChannel);
}
return eventChannel
}
function getEventChannel (id) {
if (id) {
const eventChannel = eventChannels[id];
delete eventChannels[id];
return eventChannel
}
return eventChannelStack.shift()
const eventChannel = eventChannels[id];
delete eventChannels[id];
return eventChannel
}
var navigateTo = {
args (fromArgs, toArgs) {
const id = initEventChannel(fromArgs.events).id;
if (fromArgs.url) {
fromArgs.url = fromArgs.url + (fromArgs.url.indexOf('?') === -1 ? '?' : '&') + '__id__=' + id;
function navigateTo () {
let eventChannel;
return {
args (fromArgs, toArgs) {
eventChannel = initEventChannel(fromArgs.events);
if (fromArgs.url) {
fromArgs.url = fromArgs.url + (fromArgs.url.indexOf('?') === -1 ? '?' : '&') + '__id__=' + eventChannel.id;
}
},
returnValue (fromRes, toRes) {
fromRes.eventChannel = eventChannel;
}
},
returnValue (fromRes, toRes) {
fromRes.eventChannel = getEventChannel();
}
};
}
function findExistsPageIndex (url) {
const pages = getCurrentPages();
......@@ -944,7 +941,7 @@ var getSystemInfo = {
};
const protocols = {
navigateTo,
navigateTo: navigateTo(),
redirectTo,
previewImage,
getSystemInfo,
......@@ -2084,7 +2081,10 @@ function parseBaseApp (vm, {
delete this.$options.mpType;
delete this.$options.mpInstance;
if (this.mpType === 'page' && typeof getApp === 'function') { // hack vue-i18n
if (
( this.mpType === 'page') &&
typeof getApp === 'function'
) { // hack vue-i18n
const app = getApp();
if (app.$vm && app.$vm.$i18n) {
this._i18n = app.$vm.$i18n;
......@@ -2593,7 +2593,7 @@ if (typeof Proxy !== 'undefined' && "quickapp-webview" !== 'app-plus') {
uni[name] = promisify(name, todoApis[name]);
});
Object.keys(extraApi).forEach(name => {
uni[name] = promisify(name, todoApis[name]);
uni[name] = promisify(name, extraApi[name]);
});
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册