+
+ 价格U: {{this.price}}
+
+
提取
@@ -801,7 +809,9 @@
showGetSms:false,
smsForm:{},
checkSmsCodeTimer:null,
- smsPrice:undefined
+ smsPrice:undefined,
+ //Ip单价
+ price:undefined,
};
},
mounted() {
@@ -884,6 +894,38 @@
console.log("获取服务错误:",error);
});
},
+ getPrice(){
+ this.price=undefined;
+ let configKey;
+
+ switch(this.activeMenu){
+ case 1:
+ configKey="ip_deduction_standard";
+ break;
+ case 2:
+ configKey="deduction_standard";
+ break;
+ default:
+ return;
+ }
+
+ fetch(`${requestApi}/configKey/${configKey}`,{
+ headers: {
+ Authorization: `Bearer ${this.token}`,
+ "Content-Type": "application/json",
+ Accept: "application/json",
+ }
+ })
+ .then((res) => res.json())
+ .then((response) => {
+ if (response.code === 200) {
+ this.price=Number(response.data.configValue);
+ }
+ })
+ .catch((error) => {
+ console.log(error);
+ });
+ },
showLoading(ref) {
// ref.$el.setAttribute("disabled", true);
this.$vs.loading();
@@ -917,6 +959,7 @@
window.location.href = "/";
},
handleGetProxy() {
+ this.getPrice();
if (this.activeMenu === 1) {
this.showUseProxy = true;
this.getIpList();