| | |
| | | <div>{{ $t("message.user.xianhuozhanghu") }}</div> |
| | | <div> |
| | | <el-button |
| | | type="primary" |
| | | style="width: 100px; margin-right: 10px" |
| | | @click="gotoPage('/recharge')" |
| | | >{{ $t("message.user.chongzhi") }}</el-button |
| | | type="primary" |
| | | style="width: 100px; margin-right: 10px" |
| | | @click="gotoPage('/recharge')" |
| | | >{{ $t("message.user.chongzhi") }}</el-button |
| | | > |
| | | <button class="light-grey-button" @click="gotoPage('/withdraw')"> |
| | | {{ $t("message.user.tixian") }} |
| | |
| | | <div class="margin-top-bottom20"> |
| | | <total-assets :pageType="'financial'"></total-assets> |
| | | <div class="tab-customize-box"> |
| | | <el-input v-model="bizhong" style="width: 150px;" placeholder="搜索币种"/> |
| | | <el-button type="primary" style="margin-left: 10px;margin-right: 20px;" @click="getList">查询</el-button> |
| | | <el-checkbox v-model="yangCangchecked" label="隐藏0资产" size="large" @change="getList" /> |
| | | <el-input |
| | | v-model="bizhong" |
| | | style="width: 150px" |
| | | placeholder="搜索币种" |
| | | /> |
| | | <el-button |
| | | type="primary" |
| | | style="margin-left: 10px; margin-right: 20px" |
| | | @click="getList" |
| | | >查询</el-button |
| | | > |
| | | <el-checkbox |
| | | v-model="yangCangchecked" |
| | | label="隐藏0资产" |
| | | size="large" |
| | | @change="getList" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <!-- 理财账户列表 --> |
| | | <el-table |
| | | v-if="heYueType == 0" |
| | | :data="tableData" |
| | | class="width100" |
| | | :header-cell-style="getRowClass" |
| | | :empty-text="$t('message.home.noData')" |
| | | v-if="heYueType == 0" |
| | | :data="tableData" |
| | | class="width100" |
| | | :header-cell-style="getRowClass" |
| | | :empty-text="$t('message.home.noData')" |
| | | > |
| | | <el-table-column |
| | | prop="name" |
| | | :label="$t('message.user.bizhong')" |
| | | sortable |
| | | prop="name" |
| | | :label="$t('message.user.bizhong')" |
| | | sortable |
| | | ></el-table-column> |
| | | <el-table-column |
| | | :label="$t('message.user.keyong')" |
| | | sortable |
| | | > |
| | | <template #default="{row}"> |
| | | <span>{{row.money >= 0? row.money.toFixed(6): row.amount.toFixed(6)}}</span> |
| | | <el-table-column :label="$t('message.user.keyong')" sortable> |
| | | <template #default="{ row }"> |
| | | <span>{{ |
| | | row.volume >= 0 ? row.volume.toFixed(6) : row.volume.toFixed(6) |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | :label="$t('message.user.dongjie')" |
| | | > |
| | | <template #default="{row}"> |
| | | <span>{{row.freeze_money >= 0? row.freeze_money.toFixed(6) : row.freeze_amount.toFixed(6)}}</span> |
| | | <el-table-column :label="$t('message.user.dongjie')"> |
| | | <template #default="{ row }"> |
| | | <span>{{ |
| | | row.freeze_money >= 0 |
| | | ? row.freeze_money.toFixed(6) |
| | | : row.freeze_amount.toFixed(6) |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | :label="$t('message.jiaoyi.suocang')" |
| | | > |
| | | <template #default="{row}"> |
| | | <span>{{row.lock_money >= 0? row.lock_money.toFixed(6) : row.lock_amount.toFixed(6)}}</span> |
| | | <el-table-column :label="$t('message.jiaoyi.suocang')"> |
| | | <template #default="{ row }"> |
| | | <span>{{ |
| | | row.lock_money >= 0 |
| | | ? row.lock_money.toFixed(6) |
| | | : row.lock_amount.toFixed(6) |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | :label="$t('message.user.jiedai')" |
| | | > |
| | | <template #default="{row}"> |
| | | <span>{{row.frozenAmount >= 0 ? row.frozenAmount.toFixed(6) : ''}}</span> |
| | | <el-table-column :label="$t('message.user.jiedai')"> |
| | | <template #default="{ row }"> |
| | | <span>{{ |
| | | row.frozenAmount >= 0 ? row.frozenAmount.toFixed(6) : "" |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <!-- 理财订单详情 --> |
| | | <el-dialog |
| | | :title="$t('message.user.dingdanxiangqing')" |
| | | v-model="centerDialogVisible" |
| | | width="50%" |
| | | center |
| | | :title="$t('message.user.dingdanxiangqing')" |
| | | v-model="centerDialogVisible" |
| | | width="50%" |
| | | center |
| | | > |
| | | <div class="dialog-style"> |
| | | <div class="dialog-content"> |
| | |
| | | <p> |
| | | {{ |
| | | detailData.cycle != 0 |
| | | ? detailData.cycle + $t("message.user.tian") |
| | | : $t("message.user.wuxianqi") |
| | | ? detailData.cycle + $t("message.user.tian") |
| | | : $t("message.user.wuxianqi") |
| | | }} |
| | | </p> |
| | | <p>{{ detailData.daily_rate }} %</p> |
| | |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="centerDialogVisible = false">{{ |
| | | $t("message.user.quxiao") |
| | | }}</el-button> |
| | | $t("message.user.quxiao") |
| | | }}</el-button> |
| | | <el-button type="primary" @click="closeFinance">{{ |
| | | $t("message.user.quedingshuhui") |
| | | }}</el-button> |
| | | $t("message.user.quedingshuhui") |
| | | }}</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 矿池锁仓订单详情 --> |
| | | <el-dialog |
| | | :title="$t('message.user.dingdanxiangqing')" |
| | | v-model="minerDialog" |
| | | width="50%" |
| | | center |
| | | :title="$t('message.user.dingdanxiangqing')" |
| | | v-model="minerDialog" |
| | | width="50%" |
| | | center |
| | | > |
| | | <div class="dialog-style"> |
| | | <div class="dialog-content"> |
| | |
| | | <p> |
| | | {{ |
| | | minerDetail.cycle != 0 |
| | | ? minerDetail.cycle + $t("message.user.tian") |
| | | : $t("message.user.wuxianqi") |
| | | ? minerDetail.cycle + $t("message.user.tian") |
| | | : $t("message.user.wuxianqi") |
| | | }} |
| | | </p> |
| | | <p>{{ minerDetail.daily_rate }} %</p> |
| | |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="minerDialog = false">{{ |
| | | $t("message.user.quxiao") |
| | | }}</el-button> |
| | | $t("message.user.quxiao") |
| | | }}</el-button> |
| | | <el-button |
| | | type="primary" |
| | | @click="unlock" |
| | | :disabled="!minerDetail.can_close" |
| | | >{{ $t("message.user.jiesuo") }}</el-button |
| | | type="primary" |
| | | @click="unlock" |
| | | :disabled="!minerDetail.can_close" |
| | | >{{ $t("message.user.jiesuo") }}</el-button |
| | | > |
| | | </span> |
| | | </el-dialog> |
| | |
| | | <script> |
| | | import totalAssets from "./components/totalAssets.vue"; |
| | | import Axios2 from "@/api/wallet.js"; |
| | | import Axios from "@/utils/http"; |
| | | |
| | | export default { |
| | | components: { totalAssets }, |
| | | name: "spot", |
| | | data() { |
| | | return { |
| | | yangCangchecked:'', |
| | | bizhong:'', |
| | | yangCangchecked: "", |
| | | bizhong: "", |
| | | MenuChooseIndex: 1, |
| | | total: 0, |
| | | tableData: [], //理财列表数据 |
| | |
| | | // this.heYueType = this.$route.query.type; |
| | | // } |
| | | this.getAssetsAll(); |
| | | this.getList(); |
| | | this.$nextTick(() => { |
| | | this.getList(); |
| | | }); |
| | | // this.getList(); |
| | | this.getMineList(); |
| | | }, |
| | | methods: { |
| | |
| | | }, |
| | | //理财账户列表数据 |
| | | getList() { |
| | | Axios2.getWalletList({}).then((res) => { |
| | | let result = res.data |
| | | let tableData = [] |
| | | for (let key in result){ |
| | | result[key].name = key |
| | | tableData.push(result[key]) |
| | | } |
| | | if (this.bizhong){ |
| | | this.tableData = tableData.filter(item => item.name == this.bizhong) |
| | | return |
| | | } |
| | | if (this.yangCangchecked){ |
| | | this.tableData = tableData.filter(item => (item.money || item.amount )) |
| | | return |
| | | } |
| | | this.tableData = tableData |
| | | // Axios2.getWalletList({}) |
| | | Axios.fetch("wap/api/wallet!getAll.action").then((res) => { |
| | | let result = res.data.extends; |
| | | // let tableData = []; |
| | | // for (let key in result) { |
| | | // result[key].name = key; |
| | | // tableData.push(result[key]); |
| | | // } |
| | | |
| | | // if (this.bizhong) { |
| | | // this.tableData = tableData.filter( |
| | | // (item) => item.name == this.bizhong |
| | | // ); |
| | | // return; |
| | | // } |
| | | // if (this.yangCangchecked) { |
| | | // this.tableData = tableData.filter( |
| | | // (item) => item.money || item.amount |
| | | // ); |
| | | // return; |
| | | // } |
| | | this.tableData = res.data.extends; |
| | | console.loog("----", this.tableData, res.data.extends); |
| | | }); |
| | | }, |
| | | //矿池锁仓列表 |
| | |
| | | closeFinance() { |
| | | let that = this; |
| | | that |
| | | .$confirm( |
| | | this.$t("message.user.xianzaishifoushuhui"), |
| | | this.$t("message.user.tishi"), |
| | | { |
| | | confirmButtonText: this.$t("message.user.queding"), |
| | | cancelButtonText: this.$t("message.user.quxiao"), |
| | | type: "warning", |
| | | } |
| | | ) |
| | | .then(() => { |
| | | Axios2.financeOrderOfClosOrder({ |
| | | id: that.orderId, |
| | | }).then((res) => { |
| | | if (res.code == 0) { |
| | | that.$message({ |
| | | type: "success", |
| | | message: this.$t("message.user.shuihuichenggong"), |
| | | }); |
| | | } |
| | | that.centerDialogVisible = false; |
| | | that.getList(); |
| | | that.$router.push({ |
| | | path: "/order/financialOrder", |
| | | query: { |
| | | type: "financial", |
| | | }, |
| | | .$confirm( |
| | | this.$t("message.user.xianzaishifoushuhui"), |
| | | this.$t("message.user.tishi"), |
| | | { |
| | | confirmButtonText: this.$t("message.user.queding"), |
| | | cancelButtonText: this.$t("message.user.quxiao"), |
| | | type: "warning", |
| | | } |
| | | ) |
| | | .then(() => { |
| | | Axios2.financeOrderOfClosOrder({ |
| | | id: that.orderId, |
| | | }).then((res) => { |
| | | if (res.code == 0) { |
| | | that.$message({ |
| | | type: "success", |
| | | message: this.$t("message.user.shuihuichenggong"), |
| | | }); |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | that.$message({ |
| | | type: "info", |
| | | message: this.$t("message.user.yiquxiao"), |
| | | }); |
| | | } |
| | | that.centerDialogVisible = false; |
| | | that.getList(); |
| | | that.$router.push({ |
| | | path: "/order/financialOrder", |
| | | query: { |
| | | type: "financial", |
| | | }, |
| | | }); |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | that.$message({ |
| | | type: "info", |
| | | message: this.$t("message.user.yiquxiao"), |
| | | }); |
| | | that.centerDialogVisible = false; |
| | | }); |
| | | }, |
| | | //矿池详情 |
| | | goMineDetail(order_no, id) { |
| | |
| | | unlock() { |
| | | let that = this; |
| | | that |
| | | .$confirm( |
| | | this.$t("message.user.shifouxianzaijiesuo"), |
| | | this.$t("message.user.tishi"), |
| | | { |
| | | confirmButtonText: this.$t("message.user.queding"), |
| | | cancelButtonText: this.$t("message.user.quxiao"), |
| | | type: "warning", |
| | | } |
| | | ) |
| | | .then(() => { |
| | | Axios2.minerOrderOfClosOrder({ |
| | | order_no: that.minerId, |
| | | }).then((res) => { |
| | | if (res.code == 0) { |
| | | that.$message({ |
| | | type: "success", |
| | | message: this.$t("message.user.jiesuochenggong"), |
| | | }); |
| | | that.heYueType = 1; |
| | | } |
| | | that.minerDialog = false; |
| | | that.getMineList(); |
| | | that.$router.push({ |
| | | path: "/order/financialOrder", |
| | | query: { |
| | | type: "miner", |
| | | }, |
| | | .$confirm( |
| | | this.$t("message.user.shifouxianzaijiesuo"), |
| | | this.$t("message.user.tishi"), |
| | | { |
| | | confirmButtonText: this.$t("message.user.queding"), |
| | | cancelButtonText: this.$t("message.user.quxiao"), |
| | | type: "warning", |
| | | } |
| | | ) |
| | | .then(() => { |
| | | Axios2.minerOrderOfClosOrder({ |
| | | order_no: that.minerId, |
| | | }).then((res) => { |
| | | if (res.code == 0) { |
| | | that.$message({ |
| | | type: "success", |
| | | message: this.$t("message.user.jiesuochenggong"), |
| | | }); |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | that.$message({ |
| | | type: "info", |
| | | message: this.$t("message.user.yiquxiao"), |
| | | }); |
| | | that.heYueType = 1; |
| | | } |
| | | that.minerDialog = false; |
| | | that.getMineList(); |
| | | that.$router.push({ |
| | | path: "/order/financialOrder", |
| | | query: { |
| | | type: "miner", |
| | | }, |
| | | }); |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | that.$message({ |
| | | type: "info", |
| | | message: this.$t("message.user.yiquxiao"), |
| | | }); |
| | | that.minerDialog = false; |
| | | }); |
| | | }, |
| | | //给表头设置背景颜色 |
| | | getRowClass({ rowIndex, columnIndex }) { |
| | |
| | | .table_all >>> th.el-table__cell { |
| | | background-color: #fafafa; |
| | | } |
| | | .tab-customize-box{ |
| | | .tab-customize-box { |
| | | display: flex; |
| | | align-items: center; |
| | | } |