industrial.js 628 B

123456789101112131415161718192021222324252627282930313233
  1. var app = getApp();
  2. Page({
  3. data: {
  4. goods_industrial: []
  5. },
  6. onLoad: function (options) {
  7. let goods_id = options.id || '';
  8. wx.showLoading();
  9. this.getData(goods_id);
  10. },
  11. getData(goods_id){
  12. let that = this;
  13. app.util.request({
  14. url: 'entry/wxapp/index',
  15. data: {
  16. controller: 'goods.get_instructions',
  17. goods_id
  18. },
  19. dataType: 'json',
  20. success: function (res) {
  21. wx.hideLoading();
  22. if (res.data.code == 0) {
  23. that.setData({
  24. goods_industrial: res.data.data.goods_industrial || []
  25. })
  26. }
  27. }
  28. })
  29. }
  30. })