follow.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <extend name="public/base"/>
  2. <block name="css">
  3. <style>
  4. .van-nav-bar--fixed {z-index:100;}
  5. .van-nav-bar .van-icon,.van-nav-bar__text {color:white;}
  6. .van-step--horizontal .van-step__title {font-size:16px;}
  7. .van-step--horizontal .van-step__icon {font-size:16px;}
  8. .van-step__circle {width:10px;height:10px;}
  9. .lw-list .list-item{padding:5px 10px;background:white;}
  10. .lw-list .list-content {display:flex;align-items:center;}
  11. .lw-list .list-content .list-left {width:50px;height:50px;}
  12. .lw-list .list-content .list-left img {width:50px;height:50px;}
  13. .lw-list .list-content .list-right {margin-left:20px;}
  14. .lw-list .list-content .list-right .name {color:black;height:30px;line-height:30px;}
  15. .lw-list .list-content .list-right .name .mobile {font-size:14px;color:var(--blue);}
  16. .lw-list .list-content .list-right .desc {color:#666;font-size:14px;height:20px;line-height:20px;}
  17. .lw-list .list-tool {border-top:1px solid #f8f9fb;margin-top:5px;display:flex;justify-content:flex-end;align-items:center;padding-top:5px;}
  18. .lw-list .list-tool .tool-btn {margin-left:5px;font-size:14px;border:1px solid #ccc;padding:5px 10px;border-radius:20px;color:#555;}
  19. .lw-list .list-tool .tool-btn.delete {border-color:var(--pink);color:var(--pink);}
  20. .lw-list .list-tool .tool-btn.match {border-color:var(--blue);color:var(--blue);}
  21. </style>
  22. </block>
  23. <block name="body">
  24. <!--头部-->
  25. <van-nav-bar
  26. class="bg-pink"
  27. fixed="true"
  28. left-text="返回"
  29. @click-left="onBack"
  30. left-arrow
  31. >
  32. <template #title>
  33. <span style="color:white;">跟进记录</span>
  34. </template>
  35. </van-nav-bar>
  36. <div style="width:100%;height:46px;"></div>
  37. <div class="lw-list">
  38. <div class="list-item">
  39. <div class="list-content">
  40. <div class="list-left">
  41. <img :src="dealAvatar(info.avatar,info.sex)" alt="">
  42. </div>
  43. <div class="list-right">
  44. <div class="name">{{info.realname}} <span class="mobile" v-if="info.mobile">({{info.mobile}})</span></div>
  45. <div class="desc">{{info.sex_text}} • {{info.age}}岁 • {{dealHigh(info.high)}}</div>
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. <van-field
  51. v-model="form.content"
  52. rows="3"
  53. autosize
  54. label="跟进内容"
  55. type="textarea"
  56. placeholder="请输入跟进内容"
  57. show-word-limit
  58. ></van-field>
  59. <div style="padding:16px;">
  60. <van-button block class="bg-pink" @click="onSubmit">提交</van-button>
  61. </div>
  62. <van-empty description="暂无跟进记录" v-if="list.length == 0"></van-empty>
  63. <van-steps direction="vertical" :active="0">
  64. <van-step v-for="item in list">
  65. <h3>{{item.content}}</h3>
  66. <p>{{item.create_time_text}}</p>
  67. </van-step>
  68. </van-steps>
  69. </block>
  70. <block name="script">
  71. <script>
  72. new Vue({
  73. el: '#app',
  74. data() {
  75. return {
  76. info:{$info},
  77. form:{
  78. user_id: {$id},
  79. content: '',
  80. },
  81. list: {$list},
  82. };
  83. },
  84. methods: {
  85. onBack() {
  86. location.href = "{:url('index/index')}";
  87. },
  88. onSubmit() {
  89. $.post("{:url('followPost')}", this.form, function (json) {
  90. if (json.code == 0) {
  91. vant.Toast(json.msg);
  92. return false;
  93. }
  94. location.reload();
  95. }, 'json');
  96. },
  97. dealAvatar(avatar,sex) {
  98. if (avatar == '') {
  99. return '__TMPL__/public/assets/images/matchmaker/avatar' + sex + '.png'
  100. } else {
  101. return avatar;
  102. }
  103. },
  104. dealHigh(high) {
  105. return high ? high + 'CM' : '保密';
  106. },
  107. },
  108. computed: {
  109. }
  110. });
  111. </script>
  112. </block>