Initial commit (code only without large binaries)

This commit is contained in:
robin
2026-02-15 18:58:44 +08:00
commit 35df75498f
9442 changed files with 1495866 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
Tea.context(function () {
this.formattedAmount = ""
this.hasRegionPrice = false
this.$delay(function () {
this.changePriceType(this.config.priceType)
this.$watch("config.priceType", function (priceType) {
this.formattedAmount = ""
this.changePriceType(priceType)
})
})
this.success = function (resp) {
this.formattedAmount = resp.data.amountFormatted
this.hasRegionPrice = resp.data.hasRegionPrice
}
this.changePriceType = function (priceType) {
switch (priceType) {
case "traffic":
this.$refs.trafficInput.focus()
break
case "bandwidth":
this.$refs.bandwidthInput.focus()
break
}
}
this.requestId = ""
this.change = function () {
this.formattedAmount = ""
this.hasRegionPrice = false
let requestId = Math.random().toString()
this.requestId = requestId
this.$post("$")
.form(this.$refs.calculatorForm)
.success(function (resp) {
if (requestId == this.requestId) {
this.success(resp)
}
})
}
})