Răsfoiți Sursa

寄售时间读取

panhui 4 ani în urmă
părinte
comite
06ab9505ed
1 a modificat fișierele cu 6 adăugiri și 2 ștergeri
  1. 6 2
      src/views/asset/Detail.vue

+ 6 - 2
src/views/asset/Detail.vue

@@ -342,6 +342,7 @@ export default {
             show: false,
             init: [],
             init2: null,
+            holdDays: 0,
             typeOptions: [
                 { label: '文本', value: 'text' },
                 { label: '二维码', value: 'qrcode' },
@@ -370,6 +371,9 @@ export default {
         setTimeout(() => {
             this.record();
         }, 1000);
+        this.$http.get('/sysConfig/get/hold_days').then(res => {
+            this.holdDays = Number(res.value);
+        });
     },
     methods: {
         allFn() {
@@ -462,8 +466,8 @@ export default {
                     return this.checkBank();
                 })
                 .then(() => {
-                    if (dayjs().isSameOrBefore(dayjs(this.orderInfo.payTime).add(5, 'days'))) {
-                        this.$toast('天后才能寄售');
+                    if (dayjs().isSameOrBefore(dayjs(this.orderInfo.payTime).add(this.holdDays, 'days'))) {
+                        this.$toast(this.holdDays + '天后才能寄售');
                     } else if (!this.info.consignment) {
                         Dialog.confirm({
                             title: '寄售上架',