panhui 3 лет назад
Родитель
Сommit
4e6c52d6da

BIN
src/main/modern-point/src/assets/dingdan_icon_dizhi.png


BIN
src/main/modern-point/src/assets/dingdan_icon_wuliu.png


+ 199 - 0
src/main/modern-point/src/components/order/PostInfo.vue

@@ -0,0 +1,199 @@
+<template>
+    <router-link
+        :to="{
+            path: '/postDetail',
+            query: {
+                id: info.id
+            }
+        }"
+        class="orderInfo"
+    >
+        <div class="order-top">
+            <span>{{ info.name }}</span>
+            <span class="status">{{ getLabelName(info.status, statusOptions) }}</span>
+        </div>
+        <div class="order">
+            <van-image :radius="6" width="80" height="80" :src="getImg(changeImgs(info.pic))" fit="cover" />
+
+            <div class="content">
+                <div class="name van-multi-ellipsis--l2">
+                    {{ info.name }}
+                </div>
+                <div class="text" v-if="info.number">编号:{{ info.number }}</div>
+                <div class="flex1"></div>
+                <!-- <div class="price">¥{{ info.price }}</div> -->
+            </div>
+        </div>
+        <!-- <div class="total-price">
+            <span class="time flex1">{{ info.payTime }}</span>
+            <span>实际支付</span>
+            <span class="priceColor">¥{{ info.totalPrice }}</span>
+        </div> -->
+
+        <!-- <div class="btns" v-if="info.status === 'DELIVERY' || info.status === 'RECEIVE'">
+            <van-button color="#939599" @click.prevent="cancel" plain size="mini" round> 取消订单 </van-button>
+        </div> -->
+    </router-link>
+</template>
+
+<script>
+import post from '../../mixins/post';
+import product from '../../mixins/product';
+export default {
+    props: {
+        info: {
+            type: Object,
+            default: () => {
+                return {};
+            }
+        }
+    },
+    // setup() {
+    //     const click = function () {
+    //         // console.log('wyt6w');
+    //     };
+
+    //     return { click };
+    // },
+    mixins: [post, product],
+    methods: {
+        delInit() {
+            this.$emit('delFn');
+        },
+        cancel() {
+            this.$dialog
+                .confirm({
+                    title: '提示',
+                    message: '确定取消订单吗?'
+                })
+                .then(() => {
+                    this.$http.post('/assetPost/updateStatus/?id=' + this.info.id + '&status=CANCELLED').then(() => {
+                        this.$emit('update:info', {
+                            ...this.info,
+                            status: 'CANCELLED'
+                        });
+                        this.$toast.success('取消成功');
+                    });
+                });
+            // this.$http
+            //     .post('/order/hide/', {
+            //         id: this.info.id
+            //     })
+            //     .then(() => {
+            //         this.$toast.success('删除成功');
+            //         setTimeout(() => {
+            //             this.delInit();
+            //         }, 1000);
+            //     });
+        },
+        likeProduct() {
+            if (!this.info.liked) {
+                this.$http.get(`/collection/${this.info.id}/like`).then(() => {
+                    this.$emit('update:info', {
+                        ...this.info,
+                        liked: true,
+                        likes: this.info.likes + 1
+                    });
+                    this.$toast.success('收藏成功');
+                });
+            } else {
+                this.$http.get(`/collection/${this.info.id}/unlike`).then(() => {
+                    this.$emit('update:info', {
+                        ...this.info,
+                        liked: false,
+                        likes: this.info.likes - 1
+                    });
+                    this.$toast.success('取消收藏');
+                });
+            }
+        }
+    }
+};
+</script>
+
+<style lang="less" scoped>
+.orderInfo {
+    background: @bg;
+    border-radius: 12px;
+    color: @text0;
+    padding: 16px 10px 0;
+    margin: 20px 16px 0;
+    display: block;
+}
+.order-top {
+    display: flex;
+    justify-content: space-between;
+    span {
+        font-size: 14px;
+        color: @text0;
+        line-height: 22px;
+    }
+
+    .status {
+        color: @prim;
+    }
+}
+
+.order {
+    display: flex;
+    padding: 16px 0;
+    .van-image {
+        flex-shrink: 0;
+    }
+    .content {
+        flex-grow: 1;
+        margin-left: 10px;
+        display: flex;
+        flex-direction: column;
+        overflow: hidden;
+        .name {
+            font-size: @font2;
+            font-weight: bold;
+            line-height: 22px;
+        }
+        .text {
+            font-size: @font2;
+            color: @text3;
+            line-height: 24px;
+            margin-top: 4px;
+        }
+
+        .price {
+            font-size: @font2;
+            font-weight: bold;
+            line-height: 24px;
+        }
+    }
+}
+.total-price {
+    font-size: 14px;
+    font-weight: bold;
+    color: @text0;
+    line-height: 60px;
+    text-align: right;
+    .flex();
+    span {
+        &:last-child {
+            color: @prim;
+            margin-left: 10px;
+            font-size: 16px;
+        }
+    }
+
+    .time {
+        text-align: left;
+        color: @text3;
+        font-size: @font2;
+        font-weight: normal;
+    }
+}
+.btns {
+    // border-top: 1px solid #202122;
+    padding: 0 0 16px;
+    display: flex;
+    flex-direction: row-reverse;
+    .van-button {
+        padding: 3px 17px;
+    }
+}
+</style>

