UNPKG

@tnwx/commons

Version:

TTNWX 微信系开发脚手架之公共模块

61 lines 1.73 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const OutMsg_1 = require("./OutMsg"); class OutMusicMsg extends OutMsg_1.OutMsg { constructor(inMsg) { super(inMsg); this.funcFlag = '0'; this.msgType = 'music'; } toXml() { let str = super.toXml(); str += '<Music>\n'; if (this.title) { str += '<Title><![CDATA[' + this.title + ']]></Title>\n'; } if (this.description) { str += '<Description><![CDATA[' + this.description + ']]></Description>\n'; } if (this.musicUrl) { str += '<MusicUrl><![CDATA[' + this.musicUrl + ']]></MusicUrl>\n'; } if (this.hqMusicUrl) { str += '<HQMusicUrl><![CDATA[' + this.hqMusicUrl + ']]></HQMusicUrl>\n'; } str += '<FuncFlag><![CDATA[' + this.hqMusicUrl + ']]></FuncFlag>\n</Music>\n'; str += '</xml>\n'; return str; } get getTitle() { return this.title; } set setTitle(title) { this.title = title; } get getDescription() { return this.description; } set setDescription(description) { this.description = description; } get getMusicUrl() { return this.musicUrl; } set setMusicUrl(musicUrl) { this.musicUrl = musicUrl; } get getHqMusicUrl() { return this.hqMusicUrl; } set setHqMusicUrl(hqMusicUrl) { this.hqMusicUrl = hqMusicUrl; } get getFuncFlag() { return this.funcFlag; } set setFuncFlag(funcFlag) { this.funcFlag = funcFlag ? '1' : '0'; } } exports.OutMusicMsg = OutMusicMsg; //# sourceMappingURL=OutMusicMsg.js.map