Authored by zhangwenxue

chore(eslint): auto fix

@@ -16,6 +16,7 @@ @@ -16,6 +16,7 @@
16 ], 16 ],
17 "rules": { 17 "rules": {
18 "camelcase": "off", 18 "camelcase": "off",
19 - "max-len": "off" 19 + "max-len": "off",
  20 + "no-multiple-empty-lines": ["error", {"max": 1}]
20 } 21 }
21 } 22 }
@@ -43,7 +43,7 @@ export function createApp(context) { @@ -43,7 +43,7 @@ export function createApp(context) {
43 resolve(); 43 resolve();
44 }); 44 });
45 45
46 - setTimeout(function () { 46 + setTimeout(function() {
47 resolve(); 47 resolve();
48 }, 500); 48 }, 500);
49 }); 49 });
@@ -72,6 +72,6 @@ export default class reportApp { @@ -72,6 +72,6 @@ export default class reportApp {
72 }, this.events) 72 }, this.events)
73 ] 73 ]
74 } 74 }
75 - }) 75 + });
76 } 76 }
77 } 77 }
@@ -8,25 +8,32 @@ @@ -8,25 +8,32 @@
8 */ 8 */
9 function getTarget(node) { 9 function getTarget(node) {
10 if (node === void 0) { 10 if (node === void 0) {
11 - node = document.body 11 + node = document.body;
12 } 12 }
13 - if (node === true) { return document.body }  
14 - return node instanceof window.Node ? node : document.querySelector(node) 13 + if (node === true) {
  14 + return document.body;
  15 + }
  16 + return node instanceof window.Node ? node : document.querySelector(node);
15 } 17 }
16 18
17 const directive = { 19 const directive = {
18 inserted(el, { value }, vnode) { 20 inserted(el, { value }, vnode) {
19 - if (el.dataset && el.dataset.transfer !== 'true') return false; 21 + if (el.dataset && el.dataset.transfer !== 'true') {
  22 + return false;
  23 + }
20 el.className = el.className ? el.className + ' v-transfer-dom' : 'v-transfer-dom'; 24 el.className = el.className ? el.className + ' v-transfer-dom' : 'v-transfer-dom';
21 const parentNode = el.parentNode; 25 const parentNode = el.parentNode;
22 - if (!parentNode) return; 26 +
  27 + if (!parentNode) {
  28 + return;
  29 + }
23 const home = document.createComment(''); 30 const home = document.createComment('');
24 let hasMovedOut = false; 31 let hasMovedOut = false;
25 32
26 if (value !== false) { 33 if (value !== false) {
27 parentNode.replaceChild(home, el); // moving out, el is no longer in the document 34 parentNode.replaceChild(home, el); // moving out, el is no longer in the document
28 getTarget(value).appendChild(el); // moving into new place 35 getTarget(value).appendChild(el); // moving into new place
29 - hasMovedOut = true 36 + hasMovedOut = true;
30 } 37 }
31 if (!el.__transferDomData) { 38 if (!el.__transferDomData) {
32 el.__transferDomData = { 39 el.__transferDomData = {
@@ -34,14 +41,21 @@ const directive = { @@ -34,14 +41,21 @@ const directive = {
34 home: home, 41 home: home,
35 target: getTarget(value), 42 target: getTarget(value),
36 hasMovedOut: hasMovedOut 43 hasMovedOut: hasMovedOut
37 - } 44 + };
38 } 45 }
39 }, 46 },
40 componentUpdated(el, { value }) { 47 componentUpdated(el, { value }) {
41 - if (el.dataset && el.dataset.transfer !== 'true') return false; 48 + if (el.dataset && el.dataset.transfer !== 'true') {
  49 + return false;
  50 + }
  51 +
42 // need to make sure children are done updating (vs. `update`) 52 // need to make sure children are done updating (vs. `update`)
43 const ref$1 = el.__transferDomData; 53 const ref$1 = el.__transferDomData;
44 - if (!ref$1) return; 54 +
  55 + if (!ref$1) {
  56 + return;
  57 + }
  58 +
45 // homes.get(el) 59 // homes.get(el)
46 const parentNode = ref$1.parentNode; 60 const parentNode = ref$1.parentNode;
47 const home = ref$1.home; 61 const home = ref$1.home;
@@ -50,6 +64,7 @@ const directive = { @@ -50,6 +64,7 @@ const directive = {
50 if (!hasMovedOut && value) { 64 if (!hasMovedOut && value) {
51 // remove from document and leave placeholder 65 // remove from document and leave placeholder
52 parentNode.replaceChild(home, el); 66 parentNode.replaceChild(home, el);
  67 +
53 // append to target 68 // append to target
54 getTarget(value).appendChild(el); 69 getTarget(value).appendChild(el);
55 el.__transferDomData = Object.assign({}, el.__transferDomData, { hasMovedOut: true, target: getTarget(value) }); 70 el.__transferDomData = Object.assign({}, el.__transferDomData, { hasMovedOut: true, target: getTarget(value) });
@@ -63,14 +78,19 @@ const directive = { @@ -63,14 +78,19 @@ const directive = {
63 } 78 }
64 }, 79 },
65 unbind(el) { 80 unbind(el) {
66 - if (el.dataset && el.dataset.transfer !== 'true') return false; 81 + if (el.dataset && el.dataset.transfer !== 'true') {
  82 + return false;
  83 + }
67 el.className = el.className.replace('v-transfer-dom', ''); 84 el.className = el.className.replace('v-transfer-dom', '');
68 const ref$1 = el.__transferDomData; 85 const ref$1 = el.__transferDomData;
69 - if (!ref$1) return; 86 +
  87 + if (!ref$1) {
  88 + return;
  89 + }
70 if (el.__transferDomData.hasMovedOut === true) { 90 if (el.__transferDomData.hasMovedOut === true) {
71 - el.__transferDomData.parentNode && el.__transferDomData.parentNode.appendChild(el) 91 + el.__transferDomData.parentNode && el.__transferDomData.parentNode.appendChild(el);
72 } 92 }
73 - el.__transferDomData = null 93 + el.__transferDomData = null;
74 } 94 }
75 }; 95 };
76 96
@@ -2,7 +2,7 @@ export default [{ @@ -2,7 +2,7 @@ export default [{
2 path: '/mapp/mine/ufo/bankcard.html', 2 path: '/mapp/mine/ufo/bankcard.html',
3 name: 'bankcard', 3 name: 'bankcard',
4 component: () => import(/* webpackChunkName: "invite" */ './card-list') 4 component: () => import(/* webpackChunkName: "invite" */ './card-list')
5 -},{ 5 +}, {
6 path: '/mapp/mine/ufo/bankcard/add', 6 path: '/mapp/mine/ufo/bankcard/add',
7 name: 'bankcard.add', 7 name: 'bankcard.add',
8 component: () => import(/* webpackChunkName: "invite" */ './card-add') 8 component: () => import(/* webpackChunkName: "invite" */ './card-add')
@@ -76,7 +76,7 @@ export default { @@ -76,7 +76,7 @@ export default {
76 return result.data.page < result.data.pageTotal; 76 return result.data.page < result.data.pageTotal;
77 77
78 } else { 78 } else {
79 - commit(Types.FETCH_INVITE_ORDER_DETAIL_LIST_REQUEST, false) 79 + commit(Types.FETCH_INVITE_ORDER_DETAIL_LIST_REQUEST, false);
80 } 80 }
81 81
82 return false; 82 return false;
1 export default err => { 1 export default err => {
2 2
3 -}  
  3 +};
1 const mysql = require('./mysql-client'); 1 const mysql = require('./mysql-client');
2 const TABEL = 'user_alipay'; 2 const TABEL = 'user_alipay';
3 3
4 -  
5 async function insert(data) { 4 async function insert(data) {
6 return mysql(TABEL).insert({ 5 return mysql(TABEL).insert({
7 ...data, 6 ...data,
8 - createdAt: new Date().valueOf() 7 + createdAt: Date.now()
9 }); 8 });
10 } 9 }
11 10
@@ -2,6 +2,9 @@ const alipayRepository = require('./alipay.repository'); @@ -2,6 +2,9 @@ const alipayRepository = require('./alipay.repository');
2 const { logger } = global.yoho; 2 const { logger } = global.yoho;
3 const AlertAgent = require('../../utils/alert-manager'); 3 const AlertAgent = require('../../utils/alert-manager');
4 4
  5 +/**
  6 + * dingtalk 告警
  7 + */
5 const AlertType = { 8 const AlertType = {
6 MySQL: 0, 9 MySQL: 0,
7 Knex: 1, 10 Knex: 1,