xuqiang 5 yıl önce
ebeveyn
işleme
378b07402c

+ 10 - 29
src/pages/minePublish.vue

@@ -35,7 +35,7 @@
                             </div>
                             </div>
                         </div>
                         </div>
                     </div>
                     </div>
-                    <div class="live" v-if="isMine && item.liveNow">
+                    <div class="live" v-if="item.liveNow">
                         <img
                         <img
                             src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/wechat/icon_kapai_zhibo@3x.png"
                             src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/wechat/icon_kapai_zhibo@3x.png"
                             alt=""
                             alt=""
@@ -50,6 +50,7 @@
                         <span>未直播</span>
                         <span>未直播</span>
                     </div> -->
                     </div> -->
                 </div>
                 </div>
+                <div class="border"></div>
             </div>
             </div>
         </div>
         </div>
         <van-empty
         <van-empty
@@ -75,20 +76,14 @@ export default {
             sort: '',
             sort: '',
             loading: false,
             loading: false,
             list: [],
             list: [],
-            sotrId: [],
             empty: false,
             empty: false,
-            isMine: false,
-            offsetTop: 0,
-            endTimeLists: []
+            liveNow: false
         };
         };
     },
     },
     computed: {
     computed: {
         ...mapState(['systemInfo', 'userStoreInfo']),
         ...mapState(['systemInfo', 'userStoreInfo']),
         dropCaseStatusList() {
         dropCaseStatusList() {
             let list = [...this.caseStatusList];
             let list = [...this.caseStatusList];
-            list = list.filter(item => {
-                return this.isMine || item.value !== 'UNDO';
-            });
             return [...list];
             return [...list];
         }
         }
     },
     },