+ 2 - 2
src/main/modern-point/src/mixins/common.js

@@ -154,12 +154,12 @@ export default {
                 return Promise.reject();
                 return Promise.reject();
             }
             }
         },
         },
-        getLabelName(val = '', list = []) {
+        getLabelName(val = '', list = [], key = 'label') {
             let info = list.find(item => {
             let info = list.find(item => {
                 return item.value === val;
                 return item.value === val;
             });
             });
 
 
-            return info ? info.label : '';
+            return info ? info[key] : '';
         },
         },
         scrollRefreash() {
         scrollRefreash() {
             this.$toast.clear();
             this.$toast.clear();

+ 16 - 0
src/main/modern-point/src/mixins/post.js

@@ -0,0 +1,16 @@
+export default {
+    data() {
+        return {
+            statusOptions: [
+                { label: '待发货', value: 'DELIVERY', text: '付款成功!等待平台发货' },
+                { label: '待收货', value: 'RECEIVE', text: '订单已发货!' },
+                { label: '已完成', value: 'FINISH', text: '支付成功,等待平台确认交易' },
+                { label: '已取消', value: 'CANCELLED', text: '订单已取消' }
+            ],
+            payMethodOptions: [
+                { label: '微信', value: 'WEIXIN' },
+                { label: '支付宝', value: 'ALIPAY' }
+            ]
+        };
+    }
+};

+ 16 - 0
src/main/modern-point/src/router/index.js

@@ -410,6 +410,22 @@ const routes = [
             title: 'Cosmos Art'
             title: 'Cosmos Art'
         }
         }
     },
     },
