2019-12-23 14:13:27 +08:00
|
|
|
import {request} from "../../utils/bin"
|
|
|
|
Page({
|
|
|
|
data:{
|
2020-01-02 14:28:07 +08:00
|
|
|
list:[],
|
2020-01-06 14:32:56 +08:00
|
|
|
huilv:"",
|
|
|
|
background: ['#000', '#00ff00', '#ff0000'],
|
|
|
|
adlist:[]
|
2019-12-23 14:13:27 +08:00
|
|
|
},
|
|
|
|
onLoad(){
|
2020-01-08 15:18:51 +08:00
|
|
|
|
|
|
|
},
|
|
|
|
searchs(){
|
|
|
|
console.log(10)
|
|
|
|
},
|
|
|
|
onShow(){
|
2019-12-23 14:13:27 +08:00
|
|
|
request({
|
|
|
|
url:"Goods/hotGoodsList",
|
|
|
|
data:{
|
|
|
|
page:0
|
|
|
|
}
|
|
|
|
}).then((res)=>{
|
|
|
|
console.log(res.data.result)
|
|
|
|
this.setData({
|
|
|
|
list:res.data.result
|
|
|
|
})
|
|
|
|
})
|
2020-01-02 14:28:07 +08:00
|
|
|
request({
|
|
|
|
url:"Index/exchangeRate"
|
|
|
|
}).then((res)=>{
|
|
|
|
console.log(res)
|
|
|
|
this.setData({
|
|
|
|
huilv:res.data.data.exchange
|
|
|
|
})
|
|
|
|
})
|
2020-01-06 14:32:56 +08:00
|
|
|
request({
|
|
|
|
url:"index/adlist"
|
|
|
|
}).then((res)=>{
|
|
|
|
console.log(res)
|
|
|
|
this.setData({
|
|
|
|
adlist:res.data.data
|
|
|
|
})
|
|
|
|
})
|
2019-12-23 14:13:27 +08:00
|
|
|
}
|
|
|
|
})
|