tianyi 3 days ago
parent
commit
c24ec76d47
  1. 4
      polyfill/base64Binary.js
  2. 4
      polyfill/polyfill.js

4
polyfill/base64Binary.js

@ -20,7 +20,7 @@ const _fromCC = String.fromCharCode.bind(String);
* polyfill version of `btoa` * polyfill version of `btoa`
*/ */
const btoaPolyfill = (bin) => { const btoaPolyfill = (bin) => {
// console.log('polyfilled');
let u32, c0, c1, c2, asc = '' let u32, c0, c1, c2, asc = ''
const pad = bin.length % 3 const pad = bin.length % 3
for (let i = 0;i < bin.length;) { for (let i = 0;i < bin.length;) {
@ -41,7 +41,7 @@ const btoaPolyfill = (bin) => {
* polyfill version of `atob` * polyfill version of `atob`
*/ */
const atobPolyfill = (asc) => { const atobPolyfill = (asc) => {
// console.log('polyfilled');
asc = asc.replace(/\s+/g, '') asc = asc.replace(/\s+/g, '')
if (!b64re.test(asc)) if (!b64re.test(asc))
throw new TypeError('malformed base64.') throw new TypeError('malformed base64.')

4
polyfill/polyfill.js

@ -971,7 +971,7 @@ function routerPolyfill () {
if (res.errMsg.indexOf('tabbar page') > -1) { if (res.errMsg.indexOf('tabbar page') > -1) {
console.error('res.errMsg' + res.errMsg) console.error('res.errMsg' + res.errMsg)
var apiName = res.errMsg.match(/not\s(\w+)\sa/)[1] var apiName = res.errMsg.match(/not\s(\w+)\sa/)[1]
console.log(apiName)
var url = options.url var url = options.url
if (url) { if (url) {
var queryString = url.split('?')[1] var queryString = url.split('?')[1]
@ -1019,7 +1019,7 @@ function init () {
if (isInit) return if (isInit) return
isInit = true isInit = true
console.log("Api polyfill start")
//条件编译 //条件编译
platformPolyfill() platformPolyfill()
//登录 //登录

Loading…
Cancel
Save