|
|
@@ -316,9 +316,6 @@ import { Dialog } from 'vant';
|
|
|
import HashCode from '../../components/product/HashCode.vue';
|
|
|
import ProductTitle from '../../components/product/ProductTitle.vue';
|
|
|
import ProductBanner from '../../components/product/ProductBanner.vue';
|
|
|
-import dayjs from 'dayjs';
|
|
|
-var isSameOrBefore = require('dayjs/plugin/isSameOrBefore');
|
|
|
-dayjs.extend(isSameOrBefore);
|
|
|
export default {
|
|
|
components: {
|
|
|
HashCode,
|
|
|
@@ -465,7 +462,7 @@ export default {
|
|
|
return this.checkBank();
|
|
|
})
|
|
|
.then(() => {
|
|
|
- if (dayjs().isSameOrBefore(dayjs(this.orderInfo.payTime).add(this.holdDays, 'days'))) {
|
|
|
+ if (this.dayjs().diff(this.dayjs(this.info.createdAt), 'day') < this.holdDays) {
|
|
|
this.$toast('持有满' + this.holdDays + '天才能寄售');
|
|
|
} else if (!this.info.consignment) {
|
|
|
Dialog.confirm({
|
|
|
@@ -506,7 +503,7 @@ export default {
|
|
|
}).then(() => {
|
|
|
this.$router.push('/Authentication');
|
|
|
});
|
|
|
- } else if (dayjs().isSameOrBefore(dayjs(this.orderInfo.payTime).add(this.holdDays, 'days'))) {
|
|
|
+ } else if (this.dayjs().diff(this.dayjs(this.info.createdAt), 'day') < this.holdDays) {
|
|
|
this.$toast('持有满' + this.holdDays + '天才能转赠');
|
|
|
} else if (this.userInfo.authStatus === 'SUCCESS') {
|
|
|
this.$router.push('/giveSearch?id=' + this.info.id);
|