|
- let config = require("../../config/config.js");
- const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px'
- let app = getApp();
- const Http = require("../../utils/HttpBasics");
- const util = require("../../utils/util");
- const imgurl = require("../../utils/imgurl");
- Page({
- data: {
- navigationBarHeight,
- data: {},
- couponId: null,
- orderId: "",
- day: "",
- hour: "",
- wmhome: imgurl.wmhome.url,
- minute: "",
- nodes: ''
- },
- onLoad(options) {
- 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 => {
- wx.showToast({
- title: err.errMsg,
- icon: 'none',
- duration: 2000,
- mask: false
- });
- })
- }
- },
- goback: function () {
- wx.switchTab({
- url: '/pages/main/index',
- })
- },
- gotoactdetail:function(){
- let that = this;
- console.log(that.data.data.detail)
-
- wx.navigateTo({
- url: `/pages/actdetail/actdetail?detail=${that.data.data.detail}`,
- })
- }
- });
|