index.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <extend name="public/base"/>
  2. <block name="css">
  3. <style>
  4. .bg-box{
  5. height: 200px;
  6. background: url("__TMPL__/public/assets/images/matchmaker/myBG.png");
  7. background-size: cover;
  8. display: flex;
  9. flex-direction: column;
  10. align-items: center;
  11. }
  12. .bg-box h1{
  13. margin-top: 12px;
  14. font-size: 20px;
  15. color: #333;
  16. }
  17. ul li{
  18. background-color:#fff;
  19. display:flex;
  20. align-items:center;
  21. height:48px;
  22. margin-bottom:2px;
  23. }
  24. ul li h2{
  25. margin-left: 12px;
  26. font-size: 16px;
  27. font-weight: normal;
  28. }
  29. ul li img{
  30. width: 35px;
  31. margin-left: 22px;
  32. }
  33. </style>
  34. </block>
  35. <block name="body">
  36. <van-nav-bar class="bg-pink">
  37. <template #title>
  38. <span style="color:white;">个人中心</span>
  39. </template>
  40. </van-nav-bar>
  41. <div class="bg-box">
  42. <img style="margin-top:32px;width: 94px;height: 94px;object-fit: cover;border-radius:50%;" :src="head_image" alt="">
  43. <h1>{{matchmaker.name}}</h1>
  44. <p class="mobile" v-if="matchmaker.mobile">{{matchmaker.mobile}}</p>
  45. </div>
  46. <ul>
  47. <li @click="toIndex">
  48. <img src="__TMPL__/public/assets/images/matchmaker/myIcon.png" alt="">
  49. <h2>我的信息库</h2>
  50. <van-icon style="margin-left: 200px" name="arrow" />
  51. </li>
  52. <li @click="toInfo">
  53. <img src="__TMPL__/public/assets/images/matchmaker/myIcon3.png" alt="">
  54. <h2>我的资料</h2>
  55. <van-icon style="margin-left: 216px" name="arrow" />
  56. </li>
  57. <li @click="showQrcode">
  58. <img src="__TMPL__/public/assets/images/matchmaker/myIcon4.png" alt="">
  59. <h2>我的邀请码</h2>
  60. <van-icon style="margin-left: 200px" name="arrow" />
  61. </li>
  62. <li @click="toStatistics">
  63. <img src="__TMPL__/public/assets/images/matchmaker/myIcon5.png" alt="">
  64. <h2>统计</h2>
  65. <van-icon style="margin-left: 247px" name="arrow" />
  66. </li>
  67. <li @click="callPhone('0595-88052395')">
  68. <img src="__TMPL__/public/assets/images/matchmaker/myIcon2.png" alt="">
  69. <h2>联系我们</h2>
  70. <van-icon style="margin-left: 216px" name="arrow" />
  71. </li>
  72. </ul>
  73. <van-popup v-model="show_qrcode">
  74. <div class="qrcode">
  75. <van-image
  76. width="80vw"
  77. :src="qrcode_url"
  78. ></van-image>
  79. </div>
  80. </van-popup>
  81. <van-tabbar v-model="active" active-color="#FF589B" :before-change="tabbarChange">
  82. <van-tabbar-item url="{:url('matchmaker/index/index')}">
  83. <span>信息库</span>
  84. <template #icon>
  85. <van-icon name="home-o" size="25px"></van-icon>
  86. </template>
  87. </van-tabbar-item>
  88. <van-tabbar-item>
  89. <span>个人中心</span>
  90. <template #icon>
  91. <van-icon name="contact" size="25px"></van-icon>
  92. </template>
  93. </van-tabbar-item>
  94. </van-tabbar>
  95. </block>
  96. <block name="script">
  97. <script>
  98. new Vue({
  99. el: '#app',
  100. data() {
  101. return {
  102. active: 1,
  103. keyword: '',
  104. matchmaker: {$matchmaker},
  105. show_qrcode:false,
  106. };
  107. },
  108. methods: {
  109. tabbarChange() {
  110. return false;
  111. },
  112. callPhone(phone) {
  113. window.location.href = `tel://${phone}`;
  114. },
  115. toIndex() {
  116. location.href = '{:url("matchmaker/index/index")}';
  117. },
  118. toInfo() {
  119. location.href = '{:url("matchmaker/my/info")}';
  120. },
  121. toStatistics() {
  122. location.href = '{:url("matchmaker/my/statistics")}';
  123. },
  124. showQrcode() {
  125. this.show_qrcode = true;
  126. },
  127. },
  128. computed: {
  129. head_image() {
  130. return this.matchmaker.avatar ? this.matchmaker.avatar : '__TMPL__/public/assets/images/matchmaker/avatar2.png';
  131. },
  132. qrcode_url() {
  133. let code = encodeURIComponent("{:cmf_url('register/infoAdd','',true,true)}?id=" + this.matchmaker.id);
  134. return '/qrcode.php?code=' + code;
  135. },
  136. },
  137. });
  138. </script>
  139. </block>