Просмотр исходного кода

[解决小红点的bug]

tags/广东版3.2.1
meo 6 лет назад
Родитель
Сommit
01f728a8d4
15 измененных файлов: 65 добавлений и 46 удалений
  1. Двоичные данные
      assets/images/fail.png
  2. +0
    -7
      pages/ConsumeDetail/ConsumeDetail.js
  3. +2
    -2
      pages/cardorder/index/index.js
  4. +1
    -1
      pages/cardorder/index/index.wxml
  5. +35
    -16
      pages/coupon/detail/index.js
  6. +1
    -8
      pages/discountCardList/discountCardList.js
  7. +1
    -1
      pages/discountCardList/discountCardList.json
  8. +1
    -1
      pages/discountCardList/discountCardList.wxml
  9. +1
    -0
      pages/discountCardList/discountCardList.wxss
  10. +1
    -1
      pages/index/index.wxml
  11. +0
    -5
      pages/order/detail/index.wxml
  12. +1
    -1
      pages/paySuccess/paySuccess.wxml
  13. +1
    -1
      pages/scanPay/scanPay.wxml
  14. +18
    -0
      pages/user/index.js
  15. +2
    -2
      pages/user/index.wxml

Двоичные данные
assets/images/fail.png Просмотреть файл

До После
Ширина: 200  |  Высота: 200  |  Размер: 8.3 KiB

+ 0
- 7
pages/ConsumeDetail/ConsumeDetail.js Просмотреть файл

