|
- let config = require("../../config/config.js");
- const navigationBarHeight = (getApp().statusBarHeight + 50) + 'px'
- let app = getApp();
- const Http = require("../../utils/HttpBasics");
- const util = require("../../utils/util");
- const imgurl = require("../../utils/imgurl");
- Page({
- data: {
- mouldType: 0,
- navigationBarHeight,
- data: {},
- couponId: null,
- orderId: "",
- day: "",
- hour: "",
- wmhome: imgurl.wmhome.url,
- minute: "",
- nodes: '',
- mallTenantId: ""
- },
- onLoad(options) {
- this.setData({
- mouldType: app.globalData.mouldType,
- })
-
- const mallTenantId = tt.getStorageSync('mallTenantId');
-
- if (mallTenantId) {
- this.setData({
- mallTenantId: mallTenantId
- })
- }
-
- let that = this;
- if (options.id) {
- Http.get({
- url: config.api.bannerDetail,
- data: {
- id: options.id,
- mallTenantId: options.mallTenantId,
- }
- }).then(res => {
- if (res.data.type == 2) {
- that.setData({
- nodes: res.data.html
- })
- }
- that.setData({
- data: res.data
- });
- }).catch(err => {
- tt.showToast({
- title: err.errMsg,
- icon: 'none',
- duration: 2000,
- mask: false
- });
- })
- }
- },
- goback: function () {
- tt.reLaunch({
- url: '/index/index',
- })
- },
- });
|