当前位置: 首页 > news >正文

做网站什么主题比较好滑县住房城乡建设厅门户网站

做网站什么主题比较好,滑县住房城乡建设厅门户网站,08r2 搭建php网站,godaddy中文网站开发一、界面设计 播放页面#xff1a; 显示当前播放歌曲的封面图片、歌曲名称、歌手名称。有播放 / 暂停按钮、上一首、下一首按钮。进度条显示播放进度#xff0c;可以拖动进度条调整播放位置。音量调节滑块。 歌曲列表页面#xff1a; 展示歌曲列表#xff0c;包括歌曲名称、…一、界面设计 播放页面 显示当前播放歌曲的封面图片、歌曲名称、歌手名称。有播放 / 暂停按钮、上一首、下一首按钮。进度条显示播放进度可以拖动进度条调整播放位置。音量调节滑块。 歌曲列表页面 展示歌曲列表包括歌曲名称、歌手名称和封面图片可选。点击歌曲可以切换播放。 二、功能实现 数据存储与获取 可以将歌曲信息存储在小程序的本地缓存或使用云开发数据库存储歌曲列表。通过网络请求获取歌曲资源的 URL。 播放控制 使用小程序的音频 API 进行播放控制。实现播放、暂停、上一首、下一首等功能。监听音频播放进度更新进度条。 进度条控制 允许用户拖动进度条来调整播放位置。根据用户操作更新音频的播放位置。 音量调节 通过滑块控制音频的音量大小。 歌曲列表切换 在歌曲列表页面点击歌曲时切换当前播放歌曲。更新播放页面的歌曲信息。 目的 掌握swiper组件、scroll-view组件的使用掌握image组件的使用掌握音频API的使用掌握slider组件的使用 内容 了音乐小程序项目的完整开发流程其开发步骤包括页面结构的分析、样式的设计、组件的运用等。通过本章的学习读者能够掌握小程序的基本交互逻辑的开发能够运用API来实现项目中的特定功能学会解决开发过程中常见的问题。 代码架构 index.wxml !-- 标签页标题 -- view classtabview classtab-item {{tab0?active:}} bindtapchangeItem data-item0音乐推荐/viewview classtab-item {{tab1?active:}} bindtapchangeItem data-item1播放器/viewview classtab-item {{tab2?active:}} bindtapchangeItem data-item2播放列表/view /view !-- 内容区域 -- view classcontentswiper current{{item}} bindchangechangeTabswiper-item!-- 内容滚动区域 --scroll-view classcontent-info scroll-y!-- 轮播图 --swiper classcontent-info-slide indicator-colorrgba(255,255,255,.5) indicator-active-color#fff indicator-dots circular autoplayswiper-itemimage src/images/xingong.jpg //swiper-itemswiper-itemimage src/images/banner.jpg //swiper-itemswiper-itemimage src/images/banner.jpg //swiper-item/swiper!-- 功能按钮 --view classcontent-info-portalviewimage src/images/04.png /text私人FM/text/viewviewimage src/images/05.png /text每日歌曲推荐/text/viewviewimage src/images/06.png /text云音乐新歌榜/text/view/view!-- 热门音乐 --view classcontent-info-listview classlist-title推荐歌曲/viewview classlist-innerview classlist-itemimage src/images/图片27.jpg /view紫罗兰/view/viewview classlist-itemimage src/images/图片28.jpg /view五月之歌/view/viewview classlist-itemimage src/images/图片29.jpg /view菩提树/view/viewview classlist-itemimage src/images/图片31.jpg /view欢乐颂/view/viewview classlist-itemimage src/images/图片33.jpg /view安魂曲/view/viewview classlist-itemimage src/images/图片36.jpg /view摇篮曲/view/view/view/view/scroll-view/swiper-itemswiper-item!-- 播放器页面 --include srcplay.wxml //swiper-itemswiper-iteminclude srcplaylist.wxml //swiper-item/swiper /view !-- 底部播放器 -- view classplayerimage classplayer-cover src{{play.coverImgUrl}} /view classplayer-infoview classplayer-info-title{{play.title}}/viewview classplayer-info-singer{{play.singer}}/view/viewview classplayer-controls!-- 切换到播放列表 --image src/images/01.png bindtapchangeItem data-item2 /!-- 播放或暂停 --image wx:if{{statepaused}} src/images/02.png bindtapplay /image wx:else src/images/02stop.png bindtappause /!-- 下一曲 --image src/images/03.png bindtapnext //view /view info.wxml !-- 内容滚动区域 -- scroll-view classcontent-info scroll-y!-- 轮播图 --swiper classcontent-info-slide indicator-colorrgba(255,255,255,.5) indicator-active-color#fff indicator-dots circular autoplayswiper-itemimage src/images/xingong.jpg //swiper-itemswiper-itemimage src/images/xingong.jpg //swiper-itemswiper-itemimage src/images/banner.jpg //swiper-item/swiper!-- 功能按钮 --view classcontent-info-portalviewimage src/images/04.png /text私人FM/text/viewviewimage src/images/05.png /text每日歌曲推荐/text/viewviewimage src/images/06.png /text云音乐新歌榜/text/view/view!-- 热门音乐 --view classcontent-info-listview classlist-title推荐歌曲/viewview classlist-innerview classlist-itemimage src/images/cover.jpg /view紫罗兰/view/viewview classlist-itemimage src/images/cover.jpg /view五月之歌/view/viewview classlist-itemimage src/images/cover.jpg /view菩提树/view/viewview classlist-itemimage src/images/cover.jpg /view欢乐颂/view/viewview classlist-itemimage src/images/cover.jpg /view安魂曲/view/viewview classlist-itemimage src/images/cover.jpg /view摇篮曲/view/view/view/view /scroll-view play.wxml !-- 播放器 -- view classcontent-play!-- 显示音乐信息 --view classcontent-play-infotext{{play.title}}/textview—— {{play.singer}} ——/view/view!-- 显示专辑封面 --view classcontent-play-coverimage src{{play.coverImgUrl}} styleanimation-play-state:{{state}} //view!-- 显示播放进度和时间 --view classcontent-play-progresstext{{play.currentTime}}/textviewslider bindchangesliderChange activeColor#d33a31 block-size12 backgroundColor#dadada value{{play.percent}} //viewtext{{play.duration}}/text/view /view playlist.wxml scroll-view classcontent-playlist scroll-yview classplaylist-item wx:for{{playlist}} wx:keyid bindtapchange data-index{{index}}image classplaylist-cover src{{item.coverImgUrl}} /view classplaylist-infoview classplaylist-info-title{{item.title}}/viewview classplaylist-info-singer{{item.singer}}/view/viewview classplaylist-controlstext wx:if{{indexplayIndex}}正在播放/text/view/view /scroll-view index.js // pages/index/index.js Page({/*** 页面的初始数据*/data: {item: 0,tab: 0,// 播放列表数据playlist: [{id: 1,title: 钢琴协奏曲,singer: 肖邦,src: http://localhost:3000/1.mp3,coverImgUrl: /images/cover.jpg}, {id: 2,title: 奏鸣曲,singer: 莫扎特,src: http://localhost:3000/2.mp3,coverImgUrl: /images/cover.jpg}, {id: 3,title: 欢乐颂,singer: 贝多芬,src: http://localhost:3000/1.mp3,coverImgUrl: /images/cover.jpg}, {id: 4,title: 爱之梦,singer: 李斯特,src: http://localhost:3000/2.mp3,coverImgUrl: /images/cover.jpg}],state: paused,playIndex: 0,play: {currentTime: 00:00,duration: 00:00,percent: 0,title: ,singer: ,coverImgUrl: /images/图片47.jpg,}},// 页面切换changeItem: function(e) {this.setData({item: e.target.dataset.item,})},// tab切换changeTab: function(e) {this.setData({tab: e.detail.current})},// 实现播放器播放功能audioCtx: null,onReady: function() {this.audioCtx wx.createInnerAudioContext()// 默认选择第1曲this.setMusic(0)var that this// 播放进度检测this.audioCtx.onError(function() {console.log(播放失败 that.audioCtx.src)})// 播放完成自动换下一曲this.audioCtx.onEnded(function() {that.next()})// 自动更新播放进度this.audioCtx.onPlay(function() {})// onWaiting触发的暂停var waitFlag false// 音频由于网络等原因等待中的回调this.audioCtx.onWaiting(function() {waitFlag true})// 音频准备就绪的回调this.audioCtx.onCanplay(function() {if (waitFlag) {that.audioCtx.pause()that.audioCtx.play()waitFlag false}})this.audioCtx.onTimeUpdate(function() {that.setData({play.duration: formatTime(that.audioCtx.duration),play.currentTime: formatTime(that.audioCtx.currentTime),play.percent: that.audioCtx.currentTime / that.audioCtx.duration * 100})})// 格式化时间function formatTime(time) {var minute Math.floor(time / 60) % 60;var second Math.floor(time) % 60return (minute 10 ? 0 minute : minute) : (second 10 ? 0 second : second)}},// 音乐播放setMusic: function(index) {var music this.data.playlist[index]this.audioCtx.src music.srcthis.setData({playIndex: index,play.title: music.title,play.singer: music.singer,play.coverImgUrl: music.coverImgUrl,play.currentTime: 00:00,play.duration: 00:00,play.percent: 0})},// 播放按钮play: function() {this.audioCtx.play()this.setData({state: running})},// 暂停按钮pause: function() {this.audioCtx.pause()this.setData({state: paused})},// 下一曲按钮next: function() {var index this.data.playIndex this.data.playlist.length - 1 ? 0 : this.data.playIndex 1this.setMusic(index)if (this.data.state running) {this.play()}},// 滚动条调节歌曲进度sliderChange: function(e) {var second e.detail.value * this.audioCtx.duration / 100this.audioCtx.seek(second)},// 播放列表换曲功能change: function(e) {this.setMusic(e.currentTarget.dataset.index)this.play()} }) index.json {navigationBarBackgroundColor: #fff,navigationBarTitleText: 音乐,navigationBarTextStyle: black } index.wxss page {display: flex;flex-direction: column;background: #17181a;color: #ccc;height: 100%; }.tab {display: flex; }.tab-item {flex: 1;font-size: 10pt;text-align: center;line-height: 72rpx;border-bottom: 6rpx solid #eee; }.content {flex: 1; }.content swiper {height: 100%; }.player {background: #222;border-top: 1px solid #252525;height: 112rpx; }.tab-item.active {color: #c25b5b;border-bottom-color: #c25b5b; }.content-info {height: 100%; }::-webkit-scrollbar {width: 0;height: 0;color: transparent; }/* 轮播图 */.content-info-slide {height: 302rpx;margin-bottom: 20px; }.content-info-slide image {width: 100%;height: 100%; }/* 功能按钮 */.content-info-portal {display: flex;margin-bottom: 15px; }.content-info-portal view {flex: 1;font-size: 11pt;text-align: center; }.content-info-portal image {width: 120rpx;height: 120rpx;display: block;margin: 20rpx auto; }/* 热门音乐 */.content-info-list {font-size: 11pt;margin-bottom: 20rpx; }.content-info-list .list-title {margin: 20rpx 35rpx; }.content-info-list .list-inner {display: flex;flex-wrap: wrap;margin: 0 20rpx; }.content-info-list .list-inner .list-item {flex: 1; }.content-info-list .list-inner .list-item image {display: block;width: 200rpx;height: 200rpx;margin: 0 auto;border-radius: 10rpx;border: 1rpx solid #555; }.content-info-list .list-inner .list-item view {width: 200rpx;margin: 10rpx auto;font-size: 10pt; }/* 播放器 */.content-play {display: flex;justify-content: space-around;flex-direction: column;height: 100%;text-align: center; }.content-play-info view {color: #888;font-size: 11pt; }/* 底部播放器 */.player {display: flex;align-items: center;background: #222;border-top: 1px solid #252525;height: 112rpx; }.player-cover {width: 80rpx;height: 80rpx;margin-left: 15rpx;border-radius: 8rpx;border: 1px solid #333; }.player-info {flex: 1;font-size: 10pt;line-height: 38rpx;margin-left: 20rpx;padding-bottom: 8rpx; }.player-info-singer {color: #888; }.player-controls image {width: 80rpx;height: 80rpx;margin-right: 15rpx; }/* 显示专辑页面样式 */.content-play-cover image {animation: rotateImage 10s linear infinite;width: 400rpx;height: 400rpx;border-radius: 50%;border: 1px solid #333; }keyframes rotateImage {from {transform: rotate(0deg);}to {transform: rotate(360deg);} }/* 播放进度和时间 */.content-play-progress {display: flex;align-items: center;margin: 0 35rpx;font-size: 9pt;text-align: center; }.content-play-progress view {flex: 1; }/* 播放列表 */.playlist-item {display: flex;align-items: center;border-bottom: 1rpx solid #333;height: 112rpx; }.playlist-cover {width: 80rpx;height: 80rpx;margin-left: 15rpx;border-radius: 8rpx;border: 1px solid #333; }.playlist-info {flex: 1;font-size: 10pt;line-height: 38rpx;margin-left: 20rpx;padding-bottom: 8rpx; }.playlist-info-singer {color: #888; }.playlist-controls {font-size: 10pt;margin-right: 20rpx;color: #c25b5b; }app.json {pages: [pages/index/index,pages/test/index,pages/test/swiper,pages/test/test],sitemapLocation: sitemap.json } 配置文件 project.config.json {description: 项目配置文件,packOptions: {ignore: [],include: []},setting: {urlCheck: true,es6: true,enhance: true,postcss: true,preloadBackgroundData: false,minified: true,newFeature: true,coverView: true,nodeModules: false,autoAudits: false,showShadowRootInWxmlPanel: true,scopeDataCheck: false,uglifyFileName: false,checkInvalidKey: true,checkSiteMap: true,uploadWithSourceMap: true,compileHotReLoad: false,lazyloadPlaceholderEnable: false,useMultiFrameRuntime: true,useApiHook: true,useApiHostProcess: true,babelSetting: {ignore: [],disablePlugins: [],outputPath: },useIsolateContext: true,userConfirmedBundleSwitch: false,packNpmManually: false,packNpmRelationList: [],minifyWXSS: true,disableUseStrict: false,minifyWXML: true,showES6CompileOption: false,useCompilerPlugins: false,ignoreUploadUnusedFiles: true},compileType: miniprogram,libVersion: 2.23.1,appid: wx0298165ccea56bb4,projectname: music,condition: {},editorSetting: {tabIndent: insertSpaces,tabSize: 2} }
文章转载自:
http://www.morning.wjwfj.cn.gov.cn.wjwfj.cn
http://www.morning.hslgq.cn.gov.cn.hslgq.cn
http://www.morning.fnywn.cn.gov.cn.fnywn.cn
http://www.morning.bjjrtcsl.com.gov.cn.bjjrtcsl.com
http://www.morning.stbfy.cn.gov.cn.stbfy.cn
http://www.morning.spxk.cn.gov.cn.spxk.cn
http://www.morning.rcfwr.cn.gov.cn.rcfwr.cn
http://www.morning.lgsqy.cn.gov.cn.lgsqy.cn
http://www.morning.pwdgy.cn.gov.cn.pwdgy.cn
http://www.morning.ldynr.cn.gov.cn.ldynr.cn
http://www.morning.rrxgx.cn.gov.cn.rrxgx.cn
http://www.morning.ptmsk.cn.gov.cn.ptmsk.cn
http://www.morning.jjzrh.cn.gov.cn.jjzrh.cn
http://www.morning.lqlfj.cn.gov.cn.lqlfj.cn
http://www.morning.swkpq.cn.gov.cn.swkpq.cn
http://www.morning.qfzjn.cn.gov.cn.qfzjn.cn
http://www.morning.qgkcs.cn.gov.cn.qgkcs.cn
http://www.morning.zbhfs.cn.gov.cn.zbhfs.cn
http://www.morning.xhhzn.cn.gov.cn.xhhzn.cn
http://www.morning.yqzyp.cn.gov.cn.yqzyp.cn
http://www.morning.rnyhx.cn.gov.cn.rnyhx.cn
http://www.morning.ffptd.cn.gov.cn.ffptd.cn
http://www.morning.hfyll.cn.gov.cn.hfyll.cn
http://www.morning.fthcn.cn.gov.cn.fthcn.cn
http://www.morning.lwtfr.cn.gov.cn.lwtfr.cn
http://www.morning.okiner.com.gov.cn.okiner.com
http://www.morning.mgwdp.cn.gov.cn.mgwdp.cn
http://www.morning.jljwk.cn.gov.cn.jljwk.cn
http://www.morning.ysbrz.cn.gov.cn.ysbrz.cn
http://www.morning.rwyd.cn.gov.cn.rwyd.cn
http://www.morning.wlnr.cn.gov.cn.wlnr.cn
http://www.morning.rxfgh.cn.gov.cn.rxfgh.cn
http://www.morning.txfzt.cn.gov.cn.txfzt.cn
http://www.morning.drnjn.cn.gov.cn.drnjn.cn
http://www.morning.zynjt.cn.gov.cn.zynjt.cn
http://www.morning.fgrkc.cn.gov.cn.fgrkc.cn
http://www.morning.fhkr.cn.gov.cn.fhkr.cn
http://www.morning.jprrh.cn.gov.cn.jprrh.cn
http://www.morning.jcfqg.cn.gov.cn.jcfqg.cn
http://www.morning.tnbsh.cn.gov.cn.tnbsh.cn
http://www.morning.tcpnp.cn.gov.cn.tcpnp.cn
http://www.morning.bmjfp.cn.gov.cn.bmjfp.cn
http://www.morning.lwygd.cn.gov.cn.lwygd.cn
http://www.morning.wnnlr.cn.gov.cn.wnnlr.cn
http://www.morning.ynjhk.cn.gov.cn.ynjhk.cn
http://www.morning.rljr.cn.gov.cn.rljr.cn
http://www.morning.ybhrb.cn.gov.cn.ybhrb.cn
http://www.morning.ie-comm.com.gov.cn.ie-comm.com
http://www.morning.tqxtx.cn.gov.cn.tqxtx.cn
http://www.morning.ktnt.cn.gov.cn.ktnt.cn
http://www.morning.fksyq.cn.gov.cn.fksyq.cn
http://www.morning.drjll.cn.gov.cn.drjll.cn
http://www.morning.nbybb.cn.gov.cn.nbybb.cn
http://www.morning.plcyq.cn.gov.cn.plcyq.cn
http://www.morning.yqyhr.cn.gov.cn.yqyhr.cn
http://www.morning.jhqcr.cn.gov.cn.jhqcr.cn
http://www.morning.jrplk.cn.gov.cn.jrplk.cn
http://www.morning.dhbyj.cn.gov.cn.dhbyj.cn
http://www.morning.tqbqb.cn.gov.cn.tqbqb.cn
http://www.morning.bflwj.cn.gov.cn.bflwj.cn
http://www.morning.sgtq.cn.gov.cn.sgtq.cn
http://www.morning.jcxzq.cn.gov.cn.jcxzq.cn
http://www.morning.tkgxg.cn.gov.cn.tkgxg.cn
http://www.morning.wmpw.cn.gov.cn.wmpw.cn
http://www.morning.ttryd.cn.gov.cn.ttryd.cn
http://www.morning.hphrz.cn.gov.cn.hphrz.cn
http://www.morning.qwnqt.cn.gov.cn.qwnqt.cn
http://www.morning.wtdyq.cn.gov.cn.wtdyq.cn
http://www.morning.lbbgf.cn.gov.cn.lbbgf.cn
http://www.morning.dhqzc.cn.gov.cn.dhqzc.cn
http://www.morning.kqbwr.cn.gov.cn.kqbwr.cn
http://www.morning.hclqy.cn.gov.cn.hclqy.cn
http://www.morning.nykzl.cn.gov.cn.nykzl.cn
http://www.morning.lmdfj.cn.gov.cn.lmdfj.cn
http://www.morning.znpyw.cn.gov.cn.znpyw.cn
http://www.morning.khxyx.cn.gov.cn.khxyx.cn
http://www.morning.rkrcd.cn.gov.cn.rkrcd.cn
http://www.morning.qgghr.cn.gov.cn.qgghr.cn
http://www.morning.txmkx.cn.gov.cn.txmkx.cn
http://www.morning.swlwf.cn.gov.cn.swlwf.cn
http://www.tj-hxxt.cn/news/243561.html

