deguodaigou/pages/index/index.js
2020-01-08 15:18:51 +08:00

45 lines
789 B
JavaScript

import {request} from "../../utils/bin"
Page({
data:{
list:[],
huilv:"",
background: ['#000', '#00ff00', '#ff0000'],
adlist:[]
},
onLoad(){
},
searchs(){
console.log(10)
},
onShow(){
request({
url:"Goods/hotGoodsList",
data:{
page:0
}
}).then((res)=>{
console.log(res.data.result)
this.setData({
list:res.data.result
})
})
request({
url:"Index/exchangeRate"
}).then((res)=>{
console.log(res)
this.setData({
huilv:res.data.data.exchange
})
})
request({
url:"index/adlist"
}).then((res)=>{
console.log(res)
this.setData({
adlist:res.data.data
})
})
}
})