| | |
| | | <script> |
| | | import AvatarDropdown from './AvatarDropdown' |
| | | import SelectLang from '@/components/SelectLang' |
| | | import { adminlist } from '@/api/managesettings' |
| | | |
| | | import { agentgetAgentInfo } from '@/api/home' |
| | | export default { |
| | | name: 'RightContent', |
| | | components: { |
| | |
| | | } |
| | | }, |
| | | mounted () { |
| | | this.getnowuser() |
| | | this.getAgentInfo() |
| | | }, |
| | | methods: { |
| | | getnowuser () { |
| | | adminlist().then(res => { |
| | | var index = res.data.list.findIndex(item => item.adminPhone == window.localStorage.getItem('phones')) |
| | | setTimeout(() => { |
| | | this.currentUser = { |
| | | name: res.data.list[index].adminName |
| | | } |
| | | }, 1500) |
| | | // 获取代理信息 |
| | | getAgentInfo () { |
| | | agentgetAgentInfo().then(res => { |
| | | if (res.status == 0) { |
| | | setTimeout(() => { |
| | | this.currentUser = { |
| | | name: res.data.agentName |
| | | } |
| | | }, 1500) |
| | | } else { |
| | | setTimeout(() => { |
| | | this.currentUser = { |
| | | name: '代理' |
| | | } |
| | | }, 1500) |
| | | } |
| | | }) |
| | | } |
| | | } |