Skip to content

Commit

Permalink
充值界面增加展示 充值满一定金额赠送一定金额 的规则
Browse files Browse the repository at this point in the history
  • Loading branch information
gooking committed Feb 27, 2019
1 parent ecb9733 commit 53bed17
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
4 changes: 2 additions & 2 deletions config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
version: "6.2.0",
note: '启动图后台可管理、充值增加单笔满多少金额赠送一定的金额',
version: "6.2.1",
note: '充值界面增加展示 充值满一定金额赠送一定金额 的规则',
subDomain: "tz", // 如果你的域名是: https://api.it120.cc/abcd 那么这里只要填写 abcd
appid: "wxa46b09d413fbcaff", // 您的小程序的appid,购物单功能需要使用
shareProfile: '百款精品商品,总有一款适合您' // 首页转发的时候话术
Expand Down
12 changes: 10 additions & 2 deletions pages/recharge/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ Page({
*/
data: {
uid: undefined,
showalipay: false
showalipay: false,
rechargeSendRules: undefined
},

/**
Expand Down Expand Up @@ -37,7 +38,14 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {

const _this = this
WXAPI.rechargeSendRules().then(res => {
if (res.code === 0) {
_this.setData({
rechargeSendRules: res.data
});
}
})
},

/**
Expand Down
10 changes: 10 additions & 0 deletions pages/recharge/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,14 @@
<view wx:if="{{showalipay}}" style='width:100%;font-size: 30rpx;margin-top:30rpx;color:red;text-align:center;margin-bottom:30rpx;'>保存以下二维码,使用支付宝扫码付款</view>
<canvas wx:if="{{showalipay}}" style="width: 200px; height: 200px;text-align:center;" canvas-id="myQrcode"></canvas>
<button wx:if="{{showalipay}}" type="primary" class="save-btn" bindtap="saveToMobile">保存相册</button>
<view wx:if="{{rechargeSendRules}}" class="weui-panel weui-panel_access">
<view class="weui-panel__hd">充值满送活动:</view>
<view class="weui-panel__bd">
<view wx:for="{{rechargeSendRules}}" wx:key="id" class="weui-media-box weui-media-box_text">
<view class="weui-media-box__title weui-media-box__title_in-text">单笔充值每满 {{ item.confine }} 元, 送 {{ item.send }} 元</view>
<view class="weui-media-box__desc">单笔充值每满 {{ item.confine }} 元,即可获得奖励。</view>
<view wx-if="{{item.loop}}" class="weui-media-box__desc">充的多送的多,上不封顶。</view>
</view>
</view>
</view>
</view>
3 changes: 3 additions & 0 deletions pages/recharge/index.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,7 @@ picker {
}
.hui{
color: #777;
}
.weui-panel {
width:740rpx;
}

0 comments on commit 53bed17

Please sign in to comment.