|
@@ -1,5 +1,10 @@
|
|
|
<template>
|
|
|
- <view class="voice-play-page">
|
|
|
+ <view class="voice-play-page" v-if="isAuth">
|
|
|
+ <view class="top-filter-box">
|
|
|
+ <image src="@/static/question/select.png" mode="aspectFill" />
|
|
|
+ <text>筛选</text>
|
|
|
+ </view>
|
|
|
+
|
|
|
<view class="empty-box" v-if="list.length==0&&finished">
|
|
|
<image
|
|
|
:src="globalImgUrls.activityNoAuth"
|
|
@@ -29,14 +34,39 @@
|
|
|
<navigator url="/pages-voice/addVoice">
|
|
|
<view class="add-btn" v-if="IsVoiceAdmin">新建语音</view>
|
|
|
</navigator>
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 筛选弹窗 -->
|
|
|
+ <van-popup
|
|
|
+ :show="showFilter"
|
|
|
+ position="bottom"
|
|
|
+ :close-on-click-overlay="true"
|
|
|
+ @close="showFilter = false"
|
|
|
+ >
|
|
|
+ <view class="fliter-wrap-list">
|
|
|
+ <van-tree-select
|
|
|
+ :items="items"
|
|
|
+ :main-active-index="mainActiveIndex"
|
|
|
+ :active-id="activeId"
|
|
|
+ @click-nav="onClickNav"
|
|
|
+ @click-item="onClickItem"
|
|
|
+ />
|
|
|
+ </view>
|
|
|
+ </van-popup>
|
|
|
+
|
|
|
</view>
|
|
|
+ <noAuth :info="noAuthData" v-else/>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {apiVoiceList} from '@/api/voice'
|
|
|
import {apiGetSceneToParams} from '@/api/common'
|
|
|
+import noAuth from './components/noAuth.vue'
|
|
|
const moment=require('@/utils/moment-with-locales.min')
|
|
|
export default {
|
|
|
+ components:{
|
|
|
+ noAuth
|
|
|
+ },
|
|
|
filters:{
|
|
|
formatTime(e){
|
|
|
return moment(e).format('YYYY-MM-DD HH:mm:ss')
|
|
@@ -50,7 +80,18 @@ export default {
|
|
|
finished:false,
|
|
|
voiceId:0,//分享时进入的音频id
|
|
|
|
|
|
- IsVoiceAdmin:false,
|
|
|
+ IsVoiceAdmin:false,//是否是语音管理员
|
|
|
+
|
|
|
+ isAuth:true,
|
|
|
+ noAuthData:null,
|
|
|
+
|
|
|
+ showFilter:false,
|
|
|
+ options:[
|
|
|
+ {
|
|
|
+ text:'选项一',
|
|
|
+
|
|
|
+ }
|
|
|
+ ]
|
|
|
}
|
|
|
},
|
|
|
onLoad(options){
|
|
@@ -114,6 +155,10 @@ export default {
|
|
|
if(arr.length===0){
|
|
|
this.finished=true
|
|
|
}
|
|
|
+ }else if(res.code===403){
|
|
|
+ //无权限用户
|
|
|
+ this.isAuth=false
|
|
|
+ this.noAuthData=res.data
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -123,6 +168,21 @@ export default {
|
|
|
<style lang="scss" scoped>
|
|
|
.voice-play-page{
|
|
|
padding: 34rpx;
|
|
|
+ .top-filter-box{
|
|
|
+ position: sticky;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ z-index: 99;
|
|
|
+ background-color: #fff;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ image{
|
|
|
+ width: 34rpx;
|
|
|
+ height: 34rpx;
|
|
|
+ }
|
|
|
+ color: #E3B377;
|
|
|
+ font-size: 30rpx;
|
|
|
+ }
|
|
|
}
|
|
|
.empty-box{
|
|
|
text-align: center;
|
|
@@ -205,4 +265,8 @@ export default {
|
|
|
box-shadow: 0px 4rpx 20rpx rgba(160, 126, 84, 0.25);
|
|
|
border-radius: 40rpx;
|
|
|
}
|
|
|
+
|
|
|
+.fliter-wrap-list{
|
|
|
+
|
|
|
+}
|
|
|
</style>
|