| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384 |
- <!--
- * @Description: In User Settings Edit
- * @Author: your name
- * @Date: 2019-09-29 17:50:59
- * @LastEditTime: 2019-09-29 18:32:16
- * @LastEditors: Please set LastEditors
- -->
- <template>
- <div>
- <div class="headerB-top">
- <div class="middle row">
- <div class="row item-center headerB-top-left">
- <h1 class="row headerB-title">
- <p style="color:#F76649;">HX</p>
- <span style="color:#FFFFFF">669</span>
- </h1>
- <ul class="row headerB-nav">
- <!-- <li
- v-for="(item,index) in List"
- :key="index"
- style="margin-left:.3rem"
- class="row item-center"
- :class="num==index?'active':''"
- @click="listActive(index)"
- >{{item.title}}</li> -->
- <li style="margin-left:.3rem"
- class="row item-center"
- :class="num==index?'active':''"
- @click="listActive(index)">
- 体育赛事
- </li>
- </ul>
- </div>
- </div>
- </div>
- <game-result></game-result>
-
- <div style="background:linear-gradient(180deg,rgba(153,153,153,1) 0%,rgba(86,86,86,1) 100%);">
- <div class="middle bottomB row center">HX669属于HX669有限公司注册 版权所有©2019</div>
- </div>
- </div>
- </template>
- <script>
- // import abstract from "@/components/abstract";
- import unitary from "@/components/unitary";
- import tandem from "@/components/tandem";
- import settlementBetting from "@/components/settlementBetting";
- import noSettlementBetting from "@/components/noSettlementBetting";
- import deposit from "@/components/deposit";
- import withdrawals from "@/components/withdrawals";
- import profit from "@/components/profit";
- import loss from "@/components/loss";
- import "@/css/index.css";
- import GameResult from '@/pages/home/GameResult'
- export default {
- name: "PersonalCenter",
- data() {
- return {
- user: {
- // 用户信息
- userName: "",
- balance: 0
- },
- userData: "", //用户信息 (轮询)
- img: {
- user: require("@/assets/st-imges/user.png"),
- userHover: require("@/assets/st-imges/user-hover.png"),
- wallet: require("@/assets/st-imges/wallet.png"),
- walletHover: require("@/assets/st-imges/wallet-hover.png"),
- eaml: require("@/assets/st-imges/emal.png"),
- eamlHover: require("@/assets/st-imges/emal-hover.png")
- },
- timers: true,
- List: [
- // 头部导航列表
- {
- title: "体育赛事",
- num: 0
- },
- {
- title: "优惠",
- num: 1
- },
- {
- title: "手机版",
- num: 2
- }
- ],
- imgNum: 0,
- num: 0, //头部导航激活样式
- switcChcomponents: "unitary", //组件开关
- leftData: [
- //左侧数据 写死
- {
- title: "投注记录",
- list: [
- // {
- // title: "全部注单",
- // isTrue: false,
- // code: "allBetting"
- // },
- {
- title: "单式注单",
- isTrue: true,
- code: "unitary"
- },
- {
- title: "串式注单",
- isTrue: false,
- code: "tandem"
- },
- {
- title: "已结算注单",
- isTrue: false,
- code: "settlementBetting"
- },
- {
- title: "未结算注单",
- isTrue: false,
- code: "noSettlementBetting"
- }
- ]
- },
- {
- title: "交易记录",
- list: [
- {
- title: "存款",
- isTrue: false,
- code: "deposit"
- },
- {
- title: "取款",
- isTrue: false,
- code: "withdrawals"
- }
- ]
- },
- {
- title: "盈亏记录",
- list: [
- {
- title: "盈利",
- isTrue: false,
- code: "profit"
- },
- {
- title: "亏损",
- isTrue: false,
- code: "loss"
- }
- ]
- }
- ]
- };
- },
- methods: {
- //退出登录
- escLogin() {
- this.$http
- .get(this.$ports.login.loginOut, {
- token: localStorage.getItem("token")
- })
- .then(res => {
- if (res.data.msg == "成功") {
- this.$dialog.toast({ mes: "退出登录成功", timeout: 2000 });
- localStorage.setItem("token", "");
- localStorage.setItem("name", "");
- localStorage.setItem("balance", "");
- this.$router.push("/");
- } else {
- this.$dialog.toast({ mes: "退出登录失败", timeout: 2000 });
- }
- });
- },
- // 导航
- PersonalCenterTo() {
- this.$router.push("/");
- },
-
- // 获取个人中心用户信息
- getUserData() {
- this.$http
- .post(this.$ports.login.getAgent, {
- token: localStorage.getItem("token")
- })
- .then(res => {
- if (res.data.data) {
- this.userData = res.data.data;
- this.userIsLogin = true;
- this.user.userName = res.data.data.name;
- this.user.balance = res.data.data.cash;
- } else {
- this.timers = false;
- this.userIsLogin = false;
- this.user.userName = "";
- this.user.balance = "";
- localStorage.setItem("token", "");
- this.$router.push('/')
- }
- });
- },
- listActive(index) {
- this.num = index;
- },
- imgMT(index) {
- this.imgNum = index;
- },
- imgOUT() {
- this.imgNum = 0;
- },
- },
- computed: {
- Switch() {
- return this.switcChcomponents;
- }
- // getUserIsLogin() {
- // if (localStorage.getItem("token")) {
- // let userInfo = JSON.parse(localStorage.getItem("user"));
- // // this.userIsLogin = true;
- // // this.user.userName = userInfo[0].name;
- // // this.user.balance = userInfo[0].cash;
- // }
- // }
- },
- watch: {
- Switch() {}
- // getUserIsLogin() {}
- },
- components: {
- GameResult
- }
- };
- </script>
- <style scoped>
- .headerB-top {
- height: 1rem;
- background: linear-gradient(
- 180deg,
- rgba(153, 153, 153, 1) 0%,
- rgba(86, 86, 86, 1) 100%
- );
- }
- .headerB-title {
- font-size: 0.42rem;
- margin-left: 0.3rem;
- }
- .headerB-nav {
- font-size: 0.24rem;
- height: 100%;
- color: #fff;
- }
- .headerB-nav li {
- height: 100%;
- }
- .headerB-nav li.active {
- font-weight: bold;
- position: relative;
- }
- .headerB-login {
- height: 100%;
- }
- .headerB-login div {
- height: 0.4rem;
- }
- .headerB-login div input {
- width: 2rem;
- height: 100%;
- border: none;
- background: #eeeeee;
- color: #999;
- font-size: 0.16rem;
- padding-left: 0.2rem;
- }
- .headerB-login-pwd {
- width: 3rem;
- margin-left: 0.1rem;
- position: relative;
- }
- .headerB-login-pwd span {
- font-size: 0.16rem;
- color: #999;
- position: absolute;
- left: 1.2rem;
- top: 0.1rem;
- }
- .headerB-login-txt {
- width: 1rem;
- background: #f76649;
- color: #ffffff;
- font-size: 0.18rem;
- }
- .headerB-top-left {
- width: 55%;
- }
- .loginTo div {
- height: 100%;
- /* font-size: 0.18rem; */
- color: #fff;
- }
- .headerB-userCode {
- margin-left: 1.25rem;
- }
- .headerB-img img {
- width: 0.3rem;
- height: 0.3rem;
- margin-left: 0.2rem;
- }
- .headerB-img {
- margin-left: 0.5rem;
- }
- .bottomB {
- color: #ccc;
- height: 1.5rem;
- font-size: 0.14rem;
- }
- .userIcon {
- display: none;
- }
- .userIcon > div {
- width: 50%;
- }
- .headerB-img > div:hover .userIcon {
- display: flex;
- padding: 0.1rem;
- width: 1.3rem;
- /* padding: 0.1rem 0.2rem; */
- height: 1rem;
- line-height: 0.4rem;
- font-size: 0.14rem;
- position: absolute;
- left: -0.3rem;
- border-radius: 0.05rem;
- z-index: 999;
- bottom: -0.8rem;
- background: rgba(85, 85, 85, 0.9);
- box-shadow: -2px 0px 5px 1px rgba(0, 0, 0, 0.1),
- 0px -2px 5px 1px rgba(0, 0, 0, 0.1), 2px 0px 5px 1px rgba(0, 0, 0, 0.1),
- 0px 2px 5px 1px rgba(0, 0, 0, 0.1);
- }
- .headerB-img > div {
- position: relative;
- }
- .main-left {
- width: 2.8rem;
- background: #ccc;
- }
- .main-left p,
- .main-left li {
- line-height: 0.4rem;
- font-size: 0.14rem;
- color: #555;
- }
- .main-left p {
- background: #fff;
- padding: 0 0.2rem;
- border-bottom: 0.01rem solid #ccc;
- }
- .main-left li {
- background: #ddd;
- border-bottom: 0.01rem solid #ccc;
- padding: 0 0.3rem;
- }
- .main-left li:hover {
- background: #bbb;
- color: #f76649;
- }
- .main-left li.active {
- color: #fff;
- background: #aaa;
- border-left: 0.05rem solid #f76649;
- }
- .main-right {
- width: 76%;
- margin: 0.2rem 0 0 0.2rem;
- }
- </style>
|