| @@ -7,6 +7,7 @@ | |||
| "pages/spellGroup/mySpellGroup/index", | |||
| "pages/spellGroup/spellGroup", | |||
| "pages/complete/index", | |||
| "pages/topicDetail/index", | |||
| "pages/main/index", | |||
| "pages/index/searchbar/index", | |||
| "pages/bargain/bargainDatail/bargainDatail", | |||
| @@ -35,6 +35,7 @@ Page({ | |||
| desc: null, | |||
| scrollTop: 0, | |||
| showGame: false, | |||
| showTopic:false, | |||
| gamedata: {}, | |||
| couponId: '', //游戏返回时传回的字段 | |||
| played: false, //从游戏页面跳回首页返回true | |||
| @@ -475,14 +476,22 @@ Page({ | |||
| token: app.globalData.token | |||
| } | |||
| }).then(res => { | |||
| console.log(res); | |||
| that.data.cover = res.data.list[0].cover | |||
| if (res&&res.data){ | |||
| that.setData({ | |||
| cover: res.data.cover, | |||
| showTopic: true | |||
| }) | |||
| } | |||
| }) | |||
| .catch(err => { | |||
| console.log(err); | |||
| }) | |||
| }, | |||
| gotoTopic(){ | |||
| wx.navigateTo({ | |||
| url: '/pages/topicDetail/index', | |||
| }) | |||
| }, | |||
| /** | |||
| * 检查用户是否有车 | |||
| */ | |||
| @@ -53,8 +53,8 @@ | |||
| <image src='{{newcard}}'></image> | |||
| </view> | |||
| </view> | |||
| <view class='product'> | |||
| <image src='{{product}}'></image> | |||
| <view class='product' wx:if="{{showTopic}}"> | |||
| <image src='{{cover}}' bindtap='gotoTopic' mode='aspectFill'></image> | |||
| </view> | |||
| <!-- 砍价专场 --> | |||
| <c-bargain id="bargain"/> | |||
| @@ -12,39 +12,37 @@ Page({ | |||
| minute: "", | |||
| nodes: '' | |||
| }, | |||
| onLoad(options) { | |||
| onShow() { | |||
| let that = this; | |||
| if (options.id){ | |||
| Http.get({ | |||
| url: config.api.bannerDetail, | |||
| data: { | |||
| id: options.id | |||
| } | |||
| }).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.topicShow(); | |||
| }, | |||
| topicShow(){ | |||
| let that = this; | |||
| Http.get({ | |||
| url: config.api.topicShow, | |||
| data: { | |||
| token: app.globalData.token | |||
| } | |||
| }).then(res => { | |||
| console.log(res) | |||
| if (res&&res.data) { | |||
| that.setData({ | |||
| data: res.data | |||
| }); | |||
| }).catch(err => { | |||
| wx.showToast({ | |||
| title: err.errMsg, | |||
| icon: 'none', | |||
| duration: 2000, | |||
| mask: false | |||
| }); | |||
| }) | |||
| } | |||
| console.log(that.data.data) | |||
| } | |||
| }).catch(err => { | |||
| wx.showToast({ | |||
| title: err.errMsg, | |||
| icon: 'none', | |||
| duration: 2000, | |||
| mask: false | |||
| }); | |||
| }) | |||
| }, | |||
| gotoactdetail:function(){ | |||
| let that = this; | |||
| console.log(that.data.data.detail) | |||
| wx.navigateTo({ | |||
| url: `/pages/actdetail/actdetail?detail=${that.data.data.detail}`, | |||
| }) | |||
| @@ -2,34 +2,20 @@ | |||
| <view class='coupons'> | |||
| <view class="coupons-body"> | |||
| <view class='banner'> | |||
| <image src='{{data.coverImg}}'></image> | |||
| <image src='{{data.advert}}'></image> | |||
| </view> | |||
| <!-- <image class="orbg" src='./../../assets/img/orbg.png' mode="widthFix"></image> --> | |||
| <view class='act'> | |||
| <text class='txt001'>{{data.title}}</text> | |||
| <text class='txt002'>{{data.subTitle}}</text> | |||
| <text class='txt001'>{{data.name}}</text> | |||
| <text class='txt002'>{{data.title}}</text> | |||
| <view class="proct"> | |||
| <text>活动说明</text> | |||
| <text>{{data.detail}}</text> | |||
| <!-- <image class="jian" src='../../assets/img/jian.png' mode="widthFix"></image> --> | |||
| </view> | |||
| </view> | |||
| <view class='notes' style='display:none;'> | |||
| <view> | |||
| <text>活动详情</text> | |||
| </view> | |||
| <view> | |||
| <text><text class='spot'></text>{{data.detail}}</text> | |||
| <text>{{data.content}}</text> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| <!-- <view class="buy-view app-border-top"> | |||
| <button bindtap='orderFunc' class='buy'>立即购买</button> | |||
| </view> --> | |||
| <view class='contain clearfix'> | |||
| <!-- 优惠券 --> | |||
| <navigator wx:for="{{data.coupons}}" wx:key="{{index}}" url="/pages/coupon/detail/index?couponChannelId={{item.id}}&couponId={{item.couponId}}"> | |||
| <navigator wx:for="{{data.couponList}}" wx:key="{{index}}" url="/pages/coupon/detail/index?couponChannelId={{item.id}}&couponId={{item.couponId}}"> | |||
| <!-- 首页优惠券列表页面 --> | |||
| <view class="coupons1"> | |||
| <view class="coupons1-img"> | |||
| @@ -1,7 +1,7 @@ | |||
| @import "../../app.wxss"; | |||
| page { | |||
| background: #eee; | |||
| background: #8A211B; | |||
| } | |||
| .coupons { | |||
| @@ -22,8 +22,8 @@ page { | |||
| } | |||
| .banner image { | |||
| display: block; | |||
| width: 750rpx; | |||
| height: 280rpx; | |||
| } | |||
| .act { | |||
| @@ -32,13 +32,13 @@ page { | |||
| background: #fff; | |||
| border-radius: 12rpx; | |||
| width: 705rpx; | |||
| /* height: 212rpx; */ | |||
| margin: 24rpx auto 0; | |||
| margin: -30rpx auto 0; | |||
| padding-bottom: 20rpx; | |||
| } | |||
| .act text { | |||
| display: block; | |||
| text-align: center; | |||
| padding-left: 4.8%; | |||
| padding-right: 4.8%; | |||
| } | |||
| @@ -74,6 +74,7 @@ page { | |||
| letter-spacing: 0; | |||
| line-height: 32rpx; | |||
| margin-bottom: 20rpx; | |||
| text-align: left!important; | |||
| /* width: 60rpx; */ | |||
| /* height: 64rpx; */ | |||
| } | |||