responseType = 2;ArrayBuffer格式样例(angular2+下载html)
// 获取对应的H5内容,并转化为字符串
getHtmlStream(): void {
let bodyParam = {
"entityId": this.entityId,
"entityType": this.entityType,
'isQueryAllLevel': this.queryAllLevel
};
if (this.operationType === 'CHANGE') {
bodyParam['businessId'] = +this.pageData.operationId;
}
// 获取h5的二进制流,渲染purchase页面
this.offeringCommonService.getPageDesign(bodyParam, this.editable).then(
res => {
if(res && res.code) {
if(res.code === 105038) {
this.loadingFlag = false;
this.embeddedPurchaseDialog = {
'trigerReason': 'NOT_CONFIG_PURCHASE_PAGE',
'id': 'gadget_PurchaseDialog',
'type': 'warining_yellow',
'title': this.translate.instant('common.warning'),
'info': this.translate.instant('offering.offeringDetail.noConfigPageDesignPage'),
'displayCenter_bat': false,
'showCancel': true,
'confirmName': this.translate.instant('common.ok')
};
showCustomSmallWin('#gadget_PurchaseDialog').show();
} else {
this.messageService.errorAlert(res.message);
}
} else {
this.loadingFlag = false