本文整理汇总了TypeScript中ts/opg.ts.default.api.newAsset方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ts.default.api.newAsset方法的具体用法?TypeScript ts.default.api.newAsset怎么用?TypeScript ts.default.api.newAsset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ts/opg.ts.default.api
的用法示例。
在下文中一共展示了ts.default.api.newAsset方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: function
window['doSave'] = function (pop: Popup, tb: Table, parentWin: Window) {
let param = $('#tbForm').fieldsToJson({
onlineTime: {
require: true,
type: 'date',
name: '上线时间',
},
episodeStart: {
require: true,
type: 'number',
name: '起始集数',
},
episodeEnd: {
require: true,
type: 'number',
name: '结束集数',
},
busiCodesList: {
require: true,
name: '业务',
},
});
if (param) {
if (param.episodeEnd < param.episodeStart)
return opg.warn('结束集数应大等于开始集数');
for (let i = param.episodeStart, l = param.episodeEnd + 1; i < l; i++) {
if (programInfo.producedEpisodes.indexOf(i)>-1)
return opg.warn('新增的剧集含已生产集数');
}
param.processType = 'NewAsset'; // 新增内容
param.assetId = assetId;
param.episodeNum = param.episodeEnd - param.episodeStart + 1;
param.seriesFlag = 1;
/*param.managerName = programInfo.managerName;
param.showName = programInfo.showName;
param.contentType = programInfo.contentType;
param.programLength = programInfo.programLength;
param.movieType = programInfo.movieType;
param.profile = programInfo.profile;*/
if (param.onlineTime.indexOf(' 00:00:00') == -1)
param.onlineTime += ' 00:00:00';
param.collectAudit = (param.collectAudit == '1');
param.collectCatalog = (param.collectCatalog == '1');
param.collectAudit3 = (param.collectAudit3 == '1');
for (let key in programInfo) {
if (param[key] === undefined) {
param[key] = programInfo[key];
}
}
delete param.producedEpisodes;
delete param.businessStatus;
delete param.busiCodes;
delete param.profileDesc;
delete param.movieTypeDesc;
if (param.programMediaFileId)
param.programMediaFileId = +param.programMediaFileId;
console.log(param);
opg.api.newAsset(param, (data) => {
pop.close();
tb.update();
parentWin['doCatalog'](data.assetId, data.id, param.managerName);
});
}
};