修复
This commit is contained in:
@@ -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)
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user