Răsfoiți Sursa

Merge branch 'dev' of http://git.izouma.com/xiongzhu/raex_front into dev

panhui 3 ani în urmă
părinte
comite
075fb53044

+ 41 - 1
src/components/PayMethodPick.vue

@@ -92,7 +92,7 @@ export default {
                 {
                     name: '余额',
                     key: 'BALANCE',
-                    icon: 'https://cdn.raex.vip/image/2022-05-18-17-46-19eDglIIAy.png',
+                    icon: 'https://cdn.raex.vip/image/2022-05-18-17-52-41NwCNOLDd.png',
                     show: true,
                     enabled: true
                 }
@@ -190,6 +190,46 @@ export default {
     }
 }
 
+.pay-items {
+    display: flex;
+    align-items: center;
+    height: 48px;
+    padding: 0px 16px;
+    background: #ffffff;
+    .icon {
+        height: 24px;
+        width: 24px;
+        object-fit: contain;
+        display: block;
+    }
+
+    .img-icon {
+        // width: 45px;
+        .flex();
+        justify-content: center;
+    }
+
+    span {
+        font-size: 14px;
+        font-weight: bold;
+        color: @text0;
+        line-height: 24px;
+        flex-grow: 1;
+        padding: 0 10px;
+    }
+
+    .choose-icon {
+        width: 24px;
+        height: 24px;
+    }
+
+    &.not {
+        span {
+            color: @text3;
+        }
+    }
+}
+
 .pay-items {
     display: flex;
     align-items: center;

+ 57 - 16
src/components/asset/ownedBuy.vue

@@ -7,11 +7,11 @@
                         width="20"
                         height="20"
                         class="user-img"
-                        :src="info.minterAvatar || require('@assets/svgs/img_default_photo.svg')"
+                        :src="info.ownerAvatar || require('@assets/svgs/img_default_photo.svg')"
                         fit="cover"
                         radius="100"
                     />
-                    <div class="product_top_left_one_name">持有者昵称</div>
+                    <div class="product_top_left_one_name">{{ info.ownerName }}</div>
                 </div>
                 <div class="product_top_left_two">
                     <van-image
@@ -27,16 +27,18 @@
                         <div class="product_left_time">剩余时长&nbsp;{{ info.endTime }}</div>
                     </div>
                 </div>
-                <div class="product_top_left_three">02-20 22:08</div>
+                <div class="product_top_left_three">{{ timeOne }}&nbsp;{{ timeTwo }}</div>
             </div>
             <div class="product_top_right">
-                <div class="product_top_right_title">已出价</div>
-                <div class="product_top_right_price">¥1000</div>
+                <div class="product_top_right_title">{{ getLabelName(info.status, statusOfferPrice) }}</div>
+                <div class="product_top_right_price">¥{{ info.price }}</div>
             </div>
         </div>
-        <div class="product_bottom">
-            <div class="product_bottom_con" @click="btn">不想买了</div>
-            <!-- <div class="product_bottom_cons">23:59后可取消出价</div> -->
+        <div class="product_bottom" v-if="info.status == 'ASKING'">
+            <div class="product_bottom_cons" v-if="endTimes >= 0">
+                <van-count-down @finish="finish" :time="endTimes" format="HH:mm:ss" />后可取消出价
+            </div>
+            <div class="product_bottom_con" @click="btn()" v-else>不想买了</div>
         </div>
     </div>
 </template>
@@ -44,9 +46,16 @@
 <script>
 import asset from '../../mixins/asset';
 import product from '../../mixins/product';
+import order from '../../mixins/order';
 import { Dialog } from 'vant';
+import { addDays } from 'date-fns';
 export default {
-    mixins: [asset, product],
+    mixins: [asset, product, order],
+    data() {
+        return {
+            time: 1424341
+        };
+    },
     props: {
         info: {
             type: Object,
@@ -55,8 +64,22 @@ export default {
             }
         }
     },
-    computed: {},
+    computed: {
+        timeOne() {
+            return this.dayjs(this.info.createdAt).format('MM-DD');
+        },
+        timeTwo() {
+            return this.dayjs(this.info.createdAt).format('HH:mm');
+        },
+        endTimes() {
+            let createdAt = this.dayjs(this.info.createdAt).add(2, 'minute');
+            return createdAt.diff(this.dayjs());
+        }
+    },
     methods: {
+        finish() {
+            this.$emit('fatherMethods');
+        },
         btn() {
             Dialog.confirm({
                 title: '确认不想买该藏品了',
@@ -65,10 +88,20 @@ export default {
                 cancelButtonColor: '#3AB200',
                 confirmButtonColor: '#626366'
             })
-                .then(() => {})
-                .catch(() => {
-                    // on cancel
-                });
+                .then(() => {
+                    this.$http
+                        .post('/domainAsk/cancel', {
+                            id: this.info.id
+                        })
+                        .then(res => {
+                            this.$toast.success('取消成功');
+                            this.$emit('fatherMethods');
+                        })
+                        .catch(e => {
+                            this.$toast(e.error);
+                        });
+                })
+                .catch(() => {});
         }
     }
 };
@@ -156,6 +189,7 @@ export default {
                 font-weight: 400;
                 color: #00fc1d;
                 line-height: 24px;
+                text-align: right;
             }
 
             .product_top_right_price {
@@ -171,7 +205,7 @@ export default {
         border-top: solid 1px #242424;
         padding-top: 10px;
         display: flex;
-        justify-content: end;
+        justify-content: flex-end;
 
         .product_bottom_con {
             width: 100px;
@@ -194,7 +228,14 @@ export default {
             font-weight: 400;
             color: #939599;
             line-height: 32px;
-            text-align: center;
+            justify-content: center;
+            display: flex;
+            align-items: center;
+            .van-count-down {
+                font-size: 14px;
+                font-weight: 400;
+                color: #939599;
+            }
         }
     }
 

+ 7 - 6
src/components/asset/receiveQuotation.vue

@@ -1,16 +1,16 @@
 <template>
-    <div class="product">
+    <div class="product" @click="viewQuote">
         <div class="product_top">
-            <van-image class="icon-img" width="40" height="40" :src="getImg(changeImgs(info.pic))" fit="contain" />
+            <van-image class="icon-img" width="40" height="40" :src="info.pic" fit="contain" />
             <img :src="require('@assets/png-da-zi@3x.png')" alt="" class="name_img" />
             <div class="product_left_title">
-                <div class="product_left_name">{{ info.name }}</div>
+                <div class="product_left_name">{{ info.picName }}</div>
                 <div class="product_left_time">剩余时长&nbsp;{{ info.endTime }}</div>
             </div>
         </div>
         <div class="product_bottom">
-            <div class="product_bottom_left">共10条报价</div>
-            <div class="product_bottom_right" @click="viewQuote">
+            <div class="product_bottom_left">共{{ info.count }}条报价</div>
+            <div class="product_bottom_right">
                 <div class="product_bottom_right_text">查看报价</div>
                 <img :src="require('@assets/icon-back@3x(3).png')" alt="" class="product_bottom_right_img" />
             </div>
@@ -38,7 +38,8 @@ export default {
             this.$router.push({
                 path: '/quotationRecord',
                 query: {
-                    id: this.info.id
+                    id: this.info.assetId,
+                    domainOrderId: this.info.domainOrderId
                 }
             });
         }

+ 47 - 3
src/components/order/BidOrderInfo.vue

@@ -2,7 +2,7 @@
     <div class="orderInfo" @click="pay(info.orderStatus)">
         <div class="orderInfo_top">
             <div class="orderInfo_top_left">
-                {{ info.nickname }}
+                {{ info.ownerName }}
             </div>
             <div class="orderInfo_top_right">
                 {{ getLabelName(info.status, statusOfferPrice) }}
@@ -35,8 +35,10 @@
             </div>
         </div>
         <div class="orderInfo_btn" v-if="info.status == 'ASKING'">
-            <!-- <div class="orderInfo_btn_one">23:59后可取消出价</div> -->
-            <div class="orderInfo_btn_two">不想买了</div>
+            <div class="orderInfo_btn_one" v-if="endTimes >= 0">
+                <van-count-down @finish="finish" :time="endTimes" format="HH:mm:ss" />后可取消出价
+            </div>
+            <div class="orderInfo_btn_two" @click="btn()" v-else>不想买了</div>
         </div>
         <!-- 
         <div class="btns">
@@ -47,6 +49,7 @@
 <script>
 import order from '../../mixins/order';
 import product from '../../mixins/product';
+import { Dialog } from 'vant';
 export default {
     props: {
         info: {
@@ -80,9 +83,39 @@ export default {
                 this.pad(parseInt(newEndTime / 60) % 60, 2) +
                 '分';
             return newEndTime;
+        },
+        endTimes() {
+            let createdAt = this.dayjs(this.info.createdAt).add(2, 'minute');
+            return createdAt.diff(this.dayjs());
         }
     },
     methods: {
+        finish() {
+            this.$emit('fatherMethods');
+        },
+        btn() {
+            Dialog.confirm({
+                title: '确认不想买该藏品了',
+                message: '一个工作日内将原路退回您的出价金额',
+                cancelButtonText: '再想想',
+                cancelButtonColor: '#3AB200',
+                confirmButtonColor: '#626366'
+            })
+                .then(() => {
+                    this.$http
+                        .post('/domainAsk/cancel', {
+                            id: this.info.id
+                        })
+                        .then(res => {
+                            this.$toast.success('取消成功');
+                            this.$emit('fatherMethods');
+                        })
+                        .catch(e => {
+                            this.$toast(e.error);
+                        });
+                })
+                .catch(() => {});
+        },
         pad(n, width, z) {
             z = z || '0';
             n = n + '';
@@ -247,6 +280,17 @@ export default {
         background: rgba(0, 0, 0, 0.1);
         border-radius: 16px;
         color: #939599;
+        font-size: 14px;
+        font-weight: 400;
+        line-height: 32px;
+        justify-content: center;
+        display: flex;
+        align-items: center;
+        .van-count-down {
+            font-size: 14px;
+            font-weight: 400;
+            color: #939599;
+        }
     }
 
     .orderInfo_btn_two {

+ 99 - 71
src/components/order/DomainInfo.vue

@@ -1,16 +1,27 @@
 <template>
     <div class="orderInfo" @click="pay(info.orderStatus)">
-        <div class="order-top">
-            <span>{{ info.domainName }}</span>
-            <span v-if="info.status == 'SUCCESS' && info.orderStatus == 'FINISH'" class="status">{{
-                getLabelName(info.orderStatus, statusDomain)
-            }}</span>
-            <span v-if="info.status == 'PENDING' && info.orderStatus == 'NOT_PAID'" class="status">{{
-                getLabelName(info.orderStatus, statusDomain)
-            }}</span>
-            <span v-if="info.status == 'PENDING' && info.orderStatus == 'FINISH'" class="status">{{
-                getLabelName(info.status, statusDomain)
-            }}</span>
+        <div class="orderInfo_top">
+            <div class="orderInfo_top_left">
+                {{ info.userName }}
+            </div>
+            <div class="orderInfo_top_right">
+                <span v-if="info.status == 'SUCCESS' && info.orderStatus == 'FINISH'" class="status">{{
+                    getLabelName(info.orderStatus, statusDomain)
+                }}</span>
+                <span v-if="info.status == 'PENDING' && info.orderStatus == 'NOT_PAID'" class="status">{{
+                    getLabelName(info.orderStatus, statusDomain)
+                }}</span>
+                <span v-if="info.status == 'PENDING' && info.orderStatus == 'FINISH'" class="status">{{
+                    getLabelName(info.status, statusDomain)
+                }}</span>
+            </div>
+        </div>
+        <div class="orderInfo_information">
+            <van-image :radius="6" width="80" height="80" :src="getImg(changeImgs(info.pic))" fit="cover" />
+            <div class="orderInfo_information_con">
+                <div class="orderInfo_information_con_name">{{ info.domainName }}</div>
+                <div class="orderInfo_information_con_time">剩余时长:{{ endTime }}</div>
+            </div>
         </div>
         <!-- <div class="order">
             <van-image :radius="6" width="80" height="80" :src="getImg(changeImgs(info.pic))" fit="cover" />
@@ -30,10 +41,11 @@
                 <div class="total-price_right_one">实际支付</div>
                 <div class="total-price_right_two">¥{{ info.price }}</div>
             </div>
-            <!-- <span class="time flex1"></span>
-            <span></span>
-            <span></span> -->
         </div>
+        <!-- <div class="orderInfo_btn">
+            <div class="orderInfo_btn_one">23:59后可取消出价</div>
+            <div class="orderInfo_btn_two">不想买了</div>
+        </div> -->
         <!-- 
         <div class="btns">
             <van-button color="@text3" @click.prevent="del" plain size="mini" round> 删除订单 </van-button>
@@ -66,7 +78,25 @@ export default {
     //     return { click };
     // },
     mixins: [order, product],
+    computed: {
+        endTime() {
+            let newEndTime = this.dayjs(this.info.endTime).diff(this.dayjs(), 'second');
+            newEndTime =
+                Math.floor(newEndTime / 24 / 3600) +
+                '天' +
+                this.pad(parseInt(newEndTime / 3600) % 24, 2) +
+                '时' +
+                this.pad(parseInt(newEndTime / 60) % 60, 2) +
+                '分';
+            return newEndTime;
+        }
+    },
     methods: {
+        pad(n, width, z) {
+            z = z || '0';
+            n = n + '';
+            return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n;
+        },
         pay(orderStatus) {
             if (orderStatus == this.orderStatus) {
                 this.$router.push({
@@ -140,88 +170,70 @@ export default {
     background: @bg;
     border-radius: 12px;
     color: @text0;
-    padding: 12px 10px 10px;
-    margin: 20px 16px 0;
+    padding: 12px 10px;
+    margin: 16px 16px 0;
     display: block;
-}
-.order-top {
-    padding: 0px 10px;
-    box-sizing: border-box;
-    display: flex;
-    justify-content: space-between;
-    height: 44px;
-    background: #f5f7fa;
-    border-radius: 8px;
-    align-items: center;
-    margin-bottom: 12px;
-    span {
-        font-size: 16px;
-        color: #000000;
-        font-weight: bold;
-        line-height: 24px;
-    }
 
-    .status {
+    .orderInfo_top {
+        display: flex;
+        justify-content: space-between;
         font-size: 14px;
         font-weight: 400;
-        color: #3ab200;
         line-height: 24px;
-    }
-}
+        margin-bottom: 8px;
+        color: #000000;
 
-.order {
-    display: flex;
-    padding: 16px 0;
-    .van-image {
-        flex-shrink: 0;
+        .status {
+            color: #3ab200;
+        }
     }
-    .content {
-        flex-grow: 1;
-        margin-left: 10px;
+
+    .orderInfo_information {
         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;
-        }
+        margin-bottom: 16px;
 
-        .price {
-            font-size: @font2;
-            font-weight: bold;
+        .orderInfo_information_con {
+            margin-left: 10px;
+            font-size: 14px;
             line-height: 24px;
+
+            .orderInfo_information_con_name {
+                color: #000000;
+                font-weight: bold;
+                margin-bottom: 4px;
+            }
+
+            .orderInfo_information_con_time {
+                font-weight: 400;
+                color: #939599;
+            }
         }
     }
 }
+
 .total-price {
     height: 24px;
     display: flex;
     justify-content: space-between;
-    align-items: center;
-    padding: 0px 10px;
-    box-sizing: border-box;
+    margin-bottom: 16px;
     .total-price_left {
         font-size: 12px;
         font-weight: 400;
         color: #c8c9cc;
         line-height: 24px;
     }
+
     .total-price_right {
         display: flex;
+
         .total-price_right_one {
-            font-size: 12px;
+            font-size: 14px;
             font-weight: bold;
             color: #000000;
             line-height: 24px;
             margin-right: 10px;
         }
+
         .total-price_right_two {
             font-size: 16px;
             font-weight: bold;
@@ -230,13 +242,29 @@ export default {
         }
     }
 }
-.btns {
-    border-top: 1px solid #202122;
-    padding: 16px 0;
+
+.orderInfo_btn {
     display: flex;
-    flex-direction: row-reverse;
-    .van-button {
-        padding: 3px 17px;
+    justify-content: flex-end;
+    font-size: 14px;
+    font-weight: 400;
+    text-align: center;
+    line-height: 32px;
+
+    .orderInfo_btn_one {
+        width: 162px;
+        height: 32px;
+        background: rgba(0, 0, 0, 0.1);
+        border-radius: 16px;
+        color: #939599;
+    }
+
+    .orderInfo_btn_two {
+        width: 100px;
+        height: 32px;
+        background: #000000;
+        border-radius: 16px;
+        color: #ffffff;
     }
 }
 </style>

+ 14 - 0
src/mixins/order.js

@@ -37,6 +37,20 @@ export default {
                     value: 'CANCELLED'
                 }
             ],
+            statusOfferPrice: [
+                {
+                    label: '已出价',
+                    value: 'ASKING'
+                },
+                {
+                    label: '已退款',
+                    value: 'REFUNDED'
+                },
+                {
+                    label: '已完成',
+                    value: 'FINISH'
+                }
+            ],
             payMethodOptions: [
                 {
                     label: '首信易快捷支付',

+ 6 - 0
src/router/index.js

@@ -637,6 +637,12 @@ const routes = [
             menuPage: true
         }
     },
+    {
+        path: '/offerPriceSubmit',
+        name: 'offerPriceSubmit',
+        component: () => import('../views/OfferPriceSubmit.vue'),
+        meta: {}
+    },
     {
         path: '/givesubmit',
         name: 'givesubmit',

+ 227 - 2
src/views/DomainName.vue

@@ -309,8 +309,18 @@
                         </div>
                     </div>
                 </div>
-                <div class="meta_domain_name_list_con_right" @click="buy(index)">
-                    <div class="meta_domain_name_list_con_right_one">{{ item.sold ? '超链' : '购买' }}</div>
+                <div class="meta_domain_name_list_con_right">
+                    <div
+                        class="meta_domain_name_list_con_right_one"
+                        v-if="item.sold && item.canAsk"
+                        @click="offerShow(index)"
+                    >
+                        出价
+                    </div>
+                    <div class="meta_domain_name_list_con_right_one" v-if="item.sold && !item.canAsk">寄售中</div>
+                    <div class="meta_domain_name_list_con_right_one" @click="buy(index)">
+                        {{ item.sold ? '超链' : '购买' }}
+                    </div>
                     <div
                         :class="
                             item.sold ? 'meta_domain_name_list_con_right_three' : 'meta_domain_name_list_con_right_two'
@@ -325,6 +335,43 @@
                 <div class="learn_more_btn_title">了解更多</div>
             </div>
         </div>
+        <van-popup v-model:show="show">
+            <div class="accept_offer_title">请输入价格</div>
+            <div class="accept_offer_title_tip">
+                <div class="accept_offer_title_tip_con">
+                    <img :src="require('@assets/png-xiao-zi@3x.png')" alt="" class="accept_offer_title_tip_con_img" />
+                    <div class="accept_offer_title_tip_con_text">{{ domainName }}</div>
+                </div>
+            </div>
+            <div class="accept_offer_take">
+                <div class="accept_offer_take_left">
+                    <div class="accept_offer_take_left_one">最高出价</div>
+                    <!-- <div class="accept_offer_take_left_two">出价记录</div> -->
+                </div>
+                <div class="accept_offer_take_right">¥{{ highestBid }}</div>
+            </div>
+            <van-stepper
+                v-model="price"
+                :default-value="''"
+                :show-plus="false"
+                :show-minus="false"
+                :decimal-length="2"
+                allow-empty
+                :min="minPrice"
+                max="100000"
+                placeholder="请输入"
+                @change="agreement = false"
+            />
+            <div class="accept_offer_tip">
+                指向持有者进行公开报出价格,进行叫价竞买行为。一旦确认叫价,<span>需支付全款以确保其叫价有效</span>。如果持有者“同意”其叫价,RAEX绿洲将自动扣除其保证金进行购买。如持有者七日内未进行回复,则默认为“拒绝”叫价。<span
+                    >期间叫价者可于叫价24小时后取消叫价。</span
+                >
+            </div>
+            <div class="accept_offer_btn">
+                <div class="accept_offer_btn_left" @click="show = false">取消</div>
+                <div class="accept_offer_btn_right" @click="domainSubmit">出价</div>
+            </div>
+        </van-popup>
         <!-- <img :src="require('@assets/png-huise-bg@3x.png')" alt="" class="meta_domain_name_bg" /> -->
     </div>
     <!-- <div>
@@ -378,10 +425,16 @@ export default {
     data() {
         return {
             action: 1,
+            show: false,
+            domainName: '',
+            price: '',
+            minPrice: 0,
+            highestBid: 0,
             heightNumber: '500px',
             paddingTop: 0,
             heightBgNumber: '260px',
             moreHeight: 0,
+            collectionId: 0,
             domain: true,
             value: '',
             domainList: [],
@@ -506,6 +559,32 @@ export default {
                 }
             }
         },
+        offerShow(index) {
+            this.domainName = this.list[index].domain;
+            this.collectionId = this.list[index].id;
+            this.$http
+                .post('/domainAsk/maxPrice', {
+                    domainOrderId: this.collectionId
+                })
+                .then(res => {
+                    this.highestBid = res;
+                })
+                .catch(e => {});
+            this.show = true;
+        },
+        domainSubmit() {
+            if (this.price == '') {
+                this.$toast('请输入价格');
+                return;
+            }
+            this.$router.push({
+                path: '/offerPriceSubmit',
+                query: {
+                    domainPrice: this.price,
+                    id: this.collectionId
+                }
+            });
+        },
         buy(index) {
             if (!this.list[index].sold) {
                 this.$router.push({
@@ -1215,4 +1294,150 @@ export default {
 /deep/ .learn_more_bg {
     background: linear-gradient(90deg, #1b0222 0%, #23042e 100%, #23042e 100%) !important;
 }
+
+/deep/ .van-popup {
+    width: calc(80vw);
+    background: #161414;
+    border-radius: 8px;
+    border: 1px solid #302b30;
+    backdrop-filter: blur(11px);
+    padding: 24px 20px 30px;
+    box-sizing: border-box;
+
+    .accept_offer_title {
+        text-align: center;
+        font-size: 16px;
+        font-weight: bold;
+        color: #ffffff;
+        line-height: 24px;
+        margin-bottom: 24px;
+    }
+
+    .van-stepper {
+        width: 100%;
+
+        .van-stepper__input {
+            width: 100%;
+            height: 46px;
+            background: #211f1f;
+            border-radius: 8px;
+            border: 1px solid #353434;
+            margin: 0;
+            font-size: 24px;
+            font-weight: bold;
+            color: #ffffff;
+        }
+
+        input::placeholder {
+            font-size: 16px;
+            font-weight: 400;
+            color: #646363;
+        }
+    }
+
+    .accept_offer_title_tip {
+        display: flex;
+        justify-content: center;
+        margin-bottom: 20px;
+
+        .accept_offer_title_tip_con {
+            display: flex;
+            align-items: center;
+
+            .accept_offer_title_tip_con_img {
+                width: 10px;
+                height: 18px;
+                margin-right: 6px;
+            }
+
+            .accept_offer_title_tip_con_text {
+                width: 100%;
+                font-size: 20px;
+                font-weight: bold;
+                color: #ffffff;
+                line-height: 24px;
+                overflow: hidden;
+                white-space: nowrap;
+                text-overflow: ellipsis;
+            }
+        }
+    }
+
+    .accept_offer_take {
+        display: flex;
+        justify-content: space-between;
+        margin-bottom: 20px;
+
+        .accept_offer_take_left {
+            display: flex;
+            align-items: center;
+
+            .accept_offer_take_left_one {
+                font-size: 14px;
+                font-weight: 400;
+                color: #ffffff;
+                line-height: 24px;
+                margin-right: 9px;
+            }
+
+            .accept_offer_take_left_two {
+                width: 48px;
+                height: 17px;
+                background: #1d1b1b;
+                border-radius: 2px;
+                font-size: 10px;
+                font-weight: 400;
+                color: #939599;
+                line-height: 17px;
+                text-align: center;
+                margin-top: 2px;
+            }
+        }
+
+        .accept_offer_take_right {
+            font-size: 16px;
+            font-weight: bold;
+            color: #ffffff;
+            line-height: 24px;
+        }
+    }
+
+    .accept_offer_tip {
+        font-size: 10px;
+        font-weight: 400;
+        color: #ffffff;
+        line-height: 16px;
+        margin-bottom: 30px;
+        margin-top: 16px;
+
+        span {
+            color: #00fe1e;
+        }
+    }
+
+    .accept_offer_btn {
+        display: flex;
+        justify-content: space-between;
+        font-size: 16px;
+        font-weight: bold;
+        line-height: 38px;
+        text-align: center;
+
+        .accept_offer_btn_left {
+            width: calc(32vw);
+            height: 38px;
+            background: #2d2b2b;
+            border-radius: 8px;
+            color: #ffffff;
+        }
+
+        .accept_offer_btn_right {
+            width: calc(32vw);
+            height: 38px;
+            background: #00fe1e;
+            border-radius: 8px;
+            color: #000000;
+        }
+    }
+}
 </style>

+ 468 - 0
src/views/OfferPriceSubmit.vue

@@ -0,0 +1,468 @@
+<template>
+    <div class="page">
+        <div class="page_top">
+            <div class="page_top_tip">出价订单</div>
+            <div class="page_top_con" :key="index">
+                <div class="pageTitle">{{ info.owner }}</div>
+                <div class="collection_information">
+                    <van-image width="80" height="80" :radius="6" :src="getImg(changeImgs(info.pic))" fit="cover" />
+                    <div class="collection_information_right">
+                        <div class="collection_information_right_name">{{ info.domainName }}</div>
+                        <div class="collection_information_right_no">剩余时长:{{ info.endTime }}</div>
+                        <div class="collection_information_right_price_one">¥{{ bidamount }}</div>
+                    </div>
+                </div>
+                <div class="collection_price">
+                    <div class="collection_price_left">出价金额</div>
+                    <div class="collection_price_right">¥{{ bidamount }}</div>
+                </div>
+                <div class="collection_price">
+                    <div class="collection_price_left">GAS费用</div>
+                    <div class="collection_price_right">¥{{ gas }}</div>
+                </div>
+            </div>
+        </div>
+        <pay-method-pick v-model="payType" cart :onlyBalance="true"></pay-method-pick>
+        <div class="page_btn van-safe-area-bottom">
+            <div class="page_btn_left">
+                <div class="page_btn_left_amount">总计</div>
+                <img :src="require('@assets/icon_jiagecat@3x.png')" alt="" class="page_btn_left_img" />
+                <div class="page_btn_left_price">{{ price }}</div>
+            </div>
+            <div class="page_btn_right" @click="submit">立即支付</div>
+        </div>
+        <van-number-keyboard v-model="tradeCode" :show="showKeyboard" @blur="showKeyboard = false" />
+        <van-dialog
+            v-model:show="showPwdDialog"
+            title="请输入支付密码"
+            confirmButtonText="立即支付"
+            show-cancel-button
+            confirmButtonColor="#3ab200"
+            @cancel="((showPwdDialog = false), (payName = '1')), $toast.clear()"
+            @confirm="pay"
+        >
+            <div style="padding: 20px 0">
+                <van-password-input
+                    :value="tradeCode"
+                    :focused="showKeyboard"
+                    @focus="showKeyboard = true"
+                    gutter="4px"
+                />
+            </div>
+        </van-dialog>
+    </div>
+</template>
+<script>
+import PayMethodPick from '../components/PayMethodPick';
+import { mapState } from 'vuex';
+import resolveUrl from 'resolve-url';
+import qs from 'qs';
+import encryptUtil from '../utils/encryptUtil';
+import product from '../mixins/product';
+export default {
+    components: { PayMethodPick },
+    mixins: [product],
+    data() {
+        return {
+            payType: null,
+            tradeCode: '',
+            showKeyboard: false,
+            showPwdDialog: false,
+            id: 0,
+            timerNum: 0,
+            gas: 0,
+            payName: '',
+            price: '',
+            bidamount: '',
+            info: {}
+        };
+    },
+    mounted() {
+        this.$http.get('/sysConfig/get/gas_fee').then(res => {
+            this.gas = res.value;
+            this.price = Number(this.$route.query.domainPrice) + Number(this.gas);
+            if (window.cordova && window.cordova.platformId === 'ios' && this.$store.state.review) {
+                this.gas = 0;
+            }
+            return Promise.resolve();
+        });
+        this.bidamount = Number(this.$route.query.domainPrice);
+        this.$toast.loading({
+            message: '加载中...',
+            forbidClick: true
+        });
+        if (this.$route.query.id) {
+            this.id = Number(this.$route.query.id);
+            this.$http.get('/domainOrder/get/' + this.id).then(res => {
+                res.endTime = this.dayjs(res.endTime).diff(this.dayjs(), 'second');
+                res.endTime =
+                    Math.floor(res.endTime / 24 / 3600) +
+                    '天' +
+                    this.pad(parseInt(res.endTime / 3600) % 24, 2) +
+                    '时' +
+                    this.pad(parseInt(res.endTime / 60) % 60, 2) +
+                    '分';
+                this.info = res;
+                setTimeout(() => {
+                    this.$toast.clear();
+                }, 100);
+            });
+        }
+    },
+    methods: {
+        pad(n, width, z) {
+            z = z || '0';
+            n = n + '';
+            return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n;
+        },
+        getOrder(next = false) {
+            this.$http.get('/domainOrder/get/' + this.id).then(res => {
+                this.info = res;
+                if (this.timer) {
+                    clearTimeout(this.timer);
+                }
+                if (this.timerNum >= 20) {
+                    this.$toast.clear();
+                    this.$dialog
+                        .confirm({
+                            title: '提示',
+                            message: '订单是否已经支付',
+                            confirmButtonText: '已经支付',
+                            cancelButtonText: '未支付'
+                        })
+                        .then(() => {
+                            this.$dialog
+                                .alert({
+                                    title: '正在排队中...',
+                                    message: '您的出价订单正在排队,出价成功的藏品后续会直接出现在藏品室哦~'
+                                })
+                                .then(res => {
+                                    this.$router.back();
+                                });
+                        })
+                        .catch(e => {
+                            this.$dialog
+                                .confirm({
+                                    title: '提示',
+                                    message: '订单未支付是否重新支付?',
+                                    confirmButtonText: '重新支付',
+                                    cancelButtonText: '取消订单'
+                                })
+                                .then(() => {
+                                    this.timerNum = 0;
+                                    this.pay(false);
+                                })
+                                .catch(() => {
+                                    this.$router.back();
+                                });
+                        });
+                } else if (
+                    res.orderStatus === 'PROCESSING' ||
+                    res.orderStatus === 'FINISH' ||
+                    res.orderStatus === 'CANCELLED' ||
+                    res.orderStatus === 'SUCCESS' ||
+                    res.orderStatus === 'PENDING'
+                ) {
+                    this.$toast.clear();
+                    this.$dialog
+                        .alert({
+                            title: '提示',
+                            message:
+                                res.orderStatus === 'CANCELLED'
+                                    ? '出价失败,点击重新下单'
+                                    : '恭喜出价成功,请到藏品室查看'
+                        })
+                        .then(() => {
+                            if (res.orderStatus === 'PENDING') {
+                                this.$router.back();
+                            } else {
+                                this.$router.replace('/domainname');
+                            }
+                        });
+                } else if (next) {
+                    this.timerNum += 1;
+                    this.timer = setTimeout(() => {
+                        this.getOrder(next);
+                    }, 1500);
+                }
+            });
+        },
+        createOrder() {
+            return new Promise((resolve, reject) => {
+                let checkOrder = () => {
+                    this.$http
+                        .post('/domainAsk/create', {
+                            domainOrderId: this.id,
+                            price: this.price
+                        })
+                        .then(res => {
+                            if (res) {
+                                clearInterval(this.createOrderTimer);
+                                this.createOrderTimer = null;
+                                resolve(res);
+                            }
+                        })
+                        .catch(e => {
+                            clearInterval(this.createOrderTimer);
+                            this.createOrderTimer = null;
+                            reject(e);
+                        });
+                };
+                setTimeout(checkOrder, 500);
+                this.createOrderTimer = setInterval(checkOrder, 2000);
+            });
+        },
+        submit() {
+            if (this.payType == 'BALANCE') {
+                this.showPwdDialog = true;
+            }
+            if (this.payName == '1') {
+                if (this.payType != 'BALANCE') {
+                    this.pay();
+                }
+            } else {
+                this.createOrder()
+                    .then(res => {
+                        this.id = res.id;
+                        if (this.payType != 'BALANCE') {
+                            this.pay();
+                        }
+                    })
+                    .catch(e => {
+                        if (e) {
+                            this.showPwdDialog = false;
+                            this.$toast.clear();
+                            this.$dialog
+                                .alert({
+                                    title: '提示',
+                                    message: this.backReson(e.error)
+                                })
+                                .then(res => {
+                                    this.$router.back();
+                                });
+                        }
+                    });
+            }
+        },
+        pay() {
+            if (this.payType == 'BALANCE') {
+                this.$http
+                    .post('/payOrder/v2/ask/balance', {
+                        id: this.id,
+                        tradeCode: this.tradeCode
+                    })
+                    .then(res => {
+                        this.$toast.success('恭喜出价成功,请到藏品室查看');
+                        setTimeout(() => {
+                            this.$router.replace('/domainname');
+                        }, 1000);
+                    })
+                    .catch(e => {
+                        this.tradeCode = '';
+                        this.$toast(e.error || '出价失败');
+                        this.payName = '1';
+                    });
+            } else if (this.payType == 'ALI') {
+                this.$toast.loading({
+                    message: '支付中',
+                    forbidClick: true
+                });
+                this.$http
+                    .get('/payOrder/v2/ali', { id: this.id })
+                    .then(res => {
+                        this.$toast.clear();
+                        document.location.href = res;
+                        //   this.payUrlScheme = res;
+                    })
+                    .then(() => {
+                        this.getOrder(true);
+                    })
+                    .catch(e => {
+                        this.$toast.clear();
+                        e = e || {};
+                        e.error = e.error || '出价失败';
+                        this.$dialog
+                            .alert({
+                                title: '提示',
+                                message: this.backReson(e.error)
+                            })
+                            .then(res => {
+                                this.$router.back();
+                            });
+                    });
+            } else if (this.payType === 'UNION') {
+                const url = resolveUrl(this.$baseUrl, '/payOrder/v2/sandQuick?id=' + this.id)
+                    .replace('www.raex.vip', 'jump.raex.vip')
+                    .replace('test.raex.vip', 'jumptest.raex.vip')
+                    .replace(/http:\/\/192\.168.*?\//, 'https://jumptest.raex.vip/');
+                console.log(url);
+                document.location.href = url;
+                this.getOrder(true);
+            } else if (this.payType === 'QUICK_BIND') {
+                this.$http
+                    .get('/payOrder/v2/sandQuickBind?id=' + this.id)
+                    .then(res => {
+                        document.location.href = res;
+                        this.getOrder(true);
+                    })
+                    .catch(e => {
+                        this.$toast.clear();
+                        e = e || {};
+                        e.error = e.error || '出价失败';
+                        this.$dialog
+                            .alert({
+                                title: '提示',
+                                message: this.backReson(e.error)
+                            })
+                            .then(res => {
+                                this.$router.back();
+                            });
+                    });
+            }
+        }
+    }
+};
+</script>
+<style lang="less" scoped>
+.page {
+    background-color: @bg3;
+    padding-bottom: 170px;
+
+    .page_top_tip {
+        height: 28px;
+        background: #3ab200;
+        font-size: 12px;
+        font-weight: bold;
+        color: #ffffff;
+        line-height: 28px;
+        text-align: center;
+    }
+
+    .page_top_con {
+        padding: 10px 16px 0;
+        box-sizing: border-box;
+        background: #ffffff;
+
+        .pageTitle {
+            font-size: 14px;
+            font-weight: 400;
+            color: #000000;
+            line-height: 24px;
+            margin-bottom: 8px;
+        }
+
+        .collection_information {
+            display: flex;
+            margin-bottom: 17px;
+
+            .collection_information_right {
+                margin-left: 10px;
+
+                .collection_information_right_name {
+                    font-size: 14px;
+                    font-weight: bold;
+                    color: #000000;
+                    line-height: 24px;
+                    margin-bottom: 2px;
+                }
+
+                .collection_information_right_no {
+                    font-size: 12px;
+                    font-weight: 400;
+                    color: #939599;
+                    line-height: 24px;
+                    margin-bottom: 6px;
+                }
+
+                .collection_information_right_price_one {
+                    font-size: 14px;
+                    font-weight: bold;
+                    color: #000000;
+                    line-height: 24px;
+                }
+            }
+        }
+
+        .collection_price {
+            height: 49px;
+            display: flex;
+            align-items: center;
+            border-top: 1px solid #f5f7fa;
+            justify-content: space-between;
+
+            .collection_price_left {
+                font-size: 14px;
+                font-weight: 400;
+                color: #000000;
+            }
+
+            .collection_price_right {
+                font-size: 14px;
+                font-weight: 500;
+                color: #3ab200;
+            }
+        }
+    }
+
+    .van-number-keyboard {
+        z-index: 9999;
+    }
+
+    :deep(.van-password-input__item) {
+        background: @bg3;
+    }
+}
+
+.page_btn {
+    width: 100%;
+    height: 56px;
+    position: fixed;
+    left: 0;
+    bottom: 0;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    padding: 0px 16px;
+    box-sizing: border-box;
+    background: #ffffff;
+
+    .page_btn_left {
+        display: flex;
+
+        .page_btn_left_amount {
+            font-size: 14px;
+            font-weight: 400;
+            color: #939599;
+            line-height: 24px;
+            margin-right: 6px;
+            padding-top: 3px;
+        }
+
+        .page_btn_left_img {
+            width: 11px;
+            height: 11px;
+            padding-top: 10px;
+        }
+
+        .page_btn_left_price {
+            font-size: 32px;
+            font-family: OSP-DIN, OSP;
+            font-weight: normal;
+            color: #3ab200;
+            line-height: 24px;
+        }
+    }
+
+    .page_btn_right {
+        width: 132px;
+        height: 38px;
+        background: #3ab200;
+        border-radius: 22px;
+        text-align: center;
+        font-size: 16px;
+        font-weight: bold;
+        color: #ffffff;
+        line-height: 38px;
+    }
+}
+</style>

+ 98 - 34
src/views/Store.vue

@@ -207,20 +207,32 @@
                     <domain-owned :info="asset" v-for="(asset, assetIndex) in item" :key="assetIndex"></domain-owned>
                 </template>
             </div>
-            <!-- <div v-else-if="metadomainType == 'myBid'">
+            <div v-else-if="metadomainType == 'myBid'">
                 <template v-for="(item, index) in showList" :key="index">
-                    <owned-buy :info="asset" v-for="(asset, assetIndex) in item" :key="assetIndex"></owned-buy>
+                    <owned-buy
+                        :info="asset"
+                        v-for="(asset, assetIndex) in item"
+                        :key="assetIndex"
+                        @fatherMethods="fatherMethod"
+                    ></owned-buy>
                 </template>
             </div>
             <div v-else-if="metadomainType == 'receiveQuotation'">
                 <template v-for="(item, index) in showList" :key="index">
-                    <receive-quotation :info="asset" v-for="(asset, assetIndex) in item"
-                        :key="assetIndex"></receive-quotation>
+                    <receive-quotation :info="item"></receive-quotation>
                 </template>
-            </div> -->
+            </div>
             <van-empty
                 v-if="empty || (showList.length === 0 && !loading)"
-                :description="active == 'coupon' ? '你还没有优惠券哦~' : '你还没有藏品哦~'"
+                :description="
+                    active == 'coupon'
+                        ? '你还没有优惠券哦~'
+                        : metadomainType == 'receiveQuotation'
+                        ? '你还没有收到的报价哦~'
+                        : metadomainType == 'myBid'
+                        ? '你还没有出价的域名哦~'
+                        : '你还没有藏品哦~'
+                "
                 :image="
                     require(`@assets/${active == 'coupon' ? 'kong_png_duihuanquanhei' : 'empty_img_asset_dark'}.png`)
                 "
@@ -271,8 +283,8 @@
 <script>
 import AssetInfo from '../components/asset/assetInfo.vue';
 import DomainOwned from '../components/asset/domainOwned.vue';
-// import OwnedBuy from '../components/asset/ownedBuy.vue';
-// import ReceiveQuotation from '../components/asset/receiveQuotation.vue';
+import OwnedBuy from '../components/asset/ownedBuy.vue';
+import ReceiveQuotation from '../components/asset/receiveQuotation.vue';
 import AssetInfoSe from '../components/asset/assetInfoSe.vue';
 import ShowInfo from '../components/asset/showInfo.vue';
 import CouponInfo from '../components/CouponInfo.vue';
@@ -292,9 +304,9 @@ export default {
         ShowInfo,
         starAssetInfo,
         ProductInfo,
-        DomainOwned
-        // OwnedBuy,
-        // ReceiveQuotation
+        DomainOwned,
+        OwnedBuy,
+        ReceiveQuotation
     },
     data() {
         return {
@@ -331,15 +343,15 @@ export default {
                 {
                     name: '审核中',
                     type: 'underReview'
+                },
+                {
+                    name: '我的出价',
+                    type: 'myBid'
+                },
+                {
+                    name: '收到的报价',
+                    type: 'receiveQuotation'
                 }
-                // {
-                //     name: '我的出价',
-                //     type: 'myBid'
-                // },
-                // {
-                //     name: '收到的报价',
-                //     type: 'receiveQuotation'
-                // }
             ],
             typeOptionLike: [
                 {
@@ -360,7 +372,7 @@ export default {
     computed: {
         typeOptions() {
             if (this.active === 'explore') {
-                if (!this.$store.state.reviewPay && !this.$store.state.review) {
+                if (!this.$store.state.reviewPay) {
                     return [
                         {
                             label: '全部',
@@ -479,6 +491,8 @@ export default {
                 });
             } else if (this.active == 'showRoom') {
                 return this.list;
+            } else if (this.metadomainType == 'receiveQuotation') {
+                return this.list;
             } else {
                 let list = [...this.list];
                 let _list = [];
@@ -511,7 +525,11 @@ export default {
             } else if (this.type === 'lock') {
                 return '/asset/all';
             } else if (this.type === 'metadomainName') {
-                return 'asset/all';
+                if (this.metadomainType == 'myBid') {
+                    return '/domainAsk/all';
+                } else {
+                    return 'asset/all';
+                }
             } else if (this.active === 'coupon') {
                 return '/userCoupon/all';
             } else if (this.active === 'showRoom') {
@@ -529,6 +547,8 @@ export default {
                 } else if (this.type === 'metadomainName') {
                     if (this.metadomainType == 'underReview') {
                         return 'PENDING';
+                    } else if (this.metadomainType == 'myBid') {
+                        return 'ASKING,FINISH,REFUNDED';
                     } else {
                         return 'NORMAL,TRADING,GIFTING,MINTING,AUCTIONING,PENDING';
                     }
@@ -546,6 +566,11 @@ export default {
         if (this.$route.query.type) {
             this.type = this.$route.query.type;
         }
+        if (this.$route.query.goBack) {
+            this.type = 'metadomainName';
+            this.metadomainType = 'receiveQuotation';
+            this.getReview();
+        }
         if (window.cordova && StatusBar && StatusBar.isVisible) {
             StatusBar.styleLightContent();
         }
@@ -669,6 +694,12 @@ export default {
         });
     },
     methods: {
+        fatherMethod() {
+            this.page = 0;
+            this.getList().then(() => {
+                this.isLoading = false;
+            });
+        },
         showMore(asset) {
             console.log(asset);
             this.moreTitle = asset.prefixName;
@@ -678,10 +709,10 @@ export default {
             //
         },
         init() {
-            this.$toast.loading({
-                message: '加载中...',
-                forbidClick: true
-            });
+            // this.$toast.loading({
+            //     message: '加载中...',
+            //     forbidClick: true
+            // });
             this.empty = false;
             this.$http.get('/collection/myLikes').then(res => {
                 this.likeList = res;
@@ -748,6 +779,10 @@ export default {
             return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n;
         },
         getList() {
+            if (this.metadomainType == 'receiveQuotation') {
+                this.getReview();
+                return;
+            }
             if (!this.isLogin) {
                 this.empty = true;
                 this.loading = false;
@@ -895,16 +930,42 @@ export default {
                 }, 100);
             }
         },
+        getReview() {
+            this.list = [];
+            this.$http.post('/domainAsk/groupInfo').then(res => {
+                res.forEach(item => {
+                    item.endTime = this.dayjs(item.endTime).diff(this.dayjs(), 'second');
+                    item.endTime =
+                        Math.floor(item.endTime / 24 / 3600) +
+                        '天' +
+                        this.pad(parseInt(item.endTime / 3600) % 24, 2) +
+                        '时' +
+                        this.pad(parseInt(item.endTime / 60) % 60, 2) +
+                        '分';
+                });
+                this.isLoading = false;
+                this.assetLoading = false;
+                this.list = res;
+            });
+        },
         domainBtn(index) {
             this.metadomainType = this.metadomainList[index].type;
-            this.page = 0;
-            if (this.metadomainType == 'myBid' || this.metadomainType == 'receiveQuotation') {
-                this.$toast('版本升级中');
+            if (this.metadomainType == 'receiveQuotation') {
+                this.getReview();
             } else {
+                this.page = 0;
                 this.getList().then(() => {
                     this.isLoading = false;
                 });
             }
+
+            // if (this.metadomainType == 'myBid' || this.metadomainType == 'receiveQuotation') {
+            //     this.$toast("版本升级中")
+            // } else {
+            //     this.getList().then(() => {
+            //         this.isLoading = false;
+            //     });
+            // }
         },
         changeTab(info) {
             if (info.name === 'price') {
@@ -920,10 +981,14 @@ export default {
             this.changeScroll(0, true);
         },
         onRefresh() {
-            this.page = 0;
-            this.getList().then(() => {
-                this.isLoading = false;
-            });
+            if (this.metadomainType == 'receiveQuotation') {
+                this.getReview();
+            } else {
+                this.page = 0;
+                this.getList().then(() => {
+                    this.isLoading = false;
+                });
+            }
         },
         change() {
             this.$root.$el.scrollTop = 0;
@@ -997,7 +1062,7 @@ export default {
 .metadomainName_list {
     padding: 16px 15px 20px 16px;
     display: flex;
-    // justify-content: space-between;
+    justify-content: space-between;
     background: #0f0f0f;
 
     .metadomainName_list_cons {
@@ -1010,7 +1075,6 @@ export default {
         font-size: 12px;
         font-weight: 400;
         color: rgba(147, 149, 153, 0.6);
-        margin-right: 20px;
     }
 
     .metadomainName_list_con {

+ 37 - 2
src/views/order/Orders.vue

@@ -127,7 +127,18 @@
             @load="getData"
             v-if="type == 'METANAME'"
         >
-            <domain-info @delFn="delFn" v-for="item in list" :key="item.id" :info="item"></domain-info>
+            <template v-if="status != 'BID_ORDER'">
+                <domain-info @delFn="delFn" v-for="item in list" :key="item.id" :info="item"></domain-info>
+            </template>
+            <template v-else>
+                <bid-order-info
+                    @delFn="delFn"
+                    v-for="item in list"
+                    :key="item.id"
+                    :info="item"
+                    @fatherMethods="fatherMethod"
+                ></bid-order-info>
+            </template>
             <van-empty v-if="empty" description="你还没有订单哦~" :image="require('@assets/kong_png_wudingdan.png')" />
         </van-list>
     </van-pull-refresh>
@@ -137,6 +148,7 @@
 import OrderInfo from '../../components/order/OrderInfo.vue';
 import OrderInfoAct from '../../components/order/OrderInfoAct.vue';
 import DomainInfo from '../../components/order/DomainInfo.vue';
+import BidOrderInfo from '../../components/order/BidOrderInfo.vue';
 import OrderInfoAuction from '../../components/order/OrderInfoAuction.vue';
 import list from '../../mixins/list';
 export default {
@@ -147,7 +159,8 @@ export default {
         OrderInfo,
         OrderInfoAct,
         DomainInfo,
-        OrderInfoAuction
+        OrderInfoAuction,
+        BidOrderInfo
     },
     data() {
         return {
@@ -179,6 +192,10 @@ export default {
                     status: 'PENDING',
                     name: '审核中'
                 },
+                {
+                    status: 'BID_ORDER',
+                    name: '出价订单'
+                },
                 {
                     status: 'NOT_PAID',
                     name: '待支付'
@@ -238,9 +255,15 @@ export default {
         }
     },
     methods: {
+        fatherMethod() {
+            this.getData(true).then(() => {
+                this.isLoading = false;
+            });
+        },
         beforeData() {
             if (this.type == 'METANAME') {
                 if (this.status == 'PENDING') {
+                    this.url = '/domainOrder/all';
                     return {
                         query: {
                             userId: this.$store.state.userInfo.id,
@@ -249,6 +272,7 @@ export default {
                         }
                     };
                 } else if (this.status == 'FINISH') {
+                    this.url = '/domainOrder/all';
                     return {
                         query: {
                             userId: this.$store.state.userInfo.id,
@@ -256,7 +280,18 @@ export default {
                             status: 'SUCCESS'
                         }
                     };
+                } else if (this.status == 'BID_ORDER') {
+                    this.url = '/domainAsk/all';
+                    return {
+                        query: {
+                            companyId: 1,
+                            status: 'ASKING,FINISH,REFUNDED',
+                            type: 'DOMAIN',
+                            userId: this.$store.state.userInfo.id
+                        }
+                    };
                 } else {
+                    this.url = '/domainOrder/all';
                     return {
                         query: {
                             userId: this.$store.state.userInfo.id,

+ 13 - 5
src/views/product/Detail.vue

@@ -1066,18 +1066,26 @@ export default {
             if (!this.isLogin) {
                 return;
             }
-            let id = this.info.id;
-            let data = {
-                collectionId: id
-            };
             this.$http
-                .post('/cart/status', data)
+                .post('/cart/myStatus')
                 .then(res => {
                     this.cartNum = res.count;
                 })
                 .catch(e => {
                     this.$toast(e.error);
                 });
+            // let id = this.info.id;
+            // let data = {
+            //     collectionId: id
+            // };
+            // this.$http
+            //     .post('/cart/status', data)
+            //     .then(res => {
+            //         this.cartNum = res.count;
+            //     })
+            //     .catch(e => {
+            //         this.$toast(e.error);
+            //     });
         },
         addCart() {
             this.checkLogin().then(() => {

+ 306 - 84
src/views/product/QuotationRecord.vue

@@ -7,7 +7,7 @@
                         :src="require('@assets/icon-back@3x.png')"
                         alt=""
                         class="product_top_one_img"
-                        @click="$router.back()"
+                        @click="goBack"
                     />
                     收到报价
                 </div>
@@ -24,123 +24,204 @@
                             <div class="product_left_time">剩余时长&nbsp;{{ info.endTime }}</div>
                         </div>
                     </div>
-                    <div class="product_detailed_information_con_right_price">最高价:¥1000</div>
+                    <div class="product_detailed_information_con_right_price">最高价:¥{{ highestBid }}</div>
                 </div>
             </div>
         </div>
-        <div class="number_of_quotations">共10条报价</div>
-        <!-- <van-pull-refresh v-if="quotedPriceList.length == 0" success-text="加载成功" success-duration="500" class="search"
-            v-model="isLoading" :head-height="80" @refresh="onRefresh"> -->
-        <!-- <van-list style="padding-bottom: 100px" class="box-list" v-model:loading="loading" :finished="finished"
-                finished-text=""> -->
-        <div class="box-list">
-            <div class="box-list_con" v-for="(item, index) in quotedPriceList" :key="index">
-                <div class="box-list_con_left">
-                    <van-image
-                        width="40"
-                        height="40"
-                        class="user-img"
-                        :src="item.minterAvatar"
-                        fit="cover"
-                        radius="100"
-                    />
-                    <div>
-                        <div class="box-list_con_left_name">{{ item.name }}</div>
-                        <div class="box-list_con_left_time">{{ item.time }}</div>
-                    </div>
-                </div>
-                <div class="box-list_con_right">
-                    <div class="box-list_con_right_fu">
-                        <div class="box-list_con_right_con">
-                            <img
-                                :src="require('@assets/icon_jiage@3x (2).png')"
-                                alt=""
-                                class="box-list_con_right_img"
+        <div class="number_of_quotations">共{{ quotedPriceList.length }}条报价</div>
+        <van-pull-refresh
+            success-text="加载成功"
+            success-duration="500"
+            class="search"
+            v-model="isLoading"
+            :head-height="80"
+            @refresh="onRefresh"
+        >
+            <van-list
+                style="padding-bottom: 100px"
+                class="box-list"
+                v-model:loading="loading"
+                :finished="finished"
+                finished-text=""
+                @load="getList"
+            >
+                <div class="box-list">
+                    <div class="box-list_con" v-for="(item, index) in quotedPriceList" :key="index">
+                        <div class="box-list_con_left">
+                            <van-image
+                                width="40"
+                                height="40"
+                                class="user-img"
+                                :src="item.avatar"
+                                fit="cover"
+                                radius="100"
                             />
-                            <div class="box-list_con_right_con_price">{{ item.price }}</div>
+                            <div>
+                                <div class="box-list_con_left_name">{{ item.nickname }}</div>
+                                <div class="box-list_con_left_time">{{ item.createdAt }}</div>
+                            </div>
+                        </div>
+                        <div class="box-list_con_right">
+                            <div class="box-list_con_right_fu">
+                                <div class="box-list_con_right_con">
+                                    <img
+                                        :src="require('@assets/icon_jiage@3x (2).png')"
+                                        alt=""
+                                        class="box-list_con_right_img"
+                                    />
+                                    <div class="box-list_con_right_con_price">{{ item.price }}</div>
+                                </div>
+                            </div>
+                            <div class="box-list_con_right_con_btn" v-if="item.status != 'ASKING'">对方已取消</div>
+                            <div v-else class="box-list_con_right_con_btns" @click="acceptOffer(index)">接受</div>
                         </div>
                     </div>
-                    <div v-if="item.cancel" class="box-list_con_right_con_btn">对方已取消</div>
-                    <div v-else class="box-list_con_right_con_btns">接受</div>
+                </div>
+                <van-empty
+                    :image="require('@assets/empty_img_asset_dark.png')"
+                    v-if="empty"
+                    description="没有任何报价哦~"
+                />
+            </van-list>
+        </van-pull-refresh>
+        <van-popup v-model:show="show">
+            <div class="accept_offer_title">接受报价</div>
+            <div class="accept_offer_title_tip">
+                <div class="accept_offer_title_tip_con">
+                    <img :src="require('@assets/png-xiao-zi@3x.png')" alt="" class="accept_offer_title_tip_con_img" />
+                    <div class="accept_offer_title_tip_con_text">{{ info.name }}</div>
                 </div>
             </div>
-        </div>
-        <!-- <van-empty :image="require('@assets/empty_img_asset_dark.png')" v-if="empty" description="没有任何报价哦~" />
-            </van-list> -->
-        <!-- </van-pull-refresh> -->
+            <div class="accept_offer_list">
+                <div class="accept_offer_list_title">出售价格</div>
+                <div class="accept_offer_list_price">¥{{ price }}</div>
+            </div>
+            <div class="accept_offer_list">
+                <div class="accept_offer_list_title">版税({{ royalties }}%)</div>
+                <div class="accept_offer_list_price">¥{{ royaltiesAmount }}</div>
+            </div>
+            <div class="accept_offer_list">
+                <div class="accept_offer_list_title">技术服务费({{ serviceCharge }}%)</div>
+                <div class="accept_offer_list_price">¥{{ serviceChargeAmount }}</div>
+            </div>
+            <div class="accept_offer_list">
+                <div class="accept_offer_list_title">支付通道费({{ payChannel }}%)</div>
+                <div class="accept_offer_list_price">¥{{ payChannelAmount }}</div>
+            </div>
+            <div class="final_income">
+                <div class="final_income_title">最终收入</div>
+                <div class="final_income_price">¥{{ finalIncome }}</div>
+            </div>
+            <div class="accept_offer_btn">
+                <div class="accept_offer_btn_left" @click="show = false">取消</div>
+                <div class="accept_offer_btn_right" @click="affirmBtn">确认</div>
+            </div>
+        </van-popup>
     </div>
 </template>
 
 <script>
 import asset from '../../mixins/asset';
 import product from '../../mixins/product';
+let fromRoute = null;
 export default {
     mixins: [asset, product],
     data() {
         return {
+            fromRoute: null,
             assetId: 0,
+            domainOrderId: 0,
+            highestBid: 0,
             info: {},
-            quotedPriceList: [
-                {
-                    name: '用户昵称',
-                    time: '02-20 22:08',
-                    minterAvatar: require('@assets/svgs/img_default_photo.svg'),
-                    price: 1000,
-                    cancel: false
-                },
-                {
-                    name: '用户昵称',
-                    time: '02-20 22:08',
-                    minterAvatar: require('@assets/svgs/img_default_photo.svg'),
-                    price: 1000,
-                    cancel: false
-                },
-                {
-                    name: '用户昵称',
-                    time: '02-20 22:08',
-                    minterAvatar: require('@assets/svgs/img_default_photo.svg'),
-                    price: 1000,
-                    cancel: true
-                },
-                {
-                    name: '用户昵称',
-                    time: '02-20 22:08',
-                    minterAvatar: require('@assets/svgs/img_default_photo.svg'),
-                    price: 1000,
-                    cancel: false
-                }
-            ],
+            id: 0,
+            show: false,
+            quotedPriceList: [],
             loading: false,
             finished: false,
-            page: 0
+            page: 0,
+            price: 0,
+            royalties: 5,
+            serviceCharge: 5,
+            payChannel: 1,
+            royaltiesAmount: 0,
+            serviceChargeAmount: 0,
+            payChannelAmount: 0,
+            finalIncome: 0
         };
     },
-    computed: {},
+    computed: {
+        // timeOne() {
+        //     return this.quotedPriceList.forEach(item => {
+        //         this.dayjs(item.createdAt).format('MM-DD');
+        //     });
+        // },
+        // timeTwo() {
+        //     return this.dayjs(this.info.createdAt).format('HH:mm');
+        // }
+    },
     mounted() {
         if (this.$route.query.id) {
             this.assetId = this.$route.query.id;
+            this.domainOrderId = this.$route.query.domainOrderId;
             this.getDomain();
         }
+        this.emitter.on('updateFrom', from => {
+            fromRoute = from;
+        });
+    },
+    beforeRouteEnter(to, from) {
+        fromRoute = from;
     },
     methods: {
+        acceptOffer(index) {
+            this.id = this.quotedPriceList[index].id;
+            this.royalties = this.quotedPriceList[index].royalties;
+            if (this.quotedPriceList[index].serviceCharge >= 1) {
+                this.serviceCharge = this.quotedPriceList[index].serviceCharge - 1;
+                this.payChannel = 1;
+            } else {
+                this.serviceCharge = this.quotedPriceList[index].serviceCharge;
+                this.payChannel = 0;
+            }
+            this.show = true;
+            this.price = Number(this.quotedPriceList[index].price);
+            this.royaltiesAmount = Number((Math.floor(this.price * (this.royalties || 0)) / 100).toFixed(2));
+            this.serviceChargeAmount = Number((Math.floor(this.price * (this.serviceCharge || 0)) / 100).toFixed(2));
+            this.payChannelAmount = Number((Math.floor(this.price * (this.payChannel || 0)) / 100).toFixed(2));
+            this.finalIncome = this.price - (this.royaltiesAmount + this.serviceChargeAmount + this.payChannelAmount);
+            this.finalIncome = this.finalIncome.toFixed(2);
+        },
         pad(n, width, z) {
             z = z || '0';
             n = n + '';
             return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n;
         },
         getDomain() {
+            this.$toast.loading({
+                message: '加载中...',
+                forbidClick: true
+            });
+            this.$http
+                .post('/domainAsk/maxPrice', {
+                    domainOrderId: this.domainOrderId
+                })
+                .then(res => {
+                    this.highestBid = res;
+                })
+                .catch(e => {});
             return this.$http.get('/asset/get/' + this.assetId).then(res => {
-                if (res.endTime) {
-                    res.endTime = this.dayjs(res.endTime).diff(this.dayjs(), 'second');
-                    res.endTime =
-                        Math.floor(res.endTime / 24 / 3600) +
-                        '天' +
-                        this.pad(parseInt(res.endTime / 3600) % 24, 2) +
-                        '时' +
-                        this.pad(parseInt(res.endTime / 60) % 60, 2) +
-                        '分';
-                }
+                res.endTime = this.dayjs(res.endTime).diff(this.dayjs(), 'second');
+                res.endTime =
+                    Math.floor(res.endTime / 24 / 3600) +
+                    '天' +
+                    this.pad(parseInt(res.endTime / 3600) % 24, 2) +
+                    '时' +
+                    this.pad(parseInt(res.endTime / 60) % 60, 2) +
+                    '分';
                 this.info = res;
+                setTimeout(() => {
+                    this.$toast.clear();
+                }, 100);
             });
         },
         getList(isFirst = false) {
@@ -152,10 +233,14 @@ export default {
             this.finished = false;
             this.empty = false;
             let query = {
-                type: 'DOMAIN'
+                type: 'DOMAIN',
+                status: 'ASKING,FINISH,REFUNDED',
+                companyId: 1,
+                assetId: this.assetId,
+                ownerId: this.$store.state.userInfo.id
             };
-            let sort = 'likes,desc';
-            let url = 'collection/all';
+            let sort = 'price,desc';
+            let url = 'domainAsk/all';
             return this.$http
                 .post(
                     url,
@@ -163,8 +248,7 @@ export default {
                         page: this.page,
                         size: 20,
                         query: query,
-                        sort: sort,
-                        search: this.search
+                        sort: sort
                     },
                     { body: 'json' }
                 )
@@ -182,6 +266,29 @@ export default {
                     }
                 });
         },
+        affirmBtn() {
+            this.$http
+                .post('/domainAsk/accept', {
+                    id: this.id
+                })
+                .then(res => {
+                    this.show = false;
+                    this.$toast.success('接受成功');
+                    this.$router.back();
+                })
+                .catch(e => {
+                    this.$toast(e.error || '接受报价失败');
+                    this.show = false;
+                });
+        },
+        goBack() {
+            this.$router.push({
+                path: '/store',
+                query: {
+                    goBack: true
+                }
+            });
+        },
         onRefresh() {
             this.getList(true).then(() => {
                 this.isLoading = false;
@@ -196,6 +303,120 @@ export default {
     background: #0f0f0f;
 }
 
+/deep/ .van-popup {
+    width: calc(80vw);
+    background: #161414;
+    border-radius: 8px;
+    border: 1px solid #302b30;
+    backdrop-filter: blur(11px);
+    padding: 24px 20px 30px;
+    box-sizing: border-box;
+
+    .accept_offer_title {
+        font-size: 16px;
+        font-weight: 400;
+        color: #ffffff;
+        line-height: 24px;
+        text-align: center;
+        margin-bottom: 20px;
+    }
+
+    .accept_offer_title_tip {
+        display: flex;
+        justify-content: center;
+        margin-bottom: 24px;
+
+        .accept_offer_title_tip_con {
+            display: flex;
+            align-items: center;
+
+            .accept_offer_title_tip_con_img {
+                width: 10px;
+                height: 18px;
+                margin-right: 6px;
+            }
+
+            .accept_offer_title_tip_con_text {
+                width: calc(62vw);
+                font-size: 20px;
+                font-weight: bold;
+                color: #ffffff;
+                line-height: 24px;
+                overflow: hidden;
+                white-space: nowrap;
+                text-overflow: ellipsis;
+            }
+        }
+    }
+
+    .accept_offer_list {
+        display: flex;
+        justify-content: space-between;
+        border-bottom: 1px #242424 solid;
+        padding-bottom: 10px;
+        margin-bottom: 10px;
+
+        .accept_offer_list_title {
+            font-size: 14px;
+            font-weight: 400;
+            color: #939599;
+            line-height: 24px;
+        }
+
+        .accept_offer_list_price {
+            font-size: 14px;
+            font-weight: bold;
+            color: #ffffff;
+            line-height: 24px;
+        }
+    }
+
+    .final_income {
+        display: flex;
+        justify-content: space-between;
+        margin-bottom: 30px;
+
+        .final_income_title {
+            font-size: 14px;
+            font-weight: 400;
+            color: #ffffff;
+            line-height: 24px;
+        }
+
+        .final_income_price {
+            font-size: 16px;
+            font-weight: bold;
+            color: #00fe1e;
+            line-height: 24px;
+        }
+    }
+
+    .accept_offer_btn {
+        display: flex;
+        justify-content: space-between;
+        font-size: 16px;
+        font-weight: bold;
+        line-height: 38px;
+        text-align: center;
+
+        .accept_offer_btn_left {
+            width: calc(32vw);
+            height: 38px;
+            background: #2d2b2b;
+            border-radius: 8px;
+            color: #ffffff;
+        }
+
+        .accept_offer_btn_right {
+            width: calc(32vw);
+            height: 38px;
+            background: #00fe1e;
+            border-radius: 8px;
+            color: #000000;
+        }
+    }
+}
+
 .product_top_one {
     height: 50px;
     font-size: 16px;
@@ -362,6 +583,7 @@ export default {
         }
 
         .box-list_con_right_con_btns {
+            float: right;
             margin-top: 8px;
             width: 38px;
             height: 22px;

+ 1 - 1
src/views/user/ShoppingCart.vue

@@ -216,7 +216,6 @@ export default {
         ...mapState(['userInfo'])
     },
     mounted() {
-        this.getTopNum();
         this.getList();
     },
     methods: {
@@ -456,6 +455,7 @@ export default {
                         this.collectionList = [];
                         this.page = 0;
                     }
+                    this.getTopNum();
                     res.content.forEach(item => {
                         if (item.endTime) {
                             item.endTime = this.dayjs(item.endTime).diff(this.dayjs(), 'second');

+ 13 - 4
src/views/user/ShoppingCartSubmit.vue

@@ -120,7 +120,7 @@ export default {
                     this.$dialog
                         .alert({
                             title: '提示',
-                            message: '订单存在已售罄的藏品'
+                            message: '订单藏品已全部售罄'
                         })
                         .then(res => {
                             this.$router.back();
@@ -281,7 +281,6 @@ export default {
             }
             if (this.payName == '1') {
                 this.id = this.orderId;
-                console.log('hggafg', this.id, this.orderId);
                 if (this.payType != 'BALANCE') {
                     this.pay();
                 }
@@ -290,12 +289,22 @@ export default {
                     .then(res => {
                         this.orderId = res.id;
                         let newCollectionIds = res.collectionIds;
-                        if (res.collectionIds.length < this.collectionIds.length) {
+                        if (res.collectionIds.length == 0) {
                             this.showPwdDialog = false;
                             this.$dialog
                                 .alert({
                                     title: '提示',
-                                    message: '订单存在已售罄的藏品'
+                                    message: '订单藏品已全部售罄'
+                                })
+                                .then(res => {
+                                    this.$router.back();
+                                });
+                        } else if (res.collectionIds.length < this.collectionIds.length) {
+                            this.showPwdDialog = false;
+                            this.$dialog
+                                .alert({
+                                    title: '提示',
+                                    message: '订单存在已售罄的藏品,已重新刷新订单列表'
                                 })
                                 .then(res => {
                                     this.collectionIdLis = newCollectionIds.split(',');