@mpxjs/api-proxy
Advanced tools
Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "@mpxjs/api-proxy", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "convert miniprogram API at each end", | ||
@@ -5,0 +5,0 @@ "module": "src/index.js", |
@@ -7,3 +7,5 @@ import { error } from '../utils' | ||
const platformMap = { | ||
'wx_ali': wxToAliApi | ||
'wx_ali': wxToAliApi, | ||
'qq_ali': wxToAliApi, | ||
'swan_ali': wxToAliApi | ||
} | ||
@@ -22,3 +24,3 @@ const platforms = ['wx', 'ali', 'swan', 'qq', 'tt'] | ||
Object.keys(wxToAliApi).forEach(api => { | ||
if (options.exclude.includes(api)) { | ||
if (~options.exclude.indexOf(api)) { | ||
return | ||
@@ -35,5 +37,5 @@ } | ||
const to = options.to | ||
let from = args.splice(args.length - 1)[0] | ||
let from = args.pop() | ||
if (typeof from !== 'string' || !platforms.includes(from)) { | ||
if (typeof from !== 'string' || !~platforms.indexOf(from)) { | ||
args.push(from) | ||
@@ -40,0 +42,0 @@ from = options.from |
@@ -523,3 +523,3 @@ import { changeOpts, handleSuccess, getEnvObj, error, warn, noop } from '../utils' | ||
opts.success = function (res) { | ||
if (res.resultCode === 9000) { | ||
if (+res.resultCode === 9000) { | ||
cacheSuc.call(this, res) | ||
@@ -526,0 +526,0 @@ } else { |
@@ -56,2 +56,4 @@ /** | ||
return qq | ||
} else if (typeof tt !== 'undefined' && typeof tt.getSystemInfo === 'function') { | ||
return tt | ||
} | ||
@@ -58,0 +60,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28769
739