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}}前
-
-
-
- {{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{