xuqiang 4 年之前
父節點
當前提交
ccfee20738
共有 4 個文件被更改,包括 100 次插入54 次删除
  1. 1 0
      src/pages/Home.vue
  2. 3 5
      src/pages/allselldetails.vue
  3. 45 2
      src/pages/minePublish.vue
  4. 51 47
      src/pages/store/productEdit.vue

+ 1 - 0
src/pages/Home.vue

@@ -156,6 +156,7 @@ export default {
                 .get('/cardCase/showCasesMA', data)
                 .then(res => {
                     this.hideLoading();
+                    console.log(res);
                     this.list = res;
                     if (res.length === 0) {
                         this.empty = true;

+ 3 - 5
src/pages/allselldetails.vue

@@ -54,15 +54,13 @@
                 <img :src="store.logo" alt="" />
                 <p>{{ store.storeName }}</p>
             </div>
-            <div class="box-tit-seller">共{{ status.length }}件商品</div>
+            <div class="box-tit-seller">共{{ status.cardBoxList.length }}件商品</div>
         </div>
         <div class="box-tit2" v-if="status.orderStatus == 'REFUND' || status.orderStatus == 'REFUNDED'">
             <div>
-                <p>
-                    退款商品
-                </p>
+                <p>退款商品</p>
             </div>
-            <div class="box-tit-seller">共{{ status.length }}件商品</div>
+            <div class="box-tit-seller">共{{ status.cardBoxList.length }}件商品</div>
         </div>
         <div v-for="(item, index) in Boxes" :key="index.id">
             <div class="box-con">

+ 45 - 2
src/pages/minePublish.vue

@@ -5,18 +5,61 @@
 </config>
 <template>
     <div>
+        <div v-for="(item, index) in Boxes" :key="index.id">
+            <div class="box-con">
+                <div class="box-con-Cards">
+                    <img :src="cardCaseInfo.images[0]" alt="" />
+                    <div class="box-con-right">
+                        <p class="box-con-tit">{{ cardCaseInfo.name }}</p>
+                        <div class="box-con-today">
+                            <p>卡盒选号: {{ item.groupCode + item.boxCode }}</p>
+                        </div>
+                        <div class="box-con-money">
+                            <div class="box-con-num">
+                                <p>¥{{ item.boxPrice }}</p>
+                            </div>
+                            <p>×1</p>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
         <van-empty
             image="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/wechat/kong_png_wofabude.png"
             description="你还没有发布商品哦~"
         >
-            <van-button type="primary" block>去发布</van-button>
+            <van-button type="primary" block @click="navigateTo('/pages/store/productEdit')">去发布</van-button>
         </van-empty>
     </div>
 </template>
 
 <script>
 export default {
-    name: 'MinePublish'
+    name: 'MinePublish',
+    data() {
+        return {};
+    },
+    methods: {
+        Applydetail() {
+            this.showLoading();
+            this.$http
+                .get('/orderInfo/get/' + this.$mp.query.id)
+                .then(res => {
+                    this.hideLoading();
+                    this.cardCaseInfo = res.cardCase.collection;
+                    this.ApplydetailList = res;
+                    this.store = res.store;
+                    this.cardBoxList = res.cardBoxList;
+                    this.Boxes = res.cardBoxList;
+                })
+                .catch(e => {
+                    this.hideLoading();
+                    if (e.error) {
+                        this.toast(e.rror);
+                    }
+                });
+        }
+    }
 };
 </script>
 

+ 51 - 47
src/pages/store/productEdit.vue

@@ -49,43 +49,43 @@
         <div class="box-con">
             <div class="label">卡牌细节图</div>
             <van-uploader :file-list="images" :after-read="afterRead" @delete="deleteImg(images)" />
-            <!-- <div v-if="showId == this.$mp.query.id"> -->
-            <div class="box-top">
-                <div class="top">
-                    <span>选择卡包</span>
-                </div>
-                <van-sticky :offset-top="0">
-                    <div class="time-box">
-                        <van-dropdown-menu>
-                            <van-dropdown-item @change="change" :value="time" :options="option1" />
-                        </van-dropdown-menu>
+            <div v-if="!showId">
+                <div class="box-top">
+                    <div class="top">
+                        <span>选择卡包</span>
                     </div>
-                </van-sticky>
-            </div>
-            <div class="box" v-if="switchs">
-                <div class="top">
-                    <div class="right">
-                        <div class="tool-item">
-                            出售中
+                    <van-sticky :offset-top="0">
+                        <div class="time-box">
+                            <van-dropdown-menu>
+                                <van-dropdown-item @change="change" :value="time" :options="option1" />
+                            </van-dropdown-menu>
                         </div>
-                        <div class="tool-item used">
-                            下架
+                    </van-sticky>
+                </div>
+                <div class="box" v-if="switchs">
+                    <div class="top">
+                        <div class="right">
+                            <div class="tool-item">
+                                出售中
+                            </div>
+                            <div class="tool-item used">
+                                下架
+                            </div>
                         </div>
                     </div>
-                </div>
-                <div class="content">
-                    <div class="card" v-for="(card, index) in form.groupDTOS" :key="index">
-                        <div class="card-title">第{{ index + 1 }}组</div>
-                        <div class="card-list">
-                            <div v-for="(item, itemIndex) in card.dynamicTags" :key="itemIndex" class="card-item">
-                                {{ itemIndex + 1 }}
+                    <div class="content">
+                        <div class="card" v-for="(card, index) in form.groupDTOS" :key="index">
+                            <div class="card-title">第{{ index + 1 }}组</div>
+                            <div class="card-list">
+                                <div v-for="(item, itemIndex) in card.dynamicTags" :key="itemIndex" class="card-item">
+                                    {{ itemIndex + 1 }}
+                                </div>
                             </div>
                         </div>
                     </div>
                 </div>
             </div>
-            <!-- </div> -->
-            <!-- <div class="box" v-if="showId == this.$mp.query.id">
+            <div class="box" v-if="showId">
                 <div class="top2">
                     <span>选择卡包</span>
                     <div class="right">
@@ -98,7 +98,7 @@
                     </div>
                 </div>
                 <div class="content">
-                    <div class="card" v-for="(card, index) in cardList" :key="index">
+                    <div class="card" v-for="(card, index) in groupDTOS" :key="index">
                         <div class="card-title">第{{ index + 1 }}组</div>
                         <div class="card-list">
                             <div
@@ -115,7 +115,7 @@
                         </div>
                     </div>
                 </div>
-            </div> -->
+            </div>
             <div class="label">卡牌详情描述</div>
             <van-field
                 :value="form.description"
@@ -177,6 +177,7 @@ export default {
             closeFlag: false,
             newShow: false,
             showId: false,
+            groupDTOS: [],
             images: [],
             imagesList: [],
             imageUrls: [],
@@ -217,9 +218,9 @@ export default {
             }
         }
     },
-    // onLoad() {
-    //     this.cartBox();
-    // },
+    onLoad() {
+        this.cartBox();
+    },
     methods: {
         cardInit() {
             this.showLoading();
@@ -289,20 +290,20 @@ export default {
         canChoose(info) {
             return info.sold;
         },
-        // cartBox() {
-        //     this.$http.get('/cardCase/getCardCase', { id: 2767 }).then(res => {
-        //         console.log(res);
-        //         this.cardList = res.groupDTOS;
-        //         this.showId = res.id;
-        //         this.form = {
-        //             boxPrice: res.boxPrice,
-        //             startTime: res.startTime,
-        //             description: res.description,
-        //             boxesCount: res.boxesCount || 0,
-        //             postage: res.postage || 10
-        //         };
-        //     });
-        // },
+        cartBox() {
+            this.$http.get('/cardCase/getCardCase', { id: this.$mp.query.id }).then(res => {
+                console.log(res);
+                this.groupDTOS = res.groupDTOS;
+                this.showId = res.id;
+                this.form = {
+                    boxPrice: res.boxPrice,
+                    startTime: res.startTime,
+                    description: res.description,
+                    boxesCount: res.boxesCount || 0,
+                    postage: res.postage || 10
+                };
+            });
+        },
         select(e) {
             if (this.closeFlag) {
                 this.name = e.detail.name;
@@ -438,7 +439,9 @@ export default {
             }
             let cardCaseInputDTO = { ...this.form };
             let images = this.imageUrls.join(',');
+            let groupDTOS = this.groupDTOS;
             cardCaseInputDTO.images = images;
+            cardCaseInputDTO.groupDTOS = groupDTOS;
             this.showLoading();
             this.$http
                 .post('/cardCase/save', cardCaseInputDTO, {
@@ -451,6 +454,7 @@ export default {
                     wx.showToast({
                         title: '商品上架成功'
                     });
+                    this.navigateTo('/pages/store/homePage');
                 })
                 .catch(e => {
                     this.hideLoading();