@@ -82,13 +82,6 @@ Page({
showPage: true showPage: true
}) })
} else { } else {
wx.showModal({
title: '抱歉',
content: '暂无消费记录',
showCancel: false,
success: function (res) {
}
})
} }
wx.hideLoading(); wx.hideLoading();
res.data.list.map(file => { res.data.list.map(file => {


+ 2
- 2
pages/cardorder/index/index.js Просмотреть файл

@@ -33,8 +33,8 @@ Page({
onShow: function() { onShow: function() {
let that = this; let that = this;
wx.setStorage({ wx.setStorage({
key: 'couponNum',
data: "couponNum1",
key: 'couponNum2',
data: "couponNum3",
}) })
wx.hideTabBarRedDot({ wx.hideTabBarRedDot({
index: 2 index: 2


+ 1
- 1
pages/cardorder/index/index.wxml Просмотреть файл

@@ -1,5 +1,5 @@
<view class="market" wx:if="{{showPage}}"> <view class="market" wx:if="{{showPage}}">
<!-- 包 我的优惠券 -->
<!-- 包 我的优惠券 -->
<i-tabs class='tabs' current="{{ current_scroll }}" scroll bindchange="handleChangeScroll"> <i-tabs class='tabs' current="{{ current_scroll }}" scroll bindchange="handleChangeScroll">
<i-tab class='i-tab' wx:for="{{tabs}}" wx:key="unique" key="{{item.key}}" title="{{item.name}}"></i-tab> <i-tab class='i-tab' wx:for="{{tabs}}" wx:key="unique" key="{{item.key}}" title="{{item.name}}"></i-tab>
</i-tabs> </i-tabs>


+ 35
- 16
pages/coupon/detail/index.js Просмотреть файл

@@ -223,6 +223,11 @@ Page({
couponId: options.couponId, couponId: options.couponId,
title: that.data.data.title ? that.data.data.title : '', title: that.data.data.title ? that.data.data.title : '',
}); });
if(options.cardType){
that.setData({
cardType: options.cardType
})
}
var parmer = { var parmer = {
url: config.api.couponDetail, url: config.api.couponDetail,
data: { data: {
@@ -354,56 +359,56 @@ Page({
if (err.code == "2011") { if (err.code == "2011") {
wx.showToast({ wx.showToast({
title: "商户信息没找到", title: "商户信息没找到",
image:imgurl.fail.url,
image:'./../../../assets/images/fail.png',
duration: 2000, duration: 2000,
mask: false mask: false
}); });
} else if (err.code == "2013") { } else if (err.code == "2013") {
wx.showToast({ wx.showToast({
title: "商户信息禁用", title: "商户信息禁用",
image:imgurl.fail.url,
image:'./../../../assets/images/fail.png',
duration: 2000, duration: 2000,
mask: false mask: false
}); });
} else if (err.code == "3000") { } else if (err.code == "3000") {
wx.showToast({ wx.showToast({
title: "库存不足", title: "库存不足",
image:imgurl.fail.url,
image:'./../../../assets/images/fail.png',
duration: 2000, duration: 2000,
mask: false mask: false
}); });
} else if (err.code == "3001") { } else if (err.code == "3001") {
wx.showToast({ wx.showToast({
title: "领取达到上限", title: "领取达到上限",
image:imgurl.fail.url,
image:'./../../../assets/images/fail.png',
duration: 2000, duration: 2000,
mask: false mask: false
}); });
} else if (err.code == "3002") { } else if (err.code == "3002") {
wx.showToast({ wx.showToast({
title: "订单失败", title: "订单失败",
image:imgurl.fail.url,
image:'./../../../assets/images/fail.png',
duration: 2000, duration: 2000,
mask: false mask: false
}); });
} else if (err.code == "3003") { } else if (err.code == "3003") {
wx.showToast({ wx.showToast({
title: "订单不存在", title: "订单不存在",
image:imgurl.fail.url,
image:'./../../../assets/images/fail.png',
duration: 2000, duration: 2000,
mask: false mask: false
}); });
} else if (err.code == "3004") { } else if (err.code == "3004") {
wx.showToast({ wx.showToast({
title: "订单不存在", title: "订单不存在",
image:imgurl.fail.url,
image:'./../../../assets/images/fail.png',
duration: 2000, duration: 2000,
mask: false mask: false
}); });
} else if (err.code == "4003") { } else if (err.code == "4003") {
wx.showToast({ wx.showToast({
title: "卡券已作废", title: "卡券已作废",
image:imgurl.fail.url,
image:'./../../../assets/images/fail.png',
duration: 2000, duration: 2000,
mask: false mask: false
}); });
@@ -475,10 +480,17 @@ Page({
/** /**
* 用户支付成功以后跳转到券包列表 * 用户支付成功以后跳转到券包列表
*/ */
wx.setStorage({
key: 'couponNum',
data: "couponNum",
})
if(that.data.cardType == 7){
wx.setStorage({
key: 'couponNum2',
data: "couponNum2"
})
}else{
wx.setStorage({
key: 'couponNum',
data: "couponNum"
})
}
} }
}, },
fail: res => { fail: res => {
@@ -506,10 +518,17 @@ Page({
} else { } else {
// 免费券 // 免费券
that.payOrderUpdate(orderId, "0", 1, '', 'free'); that.payOrderUpdate(orderId, "0", 1, '', 'free');
wx.setStorage({
key: 'couponNum',
data: "couponNum"
})
if(that.data.cardType == 7){
wx.setStorage({
key: 'couponNum2',
data: "couponNum2"
})
}else{
wx.setStorage({
key: 'couponNum',
data: "couponNum"
})
}
} }
} }
}) })


+ 1
- 8
pages/discountCardList/discountCardList.js Просмотреть файл

@@ -23,13 +23,6 @@ Page({
}, },
onShow: function () { onShow: function () {
let that = this; let that = this;
wx.setStorage({
key: 'couponNum',
data: "couponNum1",
})
wx.hideTabBarRedDot({
index: 2
})
Http.get({ Http.get({
url: config.api.businessList, url: config.api.businessList,
data: { data: {
@@ -58,7 +51,7 @@ Page({
gotouse: function (e) { gotouse: function (e) {
console.log(e.currentTarget.dataset.couponid) console.log(e.currentTarget.dataset.couponid)
wx.navigateTo({ wx.navigateTo({
url: `/pages/coupon/detail/index?couponChannelId=${e.currentTarget.dataset.quancode}&couponId=${e.currentTarget.dataset.couponid}`
url: `/pages/coupon/detail/index?couponChannelId=${e.currentTarget.dataset.quancode}&couponId=${e.currentTarget.dataset.couponid}&cardType=${e.currentTarget.dataset.type}`
}); });
}, },
getList(key, pageNum) { getList(key, pageNum) {


+ 1
- 1
pages/discountCardList/discountCardList.json Просмотреть файл

@@ -3,5 +3,5 @@
"i-tab": "../../../dist/tab/index", "i-tab": "../../../dist/tab/index",
"i-tabs": "../../../dist/tabs/index" "i-tabs": "../../../dist/tabs/index"
}, },
"navigationBarTitleText": "优惠卡"
"navigationBarTitleText": "消费卡"
} }

+ 1
- 1
pages/discountCardList/discountCardList.wxml Просмотреть файл

@@ -13,7 +13,7 @@
<button hover-class='active'>前往首页看看</button> <button hover-class='active'>前往首页看看</button>
</navigator> </navigator>
</view> </view>
<view class='section' wx:for='{{list}}' wx:key='{{index}}' bindtap="gotouse" data-couponId='{{item.couponId}}' data-quancode="{{item.id}}">
<view class='section' wx:for='{{list}}' wx:key='{{index}}' bindtap="gotouse" data-couponId='{{item.couponId}}' data-type="{{item.type}}" data-quancode="{{item.id}}">
<view class='mms'> <view class='mms'>
<view class='detail_msg'> <view class='detail_msg'>
<image mode="aspectFill" src='{{item.coverImg}}' mode='widthFix'></image> <image mode="aspectFill" src='{{item.coverImg}}' mode='widthFix'></image>


+ 1
- 0
pages/discountCardList/discountCardList.wxss Просмотреть файл

@@ -140,6 +140,7 @@
color:#FF3535!important; color:#FF3535!important;
background: none; background: none;
border-top:1px solid #eee; border-top:1px solid #eee;
border-radius: 0!important;
} }
button::after{ border: none; } button::after{ border: none; }
.buycardbtn button text{ .buycardbtn button text{


+ 1
- 1
pages/index/index.wxml Просмотреть файл

@@ -9,7 +9,7 @@
</view> </view>
<view bindtap='gotodiscountCardList'> <view bindtap='gotodiscountCardList'>
<image src='./../../assets/images/icon002.png'></image> <image src='./../../assets/images/icon002.png'></image>
<text>优惠卡</text>
<text>消费卡</text>
</view> </view>
<view bindtap='qrcode'> <view bindtap='qrcode'>
<image src='./../../assets/images/icon003.png'></image> <image src='./../../assets/images/icon003.png'></image>


+ 0
- 5
pages/order/detail/index.wxml Просмотреть файл

@@ -20,11 +20,6 @@
<text>下单时间:</text>{{createDate}}</view> <text>下单时间:</text>{{createDate}}</view>
</view> </view>
</view> </view>
<!-- <view>
<text style='color:#f96563;'>{{order.salePrice/100}}元</text>
<text wx:if="{{order.unit==0}}">{{order.price/100}}</text>
<text wx:if="{{order.unit==1}}">{{order.price/100}}</text>
</view> -->
</view> </view>
<view class='classif'> <view class='classif'>
<!-- <!--


+ 1
- 1
pages/paySuccess/paySuccess.wxml Просмотреть файл

@@ -11,7 +11,7 @@
<view class="payMessage"> <view class="payMessage">
<view>订单号:{{data.orderId}}</view> <view>订单号:{{data.orderId}}</view>
<view>交易时间:{{data.updateDate}}</view> <view>交易时间:{{data.updateDate}}</view>
<view>金额:<text class="price">{{data.payment/100}}元</text></view>
<view>金额:<text class="price">{{data.deductionAmount/100}}元</text></view>
</view> </view>
</view> </view>
</view> </view>


+ 1
- 1
pages/scanPay/scanPay.wxml Просмотреть файл

@@ -13,7 +13,7 @@
<view class='zhezhao'></view> <view class='zhezhao'></view>
<view class='card-model'> <view class='card-model'>
<view class='card-top'> <view class='card-top'>
余额不足,请选择其他优惠卡支付<image bindtap='showModel' class='close' src='./../../assets/images/close.png'></image>
余额不足,请选择其他消费卡支付<image bindtap='showModel' class='close' src='./../../assets/images/close.png'></image>
</view> </view>
<view class='card-content'> <view class='card-content'>
<scroll-view scroll-y style="height: 500rpx;" bindscroll="scroll" scroll-into-view="{{toView}}" scroll-top="{{scrollTop}}"> <scroll-view scroll-y style="height: 500rpx;" bindscroll="scroll" scroll-into-view="{{toView}}" scroll-top="{{scrollTop}}">


+ 18
- 0
pages/user/index.js Просмотреть файл

@@ -98,9 +98,13 @@ Page({
onShow: function() { onShow: function() {
let that = this; let that = this;
let num = wx.getStorageSync('couponNum'); let num = wx.getStorageSync('couponNum');
let num1 = wx.getStorageSync('couponNum2');
wx.hideTabBarRedDot({ wx.hideTabBarRedDot({
index: 2 index: 2
}); });
wx.hideTabBarRedDot({
index: 3
});
if (num == 'couponNum1') { if (num == 'couponNum1') {
wx.setStorage({ wx.setStorage({
key: 'couponNum', key: 'couponNum',
@@ -114,6 +118,20 @@ Page({
couponNum: "couponNum" couponNum: "couponNum"
}) })
}; };
if (num1 == 'couponNum3') {
wx.setStorage({
key: 'couponNum2',
data: "couponNum3",
})
that.setData({
couponNum2: "couponNum3"
})
} else if (num1 == 'couponNum2') {
that.setData({
couponNum2: "couponNum2"
})
};
Http.get({ Http.get({
url: config.api.getScore, url: config.api.getScore,
data: {} data: {}


+ 2
- 2
pages/user/index.wxml Просмотреть файл

@@ -46,9 +46,9 @@
<navigator url="/pages/cardorder/index/index"> <navigator url="/pages/cardorder/index/index">
<view class="user-btn app-border-bottom"> <view class="user-btn app-border-bottom">
<view> <view>
<image class='icons' src="{{cardiconUrl}}" mode='widthFix'></image>我的卡包</view>
<image class='icons' src="{{cardiconUrl}}" mode='widthFix'></image>我的卡包</view>
<view> <view>
<text class="couponnum" wx:if="{{couponNum=='couponNum'}}"></text>
<text class="couponnum" wx:if="{{couponNum2=='couponNum2'}}"></text>
<text class="iconfont icon-right"></text> <text class="iconfont icon-right"></text>
</view> </view>
</view> </view>


Загрузка…
Отмена
Сохранить