diff --git a/app.json b/app.json
index 730c880..e4e3850 100644
--- a/app.json
+++ b/app.json
@@ -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,
diff --git a/assets/img/banner.png b/assets/img/banner.png
new file mode 100644
index 0000000..1d1c837
Binary files /dev/null and b/assets/img/banner.png differ
diff --git a/assets/img/home-n.png b/assets/img/home-n.png
index d6b8e32..8eabafe 100644
Binary files a/assets/img/home-n.png and b/assets/img/home-n.png differ
diff --git a/assets/img/home-y.png b/assets/img/home-y.png
index 38dfacd..dbe9b25 100644
Binary files a/assets/img/home-y.png and b/assets/img/home-y.png differ
diff --git a/assets/img/jian.png b/assets/img/jian.png
new file mode 100644
index 0000000..5d06dab
Binary files /dev/null and b/assets/img/jian.png differ
diff --git a/assets/img/pass0.png b/assets/img/pass0.png
index 4b16412..9eaad91 100644
Binary files a/assets/img/pass0.png and b/assets/img/pass0.png differ
diff --git a/assets/img/pass1.png b/assets/img/pass1.png
index f91a4f0..d2cfd99 100644
Binary files a/assets/img/pass1.png and b/assets/img/pass1.png differ
diff --git a/assets/img/qidai.png b/assets/img/qidai.png
index d9cf5d6..91da047 100644
Binary files a/assets/img/qidai.png and b/assets/img/qidai.png differ
diff --git a/assets/img/user-n.png b/assets/img/user-n.png
index 9501475..1918d8f 100644
Binary files a/assets/img/user-n.png and b/assets/img/user-n.png differ
diff --git a/assets/img/user-y.png b/assets/img/user-y.png
index 3fc04d7..08612e9 100644
Binary files a/assets/img/user-y.png and b/assets/img/user-y.png differ
diff --git a/components/banner/index.wxml b/components/banner/index.wxml
index e29c4d3..7e18828 100644
--- a/components/banner/index.wxml
+++ b/components/banner/index.wxml
@@ -1,5 +1,6 @@
+
-
+
diff --git a/components/banner/index.wxss b/components/banner/index.wxss
index 31ac99a..022334a 100644
--- a/components/banner/index.wxss
+++ b/components/banner/index.wxss
@@ -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%;
}
\ No newline at end of file
diff --git a/components/coupons/index.wxml b/components/coupons/index.wxml
index 5cdca5d..41a557e 100644
--- a/components/coupons/index.wxml
+++ b/components/coupons/index.wxml
@@ -8,7 +8,8 @@
{{data.title}}
{{data.subTitle}}
- ¥{{data.salePriceStr}}
+
+ {{data.salePriceStr}}
满¥{{data.usePriceStr}}可用
@@ -20,14 +21,12 @@
-
- 剩余: {{data.remainInventory}}
-
-
- 领取
- 购买
+ 免费领
+ 马上购
已售罄
+ 剩余{{data.remainInventory}}
+
\ No newline at end of file
diff --git a/components/coupons/index.wxss b/components/coupons/index.wxss
index e251da6..4b55684 100644
--- a/components/coupons/index.wxss
+++ b/components/coupons/index.wxss
@@ -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 {
diff --git a/dist/tab/index.wxss b/dist/tab/index.wxss
index 9fc8784..1a692d3 100644
--- a/dist/tab/index.wxss
+++ b/dist/tab/index.wxss
@@ -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;
}
\ No newline at end of file
diff --git a/dist/tabs/index.wxss b/dist/tabs/index.wxss
index e6b1a3b..1d36704 100644
--- a/dist/tabs/index.wxss
+++ b/dist/tabs/index.wxss
@@ -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 {
diff --git a/pages/actdetail/actdetail.js b/pages/actdetail/actdetail.js
new file mode 100644
index 0000000..2d95fd5
--- /dev/null
+++ b/pages/actdetail/actdetail.js
@@ -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 () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/actdetail/actdetail.json b/pages/actdetail/actdetail.json
new file mode 100644
index 0000000..9fabb8c
--- /dev/null
+++ b/pages/actdetail/actdetail.json
@@ -0,0 +1,3 @@
+{
+ "navigationBarTitleText": "活动详情"
+}
\ No newline at end of file
diff --git a/pages/actdetail/actdetail.wxml b/pages/actdetail/actdetail.wxml
new file mode 100644
index 0000000..4a0b3bb
--- /dev/null
+++ b/pages/actdetail/actdetail.wxml
@@ -0,0 +1,4 @@
+
+ 活动详情
+ {{detail}}
+
\ No newline at end of file
diff --git a/pages/actdetail/actdetail.wxss b/pages/actdetail/actdetail.wxss
new file mode 100644
index 0000000..6d8ed15
--- /dev/null
+++ b/pages/actdetail/actdetail.wxss
@@ -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;
+}
\ No newline at end of file
diff --git a/pages/bannerdetail/index.js b/pages/bannerdetail/index.js
index 1b4c066..9299dea 100644
--- a/pages/bannerdetail/index.js
+++ b/pages/bannerdetail/index.js
@@ -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}`,
+ })
}
});
diff --git a/pages/bannerdetail/index.wxml b/pages/bannerdetail/index.wxml
index 333cecb..5cb919c 100644
--- a/pages/bannerdetail/index.wxml
+++ b/pages/bannerdetail/index.wxml
@@ -3,14 +3,14 @@
+ 活动详情
-
+
-
+ -->
-
+
活动详情
@@ -36,36 +36,38 @@
-->
-
-
-
-
-
-
-
-
- {{item.title}}
- {{item.subTitle}}
-
- ¥{{item.salePriceStr}}
-
- 满¥{{item.usePriceStr}}可用
-
-
- 仅限本店使用
+
+
+
+
+
+
+
+
+
+ {{item.title}}
+ {{item.subTitle}}
+
+ ¥{{item.salePriceStr}}
+
+ 满¥{{item.usePriceStr}}可用
+
+
+ 仅限本店使用
+
-
-
-
-
- 剩余: {{item.remainInventory}}
-
+
+
+ 免费领
+ 马上购
+
+ 剩余{{item.remainInventory}}
+
+
- 领取
- 购买
+
-
-
-
+
+
\ No newline at end of file
diff --git a/pages/bannerdetail/index.wxss b/pages/bannerdetail/index.wxss
index 59b1183..569f5e3 100644
--- a/pages/bannerdetail/index.wxss
+++ b/pages/bannerdetail/index.wxss
@@ -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 {
diff --git a/pages/cartest/cartest.wxml b/pages/cartest/cartest.wxml
index 1e01fb6..1e2a0a4 100644
--- a/pages/cartest/cartest.wxml
+++ b/pages/cartest/cartest.wxml
@@ -1,3 +1,6 @@
-
+
+ 正在疯狂开发中
+ 更好用的体验即将到来
+请敬请期待
\ No newline at end of file
diff --git a/pages/cartest/cartest.wxss b/pages/cartest/cartest.wxss
index d3da5db..be003e3 100644
--- a/pages/cartest/cartest.wxss
+++ b/pages/cartest/cartest.wxss
@@ -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;
-}
\ No newline at end of file
diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js
index 1455681..db6b648 100644
--- a/pages/coupon/detail/index.js
+++ b/pages/coupon/detail/index.js
@@ -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
diff --git a/pages/coupon/detail/index.wxss b/pages/coupon/detail/index.wxss
index dc66612..56f2351 100644
--- a/pages/coupon/detail/index.wxss
+++ b/pages/coupon/detail/index.wxss
@@ -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;
diff --git a/pages/couponorder/index/index.js b/pages/couponorder/index/index.js
index a79ef6d..ae9a851 100644
--- a/pages/couponorder/index/index.js
+++ b/pages/couponorder/index/index.js
@@ -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({
diff --git a/pages/getphoneInfo/index.js b/pages/getphoneInfo/index.js
index ed6e877..f26ae5a 100755
--- a/pages/getphoneInfo/index.js
+++ b/pages/getphoneInfo/index.js
@@ -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"
diff --git a/pages/index/coupons/index.js b/pages/index/coupons/index.js
index 3013965..32a8f23 100644
--- a/pages/index/coupons/index.js
+++ b/pages/index/coupons/index.js
@@ -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);
}
-});
+});
\ No newline at end of file
diff --git a/pages/index/index.js b/pages/index/index.js
index 48c4be7..4553c7f 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -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) {
diff --git a/pages/index/index.json b/pages/index/index.json
index ee618b4..834a073 100644
--- a/pages/index/index.json
+++ b/pages/index/index.json
@@ -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
+ }
}
diff --git a/pages/index/rushToBuy/index.js b/pages/index/rushToBuy/index.js
index 60d215a..a499a28 100644
--- a/pages/index/rushToBuy/index.js
+++ b/pages/index/rushToBuy/index.js
@@ -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
});
});
};
diff --git a/pages/index/rushToBuy/index.wxml b/pages/index/rushToBuy/index.wxml
index 537c0a5..ccf3913 100644
--- a/pages/index/rushToBuy/index.wxml
+++ b/pages/index/rushToBuy/index.wxml
@@ -1,5 +1,5 @@
- 限时抢购查看更多
+ 限时抢购查看更多
diff --git a/pages/index/rushToBuy/index.wxss b/pages/index/rushToBuy/index.wxss
index f66dc85..3c60ce5 100644
--- a/pages/index/rushToBuy/index.wxss
+++ b/pages/index/rushToBuy/index.wxss
@@ -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;
}
-
diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js
index 619f784..8427395 100644
--- a/pages/order/detail/index.js
+++ b/pages/order/detail/index.js
@@ -134,7 +134,7 @@ Page({
wx.hideLoading();
}, 1600);
setTimeout(() => {
- wx.redirectTo({
+ wx.navigateTo({
url: `/pages/order/detail/index?orderId=${
that.data.orderId
}`
diff --git a/pages/order/index/index.js b/pages/order/index/index.js
index 576521e..43f556a 100644
--- a/pages/order/index/index.js
+++ b/pages/order/index/index.js
@@ -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({
diff --git a/pages/passCar/couponList/couponList.js b/pages/passCar/couponList/couponList.js
index 0777bb7..faffdc6 100644
--- a/pages/passCar/couponList/couponList.js
+++ b/pages/passCar/couponList/couponList.js
@@ -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
});
diff --git a/pages/passCar/couponList/couponList.json b/pages/passCar/couponList/couponList.json
index 276ffad..074746d 100644
--- a/pages/passCar/couponList/couponList.json
+++ b/pages/passCar/couponList/couponList.json
@@ -3,5 +3,5 @@
"i-tab": "../../../dist/tab/index",
"i-tabs": "../../../dist/tabs/index"
},
- "navigationBarTitleText": "我的优惠劵"
+ "navigationBarTitleText": "停车券"
}
\ No newline at end of file
diff --git a/pages/passCar/passCar.js b/pages/passCar/passCar.js
index dba521f..23b9749 100644
--- a/pages/passCar/passCar.js
+++ b/pages/passCar/passCar.js
@@ -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);
}
}
-});
\ No newline at end of file
+});
diff --git a/pages/passCar/passCar.json b/pages/passCar/passCar.json
index 83aeba7..9e03f40 100644
--- a/pages/passCar/passCar.json
+++ b/pages/passCar/passCar.json
@@ -1,5 +1,5 @@
{
"component": true,
"usingComponents": {},
- "navigationBarTitleText": "停车"
+ "navigationBarTitleText": "车辆管理"
}
\ No newline at end of file
diff --git a/pages/rushToBuy/index.js b/pages/rushToBuy/index.js
index a9486fb..dc6211b 100644
--- a/pages/rushToBuy/index.js
+++ b/pages/rushToBuy/index.js
@@ -94,7 +94,7 @@ Page({
console.info("allow_load==false 已禁止加载");
that.setData({
loading:true,
- content:"^_^再拉裤子就掉啦ʅ(´◔౪◔)ʃ"
+ content: "——— 在拉裤子就掉了啦 ———"
})
setTimeout(function(){
that.setData({
diff --git a/project.config.json b/project.config.json
index 41012c0..de8711f 100644
--- a/project.config.json
+++ b/project.config.json
@@ -4,7 +4,7 @@
"ignore": []
},
"setting": {
- "urlCheck": true,
+ "urlCheck": false,
"es6": true,
"postcss": true,
"minified": true,