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