index.vue 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <template>
  2. <div class="user">
  3. <van-cell label="未绑定手机号" is-link center @click="showVConsole">
  4. <template #icon>
  5. <m-user-avatar class="user-avatar" />
  6. </template>
  7. <template #title>
  8. <m-user-name />
  9. </template>
  10. </van-cell>
  11. <van-cell-group class="group">
  12. <van-cell title="我要提现" value="" is-link center @click="goCashOut">
  13. <template #icon>
  14. <m-icon type="hyyxq" class="cell-icon" />
  15. </template>
  16. </van-cell>
  17. <van-cell title="我的下级" value="" is-link center @click="goMyBranch">
  18. <template #icon>
  19. <m-icon type="hyyxq" class="cell-icon" />
  20. </template>
  21. </van-cell>
  22. <van-cell
  23. title="会员有效期"
  24. :value="expireTime ? expireTime : '开通会员'"
  25. is-link
  26. center
  27. @click="goBuyVip"
  28. >
  29. <template #icon>
  30. <m-icon type="hyyxq" class="cell-icon" />
  31. </template>
  32. </van-cell>
  33. </van-cell-group>
  34. <van-cell-group class="group">
  35. <van-cell
  36. title="0.01捐款(内部专用)"
  37. is-link
  38. center
  39. @click="loopPrepareOrder"
  40. >
  41. <template #icon>
  42. <m-icon type="fkbz" class="cell-icon" />
  43. </template>
  44. </van-cell>
  45. <van-cell
  46. title="反馈帮助"
  47. is-link
  48. center
  49. url="https://support.qq.com/product/359609"
  50. >
  51. <template #icon>
  52. <m-icon type="fkbz" class="cell-icon" />
  53. </template>
  54. </van-cell>
  55. </van-cell-group>
  56. </div>
  57. </template>
  58. <script lang="ts">
  59. import { useExpireTime, RouterBus } from "@/hooks";
  60. import VConsole from "vconsole";
  61. </script>
  62. <script lang="ts" setup>
  63. import { loopPrepareOrder } from "@/api";
  64. const { expireTime } = useExpireTime();
  65. const { goBuyVip, goCashOut, goMyBranch } = new RouterBus();
  66. let doubleClickNumber = 0;
  67. const showVConsole = () => {
  68. console.log("双击用户名");
  69. if (doubleClickNumber !== 9) {
  70. doubleClickNumber = (doubleClickNumber + 1) % 10;
  71. } else {
  72. let vconsole = new VConsole();
  73. }
  74. };
  75. </script>
  76. <style scoped lang="scss">
  77. .user {
  78. background-color: #f2f3f5;
  79. height: 100vh;
  80. .group {
  81. margin: 10px 0;
  82. }
  83. .user-avatar {
  84. width: 46px;
  85. height: 46px;
  86. margin-right: 10px;
  87. }
  88. }
  89. .cell-icon {
  90. margin-right: 5px;
  91. }
  92. </style>