panhui %!s(int64=4) %!d(string=hai) anos
pai
achega
910b91c5f2
Modificáronse 1 ficheiros con 310 adicións e 0 borrados
  1. 310 0
      src/main/pc-space/src/views/Send.vue

+ 310 - 0
src/main/pc-space/src/views/Send.vue

@@ -0,0 +1,310 @@
+<template>
+    <el-dialog center title="赠送" :visible.sync="show" width="680px">
+        <div class="page" v-loading="loading">
+            <div class="top-tips">通过手机号码检索用户信息,<span>赠送后该加密作品将会被转移</span></div>
+            <div class="user">
+                <el-input
+                    v-model="phone"
+                    placeholder="请输入手机号码进行检索"
+                    suffix-icon="el-icon-search"
+                    size="small"
+                    clearable
+                ></el-input>
+
+                <div class="user-content">
+                    <div class="empty">检索用户区域</div>
+                </div>
+            </div>
+            <div class="info">
+                <div class="price">
+                    <span class="text1">应付金额</span>
+                    <img src="../assets/icon_jiage.png" alt="" />
+                    <span class="text2">{{ orderInfo.price }}</span>
+                </div>
+                <div class="flex1"></div>
+                <div class="order">
+                    <span class="text1">订单编号</span>
+                    <span class="text2">{{ orderInfo.id }}</span>
+                    <el-button type="info" @click="copy" size="mini" plain>复制</el-button>
+                </div>
+            </div>
+
+            <div class="payMethods">
+                <div class="title">选择支付方式</div>
+                <div class="pay-list">
+                    <div class="pay-info">
+                        <el-radio-group v-model="payMethods">
+                            <el-radio v-for="item in payList" border :label="item.type" :key="item.type">
+                                <img :src="item.icon" alt="" />
+                                <span> {{ item.name }}</span>
+                            </el-radio>
+                        </el-radio-group>
+                    </div>
+                </div>
+            </div>
+
+            <div class="tips">
+                <div class="text1">购买须知</div>
+                <div class="text2">
+                    1.数字盲盒按照随机概率进行抽取<br />
+                    2.数字盲盒及其数字内容为虚拟商品<span style="color: #ff4f50">支付完成后,不可退换</span><br />
+                    3.数字盲盒及其数字内容仅作为消费娱乐(或其他约定场景)使用<br />
+                    4.切勿当成投资和投机品进行盲目消费
+                </div>
+            </div>
+        </div>
+
+        <span slot="footer" class="dialog-footer">
+            <el-button type="primary" class="pay" @click="submit">立即支付</el-button>
+        </span>
+    </el-dialog>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            show: true,
+            payMethods: 'ALIPAY',
+            payList: [
+                {
+                    icon: require('../assets/alipay.png'),
+                    name: '支付宝',
+                    type: 'ALIPAY'
+                },
+                {
+                    icon: require('../assets/weixin.png'),
+                    name: '微信',
+                    type: 'WEIXIN'
+                },
+                {
+                    icon: require('../assets/dcep.png'),
+                    name: 'DCEP支付',
+                    type: 'DCEP'
+                }
+            ],
+            loading: false,
+            orderInfo: {},
+            phone: ''
+        };
+    },
+    methods: {
+        submit() {
+            if (this.payMethods === 'DCEP') {
+                this.wait();
+            }
+        },
+        init(info) {
+            this.checkLogin()
+                .then(() => {
+                    this.show = true;
+                    this.loading = true;
+                    return this.$http.get('/order/get/' + 2368);
+                    // return this.$http.post('/order/create?collectionId=' + info.id + '&qty=1');
+                })
+                .then(res => {
+                    this.orderInfo = res;
+                    this.loading = false;
+                })
+                .catch(e => {
+                    if (e) {
+                        this.$message.warning(e.error);
+                    }
+                });
+        },
+        copy() {
+            this.$copyText(this.orderInfo.id).then(
+                e => {
+                    this.$message.success('复制成功');
+                },
+                e => {
+                    this.$message.warning('复制失败');
+                }
+            );
+        }
+    }
+};
+</script>
+
+<style lang="less" scoped>
+.info {
+    .flex();
+    height: 94px;
+    .price {
+        .flex();
+        align-items: flex-end;
+        .text1 {
+            font-size: 16px;
+            color: #000000;
+            line-height: 24px;
+        }
+        img {
+            width: 10px;
+            display: block;
+            margin: 0 0 4px 10px;
+        }
+        .text2 {
+            font-size: 40px;
+            font-family: OSP;
+            font-weight: normal;
+            color: #ff4f50;
+            line-height: 36px;
+        }
+    }
+
+    .order {
+        .text1 {
+            font-size: 13px;
+            color: #939599;
+            line-height: 24px;
+        }
+
+        .text2 {
+            font-size: 13px;
+            color: #0e0e0e;
+            line-height: 22px;
+            padding: 0 6px 0 30px;
+        }
+        .el-button {
+            height: 20px;
+            line-height: 20px;
+            padding: 0 10px;
+        }
+    }
+}
+/deep/.el-loading-mask {
+    background-color: #ffffffee;
+}
+
+/deep/.el-radio {
+    .flex();
+    display: inline-flex;
+    flex-direction: row-reverse;
+    justify-content: space-between;
+    width: 190px;
+    height: 42px;
+    color: #939599;
+    padding: 0;
+    box-sizing: border-box;
+    .el-radio__label {
+        .flex();
+        img {
+            width: 24px;
+            height: 24px;
+        }
+        span {
+            font-size: 16px;
+            font-weight: bold;
+            padding: 0 10px;
+        }
+        margin-left: 24px;
+    }
+    .el-radio__input {
+        margin-right: 24px;
+        width: 20px;
+        flex-shrink: 0;
+
+        .el-radio__inner {
+            width: 20px;
+            height: 20px;
+            &::after {
+                content: '\e6da';
+                font-family: 'element-icons';
+                width: 14px;
+                height: 14px;
+                font-size: 14px;
+                color: #fff;
+                font-weight: bold;
+                background-color: transparent;
+            }
+        }
+
+        &.is-checked {
+            .el-radio__inner {
+                background-image: linear-gradient(135deg, @prim 20%, @warn 100%);
+                border-width: 0;
+            }
+        }
+    }
+    &.is-checked {
+        .line(@bg:#E0FFF8,@radius:4px);
+        border-width: 0;
+        .el-radio__label {
+            color: #000;
+        }
+    }
+}
+.payMethods {
+    padding: 30px 0;
+    .title {
+        font-size: 16px;
+        color: #000000;
+        line-height: 24px;
+        padding-bottom: 20px;
+    }
+}
+/deep/.el-radio.is-bordered + .el-radio.is-bordered {
+    margin-left: 0;
+}
+
+.tips {
+    padding-top: 20px;
+    .text1 {
+        font-size: 16px;
+        color: #939599;
+        line-height: 24px;
+    }
+    .text2 {
+        font-size: 14px;
+        color: #939599;
+        line-height: 28px;
+        margin-top: 10px;
+    }
+}
+.pay {
+    background-image: linear-gradient(135deg, @prim, @warn);
+    border-width: 0;
+    width: 200px;
+    color: #000;
+    &:hover {
+        background-image: linear-gradient(135deg, darken(@prim, 20), darken(@warn, 20));
+    }
+}
+
+.top-tips {
+    text-align: center;
+    font-size: 14px;
+    color: #939599;
+    line-height: 28px;
+    span {
+        color: #ff4f50;
+    }
+}
+
+.user {
+    padding: 20px 0;
+
+    .el-input {
+        border-radius: 8px;
+    }
+
+    .user-content {
+        background: #f5f7fa;
+        border-radius: 8px;
+        height: 142px;
+        margin-top: 10px;
+        position: relative;
+
+        .empty {
+            font-size: 14px;
+            color: rgba(147, 149, 153, 0.5);
+            line-height: 24px;
+            text-align: center;
+            position: absolute;
+            left: 50%;
+            top: 50%;
+            transform: translate(-50%, -50%);
+        }
+    }
+}
+</style>