Pārlūkot izejas kodu

Weenier 168otc项目部署 0630

wesmiler 3 gadi atpakaļ
vecāks
revīzija
b89edec4dd
76 mainītis faili ar 1335 papildinājumiem un 733 dzēšanām
  1. 174 0
      addons/admin/src/views/system/account/capital.vue
  2. 249 0
      addons/admin/src/views/system/account/deposit.vue
  3. 266 0
      addons/admin/src/views/system/account/trigger.vue
  4. 96 140
      addons/admin/src/views/system/account/withdraw.vue
  5. 150 103
      addons/admin/src/views/system/advert/business.vue
  6. 121 159
      addons/admin/src/views/system/advert/hall.vue
  7. 0 21
      addons/admin/src/views/system/advert/index.vue
  8. 16 7
      addons/admin/src/views/system/advert/myorder.vue
  9. 13 9
      addons/admin/src/views/system/advert/order.vue
  10. 5 2
      addons/admin/src/views/system/buyorder/index.vue
  11. 30 11
      addons/admin/src/views/system/capital/deposit.vue
  12. 171 246
      addons/admin/src/views/system/capital/index.vue
  13. 4 3
      addons/admin/src/views/system/capital/withdraw.vue
  14. 2 2
      addons/admin/src/views/system/loginlog/index.vue
  15. 3 0
      addons/admin/src/views/system/sellorder/index.vue
  16. 2 2
      addons/utcapp/common/api.js
  17. 2 5
      addons/utcapp/pages/trade/index.vue
  18. 1 1
      addons/utcapp/unpackage/dist/build/h5/index.html
  19. BIN
      addons/utcapp/unpackage/dist/build/h5/static/icons/address_icon.png
  20. BIN
      addons/utcapp/unpackage/dist/build/h5/static/icons/advert_big.png
  21. BIN
      addons/utcapp/unpackage/dist/build/h5/static/icons/advert_icon.png
  22. BIN
      addons/utcapp/unpackage/dist/build/h5/static/icons/alipay_icon.png
  23. BIN
      addons/utcapp/unpackage/dist/build/h5/static/icons/bank.png
  24. BIN
      addons/utcapp/unpackage/dist/build/h5/static/icons/copy_icon.png
  25. BIN
      addons/utcapp/unpackage/dist/build/h5/static/icons/del.png
  26. BIN
      addons/utcapp/unpackage/dist/build/h5/static/icons/help.png
  27. BIN
      addons/utcapp/unpackage/dist/build/h5/static/icons/logout.png
  28. BIN
      addons/utcapp/unpackage/dist/build/h5/static/icons/no-data.png
  29. BIN
      addons/utcapp/unpackage/dist/build/h5/static/icons/trade.png
  30. BIN
      addons/utcapp/unpackage/dist/build/h5/static/icons/usdt_cycle.png
  31. BIN
      addons/utcapp/unpackage/dist/build/h5/static/icons/usdt_min.png
  32. BIN
      addons/utcapp/unpackage/dist/build/h5/static/icons/wxpay_green.png
  33. 0 1
      addons/utcapp/unpackage/dist/build/h5/static/js/index.1841dcb1.js
  34. 1 0
      addons/utcapp/unpackage/dist/build/h5/static/js/index.46c0ddb6.js
  35. 0 1
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-account-index.1f8a2cbd.js
  36. 0 1
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-account-index~pages-account-logs~pages-center-capital~pages-center-payment~pages-index-index~p~a3787fc6.74e7e677.js
  37. 1 0
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-account-logs.e78e370c.js
  38. 0 1
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-account-logs.f1cf3f98.js
  39. 1 0
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-account-logs~pages-auth-index~pages-center-address~pages-center-capital~pages-center-index~pag~547106ce.265c21ad.js
  40. 1 0
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-account-logs~pages-order-advert.d14e4568.js
  41. 0 1
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-account-logs~pages-order-index.eb05a161.js
  42. 0 1
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-auth-index.1369d923.js
  43. 1 0
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-auth-index.e928e8bb.js
  44. 1 0
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-auth-index~pages-center-address~pages-center-payment-add~pages-center-payment-edit~pages-forge~e48e5eda.934286f5.js
  45. 1 0
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-auth-index~pages-center-payment-add~pages-center-payment-edit~pages-order-index.c4378a8a.js
  46. 1 0
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-address.2a2b24a9.js
  47. 0 1
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-address.623cd93c.js
  48. 1 0
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-address~pages-center-payment-add~pages-center-payment-edit.e1cfe02e.js
  49. 1 0
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-address~pages-center-payment~pages-trade-advert.58c24c3c.js
  50. 0 1
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-capital.4de60434.js
  51. 1 0
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-capital.e1b121b9.js
  52. 0 1
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-index.b291eab6.js
  53. 1 0
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-index.cd676f1d.js
  54. 1 0
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-payment-add.57e7d52c.js
  55. 0 1
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-payment-add.a8575800.js
  56. 0 1
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-payment-edit.96c08cf3.js
  57. 1 0
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-payment-edit.e10e9878.js
  58. 1 0
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-payment.2535a8fc.js
  59. 0 1
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-payment.44faf535.js
  60. 0 1
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-payment~pages-center-payment-add~pages-center-payment-edit.bb0bb254.js
  61. 0 1
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-safe.1f8786e5.js
  62. 1 0
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-safe.ef8a84da.js
  63. 0 1
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-index-index.0fde654d.js
  64. 1 0
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-index-index.56b4c5e5.js
  65. 0 1
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-login-login.b57c1922.js
  66. 1 0
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-login-login.c62c4462.js
  67. 1 0
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-order-advert.217975d6.js
  68. 1 0
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-order-index.7118a964.js
  69. 0 1
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-order-index.8a0ce8a1.js
  70. 1 0
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-trade-advert.da340f04.js
  71. 1 0
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-trade-collection.6cdf949e.js
  72. 1 0
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-trade-index.5250b80d.js
  73. 0 1
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-trade-index.c785110d.js
  74. 0 1
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-trade-transfer.2bd89f28.js
  75. 1 0
      addons/utcapp/unpackage/dist/build/h5/static/js/pages-trade-transfer.67ae5985.js
  76. 6 3
      routes/web.php

+ 174 - 0
addons/admin/src/views/system/account/capital.vue

@@ -0,0 +1,174 @@
+<template>
+    <div class="ele-body">
+        <el-card shadow="never">
+            <el-tabs v-model="activeName" @tab-click="handleClick">
+                <el-tab-pane label="USDT" name="usdt">
+                    <!-- 搜索表单 -->
+                    <el-form :model="table.where" label-width="100px" class="ele-form-search"
+                             @keyup.enter.native="$refs.table.reload()" @submit.native.prevent>
+                        <el-row :gutter="15">
+                            <el-col :md="8" :sm="12">
+                                <el-form-item label="交易单号:">
+                                    <el-input v-model="table.where.keyword" placeholder="请输入交易单号" clearable/>
+                                </el-form-item>
+                            </el-col>
+                            <el-col :md="6" :sm="12">
+                                <el-form-item label="类型:">
+                                    <el-select v-model="table.where.type" placeholder="请选择" class="ele-fluid">
+                                        <el-option label="全部" value="0"/>
+                                        <el-option label="买入" value="1"/>
+                                        <el-option label="卖出" value="2"/>
+                                        <el-option label="卖出取消" value="3"/>
+                                        <el-option label="存币" value="4"/>
+                                        <el-option label="提币" value="5"/>
+                                        <el-option label="平台退还" value="6"/>
+                                        <el-option label="第三方平台交易" value="7"/>
+                                    </el-select>
+                                </el-form-item>
+                            </el-col>
+                            <el-col :md="2" :sm="12">
+                                <el-form-item label="起止日期:" prop="date">
+                                    <el-col :md="2" :sm="12">
+                                        <el-date-picker
+                                            v-model="table.where.date"
+                                            type="daterange"
+                                            placeholder="选择起止日期"
+                                            size="small"
+                                            value-format="yyyy-MM-dd"
+                                            format="yyyy-MM-dd">
+                                    </el-date-picker>
+                                    </el-col>
+                                </el-form-item>
+                            </el-col>
+
+                            <el-col :md="12" :sm="12">
+                                <div class="ele-form-actions">
+                                    <el-button type="primary" @click="$refs.table.reload()" icon="el-icon-search"
+                                               class="ele-btn-icon">查询
+                                    </el-button>
+                                    <el-button @click="(table.where={})&&$refs.table.reload()">重置</el-button>
+                                </div>
+                            </el-col>
+                        </el-row>
+                    </el-form>
+
+                    <!-- 数据表格 -->
+                    <ele-data-table ref="table" :config="table" :choose.sync="choose" height="calc(100vh - 315px)"
+                                    highlight-current-row>
+                        <template slot-scope="{index}">
+                            <el-table-column prop="time_text" label="时间" sortable="custom" show-overflow-tooltip
+                                             min-width="250"/>
+                            <el-table-column prop="username" label="用户" sortable="custom" show-overflow-tooltip
+                                             min-width="250"/>
+                            <el-table-column prop="order_no" label="订单号" sortable="custom" show-overflow-tooltip
+                                             min-width="250"/>
+                            <el-table-column prop="is_top" label="类型" sortable="custom" :resizable="false"
+                                             min-width="120">
+                                <template slot-scope="{row}">
+                                    <span class="" v-if="row.type == 1">买入</span>
+                                    <span class="" v-else-if="row.type == 2">卖出</span>
+                                    <span class="" v-else-if="row.type == 3">卖出取消</span>
+                                    <span class="" v-else-if="row.type == 4">存币</span>
+                                    <span class="" v-else-if="row.type == 5">提币</span>
+                                    <span class="" v-else-if="row.type == 6">平台退还</span>
+                                    <span class="" v-else-if="row.type == 7">第三方平台交易</span>
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="num" label="数量(USDT)" sortable="custom" show-overflow-tooltip
+                                             min-width="150">
+                                <template slot-scope="{row}">
+                                    <span v-if="row.change_type==2" class="ele-text-default">-{{row.num}}</span>
+                                    <span v-else class="ele-text-danger">+{{row.num}}</span>
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="balance" label="余额(USDT)" show-overflow-tooltip
+                                             min-width="150"/>
+                        </template>
+                    </ele-data-table>
+
+                </el-tab-pane>
+            </el-tabs>
+        </el-card>
+    </div>
+</template>
+
+<script>
+import {mapGetters} from "vuex";
+
+export default {
+    name: "SysCapital",
+    components: {},
+    data() {
+        return {
+            table: {url: '/capital/index', where: {},page:{limit: 30}},  // 表格配置
+            choose: [],  // 表格选中数据
+            userInfo: {},
+            activeName: 'usdt',
+        }
+    },
+    computed: {
+        ...mapGetters(["permission"]),
+
+    },
+    mounted() {
+        this.getData()
+    },
+    methods: {
+        handleClick() {
+
+        },
+        // 用户信息
+        getData() {
+            const loading = this.$loading({lock: true});
+            this.$http.get('/member/info', {}).then(res => {
+                loading.close();
+                if (res.data.success === true) {
+                    this.userInfo = res.data.data
+                } else {
+                    this.$message.error(res.data.msg);
+                }
+            }).catch(e => {
+                loading.close();
+                this.$message.error(e.message);
+            });
+        },
+    }
+}
+</script>
+
+<style scoped>
+.ele-block >>> .el-upload, .ele-block >>> .el-upload-dragger {
+    width: 100%;
+}
+
+.el-wallet {
+    margin: 15px 0px;
+    display: flex;
+    padding: 15px 0;
+    background-color: #f1f1f1;
+}
+.el-wallet .el-wallet-item {
+    min-width: 240px;
+    text-align: left;
+}
+.el-wallet .el-wallet-item .usdt {
+    vertical-align: middle;
+}
+
+.el-wallet .el-wallet-item .info {
+    display: inline-block;
+    vertical-align: middle;
+    margin-left: 4px;
+}
+.usdt {
+    width: 32px;
+    height: 32px;
+    border-radius: 50%;
+    vertical-align: middle;
+    margin-left: 4px;
+}
+
+.el-date-editor--daterange.el-input__inner {
+    width: 230px;
+}
+</style>

+ 249 - 0
addons/admin/src/views/system/account/deposit.vue

