123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190 |
- <template>
- <view class="page">
- <view class="header">
- <view class="left">
- <image class="img" mode="widthFix" src="../../static/home/top_title.png"></image>
- </view>
- </view>
- <view class="topbanner">
- <view class="left" @click="goPage('/pages/index/ai_pp')">
- <image class="aibg" mode="widthFix" src="../../static/home/ai_bg.png"></image>
- <view class="title">AI匹配</view>
- <view class="desc">遇见那个TA</view>
- <view class="btn">开始匹配</view>
- </view>
- <view class="right">
- <view class="item1" @click="goPage('/pages/index/peopleList')">
- <image class="meinv" mode="widthFix" src="../../static/home/meinv.png"></image>
- <view class="title">兴趣交友</view>
- <view class="desc">开启真挚交友</view>
- </view>
- <view class="item2" @click="goArticle">
- <image class="talk" mode="widthFix" src="../../static/home/talk.png"></image>
- <view class="title">热门动态</view>
- <view class="desc">点燃思想火花</view>
- </view>
- </view>
- </view>
- <view class="centerbanner" v-if="false">
- <view class="item1">
- <image class="icon" mode="widthFix" src="../../static/home/talk2.png"></image>
- <view class="title">加密群聊</view>
- </view>
- <view class="item2">
- <image class="icon" mode="widthFix" src="../../static/home/nan.png"></image>
- <view class="title">AI男友</view>
- </view>
- <view class="item3">
- <image class="icon" mode="widthFix" src="../../static/home/nv.png"></image>
- <view class="title">AI女友</view>
- </view>
- </view>
- <view class="section-title">
- 热门动态
- </view>
- <view class="article_notify">
- <view class="left">
- <image class="icon" mode="widthFix" src="../../static/home/nv.png"></image>
- </view>
- <view class="right">
- <view class="title">热门动态
- <image class="icon" mode="widthFix" src="../../static/home/icon_vip.png" v-if="article.is_vip > 0">
- </image>
- </view>
- <view class="desc">{{article.content}}</view>
- </view>
- </view>
- <view class="section-title">
- 精选推荐
- </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" v-if="item.ziye">
- <text>{{item.ziye}}</text>
- </view>
- <view class="tag2" v-if="item.xinzuo">
- <text>{{item.xinzuo}}</text>
- </view>
- </view>
- </view>
- </view>
- <view class="thread2"></view>
- <view class="thread2"></view>
- <wu-app-update></wu-app-update>
- </view>
- </template>
- <script>
- import pubc from '@/common/public.js'
- export default {
- components: {},
- data() {
- return {
- title: '',
- myinfo: {},
- article: {},
- list: [],
- lat: '',
- lng: '',
- }
- },
- onLoad() {
- let self = this;
- let that = this;
- // uni.getLocation({
- // type: 'wgs84',
- // success: function(res) {
- // that.lat = res.latitude;
- // that.lng = res.longitude;
- // },
- // fail: function(error) {
- // console.error('获取位置失败:', error);
- // }
- // });
- },
- onShow() {
- uni.$emit('check_update');
- this.loadData();
- // let hsign = pubc.Encrypt("aboa-wifl-kwfl-zjfk-wlaa" + getApp().globalData.uuid);
- // console.log("hsign", hsign)
- },
- methods: {
- goArticle() {
- uni.switchTab({
- url: '/pages/article/article'
- })
- },
- goHome(uid) {
- uni.navigateTo({
- url: '/pages/index/peopleHome?uid=' + uid
- })
- },
- goPage(path) {
- uni.navigateTo({
- url: path
- })
- },
- loadData() {
- console.log("headsign", getApp().globalData.headerSign);
- uni.request({
- url: this.$apiHost + '/Index/getAllInfo',
- data: {
- uuid: getApp().globalData.uuid,
- lat: this.lat,
- lng: this.lng
- },
- 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;
- }
- if (res.data.need_edit == "yes") {
- uni.navigateTo({
- url: '/pages/my/step'
- });
- 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 'index.scss';
- </style>
|