+    {
+        path: '/postOrders',
+        name: 'postOrders',
+        component: () => import('../views/order/PostOrders.vue'),
+        meta: {
+            title: 'Cosmos Art'
+        }
+    },
+    {
+        path: '/postDetail',
+        name: 'postDetail',
+        component: () => import('../views/order/PostDetail.vue'),
+        meta: {
+            title: 'Cosmos Art'
+        }
+    },
     {
     {
         path: '/activityList',
         path: '/activityList',
         name: 'activityList',
         name: 'activityList',

+ 12 - 4
src/main/modern-point/src/views/Discover.vue

@@ -17,7 +17,7 @@
             </swiper-slide>
             </swiper-slide>
         </swiper>
         </swiper>
 
 
-        <van-grid :border="false" :column-num="$store.state.review ? 4 : 5">
+        <van-grid :border="false" :column-num="5">
             <van-grid-item text="精选推荐" :to="{ path: '/productList' }">
             <van-grid-item text="精选推荐" :to="{ path: '/productList' }">
                 <template v-slot:icon>
                 <template v-slot:icon>
                     <img class="grid-img" src="@assets/info_icon_jingxuanxilie.png" />
                     <img class="grid-img" src="@assets/info_icon_jingxuanxilie.png" />
@@ -43,11 +43,19 @@
                     <img class="grid-img" src="@assets/info_icon_xiliehuodong.png" />
                     <img class="grid-img" src="@assets/info_icon_xiliehuodong.png" />
                 </template>
                 </template>
             </van-grid-item>
             </van-grid-item>
-            <!-- <van-grid-item text="铸造商店" @click="wait">
+            <van-grid-item
+                text="衍生品"
+                :to="{
+                    path: '/productList',
+                    query: {
+                        type: 'DERIVATIVE'
+                    }
+                }"
+            >
                 <template v-slot:icon>
                 <template v-slot:icon>
                     <img class="grid-img" src="@assets/info_icon_zhuzaoshangdian.png" />
                     <img class="grid-img" src="@assets/info_icon_zhuzaoshangdian.png" />
                 </template>
                 </template>
-            </van-grid-item> -->
+            </van-grid-item>
         </van-grid>
         </van-grid>
 
 
         <div class="box" v-if="box.length > 0">
         <div class="box" v-if="box.length > 0">
@@ -107,7 +115,7 @@
         <div class="box">
         <div class="box">
             <page-title title="更多藏品" :isLink="false"></page-title>
             <page-title title="更多藏品" :isLink="false"></page-title>
             <van-list
             <van-list
-                style="padding-bottom: 100px"
+                style="padding-bottom: 100px;"
                 class="box-list"
                 class="box-list"
                 v-model:loading="loading"
                 v-model:loading="loading"
                 :finished="finished"
                 :finished="finished"

+ 3 - 3
src/main/modern-point/src/views/Mine.vue

@@ -21,7 +21,7 @@
                     />
                     />
                     <div class="text">
                     <div class="text">
                         <div class="text1">
                         <div class="text1">
-                            <span class="van-ellipsis" style="max-width: 120px">{{ userInfo.nickname }}</span>
+                            <span class="van-ellipsis" style="max-width: 120px;">{{ userInfo.nickname }}</span>
 
 
                             <img
                             <img
                                 @click="$router.push('/verifiedSuc')"
                                 @click="$router.push('/verifiedSuc')"
@@ -106,9 +106,9 @@
                 <img src="@assets/info_icon_shangpindingdan.png" alt="" />
                 <img src="@assets/info_icon_shangpindingdan.png" alt="" />
                 <span>作品订单</span>
                 <span>作品订单</span>
             </div>
             </div>
-            <div class="order-info" @click="wait">
+            <div class="order-info" @click="$router.push('/postOrders')">
                 <img src="@assets/info_icon_zhuzaodingdan.png" alt="" />
                 <img src="@assets/info_icon_zhuzaodingdan.png" alt="" />
-                <span>铸造订单</span>
+                <span>衍生品订单</span>
             </div>
             </div>
         </div>
         </div>
 
 

+ 5 - 3
src/main/modern-point/src/views/asset/Detail.vue

@@ -147,7 +147,7 @@
                     <div class="prive" v-if="init.length > 0">
                     <div class="prive" v-if="init.length > 0">
                         <div class="prive1" :class="{ opened: item.opened }" v-for="(item, index) in init" :key="index">
                         <div class="prive1" :class="{ opened: item.opened }" v-for="(item, index) in init" :key="index">
                             <img v-if="!item.opened" class="img" :src="item.icon[0]" alt="" />
                             <img v-if="!item.opened" class="img" :src="item.icon[0]" alt="" />
-                            <div style="margin-top: 4px" v-if="item.icon[2]">
+                            <div style="margin-top: 4px;" v-if="item.icon[2]">
                                 <img v-if="item.opened" class="img" :src="item.icon[2]" alt="" />
                                 <img v-if="item.opened" class="img" :src="item.icon[2]" alt="" />
                             </div>
                             </div>
                             <!-- <img class="img" v-else :src="item.icon[0]" alt="" /> -->
                             <!-- <img class="img" v-else :src="item.icon[0]" alt="" /> -->
@@ -188,7 +188,7 @@
                             <div class="text4">{{ item.createdAt.substr(0, 16) }}</div>
                             <div class="text4">{{ item.createdAt.substr(0, 16) }}</div>
                         </div>
                         </div>
                     </div>
                     </div>
-                    <div v-else style="display: flex; justify-content: center">暂无购买记录</div>
+                    <div v-else style="display: flex; justify-content: center;">暂无购买记录</div>
                 </van-collapse-item>
                 </van-collapse-item>
             </van-collapse>
             </van-collapse>
 
 
@@ -215,7 +215,9 @@
                 <van-button type="primary" block round @click="Consignment">
                 <van-button type="primary" block round @click="Consignment">
                     {{ info.consignment ? '取消寄售' : '寄售上架' }}
                     {{ info.consignment ? '取消寄售' : '寄售上架' }}
                 </van-button>
                 </van-button>
-                <!-- <van-button class="btn1" type="primary" round @click="post">邮寄</van-button> -->
+                <van-button v-if="info.type === 'DERIVATIVE'" class="btn1" type="primary" round @click="post"
+                    >邮寄</van-button
+                >
             </div>
             </div>
         </div>
         </div>
         <van-popup v-model:show="show">
         <van-popup v-model:show="show">

+ 23 - 110
src/main/modern-point/src/views/asset/Post.vue

@@ -33,26 +33,27 @@
             </div>
             </div>
         </div>
         </div>
 
 
-        <div class="pay" v-if="!$store.state.review">
+        <!-- <div class="pay" v-if="!$store.state.review">
             <div class="pay-item" @click="payType = item.type" v-for="(item, index) in payInfos" :key="index">
             <div class="pay-item" @click="payType = item.type" v-for="(item, index) in payInfos" :key="index">
                 <img :src="item.icon" alt="" />
                 <img :src="item.icon" alt="" />
                 <span>{{ item.name }}</span>
                 <span>{{ item.name }}</span>
                 <img class="choose-icon" :src="payType === item.type ? icons[1] : icons[0]" alt="" />
                 <img class="choose-icon" :src="payType === item.type ? icons[1] : icons[0]" alt="" />
             </div>
             </div>
-        </div>
+        </div> -->
 
 
         <div class="bottom van-safe-area-bottom" ref="bottom">
         <div class="bottom van-safe-area-bottom" ref="bottom">
             <div class="bottom-content">
             <div class="bottom-content">
-                <span class="text">GAS费</span>
-                <span class="price"> <img src="@assets/jiage_huang.png" alt="" />{{ gas }} </span>
+                <!-- <span class="text">GAS费</span>
+                <span class="price"> <img src="@assets/jiage_huang.png" alt="" />{{ gas }} </span> -->
                 <div class="btn">
                 <div class="btn">
                     <van-button
                     <van-button
                         round
                         round
                         :color="`linear-gradient(135deg, ${$colors.prim} 0%, ${$colors.warn} 100%)`"
                         :color="`linear-gradient(135deg, ${$colors.prim} 0%, ${$colors.warn} 100%)`"
                         @click="submit"
                         @click="submit"
                         :disabled="!!orderId"
                         :disabled="!!orderId"
+                        block
                     >
                     >
-                        立即支付
+                        立即兑换
                     </van-button>
                     </van-button>
                 </div>
                 </div>
                 <a id="pay" :href="hrefUrl"></a>
                 <a id="pay" :href="hrefUrl"></a>
@@ -255,116 +256,27 @@ export default {
                 });
                 });
         },
         },
         submit() {
         submit() {
-            if (!this.payType) {
-                this.$toast('请选择支付方式');
+            if (!this.addressInfo.id) {
+                this.$toast('请选择收货地址');
                 return;
                 return;
             }
             }
-            this.createOrder()
+            this.$toast.loading({
+                message: '加载中...',
+                forbidClick: true
+            });
+            this.$http
+                .post('/assetPost/assetPost?assetId=' + this.assetId + '&addressId=' + this.addressInfo.id)
                 .then(res => {
                 .then(res => {
-                    this.$toast.clear();
-                    this.orderId = res.id;
-                    this.$router.replace({ query: { ...this.$route.query, orderId: res.id } });
-                    this.$nextTick(() => {
-                        if (this.$store.state.review) {
-                            window.store.order('358');
-                            this.getOrder(true);
-                        } else if (this.payType === 'ALIPAY') {
-                            if (this.inWeixin) {
-                                document.location.replace(
-                                    resolveUrl(this.$baseUrl, '/payOrder/mint/alipay_wx?id=' + res.id)
-                                );
-                            } else {
-                                this.$http
-                                    .get(`/payOrder/mint/${this.inApp ? 'alipay_app' : 'alipay_h5'}?id=${res.id}`)
-                                    .then(res => {
-                                        this.$toast.clear();
-                                        this.hrefUrl = 'alipays://platformapi/startapp?saId=10000007&qrcode=' + res;
-                                        // window.open(
-                                        //     'alipays://platformapi/startapp?saId=10000007&qrcode=' + res,
-                                        //     '_blank'
-                                        // );
-                                        this.$nextTick(() => {
-                                            document.getElementById('pay').click();
-                                        });
-
-                                        this.$toast.loading({
-                                            message: '加载中...',
-                                            forbidClick: true
-                                        });
-                                        this.getOrder(true);
-                                    })
-                                    .catch(e => {
-                                        if (e.error) {
-                                            this.$toast(e.error);
-                                        }
-                                    });
-                            }
-                        } else if (this.payType === 'WEIXIN') {
-                            this.$toast.loading('加载中');
-                            this.$http
-                                .post('/payOrder/mint/weixin', {
-                                    id: res.id,
-                                    channel: this.payChannel,
-                                    openId: localStorage.getItem('openId') || 'oWJG55wLnwdVzXoKka1-DzQKOd_Y'
-                                })
-                                .then(res => {
-                                    if ('wx_pub' === this.payChannel) {
-                                        console.log('wxPayParams', res);
-                                        wx.chooseWXPay({
-                                            ...res,
-                                            success(res) {
-                                                this.$toast.success('支付成功');
-                                                setTimeout(() => {
-                                                    this.$router.replace('/orders');
-                                                }, 1000);
-                                            },
-                                            fail(e) {
-                                                console.log(e);
-                                                this.$toast('支付失败,请稍后再试');
-                                            }
-                                        });
-                                    } else {
-                                        this.$toast.clear();
-                                        this.hrefUrl = res.scheme_code;
-                                        this.$nextTick(() => {
-                                            document.getElementById('pay').click();
-                                        });
-
-                                        this.$toast.loading({
-                                            message: '加载中...',
-                                            forbidClick: true
-                                        });
-                                        this.getOrder(true);
-                                    }
-                                    // console.log({
-                                    //     ...res,
-                                    //     package: res.package || res.packageValue
-                                    // });
-                                    // let _this = this;
-                                    // wx.chooseWXPay({
-                                    //     ...res,
-                                    //     package: res.package || res.packageValue,
-                                    //     timestamp: res.timeStamp,
-                                    //     success(res) {
-                                    //         _this.$toast.success('支付成功');
-                                    //         setTimeout(() => {
-                                    //             _this.$router.replace('/orders');
-                                    //         }, 1000);
-                                    //     },
-                                    //     fail(e) {
-                                    //         console.log(e);
-                                    //         _this.$toast('支付失败,请稍后再试');
-                                    //     }
-                                    // });
-                                })
-                                .catch(e => {
-                                    this.$toast(e.error || '支付失败请稍后再试');
-                                });
+                    this.$toast.success('兑换成功');
+                    this.$router.push({
+                        name: 'postDetail',
+                        query: {
+                            id: res.id
                         }
                         }
                     });
                     });
                 })
                 })
                 .catch(e => {
                 .catch(e => {
-                    if (e) {
+                    if (e.error) {
                         this.$toast(e.error);
                         this.$toast(e.error);
                     }
                     }
                 });
                 });
@@ -496,16 +408,17 @@ export default {
         padding: 6px 16px;
         padding: 6px 16px;
         display: flex;
         display: flex;
         align-items: flex-end;
         align-items: flex-end;
-
+        .bottom(6px);
         .btn {
         .btn {
             flex-grow: 1;
             flex-grow: 1;
             display: flex;
             display: flex;
             justify-content: flex-end;
             justify-content: flex-end;
+            padding: 0 40px;
         }
         }
         .van-button {
         .van-button {
             flex-grow: 1;
             flex-grow: 1;
             color: @btnText !important;
             color: @btnText !important;
-            max-width: 132px;
+            // max-width: 132px;
         }
         }
         .text {
         .text {
             font-size: 14px;
             font-size: 14px;

+ 3 - 0
src/main/modern-point/src/views/order/Orders.vue

@@ -9,6 +9,9 @@
                     <div class="btn" :class="{ active: type === 'BLIND_BOX' }" @click="changeActive('BLIND_BOX')">
                     <div class="btn" :class="{ active: type === 'BLIND_BOX' }" @click="changeActive('BLIND_BOX')">
                         盲盒订单
                         盲盒订单
                     </div>
                     </div>
+                    <div class="btn" :class="{ active: type === 'DERIVATIVE' }" @click="changeActive('DERIVATIVE')">
+                        衍生品订单
+                    </div>
                 </div>
                 </div>
                 <!-- <div class="search">
                 <!-- <div class="search">
                     <img src="@assets/svgs/search.svg" alt="" />
                     <img src="@assets/svgs/search.svg" alt="" />

+ 278 - 0
src/main/modern-point/src/views/order/PostDetail.vue

@@ -0,0 +1,278 @@
+<template>
+    <div class="order">
+        <div class="order-content">
+            <div class="order-top">
+                <div class="text1">{{ getLabelName(info.status, statusOptions) }}</div>
+                <div class="text2">
+                    {{ getLabelName(info.status, statusOptions, 'text') }}
+                </div>
+            </div>
+            <driver />
+            <template v-if="info.contactName">
+                <div class="address" v-if="info.courierId">
+                    <img src="../../assets/dingdan_icon_wuliu.png" alt="" />
+                    <div class="text1">快递编号</div>
+                    <div class="text2" @click="copyWuliu">
+                        <span>{{ info.courierId }}</span>
+                        <img src="../../assets/icon-miaoshu.png" alt="" />
+                    </div>
+                </div>
+                <div class="address">
+                    <img src="../../assets/dingdan_icon_dizhi.png" alt="" />
+                    <div class="text1">{{ info.contactName }} {{ info.contactPhone }}</div>
+                    <div class="text1">{{ info.address }}</div>
+                </div>
+                <driver />
+            </template>
+            <div class="product">
+                <div class="product-name">兑换的衍生品</div>
+                <div class="product-info">
+                    <van-image :radius="6" width="80" height="80" :src="getImg(changeImgs(info.pic))" fit="cover" />
+                    <div class="product-content">
+                        <div class="text1 van-multi-ellipsis--l2">{{ info.name }}</div>
+                        <div class="text2" v-if="info.number">编号:{{ info.number }}</div>
+                        <div class="flex1"></div>
+                        <!-- <div class="price">¥{{ info.price }}</div> -->
+                    </div>
+                </div>
+            </div>
+            <!-- <div class="info-item">
+                <div class="text1">作品费用</div>
+                <div class="text1">¥{{ info.price }}</div>
+            </div>
+            <div class="info-item">
+                <div class="text1">GAS费用</div>
+                <div class="text1">¥{{ info.gasPrice }}</div>
+            </div>
+            <div class="info-item" v-if="info.couponId">
+                <div class="text1">藏品兑换券</div>
+                <div class="text1 prim">已选择兑换券</div>
+            </div>
+            <div class="info-item">
+                <div class="text1">实际支付</div>
+                <div class="text1 prim priceColor" style="font-weight: bold;">
+                    ¥{{ info.couponId ? 0 : info.totalPrice }}
+                </div>
+            </div>
+            <div class="info-item" v-if="info.txHash">
+                <div class="text1">链上hash</div>
+                <div class="van-ellipsis">{{ getShort(info.txHash) }}</div>
+            </div>
+
+            <div class="info-item" v-if="info.gasUsed">
+                <div class="text1">消耗gas</div>
+                <div class="text1">{{ info.gasUsed }}</div>
+            </div>
+
+            <div class="info-item">
+                <div class="text1">支付方式</div>
+                <div class="text1">{{ getLabelName(info.payMethod, payMethodOptions) }}支付</div>
+            </div> -->
+
+            <div class="tips-item">
+                <div class="text1">订单编号</div>
+                <div class="text2">
+                    <van-button @click="copy" color="#939599" plain size="mini">复制</van-button>
+                    <span>{{ info.id }}</span>
+                </div>
+            </div>
+            <div class="tips-item">
+                <div class="text1">创建时间</div>
+                <div class="text2">
+                    {{ info.createdAt }}
+                </div>
+            </div>
+            <!-- <div class="tips-item">
+                <div class="text1">付款时间</div>
+                <div class="text2">
+                    {{ info.payTime }}
+                </div>
+            </div> -->
+        </div>
+        <order-open ref="box" :id="info.id" :imgSrc="getImg(changeImgs(collection.pic))"></order-open>
+    </div>
+</template>
+
+<script>
+import OrderOpen from '../../components/order/OrderOpen.vue';
+import post from '../../mixins/post';
+import product from '../../mixins/product';
+export default {
+    components: { OrderOpen },
+    name: 'detail',
+    data() {
+        return {
+            info: {},
+            collection: {}
+        };
+    },
+    mixins: [post, product],
+    mounted() {
+        this.$toast.loading({
+            message: '加载中...',
+            forbidClick: true
+        });
+        this.$http.get('/assetPost/get/' + this.$route.query.id).then(res => {
+            this.info = res;
+            this.$toast.clear();
+        });
+    },
+    methods: {
+        copy() {
+            this.$copyText(this.info.id).then(
+                e => {
+                    this.$toast.success('复制成功');
+                    console.log(e);
+                },
+                e => {
+                    this.$toast('复制失败');
+                    console.log(e);
+                }
+            );
+        }
+    }
+};
+</script>
+<style lang="less" scoped>
+.order {
+    padding-bottom: 100px;
+    color: @text0;
+    background-color: @bg3;
+}
+.order-content {
+    background-color: @bg;
+}
+.order-top {
+    padding: 26px 16px 20px;
+    .text1 {
+        font-size: 24px;
+        font-weight: bold;
+        color: @prim;
+        line-height: 34px;
+    }
+    .text2 {
+        font-size: 14px;
+        color: @text0;
+        line-height: 24px;
+    }
+}
+.product {
+    padding: 0 16px 20px;
+    border-bottom: 1px solid @bg3;
+    .product-name {
+        padding: 15px 0 12px;
+    }
+    .product-info {
+        display: flex;
+
+        .van-image {
+            flex-shrink: 0;
+        }
+        .product-content {
+            flex-grow: 1;
+            overflow: hidden;
+            display: flex;
+            flex-direction: column;
+            margin-left: 10px;
+            .text1 {
+                font-size: @font2;
+                font-weight: bold;
+                color: @text0;
+                line-height: 22px;
+            }
+
+            .text2 {
+                font-size: @font2;
+                color: @text3;
+                line-height: 24px;
+                margin-top: 4px;
+            }
+            .price {
+                font-size: @font2;
+                font-weight: bold;
+                color: @text0;
+                line-height: 24px;
+            }
+        }
+    }
+}
+.info-item {
+    display: flex;
+    justify-content: space-between;
+    padding: 0 16px;
+    height: 48px;
+    align-items: center;
+    border-bottom: 1px solid @bg3;
+    font-size: @font2;
+    .text1 {
+        flex-shrink: 0;
+        &:first-child {
+            margin-right: 10px;
+        }
+
+        &.prim {
+            color: @prim;
+        }
+    }
+}
+.tips-item {
+    display: flex;
+    justify-content: space-between;
+    height: 40px;
+    align-items: center;
+    padding: 0 16px;
+    .text1 {
+        font-size: 13px;
+        color: @text3;
+        line-height: 24px;
+        flex-shrink: 0;
+    }
+    .text2 {
+        font-size: 13px;
+        span {
+            vertical-align: middle;
+        }
+
+        .van-button {
+            vertical-align: middle;
+            margin-right: 5px;
+            height: 20px;
+            font-size: 13px;
+        }
+    }
+}
+
+.address {
+    position: relative;
+    padding: 20px 24px 16px 48px;
+    & > img {
+        position: absolute;
+        left: 18px;
+        top: 22px;
+        width: 20px;
+        display: block;
+    }
+
+    .text1 {
+        font-size: 14px;
+        color: #000000;
+        line-height: 24px;
+    }
+
+    .text2 {
+        font-size: 13px;
+        color: #939599;
+        line-height: 24px;
+        .flex();
+        img {
+            width: 16px;
+            height: 16px;
+            margin-left: 6px;
+        }
+    }
+}
+
+.address + .address {
+    border-top: 1px solid @tabBorder;
+}
+</style>

+ 176 - 0
src/main/modern-point/src/views/order/PostOrders.vue

@@ -0,0 +1,176 @@
+<template>
+    <div class="discover">
+        <van-sticky ref="top" :offset-top="bar.value.show ? 46 : 0">
+            <van-tabs v-model:active="status" :ellipsis="false" line-width="16" line-height="2" @click="changeStatus">
+                <van-tab v-for="(item, index) in tabs" :key="index" :title="item.name" :name="item.status"></van-tab>
+            </van-tabs>
+        </van-sticky>
+
+        <van-list class="list" v-model:loading="loading" :finished="finished" finished-text="" @load="getData">
+            <post-info
+                @delFn="delFn"
+                v-for="(item, index) in list"
+                :key="item.id"
+                v-model:info="list[index]"
+            ></post-info>
+            <van-empty v-if="empty" description="你还没有订单哦~" :image="require('@assets/kong_png_wudingdan.png')" />
+        </van-list>
+    </div>
+</template>
+
+<script>
+import PostInfo from '../../components/order/PostInfo.vue';
+import list from '../../mixins/list';
+export default {
+    name: 'discover',
+    inject: ['bar'],
+    mixins: [list],
+    components: {
+        PostInfo
+    },
+    data() {
+        return {
+            active: 'explore',
+            stiky: null,
+            status: 'DELIVERY,RECEIVE,FINISH,CANCELLED',
+            type: 'DEFAULT',
+            list: [],
+            tabs: [
+                {
+                    status: 'DELIVERY,RECEIVE,FINISH,CANCELLED',
+                    name: '全部'
+                },
+                {
+                    status: 'DELIVERY,RECEIVE',
+                    name: '运输中'
+                },
+                {
+                    status: 'FINISH',
+                    name: '已完成'
+                }
+            ],
+            url: '/assetPost/all'
+        };
+    },
+    mounted() {
+        if (this.$route.query.status) {
+            this.status = this.$route.query.status;
+        }
+    },
+    methods: {
+        beforeData() {
+            return {
+                query: {
+                    userId: this.$store.state.userInfo.id,
+                    status: this.status,
+                    hide: false,
+                    del: false
+                }
+            };
+        },
+        delFn() {
+            console.log('删除成功');
+            this.getData(true);
+            this.beforeData();
+        },
+        changeStatus(name) {
+            this.$router.replace({
+                path: '/postOrders',
+                query: {
+                    status: name
+                }
+            });
+            this.getData(true);
+        },
+        changeActive(type) {
+            this.$router.replace({
+                path: '/orders',
+                query: {
+                    status: this.status,
+                    type: type
+                }
+            });
+            this.type = type;
+            this.getData(true);
+        }
+    }
+};
+</script>
+
+<style lang="less" scoped>
+.top {
+    display: flex;
+    padding: 10px 16px;
+    background-color: @bg;
+    align-items: center;
+    .top-btn {
+        flex-grow: 1;
+        .flex();
+        .btn {
+            font-size: @font3;
+            line-height: 26px;
+            display: inline-block;
+            vertical-align: text-bottom;
+
+            &.active {
+                color: @prim;
+                font-size: @font3;
+                font-weight: bold;
+                line-height: 30px;
+            }
+        }
+
+        .btn + .btn {
+            margin-left: 30px;
+        }
+    }
+}
+
+.discover {
+    background-color: @bg3;
+    min-height: 100vh;
+}
+
+.list {
+    padding-bottom: 100px;
+}
+
+/deep/.van-tabs__nav--line.van-tabs__nav--complete {
+    border-color: @tabBorder;
+}
+.grid-img {
+    display: block;
+}
+.van-grid {
+    margin-top: 12px;
+}
+/deep/ .van-grid-item__content {
+    padding: 14px 20px 16px;
+}
+/deep/ .van-grid-item__text {
+    color: #fff;
+    font-size: 13px;
+    line-height: 18px;
+    margin-top: 4px;
+}
+
+.title {
+    padding: 16px 20px 8px;
+    color: @prim;
+    font-size: 18px;
+    font-weight: bold;
+}
+
+.box-list {
+    // display: flex;
+    // flex-wrap: wrap;
+    padding: 0 8px;
+}
+
+.discover {
+    padding-bottom: 50px;
+}
+.van-tabs {
+    background-color: @bg;
+}
+</style>