yuminge-app/yun-min-program-plugin-master/packageA/mycomponent/goodsComponent/plugin/supplierModel/supplierModel.js

46 lines
874 B
JavaScript

// packageA/mycomponent/goodsComponent/plugin/supplierModel/supplierModel.js
Component({
/**
* 组件的属性列表
*/
properties: {
goodsInfo: {
type: null
}
},
/**
* 组件的初始数据
*/
data: {
supplierData: []
},
observers: {
goodsInfo: function (info) {
if (info.supplier) {
this.setData({
supplierData: info.supplier
});
}
}
},
/**
* 组件的方法列表
*/
methods: {
//推广商品跳转
pushGoodGoto(e) {
let itemdata = e.currentTarget.dataset.itemdata;
wx.navigateTo({
url: "/packageA/detail_v2/detail_v2?id=" + itemdata.id,
});
},
// 供应商
gotoSupplier() {
wx.navigateTo({
url: "/packageA/member/supplier/SupplierShop/SupplierShop?id=" + this.data.supplierData.id,
});
},
}
});