界面优化
This commit is contained in:
@@ -206,7 +206,7 @@
|
||||
<td colspan="5" v-if="!site.nasname" style="color:#339933;font-weight:bold;text-align:center;">{{site.city}}</td>
|
||||
<td v-if="site.nasname">{{site.city}}</td>
|
||||
<td v-if="site.nasname">{{site.supply}}</td>
|
||||
<td v-if="site.nasname">{{site.nasname}}</td>
|
||||
<td v-if="site.nasname">{{site.nasname}} <a style="cursor:pointer;" v-on:click="copyText(site.nasname)">复制</a></td>
|
||||
<td v-if="site.nasname">{{site.online}}</td>
|
||||
<td v-if="site.nasname"><button type="button" v-on:click="detail(site)" class="btnDetail">详情</button></td>
|
||||
</tr>
|
||||
@@ -291,6 +291,31 @@
|
||||
this.select_product(0);
|
||||
},
|
||||
methods: {
|
||||
copyText(text) {
|
||||
// 检查浏览器是否支持 Clipboard API
|
||||
if (!navigator.clipboard) {
|
||||
// 如果不支持,则使用传统的 document.execCommand("copy") 方式
|
||||
const textArea = document.createElement("textarea");
|
||||
textArea.value = text;
|
||||
textArea.style.position = "fixed";
|
||||
document.body.appendChild(textArea);
|
||||
textArea.focus();
|
||||
textArea.select();
|
||||
document.execCommand("copy");
|
||||
document.body.removeChild(textArea);
|
||||
return;
|
||||
}
|
||||
|
||||
// 使用 Clipboard API 复制内容到剪切板
|
||||
navigator.clipboard.writeText(text).then(
|
||||
function() {
|
||||
console.log("复制成功");
|
||||
},
|
||||
function() {
|
||||
console.log("复制失败");
|
||||
}
|
||||
);
|
||||
},
|
||||
select_product(ProductId){
|
||||
this.product_id = ProductId;
|
||||
let datalist = [];
|
||||
|
||||
@@ -1028,6 +1028,7 @@ $(document).on("ready", function(e) {
|
||||
//充值
|
||||
recharge(money) {
|
||||
this.order_info.money = money;
|
||||
alert('此充值只针对HTTP,无法购买 动静态ip 以及其他产品,请确认仔细!');
|
||||
},
|
||||
//短效无限量购买时长修改
|
||||
dxwxl_gmsc_reduce(){
|
||||
@@ -1106,6 +1107,10 @@ $(document).on("ready", function(e) {
|
||||
this.order_info.data = this.dxwxl_data;
|
||||
break;
|
||||
case 3:
|
||||
if (this.dxbt_data.ipAmount < 500) {
|
||||
alert("ip数量最低500个");
|
||||
return;
|
||||
}
|
||||
this.order_info.data = this.dxbt_data;
|
||||
break;
|
||||
case 4:
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
<tr style="color:red">
|
||||
<td><input type="checkbox" class="selectAccount" value="@item.Account" a-status="@(item.Status)" a-pid="@(item.ProductId)" a-connectCount="@item.ConnectCount" a-aType="@item.AccountType" style="width: 0.4rem;height: 0.4rem;" /></td>
|
||||
<td>@item.ProductName/@item.PackageName</td>
|
||||
<td>@item.Account<br>@item.Pwd</td>
|
||||
<td>@item.Account <a style="cursor:pointer;" v-on:click="copyText('@item.Account')">复制</a><br>@item.Pwd <a style="cursor:pointer;" v-on:click="copyText('@item.Pwd')">复制</a></td>
|
||||
<td>
|
||||
<button type="button" class="btnXq toDetail"
|
||||
a-Id="@item.Id"
|
||||
@@ -526,6 +526,31 @@
|
||||
this.getProducts();
|
||||
},
|
||||
methods: {
|
||||
copyText(text) {
|
||||
// 检查浏览器是否支持 Clipboard API
|
||||
if (!navigator.clipboard) {
|
||||
// 如果不支持,则使用传统的 document.execCommand("copy") 方式
|
||||
const textArea = document.createElement("textarea");
|
||||
textArea.value = text;
|
||||
textArea.style.position = "fixed";
|
||||
document.body.appendChild(textArea);
|
||||
textArea.focus();
|
||||
textArea.select();
|
||||
document.execCommand("copy");
|
||||
document.body.removeChild(textArea);
|
||||
return;
|
||||
}
|
||||
|
||||
// 使用 Clipboard API 复制内容到剪切板
|
||||
navigator.clipboard.writeText(text).then(
|
||||
function() {
|
||||
console.log("复制成功");
|
||||
},
|
||||
function() {
|
||||
console.log("复制失败");
|
||||
}
|
||||
);
|
||||
},
|
||||
change_ip(account_id,package,account,old_ip){
|
||||
this.province_city = [];
|
||||
let data = {
|
||||
|
||||
Reference in New Issue
Block a user