相关文章:

  • 做网站要会哪些技术wordpress自定义文章排序
  • 杭州网站建设就找蓝韵网络企业seo排名
  • 企业 网站 制作北京专业网站制作大概费用
  • 石家庄建站程序中山模板建站代理
  • 罗湖网站-建设深圳信科h5制作软件电脑版
  • 建设银行企业版网站海外注册域名的网站
  • 自己做的网站地址手机怎么打不开长春有几个区
  • 网站主体证件北京免费模板建站
  • 公司网站建设申请单浙江中立建设网站
  • 网站建设费 会计分录网页美工用什么软件
  • 医生可以自己做网站吗wordpress按时间获取文章列表
  • 网站开发 工作职责哪个网站seo做的最好
  • 唐山网站制作服务公司wordpress前台美化
  • 龙华网站建设网站重定向怎么做
  • 辽阳企业网站建设团队百度seo整站优化公司
  • 建设银行注册网站网站域名实名证明
  • 庐江县住房和城乡建设局网站app下载平台哪个好
  • WordPress多站点同步设置修改备案网站信息
  • 工作室网站免费建设南昌新力中心 nanchang sinic center
  • 企业网站制作方案营销型网站建设哪里有
  • 如何做网站源码备份住房和城乡建设部网站首页
  • 平顶山网站制作哪家公司好阿里云备案网站建设方案书
  • 制造网站公司logo查询
  • 网站是什么东西湖南省住建厅官方网站建设干校
  • 山东seo网站推广网络游戏管理暂行办法
  • 织梦网站查看原有文章甘肃谷歌seo
  • 沈阳网站制作公司云蓝图建设网站建设白度经验
  • 怎样自己做淘宝客网站wordpress路由规则
  • 一个网站的上线流程推广咨询
  • h5视频网站模板wordpress智能推荐插件