调整工程目录
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<div class="resourcesManage">
|
||||
<div class="tab">
|
||||
<u-tabs :list="tab" :is-scroll="false" :current="currIndex" @change="change" height="96" :bar-style="barStyle"></u-tabs>
|
||||
<u-tabs :list="tab" :is-scroll="false" :current="currIndex" @change="change" height="96"
|
||||
:bar-style="barStyle"></u-tabs>
|
||||
</div>
|
||||
<div class="record" v-if="currIndex == 0">
|
||||
<div class="item" v-for="(item, index) in list" :key="index" @click="choose(item)">
|
||||
@@ -21,161 +22,167 @@
|
||||
<u-popup v-model="isShow" mode="bottom">
|
||||
<div class="audio">
|
||||
<AiVideo :src="url" autoplay></AiVideo>
|
||||
<!-- <audio :src="url" ref="audio" :controls="true" :name="autioName" style="display: block;"></audio> -->
|
||||
<!-- <audio :src="url" ref="audio" :controls="true" :name="autioName" style="display: block;"></audio> -->
|
||||
</div>
|
||||
</u-popup>
|
||||
</u-popup>
|
||||
<AiBack></AiBack>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import AiVideo from '@/components/AiVideo'
|
||||
import AiBack from "@/components/AiBack";
|
||||
export default {
|
||||
name: "resourcesManage",
|
||||
data() {
|
||||
return {
|
||||
tab: [{ name: '音频素材' }, { name: '文本素材' }],
|
||||
list: [],
|
||||
currIndex: 0,
|
||||
current: 1,
|
||||
isChoose: false,
|
||||
isMore: false,
|
||||
isShow: false,
|
||||
url: '',
|
||||
autioName: '',
|
||||
audio: null,
|
||||
barStyle: {width:'98px', bottom: '-3px', left: '-38px'}
|
||||
}
|
||||
},
|
||||
<script>
|
||||
import AiVideo from '@/components/AiVideo'
|
||||
import AiBack from "@/components/AiBack";
|
||||
|
||||
components: {
|
||||
AiBack,
|
||||
AiVideo
|
||||
},
|
||||
export default {
|
||||
name: "resourcesManage",
|
||||
data() {
|
||||
return {
|
||||
tab: [{name: '音频素材'}, {name: '文本素材'}],
|
||||
list: [],
|
||||
currIndex: 0,
|
||||
current: 1,
|
||||
isChoose: false,
|
||||
isMore: false,
|
||||
isShow: false,
|
||||
url: '',
|
||||
autioName: '',
|
||||
audio: null,
|
||||
barStyle: {width: '98px', bottom: '-3px', left: '-38px'}
|
||||
}
|
||||
},
|
||||
|
||||
onLoad (query) {
|
||||
this.isChoose = query.isChoose ? true : false
|
||||
this.getList()
|
||||
uni.$on('getList', e => {
|
||||
this.isMore = false
|
||||
this.list = []
|
||||
this.current = 1
|
||||
components: {
|
||||
AiBack,
|
||||
AiVideo
|
||||
},
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.getList()
|
||||
})
|
||||
onLoad(query) {
|
||||
this.isChoose = query.isChoose ? true : false
|
||||
this.getList()
|
||||
uni.$on('getList', e => {
|
||||
this.isMore = false
|
||||
this.list = []
|
||||
this.current = 1
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.getList()
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
change(index) {
|
||||
this.isMore = false
|
||||
this.list = []
|
||||
this.current = 1
|
||||
this.currIndex = index
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
change(index) {
|
||||
this.isMore = false
|
||||
this.list = []
|
||||
this.current = 1
|
||||
this.currIndex = index
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
add () {
|
||||
uni.navigateTo({
|
||||
url: `/pages/resourcesManage/addPlay?type=${this.currIndex === 0 ? 1 : 3}`
|
||||
})
|
||||
},
|
||||
|
||||
choose (item) {
|
||||
if (!this.isChoose) {
|
||||
console.log(item.url)
|
||||
this.url = item.url
|
||||
this.isShow = true
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
uni.$emit('choose', {
|
||||
mediaId: item.id,
|
||||
mediaName: item.name
|
||||
})
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
|
||||
getList () {
|
||||
if (this.isMore) return
|
||||
|
||||
this.$http.post(`/app/appdlbresource/list`, null, {
|
||||
params: {
|
||||
...this.search,
|
||||
type: this.currIndex === 0 ? 1 : 3,
|
||||
current: this.current,
|
||||
size: 10
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
if (this.current > 1) {
|
||||
this.list = [...this.list, ...res.data.records]
|
||||
} else {
|
||||
this.list = res.data.records
|
||||
}
|
||||
|
||||
uni.hideLoading()
|
||||
|
||||
if (res.data.records.length < 10) {
|
||||
this.isMore = true
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
this.current = this.current + 1
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
}
|
||||
}).catch(() => {
|
||||
uni.hideLoading()
|
||||
})
|
||||
}
|
||||
add() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/resourcesManage/addPlay?type=${this.currIndex === 0 ? 1 : 3}`
|
||||
})
|
||||
},
|
||||
|
||||
onReachBottom() {
|
||||
this.getList()
|
||||
choose(item) {
|
||||
if (!this.isChoose) {
|
||||
console.log(item.url)
|
||||
this.url = item.url
|
||||
this.isShow = true
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
uni.$emit('choose', {
|
||||
mediaId: item.id,
|
||||
mediaName: item.name
|
||||
})
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
|
||||
getList() {
|
||||
if (this.isMore) return
|
||||
|
||||
this.$http.post(`/app/appdlbresource/list`, null, {
|
||||
params: {
|
||||
...this.search,
|
||||
type: this.currIndex === 0 ? 1 : 3,
|
||||
current: this.current,
|
||||
size: 10
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
if (this.current > 1) {
|
||||
this.list = [...this.list, ...res.data.records]
|
||||
} else {
|
||||
this.list = res.data.records
|
||||
}
|
||||
|
||||
uni.hideLoading()
|
||||
|
||||
if (res.data.records.length < 10) {
|
||||
this.isMore = true
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
this.current = this.current + 1
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
}
|
||||
}).catch(() => {
|
||||
uni.hideLoading()
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
onReachBottom() {
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.resourcesManage {
|
||||
padding-bottom: 128px;
|
||||
.tab{
|
||||
|
||||
.tab {
|
||||
border-bottom: 1px solid #ddd;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.audio {
|
||||
width: 100%;
|
||||
height: 400rpx;
|
||||
height: 400 rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 104rpx 0 46rpx;
|
||||
padding: 104 rpx 0 46 rpx;
|
||||
|
||||
audio {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.record{
|
||||
.record {
|
||||
background-color: #fff;
|
||||
.item{
|
||||
|
||||
.item {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
border-bottom: 1px solid #ddd;
|
||||
padding: 32px 30px;
|
||||
box-sizing: border-box;
|
||||
img{
|
||||
|
||||
img {
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
margin-right: 14px;
|
||||
}
|
||||
.info{
|
||||
|
||||
.info {
|
||||
width: calc(100% - 70px);
|
||||
line-height: 44px;
|
||||
font-size: 34px;
|
||||
@@ -192,34 +199,41 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.record-text{
|
||||
background-color: #fff;
|
||||
.item{
|
||||
|
||||
.record-text {
|
||||
background-color: #fff;
|
||||
|
||||
.item {
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #ddd;
|
||||
padding: 32px 30px;
|
||||
box-sizing: border-box;
|
||||
font-size: 30px;
|
||||
div{
|
||||
|
||||
div {
|
||||
font-size: 30px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
overflow: hidden;
|
||||
text-overflow:ellipsis;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
margin-bottom: 12px;
|
||||
.color-0063E5{
|
||||
|
||||
.color-0063E5 {
|
||||
color: #0063E5;
|
||||
}
|
||||
.color-FF8100{
|
||||
|
||||
.color-FF8100 {
|
||||
color: #FF8100;
|
||||
}
|
||||
.color-FF4466{
|
||||
|
||||
.color-FF4466 {
|
||||
color: #FF4466;
|
||||
}
|
||||
}
|
||||
p{
|
||||
|
||||
p {
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #666;
|
||||
@@ -235,7 +249,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.add-img{
|
||||
|
||||
.add-img {
|
||||
width: 120px;
|
||||
position: fixed;
|
||||
bottom: 120px;
|
||||
|
||||
Reference in New Issue
Block a user