// pages/index/sw/index.js let config = require('../../../config/config.js') let Http = require('../../../utils/HttpBasics') Component({ /** * 组件的属性列表 */ properties: { }, /** * 组件的初始数据 */ data: { list: [ // { // img: "http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg", // name: "海鲜焗饭", // time: "2天12小时25分钟", // oPrice: "59.00", // pPrice: "1.00", // }, // { // img: "http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg", // name: "海鲜焗饭", // time: "2天12小时25分钟", // oPrice: "59.00", // pPrice: "1.00", // }, // { // img: "http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg", // name: "海鲜焗饭", // time: "2天12小时25分钟", // oPrice: "59.00", // pPrice: "1.00", // }, // { // img: "http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg", // name: "海鲜焗饭", // time: "2天12小时25分钟", // oPrice: "59.00", // pPrice: "1.00", // }, ] }, /** * 组件的方法列表 */ methods: { }, ready() { Http.get({ url: config.api.couponChannelList, data: { pageNum: 1, pageSize: 10 } }).then(res => { this.setData({ list: res.list }) }) } })