fac7e64528e6dc7cf3adde31b4fe3e5bc4769ea8.svn-base 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  1. <!--
  2. * @Description: In User Settings Edit
  3. * @Author: your name
  4. * @Date: 2019-09-29 17:50:59
  5. * @LastEditTime: 2019-09-29 18:32:16
  6. * @LastEditors: Please set LastEditors
  7. -->
  8. <template>
  9. <div>
  10. <div class="headerB-top">
  11. <div class="middle row">
  12. <div class="row item-center headerB-top-left">
  13. <h1 class="row headerB-title">
  14. <p style="color:#F76649;">HX</p>
  15. <span style="color:#FFFFFF">669</span>
  16. </h1>
  17. <ul class="row headerB-nav">
  18. <!-- <li
  19. v-for="(item,index) in List"
  20. :key="index"
  21. style="margin-left:.3rem"
  22. class="row item-center"
  23. :class="num==index?'active':''"
  24. @click="listActive(index)"
  25. >{{item.title}}</li> -->
  26. <li style="margin-left:.3rem"
  27. class="row item-center"
  28. :class="num==index?'active':''"
  29. @click="listActive(index)">
  30. 体育赛事
  31. </li>
  32. </ul>
  33. </div>
  34. </div>
  35. </div>
  36. <game-result></game-result>
  37. <div style="background:linear-gradient(180deg,rgba(153,153,153,1) 0%,rgba(86,86,86,1) 100%);">
  38. <div class="middle bottomB row center">HX669属于HX669有限公司注册 版权所有©2019</div>
  39. </div>
  40. </div>
  41. </template>
  42. <script>
  43. // import abstract from "@/components/abstract";
  44. import unitary from "@/components/unitary";
  45. import tandem from "@/components/tandem";
  46. import settlementBetting from "@/components/settlementBetting";
  47. import noSettlementBetting from "@/components/noSettlementBetting";
  48. import deposit from "@/components/deposit";
  49. import withdrawals from "@/components/withdrawals";
  50. import profit from "@/components/profit";
  51. import loss from "@/components/loss";
  52. import "@/css/index.css";
  53. import GameResult from '@/pages/home/GameResult'
  54. export default {
  55. name: "PersonalCenter",
  56. data() {
  57. return {
  58. user: {
  59. // 用户信息
  60. userName: "",
  61. balance: 0
  62. },
  63. userData: "", //用户信息 (轮询)
  64. img: {
  65. user: require("@/assets/st-imges/user.png"),
  66. userHover: require("@/assets/st-imges/user-hover.png"),
  67. wallet: require("@/assets/st-imges/wallet.png"),
  68. walletHover: require("@/assets/st-imges/wallet-hover.png"),
  69. eaml: require("@/assets/st-imges/emal.png"),
  70. eamlHover: require("@/assets/st-imges/emal-hover.png")
  71. },
  72. timers: true,
  73. List: [
  74. // 头部导航列表
  75. {
  76. title: "体育赛事",
  77. num: 0
  78. },
  79. {
  80. title: "优惠",
  81. num: 1
  82. },
  83. {
  84. title: "手机版",
  85. num: 2
  86. }
  87. ],
  88. imgNum: 0,
  89. num: 0, //头部导航激活样式
  90. switcChcomponents: "unitary", //组件开关
  91. leftData: [
  92. //左侧数据 写死
  93. {
  94. title: "投注记录",
  95. list: [
  96. // {
  97. // title: "全部注单",
  98. // isTrue: false,
  99. // code: "allBetting"
  100. // },
  101. {
  102. title: "单式注单",
  103. isTrue: true,
  104. code: "unitary"
  105. },
  106. {
  107. title: "串式注单",
  108. isTrue: false,
  109. code: "tandem"
  110. },
  111. {
  112. title: "已结算注单",
  113. isTrue: false,
  114. code: "settlementBetting"
  115. },
  116. {
  117. title: "未结算注单",
  118. isTrue: false,
  119. code: "noSettlementBetting"
  120. }
  121. ]
  122. },
  123. {
  124. title: "交易记录",
  125. list: [
  126. {
  127. title: "存款",
  128. isTrue: false,
  129. code: "deposit"
  130. },
  131. {
  132. title: "取款",
  133. isTrue: false,
  134. code: "withdrawals"
  135. }
  136. ]
  137. },
  138. {
  139. title: "盈亏记录",
  140. list: [
  141. {
  142. title: "盈利",
  143. isTrue: false,
  144. code: "profit"
  145. },
  146. {
  147. title: "亏损",
  148. isTrue: false,
  149. code: "loss"
  150. }
  151. ]
  152. }
  153. ]
  154. };
  155. },
  156. methods: {
  157. //退出登录
  158. escLogin() {
  159. this.$http
  160. .get(this.$ports.login.loginOut, {
  161. token: localStorage.getItem("token")
  162. })
  163. .then(res => {
  164. if (res.data.msg == "成功") {
  165. this.$dialog.toast({ mes: "退出登录成功", timeout: 2000 });
  166. localStorage.setItem("token", "");
  167. localStorage.setItem("name", "");
  168. localStorage.setItem("balance", "");
  169. this.$router.push("/");
  170. } else {
  171. this.$dialog.toast({ mes: "退出登录失败", timeout: 2000 });
  172. }
  173. });
  174. },
  175. // 导航
  176. PersonalCenterTo() {
  177. this.$router.push("/");
  178. },
  179. // 获取个人中心用户信息
  180. getUserData() {
  181. this.$http
  182. .post(this.$ports.login.getAgent, {
  183. token: localStorage.getItem("token")
  184. })
  185. .then(res => {
  186. if (res.data.data) {
  187. this.userData = res.data.data;
  188. this.userIsLogin = true;
  189. this.user.userName = res.data.data.name;
  190. this.user.balance = res.data.data.cash;
  191. } else {
  192. this.timers = false;
  193. this.userIsLogin = false;
  194. this.user.userName = "";
  195. this.user.balance = "";
  196. localStorage.setItem("token", "");
  197. this.$router.push('/')
  198. }
  199. });
  200. },
  201. listActive(index) {
  202. this.num = index;
  203. },
  204. imgMT(index) {
  205. this.imgNum = index;
  206. },
  207. imgOUT() {
  208. this.imgNum = 0;
  209. },
  210. },
  211. computed: {
  212. Switch() {
  213. return this.switcChcomponents;
  214. }
  215. // getUserIsLogin() {
  216. // if (localStorage.getItem("token")) {
  217. // let userInfo = JSON.parse(localStorage.getItem("user"));
  218. // // this.userIsLogin = true;
  219. // // this.user.userName = userInfo[0].name;
  220. // // this.user.balance = userInfo[0].cash;
  221. // }
  222. // }
  223. },
  224. watch: {
  225. Switch() {}
  226. // getUserIsLogin() {}
  227. },
  228. components: {
  229. GameResult
  230. }
  231. };
  232. </script>
  233. <style scoped>
  234. .headerB-top {
  235. height: 1rem;
  236. background: linear-gradient(
  237. 180deg,
  238. rgba(153, 153, 153, 1) 0%,
  239. rgba(86, 86, 86, 1) 100%
  240. );
  241. }
  242. .headerB-title {
  243. font-size: 0.42rem;
  244. margin-left: 0.3rem;
  245. }
  246. .headerB-nav {
  247. font-size: 0.24rem;
  248. height: 100%;
  249. color: #fff;
  250. }
  251. .headerB-nav li {
  252. height: 100%;
  253. }
  254. .headerB-nav li.active {
  255. font-weight: bold;
  256. position: relative;
  257. }
  258. .headerB-login {
  259. height: 100%;
  260. }
  261. .headerB-login div {
  262. height: 0.4rem;
  263. }
  264. .headerB-login div input {
  265. width: 2rem;
  266. height: 100%;
  267. border: none;
  268. background: #eeeeee;
  269. color: #999;
  270. font-size: 0.16rem;
  271. padding-left: 0.2rem;
  272. }
  273. .headerB-login-pwd {
  274. width: 3rem;
  275. margin-left: 0.1rem;
  276. position: relative;
  277. }
  278. .headerB-login-pwd span {
  279. font-size: 0.16rem;
  280. color: #999;
  281. position: absolute;
  282. left: 1.2rem;
  283. top: 0.1rem;
  284. }
  285. .headerB-login-txt {
  286. width: 1rem;
  287. background: #f76649;
  288. color: #ffffff;
  289. font-size: 0.18rem;
  290. }
  291. .headerB-top-left {
  292. width: 55%;
  293. }
  294. .loginTo div {
  295. height: 100%;
  296. /* font-size: 0.18rem; */
  297. color: #fff;
  298. }
  299. .headerB-userCode {
  300. margin-left: 1.25rem;
  301. }
  302. .headerB-img img {
  303. width: 0.3rem;
  304. height: 0.3rem;
  305. margin-left: 0.2rem;
  306. }
  307. .headerB-img {
  308. margin-left: 0.5rem;
  309. }
  310. .bottomB {
  311. color: #ccc;
  312. height: 1.5rem;
  313. font-size: 0.14rem;
  314. }
  315. .userIcon {
  316. display: none;
  317. }
  318. .userIcon > div {
  319. width: 50%;
  320. }
  321. .headerB-img > div:hover .userIcon {
  322. display: flex;
  323. padding: 0.1rem;
  324. width: 1.3rem;
  325. /* padding: 0.1rem 0.2rem; */
  326. height: 1rem;
  327. line-height: 0.4rem;
  328. font-size: 0.14rem;
  329. position: absolute;
  330. left: -0.3rem;
  331. border-radius: 0.05rem;
  332. z-index: 999;
  333. bottom: -0.8rem;
  334. background: rgba(85, 85, 85, 0.9);
  335. box-shadow: -2px 0px 5px 1px rgba(0, 0, 0, 0.1),
  336. 0px -2px 5px 1px rgba(0, 0, 0, 0.1), 2px 0px 5px 1px rgba(0, 0, 0, 0.1),
  337. 0px 2px 5px 1px rgba(0, 0, 0, 0.1);
  338. }
  339. .headerB-img > div {
  340. position: relative;
  341. }
  342. .main-left {
  343. width: 2.8rem;
  344. background: #ccc;
  345. }
  346. .main-left p,
  347. .main-left li {
  348. line-height: 0.4rem;
  349. font-size: 0.14rem;
  350. color: #555;
  351. }
  352. .main-left p {
  353. background: #fff;
  354. padding: 0 0.2rem;
  355. border-bottom: 0.01rem solid #ccc;
  356. }
  357. .main-left li {
  358. background: #ddd;
  359. border-bottom: 0.01rem solid #ccc;
  360. padding: 0 0.3rem;
  361. }
  362. .main-left li:hover {
  363. background: #bbb;
  364. color: #f76649;
  365. }
  366. .main-left li.active {
  367. color: #fff;
  368. background: #aaa;
  369. border-left: 0.05rem solid #f76649;
  370. }
  371. .main-right {
  372. width: 76%;
  373. margin: 0.2rem 0 0 0.2rem;
  374. }
  375. </style>