首页.我的
This commit is contained in:
parent
e499336388
commit
d77bb46fc6
|
|
@ -36,6 +36,7 @@ serverConfig.apiUrl_Music_GetMyMusicList = baseUrl + '/api/Music/GetMyMusicList'
|
|||
serverConfig.apiUrl_Music_GetUserInfo = baseUrl + '/api/Music/GetUserInfo' //用户信息
|
||||
serverConfig.apiUrl_Music_MusicSongsReview = baseUrl + '/api/Music/MusicSongsReview' //歌曲审核
|
||||
serverConfig.apiUrl_Music_MusicCancelSongsReview = baseUrl + '/api/Music/MusicCancelSongsReview' //取消审核
|
||||
serverConfig.apiUrl_Music_GetShopInfoList = baseUrl + '/api/Music/GetShopInfoList' //取消审核
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -304,6 +305,16 @@ AppServer.prototype.MusicCancelSongsReview = async function(id) {
|
|||
})
|
||||
}
|
||||
|
||||
//取消歌曲审核
|
||||
AppServer.prototype.GetShopInfoList = async function() {
|
||||
|
||||
var url = serverConfig.apiUrl_Music_GetShopInfoList
|
||||
|
||||
return this.getData(url).then((data) => {
|
||||
return data;
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
AppServer.prototype.GetServerList = async function() {
|
||||
return this.postData(serverConfig.apiUrl_AppConfig_GetServerList).then(data => {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,8 @@
|
|||
return {
|
||||
systemBarHeight: 0,
|
||||
musicId: 0,
|
||||
state: "正在生成中"
|
||||
state: "正在生成中",
|
||||
|
||||
}
|
||||
},
|
||||
onLoad: function(options) {
|
||||
|
|
@ -53,6 +54,7 @@
|
|||
},
|
||||
toBack() {
|
||||
uni.navigateBack();
|
||||
this.stopRequests();
|
||||
},
|
||||
|
||||
//生成进度
|
||||
|
|
@ -69,8 +71,11 @@
|
|||
this.state = "生成完成"
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
<swiper-item class="" style="width: 100%; height: 100%; overflow: auto;"
|
||||
v-for="(item,index) in tabs" :key="index">
|
||||
|
||||
<view class="" v-for="(item,index) in tabs" @click="toMusicPlay()"
|
||||
<view class="" v-for="(item,index) in musicList" @click="toMusicPlay(item)"
|
||||
style="display: flex; justify-content: center; margin-bottom: 28rpx; position: relative;">
|
||||
<view class=""
|
||||
style="background-color: #302D4EFF; width: 683.33rpx; height: 213.89rpx; border-radius: 10rpx; display: flex; flex-direction: row; align-items: center;">
|
||||
|
|
@ -35,19 +35,22 @@
|
|||
<view class=""
|
||||
style="display: flex; flex-direction: column; margin-left: 42rpx; width: 35%;">
|
||||
|
||||
<text style="font-size: 33rpx; color: white;">歌词名</text>
|
||||
<text style="font-size: 33rpx; color: white;">{{item.title}}</text>
|
||||
|
||||
<text style="font-size: 27rpx; color: #9C9090FF; margin-top: 18rpx;">作者</text>
|
||||
<text
|
||||
style="font-size: 27rpx; color: #9C9090FF; margin-top: 18rpx;">{{item.authorName}}</text>
|
||||
|
||||
<view class=""
|
||||
style="display: flex; flex-direction: row; align-items: center; margin-top: 20rpx;">
|
||||
<image src="../../static/image/ic_like.png" style="width: 16rpx; height: 16rpx;"
|
||||
mode=""></image>
|
||||
<text style="color: white; font-size: 22rpx; margin-left: 9rpx;">111</text>
|
||||
<text
|
||||
style="color: white; font-size: 22rpx; margin-left: 9rpx;">{{item.likeCount}}</text>
|
||||
|
||||
<image src="../../static/image/ic_collect.png"
|
||||
style="width: 16rpx; height: 16rpx; margin-left: 34rpx;" mode=""></image>
|
||||
<text style="color: white; font-size: 22rpx; margin-left: 9rpx;">1.1万</text>
|
||||
<text
|
||||
style="color: white; font-size: 22rpx; margin-left: 9rpx;">{{item.favoritesCount}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
|
@ -92,13 +95,17 @@
|
|||
subtractedHeight: 0,
|
||||
tabs: ["推荐"],
|
||||
current: 0,
|
||||
musicGenresList: []
|
||||
musicGenresList: [],
|
||||
musicList: [] //音乐列表
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getMusicGenresList();
|
||||
},
|
||||
onLoad() {
|
||||
this.getStatusBarHeight();
|
||||
this.getSubtractedHeight();
|
||||
this.getMusicGenresList();
|
||||
this.autoLogin();
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -127,11 +134,14 @@
|
|||
|
||||
changeTab(index) {
|
||||
this.current = index
|
||||
console.log('当前选中索引:' + index)
|
||||
console.log('当前选中索引:changeTab' + index)
|
||||
},
|
||||
|
||||
swiperChange(e) {
|
||||
this.current = e.detail.current
|
||||
console.log('当前选中索引:swiperChange' + this.current)
|
||||
|
||||
this.getMusicGenresInfo();
|
||||
},
|
||||
|
||||
//获取音乐分类
|
||||
|
|
@ -154,14 +164,15 @@
|
|||
|
||||
//获取音乐列表
|
||||
getMusicGenresInfo() {
|
||||
var that = this;
|
||||
var appserver = new AppServer();
|
||||
console.log("this.musicGenresList[this.current]", this.musicGenresList[this.current].id);
|
||||
appserver.GetMusicGenresInfo(this.musicGenresList[this.current].id).then(data => {
|
||||
|
||||
that.musicList = data.data;
|
||||
});
|
||||
},
|
||||
|
||||
toMusicPlay() {
|
||||
toMusicPlay(item) {
|
||||
|
||||
let loginValue = uni.getStorageSync("isLoginKey");
|
||||
|
||||
|
|
@ -175,8 +186,28 @@
|
|||
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/pages/music/MusicPlayPage'
|
||||
url: '/pages/music/MusicPlayPage?musicUrl=' + item.musicAddress + '&musicName=' +
|
||||
item.title + '&lyrics=' + item.lyrics + '&isPublic=' + item.isPublic + '&state=' +
|
||||
item.state + '&id=' + item.id
|
||||
});
|
||||
},
|
||||
|
||||
async autoLogin() {
|
||||
|
||||
var loginRes = await uni.login();
|
||||
// AccountLogIn
|
||||
var appserver = new AppServer();
|
||||
var data = await appserver.AccountLogIn(loginRes.code)
|
||||
console.log(data);
|
||||
uni.setStorageSync("token", "Bearer " + data.data.token);
|
||||
uni.setStorageSync("isLoginKey", true);
|
||||
// uni.getStorageSync("isLoginKey");
|
||||
uni.setStorageSync("userData", data);
|
||||
|
||||
var userInfo = await wx.getUserInfo({
|
||||
withCredentials: true
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@
|
|||
systemBarHeight: 0,
|
||||
}
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
this.getStatusBarHeight();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -20,9 +20,12 @@
|
|||
|
||||
</view>
|
||||
|
||||
<image src="/static/image/vip.png" style="width: 683.33rpx; margin-top: 50rpx;" @click="toRecharge()"
|
||||
mode="widthFix">
|
||||
</image>
|
||||
<view class="" style="width: 100%; height: 103.47rpx; display: flex; align-items: center; justify-content: center;">
|
||||
<image src="/static/image/vip.png" style="width: 683.33rpx; margin-top: 50rpx;" @click="toRecharge()"
|
||||
mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
|
||||
|
||||
<view class=""
|
||||
style="display: flex; flex-direction: row; width: 100%; margin-top: 67rpx; align-items: flex-end;">
|
||||
|
|
@ -51,9 +54,22 @@
|
|||
style="width: 45rpx; height: 45rpx; position: absolute;" alt="" />
|
||||
</view>
|
||||
|
||||
<view class="" style="display: flex; flex-direction: column; margin-left: 42rpx; width: 35%;">
|
||||
<view class="" style="display: flex; flex-direction: column; margin-left: 42rpx; width: 50%;">
|
||||
|
||||
<view class="" style="display: flex; flex-direction: row;">
|
||||
|
||||
<text
|
||||
style="font-size: 33rpx; color: white; width: 200rpx; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">{{item.title}}
|
||||
</text>
|
||||
|
||||
<text v-show="item.state==0" style="font-size: 20rpx; color: grey; margin-left: 50rpx;">
|
||||
生成中...</text>
|
||||
<text v-show="item.state==3"
|
||||
style="font-size: 20rpx; color: #84BCD2; margin-left: 50rpx;">
|
||||
已发布</text>
|
||||
</view>
|
||||
|
||||
|
||||
<text style="font-size: 33rpx; color: white;">{{item.title}}</text>
|
||||
|
||||
<view class=""
|
||||
style="display: flex; flex-direction: row; align-items: center; margin-top: 20rpx;">
|
||||
|
|
@ -64,20 +80,41 @@
|
|||
|
||||
<image src="../../static/image/ic_collect.png"
|
||||
style="width: 16rpx; height: 16rpx; margin-left: 34rpx;" mode=""></image>
|
||||
<text style="color: white; font-size: 22rpx; margin-left: 9rpx;">1.1万</text>
|
||||
<text
|
||||
style="color: white; font-size: 22rpx; margin-left: 9rpx;">{{item.favoritesCount}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="" style="width: 90rpx; height: 90%; margin-left: 50rpx;">
|
||||
|
||||
<view class="" @click.native.stop="deleteMusic()"
|
||||
style="width: 100%; display: flex; flex-direction: row; align-items: center; justify-content: center;">
|
||||
|
||||
<image src="../../static/image/ic_delete.png" style="width: 18rpx; height: 18rpx;"
|
||||
mode="">
|
||||
</image>
|
||||
<text style="font-size: 21rpx; color: #ABABAB; margin-left: 11rpx;">删除</text>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
<uni-popup ref="popup" @change="change">
|
||||
<view class=""
|
||||
style="width: 518.75rpx; height: 289.58rpx; background-color: #474747; border-radius: 14rpx; display: flex; flex-direction: column; align-items: center;">
|
||||
<text class="" style="font-size: 33rpx; color: white; margin-top: 31rpx;">删除音乐</text>
|
||||
<text class="" style="font-size: 28rpx; color: #ABABAB; margin-top: 39rpx;">删除后将无法找回,确认删除吗?</text>
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -95,6 +132,10 @@
|
|||
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getUserInfo();
|
||||
this.getMyMusicList();
|
||||
},
|
||||
onLoad() {
|
||||
this.getStatusBarHeight();
|
||||
this.getSubtractedHeight();
|
||||
|
|
@ -152,19 +193,30 @@
|
|||
var appserver = new AppServer();
|
||||
appserver.GetMyMusicList().then(data => {
|
||||
console.log("getMyMusicList", data);
|
||||
that.dataList = data.data;
|
||||
that.dataList = data.data.reverse();
|
||||
});
|
||||
},
|
||||
|
||||
//音乐播放页
|
||||
toMusicPlay(item) {
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/pages/music/MyMusicPlayPage?musicUrl=' + item.musicAddress + '&musicName=' +
|
||||
item.title + '&lyrics=' + item.lyrics + '&isPublic=' + item.isPublic + '&state=' +
|
||||
item.state + '&id=' + item.id
|
||||
});
|
||||
}
|
||||
if (item.state == 0) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/create/CreateInfoPage?id=' + item.id
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/music/MyMusicPlayPage?musicUrl=' + item.musicAddress + '&musicName=' +
|
||||
item.title + '&lyrics=' + item.lyrics + '&isPublic=' + item.isPublic + '&state=' +
|
||||
item.state + '&id=' + item.id
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
//删除音乐
|
||||
deleteMusic() {
|
||||
this.$refs.popup.open('center')
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
style="width: 431.25rpx; display: flex; flex-direction: row; align-items: center; justify-content: space-between; margin-top: 40rpx;">
|
||||
|
||||
<image src="/static/image/ic_previous.png" style="width: 25.69rpx; height: 30.56rpx;" mode="" />
|
||||
|
||||
|
||||
<image :src="isPlay?'/static/image/ic_suspend.png':'/static/image/ic_play_music.png'"
|
||||
style="width: 37.5rpx; height: 52.78rpx;" @click="musicPlay()" mode="" />
|
||||
|
||||
|
|
@ -114,6 +114,8 @@
|
|||
currentTimeIndex: 0,
|
||||
currentTimeContent: "",
|
||||
musicName: "",
|
||||
lyrics: "",
|
||||
id: 0,
|
||||
lyricList: [{
|
||||
time: "00:00",
|
||||
content: "晴天 - 周杰伦"
|
||||
|
|
@ -144,6 +146,8 @@
|
|||
onLoad: function(options) {
|
||||
this.getStatusBarHeight();
|
||||
this.musicName = options.musicName;
|
||||
this.lyrics = options.lyrics;
|
||||
this.id = options.id;
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
});
|
||||
|
|
@ -197,11 +201,18 @@
|
|||
},
|
||||
|
||||
toBack() {
|
||||
innerAudioContext.destroy();
|
||||
uni.navigateBack();
|
||||
},
|
||||
|
||||
sliderChange(e) {
|
||||
console.log('value 发生变化:' + e.detail.value)
|
||||
|
||||
const timeInSeconds = innerAudioContext.duration * (e.detail.value / 100);
|
||||
|
||||
console.log("timeInSeconds", timeInSeconds);
|
||||
|
||||
innerAudioContext.seek(timeInSeconds);
|
||||
},
|
||||
|
||||
musicPlay() {
|
||||
|
|
|
|||
|
|
@ -122,6 +122,9 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
AppServer
|
||||
} from '../../modules/api/AppServer';
|
||||
export default {
|
||||
data() {
|
||||
var goodsList = [1, 2, 3, 4, 5, 6];
|
||||
|
|
@ -136,6 +139,9 @@
|
|||
isAgreement: true
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getShopInfoList();
|
||||
},
|
||||
onLoad() {
|
||||
this.getStatusBarHeight();
|
||||
},
|
||||
|
|
@ -153,6 +159,15 @@
|
|||
toBack() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
|
||||
//获取商品信息
|
||||
getShopInfoList() {
|
||||
var that = this;
|
||||
var appserver = new AppServer();
|
||||
appserver.GetShopInfoList().then(data => {
|
||||
console.log("getShopInfoList", data.data);
|
||||
});
|
||||
},
|
||||
|
||||
setBg(index) {
|
||||
|
||||
|
|
|
|||
BIN
static/image/ic_delete.png
Normal file
BIN
static/image/ic_delete.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 942 B |
Loading…
Reference in New Issue
Block a user