panhui 4 years ago
parent
commit
8f5b2af6a8

+ 1 - 1
src/main/comos/.env.development

@@ -1,4 +1,4 @@
-VUE_APP_BASE_URL=https://nfttest.9space.vip/
+VUE_APP_BASE_URL=https://nft.9space.vip/
 NODE_ENV=development
 PUBLIC_PATH=/
 ASSETS_PATH=raex

+ 1 - 1
src/main/comos/src/mixins/product.js

@@ -64,7 +64,7 @@ export default {
             }
         },
         isSold() {
-            return !this.info.stock;
+            return this.info.stock ? this.info.stock <= 0 : true;
         }
     },
     methods: {

+ 8 - 0
src/main/comos/src/router/index.js

@@ -479,6 +479,14 @@ const routes = [
             title: 'Cosmos Art'
         }
     },
+    {
+        path: '/share',
+        name: 'share',
+        component: () => import('../views/user/Share.vue'),
+        meta: {
+            title: 'Cosmos Art'
+        }
+    },
     {
         path: '/mineExchange',
         name: 'mineExchange',

+ 147 - 0
src/main/comos/src/views/user/Share.vue

@@ -0,0 +1,147 @@
+<template>
+    <div class="page">
+        <div class="share-btn">
+            <van-button type="primary" round block>立即邀请</van-button>
+        </div>
+        <div class="code">
+            <div class="code-top">
+                <div class="text1">我的邀请码</div>
+                <div class="text2">7474448585955505057578578</div>
+                <van-button round plain> 复制</van-button>
+            </div>
+            <div class="code-btn">
+                <van-button type="primary" round block>领取奖励</van-button>
+            </div>
+        </div>
+
+        <div class="panel">
+            <div class="panel-title">我的邀请</div>
+            <div class="panel-box">
+                <div class="panel-item">
+                    <div class="text1">
+                        <span>3</span>
+                        <small>个</small>
+                    </div>
+                    <div class="text2">已获得藏品</div>
+                </div>
+                <div class="panel-item">
+                    <div class="text1">
+                        <span>1</span>
+                        <small>人</small>
+                    </div>
+                    <div class="text2">邀请好友</div>
+                </div>
+            </div>
+        </div>
+
+        <div class="tips">
+            活动规则<br />
+            1.邀请5位好友可获得平台空投稀有数字藏品<br />
+            2.在活动期间,参与活动的用户(以下称用“用户”“您”) 每邀请一位新用户(“新用户”系指从未注册过“第九空
+            间”的用户,是否为新用户以平台判断为准),在注册当 日绑定您的邀请码,在三个工作日后您可获得平台空投。
+        </div>
+    </div>
+</template>
+
+<script>
+export default {};
+</script>
+
+<style lang="less" scoped>
+.page {
+    background-color: #f3f4f5;
+}
+.share-btn {
+    padding: 16px 70px;
+}
+
+.code {
+    padding: 0 7px;
+    .code-top {
+        .flex();
+        height: 56px;
+        border-bottom: 1px dotted #ebeff1;
+
+        .text1 {
+            font-size: 12px;
+            color: #939599;
+        }
+        .text2 {
+            font-size: 12px;
+            color: #26273c;
+            margin-left: 4px;
+            flex-grow: 1;
+        }
+        .van-button {
+            border: 1px solid #ebeff1;
+            min-width: 70px;
+        }
+    }
+    background-color: #fff;
+    margin: 0 16px;
+    border-radius: 12px;
+
+    .code-btn {
+        padding: 12px 80px 16px;
+    }
+}
+
+.panel {
+    margin: 20px 16px 0;
+    background: #ffffff;
+    border-radius: 12px;
+
+    .panel-title {
+        font-size: 18px;
+        font-weight: bold;
+        line-height: 24px;
+        color: #26273c;
+        padding-top: 22px;
+        text-align: center;
+    }
+
+    .panel-box {
+        .flex();
+        .panel-item {
+            width: 50%;
+            .flex-col();
+            align-items: center;
+            justify-content: center;
+            padding: 28px 0;
+
+            .text1 {
+                font-size: 26px;
+                font-weight: bold;
+                line-height: 35px;
+                color: #ff6464;
+                .flex();
+                span {
+                    display: inline-block;
+                }
+                small {
+                    font-size: 12px;
+                    font-weight: normal;
+                    line-height: 17px;
+                    color: #939599;
+                    margin-top: 6px;
+                    display: inline-block;
+                }
+            }
+
+            .text2 {
+                font-size: 12px;
+                line-height: 17px;
+                color: #939599;
+                margin-top: 2px;
+            }
+        }
+    }
+}
+
+.tips {
+    font-size: 14px;
+    line-height: 24px;
+    color: #939599;
+    margin: 25px 16px;
+}
+</style>