本文整理匯總了TypeScript中ts/opg.ts.default.api.serialSourceTypes方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript ts.default.api.serialSourceTypes方法的具體用法?TypeScript ts.default.api.serialSourceTypes怎麽用?TypeScript ts.default.api.serialSourceTypes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ts/opg.ts.default.api
的用法示例。
在下文中一共展示了ts.default.api.serialSourceTypes方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: constructor
constructor(assetId , containerId) {
$.when(
opg.api.contentUsages((data) => {
contentUsages = data;
}),
opg.api.copyRightTypes((data) => {
copyRightTypes = data;
}),
opg.api.priceTypes((data) => {
priceTypes = data;
}),
opg.api.serialSourceTypes((data) => {
serialSourceTypes = data;
}),
opg.api.starLevels((data) => {
starLevels = data;
}),
opg.api.ratings((data) => {
ratings = data;
}),
).then(() => {
opg.api.metaInfo({assetId}, (data) => {
data.length = opg.format.timeLength(data.length);
data.vodArrange = contentUsages[data.vodArrange] || '';
data.copyrightType = copyRightTypes[data.copyrightType] || '';
data.defaultPriceType = priceTypes[data.defaultPriceType] || '';
data.sourceType = serialSourceTypes[data.sourceType] || '';
data.starLevel = starLevels[data.starLevel] || '';
data.rating = ratings[data.rating] || '';
if (data.originDate) data.originDate = data.originDate.split(' ')[0];
let singleProgramClassName = 'forOne' ;
//todo:可能會有擴展類別
if (data.type != 1000) {
singleProgramClassName = '';
}
let html = `
<table class="search-table">
<thead>
<tr>
<td colspan="4" class="lead text-center">基本信息</td>
</tr>
</thead>
<tbody>
<tr class="forSingleFileOnly">
<td class="lead">節目名稱</td>
<td>${data.managerName||''}</td>
<td class="lead">原名稱</td>
<td>${data.oriName||''}</td>
</tr>
<tr class="forSingleFileOnly">
<td class="lead">索引名</td>
<td>${data.sortName||''}<span id=""></span></td>
<td class="lead">查詢名</td>
<td>${data.srarchName||''}</td>
</tr>
<tr>
<td class="lead">節目類型</td>
<td>${data.typeDesc||''}<span id=""></span></td>
<td class="lead">類別</td>
<td>${data.contentType||''}</td>
</tr>
<tr>
<td class="lead">欄目Category</td>
<td>${data.category||''}</td>
<td class="lead ${singleProgramClassName}"><span>總集數</span></td>
<td class="${singleProgramClassName}">${data.episodeNumber||''}</td>
</tr>
<tr>
<td class="lead"><label for="genre">子類別Genre</label></td>
<td colspan="3">${data.genre||''}</td>
</tr>
<tr>
<td class="lead">標簽Tag</td>
<td colspan="3">${data.tags||''}</td>
</tr>
<tr>
<td class="lead"><label for="categoryNames">分類</label></td>
<td colspan="3">${data.categoryNames||''}</td>
</tr>
<tr>
<td class="lead"><label for="groupNames">內容分組 </label></td>
<td colspan="3">${data.groupNames||''}</td>
</tr>
<tr>
<td class="lead">生效時間</td>
<td>${data.validTime||''}</td>
<td class="lead"><label for="expireTime">失效時間</label></td>
<td>${data.expireTime||''}</td>
</tr>
<tr>
<td class="lead">節目時長</td>
<td colspan="3">${data.length||''}</td>
</tr>
<tr>
<td class="lead"><label for="keyword">關鍵字</label></td>
<td colspan="3">${data.keyword||''}</td>
</tr>
//.........這裏部分代碼省略.........
示例2: opg
}),
//資費類型
opg.api.priceTypes(function (data) {
opg('#defaultPriceType').listBox({
data: opg.convert.hashToArray(data, (v, k) => {
return {id: k, name: v}
}),
});
}),
//節目源類型
opg.api.serialSourceTypes(function (data) {
opg('#sourceType').listBox({
data: opg.convert.hashToArray(data, (v, k) => {
return {id: k, name: v}
}),
});
}),
//推薦級別
opg.api.starLevels(function (data) {
opg('#starLevel').listBox({
data: opg.convert.hashToArray(data, (v, k) => {
return {id: k, name: v}
}),
});
}),
//限製級別
示例3:
});
let contentUsages, copyRightTypes, priceTypes, serialSourceTypes, starLevels, ratings, mediaAuditStatus;
$.when(
opg.api.contentUsages((data) => {
contentUsages = data;
}),
opg.api.copyRightTypes((data) => {
copyRightTypes = data;
}),
opg.api.priceTypes((data) => {
priceTypes = data;
}),
opg.api.serialSourceTypes((data) => {
serialSourceTypes = data;
}),
opg.api.starLevels((data) => {
starLevels = data;
}),
opg.api.ratings((data) => {
ratings = data;
}),
opg.api.mediaAuditStatus((data) => {
mediaAuditStatus = data;
}),
).then(() => {
//媒體文件
opg.api.auditMedias({assetId, orderId}, (data) => {
let arr = data.amsMediaFiles;
if (arr && arr.length)