b8a5627d by simon

默认提交

1 parent 4ac18314
...@@ -44,6 +44,7 @@ Component({ ...@@ -44,6 +44,7 @@ Component({
44 // 出价 44 // 出价
45 onSubmitHandler() { 45 onSubmitHandler() {
46 let minPrice = (this.properties.maxPrice + this.properties.productInfo.minScope) * 0.01; 46 let minPrice = (this.properties.maxPrice + this.properties.productInfo.minScope) * 0.01;
47 let maxPrice = (this.properties.maxPrice + this.properties.productInfo.maxScope) * 0.01;
47 if (this.data.bidPrice < minPrice) { 48 if (this.data.bidPrice < minPrice) {
48 wx.showToast({ 49 wx.showToast({
49 title: `出价不能低于¥${minPrice}`, 50 title: `出价不能低于¥${minPrice}`,
...@@ -51,6 +52,13 @@ Component({ ...@@ -51,6 +52,13 @@ Component({
51 }) 52 })
52 return; 53 return;
53 } 54 }
55 if (this.data.bidPrice > maxPrice) {
56 wx.showToast({
57 title: `出价不能高于¥${maxPrice}`,
58 icon: 'none'
59 })
60 return;
61 }
54 this.triggerEvent('evtcomp', { 62 this.triggerEvent('evtcomp', {
55 name: "_evt_bid_submit", 63 name: "_evt_bid_submit",
56 data: { 64 data: {
......
...@@ -25,9 +25,11 @@ ...@@ -25,9 +25,11 @@
25 } 25 }
26 26
27 .t1 { 27 .t1 {
28 // @extend .bb;
28 font-size: 22px; 29 font-size: 22px;
29 margin: 12px auto 0; 30 margin: 12px auto 0;
30 color: #666666; 31 color: #666666;
32 width: 420px;
31 } 33 }
32 34
33 .bid { 35 .bid {
......
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
8 <span class="price">¥{{filter.Fen2Yuan(maxPrice)}}</span> 8 <span class="price">¥{{filter.Fen2Yuan(maxPrice)}}</span>
9 ,出价不得低于 9 ,出价不得低于
10 <span class="price">¥{{filter.Fen2Yuan(maxPrice + productInfo.minScope)}}</span> 10 <span class="price">¥{{filter.Fen2Yuan(maxPrice + productInfo.minScope)}}</span>
11 不得高于
12 <span class="price">¥{{filter.Fen2Yuan(maxPrice + productInfo.maxScope)}}</span>
11 </view> 13 </view>
12 <view class="bid"> 14 <view class="bid">
13 我要报价 15 我要报价
......
...@@ -10,6 +10,7 @@ var wxTimer; ...@@ -10,6 +10,7 @@ var wxTimer;
10 let app = getApp(); 10 let app = getApp();
11 Page({ 11 Page({
12 data: { 12 data: {
13 isOverShare: true,
13 authorizeVisible: false, 14 authorizeVisible: false,
14 auctionBidVisible: false, 15 auctionBidVisible: false,
15 auctionBidSuccessVisible: false, 16 auctionBidSuccessVisible: false,
...@@ -34,7 +35,19 @@ Page({ ...@@ -34,7 +35,19 @@ Page({
34 bidPrice: 0, // 我的出价 单位元 35 bidPrice: 0, // 我的出价 单位元
35 isTimeEnd: false, //倒计时结束 36 isTimeEnd: false, //倒计时结束
36 }, 37 },
37 onShareAppMessage() {}, 38 onShareAppMessage() {
39 let {
40 productInfo
41 } = this.data;
42 let title = `${productInfo.auctionName}拍卖热烈进行中!`;
43 let path = `pages/auction-detail/auction-detail?code=${productInfo.auctionCode}&share=true`;
44 let imageUrl = productInfo && productInfo.auctionImages[0] || "";
45 return {
46 title,
47 path,
48 imageUrl
49 }
50 },
38 showAuth() { 51 showAuth() {
39 this.setData({ 52 this.setData({
40 authorizeVisible: true 53 authorizeVisible: true
...@@ -160,9 +173,8 @@ Page({ ...@@ -160,9 +173,8 @@ Page({
160 */ 173 */
161 queryAuctionDetail() { 174 queryAuctionDetail() {
162 let code = this.data.options.code; 175 let code = this.data.options.code;
163 // 45ebd46114904467824644b55654c27a
164 // cf8bc80aef3446b58d17abc6167ad536
165 let _this = this; 176 let _this = this;
177 console.log("queryAuctionDetail")
166 return new Promise((resolve, reject) => { 178 return new Promise((resolve, reject) => {
167 app.post({ 179 app.post({
168 toast: false, 180 toast: false,
...@@ -173,7 +185,8 @@ Page({ ...@@ -173,7 +185,8 @@ Page({
173 }).then((result) => { 185 }).then((result) => {
174 this.setData({ 186 this.setData({
175 productInfo: result 187 productInfo: result
176 }) 188 });
189 console.log("queryAuctionDetail result:", result);
177 // wx.setNavigationBarTitle({ 190 // wx.setNavigationBarTitle({
178 // title: result.auctionName || "拍卖活动" 191 // title: result.auctionName || "拍卖活动"
179 // }) 192 // })
...@@ -217,6 +230,7 @@ Page({ ...@@ -217,6 +230,7 @@ Page({
217 maxPrice: result.maxPrice || 0, 230 maxPrice: result.maxPrice || 0,
218 priceTotal: result.total || 0 231 priceTotal: result.total || 0
219 }) 232 })
233 console.log("queryAuctionRecordLast result:", result);
220 resolve(); 234 resolve();
221 }); 235 });
222 } else { 236 } else {
...@@ -249,6 +263,7 @@ Page({ ...@@ -249,6 +263,7 @@ Page({
249 auctionBidSuccessVisible: true 263 auctionBidSuccessVisible: true
250 }) 264 })
251 }) 265 })
266 console.log("queryAuctionSubmit result:", result);
252 }).catch((err) => { 267 }).catch((err) => {
253 console.log("queryAuctionSubmit err:", err); 268 console.log("queryAuctionSubmit err:", err);
254 this.queryAuctionRecordLast().then((res2) => { 269 this.queryAuctionRecordLast().then((res2) => {
...@@ -282,6 +297,7 @@ Page({ ...@@ -282,6 +297,7 @@ Page({
282 this.setData({ 297 this.setData({
283 userInfo: result 298 userInfo: result
284 }) 299 })
300 console.log("queryMember result:", result);
285 resolve(result); 301 resolve(result);
286 }) 302 })
287 }); 303 });
...@@ -461,12 +477,18 @@ Page({ ...@@ -461,12 +477,18 @@ Page({
461 // 通用按钮 477 // 通用按钮
462 case "_evt_common_comp_button": 478 case "_evt_common_comp_button":
463 this.hideMask(); 479 this.hideMask();
480 if (options.share) {
481 app.router.push({
482 openType: "reLaunch",
483 path: "index"
484 })
485 } else {
464 wx.navigateBack({ 486 wx.navigateBack({
465 delta: 1 487 delta: 1
466 }); 488 });
489 }
467 break; 490 break;
468 491
469
470 // 去验证 492 // 去验证
471 case "_evt_to_verify": 493 case "_evt_to_verify":
472 this.hideMask(); 494 this.hideMask();
...@@ -475,10 +497,20 @@ Page({ ...@@ -475,10 +497,20 @@ Page({
475 497
476 // 暂不验证 498 // 暂不验证
477 case "_evt_not_verify": 499 case "_evt_not_verify":
500 let {
501 options
502 } = this.data;
478 this.hideMask(); 503 this.hideMask();
504 if (options.share) {
505 app.router.push({
506 openType: "reLaunch",
507 path: "index"
508 })
509 } else {
479 wx.navigateBack({ 510 wx.navigateBack({
480 delta: 1 511 delta: 1
481 }); 512 });
513 }
482 break; 514 break;
483 515
484 516
......
...@@ -84,7 +84,6 @@ $contentWidth:690px; ...@@ -84,7 +84,6 @@ $contentWidth:690px;
84 margin-left: 20px; 84 margin-left: 20px;
85 margin-top: 36px; 85 margin-top: 36px;
86 align-self: center; 86 align-self: center;
87
88 } 87 }
89 88
90 .t2 {} 89 .t2 {}
...@@ -173,10 +172,14 @@ $contentWidth:690px; ...@@ -173,10 +172,14 @@ $contentWidth:690px;
173 flex-wrap: wrap; 172 flex-wrap: wrap;
174 173
175 .t1 { 174 .t1 {
176 width: 50%; 175 width: 60%;
177 padding: 6px 0; 176 padding: 6px 0;
178 // @extend .bb; 177 // @extend .bb;
179 } 178 }
179
180 .t2 {
181 width: 40%;
182 }
180 } 183 }
181 184
182 &-table { 185 &-table {
......
...@@ -44,9 +44,9 @@ ...@@ -44,9 +44,9 @@
44 <view class="auction"> 44 <view class="auction">
45 <view class="auction-desc"> 45 <view class="auction-desc">
46 <view class="t1">产品原价:{{filter.Fen2Yuan(productInfo.originalPrice)}} 元</view> 46 <view class="t1">产品原价:{{filter.Fen2Yuan(productInfo.originalPrice)}} 元</view>
47 <view class="t1">起拍价:{{filter.Fen2Yuan(productInfo.startPrice)}}元</view> 47 <view class="t1 t2">起拍价:{{filter.Fen2Yuan(productInfo.startPrice)}}元</view>
48 <view class="t1">最小加价幅度:{{filter.Fen2Yuan(productInfo.minScope)}}元</view> 48 <view class="t1">单次加价范围:{{filter.Fen2Yuan(productInfo.minScope)}}-{{filter.Fen2Yuan(productInfo.maxScope)}}元</view>
49 <view class="t1">延时周期: {{filter.msTimeFormat(productInfo.delayPeriod)}}</view> 49 <view class="t1 t2">延时周期: {{filter.msTimeFormat(productInfo.delayPeriod)}}</view>
50 </view> 50 </view>
51 <view class="auction-table"> 51 <view class="auction-table">
52 <view wx:if="{{priceInfo && priceInfo.length > 0}}"> 52 <view wx:if="{{priceInfo && priceInfo.length > 0}}">
......
...@@ -10,6 +10,7 @@ var wxTimer; ...@@ -10,6 +10,7 @@ var wxTimer;
10 let app = getApp(); 10 let app = getApp();
11 Page({ 11 Page({
12 data: { 12 data: {
13 isOverShare: true,
13 authorizeVisible: false, 14 authorizeVisible: false,
14 seckillOrderVisible: false, 15 seckillOrderVisible: false,
15 commonTipsCompVisible: false, 16 commonTipsCompVisible: false,
...@@ -26,7 +27,19 @@ Page({ ...@@ -26,7 +27,19 @@ Page({
26 orderStatus: 0, // 0.未下单 1.下单成功 27 orderStatus: 0, // 0.未下单 1.下单成功
27 isTimeEnd: false, //倒计时结束 28 isTimeEnd: false, //倒计时结束
28 }, 29 },
29 onShareAppMessage() {}, 30 onShareAppMessage() {
31 let {
32 productInfo
33 } = this.data;
34 let title = `${productInfo.seckillName}秒杀热烈进行中!`;
35 let path = `pages/seckill-detail/seckill-detail?code=${productInfo.seckillCode}&share=true`;
36 let imageUrl = productInfo && productInfo.seckillImages[0] || "";
37 return {
38 title,
39 path,
40 imageUrl
41 }
42 },
30 showAuth() { 43 showAuth() {
31 this.setData({ 44 this.setData({
32 authorizeVisible: true 45 authorizeVisible: true
...@@ -287,9 +300,16 @@ Page({ ...@@ -287,9 +300,16 @@ Page({
287 // 通用按钮 300 // 通用按钮
288 case "_evt_common_comp_button": 301 case "_evt_common_comp_button":
289 this.hideMask(); 302 this.hideMask();
303 if (options.share) {
304 app.router.push({
305 openType: "reLaunch",
306 path: "index"
307 })
308 } else {
290 wx.navigateBack({ 309 wx.navigateBack({
291 delta: 1 310 delta: 1
292 }); 311 });
312 }
293 break; 313 break;
294 314
295 // 去验证 315 // 去验证
...@@ -300,10 +320,20 @@ Page({ ...@@ -300,10 +320,20 @@ Page({
300 320
301 // 暂不验证 321 // 暂不验证
302 case "_evt_not_verify": 322 case "_evt_not_verify":
323 let {
324 options
325 } = this.data;
303 this.hideMask(); 326 this.hideMask();
327 if (options.share) {
328 app.router.push({
329 openType: "reLaunch",
330 path: "index"
331 })
332 } else {
304 wx.navigateBack({ 333 wx.navigateBack({
305 delta: 1 334 delta: 1
306 }); 335 });
336 }
307 break; 337 break;
308 338
309 default: 339 default:
......
...@@ -199,8 +199,14 @@ Page({ ...@@ -199,8 +199,14 @@ Page({
199 } = this.data; 199 } = this.data;
200 let pics = []; 200 let pics = [];
201 files.forEach(element => { 201 files.forEach(element => {
202 if (element.path) {
202 pics.push(element.path) 203 pics.push(element.path)
204 }
203 }); 205 });
206 console.log("files:", files);
207 console.log("pics:", pics);
208 console.log("pics.lenght:", pics.length);
209 console.log("pics.length <= 0:", pics.length <= 0);
204 210
205 if (!name) { 211 if (!name) {
206 this.showTips("请输入真实姓名"); 212 this.showTips("请输入真实姓名");
...@@ -304,8 +310,6 @@ Page({ ...@@ -304,8 +310,6 @@ Page({
304 _this.setData({ 310 _this.setData({
305 files 311 files
306 }); 312 });
307 console.log("files:", files);
308 console.log("files[0]:", files[0]);
309 } 313 }
310 }) 314 })
311 }, 315 },
......