Linkman.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <template>
  2. <section class="link-ctnr">
  3. <mytitle msg="联系人" flag="true"></mytitle>
  4. <section class="ctnr-box">
  5. <mt-navbar v-model="selected">
  6. <mt-tab-item v-for="item in items" :key="item.id" :id="item.id">
  7. <p>{{ item.name }}</p>
  8. </mt-tab-item>
  9. </mt-navbar>
  10. <mt-tab-container v-model="selected">
  11. <mt-tab-container-item id="1">
  12. <ul v-if="Lists[0]">
  13. <li v-for="item in Lists[0].messList">
  14. <img :src="item.img">
  15. <span v-if="item.real">{{item.name}}</span>
  16. <span v-else :class="{active:!item.real}">未实名</span>
  17. <span v-if="item.real">已实名</span>
  18. <p>{{item.phone}}</p>
  19. </li>
  20. </ul>
  21. </mt-tab-container-item>
  22. <mt-tab-container-item id="2">
  23. <ul v-if="Lists[1]">
  24. <li v-for="item in Lists[1].messList">
  25. <img :src="item.img">
  26. <span v-if="item.real">{{item.name}}</span>
  27. <span v-else :class="{active:!item.real}">未实名</span>
  28. <span v-if="item.real">已认证</span>
  29. <p>{{item.phone}}</p>
  30. </li>
  31. </ul>
  32. </mt-tab-container-item>
  33. </mt-tab-container>
  34. </section>
  35. <tabbar></tabbar>
  36. </section>
  37. </template>
  38. <script type="text/javascript">
  39. import mytitle from "../components/Title.vue"
  40. import tabbar from "../components/Tabbar.vue"
  41. import axios from "axios"
  42. export default{
  43. data(){
  44. return {
  45. selected:"1",
  46. items:[
  47. {
  48. id:"1",
  49. name:"个人",
  50. },
  51. {
  52. id:"2",
  53. name:"企业",
  54. }
  55. ],
  56. Lists:[]
  57. }
  58. },
  59. components:{
  60. mytitle,
  61. tabbar
  62. },
  63. mounted:function(){
  64. axios.get("/api/linkman",{params:{}}).then(res => {
  65. this.Lists = res.data.content;//res.data里的内容
  66. })
  67. }
  68. }
  69. </script>
  70. <style type="text/css">
  71. .link-ctnr{
  72. position: absolute;
  73. top: 0;
  74. left: 0;
  75. right: 0;
  76. bottom: 0;
  77. background-color: #60c0ff;
  78. .ctnr-box{
  79. .mint-navbar{
  80. .mint-tab-item{
  81. &.is-selected{
  82. .mint-tab-item-icon:empty{
  83. display:block;
  84. }
  85. }
  86. }
  87. }
  88. .mint-tab-container{
  89. .mint-tab-container-wrap{
  90. .mint-tab-container-item{
  91. ul{
  92. li{
  93. background-color: #fff;
  94. margin-bottom: 0.266525rem;
  95. border-radius: 10px;
  96. padding: 0.21322rem 0.279851rem;
  97. text-align: left;
  98. font-size: 0px;
  99. position: relative;
  100. box-shadow: 0rem 0rem 0.36rem 0rem rgba(96, 192, 255, 0.35);
  101. img{
  102. width: 1.172708rem;
  103. height: 1.172708rem;
  104. vertical-align: middle;
  105. margin-right: 0.279851rem;
  106. }
  107. span{
  108. margin-right: 0.239872rem;
  109. &:nth-child(2){
  110. font-size: 0.426439rem;
  111. color: #1491e2;
  112. &.active{
  113. color: red;
  114. }
  115. }
  116. &:nth-child(3){
  117. font-size: 0.319829rem;
  118. color: #fff;
  119. background-color: #60c0ff;
  120. padding: 0.10661rem 0.21322rem;
  121. border-radius: 20px;
  122. }
  123. }
  124. p{
  125. font-size: 0.373134rem;
  126. position: absolute;
  127. left: 1.732409rem;
  128. bottom: 0.133262rem;
  129. }
  130. }
  131. }
  132. }
  133. }
  134. }
  135. }
  136. }
  137. </style>