Просмотр исходного кода

Merge branch 'master' of http://git.izouma.com/xiongzhu/9th

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

+ 12 - 0
pom.xml

@@ -380,6 +380,18 @@
             <artifactId>thumbnailator</artifactId>
             <version>0.4.14</version>
         </dependency>
+
+        <dependency>
+            <groupId>com.huifu.adapay.core</groupId>
+            <artifactId>adapay-core-sdk</artifactId>
+            <version>1.2.10</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.huifu.adapay</groupId>
+            <artifactId>adapay-java-sdk</artifactId>
+            <version>1.2.10</version>
+        </dependency>
     </dependencies>
 
 </project>

+ 1 - 1
src/main/java/com/izouma/nineth/domain/AirDrop.java

@@ -27,8 +27,8 @@ public class AirDrop extends BaseEntity {
     @ApiModelProperty("备注")
     private String remark;
 
-    @ApiModelProperty("空投类型")
     @Enumerated(EnumType.STRING)
+    @ApiModelProperty("空投类型")
     private AirDropType type;
 
     @ApiModelProperty("兑换券ID")

BIN
src/main/pc-space/src/assets/icon_gouxuan_huise.png


BIN
src/main/pc-space/src/assets/icon_gouxuan_pre.png


BIN
src/main/pc-space/src/assets/img/888.jpg


BIN
src/main/pc-space/src/assets/img/bg-moren@3x.png


BIN
src/main/pc-space/src/assets/nav_logo@3x (1).png


+ 1 - 1
src/main/pc-space/src/components/AssetInfo.vue

@@ -152,7 +152,7 @@ export default {
         font-size: 18px;
         color: #939599;
         line-height: 24px;
-        padding: 0 16px 12px;
+        padding: 0 16px 16px;
     }
     .border {
         height: 1px;

+ 10 - 1
src/main/pc-space/src/components/CollectionInfo.vue

@@ -11,13 +11,14 @@
         <el-image class="imgBox" :src="getImg(changeImgs(info.pic))" fit="cover"></el-image>
 
         <div class="introduce">{{ info.name }}</div>
-        <div class="price">
+        <div class="price" v-if="info.salable">
             <img class="img1" src="../assets/img/icon_jiage@3x.png" alt="" />
             <div class="num">{{ info.price }}</div>
             <!-- <div class="time" >
                 <div class="time1">抢购倒计时<span>1天 01:35:06</span></div>
             </div> -->
         </div>
+        <div class="init" v-else>仅展示</div>
         <div class="border"></div>
         <div class="fans">
             <div class="text">
@@ -139,6 +140,14 @@ export default {
         color: #939599;
         line-height: 20px;
     }
+    .init {
+        font-size: 18px;
+        font-weight: 400;
+        color: #939599;
+        line-height: 24px;
+        padding: 0 16px 16px;
+        margin-top: 4px;
+    }
     .price {
         display: flex;
         align-items: center;

+ 157 - 0
src/main/pc-space/src/components/CouponInfo.vue

@@ -0,0 +1,157 @@
+<template>
+    <div class="page">
+        <div v-for="(item, index) in list" :key="index">
+            <div class="coupon" @click="choose">
+                <div class="coupon-top">
+                    <div class="text1">{{ item.name }}</div>
+                    <div class="text2">
+                        <span>兑换券编码</span>
+                        <span>{{ item.id }}</span>
+                    </div>
+                </div>
+                <div class="coupon-bottom">
+                    <span>有效期至:{{ item.expiration }}</span>
+                    <span v-if="!item.limited">规定商品可用</span>
+                </div>
+
+                <!-- <img v-if="chooseId === item.id" class="icon" src="../assets/icon_gouxuan_pre.png" alt="" />
+                <img v-else class="icon" src="../assets/icon_gouxuan_huise.png" alt="" /> -->
+                <el-empty v-if="empty" description="暂无兑换券哦~" />
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import { mapState } from 'vuex';
+import pageableTable from '../mixins/pageableTable';
+export default {
+    name: 'couponList',
+    mixins: [pageableTable],
+    data() {
+        return {
+            url: '/userCoupon/all',
+            list: [],
+            empty: false,
+            chooseId: 0
+        };
+    },
+    computed: {
+        ...mapState(['couponInfo'])
+    },
+    mounted() {
+        console.log(this.list);
+    },
+    methods: {
+        beforeData() {
+            return {
+                query: {
+                    userId: this.userInfo.id
+                }
+            };
+        },
+        setList(list) {
+            this.list = list;
+        },
+        choose(info) {
+            this.$router.push('/collection');
+        }
+    }
+};
+</script>
+
+<style lang="less" scoped>
+.list {
+    padding: 24px 0 50px;
+}
+.coupon {
+    border-radius: 8px;
+    background: linear-gradient(135deg, rgba(253, 251, 96, 1), rgba(255, 143, 62, 1));
+    position: relative;
+    padding: 0 10px;
+    margin: 0 16px 16px;
+    &::after {
+        content: '';
+        position: absolute;
+        top: 1px;
+        right: 1px;
+        left: 1px;
+        bottom: 1px;
+        border-radius: 8px;
+        background-color: #181818;
+        z-index: 0;
+    }
+
+    div {
+        position: relative;
+        z-index: 1;
+    }
+
+    .coupon-top {
+        padding: 16px 0;
+
+        .text1 {
+            font-size: 18px;
+            font-weight: bold;
+            color: #939599;
+            line-height: 24px;
+            background: linear-gradient(0deg, #fdfb60 0%, #ff8f3e 100%);
+            -webkit-background-clip: text;
+            -webkit-text-fill-color: transparent;
+        }
+
+        .text2 {
+            padding-top: 6px;
+            font-size: 12px;
+            line-height: 17px;
+            color: #939599;
+            span {
+                &:last-child {
+                    color: #fff;
+                    margin-left: 6px;
+                }
+            }
+        }
+    }
+
+    .coupon-bottom {
+        border-top: 1px dashed #ebebeb;
+        color: #939599;
+        font-size: 11px;
+        line-height: 17px;
+        padding: 9px 0;
+        display: flex;
+        justify-content: space-between;
+        position: relative;
+        &::before {
+            content: '';
+            position: absolute;
+            background-color: #181818;
+            width: 16px;
+            height: 16px;
+            left: -18px;
+            top: -8px;
+            border-radius: 16px;
+        }
+        &::after {
+            content: '';
+            position: absolute;
+            background-color: #181818;
+            width: 16px;
+            height: 16px;
+            right: -18px;
+            top: -8px;
+            border-radius: 16px;
+        }
+    }
+
+    .icon {
+        position: absolute;
+        width: 24px;
+        height: 24px;
+        right: 10px;
+        top: 30px;
+        z-index: 3;
+    }
+}
+</style>

+ 0 - 163
src/main/pc-space/src/components/GoodsInfo.vue

@@ -1,163 +0,0 @@
-<template>
-    <div>
-        <div class="box" @click="Store">
-            <div class="content" v-for="(item, index) in list" :key="index">
-                <img class="imgBox" src="../assets/img/888.jpg" alt="" />
-                <div class="introduce">{{ item.name }}</div>
-                <div class="price">
-                    <img class="img1" src="../assets/img/icon_jiage@3x.png" alt="" />
-                    <div class="num">{{ item.price }}</div>
-                    <div class="time" v-if="flagId == 1">
-                        <div class="time1">抢购倒计时<span>1天 01:35:06</span></div>
-                    </div>
-                </div>
-                <div class="border"></div>
-                <div class="fans">
-                    <div class="text">
-                        <div class="text1 name1">
-                            <img class="text2" src="../assets/img/888.jpg" alt="" />
-                            <div class="text3">铸造者</div>
-                        </div>
-                        <div class="text1" v-if="flagId !== '1'">
-                            <img class="text2" src="../assets/img/888.jpg" alt="" />
-                            <div class="text3">持有者</div>
-                        </div>
-                    </div>
-                    <div class="text">
-                        <div class="text1" v-if="flagId !== '1'">
-                            <img class="text2 text4" src="../assets/img/like.png" alt="" />
-                            <div class="text3">16</div>
-                        </div>
-                        <div class="text1" v-else>
-                            <img class="text2 text4" src="../assets/img/icon-yuyue@3x.png" alt="" />
-                            <div class="text3">预约</div>
-                        </div>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-</template>
-<script>
-export default {
-    data() {
-        return {
-            list: [
-                { name: '游戏《百分之一》精美皮肤-恶…', price: '320' },
-                { name: '游戏《百分之一》精美皮肤-恶…', price: '320' },
-                { name: '游戏《百分之一》精美皮肤-恶…', price: '320' },
-                { name: '游戏《百分之一》精美皮肤-恶…', price: '320' }
-            ]
-        };
-    },
-    computed: {
-        flagId() {
-            return this.$route.query.flag;
-        }
-    },
-    mounted() {},
-    methods: {
-        Store() {
-            this.$router.push('/storeDetail');
-        }
-    }
-};
-</script>
-<style lang="less" scoped>
-.box {
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    .content {
-        .line();
-        width: 276px;
-        height: 416px;
-        .imgBox {
-            height: 266px;
-            width: 100%;
-            border-radius: 8px 8px 0px 0px;
-        }
-        .introduce {
-            padding: 10px 16px 6px;
-            font-size: 14px;
-            font-weight: 400;
-            color: #939599;
-            line-height: 20px;
-        }
-        .price {
-            display: flex;
-            align-items: center;
-            // justify-content: space-between;
-            padding: 0 16px 16px;
-            .img1 {
-                width: 10px;
-                height: 11px;
-                margin-top: 10px;
-            }
-            .num {
-                font-size: 30px;
-                font-family: OSP-DIN, OSP;
-                font-weight: normal;
-                color: @prim;
-                line-height: 30px;
-            }
-            .time {
-                display: flex;
-                margin-left: 24px;
-                .time1 {
-                    font-size: 14px;
-                    font-weight: 400;
-                    color: #939599;
-                    line-height: 24px;
-                }
-                span {
-                    font-size: 14px;
-                    font-weight: 400;
-                    color: @prim;
-                    line-height: 24px;
-                    margin-left: 6px;
-                }
-            }
-        }
-        .border {
-            height: 1px;
-            background: #494a4d;
-            border-radius: 1px;
-            margin: 0 16px;
-        }
-        .fans {
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            padding: 19px 16px 20px;
-            .text {
-                display: flex;
-                align-items: center;
-                .text1 {
-                    display: flex;
-                    align-items: center;
-                    &.name1 {
-                        margin-right: 22px;
-                    }
-                    .text2 {
-                        width: 20px;
-                        height: 20px;
-                        border-radius: 50%;
-                        margin-right: 4px;
-                        &.text4 {
-                            width: 18px;
-                            height: 18px;
-                        }
-                    }
-                    .text3 {
-                        font-size: 14px;
-                        font-weight: 400;
-                        color: #939599;
-                        line-height: 24px;
-                    }
-                }
-            }
-        }
-    }
-}
-</style>

+ 3 - 0
src/main/pc-space/src/components/LoginInfo.vue

@@ -222,6 +222,9 @@ export default {
         line-height: 28px;
     }
 }
+/deep/ .el-link {
+    font-size: 12px;
+}
 /deep/ .el-dialog__header {
     padding: 30px 0 45px 80px;
 }

+ 3 - 3
src/main/pc-space/src/components/PageHeader.vue

@@ -2,7 +2,7 @@
     <div class="container">
         <div class="header">
             <router-link class="logo-link" :to="{ path: '/' }">
-                <img class="logo" src="../assets/img/nav_logo@3x.png" alt=""
+                <img class="logo" src="../assets/nav_logo@3x (1).png" alt=""
             /></router-link>
 
             <div class="content">
@@ -34,7 +34,7 @@
                         </span>
                         <el-dropdown-menu slot="dropdown">
                             <el-dropdown-item command="nickname" style="word-break: keep-all"
-                                >{{ userInfo.username }}
+                                >{{ userInfo.nickname }}
                             </el-dropdown-item>
                             <div class="border"></div>
                             <el-dropdown-item
@@ -92,7 +92,7 @@ export default {
                     value: '/collection?type=BLIND_BOX'
                 },
                 {
-                    label: '我的NFT',
+                    label: '我的藏品',
                     value: '/my'
                 },
                 {

+ 13 - 5
src/main/pc-space/src/components/RegisterInfo.vue

@@ -20,7 +20,7 @@
                     <span class="el-icon-mobile-phone"></span>
                     <el-input style="width: 300px" v-model="form.phone" placeholder="请输入手机号"></el-input>
                 </el-form-item>
-                <el-form-item prop="code">
+                <div>
                     <el-form-item prop="code" :rules="{ required: true, message: '请输入', trigger: 'blur' }">
                         <span class="icon">
                             <img src="../assets/img/login_icon_yanzhengma@3x (2).png" alt="" />
@@ -34,7 +34,7 @@
                             >
                         </el-input>
                     </el-form-item>
-                </el-form-item>
+                </div>
                 <el-form-item prop="password">
                     <span class="el-icon-unlock"></span>
                     <el-input
@@ -56,11 +56,11 @@
                     ></el-input>
                 </el-form-item>
             </el-form>
-            <!-- <template>
+            <template>
                 <el-checkbox v-model="checked" v-if="isShow2">
                     <el-link style="margin-bottom: 2px">点击同意注册协议</el-link>
                 </el-checkbox>
-            </template> -->
+            </template>
             <div class="sub-btn" style="width: 300px" v-if="isShow2">
                 <div class="btn1" @click="doRegister">立即注册</div>
                 <el-button style="background: #f2f3f5; color: #292c33" type="info" class="btn-block" @click="Login"
@@ -137,7 +137,10 @@ export default {
         },
         // 注册
         doRegister() {
-            // this.$http;
+            if (this.checked == false) {
+                this.$message.warning('请点击同意注册协议');
+                return;
+            }
             this.verifyMsg(this.form.phone, this.form.code).then(() => {
                 return (
                     this.$http
@@ -229,6 +232,11 @@ export default {
 /deep/ .el-form-item__error {
     left: 110px;
 }
+.bbb {
+    /deep/ .el-form-item__error {
+        left: 0px !important;
+    }
+}
 /deep/ .el-form-item__content {
     display: flex;
     justify-content: center;

+ 15 - 0
src/main/pc-space/src/mixins/common.js

@@ -58,6 +58,21 @@ export default {
         //         return Promise.resolve(res.data);
         //     });
         // },
+        accAdd(arg1, arg2) {
+            var r1, r2, m;
+            try {
+                r1 = arg1.toString().split('.')[1].length;
+            } catch (e) {
+                r1 = 0;
+            }
+            try {
+                r2 = arg2.toString().split('.')[1].length;
+            } catch (e) {
+                r2 = 0;
+            }
+            m = Math.pow(10, Math.max(r1, r2));
+            return (arg1 * m + arg2 * m) / m;
+        },
         updateFile(e, size = 2000) {
             console.log(e);
             const formData = new FormData();

+ 5 - 1
src/main/pc-space/src/store/index.js

@@ -11,7 +11,8 @@ export default new Vuex.Store({
         historys: [],
         institutionInfo: null,
         personalInfo: null,
-        showAdd: false
+        showAdd: false,
+        couponInfo: null
     },
     mutations: {
         setKeeps(state, keeps) {
@@ -25,6 +26,9 @@ export default new Vuex.Store({
         },
         updateShowAdd(state, showAdd) {
             state.showAdd = showAdd;
+        },
+        setCouponInfo(state, couponInfo) {
+            state.couponInfo = couponInfo;
         }
     },
     actions: {

+ 4 - 3
src/main/pc-space/src/views/AssetDetail.vue

@@ -730,6 +730,7 @@ export default {
                 }
                 &.name2 {
                     width: 313px;
+                    padding-left: 0;
                 }
             }
             span {
@@ -772,12 +773,12 @@ export default {
                 font-weight: 400;
                 color: #939599;
                 line-height: 24px;
-                padding-left: 16px;
+                padding-left: 22px;
             }
             .img {
                 width: 24px;
                 height: 24px;
-                padding-left: 16px;
+                padding-left: 21px;
                 cursor: pointer;
             }
             .iconBox {
@@ -787,7 +788,7 @@ export default {
                 .img2 {
                     width: 24px;
                     height: 24px;
-                    padding-left: 50px;
+                    padding-left: 52px;
                     cursor: pointer;
                 }
             }

+ 6 - 2
src/main/pc-space/src/views/CastingDetail.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="detail">
-        <el-image class="bg" :src="info.bg" fit="cover"></el-image>
+        <el-image class="bg" :src="info.bg || require('../assets/defaultBg.jpg')" fit="cover"></el-image>
         <div class="detail-content center-content">
             <el-image :src="info.avatar" fit="cover" class="avatar"></el-image>
             <div class="info">
@@ -185,7 +185,10 @@ export default {
     position: relative;
     padding: 66px 50px;
 }
-
+// .select {
+//     border: 1px solid #898989;
+//     border-radius: 8px;
+// }
 .info {
     .name {
         font-size: 24px;
@@ -244,6 +247,7 @@ export default {
 
             &.prim {
                 .line(@radius:28px);
+                border: 0;
                 text-align: center;
                 /deep/span {
                     color: @prim;

+ 3 - 2
src/main/pc-space/src/views/CollectionDetail.vue

@@ -80,7 +80,7 @@
                     </div>
                     <div class="price1 num">
                         <div class="num1">
-                            <div class="price2 num2">数量</div>
+                            <div class="price2 num2">限购</div>
                             <span class="span">{{ info.total }}</span>
                         </div>
                         <div class="price2 num2">已售 {{ info.sale }} / 剩余 {{ info.stock }}</div>
@@ -631,7 +631,7 @@ export default {
                     margin-left: 16px;
                 }
                 .price2 {
-                    font-size: 16px;
+                    font-size: 14px;
                     font-weight: 400;
                     color: #939599;
                     line-height: 24px;
@@ -876,6 +876,7 @@ export default {
     width: 100%;
     display: block;
     height: 52px;
+    font-size: 16px;
     background: linear-gradient(135deg, @prim 0%, @warn 100%);
     border-radius: 8px;
     border-width: 0;

+ 1 - 1
src/main/pc-space/src/views/Index.vue

@@ -19,7 +19,7 @@
             >
                 <div class="footer center-content">
                     <div class="footer-l">
-                        <img class="logo" src="../assets/img/nav_logo@3x.png" alt="" />
+                        <img class="logo" src="../assets/nav_logo@3x (1).png" alt="" />
                         <div>
                             <div class="text1">加入创造者生态</div>
                             <div class="text2">让我们成为一批游戏NFT的弄潮儿</div>

+ 47 - 3
src/main/pc-space/src/views/My.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="container center-content">
-        <div class="title">我的 NFT</div>
+        <div class="title">我的藏品</div>
         <el-radio-group class="menu" v-model="select" size="normal">
             <el-radio-button v-for="(item, index) in typeList" :key="index" :label="item.value">
                 <div class="radio-item">
@@ -26,7 +26,13 @@
             </el-select>
         </div>
         <div class="list" v-loading="fetchingData">
-            <asset-info v-for="(item, index) in list" :key="item.id" :info.sync="list[index]"></asset-info>
+            <template v-if="select === '0'">
+                <asset-info v-for="(item, index) in list" :key="item.id" :info.sync="list[index]"></asset-info>
+            </template>
+            <template v-if="select === '2'">
+                <coupon-info></coupon-info>
+                <!-- <asset-info v-for="(item, index) in list" :key="item.id" :info.sync="list[index]"></asset-info> -->
+            </template>
 
             <el-empty v-if="empty" description="还没有该类型的藏品哦~"></el-empty>
         </div>
@@ -47,9 +53,10 @@
 </template>
 <script>
 import AssetInfo from '../components/AssetInfo.vue';
+import CouponInfo from '../components/CouponInfo.vue';
 import pageableTable from '../mixins/pageableTable';
 export default {
-    components: { AssetInfo },
+    components: { AssetInfo, CouponInfo },
     mixins: [pageableTable],
     data() {
         return {
@@ -97,6 +104,43 @@ export default {
     mounted() {
         this.init();
     },
+    watch: {
+        select() {
+            switch (this.select) {
+                case '0':
+                    this.url = '/asset/all';
+                    break;
+                case '1':
+                    // this.url = '/asset/all';
+                    break;
+                case '2':
+                    // this.url = '/userCoupon/all';
+                    break;
+                case '3':
+                    this.type = 'AUCTION';
+                    this.canResale = '';
+                    break;
+            }
+
+            this.$router
+                .replace({
+                    query: {
+                        ...this.$route.query,
+                        type: this.type,
+                        canResale: this.canResale
+                    }
+                })
+                .catch(() => {});
+
+            this.page = 1;
+            this.getData();
+        },
+        '$route.query.type'() {
+            if (!this.$route.query.type || this.$route.query.type === 'BLIND_BOX') {
+                this.init();
+            }
+        }
+    },
     methods: {
         init() {
             this.checkLogin()

+ 6 - 7
src/main/pc-space/src/views/Send.vue

@@ -111,7 +111,7 @@ export default {
             info: [],
             checked: true,
             id: 103,
-            idOrder: 1034,
+            idOrder: 0,
             form: { password: '' },
             status: '',
             gas: 0,
@@ -154,13 +154,12 @@ export default {
             }
         },
         payUrl() {
-            return resolveUrl(this.$baseUrl, '9th/payOrder/weixin_pc?id=' + this.idOrder);
+            return resolveUrl(
+                this.$baseUrl,
+                'https://nfttest.9space.vip/wx/redirect?redirectUrl=https://nfttest.9space.vip/payOrder/weixin_pc?id=' +
+                    this.idOrder
+            );
         }
-        // payUrl() {
-        //     return resolveUrl(
-        //         'https://nfttest.9space.vip/wx/redirect?redirectUrl=https://nfttest.9space.vip/payOrder/weixin_pc?id=2006'
-        //     );
-        // }
     },
     methods: {
         submit() {

+ 158 - 33
src/main/pc-space/src/views/Submit.vue

@@ -1,6 +1,24 @@
 <template>
     <el-dialog center title="支付订单" :visible.sync="show" width="680px">
         <div class="page" v-loading="loading">
+            <div class="coupon" @click="choose(list2)">
+                <div class="coupon-top">
+                    <div class="text1">{{ list2.name }}</div>
+                    <div class="text2">
+                        <span>兑换券编码</span>
+                        <span>{{ list2.id }}</span>
+                    </div>
+                </div>
+                <div class="coupon-bottom">
+                    <span>有效期至:{{ list2.expiration }}</span>
+                    <span v-if="!list2.limited">规定商品可用</span>
+                </div>
+
+                <img v-if="chooseId === list2.id" class="icon" src="../assets/icon_gouxuan_pre.png" alt="" />
+                <img v-else class="icon" src="../assets/icon_gouxuan_huise.png" alt="" />
+                <el-empty v-if="empty" description="暂无兑换券哦~" />
+            </div>
+            <div @click="$router.push('/my')">查看更多</div>
             <div class="info">
                 <div class="price">
                     <span class="text1">应付金额</span>
@@ -57,12 +75,17 @@
 <script>
 import vueQrcode from '@chenfengyuan/vue-qrcode';
 import resolveUrl from 'resolve-url';
+import pageableTable from '../mixins/pageableTable';
+import { mapState } from 'vuex';
 import { add } from 'mathjs';
 export default {
+    mixins: [pageableTable],
     data() {
         return {
             show: false,
+            url: '/userCoupon/all',
             payMethods: 'WEIXIN',
+            list2: [],
             payList: [
                 {
                     icon: require('../assets/weixin.png'),
@@ -89,45 +112,53 @@ export default {
         };
     },
     computed: {
-        // payUrl() {
-        //     return resolveUrl('https://nfttest.9space.vip/wx/payOrder/weixin_pc?id=' + this.info.id);
-        // },
         payUrl() {
-            return resolveUrl(this.$baseUrl, 'https://nfttest.9space.vip/payOrder/weixin_pc?id=' + this.id);
+            return resolveUrl(
+                this.$baseUrl,
+                'https://nfttest.9space.vip/wx/redirect?redirectUrl=https://nfttest.9space.vip/payOrder/weixin_pc?id=' +
+                    this.id
+            );
         },
-        // https://nfttest.9space.vip/wx/redirect?redirectUrl=https://nfttest.9space.vip/payOrder/weixin_pc?id=2006
         money() {
-            if (this.info.price) {
-                return add(this.info.price, this.gas);
-            } else {
-                return 0;
+            let money = 0;
+            if (this.info.price && !this.couponInfo) {
+                money = this.accAdd(this.info.price, money);
             }
-            // add(this.info.price, this.gas)
-            // if (this.info.price) {
-            //     return this.info.price.reduce((prev, cur) => {
-            //         var r1, r2, m;
-            //         try {
-            //             r1 = prev.toString().split('.')[1].length;
-            //         } catch (e) {
-            //             r1 = 0;
-            //         }
-            //         try {
-            //             r2 = cur.money.toString().split('.')[1].length;
-            //         } catch (e) {
-            //             r2 = 0;
-            //         }
-            //         m = Math.pow(10, Math.max(r1, r2));
-            //         return (prev * m + cur.money * m) / m;
-            //     }, 0);
-            // } else {
-            //     return 0;
-            // }
+            if (this.gas && (!this.couponInfo || this.couponInfo.needGas)) {
+                money = this.accAdd(money, this.gas);
+            }
+
+            return money;
+        },
+        ...mapState(['couponInfo'])
+    },
+    beforeRouteLeave(to, from, next) {
+        console.log(to);
+        if (to.path !== '/couponList') {
+            this.$store.commit('setCouponInfo', null);
         }
+        next();
+    },
+    mounted() {
+        this.getData();
     },
     methods: {
+        beforeData() {
+            return {
+                query: {
+                    userId: this.userInfo.id
+                }
+            };
+        },
+        setList(list) {
+            this.list2 = list[0];
+            console.log(this.list2);
+        },
+        choose(info) {
+            this.chooseId = info.id;
+            this.$store.commit('setCouponInfo', info);
+        },
         submit() {
-            // console.log(this.payUrl);
-            // console.log(this.info.id);
             // console.log(this.$baseUrl);
             // if (this.payMethods === 'DCEP') {
             //     this.wait();
@@ -135,9 +166,11 @@ export default {
             this.$http
                 .post('/order/create?collectionId=' + this.$route.query.id + '&qty=1')
                 .then(res => {
-                    // console.log(res);
-                    this.id = res.id;
+                    console.log(res);
                     this.status = res.status;
+                    this.id = res.id;
+                    console.log(this.id);
+                    console.log(this.payUrl);
                 })
                 .catch(e => {
                     if (e) {
@@ -237,7 +270,99 @@ export default {
 /deep/.el-loading-mask {
     background-color: #ffffffee;
 }
+.list {
+    padding: 24px 0 50px;
+}
+.coupon {
+    border-radius: 8px;
+    background: linear-gradient(135deg, rgba(253, 251, 96, 1), rgba(255, 143, 62, 1));
+    position: relative;
+    padding: 0 10px;
+    margin: 0 16px 16px;
+    &::after {
+        content: '';
+        position: absolute;
+        top: 1px;
+        right: 1px;
+        left: 1px;
+        bottom: 1px;
+        border-radius: 8px;
+        background-color: #181818;
+        z-index: 0;
+    }
+
+    div {
+        position: relative;
+        z-index: 1;
+    }
 
+    .coupon-top {
+        padding: 16px 0;
+
+        .text1 {
+            font-size: 18px;
+            font-weight: bold;
+            color: #939599;
+            line-height: 24px;
+            background: linear-gradient(0deg, #fdfb60 0%, #ff8f3e 100%);
+            -webkit-background-clip: text;
+            -webkit-text-fill-color: transparent;
+        }
+
+        .text2 {
+            padding-top: 6px;
+            font-size: 12px;
+            line-height: 17px;
+            color: #939599;
+            span {
+                &:last-child {
+                    color: #fff;
+                    margin-left: 6px;
+                }
+            }
+        }
+    }
+
+    .coupon-bottom {
+        border-top: 1px dashed #ebebeb;
+        color: #939599;
+        font-size: 11px;
+        line-height: 17px;
+        padding: 9px 0;
+        display: flex;
+        justify-content: space-between;
+        position: relative;
+        &::before {
+            // content: '' !important;
+            // position: absolute;
+            // background-color: #181818;
+            // width: 16px;
+            // height: 16px;
+            // left: -18px;
+            // top: -8px;
+            // border-radius: 16px;
+        }
+        &::after {
+            // content: '';
+            // position: absolute;
+            // background-color: #181818;
+            // width: 16px;
+            // height: 16px;
+            // right: -18px;
+            // top: -8px;
+            // border-radius: 16px;
+        }
+    }
+
+    .icon {
+        position: absolute;
+        width: 24px;
+        height: 24px;
+        right: 10px;
+        top: 30px;
+        z-index: 3;
+    }
+}
 /deep/.el-radio {
     .flex();
     display: inline-flex;

+ 3 - 1
src/main/pc-space/src/views/user/AccountData.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="container">
         <el-upload class="top" :action="uploadUrl" :show-file-list="false" :before-upload="beforeAvatarUpload2">
-            <img class="top" :src="userInfo.bg || userInfo.avatar" alt="" />
+            <img class="top" :src="userInfo.bg || require('../../assets/img/bg-moren@3x.png')" alt="" />
             <i class="el-icon-plus avatar-uploader-icon"></i>
         </el-upload>
         <div class="top1">
@@ -573,6 +573,8 @@ export default {
                     line-height: 26px;
                     &.text5 {
                         width: 745px;
+                        min-height: 60px;
+                        word-wrap: break-word;
                     }
                 }
             }

+ 2 - 2
src/main/resources/templates/PayOrderPC.ftlh

@@ -31,7 +31,7 @@
     </div>
 </div>
 <script>
-    //var vConsole = new VConsole();
+    // var vConsole = new VConsole();
     var payParams = ${payParams?no_esc};
     payParams.package = payParams.packageValue;
     payParams.timestamp = payParams.timeStamp;
@@ -55,7 +55,7 @@
                 window.close();
             }
         });
-    }
+    };
     payParams.fail = function (e) {
         console.log(e);
         showDialog({