xuqiang 5 lat temu
rodzic
commit
aa85e5c089

+ 7 - 7
src/components/AllorderInfo.vue

@@ -192,13 +192,13 @@ export default {
         //     });
         // },
         sales() {
-            // let userId = this.$store.state.userInfo.id;
-            // if (userId !== this.$store.state.userInfo.id) {
-            //     this.navigateTo('/pages/chat?toUserId=' + this.userId + '&toName=' + this.storeName);
-            // } else {
-            //     this.toast('此商品是你店铺所有');
-            // }
-            // console.log(this.storeId);
+            console.log(this.all.storeUserId);
+            let userId = this.$store.state.userInfo.id;
+            if (userId == this.all.storeUserId) {
+                this.toast('此商品是你店铺所有');
+            } else {
+                this.navigateTo('/pages/chat?toUserId=' + this.userId + '&toName=' + this.storeName);
+            }
         },
         logisticCopy() {
             wx.setClipboardData({

+ 5 - 3
src/components/AllselloutInfo.vue

@@ -233,11 +233,13 @@ export default {
             });
         },
         Buyers() {
+            console.log(this.all);
             let userId = this.$store.state.userInfo.id;
-            if (userId !== this.$store.state.userInfo.id) {
-                this.navigateTo('/pages/chat?toUserId=' + this.all.userId + '&toName=' + this.userNickName);
-            } else {
+            if (userId == this.all.storeUserId) {
+                console.log('===');
                 this.toast('此商品是你店铺所有');
+            } else {
+                this.navigateTo('/pages/chat?toUserId=' + this.all.userId + '&toName=' + this.userNickName);
             }
         },
         cancel() {

+ 6 - 0
src/pages/Applydetails.vue

@@ -134,6 +134,12 @@ export default {
                 });
         },
         sales() {
+            // console.log(this.store.userId);
+            let userId = this.$store.state.userInfo.id;
+            if (userId == this.store.userId) {
+                this.toast('此商品是你店铺所有');
+                return;
+            }
             this.navigateTo('/pages/chat?toUserId=' + this.store.userId + '&toName=' + this.store.storeName);
         },
         orderCopy() {

+ 3 - 7
src/pages/Home.vue

@@ -96,8 +96,7 @@ export default {
             seriesId: 0,
             seriesName: '',
             isSeries: true,
-            columns: [],
-            banners: []
+            columns: []
         };
     },
     computed: {
@@ -158,7 +157,6 @@ export default {
                 .then(res => {
                     this.hideLoading();
                     this.list = res;
-                    this.banners = res.list.image;
                     if (res.length === 0) {
                         this.empty = true;
                     }
@@ -235,7 +233,6 @@ export default {
         }
     },
     onShow() {
-        console.log(this.seriesName);
         if (!this.seriesId) {
             return;
         }
@@ -243,9 +240,8 @@ export default {
     },
     onShareAppMessage() {
         return {
-            title: '卓卡——' + this.seriesName,
-            path: '/pages/Home?id=' + this.list.cardCaseId,
-            imageUrl: this.banners.length > 0 ? this.banners[0] : ''
+            title: '卓卡',
+            path: '/pages/Home'
         };
     }
 };

+ 5 - 0
src/pages/allselldetails.vue

@@ -422,6 +422,11 @@ export default {
                 });
         },
         Buyers() {
+            let userId = this.$store.state.userInfo.id;
+            if (userId == this.store.userId) {
+                this.toast('此商品是你店铺所有');
+                return;
+            }
             this.navigateTo('/pages/chat?toUserId=' + this.status.userId + '&toName=' + this.user.nickname);
         },
         logistics() {

+ 1 - 7
src/pages/orderdetails.vue

@@ -416,6 +416,7 @@ export default {
             });
         },
         sales() {
+            console.log(this.store);
             let userId = this.$store.state.userInfo.id;
             if (userId == this.store.userId) {
                 this.toast('此商品是你店铺所有');
@@ -435,13 +436,6 @@ export default {
             // }
         },
         pay() {
-            if (this.allTime == 0) {
-                wx.showToast({
-                    icon: 'none',
-                    title: '订单已取消,请重新购买'
-                });
-                return;
-            }
             wx.showLoading({
                 title: '加载中'
             });

+ 71 - 70
src/pages/store/productEdit.vue

@@ -33,14 +33,14 @@
                 readonly
             >
             </van-field>
-            <van-field
+            <!-- <van-field
                 label="拼箱人数"
                 type="number"
                 :value="form.boxesCount"
                 @input="form.boxesCount = $event.detail"
                 placeholder="请输入参加人数"
             >
-            </van-field>
+            </van-field> -->
             <van-field
                 label="邮费"
                 :value="form.postage"
@@ -50,8 +50,8 @@
             </van-field>
         </van-cell-group>
         <div class="box-con">
-            <div class="label">卡牌细节图</div>
-            <van-uploader :file-list="images" :after-read="afterRead" @delete="deleteImg" />
+            <!-- <div class="label">卡牌细节图</div>
+            <van-uploader :file-list="images" :after-read="afterRead" @delete="deleteImg" /> -->
             <div v-if="!showId">
                 <div class="box-top">
                     <div class="top">
@@ -65,7 +65,7 @@
                         </div>
                     </van-sticky>
                 </div>
-                <div class="box" v-if="switchs">
+                <!-- <div class="box" v-if="switchs">
                     <div class="top">
                         <div class="right">
                             <div class="tool-item">
@@ -86,7 +86,7 @@
                             </div>
                         </div>
                     </div>
-                </div>
+                </div> -->
             </div>
             <div class="box" v-if="showId">
                 <div class="top2">
@@ -167,7 +167,7 @@ export default {
                 code: 1,
                 id: '',
                 postage: '',
-                boxesCount: '',
+                // boxesCount: null,
                 boxPrice: '',
                 startTime: '',
                 description: '',
@@ -183,18 +183,18 @@ export default {
             newShow: false,
             showId: false,
             id: 0,
-            images: [],
+            // images: [],
             cardList: [],
-            imagesList: [],
-            imageUrls: [],
+            // imagesList: [],
+            // imageUrls: [],
             nowChooseId: [],
             sotrId: [],
             list: [],
             actions: [],
             time: 0,
             typeOptions: [
-                { id: 0, name: '组队模板(24组6包)', group: 24, groupCount: 6, special: false },
-                { id: 1, name: '端盒模板(AB组)', group: 2, groupCount: 24, special: true },
+                { id: 0, name: '组队模板(24队每队6人)', group: 24, groupCount: 6, special: false },
+                { id: 1, name: '端盒模板(AB组24对)', group: 2, groupCount: 24, special: true },
                 { id: 2, name: '组队模板(单组24包)', group: 1, groupCount: 24, special: false },
                 { id: 3, name: '组队模板(单组20包)', group: 1, groupCount: 20, special: false }
             ],
@@ -316,18 +316,18 @@ export default {
                     description: res.description,
                     id: res.id,
                     collectionId: res.collectionId,
-                    images: res.images,
+                    // images: res.images,
                     caseStatus: res.caseStatus,
                     packagesCount: res.packagesCount,
-                    boxesCount: res.boxesCount || 0,
+                    // boxesCount: res.boxesCount || null,
                     postage: res.postage || 0
                 };
-                this.images = res.images.split(',').map(item => {
-                    return {
-                        url: item
-                    };
-                });
-                this.imageUrls = res.images.split(',');
+                // this.images = res.images.split(',').map(item => {
+                //     return {
+                //         url: item
+                //     };
+                // });
+                // this.imageUrls = res.images.split(',');
             });
         },
         select(e) {
@@ -383,6 +383,7 @@ export default {
                 .then(res => {
                     console.log(res);
                     this.hideLoading();
+                    this.form.special = params.special;
                     this.form.groupDTOS = res;
                     console.log(this.form.groupDTOS);
                 })
@@ -394,37 +395,37 @@ export default {
                     });
                 });
         },
-        afterRead(file) {
-            this.showLoading();
-            this.$http
-                .uploadFile(file.path)
-                .then(res => {
-                    if (this.images.length > 2) {
-                        this.toast('最多上传三张图片');
-                        return;
-                    }
-                    this.hideLoading();
-                    this.imagesList.push({ ...file, url: res });
-                    this.images = [...this.imagesList];
-                    this.imageUrls.push(res);
-                    // console.log(this.images);
-                })
-                .catch(e => {
-                    this.hideLoading();
-                    wx.showToast({
-                        icon: 'none',
-                        title: e.error
-                    });
-                });
-        },
-        deleteImg(e) {
-            let list = [...this.images];
-            list.splice(e.detail.index, 1);
-            this.images = list;
-            this.imageUrls = list.map(item => {
-                return item.url;
-            });
-        },
+        // afterRead(file) {
+        //     this.showLoading();
+        //     this.$http
+        //         .uploadFile(file.path)
+        //         .then(res => {
+        //             if (this.images.length > 2) {
+        //                 this.toast('最多上传三张图片');
+        //                 return;
+        //             }
+        //             this.hideLoading();
+        //             this.imagesList.push({ ...file, url: res });
+        //             this.images = [...this.imagesList];
+        //             this.imageUrls.push(res);
+        //             // console.log(this.images);
+        //         })
+        //         .catch(e => {
+        //             this.hideLoading();
+        //             wx.showToast({
+        //                 icon: 'none',
+        //                 title: e.error
+        //             });
+        //         });
+        // },
+        // deleteImg(e) {
+        //     let list = [...this.images];
+        //     list.splice(e.detail.index, 1);
+        //     this.images = list;
+        //     this.imageUrls = list.map(item => {
+        //         return item.url;
+        //     });
+        // },
         submit() {
             if (!this.name) {
                 wx.showToast({
@@ -447,23 +448,23 @@ export default {
                 });
                 return;
             }
-            if (!this.form.boxesCount) {
-                wx.showToast({
-                    icon: 'none',
-                    title: '请选拼箱人数'
-                });
-                return;
-            }
-            if (this.imageUrls.length == 0) {
-                wx.showToast({
-                    icon: 'none',
-                    title: '请添加图片'
-                });
-                return;
-            }
+            // if (!this.form.boxesCount) {
+            //     wx.showToast({
+            //         icon: 'none',
+            //         title: '请选拼箱人数'
+            //     });
+            //     return;
+            // }
+            // if (this.imageUrls.length == 0) {
+            //     wx.showToast({
+            //         icon: 'none',
+            //         title: '请添加图片'
+            //     });
+            //     return;
+            // }
             let cardCaseInputDTO = { ...this.form };
-            let images = this.imageUrls.join(',');
-            cardCaseInputDTO.images = images;
+            // let images = this.imageUrls.join(',');
+            // cardCaseInputDTO.images = images;
             this.showLoading();
             this.$http
                 .post('/cardCase/save', cardCaseInputDTO, {
@@ -482,10 +483,10 @@ export default {
                         description: res.description,
                         id: res.id,
                         collectionId: res.collectionId,
-                        images: res.images,
+                        // images: res.images,
                         caseStatus: res.caseStatus,
                         packagesCount: res.packagesCount,
-                        boxesCount: res.boxesCount || 0,
+                        // boxesCount: res.boxesCount || null,
                         postage: res.postage || 0
                     };
                     wx.showToast({
@@ -547,7 +548,7 @@ export default {
             font-size: 14px;
             font-weight: bold;
             color: #000000;
-            margin-left: -3px;
+            margin: 35px 0 0 -3px;
             line-height: 24px;
         }
         .box-top {