1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- /**
- * @description: roobo 工具类js
- * @author: libaojun@roo.bo
- * @version: V2
- * @update: 16/4/19
- **/
- /**
- utils.js 通用工具方法js里的方法列表
- */
- var utils = {
- pagesize:10,
- getList:function(){ //拿到设备播放列表,return设备播放列表数据
- var playtracklist;
- $.ajax({
- url :juli.URL.getplaytracklist,
- type:'get',
- async:false,
- cache:false,
- data:{
- deviceId:utils.getdevice()
- }
- })
- .done(function(res){
- console.log(res);
- playtracklist =res;
- })
- return playtracklist
- },
- postList:function(){ //创建播放列表
- var newjson = {
- id:0,
- deviceId: utils.getdevice(),
- name:"默认列表",
- coverSmallUrl:""
- };
- console.log(newjson)
- $.ajax({
- url: juli.URL.addlist,
- type: 'post',
- contentType: 'application/json',
- data: JSON.stringify(newjson)
- })
- .done(function(res){
- console.log(res);
- });
- }
- };
|