国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

javascript - atom format plugin
我想大聲告訴你
我想大聲告訴你 2017-06-14 10:54:19
0
1
950

Writing js, I tried the atom-beautify plug-in. I didn’t like it very much. I recommend other plug-ins that can format, mainly for automatic alignment. I hope the code style is like this:

    cg_query: (req, res) => {
        console.log('------查詢------');
        console.log('phone: ', req.body.phone);
        console.log('token: ', req.header('token'));
        // token 驗(yàn)證通過
        // 輸入號(hào)碼合法則進(jìn)行后續(xù)操作
        let reg = /^1\d{10}$/;// 11 位數(shù)字,以 1 開頭
        if (req.body.phone && reg.test(req.body.phone)) {
            model.UserModel.findOne({ phone: req.body.phone }, 'asset', (err, result) => {
                console.log('result: ', result);
                try {
                    console.log(result.asset);
                    let a = {
                        currentGoldSum: result.asset.currentGoldSum,
                        cgEarningsSum: result.asset.cgEarningsSum,
                        cgEarningsYtd: result.asset.cgEarningsYtd
                    };
                    res.json({code: 0, msg: '查詢成功', asset: a});
                    return;
                } catch (e) {
                    console.log(e);
                }
                if (err) {
                    console.log('db error: ', err);
                }
                res.json({code:-1, msg: '查詢失敗'});
                return;
            });
        } else {
            res.json({code:-2, msg: '非法輸入'});
            return;
        }
    }
我想大聲告訴你
我想大聲告訴你

reply all(1)
學(xué)霸

Auto Indent: Select the code, then Edit -> Lines -> Auto Indent

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template