const system = require("../system");
class dingClient {
  constructor() {
    this.execClient = system.getObject('util.execClient');
    this.dingurl = "https://oapi.dingtalk.com/robot/send?access_token=ff86b791b66e41380a5e2f108ed95024fcc37002093f97d3ffa8c4df1f336f1a"
  }
  //推送订单提醒
  async tmNotify(content) {
      let t = new Date().toLocaleString()
      var rtn = await this.execClient.execPost({
        "msgtype": "text",
        "text": {"content": t + content},
      }, this.dingurl);
      console.log(rtn)
      return rtn
  }
}
module.exports = dingClient;
