|
- 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: ''
- },
- onLoad(options) {
- this.setData({
- mouldType: app.globalData.mouldType,
- })
- let that = this;
- if (options.id){
- Http.get({
- url: config.api.bannerDetail,
- data: {
- id: options.id
- }
- }).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',
- })
- },
- });
|