Files
EdgeAdmin/web/public/js/components/plans/plan-price-view.js

34 lines
1.2 KiB
JavaScript
Raw Normal View History

2021-10-29 14:02:01 +08:00
Vue.component("plan-price-view", {
props: ["v-plan"],
data: function () {
return {
plan: this.vPlan
}
},
template: `<div>
<span v-if="plan.priceType == 'period'">
2022-01-23 19:16:22 +08:00
按时间周期计费
<div>
<span class="grey small">
<span v-if="plan.monthlyPrice > 0">月度{{plan.monthlyPrice}}<br/></span>
<span v-if="plan.seasonallyPrice > 0">季度{{plan.seasonallyPrice}}<br/></span>
<span v-if="plan.yearlyPrice > 0">年度{{plan.yearlyPrice}}</span>
</span>
</div>
2021-10-29 14:02:01 +08:00
</span>
2021-11-09 17:36:38 +08:00
<span v-if="plan.priceType == 'traffic'">
2022-01-23 19:16:22 +08:00
按流量计费
<div>
2023-12-13 11:08:35 +08:00
<span class="grey small">基础价格{{plan.trafficPrice.base}}/GiB</span>
2022-01-23 19:16:22 +08:00
</div>
2021-10-29 14:02:01 +08:00
</span>
2022-01-23 19:16:22 +08:00
<div v-if="plan.priceType == 'bandwidth' && plan.bandwidthPrice != null && plan.bandwidthPrice.percentile > 0">
{{plan.bandwidthPrice.percentile}}th带宽计费
<div>
<div v-for="range in plan.bandwidthPrice.ranges">
2023-12-03 11:30:02 +08:00
<span class="small grey">{{range.minMB}} - <span v-if="range.maxMB > 0">{{range.maxMB}}MiB</span><span v-else>&infin;</span> <span v-if="range.totalPrice > 0">{{range.totalPrice}}</span><span v-else="">{{range.pricePerMB}}/MiB</span></span>
2022-01-23 19:16:22 +08:00
</div>
</div>
</div>
2021-10-29 14:02:01 +08:00
</div>`
})