| @@ -37,7 +37,8 @@ | |||||
| "pages/index/gameentry/gentry", | "pages/index/gameentry/gentry", | ||||
| "pages/specialcourtesy/specialcourtesy", | "pages/specialcourtesy/specialcourtesy", | ||||
| "pages/discountCardList/discountCardList", | "pages/discountCardList/discountCardList", | ||||
| "pages/cardListDetail/cardListDetail" | |||||
| "pages/cardListDetail/cardListDetail", | |||||
| "pages/freeBannerDetail/index" | |||||
| ], | ], | ||||
| "navigateToMiniProgramAppIdList": [ | "navigateToMiniProgramAppIdList": [ | ||||
| "wx192b7d2e8dcbefd0", | "wx192b7d2e8dcbefd0", | ||||
| @@ -28,9 +28,16 @@ Component({ | |||||
| }); | }); | ||||
| }, | }, | ||||
| gotobannerdetail: function(e) { | gotobannerdetail: function(e) { | ||||
| wx.navigateTo({ | |||||
| url: `/pages/bannerdetail/index?id=${e.currentTarget.dataset.id}` | |||||
| }); | |||||
| console.log(e) | |||||
| if(e.currentTarget.dataset.data.type==2){ | |||||
| wx.navigateTo({ | |||||
| url: `/pages/freeBannerDetail/index?id=${e.currentTarget.dataset.id}` | |||||
| }); | |||||
| }else{ | |||||
| wx.navigateTo({ | |||||
| url: `/pages/bannerdetail/index?id=${e.currentTarget.dataset.id}` | |||||
| }); | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| }); | }); | ||||
| @@ -5,7 +5,7 @@ | |||||
| <swiper class="index-slide" bindchange="swiperChange" autoplay="true" circular="false"> | <swiper class="index-slide" bindchange="swiperChange" autoplay="true" circular="false"> | ||||
| <block wx:for="{{list}}" wx:key="unique"> | <block wx:for="{{list}}" wx:key="unique"> | ||||
| <swiper-item> | <swiper-item> | ||||
| <image data-id="{{item.id}}" bindtap='gotobannerdetail' src="{{item.coverImg}}" class="index-slide-image" /> | |||||
| <image data-id="{{item.id}}" data-data="{{item}}" bindtap='gotobannerdetail' src="{{item.coverImg}}" class="index-slide-image" /> | |||||
| </swiper-item> | </swiper-item> | ||||
| </block> | </block> | ||||
| </swiper> | </swiper> | ||||
| @@ -3,6 +3,7 @@ var config = { | |||||
| // url:"https://c.malls.iformall.com/C/api", | // url:"https://c.malls.iformall.com/C/api", | ||||
| // url:'https://ctest.malls.iformall.com/C/api', | // url:'https://ctest.malls.iformall.com/C/api', | ||||
| // url:'http://10.100.33.66:7000/C/api', | // url:'http://10.100.33.66:7000/C/api', | ||||
| // url: 'http://10.100.35.203:7000/C/api', | |||||
| api: { | api: { | ||||
| /** | /** | ||||
| * 接口用途:login | * 接口用途:login | ||||
| @@ -9,7 +9,8 @@ Page({ | |||||
| orderId: "", | orderId: "", | ||||
| day: "", | day: "", | ||||
| hour: "", | hour: "", | ||||
| minute: "" | |||||
| minute: "", | |||||
| nodes: '' | |||||
| }, | }, | ||||
| onLoad(options) { | onLoad(options) { | ||||
| let that = this; | let that = this; | ||||
| @@ -20,6 +21,13 @@ Page({ | |||||
| id: options.id | id: options.id | ||||
| } | } | ||||
| }).then(res => { | }).then(res => { | ||||
| if(res.data.type==2){ | |||||
| console.log(res.data.html,33333333) | |||||
| // console.log(JSON.parse(res.data.html),222222222222) | |||||
| that.setData({ | |||||
| nodes: res.data.html | |||||
| }) | |||||
| } | |||||
| that.setData({ | that.setData({ | ||||
| data: res.data | data: res.data | ||||
| }); | }); | ||||
| @@ -0,0 +1,81 @@ | |||||
| // pages/freeBannerDetail/index.js | |||||
| let app = getApp(); | |||||
| const config = require("../../config/config"); | |||||
| Page({ | |||||
| /** | |||||
| * 页面的初始数据 | |||||
| */ | |||||
| data: { | |||||
| url: config.url, | |||||
| token: app.globalData.token, | |||||
| id:'', | |||||
| date:new Date() | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面加载 | |||||
| */ | |||||
| onLoad: function (options) { | |||||
| console.log(config.url) | |||||
| this.setData({ | |||||
| url: config.url, | |||||
| id:options.id, | |||||
| token: app.globalData.token | |||||
| }) | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面初次渲染完成 | |||||
| */ | |||||
| onReady: function () { | |||||
| }, | |||||
| bindLad: function(){ | |||||
| console.log(11212122) | |||||
| debugger | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面显示 | |||||
| */ | |||||
| onShow: function () { | |||||
| this.setData({ | |||||
| date:new Date() | |||||
| }) | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面隐藏 | |||||
| */ | |||||
| onHide: function () { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面卸载 | |||||
| */ | |||||
| onUnload: function () { | |||||
| }, | |||||
| /** | |||||
| * 页面相关事件处理函数--监听用户下拉动作 | |||||
| */ | |||||
| onPullDownRefresh: function () { | |||||
| }, | |||||
| /** | |||||
| * 页面上拉触底事件的处理函数 | |||||
| */ | |||||
| onReachBottom: function () { | |||||
| }, | |||||
| /** | |||||
| * 用户点击右上角分享 | |||||
| */ | |||||
| onShareAppMessage: function () { | |||||
| } | |||||
| }) | |||||
| @@ -0,0 +1,3 @@ | |||||
| { | |||||
| "navigationBarTitleText": "卡详情" | |||||
| } | |||||
| @@ -0,0 +1 @@ | |||||
| <web-view src="{{url+'/wxCampaign/printHtmlById?token='+token+'&id='+id+'&date='+date}}" bindmessage="bindGetMsg" bindload="bindLad"></web-view> | |||||
| @@ -0,0 +1,5 @@ | |||||
| /* pages/freeBannerDetail/index.wxss */ | |||||
| img{ | |||||
| width: 100%!important; | |||||
| height: auto; | |||||
| } | |||||
| @@ -1 +1,2 @@ | |||||
| <web-view src="{{url}}" bindmessage="bindGetMsg"></web-view> | |||||
| <web-view src="http://10.100.35.203:7000/C/api/wxCampaign/test?token=0ac7f4f5-7969-443b-b0f6-ab8ab1e6fdc7" bindmessage="bindGetMsg"></web-view> | |||||
| <!-- <web-view src="{{url}}" bindmessage="bindGetMsg"></web-view> --> | |||||