From aa40a1f47cf9cfdd3d0eb262da7277731dae6ac3 Mon Sep 17 00:00:00 2001 From: meo <18801474720@163.com> Date: Sun, 16 Sep 2018 20:18:34 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=88=B8=E5=8C=85=20=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E8=AF=A6=E6=83=85][=E4=BF=AE=E6=94=B9]:=E5=88=B8=E5=8C=85?= =?UTF-8?q?=E5=92=8C=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/coupons/index.wxml | 2 +- pages/coupon/detail/index.js | 7 +++++++ pages/couponorder/detail/index.wxss | 11 +++-------- pages/couponorder/index/index.wxml | 2 +- pages/couponorder/index/index.wxss | 11 +++++++---- pages/index/index.js | 26 +++++++++++++------------- pages/order/detail/index.wxss | 8 ++++---- pages/order/index/index.wxss | 4 ++-- pages/user/index.js | 4 +++- 9 files changed, 41 insertions(+), 34 deletions(-) diff --git a/components/coupons/index.wxml b/components/coupons/index.wxml index 9a3d9eb..d5cfd26 100644 --- a/components/coupons/index.wxml +++ b/components/coupons/index.wxml @@ -9,7 +9,7 @@ {{data.title}} {{data.subTitle}} - + {{data.salePriceStr}} 满¥{{data.usePriceStr}}可用 diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js index 769eaec..4fe43a3 100644 --- a/pages/coupon/detail/index.js +++ b/pages/coupon/detail/index.js @@ -308,6 +308,9 @@ Page({ that.payOrderUpdate(that.data.orderId, payOrderId, 1); // 支付成功 console.log(res); if (res.errMsg == "requestPayment:ok") { + // wx.showTabBarRedDot({ + // index: 2 + // }) wx.showToast({ title: "购买成功", image: "./../../../assets/img/success.png", @@ -384,6 +387,10 @@ Page({ } else { // 免费券 that.payOrderUpdate(orderId, "0", 1); + wx.showTabBarRedDot({ + index: 0 + }); + console.log("小红点 小红点 小红点") wx.setStorage({ key: 'couponNum', data: "couponNum", diff --git a/pages/couponorder/detail/index.wxss b/pages/couponorder/detail/index.wxss index 8fe8f78..3a666e6 100644 --- a/pages/couponorder/detail/index.wxss +++ b/pages/couponorder/detail/index.wxss @@ -72,7 +72,7 @@ height: 350rpx; } .coupon_detail { - padding: 0 20rpx; + padding: 30rpx 20rpx 0; } .fl { @@ -97,7 +97,7 @@ } .coupon_detail .fr { - width: 400rpx; + width: 434rpx; } .coupon_detail .title { @@ -154,8 +154,6 @@ display: flex; flex-direction: column; background: #fff; - border-bottom: 20rpx solid #f5f5f5; - border-top: 20rpx solid #f5f5f5; position: relative; } @@ -205,7 +203,7 @@ color: #000; font-weight: bold; padding: 24rpx 0 33rpx; - border-bottom: 1px solid #eee; + border-bottom: 1rpx solid #eee; text-indent: 20rpx; } @@ -220,9 +218,6 @@ z-index:1000000; } -.notes { - border-top: 20rpx solid #f5f5f5; -} .notes view:nth-child(1) { width: 92%; diff --git a/pages/couponorder/index/index.wxml b/pages/couponorder/index/index.wxml index e6350d5..12266df 100644 --- a/pages/couponorder/index/index.wxml +++ b/pages/couponorder/index/index.wxml @@ -3,7 +3,7 @@ - + 再忙,也要记得买点什么犒赏自己~ diff --git a/pages/couponorder/index/index.wxss b/pages/couponorder/index/index.wxss index 5680861..0089719 100644 --- a/pages/couponorder/index/index.wxss +++ b/pages/couponorder/index/index.wxss @@ -7,6 +7,11 @@ width: 100% !important; height: 88rpx; text-align: center; + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 100000; } .i-tab { @@ -24,7 +29,7 @@ background: #fff; display: flex; padding: 30rpx 4%; - border-bottom: 1px solid #ededed; + border-bottom: 1rpx solid #ededed; } .logo { @@ -69,10 +74,8 @@ .btns { position: absolute; - top: 0; right: 20rpx; - bottom: 0; - margin: auto; + bottom: 39rpx; width: 180rpx; height: 60rpx; line-height: 60rpx; diff --git a/pages/index/index.js b/pages/index/index.js index ebfd910..6584e88 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -9,7 +9,7 @@ Page({ scrollTop: 0, page: 1 // 刷新进入页面时已经加载了第一页数据,onReachBottom时 page++,从第2页开始加载 }, - swiperChange: function (e) { + swiperChange: function(e) { this.setData({ swiperCurrent: e.detail.current }); @@ -17,7 +17,7 @@ Page({ /** * 生命周期函数--监听页面初次渲染完成 */ - onLoad: function (options) { + onLoad: function(options) { var that = this; var scene = decodeURIComponent(options.scene); app.getLocation(); @@ -26,7 +26,7 @@ Page({ /** * 下拉刷新 */ - onPullDownRefresh: function (e) { + onPullDownRefresh: function(e) { let that = this; that.userLogin(); console.log(this.data.code); @@ -40,7 +40,7 @@ Page({ }; }, - onGetCode: function (e) { + onGetCode: function(e) { //子组件传递给父组件的值 this.setData({ code: e.detail.val, @@ -51,7 +51,7 @@ Page({ /** * 用户登录 */ - userLogin: function () { + userLogin: function() { var that = this; // 登录 wx.login({ @@ -116,7 +116,7 @@ Page({ /** * banner */ - getBannerlist: function () { + getBannerlist: function() { let that = this; Http.get({ url: config.api.bannerlist, @@ -135,7 +135,7 @@ Page({ /** * 检查用户是否有车 */ - checkUserCarStatus: function () { + checkUserCarStatus: function() { var that = this; Http.get({ url: config.api.userCarCount, @@ -153,7 +153,7 @@ Page({ /** * car共同登录 */ - userCarLogin: function () { + userCarLogin: function() { var that = this; if (!app.globalData.carLogin) { // 共同登录 @@ -175,7 +175,7 @@ Page({ /** * 获取用户信息 */ - getUserInfo: function () { + getUserInfo: function() { // 获取用户信息 wx.getSetting({ success: res => { @@ -193,13 +193,13 @@ Page({ }); }, //下拉加载更多 - onReachBottom: function () { + onReachBottom: function() { let that = this; that.data.page++; that.setData({ page: that.data.page }); - console.log("我是第"+that.data.page+"几页") + console.log("我是第" + that.data.page + "几页") //父组件获得子组件的方法 //如果code == 0 if (that.data.code == 0 || that.data.code == undefined) { @@ -209,11 +209,11 @@ Page({ } }, // 用户点击右上角分享 - onShareAppMessage: function () { + onShareAppMessage: function() { return { title: "富茂链客", desc: "分享个小程序,希望你喜欢", - success: function (res) { + success: function(res) { wx.showToast({ title: "分享成功", duration: 1000, diff --git a/pages/order/detail/index.wxss b/pages/order/detail/index.wxss index a68e58f..03bb987 100644 --- a/pages/order/detail/index.wxss +++ b/pages/order/detail/index.wxss @@ -123,20 +123,20 @@ .classif > view { position: relative; - height: 70rpx; - line-height: 70rpx; + height: 94rpx; + line-height: 94rpx; display: flex; justify-content: space-between; border-bottom: 1rpx solid #eee; } .classif > view text { - font-size: 24rpx; + font-size: 30rpx; } .classif > view text:nth-child(2) { color: #b8b8b8; - font-size: 24rpx; + font-size: 30rpx; } .classif > view:nth-child(1) { diff --git a/pages/order/index/index.wxss b/pages/order/index/index.wxss index 470ccd4..8753304 100644 --- a/pages/order/index/index.wxss +++ b/pages/order/index/index.wxss @@ -79,11 +79,11 @@ display: inline-block; width: 123rpx !important; overflow: hidden; - font-size: 28rpx; + font-size: 26rpx; color: #02c0ff; letter-spacing: 0; text-align: right; - line-height: 28px; + line-height: 26px; } .wait { diff --git a/pages/user/index.js b/pages/user/index.js index a63c4f3..9181f47 100644 --- a/pages/user/index.js +++ b/pages/user/index.js @@ -17,7 +17,9 @@ Page({ /** * 生命周期函数--监听页面加载 */ - onLoad: function(options) {}, + onLoad: function(options) { + + }, /** * 生命周期函数--监听页面初次渲染完成