点赞,收藏,审核,商城
This commit is contained in:
parent
d77bb46fc6
commit
a4038d4656
30
App.vue
30
App.vue
|
|
@ -1,17 +1,45 @@
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
AppServer
|
||||||
|
} from './modules/api/AppServer';
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
onLaunch: function() {
|
onLaunch: function() {
|
||||||
console.log('App Launch')
|
console.log('App Launch')
|
||||||
|
|
||||||
|
var systemInfo = uni.getSystemInfoSync(); // 获取系统信息
|
||||||
|
this.globalData.statusBarHeight = systemInfo.statusBarHeight;
|
||||||
|
this.globalData.windowHeight = systemInfo.windowHeight;
|
||||||
|
this.getAppConfig();
|
||||||
|
},
|
||||||
|
globalData: {
|
||||||
|
statusBarHeight: 0, // 初始化状态栏高度
|
||||||
|
windowHeight: 0, // 屏幕高度
|
||||||
|
isCheck: false, // 是否审核
|
||||||
|
myPageMallEntrance: "", // 商城入口页图片
|
||||||
|
mallBanner: "", // 商城顶部banner
|
||||||
},
|
},
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
console.log('App Show')
|
console.log('App Show')
|
||||||
},
|
},
|
||||||
onHide: function() {
|
onHide: function() {
|
||||||
console.log('App Hide')
|
console.log('App Hide')
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getAppConfig() {
|
||||||
|
var that = this;
|
||||||
|
var appserver = new AppServer();
|
||||||
|
appserver.GetAppConfig("1.0").then(data => {
|
||||||
|
console.log("getAppConfig", data.data);
|
||||||
|
that.globalData.isCheck = data.data.isCheck;
|
||||||
|
that.globalData.myPageMallEntrance = data.data.myPageMallEntrance;
|
||||||
|
that.globalData.mallBanner = data.data.mallBanner;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
/*每个页面公共css */
|
/*每个页面公共css */
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -28,6 +28,7 @@ serverConfig.apiUrl_Music_GetMiniProgramUserInfo = baseUrl + '/api/Account/GetMi
|
||||||
|
|
||||||
serverConfig.apiUrl_Music_GetMusicGenresList = baseUrl + '/api/Music/GetMusicGenresList'
|
serverConfig.apiUrl_Music_GetMusicGenresList = baseUrl + '/api/Music/GetMusicGenresList'
|
||||||
serverConfig.apiUrl_Music_GetMusicGenresInfo = baseUrl + '/api/Music/GetMusicGenresInfo'
|
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_GetUserMusicGenresList = baseUrl + '/api/Music/GetUserMusicGenresList' //音乐标签
|
||||||
serverConfig.apiUrl_Music_CreateUserMusicGenres = baseUrl + '/api/Music/CreateUserMusicGenres' //创建音乐风格
|
serverConfig.apiUrl_Music_CreateUserMusicGenres = baseUrl + '/api/Music/CreateUserMusicGenres' //创建音乐风格
|
||||||
serverConfig.apiUrl_Music_CreateMusic = baseUrl + '/api/Music/CreateMusic' //创建音乐
|
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_GetUserInfo = baseUrl + '/api/Music/GetUserInfo' //用户信息
|
||||||
serverConfig.apiUrl_Music_MusicSongsReview = baseUrl + '/api/Music/MusicSongsReview' //歌曲审核
|
serverConfig.apiUrl_Music_MusicSongsReview = baseUrl + '/api/Music/MusicSongsReview' //歌曲审核
|
||||||
serverConfig.apiUrl_Music_MusicCancelSongsReview = baseUrl + '/api/Music/MusicCancelSongsReview' //取消审核
|
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) {
|
AppServer.prototype.GetMusicGenresInfo = async function(genresId) {
|
||||||
|
|
||||||
|
|
@ -305,7 +322,7 @@ AppServer.prototype.MusicCancelSongsReview = async function(id) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//取消歌曲审核
|
//商城信息
|
||||||
AppServer.prototype.GetShopInfoList = async function() {
|
AppServer.prototype.GetShopInfoList = async function() {
|
||||||
|
|
||||||
var url = serverConfig.apiUrl_Music_GetShopInfoList
|
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() {
|
AppServer.prototype.GetServerList = async function() {
|
||||||
return this.postData(serverConfig.apiUrl_AppConfig_GetServerList).then(data => {
|
return this.postData(serverConfig.apiUrl_AppConfig_GetServerList).then(data => {
|
||||||
|
|
|
||||||
|
|
@ -37,21 +37,14 @@
|
||||||
onLoad: function(options) {
|
onLoad: function(options) {
|
||||||
console.log('传递的参数:', options.id);
|
console.log('传递的参数:', options.id);
|
||||||
this.musicId = options.id;
|
this.musicId = options.id;
|
||||||
this.getStatusBarHeight();
|
|
||||||
|
this.systemBarHeight = getApp().globalData.statusBarHeight;
|
||||||
|
|
||||||
this.getMusicSchedule(this.musicId);
|
this.getMusicSchedule(this.musicId);
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取状态栏高度的方法
|
|
||||||
getStatusBarHeight: function() {
|
|
||||||
var that = this;
|
|
||||||
uni.getSystemInfo({
|
|
||||||
success: function(res) {
|
|
||||||
that.systemBarHeight = res.statusBarHeight
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
toBack() {
|
toBack() {
|
||||||
uni.navigateBack();
|
uni.navigateBack();
|
||||||
this.stopRequests();
|
this.stopRequests();
|
||||||
|
|
|
||||||
|
|
@ -109,34 +109,14 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getStatusBarHeight();
|
this.systemBarHeight = getApp().globalData.statusBarHeight;
|
||||||
this.getSubtractedHeight();
|
this.subtractedHeight = getApp().globalData.windowHeight;
|
||||||
|
|
||||||
this.getMusicGenresInfo();
|
this.getMusicGenresInfo();
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
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) {
|
sumfontnum(e) {
|
||||||
this.fontNum = e.detail.cursor
|
this.fontNum = e.detail.cursor
|
||||||
|
|
|
||||||
|
|
@ -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="background-color: #302D4EFF; width: 683.33rpx; height: 213.89rpx; border-radius: 10rpx; display: flex; flex-direction: row; align-items: center;">
|
||||||
|
|
||||||
<view class=""
|
<view class=""
|
||||||
style="width: 152rpx; height: 152rpx; background-color: #3c3a3eFF; display: flex; align-items: center; justify-content: center; margin-left: 24rpx;">
|
style="width: 152rpx; height: 152rpx; background-color: #3c3a3eFF; display: flex; position: relative; align-items: center; justify-content: center; margin-left: 24rpx;">
|
||||||
<img src="/static/image/ic_play.png" style="width: 45rpx; height: 45rpx;" alt="" />
|
<image :src="item.coverImage"
|
||||||
|
style="width: 152rpx; height: 152rpx; position: absolute;" mode=""></image>
|
||||||
|
<img src="/static/image/ic_play.png"
|
||||||
|
style="width: 45rpx; height: 45rpx; position: absolute;" alt="" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class=""
|
<view class=""
|
||||||
|
|
@ -85,6 +88,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
const app = getApp();
|
||||||
import {
|
import {
|
||||||
AppServer
|
AppServer
|
||||||
} from '../../modules/api/AppServer';
|
} from '../../modules/api/AppServer';
|
||||||
|
|
@ -103,35 +107,12 @@
|
||||||
this.getMusicGenresList();
|
this.getMusicGenresList();
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getStatusBarHeight();
|
|
||||||
this.getSubtractedHeight();
|
|
||||||
this.autoLogin();
|
this.autoLogin();
|
||||||
|
this.systemBarHeight = getApp().globalData.statusBarHeight;
|
||||||
|
this.subtractedHeight = getApp().globalData.windowHeight;
|
||||||
},
|
},
|
||||||
methods: {
|
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);
|
|
||||||
},
|
|
||||||
|
|
||||||
changeTab(index) {
|
changeTab(index) {
|
||||||
this.current = index
|
this.current = index
|
||||||
console.log('当前选中索引:changeTab' + index)
|
console.log('当前选中索引:changeTab' + index)
|
||||||
|
|
@ -188,7 +169,8 @@
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/music/MusicPlayPage?musicUrl=' + item.musicAddress + '&musicName=' +
|
url: '/pages/music/MusicPlayPage?musicUrl=' + item.musicAddress + '&musicName=' +
|
||||||
item.title + '&lyrics=' + item.lyrics + '&isPublic=' + item.isPublic + '&state=' +
|
item.title + '&lyrics=' + item.lyrics + '&isPublic=' + item.isPublic + '&state=' +
|
||||||
item.state + '&id=' + item.id
|
item.state + '&id=' + item.id + '&isLikes=' + item.isLikes + '&isFavorites=' +
|
||||||
|
item.isFavorites + '&coverImage=' + item.coverImage
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,18 +65,9 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getStatusBarHeight();
|
this.systemBarHeight = getApp().globalData.statusBarHeight;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取状态栏高度的方法
|
|
||||||
getStatusBarHeight: function() {
|
|
||||||
var that = this;
|
|
||||||
uni.getSystemInfo({
|
|
||||||
success: function(res) {
|
|
||||||
that.systemBarHeight = res.statusBarHeight
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
toBack() {
|
toBack() {
|
||||||
uni.navigateBack();
|
uni.navigateBack();
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -20,21 +20,20 @@
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="" style="width: 100%; height: 103.47rpx; display: flex; align-items: center; justify-content: center;">
|
<view class=""
|
||||||
<image src="/static/image/vip.png" style="width: 683.33rpx; margin-top: 50rpx;" @click="toRecharge()"
|
style="width: 100%; height: 103.47rpx; display: flex; align-items: center; justify-content: center;">
|
||||||
|
<image :src="myPageMallEntrance" style="width: 683.33rpx; margin-top: 50rpx;" @click="toRecharge()"
|
||||||
mode="widthFix">
|
mode="widthFix">
|
||||||
</image>
|
</image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<view class=""
|
<view class=""
|
||||||
style="display: flex; flex-direction: row; width: 100%; margin-top: 67rpx; align-items: flex-end;">
|
style="display: flex; flex-direction: row; width: 65%; margin-top: 67rpx; align-items: center; justify-content: space-between;">
|
||||||
|
|
||||||
<text style="color: white; font-size: 33rpx; margin-left: 33rpx;">我的音乐</text>
|
<text @click="clickMyMusic(0)" :style="setColor()">我的音乐</text>
|
||||||
|
|
||||||
<text style="color: white; font-size: 25rpx; margin-left: 52rpx;">总点赞 {{userData.likeCount}}</text>
|
<text @click="clickMyMusic(1)" :style="setColor1()">我的收藏</text>
|
||||||
|
|
||||||
<text style="color: white; font-size: 25rpx; margin-left: 52rpx;">总收藏 1.1万</text>
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
@ -54,7 +53,8 @@
|
||||||
style="width: 45rpx; height: 45rpx; position: absolute;" alt="" />
|
style="width: 45rpx; height: 45rpx; position: absolute;" alt="" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="" style="display: flex; flex-direction: column; margin-left: 42rpx; width: 50%;">
|
<view class="" v-if="currentIndex==0"
|
||||||
|
style="display: flex; flex-direction: column; margin-left: 42rpx; width: 50%;">
|
||||||
|
|
||||||
<view class="" style="display: flex; flex-direction: row;">
|
<view class="" style="display: flex; flex-direction: row;">
|
||||||
|
|
||||||
|
|
@ -71,6 +71,28 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<view class=""
|
||||||
|
style="display: flex; flex-direction: row; align-items: center; margin-top: 75rpx;">
|
||||||
|
<image src="../../static/image/ic_like.png" style="width: 16rpx; height: 16rpx;"
|
||||||
|
mode=""></image>
|
||||||
|
<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;">{{item.favoritesCount}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="" v-if="currentIndex==1"
|
||||||
|
style="display: flex; flex-direction: column; margin-left: 42rpx; width: 35%;">
|
||||||
|
|
||||||
|
<text style="font-size: 33rpx; color: white;">{{item.title}}</text>
|
||||||
|
|
||||||
|
<text
|
||||||
|
style="font-size: 27rpx; color: #9C9090FF; margin-top: 18rpx;">{{item.authorName}}</text>
|
||||||
|
|
||||||
<view class=""
|
<view class=""
|
||||||
style="display: flex; flex-direction: row; align-items: center; margin-top: 20rpx;">
|
style="display: flex; flex-direction: row; align-items: center; margin-top: 20rpx;">
|
||||||
<image src="../../static/image/ic_like.png" style="width: 16rpx; height: 16rpx;"
|
<image src="../../static/image/ic_like.png" style="width: 16rpx; height: 16rpx;"
|
||||||
|
|
@ -86,9 +108,9 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<view class="" style="width: 90rpx; height: 90%; margin-left: 50rpx;">
|
<view class="" v-if="currentIndex==0" style="width: 90rpx; height: 90%; margin-left: 50rpx;">
|
||||||
|
|
||||||
<view class="" @click.native.stop="deleteMusic()"
|
<view class="" @click.native.stop="deleteMusic(item.id)"
|
||||||
style="width: 100%; display: flex; flex-direction: row; align-items: center; justify-content: center;">
|
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;"
|
<image src="../../static/image/ic_delete.png" style="width: 18rpx; height: 18rpx;"
|
||||||
|
|
@ -112,6 +134,21 @@
|
||||||
style="width: 518.75rpx; height: 289.58rpx; background-color: #474747; border-radius: 14rpx; display: flex; flex-direction: column; align-items: center;">
|
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: 33rpx; color: white; margin-top: 31rpx;">删除音乐</text>
|
||||||
<text class="" style="font-size: 28rpx; color: #ABABAB; margin-top: 39rpx;">删除后将无法找回,确认删除吗?</text>
|
<text class="" style="font-size: 28rpx; color: #ABABAB; margin-top: 39rpx;">删除后将无法找回,确认删除吗?</text>
|
||||||
|
|
||||||
|
<view class=""
|
||||||
|
style="display: flex; flex-direction: row; width: 80%; margin-top: 50rpx; justify-content: space-between;">
|
||||||
|
|
||||||
|
<view class="" @click="cancelDele()"
|
||||||
|
style="width: 176.46rpx; height: 59.03rpx; background-color: #7D7D7D; border-radius: 30rpx; display: flex; align-items: center; justify-content: center;">
|
||||||
|
<text style="color: white; font-size: 27rpx;">取消</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="" @click="confirmDele()"
|
||||||
|
style="width: 176.46rpx; height: 59.03rpx; background-image: linear-gradient(to left, #a541ffFF, #3fbbfeFF); border-radius: 30rpx; display: flex; align-items: center; justify-content: center;">
|
||||||
|
<text style="color: white; font-size: 27rpx;">确认</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
|
|
||||||
|
|
@ -128,43 +165,30 @@
|
||||||
systemBarHeight: 0,
|
systemBarHeight: 0,
|
||||||
subtractedHeight: 0,
|
subtractedHeight: 0,
|
||||||
dataList: [],
|
dataList: [],
|
||||||
userData: ""
|
userData: "",
|
||||||
|
currentIndex: 0,
|
||||||
|
musicList: [],
|
||||||
|
favoritesList: [],
|
||||||
|
selectedId: 0,
|
||||||
|
myPageMallEntrance: "",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getUserInfo();
|
this.getUserInfo();
|
||||||
this.getMyMusicList();
|
this.getMyMusicList();
|
||||||
|
this.getMusicSongFavorites();
|
||||||
|
this.currentIndex = 0;
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getStatusBarHeight();
|
this.systemBarHeight = getApp().globalData.statusBarHeight;
|
||||||
this.getSubtractedHeight();
|
this.subtractedHeight = getApp().globalData.windowHeight;
|
||||||
|
this.myPageMallEntrance = getApp().globalData.myPageMallEntrance;
|
||||||
this.getUserInfo();
|
this.getUserInfo();
|
||||||
this.getMyMusicList();
|
|
||||||
|
console.log("this.myPageMallEntrance", this.myPageMallEntrance);
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
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);
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
toRecharge() {
|
toRecharge() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
@ -193,31 +217,118 @@
|
||||||
var appserver = new AppServer();
|
var appserver = new AppServer();
|
||||||
appserver.GetMyMusicList().then(data => {
|
appserver.GetMyMusicList().then(data => {
|
||||||
console.log("getMyMusicList", data);
|
console.log("getMyMusicList", data);
|
||||||
|
that.musicList = data.data.reverse();
|
||||||
that.dataList = data.data.reverse();
|
that.dataList = data.data.reverse();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getMusicSongFavorites() {
|
||||||
|
var that = this;
|
||||||
|
var appserver = new AppServer();
|
||||||
|
appserver.GetMusicSongFavorites().then(data => {
|
||||||
|
console.log("getMusicSongFavorites", data);
|
||||||
|
that.favoritesList = data.data.reverse();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
//音乐播放页
|
//音乐播放页
|
||||||
toMusicPlay(item) {
|
toMusicPlay(item) {
|
||||||
|
if (this.currentIndex == 1) {
|
||||||
if (item.state == 0) {
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/create/CreateInfoPage?id=' + item.id
|
url: '/pages/music/MusicPlayPage?musicUrl=' + item.musicAddress + '&musicName=' +
|
||||||
|
item.title + '&lyrics=' + item.lyrics + '&isPublic=' + item.isPublic + '&state=' +
|
||||||
|
item.state + '&id=' + item.id + '&isLikes=' + item.isLikes + '&isFavorites=' +
|
||||||
|
item.isFavorites + '&coverImage=' + item.coverImage
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
uni.navigateTo({
|
if (item.state == 0) {
|
||||||
url: '/pages/music/MyMusicPlayPage?musicUrl=' + item.musicAddress + '&musicName=' +
|
uni.navigateTo({
|
||||||
item.title + '&lyrics=' + item.lyrics + '&isPublic=' + item.isPublic + '&state=' +
|
url: '/pages/create/CreateInfoPage?id=' + item.id
|
||||||
item.state + '&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 + '&coverImage=' + item.coverImage
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//删除音乐
|
//删除音乐
|
||||||
deleteMusic() {
|
deleteMusic(id) {
|
||||||
|
this.selectedId = id;
|
||||||
this.$refs.popup.open('center')
|
this.$refs.popup.open('center')
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//取消
|
||||||
|
cancelDele() {
|
||||||
|
this.$refs.popup.close();
|
||||||
|
},
|
||||||
|
|
||||||
|
//确定删除
|
||||||
|
confirmDele() {
|
||||||
|
this.$refs.popup.close();
|
||||||
|
uni.showLoading({
|
||||||
|
title: ' '
|
||||||
|
});
|
||||||
|
var that = this;
|
||||||
|
var appserver = new AppServer();
|
||||||
|
appserver.DelMusic(this.selectedId).then(data => {
|
||||||
|
console.log("DelMusic", data.data);
|
||||||
|
that.getMyMusicList();
|
||||||
|
uni.hideLoading();
|
||||||
|
uni.showToast({
|
||||||
|
title: data.message,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000,
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// 点击
|
||||||
|
clickMyMusic(type) {
|
||||||
|
this.currentIndex = type;
|
||||||
|
if (this.currentIndex == 0) {
|
||||||
|
this.dataList = this.musicList;
|
||||||
|
} else {
|
||||||
|
this.dataList = this.favoritesList;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
setColor() {
|
||||||
|
if (this.currentIndex == 0) {
|
||||||
|
return {
|
||||||
|
color: 'white',
|
||||||
|
fontSize: '33rpx'
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return {
|
||||||
|
color: '#ABABAB',
|
||||||
|
fontSize: '28rpx'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
setColor1() {
|
||||||
|
if (this.currentIndex == 1) {
|
||||||
|
return {
|
||||||
|
color: 'white',
|
||||||
|
fontSize: '33rpx'
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return {
|
||||||
|
color: '#ABABAB',
|
||||||
|
fontSize: '28rpx'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -19,10 +19,10 @@
|
||||||
|
|
||||||
<view class=""
|
<view class=""
|
||||||
style="width: 431.25rpx; height: 431.25rpx; background-color: #000000FF; margin-top: 88rpx;">
|
style="width: 431.25rpx; height: 431.25rpx; background-color: #000000FF; margin-top: 88rpx;">
|
||||||
|
<image :src="coverImage" style="width: 431.25rpx; height: 431.25rpx;" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class=""
|
<view class="" v-if="!isCheck"
|
||||||
style="width: 431.25rpx; display: flex; flex-direction: row; align-items: center; justify-content: space-between; margin-top: 40rpx;">
|
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="/static/image/ic_previous.png" style="width: 25.69rpx; height: 30.56rpx;" mode="" />
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
<image src="/static/image/ic_next.png" style="width: 25.69rpx; height: 30.56rpx;" mode="" />
|
<image src="/static/image/ic_next.png" style="width: 25.69rpx; height: 30.56rpx;" mode="" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class=""
|
<view class="" v-if="!isCheck"
|
||||||
style="display: flex; flex-direction: row; margin-top: 54rpx; width: 100%; align-items: center;">
|
style="display: flex; flex-direction: row; margin-top: 54rpx; width: 100%; align-items: center;">
|
||||||
<text style="font-size: 25rpx; color: #3FBBFEFF; margin-left: 34rpx;">{{currentTime}}</text>
|
<text style="font-size: 25rpx; color: #3FBBFEFF; margin-left: 34rpx;">{{currentTime}}</text>
|
||||||
<slider step="1" :value="speedValue" max="100" @change="sliderChange" activeColor="#84bcd2FF"
|
<slider step="1" :value="speedValue" max="100" @change="sliderChange" activeColor="#84bcd2FF"
|
||||||
|
|
@ -50,14 +50,18 @@
|
||||||
<text style="font-size: 29rpx; color: #999999FF; margin-left: 20rpx;">举报</text>
|
<text style="font-size: 29rpx; color: #999999FF; margin-left: 20rpx;">举报</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="" style="display: flex; flex-direction: row; align-items: center;">
|
<view class="" @click="musicSongLike()"
|
||||||
<image src="/static/image/ic_like.png" style="width: 22.92rpx; height: 22.92rpx;" mode="">
|
style="display: flex; flex-direction: row; align-items: center;">
|
||||||
|
<image :src="isLikes?'/static/image/ic_like_s.png':'/static/image/ic_like.png'"
|
||||||
|
style="width: 22.92rpx; height: 22.92rpx;" mode="">
|
||||||
</image>
|
</image>
|
||||||
<text style="font-size: 29rpx; color: #999999FF; margin-left: 20rpx;">点赞</text>
|
<text style="font-size: 29rpx; color: #999999FF; margin-left: 20rpx;">点赞</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="" style="display: flex; flex-direction: row; align-items: center;">
|
<view class="" @click="musicSongFavorites()"
|
||||||
<image src="/static/image/ic_collect.png" style="width: 22.92rpx; height: 22.92rpx;" mode="">
|
style="display: flex; flex-direction: row; align-items: center;">
|
||||||
|
<image :src="isFavorites?'/static/image/ic_collect_s.png':'/static/image/ic_collect.png'"
|
||||||
|
style="width: 22.92rpx; height: 22.92rpx;" mode="">
|
||||||
</image>
|
</image>
|
||||||
<text style="font-size: 29rpx; color: #999999FF; margin-left: 20rpx;">收藏</text>
|
<text style="font-size: 29rpx; color: #999999FF; margin-left: 20rpx;">收藏</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -72,19 +76,24 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 歌词 -->
|
||||||
<scroll-view scroll-y="true" :scroll-into-view="currentTimeContent"
|
<!-- <scroll-view scroll-y="true" :scroll-into-view="currentTimeContent"
|
||||||
style="width: 643.75rpx;height: 200rpx; margin-top: 60rpx;">
|
style="width: 643.75rpx;height: 200rpx; margin-top: 60rpx;">
|
||||||
<view v-for="(item,index) in lyricList" :id="'item-'+index"
|
<view v-for="(item,index) in lyricList" :id="'item-'+index"
|
||||||
style="width: 100%; text-align: center; margin-top: 11rpx; margin-bottom: 11rpx;"
|
style="width: 100%; text-align: center; margin-top: 11rpx; margin-bottom: 11rpx;"
|
||||||
:style="setlyricColor(index)">
|
:style="setlyricColor(index)">
|
||||||
{{item.content}}
|
{{item.content}}
|
||||||
</view>
|
</view>
|
||||||
|
</scroll-view> -->
|
||||||
|
|
||||||
|
<scroll-view scroll-y="true" style="width: 643.75rpx;height: 200rpx; margin-top: 60rpx;">
|
||||||
|
<view v-for="(item,index) in lyrics"
|
||||||
|
style="width: 100%; text-align: center; margin-top: 11rpx; margin-bottom: 11rpx; color: white;">
|
||||||
|
{{item}}
|
||||||
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view class="" style="width: 683.33rpx; height: 83.33rpx; margin-top: 140rpx; display: flex; align-items: center; justify-content: center;
|
<view class="" style="width: 683.33rpx; height: 83.33rpx; margin-top: 140rpx; display: flex; align-items: center; justify-content: center;
|
||||||
background-image: linear-gradient(to left, #a541ffFF, #a541ffFF, #3fbbfeFF); border-radius: 50rpx;">
|
background-image: linear-gradient(to left, #a541ffFF, #a541ffFF, #3fbbfeFF); border-radius: 50rpx;">
|
||||||
|
|
||||||
|
|
@ -102,6 +111,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
AppServer
|
||||||
|
} from '../../modules/api/AppServer';
|
||||||
var innerAudioContext = null;
|
var innerAudioContext = null;
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -114,8 +126,12 @@
|
||||||
currentTimeIndex: 0,
|
currentTimeIndex: 0,
|
||||||
currentTimeContent: "",
|
currentTimeContent: "",
|
||||||
musicName: "",
|
musicName: "",
|
||||||
lyrics: "",
|
lyrics: [],
|
||||||
id: 0,
|
id: 0,
|
||||||
|
isLikes: false,
|
||||||
|
isFavorites: false,
|
||||||
|
isCheck: false,
|
||||||
|
coverImage: "",
|
||||||
lyricList: [{
|
lyricList: [{
|
||||||
time: "00:00",
|
time: "00:00",
|
||||||
content: "晴天 - 周杰伦"
|
content: "晴天 - 周杰伦"
|
||||||
|
|
@ -144,16 +160,30 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad: function(options) {
|
onLoad: function(options) {
|
||||||
this.getStatusBarHeight();
|
this.systemBarHeight = getApp().globalData.statusBarHeight;
|
||||||
|
this.isCheck = getApp().globalData.isCheck;
|
||||||
this.musicName = options.musicName;
|
this.musicName = options.musicName;
|
||||||
this.lyrics = options.lyrics;
|
this.coverImage = options.coverImage;
|
||||||
this.id = options.id;
|
this.id = options.id;
|
||||||
uni.showLoading({
|
this.isLikes = JSON.parse(options.isLikes);
|
||||||
title: '加载中'
|
this.isFavorites = JSON.parse(options.isFavorites);
|
||||||
});
|
|
||||||
|
this.lyrics = this.splitAndRemoveBrackets(options.lyrics);
|
||||||
|
|
||||||
|
console.log("isFavorites", this.isFavorites);
|
||||||
|
console.log("isLikes", this.isLikes);
|
||||||
|
|
||||||
|
if (!this.isCheck) {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
innerAudioContext = uni.createInnerAudioContext();
|
innerAudioContext = uni.createInnerAudioContext();
|
||||||
innerAudioContext.src = options.musicUrl;
|
innerAudioContext.src = options.musicUrl;
|
||||||
innerAudioContext.autoplay = true;
|
if (!this.isCheck) {
|
||||||
|
innerAudioContext.autoplay = true;
|
||||||
|
}
|
||||||
|
|
||||||
innerAudioContext.onTimeUpdate(() => {
|
innerAudioContext.onTimeUpdate(() => {
|
||||||
this.currentTime = this.convertSecondsToHMS(innerAudioContext.currentTime);
|
this.currentTime = this.convertSecondsToHMS(innerAudioContext.currentTime);
|
||||||
|
|
@ -190,15 +220,6 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取状态栏高度的方法
|
|
||||||
getStatusBarHeight: function() {
|
|
||||||
var that = this;
|
|
||||||
uni.getSystemInfo({
|
|
||||||
success: function(res) {
|
|
||||||
that.systemBarHeight = res.statusBarHeight
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
toBack() {
|
toBack() {
|
||||||
innerAudioContext.destroy();
|
innerAudioContext.destroy();
|
||||||
|
|
@ -207,11 +228,11 @@
|
||||||
|
|
||||||
sliderChange(e) {
|
sliderChange(e) {
|
||||||
console.log('value 发生变化:' + e.detail.value)
|
console.log('value 发生变化:' + e.detail.value)
|
||||||
|
|
||||||
const timeInSeconds = innerAudioContext.duration * (e.detail.value / 100);
|
const timeInSeconds = innerAudioContext.duration * (e.detail.value / 100);
|
||||||
|
|
||||||
console.log("timeInSeconds", timeInSeconds);
|
console.log("timeInSeconds", timeInSeconds);
|
||||||
|
|
||||||
innerAudioContext.seek(timeInSeconds);
|
innerAudioContext.seek(timeInSeconds);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -232,7 +253,6 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
convertSecondsToHMS(seconds) {
|
convertSecondsToHMS(seconds) {
|
||||||
// var hours = Math.floor(seconds / 3600);
|
// var hours = Math.floor(seconds / 3600);
|
||||||
var minutes = Math.floor((seconds % 3600) / 60);
|
var minutes = Math.floor((seconds % 3600) / 60);
|
||||||
|
|
@ -263,7 +283,58 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
},
|
||||||
|
|
||||||
|
splitAndRemoveBrackets(str) {
|
||||||
|
// 按照换行符分割字符串成数组
|
||||||
|
const lines = str.split('\n');
|
||||||
|
|
||||||
|
// 遍历数组,去掉每行中[]内的内容
|
||||||
|
const result = lines.map(line => {
|
||||||
|
// 使用正则表达式匹配[]内的内容,并替换为空字符串
|
||||||
|
return line.replace(/\[.*?\]/g, '');
|
||||||
|
});
|
||||||
|
|
||||||
|
// 过滤掉空字符串
|
||||||
|
return result.filter(line => line.trim() !== '');
|
||||||
|
},
|
||||||
|
|
||||||
|
//点赞
|
||||||
|
musicSongLike() {
|
||||||
|
var that = this;
|
||||||
|
var appserver = new AppServer();
|
||||||
|
appserver.MusicSongLike(this.id).then(data => {
|
||||||
|
console.log("musicSongLike", data.data);
|
||||||
|
uni.showToast({
|
||||||
|
title: data.message,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (data.data) {
|
||||||
|
that.isLikes = !that.isLikes;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
//收藏
|
||||||
|
musicSongFavorites() {
|
||||||
|
var that = this;
|
||||||
|
var appserver = new AppServer();
|
||||||
|
appserver.MusicSongFavorites(this.id).then(data => {
|
||||||
|
console.log("musicSongFavorites", data.data);
|
||||||
|
uni.showToast({
|
||||||
|
title: data.message,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000,
|
||||||
|
});
|
||||||
|
if (data.data) {
|
||||||
|
that.isFavorites = !that.isFavorites;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,10 +19,10 @@
|
||||||
|
|
||||||
<view class=""
|
<view class=""
|
||||||
style="width: 431.25rpx; height: 431.25rpx; background-color: #000000FF; margin-top: 88rpx;">
|
style="width: 431.25rpx; height: 431.25rpx; background-color: #000000FF; margin-top: 88rpx;">
|
||||||
|
<image :src="coverImage" style="width: 431.25rpx; height: 431.25rpx;" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class=""
|
<view class="" v-if="!isCheck"
|
||||||
style="width: 431.25rpx; display: flex; align-items: center; justify-content: center; margin-top: 40rpx;">
|
style="width: 431.25rpx; display: flex; align-items: center; justify-content: center; margin-top: 40rpx;">
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class=""
|
<view class="" v-if="!isCheck"
|
||||||
style="display: flex; flex-direction: row; margin-top: 54rpx; width: 100%; align-items: center;">
|
style="display: flex; flex-direction: row; margin-top: 54rpx; width: 100%; align-items: center;">
|
||||||
<text style="font-size: 25rpx; color: #3FBBFEFF; margin-left: 34rpx;">{{currentTime}}</text>
|
<text style="font-size: 25rpx; color: #3FBBFEFF; margin-left: 34rpx;">{{currentTime}}</text>
|
||||||
<slider step="1" :value="speedValue" max="100" @change="sliderChange" activeColor="#84bcd2FF"
|
<slider step="1" :value="speedValue" max="100" @change="sliderChange" activeColor="#84bcd2FF"
|
||||||
|
|
@ -64,14 +64,21 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 歌词 -->
|
||||||
<scroll-view scroll-y="true" :scroll-into-view="currentTimeContent"
|
<!-- <scroll-view scroll-y="true" :scroll-into-view="currentTimeContent"
|
||||||
style="width: 643.75rpx;height: 200rpx; margin-top: 60rpx;">
|
style="width: 643.75rpx;height: 200rpx; margin-top: 60rpx;">
|
||||||
<view v-for="(item,index) in lyricList" :id="'item-'+index"
|
<view v-for="(item,index) in lyricList" :id="'item-'+index"
|
||||||
style="width: 100%; text-align: center; margin-top: 11rpx; margin-bottom: 11rpx;"
|
style="width: 100%; text-align: center; margin-top: 11rpx; margin-bottom: 11rpx;"
|
||||||
:style="setlyricColor(index)">
|
:style="setlyricColor(index)">
|
||||||
{{item.content}}
|
{{item.content}}
|
||||||
</view>
|
</view>
|
||||||
|
</scroll-view> -->
|
||||||
|
|
||||||
|
<scroll-view scroll-y="true" style="width: 643.75rpx;height: 260rpx; margin-top: 60rpx;">
|
||||||
|
<view v-for="(item,index) in lyrics"
|
||||||
|
style="width: 100%; text-align: center; margin-top: 11rpx; margin-bottom: 11rpx; color: white;">
|
||||||
|
{{item}}
|
||||||
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -109,12 +116,14 @@
|
||||||
currentTimeIndex: 0,
|
currentTimeIndex: 0,
|
||||||
currentTimeContent: "",
|
currentTimeContent: "",
|
||||||
musicName: "",
|
musicName: "",
|
||||||
lyrics: "",
|
lyrics: [],
|
||||||
isExamine: false,
|
isExamine: false,
|
||||||
isPublic: false,
|
isPublic: false,
|
||||||
state: 0,
|
state: 0,
|
||||||
isPublicStatus: false,
|
isPublicStatus: false,
|
||||||
id: 0,
|
id: 0,
|
||||||
|
isCheck: false,
|
||||||
|
coverImage: "",
|
||||||
lyricList: [{
|
lyricList: [{
|
||||||
time: "00:00",
|
time: "00:00",
|
||||||
content: "晴天 - 周杰伦"
|
content: "晴天 - 周杰伦"
|
||||||
|
|
@ -143,15 +152,23 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad: function(options) {
|
onLoad: function(options) {
|
||||||
this.getStatusBarHeight();
|
this.systemBarHeight = getApp().globalData.statusBarHeight;
|
||||||
|
this.isCheck = getApp().globalData.isCheck;
|
||||||
this.musicName = options.musicName;
|
this.musicName = options.musicName;
|
||||||
this.lyrics = options.lyrics;
|
this.coverImage = options.coverImage;
|
||||||
this.isPublic = options.isPublic;
|
this.isPublic = options.isPublic;
|
||||||
this.state = options.state;
|
this.state = options.state;
|
||||||
this.id = options.id;
|
this.id = options.id;
|
||||||
uni.showLoading({
|
|
||||||
title: '加载中'
|
this.lyrics = this.splitAndRemoveBrackets(options.lyrics);
|
||||||
});
|
|
||||||
|
console.log("coverImage", this.coverImage);
|
||||||
|
|
||||||
|
if (!this.isCheck) {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
console.log("this.state", this.state);
|
console.log("this.state", this.state);
|
||||||
console.log("this.isPublic", this.isPublic);
|
console.log("this.isPublic", this.isPublic);
|
||||||
|
|
@ -167,7 +184,11 @@
|
||||||
|
|
||||||
innerAudioContext = uni.createInnerAudioContext();
|
innerAudioContext = uni.createInnerAudioContext();
|
||||||
innerAudioContext.src = options.musicUrl;
|
innerAudioContext.src = options.musicUrl;
|
||||||
innerAudioContext.autoplay = true;
|
|
||||||
|
if (!this.isCheck) {
|
||||||
|
innerAudioContext.autoplay = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
innerAudioContext.onTimeUpdate(() => {
|
innerAudioContext.onTimeUpdate(() => {
|
||||||
this.currentTime = this.convertSecondsToHMS(innerAudioContext.currentTime);
|
this.currentTime = this.convertSecondsToHMS(innerAudioContext.currentTime);
|
||||||
|
|
@ -204,16 +225,6 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取状态栏高度的方法
|
|
||||||
getStatusBarHeight: function() {
|
|
||||||
var that = this;
|
|
||||||
uni.getSystemInfo({
|
|
||||||
success: function(res) {
|
|
||||||
that.systemBarHeight = res.statusBarHeight
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
toBack() {
|
toBack() {
|
||||||
innerAudioContext.destroy();
|
innerAudioContext.destroy();
|
||||||
uni.navigateBack();
|
uni.navigateBack();
|
||||||
|
|
@ -293,6 +304,20 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
splitAndRemoveBrackets(str) {
|
||||||
|
// 按照换行符分割字符串成数组
|
||||||
|
const lines = str.split('\n');
|
||||||
|
|
||||||
|
// 遍历数组,去掉每行中[]内的内容
|
||||||
|
const result = lines.map(line => {
|
||||||
|
// 使用正则表达式匹配[]内的内容,并替换为空字符串
|
||||||
|
return line.replace(/\[.*?\]/g, '');
|
||||||
|
});
|
||||||
|
|
||||||
|
// 过滤掉空字符串
|
||||||
|
return result.filter(line => line.trim() !== '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<image src="/static/image/recharge_info.png"
|
<image :src="mallBanner" style="width: 683.33rpx; height: 206.94rpx; margin-top: 66rpx;" mode="">
|
||||||
style="width: 683.33rpx; height: 206.94rpx; margin-top: 66rpx;" mode=""></image>
|
</image>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
@ -35,8 +35,8 @@
|
||||||
style="width: 192.36rpx; height: 172.22rpx; margin-left: 29rpx;
|
style="width: 192.36rpx; height: 172.22rpx; margin-left: 29rpx;
|
||||||
background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; padding: 2rpx;" :style="setBg(index)">
|
background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; padding: 2rpx;" :style="setBg(index)">
|
||||||
|
|
||||||
<image src="/static/image/recharge_goods.png" style="width: 185.42rpx; height: 164.58rpx;"
|
<image :src="item.imgUrl" style="width: 185.42rpx; height: 164.58rpx;"
|
||||||
@click="clickGoods(index,item)" mode=""></image>
|
@click="clickGoods(index,item.price)" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
@ -46,17 +46,17 @@
|
||||||
<view class=""
|
<view class=""
|
||||||
style="width: 100%; display: flex; flex-direction: row; margin-top: 61rpx; overflow: auto;">
|
style="width: 100%; display: flex; flex-direction: row; margin-top: 61rpx; overflow: auto;">
|
||||||
|
|
||||||
<view class="" v-for="(item,index) in goodsList"
|
<view class="" v-for="(item,index) in vipGoodsList"
|
||||||
style="width: 192.36rpx; height: 172.22rpx; margin-left: 29rpx;
|
style="width: 192.36rpx; height: 172.22rpx; margin-left: 29rpx;
|
||||||
background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; padding: 2rpx;" :style="setVIPBg(index)">
|
background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; padding: 2rpx;" :style="setVIPBg(index)">
|
||||||
|
|
||||||
<image src="/static/image/recharge_goods_2.png" style="width: 185.42rpx; height: 164.58rpx;"
|
<image :src="item.imgUrl" style="width: 185.42rpx; height: 164.58rpx;"
|
||||||
@click="clickVIPGoods(index,item)" mode=""></image>
|
@click="clickVIPGoods(index,item.price)" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<view class="" @click="setPayment(true)"
|
<!-- <view class="" @click="setPayment(true)"
|
||||||
style="display: flex; width: 100%; flex-direction: row; height: 50rpx; margin-top: 60rpx;align-items: center; justify-content: space-between;">
|
style="display: flex; width: 100%; flex-direction: row; height: 50rpx; margin-top: 60rpx;align-items: center; justify-content: space-between;">
|
||||||
|
|
||||||
<view class=""
|
<view class=""
|
||||||
|
|
@ -86,7 +86,7 @@
|
||||||
|
|
||||||
<image :src='!isWX?"/static/image/ic_c_s.png":"/static/image/ic_c.png"'
|
<image :src='!isWX?"/static/image/ic_c_s.png":"/static/image/ic_c.png"'
|
||||||
style="width: 25rpx; height: 25rpx; margin-right: 33rpx;" mode=""></image>
|
style="width: 25rpx; height: 25rpx; margin-right: 33rpx;" mode=""></image>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
|
|
||||||
<view class="" style="width: 683.33rpx; height: 83.33rpx; margin-top: 140rpx; display: flex; align-items: center; justify-content: center;
|
<view class="" style="width: 683.33rpx; height: 83.33rpx; margin-top: 140rpx; display: flex; align-items: center; justify-content: center;
|
||||||
|
|
@ -127,15 +127,16 @@
|
||||||
} from '../../modules/api/AppServer';
|
} from '../../modules/api/AppServer';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
var goodsList = [1, 2, 3, 4, 5, 6];
|
|
||||||
return {
|
return {
|
||||||
systemBarHeight: 0,
|
systemBarHeight: 0,
|
||||||
goodsList,
|
goodsList: [],
|
||||||
|
vipGoodsList: [],
|
||||||
currentIndex: 0,
|
currentIndex: 0,
|
||||||
currentVIPIndex: 0,
|
currentVIPIndex: 0,
|
||||||
isVIP: false,
|
isVIP: false,
|
||||||
isWX: true,
|
isWX: true,
|
||||||
price: "",
|
price: "",
|
||||||
|
mallBanner: "",
|
||||||
isAgreement: true
|
isAgreement: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -143,29 +144,23 @@
|
||||||
this.getShopInfoList();
|
this.getShopInfoList();
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getStatusBarHeight();
|
this.systemBarHeight = getApp().globalData.statusBarHeight;
|
||||||
|
this.mallBanner = getApp().globalData.mallBanner;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取状态栏高度的方法
|
|
||||||
getStatusBarHeight: function() {
|
|
||||||
var that = this;
|
|
||||||
uni.getSystemInfo({
|
|
||||||
success: function(res) {
|
|
||||||
that.systemBarHeight = res.statusBarHeight
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
toBack() {
|
toBack() {
|
||||||
uni.navigateBack();
|
uni.navigateBack();
|
||||||
},
|
},
|
||||||
|
|
||||||
//获取商品信息
|
//获取商品信息
|
||||||
getShopInfoList() {
|
getShopInfoList() {
|
||||||
var that = this;
|
var that = this;
|
||||||
var appserver = new AppServer();
|
var appserver = new AppServer();
|
||||||
appserver.GetShopInfoList().then(data => {
|
appserver.GetShopInfoList().then(data => {
|
||||||
console.log("getShopInfoList", data.data);
|
console.log("getShopInfoList", data.data);
|
||||||
|
that.price = data.data.productList[0].price
|
||||||
|
that.goodsList = data.data.productList;
|
||||||
|
that.vipGoodsList = data.data.vipList;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
BIN
static/image/ic_collect_s.png
Normal file
BIN
static/image/ic_collect_s.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
BIN
static/image/ic_like_s.png
Normal file
BIN
static/image/ic_like_s.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 63 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 28 KiB |
BIN
static/logo.png
BIN
static/logo.png
Binary file not shown.
|
Before Width: | Height: | Size: 3.9 KiB |
Loading…
Reference in New Issue
Block a user