diff --git a/App.vue b/App.vue
index 8c2b732..07c5f2c 100644
--- a/App.vue
+++ b/App.vue
@@ -1,17 +1,45 @@
+
\ No newline at end of file
diff --git a/modules/api/AppServer.js b/modules/api/AppServer.js
index f2f0668..67bac6f 100644
--- a/modules/api/AppServer.js
+++ b/modules/api/AppServer.js
@@ -28,6 +28,7 @@ serverConfig.apiUrl_Music_GetMiniProgramUserInfo = baseUrl + '/api/Account/GetMi
serverConfig.apiUrl_Music_GetMusicGenresList = baseUrl + '/api/Music/GetMusicGenresList'
serverConfig.apiUrl_Music_GetMusicGenresInfo = baseUrl + '/api/Music/GetMusicGenresInfo'
+serverConfig.apiUrl_Music_GetAppConfig = baseUrl + '/api/Music/GetAppConfig' //获取app配置
serverConfig.apiUrl_Music_GetUserMusicGenresList = baseUrl + '/api/Music/GetUserMusicGenresList' //音乐标签
serverConfig.apiUrl_Music_CreateUserMusicGenres = baseUrl + '/api/Music/CreateUserMusicGenres' //创建音乐风格
serverConfig.apiUrl_Music_CreateMusic = baseUrl + '/api/Music/CreateMusic' //创建音乐
@@ -36,7 +37,11 @@ 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' //取消审核
+serverConfig.apiUrl_Music_GetShopInfoList = baseUrl + '/api/Music/GetShopInfoList' //获取商城信息
+serverConfig.apiUrl_Music_MusicSongLike = baseUrl + '/api/Music/MusicSongLike' //音乐点赞
+serverConfig.apiUrl_Music_MusicSongFavorites = baseUrl + '/api/Music/MusicSongFavorites' //音乐收藏
+serverConfig.apiUrl_Music_GetMusicSongFavorites = baseUrl + '/api/Music/GetMusicSongFavorites' //我的音乐收藏
+serverConfig.apiUrl_Music_DelMusic = baseUrl + '/api/Music/DelMusic' //删除音乐
/**
@@ -201,6 +206,18 @@ AppServer.prototype.GetMusicGenresList = async function() {
})
}
+//获取配置
+AppServer.prototype.GetAppConfig = async function(version) {
+
+ var url = serverConfig.apiUrl_Music_GetAppConfig
+
+ return this.getData(url, {
+ "version": version
+ }).then((data) => {
+ return data;
+ })
+}
+
//音乐列表
AppServer.prototype.GetMusicGenresInfo = async function(genresId) {
@@ -305,7 +322,7 @@ AppServer.prototype.MusicCancelSongsReview = async function(id) {
})
}
-//取消歌曲审核
+//商城信息
AppServer.prototype.GetShopInfoList = async function() {
var url = serverConfig.apiUrl_Music_GetShopInfoList
@@ -315,6 +332,52 @@ AppServer.prototype.GetShopInfoList = async function() {
})
}
+//音乐点赞
+AppServer.prototype.MusicSongLike = async function(id) {
+
+ var url = serverConfig.apiUrl_Music_MusicSongLike
+
+ return this.postData(url, {
+ "id": id
+ }).then((data) => {
+ return data;
+ })
+}
+
+//音乐收藏
+AppServer.prototype.MusicSongFavorites = async function(id) {
+
+ var url = serverConfig.apiUrl_Music_MusicSongFavorites
+
+ return this.postData(url, {
+ "id": id
+ }).then((data) => {
+ return data;
+ })
+}
+
+//我的音乐收藏
+AppServer.prototype.GetMusicSongFavorites = async function() {
+
+ var url = serverConfig.apiUrl_Music_GetMusicSongFavorites
+
+ return this.getData(url).then((data) => {
+ return data;
+ })
+}
+
+//删除音乐
+AppServer.prototype.DelMusic = async function(id) {
+
+ var url = serverConfig.apiUrl_Music_DelMusic
+
+ return this.postData(url, {
+ "id": id
+ }).then((data) => {
+ return data;
+ })
+}
+
AppServer.prototype.GetServerList = async function() {
return this.postData(serverConfig.apiUrl_AppConfig_GetServerList).then(data => {
diff --git a/pages/create/CreateInfoPage.vue b/pages/create/CreateInfoPage.vue
index ce370d6..6dcf9d7 100644
--- a/pages/create/CreateInfoPage.vue
+++ b/pages/create/CreateInfoPage.vue
@@ -37,21 +37,14 @@
onLoad: function(options) {
console.log('传递的参数:', options.id);
this.musicId = options.id;
- this.getStatusBarHeight();
+
+ this.systemBarHeight = getApp().globalData.statusBarHeight;
this.getMusicSchedule(this.musicId);
},
methods: {
- // 获取状态栏高度的方法
- getStatusBarHeight: function() {
- var that = this;
- uni.getSystemInfo({
- success: function(res) {
- that.systemBarHeight = res.statusBarHeight
- }
- });
- },
+
toBack() {
uni.navigateBack();
this.stopRequests();
diff --git a/pages/create/createpage.vue b/pages/create/createpage.vue
index c8f1e8a..59c7541 100644
--- a/pages/create/createpage.vue
+++ b/pages/create/createpage.vue
@@ -109,34 +109,14 @@
},
onLoad() {
- this.getStatusBarHeight();
- this.getSubtractedHeight();
+ this.systemBarHeight = getApp().globalData.statusBarHeight;
+ this.subtractedHeight = getApp().globalData.windowHeight;
+
this.getMusicGenresInfo();
},
methods: {
- // 获取状态栏高度的方法
- getStatusBarHeight: function() {
- var that = this;
- uni.getSystemInfo({
- success: function(res) {
- that.systemBarHeight = res.statusBarHeight
- }
- });
- },
-
- getSubtractedHeight() {
- const systemInfo = uni.getSystemInfoSync();
- const screenWidth = systemInfo.screenWidth;
- const windowHeight = systemInfo.windowHeight;
- console.log("windowHeight", windowHeight);
- // 将167rpx转换为px
- const rpxToPx = (rpx) => (rpx * screenWidth) / 750;
- // this.subtractedHeight = windowHeight - rpxToPx(167);
- this.subtractedHeight = windowHeight;
- console.log("subtractedHeight", this.subtractedHeight);
- },
sumfontnum(e) {
this.fontNum = e.detail.cursor
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 6a8fa13..eb1400d 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -28,8 +28,11 @@
style="background-color: #302D4EFF; width: 683.33rpx; height: 213.89rpx; border-radius: 10rpx; display: flex; flex-direction: row; align-items: center;">
-
+ style="width: 152rpx; height: 152rpx; background-color: #3c3a3eFF; display: flex; position: relative; align-items: center; justify-content: center; margin-left: 24rpx;">
+
+
diff --git a/pages/music/MusicPlayPage.vue b/pages/music/MusicPlayPage.vue
index 242aa55..cbdd83d 100644
--- a/pages/music/MusicPlayPage.vue
+++ b/pages/music/MusicPlayPage.vue
@@ -19,10 +19,10 @@
-
+
-
@@ -33,7 +33,7 @@
-
{{currentTime}}
举报
-
-
+
+
点赞
-
-
+
+
收藏
@@ -72,19 +76,24 @@
-
-
+
+
+
+
+ {{item}}
+
-
-
@@ -102,6 +111,9 @@