1.4.5.2
This commit is contained in:
44
EdgeUser/web/views/@default/ns/plans/buy.html
Normal file
44
EdgeUser/web/views/@default/ns/plans/buy.html
Normal file
@@ -0,0 +1,44 @@
|
||||
{$layout}
|
||||
|
||||
<h4 style="margin-top: 0.6em">购买域名解析套餐</h4>
|
||||
|
||||
<form class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<csrf-token></csrf-token>
|
||||
|
||||
<input type="hidden" name="planId" :value="plan.id"/>
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">套餐类型</td>
|
||||
<td><strong>{{plan.name}}</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>付费周期</td>
|
||||
<td>
|
||||
<radio name="period" :v-value="'yearly'" v-model="period">按年</radio>
|
||||
<radio name="period" :v-value="'monthly'" v-model="period">按月</radio>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>价格</td>
|
||||
<td>
|
||||
<span v-if="period == 'yearly'">¥{{plan.yearlyPrice}}元/年</span>
|
||||
<span v-if="period == 'monthly'">¥{{plan.monthlyPrice}}元/月</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>有效期</td>
|
||||
<td>
|
||||
<span v-if="period == 'yearly'">{{plan.yearFrom}} 到 {{plan.yearTo}}</span>
|
||||
<span v-if="period == 'monthly'">{{plan.monthFrom}} 到 {{plan.monthTo}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>支付方式</td>
|
||||
<td>
|
||||
<pay-method-selector @change="changePayMethod"></pay-method-selector>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<submit-btn v-if="methodCode == '@balance'">确定使用余额购买</submit-btn>
|
||||
<submit-btn v-if="methodCode != '@balance'">下一步</submit-btn>
|
||||
</form>
|
||||
21
EdgeUser/web/views/@default/ns/plans/buy.js
Normal file
21
EdgeUser/web/views/@default/ns/plans/buy.js
Normal file
@@ -0,0 +1,21 @@
|
||||
Tea.context(function () {
|
||||
this.period = "yearly"
|
||||
|
||||
this.success = function (resp) {
|
||||
if (resp.data.success) {
|
||||
teaweb.success("套餐购买成功", function () {
|
||||
window.location = "/ns/plans"
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if (resp.data.orderCode.length > 0) {
|
||||
window.location = "/finance/pay?code=" + resp.data.orderCode + "&from=" + window.escape(window.location.toString()) + "&returnURL=/ns/plans"
|
||||
}
|
||||
}
|
||||
|
||||
this.methodCode = "@balance"
|
||||
this.changePayMethod = function (methodCode) {
|
||||
this.methodCode = methodCode
|
||||
}
|
||||
})
|
||||
5
EdgeUser/web/views/@default/ns/plans/index.css
Normal file
5
EdgeUser/web/views/@default/ns/plans/index.css
Normal file
@@ -0,0 +1,5 @@
|
||||
th span {
|
||||
color: grey;
|
||||
font-weight: normal;
|
||||
}
|
||||
/*# sourceMappingURL=index.css.map */
|
||||
1
EdgeUser/web/views/@default/ns/plans/index.css.map
Normal file
1
EdgeUser/web/views/@default/ns/plans/index.css.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA,EACC;EACC,WAAA;EACA,mBAAA","file":"index.css"}
|
||||
88
EdgeUser/web/views/@default/ns/plans/index.html
Normal file
88
EdgeUser/web/views/@default/ns/plans/index.html
Normal file
@@ -0,0 +1,88 @@
|
||||
{$layout}
|
||||
|
||||
<h4>我的套餐</h4>
|
||||
<span v-if="userPlan == null" class="grey">你尚未开通套餐服务<span v-if="plans.length > 0">,请选择下方套餐购买</span>。</span>
|
||||
<div v-if="userPlan != null">
|
||||
<span v-if="userPlan.isExpired" class="red">当前套餐:{{userPlan.plan.name}} 状态:已于{{userPlan.dayTo}}过期。</span>
|
||||
<span v-if="!userPlan.isExpired" class="green">当前套餐:{{userPlan.plan.name}},有效期至:{{userPlan.dayTo}}</span>
|
||||
</div>
|
||||
|
||||
<h4>所有套餐</h4>
|
||||
<table class="ui table selectable celled">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="three wide">功能
|
||||
<br/>
|
||||
</th>
|
||||
<th v-for="plan in plans" :class="{active: userPlan != null && userPlan.plan != null && plan.id == userPlan.plan.id}">{{plan.name}}<br/>
|
||||
<span v-if="plan.id > 0">{{plan.monthlyPrice}}元/月</span><span v-else> </span><br/>
|
||||
<span v-if="plan.id > 0">{{plan.yearlyPrice}}元/年</span><span v-else> </span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td>全球线路</td>
|
||||
<td v-for="plan in plans" :class="{active: userPlan != null && userPlan.plan != null && plan.id == userPlan.plan.id}">
|
||||
<span v-if="plan.config.supportCountryRoutes" class="green">Y</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>国内省份线路</td>
|
||||
<td v-for="plan in plans" :class="{active: userPlan != null && userPlan.plan != null && plan.id == userPlan.plan.id}">
|
||||
<span v-if="plan.config.supportChinaProvinceRoutes" class="green">Y</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ISP运营商线路</td>
|
||||
<td v-for="plan in plans" :class="{active: userPlan != null && userPlan.plan != null && plan.id == userPlan.plan.id}">
|
||||
<span v-if="plan.config.supportISPRoutes" class="green">Y</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>健康检查</td>
|
||||
<td v-for="plan in plans" :class="{active: userPlan != null && userPlan.plan != null && plan.id == userPlan.plan.id}">
|
||||
<span v-if="plan.config.supportHealthCheck" class="green">Y</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>最小TTL</td>
|
||||
<td v-for="plan in plans" :class="{active: userPlan != null && userPlan.plan != null && plan.id == userPlan.plan.id}">
|
||||
<span v-if="plan.config.minTTL > 0">{{plan.config.minTTL}}秒</span>
|
||||
<span v-else class="grey">不限</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>域名数量限制</td>
|
||||
<td v-for="plan in plans" :class="{active: userPlan != null && userPlan.plan != null && plan.id == userPlan.plan.id}">
|
||||
<span v-if="plan.config.maxDomains > 0">{{plan.config.maxDomains}}个</span>
|
||||
<span v-else class="grey">不限</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>单域名记录数限制</td>
|
||||
<td v-for="plan in plans" :class="{active: userPlan != null && userPlan.plan != null && plan.id == userPlan.plan.id}">
|
||||
<span v-if="plan.config.maxRecordsPerDomain > 0">{{plan.config.maxRecordsPerDomain}}个</span>
|
||||
<span v-else class="grey">不限</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>单记录负载均衡条数限制</td>
|
||||
<td v-for="plan in plans" :class="{active: userPlan != null && userPlan.plan != null && plan.id == userPlan.plan.id}">
|
||||
<span v-if="plan.config.maxLoadBalanceRecordsPerRecord > 0">{{plan.config.maxLoadBalanceRecordsPerRecord}}个</span>
|
||||
<span v-else class="grey">不限</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>自定义线路数量限制</td>
|
||||
<td v-for="plan in plans" :class="{active: userPlan != null && userPlan.plan != null && plan.id == userPlan.plan.id}">
|
||||
<span v-if="plan.config.maxCustomRoutes > 0">{{plan.config.maxCustomRoutes}}个</span>
|
||||
<span v-else class="grey">不限</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="userPlan == null || userPlan.isExpired">
|
||||
<td></td>
|
||||
<td v-for="plan in plans">
|
||||
<a :href="'/ns/plans/buy?planId=' + plan.id" v-if="plan.id > 0">购买</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
6
EdgeUser/web/views/@default/ns/plans/index.less
Normal file
6
EdgeUser/web/views/@default/ns/plans/index.less
Normal file
@@ -0,0 +1,6 @@
|
||||
th {
|
||||
span {
|
||||
color: grey;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user