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

66 строки
1.4 KiB

  1. let config = require("../../config/config.js");
  2. const navigationBarHeight = (getApp().statusBarHeight + 50) + '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. mouldType: 0,
  10. navigationBarHeight,
  11. data: {},
  12. couponId: null,
  13. orderId: "",
  14. day: "",
  15. hour: "",
  16. wmhome: imgurl.wmhome.url,
  17. minute: "",
  18. nodes: '',
  19. mallTenantId: ""
  20. },
  21. onLoad(options) {
  22. this.setData({
  23. mouldType: app.globalData.mouldType,
  24. })
  25. const mallTenantId = tt.getStorageSync('mallTenantId');
  26. if (mallTenantId) {
  27. this.setData({
  28. mallTenantId: mallTenantId
  29. })
  30. }
  31. let that = this;
  32. if (options.id) {
  33. Http.get({
  34. url: config.api.bannerDetail,
  35. data: {
  36. id: options.id,
  37. mallTenantId: options.mallTenantId,
  38. }
  39. }).then(res => {
  40. if (res.data.type == 2) {
  41. that.setData({
  42. nodes: res.data.html
  43. })
  44. }
  45. that.setData({
  46. data: res.data
  47. });
  48. }).catch(err => {
  49. tt.showToast({
  50. title: err.errMsg,
  51. icon: 'none',
  52. duration: 2000,
  53. mask: false
  54. });
  55. })
  56. }
  57. },
  58. goback: function () {
  59. tt.reLaunch({
  60. url: '/index/index',
  61. })
  62. },
  63. });