@@ -0,0 +1,249 @@
+<template>
+    <div class="login-wrapper">
+        <el-card shadow="never">
+            <el-row :gutter="15" >
+                <el-col :md="24" class="el-wallet">
+                    <el-col :md="8" :sm="12" class="el-wallet-item">
+                        <img class="usdt" src="../../../assets/usdt.png" alt="">
+                        <span class="info" v-if="table.where.contact_type == 1">
+                        USDT总额:{{walletData.wallet.trc_out_usdt? walletData.wallet.trc_out_usdt : '0.00'}}<br>
+                        </span>
+                        <span class="info" v-else>
+                        USDT总额:{{walletData.wallet.erc_out_usdt? walletData.wallet.erc_out_usdt : '0.00'}}<br>
+                        </span>
+                    </el-col>
+                    <el-col :md="8" :sm="12">
+                    </el-col>
+                    <el-col :md="8" :sm="12">
+                    </el-col>
+                </el-col>
+            </el-row>
+            <el-row :gutter="15">
+                <el-col :md="24" :sm="24">
+
+                    <div class="tips">
+                        <div class="title">提示:</div>
+                        <div class="info" v-html="config.coin_in_tips">
+                        </div>
+                    </div>
+                    <div class="alert">
+                        <el-alert
+                            title="存币地址已更新,请勿向旧的存币地址进行存币"
+                            type="warning"
+                            show-icon>
+                        </el-alert>
+                    </div>
+                    <div class="wallet-contacts">
+                        <span class="label">类型:</span>
+                        <el-button-group class="el-types">
+                            <el-button size="small" :type="table.where.contact_type == 1? 'primary':'default'"
+                                       @click="(table.where.contact_type = 1) && (table.where.address = walletData.trc_out_address) && $refs.table.reload()">USDT-TRC20
+                            </el-button>
+                            <el-button size="small" :type="table.where.contact_type == 2? 'primary':'default'"
+                                       @click="(table.where.contact_type = 2) && (table.where.address = walletData.erc_out_address) && $refs.table.reload()">USDT-ERC20
+                            </el-button>
+                        </el-button-group>
+                    </div>
+                    <div class="wallet">
+                        <div class="address" v-if="table.where.contact_type==1">
+                            <p><span class="label">存币地址:</span> <span>{{walletData.trc_out_address}}</span></p> <span class="copy" @click="copy(walletData.trc_out_address)">复制</span>
+                        </div>
+                        <div class="address" v-if="table.where.contact_type==2">
+                            <p><span class="label">存币地址:</span> <span>{{walletData.erc_out_address}}</span></p> <span class="copy" @click="copy(walletData.erc_out_address)">复制</span>
+                        </div>
+                        <div class="qrcode-box" v-if="table.where.contact_type==1">
+                            <img class="qrcode" :src="walletData.trc_out_qrcode" alt="">
+                        </div>
+                        <div class="qrcode-box" v-else-if="table.where.contact_type==2">
+                            <img class="qrcode" :src="walletData.erc_out_qrcode" alt="">
+                        </div>
+                    </div>
+                </el-col>
+            </el-row>
+
+            <!--  明细  -->
+            <ele-data-table ref="table" :config="table" :choose.sync="choose" height="calc(100vh - 315px)"
+                            highlight-current-row>
+                <template slot-scope="{index}">
+                    <el-table-column prop="time_text" label="存币时间" show-overflow-tooltip min-width="150"/>
+                    <el-table-column prop="from" label="来源"  show-overflow-tooltip min-width="250"/>
+                    <el-table-column prop="contact_type" label="类型"  :resizable="false" min-width="120">
+                        <template slot-scope="{row}">
+                            <span v-if="row.contact_type == 1">TRC20</span>
+                            <span v-else-if="row.contact_type == 2">ERC20</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="num" label="存币量(USDT)"  show-overflow-tooltip min-width="150"/>
+                    <el-table-column prop="status" label="状态"  :resizable="false" min-width="120">
+                        <template slot-scope="{row}">
+                            <span v-if="row.status==1" class="ele-text-success">成功</span>
+                            <span v-else class="ele-text-danger">失败</span>
+                        </template>
+                    </el-table-column>
+                </template>
+            </ele-data-table>
+        </el-card>
+
+    </div>
+</template>
+
+<script>
+export default {
+    name: "Deposit",
+    data() {
+        return {
+            loading: false,  // 保存按钮loading
+            table: {
+                url: '/index/transfer',
+                where: {type: 1, contact_type: 1},
+                page: {limit: 30}
+            },
+            config: {
+                coin_in_tips: '',
+            },
+            formData: {
+                contact_type: 1,
+            },
+            timerId: null,
+            choose: [],
+            walletData: {},
+        }
+    },
+    created() {
+        this.getData();
+        this.getConfig();
+
+
+    },
+    mounted(){
+        this.getDataList();
+    },
+    methods: {
+        getDataList(){
+            let _this = this
+            clearInterval(this.timerId);
+            let time = 12000 + parseInt(Math.random()*2000);
+            this.timerId =setInterval(function(){
+                if(_this.$refs.table){
+                    _this.$refs.table.reload();
+                    _this.getData()
+                }
+            }, time);
+
+        },
+        copy(text){
+            let _this = this
+            _this.$message.closeAll()
+            this.$copyText(text).then(
+                function(e) {
+                    _this.$message.success('复制成功');
+                },
+                function(e) {
+                    _this.$message.error('复制失败');
+                }
+            );
+        },
+        getData() {
+            const loading = this.$loading({lock: true});
+            this.$http.get('/index/wallet', {}).then(res => {
+                loading.close();
+                if (res.data.success === true) {
+                    this.walletData = res.data.data
+                    this.table.where.address = this.walletData.trc_out_address;
+                } else {
+                    this.$message.error(res.data.msg);
+                }
+            }).catch(e => {
+                loading.close();
+                this.$message.error(e.message);
+            });
+        },
+        getConfig() {
+            const loading = this.$loading({lock: true});
+            this.$http.post('/index/tradeConfig', {}).then(res => {
+                loading.close();
+                if (res.data.success === true) {
+                    this.config = res.data.data
+                } else {
+                    this.$message.error(res.data.msg);
+                }
+            }).catch(e => {
+                loading.close();
+                this.$message.error(e.message);
+            });
+        }
+    }
+}
+</script>
+
+<style scoped>
+.el-wallet {
+    margin: 15px 0px;
+    display: flex;
+    padding: 15px 0;
+    background-color: #f1f1f1;
+}
+.el-wallet .el-wallet-item {
+    min-width: 240px;
+    text-align: left;
+}
+.el-wallet .el-wallet-item .usdt {
+    vertical-align: middle;
+}
+.el-wallet .el-wallet-item .info {
+    display: inline-block;
+    vertical-align: middle;
+    margin-left: 4px;
+}
+.el-row .tips {
+    background-color: #ebf6f7;
+    color: #333;
+    padding: 15px;
+    margin-bottom: 15px;
+    border-radius: 4px;
+}
+.el-row .tips .title {
+    padding: 4px 0;
+    color: #d04243;
+}
+.usdt {
+    width: 32px;
+    height: 32px;
+    border-radius: 50%;
+    vertical-align: middle;
+    margin-left: 4px;
+}
+
+.el-row .wallet-contacts {
+    margin: 15px 0;
+    margin-left: 30px;
+}
+.el-row .wallet-contacts .label {
+    width: 60px;
+    display: inline-block;
+    text-align: right;
+}
+.el-row .wallet {
+    margin: 15px 0;
+    margin-left: 10px;
+}
+.el-row .wallet .label {
+    width: 80px;
+    display: inline-block;
+    text-align: right;
+}
+.el-row .wallet p {
+    display: inline-block;
+    white-space: pre-wrap;
+    max-width: 90%;
+}
+.el-row .wallet .copy {
+    color: #d04243;
+    /*margin-left: 10px;*/
+}
+.el-row .wallet .qrcode-box {
+    margin-top: 10px;
+    margin-left: 80px;
+}
+
+</style>

+ 266 - 0
addons/admin/src/views/system/account/trigger.vue

@@ -0,0 +1,266 @@
+<template>
+    <div class="login-wrapper">
+        <el-card shadow="never">
+            <el-row :gutter="15" >
+                <el-col :md="24" class="el-wallet">
+                    <el-col :md="8" :sm="12" class="el-wallet-item">
+                        <img class="usdt" src="../../../assets/usdt.png" alt="">
+                        <span class="info" v-if="table.where.contact_type == 1">
+                        USDT总额:{{walletData.wallet.trc_usdt? walletData.wallet.trc_usdt : '0.00'}}<br>
+                        </span>
+                        <span class="info" v-else>
+                        USDT总额:{{walletData.wallet.erc_usdt? walletData.wallet.erc_usdt : '0.00'}}<br>
+                        </span>
+                    </el-col>
+                    <el-col :md="8" :sm="12">
+                    </el-col>
+                    <el-col :md="8" :sm="12">
+                    </el-col>
+                </el-col>
+            </el-row>
+            <el-row :gutter="15">
+                <el-col :md="24" :sm="24">
+
+                    <div class="tips">
+                        <div class="title">提示:</div>
+                        <div class="info" v-html="config.coin_out_tips">
+                        </div>
+                    </div>
+                    <div class="alert">
+                    </div>
+                    <div class="wallet-contacts">
+                        <span class="label">类型:</span>
+                        <el-button-group class="el-types">
+                            <el-button size="small" :type="table.where.contact_type == 1? 'primary':'default'"
+                                       @click="(table.where.contact_type = 1) && (table.where.address = walletData.trc_address) && $refs.table.reload()">USDT-TRC20
+                            </el-button>
+                            <el-button size="small" :type="table.where.contact_type == 2? 'primary':'default'"
+                                       @click="(table.where.contact_type = 2) && (table.where.address = walletData.erc_address) && $refs.table.reload()">USDT-ERC20
+                            </el-button>
+                        </el-button-group>
+                    </div>
+                    <div class="wallet">
+                        <div class="address" v-if="table.where.contact_type==1">
+                            <p><span class="label">归集地址:</span> <span>{{walletData.trc_address?walletData.trc_address:'未配置'}}</span></p> <span class="copy" @click="copy(walletData.trc_address)">复制</span>
+                        </div>
+                        <div class="address" v-if="table.where.contact_type==2">
+                            <p><span class="label">归集地址:</span> <span>{{walletData.erc_address?walletData.erc_address:'未配置'}}</span></p> <span class="copy" @click="copy(walletData.erc_address)">复制</span>
+                        </div>
+                        <div class="qrcode-box" v-if="table.where.contact_type==1">
+                            <img class="qrcode" :src="walletData.trc_qrcode" alt="">
+                        </div>
+                        <div class="qrcode-box" v-else-if="table.where.contact_type==2">
+                            <img class="qrcode" :src="walletData.erc_qrcode" alt="">
+                        </div>
+                        <div class="op"><el-button type="primary" @click="trigger()">一键归集</el-button></div>
+                    </div>
+
+                </el-col>
+            </el-row>
+
+
+            <!--  明细  -->
+            <ele-data-table ref="table" :config="table" :choose.sync="choose" height="calc(100vh - 315px)"
+                            highlight-current-row>
+                <template slot-scope="{index}">
+                    <el-table-column prop="time_text" label="交易时间" show-overflow-tooltip min-width="150"/>
+                    <el-table-column prop="from" label="来源"  show-overflow-tooltip min-width="250"/>
+                    <el-table-column prop="contact_type" label="类型"  :resizable="false" min-width="120">
+                        <template slot-scope="{row}">
+                            <span v-if="row.contact_type == 1">TRC20</span>
+                            <span v-else-if="row.contact_type == 2">ERC20</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="num" label="交易量(USDT)"  show-overflow-tooltip min-width="150"/>
+                    <el-table-column prop="status" label="状态"  :resizable="false" min-width="120">
+                        <template slot-scope="{row}">
+                            <span v-if="row.status==1" class="ele-text-success">成功</span>
+                            <span v-else class="ele-text-danger">失败</span>
+                        </template>
+                    </el-table-column>
+                </template>
+            </ele-data-table>
+        </el-card>
+
+    </div>
+</template>
+
+<script>
+export default {
+    name: "Deposit",
+    data() {
+        return {
+            loading: false,  // 保存按钮loading
+            table: {
+                url: '/index/transfer',
+                where: {type: 1, contact_type: 1, change_type: 1},
+                page: {limit: 30}
+            },
+            config: {
+                coin_in_tips: '',
+            },
+            formData: {
+                contact_type: 1,
+            },
+            timerId: null,
+            choose: [],
+            walletData: {},
+        }
+    },
+    created() {
+        this.getData();
+        this.getConfig();
+    },
+    mounted(){
+        this.getDataList();
+    },
+    methods: {
+        getDataList(){
+            let _this = this
+            clearInterval(this.timerId);
+            let time = 12000 + parseInt(Math.random()*2000);
+            this.timerId =setInterval(function(){
+                if(_this.$refs.table){
+                    _this.$refs.table.reload();
+                }
+            }, time);
+
+        },
+        copy(text){
+            let _this = this
+            _this.$message.closeAll()
+            this.$copyText(text).then(
+                function(e) {
+                    _this.$message.success('复制成功');
+                },
+                function(e) {
+                    _this.$message.error('复制失败');
+                }
+            );
+        },
+        getData() {
+            const loading = this.$loading({lock: true});
+            this.$http.get('/index/wallet', {}).then(res => {
+                loading.close();
+                if (res.data.success === true) {
+                    this.walletData = res.data.data
+                    this.table.where.address = this.walletData.trc_address
+                } else {
+                    this.$message.error(res.data.msg);
+                }
+            }).catch(e => {
+                loading.close();
+                this.$message.error(e.message);
+            });
+        },
+        getConfig() {
+            const loading = this.$loading({lock: true});
+            this.$http.post('/index/tradeConfig', {}).then(res => {
+                loading.close();
+                if (res.data.success === true) {
+                    this.config = res.data.data
+                } else {
+                    this.$message.error(res.data.msg);
+                }
+            }).catch(e => {
+                loading.close();
+                this.$message.error(e.message);
+            });
+        },
+        trigger(){
+            this.$confirm('确定要一键归集符合条件的子钱包吗?该操作需要消耗TRX手续费,且不可逆,谨慎操作', '提示', {type: 'warning'}).then(() => {
+                const loading = this.$loading({lock: true});
+                this.$http.post('/index/trigger', {address: this.table.where.address}).then(res => {
+                    loading.close();
+                    if (res.data.code === 0) {
+                        this.$message({type: 'success', message: res.data.msg});
+                        this.$refs.table.reload();
+                    } else {
+                        this.$message.error(res.data.msg);
+                    }
+                }).catch(e => {
+                    loading.close();
+                    this.$message.error(e.message);
+                }).catch(() => 0);
+            })
+        }
+    }
+}
+</script>
+
+<style scoped>
+.el-wallet {
+    margin: 15px 0px;
+    display: flex;
+    padding: 15px 0;
+    background-color: #f1f1f1;
+}
+.el-wallet .el-wallet-item {
+    min-width: 240px;
+    text-align: left;
+}
+.el-wallet .el-wallet-item .usdt {
+    vertical-align: middle;
+}
+.el-wallet .el-wallet-item .info {
+    display: inline-block;
+    vertical-align: middle;
+    margin-left: 4px;
+}
+.el-row .tips {
+    background-color: #ebf6f7;
+    color: #333;
+    padding: 15px;
+    margin-bottom: 15px;
+    border-radius: 4px;
+}
+.el-row .tips .title {
+    padding: 4px 0;
+    color: #d04243;
+}
+.usdt {
+    width: 32px;
+    height: 32px;
+    border-radius: 50%;
+    vertical-align: middle;
+    margin-left: 4px;
+}
+
+.el-row .wallet-contacts {
+    margin: 15px 0;
+    margin-left: 30px;
+}
+.el-row .wallet-contacts .label {
+    width: 60px;
+    display: inline-block;
+    text-align: right;
+}
+.el-row .wallet {
+    margin: 15px 0;
+    margin-left: 10px;
+}
+.el-row .wallet .label {
+    width: 80px;
+    display: inline-block;
+    text-align: right;
+}
+.el-row .wallet p {
+    display: inline-block;
+    white-space: pre-wrap;
+    max-width: 90%;
+}
+.el-row .wallet .copy {
+    color: #d04243;
+    /*margin-left: 10px;*/
+}
+.el-row .wallet .qrcode-box {
+    margin-top: 10px;
+    margin-left: 80px;
+}
+
+.op {
+    margin: 15px 0;
+    margin-left: 80px;
+}
+
+</style>

