This commit is contained in:
2020-01-08 15:18:51 +08:00
parent a342e22c8b
commit 3fcdf4ce6c
11 changed files with 30 additions and 27 deletions

View File

@@ -14,20 +14,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
request({
url: "Goods/goodsCategoryList",
data: {
parent_id: 2
}
}).then((res) => {
// console.log(res)
this.setData({
type: res.data.result
})
this.select({detail:{id:res.data.result[0].id}})
console.log(this.data.type, 150)
})
},
select(a){
@@ -59,7 +46,20 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function() {
request({
url: "Goods/goodsCategoryList",
data: {
parent_id: 2
}
}).then((res) => {
// console.log(res)
this.setData({
type: res.data.result
})
this.select({detail:{id:res.data.result[0].id}})
console.log(this.data.type, 150)
})
},
/**