|
@@ -430,6 +430,11 @@ export function renderOrderSplitStatus(status) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * 根据商品类型返回中文名称
|
|
|
|
+ * @param status
|
|
|
|
+ * @returns {string}
|
|
|
|
+ */
|
|
export function renderGoodsType(status) {
|
|
export function renderGoodsType(status) {
|
|
switch (status) {
|
|
switch (status) {
|
|
case Hotax.GOODS_VIRTUAL:
|
|
case Hotax.GOODS_VIRTUAL:
|
|
@@ -441,6 +446,11 @@ export function renderGoodsType(status) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * 根据资源类型获取资源中文名称
|
|
|
|
+ * @param type
|
|
|
|
+ * @returns {string}
|
|
|
|
+ */
|
|
export function getResourceTypeName(type) {
|
|
export function getResourceTypeName(type) {
|
|
switch (type) {
|
|
switch (type) {
|
|
case Hotax.RESOURCE_VIDEO:
|
|
case Hotax.RESOURCE_VIDEO:
|
|
@@ -456,18 +466,19 @@ export function getResourceTypeName(type) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-// 视频相关常量
|
|
|
|
|
|
+// 资源类型 - 中文名称map
|
|
const resourceTypes = {
|
|
const resourceTypes = {
|
|
[Hotax.RESOURCE_AUDIO]: '音频',
|
|
[Hotax.RESOURCE_AUDIO]: '音频',
|
|
[Hotax.RESOURCE_VIDEO]: '视频',
|
|
[Hotax.RESOURCE_VIDEO]: '视频',
|
|
};
|
|
};
|
|
|
|
+// 资源质量 - 中文名称map
|
|
const resourceQuality = {
|
|
const resourceQuality = {
|
|
[Hotax.QUALITY_FLUENT]: '流畅',
|
|
[Hotax.QUALITY_FLUENT]: '流畅',
|
|
[Hotax.QUALITY_STANDARD]: '标清',
|
|
[Hotax.QUALITY_STANDARD]: '标清',
|
|
[Hotax.QUALITY_HIGH]: '高清',
|
|
[Hotax.QUALITY_HIGH]: '高清',
|
|
[Hotax.QUALITY_SUPERCLEAR]: '超清',
|
|
[Hotax.QUALITY_SUPERCLEAR]: '超清',
|
|
};
|
|
};
|
|
-// 价格相关常量
|
|
|
|
|
|
+// 价格类型 - 中文名称map
|
|
const chargeUnitMap = {
|
|
const chargeUnitMap = {
|
|
[Hotax.CHARGE_UNIT_DAY]: '天',
|
|
[Hotax.CHARGE_UNIT_DAY]: '天',
|
|
[Hotax.CHARGE_UNIT_SEASON]: '季',
|
|
[Hotax.CHARGE_UNIT_SEASON]: '季',
|
|
@@ -475,6 +486,7 @@ const chargeUnitMap = {
|
|
[Hotax.CHARGE_UNIT_YEAR]: '年',
|
|
[Hotax.CHARGE_UNIT_YEAR]: '年',
|
|
[Hotax.CHARGE_UNIT_ITEM]: '件',
|
|
[Hotax.CHARGE_UNIT_ITEM]: '件',
|
|
};
|
|
};
|
|
|
|
+// 计价单位 - 时长map
|
|
const durationMap = {
|
|
const durationMap = {
|
|
[Hotax.CHARGE_UNIT_SEASON]: Hotax.DURATION_SEASON,
|
|
[Hotax.CHARGE_UNIT_SEASON]: Hotax.DURATION_SEASON,
|
|
[Hotax.CHARGE_UNIT_HALF_YEAR]: Hotax.DURATION_HALF_YEAR,
|
|
[Hotax.CHARGE_UNIT_HALF_YEAR]: Hotax.DURATION_HALF_YEAR,
|
|
@@ -489,4 +501,4 @@ const sortMap = {
|
|
[Hotax.CHARGE_UNIT_HALF_YEAR]: 2,
|
|
[Hotax.CHARGE_UNIT_HALF_YEAR]: 2,
|
|
[Hotax.CHARGE_UNIT_YEAR]: 3,
|
|
[Hotax.CHARGE_UNIT_YEAR]: 3,
|
|
};
|
|
};
|
|
-export { resourceTypes, resourceQuality, chargeUnitMap, durationMap, sortMap };
|
|
|
|
|
|
+export { resourceTypes, resourceType2Str, resourceQuality, chargeUnitMap, durationMap, sortMap };
|