|
...
|
...
|
@@ -3,17 +3,24 @@ import util from './util' |
|
|
|
export default {
|
|
|
|
async msg (json){
|
|
|
|
let pages = getCurrentPages();
|
|
|
|
let p = pages[pages.length - 1];
|
|
|
|
console.log('p',p.route,p.options)
|
|
|
|
//let p = pages[pages.length - 1];
|
|
|
|
let px='',pl=pages.length,str=''
|
|
|
|
for(let pi=pl-1,pj=0;pi>=0;pi--){
|
|
|
|
px+=">"+str+util.http_build_query(pages[pi].options,pages[pi].route)+"\n"
|
|
|
|
str+='→';
|
|
|
|
pj++
|
|
|
|
if(pj>2) break;
|
|
|
|
}
|
|
|
|
wx.request({
|
|
|
|
url: 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=9094c8cc-ec7f-4221-b1d9-50e71e008aa9',
|
|
|
|
//url: 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=6093c5ae-d02a-4708-99a2-e80b82280fd0',//测试用
|
|
|
|
method: 'POST',
|
|
|
|
data: {
|
|
|
|
msgtype:'markdown',
|
|
|
|
markdown:{
|
|
|
|
content:
|
|
|
|
"**"+util.unixtoTime(new Date()/1000,'YYYY-MM-DD HH:II:SS')+"**\n"+
|
|
|
|
">"+util.http_build_query(p.options,p.route)+"\n"+
|
|
|
|
px+
|
|
|
|
"><font color=\"red\">"+await getApp().getOpenid()+"</font>\n"+
|
|
|
|
">"+json.url+"\n\n"+
|
|
|
|
(typeof json.res == 'string'?json.res:JSON.stringify(json.res)).substr(0,500)+"\n\n"
|
...
|
...
|
|