EP-WachatApp/eaterplanet_ecommerce/pages/goods/industrial.js

33 lines
628 B
JavaScript
Raw Normal View History

2023-03-24 11:26:36 +08:00
var app = getApp();
Page({
data: {
goods_industrial: []
},
onLoad: function (options) {
let goods_id = options.id || '';
wx.showLoading();
this.getData(goods_id);
},
getData(goods_id){
let that = this;
app.util.request({
url: 'entry/wxapp/index',
data: {
controller: 'goods.get_instructions',
goods_id
},
dataType: 'json',
success: function (res) {
wx.hideLoading();
if (res.data.code == 0) {
that.setData({
goods_industrial: res.data.data.goods_industrial || []
})
}
}
})
}
})