qwmsg() {
    curl 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=68fa1539-7368-4a1c-b3e0-61205cc58815' \
       -H 'Content-Type: application/json' \
       -d '
       {
            "msgtype": "text",
            "text": {
                "content": "无情的打包机调试"
            }
       }'
}

sendFileToQW() {
    echo $1
    curl 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=68fa1539-7368-4a1c-b3e0-61205cc58815' \
       -H 'Content-Type: application/json' \
       -d @- <<EOF
                 {
                      "msgtype": "file",
                      "file": {
                          "media_id": "$1"
                      }
                 }
EOF
}

sendNewsToQW() {
    curl 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=68fa1539-7368-4a1c-b3e0-61205cc58815' \
       -H 'Content-Type: application/json' \
       -d @- <<EOF
                 {
                     "msgtype": "template_card",
                     "template_card": {
                         "card_type": "news_notice",
                         "main_title": {
                             "title": "欢迎使用SPMS",
                             "desc": "打包完成"
                         },
                         "card_image": {
                             "url": "$4"
                         },
                         "horizontal_content_list": [
                            {
                                "keyname":"分支",
                                "value":"$2"
                            },
                            {
                                "keyname":"构建信息",
                                "value":"$3"
                            }
                         ],
                         "jump_list": [
                             {
                                 "type": 1,
                                 "url": "$1",
                                 "title": "APP下载"
                             }
                         ],
                         "card_action":{
                            "type":1,
                            "url":"$3"
                         }
                     }
                 }
EOF
}