index.html 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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="toPassword">
  58. <img src="__TMPL__/public/assets/images/matchmaker/myIcon6.png" alt="">
  59. <h2>修改密码</h2>
  60. <van-icon style="margin-left: 216px" name="arrow" />
  61. </li>
  62. <li @click="showQrcode">
  63. <img src="__TMPL__/public/assets/images/matchmaker/myIcon4.png" alt="">
  64. <h2>我的邀请码</h2>
  65. <van-icon style="margin-left: 200px" name="arrow" />
  66. </li>
  67. <li @click="toStatistics">
  68. <img src="__TMPL__/public/assets/images/matchmaker/myIcon5.png" alt="">
  69. <h2>统计</h2>
  70. <van-icon style="margin-left: 247px" name="arrow" />
  71. </li>
  72. <li @click="callPhone('0595-88052395')">
  73. <img src="__TMPL__/public/assets/images/matchmaker/myIcon2.png" alt="">
  74. <h2>联系我们</h2>
  75. <van-icon style="margin-left: 216px" name="arrow" />
  76. </li>
  77. </ul>
  78. <van-popup v-model="show_qrcode">
  79. <div class="qrcode">
  80. <van-image
  81. width="80vw"
  82. :src="qrcode_url"
  83. ></van-image>
  84. </div>
  85. </van-popup>
  86. <van-tabbar v-model="active" active-color="#FF589B" :before-change="tabbarChange">
  87. <van-tabbar-item url="{:url('matchmaker/index/index')}">
  88. <span>信息库</span>
  89. <template #icon>
  90. <van-icon name="home-o" size="25px"></van-icon>
  91. </template>
  92. </van-tabbar-item>
  93. <van-tabbar-item>
  94. <span>个人中心</span>
  95. <template #icon>
  96. <van-icon name="contact" size="25px"></van-icon>
  97. </template>
  98. </van-tabbar-item>
  99. </van-tabbar>
  100. </block>
  101. <block name="script">
  102. <script>
  103. new Vue({
  104. el: '#app',
  105. data() {
  106. return {
  107. active: 1,
  108. keyword: '',
  109. matchmaker: {$matchmaker},
  110. show_qrcode:false,
  111. };
  112. },
  113. methods: {
  114. tabbarChange() {
  115. return false;
  116. },
  117. callPhone(phone) {
  118. window.location.href = `tel://${phone}`;
  119. },
  120. toIndex() {
  121. location.href = '{:url("matchmaker/index/index")}';
  122. },
  123. toInfo() {
  124. location.href = '{:url("matchmaker/my/info")}';
  125. },
  126. toPassword() {
  127. location.href = '{:url("matchmaker/my/password")}';
  128. },
  129. toStatistics() {
  130. location.href = '{:url("matchmaker/my/statistics")}';
  131. },
  132. showQrcode() {
  133. this.show_qrcode = true;
  134. },
  135. },
  136. computed: {
  137. head_image() {
  138. return this.matchmaker.avatar ? this.matchmaker.avatar : '__TMPL__/public/assets/images/matchmaker/avatar2.png';
  139. },
  140. qrcode_url() {
  141. let code = encodeURIComponent("{:cmf_url('register/infoAdd','',true,true)}?id=" + this.matchmaker.id);
  142. return '/qrcode.php?code=' + code;
  143. },
  144. },
  145. });
  146. </script>
  147. </block>