diff --git a/pages.json b/pages.json
index c8e5bb7..72fc57d 100644
--- a/pages.json
+++ b/pages.json
@@ -54,6 +54,12 @@
"style": {
"navigationStyle": "custom"
}
+ },
+ {
+ "path": "pages/me/ReportingCenter",
+ "style": {
+ "navigationStyle": "custom"
+ }
}
],
// "globalStyle": {
diff --git a/pages/create/createpage.vue b/pages/create/createpage.vue
index f891f35..5c2af8d 100644
--- a/pages/create/createpage.vue
+++ b/pages/create/createpage.vue
@@ -17,8 +17,6 @@
-
-
{{fontNum}}/500
-
-
-
-
-
diff --git a/pages/me/ReportingCenter.vue b/pages/me/ReportingCenter.vue
new file mode 100644
index 0000000..37ac3fc
--- /dev/null
+++ b/pages/me/ReportingCenter.vue
@@ -0,0 +1,166 @@
+
+
+
+
+
+ 举报中心
+
+
+
+ 举报类型
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 骚扰谩骂
+
+
+
+
+
+
+
+
+ 垃圾广告
+
+
+
+
+
+
+
+
+ 涉政涉恐
+
+
+
+
+
+
+
+
+
+
+
+
+ 欺诈骗钱
+
+
+
+
+
+
+
+
+ 淫秽色情
+
+
+
+
+
+
+
+
+ 其他
+
+
+
+
+
+
+
+ 具体描述 (选填)
+
+
+
+
+
+
+
+ {{fontNum}}/200
+
+
+
+
+
+
+ 提交
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/me/mepage.vue b/pages/me/mepage.vue
index 09035c2..3e94515 100644
--- a/pages/me/mepage.vue
+++ b/pages/me/mepage.vue
@@ -29,8 +29,8 @@
-
+
@@ -142,7 +142,7 @@
-
+
删除音乐
diff --git a/pages/music/MusicPlayPage.vue b/pages/music/MusicPlayPage.vue
index 6356a5e..e6387a1 100644
--- a/pages/music/MusicPlayPage.vue
+++ b/pages/music/MusicPlayPage.vue
@@ -44,7 +44,8 @@
-
+
举报
@@ -66,7 +67,7 @@
收藏
-
+
下载
@@ -107,6 +108,15 @@
+
+
+
+
+ 下载中 {{progress}}%
+
+
+
+
@@ -132,6 +142,8 @@
isFavorites: false,
isCheck: false,
coverImage: "",
+ musicUrl: "",
+ progress: 0,
lyricList: [{
time: "00:00",
content: "晴天 - 周杰伦"
@@ -167,6 +179,7 @@
this.id = options.id;
this.isLikes = JSON.parse(options.isLikes);
this.isFavorites = JSON.parse(options.isFavorites);
+ this.musicUrl = options.musicUrl;
this.lyrics = this.splitAndRemoveBrackets(options.lyrics);
@@ -219,13 +232,11 @@
console.log(res.errCode);
});
},
- onHide() {
+ onUnload() {
innerAudioContext.destroy();
},
methods: {
-
toBack() {
- innerAudioContext.destroy();
uni.navigateBack();
},
@@ -337,8 +348,69 @@
})
},
+ //下载文件
+ saveFile() {
+ var that = this;
+ this.$refs.downloadPopup.open('center')
+ const downloadTask = uni.downloadFile({
+ url: this.musicUrl, //仅为示例,并非真实的资源
+ success: (res) => {
+ if (res.statusCode === 200) {
+ console.log('下载成功');
+ this.$refs.downloadPopup.close();
+ uni.showToast({
+ title: '下载成功',
+ icon: 'none',
+ duration: 2000
+ });
+ var tempFilePath = res.tempFilePath;
+ console.log("tempFilePaths", tempFilePath);
+
+ // wx.openDocument({
+ // filePath: tempFilePath,
+ // showMenu: true, //关键点
+ // success: function(res) {
+ // console.log('打开文档成功')
+ // },
+ // fail: function(e) {
+ // console.log(e);
+ // }
+ // })
+
+ // wx.getFileSystemManager().saveFile({
+ // tempFilePath: tempFilePath,
+ // filePath: `${wx.env.USER_DATA_PATH}/${that.musicName}.mp3`,
+ // success: function(res) {
+ // var savedFilePath = res.savedFilePath;
+ // console.log("savedFilePath", savedFilePath);
+ // console.log("savedFilePathres", res);
+
+ // },
+ // fail: function(e) {
+ // console.log(e);
+ // }
+ // });
+
+ } else {
+ console.log(res);
+ }
+ }
+ });
+
+ downloadTask.onProgressUpdate((res) => {
+ that.progress = res.progress;
+ console.log('下载进度' + res.progress);
+ });
+ },
+
+ //举报
+ toReporting() {
+ uni.navigateTo({
+ url: '/pages/me/ReportingCenter'
+ });
+ },
}
}
@@ -353,4 +425,14 @@
align-items: center;
background-color: #0E0A10FF;
}
+
+ .download_view {
+ background-color: #1F0A28;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 350rpx;
+ height: 60rpx;
+ border-radius: 20rpx;
+ }
\ No newline at end of file
diff --git a/pages/music/MyMusicPlayPage.vue b/pages/music/MyMusicPlayPage.vue
index 9f466c0..476868d 100644
--- a/pages/music/MyMusicPlayPage.vue
+++ b/pages/music/MyMusicPlayPage.vue
@@ -54,7 +54,7 @@
-
+
下载
@@ -91,12 +91,16 @@
-
-
-
+
+
+
+ 下载中 {{progress}}%
+
+
+
@@ -121,10 +125,12 @@
isPublic: false,
state: 0,
isPublicStatus: false,
- statusText:"审核中...",
+ statusText: "审核中...",
id: 0,
isCheck: false,
coverImage: "",
+ musicUrl: "",
+ progress: 0,
lyricList: [{
time: "00:00",
content: "晴天 - 周杰伦"
@@ -160,6 +166,7 @@
this.isPublic = JSON.parse(options.isPublic);
this.state = options.state;
this.id = options.id;
+ this.musicUrl = options.musicUrl;
this.lyrics = this.splitAndRemoveBrackets(options.lyrics);
@@ -177,9 +184,9 @@
if (this.state == 2) {
this.isPublicStatus = true;
} else {
- if(this.state==3){
+ if (this.state == 3) {
this.statusText = ""
- }else{
+ } else {
this.statusText = "审核中..."
}
this.isPublicStatus = this.isPublic;
@@ -230,12 +237,11 @@
console.log(res.errCode);
});
},
- onHide() {
+ onUnload() {
innerAudioContext.destroy();
},
methods: {
toBack() {
- innerAudioContext.destroy();
uni.navigateBack();
},
@@ -303,7 +309,6 @@
this.isPublicStatus = false;
appserver.MusicCancelSongsReview(this.id).then(data => {
console.log("MusicSongsReview", data);
-
})
} else {
this.isPublicStatus = true;
@@ -311,8 +316,6 @@
console.log("MusicSongsReview", data);
})
}
-
-
},
splitAndRemoveBrackets(str) {
@@ -327,8 +330,34 @@
// 过滤掉空字符串
return result.filter(line => line.trim() !== '');
- }
+ },
+ //下载文件
+ saveFile() {
+ var that = this;
+ this.$refs.downloadPopup.open('center')
+ const downloadTask = uni.downloadFile({
+ url: this.musicUrl, //仅为示例,并非真实的资源
+ success: (res) => {
+ if (res.statusCode === 200) {
+ console.log('下载成功');
+ this.$refs.downloadPopup.close();
+ uni.showToast({
+ title: '下载成功',
+ icon: 'none',
+ duration: 2000
+ });
+ } else {
+ console.log(res);
+ }
+ }
+ });
+
+ downloadTask.onProgressUpdate((res) => {
+ that.progress = res.progress;
+ console.log('下载进度' + res.progress);
+ })
+ },
}
}
@@ -343,4 +372,14 @@
align-items: center;
background-color: #0E0A10FF;
}
+
+ .download_view {
+ background-color: #1F0A28;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 350rpx;
+ height: 60rpx;
+ border-radius: 20rpx;
+ }
\ No newline at end of file
diff --git a/static/image/ic_check.png b/static/image/ic_check.png
new file mode 100644
index 0000000..b2ed267
Binary files /dev/null and b/static/image/ic_check.png differ
diff --git a/static/image/ic_check_s.png b/static/image/ic_check_s.png
new file mode 100644
index 0000000..03b0aff
Binary files /dev/null and b/static/image/ic_check_s.png differ