UNPKG

diyi-ui

Version:

diyi A Vue.js UI

25 lines (24 loc) 773 B
var axios = require('axios') var JSON = require('./package.json') var config = { qywx: 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=e7a31ef2-61ce-43df-8395-3014f69f0bf5', url: 'http://192.168.13.217:8080/views/components/log.html' } const $post = (url, data = {}) => { return axios({ url: url, method: 'post', data: data }) } const datas = { msgtype: 'markdown', markdown: { content: `diyi-ui已发布版本至<font color=\"warning\">${JSON.version}</font>,有新的组件内容更新,请注意查看!\n访问地址:[点击查看](${config.url})` } } $post(`${config.qywx}`, datas).then((response) => { // res.json(response.data) }).catch((e) => { console.log(e) })