diff --git a/web/public/js/components.js b/web/public/js/components.js index da1951cf..64e48944 100644 --- a/web/public/js/components.js +++ b/web/public/js/components.js @@ -853,67 +853,6 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio -`}),Vue.component("plan-bandwidth-ranges",{props:["v-ranges"],data:function(){let e=this.vRanges;return{ranges:e=null==e?[]:e,isAdding:!1,minMB:"",maxMB:"",pricePerMB:"",totalPrice:"",addingRange:{minMB:0,maxMB:0,pricePerMB:0,totalPrice:0}}},methods:{add:function(){this.isAdding=!this.isAdding;let e=this;setTimeout(function(){e.$refs.minMB.focus()})},cancelAdding:function(){this.isAdding=!1},confirm:function(){this.isAdding=!1,this.minMB="",this.maxMB="",this.pricePerMB="",this.totalPrice="",this.ranges.push(this.addingRange),this.ranges.$sort(function(e,t){return e.minMB - -
-
- {{range.minMB}}MB - {{range.maxMB}}MB   价格:{{range.totalPrice}}元{{range.pricePerMB}}元/MB -   -
-
-
- - -
- - - - - - - - - - - - - - - - - -
带宽下限 * -
- - MB -
-
带宽上限 * -
- - MB -
-

如果填0,表示上不封顶。

-
总价格 -
- - 元/MB -
-

和单位价格二选一。

-
单位价格 -
- - 元/MB -
-

和总价格二选一。如果设置了单位价格,那么"总价格 = 单位价格 x 带宽"。

-
-   - -
- - -
- -
`}),Vue.component("plan-price-config-box",{props:["v-price-type","v-monthly-price","v-seasonally-price","v-yearly-price","v-traffic-price","v-bandwidth-price","v-disable-period"],data:function(){let e=this.vPriceType,t=(null==e&&(e="bandwidth"),0),i=this.vMonthlyPrice,s=(null==i||i<=0?i="":(i=i.toString(),t=parseFloat(i),isNaN(t)&&(t=0)),0),n=this.vSeasonallyPrice,o=(null==n||n<=0?n="":(n=n.toString(),s=parseFloat(n),isNaN(s)&&(s=0)),0),a=this.vYearlyPrice,l=(null==a||a<=0?a="":(a=a.toString(),o=parseFloat(a),isNaN(o)&&(o=0)),this.vTrafficPrice),c=0,r=(null!=l?c=l.base:l={base:0},""),d=(0 @@ -994,11 +933,250 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio 带宽价格 - + +`}),Vue.component("plan-price-traffic-config-box",{props:["v-plan-price-traffic-config"],data:function(){let e=this.vPlanPriceTrafficConfig;return null==(e=null==e?{base:0,ranges:[],supportRegions:!1}:e).ranges&&(e.ranges=[]),{config:e,priceBase:e.base,isEditing:!1}},watch:{priceBase:function(e){e=parseFloat(e);isNaN(e)||e<0?this.config.base=0:this.config.base=e}},methods:{edit:function(){this.isEditing=!this.isEditing}},template:`
+ +
+ 基础流量价格:{{config.base}}元/GB没有设置   |   + 阶梯价格:{{config.ranges.length}}段没有设置   |  支持区域流量计费 +
+ 修改 +
+
+
+ + + + + + + + + + + + + +
基础流量费用 +
+ + 元/GB +
+

没有定义流量阶梯价格时,使用此价格。

+
流量阶梯价格 + +
支持按区域流量计费 + +

选中后,表示可以根据节点所在区域设置不同的流量价格。

+
+
+
`}),Vue.component("plan-bandwidth-ranges",{props:["value"],data:function(){let e=this.value;return{ranges:e=null==e?[]:e,isAdding:!1,minMB:"",minMBUnit:"mb",maxMB:"",maxMBUnit:"mb",pricePerMB:"",totalPrice:"",addingRange:{minMB:0,maxMB:0,pricePerMB:0,totalPrice:0}}},methods:{add:function(){this.isAdding=!this.isAdding;let e=this;setTimeout(function(){e.$refs.minMB.focus()})},cancelAdding:function(){this.isAdding=!1},confirm:function(){this.addingRange.minMB<0?teaweb.warn("带宽下限需要大于0"):this.addingRange.maxMB<0?teaweb.warn("带宽上限需要大于0"):this.addingRange.pricePerMB<=0?teaweb.warn("请设置单位价格或者总价格"):(this.isAdding=!1,this.minMB="",this.maxMB="",this.pricePerMB="",this.totalPrice="",this.ranges.push(this.addingRange),this.ranges.$sort(function(e,t){return e.minMB + +
+
+ {{formatMB(range.minMB)}} - {{formatMB(range.maxMB)}}   价格:{{range.totalPrice}}元{{range.pricePerMB}}元/Mbps +   +
+
+
+ + +
+ + + + + + + + + + + + + + + + + +
带宽下限 * +
+
+ +
+
+ +
+
+
带宽上限 * +
+
+ +
+
+ +
+
+

如果填0,表示上不封顶。

+
单位价格 +
+ + 元/Mbps +
+

和总价格二选一。如果设置了单位价格,那么"总价格 = 单位价格 x 带宽/Mbps"。

+
总价格 +
+ + +
+

固定的总价格,和单位价格二选一。

+
+   + +
+ + +
+ +
+`}),Vue.component("plan-price-bandwidth-config-box",{props:["v-plan-price-bandwidth-config"],data:function(){let e=this.vPlanPriceBandwidthConfig;return null==(e=null==e?{percentile:95,base:0,ranges:[],supportRegions:!1}:e).ranges&&(e.ranges=[]),{config:e,bandwidthPercentile:e.percentile,priceBase:e.base,isEditing:!1}},watch:{priceBase:function(e){e=parseFloat(e);isNaN(e)||e<0?this.config.base=0:this.config.base=e},bandwidthPercentile:function(e){e=parseInt(e);isNaN(e)||e<0?this.config.percentile=0:this.config.percentile=e}},methods:{edit:function(){this.isEditing=!this.isEditing}},template:`
+ +
+ 带宽百分位:{{config.percentile}}th没有设置   |   + 基础带宽价格:{{config.base}}元/Mbps没有设置   |   + 阶梯价格:{{config.ranges.length}}段没有设置   |  支持区域带宽计费 +
+ 修改 +
+
+
+ + + + + + + + + + + + + + + + + +
带宽百分位 * +
+ + th +
+

带宽计费位置,在1-100之间。

+
基础带宽费用 +
+ + 元/Mbps +
+

没有定义带宽阶梯价格时,使用此价格。

+
带宽阶梯价格 + +
支持按区域带宽计费 + +

选中后,表示可以根据节点所在区域设置不同的带宽价格。

+
+
+
`}),Vue.component("plan-traffic-ranges",{props:["value"],data:function(){let e=this.value;return{ranges:e=null==e?[]:e,isAdding:!1,minGB:"",minGBUnit:"gb",maxGB:"",maxGBUnit:"gb",pricePerGB:"",totalPrice:"",addingRange:{minGB:0,maxGB:0,pricePerGB:0,totalPrice:0}}},methods:{add:function(){this.isAdding=!this.isAdding;let e=this;setTimeout(function(){e.$refs.minGB.focus()})},cancelAdding:function(){this.isAdding=!1},confirm:function(){this.addingRange.minGB<0?teaweb.warn("流量下限需要大于0"):this.addingRange.maxGB<0?teaweb.warn("流量上限需要大于0"):this.addingRange.pricePerGB<=0&&this.addingRange.totalPrice<=0?teaweb.warn("请设置单位价格或者总价格"):(this.isAdding=!1,this.minGB="",this.maxGB="",this.pricePerGB="",this.totalPrice="",this.ranges.push(this.addingRange),this.ranges.$sort(function(e,t){return e.minGB + +
+
+ {{formatGB(range.minGB)}} - {{formatGB(range.maxGB)}}   价格:{{range.totalPrice}}元{{range.pricePerGB}}元/GB +   +
+
+
+ + +
+ + + + + + + + + + + + + + + + + +
流量下限 * +
+
+ +
+
+ +
+
+
流量上限 * +
+
+ +
+
+ +
+
+

如果填0,表示上不封顶。

+
单位价格 +
+ + 元/GB +
+

和总价格二选一。如果设置了单位价格,那么"总价格 = 单位价格 x 流量/GB"。

+
总价格 +
+ + +
+

固定的总价格,和单位价格二选一。

+
+   + +
+ + +
+ +
`}),Vue.component("http-stat-config-box",{props:["v-stat-config","v-is-location","v-is-group"],data:function(){let e=this.vStatConfig;return{stat:e=null==e?{isPrior:!1,isOn:!1}:e}},template:`
@@ -1598,7 +1776,7 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio @@ -4681,7 +4859,7 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio

常用时间:  1小时  |  1天  |  3天  |  1周  |  30天 

-`}),Vue.component("label-on",{props:["v-is-on"],template:'
已启用已停用
'}),Vue.component("code-label",{methods:{click:function(e){this.$emit("click",e)}},template:''}),Vue.component("code-label-plain",{template:''}),Vue.component("tiny-label",{template:''}),Vue.component("tiny-basic-label",{template:''}),Vue.component("micro-basic-label",{template:''}),Vue.component("grey-label",{props:["color"],data:function(){let e="grey";return{labelColor:e=null!=this.color&&0'}),Vue.component("optional-label",{template:'(可选)'}),Vue.component("plus-label",{template:'Plus专属功能。'}),Vue.component("pro-warning-label",{template:'注意:通常不需要修改;如要修改,请在专家指导下进行。'}),Vue.component("first-menu",{props:[],template:' \t\t
\t\t\t \t\t\t
\t\t
'}),Vue.component("more-options-indicator",{data:function(){return{visible:!1}},methods:{changeVisible:function(){this.visible=!this.visible,null!=Tea.Vue&&(Tea.Vue.moreOptionsVisible=this.visible),this.$emit("change",this.visible)}},template:'更多选项收起选项 '}),Vue.component("page-size-selector",{data:function(){let t=window.location.search,i=10;if(0 +`}),Vue.component("label-on",{props:["v-is-on"],template:'
已启用已停用
'}),Vue.component("code-label",{methods:{click:function(e){this.$emit("click",e)}},template:''}),Vue.component("code-label-plain",{template:''}),Vue.component("tiny-label",{template:''}),Vue.component("tiny-basic-label",{template:''}),Vue.component("micro-basic-label",{template:''}),Vue.component("grey-label",{props:["color"],data:function(){let e="grey";return{labelColor:e=null!=this.color&&0'}),Vue.component("optional-label",{template:'(可选)'}),Vue.component("plus-label",{template:'Plus专属功能。'}),Vue.component("pro-warning-label",{template:'注意:通常不需要修改;如要修改,请在专家指导下进行。'}),Vue.component("first-menu",{props:[],template:' \t\t
\t\t\t \t\t\t
\t\t
'}),Vue.component("more-options-indicator",{data:function(){return{visible:!1}},methods:{changeVisible:function(){this.visible=!this.visible,null!=Tea.Vue&&(Tea.Vue.moreOptionsVisible=this.visible),this.$emit("change",this.visible)}},template:'更多选项收起选项 '}),Vue.component("page-size-selector",{data:function(){let t=window.location.search,i=10;if(0 `}),Vue.component("second-menu",{template:' \t\t
\t\t\t \t\t\t
\t\t
'}),Vue.component("loading-message",{template:`
  diff --git a/web/public/js/components.src.js b/web/public/js/components.src.js index 57d5fea7..c0f30d9e 100755 --- a/web/public/js/components.src.js +++ b/web/public/js/components.src.js @@ -2559,169 +2559,6 @@ Vue.component("plan-price-view", {
` }) -Vue.component("plan-bandwidth-ranges", { - props: ["v-ranges"], - data: function () { - let ranges = this.vRanges - if (ranges == null) { - ranges = [] - } - return { - ranges: ranges, - isAdding: false, - - minMB: "", - maxMB: "", - pricePerMB: "", - totalPrice: "", - addingRange: { - minMB: 0, - maxMB: 0, - pricePerMB: 0, - totalPrice: 0 - } - } - }, - methods: { - add: function () { - this.isAdding = !this.isAdding - let that = this - setTimeout(function () { - that.$refs.minMB.focus() - }) - }, - cancelAdding: function () { - this.isAdding = false - }, - confirm: function () { - this.isAdding = false - this.minMB = "" - this.maxMB = "" - this.pricePerMB = "" - this.totalPrice = "" - this.ranges.push(this.addingRange) - this.ranges.$sort(function (v1, v2) { - if (v1.minMB < v2.minMB) { - return -1 - } - if (v1.minMB == v2.minMB) { - if (v2.maxMB == 0 || v1.maxMB < v2.maxMB) { - return -1 - } - return 0 - } - return 1 - }) - this.change() - this.addingRange = { - minMB: 0, - maxMB: 0, - pricePerMB: 0, - totalPrice: 0 - } - }, - remove: function (index) { - this.ranges.$remove(index) - this.change() - }, - change: function () { - this.$emit("change", this.ranges) - } - }, - watch: { - minMB: function (v) { - let minMB = parseInt(v.toString()) - if (isNaN(minMB) || minMB < 0) { - minMB = 0 - } - this.addingRange.minMB = minMB - }, - maxMB: function (v) { - let maxMB = parseInt(v.toString()) - if (isNaN(maxMB) || maxMB < 0) { - maxMB = 0 - } - this.addingRange.maxMB = maxMB - }, - pricePerMB: function (v) { - let pricePerMB = parseFloat(v.toString()) - if (isNaN(pricePerMB) || pricePerMB < 0) { - pricePerMB = 0 - } - this.addingRange.pricePerMB = pricePerMB - }, - totalPrice: function (v) { - let totalPrice = parseFloat(v.toString()) - if (isNaN(totalPrice) || totalPrice < 0) { - totalPrice = 0 - } - this.addingRange.totalPrice = totalPrice - } - }, - template: `
- -
-
- {{range.minMB}}MB - {{range.maxMB}}MB   价格:{{range.totalPrice}}元{{range.pricePerMB}}元/MB -   -
-
-
- - -
-
单IP最大并发连接数 -

单IP最大连接数,统计单个IP总连接数时不区分服务,超出此限制则响应用户429代码。为0表示不限制。当前设置的并发连接数过低,可能会影响正常用户访问,建议不小于3。

+

单IP最大连接数,统计单个IP总连接数时不区分服务,超出此限制则响应用户429代码。为0表示不限制。当前设置的并发连接数过低,可能会影响正常用户访问,建议不小于3。

- - - - - - - - - - - - - - - - -
带宽下限 * -
- - MB -
-
带宽上限 * -
- - MB -
-

如果填0,表示上不封顶。

-
总价格 -
- - 元/MB -
-

和单位价格二选一。

-
单位价格 -
- - 元/MB -
-

和总价格二选一。如果设置了单位价格,那么"总价格 = 单位价格 x 带宽"。

-
-   - -
- - -
- -
-` -}) - // 套餐价格配置 Vue.component("plan-price-config-box", { props: ["v-price-type", "v-monthly-price", "v-seasonally-price", "v-yearly-price", "v-traffic-price", "v-bandwidth-price", "v-disable-period"], @@ -2935,7 +2772,7 @@ Vue.component("plan-price-config-box", { 带宽价格 - + @@ -2943,6 +2780,641 @@ Vue.component("plan-price-config-box", { ` }) +Vue.component("plan-price-traffic-config-box", { + props: ["v-plan-price-traffic-config"], + data: function () { + let config = this.vPlanPriceTrafficConfig + if (config == null) { + config = { + base: 0, + ranges: [], + supportRegions: false + } + } + + if (config.ranges == null) { + config.ranges = [] + } + + return { + config: config, + priceBase: config.base, + isEditing: false + } + }, + watch: { + priceBase: function (v) { + let f = parseFloat(v) + if (isNaN(f) || f < 0) { + this.config.base = 0 + } else { + this.config.base = f + } + } + }, + methods: { + edit: function () { + this.isEditing = !this.isEditing + } + }, + template: `
+ +
+ 基础流量价格:{{config.base}}元/GB没有设置   |   + 阶梯价格:{{config.ranges.length}}段没有设置   |  支持区域流量计费 +
+ 修改 +
+
+
+ + + + + + + + + + + + + +
基础流量费用 +
+ + 元/GB +
+

没有定义流量阶梯价格时,使用此价格。

+
流量阶梯价格 + +
支持按区域流量计费 + +

选中后,表示可以根据节点所在区域设置不同的流量价格。

+
+
+
` +}) + +Vue.component("plan-bandwidth-ranges", { + props: ["value"], + data: function () { + let ranges = this.value + if (ranges == null) { + ranges = [] + } + return { + ranges: ranges, + isAdding: false, + + minMB: "", + minMBUnit: "mb", + + maxMB: "", + maxMBUnit: "mb", + + pricePerMB: "", + totalPrice: "", + addingRange: { + minMB: 0, + maxMB: 0, + pricePerMB: 0, + totalPrice: 0 + } + } + }, + methods: { + add: function () { + this.isAdding = !this.isAdding + let that = this + setTimeout(function () { + that.$refs.minMB.focus() + }) + }, + cancelAdding: function () { + this.isAdding = false + }, + confirm: function () { + if (this.addingRange.minMB < 0) { + teaweb.warn("带宽下限需要大于0") + return + } + if (this.addingRange.maxMB < 0) { + teaweb.warn("带宽上限需要大于0") + return + } + if (this.addingRange.pricePerMB <= 0) { + teaweb.warn("请设置单位价格或者总价格") + return + } + + this.isAdding = false + this.minMB = "" + this.maxMB = "" + this.pricePerMB = "" + this.totalPrice = "" + this.ranges.push(this.addingRange) + this.ranges.$sort(function (v1, v2) { + if (v1.minMB < v2.minMB) { + return -1 + } + if (v1.minMB == v2.minMB) { + if (v2.maxMB == 0 || v1.maxMB < v2.maxMB) { + return -1 + } + return 0 + } + return 1 + }) + this.change() + this.addingRange = { + minMB: 0, + maxMB: 0, + pricePerMB: 0, + totalPrice: 0 + } + }, + remove: function (index) { + this.ranges.$remove(index) + this.change() + }, + change: function () { + this.$emit("change", this.ranges) + }, + formatMB: function (mb) { + return teaweb.formatBits(mb * 1024 * 1024) + }, + changeMinMB: function (v) { + let minMB = parseFloat(v.toString()) + if (isNaN(minMB) || minMB < 0) { + minMB = 0 + } + switch (this.minMBUnit) { + case "gb": + minMB *= 1024 + break + case "tb": + minMB *= 1024 * 1024 + break + } + this.addingRange.minMB = minMB + }, + changeMaxMB: function (v) { + let maxMB = parseFloat(v.toString()) + if (isNaN(maxMB) || maxMB < 0) { + maxMB = 0 + } + switch (this.maxMBUnit) { + case "gb": + maxMB *= 1024 + break + case "tb": + maxMB *= 1024 * 1024 + break + } + this.addingRange.maxMB = maxMB + } + }, + watch: { + minMB: function (v) { + this.changeMinMB(v) + }, + minMBUnit: function () { + this.changeMinMB(this.minMB) + }, + maxMB: function (v) { + this.changeMaxMB(v) + }, + maxMBUnit: function () { + this.changeMaxMB(this.maxMB) + }, + pricePerMB: function (v) { + let pricePerMB = parseFloat(v.toString()) + if (isNaN(pricePerMB) || pricePerMB < 0) { + pricePerMB = 0 + } + this.addingRange.pricePerMB = pricePerMB + }, + totalPrice: function (v) { + let totalPrice = parseFloat(v.toString()) + if (isNaN(totalPrice) || totalPrice < 0) { + totalPrice = 0 + } + this.addingRange.totalPrice = totalPrice + } + }, + template: `
+ +
+
+ {{formatMB(range.minMB)}} - {{formatMB(range.maxMB)}}   价格:{{range.totalPrice}}元{{range.pricePerMB}}元/Mbps +   +
+
+
+ + +
+ + + + + + + + + + + + + + + + + +
带宽下限 * +
+
+ +
+
+ +
+
+
带宽上限 * +
+
+ +
+
+ +
+
+

如果填0,表示上不封顶。

+
单位价格 +
+ + 元/Mbps +
+

和总价格二选一。如果设置了单位价格,那么"总价格 = 单位价格 x 带宽/Mbps"。

+
总价格 +
+ + +
+

固定的总价格,和单位价格二选一。

+
+   + +
+ + +
+ +
+
` +}) + +Vue.component("plan-price-bandwidth-config-box", { + props: ["v-plan-price-bandwidth-config"], + data: function () { + let config = this.vPlanPriceBandwidthConfig + if (config == null) { + config = { + percentile: 95, + base: 0, + ranges: [], + supportRegions: false + } + } + + if (config.ranges == null) { + config.ranges = [] + } + + return { + config: config, + bandwidthPercentile: config.percentile, + priceBase: config.base, + isEditing: false + } + }, + watch: { + priceBase: function (v) { + let f = parseFloat(v) + if (isNaN(f) || f < 0) { + this.config.base = 0 + } else { + this.config.base = f + } + }, + bandwidthPercentile: function (v) { + let i = parseInt(v) + if (isNaN(i) || i < 0) { + this.config.percentile = 0 + } else { + this.config.percentile = i + } + } + }, + methods: { + edit: function () { + this.isEditing = !this.isEditing + } + }, + template: `
+ +
+ 带宽百分位:{{config.percentile}}th没有设置   |   + 基础带宽价格:{{config.base}}元/Mbps没有设置   |   + 阶梯价格:{{config.ranges.length}}段没有设置   |  支持区域带宽计费 +
+ 修改 +
+
+
+ + + + + + + + + + + + + + + + + +
带宽百分位 * +
+ + th +
+

带宽计费位置,在1-100之间。

+
基础带宽费用 +
+ + 元/Mbps +
+

没有定义带宽阶梯价格时,使用此价格。

+
带宽阶梯价格 + +
支持按区域带宽计费 + +

选中后,表示可以根据节点所在区域设置不同的带宽价格。

+
+
+
` +}) + +Vue.component("plan-traffic-ranges", { + props: ["value"], + data: function () { + let ranges = this.value + if (ranges == null) { + ranges = [] + } + return { + ranges: ranges, + isAdding: false, + + minGB: "", + minGBUnit: "gb", + + maxGB: "", + maxGBUnit: "gb", + + pricePerGB: "", + totalPrice: "", + addingRange: { + minGB: 0, + maxGB: 0, + pricePerGB: 0, + totalPrice: 0 + } + } + }, + methods: { + add: function () { + this.isAdding = !this.isAdding + let that = this + setTimeout(function () { + that.$refs.minGB.focus() + }) + }, + cancelAdding: function () { + this.isAdding = false + }, + confirm: function () { + if (this.addingRange.minGB < 0) { + teaweb.warn("流量下限需要大于0") + return + } + if (this.addingRange.maxGB < 0) { + teaweb.warn("流量上限需要大于0") + return + } + if (this.addingRange.pricePerGB <= 0 && this.addingRange.totalPrice <= 0) { + teaweb.warn("请设置单位价格或者总价格") + return; + } + + this.isAdding = false + this.minGB = "" + this.maxGB = "" + this.pricePerGB = "" + this.totalPrice = "" + this.ranges.push(this.addingRange) + this.ranges.$sort(function (v1, v2) { + if (v1.minGB < v2.minGB) { + return -1 + } + if (v1.minGB == v2.minGB) { + if (v2.maxGB == 0 || v1.maxGB < v2.maxGB) { + return -1 + } + return 0 + } + return 1 + }) + this.change() + this.addingRange = { + minGB: 0, + maxGB: 0, + pricePerGB: 0, + totalPrice: 0 + } + }, + remove: function (index) { + this.ranges.$remove(index) + this.change() + }, + change: function () { + this.$emit("change", this.ranges) + }, + formatGB: function (gb) { + return teaweb.formatBytes(gb * 1024 * 1024 * 1024) + }, + changeMinGB: function (v) { + let minGB = parseFloat(v.toString()) + if (isNaN(minGB) || minGB < 0) { + minGB = 0 + } + switch (this.minGBUnit) { + case "tb": + minGB *= 1024 + break + case "pb": + minGB *= 1024 * 1024 + break + case "eb": + minGB *= 1024 * 1024 * 1024 + break + } + this.addingRange.minGB = minGB + }, + changeMaxGB: function (v) { + let maxGB = parseFloat(v.toString()) + if (isNaN(maxGB) || maxGB < 0) { + maxGB = 0 + } + switch (this.maxGBUnit) { + case "tb": + maxGB *= 1024 + break + case "pb": + maxGB *= 1024 * 1024 + break + case "eb": + maxGB *= 1024 * 1024 * 1024 + break + } + this.addingRange.maxGB = maxGB + } + }, + watch: { + minGB: function (v) { + this.changeMinGB(v) + }, + minGBUnit: function (v) { + this.changeMinGB(this.minGB) + }, + maxGB: function (v) { + this.changeMaxGB(v) + }, + maxGBUnit: function (v) { + this.changeMaxGB(this.maxGB) + }, + pricePerGB: function (v) { + let pricePerGB = parseFloat(v.toString()) + if (isNaN(pricePerGB) || pricePerGB < 0) { + pricePerGB = 0 + } + this.addingRange.pricePerGB = pricePerGB + }, + totalPrice: function (v) { + let totalPrice = parseFloat(v.toString()) + if (isNaN(totalPrice) || totalPrice < 0) { + totalPrice = 0 + } + this.addingRange.totalPrice = totalPrice + } + }, + template: `
+ +
+
+ {{formatGB(range.minGB)}} - {{formatGB(range.maxGB)}}   价格:{{range.totalPrice}}元{{range.pricePerGB}}元/GB +   +
+
+
+ + +
+ + + + + + + + + + + + + + + + + +
流量下限 * +
+
+ +
+
+ +
+
+
流量上限 * +
+
+ +
+
+ +
+
+

如果填0,表示上不封顶。

+
单位价格 +
+ + 元/GB +
+

和总价格二选一。如果设置了单位价格,那么"总价格 = 单位价格 x 流量/GB"。

+
总价格 +
+ + +
+

固定的总价格,和单位价格二选一。

+
+   + +
+ + +
+ +
+
` +}) + Vue.component("http-stat-config-box", { props: ["v-stat-config", "v-is-location", "v-is-group"], data: function () { @@ -4464,7 +4936,7 @@ Vue.component("http-request-limit-config-box", { 单IP最大并发连接数 -

单IP最大连接数,统计单个IP总连接数时不区分服务,超出此限制则响应用户429代码。为0表示不限制。当前设置的并发连接数过低,可能会影响正常用户访问,建议不小于3。

+

单IP最大连接数,统计单个IP总连接数时不区分服务,超出此限制则响应用户429代码。为0表示不限制。当前设置的并发连接数过低,可能会影响正常用户访问,建议不小于3。

@@ -14042,7 +14514,7 @@ Vue.component("datetime-input", { // 启用状态标签 Vue.component("label-on", { props: ["v-is-on"], - template: '
已启用已停用
' + template: '
已启用已停用
' }) // 文字代码标签