38 lines
626 B
JavaScript
38 lines
626 B
JavaScript
// pages/shop/components/good-list-card.js
|
|
Component({
|
|
// refer: https://developers.weixin.qq.com/miniprogram/dev/reference/api/Component.html
|
|
|
|
/**
|
|
* 组件的属性列表
|
|
*/
|
|
properties: {
|
|
goodinfo: {
|
|
type: Object,
|
|
}
|
|
},
|
|
|
|
/**
|
|
* 组件的初始数据
|
|
*/
|
|
data: {
|
|
displayGoodsInfo: "",
|
|
displayInfo: "",
|
|
},
|
|
|
|
observers: {
|
|
'goodinfo': function (goodinfo) {
|
|
console.log("observers -> goodinfo", goodinfo)
|
|
this.setData({
|
|
displayGoodsInfo: JSON.stringify(this.properties.goodinfo)
|
|
})
|
|
}
|
|
},
|
|
|
|
/**
|
|
* 组件的方法列表
|
|
*/
|
|
methods: {
|
|
|
|
}
|
|
})
|