+ 96 - 140
addons/admin/src/views/system/account/withdraw.vue

@@ -1,91 +1,46 @@
 <template>
     <div class="login-wrapper">
         <el-card shadow="never">
-            <el-row :gutter="15">
-                <el-col :md="24" class="el-wallet">
-                    <el-col :md="8" :sm="12" class="el-wallet-item">
-                        <img class="usdt" src="../../../assets/usdt.png" alt="">
-                        <span class="info">
-                        USDT总额:{{ userInfo.usdt_num }}<br>
-                        保证金:{{ userInfo.bond }}
-                        </span>
+            <!-- 搜索表单 -->
+            <el-form :model="table.where" label-width="77px" class="ele-form-search"
+                     @keyup.enter.native="$refs.table.reload()" @submit.native.prevent>
+                <el-row :gutter="15">
+                    <el-col :md="6" :sm="12">
+                        <el-form-item label="提币用户:">
+                            <el-input v-model="table.where.keyword" placeholder="请输入提币用户账号" clearable/>
+                        </el-form-item>
                     </el-col>
-                    <el-col :md="8" :sm="12">
+                    <el-col :md="4" :sm="12">
+                        <el-form-item label="订单状态:">
+                            <el-select v-model="table.where.status" placeholder="请选择" class="ele-fluid">
+                                <el-option label="全部" value="0"/>
+                                <el-option label="已完成" value="1"/>
+                                <el-option label="已失败" value="2"/>
+                                <el-option label="待审核" value="3"/>
+                                <el-option label="打款中" value="4"/>
+                            </el-select>
+                        </el-form-item>
                     </el-col>
-                    <el-col :md="8" :sm="12">
-                    </el-col>
-                </el-col>
-            </el-row>
-            <el-row :gutter="15">
-                <el-col :md="24" :sm="24">
-
-                    <div class="tips">
-                        <div class="title">提示:</div>
-                        <div class="info" v-html="config.coin_in_tips">
-                        </div>
-                    </div>
-                    <div class="alert">
-                        <el-alert
-                            title="存币地址已更新,请勿向旧的存币地址进行存币"
-                            type="warning"
-                            show-icon>
-                        </el-alert>
-                    </div>
-                    <div class="wallet-contacts">
-                        <span class="label">类型:</span>
-                        <el-button-group class="el-types">
-                            <el-button size="small" :type="table.where.contact_type == 1? 'primary':'default'"
-                                       @click="(table.where.contact_type = 1) && $refs.table.reload()">USDT-TRC20
+                    <el-col :md="6" :sm="12">
+                        <div class="ele-form-actions">
+                            <el-button type="primary" @click="$refs.table.reload()" icon="el-icon-search"
+                                       class="ele-btn-icon">查询
                             </el-button>
-                            <el-button size="small" :type="table.where.contact_type == 2? 'primary':'default'"
-                                       @click="(table.where.contact_type = 2) && $refs.table.reload()">USDT-ERC20
+                            <el-button
+                                @click="(table.where={type: 1, coin_type: 1,status:'0', contact_type: 1, change_type: 2})&&$refs.table.reload()">
+                                重置
                             </el-button>
-                        </el-button-group>
-                    </div>
-                    <div class="wallet">
-                        <el-form :model="coinForm" ref="coinForm" :rules="editRules" label-width="100px">
-                            <el-row :gutter="15">
-                                <el-col :sm="16">
-                                    <el-form-item label="提币地址:" prop="to_address">
-                                        <el-input v-model="coinForm.to_address" placeholder="请输入提币地址" clearable/>
-                                    </el-form-item>
-                                    <el-form-item label="提币数量:" prop="num">
-                                        <el-input v-model="coinForm.num" placeholder="请输入提币数量" @input="countFree()"
-                                                  clearable>
-                                            <template slot="append">USDT</template>
-                                        </el-input>
-                                    </el-form-item>
-                                    <el-form-item label="提币手续费:" prop="free">
-                                        <el-input v-model="coinForm.free" placeholder="提币手续费" :disabled="true">
-                                            <template slot="append">USDT</template>
-                                        </el-input>
-                                        <span
-                                            class="ele-text-placeholder">手续费{{ config.coin_out_free }}%,会依照市场价格浮动汇率而随时进行调整</span>
-                                    </el-form-item>
-                                    <el-form-item label="交易密码:" prop="trade_password">
-                                        <el-input type="password" v-model="coinForm.trade_password" placeholder="请输入交易密码" clearable/>
-                                    </el-form-item>
-                                    <el-form-item label="谷歌验证码:" prop="google_code">
-                                        <el-input v-model="coinForm.google_code" placeholder="请输入谷歌验证码" clearable/>
-                                    </el-form-item>
-                                    <el-form-item label="">
-                                        <el-button class="submit" type="primary" @click="withdrawSubmit()">提交申请
-                                        </el-button>
-                                    </el-form-item>
-                                </el-col>
-                            </el-row>
-                        </el-form>
-
-                    </div>
-                </el-col>
-            </el-row>
-
+                        </div>
+                    </el-col>
+                </el-row>
+            </el-form>
 
             <!--  明细  -->
             <ele-data-table ref="table" :config="table" :choose.sync="choose" height="calc(100vh - 315px)"
                             highlight-current-row>
                 <template slot-scope="{index}">
                     <el-table-column prop="time_text" label="提币时间" show-overflow-tooltip min-width="150"/>
+                    <el-table-column prop="username" label="提币用户" show-overflow-tooltip min-width="150"/>
                     <el-table-column prop="to_address" label="提币地址" show-overflow-tooltip min-width="250"/>
                     <el-table-column prop="contact_type" label="类型" :resizable="false" min-width="120">
                         <template slot-scope="{row}">
@@ -103,39 +58,69 @@
                             <span v-else class="ele-text-danger">失败</span>
                         </template>
                     </el-table-column>
+                    <el-table-column label="操作" width="130px" align="center" :resizable="false" fixed="right">
+                        <template slot-scope="{row}">
+                            <el-link @click="showConfirm(row)" icon="el-icon-edit" type="primary" :underline="false"
+                                     v-if="row.status == 3 && permission.includes('sys:advert:edit')">审核
+                            </el-link>
+                        </template>
+                    </el-table-column>
                 </template>
             </ele-data-table>
         </el-card>
 
+        <!-- 购买弹窗 -->
+        <el-dialog :title="'提现审核确认'" :visible.sync="showConfirmEdit" width="600px"
+                   @closed="formData={}" :destroy-on-close="true" custom-class="ele-dialog-form" :lock-scroll="false">
+            <el-form :model="formData" ref="editForm" :rules="editRules" label-width="82px">
+                <el-row :gutter="15">
+                    <el-col :sm="18">
+                        <el-form-item label="提币用户:" prop="username">
+                            <span>{{formData.username}}</span>
+                        </el-form-item>
+                        <el-form-item label="类型:" prop="contact_type">
+                            <span v-if="formData.contact_type == 1">TRC20</span>
+                            <span v-else-if="formData.contact_type == 2">ERC20</span>
+                        </el-form-item>
+                        <el-form-item label="提币地址:" prop="to_address">
+                            <span>{{formData.to_address}}</span>
+                        </el-form-item>
+                        <el-form-item label="提币数量:" prop="num">
+                            <span>{{formData.num}} USDT</span>
+                        </el-form-item>
+                        <el-form-item label="登录密码:" prop="password">
+                            <el-input v-model="formData.password" placeholder="请输入登录密码" type="password" clearable/>
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+            </el-form>
+            <div slot="footer">
+                <el-button @click="showConfirmEdit=false">取消</el-button>
+                <el-button type="primary" @click="confirm()">确定提币</el-button>
+            </div>
+        </el-dialog>
     </div>
 </template>
 
 <script>
