Commit dd76f522 by 谢中龙

Merge branch 'dev_7.2.0' of ssh://gitlab.bigaka.net:2287/gaoshq/7-Eleven into dev_7.2.0

parents b7021a81 4835ac4b
......@@ -26,7 +26,7 @@ Component({
data: {
imgUrls: [],
indicatorDots: false,
autoplay: true,
autoplay: false,
circular: true,
interval: 3000,
duration: 1000,
......
......@@ -44,9 +44,9 @@ Component({
wxService.request({
url: app.globalData.ctx + '/sale/premium/query',
header: {
// 'tunnel-token' : 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD' // 测试
'tunnel-token' : 'd6db651f8b9c7db4176465accfc1c913843fd9ad328cd5f4fe201d918072c9e8', // 生产
'tunnel-token' : 'brand1001', // 开发
'tunnel-token' : 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD' // 测试
// 'tunnel-token' : 'd6db651f8b9c7db4176465accfc1c913843fd9ad328cd5f4fe201d918072c9e8', // 生产
// 'tunnel-token' : 'brand1001', // 开发
},
success: (res) => {
const { result, data } = res.data
......
......@@ -190,7 +190,7 @@ Component({
ctx.setTextAlign('left');
ctx.fillText(that.data.productDesc, 61, 300);
}else{
let explain = JSON.parse(that.data.cardExplain)
let explain = JSON.parse(JSON.stringify(that.data.cardExplain))
if (explain[0]){
ctx.setFontSize(12);
ctx.setFillStyle('#333333');
......
......@@ -6,6 +6,10 @@ wxService.page({
* 页面的初始数据
*/
data: {
id: '',
couponDetail: null,
productData: [],
subStoreData: [],
proData: [
{
"id": "636202018767245312",
......@@ -54,9 +58,54 @@ wxService.page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
console.log('--------', this.options)
this.setData({
id: '638467647583031296'
},()=>{
this.getCouponDetail(this.data.id)
})
},
getCouponDetail(id){
wx.showLoading({
title: '加载中'
})
wxService.get(`/marketing/shoppingguide/coupon/detail?id=${id}`).then(res => {
const { result, data } = res.data
if (result == 0) {
wx.hideLoading()
this.setData({
couponDetail: data
})
this.getCouponGoods(data.couponId)
}
})
},
// 卡券详情
getCouponGoods(id){
wx.showLoading({
title: '加载中'
})
wxService.post(`/coupon/coupon/setting/get/${id}`).then(res => {
const {result,data} = res.data
if(result == 0){
wx.hideLoading()
// data.coupon.startTime = data.coupon.startTime.substring(0,10)
// data.coupon.endTime = data.coupon.endTime.substring(0,10)
// data.couponSetting.notice = JSON.parse(data.couponSetting.notice)
// for (let i in data.couponSetting.notice){
// if (data.couponSetting.notice[i].type == 1){
// data.couponSetting.notice[i].value = data.coupon.startTime.substring(0, 10) + ' 至 ' + data.coupon.endTime.substring(0, 10)
// }
// }
this.setData({
productData: data.couponDetail && data.couponDetail.useCondition && data.couponDetail.useCondition.productData,
subStoreData: data.couponDetail && data.couponDetail.useCondition && data.couponDetail.useCondition.subStoreData
})
}
}).finally(() => {
wx.hideLoading()
})
},
/**
* 生命周期函数--监听页面隐藏
*/
......
......@@ -3,19 +3,19 @@
<view class="scan-title clearfix">
<view class="title-btn">立即领取</view>
<view class="title-name">优惠券名称</view>
<view class="title-desc">优惠券使用说明优惠券使用说明优惠券使用说明</view>
<view class="title-others">其他优惠券使用说明优惠券使用说明优惠券使用说明优惠券使用说明</view>
<view class="title-name">{{couponDetail.couponName}}</view>
<view class="title-desc">{{couponDetail.title}}</view>
<view class="title-others">{{couponDetail.remark}}</view>
</view>
<view class="scan-stores">
<view class="store-title">
<view class="store-num">适用门店
<text class="store-num-tips">(13)</text>
<text class="store-num-tips">({{subStoreData.length}})</text>
</view>
<view class="store-more">查看更多></view>
<view class="store-more" wx:if="{{subStoreData.length}}">查看更多></view>
</view>
<view class="store-address">
<view class="store-address" wx:if="{{subStoreData.length}}">
<view class="store-detail">
<view class="detail-name">浦东家里哦</view>
<view class="detail-address">详细地址详细地址详细地址详细地址</view>
......@@ -30,12 +30,12 @@
<view class="scan-goods">
<view class="goods-title">
<view class="goods-num">适用商品</view>
<view class="goods-more">查看更多></view>
<view class="goods-more" wx:if="{{productData.length}}">查看更多></view>
</view>
<water-flow-layout
wx:if="{{proData.length}}"
wx:if="{{productData.length}}"
type="2"
image-data="{{proData}}"
image-data="{{productData}}"
/>
<view class="goods-no-more" wx:else>没有更多哦</view>
</view>
......
......@@ -75,7 +75,7 @@ page {
}
.scan-title .title-name {
width: 160rpx;
min-width: 160rpx;
height: 32rpx;
color: rgba(0, 145, 255, 1);
font-size: 32rpx;
......
......@@ -101,7 +101,7 @@ class Http {
header: {
'tunnel-token': 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', // 测试
// 'tunnel-token' : 'd6db651f8b9c7db4176465accfc1c913843fd9ad328cd5f4fe201d918072c9e8', // 生产
'tunnel-token' : 'brand1001', // 开发
// 'tunnel-token' : 'brand1001', // 开发
'tentacle-content': this.getTentacle(),
// 'tentacle-content': '{"id":"621346354647797760","tentacleType":3,"tentacleId":"611969009872691200","contentType":1}'
......@@ -137,7 +137,7 @@ class Http {
header: {
'tunnel-token': 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', // 测试
// 'tunnel-token' : 'd6db651f8b9c7db4176465accfc1c913843fd9ad328cd5f4fe201d918072c9e8', // 生产
'tunnel-token' : 'brand1001', // 开发
// 'tunnel-token' : 'brand1001', // 开发
'tentacle-content': this.getTentacle()
// 'tentacle-content': '{"id":"621346354647797760","tentacleType":3,"tentacleId":"611969009872691200","contentType":1}'
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment