|
@@ -134,7 +134,7 @@ export default { |
|
@@ -134,7 +134,7 @@ export default { |
134
|
|
134
|
|
135
|
},
|
135
|
},
|
136
|
|
136
|
|
137
|
- beforeRouteEnter (to, from, next) {
|
137
|
+ beforeRouteEnter(to, from, next) {
|
138
|
|
138
|
|
139
|
next(vm => {
|
139
|
next(vm => {
|
140
|
// 通过 `vm` 访问组件实例
|
140
|
// 通过 `vm` 访问组件实例
|
|
@@ -161,12 +161,12 @@ export default { |
|
@@ -161,12 +161,12 @@ export default { |
161
|
this.showToast();
|
161
|
this.showToast();
|
162
|
}
|
162
|
}
|
163
|
},
|
163
|
},
|
164
|
- isShowDialog(val) {
|
|
|
165
|
|
164
|
|
166
|
- if (val) {
|
|
|
167
|
- this.showDialog();
|
|
|
168
|
- }
|
|
|
169
|
- },
|
165
|
+ // isShowDialog(val) {
|
|
|
166
|
+ // if (val) {
|
|
|
167
|
+ // this.showDialog();
|
|
|
168
|
+ // }
|
|
|
169
|
+ // },
|
170
|
|
170
|
|
171
|
addressInfo(val) {
|
171
|
addressInfo(val) {
|
172
|
|
172
|
|
|
@@ -174,6 +174,10 @@ export default { |
|
@@ -174,6 +174,10 @@ export default { |
174
|
this.computePrice();
|
174
|
this.computePrice();
|
175
|
}
|
175
|
}
|
176
|
|
176
|
|
|
|
177
|
+ },
|
|
|
178
|
+
|
|
|
179
|
+ inputPrice(val) {
|
|
|
180
|
+ console.log(val);
|
177
|
}
|
181
|
}
|
178
|
},
|
182
|
},
|
179
|
|
183
|
|
|
@@ -245,6 +249,7 @@ export default { |
|
@@ -245,6 +249,7 @@ export default { |
245
|
|
249
|
|
246
|
showDialog() {
|
250
|
showDialog() {
|
247
|
this.BUYER_ASK_SET_SHOWDIALOG(false);
|
251
|
this.BUYER_ASK_SET_SHOWDIALOG(false);
|
|
|
252
|
+ let that = this;
|
248
|
|
253
|
|
249
|
if (this.preTip) {
|
254
|
if (this.preTip) {
|
250
|
this.$createDialog({
|
255
|
this.$createDialog({
|
|
@@ -265,7 +270,7 @@ export default { |
|
@@ -265,7 +270,7 @@ export default { |
265
|
},
|
270
|
},
|
266
|
|
271
|
|
267
|
onConfirm: () => {
|
272
|
onConfirm: () => {
|
268
|
- this.publishProduct();
|
273
|
+ that.publishProduct();
|
269
|
},
|
274
|
},
|
270
|
|
275
|
|
271
|
onCancel: () => {
|
276
|
onCancel: () => {
|
|
@@ -274,13 +279,16 @@ export default { |
|
@@ -274,13 +279,16 @@ export default { |
274
|
|
279
|
|
275
|
}).show();
|
280
|
}).show();
|
276
|
} else {
|
281
|
} else {
|
277
|
- this.publishProduct();
|
282
|
+ that.publishProduct();
|
278
|
}
|
283
|
}
|
279
|
|
284
|
|
280
|
},
|
285
|
},
|
281
|
|
286
|
|
282
|
submitClick() {
|
287
|
submitClick() {
|
283
|
- this.buyerPrePublish({price: this.inputPrice, storage_id: this.storageId, address_id: this.addressInfo.address_id});
|
288
|
+ this.buyerPrePublish({price: this.inputPrice, storage_id: this.storageId, address_id: this.addressInfo.address_id})
|
|
|
289
|
+ .then(() => {
|
|
|
290
|
+ this.showDialog();
|
|
|
291
|
+ });
|
284
|
},
|
292
|
},
|
285
|
|
293
|
|
286
|
publishProduct() {
|
294
|
publishProduct() {
|
|
@@ -291,7 +299,7 @@ export default { |
|
@@ -291,7 +299,7 @@ export default { |
291
|
|
299
|
|
292
|
computePrice() {
|
300
|
computePrice() {
|
293
|
if (!this.inputPrice) {
|
301
|
if (!this.inputPrice) {
|
294
|
- console.log('inputPrice is null')
|
302
|
+ console.log('inputPrice is null');
|
295
|
return;
|
303
|
return;
|
296
|
}
|
304
|
}
|
297
|
this.buyerCompute({price: this.inputPrice, storage_id: this.storageId, address_id: this.addressInfo.address_id || '' });
|
305
|
this.buyerCompute({price: this.inputPrice, storage_id: this.storageId, address_id: this.addressInfo.address_id || '' });
|