修复分享链接错误。修复在线预览按钮,优化部分代码(同步更新)
This commit is contained in:
parent
a5ec361fbd
commit
57ff0a3686
@ -50,7 +50,8 @@
|
|||||||
</table>
|
</table>
|
||||||
<el-button @click="postTask" v-if="chosenGallery.availableResolution">下载</el-button>
|
<el-button @click="postTask" v-if="chosenGallery.availableResolution">下载</el-button>
|
||||||
<tr v-if="!chosenGallery.availableResolution">
|
<tr v-if="!chosenGallery.availableResolution">
|
||||||
<el-button @click="onlineGalleryReader(chosenGallery.name)">在线看</el-button>
|
<el-button @click="onlineGalleryReader(chosenGallery.gid)">在线预览</el-button>
|
||||||
|
<el-button @click="showThumbnail(chosenGallery)">查看封面图</el-button>
|
||||||
<el-button @click="deleteGallery">删除</el-button>
|
<el-button @click="deleteGallery">删除</el-button>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@ -256,14 +257,21 @@ function coverLink(rawLink){
|
|||||||
function openPanel(){
|
function openPanel(){
|
||||||
store.commit("_openHistoryPanel")
|
store.commit("_openHistoryPanel")
|
||||||
}
|
}
|
||||||
function onlineGalleryReader(name){
|
function onlineGalleryReader(gid){
|
||||||
window.open("http://zfile.lionwebsite.xyz/1/gallery/" + encodeURI(name))
|
store.dispatch("queryOnlineLinks", gid)
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteAuthCode(){
|
function deleteAuthCode(){
|
||||||
localStorage.removeItem('auth')
|
localStorage.removeItem('auth')
|
||||||
ElMessage("删除授权码完成")
|
ElMessage("删除授权码完成")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//显示缩略图
|
||||||
|
function showThumbnail(gallery){
|
||||||
|
store.commit("_changeThumbnailGallery", gallery)
|
||||||
|
setTimeout(() => {document.querySelector(".preview > img").click()}, 1)
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const auth = localStorage.getItem("auth")
|
const auth = localStorage.getItem("auth")
|
||||||
if(auth !== null){
|
if(auth !== null){
|
||||||
|
|||||||
@ -302,8 +302,7 @@ function shareGallery(data){
|
|||||||
axios.post("http://downloader.lionwebsite.xyz/GalleryManage/share?userId=3&expireHour=3&gid=" + gid).then((res) => {
|
axios.post("http://downloader.lionwebsite.xyz/GalleryManage/share?userId=3&expireHour=3&gid=" + gid).then((res) => {
|
||||||
if(res.data.result === "success"){
|
if(res.data.result === "success"){
|
||||||
let data = JSON.parse(res.data.data)
|
let data = JSON.parse(res.data.data)
|
||||||
link = 'http://lionwebsite.xyz/GetFile/{1}?ShareCode={2}'.replace("{1}", shortName).replace("{2}", data.shareCode)
|
link = 'http://lionwebsite.xyz/GetFile/{0}?ShareCode={1}'.replace('{0}', encodeURIComponent(shortName)).replace('{1}', data.shareCode)
|
||||||
console.log(data)
|
|
||||||
ElMessage({dangerouslyUseHTMLString: true,
|
ElMessage({dangerouslyUseHTMLString: true,
|
||||||
message: "<span>分享成功, 过期时间:" + data.expireTime + "</span><br><a href=" + link + ">链接</a>",
|
message: "<span>分享成功, 过期时间:" + data.expireTime + "</span><br><a href=" + link + ">链接</a>",
|
||||||
duration: 0,
|
duration: 0,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user