# 云歌音乐小程序 **Repository Path**: upupupy/cloud-song-music-applet ## Basic Information - **Project Name**: 云歌音乐小程序 - **Description**: 使用网易云开放接口,开发自己的音乐小程序 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-07-28 - **Last Updated**: 2021-08-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### 数据绑定 1、修改数据使用this.setData({}) ### 事件绑定 1、捕获阶段 2、执行阶段 3、冒泡阶段 ```html bindtap :监听点击事件 (可以冒泡) catchtap:监听点击事件(阻止冒泡行为) ``` ### 获取用户基本信息 ```javascript wx.getUserProfile() //获取用户信息。页面产生点击事件(例如 button 上 bindtap 的回调中)后才可调用,每次请求都会弹出授权窗口,用户同意后返回 userInfo。该接口用于替换 wx.getUserInfo eg: handelGetUserProfile(){ wx.getUserProfile({ desc:"描述性语言(必须要的)", success:(res)=>{ console.log(res.userinfo) }, fail:(err)=>{ console.log("错误信息",err) }, complete:(cpl)=>{ console.log("接口调用结束后回调的函数,失败或成功都会调用",err) } }) } ```