音乐播放器微信小程序的设计与实现(附源码)_微信小程序开发音乐播放器

最后

我还为大家准备了一套体系化的架构师学习资料包以及BAT面试资料,供大家参考及学习

已经将知识体系整理好(源码,笔记,PPT,学习视频)

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

本文已被CODING开源项目:【一线大厂Java面试题解析+核心总结学习笔记+最新讲解视频+实战项目源码】收录

需要这份系统化的资料的朋友,可以点击这里获取

			this.user = res.data;
			this.btnColor = this.btnColor.sort(() => {
				return (0.5 - Math.random());
			});
			this.getThumbsup();
			let cleanType = uni.getStorageSync('pingluenStateState')
			if (cleanType) {
				uni.removeStorageSync('pingluenStateState')
				this.mescroll.num = 1
				this.upCallback(this.mescroll)
			}
		},
		destroyed: function() {
			//window.clearInterval(this.inter);
		},
		methods: {
            //打开评分留言窗口
            async onScoreOrComment() {
                this.commentData = null
                this.scoreData = 0
                this.$refs.deliver.open()
            },
            // 关闭评分留言窗口
            closeScoreOrComment() {
                this.$refs.deliver.close()
            },
            //提交数据
            async submitData() {
                if (1 == 2)
                    return this.$utils.msg('不会进入的地方,如果进来请联系管理员');
                else if (this.commentData == null || this.commentData == '')
                    return this.$utils.msg('留言不能为空');
                let data = {
                    yinyueId: this.yinyueId,
                    yonghuId: this.user.yonghuId,
					yinyueLiuyanPingfenNumber: this.scoreData,
                    yinyueLiuyanText: this.commentData,
                }
                await this.$api.save(`yinyueLiuyan`, data);
                this.$refs.deliver.close()
                this.mescroll.num = 1
                this.upCallback(this.mescroll)
            },
			//返回
			async fanhui(){
				this.$utils.tab("list")
			},
			//下载
			download(url) {
				let _this = this;
				uni.downloadFile({
					url: url,
					success: (res) => {
						if (res.statusCode === 200) {
							_this.$utils.msg('下载成功');
							// window.open(url);
						}
					}
				});
			},
			// 获取详情
			async init() {
				let res = await this.$api.detail('yinyue', this.yinyueId);
                this.detail = res.data
				this.detail.yinyueContent = this.detail.yinyueContent.replace("<img","<img class=\"daxiao\"").replace("src=\"upload/","src=\""+this.$base.url+"upload/");
				// 主图
				this.swiperList = this.detail.yinyuePhoto ? this.detail.yinyuePhoto.split(",") : [];
			},
			/\* && !nameList?seq\_contains('zuowei\_number')\*/
			// 收藏
			async getyinyueCollection() {
				let params = {
					page: 1,
					limit: 1,
					yinyueId: this.yinyueId,
					yinyueCollectionTypes:'1'
				}
				let res = await this.$api.page(`yinyueCollection`, params);
				if(res.data.list.length > 0){
					this.collectionFlag = res.data.list.length;
				}else{
					this.collectionFlag = 0
				}
			},
			async shoucang() {
				let _this = this;
				let params = {
					page: 1,
					limit: 1,
					yinyueId: _this.detail.id,
					yonghuId: _this.user.id,
					yinyueCollectionTypes:'1'
				}
				let res = await _this.$api.list(`yinyueCollection`, params);
				if (res.data.list.length == 1) {
					let yinyueCollectionId = res.data.list[0].id;
					uni.showModal({
						title: '提示',
						content: '是否取消',
						success: async function(res) {
							if (res.confirm) {
								await _this.$api.del('yinyueCollection', JSON.stringify([yinyueCollectionId]));
								_this.$utils.msg('取消成功');
								_this.getyinyueCollection();
							}
						}
					});
					return;
				}
				uni.showModal({
					title: '提示',
					content: '是否收藏',
					success: async function(res) {
						if (res.confirm) {
							await _this.$api.add('yinyueCollection', {
								yonghuId: _this.user.id,
								yinyueId: _this.detail.id,
								yinyueCollectionTypes:1
							});
							_this.$utils.msg('收藏成功');
							_this.getyinyueCollection();
						}
					}
				});
			},
			// mescroll组件初始化的回调,可获取到mescroll对象
			mescrollInit(mescroll) {
				this.mescroll = mescroll;
			},

			/\*下拉刷新的回调 \*/
			downCallback(mescroll) {
				this.hasNext = true
				mescroll.resetUpScroll()
			},

			/\*上拉加载的回调: mescroll携带page的参数, 其中num:当前页 从1开始, size:每页数据条数,默认10 \*/
			async upCallback(mescroll) {
				let res = await this.$api.list('yinyueLiuyan', {
					page: mescroll.num,
					limit: mescroll.size,
					yinyueId: this.yinyueId
				});
				// 如果是第一页数据置空
				if (mescroll.num == 1) this.commentList = [];
				this.commentList = this.commentList.concat(res.data.list);
				if (res.data.list.length == 0) this.hasNext = false;
				mescroll.endSuccess(mescroll.size, this.hasNext);
			},
			// 获取赞踩
			async getThumbsup() {
				let _this = this;
				let params = {
					page: 1,
					limit: 1,
					yinyueId: _this.detail.id,
					yonghuId: _this.user.id,
				}
				let res = await _this.$api.list(`yinyueCollection`, params);
				if (res.data.list.length > 0) {
					if (res.data.list[0].yinyueCollectionTypes == '2') {
						_this.thumbsupFlag = true;
					}
					if (res.data.list[0].yinyueCollectionTypes == '3') {
						_this.crazilyFlag = true;
					}
				}

			},
			// 点赞
			async zan() {
				let _this = this;
				let params = {
					page: 1,
					limit: 1,
					yinyueId: _this.detail.id,
					yonghuId: _this.user.id,
					yinyueCollectionTypes: '2',
				}
				let res = await _this.$api.list(`yinyueCollection`, params);
				if (res.data.list.length > 0) {
					let yinyueCollectionId = res.data.list[0].id;
					uni.showModal({
						title: '提示',
						content: '是否取消点赞',
						success: async function(res) {
							if (res.confirm) {
								await _this.$api.del('yinyueCollection', JSON.stringify([yinyueCollectionId]));
								_this.detail.zanNumber = parseInt(_this.detail.zanNumber) - 1;
								await _this.$api.update('yinyue', _this.detail);
								_this.$utils.msg('取消成功');
								_this.thumbsupFlag = false;
							}
						}
					});
					return;
				}
				uni.showModal({
					title: '提示',
					content: '是否点赞',
					success: async function(res) {
						if (res.confirm) {
							await _this.$api.add('yinyueCollection', {
								yonghuId: _this.user.id,
								yinyueId: _this.detail.id,
								yinyueCollectionTypes: '2'
							});
							_this.detail.zanNumber = parseInt(_this.detail.zanNumber) + 1;
							await _this.$api.update('yinyue', _this.detail);
							_this.$utils.msg('点赞成功');
							_this.thumbsupFlag = true;
						}
					}
				});
			},
			// 踩
			async cai() {
				let _this = this;
				let params = {
					page: 1,
					limit: 1,
					yinyueId: _this.detail.id,
					yonghuId: _this.user.id,
					yinyueCollectionTypes: '3',
				}
				let res = await _this.$api.list(`yinyueCollection`, params);
				if (res.data.list.length > 0) {
					let yinyueCollectionId = res.data.list[0].id;
					uni.showModal({
						title: '提示',
						content: '是否取消点踩',
						success: async function(res) {
							if (res.confirm) {
								await _this.$api.del('yinyueCollection', JSON.stringify([yinyueCollectionId]));
								_this.detail.caiNumber = parseInt(_this.detail.caiNumber) - 1;
								await _this.$api.update('yinyue', _this.detail);
								_this.$utils.msg('取消成功');
								_this.crazilyFlag = false;
							}
						}
					});
					return;
				}
				uni.showModal({
					title: '提示',
					content: '是否点踩',
					success: async function(res) {
						if (res.confirm) {
							await _this.$api.add('yinyueCollection', {
								yonghuId: _this.user.id,
								yinyueId: _this.detail.id,
								yinyueCollectionTypes: '3'
							});
							_this.detail.caiNumber = parseInt(_this.detail.caiNumber) + 1;
							await _this.$api.update('yinyue', _this.detail);
							_this.$utils.msg('点踩成功');
							_this.crazilyFlag = true;
						}
					}
				});
			},
			async baoming() {
				let _this = this;
				uni.showModal({
					title: '提示',
					content: '确定要报名么',
					success: async function(res) {
						if (res.confirm) {
							await _this.$api.add('yinyueYuyue', {
								yonghuId: _this.user.id,
								yinyueId: _this.detail.id,
							});
							_this.$utils.msg('报名成功');
							_this.$utils.jump('/pages/yinyueYuyue/list');
						}
					}
				});
			},
			async onErweima() {//打开模态框
				// this.erweimaText = "画师名称:["+this.detail.huashiName+"]所属画院:["+this.detail.huayuanName+"]画师称号:["+this.detail.huashiChenghao+"]画师性别:["+this.detail.sexValue+"]"
				this.erweimaText = "二维码内容";
				this.$refs.erweimaModal.open()
			},
			async closeErweima() {//关闭模态框
				this.$refs.erweimaModal.close()
			},
			async saveErweima() {//保存二维码
				uni.showLoading({title: '保存中',mask: true});
				const ref = this.$refs['qr'];
				ref.save({
					success: res => {

最后

分享一些资料给大家,我觉得这些都是很有用的东西,大家也可以跟着来学习,查漏补缺。

《Java高级面试》

《Java高级架构知识》

《算法知识》

本文已被CODING开源项目:【一线大厂Java面试题解析+核心总结学习笔记+最新讲解视频+实战项目源码】收录

需要这份系统化的资料的朋友,可以点击这里获取

知识》**

[外链图片转存中…(img-SDg9Ol1f-1715720439009)]

《算法知识》

[外链图片转存中…(img-5Z6C6QoM-1715720439009)]

本文已被CODING开源项目:【一线大厂Java面试题解析+核心总结学习笔记+最新讲解视频+实战项目源码】收录

需要这份系统化的资料的朋友,可以点击这里获取

  • 4
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
音乐mp3小程序源码是一种用于开发音乐播放器功能的程序代码。它可以在小程序平台上用于创建一个功能完善的音乐播放器应用程序。 这个小程序源码中包含了许多功能,如音乐列表展示、播放控制、歌曲切换、音量调节等。源码中会有对应的前端代码和后端代码,前端代码用于展示音乐播放器的用户界面,后端代码用于处理音乐的相关操作。 在前端代码中,可以通过使用小程序框架提供的组件和API来实现音乐播放器的界面展示和交互功能。例如,可以使用swiper组件展示音乐列表,并通过点击列表项来切换歌曲。可以使用audio组件来实现音乐的播放、暂停和切换等功能。还可以使用slider组件来实现音量的调节功能。 在后端代码中,可以使用后端框架来处理音乐的相关操作。例如,可以通过接口实现获取音乐列表的功能,可以使用数据库来存储音乐的信息。还可以通过后端代码来处理音乐的上传和下载功能。 这个音乐mp3小程序源码可以根据具体的需求进行二次开发。可以根据实际情况来修改和添加功能,例如加入搜索功能、歌词显示等。还可以根据实际需求来美化界面,优化用户体验。 总之,音乐mp3小程序源码是一个开发音乐播放器应用程序的基础,可以通过二次开发来定制符合自己需求的音乐播放器。它能够为用户提供便捷的音乐播放体验,满足用户对音乐的欣赏需求。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值