角色切换,页面改造

master
CherrysChang 4 years ago
parent 19b23b63f7
commit 4fd6b74d55
  1. 24
      src/components/common/header.vue
  2. 31
      src/components/common/market-header.vue
  3. 9
      src/pages/market-announce.vue
  4. 68
      src/pages/market-order.vue

@ -184,7 +184,7 @@
</el-dropdown> </el-dropdown>
</li> </li>
<!-- 角色切换--> <!-- 角色切换-->
<li class="menu-item"> <li class="menu-item" v-if="userData != '' && userData != undefined">
<el-dropdown <el-dropdown
@command="switchRole" @command="switchRole"
trigger="click" trigger="click"
@ -192,7 +192,7 @@
> >
<span class="dropdown-link"> <span class="dropdown-link">
<span> <span>
交易用户 {{ menuRole.current.name }}
</span> </span>
<i class="el-icon-arrow-down el-icon--right"></i> <i class="el-icon-arrow-down el-icon--right"></i>
</span> </span>
@ -354,15 +354,15 @@ export default {
let yyyfToken = localStorage.getItem('yyyfToken'); let yyyfToken = localStorage.getItem('yyyfToken');
this.isSubmit = localStorage.getItem('isSubmit') == 'true' ? true : false; this.isSubmit = localStorage.getItem('isSubmit') == 'true' ? true : false;
if (yyyfToken == '' || yyyfToken == undefined) { if (yyyfToken == '' || yyyfToken == undefined) {
// this.$alert('', '', { this.$alert('未从以渔有方登录,点击确定返回登录', '提示', {
// type: 'error', type: 'error',
// showClose: false, showClose: false,
// confirmButtonText: '', confirmButtonText: '确定',
// confirmButtonClass: 'btn-self-style', confirmButtonClass: 'btn-self-style',
// callback: () => { callback: () => {
// window.location.href = yyyfUrl; window.location.href = yyyfUrl;
// }, },
// }); });
} else { } else {
// //
this.reqType = localStorage.getItem('reqType'); this.reqType = localStorage.getItem('reqType');
@ -537,7 +537,7 @@ export default {
if (!command) { if (!command) {
return; return;
} }
location.href = '/market-announce?perUrl=' + this.perUrl; location.href = '/market-announce';
}, },
exit(params) { exit(params) {
logOut().then(res => { logOut().then(res => {

@ -43,7 +43,7 @@
> >
<span class="dropdown-link"> <span class="dropdown-link">
<span> <span>
交易用户 {{ menuRole.current.name }}
</span> </span>
<i class="el-icon-arrow-down el-icon--right"></i> <i class="el-icon-arrow-down el-icon--right"></i>
</span> </span>
@ -78,9 +78,7 @@
<script> <script>
import {getCurrentLanguage} from '@/common/i18n'; import {getCurrentLanguage} from '@/common/i18n';
import {getExchangeRateCookie, setExchangeRateCookie} from '@/utils/auth'; import {getExchangeRateCookie, setExchangeRateCookie} from '@/utils/auth';
import {logOut} from '@/api/user';
import {FILE_URL} from '@/api/app'; import {FILE_URL} from '@/api/app';
import {submit, reStart} from '@/api/yyyf';
import {signUp, signIn} from '@/api/user'; import {signUp, signIn} from '@/api/user';
import {yyyfUrl} from '@/api/app.js'; import {yyyfUrl} from '@/api/app.js';
@ -113,7 +111,7 @@ export default {
menuLeft: Menu.left, menuLeft: Menu.left,
menuRight: Menu.right, menuRight: Menu.right,
menuRole: { menuRole: {
current: {id: 'tradeUser', name: '交易用户'}, current: {id: 'marketMaker', name: '做市商'},
list: [ list: [
{id: 'tradeUser', name: '交易用户'}, {id: 'tradeUser', name: '交易用户'},
{id: 'marketMaker', name: '做市商'}, {id: 'marketMaker', name: '做市商'},
@ -121,7 +119,7 @@ export default {
}, },
userData: '', userData: '',
headerImg: '', headerImg: '',
perUrl: 'personal', perUrl: 'market-announce',
file: '', file: '',
showCounting: true, showCounting: true,
//0 1 2 //0 1 2
@ -141,15 +139,15 @@ export default {
let yyyfToken = localStorage.getItem('yyyfToken'); let yyyfToken = localStorage.getItem('yyyfToken');
this.isSubmit = localStorage.getItem('isSubmit') == 'true' ? true : false; this.isSubmit = localStorage.getItem('isSubmit') == 'true' ? true : false;
if (yyyfToken == '' || yyyfToken == undefined) { if (yyyfToken == '' || yyyfToken == undefined) {
// this.$alert('', '', { this.$alert('未从以渔有方登录,点击确定返回登录', '提示', {
// type: 'error', type: 'error',
// showClose: false, showClose: false,
// confirmButtonText: '', confirmButtonText: '确定',
// confirmButtonClass: 'btn-self-style', confirmButtonClass: 'btn-self-style',
// callback: () => { callback: () => {
// window.location.href = yyyfUrl; window.location.href = yyyfUrl;
// }, },
// }); });
} else { } else {
// //
this.reqType = localStorage.getItem('reqType'); this.reqType = localStorage.getItem('reqType');
@ -162,7 +160,6 @@ export default {
} }
this.file = FILE_URL; this.file = FILE_URL;
this.perUrl = window.location.pathname.split('/')[1]; this.perUrl = window.location.pathname.split('/')[1];
// console.log(this.perUrl);
// this.userData = Cookie.get('userData'); // this.userData = Cookie.get('userData');
this.userData = localStorage.getItem('userData'); this.userData = localStorage.getItem('userData');
@ -348,7 +345,7 @@ export default {
} }
.menu-item { .menu-item {
margin-right: 3%; margin-right: 6%;
} }
} }
@ -378,7 +375,7 @@ export default {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
height: 100%; height: 100%;
justify-content: space-between; justify-content: flex-start;
.menu-item { .menu-item {
display: flex; display: flex;

@ -5,7 +5,7 @@
<!-- OTC一级标题 --> <!-- OTC一级标题 -->
<ul class="exchange-menu"> <ul class="exchange-menu">
<!-- 购买 --> <!-- 购买 -->
<li class="mensu-item"> <!--<li class="mensu-item">
<a <a
:class="showCommentInput === true ? 'buyTwo' : 'buy'" :class="showCommentInput === true ? 'buyTwo' : 'buy'"
@click="hangdelClickShow()" @click="hangdelClickShow()"
@ -14,7 +14,7 @@
</li> </li>
<li class="mensu-item"> <li class="mensu-item">
<div class="line"></div> <div class="line"></div>
</li> </li>-->
<!-- 出售 --> <!-- 出售 -->
<li class="mensu-item"> <li class="mensu-item">
<a <a
@ -42,7 +42,6 @@
</template> </template>
<script> <script>
// //
import NavHeader from '@/components/common/header';
import Footer from '@/components/common/footer'; import Footer from '@/components/common/footer';
import AnnounceTableBi from '@/components/announce/announce-tabgle-bi'; import AnnounceTableBi from '@/components/announce/announce-tabgle-bi';
import AnnounceTableSell from '@/components/announce/announce-table-sell'; import AnnounceTableSell from '@/components/announce/announce-table-sell';
@ -58,8 +57,8 @@ export default {
}, },
data() { data() {
return { return {
showCommentInput: true, // showCommentInput: false, //
ifCommentInput: false, // ifCommentInput: true, //
hackReset: true, hackReset: true,
hackResetBuy: true, hackResetBuy: true,
}; };

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<NavHeader></NavHeader> <market-header></market-header>
<main class="main-coins"> <main class="main-coins">
<!-- 广告管理 --> <!-- 广告管理 -->
<OrderOtcAdver></OrderOtcAdver> <OrderOtcAdver></OrderOtcAdver>
@ -12,15 +12,15 @@
</template> </template>
<script> <script>
// //
import NavHeader from '@/components/common/header';
import Footer from '@/components/common/footer'; import Footer from '@/components/common/footer';
import OrderOtcAdver from '@/components/order/order-otc-adver'; import OrderOtcAdver from '@/components/order/order-otc-adver';
import OrderOtcGoods from '@/components/order/order-otc-goods'; import OrderOtcGoods from '@/components/order/order-otc-goods';
import MarketHeader from '@/components/common/market-header';
export default { export default {
name: 'market-order', name: 'market-order',
components: { components: {
NavHeader, MarketHeader,
Footer, Footer,
OrderOtcAdver, OrderOtcAdver,
OrderOtcGoods, OrderOtcGoods,
@ -38,66 +38,4 @@ export default {
margin: 0 auto; margin: 0 auto;
margin-top: 40px; margin-top: 40px;
} }
// .main-adver {
// // margin-top: 18px;
// display: flex;
// flex-direction: row;
// .adver-select {
// margin-right: 48px;
// .biZhon {
// width: 36px;
// height: 27px;
// color: #333;
// font-size: 18px;
// text-align: left;
// padding-right: 18px;
// }
// }
// }
// .action {
// width: 110px;
// height: 35px;
// font-size: 16px;
// text-align: center;
// padding-left: 208px;
// margin: auto;
// .btn-widget {
// background-color: #c7282c;
// width: 110px;
// border: 2px solid #c7282c;
// color: #fff;
// &:active {
// background: #9f2023;
// border: 2px solid #9f2023;
// opacity: 1;
// color: #ba8889;
// }
// }
// }
// .bian {
// margin-top: 40px;
// }
// .el-table th {
// height: 60px;
// }
// .el-table thead {
// color: #333;
// }
// .tableimg {
// margin-right: 21px;
// }
// .deldet {
// cursor: pointer;
// color: #c7282c;
// }
// .el-select-dropdown__item.selected {
// color: #c7282c;
// font-weight: bold;
// }
// .orderTittle {
// color: #333;
// font-size: 23px;
// margin-top: 30px;
// margin-bottom: 5px;
// }
</style> </style>

Loading…
Cancel
Save