1显示价格
This commit is contained in:
		| @ -526,9 +526,14 @@ | ||||
|         :loading="loading" | ||||
|       > | ||||
|         <div style="text-align: right"> | ||||
|           <vs-button olor="primary" type="border" @click="getIpList" | ||||
|           <div style="    display: flex;align-items: center;scrollbar-gutter: 20px;column-gap: 20px;justify-content: right;"> | ||||
|             <span>价格U: {{this.price}}</span> <vs-button olor="primary" type="border" @click="getIpList" | ||||
|             >刷新</vs-button | ||||
|           > | ||||
|           </div> | ||||
|            | ||||
|  | ||||
|            | ||||
|           <vs-table :data="useList" class="tablex"> | ||||
|             <template slot="thead"> | ||||
|               <vs-th class="table-cell-center"> IP </vs-th> | ||||
| @ -614,7 +619,10 @@ | ||||
|           </vs-select> | ||||
|         </div> | ||||
|  | ||||
|         <div style="text-align: right"> | ||||
|         <div class="form-item" style="text-align: right;"> | ||||
|           价格U: {{this.price}} | ||||
|         </div> | ||||
|         <div class="form-item" style="text-align: right"> | ||||
|           <vs-button size="small" @click="handleGetTrafficProxy" | ||||
|             >提取</vs-button | ||||
|           > | ||||
| @ -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(); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user