| @@ -21,6 +21,7 @@ | |||
| "pages/scanPay/scanPay", | |||
| "pages/edit/edit", | |||
| "pages/actdetail/actdetail", | |||
| "pages/radetail/index", | |||
| "pages/bannerdetail/index", | |||
| "pages/getuserinfo/index", | |||
| "pages/phoneinput/phoneinput", | |||
| @@ -21,17 +21,14 @@ Component({ | |||
| /** | |||
| * 组件的方法列表 | |||
| */ | |||
| ready() {}, | |||
| methods: { | |||
| gotobannerdetail: function(e) { | |||
| console.log(e) | |||
| if (e.currentTarget.dataset.data.type == 3) { | |||
| // 小程序路径 | |||
| wx.navigateTo({ | |||
| url: `/${e.currentTarget.dataset.data.pagePath}` | |||
| }); | |||
| } | |||
| else if(e.currentTarget.dataset.data.type==2){ | |||
| }) | |||
| }else if(e.currentTarget.dataset.data.type==2){ | |||
| // 自由图文 | |||
| wx.navigateTo({ | |||
| url: `/pages/freeBannerDetail/index?id=${e.currentTarget.dataset.id}` | |||
| @@ -297,7 +297,9 @@ var config = { | |||
| /** | |||
| * 富文本详情 | |||
| */ | |||
| printHtmlById:"/wxCampaign/printHtmlById" | |||
| printHtmlById:"/wxCampaign/printHtmlById", | |||
| acfindById:"/wxActivity/findById", | |||
| acPrintHtmlById:"/wxActivity/printHtmlById" | |||
| }, | |||
| weapp: { | |||
| AppId: weappId | |||
| @@ -24,8 +24,6 @@ Page({ | |||
| } | |||
| }).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 | |||
| }) | |||
| @@ -5,14 +5,12 @@ | |||
| <view class='banner'> | |||
| <image src='{{data.coverImg}}'></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> | |||
| <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;'> | |||
| @@ -24,9 +22,6 @@ | |||
| </view> | |||
| </view> | |||
| </view> | |||
| <!-- <view class="buy-view app-border-top"> | |||
| <button bindtap='orderFunc' class='buy'>立即购买</button> | |||
| </view> --> | |||
| <view class='contain clearfix'> | |||
| <!-- 优惠券 --> | |||
| @@ -24,15 +24,6 @@ Page({ | |||
| id:options.id, | |||
| token: app.globalData.token | |||
| }) | |||
| /*** WxParse.wxParse(bindName , type, data, target,imagePadding) | |||
| * 1.bindName绑定的数据名(必填) | |||
| * 2.type可以为html或者md(必填) | |||
| * 3.data为传入的具体数据(必填) | |||
| * 4.target为Page对象,一般为this(必填) | |||
| * 5.imagePadding为当图片自适应是左右的单一padding(默认为0,可选)*/ | |||
| // that.getWord(options.id) | |||
| wx.request({ | |||
| url: 'https://ciformall.youlane.cn/C/api' + config.api.printHtmlById, | |||
| data: { | |||
| @@ -48,29 +39,6 @@ Page({ | |||
| } | |||
| }) | |||
| }, | |||
| /** | |||
| * 获得宣传页富文本详情 | |||
| */ | |||
| getWord(id){ | |||
| let that = this; | |||
| wx.request({ | |||
| url: 'https://ciformall.youlane.cn/C/api'+config.api.printHtmlById, | |||
| data: { | |||
| token: app.globalData.token, | |||
| id: id, | |||
| date: new Date() | |||
| }, | |||
| header: { | |||
| 'content-type': 'application/html' | |||
| }, | |||
| success:function(res){ | |||
| that.setData({ | |||
| wordHtml:res.data | |||
| }) | |||
| } | |||
| }) | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面初次渲染完成 | |||
| */ | |||
| @@ -13,7 +13,6 @@ Page({ | |||
| */ | |||
| onLoad: function(options) { | |||
| let that = this; | |||
| console.log(options) | |||
| wx.showToast({ | |||
| title: '加载中', | |||
| icon: "loading", | |||
| @@ -66,6 +65,9 @@ Page({ | |||
| } else if (options.type == 'md') { | |||
| // 门店详情 | |||
| options.id = this.data.newArr[2]; | |||
| } else if (options.type == 'ra') { | |||
| //活动详情 | |||
| options.id = this.data.newArr[2]; | |||
| } | |||
| } | |||
| } | |||
| @@ -159,6 +161,12 @@ Page({ | |||
| else if (options && options.id && app.globalData.type == 'gm') { | |||
| that.getGameOne(app.globalData.token, options.id) | |||
| } | |||
| // 报名活动页面 | |||
| else if (options && options.id && app.globalData.type == 'ra') { | |||
| wx.redirectTo({ | |||
| url: `/pages/radetail/index?id=${options.id}`, | |||
| }) | |||
| } | |||
| // 宣传页详情 | |||
| else if (options && options.bt && options.id && app.globalData.type == 'bd') { | |||
| if (options.bt == '2') { | |||
| @@ -0,0 +1,70 @@ | |||
| let config = require("../../config/config.js"); | |||
| let app = getApp(); | |||
| const Http = require("../../utils/HttpBasics"); | |||
| const util = require("../../utils/util"); | |||
| var WxParse = require('../../wxParse/wxParse.js'); | |||
| const imgurl = require("../../utils/imgurl"); | |||
| Page({ | |||
| data: { | |||
| data: {}, | |||
| couponId: null, | |||
| orderId: "", | |||
| day: "", | |||
| hour: "", | |||
| wmhome: imgurl.wmhome.url, | |||
| minute: "", | |||
| nodes: '' | |||
| }, | |||
| onLoad(options) { | |||
| let that = this; | |||
| console.log(options) | |||
| if (options.id){ | |||
| Http.get({ | |||
| url: config.api.acfindById, | |||
| data: { | |||
| id: options.id | |||
| } | |||
| }).then(res => { | |||
| that.setData({ | |||
| data: res.data.activity | |||
| }); | |||
| if (res.data.activity.type == 2 ){ | |||
| wx.request({ | |||
| url: 'https://ciformall.youlane.cn/C/api' + config.api.acPrintHtmlById, | |||
| data: { | |||
| id: options.id, | |||
| date: new Date(), | |||
| token: app.globalData.token, | |||
| }, | |||
| header: { | |||
| 'content-type': 'application/html' | |||
| }, | |||
| success: function (res) { | |||
| var temp = WxParse.wxParse('article', 'html', res.data, that, 5); | |||
| } | |||
| }) | |||
| } | |||
| }).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}`, | |||
| }) | |||
| } | |||
| }); | |||
| @@ -0,0 +1,3 @@ | |||
| { | |||
| "navigationBarTitleText": "活动详情" | |||
| } | |||
| @@ -0,0 +1,59 @@ | |||
| <button class='goback' bindtap='goback'> | |||
| <image src='{{wmhome}}' mode="widthFix"></image> | |||
| </button> | |||
| <!-- 活动正常排版格式 --> | |||
| <view class='coupons'> | |||
| <view class="coupons-body"> | |||
| <view class='banner'> | |||
| <image src='{{data.coverImg}}'></image> | |||
| </view> | |||
| <view class='act'> | |||
| <text class='txt001'>{{data.title}}</text> | |||
| <text class='txt002'>{{data.subTitle}}</text> | |||
| <view class="proct" wx:if="{{data.type == 1}}"> | |||
| <text>活动说明</text> | |||
| <text>{{data.detail}}</text> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| <view class='contain clearfix'> | |||
| <!-- 优惠券 --> | |||
| <navigator wx:for="{{data.coupons}}" wx:key="{{index}}" url="/pages/coupon/detail/index?couponChannelId={{item.id}}&couponId={{item.couponId}}"> | |||
| <!-- 首页优惠券列表页面 --> | |||
| <view class="coupons1"> | |||
| <view class="coupons1-img"> | |||
| <image src="{{item.coverImg}}"></image> | |||
| </view> | |||
| <view class="coupons1-info"> | |||
| <view class="coupons1-info-name tit">{{item.title}}</view> | |||
| <view class="coupons1-info-name subtitle">{{item.subTitle}}</view> | |||
| <view class="coupons1-info-price-p"> | |||
| <text class="i">¥</text>{{item.salePriceStr}} | |||
| <view class="coupons-info-manjian" style="margin-top:10rpx;font-size:28rpx;" wx:if="{{item.type == 1}}"> | |||
| 满¥{{item.usePriceStr}}可用 | |||
| </view> | |||
| <view class="coupons-info-manjian" style="margin-top:10rpx;font-size:28rpx;" wx:if="{{item.type == 2||item.type == 3||item.type==4||item.type==5||item.type==6||item.type==7}}"> | |||
| 仅限本店使用 | |||
| </view> | |||
| </view> | |||
| </view> | |||
| <!-- <view class="coupons1-info-name subtitle sy">剩余{{item.remainInventory}}</view> --> | |||
| <view class="coupons1-btn"> | |||
| <!-- 优惠券价格 --> | |||
| <i-button class="buy" hover-class='active' wx:if="{{item.salePriceStr==0}}" data-date='{{data}}'>免费领</i-button> | |||
| <i-button class="buy" hover-class='active' wx:elif="{{item.salePriceStr!=0}}" data-date='{{data}}'>马上购</i-button> | |||
| </view> | |||
| <!-- <view class="coupons1-border"></view> --> | |||
| </view> | |||
| </navigator> | |||
| </view> | |||
| </view> | |||
| <!-- 自由图文格式 --> | |||
| <view wx:if="{{data.type == 2}}"> | |||
| <import src="../../wxParse/wxParse.wxml" /> | |||
| <view class="content"> | |||
| <template is="wxParse" data="{{wxParseData:article.nodes}}" /> | |||
| </view> | |||
| </view> | |||