nodejs 掘金自动签到

const Koa = require('koa'); const schedule = require('node-schedule'); const _request = require('request'); const app = new Koa(); // https://api.juejin.cn/growth_api/v1/check_in? // 自定义 const sessionid = ''; // SessionID const url = ''; // Url const options = { url: url, method:'post', headers: { 'cookie': 'sessionid='+ sessionid, ...

read more..

Vue滑动验证

created() { const url = 'https://ssl.captcha.qq.com/TCaptcha.js' const script = document.createElement('script') script.type = 'text/javascript' script.src = url document.body.appendChild(script) script.onload = () => { console.log(window.TencentCaptcha, 'script已经成功加载') this.getAppid() } }, varify() { ...

read more..

px2rem

npm i postcss-px2rem postcss.config.js module.exports = { plugins: { autoprefixer: { overrideBrowserslist: ['Android 4.1', 'iOS 7.1', 'Chrome > 31', 'ff > 31', 'ie >= 8'] }, "postcss-px2rem": { remUnit: 36, // 50px = 1rem remPrecision: 2 // rem的小数点后位数 } } }

read more..

vue-print-nb 打印

npm i vue-print-nb import Print from 'vue-print-nb' use(Print) <a-button :style="{ marginLeft: '6px' }" v-print="'#printTest'">导出PDF</a-button> #printTest 是打印的容器 printSetting:{ id:"printTest", // 打印的容器ID popTitle:"得膜率图表", // 顶部标签 preview:false, // 是否开启预览 }, 打印的时候可以表格线...

read more..

echarts 悬浮框内容

tooltip 下 formatter: function (params) { console.log(params); var result = params[0].axisValue + "<br/>"; params.forEach(function (item) { var suffix = '' if(item.seriesName.indexOf('率') != -1){ suffix = '%' }else { suffix = 'KG' ...

read more..

Vue2 动态插槽名称透传

<div class="tablesing"> <vxe-grid ref="xGrid" border show-overflow :data="dataSource" :columns="cloneColumns" height="700" :row-config="{ isHover: true, isCurrent: true,height:28 }" :column-config="{ isHover: true }" > <template v-for="(index,name) in $slots" v-slot:[name]> ...

read more..