peopleList.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <template>
  2. <view class="page">
  3. <view class="cateList">
  4. <view class="item12">
  5. <view class="title">推荐</view>
  6. <image class="icon" mode="widthFix" src="../../static/icon/line_down.png"></image>
  7. </view>
  8. </view>
  9. <view class="list">
  10. <view class="item" v-for="(item,index) of list" :key="index" @click="goHome(item.uid)">
  11. <view class="img">
  12. <image class="icon" mode="aspectFill" :src="item.avator"></image>
  13. </view>
  14. <view class="tit">
  15. <text class="name">{{item.nickname}}</text>
  16. <text class="juli">{{item.juli}}</text>
  17. </view>
  18. <view class="tag_list">
  19. <view class="tag">
  20. <image class="icon" mode="widthFix" src="../../static/home/icon_sex2.png"></image>
  21. <text>{{item.age}}</text>
  22. </view>
  23. <view class="tag2">
  24. <text>{{item.ziye}}</text>
  25. </view>
  26. <view class="tag2">
  27. <text>{{item.xinzuo}}</text>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. <view class="thread2"></view>
  33. <view class="thread2"></view>
  34. </view>
  35. </template>
  36. <script>
  37. export default {
  38. components: {},
  39. data() {
  40. return {
  41. title: '',
  42. list: [],
  43. }
  44. },
  45. onLoad() {
  46. let self = this;
  47. },
  48. onShow() {
  49. uni.$emit('check_update');
  50. this.loadData();
  51. },
  52. methods: {
  53. goHome(uid) {
  54. uni.navigateTo({
  55. url: '/pages/index/peopleHome?uid=' + uid
  56. })
  57. },
  58. loadData() {
  59. console.log({
  60. uuid: getApp().globalData.uuid,
  61. skey: getApp().globalData.skey
  62. });
  63. uni.request({
  64. url: this.$apiHost + '/Index/getAllInfo',
  65. data: {
  66. uuid: getApp().globalData.uuid
  67. },
  68. header: {
  69. "content-type": "application/json",
  70. 'sign': getApp().globalData.headerSign
  71. },
  72. success: (res) => {
  73. console.log("----:", res.data);
  74. if (res.data.need_login == "yes") {
  75. uni.removeStorageSync("wapptoken");
  76. uni.redirectTo({
  77. url: '/pages/login/login'
  78. });
  79. return;
  80. }
  81. this.myinfo = res.data;
  82. this.article = res.data.article;
  83. this.list = res.data.list;
  84. },
  85. complete: (com) => {
  86. // uni.hideLoading();
  87. },
  88. fail: (e) => {
  89. console.log("----e:", e);
  90. }
  91. });
  92. },
  93. }
  94. }
  95. </script>
  96. <style scoped lang="scss">
  97. @import 'peopleList.scss';
  98. </style>