C端小程序
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

53 行
1.1 KiB

  1. let config = require("../../config/config.js");
  2. let app = getApp();
  3. const Http = require("../../utils/HttpBasics");
  4. const util = require("../../utils/util");
  5. Page({
  6. data: {
  7. data: {},
  8. couponId: null,
  9. orderId: "",
  10. day: "",
  11. hour: "",
  12. minute: "",
  13. nodes: ''
  14. },
  15. onLoad(options) {
  16. let that = this;
  17. if (options.id){
  18. Http.get({
  19. url: config.api.bannerDetail,
  20. data: {
  21. id: options.id
  22. }
  23. }).then(res => {
  24. if(res.data.type==2){
  25. console.log(res.data.html,33333333)
  26. // console.log(JSON.parse(res.data.html),222222222222)
  27. that.setData({
  28. nodes: res.data.html
  29. })
  30. }
  31. that.setData({
  32. data: res.data
  33. });
  34. }).catch(err => {
  35. wx.showToast({
  36. title: err.errMsg,
  37. icon: 'none',
  38. duration: 2000,
  39. mask: false
  40. });
  41. })
  42. }
  43. },
  44. gotoactdetail:function(){
  45. let that = this;
  46. console.log(that.data.data.detail)
  47. wx.navigateTo({
  48. url: `/pages/actdetail/actdetail?detail=${that.data.data.detail}`,
  49. })
  50. }
  51. });