|
|
@@ -378,15 +378,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.getProduct();
|
|
|
+ this.getProduct(true);
|
|
|
setTimeout(() => {
|
|
|
this.record();
|
|
|
}, 1000);
|
|
|
- this.$http.get('/sysConfig/get/hold_days').then(res => {
|
|
|
- this.holdDays = Number(res.value);
|
|
|
- // this.holdDays = 10;
|
|
|
- this.getTime();
|
|
|
- });
|
|
|
},
|
|
|
methods: {
|
|
|
allFn() {
|
|
|
@@ -579,13 +574,14 @@ export default {
|
|
|
startPosition: index
|
|
|
});
|
|
|
},
|
|
|
- getProduct() {
|
|
|
+ getProduct(init = false) {
|
|
|
this.$toast.loading({
|
|
|
message: '加载中...',
|
|
|
forbidClick: true
|
|
|
});
|
|
|
this.$http.get('/asset/get/' + this.$route.query.id).then(res => {
|
|
|
this.info = res;
|
|
|
+
|
|
|
if (res.orderId) {
|
|
|
this.$http.get('/order/get/' + res.orderId).then(res => {
|
|
|
this.orderInfo = res;
|
|
|
@@ -619,8 +615,16 @@ export default {
|
|
|
this.btn = this.$refs.btn;
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
- this.$toast.clear();
|
|
|
+ console.log(init);
|
|
|
+ if (init) {
|
|
|
+ this.$http.get('/sysConfig/get/hold_days').then(res => {
|
|
|
+ this.holdDays = Number(res.value);
|
|
|
+ // this.holdDays = 10;
|
|
|
+ this.getTime();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$toast.clear();
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
likeProduct() {
|
|
|
@@ -673,10 +677,11 @@ export default {
|
|
|
}
|
|
|
if (!this.dayjs().isBefore(this.dayjs(startTime, 'YYYY-MM-DD HH:mm:ss'))) {
|
|
|
if (this.getProduct) {
|
|
|
- this.getProduct();
|
|
|
+ this.getProduct(false);
|
|
|
}
|
|
|
this.startTime = '';
|
|
|
} else {
|
|
|
+ this.$toast.clear();
|
|
|
this.timer = setTimeout(() => {
|
|
|
this.getTime();
|
|
|
}, 1000);
|