@tnwx/commons
Version:
TTNWX 微信系开发脚手架之公共模块
26 lines • 698 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const OutMsg_1 = require("./OutMsg");
class OutTextMsg extends OutMsg_1.OutMsg {
constructor(inMsg) {
super(inMsg);
this.msgType = 'text';
}
toXml() {
let str = super.toXml();
if (!this.content) {
throw new Error('content is null');
}
str += '<Content><![CDATA[' + this.content + ']]></Content>\n</xml>\n';
return str;
}
get getContent() {
return this.content;
}
setContent(content) {
this.content = content;
return this;
}
}
exports.OutTextMsg = OutTextMsg;
//# sourceMappingURL=OutTextMsg.js.map