@@ -2,6 +2,7 @@ | |||
"pages": [ | |||
"pages/index/index", | |||
"pages/cartest/cartest", | |||
"pages/actdetail/actdetail", | |||
"pages/bannerdetail/index", | |||
"pages/getuserinfo/index", | |||
"pages/phoneinput/phoneinput", | |||
@@ -50,10 +51,11 @@ | |||
] | |||
}, | |||
"window": { | |||
"backgroundTextStyle": "light", | |||
"navigationBarBackgroundColor": "#fff", | |||
"backgroundTextStyle": "red", | |||
"navigationBarBackgroundColor": "#02C0FF", | |||
"navigationBarTitleText": "WeChat", | |||
"navigationBarTextStyle": "black" | |||
"navigationBarTextStyle": "white", | |||
"enablePullDownRefresh": true | |||
}, | |||
"networkTimeout": { | |||
"request": 10000, | |||
@@ -1,5 +1,6 @@ | |||
<view class='bannerbg'><image src='./../../assets/img/banner.png' mode="widthFix"></image></view> | |||
<view class="index-slide-view"> | |||
<swiper class="index-slide" bindchange="swiperChange" circular="true" autoplay="true" interval="3000" duration="500"> | |||
<swiper class="index-slide" bindchange="swiperChange" circular="false" duration="500"> | |||
<block wx:for="{{list}}" wx:key="unique"> | |||
<swiper-item> | |||
<image data-id="{{item.id}}" bindtap='gotobannerdetail' src="{{item.coverImg}}" class="index-slide-image" /> | |||
@@ -1,10 +1,26 @@ | |||
.index-slide-view{ | |||
position: relative; | |||
width: 710rpx; | |||
height: 260rpx; | |||
overflow: hidden; | |||
margin:-126rpx auto 0; | |||
border-radius:16rpx; | |||
z-index: 10000; | |||
/* box-shadow: 0px 10rpx 10rpx 0px rgba(0, 0, 0, 0.2); */ | |||
box-shadow: 0 5px 15px 0 rgba(0,0,0,.6); | |||
} | |||
.index-slide, | |||
swiper-item | |||
.index-slide-image { | |||
width: 100%; | |||
height: 465rpx; | |||
display: block; | |||
width: 710rpx; | |||
height: 260rpx; | |||
margin: 0 auto; | |||
border-radius:16rpx; | |||
overflow: hidden; | |||
position: relative; | |||
z-index: 100; | |||
} | |||
.index-slide-view .dots{ | |||
position: absolute; | |||
@@ -13,17 +29,27 @@ | |||
bottom: 20rpx; | |||
display: flex; | |||
justify-content: center; | |||
z-index: 10000; | |||
} | |||
.index-slide-view .dots .dot{ | |||
margin: 0 8rpx; | |||
width: 30rpx; | |||
height: 8rpx; | |||
width: 12rpx; | |||
height: 12rpx; | |||
background: #fff; | |||
border-radius: 100rpx; | |||
border-radius: 50%; | |||
transition: all .6s; | |||
opacity: 0.5; | |||
} | |||
.index-slide-view .dots .dot.active{ | |||
background: #FFFFFF; | |||
background: #02C0FF; | |||
width: 30rpx; | |||
height: 12rpx; | |||
border-radius:10rpx; | |||
opacity: 1; | |||
} | |||
.bannerbg{ | |||
width: 100%; | |||
} | |||
.bannerbg image{ | |||
display: block; | |||
width: 100%; | |||
} |
@@ -8,7 +8,8 @@ | |||
<view class="coupons-info-name tit">{{data.title}}</view> | |||
<view class="coupons-info-name subtitle">{{data.subTitle}}</view> | |||
<view class="coupons-info-price-p"> | |||
<text class="i">¥</text>{{data.salePriceStr}} | |||
<!-- <text class="i">¥</text> --> | |||
{{data.salePriceStr}} | |||
<view class="coupons-info-manjian" style="margin-top:10rpx;" wx:if="{{data.type == 1}}"> | |||
满¥{{data.usePriceStr}}可用 | |||
</view> | |||
@@ -20,14 +21,12 @@ | |||
</view> | |||
<view class="coupons-btn"> | |||
<!-- 优惠券价格 --> | |||
<view class="coupons-info-price"> | |||
<view class="coupons-info-name sy">剩余: {{data.remainInventory}}</view> | |||
<!-- <text class="coupons-info-price-o"><text class='i'>¥</text>{{data.priceStr}}</text> --> | |||
</view> | |||
<i-button i-class="coupons-btn-gm" wx:if="{{data.salePriceStr==0&&data.remainInventory!=0}}" data-date='{{data}}'>领取</i-button> | |||
<i-button i-class="coupons-btn-gm" wx:if="{{data.salePriceStr!=0&&data.remainInventory!=0}}" data-date='{{data}}'>购买</i-button> | |||
<i-button i-class="coupons-btn-gm" wx:if="{{data.salePriceStr==0&&data.remainInventory!=0}}" data-date='{{data}}'>免费领</i-button> | |||
<i-button i-class="coupons-btn-gm" wx:if="{{data.salePriceStr!=0&&data.remainInventory!=0}}" data-date='{{data}}'>马上购</i-button> | |||
<i-button i-class="coupons-btn-gms" wx:if="{{data.remainInventory==0}}" data-date='{{data}}'>已售罄</i-button> | |||
</view> | |||
<view class="coupons-info-name sy">剩余{{data.remainInventory}}</view> | |||
<view class="coupons-border"></view> | |||
</view> | |||
</navigator> |
@@ -19,16 +19,16 @@ | |||
} | |||
.coupons-img { | |||
width: 248rpx; | |||
height: 184rpx; | |||
overflow: hidden; | |||
width: 180rpx; | |||
height: 180rpx; | |||
border: 1px solid #f8f8f8; | |||
border-radius: 10rpx; | |||
} | |||
.coupons-img image { | |||
width: 100%; | |||
height: 100%; | |||
display: block; | |||
width: 180rpx; | |||
height: 180rpx; | |||
border-radius: 10rpx; | |||
} | |||
@@ -54,21 +54,21 @@ | |||
.coupons-info-price-p { | |||
display: inline-block; | |||
font-size: 36rpx; | |||
color: #f96563; | |||
line-height: 27rpx; | |||
font-weight: 600; | |||
font-size: 40rpx; | |||
color: #FF4949; | |||
line-height: 56rpx; | |||
} | |||
.tit { | |||
margin-top: 14rpx; | |||
overflow: hidden; | |||
white-space: nowrap; | |||
text-overflow: ellipsis; | |||
width: 300rpx; | |||
height: 40rpx; | |||
font-weight: 600; | |||
height: 42rpx; | |||
font-size: 30rpx; | |||
color: #000; | |||
letter-spacing: 0; | |||
font-family: PingFangSC-Medium; | |||
} | |||
.coupons-info-price-o { | |||
@@ -98,22 +98,22 @@ | |||
.coupons-btn { | |||
position: absolute; | |||
top: 40rpx; | |||
top: 83rpx; | |||
right: 30rpx; | |||
} | |||
.coupons-btn-gm { | |||
background: #00c0ff !important; | |||
border-radius: 10rpx !important; | |||
border-radius: 50rpx !important; | |||
margin: 0 !important; | |||
padding: 0 !important; | |||
font-family: PingFangSC-Semibold; | |||
font-size: 28rpx; | |||
font-size: 26rpx; | |||
color: #fff !important; | |||
letter-spacing: 0; | |||
height: 50rpx !important; | |||
width: 138rpx !important; | |||
line-height: 50rpx !important; | |||
height: 48rpx !important; | |||
width: 120rpx !important; | |||
line-height: 48rpx !important; | |||
} | |||
.coupons-btn-gms { | |||
@@ -123,39 +123,41 @@ | |||
margin: 0 !important; | |||
padding: 0 !important; | |||
font-family: PingFangSC-Semibold; | |||
font-size: 28rpx; | |||
font-size: 26rpx; | |||
color: #fff !important; | |||
letter-spacing: 0; | |||
height: 50rpx !important; | |||
width: 138rpx !important; | |||
line-height: 50rpx !important; | |||
height: 48rpx !important; | |||
width: 120rpx !important; | |||
line-height: 48rpx !important; | |||
} | |||
.subtitle { | |||
font-size: 24rpx; | |||
color: #6f6f6f; | |||
color: #919191; | |||
text-align: left; | |||
overflow: hidden; | |||
white-space: nowrap; | |||
text-overflow: ellipsis; | |||
width: 300rpx; | |||
height: 40rpx; | |||
margin-top: 8rpx; | |||
height: 33rpx; | |||
line-height: 33rpx; | |||
} | |||
.coupons-info-manjian { | |||
color: #6f6f6f !important; | |||
font-weight: normal; | |||
font-size: 20rpx; | |||
font-size: 24rpx; | |||
line-height: 34rpx; | |||
display: inline-block; | |||
color: #FF4949; | |||
letter-spacing: 0; | |||
} | |||
.coupons-info-manjian1 { | |||
color: #ccc !important; | |||
font-weight: normal; | |||
line-height: 28rpx; | |||
font-size: 20rpx; | |||
line-height: 20rpx; | |||
color: #919191; | |||
letter-spacing: 0; | |||
display: inline-block; | |||
overflow: hidden; | |||
white-space: nowrap; | |||
@@ -184,12 +186,12 @@ | |||
.sy { | |||
display: block; | |||
text-align: left; | |||
width: 136rpx; | |||
text-align: center; | |||
width: 181rpx; | |||
font-size: 24rpx; | |||
color: #6f6f6f; | |||
color: #999; | |||
height: 40rpx; | |||
margin-top: 8rpx; | |||
margin-top: 106rpx; | |||
} | |||
.usermotto { | |||
@@ -16,7 +16,7 @@ | |||
.i-tabs-tab-bar { | |||
display: block; | |||
width: 50%; | |||
height: 2px; | |||
height: 6rpx; | |||
background: 0 0; | |||
position: absolute; | |||
bottom: 0; | |||
@@ -29,7 +29,7 @@ | |||
font-size: 28rpx; | |||
text-align: center; | |||
box-sizing: border-box; | |||
color: #B8B8B8; | |||
color: #222222; | |||
} | |||
.i-tabs-tab-title-current { | |||
@@ -39,5 +39,5 @@ | |||
.i-tabs-tab-scroll { | |||
display: inline-block; | |||
width: auto; | |||
min-width: 60px; | |||
min-width: 70px; | |||
} |
@@ -30,7 +30,8 @@ | |||
display: block; | |||
overflow-x: auto; | |||
white-space: nowrap; | |||
box-shadow:0 0 2px 0 rgba(211,211,211,0.50); | |||
/* box-shadow:0 0 2px 0 rgba(211,211,211,0.50); */ | |||
border-bottom: 1rpx solid #eeeeee; | |||
} | |||
.i-tabs-fixed { | |||
@@ -0,0 +1,70 @@ | |||
// pages/actdetail/actdetail.js | |||
Page({ | |||
/** | |||
* 页面的初始数据 | |||
*/ | |||
data: { | |||
detail:'' | |||
}, | |||
/** | |||
* 生命周期函数--监听页面加载 | |||
*/ | |||
onLoad: function (options) { | |||
console.log(options) | |||
let that = this; | |||
that.setData({ | |||
detail:options.detail | |||
}) | |||
}, | |||
/** | |||
* 生命周期函数--监听页面初次渲染完成 | |||
*/ | |||
onReady: function () { | |||
}, | |||
/** | |||
* 生命周期函数--监听页面显示 | |||
*/ | |||
onShow: function () { | |||
}, | |||
/** | |||
* 生命周期函数--监听页面隐藏 | |||
*/ | |||
onHide: function () { | |||
}, | |||
/** | |||
* 生命周期函数--监听页面卸载 | |||
*/ | |||
onUnload: function () { | |||
}, | |||
/** | |||
* 页面相关事件处理函数--监听用户下拉动作 | |||
*/ | |||
onPullDownRefresh: function () { | |||
}, | |||
/** | |||
* 页面上拉触底事件的处理函数 | |||
*/ | |||
onReachBottom: function () { | |||
}, | |||
/** | |||
* 用户点击右上角分享 | |||
*/ | |||
onShareAppMessage: function () { | |||
} | |||
}) |
@@ -0,0 +1,3 @@ | |||
{ | |||
"navigationBarTitleText": "活动详情" | |||
} |
@@ -0,0 +1,4 @@ | |||
<view> | |||
<text>活动详情</text> | |||
<text>{{detail}}</text> | |||
</view> |
@@ -0,0 +1,15 @@ | |||
view text{ | |||
display: block; | |||
} | |||
view text:nth-of-type(1){ | |||
font-size: 30rpx; | |||
color: #000; | |||
padding: 30rpx 0; | |||
text-align: center; | |||
} | |||
view text:nth-of-type(2){ | |||
padding: 0 30rpx; | |||
font-size: 28rpx; | |||
line-height: 50rpx; | |||
color: #999; | |||
} |
@@ -24,7 +24,14 @@ Page({ | |||
that.setData({ | |||
data: res.data | |||
}); | |||
console.log(that.data.data) | |||
console.log(that.data.data); | |||
}); | |||
}, | |||
gotoactdetail:function(){ | |||
let that = this; | |||
console.log("99999"); | |||
wx.navigateTo({ | |||
url: `/pages/actdetail/actdetail?detail=${that.data.data.detail}`, | |||
}) | |||
} | |||
}); |
@@ -3,14 +3,14 @@ | |||
<view class="coupons-body"> | |||
<view class='banner'> | |||
<image src='{{data.coverImg}}' mode="widthFix"></image> | |||
<text bindtap='gotoactdetail'>活动详情</text> | |||
</view> | |||
<view class='coupons_info'> | |||
<!-- <view class='coupons_info'> | |||
<view> | |||
<text>{{data.title}}</text> | |||
<text>{{data.subTitle}}</text> | |||
<!-- <text>剩余时间:<text>{{day}}天</text><text>{{hour}}小时</text><text>{{minute}}分钟</text></text> --> | |||
</view> | |||
</view> | |||
</view> --> | |||
<!-- <view class='posi'> | |||
<view class='posi_logo'> | |||
@@ -23,7 +23,7 @@ | |||
</view> | |||
</view> | |||
</view> --> | |||
<view class='notes'> | |||
<view class='notes' style='display:none;'> | |||
<view> | |||
<text>活动详情</text> | |||
</view> | |||
@@ -36,36 +36,38 @@ | |||
<button bindtap='orderFunc' class='buy'>立即购买</button> | |||
</view> --> | |||
<!-- 优惠券 --> | |||
<navigator wx:for="{{data.coupons}}" wx:key="{{index}}" url="/pages/coupon/detail/index?couponChannelId={{item.id}}&couponId={{item.couponId}}"> | |||
<!-- 首页优惠券列表页面 --> | |||
<view class="coupons1"> | |||
<view class="coupons1-img"> | |||
<image src="{{item.coverImg}}"></image> | |||
</view> | |||
<view class="coupons1-info"> | |||
<view class="coupons1-info-name tit">{{item.title}}</view> | |||
<view class="coupons1-info-name subtitle">{{item.subTitle}}</view> | |||
<view class="coupons1-info-price-p"> | |||
<text class="i">¥</text>{{item.salePriceStr}} | |||
<view class="coupons-info-manjian" style="margin-top:10rpx;" wx:if="{{data.type == 1}}"> | |||
满¥{{item.usePriceStr}}可用 | |||
</view> | |||
<view class="coupons-info-manjian" wx:elif="{{data.type == 2||data.type == 3||data.type==4||data.type==5}}"> | |||
仅限本店使用 | |||
<view class='contain'> | |||
<!-- 优惠券 --> | |||
<navigator wx:for="{{data.coupons}}" wx:key="{{index}}" url="/pages/coupon/detail/index?couponChannelId={{item.id}}&couponId={{item.couponId}}"> | |||
<!-- 首页优惠券列表页面 --> | |||
<view class="coupons1"> | |||
<view class="coupons1-img"> | |||
<image src="{{item.coverImg}}"></image> | |||
</view> | |||
<view class="coupons1-info"> | |||
<view class="coupons1-info-name tit">{{item.title}}</view> | |||
<view class="coupons1-info-name subtitle">{{item.subTitle}}</view> | |||
<view class="coupons1-info-price-p"> | |||
<text class="i">¥</text>{{item.salePriceStr}} | |||
<view class="coupons-info-manjian" style="margin-top:10rpx;" wx:if="{{data.type == 1}}"> | |||
满¥{{item.usePriceStr}}可用 | |||
</view> | |||
<view class="coupons-info-manjian" wx:elif="{{data.type == 2||data.type == 3||data.type==4||data.type==5}}"> | |||
仅限本店使用 | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="coupons1-btn"> | |||
<!-- 优惠券价格 --> | |||
<view class="coupons1-info-price"> | |||
<view class="coupons1-info-name subtitle sy">剩余: {{item.remainInventory}}</view> | |||
<!-- <text class="coupons-info-price-o"><text class='i'>¥</text>{{item.priceStr}}</text> --> | |||
<view class="coupons1-btn"> | |||
<!-- 优惠券价格 --> | |||
<i-button class="buy" wx:if="{{item.salePriceStr==0}}" data-date='{{data}}'>免费领</i-button> | |||
<i-button class="buy" wx:elif="{{item.salePriceStr!=0}}" data-date='{{data}}'>马上购</i-button> | |||
<view class="coupons1-info-price"> | |||
<view class="coupons1-info-name subtitle sy">剩余{{item.remainInventory}}</view> | |||
<!-- <text class="coupons-info-price-o"><text class='i'>¥</text>{{item.priceStr}}</text> --> | |||
</view> | |||
</view> | |||
<i-button class="buy" wx:if="{{item.salePriceStr==0}}" data-date='{{data}}'>领取</i-button> | |||
<i-button class="buy" wx:elif="{{item.salePriceStr!=0}}" data-date='{{data}}'>购买</i-button> | |||
<!-- <view class="coupons1-border"></view> --> | |||
</view> | |||
<view class="coupons1-border"></view> | |||
</view> | |||
</navigator> | |||
</navigator> | |||
</view> | |||
</view> |
@@ -1,10 +1,13 @@ | |||
@import "../../app.wxss"; | |||
page { | |||
background: #f5f5f5; | |||
} | |||
.coupons { | |||
width: 100%; | |||
background: #f6f6f6; | |||
background: #fff; | |||
position: relative; | |||
overflow: hidden; | |||
} | |||
.coupons-body { | |||
@@ -13,7 +16,10 @@ | |||
} | |||
.banner { | |||
width: 100%; | |||
position: relative; | |||
width: 750rpx; | |||
height: 280rpx; | |||
overflow: hidden; | |||
} | |||
.banner image { | |||
@@ -21,6 +27,25 @@ | |||
display: block; | |||
} | |||
.banner text { | |||
position: absolute; | |||
right: 0; | |||
top: 0; | |||
bottom: 0; | |||
margin: auto; | |||
width: 122rpx; | |||
height: 48rpx; | |||
line-height: 48rpx; | |||
opacity: 0.8; | |||
background: #000; | |||
font-size: 24rpx; | |||
color: #FFFFFF; | |||
letter-spacing: 0; | |||
text-indent: .5em; | |||
border-top-left-radius: 50rpx; | |||
border-bottom-left-radius: 50rpx; | |||
} | |||
.coupons_info { | |||
width: 92%; | |||
height: 120rpx; | |||
@@ -37,6 +62,7 @@ | |||
.coupons_info view:nth-child(1) text { | |||
font-size: 30rpx; | |||
line-height: 32rpx; | |||
margin-top: 10%; | |||
} | |||
@@ -77,6 +103,17 @@ | |||
padding-top: 4rpx; | |||
} | |||
navigator { | |||
display: block; | |||
padding: 0 24rpx 0; | |||
margin-bottom: 24rpx; | |||
} | |||
.contain { | |||
background: #f5f5f5; | |||
padding-top: 24rpx; | |||
} | |||
.posi { | |||
width: 92%; | |||
display: flex; | |||
@@ -162,7 +199,7 @@ | |||
height: auto; | |||
padding: 0 4% 4%; | |||
background: #fff; | |||
border-bottom: 1rpx solid #f5f5f5; | |||
/* border-bottom: 1rpx solid #f5f5f5; */ | |||
display: flex; | |||
flex-direction: column; | |||
} | |||
@@ -170,7 +207,7 @@ | |||
.notes view:nth-child(2)>text { | |||
font-size: 28rpx; | |||
color: #a9a9a9; | |||
line-height: 56rpx; | |||
line-height: 45rpx; | |||
} | |||
.spot { | |||
@@ -204,7 +241,7 @@ | |||
font-size: 28rpx; | |||
line-height: 50rpx; | |||
text-align: center; | |||
border-radius: 6rpx; | |||
border-radius: 50rpx; | |||
} | |||
.coupons1-btn-gm { | |||
@@ -224,30 +261,32 @@ | |||
.coupons1 { | |||
flex-direction: row; | |||
display: flex; | |||
padding: 30rpx; | |||
padding: 24rpx; | |||
position: relative; | |||
height: 184rpx; | |||
border: 1px solid #eee; | |||
height: 152rpx; | |||
background: #fff; | |||
border-radius: 16rpx; | |||
box-shadow: 0 5px 15px 0 rgba(0, 0, 0, 0.3); | |||
} | |||
.coupons1-border { | |||
/* .coupons1-border { | |||
height: 1rpx; | |||
/* width: 100%; */ | |||
left: 30rpx; | |||
right: 30rpx; | |||
background: #f5f5f5; | |||
position: absolute; | |||
bottom: 0; | |||
} | |||
} */ | |||
.coupons1-img { | |||
width: 248rpx; | |||
height: 184rpx; | |||
width: 160rpx; | |||
height: 160rpx; | |||
overflow: hidden; | |||
border-radius: 10rpx; | |||
} | |||
.coupons1-img image { | |||
display: block; | |||
width: 100%; | |||
height: 100%; | |||
} | |||
@@ -263,10 +302,6 @@ | |||
line-height: 38rpx; | |||
} | |||
.coupons1-info-price { | |||
padding: 32rpx 0 0; | |||
} | |||
.i { | |||
font-size: 20rpx; | |||
font-style: normal; | |||
@@ -280,7 +315,9 @@ | |||
} | |||
.tit { | |||
margin-top: 32rpx; | |||
font-size: 28rpx; | |||
color: #000; | |||
letter-spacing: 0; | |||
} | |||
.coupons1-info-price-o { | |||
@@ -311,7 +348,7 @@ | |||
.coupons1-btn { | |||
position: absolute; | |||
width: 120rpx; | |||
top: 40rpx; | |||
top: 61rpx; | |||
right: 30rpx; | |||
} | |||
@@ -330,15 +367,16 @@ | |||
} | |||
.subtitle { | |||
font-size: 22rpx; | |||
color: #333; | |||
font-size: 24rpx; | |||
font-weight: 100; | |||
text-align: left; | |||
overflow: hidden; | |||
white-space: nowrap; | |||
text-overflow: ellipsis; | |||
width: 300rpx; | |||
height: 40rpx; | |||
height: 33rpx; | |||
color: #919191; | |||
letter-spacing: 0; | |||
} | |||
.coupons1-info-manjian { | |||
@@ -370,7 +408,8 @@ | |||
.sy { | |||
display: block; | |||
text-align: center; | |||
width: 120rpx!important; | |||
width: 120rpx !important; | |||
margin-top: 6rpx; | |||
} | |||
.usermotto { | |||
@@ -1,3 +1,6 @@ | |||
<view class="con"> | |||
<image src="./../../assets/img/qidai.png" mode="widthFix"></image> | |||
<image class="img" src="./../../assets/img/qidai.png" mode="widthFix"></image> | |||
<text class="txt1">正在疯狂开发中</text> | |||
<text class="txt2">更好用的体验即将到来 | |||
请敬请期待</text> | |||
</view> |
@@ -1,17 +1,28 @@ | |||
.con{ | |||
position: absolute; | |||
left: 0; | |||
right: 0; | |||
top: 0; | |||
bottom: 0; | |||
page { | |||
height: 100%; | |||
overflow:hidden; | |||
} | |||
.img { | |||
display: block; | |||
width: 300rpx; | |||
height: 300rpx; | |||
margin: 168rpx auto 0; | |||
} | |||
.txt1 { | |||
display: block; | |||
font-size: 34rpx; | |||
color: #333; | |||
letter-spacing: 0; | |||
text-align: center; | |||
} | |||
.txt2 { | |||
display: block; | |||
font-size: 28rpx; | |||
color: #999; | |||
letter-spacing: 0; | |||
text-align: center; | |||
line-height: 40rpx; | |||
margin-top: 10rpx; | |||
} | |||
.con image{ | |||
position: absolute; | |||
width: 400rpx; | |||
height: 400rpx; | |||
left: 0; | |||
right: 0; | |||
top: 0rpx; | |||
bottom: 0; | |||
margin: auto; | |||
} |
@@ -309,7 +309,6 @@ Page({ | |||
that.payOrderUpdate(that.data.orderId, payOrderId, 1); // 支付成功 | |||
console.log(res); | |||
if (res.errMsg == "requestPayment:ok") { | |||
wx.showToast({ | |||
title: "购买成功", | |||
image: "./../../../assets/img/success.png", | |||
@@ -317,6 +316,9 @@ Page({ | |||
mask: false, | |||
success: function () { | |||
setTimeout(function () { | |||
wx.hideLoading(); | |||
}, 1600); | |||
setTimeout(() => { | |||
wx.navigateTo({ | |||
url: `/pages/order/detail/index?orderId=${ | |||
that.data.orderId | |||
@@ -139,6 +139,7 @@ | |||
font-size: 24rpx; | |||
color: #b8b8b8; | |||
padding-top: 10rpx; | |||
width:450rpx; | |||
} | |||
.notes { | |||
@@ -175,16 +176,7 @@ | |||
line-height: 45rpx; | |||
} | |||
.spot { | |||
width: 12rpx; | |||
height: 12rpx; | |||
display: inline-block; | |||
background: #a9a9a9; | |||
margin-right: 16rpx; | |||
position: relative; | |||
bottom: 4rpx; | |||
border-radius: 50%; | |||
} | |||
.buy-view { | |||
background: #fff; | |||
@@ -81,7 +81,7 @@ Page({ | |||
loading: false | |||
}); | |||
}, 1400); | |||
if (pageNum >= res.data.pages) { | |||
if (pageNum > res.data.pages) { | |||
that.setData({ | |||
allow_load: false | |||
}); | |||
@@ -105,7 +105,7 @@ Page({ | |||
console.log("加载完成allow_load设置成false"); | |||
that.setData({ | |||
loading: true, | |||
content: "^_^再拉裤子就掉啦ʅ(´◔౪◔)ʃ" | |||
content: "——— 在拉裤子就掉了啦 ———" | |||
}); | |||
setTimeout(function() { | |||
that.setData({ | |||
@@ -5,26 +5,16 @@ Page({ | |||
data: { | |||
canIUse: wx.canIUse("button.open-type.getPhoneNumber"), | |||
couponChannelId: "", | |||
couponId: "", | |||
flag:0 | |||
couponId: "" | |||
}, | |||
onLoad: function (options) { | |||
onLoad: function(options) { | |||
var that = this; | |||
console.log(options); | |||
if (JSON.stringify(options)=='{}'){ | |||
console.log("null"), | |||
that.setData({ | |||
flag:0 | |||
}) | |||
} | |||
if (JSON.stringify(options)!='{}') { | |||
console.log("bushi null"); | |||
that.setData({ | |||
couponChannelId: options.couponChannelId, | |||
couponId: options.couponId, | |||
flag:1 | |||
}); | |||
} | |||
that.setData({ | |||
couponChannelId: options.couponChannelId, | |||
couponId: options.couponId | |||
}); | |||
Http.get({ | |||
url: config.api.marketicon, | |||
data: { | |||
@@ -37,7 +27,7 @@ Page({ | |||
}); | |||
}); | |||
}, | |||
getPhoneNumber: function (e) { | |||
getPhoneNumber: function(e) { | |||
var that = this; | |||
var iv = e.detail.iv; | |||
var encryptedData = e.detail.encryptedData; | |||
@@ -48,33 +38,29 @@ Page({ | |||
iv: iv | |||
} | |||
}).then( | |||
function (res) { | |||
function(res) { | |||
console.log(res); | |||
console.log("这是用户授权手机号的结果"); | |||
console.log(that.data.couponChannelId); | |||
console.log(that.data.couponId); | |||
console.log("这是从立即支付传回来的值 因为用户没有授权手机号"); | |||
app.globalData.phone = res.data.phone; | |||
if(that.data.flag == 0){ | |||
wx.switchTab({ | |||
url: '/pages/passCar/passCar', | |||
}) | |||
}else{ | |||
wx.showToast({ | |||
title: res.data.msg, | |||
icon: "success", | |||
success: function (res) { | |||
wx.redirectTo({ | |||
url: | |||
"/pages/coupon/detail/index?couponChannelId=" + | |||
that.data.couponChannelId + | |||
"&couponId=" + | |||
that.data.couponId + | |||
"&flag=pay" | |||
}); | |||
} | |||
}); | |||
} | |||
wx.showToast({ | |||
title: res.data.msg, | |||
icon: "success", | |||
success: function(res) { | |||
wx.redirectTo({ | |||
url: | |||
"/pages/coupon/detail/index?couponChannelId=" + | |||
that.data.couponChannelId + | |||
"&couponId=" + | |||
that.data.couponId + | |||
"&flag=pay" | |||
}); | |||
} | |||
}); | |||
}, | |||
function (error) { | |||
function(error) { | |||
wx.showToast({ | |||
title: "请重新授权手机号", | |||
icon: "none" | |||
@@ -17,7 +17,7 @@ Component({ | |||
list: [], | |||
flag: "", | |||
loading: true, //"上拉加载"的变量,默认false,隐藏 | |||
content:"", | |||
content: "", | |||
return_list: [], | |||
current: 0, | |||
current_scroll: 0, | |||
@@ -30,13 +30,17 @@ Component({ | |||
* 组件的方法列表 | |||
*/ | |||
methods: { | |||
handleChange({ detail }) { | |||
handleChange({ | |||
detail | |||
}) { | |||
this.setData({ | |||
current: detail.key | |||
}); | |||
}, | |||
handleChangeScroll({ detail }) { | |||
handleChangeScroll({ | |||
detail | |||
}) { | |||
let that = this; | |||
// 切换tab时重新初始化下list 和 allow_load | |||
@@ -65,8 +69,8 @@ Component({ | |||
// 券list获取 | |||
if (that.data.allow_load) { | |||
that.setData({ | |||
loading:true, | |||
content:'小主,我在玩命加载中...' | |||
loading: true, | |||
content: '小主,我在玩命加载中...' | |||
}) | |||
// 根据 key == 0 区分全部或其它tab,决定是否传参数 business | |||
if (key == 0) { | |||
@@ -94,36 +98,42 @@ Component({ | |||
*/ | |||
if (pageNum >= res.data.pages) { | |||
that.setData({ | |||
allow_load: false | |||
allow_load: false, | |||
loading: true, | |||
content: "——— 在拉裤子就掉了啦 ———" | |||
}); | |||
console.log("我已经加载完毕") | |||
} | |||
/** | |||
* 先赋值后渲染页面 | |||
* concat 不会改变原数组值 | |||
* push 会改变原数组值,但不会一条一条插入,而是整个数组插入 | |||
*/ | |||
that.data.list = that.data.list.concat(res.data.list); | |||
that.setData({ | |||
list: that.data.list | |||
}); | |||
console.log(pageNum); | |||
if(pageNum ==1){ | |||
that.setData({ | |||
list: [] | |||
}) | |||
} | |||
var tmpArr = that.data.list; | |||
tmpArr.push.apply(tmpArr,res.data.list); | |||
that.setData({ | |||
list: tmpArr | |||
}) | |||
console.log(tmpArr); | |||
}); | |||
setTimeout(function() { | |||
setTimeout(function () { | |||
that.setData({ | |||
loading:false, | |||
loading: false, | |||
}) | |||
}, 1400); | |||
} else { | |||
console.info("allow_load==false 已禁止加载"); | |||
that.setData({ | |||
loading:true, | |||
content:"^_^再拉裤子就掉啦ʅ(´◔౪◔)ʃ" | |||
loading: true, | |||
content: "——— 在拉裤子就掉了啦 ———" | |||
}) | |||
setTimeout(function(){ | |||
setTimeout(function () { | |||
that.setData({ | |||
loading:false, | |||
loading: false, | |||
}) | |||
},1400) | |||
}, 1400) | |||
} | |||
}; | |||
@@ -153,6 +163,9 @@ Component({ | |||
if (app.globalData.token && app.globalData.token != null) { | |||
app.businessListCallback(app.globalData.token); | |||
} | |||
that.setData({ | |||
list:[] | |||
}) | |||
that.getList(0, 1); | |||
} | |||
}); | |||
}); |
@@ -22,7 +22,22 @@ Page({ | |||
var scene = decodeURIComponent(options.scene); | |||
app.getLocation(); | |||
}, | |||
/** | |||
* 下拉刷新 | |||
*/ | |||
onPullDownRefresh: function (e) { | |||
let that = this; | |||
that.userLogin(); | |||
console.log(this.data.code); | |||
if (that.data.code == 0 || that.data.code == undefined) { | |||
that.selectComponent("#lists").getList(0, 1); | |||
wx.stopPullDownRefresh(); | |||
console.log("下拉刷新"); | |||
} else { | |||
that.selectComponent("#lists").getList(that.data.code, 1); | |||
wx.stopPullDownRefresh(); | |||
}; | |||
}, | |||
onShow: function () { | |||
this.userLogin(); | |||
}, | |||
@@ -116,7 +131,6 @@ Page({ | |||
that.setData({ | |||
list: res.data.list | |||
}); | |||
console.log(res.data.list); | |||
}); | |||
}, | |||
@@ -183,12 +197,11 @@ Page({ | |||
//下拉加载更多 | |||
onReachBottom: function () { | |||
let that = this; | |||
console.info("before++ " + that.data.page); | |||
that.data.page++; | |||
console.info("after++ " + that.data.page); | |||
that.setData({ | |||
page: that.data.page | |||
}); | |||
console.log("我是第"+that.data.page+"几页") | |||
//父组件获得子组件的方法 | |||
//如果code == 0 | |||
if (that.data.code == 0 || that.data.code == undefined) { | |||
@@ -4,10 +4,8 @@ | |||
"c-rushToBuy": "./rushToBuy/index", | |||
"c-coupons": "./coupons/index" | |||
}, | |||
"enablePullDownRefresh": false, | |||
"navigationBarBackgroundColor": "#ffffff", | |||
"navigationBarTextStyle": "black", | |||
"navigationBarTitleText": "首页", | |||
"backgroundColor": "#eeeeee", | |||
"backgroundTextStyle": "light" | |||
"window": { | |||
"enablePullDownRefresh": true | |||
} | |||
} |
@@ -12,7 +12,8 @@ Component({ | |||
* 组件的初始数据 | |||
*/ | |||
data: { | |||
list: [] | |||
list: [], | |||
total:'' | |||
}, | |||
/** | |||
@@ -50,7 +51,8 @@ Component({ | |||
}).then(res => { | |||
console.log(res); | |||
this.setData({ | |||
list: res.data.list | |||
list: res.data.list, | |||
total:res.data.total | |||
}); | |||
}); | |||
}; | |||
@@ -1,5 +1,5 @@ | |||
<view class="index-rushToBuy"> | |||
<view wx:if="{{list.length!=0}}" class="index-rushToBuy-title">限时抢购<text bindtap="gotomore" wx:if="{{list.length>=5}}">查看更多</text></view> | |||
<view wx:if="{{list.length!=0}}" class="index-rushToBuy-title">限时抢购<text bindtap="gotomore" wx:if="{{total>5}}">查看更多</text><image wx:if="{{total>5}}" src='./../../../assets/img/jian.png' mode="widthFix"></image></view> | |||
<scroll-view scroll-x class="index-scroll-view"> | |||
<view class="commodity" wx:for="{{list}}" wx:key="unique"> | |||
<view bindtap="gotodetail" data-couponChannelId="{{item.id}}" data-couponId="{{item.couponId}}" data-targetAd="{{item.targetAd}}"> | |||
@@ -4,18 +4,26 @@ | |||
} | |||
.index-rushToBuy-title { | |||
font-size: 32rpx; | |||
position: relative; | |||
font-size: 34rpx; | |||
color: #000000; | |||
letter-spacing: 0.75rpx; | |||
padding-top: 20rpx; | |||
letter-spacing: 1.16rpx; | |||
padding-top: 34rpx; | |||
padding-left: 30rpx; | |||
} | |||
.index-rushToBuy-title text{ | |||
float: right; | |||
margin-right: 20rpx; | |||
margin-right: 53rpx; | |||
color: #a8adb4; | |||
font-size: 26rpx; | |||
font-size: 28rpx; | |||
margin-top: 8rpx; | |||
} | |||
.index-rushToBuy-title image{ | |||
position: absolute; | |||
right: 18rpx; | |||
width: 20px; | |||
top: 44rpx; | |||
} | |||
.index-scroll-view { | |||
width: 100%; | |||
@@ -24,7 +32,7 @@ | |||
.index-scroll-view .commodity { | |||
display: inline-block; | |||
margin: 30rpx; | |||
margin: 16rpx 30rpx 30rpx; | |||
margin-right: 0; | |||
overflow: hidden; | |||
position: relative; | |||
@@ -44,7 +52,7 @@ display: block; | |||
} | |||
.index-scroll-view .commodity-info { | |||
padding:5rpx 20rpx; | |||
padding:10rpx 20rpx; | |||
overflow: hidden; | |||
} | |||
@@ -52,6 +60,7 @@ display: block; | |||
font-size: 30rpx; | |||
color: #000000; | |||
letter-spacing: 0.7rpx; | |||
overflow: hidden; | |||
} | |||
.index-scroll-view .commodity-info-time { | |||
@@ -64,6 +73,7 @@ display: block; | |||
.index-scroll-view .commodity-info-price-p { | |||
font-size: 30rpx; | |||
color: #f96563; | |||
line-height: 36rpx; | |||
} | |||
.index-scroll-view .commodity-info-price-o { | |||
display: inline-block; | |||
@@ -72,7 +82,9 @@ display: block; | |||
color: #B4B4B4; | |||
letter-spacing: 0.96rpx; | |||
text-decoration:line-through; | |||
line-height: 36rpx; | |||
} | |||
.commodity-info-price{ | |||
line-height: 36rpx; | |||
} | |||
@@ -134,7 +134,7 @@ Page({ | |||
wx.hideLoading(); | |||
}, 1600); | |||
setTimeout(() => { | |||
wx.redirectTo({ | |||
wx.navigateTo({ | |||
url: `/pages/order/detail/index?orderId=${ | |||
that.data.orderId | |||
}` | |||
@@ -72,7 +72,7 @@ Page({ | |||
data: variable | |||
}).then(res => { | |||
console.log(res); | |||
if (pageNum >= res.data.pages) { | |||
if (pageNum > res.data.pages) { | |||
that.setData({ | |||
allow_load: false | |||
}); | |||
@@ -106,7 +106,7 @@ Page({ | |||
console.log("加载完成allow_load设置成false"); | |||
that.setData({ | |||
loading: true, | |||
content: "^_^再拉裤子就掉啦ʅ(´◔౪◔)ʃ" | |||
ccontent: "——— 在拉裤子就掉了啦 ———" | |||
}) | |||
setTimeout(function () { | |||
that.setData({ | |||
@@ -79,7 +79,7 @@ Page({ | |||
setTimeout(function () { | |||
wx.hideLoading(); | |||
}, 1200); | |||
if (pageNum >= res.data.pages) { | |||
if (pageNum > res.data.pages) { | |||
that.setData({ | |||
allow_load: false | |||
}); | |||
@@ -3,5 +3,5 @@ | |||
"i-tab": "../../../dist/tab/index", | |||
"i-tabs": "../../../dist/tabs/index" | |||
}, | |||
"navigationBarTitleText": "我的优惠劵" | |||
"navigationBarTitleText": "停车券" | |||
} |
@@ -23,47 +23,25 @@ Page({ | |||
dataFontWeight: fontWeight | |||
}); | |||
}, | |||
onLoad: function(options) { | |||
var that = this; | |||
that.getList(); | |||
}, | |||
onShow: function(options) { | |||
var that = this; | |||
that.initPark(); | |||
Http.post({ | |||
url: config.api.checkPhoneStatus, | |||
data: {} | |||
}) | |||
.then(res => { | |||
console.log(res); | |||
that.init(); | |||
that.getList(); | |||
if (that.data.addCar) { | |||
// 绑车牌 | |||
if (app.globalData.carLogin) { | |||
that.bindCar(that.data.addCar); | |||
} else { | |||
that.bindCar(that.data.addCar); | |||
} | |||
that.setData({ | |||
addCar: null | |||
}); | |||
} | |||
}) | |||
.catch(err => { | |||
console.log(err); | |||
console.log("我即将要跳转到用户手机号授权的页面"); | |||
if (err.code == 11005) { | |||
// 用户手机未授权 | |||
/** | |||
* 将值传到用户手机号授权的页面 | |||
* | |||
*/ | |||
wx.navigateTo({ | |||
url: "/pages/getphoneInfo/index"}); | |||
} | |||
if (err.code == 11006) { | |||
// 用户手机已加密 | |||
wx.navigateTo({ | |||
url: "/pages/phoneinput/phoneinput"}); | |||
} | |||
console.log("车牌号"); | |||
if (that.data.addCar) { | |||
// 绑车牌 | |||
if (app.globalData.carLogin) { | |||
that.bindCar(that.data.addCar); | |||
} else { | |||
that.bindCar(that.data.addCar); | |||
} | |||
that.setData({ | |||
addCar: null | |||
}); | |||
} | |||
}, | |||
//我的停车券的显示与消失 | |||
showquan: function() { | |||
@@ -105,9 +83,9 @@ Page({ | |||
} | |||
var etcpData = { | |||
etcpToken: app.globalData.etcpToken, | |||
carNumber: that.data.payList[0].carNumber ? | |||
that.data.payList[0].carNumber : | |||
"", | |||
carNumber: that.data.payList[0].carNumber | |||
? that.data.payList[0].carNumber | |||
: "", | |||
couponOrderId: that.data.couponList[0].id | |||
}; | |||
console.log(etcpData); | |||
@@ -118,9 +96,9 @@ Page({ | |||
var postCouponData = app.globalData.parkVendor == 1 ? etcpData : tjdData; | |||
Http.post({ | |||
url: config.api.getCarCoupon, | |||
data: postCouponData | |||
}) | |||
url: config.api.getCarCoupon, | |||
data: postCouponData | |||
}) | |||
.then(res => { | |||
that.setData({ | |||
flag: "1" | |||
@@ -161,6 +139,7 @@ Page({ | |||
couponOrderStatus: 0 | |||
} | |||
}).then(res => { | |||
that.init(); | |||
that.setData({ | |||
couponList: res.data.list | |||
}); | |||
@@ -182,9 +161,9 @@ Page({ | |||
}; | |||
var postData = app.globalData.parkVendor == 1 ? etcpData : tjdData; | |||
Http.post({ | |||
url: config.api.bindCar, | |||
data: postData | |||
}) | |||
url: config.api.bindCar, | |||
data: postData | |||
}) | |||
.then(res => { | |||
console.log(res); | |||
that.setData({ | |||
@@ -203,7 +182,7 @@ Page({ | |||
wx.showModal({ | |||
title: "提示", | |||
showCancel: false, | |||
content: error.message, | |||
content: error.data.message, | |||
success: function() {} | |||
}); | |||
}); | |||
@@ -211,18 +190,18 @@ Page({ | |||
unbindCar: function(carNum) { | |||
var that = this; | |||
var postData = | |||
app.globalData.parkVendor == 1 ? | |||
{ | |||
etcpToken: app.globalData.etcpToken, | |||
carNumber: carNum | |||
} : | |||
{ | |||
carNumber: carNum | |||
}; | |||
app.globalData.parkVendor == 1 | |||
? { | |||
etcpToken: app.globalData.etcpToken, | |||
carNumber: carNum | |||
} | |||
: { | |||
carNumber: carNum | |||
}; | |||
Http.post({ | |||
url: config.api.unbindCar, | |||
data: postData | |||
}) | |||
url: config.api.unbindCar, | |||
data: postData | |||
}) | |||
.then(res => { | |||
console.log(res); | |||
that.initUsrCarList(); | |||
@@ -251,39 +230,35 @@ Page({ | |||
getStopFeeItem: function(carItem, i) { | |||
var that = this; | |||
var postData = | |||
app.globalData.parkVendor == 1 ? | |||
{ | |||
etcpToken: app.globalData.etcpToken, | |||
carNumber: carItem.carNumber | |||
} : | |||
{ | |||
carNumber: carItem.carNumber, | |||
outCarId: carItem.outCarId | |||
}; | |||
app.globalData.parkVendor == 1 | |||
? { | |||
etcpToken: app.globalData.etcpToken, | |||
carNumber: carItem.carNumber | |||
} | |||
: { | |||
carNumber: carItem.carNumber, | |||
outCarId: carItem.outCarId | |||
}; | |||
var stopFee = "carList[" + i + "].stopFee"; | |||
var extraData = "carList[" + i + "].extraData"; | |||
console.log(extraData); | |||
var extraDataStr = { | |||
params: { | |||
CarNumber: carItem.carNumber | |||
} | |||
}; | |||
var extraDataStr = { params: { CarNumber: carItem.carNumber } }; | |||
that.setData({ | |||
extraData: extraDataStr | |||
}); | |||
Http.post({ | |||
url: config.api.getCarStopFee, | |||
data: postData | |||
}) | |||
url: config.api.getCarStopFee, | |||
data: postData | |||
}) | |||
.then(res => { | |||
/** | |||
* 停车费用 | |||
*/ | |||
that.setData({ | |||
[stopFee]: res.data, | |||
[extraData]: extraDataStr, | |||
buttonBox: res.data.parkingFee | |||
}), | |||
[stopFee]: res.data, | |||
[extraData]: extraDataStr, | |||
buttonBox: res.data.parkingFee | |||
}), | |||
console.log("res>>>" + JSON.stringify(that.data.buttonBox)); | |||
}) | |||
.catch(error => { | |||
@@ -321,16 +296,14 @@ Page({ | |||
that.setData({ | |||
carList: res.data | |||
}); | |||
console.log("initUsrCarList",JSON.stringify(that.data.carList)); | |||
if (that.data.carList.length > 0) | |||
that.getStopFee(); | |||
console.log("aaaa" + JSON.stringify(that.data.carList)); | |||
}); | |||
}, | |||
init: function() { | |||
var that = this; | |||
app.parkInitCallback = token => { | |||
// 获取 用户车牌 | |||
that.initPark(); | |||
that.initUsrCarList(); | |||
if (!app.globalData.carLogin) { | |||
// 共同登录 | |||
@@ -346,12 +319,8 @@ Page({ | |||
app.globalData.etcpToken = res.data.token; | |||
console.log("etcpToken", app.globalData.etcpToken); | |||
} | |||
// 获取 用户车牌 | |||
if(that.data.carList.length == 0) | |||
that.initUsrCarList(); | |||
// 获取 停车费 | |||
if (that.data.carList.length > 0) | |||
that.getStopFee(); | |||
that.getStopFee(); | |||
}); | |||
} | |||
}; | |||
@@ -359,4 +328,4 @@ Page({ | |||
app.parkInitCallback(app.globalData.token); | |||
} | |||
} | |||
}); | |||
}); |
@@ -1,5 +1,5 @@ | |||
{ | |||
"component": true, | |||
"usingComponents": {}, | |||
"navigationBarTitleText": "停车" | |||
"navigationBarTitleText": "车辆管理" | |||
} |
@@ -94,7 +94,7 @@ Page({ | |||
console.info("allow_load==false 已禁止加载"); | |||
that.setData({ | |||
loading:true, | |||
content:"^_^再拉裤子就掉啦ʅ(´◔౪◔)ʃ" | |||
content: "——— 在拉裤子就掉了啦 ———" | |||
}) | |||
setTimeout(function(){ | |||
that.setData({ | |||
@@ -4,7 +4,7 @@ | |||
"ignore": [] | |||
}, | |||
"setting": { | |||
"urlCheck": true, | |||
"urlCheck": false, | |||
"es6": true, | |||
"postcss": true, | |||
"minified": true, | |||