提交 6a6de806 编写于 作者: Q qiang

build: runtime

上级 1ac68256
......@@ -381,7 +381,7 @@ function processArgs (methodName, fromArgs, argsOption = {}, returnValue = {}, k
keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
}
if (!keyOption) { // 不支持的参数
console.warn(`app-plus ${methodName}暂不支持${key}`);
console.warn(`The '${methodName}' method of platform 'app-plus' does not support option '${key}'`);
} else if (isStr(keyOption)) { // 重写参数 key
toArgs[keyOption] = fromArgs[key];
} else if (isPlainObject(keyOption)) { // {name:newName,value:value}可重新指定参数 key:value
......@@ -416,7 +416,7 @@ function wrapper (methodName, method) {
const protocol = protocols[methodName];
if (!protocol) { // 暂不支持的 api
return function () {
console.error(`app-plus 暂不支持${methodName}`);
console.error(`Platform 'app-plus' does not support '${methodName}'.`);
}
}
return function (arg1, arg2) { // 目前 api 最多两个参数
......@@ -463,7 +463,7 @@ function createTodoApi (name) {
complete
}) {
const res = {
errMsg: `${name}:fail:暂不支持 ${name} 方法`
errMsg: `${name}:fail method '${name}' not supported`
};
isFn(fail) && fail(res);
isFn(complete) && complete(res);
......
......@@ -1035,7 +1035,7 @@ function processArgs (methodName, fromArgs, argsOption = {}, returnValue = {}, k
keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
}
if (!keyOption) { // 不支持的参数
console.warn(`支付宝小程序 ${methodName}暂不支持${key}`);
console.warn(`The '${methodName}' method of platform '支付宝小程序' does not support option '${key}'`);
} else if (isStr(keyOption)) { // 重写参数 key
toArgs[keyOption] = fromArgs[key];
} else if (isPlainObject(keyOption)) { // {name:newName,value:value}可重新指定参数 key:value
......@@ -1070,7 +1070,7 @@ function wrapper (methodName, method) {
const protocol = protocols[methodName];
if (!protocol) { // 暂不支持的 api
return function () {
console.error(`支付宝小程序 暂不支持${methodName}`);
console.error(`Platform '支付宝小程序' does not support '${methodName}'.`);
}
}
return function (arg1, arg2) { // 目前 api 最多两个参数
......@@ -1117,7 +1117,7 @@ function createTodoApi (name) {
complete
}) {
const res = {
errMsg: `${name}:fail:暂不支持 ${name} 方法`
errMsg: `${name}:fail method '${name}' not supported`
};
isFn(fail) && fail(res);
isFn(complete) && complete(res);
......@@ -1151,7 +1151,7 @@ function getProvider ({
isFn(success) && success(res);
} else {
res = {
errMsg: 'getProvider:fail:服务[' + service + ']不存在'
errMsg: 'getProvider:fail service not found'
};
isFn(fail) && fail(res);
}
......
......@@ -703,7 +703,7 @@ function processArgs (methodName, fromArgs, argsOption = {}, returnValue = {}, k
keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
}
if (!keyOption) { // 不支持的参数
console.warn(`百度小程序 ${methodName}暂不支持${key}`);
console.warn(`The '${methodName}' method of platform '百度小程序' does not support option '${key}'`);
} else if (isStr(keyOption)) { // 重写参数 key
toArgs[keyOption] = fromArgs[key];
} else if (isPlainObject(keyOption)) { // {name:newName,value:value}可重新指定参数 key:value
......@@ -738,7 +738,7 @@ function wrapper (methodName, method) {
const protocol = protocols[methodName];
if (!protocol) { // 暂不支持的 api
return function () {
console.error(`百度小程序 暂不支持${methodName}`);
console.error(`Platform '百度小程序' does not support '${methodName}'.`);
}
}
return function (arg1, arg2) { // 目前 api 最多两个参数
......@@ -785,7 +785,7 @@ function createTodoApi (name) {
complete
}) {
const res = {
errMsg: `${name}:fail:暂不支持 ${name} 方法`
errMsg: `${name}:fail method '${name}' not supported`
};
isFn(fail) && fail(res);
isFn(complete) && complete(res);
......@@ -819,7 +819,7 @@ function getProvider ({
isFn(success) && success(res);
} else {
res = {
errMsg: 'getProvider:fail:服务[' + service + ']不存在'
errMsg: 'getProvider:fail service not found'
};
isFn(fail) && fail(res);
}
......@@ -969,7 +969,7 @@ function requestPayment (params) {
}
if (parseError) {
params.fail && params.fail({
errMsg: 'requestPayment:fail: 参数 orderInfo 数据结构不正确,参考:https://uniapp.dcloud.io/api/plugins/payment?id=orderinfo'
errMsg: 'requestPayment:fail 参数 orderInfo 数据结构不正确,参考:https://uniapp.dcloud.io/api/plugins/payment?id=orderinfo'
});
} else {
swan.requestPolymerPayment(params);
......
......@@ -593,7 +593,7 @@ function processArgs (methodName, fromArgs, argsOption = {}, returnValue = {}, k
keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
}
if (!keyOption) { // 不支持的参数
console.warn(`快手小程序 ${methodName}暂不支持${key}`);
console.warn(`The '${methodName}' method of platform '快手小程序' does not support option '${key}'`);
} else if (isStr(keyOption)) { // 重写参数 key
toArgs[keyOption] = fromArgs[key];
} else if (isPlainObject(keyOption)) { // {name:newName,value:value}可重新指定参数 key:value
......@@ -628,7 +628,7 @@ function wrapper (methodName, method) {
const protocol = protocols[methodName];
if (!protocol) { // 暂不支持的 api
return function () {
console.error(`快手小程序 暂不支持${methodName}`);
console.error(`Platform '快手小程序' does not support '${methodName}'.`);
}
}
return function (arg1, arg2) { // 目前 api 最多两个参数
......@@ -675,7 +675,7 @@ function createTodoApi (name) {
complete
}) {
const res = {
errMsg: `${name}:fail:暂不支持 ${name} 方法`
errMsg: `${name}:fail method '${name}' not supported`
};
isFn(fail) && fail(res);
isFn(complete) && complete(res);
......@@ -709,7 +709,7 @@ function getProvider ({
isFn(success) && success(res);
} else {
res = {
errMsg: 'getProvider:fail:服务[' + service + ']不存在'
errMsg: 'getProvider:fail service not found'
};
isFn(fail) && fail(res);
}
......
......@@ -661,7 +661,7 @@ function processArgs (methodName, fromArgs, argsOption = {}, returnValue = {}, k
keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
}
if (!keyOption) { // 不支持的参数
console.warn(`QQ小程序 ${methodName}暂不支持${key}`);
console.warn(`The '${methodName}' method of platform 'QQ小程序' does not support option '${key}'`);
} else if (isStr(keyOption)) { // 重写参数 key
toArgs[keyOption] = fromArgs[key];
} else if (isPlainObject(keyOption)) { // {name:newName,value:value}可重新指定参数 key:value
......@@ -696,7 +696,7 @@ function wrapper (methodName, method) {
const protocol = protocols[methodName];
if (!protocol) { // 暂不支持的 api
return function () {
console.error(`QQ小程序 暂不支持${methodName}`);
console.error(`Platform 'QQ小程序' does not support '${methodName}'.`);
}
}
return function (arg1, arg2) { // 目前 api 最多两个参数
......@@ -743,7 +743,7 @@ function createTodoApi (name) {
complete
}) {
const res = {
errMsg: `${name}:fail:暂不支持 ${name} 方法`
errMsg: `${name}:fail method '${name}' not supported`
};
isFn(fail) && fail(res);
isFn(complete) && complete(res);
......@@ -777,7 +777,7 @@ function getProvider ({
isFn(success) && success(res);
} else {
res = {
errMsg: 'getProvider:fail:服务[' + service + ']不存在'
errMsg: 'getProvider:fail service not found'
};
isFn(fail) && fail(res);
}
......
......@@ -753,7 +753,7 @@ function processArgs (methodName, fromArgs, argsOption = {}, returnValue = {}, k
keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
}
if (!keyOption) { // 不支持的参数
console.warn(`头条小程序 ${methodName}暂不支持${key}`);
console.warn(`The '${methodName}' method of platform '头条小程序' does not support option '${key}'`);
} else if (isStr(keyOption)) { // 重写参数 key
toArgs[keyOption] = fromArgs[key];
} else if (isPlainObject(keyOption)) { // {name:newName,value:value}可重新指定参数 key:value
......@@ -788,7 +788,7 @@ function wrapper (methodName, method) {
const protocol = protocols[methodName];
if (!protocol) { // 暂不支持的 api
return function () {
console.error(`头条小程序 暂不支持${methodName}`);
console.error(`Platform '头条小程序' does not support '${methodName}'.`);
}
}
return function (arg1, arg2) { // 目前 api 最多两个参数
......@@ -835,7 +835,7 @@ function createTodoApi (name) {
complete
}) {
const res = {
errMsg: `${name}:fail:暂不支持 ${name} 方法`
errMsg: `${name}:fail method '${name}' not supported`
};
isFn(fail) && fail(res);
isFn(complete) && complete(res);
......@@ -869,7 +869,7 @@ function getProvider ({
isFn(success) && success(res);
} else {
res = {
errMsg: 'getProvider:fail:服务[' + service + ']不存在'
errMsg: 'getProvider:fail service not found'
};
isFn(fail) && fail(res);
}
......
......@@ -493,7 +493,7 @@ function processArgs (methodName, fromArgs, argsOption = {}, returnValue = {}, k
keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
}
if (!keyOption) { // 不支持的参数
console.warn(`微信小程序 ${methodName}暂不支持${key}`);
console.warn(`The '${methodName}' method of platform '微信小程序' does not support option '${key}'`);
} else if (isStr(keyOption)) { // 重写参数 key
toArgs[keyOption] = fromArgs[key];
} else if (isPlainObject(keyOption)) { // {name:newName,value:value}可重新指定参数 key:value
......@@ -528,7 +528,7 @@ function wrapper (methodName, method) {
const protocol = protocols[methodName];
if (!protocol) { // 暂不支持的 api
return function () {
console.error(`微信小程序 暂不支持${methodName}`);
console.error(`Platform '微信小程序' does not support '${methodName}'.`);
}
}
return function (arg1, arg2) { // 目前 api 最多两个参数
......@@ -575,7 +575,7 @@ function createTodoApi (name) {
complete
}) {
const res = {
errMsg: `${name}:fail:暂不支持 ${name} 方法`
errMsg: `${name}:fail method '${name}' not supported`
};
isFn(fail) && fail(res);
isFn(complete) && complete(res);
......@@ -609,7 +609,7 @@ function getProvider ({
isFn(success) && success(res);
} else {
res = {
errMsg: 'getProvider:fail:服务[' + service + ']不存在'
errMsg: 'getProvider:fail service not found'
};
isFn(fail) && fail(res);
}
......
......@@ -560,7 +560,7 @@ function processArgs (methodName, fromArgs, argsOption = {}, returnValue = {}, k
keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
}
if (!keyOption) { // 不支持的参数
console.warn(`快应用(Webview)版 ${methodName}暂不支持${key}`);
console.warn(`The '${methodName}' method of platform '快应用(Webview)版' does not support option '${key}'`);
} else if (isStr(keyOption)) { // 重写参数 key
toArgs[keyOption] = fromArgs[key];
} else if (isPlainObject(keyOption)) { // {name:newName,value:value}可重新指定参数 key:value
......@@ -595,7 +595,7 @@ function wrapper (methodName, method) {
const protocol = protocols[methodName];
if (!protocol) { // 暂不支持的 api
return function () {
console.error(`快应用(Webview)版 暂不支持${methodName}`);
console.error(`Platform '快应用(Webview)版' does not support '${methodName}'.`);
}
}
return function (arg1, arg2) { // 目前 api 最多两个参数
......@@ -642,7 +642,7 @@ function createTodoApi (name) {
complete
}) {
const res = {
errMsg: `${name}:fail:暂不支持 ${name} 方法`
errMsg: `${name}:fail method '${name}' not supported`
};
isFn(fail) && fail(res);
isFn(complete) && complete(res);
......@@ -684,7 +684,7 @@ function getProvider ({
isFn(success) && success(res);
} else {
res = {
errMsg: 'getProvider:fail:服务[' + service + ']不存在'
errMsg: 'getProvider:fail service not found'
};
isFn(fail) && fail(res);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册