微信JS分享iOS不回调success方法

添加一个setTimeout就好了

...
success: function(results) {
    setTimeout(function() {
        // some
    }, 500);
}
2023/05/12 posted in  Web前端

选中/取消iconfont所有图标

打开控制台,粘贴下面代码,回车


var ls = document.getElementsByClassName('icon-cover-freeze');
var mClick = function(index) {
    if (index == ls.length) return;
    ls[index].firstElementChild.click();
    setTimeout(() => {
        mClick(index + 1);
    }, 5);
};
mClick(0);

2023/05/12 posted in  Web前端

微信redirect_uri #(井号)后参数丢失的问题

2023/05/12 posted in  Web前端

vue-cli3.0.1 多页面超过5个后无法打包

2023/05/12 posted in  Web前端

CommonJS和AMD/CMD

CommonJS根据JS的表现制定规范:

{模块引用(require)} {模块定义(exports)} {模块标识(module)}

NodeJS遵循了CommonJS规范,写法如下:

// foo.js

module.exports = function(x) {
    console.log(x);
};
// index.js

let foo = require('./foo')
foo(1);
Read more   2023/05/12 posted in  Web前端

JwtBearer

JWT Token由以下三部分组成:

Read more   2023/05/12 posted in  Web前端

解决Cannot find module '../lib/completion'

// package.json
{
    "scripts": {
        "build": "gulp build"
    }
}
Read more   2023/05/12 posted in  Web前端

Google Chrome 控制台

console

console.log(object [, object, ...])

console.info(object [, object, ...])

console.error(object [, object, ...])

var str = 'hello world';
console.log('--->>>%s', str);
Read more   2023/05/12 posted in  Web前端

awesome web

Read more   2023/05/12 posted in  Web前端