更新歌手页面,接口
This commit is contained in:
@@ -1,10 +1,16 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="head-container">
|
||||
<div class="head-container flex">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="$refs.addSong.show()">
|
||||
添加歌曲
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<div class="flex">
|
||||
<span>歌手页地址:</span>
|
||||
<a class="cursor-pointer" target="_blank" :href="singgerUrl">{{singgerUrl}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="head-container" id="table_drag">
|
||||
<el-table :data="tableData.list" v-loading="tableData.loading" row-key="id">
|
||||
<el-table-column label="排序" sortable prop="sort"></el-table-column>
|
||||
@@ -63,6 +69,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
singgerUrl:'',
|
||||
tableData: {
|
||||
page: 0,
|
||||
size: 10,
|
||||
@@ -76,6 +83,9 @@
|
||||
this.getTableData()
|
||||
},
|
||||
methods: {
|
||||
jumpUrl(url){
|
||||
window.open(url)
|
||||
},
|
||||
addSongSuccess() {
|
||||
this.getTableData()
|
||||
},
|
||||
@@ -132,8 +142,25 @@
|
||||
this.tableData.loading = false
|
||||
this.tableData.list = res.content
|
||||
this.tableData.total = res.totalElements
|
||||
const baseUrl=location.hostname==='localhost'? 'https://admintestweb.sxczgkj.cn': location.origin
|
||||
this.singgerUrl = baseUrl+'/song-H5/index.html?t='+res.songUrl
|
||||
} catch (error) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.flex{
|
||||
display: flex;
|
||||
align-content: center;
|
||||
}
|
||||
.cursor-pointer{
|
||||
cursor: pointer;
|
||||
color: #1890ff!important;
|
||||
transition: all 0.3s;
|
||||
font-size: 16px;
|
||||
}
|
||||
.cursor-pointer:hover{
|
||||
opacity: .7;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user