diff --git a/pages/bargain/bargainDatail/bargainDatail.js b/pages/bargain/bargainDatail/bargainDatail.js index b55358f..26757ff 100644 --- a/pages/bargain/bargainDatail/bargainDatail.js +++ b/pages/bargain/bargainDatail/bargainDatail.js @@ -9,12 +9,10 @@ Page({ * 页面的初始数据 */ data: { - cancelH: imgurl.cancelH.url, bannerUrl: imgurl.banner.url, wmhome: imgurl.wmhome.url, wmhelp: imgurl.wmhelp.url, wmsuccess01: imgurl.wmsuccess01.url, - successHr: imgurl.successHr.url, fail: imgurl.fail.url, data: null, from: null, @@ -32,7 +30,7 @@ Page({ /** * 生命周期函数--监听页面加载 */ - onLoad: function(options) { + onLoad: function (options) { let that = this; if (options.orderId || options.orderId && options.from == 'discount') { if (options.from) { @@ -50,13 +48,13 @@ Page({ } this.getUserInfo() }, - getUserInfo: function() { + getUserInfo: function () { let that = this; // 获取用户信息 Http.get({ - url: config.api.getScore, - data: {} - }) + url: config.api.getScore, + data: {} + }) .then(res => { console.log(res) that.setData({ @@ -65,7 +63,7 @@ Page({ }) }) }, - onShow: function() { + onShow: function () { let that = this; var todayDate = new Date().getTime(); that.setData({ @@ -76,7 +74,7 @@ Page({ that.countdown(that.data.pressEndDate) } }, - goback: function() { + goback: function () { wx.switchTab({ url: '/pages/main/index', }) @@ -84,7 +82,7 @@ Page({ /** * 更多砍价商品 */ - gotomore: function() { + gotomore: function () { wx.navigateTo({ url: '/pages/bargain/bargain', }) @@ -92,14 +90,14 @@ Page({ /** * @param {砍价状态(1:我发起的砍价,2:未参与的砍价, 3:已参与的砍价)} orderId */ - getPressOrderStatus: function(orderId) { + getPressOrderStatus: function (orderId) { let that = this; Http.get({ - url: config.api.getPressOrderStatus, - data: { - orderId: orderId - } - }) + url: config.api.getPressOrderStatus, + data: { + orderId: orderId + } + }) .then(res => { if (res.data.status == 1) { that.setData({ @@ -125,19 +123,19 @@ Page({ }) }) }, - helpDiscount: function() { + helpDiscount: function () { let that = this; that.pressOrderJoin(that.data.orderId); }, //参与砍价 - pressOrderJoin: function(orderId) { + pressOrderJoin: function (orderId) { let that = this; Http.post({ - url: config.api.pressOrderJoin, - data: { - orderId: orderId - } - }) + url: config.api.pressOrderJoin, + data: { + orderId: orderId + } + }) .then(res => { console.log(res); // id 是订单号 @@ -153,14 +151,14 @@ Page({ }) }, // 订单详情 - pressOrderDetail: function(orderId) { + pressOrderDetail: function (orderId) { let that = this; Http.get({ - url: config.api.pressOrderDetail, - data: { - orderId: orderId - } - }) + url: config.api.pressOrderDetail, + data: { + orderId: orderId + } + }) .then(res => { console.log(res); res.data.orderPressList.map(file => { @@ -219,10 +217,10 @@ Page({ } total_micro_second -= 1000; }, - countdown: function(end_time) { + countdown: function (end_time) { let that = this; that.setIntervalTime(end_time); - that.data.setInterval = setInterval(function() { + that.data.setInterval = setInterval(function () { that.setIntervalTime(end_time); }, 1000) }, @@ -254,14 +252,14 @@ Page({ console.log(_this) // 支付成功 Http.post({ - url: config.api.payOrderUpdate, - data: { - payOrderId: payOrderId, - orderId: orderId, - status: status, - reason: reason - } - }) + url: config.api.payOrderUpdate, + data: { + payOrderId: payOrderId, + orderId: orderId, + status: status, + reason: reason + } + }) .then(res => { wx.hideLoading(); _this.setData({ @@ -285,7 +283,7 @@ Page({ .catch(err => { console.log(err); if (!type) { - setTimeout(function() { + setTimeout(function () { _this.payOrderUpdate(orderId, payOrderId, status, reason, type, _this); }, 2000) } @@ -523,14 +521,14 @@ Page({ showButton1: true }) Http.get({ - url: config.api.checkPhoneStatus, - data: {} - }) + url: config.api.checkPhoneStatus, + data: {} + }) .then(res => { that.setData({ showButton1: false }) - if (typeof(res) != "undefined") { + if (typeof (res) != "undefined") { let orderId = "" + e.currentTarget.dataset.orderid; that.setData({ orderId: orderId @@ -540,11 +538,11 @@ Page({ * 支付订单创建 */ Http.post({ - url: config.api.payOrderCreate, - data: { - orderId: orderId - } - }) + url: config.api.payOrderCreate, + data: { + orderId: orderId + } + }) .then(res => { var payOrderId = "" + res.data.payOrderId; wx.hideLoading(); @@ -558,12 +556,12 @@ Page({ wx.showLoading({ title: '订单正在处理中...', }) - setTimeout(function() { + setTimeout(function () { wx.hideLoading() }, 5000) that.payOrderUpdate(that.data.orderId, payOrderId, 1, '', '', that); if (res.errMsg == "requestPayment:ok") { - setTimeout(function() { + setTimeout(function () { wx.hideLoading(); }, 2000); /** @@ -592,7 +590,7 @@ Page({ }) return; }, - complete: res => {} + complete: res => { } }); /// End payment -------- }) @@ -696,7 +694,7 @@ Page({ } } }) - }else if (err.code == 11005) { + } else if (err.code == 11005) { /** * 将值传到用户手机号授权的页面 * @@ -725,11 +723,11 @@ Page({ } }) }, - onUnload: function() { + onUnload: function () { let that = this; clearInterval(that.data.setInterval) }, - onHide: function() { + onHide: function () { let that = this; clearInterval(that.data.setInterval) }, @@ -737,7 +735,7 @@ Page({ * * @param {朋友邀请砍价} e */ - barginAgain: function(e) { + barginAgain: function (e) { let that = this; let couponChannelId = e.currentTarget.dataset.couponchannelid; let couponId = e.currentTarget.dataset.couponid; @@ -748,23 +746,23 @@ Page({ /** * 刷新 */ - onPullDownRefresh: function(e) { + onPullDownRefresh: function (e) { let that = this; console.log(app.globalData.wmorder); if (app.globalData.wmorder) { that.pressOrderDetail(app.globalData.wmorder); } }, - onShareAppMessage: function(options) { + onShareAppMessage: function (options) { var that = this; var shareObj = { title: that.data.nickName + '邀请您帮砍' + that.data.data.title, path: `/pages/index/index?orderId=${that.data.data.id}&from=${"discount"}`, - success: function(res) { - if (res.errMsg == 'shareAppMessage:ok') {} + success: function (res) { + if (res.errMsg == 'shareAppMessage:ok') { } }, - fail: function(error) { - if (res.errMsg == 'shareAppMessage:fail cancel') {} else if (res.errMsg == 'shareAppMessage:fail') {} + fail: function (error) { + if (res.errMsg == 'shareAppMessage:fail cancel') { } else if (res.errMsg == 'shareAppMessage:fail') { } } }; // 来自页面内的按钮的转发 @@ -806,7 +804,7 @@ function diffTime(startDate) { } function compare(property) { - return function(a, b) { + return function (a, b) { var value1 = a[property]; var value2 = b[property]; return value2 - value1; diff --git a/pages/bargain/bargainDatail/bargainDatail.json b/pages/bargain/bargainDatail/bargainDatail.json index 05cc4b3..b9200c1 100644 --- a/pages/bargain/bargainDatail/bargainDatail.json +++ b/pages/bargain/bargainDatail/bargainDatail.json @@ -3,4 +3,4 @@ "navigationBarBackgroundColor":"#F4F5F9", "navigationBarTextStyle": "black", "enablePullDownRefresh": true -} \ No newline at end of file +} diff --git a/pages/bargain/bargainDatail/bargainDatail.wxml b/pages/bargain/bargainDatail/bargainDatail.wxml index b6c5b32..ebd0995 100644 --- a/pages/bargain/bargainDatail/bargainDatail.wxml +++ b/pages/bargain/bargainDatail/bargainDatail.wxml @@ -1,27 +1,23 @@ - + - - - - - - + {{data.title}} - - + {{data.subTitle}} + {{data.price/100}}元 可砍至{{data.salePrice/100}} - - - + + - 已砍 {{already}}元 - 还剩 {{remain}}元 + 已砍 {{already}}元 + 还剩 {{remain}}元 - - 还剩 {{day}}天:{{hour}}:{{min}}:{{sec}} 结束 + + + 还剩 {{day}}天:{{hour}}:{{min}}:{{sec}} 结束 + 砍价已取消 @@ -35,37 +31,33 @@ - + 还需邀请{{data.pressLimitNum-data.orderPressList.length}}位好友,帮忙砍至底价 - - - 已砍至底价 - - - - - + + + 已砍至底价 + + + + + - + 砍价人数{{data.orderPressList.length}}/{{data.pressLimitNum}}人 - - - + + - + 发起人 {{item.nickName}} 砍掉{{item.pressValue/100}}元 {{item.createDate}}前 - - -
diff --git a/pages/bargain/bargainDatail/bargainDatail.wxss b/pages/bargain/bargainDatail/bargainDatail.wxss index 6824fab..c073a9a 100644 --- a/pages/bargain/bargainDatail/bargainDatail.wxss +++ b/pages/bargain/bargainDatail/bargainDatail.wxss @@ -1,42 +1,21 @@ page{ - width: 100%; - height: 100%; - position: fixed; - top: 0; - left: 0; - background: rgba(0, 0, 0, 0.5); - overflow: hidden; - /* z-index: 10000; */ - color: #fff; -} -.cancleH{ - width: 60rpx; - height: 120rpx; - position: absolute; - right: 92rpx; - top: 60rpx; -} -.cancleH image{ - width: 60rpx; - height: 60rpx; - /* margin-top: 20rpx; */ -} -.line{ - height: 50rpx; - width: 4rpx; - background:#ccc; - margin: 0 auto; + height: auto; + overflow: auto; + background: #FF6F03; + background-image: url('https://s3.cn-northwest-1.amazonaws.com.cn/iformall-net/cimg/bargindetailbg.jpg'); + background-size: cover; + background-repeat: no-repeat; } .bargainDetail { - padding: 0 33rpx 0; + padding: 0 33rpx 0; } -.progress .fl { - /* width: 150rpx; */ - height: 60rpx; - border-radius:16rpx; - color: #FFF; +.listitem .fl { + width: 180rpx; + height: 180rpx; + border-radius:10rpx; } + .listitem .icon { width: 140rpx; height: 116rpx; @@ -47,10 +26,10 @@ page{ .title{ display: block; font-size: 30rpx; - color: #fff; + color: #333; height: 40rpx; line-height: 40rpx; - padding-top: 40rpx; + padding-top: 20rpx; } .help{ display: block; @@ -75,12 +54,11 @@ page{ .ri .txt01 { width: 100%; - color: #FFF; - line-height: 32rpx; + color: rgba(51, 51, 51, 1); + line-height: 44rpx; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; - margin-top: 12rpx; } .ri .txt02 { @@ -102,89 +80,75 @@ page{ .ri .txt04 { width: 100%; font-size: 24rpx; - color: #FFF; + color: rgba(255, 50, 50, 1); line-height: 44rpx; - margin-top: 16rpx; } .money { display: inline-block !important; font-size: 50rpx; font-weight: 500; - color: #FFF; + color: rgba(255, 50, 50, 1); } .listitem { - width: 538rpx; - /* height: 624rpx; */ position: relative; - padding: 60rpx 40rpx; + padding: 31rpx 20rpx; border-radius: 15rpx; - background: linear-gradient(160deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%); - margin: 170rpx auto 30rpx; - display: flex; - flex-direction:column; -} -.top{ - width:548rpx; - height: 140rpx; - margin: 0 auto 20rpx; - padding: 0 20rpx; -} -.top image{ - width:120rpx; - height:120rpx; - border-radius:16rpx; - float: left; -} -.top tit{ - margin-left:26rpx; - width:305rpx; + background: #fff; + margin-bottom: 30rpx; + margin-top:20rpx; } + .progress { width: 519rpx; - height: 170rpx; + padding: 30rpx 84rpx; + /* height: 136rpx; */ + background: #fff; + border-radius: 15rpx; margin: 0 auto; } +.progesstext { + margin-bottom: 13rpx; +} + .progesstext>text { font-size: 24rpx; - color: #FFF; + color: rgba(51, 51, 51, 1); } .progesstext text text { - color: #FFF; + color: #FF3535; } .time { margin-top: 20rpx; font-size: 24rpx; - color: #FFF; + color: #333; text-align:center; } .time text { font-size: 30rpx; - color: #FD832D; + color: #fff; display: inline-block; width: 40rpx; text-align: center; height: 40rpx; line-height: 40rpx; - background: #FFF; + background: rgba(51, 51, 51, 1); border-radius: 10rpx; margin: 0 4px; } .head{ - width:52rpx; - height: 52rpx; + width:10%; + height: 90rpx; position: relative; - float: left } .head image{ - width: 52rpx; - height: 52rpx; - border-radius:26rpx; + width: 70rpx; + border-radius:10rpx; } .head text{ width: 70rpx; @@ -199,22 +163,24 @@ page{ border-radius: 20rpx; } .text{ - width: 85%; + width: 87%; padding-left: 3%; display: inline-block; - height: 52rpx; - line-height: 52rpx; + height: 90rpx; + line-height: 90rpx; font-size: 26rpx; } .text01{ - width: 70rpx; + width: 100rpx; margin-right: 6rpx; + height: 76rpx; + line-height: 76rpx; } .text01 text{ width: 100rpx; float: left; - height: 52rpx; - line-height: 52rpx; + height: 90rpx; + line-height: 90rpx; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; @@ -222,25 +188,20 @@ page{ .text02{ display: inline-block; } -.text02 .fl{ - color: #FFF!important; -} .text03{ - /* width: 180rpx; */ + width: 240rpx; text-align: right; font-size:24rpx; - height: 52rpx; - line-height: 52rpx; + height: 76rpx; + line-height: 76rpx; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; } - .person{ - /* border-bottom: 1px solid #F0CDB3; */ - padding-bottom: 15rpx; - padding-top: 15rpx; - color: #fff; + border-bottom: 1px solid #F0CDB3; + padding-bottom: 31rpx; + padding-top: 31rpx; } .text02 text:nth-of-type(2){ color: #FF3535; @@ -248,12 +209,10 @@ page{ } .people{ border-radius:16rpx; + background: #FFEADA; + margin-top: 30rpx; padding:0 20rpx; - -} -.kjr{ - height: 300rpx; - overflow: auto; + margin-bottom: 165rpx; } .btns{ padding:33rpx; @@ -266,15 +225,15 @@ page{ } .btns button{ width: 500rpx!important; - height: 92rpx; - border-radius:32rpx; + height: 95rpx; + border-radius:48rpx; text-align: center; margin: 0 auto; - font-size: 32rpx; + font-size: 30rpx; color: #fff; - line-height: 92rpx; - background:linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%); - /* box-shadow:0px 8px 8px 1px rgba(204,26,13,0.32); */ + line-height: 95rpx; + background:linear-gradient(90deg,rgba(229,54,40,1) 0%,rgba(243,75,30,1) 99%); + box-shadow:0px 8px 8px 1px rgba(204,26,13,0.32); } .goback{ position: fixed; @@ -315,7 +274,7 @@ page{ } .helpDiscount::after{ border: none; } .success{ - margin-top: 15rpx; + margin-top: 50rpx; } .success image{ display: block; @@ -326,9 +285,9 @@ page{ .success text{ display: block; text-align: center; - font-size:24rpx; - line-height: 24rpx; - color:#FFFFFF; + font-size:30rpx; + line-height: 30rpx; + color:rgba(51,51,51,1); } .btns01{ position: fixed; @@ -339,10 +298,10 @@ page{ } .btns01 button{ color:rgba(254,254,254,1); - width:538rpx; + width:650rpx; height:85rpx; line-height: 85rpx; - background:linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%); + background:linear-gradient(90deg,rgba(236,59,45,1) 0%,rgba(248,98,52,1) 100%); box-shadow:0px 8px 8px 1px rgba(246,93,51,0.32); border-radius:43rpx; } diff --git a/pages/main/index.wxml b/pages/main/index.wxml index 2769e81..3ceb160 100644 --- a/pages/main/index.wxml +++ b/pages/main/index.wxml @@ -72,8 +72,8 @@ - {{name}} - {{title}} + {{name}} + {{title}} diff --git a/pages/main/index.wxss b/pages/main/index.wxss index 5a335fa..1d9007c 100644 --- a/pages/main/index.wxss +++ b/pages/main/index.wxss @@ -307,16 +307,19 @@ page { width: 400rpx; height: 100%; float: left; + margin-left: 10rpx; } .textBox .name{ width: 400rpx; font-size: 28rpx; color: #3C3C3C; + margin-top: 20rpx; } .textBox .title{ width: 400rpx; font-size: 20rpx; color: #A6A6A6; + margin-top: 10rpx; } .product .gift{