73bdaaf5 by simon

默认提交

1 parent 87fca6e1
...@@ -14,6 +14,9 @@ Page({ ...@@ -14,6 +14,9 @@ Page({
14 auctionBidVisible: false, 14 auctionBidVisible: false,
15 auctionBidSuccessVisible: false, 15 auctionBidSuccessVisible: false,
16 auctionBidFailVisible: false, 16 auctionBidFailVisible: false,
17 commonTipsCompVisible: false,
18 innerTitle: "提示",
19 innerText: "",
17 userInfo: {}, 20 userInfo: {},
18 productInfo: {}, 21 productInfo: {},
19 priceInfo: [], 22 priceInfo: [],
...@@ -161,6 +164,7 @@ Page({ ...@@ -161,6 +164,7 @@ Page({
161 let _this = this; 164 let _this = this;
162 return new Promise((resolve, reject) => { 165 return new Promise((resolve, reject) => {
163 app.post({ 166 app.post({
167 toast: false,
164 url: app.api.auctionDetail, 168 url: app.api.auctionDetail,
165 data: { 169 data: {
166 auctionCode: code 170 auctionCode: code
...@@ -174,12 +178,16 @@ Page({ ...@@ -174,12 +178,16 @@ Page({
174 // }) 178 // })
175 resolve(); 179 resolve();
176 }).catch((err) => { 180 }).catch((err) => {
177 clearTimeout(_this.data.navBackTimeout); 181 // clearTimeout(_this.data.navBackTimeout);
178 _this.data.navBackTimeout = setTimeout(() => { 182 // _this.data.navBackTimeout = setTimeout(() => {
179 wx.navigateBack({ 183 // wx.navigateBack({
180 delta: 1 184 // delta: 1
181 }); 185 // });
182 }, 1000); 186 // }, 1000);
187 _this.setData({
188 commonTipsCompVisible: true,
189 innerText: err.errMsg || "您未达到进入条件"
190 })
183 }); 191 });
184 }) 192 })
185 }, 193 },
...@@ -192,6 +200,7 @@ Page({ ...@@ -192,6 +200,7 @@ Page({
192 let code = this.data.options.code; 200 let code = this.data.options.code;
193 if (code) { 201 if (code) {
194 app.post({ 202 app.post({
203 toast: false,
195 url: app.api.auctionRecordLast, 204 url: app.api.auctionRecordLast,
196 data: { 205 data: {
197 auctionCode: code 206 auctionCode: code
...@@ -433,6 +442,13 @@ Page({ ...@@ -433,6 +442,13 @@ Page({
433 this.onSubmitHandler(); 442 this.onSubmitHandler();
434 break; 443 break;
435 444
445 // 通用按钮
446 case "_evt_common_comp_button":
447 wx.navigateBack({
448 delta: 1
449 });
450 break;
451
436 default: 452 default:
437 break; 453 break;
438 } 454 }
......
...@@ -96,3 +96,7 @@ ...@@ -96,3 +96,7 @@
96 <van-popup show="{{ auctionBidFailVisible }}"> 96 <van-popup show="{{ auctionBidFailVisible }}">
97 <auction-bid-fail-comp inner-title="出价失败" bind:evtcomp="evtcomp"></auction-bid-fail-comp> 97 <auction-bid-fail-comp inner-title="出价失败" bind:evtcomp="evtcomp"></auction-bid-fail-comp>
98 </van-popup> 98 </van-popup>
99
100 <van-popup show="{{ commonTipsCompVisible }}">
101 <common-tips-comp bind:evtcomp="evtcomp" inner-title="{{innerTitle}}" inner-text="{{innerText}}"></common-tips-comp>
102 </van-popup>
......
...@@ -12,6 +12,9 @@ Page({ ...@@ -12,6 +12,9 @@ Page({
12 data: { 12 data: {
13 authorizeVisible: false, 13 authorizeVisible: false,
14 seckillOrderVisible: false, 14 seckillOrderVisible: false,
15 commonTipsCompVisible: false,
16 innerTitle: "提示",
17 innerText: "",
15 userInfo: {}, 18 userInfo: {},
16 productInfo: {}, 19 productInfo: {},
17 navBackTimeout: 0, 20 navBackTimeout: 0,
...@@ -134,6 +137,7 @@ Page({ ...@@ -134,6 +137,7 @@ Page({
134 let _this = this; 137 let _this = this;
135 return new Promise((resolve, reject) => { 138 return new Promise((resolve, reject) => {
136 app.post({ 139 app.post({
140 toast: false,
137 url: app.api.seckillDetail, 141 url: app.api.seckillDetail,
138 data: { 142 data: {
139 seckillCode: code 143 seckillCode: code
...@@ -145,12 +149,16 @@ Page({ ...@@ -145,12 +149,16 @@ Page({
145 console.log("result:", result); 149 console.log("result:", result);
146 resolve(); 150 resolve();
147 }).catch((err) => { 151 }).catch((err) => {
148 clearTimeout(_this.data.navBackTimeout); 152 // clearTimeout(_this.data.navBackTimeout);
149 _this.data.navBackTimeout = setTimeout(() => { 153 // _this.data.navBackTimeout = setTimeout(() => {
150 wx.navigateBack({ 154 // wx.navigateBack({
151 delta: 1 155 // delta: 1
152 }); 156 // });
153 }, 1000); 157 // }, 1000);
158 _this.setData({
159 commonTipsCompVisible: true,
160 innerText: err.errMsg || "您未达到进入条件"
161 })
154 }); 162 });
155 }) 163 })
156 }, 164 },
...@@ -260,6 +268,13 @@ Page({ ...@@ -260,6 +268,13 @@ Page({
260 this.querySeckillSubmit(data); 268 this.querySeckillSubmit(data);
261 break; 269 break;
262 270
271 // 通用按钮
272 case "_evt_common_comp_button":
273 wx.navigateBack({
274 delta: 1
275 });
276 break;
277
263 default: 278 default:
264 break; 279 break;
265 } 280 }
......
...@@ -53,3 +53,7 @@ ...@@ -53,3 +53,7 @@
53 <van-popup show="{{ seckillOrderVisible }}"> 53 <van-popup show="{{ seckillOrderVisible }}">
54 <seckill-order-comp id="seckillOrderComp" product-info="{{productInfo}}" user-info="{{userInfo}}" order-status="{{orderStatus}}" is-sell-out="{{isSellOut}}" bind:evtcomp="evtcomp"></seckill-order-comp> 54 <seckill-order-comp id="seckillOrderComp" product-info="{{productInfo}}" user-info="{{userInfo}}" order-status="{{orderStatus}}" is-sell-out="{{isSellOut}}" bind:evtcomp="evtcomp"></seckill-order-comp>
55 </van-popup> 55 </van-popup>
56 <van-popup show="{{ commonTipsCompVisible }}">
57 <common-tips-comp bind:evtcomp="evtcomp" inner-title="{{innerTitle}}" inner-text="{{innerText}}"></common-tips-comp>
58 </van-popup>
59
......