@@ -9,7 +9,7 @@ | |||||
<view class="coupons-info-name tit">{{data.title}}</view> | <view class="coupons-info-name tit">{{data.title}}</view> | ||||
<view class="coupons-info-name subtitle">{{data.subTitle}}</view> | <view class="coupons-info-name subtitle">{{data.subTitle}}</view> | ||||
<view class="coupons-info-price-p"> | <view class="coupons-info-price-p"> | ||||
<!-- <text class="i">¥</text> --> | |||||
<text class="i">¥</text> | |||||
{{data.salePriceStr}} | {{data.salePriceStr}} | ||||
<view class="coupons-info-manjian" style="margin-top:10rpx;" wx:if="{{data.type == 1}}"> | <view class="coupons-info-manjian" style="margin-top:10rpx;" wx:if="{{data.type == 1}}"> | ||||
满¥{{data.usePriceStr}}可用 | 满¥{{data.usePriceStr}}可用 | ||||
@@ -308,6 +308,9 @@ Page({ | |||||
that.payOrderUpdate(that.data.orderId, payOrderId, 1); // 支付成功 | that.payOrderUpdate(that.data.orderId, payOrderId, 1); // 支付成功 | ||||
console.log(res); | console.log(res); | ||||
if (res.errMsg == "requestPayment:ok") { | if (res.errMsg == "requestPayment:ok") { | ||||
// wx.showTabBarRedDot({ | |||||
// index: 2 | |||||
// }) | |||||
wx.showToast({ | wx.showToast({ | ||||
title: "购买成功", | title: "购买成功", | ||||
image: "./../../../assets/img/success.png", | image: "./../../../assets/img/success.png", | ||||
@@ -384,6 +387,10 @@ Page({ | |||||
} else { | } else { | ||||
// 免费券 | // 免费券 | ||||
that.payOrderUpdate(orderId, "0", 1); | that.payOrderUpdate(orderId, "0", 1); | ||||
wx.showTabBarRedDot({ | |||||
index: 0 | |||||
}); | |||||
console.log("小红点 小红点 小红点") | |||||
wx.setStorage({ | wx.setStorage({ | ||||
key: 'couponNum', | key: 'couponNum', | ||||
data: "couponNum", | data: "couponNum", | ||||
@@ -72,7 +72,7 @@ | |||||
height: 350rpx; | height: 350rpx; | ||||
} | } | ||||
.coupon_detail { | .coupon_detail { | ||||
padding: 0 20rpx; | |||||
padding: 30rpx 20rpx 0; | |||||
} | } | ||||
.fl { | .fl { | ||||
@@ -97,7 +97,7 @@ | |||||
} | } | ||||
.coupon_detail .fr { | .coupon_detail .fr { | ||||
width: 400rpx; | |||||
width: 434rpx; | |||||
} | } | ||||
.coupon_detail .title { | .coupon_detail .title { | ||||
@@ -154,8 +154,6 @@ | |||||
display: flex; | display: flex; | ||||
flex-direction: column; | flex-direction: column; | ||||
background: #fff; | background: #fff; | ||||
border-bottom: 20rpx solid #f5f5f5; | |||||
border-top: 20rpx solid #f5f5f5; | |||||
position: relative; | position: relative; | ||||
} | } | ||||
@@ -205,7 +203,7 @@ | |||||
color: #000; | color: #000; | ||||
font-weight: bold; | font-weight: bold; | ||||
padding: 24rpx 0 33rpx; | padding: 24rpx 0 33rpx; | ||||
border-bottom: 1px solid #eee; | |||||
border-bottom: 1rpx solid #eee; | |||||
text-indent: 20rpx; | text-indent: 20rpx; | ||||
} | } | ||||
@@ -220,9 +218,6 @@ | |||||
z-index:1000000; | z-index:1000000; | ||||
} | } | ||||
.notes { | |||||
border-top: 20rpx solid #f5f5f5; | |||||
} | |||||
.notes view:nth-child(1) { | .notes view:nth-child(1) { | ||||
width: 92%; | width: 92%; | ||||
@@ -3,7 +3,7 @@ | |||||
<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> | ||||
<view> | |||||
<view style='padding-top:90rpx;'> | |||||
<view class="nocoupon" wx:if="{{list.length==0}}"> | <view class="nocoupon" wx:if="{{list.length==0}}"> | ||||
<image src="./../../../assets/img/cou.png" mode="widthFix" /> | <image src="./../../../assets/img/cou.png" mode="widthFix" /> | ||||
<text>再忙,也要记得买点什么犒赏自己~</text> | <text>再忙,也要记得买点什么犒赏自己~</text> | ||||
@@ -7,6 +7,11 @@ | |||||
width: 100% !important; | width: 100% !important; | ||||
height: 88rpx; | height: 88rpx; | ||||
text-align: center; | text-align: center; | ||||
position: fixed; | |||||
top: 0; | |||||
left: 0; | |||||
right: 0; | |||||
z-index: 100000; | |||||
} | } | ||||
.i-tab { | .i-tab { | ||||
@@ -24,7 +29,7 @@ | |||||
background: #fff; | background: #fff; | ||||
display: flex; | display: flex; | ||||
padding: 30rpx 4%; | padding: 30rpx 4%; | ||||
border-bottom: 1px solid #ededed; | |||||
border-bottom: 1rpx solid #ededed; | |||||
} | } | ||||
.logo { | .logo { | ||||
@@ -69,10 +74,8 @@ | |||||
.btns { | .btns { | ||||
position: absolute; | position: absolute; | ||||
top: 0; | |||||
right: 20rpx; | right: 20rpx; | ||||
bottom: 0; | |||||
margin: auto; | |||||
bottom: 39rpx; | |||||
width: 180rpx; | width: 180rpx; | ||||
height: 60rpx; | height: 60rpx; | ||||
line-height: 60rpx; | line-height: 60rpx; | ||||
@@ -9,7 +9,7 @@ Page({ | |||||
scrollTop: 0, | scrollTop: 0, | ||||
page: 1 // 刷新进入页面时已经加载了第一页数据,onReachBottom时 page++,从第2页开始加载 | page: 1 // 刷新进入页面时已经加载了第一页数据,onReachBottom时 page++,从第2页开始加载 | ||||
}, | }, | ||||
swiperChange: function (e) { | |||||
swiperChange: function(e) { | |||||
this.setData({ | this.setData({ | ||||
swiperCurrent: e.detail.current | swiperCurrent: e.detail.current | ||||
}); | }); | ||||
@@ -17,7 +17,7 @@ Page({ | |||||
/** | /** | ||||
* 生命周期函数--监听页面初次渲染完成 | * 生命周期函数--监听页面初次渲染完成 | ||||
*/ | */ | ||||
onLoad: function (options) { | |||||
onLoad: function(options) { | |||||
var that = this; | var that = this; | ||||
var scene = decodeURIComponent(options.scene); | var scene = decodeURIComponent(options.scene); | ||||
app.getLocation(); | app.getLocation(); | ||||
@@ -26,7 +26,7 @@ Page({ | |||||
/** | /** | ||||
* 下拉刷新 | * 下拉刷新 | ||||
*/ | */ | ||||
onPullDownRefresh: function (e) { | |||||
onPullDownRefresh: function(e) { | |||||
let that = this; | let that = this; | ||||
that.userLogin(); | that.userLogin(); | ||||
console.log(this.data.code); | console.log(this.data.code); | ||||
@@ -40,7 +40,7 @@ Page({ | |||||
}; | }; | ||||
}, | }, | ||||
onGetCode: function (e) { | |||||
onGetCode: function(e) { | |||||
//子组件传递给父组件的值 | //子组件传递给父组件的值 | ||||
this.setData({ | this.setData({ | ||||
code: e.detail.val, | code: e.detail.val, | ||||
@@ -51,7 +51,7 @@ Page({ | |||||
/** | /** | ||||
* 用户登录 | * 用户登录 | ||||
*/ | */ | ||||
userLogin: function () { | |||||
userLogin: function() { | |||||
var that = this; | var that = this; | ||||
// 登录 | // 登录 | ||||
wx.login({ | wx.login({ | ||||
@@ -116,7 +116,7 @@ Page({ | |||||
/** | /** | ||||
* banner | * banner | ||||
*/ | */ | ||||
getBannerlist: function () { | |||||
getBannerlist: function() { | |||||
let that = this; | let that = this; | ||||
Http.get({ | Http.get({ | ||||
url: config.api.bannerlist, | url: config.api.bannerlist, | ||||
@@ -135,7 +135,7 @@ Page({ | |||||
/** | /** | ||||
* 检查用户是否有车 | * 检查用户是否有车 | ||||
*/ | */ | ||||
checkUserCarStatus: function () { | |||||
checkUserCarStatus: function() { | |||||
var that = this; | var that = this; | ||||
Http.get({ | Http.get({ | ||||
url: config.api.userCarCount, | url: config.api.userCarCount, | ||||
@@ -153,7 +153,7 @@ Page({ | |||||
/** | /** | ||||
* car共同登录 | * car共同登录 | ||||
*/ | */ | ||||
userCarLogin: function () { | |||||
userCarLogin: function() { | |||||
var that = this; | var that = this; | ||||
if (!app.globalData.carLogin) { | if (!app.globalData.carLogin) { | ||||
// 共同登录 | // 共同登录 | ||||
@@ -175,7 +175,7 @@ Page({ | |||||
/** | /** | ||||
* 获取用户信息 | * 获取用户信息 | ||||
*/ | */ | ||||
getUserInfo: function () { | |||||
getUserInfo: function() { | |||||
// 获取用户信息 | // 获取用户信息 | ||||
wx.getSetting({ | wx.getSetting({ | ||||
success: res => { | success: res => { | ||||
@@ -193,13 +193,13 @@ Page({ | |||||
}); | }); | ||||
}, | }, | ||||
//下拉加载更多 | //下拉加载更多 | ||||
onReachBottom: function () { | |||||
onReachBottom: function() { | |||||
let that = this; | let that = this; | ||||
that.data.page++; | that.data.page++; | ||||
that.setData({ | that.setData({ | ||||
page: that.data.page | page: that.data.page | ||||
}); | }); | ||||
console.log("我是第"+that.data.page+"几页") | |||||
console.log("我是第" + that.data.page + "几页") | |||||
//父组件获得子组件的方法 | //父组件获得子组件的方法 | ||||
//如果code == 0 | //如果code == 0 | ||||
if (that.data.code == 0 || that.data.code == undefined) { | if (that.data.code == 0 || that.data.code == undefined) { | ||||
@@ -209,11 +209,11 @@ Page({ | |||||
} | } | ||||
}, | }, | ||||
// 用户点击右上角分享 | // 用户点击右上角分享 | ||||
onShareAppMessage: function () { | |||||
onShareAppMessage: function() { | |||||
return { | return { | ||||
title: "富茂链客", | title: "富茂链客", | ||||
desc: "分享个小程序,希望你喜欢", | desc: "分享个小程序,希望你喜欢", | ||||
success: function (res) { | |||||
success: function(res) { | |||||
wx.showToast({ | wx.showToast({ | ||||
title: "分享成功", | title: "分享成功", | ||||
duration: 1000, | duration: 1000, | ||||
@@ -123,20 +123,20 @@ | |||||
.classif > view { | .classif > view { | ||||
position: relative; | position: relative; | ||||
height: 70rpx; | |||||
line-height: 70rpx; | |||||
height: 94rpx; | |||||
line-height: 94rpx; | |||||
display: flex; | display: flex; | ||||
justify-content: space-between; | justify-content: space-between; | ||||
border-bottom: 1rpx solid #eee; | border-bottom: 1rpx solid #eee; | ||||
} | } | ||||
.classif > view text { | .classif > view text { | ||||
font-size: 24rpx; | |||||
font-size: 30rpx; | |||||
} | } | ||||
.classif > view text:nth-child(2) { | .classif > view text:nth-child(2) { | ||||
color: #b8b8b8; | color: #b8b8b8; | ||||
font-size: 24rpx; | |||||
font-size: 30rpx; | |||||
} | } | ||||
.classif > view:nth-child(1) { | .classif > view:nth-child(1) { | ||||
@@ -79,11 +79,11 @@ | |||||
display: inline-block; | display: inline-block; | ||||
width: 123rpx !important; | width: 123rpx !important; | ||||
overflow: hidden; | overflow: hidden; | ||||
font-size: 28rpx; | |||||
font-size: 26rpx; | |||||
color: #02c0ff; | color: #02c0ff; | ||||
letter-spacing: 0; | letter-spacing: 0; | ||||
text-align: right; | text-align: right; | ||||
line-height: 28px; | |||||
line-height: 26px; | |||||
} | } | ||||
.wait { | .wait { | ||||
@@ -17,7 +17,9 @@ Page({ | |||||
/** | /** | ||||
* 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
*/ | */ | ||||
onLoad: function(options) {}, | |||||
onLoad: function(options) { | |||||
}, | |||||
/** | /** | ||||
* 生命周期函数--监听页面初次渲染完成 | * 生命周期函数--监听页面初次渲染完成 | ||||