全部板块左边需要溢出,详情页的提示框需要页面居中
This commit is contained in:
11
src/utils/bizarreUrl.js
Normal file
11
src/utils/bizarreUrl.js
Normal file
@@ -0,0 +1,11 @@
|
||||
// 稀奇古怪的url 都是一些写固定的 url 不确定什么时候修改
|
||||
|
||||
// 帖子发布的链接 在头部弹出栏 首页上下角使用
|
||||
const invitationPost = "https://www.gter.net/bbs/post.html"
|
||||
|
||||
// 投币帖子不够寄托币的
|
||||
const coinNo = "https://bbs.gter.net/thread-2543548-1-1.html"
|
||||
|
||||
|
||||
|
||||
export { invitationPost, coinNo }
|
||||
@@ -22,25 +22,18 @@ function pageMove() {
|
||||
// 跳转登录
|
||||
function goTologin() {
|
||||
let url = encodeURIComponent(location.href);
|
||||
console.log(skipUrl);
|
||||
skipUrl(`https://passport.gter.net/?referer=${url}`, false);
|
||||
}
|
||||
|
||||
// 点击复制
|
||||
function copy(value, message) {
|
||||
// 创建一个新的输入元素
|
||||
let copyInput = document.createElement('input');
|
||||
// 将输入元素添加到文档的主体中
|
||||
document.body.appendChild(copyInput);
|
||||
// 将输入元素的值设置为需要复制的URL
|
||||
copyInput.setAttribute('value', value);
|
||||
// 选择输入元素
|
||||
copyInput.select();
|
||||
// 使用clipboard API将所选文本复制到剪贴板
|
||||
navigator.clipboard.writeText(copyInput.value);
|
||||
// 向用户显示成功消息
|
||||
// 从文档中删除动态创建的输入元素
|
||||
copyInput.remove();
|
||||
let copyInput = document.createElement('input');//创建input元素
|
||||
document.body.appendChild(copyInput);//向页面底部追加输入框
|
||||
copyInput.setAttribute('value', value);//添加属性,将url赋值给input元素的value属性
|
||||
copyInput.select();//选择input元素
|
||||
document.execCommand("Copy");//执行复制命令
|
||||
//复制之后再删除元素,否则无法成功赋值
|
||||
copyInput.remove();//删除动态创建的节点
|
||||
if (message) this.$message.success(message);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user