xuqiang 4 лет назад
Родитель
Сommit
cf5a044e62

+ 1 - 1
.env.development

@@ -1 +1 @@
-VUE_APP_BASE_URL=http://localhost:8080
+VUE_APP_BASE_URL=https://zhuoka.izouma.com

+ 1 - 1
project.config.json

@@ -23,7 +23,7 @@
     "compileHotReLoad": false,
     "useMultiFrameRuntime": true,
     "useApiHook": true,
-    "useApiHostProcess": false,
+    "useApiHostProcess": true,
     "babelSetting": {
       "ignore": [],
       "disablePlugins": [],

+ 2 - 1
src/components/CardCase.vue

@@ -5,7 +5,7 @@
                 <div class="text1" v-if="chooseIds.length > 0">
                     已选<span>{{ chooseIds.length }}</span
                     >包,共<span>{{ money }}</span
-                    >元,邮费10元
+                    >元,邮费10}
                 </div>
                 <div v-else>请选择卡包</div>
             </div>
@@ -140,6 +140,7 @@ export default {
             this.nowChoose = list;
         },
         submit() {
+            console.log(this.cardCaseInfo);
             // console.log(this.cardList);
             if (this.nowChoose.length === 0) {
                 this.toast('请选择卡牌');

+ 1 - 1
src/pages/details.vue

@@ -137,7 +137,7 @@ export default {
                     return this.$http.get('/store/get/' + res.cardCaseInfo.storeId);
                 })
                 .then(res => {
-                    console.log(res);
+                    // console.log(res);
                     this.storeInfo = res;
                 })
                 .catch(e => {

+ 1 - 1
src/pages/minePublish.vue

@@ -81,7 +81,7 @@ export default {
             return [...list];
         },
         time() {
-            if (this.list.endTime) {
+            if (this.list[0].endTime) {
                 let date = dayjs(this.list.endTime, 'YYYY-MM-DD HH:mm:ss');
 
                 return date.diff(dayjs());

+ 54 - 43
src/pages/store/productEdit.vue

@@ -48,7 +48,7 @@
         </van-cell-group>
         <div class="box-con">
             <div class="label">卡牌细节图</div>
-            <van-uploader :file-list="images[0]" :after-read="afterRead" @delete="deleteImg(images)" />
+            <van-uploader :file-list="images" :after-read="afterRead" @delete="deleteImg(images)" />
             <div v-if="!showId">
                 <div class="box-top">
                     <div class="top">
@@ -159,9 +159,10 @@ export default {
     data() {
         return {
             form: {
-                collectionId: 0,
-                seriesId: 0,
+                collectionId: '',
+                seriesId: '',
                 code: 1,
+                id: '',
                 postage: 10,
                 boxesCount: '',
                 boxPrice: '',
@@ -169,6 +170,7 @@ export default {
                 description: '',
                 packagesCount: null,
                 caseStatus: 'PROGRESS',
+                cardCaseId: '',
                 groupDTOS: []
             },
             name: '',
@@ -292,6 +294,7 @@ export default {
             return info.sold;
         },
         cartBox() {
+            console.log(this.form.caseStatus);
             this.$http.get('/cardCase/getCardCase', { id: this.$mp.query.id }).then(res => {
                 console.log(res);
                 this.showId = res.id;
@@ -300,6 +303,11 @@ export default {
                     groupDTOS: res.groupDTOS,
                     startTime: res.startTime,
                     description: res.description,
+                    id: res.id,
+                    collectionId: res.collectionId,
+                    images: res.images,
+                    caseStatus: res.caseStatus,
+                    packagesCount: res.packagesCount,
                     boxesCount: res.boxesCount || 0,
                     postage: res.postage || 10
                 };
@@ -396,47 +404,47 @@ export default {
             // this.images.splice(this.imagesList, 1);
         },
         submit() {
-            // if (!this.name) {
-            //     wx.showToast({
-            //         icon: 'none',
-            //         title: '请选择卡牌名称'
-            //     });
-            //     return;
-            // }
-            // if (!this.form.boxPrice) {
-            //     wx.showToast({
-            //         icon: 'none',
-            //         title: '请填写价格'
-            //     });
-            //     return;
-            // }
-            // if (!this.form.startTime) {
-            //     wx.showToast({
-            //         icon: 'none',
-            //         title: '请选择结束时间'
-            //     });
-            //     return;
-            // }
-            // if (!this.form.boxesCount) {
-            //     wx.showToast({
-            //         icon: 'none',
-            //         title: '请选拼箱人数'
-            //     });
-            //     return;
-            // }
-            // if (this.images.length == 0) {
-            //     wx.showToast({
-            //         icon: 'none',
-            //         title: '请添加图片'
-            //     });
-            //     return;
-            // }
+            if (!this.name) {
+                wx.showToast({
+                    icon: 'none',
+                    title: '请选择卡牌名称'
+                });
+                return;
+            }
+            if (!this.form.boxPrice) {
+                wx.showToast({
+                    icon: 'none',
+                    title: '请填写价格'
+                });
+                return;
+            }
+            if (!this.form.startTime) {
+                wx.showToast({
+                    icon: 'none',
+                    title: '请选择结束时间'
+                });
+                return;
+            }
+            if (!this.form.boxesCount) {
+                wx.showToast({
+                    icon: 'none',
+                    title: '请选拼箱人数'
+                });
+                return;
+            }
+            if (this.images.length == 0) {
+                wx.showToast({
+                    icon: 'none',
+                    title: '请添加图片'
+                });
+                return;
+            }
             let cardCaseInputDTO = { ...this.form };
             let images = this.imageUrls.join(',');
             cardCaseInputDTO.images = images;
-            console.log(this.form.groupDTOS);
-            console.log('=========');
-            console.log(cardCaseInputDTO);
+            // console.log(this.form.groupDTOS);
+            // console.log('=========');
+            // console.log(cardCaseInputDTO);
             this.showLoading();
             this.$http
                 .post('/cardCase/save', cardCaseInputDTO, {
@@ -453,11 +461,14 @@ export default {
                         groupDTOS: res.groupDTOS,
                         startTime: res.startTime,
                         description: res.description,
+                        id: res.id,
+                        collectionId: res.collectionId,
+                        images: res.images,
+                        caseStatus: res.caseStatus,
+                        packagesCount: res.packagesCount,
                         boxesCount: res.boxesCount || 0,
                         postage: res.postage || 10
                     };
-                    console.log('++++++++++++');
-                    console.log(this.form);
                     wx.showToast({
                         title: '商品上架成功'
                     });