Browse Source

增加手动信号模块

master
lizhixin 4 years ago
parent
commit
3fc1956e39
  1. 4
      src/layout/dashboard/DashboardLayout.vue
  2. 205
      src/pages/Dashboard.vue
  3. 53
      src/pages/MainSec/OrderTable.vue
  4. 11
      src/pages/RobotSec/index.vue
  5. 127
      src/pages/SignalSender/index.vue
  6. 8
      src/router/routes.js
  7. 6
      src/utils/TimeUtils.js

4
src/layout/dashboard/DashboardLayout.vue

@ -63,6 +63,10 @@
<i class="el-icon-trophy"></i> <i class="el-icon-trophy"></i>
<span slot="title">系统账号</span> <span slot="title">系统账号</span>
</el-menu-item> </el-menu-item>
<el-menu-item index="7" @click="to('/signalSender')">
<i class="el-icon-trophy"></i>
<span slot="title">手动信号</span>
</el-menu-item>
</el-menu> </el-menu>
<!-- <template slot="links"> <!-- <template slot="links">
<span @click="test = !test" class="title">动量现货</span> <span @click="test = !test" class="title">动量现货</span>

205
src/pages/Dashboard.vue

@ -1,28 +1,36 @@
<template> <template>
<div> <div>
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<card type="chart"> <card type="chart">
<template slot="header"> <template slot="header">
<div class="row"> <div class="row">
<div class="col-sm-6" :class="isRTL ? 'text-right' : 'text-left'"> <div class="col-sm-6" :class="isRTL ? 'text-right' : 'text-left'">
<h5 class="card-category">{{$t('dashboard.totalShipments')}}</h5> <h5 class="card-category">
<h2 class="card-title">{{$t('dashboard.performance')}}</h2> {{ $t("dashboard.totalShipments") }}
</h5>
<h2 class="card-title">{{ $t("dashboard.performance") }}</h2>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="btn-group btn-group-toggle" <div
class="btn-group btn-group-toggle"
:class="isRTL ? 'float-left' : 'float-right'" :class="isRTL ? 'float-left' : 'float-right'"
data-toggle="buttons"> data-toggle="buttons"
<label v-for="(option, index) in bigLineChartCategories" >
<label
v-for="(option, index) in bigLineChartCategories"
:key="option" :key="option"
class="btn btn-sm btn-primary btn-simple" class="btn btn-sm btn-primary btn-simple"
:class="{ active: bigLineChart.activeIndex === index }" :class="{ active: bigLineChart.activeIndex === index }"
:id="index"> :id="index"
<input type="radio" >
<input
type="radio"
@click="initBigChart(index)" @click="initBigChart(index)"
name="options" autocomplete="off" name="options"
:checked="bigLineChart.activeIndex === index"> autocomplete="off"
:checked="bigLineChart.activeIndex === index"
/>
{{ option }} {{ option }}
</label> </label>
</div> </div>
@ -30,13 +38,15 @@
</div> </div>
</template> </template>
<div class="chart-area"> <div class="chart-area">
<line-chart style="height: 100%" <line-chart
style="height: 100%"
ref="bigChart" ref="bigChart"
chart-id="big-line-chart" chart-id="big-line-chart"
:chart-data="bigLineChart.chartData" :chart-data="bigLineChart.chartData"
:gradient-colors="bigLineChart.gradientColors" :gradient-colors="bigLineChart.gradientColors"
:gradient-stops="bigLineChart.gradientStops" :gradient-stops="bigLineChart.gradientStops"
:extra-options="bigLineChart.extraOptions"> :extra-options="bigLineChart.extraOptions"
>
</line-chart> </line-chart>
</div> </div>
</card> </card>
@ -46,16 +56,20 @@
<div class="col-lg-4" :class="{ 'text-right': isRTL }"> <div class="col-lg-4" :class="{ 'text-right': isRTL }">
<card type="chart"> <card type="chart">
<template slot="header"> <template slot="header">
<h5 class="card-category">{{$t('dashboard.totalShipments')}}</h5> <h5 class="card-category">{{ $t("dashboard.totalShipments") }}</h5>
<h3 class="card-title"><i class="tim-icons icon-bell-55 text-primary "></i> 763,215</h3> <h3 class="card-title">
<i class="tim-icons icon-bell-55 text-primary "></i> 763,215
</h3>
</template> </template>
<div class="chart-area"> <div class="chart-area">
<line-chart style="height: 100%" <line-chart
style="height: 100%"
chart-id="purple-line-chart" chart-id="purple-line-chart"
:chart-data="purpleLineChart.chartData" :chart-data="purpleLineChart.chartData"
:gradient-colors="purpleLineChart.gradientColors" :gradient-colors="purpleLineChart.gradientColors"
:gradient-stops="purpleLineChart.gradientStops" :gradient-stops="purpleLineChart.gradientStops"
:extra-options="purpleLineChart.extraOptions"> :extra-options="purpleLineChart.extraOptions"
>
</line-chart> </line-chart>
</div> </div>
</card> </card>
@ -63,15 +77,19 @@
<div class="col-lg-4" :class="{ 'text-right': isRTL }"> <div class="col-lg-4" :class="{ 'text-right': isRTL }">
<card type="chart"> <card type="chart">
<template slot="header"> <template slot="header">
<h5 class="card-category">{{$t('dashboard.dailySales')}}</h5> <h5 class="card-category">{{ $t("dashboard.dailySales") }}</h5>
<h3 class="card-title"><i class="tim-icons icon-delivery-fast text-info "></i> 3,500</h3> <h3 class="card-title">
<i class="tim-icons icon-delivery-fast text-info "></i> 3,500
</h3>
</template> </template>
<div class="chart-area"> <div class="chart-area">
<bar-chart style="height: 100%" <bar-chart
style="height: 100%"
chart-id="blue-bar-chart" chart-id="blue-bar-chart"
:chart-data="blueBarChart.chartData" :chart-data="blueBarChart.chartData"
:gradient-stops="blueBarChart.gradientStops" :gradient-stops="blueBarChart.gradientStops"
:extra-options="blueBarChart.extraOptions"> :extra-options="blueBarChart.extraOptions"
>
</bar-chart> </bar-chart>
</div> </div>
</card> </card>
@ -79,15 +97,19 @@
<div class="col-lg-4" :class="{ 'text-right': isRTL }"> <div class="col-lg-4" :class="{ 'text-right': isRTL }">
<card type="chart"> <card type="chart">
<template slot="header"> <template slot="header">
<h5 class="card-category">{{$t('dashboard.completedTasks')}}</h5> <h5 class="card-category">{{ $t("dashboard.completedTasks") }}</h5>
<h3 class="card-title"><i class="tim-icons icon-send text-success "></i> 12,100K</h3> <h3 class="card-title">
<i class="tim-icons icon-send text-success "></i> 12,100K
</h3>
</template> </template>
<div class="chart-area"> <div class="chart-area">
<line-chart style="height: 100%" <line-chart
style="height: 100%"
chart-id="green-line-chart" chart-id="green-line-chart"
:chart-data="greenLineChart.chartData" :chart-data="greenLineChart.chartData"
:gradient-stops="greenLineChart.gradientStops" :gradient-stops="greenLineChart.gradientStops"
:extra-options="greenLineChart.extraOptions"> :extra-options="greenLineChart.extraOptions"
>
</line-chart> </line-chart>
</div> </div>
</card> </card>
@ -97,17 +119,27 @@
<div class="col-lg-6 col-md-12"> <div class="col-lg-6 col-md-12">
<card type="tasks" :header-classes="{ 'text-right': isRTL }"> <card type="tasks" :header-classes="{ 'text-right': isRTL }">
<template slot="header"> <template slot="header">
<h6 class="title d-inline">{{$t('dashboard.tasks', {count: 5})}}</h6> <h6 class="title d-inline">
<p class="card-category d-inline">{{$t('dashboard.today')}}</p> {{ $t("dashboard.tasks", { count: 5 }) }}
<base-dropdown menu-on-right="" </h6>
<p class="card-category d-inline">{{ $t("dashboard.today") }}</p>
<base-dropdown
menu-on-right=""
tag="div" tag="div"
title-classes="btn btn-link btn-icon" title-classes="btn btn-link btn-icon"
aria-label="Settings menu" aria-label="Settings menu"
:class="{'float-left': isRTL}"> :class="{ 'float-left': isRTL }"
>
<i slot="title" class="tim-icons icon-settings-gear-63"></i> <i slot="title" class="tim-icons icon-settings-gear-63"></i>
<a class="dropdown-item" href="#pablo">{{$t('dashboard.dropdown.action')}}</a> <a class="dropdown-item" href="#pablo">{{
<a class="dropdown-item" href="#pablo">{{$t('dashboard.dropdown.anotherAction')}}</a> $t("dashboard.dropdown.action")
<a class="dropdown-item" href="#pablo">{{$t('dashboard.dropdown.somethingElse')}}</a> }}</a>
<a class="dropdown-item" href="#pablo">{{
$t("dashboard.dropdown.anotherAction")
}}</a>
<a class="dropdown-item" href="#pablo">{{
$t("dashboard.dropdown.somethingElse")
}}</a>
</base-dropdown> </base-dropdown>
</template> </template>
<div class="table-full-width table-responsive"> <div class="table-full-width table-responsive">
@ -117,7 +149,9 @@
</div> </div>
<div class="col-lg-6 col-md-12"> <div class="col-lg-6 col-md-12">
<card class="card" :header-classes="{ 'text-right': isRTL }"> <card class="card" :header-classes="{ 'text-right': isRTL }">
<h4 slot="header" class="card-title">{{$t('dashboard.simpleTable')}}</h4> <h4 slot="header" class="card-title">
{{ $t("dashboard.simpleTable") }}
</h4>
<div class="table-responsive"> <div class="table-responsive">
<user-table></user-table> <user-table></user-table>
</div> </div>
@ -127,12 +161,12 @@
</div> </div>
</template> </template>
<script> <script>
import LineChart from '@/components/Charts/LineChart'; import LineChart from "@/components/Charts/LineChart";
import BarChart from '@/components/Charts/BarChart'; import BarChart from "@/components/Charts/BarChart";
import * as chartConfigs from '@/components/Charts/config'; import * as chartConfigs from "@/components/Charts/config";
import TaskList from './Dashboard/TaskList'; import TaskList from "./Dashboard/TaskList";
import UserTable from './Dashboard/UserTable'; import UserTable from "./Dashboard/UserTable";
import config from '@/config'; import config from "@/config";
export default { export default {
components: { components: {
@ -152,7 +186,20 @@
activeIndex: 0, activeIndex: 0,
chartData: { chartData: {
datasets: [{}], datasets: [{}],
labels: ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC'], labels: [
"JAN",
"FEB",
"MAR",
"APR",
"MAY",
"JUN",
"JUL",
"AUG",
"SEP",
"OCT",
"NOV",
"DEC"
]
}, },
extraOptions: chartConfigs.purpleChartOptions, extraOptions: chartConfigs.purpleChartOptions,
gradientColors: config.colors.primaryGradient, gradientColors: config.colors.primaryGradient,
@ -162,8 +209,9 @@
purpleLineChart: { purpleLineChart: {
extraOptions: chartConfigs.purpleChartOptions, extraOptions: chartConfigs.purpleChartOptions,
chartData: { chartData: {
labels: ['JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC'], labels: ["JUL", "AUG", "SEP", "OCT", "NOV", "DEC"],
datasets: [{ datasets: [
{
label: "Data", label: "Data",
fill: true, fill: true,
borderColor: config.colors.primary, borderColor: config.colors.primary,
@ -171,23 +219,25 @@
borderDash: [], borderDash: [],
borderDashOffset: 0.0, borderDashOffset: 0.0,
pointBackgroundColor: config.colors.primary, pointBackgroundColor: config.colors.primary,
pointBorderColor: 'rgba(255,255,255,0)', pointBorderColor: "rgba(255,255,255,0)",
pointHoverBackgroundColor: config.colors.primary, pointHoverBackgroundColor: config.colors.primary,
pointBorderWidth: 20, pointBorderWidth: 20,
pointHoverRadius: 4, pointHoverRadius: 4,
pointHoverBorderWidth: 15, pointHoverBorderWidth: 15,
pointRadius: 4, pointRadius: 4,
data: [80, 100, 70, 80, 120, 80], data: [80, 100, 70, 80, 120, 80]
}] }
]
}, },
gradientColors: config.colors.primaryGradient, gradientColors: config.colors.primaryGradient,
gradientStops: [1, 0.2, 0], gradientStops: [1, 0.2, 0]
}, },
greenLineChart: { greenLineChart: {
extraOptions: chartConfigs.greenChartOptions, extraOptions: chartConfigs.greenChartOptions,
chartData: { chartData: {
labels: ['JUL', 'AUG', 'SEP', 'OCT', 'NOV'], labels: ["JUL", "AUG", "SEP", "OCT", "NOV"],
datasets: [{ datasets: [
{
label: "My First dataset", label: "My First dataset",
fill: true, fill: true,
borderColor: config.colors.danger, borderColor: config.colors.danger,
@ -195,36 +245,43 @@
borderDash: [], borderDash: [],
borderDashOffset: 0.0, borderDashOffset: 0.0,
pointBackgroundColor: config.colors.danger, pointBackgroundColor: config.colors.danger,
pointBorderColor: 'rgba(255,255,255,0)', pointBorderColor: "rgba(255,255,255,0)",
pointHoverBackgroundColor: config.colors.danger, pointHoverBackgroundColor: config.colors.danger,
pointBorderWidth: 20, pointBorderWidth: 20,
pointHoverRadius: 4, pointHoverRadius: 4,
pointHoverBorderWidth: 15, pointHoverBorderWidth: 15,
pointRadius: 4, pointRadius: 4,
data: [90, 27, 60, 12, 80], data: [90, 27, 60, 12, 80]
}] }
]
}, },
gradientColors: ['rgba(66,134,121,0.15)', 'rgba(66,134,121,0.0)', 'rgba(66,134,121,0)'], gradientColors: [
gradientStops: [1, 0.4, 0], "rgba(66,134,121,0.15)",
"rgba(66,134,121,0.0)",
"rgba(66,134,121,0)"
],
gradientStops: [1, 0.4, 0]
}, },
blueBarChart: { blueBarChart: {
extraOptions: chartConfigs.barChartOptions, extraOptions: chartConfigs.barChartOptions,
chartData: { chartData: {
labels: ['USA', 'GER', 'AUS', 'UK', 'RO', 'BR'], labels: ["USA", "GER", "AUS", "UK", "RO", "BR"],
datasets: [{ datasets: [
{
label: "Countries", label: "Countries",
fill: true, fill: true,
borderColor: config.colors.info, borderColor: config.colors.info,
borderWidth: 2, borderWidth: 2,
borderDash: [], borderDash: [],
borderDashOffset: 0.0, borderDashOffset: 0.0,
data: [53, 20, 10, 80, 100, 45], data: [53, 20, 10, 80, 100, 45]
}] }
]
}, },
gradientColors: config.colors.primaryGradient, gradientColors: config.colors.primaryGradient,
gradientStops: [1, 0.4, 0], gradientStops: [1, 0.4, 0]
}
} }
};
}, },
computed: { computed: {
enableRTL() { enableRTL() {
@ -234,29 +291,44 @@
return this.$rtl.isRTL; return this.$rtl.isRTL;
}, },
bigLineChartCategories() { bigLineChartCategories() {
return this.$t('dashboard.chartCategories'); return this.$t("dashboard.chartCategories");
} }
}, },
methods: { methods: {
initBigChart(index) { initBigChart(index) {
let chartData = { let chartData = {
datasets: [{ datasets: [
{
fill: true, fill: true,
borderColor: config.colors.primary, borderColor: config.colors.primary,
borderWidth: 2, borderWidth: 2,
borderDash: [], borderDash: [],
borderDashOffset: 0.0, borderDashOffset: 0.0,
pointBackgroundColor: config.colors.primary, pointBackgroundColor: config.colors.primary,
pointBorderColor: 'rgba(255,255,255,0)', pointBorderColor: "rgba(255,255,255,0)",
pointHoverBackgroundColor: config.colors.primary, pointHoverBackgroundColor: config.colors.primary,
pointBorderWidth: 20, pointBorderWidth: 20,
pointHoverRadius: 4, pointHoverRadius: 4,
pointHoverBorderWidth: 15, pointHoverBorderWidth: 15,
pointRadius: 4, pointRadius: 4,
data: this.bigLineChart.allData[index] data: this.bigLineChart.allData[index]
}],
labels: ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC'],
} }
],
labels: [
"JAN",
"FEB",
"MAR",
"APR",
"MAY",
"JUN",
"JUL",
"AUG",
"SEP",
"OCT",
"NOV",
"DEC"
]
};
this.$refs.bigChart.updateGradients(chartData); this.$refs.bigChart.updateGradients(chartData);
this.bigLineChart.chartData = chartData; this.bigLineChart.chartData = chartData;
this.bigLineChart.activeIndex = index; this.bigLineChart.activeIndex = index;
@ -265,18 +337,17 @@
mounted() { mounted() {
this.i18n = this.$i18n; this.i18n = this.$i18n;
if (this.enableRTL) { if (this.enableRTL) {
this.i18n.locale = 'ar'; this.i18n.locale = "ar";
this.$rtl.enableRTL(); this.$rtl.enableRTL();
} }
this.initBigChart(0); this.initBigChart(0);
}, },
beforeDestroy() { beforeDestroy() {
if (this.$rtl.isRTL) { if (this.$rtl.isRTL) {
this.i18n.locale = 'en'; this.i18n.locale = "en";
this.$rtl.disableRTL(); this.$rtl.disableRTL();
} }
} }
}; };
</script> </script>
<style> <style></style>
</style>

53
src/pages/MainSec/OrderTable.vue

@ -102,6 +102,15 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination
small
:hide-on-single-page="true"
layout="prev, pager, next"
:total="historyOrdersPagination.total"
:page-size="historyOrdersPagination.pageSize"
:current-page="historyOrdersPagination.current"
>
</el-pagination>
</div> </div>
</template> </template>
<script> <script>
@ -113,14 +122,48 @@ export default {
data() { data() {
return { return {
columns: secondTradeColumns, columns: secondTradeColumns,
data: [] data: [],
historyOrdersPagination: { current: 1, pageSize: 15 }
}; };
}, },
mounted() { mounted() {},
this.init();
},
methods: { methods: {
init() {} initOrders() {
this.initHistoryOrders();
this.initNowOrders();
},
initHistoryOrders() {
let pageIndex = this.historyOrdersPagination.current;
let pageSize = this.historyOrdersPagination.pageSize;
this.$http
.get(
`/Api/Order/GetHistorySpotGoodsOrder?pageIndex=${pageIndex}&pageSize=${pageSize}&robotId=${this.RobotId}`
)
.then(res => {
if (res.Code == 200) {
this.historyOrders = res.Data.List;
const pager = { ...this.historyOrdersPagination };
pager.total = res.Data.Count;
this.historyOrdersPagination = pager;
}
});
},
//
historyOrdersChange(pagination) {
this.historyOrdersPagination = pagination;
this.initHistoryOrders();
},
initNowOrders() {
this.$http
.get(`/Api/Order/GetRuningSpotGoodsOrder?robotId=${this.RobotId}`)
.then(res => {
if (res.Code == 200) {
this.nowOrders = res.Data;
}
});
}
} }
}; };
</script> </script>

11
src/pages/RobotSec/index.vue

@ -36,8 +36,8 @@
</el-switch> </el-switch>
</template> </template>
<!-- 运行时长 --> <!-- 运行时长 -->
<template slot="WorkTime" slot-scope="item" v-if="item.row.item.Time">{{ <template slot="WorkTime" slot-scope="item" v-if="item.row.item.Robot">{{
secToMin(item.row.item.Time) secToMin(item.row.item.Robot.RunningTime)
}}</template> }}</template>
<!-- 策略配置 --> <!-- 策略配置 -->
<template <template
@ -88,7 +88,7 @@
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<base-button @click="goCheck(item.row.item.Id)">查看</base-button> <base-button @click="goCheck(item.row.item.Robot.Id)">查看</base-button>
</div> </div>
</div> </div>
</template> </template>
@ -132,7 +132,7 @@ const tableColumns = [
customSlot: "WorkTime" customSlot: "WorkTime"
}, },
{ name: "策略配置", prop: "Robot.SaleSetting", customSlot: "Setting" }, { name: "策略配置", prop: "Robot.SaleSetting", customSlot: "Setting" },
{ name: "委托单", prop: "Robot.SaleSetting", customSlot: "OrderPlan" }, // { name: "", prop: "Robot.SaleSetting", customSlot: "OrderPlan" },
{ name: "操作", prop: "Action", customSlot: "Action" } { name: "操作", prop: "Action", customSlot: "Action" }
]; ];
@ -239,7 +239,8 @@ export default {
goCheck(id) { goCheck(id) {
this.$router.push(`/editt/${id}`); this.$router.push(`/editt/${id}`);
}, // showNotification },
// showNotification
sMessage(type, message) { sMessage(type, message) {
this.$notify({ this.$notify({
type: type, type: type,

127
src/pages/SignalSender/index.vue

@ -0,0 +1,127 @@
<template>
<card>
<!-- 关联交易对 -->
<div>
<p class="form-label" style="color:rgba(255, 255, 255, 0.6)">
交易对
</p>
<el-select
class="select-danger"
placeholder="选择交易对"
style="width:100%"
v-model="form.Symbol"
>
<el-option
v-for="item in allSymbol"
class="select-danger"
:value="item.Symbol"
:label="item.Symbol"
:key="item.Symbol"
>
</el-option>
</el-select>
</div>
<!-- 信号类型 -->
<div>
<p class="form-label" style="color:rgba(255, 255, 255, 0.6)">
信号类型
</p>
<el-select
class="select-danger"
placeholder="选择信号类型"
style="width:100%"
v-model="form.NotifyType"
>
<el-option
v-for="item in LogTypes"
class="select-danger"
:value="item.value"
:label="item.title"
:key="item.value"
>
</el-option>
</el-select>
</div>
<!-- 周期 -->
<div>
<p class="form-label" style="color:rgba(255, 255, 255, 0.6)">
周期
</p>
<el-select
class="select-danger"
placeholder="选择周期"
style="width:100%"
v-model="form.KLinePeriodic"
>
<el-option
v-for="item in periodSignal"
class="select-danger"
:value="item.value"
:label="item.title"
:key="item.value"
>
</el-option>
</el-select>
</div>
<base-checkbox inline v-model="form.IsDebug">
isDebug
</base-checkbox>
<base-input
label="请输入收盘价"
v-model="form.ClosePrice"
v-if="form.IsDebug"
></base-input>
<div>
<base-button @click="sendSignal" :loading="loading">发送信号</base-button>
</div>
</card>
</template>
<script>
import { LogTypes, periodSignal } from "../prePages/js/selectoptions";
export default {
data() {
return {
form: { IsDebug: false },
allSymbol: [],
LogTypes,
loading: false,
periodSignal
};
},
created() {
this.getAllSymbol();
},
methods: {
//
getAllSymbol() {
this.$http.get("/Api/Symbol/GetList").then(res => {
if (res.Code == 200) {
this.allSymbol = res.Data;
}
});
},
sendSignal() {
let params = this.form;
if (!this.form.IsDebug) delete params.ClosePrice;
console.log(params);
this.loading = true;
this.$http.post("/Api/Signal/ReceiveSignal", params).then(res => {
this.loading = false;
if (res.Code == 200) {
this.sMessage("success", "发送成功");
} else {
this.sMessage("danger", res.Message);
}
});
},
// showNotification
sMessage(type, message) {
this.$notify({
type: type,
message,
timeout: 1800
});
}
}
};
</script>

8
src/router/routes.js

@ -21,6 +21,7 @@ const RobotSec = () => import("@/pages/RobotSec");
const AccountSec = () => import("@/pages/RobotSec/Account"); const AccountSec = () => import("@/pages/RobotSec/Account");
const MainSec = () => import("@/pages/MainSec"); const MainSec = () => import("@/pages/MainSec");
const MainAccount = () => import("@/pages/MainAccount"); const MainAccount = () => import("@/pages/MainAccount");
const SignalSender = () => import("@/pages/SignalSender");
const routes = [ const routes = [
{ {
@ -93,8 +94,13 @@ const routes = [
name: "mainAccount", name: "mainAccount",
meta: { auth: true }, meta: { auth: true },
component: MainAccount component: MainAccount
},
{
path: "signalSender",
name: "signalSender",
meta: { auth: true },
component: SignalSender
} }
// { // {
// path: "profile", // path: "profile",
// name: "profile", // name: "profile",

6
src/utils/TimeUtils.js

@ -1,4 +1,4 @@
export const secToMin = (s) => { export const secToMin = s => {
let min = Math.floor(s / 60); let min = Math.floor(s / 60);
let _min = min % 60; let _min = min % 60;
let hour = Math.floor(min / 60); let hour = Math.floor(min / 60);
@ -8,8 +8,6 @@ export const secToMin = (s) => {
return ( return (
(day == 0 ? "" : `${day}`) + (day == 0 ? "" : `${day}`) +
(hour == 0 ? "" : `${_hour}`) + (hour == 0 ? "" : `${_hour}`) +
(min == 0 ? "" : `${_min}`) + (min == 0 ? "" : `${_min}`)
sec +
"秒"
); );
}; };

Loading…
Cancel
Save