@@ -108,32 +103,13 @@ export default {
             this.loading = true;
             this.loading = true;
             this.getStore().then(res => {
             this.getStore().then(res => {
                 this.storeInfo = res;
                 this.storeInfo = res;
+                // console.log(this.storeInfo);
                 this.getData();
                 this.getData();
-                // setTimeout(() => {
-                //     this.offsetTop = this.systemInfo.statusBarHeight + 44;
-                // }, 1000);
             });
             });
         },
         },
         getStore() {
         getStore() {
-            // console.log(this.userStoreInfo);
             if (this.userStoreInfo) {
             if (this.userStoreInfo) {
-                if (this.userStoreInfo.id.toString() === this.$mp.options.id || !this.$mp.options.id) {
-                    this.isMine = true;
-                    return this.$store.dispatch('getUserStore');
-                } else {
-                    this.isMine = false;
-                    return this.getStoreById(this.$mp.options.id);
-                }
-            } else {
-                return this.$store.dispatch('getUserStore').then(res => {
-                    if (res.id.toString() === this.$mp.options.id || !this.$mp.options.id) {
-                        this.isMine = true;
-                        return Promise.resolve(res);
-                    } else {
-                        this.isMine = false;
-                        return this.getStoreById(this.$mp.options.id);
-                    }
-                });
+                return this.$store.dispatch('getUserStore');
             }
             }
         },
         },
         getData() {
         getData() {
@@ -196,6 +172,11 @@ export default {
 .box-con {
 .box-con {
     margin: 20px 20px;
     margin: 20px 20px;
 }
 }
+.border {
+    height: 1px;
+    background: rgba(200, 201, 204, 0.15);
+    margin-top: 20px;
+}
 .product-card {
 .product-card {
     height: 115px;
     height: 115px;
     .flex();
     .flex();

+ 2 - 3
src/pages/store/homePage.vue

@@ -152,7 +152,6 @@ export default {
         ...mapState(['systemInfo', 'userStoreInfo']),
         ...mapState(['systemInfo', 'userStoreInfo']),
         dropCaseStatusList() {
         dropCaseStatusList() {
             let list = [...this.caseStatusList];
             let list = [...this.caseStatusList];
-            // console.log(list);
             list = list
             list = list
                 .filter(item => {
                 .filter(item => {
                     return this.isMineShop || item.value !== 'UNDO';
                     return this.isMineShop || item.value !== 'UNDO';
@@ -182,7 +181,7 @@ export default {
             this.loading = true;
             this.loading = true;
             this.getStore()
             this.getStore()
                 .then(res => {
                 .then(res => {
-                    console.log(res);
+                    // console.log(res);
                     this.storeInfo = res;
                     this.storeInfo = res;
                     this.getData();
                     this.getData();
                     setTimeout(() => {
                     setTimeout(() => {
@@ -252,7 +251,7 @@ export default {
             return this.$http.get('/store/get/' + id);
             return this.$http.get('/store/get/' + id);
         },
         },
         changeStatus(value) {
         changeStatus(value) {
-            console.log(value);
+            // console.log(value);
             this.caseStatus = value.detail;
             this.caseStatus = value.detail;
             this.sort = '';
             this.sort = '';
             this.needChange = true;
             this.needChange = true;

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

@@ -2,6 +2,9 @@
 {
 {
     "navigationBarTitleText": "新增商品",
     "navigationBarTitleText": "新增商品",
     "navigationBarBackgroundColor": "#ffffff",
     "navigationBarBackgroundColor": "#ffffff",
+     "usingComponents": {
+        "van-switch": "/vant/switch/index",
+    }
 }
 }
 </config>
 </config>
 <template>
 <template>
@@ -52,6 +55,20 @@
                 <span slot="right-icon">元</span>
                 <span slot="right-icon">元</span>
             </van-field>
             </van-field>
         </van-cell-group>
         </van-cell-group>
+        <div class="box-con">
+            <div class="box-top">
+                <div class="top">
+                    <span>限购选择</span>
+                </div>
+                <van-sticky :offset-top="0">
+                    <div class="time-box">
+                        <van-dropdown-menu direction="up">
+                            <van-dropdown-item @change="onChange" :value="times" :options="option2" />
+                        </van-dropdown-menu>
+                    </div>
+                </van-sticky>
+            </div>
+        </div>
         <div class="box-con">
         <div class="box-con">
             <!-- <div class="label">卡牌细节图</div>
             <!-- <div class="label">卡牌细节图</div>
             <van-uploader :file-list="images" :after-read="afterRead" @delete="deleteImg" /> -->
             <van-uploader :file-list="images" :after-read="afterRead" @delete="deleteImg" /> -->
@@ -178,6 +195,8 @@ export default {
                 packagesCount: null,
                 packagesCount: null,
                 caseStatus: 'PROGRESS',
                 caseStatus: 'PROGRESS',
                 cardCaseId: '',
                 cardCaseId: '',
+                special: false,
+                limitOne: false,
                 groupDTOS: []
                 groupDTOS: []
             },
             },
             name: '',
             name: '',
@@ -197,12 +216,14 @@ export default {
             list: [],
             list: [],
             actions: [],
             actions: [],
             time: 0,
             time: 0,
+            times: 1,
             typeOptions: [
             typeOptions: [
                 { id: 0, name: '组队模板(24队每队6人)', group: 24, groupCount: 6, special: false },
                 { id: 0, name: '组队模板(24队每队6人)', group: 24, groupCount: 6, special: false },
                 { id: 1, name: '端盒模板(AB组24对)', group: 2, groupCount: 24, special: true },
                 { id: 1, name: '端盒模板(AB组24对)', group: 2, groupCount: 24, special: true },
                 { id: 2, name: '组队模板(单组24包)', group: 1, groupCount: 24, special: false },
                 { id: 2, name: '组队模板(单组24包)', group: 1, groupCount: 24, special: false },
                 { id: 3, name: '组队模板(单组20包)', group: 1, groupCount: 20, special: false }
                 { id: 3, name: '组队模板(单组20包)', group: 1, groupCount: 20, special: false }
             ],
             ],
+            nameOptions: [{ id: 0, name: '是', limitOne: true }, { id: 1, name: '否', limitOne: false }],
             minDate: new Date(new Date().getFullYear() - 1, 10, 1).getTime(),
             minDate: new Date(new Date().getFullYear() - 1, 10, 1).getTime(),
             maxDate: new Date(new Date().getFullYear() + 2, 10, 1).getTime(),
             maxDate: new Date(new Date().getFullYear() + 2, 10, 1).getTime(),
             currentDate: new Date().getTime()
             currentDate: new Date().getTime()
@@ -217,6 +238,15 @@ export default {
                     value: item.id
                     value: item.id
                 };
                 };
             });
             });
+        },
+        option2() {
+            let list = [...this.nameOptions];
+            return list.map(item => {
+                return {
+                    text: item.name,
+                    value: item.id
+                };
+            });
         }
         }
     },
     },
     watch: {
     watch: {
@@ -306,27 +336,39 @@ export default {
         cancel() {
         cancel() {
             this.show = false;
             this.show = false;
         },
         },
+        onChange(e) {
+            this.times = e.detail;
+            let nameList = [...this.nameOptions].find(item => {
+                return item.id == this.times;
+            });
+            this.form.limitOne = nameList.limitOne;
+            // console.log(this.form.limitOne);
+        },
         // canChoose(info) {
         // canChoose(info) {
         //     return info.sold;
         //     return info.sold;
         // },
         // },
         cartBox() {
         cartBox() {
-            // console.log(this.form.caseStatus);
             this.$http.get('/cardCase/getCardCase', { id: this.$mp.query.id }).then(res => {
             this.$http.get('/cardCase/getCardCase', { id: this.$mp.query.id }).then(res => {
                 // console.log(res);
                 // console.log(res);
                 this.soldStatus = res.soldStatus;
                 this.soldStatus = res.soldStatus;
                 this.showId = res.id;
                 this.showId = res.id;
+                if (res.limitOne == true) {
+                    this.times = 0;
+                }
                 this.form = {
                 this.form = {
+                    id: res.id,
                     boxPrice: res.boxPrice,
                     boxPrice: res.boxPrice,
                     groupDTOS: res.groupDTOS,
                     groupDTOS: res.groupDTOS,
                     startTime: res.startTime,
                     startTime: res.startTime,
                     description: res.description,
                     description: res.description,
-                    id: res.id,
+                    limitOne: res.limitOne,
+                    special: res.special,
                     collectionId: res.collectionId,
                     collectionId: res.collectionId,
-                    // images: res.images,
                     caseStatus: res.caseStatus,
                     caseStatus: res.caseStatus,
                     packagesCount: res.packagesCount,
                     packagesCount: res.packagesCount,
-                    // boxesCount: res.boxesCount || null,
                     postage: res.postage || 0
                     postage: res.postage || 0
+                    // images: res.images,
+                    // boxesCount: res.boxesCount || null
                 };
                 };
                 // this.images = res.images.split(',').map(item => {
                 // this.images = res.images.split(',').map(item => {
                 //     return {
                 //     return {
@@ -388,10 +430,10 @@ export default {
                     special: params.special
                     special: params.special
                 })
                 })
                 .then(res => {
                 .then(res => {
-                    console.log(res);
+                    // console.log(res);
                     this.hideLoading();
                     this.hideLoading();
                     this.form.special = params.special;
                     this.form.special = params.special;
-                    // this.form.groupDTOS = res;
+                    this.form.groupDTOS = res;
                     // console.log(this.form.groupDTOS);
                     // console.log(this.form.groupDTOS);
                 })
                 })
                 .catch(e => {
                 .catch(e => {
@@ -472,6 +514,7 @@ export default {
             let cardCaseInputDTO = { ...this.form };
             let cardCaseInputDTO = { ...this.form };
             // let images = this.imageUrls.join(',');
             // let images = this.imageUrls.join(',');
             // cardCaseInputDTO.images = images;
             // cardCaseInputDTO.images = images;
+            console.log(cardCaseInputDTO);
             this.showLoading();
             this.showLoading();
             this.$http
             this.$http
                 .post('/cardCase/save', cardCaseInputDTO, {
                 .post('/cardCase/save', cardCaseInputDTO, {
@@ -484,17 +527,19 @@ export default {
                     this.id = res.id;
                     this.id = res.id;
                     this.hideLoading();
                     this.hideLoading();
                     this.form = {
                     this.form = {
+                        id: res.id,
                         boxPrice: res.boxPrice,
                         boxPrice: res.boxPrice,
+                        special: res.special,
                         groupDTOS: res.groupDTOS,
                         groupDTOS: res.groupDTOS,
                         startTime: res.startTime,
                         startTime: res.startTime,
                         description: res.description,
                         description: res.description,
-                        id: res.id,
                         collectionId: res.collectionId,
                         collectionId: res.collectionId,
-                        // images: res.images,
                         caseStatus: res.caseStatus,
                         caseStatus: res.caseStatus,
+                        limitOne: res.limitOne,
                         packagesCount: res.packagesCount,
                         packagesCount: res.packagesCount,
-                        // boxesCount: res.boxesCount || null,
                         postage: res.postage || 0
                         postage: res.postage || 0
+                        // images: res.images,
+                        // boxesCount: res.boxesCount || null
                     };
                     };
                     wx.showToast({
                     wx.showToast({
                         title: '商品上架成功'
                         title: '商品上架成功'

+ 1 - 0
src/pages/store/setting.vue

@@ -44,6 +44,7 @@ export default {
     },
     },
     onShow() {
     onShow() {
         let eventChannel = this.$mp.page.getOpenerEventChannel();
         let eventChannel = this.$mp.page.getOpenerEventChannel();
+        console.log(eventChannel);
         if (eventChannel && eventChannel.on) {
         if (eventChannel && eventChannel.on) {
             eventChannel.on('changeNick', data => {
             eventChannel.on('changeNick', data => {
                 this.updateInfo({
                 this.updateInfo({

+ 9 - 5
src/pages/walletdetails.vue

@@ -17,10 +17,11 @@
             </div>
             </div>
             <div class="box">
             <div class="box">
                 <div class="box-left">
                 <div class="box-left">
-                    <!-- <img src="../native/imgs/icon_jiage@3x.png" alt="" /> -->
+                    <img slot="left-icon" src="/native/imgs/icon_jiage@3x.png" alt="" />
                     <van-cell-group>
                     <van-cell-group>
                         <van-field
                         <van-field
                             type="digit"
                             type="digit"
+                            size="large"
                             :value="form.boxPrice"
                             :value="form.boxPrice"
                             @input="form.boxPrice = $event.detail"
                             @input="form.boxPrice = $event.detail"
                             placeholder="请输入金额"
                             placeholder="请输入金额"
@@ -33,7 +34,7 @@
             <div class="btom">
             <div class="btom">
                 <span>提现至</span>
                 <span>提现至</span>
                 <div>
                 <div>
-                    <img src="../native/imgs/png_weixin@3x.png" alt="" />
+                    <img src="/native/imgs/png_weixin@3x.png" alt="" />
                     <span>微信钱包</span>
                     <span>微信钱包</span>
                 </div>
                 </div>
             </div>
             </div>
@@ -123,6 +124,9 @@ export default {
     font-size: 16px !important;
     font-size: 16px !important;
     width: 100%;
     width: 100%;
 }
 }
+/deep/ .van-cell {
+    padding-left: 3px !important;
+}
 .top {
 .top {
     width: 375px;
     width: 375px;
     height: 491px;
     height: 491px;
@@ -130,7 +134,7 @@ export default {
     background: linear-gradient(180deg, #ff6c00 0%, #ffffff 100%);
     background: linear-gradient(180deg, #ff6c00 0%, #ffffff 100%);
     .box-con {
     .box-con {
         width: 335px;
         width: 335px;
-        height: 708px;
+        height: 690px;
         background: #ffffff;
         background: #ffffff;
         border-radius: 8px;
         border-radius: 8px;
         margin-left: 20px;
         margin-left: 20px;
@@ -156,6 +160,7 @@ export default {
             justify-content: space-between;
             justify-content: space-between;
             padding: 16px 16px 23px 16px;
             padding: 16px 16px 23px 16px;
             .box-left {
             .box-left {
+                .flex();
                 img {
                 img {
                     width: 15px;
                     width: 15px;
                     height: 17px;
                     height: 17px;
@@ -163,12 +168,11 @@ export default {
             }
             }
             .box-right {
             .box-right {
                 width: 70px;
                 width: 70px;
-                height: 31px;
                 border-radius: 8px;
                 border-radius: 8px;
                 border: 1px solid #ff6c00;
                 border: 1px solid #ff6c00;
                 font-size: 13px;
                 font-size: 13px;
                 color: #ff6c00;
                 color: #ff6c00;
-                font-weight: 500;
+                font-weight: bold;
                 line-height: 31px;
                 line-height: 31px;
                 text-align: center;
                 text-align: center;
             }
             }

+ 1 - 0
src/store/index.js

@@ -51,6 +51,7 @@ export default new Vuex.Store({
                     }
                     }
                 })
                 })
                 .then(res => {
                 .then(res => {
+                    console.log(res);
                     if (res.empty) {
                     if (res.empty) {
                         context.commit('setUserStoreInfo', null);
                         context.commit('setUserStoreInfo', null);
                         return Promise.reject();
                         return Promise.reject();