C端小程序
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

60 строки
1.3 KiB

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