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

+ 18 - 6
src/components/AllorderInfo.vue

@@ -40,7 +40,7 @@
                 <div v-if="status == 'CANCELED'" @click="deletes" class="box-but">删除订单</div>
                 <div v-if="status == 'CANCELED'" @click="again" class="box-but3">重新购买</div>
                 <div v-if="status == 'REFUND'" @click="cancelrefund" class="box-but">取消退款</div>
-                <div v-if="status == 'REFUND'" @click="sales" class="box-but3">联系家</div>
+                <div v-if="status == 'REFUND'" @click="sales" class="box-but3">联系家</div>
                 <div v-if="status == 'REFUNDED'" @click="deletes" class="box-but">删除订单</div>
                 <div v-if="status == 'REFUNDED'" @click="applydetails" class="box-but3">退款详情</div>
             </div>
@@ -84,6 +84,7 @@ export default {
             show: false,
             stepsList: [],
             logisTics: [],
+            userId: '',
             refundId: 0
         };
     },
@@ -100,6 +101,15 @@ export default {
         caseId() {
             return this.all.caseId || 0;
         },
+        storeId() {
+            return this.all.storeId || 0;
+        },
+        userNickName() {
+            return this.all.userNickName || '';
+        },
+        storeName() {
+            return this.all.storeName || '';
+        },
         name() {
             if (this.all.status === 'CREATED') {
                 return '待支付';
@@ -169,13 +179,14 @@ export default {
         again() {
             this.navigateTo('/pages/details?id=' + this.caseId);
         },
-        sales() {
-            console.log(this.all);
-            wx.showToast({
-                title: '敬请开放',
-                icon: 'none'
+        userIds() {
+            this.$http.get('/store/get/' + this.storeId).then(res => {
+                this.userId = res.userId;
             });
         },
+        sales() {
+            this.navigateTo('/pages/chat?toUserId=' + this.userId + '&toName=' + this.storeName);
+        },
         logisticCopy() {
             wx.setClipboardData({
                 data: this.logisTics.number + '',
@@ -337,6 +348,7 @@ export default {
     },
     created() {
         this.rufundApply();
+        this.userIds();
     }
 };
 </script>

+ 1 - 1
src/components/CardCase.vue

@@ -140,7 +140,7 @@ export default {
             this.nowChoose = list;
         },
         submit() {
-            console.log(this.cardCaseInfo);
+            // console.log(this.cardCaseInfo);
             // console.log(this.cardList);
             if (this.nowChoose.length === 0) {
                 this.toast('请选择卡牌');

+ 1 - 0
src/main.js

@@ -46,6 +46,7 @@ export default {
             'pages/follow',
             'pages/setting',
             'pages/wallet',
+            'pages/walletdetails',
             'pages/authorized',
             'pages/questions',
             'pages/rule',

+ 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 => {

+ 14 - 10
src/pages/minePublish.vue

@@ -9,7 +9,6 @@
             <div class="box-con" v-for="(item, index) in list" :key="index" @click="detail(item.cardCaseId)">
                 <div class="product-card">
                     <van-image width="80" height="115" :src="item.image" fit="cover" radius="6" />
-
                     <div class="product-content">
                         <div class="text1">{{ item.caseName }}</div>
                         <div class="text2">
@@ -20,7 +19,6 @@
                             <span>已拼箱</span>
                             <span class="val">{{ item.preorder || 0 }}/{{ item.total || 0 }}</span>
                         </div>
-
                         <div class="flex1"></div>
                         <div class="box">
                             <div class="price">
@@ -28,11 +26,12 @@
                                 <span>{{ item.price }}</span>
                             </div>
                             <div class="button">
-                                <van-button type="primary" size="small">管理拼箱</van-button>
+                                <van-button type="primary" size="small" @click.stop="live(item.cardCaseId)"
+                                    >管理拼箱</van-button
+                                >
                             </div>
                         </div>
                     </div>
-
                     <div class="live">
                         <img
                             src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/wechat/icon_kapai_zhibo@3x.png"
@@ -48,6 +47,7 @@
             image="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/wechat/kong_png_wukabao.png"
             description="暂无卡包信息哦~"
         >
+            <van-button type="primary" block @click="navigateTo('/pages/store/productEdit')">去发布</van-button>
         </van-empty>
     </div>
 </template>
@@ -68,7 +68,8 @@ export default {
             sotrId: [],
             empty: false,
             isMineShop: false,
-            offsetTop: 0
+            offsetTop: 0,
+            endTimeList: []
         };
     },
     computed: {
@@ -81,8 +82,8 @@ export default {
             return [...list];
         },
         time() {
-            if (this.list[0].endTime) {
-                let date = dayjs(this.list.endTime, 'YYYY-MM-DD HH:mm:ss');
+            if (this.endTimeList) {
+                let date = dayjs(this.endTimeList, 'YYYY-MM-DD HH:mm:ss');
 
                 return date.diff(dayjs());
             } else {
@@ -97,6 +98,9 @@ export default {
     },
     methods: {
         detail(cardCaseId) {
+            this.navigateTo('/pages/details?id=' + cardCaseId);
+        },
+        live(cardCaseId) {
             this.navigateTo('/pages/store/productEdit?id=' + cardCaseId);
         },
         loginMethods() {
@@ -110,7 +114,7 @@ export default {
             });
         },
         getStore() {
-            console.log(this.userStoreInfo);
+            // console.log(this.userStoreInfo);
             if (this.userStoreInfo) {
                 if (this.userStoreInfo.id.toString() === this.$mp.options.id || !this.$mp.options.id) {
                     this.isMineShop = true;
@@ -154,8 +158,8 @@ export default {
             this.showLoading();
             return this.$http.post('/store/findStoreCases', data).then(res => {
                 this.list = res.caseInfo;
-                console.log(this.list);
-                console.log(this.list.endTime);
+                // this.endTimeList = res.caseInfo[0].endTime;
+                // console.log(this.endTimeList);
                 if (res.caseInfo.length == 0) {
                     this.empty = true;
                 }

+ 2 - 11
src/pages/orderdetails.vue

@@ -51,7 +51,7 @@
                 <img :src="store.logo" alt="" />
                 <p>{{ store.storeName }}</p>
             </div>
-            <div class="box-tit-seller" @click.stop="wait">联系卖家</div>
+            <div class="box-tit-seller" @click="sales">联系卖家</div>
         </div>
         <div v-for="(item, index) in Boxes" :key="index.id">
             <div class="box-con">
@@ -416,16 +416,7 @@ export default {
             });
         },
         sales() {
-            wx.showToast({
-                title: '敬请开放',
-                icon: 'none'
-            });
-        },
-        seller() {
-            wx.showToast({
-                title: '敬请开放',
-                icon: 'none'
-            });
+            this.navigateTo('/pages/chat?toUserId=' + this.store.userId + '&toName=' + this.store.storeName);
         },
         Apply() {
             this.navigateTo('/pages/Apply?id=' + this.orderInfoId);

+ 18 - 19
src/pages/wallet.vue

@@ -54,7 +54,6 @@
 </template>
 
 <script>
-import dayjs from 'dayjs';
 import BillInfo from '../components/BillInfo.vue';
 export default {
     components: { BillInfo },
@@ -92,24 +91,24 @@ export default {
             });
         },
         Withdrawal() {
-            this.showLoading();
-            let userId = this.$store.state.userInfo.id;
-            this.$http
-                .post('/memberInfo/newWithDraw', { userId, money: this.moneyInfo.money })
-                .then(res => {
-                    this.hideLoading();
-                    console.log(res);
-                    wx.showToast({
-                        title: '提现成功'
-                    });
-                })
-                .catch(e => {
-                    this.hideLoading();
-                    wx.showToast({
-                        icon: 'none',
-                        title: e.error
-                    });
-                });
+            // this.showLoading();
+            // let userId = this.$store.state.userInfo.id;
+            // this.$http
+            //     .post('/memberInfo/newWithDraw', { userId, money: this.moneyInfo.money })
+            //     .then(res => {
+            //         this.hideLoading();
+            //         console.log(res);
+            //         wx.showToast({
+            //             title: '提现成功'
+            //         });
+            //     })
+            //     .catch(e => {
+            //         this.hideLoading();
+            //         wx.showToast({
+            //             icon: 'none',
+            //             title: e.error
+            //         });
+            //     });
         },
         record(e) {
             this.time = e.detail;

+ 18 - 0
src/pages/walletdetails.vue

@@ -0,0 +1,18 @@
+<config>
+{
+    "navigationBarTitleText": "提现",
+    "navigationBarBackgroundColor": "#FF6C00",
+    "navigationBarTextStyle": "white",
+    "backgroundColorTop":'#FF6C00',
+    "backgroundColorBottom":'#FFFFFF',
+}
+</config>
+<template>
+    <div></div>
+</template>
+<script>
+export default {
+    data() {}
+};
+</script>
+<style lang="less" scoped></style>