|
@@ -1319,8 +1319,10 @@
|
|
|
var oInput = document.createElement('input'); //创建一个input
|
|
|
oInput.setAttribute("readonly", "readonly"); //设置只读,否则移动端使用复制功能时可能会造成软件盘弹出
|
|
|
setTimeout(() => {
|
|
|
- oInput.value = window.location.href;
|
|
|
- $('.ipts')[0].appendChild(oInput)
|
|
|
+ let myUrl = window.location.href;
|
|
|
+ let copyUrl = myUrl.split('?');
|
|
|
+ oInput.value = copyUrl[0];
|
|
|
+ $('.ipts')[0].appendChild(oInput);
|
|
|
selectText(oInput, 0, oInput.value.length);
|
|
|
document.execCommand("Copy"); // 执行浏览器复制命令
|
|
|
toastr.error(`复制成功`);
|