index.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <view v-if="recommendCard">
  3. <view style="height: 136rpx;"></view>
  4. <view class="sc-box ddflex">
  5. <image class="sc-header" :src="recommendCard.avatar?recommendCard.avatar:'../../static/images/userimg.png'"></image>
  6. <view class="sc-name">
  7. <view>{{recommendCard.realName}}</view>
  8. <view class="sc-tag">{{recommendCard.jobName}}</view>
  9. </view>
  10. <view class="sc-line"></view>
  11. <view class="sc-contact" @click="jumpConversation">
  12. <image src="/static/images/wxChat.png"></image>
  13. <view>聊一聊</view>
  14. </view>
  15. <view class="sc-btn flex" @click="toIndex">进入我的微页</view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. const app = getApp();
  21. const req = require("../../utils/request.js");
  22. export default {
  23. data() {
  24. return {
  25. recommendCard:{}
  26. };
  27. },
  28. components: {},
  29. props: {
  30. },
  31. watch: {},
  32. mounted() {
  33. this.getRecommendCard()
  34. },
  35. methods: {
  36. // 获取推荐销售
  37. getRecommendCard(){
  38. req.getRequest('/api/visiting/card/recommendCardInfo',{},res=>{
  39. this.recommendCard = res
  40. })
  41. },
  42. jumpConversation() {
  43. req.jumpConversation();
  44. },
  45. toIndex(){
  46. uni.switchTab({
  47. url:'/pages/index/index'
  48. })
  49. }
  50. }
  51. };
  52. </script>
  53. <style>
  54. @import "./index.css";
  55. </style>