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

build: runtime

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