+import {mapGetters} from "vuex";
 export default {
     name: "Deposit",
     data() {
         return {
             loading: false,  // 保存按钮loading
+            showConfirmEdit: false,
             table: {
                 url: '/coinlog/index',
-                where: {type: 1, coin_type: 1, contact_type: 1, change_type: 2},
+                where: {type: 1, coin_type: 1, contact_type: 1, status: '0', change_type: 2},
                 page: {limit: 30}
             },
-            config: {
-                coin_in_tips: '',
-            },
-            coinForm: {
-                contact_type: 1,
+            formData: {
+                password: '',
             },
             editRules: {  // 表单验证规则
-                to_address: [
-                    {required: true, message: '请输入提币地址', trigger: 'blur'}
-                ],
-                num: [
-                    {required: true, message: '请输入提币数量', trigger: 'blur'}
-                ],
-                trade_password: [
-                    {required: true, message: '请输入交易密码', trigger: 'blur'}
+                password: [
+                    {required: true, message: '请输入登录密码', trigger: 'blur'}
                 ],
                 google_code: [
                     {required: true, message: '请输入谷歌验证码', trigger: 'blur'}
@@ -147,30 +132,15 @@ export default {
         }
     },
     created() {
-        this.getData();
-        this.getConfig();
-
-
     },
-    mounted() {
-        this.getDataList();
+    computed: {
+        ...mapGetters(["permission"]),
     },
     methods: {
-        // 记录数据,自动刷新
-        getDataList() {
-            let _this = this
-            clearInterval(this.timerId);
-            let time = 13000 + parseInt(Math.random() * 2000);
-            this.timerId = setInterval(function () {
-                if(_this.$refs.table){
-                    _this.$refs.table.reload();
-                }
-            }, time);
-
-        },
         // 复制地址
         copy(text) {
             let _this = this
+            _this.$message.closeAll();
             this.$copyText(text).then(
                 function (e) {
                     _this.$message.success('复制成功');
@@ -180,10 +150,10 @@ export default {
                 }
             );
         },
-        countFree() {
-            if (this.coinForm.num > 0) {
-                this.coinForm.free = this.config.coin_out_free > 0 ? parseFloat(this.config.coin_out_free * this.coinForm.num / 100).toFixed(2) : '0.00';
-            }
+        // 提币审核
+        showConfirm(row){
+            this.formData = Object.assign({}, row);
+            this.showConfirmEdit = true;
         },
         // 用户信息
         getData() {
@@ -215,36 +185,22 @@ export default {
                 this.$message.error(e.message);
             });
         },
-        // 提现申请
-        withdrawSubmit() {
+        // 审核
+        confirm() {
             let _this = this
-            this.$refs['coinForm'].validate((valid) => {
-                if (valid) {
-                    this.$confirm('确定要提交该提现请求吗?', '提示', {type: 'warning'}).then(() => {
-
-                        const loading = this.$loading({lock: true});
-                        _this.coinForm.contact_type = _this.table.where.contact_type
-                        _this.coinForm.change_type = 2
-                        this.$http.post('/trade/withdraw', _this.coinForm).then(res => {
-                            loading.close();
-                            if (res.data.success === true) {
-                                this.$message.success(res.data.msg);
-                                setTimeout(function(){
-                                    _this.coinForm.trade_password = ''
-                                    _this.coinForm.google_code = ''
-                                    _this.getData();
-                                    _this.$refs.table.reload();
-                                }, 1200)
-                            } else {
-                                this.$message.error(res.data.msg);
-                            }
-                        }).catch(e => {
-                            loading.close();
-                            this.$message.error(e.message);
-                        });
-                    }).catch(() => 0);
-                }
-            });
+            this.$confirm('确定审核通过该提现申请吗?通过后将从出账钱包出款', '提示', {type: 'warning'}).then(() => {
+                const loading = this.$loading({lock: true});
+                this.$http.post('/trade/confirm', _this.formData).then(res => {
+                    loading.close();
+                    if (res.data.success === true) {
+                        _this.showConfirmEdit = false;
+                        this.$message.success(res.data.msg);
+                        this.$refs.table.reload();
+                    } else {
+                        this.$message.error(res.data.msg);
+                    }
+                });
+            }).catch(() => 0);
 
         }
     }

+ 150 - 103
addons/admin/src/views/system/advert/business.vue

@@ -11,25 +11,6 @@
                                    @click="(table.where.type = 2) && $refs.table.reload()">出售
                         </el-button>
                     </el-button-group>
-
-                    <span>
-                    广告大厅上线
-                    <el-switch
-                        v-model="setting.advert_online"
-                        active-color="#33CC99"
-                        inactive-color="#ff4949" :active-value="1" :inactive-value="0" @change="changeAdvert">
-                </el-switch>
-                    <span style="margin:0 10px;color: #666;" class="time" v-text="setting.advert_online_time_text">00:00</span>后关闭
-                </span>
-                </el-col>
-                <el-col :md="6" :sm="8">
-                    <!-- 操作按钮 -->
-                    <div class="ele-table-tool">
-                        <el-link href="#/system/advert/hall">广告大厅</el-link>
-                        <el-button @click="showEdit=true" type="primary" class="ele-btn-icon" size="small"
-                                   v-if="permission.includes('sys:advert:add')">发布广告
-                        </el-button>
-                    </div>
                 </el-col>
             </el-row>
 
@@ -38,6 +19,7 @@
                             highlight-current-row>
                 <template slot-scope="{index}">
                     <el-table-column type="selection" width="45" align="center" fixed="left"/>
+                    <el-table-column prop="username_hidden" label="交易员" show-overflow-tooltip min-width="150"/>
                     <el-table-column prop="type" label="广告类型" show-overflow-tooltip min-width="100">
                         <template slot-scope="{row}">
                             <span v-if="row.type == 1">购买广告</span>
@@ -51,23 +33,27 @@
                     </el-table-column>
                     <el-table-column prop="limit" label="单笔限额(USDT)" show-overflow-tooltip min-width="150">
                         <template slot-scope="{row}">
-                            <span>{{(row.limit_mix>0? row.limit_mix :0)}}~{{row.limit_max}}</span>
+                            <span>{{ (row.limit_mix > 0 ? row.limit_mix : 0) }}~{{ row.limit_max }}</span>
                         </template>
                     </el-table-column>
                     <el-table-column prop="real_price" label="价格(CNY)" show-overflow-tooltip min-width="150"/>
                     <el-table-column prop="pay_type" label="付款方式" show-overflow-tooltip min-width="150">
                         <template slot-scope="{row}">
                             <template v-for="(v,k) in row.pay_type">
-                                <span v-if="v == 1" class="ele-text-warning" style="margin-right:10px; border-radius: 2px; padding: 2px; background-color: #fde3cf; ">银行卡</span>
-                                <span v-if="v == 2" class="ele-text-success" style="margin-right:10px;border-radius: 2px; padding: 2px;background-color: #5cd6ad;">微信</span>
-                                <span v-if="v == 3" class="ele-text-primary" style="border-radius: 2px; padding: 2px;background-color: #a0cfff;">支付宝</span>
+                                <span v-if="v == 1" class="ele-text-warning"
+                                      style="margin-right:10px; border-radius: 2px; padding: 2px; background-color: #fde3cf; ">银行卡</span>
+                                <span v-if="v == 2" class="ele-text-success"
+                                      style="margin-right:10px;border-radius: 2px; padding: 2px;background-color: #5cd6ad;">微信</span>
+                                <span v-if="v == 3" class="ele-text-primary"
+                                      style="border-radius: 2px; padding: 2px;background-color: #a0cfff;">支付宝</span>
                             </template>
 
                         </template>
                     </el-table-column>
                     <el-table-column prop="status" label="状态" sortable="custom" :resizable="false" min-width="120">
                         <template slot-scope="{row}">
-                            <span v-if="row.status == 1" class="ele-text-success">已发布</span>
+                            <span v-if="row.status == 0" class="ele-text-success">待审核</span>
+                            <span v-else-if="row.status == 1" class="ele-text-success">已发布</span>
                             <span v-else class="ele-text-danger">已下架</span>
                         </template>
                     </el-table-column>
@@ -79,9 +65,9 @@
                     </el-table-column>
                     <el-table-column label="操作" width="130px" align="center" :resizable="false" fixed="right">
                         <template slot-scope="{row}">
-                            <el-link @click="editStatus(row)" icon="el-icon-edit" type="primary" :underline="false"
-                                     v-if="row.status == 1 && permission.includes('sys:advert:edit')">下架
-                            </el-link>
+<!--                            <el-link @click="editStatus(row)" icon="el-icon-edit" type="primary" :underline="false"-->
+<!--                                     v-if="row.status == 1 && permission.includes('sys:advert:edit')">下架-->
+<!--                            </el-link>-->
                         </template>
                     </el-table-column>
                 </template>
@@ -89,53 +75,125 @@
         </el-card>
         <!-- 编辑弹窗 -->
         <el-dialog :title="'发布挂单广告'" :visible.sync="showEdit" width="600px"
-                   @closed="editForm={}" :destroy-on-close="true" custom-class="ele-dialog-form" :lock-scroll="false">
-            <el-form :model="editForm" ref="editForm" :rules="editRules" label-width="82px">
+                   @closed="editForm={type:1,price_type:1,price:0.00,coin_type:'1'}" :destroy-on-close="true" custom-class="ele-dialog-form"
+                   :lock-scroll="false">
+            <el-form :model="editForm" ref="editForm" :rules="editRules" label-width="100px">
                 <el-row :gutter="15">
-                    <el-col :sm="16">
-                        <el-form-item label="广告名称:" prop="title">
-                            <el-input v-model="editForm.title" placeholder="请输入广告名称" clearable/>
-                        </el-form-item>
-                        <el-form-item label="状态:">
-                            <el-radio-group v-model="editForm.status">
-                                <el-radio :label="1">正常</el-radio>
-                                <el-radio :label="2">禁用</el-radio>
-                            </el-radio-group>
-                        </el-form-item>
+                    <el-col :sm="24">
+                        <div class="head" style="margin-bottom: 15px">
+                            <el-button-group class="el-types">
+                                <el-button :type="editForm.type == 1? 'primary':'default'"
+                                           @click="(editForm.type = 1)">购买广告
+                                </el-button>
+                                <el-button :type="editForm.type == 2? 'primary':'default'"
+                                           @click="(editForm.type = 2)">出售广告
+                                </el-button>
+                            </el-button-group>
+                        </div>
+                        <el-col :sm="12">
+                            <el-form-item label="币种:" prop="coin_type">
+                                <el-select v-model="editForm.coin_type" placeholder="请选择" class="ele-fluid">
+                                    <el-option label="USDT" value="1"/>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :sm="24">
+                            <el-form-item label="单日限额:" prop="limit">
+                                <el-col :sm="12">
+                                    <el-input placeholder="最小限额"
+                                              v-model="editForm.limit_min">
+                                        <template slot="append">USDT</template>
+                                    </el-input>
+                                </el-col>
+                                <el-col :sm="12">
+                                    <el-input placeholder="最大限额"
+                                              v-model="editForm.limit_max">
+                                        <template slot="append">USDT</template>
+                                    </el-input>
+                                </el-col>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :sm="16">
+                            <el-form-item label="报价类型:" prop="price_type">
+                                <el-radio-group v-model="editForm.price_type">
+                                    <el-radio :label="1">固定价格</el-radio>
+                                    <el-radio :label="2">浮动价格</el-radio>
+                                </el-radio-group>
+                            </el-form-item>
+                            <el-form-item label="单价(CNY):" prop="price">
+                                <el-input-number v-if="editForm.price_type==1" v-model="editForm.price" :precision="2" :min="0.00" :step="0.1" :max="100"></el-input-number>
+                                <el-input-number v-else v-model="editForm.price" :precision="2" :step="0.1" :min="-100" :max="100"></el-input-number>
+                                <div class="tip">
+                                    <span v-if="editForm.type == 1">市场价:¥{{trade.usdt_buy_price}}</span>
+                                    <span v-else-if="editForm.type == 2">市场价:¥{{trade.usdt_sell_price}}</span>
+                                    <span style="margin-left: 20px" class="price" v-if="editForm.price_type==1">当前单价:{{'¥'+countPrice()}}</span>
+                                    <span style="margin-left: 20px" class="price" v-else-if="editForm.price_type==2">浮动单价:{{'¥'+countPrice()}}</span>
+                                </div>
+                            </el-form-item>
 
-                        <el-form-item label="是否置顶:">
-                            <el-radio-group v-model="editForm.is_top">
-                                <el-radio :label="1">置顶</el-radio>
-                                <el-radio :label="2">不置顶</el-radio>
-                            </el-radio-group>
-                        </el-form-item>
+                            <el-form-item label="截止日期:" prop="expired_at">
+                                <el-date-picker
+                                    v-model="editForm.expired_at"
+                                    type="date"
+                                    placeholder="选择截止日期"
+                                    size="small"
+                                    value-format="yyyy-MM-dd"
+                                    format="yyyy-MM-dd">
+                                </el-date-picker>
+                            </el-form-item>
+                            <el-form-item label="收款方式:" prop="pay_type">
+                                <el-select v-model="editForm.pay_type" multiple placeholder="请选择收款方式">
+                                    <el-option label="银行卡" value="1"></el-option>
+                                    <el-option label="微信" value="2"></el-option>
+                                    <el-option label="支付宝" value="3"></el-option>
+                                </el-select>
+                            </el-form-item>
+                            <el-form-item label="其他要求:" prop="remark">
+                                <el-input placeholder="其他要求" v-model="editForm.remark" maxlength="150"/>
+                            </el-form-item>
+                            <el-form-item label="交易密码:" prop="trade_password">
+                                <el-input type="password" placeholder="交易密码" v-model="editForm.trade_password" maxlength="50"/>
+                            </el-form-item>
+                        </el-col>
                     </el-col>
                 </el-row>
             </el-form>
             <div slot="footer">
                 <el-button @click="showEdit=false">取消</el-button>
-                <el-button type="primary" @click="save">确定发布</el-button>
+                <el-button type="primary" @click="save">确定提交</el-button>
             </div>
         </el-dialog>
     </div>
 </template>
 
 <script>
-import TinymceEditor from '@/components/TinymceEditor'
 import {mapGetters} from "vuex";
 
 export default {
     name: "SysNotice",
-    components: {TinymceEditor},
+    components: {},
     data() {
+        let limitQuota = (rule, value, callback) => {
+            if (this.editForm.limit_min<0) {
+                callback(new Error('请输入最小限额'));
+            } else if (this.editForm.limit_max<0 || this.editForm.limit_max <= this.editForm.limit_min) {
+                callback(new Error('请输入有效的最大限额'));
+            } else {
+                callback();
+            }
+        };
         return {
-            table: {url: '/advert/index', where: {type: 1},page: {limit: 30}},  // 表格配置
+            table: {url: '/advert/index', where: {type: 1}, page: {limit: 30}},  // 表格配置
             choose: [],  // 表格选中数据
             times: {
                 advert: null,
                 buy: null,
                 sell: null,
             },
+            trade:{
+                usdt_buy_price: 0.00,
+                usdt_sell_price: 0.00,
+            },
             setting: {
                 advert_online: true,
                 buy_online: true,
@@ -147,40 +205,31 @@ export default {
                 sell_online_time: 0,
                 sell_online_time_text: '00:00:00',
             },
-            timer: {buy: null, sell:null},
+            timer: {buy: null, sell: null},
             showEdit: false,  // 是否显示表单弹窗
-            editForm: {source: 1, status: 1, is_top: 2},  // 表单数据
+            editForm: {type: 1,price_type:1,price: 0.00, coin_type:'1', status: 1},  // 表单数据
             editRules: {  // 表单验证规则
-                title: [
-                    {required: true, message: '请输入通知标题', trigger: 'blur'}
+                coin_type: [
+                    {required: true, message: '请选择币种', trigger: 'blur'}
                 ],
-                status: [
-                    {required: true, message: '请输入选择通知状态', trigger: 'blur'}
+                pay_type: [
+                    {required: true, message: '请选择付款方式', trigger: 'blur'}
                 ],
-                is_top: [
-                    {required: true, message: '请输入选择是否置顶', trigger: 'blur'}
+                limit: [
+                    {validator: limitQuota, trigger: 'blur'}
+                ],
+                price_type: [
+                    {required: true, message: '请选择价格类型', trigger: 'blur'}
+                ],
+                price: [
+                    {required: true, message: '请输入价格', trigger: 'blur'}
+                ],
+                expired_at: [
+                    {required: true, message: '请选择截止日期', trigger: 'blur'}
+                ],
+                trade_password: [
+                    {required: true, message: '请输入交易密码', trigger: 'blur'}
                 ],
-            },
-            // 自定义文件上传(这里使用把选择的文件转成blob演示)
-            file_picker_callback: (callback, value, meta) => {
-                let input = document.createElement('input');
-                input.setAttribute('type', 'file');
-                // 设定文件可选类型
-                if (meta.filetype === 'image') {
-                    input.setAttribute('accept', 'image/*');
-                } else if (meta.filetype === 'media') {
-                    input.setAttribute('accept', 'video/*');
-                }
-                input.onchange = () => {
-                    let file = input.files[0];
-                    let reader = new FileReader();
-                    reader.onload = (e) => {
-                        let blob = new Blob([e.target.result], {type: file.type});
-                        callback(URL.createObjectURL(blob));
-                    };
-                    reader.readAsArrayBuffer(file);
-                }
-                input.click();
             }
         }
     },
@@ -188,15 +237,28 @@ export default {
         ...mapGetters(["permission"]),
     },
     mounted() {
-        this.getData();
+
     },
     methods: {
-        timeLock(){
+        countPrice(){
+            let type = this.editForm.type
+            let price_type = this.editForm.price_type
+
+            if(type == 1){
+                let price = typeof(this.editForm.price) != 'undefined' && this.editForm.price !=''? parseFloat(this.editForm.price) : 0.00;
+                return price_type==1? price : (parseFloat(this.trade.usdt_buy_price)+price).toFixed(2);
+            }else{
+                let price = typeof(this.editForm.price) != 'undefined' && this.editForm.price !=''? parseFloat(this.editForm.price) : 0.00;
+                return price_type==1? price: (parseFloat(this.trade.usdt_sell_price)+price).toFixed(2);
+            }
+
+        },
+        timeLock() {
             let _this = this;
             clearInterval(this.times.advert);
-            if(this.setting.advert_online_time>0){
-                this.times.advert = setInterval(function(){
-                    if(_this.setting.advert_online_time<=0){
+            if (this.setting.advert_online_time > 0) {
+                this.times.advert = setInterval(function () {
+                    if (_this.setting.advert_online_time <= 0) {
                         _this.setting.advert_online_time_text = '00:00:00';
                         _this.setting.advert_online = false;
                         _this.settingSubmit({advert_online: false});
@@ -204,11 +266,11 @@ export default {
                     }
 
                     _this.setting.advert_online_time--;
-                    var hour = parseInt(_this.setting.advert_online_time/3600);
-                    var minute = parseInt(_this.setting.advert_online_time%3600/60);
-                    var second = parseInt(_this.setting.advert_online_time%3600%60);
+                    var hour = parseInt(_this.setting.advert_online_time / 3600);
+                    var minute = parseInt(_this.setting.advert_online_time % 3600 / 60);
+                    var second = parseInt(_this.setting.advert_online_time % 3600 % 60);
 
-                    _this.setting.advert_online_time_text = (hour<10? '0'+hour:hour)+':'+(minute<10?'0'+minute:minute)+':'+(second<10? '0'+second:second);
+                    _this.setting.advert_online_time_text = (hour < 10 ? '0' + hour : hour) + ':' + (minute < 10 ? '0' + minute : minute) + ':' + (second < 10 ? '0' + second : second);
                 }, 1000);
             }
         },
@@ -232,22 +294,7 @@ export default {
                 this.$message.error(e.message);
             });
         },
-        // 获取配置数据
-        getData() {
-            const loading = this.$loading({lock: true});
-            this.$http.post('/setting/business').then(res => {
-                loading.close();
-                if (res.data.code === 0) {
-                    this.setting = res.data.data ? res.data.data : this.setting;
-                    this.timeLock()
-                } else {
-                    this.$message.error(res.data.msg);
-                }
-            }).catch(e => {
-                loading.close();
-                this.$message.error(e.message);
-            });
-        },
+
         /* 显示编辑 */
         edit(row) {
             this.editForm = Object.assign({}, row);

+ 121 - 159
addons/admin/src/views/system/advert/hall.vue

@@ -4,11 +4,11 @@
             <el-row :gutter="15">
                 <el-col :md="18" :sm="16">
                     <el-button-group class="el-types">
-                        <el-button :type="table.where.type == 1? 'primary':'default'"
-                                   @click="(table.where.type = 1) && $refs.table.reload()">购买广告
-                        </el-button>
                         <el-button :type="table.where.type == 2? 'primary':'default'"
-                                   @click="(table.where.type = 2) && $refs.table.reload()">出售广告
+                                   @click="(table.where.type = 2) && $refs.table.reload()">购买广告
+                        </el-button>
+                        <el-button :type="table.where.type == 1? 'primary':'default'"
+                                   @click="(table.where.type = 1) && $refs.table.reload()">出售广告
                         </el-button>
                     </el-button-group>
                     <div style="margin-bottom: 10px"></div>
@@ -22,15 +22,15 @@
                     <el-table-column type="selection" width="45" align="center" fixed="left"/>
                     <el-table-column label="发布用户" min-width="60" align="center">
                         <template slot-scope="{row}">
-                            <el-avatar shape="circle" :size="35" >
-                                {{substr(row.username, 1)}}
+                            <el-avatar shape="circle" :size="35" :class="'color'+row.logo_index">
+                                {{substr(row.realname?row.realname : row.username, 1)}}
                             </el-avatar>
-                            <span>{{row.username}}</span>
+                            <p>{{row.username}}</p>
                         </template>
                     </el-table-column>
                     <el-table-column prop="limit" label="单笔限额(USDT)" show-overflow-tooltip min-width="150">
                         <template slot-scope="{row}">
-                            <span>{{ (row.limit_mix > 0 ? row.limit_mix : 0) }}~{{ row.limit_max }}</span>
+                            <span>¥{{ (row.limit_mix > 0 ? row.limit_mix : 0) }}~{{ row.limit_max }}</span>
                         </template>
                     </el-table-column>
                     <el-table-column prop="real_price" label="单价(CNY)" show-overflow-tooltip min-width="150"/>
@@ -52,15 +52,64 @@
                     </el-table-column>
                     <el-table-column label="" width="130px" align="center" :resizable="false" fixed="right">
                         <template slot-scope="{row}">
-                            <el-button type="primary" @click="buy(row)" icon="el-icon-search"
+                            <el-button v-if="table.where.type == 2" type="primary" size="small" @click="showBuy(row)" icon="el-icon-shopping-cart-2"
                                        class="ele-btn-icon">购买 USDT
                             </el-button>
+                            <el-button v-else type="primary" size="small" @click="showBuy(row)" icon="el-icon-shopping-cart-2"
+                                       class="ele-btn-icon">出售 USDT
+                            </el-button>
                         </template>
                     </el-table-column>
                 </template>
             </ele-data-table>
         </el-card>
 
+        <!-- 购买弹窗 -->
+        <el-dialog :title="'购买确定'" :visible.sync="showBuyEdit" width="600px"
+                   @closed="buyForm={}" :destroy-on-close="true" custom-class="ele-dialog-form" :lock-scroll="false">
+            <el-form :model="buyForm" ref="editForm" :rules="editRules" label-width="82px">
+                <el-row :gutter="15">
+                    <el-col :sm="16">
+                        <el-form-item label="发布用户:" prop="username">
+                            <span>{{buyForm.username}}</span>
+                        </el-form-item>
+                        <el-form-item label="单笔限额:" prop="limit">
+                            <span>¥{{(buyForm.limit_mix? buyForm.limit_mix:0)}}~{{buyForm.limit_max}}</span>
+                        </el-form-item>
+                        <el-form-item label="单价:" prop="price">
+                            <span>{{buyForm.real_price}} CNY</span>
+                        </el-form-item>
+                        <el-col :sm="12">
+                        <el-form-item label="收款方式:" prop="payment_id" v-if="buyForm.type==1">
+                            <el-select v-model="buyForm.payment_id" filterable
+                                       remote
+                                       reserve-keyword
+                                       placeholder="请输入关键词"
+                                       :remote-method="getPayment"
+                                       :loading="loading" class="ele-fluid reassign">
+                                <el-option v-for="(v,k) in payments" :key="k" :label="v.username" :value="v.id">
+                                        <span class="label"
+                                              :title="'ID:'+v.id+', USDT:'+v.usdt_num">{{ v.username }}</span>
+                                    <span class="credit">信誉:{{ v.credit }}分</span>
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                        <el-form-item label="交易数量:" prop="num">
+                            <el-input v-model="buyForm.num" placeholder="请输入您要购买的数量" @input="countTotal()" clearable/>
+                        </el-form-item>
+                        </el-col>
+                        <el-form-item label="总价:" prop="pay_total">
+                            <span>{{buyForm.total?buyForm.total:'0.00'}} CNY</span>
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+            </el-form>
+            <div slot="footer">
+                <el-button @click="showBuyEdit=false">取消</el-button>
+                <el-button type="primary" v-if="buyForm.type == 1" @click="sell()">确定出售</el-button>
+                <el-button type="primary" v-else @click="buy()">确定购买</el-button>
+            </div>
+        </el-dialog>
     </div>
 </template>
 
@@ -71,17 +120,8 @@ export default {
     name: "SysNotice",
     components: {},
     data() {
-        let limitQuota = (rule, value, callback) => {
-            if (this.editForm.limit_min < 0) {
-                callback(new Error('请输入最小限额'));
-            } else if (this.editForm.limit_max < 0 || this.editForm.limit_max <= this.editForm.limit_min) {
-                callback(new Error('请输入有效的最大限额'));
-            } else {
-                callback();
-            }
-        };
         return {
-            table: {url: '/advert/index', where: {type: 1}, page: {limit: 30}},  // 表格配置
+            table: {url: '/advert/hall', where: {type: 2}, page: {limit: 30}},  // 表格配置
             choose: [],  // 表格选中数据
             times: {
                 advert: null,
@@ -103,52 +143,17 @@ export default {
                 sell_online_time: 0,
                 sell_online_time_text: '00:00:00',
             },
+            payments: [],
             timer: {buy: null, sell: null},
-            showEdit: false,  // 是否显示表单弹窗
-            editForm: {type: 1, price_type: 1, price: 0.00, coin_type: '1', status: 1},  // 表单数据
+            showBuyEdit: false,  // 是否显示表单弹窗
+            buyForm: {num: 0, pay_type: 1},  // 表单数据
             editRules: {  // 表单验证规则
-                coin_type: [
-                    {required: true, message: '请选择币种', trigger: 'blur'}
-                ],
                 pay_type: [
-                    {required: true, message: '请选择付款方式', trigger: 'blur'}
-                ],
-                limit: [
-                    {validator: limitQuota, trigger: 'blur'}
-                ],
-                price_type: [
-                    {required: true, message: '请选择价格类型', trigger: 'blur'}
+                    {required: true, message: '请选择支付方式', trigger: 'blur'}
                 ],
-                price: [
-                    {required: true, message: '请输入价格', trigger: 'blur'}
+                num: [
+                    {required: true, message: '请输入交易数量', trigger: 'blur'}
                 ],
-                expired_at: [
-                    {required: true, message: '请选择截止日期', trigger: 'blur'}
-                ],
-                trade_password: [
-                    {required: true, message: '请输入交易密码', trigger: 'blur'}
-                ],
-            },
-            // 自定义文件上传(这里使用把选择的文件转成blob演示)
-            file_picker_callback: (callback, value, meta) => {
-                let input = document.createElement('input');
-                input.setAttribute('type', 'file');
-                // 设定文件可选类型
-                if (meta.filetype === 'image') {
-                    input.setAttribute('accept', 'image/*');
-                } else if (meta.filetype === 'media') {
-                    input.setAttribute('accept', 'video/*');
-                }
-                input.onchange = () => {
-                    let file = input.files[0];
-                    let reader = new FileReader();
-                    reader.onload = (e) => {
-                        let blob = new Blob([e.target.result], {type: file.type});
-                        callback(URL.createObjectURL(blob));
-                    };
-                    reader.readAsArrayBuffer(file);
-                }
-                input.click();
             }
         }
     },
@@ -160,21 +165,14 @@ export default {
     },
     methods: {
         substr(str, length){
-            return str.slice(0,length);
+            return str? str.slice(0,length) : '';
         },
-        // 计算价格
-        countPrice() {
-            let type = this.editForm.type
-            let price_type = this.editForm.price_type
-
-            if (type == 1) {
-                let price = typeof (this.editForm.price) != 'undefined' && this.editForm.price != '' ? parseFloat(this.editForm.price) : 0.00;
-                return price_type == 1 ? price : (parseFloat(this.trade.usdt_buy_price) + price).toFixed(2);
-            } else {
-                let price = typeof (this.editForm.price) != 'undefined' && this.editForm.price != '' ? parseFloat(this.editForm.price) : 0.00;
-                return price_type == 1 ? price : (parseFloat(this.trade.usdt_sell_price) + price).toFixed(2);
+        // 计算总价
+        countTotal(){
+            console.log(this.buyForm)
+            if(this.buyForm.num>0){
+                this.buyForm.total = (this.buyForm.num*this.buyForm.real_price).toFixed(2);
             }
-
         },
         timeLock() {
             let _this = this;
@@ -201,12 +199,40 @@ export default {
         changeAdvert(e) {
             this.settingSubmit({advert_online: e});
         },
+        // 购买弹窗
+        showBuy(row,index){
+            this.buyForm = Object.assign({}, row);
+            this.buyForm.index = index;
+            this.showBuyEdit = true;
+        },
+        getPayment(){
+
+        },
+        // 购买广告
+        buy(){
+            this.$confirm('确定以该价格购买吗?', '提示', {type: 'warning'}).then(() => {
+                this.$message.closeAll();
+                const loading = this.$loading({lock: true});
+                this.$http.post('/advert/buy', this.buyForm).then(res => {
+                    loading.close();
+                    if (res.data.success === true) {
+                        this.$refs.table.reload();
+                        this.$message.success(res.data.msg);
+                    } else {
+                        this.$message.error(res.data.msg);
+                    }
+                }).catch(e => {
+                    loading.close();
+                    this.$message.error(e.message);
+                });
+            })
+        },
         // 购买广告
-        buy(row){
-            this.$confirm('确定以该价格购买该广告吗?', '提示', {type: 'warning'}).then(() => {
+        sell(){
+            this.$confirm('确定以该价格出售吗?', '提示', {type: 'warning'}).then(() => {
                 this.$message.closeAll();
                 const loading = this.$loading({lock: true});
-                this.$http.post('/advert/buy', row).then(res => {
+                this.$http.post('/advert/sell', this.buyForm).then(res => {
                     loading.close();
                     if (res.data.success === true) {
                         this.$refs.table.reload();
@@ -254,89 +280,6 @@ export default {
                 this.$message.error(e.message);
             });
         },
-        /* 显示编辑 */
-        edit(row) {
-            this.editForm = Object.assign({}, row);
-            this.showEdit = true;
-        },
-        /* 保存编辑 */
-        save() {
-            this.$refs['editForm'].validate((valid) => {
-                if (valid) {
-                    const loading = this.$loading({lock: true});
-                    this.$http.post('/advert/edit', this.editForm).then(res => {
-                        loading.close();
-                        if (res.data.code === 0) {
-                            this.showEdit = false;
-                            this.$message({type: 'success', message: res.data.msg});
-                            this.$refs.table.reload();
-                        } else {
-                            this.$message.error(res.data.msg);
-                        }
-                    }).catch(e => {
-                        loading.close();
-                        this.$message.error(e.message);
-                    });
-                } else {
-                    return false;
-                }
-            });
-        },
-        /* 删除 */
-        remove(row) {
-            if (!row) {  // 批量删除
-                if (this.choose.length === 0) return this.$message.error('请至少选择一条数据');
-                let ids = this.choose.map(d => d.id);
-                this.$confirm('确定要删除选中的广告吗?', '提示', {type: 'warning'}).then(() => {
-                    const loading = this.$loading({lock: true});
-                    this.$http.post('/notice/delete', {id: ids}).then(res => {
-                        loading.close();
-                        if (res.data.code === 0) {
-                            this.$message({type: 'success', message: res.data.msg});
-                            this.$refs.table.reload();
-                        } else {
-                            this.$message.error(res.data.msg);
-                        }
-                    }).catch(e => {
-                        loading.close();
-                        this.$message.error(e.message);
-                    });
-                }).catch(() => 0);
-            } else {  // 单个删除
-                const loading = this.$loading({lock: true});
-                this.$http.post('/notice/delete', {id: row.id}).then(res => {
-                    loading.close();
-                    if (res.data.code === 0) {
-                        this.$message({type: 'success', message: res.data.msg});
-                        this.$refs.table.reload();
-                    } else {
-                        this.$message.error(res.data.msg);
-                    }
-                }).catch(e => {
-                    loading.close();
-                    this.$message.error(e.message);
-                });
-            }
-        },
-        /* 更改状态 */
-        editStatus(row) {
-            this.$confirm('确定下架该广告?谨慎操作', '提示', {type: 'warning'}).then(() => {
-                const loading = this.$loading({lock: true});
-                let params = Object.assign({}, row);
-                this.$http.post('/advert/status', {id: params.id, status: params.status == 1 ? 2 : 1}).then(res => {
-                    loading.close();
-                    if (res.data.code === 0) {
-                        this.$message({type: 'success', message: res.data.msg});
-                    } else {
-                        row.status = !row.status ? 2 : 1;
-                        this.$message.error(res.data.msg);
-                    }
-                }).catch(e => {
-                    loading.close();
-                    this.$message.error(e.message);
-                });
-            });
-        }
     }
 }
 </script>
@@ -349,4 +292,23 @@ export default {
 .ele-table-tool {
     float: right;
 }
+
+.color1 {
+    background-color: #3aa1ff;
+}
+.color2 {
+    background-color: #fbb52c;
+}
+.color3 {
+    background-color: #00C777;
+}
+.color4 {
+    background-color: #9266F9;
+}
+.color5 {
+    background-color: #f7868c;
+}
+.color0 {
+    background-color: #ff0080;
+}
 </style>

+ 0 - 21
addons/admin/src/views/system/advert/index.vue

@@ -249,27 +249,6 @@ export default {
                 trade_password: [
                     {required: true, message: '请输入交易密码', trigger: 'blur'}
                 ],
-            },
-            // 自定义文件上传(这里使用把选择的文件转成blob演示)
-            file_picker_callback: (callback, value, meta) => {
-                let input = document.createElement('input');
-                input.setAttribute('type', 'file');
-                // 设定文件可选类型
-                if (meta.filetype === 'image') {
-                    input.setAttribute('accept', 'image/*');
-                } else if (meta.filetype === 'media') {
-                    input.setAttribute('accept', 'video/*');
-                }
-                input.onchange = () => {
-                    let file = input.files[0];
-                    let reader = new FileReader();
-                    reader.onload = (e) => {
-                        let blob = new Blob([e.target.result], {type: file.type});
-                        callback(URL.createObjectURL(blob));
-                    };
-                    reader.readAsArrayBuffer(file);
-                }
-                input.click();
             }
         }
     },

+ 16 - 7
addons/admin/src/views/system/advert/myorder.vue

@@ -47,7 +47,7 @@
                             </el-date-picker>
                         </el-form-item>
                     </el-col>
-                    <el-col :md="6" :sm="12">
+                    <el-col :md="12" :sm="12">
                         <div class="ele-form-actions">
                             <el-button type="primary" @click="$refs.table.reload()" icon="el-icon-search"
                                        class="ele-btn-icon">查询
@@ -125,6 +125,12 @@
                     </el-table-column>
                     <el-table-column label="操作" min-width="220px" align="center" :resizable="false" fixed="right">
                         <template slot-scope="{row}">
+                            <el-link type="primary" @click="showCustom(row, index)"
+                                     :underline="false"
+                                     v-if="permission.includes('sys:buyorder:edit')">
+                                对话
+                            </el-link>
+
                             <el-link @click="detail(row, index)" icon="el-icon-edit" type="primary" :underline="false"
                                      v-if="$store.state.user.user.user_type==1 && permission.includes('sys:buyorder:edit')">
                                 详情
@@ -501,12 +507,12 @@
                             <uploadImage :limit="1" v-model="editForm.exception_img"></uploadImage>
                         </el-form-item>
                         <el-col :sm="16">
-                        <el-form-item label="异常备注:" class="is-required">
-                            <el-input v-model="editForm.exception_remark" placeholder="请输入异常备注" clearable/>
-                        </el-form-item>
-                        <el-form-item label="交易密码:" v-if="$store.state.user.user.user_type == 2 && editForm.status != 4 && editForm.status != 5" class="is-required">
-                            <el-input type="password" v-model="editForm.trade_password" placeholder="请输入交易密码" clearable/>
-                        </el-form-item>
+                            <el-form-item label="异常备注:" class="is-required">
+                                <el-input v-model="editForm.exception_remark" placeholder="请输入异常备注" clearable/>
+                            </el-form-item>
+                            <el-form-item label="交易密码:" v-if="$store.state.user.user.user_type == 2 && editForm.status != 4 && editForm.status != 5" class="is-required">
+                                <el-input type="password" v-model="editForm.trade_password" placeholder="请输入交易密码" clearable/>
+                            </el-form-item>
                         </el-col>
                     </el-col>
                 </el-row>
@@ -918,4 +924,7 @@ export default {
     float: right;
     color: #fbb52c;
 }
+.el-date-editor--daterange.el-input__inner {
+    width: 230px;
+}
 </style>

+ 13 - 9
addons/admin/src/views/system/advert/order.vue

@@ -47,7 +47,7 @@
                             </el-date-picker>
                         </el-form-item>
                     </el-col>
-                    <el-col :md="6" :sm="12">
+                    <el-col :md="12" :sm="12">
                         <div class="ele-form-actions">
                             <el-button type="primary" @click="$refs.table.reload()" icon="el-icon-search"
                                        class="ele-btn-icon">查询
@@ -56,17 +56,12 @@
                                 @click="(table.where={type: '1',status: '0', exception_status: '0'})&&$refs.table.reload()">
                                 重置
                             </el-button>
-                            <el-button @click="exportData" icon="el-icon-download" type="success" class="ele-btn-icon" v-if="permission.includes('sys:buyorder:export')">导出</el-button>
+<!--                            <el-button @click="exportData" icon="el-icon-download" type="success" class="ele-btn-icon" v-if="permission.includes('sys:buyorder:export')">导出</el-button>-->
                         </div>
                     </el-col>
                 </el-row>
             </el-form>
-            <!-- 操作按钮 -->
-            <div class="ele-table-tool ele-table-tool-default">
-                <el-button @click="remove()" type="danger" icon="el-icon-delete" class="ele-btn-icon" size="small"
-                           v-if="permission.includes('sys:user:dall')">批量删除
-                </el-button>
-            </div>
+
             <!-- 数据表格 -->
             <ele-data-table ref="table" :config="table" :choose.sync="choose" height="calc(100vh - 315px)"
                             highlight-current-row>
@@ -125,6 +120,12 @@
                     </el-table-column>
                     <el-table-column label="操作" min-width="220px" align="center" :resizable="false" fixed="right">
                         <template slot-scope="{row}">
+                            <el-link type="primary" @click="showCustom(row, index)"
+                                     :underline="false"
+                                     v-if="permission.includes('sys:buyorder:edit')">
+                                对话
+                            </el-link>
+
                             <el-link @click="detail(row, index)" icon="el-icon-edit" type="primary" :underline="false"
                                      v-if="$store.state.user.user.user_type==1 && permission.includes('sys:buyorder:edit')">
                                 详情
@@ -834,7 +835,7 @@ export default {
                         ]);
                     });
                     let sheet = XLSX.utils.aoa_to_sheet(array);
-                    this.$util.exportSheet(XLSX, sheet, '客户买单订单记录');
+                    this.$util.exportSheet(XLSX, sheet, '广告订单记录');
                 } else {
                     this.$message.error(res.data.msg);
                 }
@@ -918,4 +919,7 @@ export default {
     float: right;
     color: #fbb52c;
 }
+.el-date-editor--daterange.el-input__inner {
+    width: 230px;
+}
 </style>

+ 5 - 2
addons/admin/src/views/system/buyorder/index.vue

@@ -47,7 +47,7 @@
                             </el-date-picker>
                         </el-form-item>
                     </el-col>
-                    <el-col :md="6" :sm="12">
+                    <el-col :md="12" :sm="12">
                         <div class="ele-form-actions">
                             <el-button type="primary" @click="$refs.table.reload()" icon="el-icon-search"
                                        class="ele-btn-icon">查询
@@ -253,7 +253,7 @@
                                            placeholder="请输入关键词"
                                            :remote-method="getReassign"
                                            :loading="loading" class="ele-fluid reassign">
-                                    <el-option v-for="(v,k) in reassigns" :label="v.username" :value="v.id">
+                                    <el-option v-for="(v,k) in reassigns" :key="k" :label="v.username" :value="v.id">
                                         <span class="label"
                                               :title="'ID:'+v.id+', USDT:'+v.usdt_num">{{ v.username }}</span>
                                         <span class="credit">信誉:{{ v.credit }}分</span>
@@ -918,4 +918,7 @@ export default {
     float: right;
     color: #fbb52c;
 }
+.el-date-editor--daterange.el-input__inner {
+    width: 230px;
+}
 </style>

+ 30 - 11
addons/admin/src/views/system/capital/deposit.vue

@@ -34,25 +34,25 @@
                     <div class="wallet-contacts">
                         <span class="label">类型:</span>
                         <el-button-group class="el-types">
-                            <el-button size="small" :type="formData.contact_type == 1? 'primary':'default'"
-                                       @click="(formData.contact_type = 1) && $refs.table.reload()">USDT-TRC20
+                            <el-button size="small" :type="table.where.contact_type == 1? 'primary':'default'"
+                                       @click="(table.where.contact_type = 1) && $refs.table.reload()">USDT-TRC20
                             </el-button>
-                            <el-button size="small" :type="formData.contact_type == 2? 'primary':'default'"
-                                       @click="(formData.contact_type = 2) && $refs.table.reload()">USDT-ERC20
+                            <el-button size="small" :type="table.where.contact_type == 2? 'primary':'default'"
+                                       @click="(table.where.contact_type = 2) && $refs.table.reload()">USDT-ERC20
                             </el-button>
                         </el-button-group>
                     </div>
                     <div class="wallet">
-                        <div class="address" v-if="formData.contact_type==1">
+                        <div class="address" v-if="table.where.contact_type==1">
                             <p><span class="label">存币地址:</span> <span>{{userInfo.trc_address}}</span></p> <span class="copy" @click="copy(userInfo.trc_address)">复制</span>
                         </div>
-                        <div class="address" v-if="formData.contact_type==2">
+                        <div class="address" v-if="table.where.contact_type==2">
                             <p><span class="label">存币地址:</span> <span>{{userInfo.erc_hexaddress}}</span></p> <span class="copy" @click="copy(userInfo.erc_hexaddress)">复制</span>
                         </div>
-                        <div class="qrcode-box" v-if="formData.contact_type==1">
+                        <div class="qrcode-box" v-if="table.where.contact_type==1">
                             <img class="qrcode" :src="userInfo.trc_qrcode" alt="">
                         </div>
-                        <div class="qrcode-box" v-else-if="formData.contact_type==2">
+                        <div class="qrcode-box" v-else-if="table.where.contact_type==2">
                             <img class="qrcode" :src="userInfo.erc_qrcode" alt="">
                         </div>
                     </div>
@@ -64,7 +64,8 @@
             <ele-data-table ref="table" :config="table" :choose.sync="choose" height="calc(100vh - 315px)"
                             highlight-current-row>
                 <template slot-scope="{index}">
-                    <el-table-column prop="time_text" label="存币时间" show-overflow-tooltip min-width="250"/>
+                    <el-table-column prop="time_text" label="存币时间" show-overflow-tooltip min-width="150"/>
+                    <el-table-column prop="from_address" label="来源"  show-overflow-tooltip min-width="250"/>
                     <el-table-column prop="contact_type" label="类型"  :resizable="false" min-width="120">
                         <template slot-scope="{row}">
                             <span v-if="row.contact_type == 1">TRC20</span>
@@ -87,7 +88,7 @@
 
 <script>
 export default {
-    name: "Deposit",
+    name: "SysDeposit",
     data() {
         return {
             loading: false,  // 保存按钮loading
@@ -102,6 +103,7 @@ export default {
             formData: {
                 contact_type: 1,
             },
+            timerId: null,
             choose: [],
             userInfo: {},
         }
@@ -109,10 +111,27 @@ export default {
     created() {
         this.getData();
         this.getConfig();
+
+
+    },
+    mounted(){
+        this.getDataList();
     },
     methods: {
+        getDataList(){
+            let _this = this
+            clearInterval(this.timerId);
+            let time = 12000 + parseInt(Math.random()*2000);
+            this.timerId =setInterval(function(){
+                if(_this.$refs.table){
+                    _this.$refs.table.reload();
+                }
+            }, time);
+
+        },
         copy(text){
             let _this = this
+            _this.$message.closeAll()
             this.$copyText(text).then(
                 function(e) {
                     _this.$message.success('复制成功');
@@ -162,7 +181,7 @@ export default {
     background-color: #f1f1f1;
 }
 .el-wallet .el-wallet-item {
-    width: 33.3%;
+    min-width: 240px;
     text-align: left;
 }
 .el-wallet .el-wallet-item .usdt {

+ 171 - 246
addons/admin/src/views/system/capital/index.vue

@@ -1,262 +1,187 @@
 <template>
-  <div class="ele-body">
-    <el-card shadow="never">
-      <!-- 搜索表单 -->
-      <el-form :model="table.where" label-width="77px" class="ele-form-search"
-               @keyup.enter.native="$refs.table.reload()" @submit.native.prevent>
-        <el-row :gutter="15">
-          <el-col :md="6" :sm="12">
-            <el-form-item label="交易单号:">
-              <el-input v-model="table.where.order_no" placeholder="请输入交易单号" clearable/>
-            </el-form-item>
-          </el-col>
-          <el-col :md="6" :sm="12">
-            <div class="ele-form-actions">
-              <el-button type="primary" @click="$refs.table.reload()" icon="el-icon-search" class="ele-btn-icon">查询
-              </el-button>
-              <el-button @click="(table.where={})&&$refs.table.reload()">重置</el-button>
-            </div>
-          </el-col>
-        </el-row>
-      </el-form>
-      <!-- 操作按钮 -->
-      <div class="ele-table-tool ele-table-tool-default">
-        <el-button @click="showEdit=true" type="primary" icon="el-icon-plus" class="ele-btn-icon" size="small" v-if="permission.includes('sys:notice:add')">添加
-        </el-button>
-        <el-button @click="remove()" type="danger" icon="el-icon-delete" class="ele-btn-icon" size="small" v-if="permission.includes('sys:notice:dall')">批量删除
-        </el-button>
-      </div>
-      <!-- 数据表格 -->
-      <ele-data-table ref="table" :config="table" :choose.sync="choose" height="calc(100vh - 315px)" highlight-current-row>
-        <template slot-scope="{index}">
-          <el-table-column type="selection" width="45" align="center" fixed="left"/>
-          <el-table-column type="index" :index="index" label="编号" width="60" align="center" fixed="left" show-overflow-tooltip/>
-          <el-table-column prop="title" label="单号" sortable="custom" show-overflow-tooltip min-width="250"/>
-          <el-table-column prop="is_top" label="是否置顶" sortable="custom" :resizable="false" min-width="120">
-            <template slot-scope="{row}">
-              <el-switch v-model="row.is_top" @change="editIsTop(row)" :active-value="1" :inactive-value="2"/>
-            </template>
-          </el-table-column>
-          <el-table-column prop="status" label="通知状态" sortable="custom" :resizable="false" min-width="120">
-            <template slot-scope="{row}">
-              <el-switch v-model="row.status" @change="editStatus(row)" :active-value="1" :inactive-value="2"/>
-            </template>
-          </el-table-column>
-          <el-table-column label="创建时间" sortable="custom" show-overflow-tooltip min-width="160">
-            <template slot-scope="{row}">{{ row.create_time | toDateString }}</template>
-          </el-table-column>
-          <el-table-column label="操作" width="130px" align="center" :resizable="false"  fixed="right">
-            <template slot-scope="{row}">
-              <el-link @click="edit(row)" icon="el-icon-edit" type="primary" :underline="false" v-if="permission.includes('sys:notice:edit')">修改</el-link>
-              <el-popconfirm title="确定要删除此通知吗?" @confirm="remove(row)" class="ele-action">
-                <el-link slot="reference" icon="el-icon-delete" type="danger" :underline="false" v-if="permission.includes('sys:notice:delete')">删除</el-link>
-              </el-popconfirm>
-            </template>
-          </el-table-column>
-        </template>
-      </ele-data-table>
-    </el-card>
-    <!-- 编辑弹窗 -->
-    <el-dialog :title="editForm.id?'修改通知':'修改通知'" :visible.sync="showEdit" width="600px"
-               @closed="editForm={}" :destroy-on-close="true" custom-class="ele-dialog-form" :lock-scroll="false">
-      <el-form :model="editForm" ref="editForm" :rules="editRules" label-width="82px">
-        <el-row :gutter="15">
-          <el-col :sm="12">
-            <el-form-item label="通知标题:" prop="title">
-              <el-input v-model="editForm.title" placeholder="请输入通知标题" clearable/>
-            </el-form-item>
-            <el-form-item label="通知状态:">
-              <el-radio-group v-model="editForm.status">
-                <el-radio :label="1">正常</el-radio>
-                <el-radio :label="2">禁用</el-radio>
-              </el-radio-group>
-            </el-form-item>
-          </el-col>
-          <el-col :sm="12">
-            <el-form-item label="是否置顶:">
-              <el-radio-group v-model="editForm.is_top">
-                <el-radio :label="1">置顶</el-radio>
-                <el-radio :label="2">不置顶</el-radio>
-              </el-radio-group>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <!-- 富文本编辑器 -->
-        <tinymce-editor v-model="editForm.content" :init="editContent"/>
-      </el-form>
-      <div slot="footer">
-        <el-button @click="showEdit=false">取消</el-button>
-        <el-button type="primary" @click="save">保存</el-button>
-      </div>
-    </el-dialog>
-  </div>
+    <div class="ele-body">
+        <el-card shadow="never">
+            <el-tabs v-model="activeName" @tab-click="handleClick">
+                <el-tab-pane label="USDT" name="usdt">
+                    <el-row :gutter="15" >
+                        <el-col :md="24" class="el-wallet">
+                            <el-col :md="8" :sm="12" class="el-wallet-item">
+                                <img class="usdt" src="../../../assets/usdt.png" alt="">
+                                <span class="info">
+                                USDT总额:{{ userInfo.usdt_num }}<br>
+                                保证金:{{ userInfo.bond }}
+                                </span>
+                            </el-col>
+                            <el-col :md="8" :sm="12">
+                            </el-col>
+                            <el-col :md="8" :sm="12">
+                            </el-col>
+                        </el-col>
+                    </el-row>
+                    <!-- 搜索表单 -->
+                    <el-form :model="table.where" label-width="100px" class="ele-form-search"
+                             @keyup.enter.native="$refs.table.reload()" @submit.native.prevent>
+                        <el-row :gutter="15">
+                            <el-col :md="8" :sm="12">
+                                <el-form-item label="交易单号:">
+                                    <el-input v-model="table.where.keyword" placeholder="请输入交易单号" clearable/>
+                                </el-form-item>
+                            </el-col>
+                            <el-col :md="6" :sm="12">
+                                <el-form-item label="类型:">
+                                    <el-select v-model="table.where.type" placeholder="请选择" class="ele-fluid">
+                                        <el-option label="全部" value="0"/>
+                                        <el-option label="买入" value="1"/>
+                                        <el-option label="卖出" value="2"/>
+                                        <el-option label="卖出取消" value="3"/>
+                                        <el-option label="存币" value="4"/>
+                                        <el-option label="提币" value="5"/>
+                                        <el-option label="平台退还" value="6"/>
+                                        <el-option label="第三方平台交易" value="7"/>
+                                    </el-select>
+                                </el-form-item>
+                            </el-col>
+                            <el-col :md="2" :sm="12">
+                                <el-form-item label="起止日期:" prop="date">
+                                    <el-col :md="2" :sm="12">
+                                        <el-date-picker
+                                            v-model="table.where.date"
+                                            type="daterange"
+                                            placeholder="选择起止日期"
+                                            size="small"
+                                            value-format="yyyy-MM-dd"
+                                            format="yyyy-MM-dd">
+                                    </el-date-picker>
+                                    </el-col>
+                                </el-form-item>
+                            </el-col>
+
+                            <el-col :md="12" :sm="12">
+                                <div class="ele-form-actions">
+                                    <el-button type="primary" @click="$refs.table.reload()" icon="el-icon-search"
+                                               class="ele-btn-icon">查询
+                                    </el-button>
+                                    <el-button @click="(table.where={})&&$refs.table.reload()">重置</el-button>
+                                </div>
+                            </el-col>
+                        </el-row>
+                    </el-form>
+
+                    <!-- 数据表格 -->
+                    <ele-data-table ref="table" :config="table" :choose.sync="choose" height="calc(100vh - 315px)"
+                                    highlight-current-row>
+                        <template slot-scope="{index}">
+                            <el-table-column prop="time_text" label="时间" sortable="custom" show-overflow-tooltip
+                                             min-width="250"/>
+                            <el-table-column prop="order_no" label="订单号" sortable="custom" show-overflow-tooltip
+                                             min-width="250"/>
+                            <el-table-column prop="is_top" label="类型" sortable="custom" :resizable="false"
+                                             min-width="120">
+                                <template slot-scope="{row}">
+                                    <span class="" v-if="row.type == 1">买入</span>
+                                    <span class="" v-else-if="row.type == 2">卖出</span>
+                                    <span class="" v-else-if="row.type == 3">卖出取消</span>
+                                    <span class="" v-else-if="row.type == 4">存币</span>
+                                    <span class="" v-else-if="row.type == 5">提币</span>
+                                    <span class="" v-else-if="row.type == 6">平台退还</span>
+                                    <span class="" v-else-if="row.type == 7">第三方平台交易</span>
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="num" label="数量(USDT)" sortable="custom" show-overflow-tooltip
+                                             min-width="150">
+                                <template slot-scope="{row}">
+                                    <span v-if="row.change_type==2" class="ele-text-default">-{{row.num}}</span>
+                                    <span v-else class="ele-text-danger">+{{row.num}}</span>
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="balance" label="余额(USDT)" show-overflow-tooltip
+                                             min-width="150"/>
+                        </template>
+                    </ele-data-table>
+
+                </el-tab-pane>
+            </el-tabs>
+        </el-card>
+    </div>
 </template>
 
 <script>
-import TinymceEditor from '@/components/TinymceEditor'
-import { mapGetters } from "vuex";
-export default {
-  name: "SysNotice",
-  components: {TinymceEditor},
-  data() {
-    return {
-      table: {url: '/notice/index', where: {}},  // 表格配置
-      choose: [],  // 表格选中数据
-      showEdit: false,  // 是否显示表单弹窗
-      editForm: {source:1,status:1,is_top:2},  // 表单数据
-      editRules: {  // 表单验证规则
-        title: [
-          {required: true, message: '请输入通知标题', trigger: 'blur'}
-        ],
-        status: [
-          {required: true, message: '请输入选择通知状态', trigger: 'blur'}
-        ],
-        is_top: [
-          {required: true, message: '请输入选择是否置顶', trigger: 'blur'}
-        ],
-      },
-      // 自定义文件上传(这里使用把选择的文件转成blob演示)
-      file_picker_callback: (callback, value, meta) => {
-        let input = document.createElement('input');
-        input.setAttribute('type', 'file');
-        // 设定文件可选类型
-        if (meta.filetype === 'image') {
-          input.setAttribute('accept', 'image/*');
-        } else if (meta.filetype === 'media') {
-          input.setAttribute('accept', 'video/*');
-        }
-        input.onchange = () => {
-          let file = input.files[0];
-          let reader = new FileReader();
-          reader.onload = (e) => {
-            let blob = new Blob([e.target.result], {type: file.type});
-            callback(URL.createObjectURL(blob));
-          };
-          reader.readAsArrayBuffer(file);
-        }
-        input.click();
-      }
-    }
-  },
-  computed: {
-    ...mapGetters(["permission"]),
+import {mapGetters} from "vuex";
 
-    editContent() {
-      return {
-        menubar: false,
-        file_picker_callback: this.file_picker_callback,
-        skin_url: this.$store.state.theme.theme === 'dark' ? '/tinymce/skins/ui/oxide-dark' : '/tinymce/skins/ui/oxide',
-        content_css: this.$store.state.theme.theme === 'dark' ? '/tinymce/skins/content/dark/content.css' : '/tinymce/skins/content/default/content.css'
-      };
-    }
-  },
-  mounted() {
-  },
-  methods: {
-    /* 显示编辑 */
-    edit(row) {
-      this.editForm = Object.assign({}, row);
-      this.showEdit = true;
-    },
-    /* 保存编辑 */
-    save() {
-      this.$refs['editForm'].validate((valid) => {
-        if (valid) {
-          const loading = this.$loading({lock: true});
-          this.$http.post('/notice/edit', this.editForm).then(res => {
-            loading.close();
-            if (res.data.code === 0) {
-              this.showEdit = false;
-              this.$message({type: 'success', message: res.data.msg});
-              this.$refs.table.reload();
-            } else {
-              this.$message.error(res.data.msg);
-            }
-          }).catch(e => {
-            loading.close();
-            this.$message.error(e.message);
-          });
-        } else {
-          return false;
+export default {
+    name: "SysCapital",
+    components: {},
+    data() {
+        return {
+            table: {url: '/capital/index', where: {},page:{limit: 30}},  // 表格配置
+            choose: [],  // 表格选中数据
+            userInfo: {},
+            activeName: 'usdt',
         }
-      });
     },
-    /* 删除 */
-    remove(row) {
-      if (!row) {  // 批量删除
-        if (this.choose.length === 0) return this.$message.error('请至少选择一条数据');
-        let ids = this.choose.map(d => d.id);
-        this.$confirm('确定要删除选中的通知吗?', '提示', {type: 'warning'}).then(() => {
-          const loading = this.$loading({lock: true});
-          this.$http.post('/notice/delete', {id: ids}).then(res => {
-            loading.close();
-            if (res.data.code === 0) {
-              this.$message({type: 'success', message: res.data.msg});
-              this.$refs.table.reload();
-            } else {
-              this.$message.error(res.data.msg);
-            }
-          }).catch(e => {
-            loading.close();
-            this.$message.error(e.message);
-          });
-        }).catch(() => 0);
-      } else {  // 单个删除
-        const loading = this.$loading({lock: true});
-        this.$http.post('/notice/delete', {id:row.id}).then(res => {
-          loading.close();
-          if (res.data.code === 0) {
-            this.$message({type: 'success', message: res.data.msg});
-            this.$refs.table.reload();
-          } else {
-            this.$message.error(res.data.msg);
-          }
-        }).catch(e => {
-          loading.close();
-          this.$message.error(e.message);
-        });
-      }
+    computed: {
+        ...mapGetters(["permission"]),
+
     },
-    /* 更改状态 */
-    editStatus(row) {
-      const loading = this.$loading({lock: true});
-      let params = Object.assign({}, row);
-      this.$http.post('/notice/status', params).then(res => {
-        loading.close();
-        if (res.data.code === 0) {
-          this.$message({type: 'success', message: res.data.msg});
-        } else {
-          row.status = !row.status ? 2 : 1;
-          this.$message.error(res.data.msg);
-        }
-      }).catch(e => {
-        loading.close();
-        this.$message.error(e.message);
-      });
+    mounted() {
+        this.getData()
     },
-    /* 是否置顶 */
-    editIsTop(row) {
-      const loading = this.$loading({lock: true});
-      let params = Object.assign({}, row);
-      this.$http.post('/notice/setIsTop', params).then(res => {
-        loading.close();
-        if (res.data.code === 0) {
-          this.$message({type: 'success', message: res.data.msg});
-        } else {
-          row.isTop = !row.isTop ? 2 : 1;
-          this.$message.error(res.data.msg);
-        }
-      }).catch(e => {
-        loading.close();
-        this.$message.error(e.message);
-      });
-    },
-  }
+    methods: {
+        handleClick() {
+
+        },
+        // 用户信息
+        getData() {
+            const loading = this.$loading({lock: true});
+            this.$http.get('/member/info', {}).then(res => {
+                loading.close();
+                if (res.data.success === true) {
+                    this.userInfo = res.data.data
+                } else {
+                    this.$message.error(res.data.msg);
+                }
+            }).catch(e => {
+                loading.close();
+                this.$message.error(e.message);
+            });
+        },
+    }
 }
 </script>
 
 <style scoped>
 .ele-block >>> .el-upload, .ele-block >>> .el-upload-dragger {
-  width: 100%;
+    width: 100%;
+}
+
+.el-wallet {
+    margin: 15px 0px;
+    display: flex;
+    padding: 15px 0;
+    background-color: #f1f1f1;
+}
+.el-wallet .el-wallet-item {
+    min-width: 240px;
+    text-align: left;
+}
+.el-wallet .el-wallet-item .usdt {
+    vertical-align: middle;
+}
+
+.el-wallet .el-wallet-item .info {
+    display: inline-block;
+    vertical-align: middle;
+    margin-left: 4px;
+}
+.usdt {
+    width: 32px;
+    height: 32px;
+    border-radius: 50%;
+    vertical-align: middle;
+    margin-left: 4px;
+}
+
+.el-date-editor--daterange.el-input__inner {
+    width: 230px;
 }
 </style>

+ 4 - 3
addons/admin/src/views/system/capital/withdraw.vue

@@ -21,12 +21,12 @@
 
                     <div class="tips">
                         <div class="title">提示:</div>
-                        <div class="info" v-html="config.coin_in_tips">
+                        <div class="info" v-html="config.coin_out_tips">
                         </div>
                     </div>
                     <div class="alert">
                         <el-alert
-                            title="存币地址已更新,请勿向旧的存币地址进行存币"
+                            title="请核对您的提币地址是否正确,以免对您对资产造成无必要的损失"
                             type="warning"
                             show-icon>
                         </el-alert>
@@ -112,7 +112,7 @@
 
 <script>
 export default {
-    name: "Deposit",
+    name: "SysWithdraw",
     data() {
         return {
             loading: false,  // 保存按钮loading
@@ -171,6 +171,7 @@ export default {
         // 复制地址
         copy(text) {
             let _this = this
+            _this.$message.closeAll()
             this.$copyText(text).then(
                 function (e) {
                     _this.$message.success('复制成功');

+ 2 - 2
addons/admin/src/views/system/loginlog/index.vue

@@ -3,7 +3,7 @@
     <el-card shadow="never">
       <!-- 搜索表单 -->
       <el-form :model="table.where" label-width="77px" class="ele-form-search"
-               @keyup.enter.native="$refs.table.reload()" @submit.native.prevent>
+               @keyup.enter.native="$refs.table.reload()" v-if="$store.state.user.user.user_type==1" @submit.native.prevent>
         <el-row :gutter="15">
           <el-col :md="6" :sm="12">
             <el-form-item label="用户账号:">
@@ -153,4 +153,4 @@ export default {
 
 <style scoped>
 
-</style>
+</style>

+ 3 - 0
addons/admin/src/views/system/sellorder/index.vue

@@ -918,4 +918,7 @@ export default {
     float: right;
     color: #fbb52c;
 }
+.el-date-editor--daterange.el-input__inner {
+    width: 230px;
+}
 </style>

+ 2 - 2
addons/utcapp/common/api.js

@@ -1,5 +1,5 @@
-const baseUrl = 'http://127.0.5.10'
-// const baseUrl = 'http://utc.wb.dongerkj.com'
+// const baseUrl = 'http://127.0.5.10'
+const baseUrl = 'http://utc.wb.dongerkj.com'
 /* 
  *	请求不带token
  */

+ 2 - 5
addons/utcapp/pages/trade/index.vue

@@ -398,17 +398,14 @@
 										title: _this.lang.buy_title,
 										content: _this.lang.order_success,
 										confirmText: _this.lang.goto_pay,
-										cancelText: _this.lang.contact_custom,
+										cancelText: _this.lang.op_go,
 										success: function(res) {
 											if (res.confirm == true) {
 												uni.navigateTo({
 													url: '/pages/order/index?type=1'
 												})
 											} else {
-												// 联系客服
-												uni.navigateTo({
-													url: '/pages/center/custom'
-												})
+
 											}
 										},
 

+ 1 - 1
addons/utcapp/unpackage/dist/build/h5/index.html

@@ -1,3 +1,3 @@
 <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><link rel="shortcut icon" type=image/x-icon href=static/favicon.ico><meta name=viewport content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1"><title>UTC</title><script>document.addEventListener('DOMContentLoaded', function() {
 				document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
-			})</script><link rel=stylesheet href=./static/index.css></head><body><noscript><strong>本站点必须要开启JavaScript才能运行</strong></noscript><div id=app></div><script src=./static/js/chunk-vendors.4d0cdb33.js></script><script src=./static/js/index.1841dcb1.js></script></body></html>
+			})</script><link rel=stylesheet href=./static/index.css></head><body><noscript><strong>本站点必须要开启JavaScript才能运行</strong></noscript><div id=app></div><script src=./static/js/chunk-vendors.4d0cdb33.js></script><script src=./static/js/index.46c0ddb6.js></script></body></html>

BIN
addons/utcapp/unpackage/dist/build/h5/static/icons/address_icon.png


BIN
addons/utcapp/unpackage/dist/build/h5/static/icons/advert_big.png


BIN
addons/utcapp/unpackage/dist/build/h5/static/icons/advert_icon.png


BIN
addons/utcapp/unpackage/dist/build/h5/static/icons/alipay_icon.png


BIN
addons/utcapp/unpackage/dist/build/h5/static/icons/bank.png


BIN
addons/utcapp/unpackage/dist/build/h5/static/icons/copy_icon.png


BIN
addons/utcapp/unpackage/dist/build/h5/static/icons/del.png


BIN
addons/utcapp/unpackage/dist/build/h5/static/icons/help.png


BIN
addons/utcapp/unpackage/dist/build/h5/static/icons/logout.png


BIN
addons/utcapp/unpackage/dist/build/h5/static/icons/no-data.png


BIN
addons/utcapp/unpackage/dist/build/h5/static/icons/trade.png


BIN
addons/utcapp/unpackage/dist/build/h5/static/icons/usdt_cycle.png


BIN
addons/utcapp/unpackage/dist/build/h5/static/icons/usdt_min.png


BIN
addons/utcapp/unpackage/dist/build/h5/static/icons/wxpay_green.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1
addons/utcapp/unpackage/dist/build/h5/static/js/index.1841dcb1.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
addons/utcapp/unpackage/dist/build/h5/static/js/index.46c0ddb6.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1
addons/utcapp/unpackage/dist/build/h5/static/js/pages-account-index.1f8a2cbd.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1
addons/utcapp/unpackage/dist/build/h5/static/js/pages-account-index~pages-account-logs~pages-center-capital~pages-center-payment~pages-index-index~p~a3787fc6.74e7e677.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
addons/utcapp/unpackage/dist/build/h5/static/js/pages-account-logs.e78e370c.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1
addons/utcapp/unpackage/dist/build/h5/static/js/pages-account-logs.f1cf3f98.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
addons/utcapp/unpackage/dist/build/h5/static/js/pages-account-logs~pages-auth-index~pages-center-address~pages-center-capital~pages-center-index~pag~547106ce.265c21ad.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
addons/utcapp/unpackage/dist/build/h5/static/js/pages-account-logs~pages-order-advert.d14e4568.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1
addons/utcapp/unpackage/dist/build/h5/static/js/pages-account-logs~pages-order-index.eb05a161.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1
addons/utcapp/unpackage/dist/build/h5/static/js/pages-auth-index.1369d923.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
addons/utcapp/unpackage/dist/build/h5/static/js/pages-auth-index.e928e8bb.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
addons/utcapp/unpackage/dist/build/h5/static/js/pages-auth-index~pages-center-address~pages-center-payment-add~pages-center-payment-edit~pages-forge~e48e5eda.934286f5.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
addons/utcapp/unpackage/dist/build/h5/static/js/pages-auth-index~pages-center-payment-add~pages-center-payment-edit~pages-order-index.c4378a8a.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-address.2a2b24a9.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1
addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-address.623cd93c.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-address~pages-center-payment-add~pages-center-payment-edit.e1cfe02e.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-address~pages-center-payment~pages-trade-advert.58c24c3c.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1
addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-capital.4de60434.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-capital.e1b121b9.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1
addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-index.b291eab6.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-index.cd676f1d.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-payment-add.57e7d52c.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1
addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-payment-add.a8575800.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1
addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-payment-edit.96c08cf3.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-payment-edit.e10e9878.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-payment.2535a8fc.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1
addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-payment.44faf535.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1
addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-payment~pages-center-payment-add~pages-center-payment-edit.bb0bb254.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1
addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-safe.1f8786e5.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
addons/utcapp/unpackage/dist/build/h5/static/js/pages-center-safe.ef8a84da.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1
addons/utcapp/unpackage/dist/build/h5/static/js/pages-index-index.0fde654d.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
addons/utcapp/unpackage/dist/build/h5/static/js/pages-index-index.56b4c5e5.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1
addons/utcapp/unpackage/dist/build/h5/static/js/pages-login-login.b57c1922.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
addons/utcapp/unpackage/dist/build/h5/static/js/pages-login-login.c62c4462.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
addons/utcapp/unpackage/dist/build/h5/static/js/pages-order-advert.217975d6.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
addons/utcapp/unpackage/dist/build/h5/static/js/pages-order-index.7118a964.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1
addons/utcapp/unpackage/dist/build/h5/static/js/pages-order-index.8a0ce8a1.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
addons/utcapp/unpackage/dist/build/h5/static/js/pages-trade-advert.da340f04.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
addons/utcapp/unpackage/dist/build/h5/static/js/pages-trade-collection.6cdf949e.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
addons/utcapp/unpackage/dist/build/h5/static/js/pages-trade-index.5250b80d.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1
addons/utcapp/unpackage/dist/build/h5/static/js/pages-trade-index.c785110d.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1
addons/utcapp/unpackage/dist/build/h5/static/js/pages-trade-transfer.2bd89f28.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
addons/utcapp/unpackage/dist/build/h5/static/js/pages-trade-transfer.67ae5985.js


+ 6 - 3
routes/web.php

@@ -63,7 +63,8 @@ Route::post('/index/updateTradePwd', [IndexController::class, 'updateTradePwd'])
 Route::post('/index/data', [IndexController::class, 'indexData']);
 Route::post('/index/clearCache', [IndexController::class, 'clearCache']);
 Route::post('/index/tradeConfig', [IndexController::class, 'tradeConfig']);
-Route::any('/index/google', [IndexController::class, 'googleCode']);
+Route::any('/index/wallet', [IndexController::class, 'wallet']);
+Route::any('/index/transfer', [IndexController::class, 'transfer']);
 
 // 设置
 Route::post('/setting/save', [SettingController::class, 'save']);
@@ -88,18 +89,20 @@ Route::post('/advert/edit', [\App\Http\Controllers\Admin\AdvertController::class
 Route::post('/advert/delete', [\App\Http\Controllers\Admin\AdvertController::class, 'delete']);
 Route::post('/advert/status', [\App\Http\Controllers\Admin\AdvertController::class, 'status']);
 Route::post('/advert/buy', [\App\Http\Controllers\Admin\AdvertController::class, 'buy']);
+Route::post('/advert/sell', [\App\Http\Controllers\Admin\AdvertController::class, 'sell']);
 
 // 广告订单
 Route::any('/advertorder/index', [AdvertOrderController::class, 'index']);
 
-
 // 账户明细
-Route::any('/capitail/index', [AdvertOrderController::class, 'index']);
+Route::any('/capital/index', [\App\Http\Controllers\Admin\CapitalController::class, 'index']);
+
 
 // 币交易明细
 Route::any('/coinlog/index', [\App\Http\Controllers\Admin\CoinLogController::class, 'index']);
 Route::any('/trade/trigger', [\App\Http\Controllers\Admin\CoinLogController::class, 'trigger']);
 Route::any('/trade/withdraw', [\App\Http\Controllers\Admin\CoinLogController::class, 'withdraw']);
+Route::any('/trade/confirm', [\App\Http\Controllers\Admin\CoinLogController::class, 'confirm']);
 
 // 收款方式
 Route::get('/payment/index', [UserController::class, 'index']);