123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- <template>
- <view class="page">
- <view class="cateList">
- <view class="item12">
- <view class="title">推荐</view>
- <image class="icon" mode="widthFix" src="../../static/icon/line_down.png"></image>
- </view>
- </view>
- <view class="list">
- <view class="item" v-for="(item,index) of list" :key="index" @click="goHome(item.uid)">
- <view class="img">
- <image class="icon" mode="aspectFill" :src="item.avator"></image>
- </view>
- <view class="tit">
- <text class="name">{{item.nickname}}</text>
- <text class="juli">{{item.juli}}</text>
- </view>
- <view class="tag_list">
- <view class="tag">
- <image class="icon" mode="widthFix" src="../../static/home/icon_sex2.png"></image>
- <text>{{item.age}}</text>
- </view>
- <view class="tag2">
- <text>{{item.ziye}}</text>
- </view>
- <view class="tag2">
- <text>{{item.xinzuo}}</text>
- </view>
- </view>
- </view>
- </view>
- <view class="thread2"></view>
- <view class="thread2"></view>
- </view>
- </template>
- <script>
- export default {
- components: {},
- data() {
- return {
- title: '',
- list: [],
- }
- },
- onLoad() {
- let self = this;
- },
- onShow() {
- uni.$emit('check_update');
- this.loadData();
- },
- methods: {
- goHome(uid) {
- uni.navigateTo({
- url: '/pages/index/peopleHome?uid=' + uid
- })
- },
- loadData() {
- console.log({
- uuid: getApp().globalData.uuid,
- skey: getApp().globalData.skey
- });
- uni.request({
- url: this.$apiHost + '/Index/getAllInfo',
- data: {
- uuid: getApp().globalData.uuid
- },
- header: {
- "content-type": "application/json",
- 'sign': getApp().globalData.headerSign
- },
- success: (res) => {
- console.log("----:", res.data);
- if (res.data.need_login == "yes") {
- uni.removeStorageSync("wapptoken");
- uni.redirectTo({
- url: '/pages/login/login'
- });
- return;
- }
- this.myinfo = res.data;
- this.article = res.data.article;
- this.list = res.data.list;
- },
- complete: (com) => {
- // uni.hideLoading();
- },
- fail: (e) => {
- console.log("----e:", e);
- }
- });
- },
- }
- }
- </script>
- <style scoped lang="scss">
- @import 'peopleList.scss';
- </style>
|