|
|
@@ -1,7 +1,7 @@ |
|
|
|
// pages/index/sw/index.js |
|
|
|
let config = require('../../../config/config.js') |
|
|
|
let Http = require('../../../utils/HttpBasics') |
|
|
|
const app = getApp() |
|
|
|
let app = getApp() |
|
|
|
Component({ |
|
|
|
/** |
|
|
|
* 组件的属性列表 |
|
|
@@ -41,12 +41,14 @@ Component({ |
|
|
|
}, |
|
|
|
}, |
|
|
|
ready() { |
|
|
|
var that = this |
|
|
|
var pageNum = 1 |
|
|
|
if (app.globalData.token && app.globalData.token != null) { |
|
|
|
// business获取 |
|
|
|
Http.get({ |
|
|
|
url: config.api.businessList, |
|
|
|
data: { |
|
|
|
pageNum: 1, |
|
|
|
pageNum: pageNum, |
|
|
|
pageSize: 10, |
|
|
|
type: 1 |
|
|
|
} |
|
|
@@ -54,19 +56,19 @@ Component({ |
|
|
|
.then(res => { |
|
|
|
console.log(res) |
|
|
|
that.setData({ |
|
|
|
list: res.data.list |
|
|
|
tabs: res.data.list |
|
|
|
}) |
|
|
|
}) |
|
|
|
// 券list获取 |
|
|
|
Http.get({ |
|
|
|
url: config.api.couponList, |
|
|
|
data: { |
|
|
|
pageNum: 1, |
|
|
|
pageNum: pageNum, |
|
|
|
pageSize: 10 |
|
|
|
} |
|
|
|
}).then(res => { |
|
|
|
console.log(res); |
|
|
|
this.setData({ |
|
|
|
that.setData({ |
|
|
|
list: res.data.list |
|
|
|
}) |
|
|
|
}) |
|
|
@@ -84,19 +86,19 @@ Component({ |
|
|
|
.then(res => { |
|
|
|
console.log(res) |
|
|
|
that.setData({ |
|
|
|
list: res.data.list |
|
|
|
tabs: res.data.list |
|
|
|
}) |
|
|
|
}) |
|
|
|
// 券list获取 |
|
|
|
Http.get({ |
|
|
|
url: config.api.couponList, |
|
|
|
data: { |
|
|
|
pageNum: 1, |
|
|
|
pageNum: pageNum, |
|
|
|
pageSize: 10 |
|
|
|
} |
|
|
|
}).then(res => { |
|
|
|
console.log(res); |
|
|
|
this.setData({ |
|
|
|
that.setData({ |
|
|
|
list: res.data.list |
|
|
|
}) |
|
|
|
}) |
|
|
|