@@ -163,7 +163,12 @@ var config = { | |||||
/** | /** | ||||
* 提交问卷 | * 提交问卷 | ||||
*/ | */ | ||||
answerQuestion:"/wxQuestion/answerQuestion" | |||||
answerQuestion:"/wxQuestion/answerQuestion", | |||||
/** | |||||
* | |||||
获取打折商户列表 | |||||
*/ | |||||
discountMerchantList:"/mall/discountMerchantList" | |||||
}, | }, | ||||
weapp: { | weapp: { | ||||
@@ -150,11 +150,11 @@ Page({ | |||||
}); | }); | ||||
}) | }) | ||||
}, | }, | ||||
phone: function () { | |||||
phone: function (e) { | |||||
let that = this; | let that = this; | ||||
if (that.data.data.merchantLinkPhone) { | |||||
if (e.currentTarget.dataset.merchantlinkphone) { | |||||
wx.makePhoneCall({ | wx.makePhoneCall({ | ||||
phoneNumber: that.data.data.merchantLinkPhone | |||||
phoneNumber: e.currentTarget.dataset.merchantlinkphone | |||||
}); | }); | ||||
} | } | ||||
} | } |
@@ -39,17 +39,22 @@ | |||||
<view class="tit"> | <view class="tit"> | ||||
适用门店 | 适用门店 | ||||
</view> | </view> | ||||
<view class='posi_logo'> | |||||
<view> | |||||
<image src='{{data.merChantImgUrl}}'></image> | |||||
<view wx:for="{{data.merchantVoList}}" wx:key="{{index}}"> | |||||
<view class='posi_logo'> | |||||
<view> | |||||
<image src='{{item.merChantImgUrl}}'></image> | |||||
</view> | |||||
<view> | |||||
<text>{{item.merchantName}}</text> | |||||
<text>{{item.addr}}{{item.buildingName}}{{item.floorName}}</text> | |||||
</view> | |||||
<view bindtap='phone' data-merchantLinkPhone='{{item.merchantLinkPhone}}'> | |||||
<image class="tel" src="./../../../assets/img/tel.jpg" mode="widthFix" /> | |||||
</view> | |||||
</view> | </view> | ||||
<view> | |||||
<text>{{data.merchantName}}</text> | |||||
<text>{{data.addr}}{{data.buildingName}}{{data.floorName}}</text> | |||||
</view> | |||||
<image bindtap='phone' class="tel" src="./../../../assets/img/tel.jpg" mode="widthFix" /> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<image class='line' mode="widthFix" src="./../../../assets/img/line.png"></image> | <image class='line' mode="widthFix" src="./../../../assets/img/line.png"></image> | ||||
<view class='note'> | <view class='note'> | ||||
<view style='height:60rpx;line-height:60rpx;'> | <view style='height:60rpx;line-height:60rpx;'> | ||||
@@ -103,7 +103,7 @@ page { | |||||
left: 0; | left: 0; | ||||
right: 0; | right: 0; | ||||
margin: auto; | margin: auto; | ||||
top: 5rpx; | |||||
top: -50rpx; | |||||
border-radius: 50%; | border-radius: 50%; | ||||
overflow: hidden; | overflow: hidden; | ||||
} | } | ||||
@@ -201,7 +201,6 @@ page { | |||||
padding: 30rpx 4% 0; | padding: 30rpx 4% 0; | ||||
display: flex; | display: flex; | ||||
position: relative; | position: relative; | ||||
z-index: 100; | |||||
} | } | ||||
.shiji { | .shiji { | ||||
@@ -226,7 +225,6 @@ page { | |||||
.posi_logo view:nth-child(2) { | .posi_logo view:nth-child(2) { | ||||
position: relative; | position: relative; | ||||
z-index: 100; | |||||
display: flex; | display: flex; | ||||
flex-direction: column; | flex-direction: column; | ||||
flex: 8; | flex: 8; | ||||
@@ -268,7 +266,7 @@ page { | |||||
margin: auto; | margin: auto; | ||||
width: 50rpx; | width: 50rpx; | ||||
height: 50rpx; | height: 50rpx; | ||||
z-index: 1000000; | |||||
z-index: 10; | |||||
} | } | ||||
.notes view:nth-child(1) { | .notes view:nth-child(1) { | ||||
@@ -36,6 +36,17 @@ Page({ | |||||
} | } | ||||
}) | }) | ||||
.then(res=>{ | .then(res=>{ | ||||
// if true 则开启特享礼遇 | |||||
if (res.data.discountEnable) { | |||||
that.setData({ | |||||
discountEnable: true | |||||
}) | |||||
} | |||||
else { | |||||
that.setData({ | |||||
discountEnable: false | |||||
}) | |||||
} | |||||
that.setData({ | that.setData({ | ||||
flags: 'have', | flags: 'have', | ||||
rules: JSON.parse(res.data.score.rules).concat(JSON.parse(res.data.score.rules)[1].childs), | rules: JSON.parse(res.data.score.rules).concat(JSON.parse(res.data.score.rules)[1].childs), | ||||
@@ -88,6 +88,9 @@ Page({ | |||||
}); | }); | ||||
}) | }) | ||||
.catch(err => { | .catch(err => { | ||||
setTimeout(function () { | |||||
wx.hideLoading(); | |||||
}, 1200); | |||||
wx.showToast({ | wx.showToast({ | ||||
title: err.errMsg, | title: err.errMsg, | ||||
icon: 'none', | icon: 'none', | ||||
@@ -19,6 +19,7 @@ Page({ | |||||
duration: 1000, | duration: 1000, | ||||
current: 0, | current: 0, | ||||
stopFees: {}, | stopFees: {}, | ||||
scroll:true, | |||||
canIUse: wx.canIUse("navigator") | canIUse: wx.canIUse("navigator") | ||||
}, | }, | ||||
/** | /** | ||||
@@ -36,7 +37,9 @@ Page({ | |||||
/** | /** | ||||
* 获得停车费用 | * 获得停车费用 | ||||
*/ | */ | ||||
that.getStopFee(listCardNum); | |||||
// if(that.data.scroll){ | |||||
// that.getStopFee(listCardNum); | |||||
// } | |||||
}, | }, | ||||
gotomange: function() { | gotomange: function() { | ||||
wx.navigateTo({ | wx.navigateTo({ | ||||
@@ -549,7 +552,9 @@ Page({ | |||||
stopFees: res.data, | stopFees: res.data, | ||||
timecha: Util.timecha(res.data.exitTime, res.data.entranceTime) | timecha: Util.timecha(res.data.exitTime, res.data.entranceTime) | ||||
}); | }); | ||||
console.log(that.data.extraData) | |||||
// that.setData({ | |||||
// scroll:true | |||||
// }) | |||||
}) | }) | ||||
.catch(error => { | .catch(error => { | ||||
console.log(error) | console.log(error) | ||||
@@ -559,7 +564,8 @@ Page({ | |||||
showCancel: false | showCancel: false | ||||
}) | }) | ||||
that.setData({ | that.setData({ | ||||
stopFees: {} | |||||
stopFees: {}, | |||||
// scroll: false | |||||
}) | }) | ||||
}); | }); | ||||
}, | }, | ||||
@@ -1,6 +1,7 @@ | |||||
// pages/specialcourtesy/specialcourtesy.js | |||||
var config = require("../../config/config.js"); | |||||
var app = getApp(); | |||||
const Http = require("../../utils/HttpBasics"); | |||||
Page({ | Page({ | ||||
/** | /** | ||||
* 页面的初始数据 | * 页面的初始数据 | ||||
*/ | */ | ||||
@@ -21,12 +22,28 @@ Page({ | |||||
onReady: function () { | onReady: function () { | ||||
}, | }, | ||||
phone: function (e) { | |||||
console.log(e) | |||||
let that = this; | |||||
wx.makePhoneCall({ | |||||
phoneNumber: e.currentTarget.dataset.merchantlinkphone | |||||
}); | |||||
}, | |||||
/** | /** | ||||
* 生命周期函数--监听页面显示 | * 生命周期函数--监听页面显示 | ||||
*/ | */ | ||||
onShow: function () { | onShow: function () { | ||||
let that = this; | |||||
Http.get({ | |||||
url: config.api.discountMerchantList, | |||||
data: {} | |||||
}) | |||||
.then(res=>{ | |||||
console.log(res) | |||||
that.setData({ | |||||
discountMerchantList:res.data | |||||
}) | |||||
}) | |||||
}, | }, | ||||
/** | /** | ||||
@@ -5,63 +5,19 @@ | |||||
<view class="title">以下为商城会员对应门店的优惠折扣</view> | <view class="title">以下为商城会员对应门店的优惠折扣</view> | ||||
</view> | </view> | ||||
<view class='cards clearfix'> | <view class='cards clearfix'> | ||||
<view class='card'> | |||||
<view class='card' wx:for="{{discountMerchantList}}" wx:key="{{index}}"> | |||||
<view class='txt01'> | <view class='txt01'> | ||||
<view class="triangle"> | <view class="triangle"> | ||||
<text><i>></i></text> | <text><i>></i></text> | ||||
</view> | </view> | ||||
<view class='discount'> | <view class='discount'> | ||||
<text style='display:inline-block;'>7.9</text>折</view> | |||||
<text class='cardtype'>缤纷卡</text> | |||||
<text class='tit'>美车堂</text> | |||||
<text style='display:inline-block;'>{{item.vipDiscountRate1/100}}</text>折</view> | |||||
<text class='tit'>{{item.merchantName}}</text> | |||||
<view class='clearfix footer'> | <view class='clearfix footer'> | ||||
<text class='fl'>A座1012号</text> | |||||
<image class="fr" src='./../../assets/img/telicon.png' mode='widthFix'></image> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
<view class='card'> | |||||
<view class='txt01'> | |||||
<view class="triangle"> | |||||
<text><i>></i></text> | |||||
</view> | |||||
<view class='discount'> | |||||
<text style='display:inline-block;'>7.9</text>折</view> | |||||
<text class='cardtype'>缤纷卡</text> | |||||
<text class='tit'>美车堂</text> | |||||
<view class='clearfix footer'> | |||||
<text class='fl'>A座1012号</text> | |||||
<image class="fr" src='./../../assets/img/telicon.png' mode='widthFix'></image> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
<view class='card'> | |||||
<view class='txt01'> | |||||
<view class="triangle"> | |||||
<text><i>></i></text> | |||||
</view> | |||||
<view class='discount'> | |||||
<text style='display:inline-block;'>7.9</text>折</view> | |||||
<text class='cardtype'>缤纷卡</text> | |||||
<text class='tit'>美车堂</text> | |||||
<view class='clearfix footer'> | |||||
<text class='fl'>A座1012号</text> | |||||
<image class="fr" src='./../../assets/img/telicon.png' mode='widthFix'></image> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
<view class='card'> | |||||
<view class='txt01'> | |||||
<view class="triangle"> | |||||
<text><i>></i></text> | |||||
</view> | |||||
<view class='discount'> | |||||
<text style='display:inline-block;'>7.9</text>折</view> | |||||
<text class='cardtype'>缤纷卡</text> | |||||
<text class='tit'>美车堂</text> | |||||
<view class='clearfix footer'> | |||||
<text class='fl'>A座1012号</text> | |||||
<image class="fr" src='./../../assets/img/telicon.png' mode='widthFix'></image> | |||||
<text class='fl'>{{item.buildingName}}{{item.floorName}}</text> | |||||
<view class='fr' bindtap='phone' data-merchantLinkPhone='{{item.merchantLinkPhone}}'> | |||||
<image class="fr" src='./../../assets/img/telicon.png' mode='widthFix'></image> | |||||
</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
@@ -136,7 +136,26 @@ Page({ | |||||
mask: false | mask: false | ||||
}); | }); | ||||
}) | }) | ||||
//暂时注释 | |||||
// that.getrun(); | // that.getrun(); | ||||
// 判断是否显示特享礼遇 | |||||
Http.get({ | |||||
url: config.api.scoreLevelInfo, | |||||
data: {} | |||||
}) | |||||
.then(res=>{ | |||||
// if true 则开启特享礼遇 | |||||
if (res.data.discountEnable){ | |||||
that.setData({ | |||||
discountEnable:true | |||||
}) | |||||
} | |||||
else{ | |||||
that.setData({ | |||||
discountEnable: false | |||||
}) | |||||
} | |||||
}) | |||||
}, | }, | ||||
hideQrcode:function(){ | hideQrcode:function(){ | ||||
let that = this; | let that = this; | ||||
@@ -71,7 +71,8 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</navigator> | </navigator> | ||||
<navigator url="/pages/specialcourtesy/specialcourtesy"> | |||||
<!-- 当商场开启使用折扣按钮的时候, --> | |||||
<navigator url="/pages/specialcourtesy/specialcourtesy" wx:if="{{discountEnable}}"> | |||||
<view class="user-btn app-border-bottom"> | <view class="user-btn app-border-bottom"> | ||||
<view> | <view> | ||||
<image style='width:50rpx;' class='icons' src="./../../assets/img/gift.png" mode='widthFix'></image>特享礼遇</view> | <image style='width:50rpx;' class='icons' src="./../../assets/img/gift.png" mode='widthFix'></image>特享礼遇</view> | ||||