b8a5627d by simon

默认提交

1 parent 4ac18314
......@@ -44,6 +44,7 @@ Component({
// 出价
onSubmitHandler() {
let minPrice = (this.properties.maxPrice + this.properties.productInfo.minScope) * 0.01;
let maxPrice = (this.properties.maxPrice + this.properties.productInfo.maxScope) * 0.01;
if (this.data.bidPrice < minPrice) {
wx.showToast({
title: `出价不能低于¥${minPrice}`,
......@@ -51,6 +52,13 @@ Component({
})
return;
}
if (this.data.bidPrice > maxPrice) {
wx.showToast({
title: `出价不能高于¥${maxPrice}`,
icon: 'none'
})
return;
}
this.triggerEvent('evtcomp', {
name: "_evt_bid_submit",
data: {
......
......@@ -25,9 +25,11 @@
}
.t1 {
// @extend .bb;
font-size: 22px;
margin: 12px auto 0;
color: #666666;
width: 420px;
}
.bid {
......
......@@ -8,6 +8,8 @@
<span class="price">¥{{filter.Fen2Yuan(maxPrice)}}</span>
,出价不得低于
<span class="price">¥{{filter.Fen2Yuan(maxPrice + productInfo.minScope)}}</span>
不得高于
<span class="price">¥{{filter.Fen2Yuan(maxPrice + productInfo.maxScope)}}</span>
</view>
<view class="bid">
我要报价
......
......@@ -10,6 +10,7 @@ var wxTimer;
let app = getApp();
Page({
data: {
isOverShare: true,
authorizeVisible: false,
auctionBidVisible: false,
auctionBidSuccessVisible: false,
......@@ -34,7 +35,19 @@ Page({
bidPrice: 0, // 我的出价 单位元
isTimeEnd: false, //倒计时结束
},
onShareAppMessage() {},
onShareAppMessage() {
let {
productInfo
} = this.data;
let title = `${productInfo.auctionName}拍卖热烈进行中!`;
let path = `pages/auction-detail/auction-detail?code=${productInfo.auctionCode}&share=true`;
let imageUrl = productInfo && productInfo.auctionImages[0] || "";
return {
title,
path,
imageUrl
}
},
showAuth() {
this.setData({
authorizeVisible: true
......@@ -160,9 +173,8 @@ Page({
*/
queryAuctionDetail() {
let code = this.data.options.code;
// 45ebd46114904467824644b55654c27a
// cf8bc80aef3446b58d17abc6167ad536
let _this = this;
console.log("queryAuctionDetail")
return new Promise((resolve, reject) => {
app.post({
toast: false,
......@@ -173,7 +185,8 @@ Page({
}).then((result) => {
this.setData({
productInfo: result
})
});
console.log("queryAuctionDetail result:", result);
// wx.setNavigationBarTitle({
// title: result.auctionName || "拍卖活动"
// })
......@@ -217,6 +230,7 @@ Page({
maxPrice: result.maxPrice || 0,
priceTotal: result.total || 0
})
console.log("queryAuctionRecordLast result:", result);
resolve();
});
} else {
......@@ -249,6 +263,7 @@ Page({
auctionBidSuccessVisible: true
})
})
console.log("queryAuctionSubmit result:", result);
}).catch((err) => {
console.log("queryAuctionSubmit err:", err);
this.queryAuctionRecordLast().then((res2) => {
......@@ -282,6 +297,7 @@ Page({
this.setData({
userInfo: result
})
console.log("queryMember result:", result);
resolve(result);
})
});
......@@ -461,12 +477,18 @@ Page({
// 通用按钮
case "_evt_common_comp_button":
this.hideMask();
wx.navigateBack({
delta: 1
});
if (options.share) {
app.router.push({
openType: "reLaunch",
path: "index"
})
} else {
wx.navigateBack({
delta: 1
});
}
break;
// 去验证
case "_evt_to_verify":
this.hideMask();
......@@ -475,10 +497,20 @@ Page({
// 暂不验证
case "_evt_not_verify":
let {
options
} = this.data;
this.hideMask();
wx.navigateBack({
delta: 1
});
if (options.share) {
app.router.push({
openType: "reLaunch",
path: "index"
})
} else {
wx.navigateBack({
delta: 1
});
}
break;
......
......@@ -84,7 +84,6 @@ $contentWidth:690px;
margin-left: 20px;
margin-top: 36px;
align-self: center;
}
.t2 {}
......@@ -173,10 +172,14 @@ $contentWidth:690px;
flex-wrap: wrap;
.t1 {
width: 50%;
width: 60%;
padding: 6px 0;
// @extend .bb;
}
.t2 {
width: 40%;
}
}
&-table {
......
......@@ -44,9 +44,9 @@
<view class="auction">
<view class="auction-desc">
<view class="t1">产品原价:{{filter.Fen2Yuan(productInfo.originalPrice)}} 元</view>
<view class="t1">起拍价:{{filter.Fen2Yuan(productInfo.startPrice)}}元</view>
<view class="t1">最小加价幅度:{{filter.Fen2Yuan(productInfo.minScope)}}元</view>
<view class="t1">延时周期: {{filter.msTimeFormat(productInfo.delayPeriod)}}</view>
<view class="t1 t2">起拍价:{{filter.Fen2Yuan(productInfo.startPrice)}}元</view>
<view class="t1">单次加价范围:{{filter.Fen2Yuan(productInfo.minScope)}}-{{filter.Fen2Yuan(productInfo.maxScope)}}元</view>
<view class="t1 t2">延时周期: {{filter.msTimeFormat(productInfo.delayPeriod)}}</view>
</view>
<view class="auction-table">
<view wx:if="{{priceInfo && priceInfo.length > 0}}">
......
......@@ -10,6 +10,7 @@ var wxTimer;
let app = getApp();
Page({
data: {
isOverShare: true,
authorizeVisible: false,
seckillOrderVisible: false,
commonTipsCompVisible: false,
......@@ -26,7 +27,19 @@ Page({
orderStatus: 0, // 0.未下单 1.下单成功
isTimeEnd: false, //倒计时结束
},
onShareAppMessage() {},
onShareAppMessage() {
let {
productInfo
} = this.data;
let title = `${productInfo.seckillName}秒杀热烈进行中!`;
let path = `pages/seckill-detail/seckill-detail?code=${productInfo.seckillCode}&share=true`;
let imageUrl = productInfo && productInfo.seckillImages[0] || "";
return {
title,
path,
imageUrl
}
},
showAuth() {
this.setData({
authorizeVisible: true
......@@ -287,9 +300,16 @@ Page({
// 通用按钮
case "_evt_common_comp_button":
this.hideMask();
wx.navigateBack({
delta: 1
});
if (options.share) {
app.router.push({
openType: "reLaunch",
path: "index"
})
} else {
wx.navigateBack({
delta: 1
});
}
break;
// 去验证
......@@ -300,10 +320,20 @@ Page({
// 暂不验证
case "_evt_not_verify":
let {
options
} = this.data;
this.hideMask();
wx.navigateBack({
delta: 1
});
if (options.share) {
app.router.push({
openType: "reLaunch",
path: "index"
})
} else {
wx.navigateBack({
delta: 1
});
}
break;
default:
......
......@@ -199,8 +199,14 @@ Page({
} = this.data;
let pics = [];
files.forEach(element => {
pics.push(element.path)
if (element.path) {
pics.push(element.path)
}
});
console.log("files:", files);
console.log("pics:", pics);
console.log("pics.lenght:", pics.length);
console.log("pics.length <= 0:", pics.length <= 0);
if (!name) {
this.showTips("请输入真实姓名");
......@@ -304,8 +310,6 @@ Page({
_this.setData({
files
});
console.log("files:", files);
console.log("files[0]:", files[0]);
}
})
},
......