Commit 60951ca6 by 李伟康

提交优惠券

1 parent ecbdba7a
......@@ -6,8 +6,8 @@
<block wx:if="{{noData}}">
<view class="coupon-wrap" wx:for="{{couponData}}" wx:key="index">
<view class="left_icon_box">
<image webp wx:if="{{true}}" class="left_bg" src="{{IMGURL}}coupons/coupons_active.png?v={{img_version}}" />
<image webp wx:else class="left_bg" src="{{IMGURL}}coupons/coupons.png?v={{img_version}}" />
<glsx-image webp wx:if="{{true}}" class="left_bg" src="coupons/coupons_active.png" />
<glsx-image webp wx:else class="left_bg" src="coupons/coupons.png" />
<view class="left_text_one left_text_two">
<text class="price_icon">¥</text>
<text>{{(item.denomination)/100}}</text>
......@@ -33,12 +33,12 @@
<view class="box_btn_color_been_gray " bind:tap="toDetail" wx:elif="{{item.couponStatus != 1&&item.residueAmount ==0}}">已抢光</view>
<view class="box_btn_color_been" bind:tap="toDetail" wx:elif="{{item.couponStatus == 1}}">已领取</view>
<view class="already" wx:if="{{item.couponStatus == 1}}">
<image webp src="{{IMGURL}}coupons/been.png?v={{img_version}}" />
<glsx-image webp src="coupons/been.png" />
</view>
</block>
<block wx:else>
<view class="circle-selected" data-item="{{item}}" data-index="{{index}}" wx:if="{{item.isChecked}}" bindtap="selectCoupon">
<image webp src="{{IMGURL}}coupons/select.png?v={{img_version}}" />
<glsx-image webp src="coupons/select.png" />
</view>
<view class="noSelect" data-item="{{item}}" data-index="{{index}}" wx:if="{{!item.isChecked}}" bindtap="selectCoupon"></view>
</block>
......@@ -73,7 +73,7 @@
</view>
</view>
<view wx:if="{{!noData}}" class="no_data">
<image webp class="nodata_bg" src="{{IMGURL}}coupons/no_card_bg.png?v={{img_version}}" />
<glsx-image webp class="nodata_bg" src="coupons/no_card_bg.png" />
<view class="nodata_text">暂无优惠券</view>
</view>
</popup>
\ No newline at end of file
......@@ -43,7 +43,7 @@ Component({
xx: 'xx'
}
if (discountType == 2 || discountType == 4) {
wx.$router.go('/packageMall/pages/coupon/coupon', {
wx.p.router.go('/packageMall/pages/coupon/coupon', {
userCouponId: id,
useMemberType,
detailInfo
......@@ -52,12 +52,12 @@ Component({
}
/**线上商品代金券 */
if (discountType == 3 && useChannel == 1) {
wx.$router.go('/packageMine/pages/coupon/recommend/recommend', {
wx.p.router.go('/packageMine/pages/coupon/recommend/recommend', {
couponInfo: coupons
})
return
}
wx.$router.go('/packageMine/pages/coupon/detail/detail', {
wx.p.router.go('/packageMine/pages/coupon/detail/detail', {
item: coupons
})
}
......
<!-- <view class="box_wrapper" style="{{couponStyle}}; background-image: url({{btnStatus == 0 ? couponBaseList[coupons.discountType]:unCouponBaseList[coupons.discountType]}});"> -->
<view class="box_wrapper" style="{{couponStyle}}">
<view class="bg">
<image webp src="{{IMGURL}}mine/coupon/{{btnStatus == 0 ? '' :'un-'}}coupon-{{coupons.discountType}}.png?v={{img_version}}"></image>
<glsx-image webp src="mine/coupon/{{btnStatus == 0 ? '' :'un-'}}coupon-{{coupons.discountType}}.png"></glsx-image>
</view>
<view class="container">
<view class="{{coupons.discountType==4 || coupons.discountType==7 ? '':'left_icon_box'}}">
......
......@@ -57,5 +57,6 @@
],
"include": []
},
"appid": "wxfe82b8d65d07808f"
"appid": "wx6e40cfb83ce4ffb1",
"projectname": "hmd"
}
\ No newline at end of file
......@@ -22,8 +22,13 @@ Date.prototype.format = function (fmt) {
/**触底加载 */
const onReachBottom = (obj, callBack) => {
let _this = $router.getPageInstance()
let { pageNum, total, pageSize, nothing } = obj
let _this = obj._this || wx.p.router.getPageInstance()
let {
pageNum,
total,
pageSize,
nothing
} = obj
if (!total && !pageNum) {
console.error('total&&pageNum为必传')
return
......@@ -42,35 +47,6 @@ const onReachBottom = (obj, callBack) => {
}
}
/**是否全面屏 */
const isFullSucreen = isComponents => {
const thisPage = $router.getPageInstance()
const routerList = $router.getRouterList()
const router = routerList.find(item => item.url === `/${thisPage.route}`)
let key = `${router.url.replace('/', '')}.html`
let val = false
if (__wxConfig && __wxConfig.page && __wxConfig.page[key]) {
let { navigationStyle } = __wxConfig.page[key].window
wx.getSystemInfo({
success(res) {
if (res.platform != 'android') {
let { statusBarHeight, screenHeight, windowHeight } = res
if (navigationStyle && navigationStyle == 'custom') {
windowHeight = windowHeight - thisPage.data.navHeight || 0
}
//兼容自定义标题
val = router.isTab ? screenHeight - windowHeight - statusBarHeight - 32 > 72 : screenHeight - windowHeight > 72
if (isComponents) val = screenHeight - windowHeight > 72
}
},
fail(err) {
return false
}
})
}
return val
}
/**节流 */
const throttle = (fn, gapTime) => {
......@@ -128,10 +104,9 @@ const parseString = str => {
const Util = {
onReachBottom,
isFullSucreen,
clearObjNull,
throttle,
isEmptyObj,
parseString,
}
export default Util
export default Util
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!