Commit 2999a763f37a380809531d8cb6911190071c7508

Authored by vking
1 parent 0def32cf

rebot

Showing 1 changed file with 6 additions and 1 deletions
1 //https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=9094c8cc-ec7f-4221-b1d9-50e71e008aa9 1 //https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=9094c8cc-ec7f-4221-b1d9-50e71e008aa9
2 import util from './util' 2 import util from './util'
3 export default { 3 export default {
4 - msg(json){ 4 + async msg (json){
  5 + let pages = getCurrentPages();
  6 + let p = pages[pages.length - 1];
  7 + console.log('p',p.route,p.options)
5 wx.request({ 8 wx.request({
6 url: 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=9094c8cc-ec7f-4221-b1d9-50e71e008aa9', 9 url: 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=9094c8cc-ec7f-4221-b1d9-50e71e008aa9',
7 method: 'POST', 10 method: 'POST',
@@ -10,6 +13,8 @@ export default { @@ -10,6 +13,8 @@ export default {
10 markdown:{ 13 markdown:{
11 content: 14 content:
12 "**"+util.unixtoTime(new Date()/1000,'YYYY-MM-DD HH:II:SS')+"**\n"+ 15 "**"+util.unixtoTime(new Date()/1000,'YYYY-MM-DD HH:II:SS')+"**\n"+
  16 + ">"+util.http_build_query(p.options,p.route)+"\n"+
  17 + "><font color=\"red\">"+await getApp().getOpenid()+"</font>\n"+
13 ">"+json.url+"\n\n"+ 18 ">"+json.url+"\n\n"+
14 (typeof json.res == 'string'?json.res:JSON.stringify(json.res)).substr(0,500)+"\n\n" 19 (typeof json.res == 'string'?json.res:JSON.stringify(json.res)).substr(0,500)+"\n\n"
15 }, 20 },