7.10 增加登录页面,事件详情接口对接,我的点赞,关注收藏页面搭建,接口对接
This commit is contained in:
@@ -3,19 +3,18 @@
|
||||
<navBar leftText="信息完善"></navBar>
|
||||
<image class="topBg absolute" src="/static/image/mine/myTopBg.png" mode="widthFix"></image>
|
||||
<view class="avatarC fixed" :style="'top:'+avatarTop+'px;'">
|
||||
<image class="avatar" src="" mode="aspectFill"></image>
|
||||
<image class="avatar" :src="avatar?avatar:avatarUrl" mode="aspectFill"></image>
|
||||
<image class="icon absolute" src="/static/icon/mine/basicInfo/edit.png" mode="widthFix"></image>
|
||||
<button class="absolute" open-type="chooseAvatar" @chooseavatar="chooseAvatar"></button>
|
||||
</view>
|
||||
<view class="basicInfoC fixed" :style="'top:'+contentTop+'px;'">
|
||||
<view class="title">基本信息</view>
|
||||
<view class="section">昵称</view>
|
||||
<view class="inputC">
|
||||
<input type="text" />
|
||||
<input type="nickname" v-model="nickname" />
|
||||
</view>
|
||||
<view class="section">手机号</view>
|
||||
<view class="inputC">
|
||||
<input type="text" />
|
||||
</view>
|
||||
<view class="inputC">{{mobile}}</view>
|
||||
<view class="section">性别</view>
|
||||
<picker mode="selector" :range="sexList" @change="sexChange">
|
||||
<view class="selectC flex">
|
||||
@@ -25,7 +24,7 @@
|
||||
</picker>
|
||||
<view class="section">个人简介</view>
|
||||
<view class="textareaC">
|
||||
<textarea placeholder="简单介绍一下自己吧" placeholder-style="color:#AAA"></textarea>
|
||||
<textarea v-model="profile" placeholder="简单介绍一下自己吧" placeholder-style="color:#AAA"></textarea>
|
||||
</view>
|
||||
</view>
|
||||
<view class="next fixed" @click="clickNext()">下一步</view>
|
||||
@@ -34,21 +33,42 @@
|
||||
|
||||
<script>
|
||||
import { inject } from 'vue';
|
||||
import { updateBasicInfo, userInfo } from '@/request/api';
|
||||
import { uploadImg } from '@/utils/util';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
avatarTop:'',
|
||||
contentTop:'',
|
||||
avatar:'', //选择头像临时地址
|
||||
avatarUrl:'', //已上传的链接
|
||||
nickname:'', //昵称
|
||||
mobile:'', //手机号
|
||||
sexList:['男','女'],
|
||||
sex:''
|
||||
sex:'',
|
||||
profile:'', //个人简介
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.avatarTop = inject('navHeight') + 60/750*inject('windowWidth')
|
||||
this.contentTop = this.avatarTop + 75/750*inject('windowWidth')
|
||||
this.getUserInfoData()
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 点击选择头像
|
||||
* @param {Object} e
|
||||
*/
|
||||
chooseAvatar(e)
|
||||
{
|
||||
console.log(e)
|
||||
this.avatar = e.detail.avatarUrl
|
||||
},
|
||||
/**
|
||||
* 点击选择性别
|
||||
* @param {Object} e
|
||||
*/
|
||||
sexChange(e)
|
||||
{
|
||||
console.log(e)
|
||||
@@ -60,8 +80,84 @@
|
||||
*/
|
||||
clickNext()
|
||||
{
|
||||
uni.navigateTo({
|
||||
url:'/pages/mine/investPreference/investPreference'
|
||||
if(!this.avatar&&!this.avatarUrl)
|
||||
{
|
||||
uni.showToast({
|
||||
title:'请选择头像',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if(!this.nickname)
|
||||
{
|
||||
uni.showToast({
|
||||
title:'请输入昵称',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if(!this.sex)
|
||||
{
|
||||
uni.showToast({
|
||||
title:'请选择性别',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if(!this.profile)
|
||||
{
|
||||
uni.showToast({
|
||||
title:'请输入个人简介',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if(this.avatar)
|
||||
{
|
||||
//如果选择了新头像
|
||||
let param = {avatar:this.avatar,nickname:this.nickname,gender:this.sex=='男'?'male':'female',
|
||||
bio:this.profile,isFile:1}
|
||||
updateBasicInfo(param).then(res=>{
|
||||
uni.navigateTo({
|
||||
url:'/pages/mine/investPreference/investPreference'
|
||||
})
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
}else
|
||||
{
|
||||
//没有选择新头像
|
||||
let param = {nickname:this.nickname,gender:this.sex=='男'?'male':'female',
|
||||
bio:this.profile}
|
||||
updateBasicInfo(param).then(res=>{
|
||||
uni.navigateTo({
|
||||
url:'/pages/mine/investPreference/investPreference'
|
||||
})
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取用户信息数据
|
||||
*/
|
||||
getUserInfoData()
|
||||
{
|
||||
userInfo().then(res=>{
|
||||
if(res.code==200)
|
||||
{
|
||||
this.avatarUrl = res.data.basic_info.avatar_url
|
||||
this.nickname = res.data.basic_info.nickname
|
||||
this.mobile = res.data.basic_info.phone
|
||||
this.sex = res.data.basic_info.gender=='male'?'男':'女'
|
||||
this.profile = res.data.basic_info.bio
|
||||
}else
|
||||
wx.showToast({
|
||||
title:res.message,
|
||||
icon:'none'
|
||||
})
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -83,7 +179,6 @@
|
||||
width: 150rpx;
|
||||
.avatar
|
||||
{
|
||||
background-color: red;
|
||||
width: 100%;
|
||||
height: 150rpx;
|
||||
border-radius: 50%;
|
||||
@@ -96,6 +191,13 @@
|
||||
width: 40rpx;
|
||||
height: auto;
|
||||
}
|
||||
button
|
||||
{
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
z-index: 10;
|
||||
}
|
||||
.basicInfoC
|
||||
|
||||
@@ -9,42 +9,67 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="list fixed" :style="'top:'+listTop+'px;'">
|
||||
<view class="item">
|
||||
<view class="replyContentC">
|
||||
<view class="flex">
|
||||
<view class="flex1 flex">
|
||||
<image class="avatar" src="" mode="aspectFill"></image>
|
||||
<view class="flex1">
|
||||
<view class="replyNickname">逸尘破晓</view>
|
||||
<view class="time">2-15 15:37</view>
|
||||
<block v-if="selectTab==0">
|
||||
<view class="commentMeItem" v-for="(item,index) in commentList" :key="index">
|
||||
<view class="replyContentC">
|
||||
<view class="flex">
|
||||
<view class="flex1 flex">
|
||||
<image class="avatar" src="" mode="aspectFill"></image>
|
||||
<view class="flex1">
|
||||
<view class="replyNickname">逸尘破晓</view>
|
||||
<view class="time">2-15 15:37</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="reply">回复</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
回复<text class="originNickname">永不落的梦想</text><text>:四部门联合启动的人力资源服务业与制造业融合发展点。</text>
|
||||
</view>
|
||||
<view class="reply">回复</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
回复<text class="originNickname">永不落的梦想</text><text>:四部门联合启动的人力资源服务业与制造业融合发展点。</text>
|
||||
<view class="originalTextC">
|
||||
<view class="originReply">
|
||||
<text class="originNickname">永不落的梦想</text><text>:四部门联合启动的人力资源服务业与制造业融合发展点。</text>
|
||||
</view>
|
||||
<view class="originEventC">
|
||||
<view class="levelTitleC flex">
|
||||
<view class="level">C</view>
|
||||
<view class="title">四部门联合启动人力资源服务业与制造业...</view>
|
||||
</view>
|
||||
<view class="eventContent">人社部、工信部等四部门印发通知,明确在30个城市开展3年期试点,培育人力资源服务与制造业协同机构...</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="originalTextC">
|
||||
<view class="originReply">
|
||||
<text class="originNickname">永不落的梦想</text><text>:四部门联合启动的人力资源服务业与制造业融合发展点。</text>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="myCommentItem" v-for="(item,index) in commentList" :key="index">
|
||||
<view class="replyContentC">
|
||||
<view class="flex">
|
||||
<image class="avatar" src="" mode="aspectFill"></image>
|
||||
<view class="flex1">
|
||||
<view class="nickname">逸尘破晓</view>
|
||||
<view class="time">{{getLocaleDate(item.created_at)}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">{{item.content}}</view>
|
||||
</view>
|
||||
<view class="originEventC">
|
||||
<view class="levelTitleC flex">
|
||||
<view class="level">C</view>
|
||||
<view class="title">四部门联合启动人力资源服务业与制造业...</view>
|
||||
<view class="title">{{item.event_title}}</view>
|
||||
</view>
|
||||
<view class="eventContent">人社部、工信部等四部门印发通知,明确在30个城市开展3年期试点,培育人力资源服务与制造业协同机构...</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { inject } from 'vue';
|
||||
|
||||
import { userActivityList } from '@/request/api';
|
||||
import { getLocaleDate } from '@/utils/util';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -52,10 +77,26 @@
|
||||
listTop:'',
|
||||
tabList:['评论我的','我评论的'],
|
||||
selectTab:0,
|
||||
commentList:[],
|
||||
page:1,
|
||||
loadAll:false,
|
||||
getLocaleDate:getLocaleDate
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.listTop = this.navH+(75+10)/750*inject('windowWidth')
|
||||
this.getCommentListData()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.page = 1
|
||||
this.getCommentListData()
|
||||
},
|
||||
onReachBottom() {
|
||||
if(!this.loadAll)
|
||||
{
|
||||
this.page ++
|
||||
this.getCommentListData()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
@@ -67,7 +108,34 @@
|
||||
if(this.selectTab!=index)
|
||||
{
|
||||
this.selectTab = index
|
||||
this.getCommentListData()
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取评论列表数据
|
||||
*/
|
||||
getCommentListData()
|
||||
{
|
||||
let param = {page:this.page,type:this.selectTab==0?'commented':'comments'}
|
||||
userActivityList(param).then(res=>{
|
||||
if (res.code==200) {
|
||||
if(res.data.current_page==1)
|
||||
{
|
||||
this.commentList = res.data.activities
|
||||
}else
|
||||
this.commentList = this.followList.concat(res.data.activities)
|
||||
if(res.data.current_page==res.data.pages)
|
||||
{
|
||||
this.loadAll = true
|
||||
}
|
||||
} else
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none'
|
||||
})
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -118,14 +186,13 @@
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
overflow-y: scroll;
|
||||
.item
|
||||
.commentMeItem
|
||||
{
|
||||
.replyContentC
|
||||
{
|
||||
padding: 40rpx 25rpx 0;
|
||||
.avatar
|
||||
{
|
||||
background-color: red;
|
||||
margin-right: 22rpx;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
@@ -134,10 +201,13 @@
|
||||
.replyNickname
|
||||
{
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #111;
|
||||
}
|
||||
.time
|
||||
{
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: #aaa;
|
||||
}
|
||||
.reply
|
||||
@@ -213,5 +283,73 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.myCommentItem
|
||||
{
|
||||
.replyContentC
|
||||
{
|
||||
padding: 40rpx 25rpx 0;
|
||||
.avatar
|
||||
{
|
||||
margin-right: 22rpx;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.nickname
|
||||
{
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #111;
|
||||
}
|
||||
.time
|
||||
{
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: #aaa;
|
||||
}
|
||||
.content
|
||||
{
|
||||
margin-top: 20rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #444;
|
||||
}
|
||||
}
|
||||
|
||||
.originEventC
|
||||
{
|
||||
background-color: #F7F7F7;
|
||||
margin-top: 20rpx;
|
||||
padding: 20rpx 40rpx;
|
||||
.levelTitleC
|
||||
{
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
.level
|
||||
{
|
||||
background-color: #FEC44F;
|
||||
margin-right: 17rpx;
|
||||
width: 50rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 10rpx;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
text-align: center;
|
||||
}
|
||||
.title
|
||||
{
|
||||
color: #222;
|
||||
}
|
||||
}
|
||||
.eventContent
|
||||
{
|
||||
margin-top: 20rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -4,20 +4,22 @@
|
||||
<image class="topBg absolute" src="/static/image/mine/myTopBg.png" mode="widthFix"></image>
|
||||
<view class="feedbackC fixed" :style="'top:'+navH+'px;'">
|
||||
<view class="textareaC">
|
||||
<textarea placeholder="请输入您要反馈的问题(200 字以内)" placeholder-style="color:#C5C5C5" maxlength="200"></textarea>
|
||||
<textarea v-model="content" placeholder="请输入您要反馈的问题(200 字以内)" placeholder-style="color:#C5C5C5" maxlength="200"></textarea>
|
||||
</view>
|
||||
</view>
|
||||
<view class="submit fixed">提交</view>
|
||||
<view class="submit fixed" @click="clickSubmit()">提交</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { inject } from 'vue';
|
||||
import { feedback } from '@/request/api';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
navH:inject('navHeight'),
|
||||
content:'',
|
||||
|
||||
}
|
||||
},
|
||||
@@ -25,7 +27,36 @@
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
clickSubmit()
|
||||
{
|
||||
if(!this.content)
|
||||
{
|
||||
uni.showToast({
|
||||
title:'请输入您要反馈的问题',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
let param = {content:this.content,isJson:1}
|
||||
feedback(param).then(res=>{
|
||||
if(res.code==200)
|
||||
{
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none'
|
||||
})
|
||||
setTimeout(function() {
|
||||
uni.navigateBack()
|
||||
}, 1000);
|
||||
}else
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none'
|
||||
})
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
309
pages/mine/followCollect/followCollect.vue
Normal file
309
pages/mine/followCollect/followCollect.vue
Normal file
@@ -0,0 +1,309 @@
|
||||
<template>
|
||||
<view>
|
||||
<navBar leftText="关注收藏"></navBar>
|
||||
<image class="topBg absolute" src="/static/image/mine/myTopBg.png" mode="widthFix"></image>
|
||||
<view class="list fixed" :style="'top:'+navH+'px;'">
|
||||
<view class="item" @click="clickEventItem(item.event_id)" v-for="(item,index) in followList" :key="index">
|
||||
<view class="flex">
|
||||
<view :class="'level '+item.importance">{{item.importance}}</view>
|
||||
<view class="title">{{item.event_title}}</view>
|
||||
</view>
|
||||
<view class="content">{{item.event_description}}</view>
|
||||
<scroll-view scroll-x class="increaseRateList">
|
||||
<view :class="'rateItem '+(getRateUpOrDown(item.related_avg_chg)?'down':'up')">
|
||||
平均涨幅:
|
||||
<image v-if="getRateUpOrDown(item.related_avg_chg)" class="arrow" src="/static/icon/home/downArrow.png" mode="widthFix"></image>
|
||||
<image v-else class="arrow" src="/static/icon/home/upArrow.png" mode="widthFix"></image>
|
||||
{{getRateStr(item.related_avg_chg)}}%
|
||||
</view>
|
||||
<view :class="'rateItem '+(getRateUpOrDown(item.related_max_chg)?'down':'up')">
|
||||
最大涨幅:
|
||||
<image v-if="getRateUpOrDown(item.related_max_chg)" class="arrow" src="/static/icon/home/downArrow.png" mode="widthFix"></image>
|
||||
<image v-else class="arrow" src="/static/icon/home/upArrow.png" mode="widthFix"></image>
|
||||
{{getRateStr(item.related_max_chg)}}%
|
||||
</view>
|
||||
<view :class="'rateItem '+(getRateUpOrDown(item.related_week_chg)?'down':'up')">
|
||||
周涨幅:
|
||||
<image v-if="getRateUpOrDown(item.related_week_chg)" class="arrow" src="/static/icon/home/downArrow.png" mode="widthFix"></image>
|
||||
<image v-else class="arrow" src="/static/icon/home/upArrow.png" mode="widthFix"></image>
|
||||
{{getRateStr(item.related_week_chg)}}%
|
||||
</view>
|
||||
</scroll-view>
|
||||
<scroll-view scroll-x class="stockList">
|
||||
<view class="stockItem" v-for="(sitem,sindex) in item.related_stocks" :key="sindex" @click.stop="clickLookRelatedStockItem(sitem.stock_code)">{{sitem.stock_name}} <text class="change">{{(getRateUpOrDown(sitem.daily_change)?'':'+')+sitem.daily_change}}%</text></view>
|
||||
</scroll-view>
|
||||
<view class="timeToolBarC flex">
|
||||
<view class="time flex1">{{getLocaleTime(item.created_at)}}</view>
|
||||
<view class="toolBarC flex">
|
||||
<view class="toolItem flex">
|
||||
<image class="icon" src="/static/icon/home/browser.png" mode="widthFix"></image>
|
||||
<text>{{item.view_count}}</text>
|
||||
</view>
|
||||
<view class="toolItem flex">
|
||||
<image class="icon" src="/static/icon/home/comment.png" mode="widthFix"></image>
|
||||
<text>{{item.comment_count}}</text>
|
||||
</view>
|
||||
<view class="toolItem flex" @click.stop="clickFollowEvent(item.event_id,index)">
|
||||
<image class="icon" src="/static/icon/home/follow_s.png" mode="widthFix"></image>
|
||||
<text>{{item.follower_count}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { inject } from 'vue';
|
||||
import { userActivityList,followEvent } from '@/request/api';
|
||||
import { getRateStr, getRateUpOrDown, getLocaleTime } from '@/utils/util.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
navH:inject('navHeight'),
|
||||
followList:[],
|
||||
page:1,
|
||||
loadAll:false,
|
||||
getRateStr:getRateStr,
|
||||
getRateUpOrDown:getRateUpOrDown,
|
||||
getLocaleTime:getLocaleTime
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getFollowCollectListData()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.page = 1
|
||||
this.getFollowCollectListData()
|
||||
},
|
||||
onReachBottom() {
|
||||
if(!this.loadAll)
|
||||
{
|
||||
this.page ++
|
||||
this.getFollowCollectListData()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 点击相关股票
|
||||
* @param {Object} code
|
||||
*/
|
||||
clickLookRelatedStockItem(code)
|
||||
{
|
||||
uni.navigateTo({
|
||||
url:'/pages/index/stockDetails/stockDetails?code='+code
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 点击关注事件
|
||||
* @param {Object} id
|
||||
*/
|
||||
clickFollowEvent(id,index)
|
||||
{
|
||||
followEvent(id).then(res=>{
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none'
|
||||
})
|
||||
this.followList.splice(index,1)
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 查看事件详情
|
||||
*/
|
||||
clickEventItem(id)
|
||||
{
|
||||
uni.navigateTo({
|
||||
url:'/pages/index/eventDetails/eventDetails?id='+id
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取关注收藏列表数据
|
||||
*/
|
||||
getFollowCollectListData()
|
||||
{
|
||||
let param = {page:this.page,type:'follows'}
|
||||
userActivityList(param).then(res=>{
|
||||
if (res.code==200) {
|
||||
if(res.data.current_page==1)
|
||||
{
|
||||
this.followList = res.data.activities
|
||||
}else
|
||||
this.followList = this.followList.concat(res.data.activities)
|
||||
|
||||
if(res.data.current_page==res.data.pages)
|
||||
{
|
||||
this.loadAll = true
|
||||
}
|
||||
} else
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none'
|
||||
})
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.topBg
|
||||
{
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.list
|
||||
{
|
||||
background-color: white;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
padding: 0 25rpx;
|
||||
overflow-y: scroll;
|
||||
.item
|
||||
{
|
||||
padding: 30rpx 0;
|
||||
border-bottom: solid 1rpx #E4E4E4;
|
||||
.level
|
||||
{
|
||||
margin-right: 16rpx;
|
||||
width: 50rpx;
|
||||
line-height: 40rpx;
|
||||
border-radius: 10rpx;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
text-align: center;
|
||||
}
|
||||
.level.S
|
||||
{
|
||||
background-color: #CC4C02;
|
||||
}
|
||||
.level.A
|
||||
{
|
||||
background-color: #EC7014;
|
||||
}
|
||||
.level.B
|
||||
{
|
||||
background-color: #FB9A29;
|
||||
}
|
||||
.level.C
|
||||
{
|
||||
background-color: #FEC44F;
|
||||
}
|
||||
.title
|
||||
{
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: #222;
|
||||
}
|
||||
.content
|
||||
{
|
||||
margin-top: 20rpx;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 3;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #666;
|
||||
}
|
||||
.increaseRateList
|
||||
{
|
||||
white-space: nowrap;
|
||||
margin-top: 24rpx;
|
||||
.rateItem
|
||||
{
|
||||
display: inline-block;
|
||||
margin-right: 15rpx;
|
||||
line-height: 44rpx;
|
||||
padding: 0 14rpx;
|
||||
border-radius: 10rpx;
|
||||
font-size: 22rpx;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
.arrow
|
||||
{
|
||||
width: 15rpx;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
.rateItem.up
|
||||
{
|
||||
background-color: #C00000;
|
||||
}
|
||||
.rateItem.down
|
||||
{
|
||||
background-color: #355422;
|
||||
}
|
||||
}
|
||||
.stockList
|
||||
{
|
||||
white-space: nowrap;
|
||||
margin-top: 20rpx;
|
||||
.stockItem
|
||||
{
|
||||
background-color: #F8F8F8;
|
||||
margin-right: 21rpx;
|
||||
display: inline-block;
|
||||
padding: 0 20rpx;
|
||||
line-height: 60rpx;
|
||||
border-radius: 10rpx;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: #222;
|
||||
.change
|
||||
{
|
||||
color: #F97316;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.timeToolBarC
|
||||
{
|
||||
margin-top: 20rpx;
|
||||
.time
|
||||
{
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
color: #aaa;
|
||||
}
|
||||
.toolBarC
|
||||
{
|
||||
.toolItem
|
||||
{
|
||||
padding: 0 20rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
color: #666;
|
||||
.icon
|
||||
{
|
||||
margin-right: 13rpx;
|
||||
width: 29rpx;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
.toolItem:first-child
|
||||
{
|
||||
.icon
|
||||
{
|
||||
margin-right: 15rpx;
|
||||
width: 33rpx;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -3,8 +3,9 @@
|
||||
<navBar leftText="信息完善"></navBar>
|
||||
<image class="topBg absolute" src="/static/image/mine/myTopBg.png" mode="widthFix"></image>
|
||||
<view class="avatarC fixed" :style="'top:'+avatarTop+'px;'">
|
||||
<image class="avatar" src="" mode="aspectFill"></image>
|
||||
<image class="avatar" :src="avatar?avatar:avatarUrl" mode="aspectFill"></image>
|
||||
<image class="icon absolute" src="/static/icon/mine/basicInfo/edit.png" mode="widthFix"></image>
|
||||
<button class="absolute" open-type="chooseAvatar" @chooseavatar="chooseAvatar"></button>
|
||||
</view>
|
||||
<view class="preferenceC fixed" :style="'top:'+contentTop+'px;'">
|
||||
<view class="title">投资偏好设置</view>
|
||||
@@ -40,20 +41,23 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottomC fixed flex">
|
||||
<view class="pre btn">上一步</view>
|
||||
<view class="finish btn flex1">完成</view>
|
||||
<view class="pre btn" @click="clickPre()">上一步</view>
|
||||
<view class="finish btn flex1" @click="clickFinish()">完成</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { inject } from 'vue';
|
||||
import { userInfo, updateInvestPreference } from '@/request/api';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
avatarTop:'',
|
||||
contentTop:'',
|
||||
avatar:'', //选择头像临时地址
|
||||
avatarUrl:'', //已上传的链接
|
||||
investPreferenceList:['长期投资','中短期投资','风险控制型'],
|
||||
selectInvestIndex:-1,
|
||||
stockYearList:['新手入门','1年以内','1-3年','3-5年','5-10年','10年以上'],
|
||||
@@ -68,8 +72,17 @@
|
||||
onLoad() {
|
||||
this.avatarTop = inject('navHeight') + 60/750*inject('windowWidth')
|
||||
this.contentTop = this.avatarTop + 75/750*inject('windowWidth')
|
||||
this.getUserInfoData()
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 点击选择头像
|
||||
* @param {Object} e
|
||||
*/
|
||||
chooseAvatar(e)
|
||||
{
|
||||
this.avatar = e.detail.avatarUrl
|
||||
},
|
||||
/**
|
||||
* 点击选择投资偏好
|
||||
* @param {Object} index
|
||||
@@ -121,6 +134,160 @@
|
||||
clickMarketItem(index)
|
||||
{
|
||||
this.preferredMarketList[index].select = !this.preferredMarketList[index].select;
|
||||
},
|
||||
/**
|
||||
* 点击上一步
|
||||
*/
|
||||
clickPre()
|
||||
{
|
||||
uni.navigateBack()
|
||||
},
|
||||
/**
|
||||
* 点击完成
|
||||
*/
|
||||
clickFinish()
|
||||
{
|
||||
if(this.selectInvestIndex<0)
|
||||
{
|
||||
uni.showToast({
|
||||
title:'请选择投资偏好',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if(this.selectYearIndex<0)
|
||||
{
|
||||
uni.showToast({
|
||||
title:'请选择炒股年限',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if(this.selectRiskIndex<0)
|
||||
{
|
||||
uni.showToast({
|
||||
title:'请选择风险偏好',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if(this.selectScaleIndex<0)
|
||||
{
|
||||
uni.showToast({
|
||||
title:'请选择投资规模',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
let arr = []
|
||||
for (let item of this.preferredMarketList) {
|
||||
if(item.select)
|
||||
{
|
||||
arr.push(item.title)
|
||||
}
|
||||
}
|
||||
if(arr.length==0)
|
||||
{
|
||||
uni.showToast({
|
||||
title:'请选择偏好市场',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if(this.avatar)
|
||||
{
|
||||
//如果选择了新头像
|
||||
let param = {avatar:this.avatar,isFile:1}
|
||||
updateBasicInfo(param).then(res=>{
|
||||
this.uploadInvestPreferenceData()
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
}else
|
||||
this.uploadInvestPreferenceData()
|
||||
},
|
||||
/**
|
||||
* 更新投资偏好设置
|
||||
*/
|
||||
uploadInvestPreferenceData()
|
||||
{
|
||||
let param = {trading_experience: this.selectYearIndex,investment_style: this.investPreferenceList[this.selectInvestIndex],
|
||||
risk_preference: this.riskPreferenceList[this.selectRiskIndex],
|
||||
investment_amount: this.investmentScaleList[this.selectScaleIndex],
|
||||
preferred_markets: arr}
|
||||
updateInvestPreference(param).then(res=>{
|
||||
uni.navigateBack({
|
||||
delta:2
|
||||
})
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取用户偏好设置数据
|
||||
*/
|
||||
getUserInfoData()
|
||||
{
|
||||
userInfo().then(res=>{
|
||||
if(res.code==200)
|
||||
{
|
||||
let data = res.data.investment_preferences
|
||||
//投资偏好
|
||||
for (var i = 0; i < this.investPreferenceList.length; i++) {
|
||||
let item = this.investPreferenceList[i]
|
||||
if(item==data.investment_style)
|
||||
{
|
||||
this.selectInvestIndex = i
|
||||
break
|
||||
}
|
||||
}
|
||||
//炒股年限
|
||||
this.selectYearIndex = data.trading_experience
|
||||
// for (var i = 0; i < this.stockYearList.length; i++) {
|
||||
// let item = this.stockYearList[i]
|
||||
// if(item==data.investment_style)
|
||||
// {
|
||||
// this.selectYearIndex = i
|
||||
// break
|
||||
// }
|
||||
// }
|
||||
//风险偏好
|
||||
for (var i = 0; i < this.riskPreferenceList.length; i++) {
|
||||
let item = this.riskPreferenceList[i]
|
||||
if(item==data.risk_preference)
|
||||
{
|
||||
this.selectRiskIndex = i
|
||||
break
|
||||
}
|
||||
}
|
||||
//投资规模
|
||||
for (var i = 0; i < this.investmentScaleList.length; i++) {
|
||||
let item = this.investmentScaleList[i]
|
||||
if(item==data.investment_amount)
|
||||
{
|
||||
this.selectScaleIndex = i
|
||||
break
|
||||
}
|
||||
}
|
||||
//偏好市场
|
||||
for (let item of this.preferredMarketList) {
|
||||
let arr = JSON.parse(data.preferred_markets)
|
||||
let arr1 = arr[0].split(',')
|
||||
if(arr1.indexOf(item.title)>-1)
|
||||
{
|
||||
item.select = true
|
||||
}else
|
||||
{
|
||||
item.select = false
|
||||
}
|
||||
}
|
||||
}else
|
||||
wx.showToast({
|
||||
title:res.message,
|
||||
})
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -141,7 +308,6 @@
|
||||
width: 150rpx;
|
||||
.avatar
|
||||
{
|
||||
background-color: red;
|
||||
width: 100%;
|
||||
height: 150rpx;
|
||||
border-radius: 50%;
|
||||
@@ -154,6 +320,13 @@
|
||||
width: 40rpx;
|
||||
height: auto;
|
||||
}
|
||||
button
|
||||
{
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
z-index: 10;
|
||||
}
|
||||
.preferenceC
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
<view>
|
||||
<image class="topBg absolute" src="/static/image/mine/myTopBg.png" mode="widthFix"></image>
|
||||
<view class="navTitle fixed" :style="'top:'+menuTop+'px;line-height:'+menuH+'px;'">个人中心</view>
|
||||
<view class="personalInfoC relative flex" :style="'margin-top:'+infoTop+'px;'" @click="clickPersonalInfo()">
|
||||
<image class="avatar" src="" mode="aspectFill"></image>
|
||||
<view v-if="userInfo" class="personalInfoC relative flex" :style="'margin-top:'+infoTop+'px;'" @click="clickPersonalInfo()">
|
||||
<image class="avatar" :src="userInfo.basic_info.avatar_url" mode="aspectFill"></image>
|
||||
<view class="flex1">
|
||||
<view class="nickname">星河滚烫的理想</view>
|
||||
<view class="mobile">手机号:13654800065</view>
|
||||
<view class="nickname">{{userInfo.basic_info.username}}</view>
|
||||
<view class="mobile">手机号:{{userInfo.basic_info.phone}}</view>
|
||||
</view>
|
||||
<image class="arrow" src="/static/icon/mine/infoArrow.png" mode="widthFix"></image>
|
||||
</view>
|
||||
@@ -42,6 +42,7 @@
|
||||
|
||||
<script>
|
||||
import { inject } from 'vue';
|
||||
import { userInfo } from '@/request/api';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -49,6 +50,7 @@
|
||||
menuTop:inject('menuTop'),
|
||||
menuH: inject('menuHeight'),
|
||||
infoTop:'',
|
||||
userInfo:null,
|
||||
menuList:[{
|
||||
icon:'/static/icon/mine/aboutUs.png',
|
||||
title:'关于我们',
|
||||
@@ -79,6 +81,9 @@
|
||||
onLoad() {
|
||||
this.infoTop = inject('navHeight')+32/750*inject('windowWidth')
|
||||
},
|
||||
onShow() {
|
||||
this.getUserInfoData()
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 点击查看个人信息
|
||||
@@ -112,8 +117,15 @@
|
||||
})
|
||||
}else if(index==1)
|
||||
{
|
||||
|
||||
}
|
||||
//关注收藏
|
||||
uni.navigateTo({
|
||||
url:'/pages/mine/followCollect/followCollect'
|
||||
})
|
||||
}else
|
||||
//我的点赞
|
||||
uni.navigateTo({
|
||||
url:'/pages/mine/myLike/myLike'
|
||||
})
|
||||
},
|
||||
clickMenuItem(url)
|
||||
{
|
||||
@@ -123,8 +135,24 @@
|
||||
url
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
/**
|
||||
* 获取用户信息数据
|
||||
*/
|
||||
getUserInfoData()
|
||||
{
|
||||
userInfo().then(res=>{
|
||||
if(res.code==200)
|
||||
{
|
||||
this.userInfo = res.data
|
||||
}else
|
||||
wx.showToast({
|
||||
title:res.message,
|
||||
})
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
185
pages/mine/myLike/myLike.vue
Normal file
185
pages/mine/myLike/myLike.vue
Normal file
@@ -0,0 +1,185 @@
|
||||
<template>
|
||||
<view>
|
||||
<navBar leftText="我的点赞"></navBar>
|
||||
<image class="topBg absolute" src="/static/image/mine/myTopBg.png" mode="widthFix"></image>
|
||||
<view class="list fixed" :style="'top:'+navH+'px;'">
|
||||
<view class="item" v-for="(item,index) in myLikeList" :key="index">
|
||||
<image class="avatar" :src="item.author.avatarurl" mode="aspectFill"></image>
|
||||
<view class="flex1">
|
||||
<view class="nickname">{{item.author.nickname}}</view>
|
||||
<rich-text class="content" :nodes="item.post_content"></rich-text>
|
||||
<view class="timeReplyLikeC flex between">
|
||||
<view class="timeReplyC flex">
|
||||
<view class="time">{{getLocaleHourMinute(item.like_time)}}</view>
|
||||
<!-- <view class="reply">回复</view> -->
|
||||
</view>
|
||||
<view class="likeC flex">
|
||||
<image class="icon" src="/static/icon/home/like_s.png" mode="widthFix"></image>
|
||||
<!-- <view class="num">85</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { inject } from 'vue';
|
||||
import { userActivityList } from '@/request/api';
|
||||
import { getLocaleHourMinute } from '@/utils/util';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
navH:inject('navHeight'),
|
||||
myLikeList:[],
|
||||
page:1,
|
||||
loadAll:false,
|
||||
getLocaleHourMinute:getLocaleHourMinute
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getMyLikeListData()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.page = 1
|
||||
this.getMyLikeListData()
|
||||
},
|
||||
onReachBottom() {
|
||||
if(!this.loadAll)
|
||||
{
|
||||
this.page ++
|
||||
this.getMyLikeListData()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 获取我的点赞列表数据
|
||||
*/
|
||||
getMyLikeListData()
|
||||
{
|
||||
let param = {page:this.page,type:'likes'}
|
||||
userActivityList(param).then(res=>{
|
||||
if (res.code==200) {
|
||||
if(res.data.current_page==1)
|
||||
{
|
||||
this.myLikeList = res.data.activities
|
||||
}else
|
||||
this.myLikeList = this.myLikeList.concat(res.data.activities)
|
||||
|
||||
if(res.data.current_page==res.data.pages)
|
||||
{
|
||||
this.loadAll = true
|
||||
}
|
||||
} else
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none'
|
||||
})
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.topBg
|
||||
{
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.list
|
||||
{
|
||||
background-color: white;
|
||||
margin-top: 10rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
overflow-y: scroll;
|
||||
.item
|
||||
{
|
||||
display: flex;
|
||||
padding: 30rpx 25rpx;
|
||||
border-bottom: solid 1rpx #E4E4E4;
|
||||
.avatar
|
||||
{
|
||||
margin-right: 23rpx;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.nickname
|
||||
{
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #111;
|
||||
}
|
||||
.content
|
||||
{
|
||||
margin-top: 10rpx;
|
||||
line-height: 1.2rem;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #666;
|
||||
}
|
||||
.timeReplyLikeC
|
||||
{
|
||||
.time
|
||||
{
|
||||
margin-right: 36rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: #aaa;
|
||||
}
|
||||
.reply
|
||||
{
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: #F97316;
|
||||
}
|
||||
.likeC
|
||||
{
|
||||
padding: 14rpx 0;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #999;
|
||||
.icon
|
||||
{
|
||||
margin-right: 12rpx;
|
||||
width: 27rpx;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
.likeC.like
|
||||
{
|
||||
color: #F97316;
|
||||
}
|
||||
}
|
||||
.totalCommentNumC
|
||||
{
|
||||
padding: 14rpx 0 22rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: #999;
|
||||
.line
|
||||
{
|
||||
background-color: #aaa;
|
||||
margin-right: 18rpx;
|
||||
width: 30rpx;
|
||||
height: 2rpx;
|
||||
}
|
||||
.arrow
|
||||
{
|
||||
margin-left: 14rpx;
|
||||
width: 13rpx;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -2,43 +2,56 @@
|
||||
<view>
|
||||
<navBar leftText="会员中心"></navBar>
|
||||
<image class="topBg absolute" src="/static/image/mine/myTopBg.png" mode="widthFix"></image>
|
||||
<view class="vipC relative" :style="'margin-top:'+navH+'px;'">
|
||||
<view v-if="memberInfo" class="vipC relative" :style="'margin-top:'+navH+'px;'">
|
||||
<view class="vipInfoC relative">
|
||||
<image class="bg" src="/static/image/mine/vip/noVipTopBg.png" mode="widthFix"></image>
|
||||
<view class="infoC absolute">
|
||||
<image v-if="memberInfo.is_member" class="bg" src="/static/image/mine/vip/vipTopBg.png" mode="widthFix"></image>
|
||||
<image v-else class="bg" src="/static/image/mine/vip/noVipTopBg.png" mode="widthFix"></image>
|
||||
<view v-if="memberInfo.is_member" class="infoC vip absolute">
|
||||
<view class="title">尊贵的VIP会员</view>
|
||||
<view class="tips">会员有效期至:{{memberInfo.member_expire_date}}</view>
|
||||
</view>
|
||||
<view v-else class="infoC absolute">
|
||||
<view class="title">价值前沿</view>
|
||||
<view class="tips">您还不是会员 加入尊享N项服务</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="vipProfitIntroC relative">
|
||||
<view class="titleC flexCenter">
|
||||
<image class="icon" src="/static/icon/mine/vip/titleLeft.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/titleLeft_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/mine/vip/titleLeft.png" mode="widthFix"></image>
|
||||
<view class="title">即刻开启</view>
|
||||
<image class="icon" src="/static/icon/mine/vip/titleRight.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/titleRight_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/mine/vip/titleRight.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="subtitle">HOW TO SUBSCRIBE</view>
|
||||
<view class="stepC flex">
|
||||
<view class="num">01</view>
|
||||
<view class="step">点击微信顶部搜索框,并指定搜索内容为 <text class="impormant">「公众号」</text></view>
|
||||
<view class="step">点击微信顶部搜索框,并指定搜索内容为 <text :class="'impormant '+(memberInfo.is_member?'vip':'')">「公众号」</text></view>
|
||||
</view>
|
||||
<view class="picList flex">
|
||||
<view class="pic flex1">
|
||||
<image class="icon" src="/static/icon/mine/vip/step1.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/step1_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/mine/vip/step1.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="pic flex1">
|
||||
<image class="icon" src="/static/icon/mine/vip/step2.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/step2_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/mine/vip/step2.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="stepC flex">
|
||||
<view class="num">02</view>
|
||||
<view class="step">搜索<text class="impormant">「价值前沿」</text>,并点击搜索结果中的<text class="impormant">「关注」</text></view>
|
||||
<view class="step">搜索
|
||||
<text :class="'impormant '+(memberInfo.is_member?'vip':'')">「价值前沿」</text>,并点击搜索结果中的
|
||||
<text :class="'impormant '+(memberInfo.is_member?'vip':'')">「关注」</text></view>
|
||||
</view>
|
||||
<view class="picList flex">
|
||||
<view class="pic flex1">
|
||||
<image class="icon" src="/static/icon/mine/vip/step3.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/step3_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/mine/vip/step3.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="pic flex1">
|
||||
<image class="icon" src="/static/icon/mine/vip/step4.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/step4_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/mine/vip/step4.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="questionC">
|
||||
@@ -46,16 +59,18 @@
|
||||
<view class="iconListC flex">
|
||||
<image class="icon" src="/static/icon/mine/vip/investQuestion.png" mode="widthFix"></image>
|
||||
<view class="list flex1">
|
||||
<view class="item" v-for="(item,index) in questionList" :key="index">
|
||||
<view :class="'item '+(memberInfo.is_member?'vip':'')" v-for="(item,index) in questionList" :key="index">
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="titleC research flexCenter">
|
||||
<image class="icon" src="/static/icon/mine/vip/titleLeft.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/titleLeft_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/mine/vip/titleLeft.png" mode="widthFix"></image>
|
||||
<view class="title">行业研究中心</view>
|
||||
<image class="icon" src="/static/icon/mine/vip/titleRight.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/titleRight_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/mine/vip/titleRight.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="subtitle">20余年专业投研,赋能每一位投资者</view>
|
||||
<view class="introC">
|
||||
@@ -63,8 +78,10 @@
|
||||
<image class="icon" src="/static/icon/mine/vip/industrialResearch.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="titleC decision flexCenter">
|
||||
<image class="icon" src="/static/icon/mine/vip/titleLeft.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/titleLeft_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/mine/vip/titleLeft.png" mode="widthFix"></image>
|
||||
<view class="title">经营决策中心</view>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/titleRight_v.png" mode="widthFix"></image>
|
||||
<image class="icon" src="/static/icon/mine/vip/titleRight.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="subtitle">数据洞察,辅助每一个关键判断</view>
|
||||
@@ -73,14 +90,16 @@
|
||||
<image class="icon" src="/static/icon/mine/vip/operatingDecision.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="titleC privilege flexCenter">
|
||||
<image class="icon" src="/static/icon/mine/vip/titleLeft.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/titleLeft_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/mine/vip/titleLeft.png" mode="widthFix"></image>
|
||||
<view class="title">会员尊享特权</view>
|
||||
<image class="icon" src="/static/icon/mine/vip/titleRight.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/titleRight_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/mine/vip/titleRight.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="subtitle">数据洞察,辅助每一个关键判断</view>
|
||||
<view class="privilegeList flexWrap">
|
||||
<view :class="'privilegeList flexWrap '+(memberInfo.is_member?'vip':'')">
|
||||
<view class="item flexColumnCenter" v-for="(item,index) in privilegeList" :key="index">
|
||||
<image class="icon" :src="item.icon" mode="widthFix"></image>
|
||||
<image class="icon" :src="(memberInfo.is_member?item.icon_v:item.icon)" mode="widthFix"></image>
|
||||
<view class="title">{{item.title}}</view>
|
||||
<view class="tips">{{item.tips}}</view>
|
||||
</view>
|
||||
@@ -95,61 +114,72 @@
|
||||
|
||||
<script>
|
||||
import { inject } from 'vue';
|
||||
import { membershipStatus } from '@/request/api';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
navH:inject('navHeight'),
|
||||
memberInfo:null, //会员信息
|
||||
questionList:['信息纷杂难辨真伪?','信息纷杂难辨真伪?','无法把握宏观趋势与行业动向?'],
|
||||
privilegeList:[{
|
||||
icon:'/static/icon/mine/vip/depthReport.png',
|
||||
icon_v:'/static/icon/mine/vip/depthReport_v.png',
|
||||
title:'深度研报',
|
||||
tips:'行业/公司独家分析'
|
||||
},
|
||||
{
|
||||
icon:'/static/icon/mine/vip/strategicInsight.png',
|
||||
icon_v:'/static/icon/mine/vip/strategicInsight_v.png',
|
||||
title:'策略洞察',
|
||||
tips:'赛道趋势+拐点信号'
|
||||
},
|
||||
{
|
||||
icon:'/static/icon/mine/vip/dataTool.png',
|
||||
icon_v:'/static/icon/mine/vip/dataTool_v.png',
|
||||
title:'数据工具',
|
||||
tips:'行业/公司独家分析'
|
||||
},
|
||||
{
|
||||
icon:'/static/icon/mine/vip/dataTool.png',
|
||||
icon_v:'/static/icon/mine/vip/intelligentScreening_v.png',
|
||||
title:'智能筛选',
|
||||
tips:'按需定制标的列表'
|
||||
},
|
||||
{
|
||||
icon:'/static/icon/mine/vip/decisionSupport.png',
|
||||
icon_v:'/static/icon/mine/vip/decisionSupport_v.png',
|
||||
title:'决策辅助',
|
||||
tips:'关键因子评分系统'
|
||||
},
|
||||
{
|
||||
icon:'/static/icon/mine/vip/expertMeeting.png',
|
||||
icon_v:'/static/icon/mine/vip/expertMeeting_v.png',
|
||||
title:'专家闭门会',
|
||||
tips:'深度交流机会'
|
||||
},
|
||||
{
|
||||
icon:'/static/icon/mine/vip/dailyReport.png',
|
||||
icon_v:'/static/icon/mine/vip/dailyReport_v.png',
|
||||
title:'日报周报',
|
||||
tips:'研判速递、节奏掌控'
|
||||
},
|
||||
{
|
||||
icon:'/static/icon/mine/vip/specialColumn.png',
|
||||
icon_v:'/static/icon/mine/vip/specialColumn_v.png',
|
||||
title:'专题专栏',
|
||||
tips:'核心团队观点集结'
|
||||
},
|
||||
{
|
||||
icon:'/static/icon/mine/vip/continuouslyUnlock.png',
|
||||
icon_v:'/static/icon/mine/vip/continuouslyUnlock_v.png',
|
||||
title:'持续解锁',
|
||||
tips:'不定期上线新功能'
|
||||
}]
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
this.getMemberStatus()
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
@@ -160,6 +190,23 @@
|
||||
uni.navigateTo({
|
||||
url:'/pages/mine/vipMeal/vipMeal'
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取会员状态
|
||||
*/
|
||||
getMemberStatus()
|
||||
{
|
||||
membershipStatus().then(res=>{
|
||||
if (res.code==200) {
|
||||
this.memberInfo = res.data
|
||||
} else
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none'
|
||||
})
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -201,6 +248,17 @@
|
||||
color: #65758A;
|
||||
}
|
||||
}
|
||||
.infoC.vip
|
||||
{
|
||||
.title
|
||||
{
|
||||
color: #AB3D1A;
|
||||
}
|
||||
.tips
|
||||
{
|
||||
color: #AB3D1A;
|
||||
}
|
||||
}
|
||||
}
|
||||
.vipProfitIntroC
|
||||
{
|
||||
@@ -264,6 +322,10 @@
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
.impormant.vip
|
||||
{
|
||||
color: #F97316;
|
||||
}
|
||||
}
|
||||
}
|
||||
.picList
|
||||
@@ -316,6 +378,11 @@
|
||||
color: #555;
|
||||
text-align: center;
|
||||
}
|
||||
.item.vip
|
||||
{
|
||||
background-color: #FFEBDB;
|
||||
color: #F97316;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -376,6 +443,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.privilegeList.vip
|
||||
{
|
||||
box-shadow: 0px 0px 9px 0px rgba(249,115,22,0.4);
|
||||
}
|
||||
.bottomTitle
|
||||
{
|
||||
margin-top: 80rpx;
|
||||
|
||||
@@ -2,21 +2,28 @@
|
||||
<view>
|
||||
<navBar leftText="会员中心"></navBar>
|
||||
<image class="topBg absolute" src="/static/image/mine/myTopBg.png" mode="widthFix"></image>
|
||||
<view class="vipC" :style="'margin-top:'+navH+'px;'">
|
||||
<view v-if="memberInfo" class="vipC" :style="'margin-top:'+navH+'px;'">
|
||||
<view class="vipInfoC relative">
|
||||
<image class="bg" src="/static/image/mine/vip/noVipTopBg.png" mode="widthFix"></image>
|
||||
<view class="infoC absolute">
|
||||
<image v-if="memberInfo.is_member" class="bg" src="/static/image/mine/vip/vipTopBg.png" mode="widthFix"></image>
|
||||
<image v-else class="bg" src="/static/image/mine/vip/noVipTopBg.png" mode="widthFix"></image>
|
||||
<view v-if="memberInfo.is_member" class="infoC vip absolute">
|
||||
<view class="title">尊贵的VIP会员</view>
|
||||
<view class="tips">会员有效期至:{{memberInfo.member_expire_date}}</view>
|
||||
</view>
|
||||
<view v-else class="infoC absolute">
|
||||
<view class="title">价值前沿</view>
|
||||
<view class="tips">您还不是会员 加入尊享N项服务</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="privilegeCompareC relative">
|
||||
<view class="titleC flexCenter">
|
||||
<image class="icon" src="/static/icon/mine/vip/titleLeft.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/titleLeft_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/mine/vip/titleLeft.png" mode="widthFix"></image>
|
||||
<view class="title">特权对比</view>
|
||||
<image class="icon" src="/static/icon/mine/vip/titleRight.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/titleRight_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/mine/vip/titleRight.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="privilegeList">
|
||||
<view :class="'privilegeList '+(memberInfo.is_member?'vip':'')">
|
||||
<view class="header flex">
|
||||
<view class="privilege item">专属特权</view>
|
||||
<view class="item free">普通免费</view>
|
||||
@@ -45,20 +52,25 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="joinVipC fixed" @click="clickJoinVip()">立即加入年度VIP</view>
|
||||
<view v-if="memberInfo" class="joinVipC fixed" @click="clickJoinVip()">{{memberInfo.is_member?'您已是年度VIP':'立即加入年度VIP'}}</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { inject } from 'vue';
|
||||
import { membershipStatus } from '@/request/api';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
navH:inject('navHeight'),
|
||||
memberInfo:null, //会员信息
|
||||
privilegeList:['高效选股工具','股票基金明星榜单','定期专属晨报、股票动态','独家产业研报','个股产业分析','股票、基金基础指标','7x24 财经直播']
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getMemberStatus()
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 点击加入vip
|
||||
@@ -66,6 +78,23 @@
|
||||
clickJoinVip()
|
||||
{
|
||||
|
||||
},
|
||||
/**
|
||||
* 获取会员状态
|
||||
*/
|
||||
getMemberStatus()
|
||||
{
|
||||
membershipStatus().then(res=>{
|
||||
if (res.code==200) {
|
||||
this.memberInfo = res.data
|
||||
} else
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none'
|
||||
})
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -107,6 +136,17 @@
|
||||
color: #65758A;
|
||||
}
|
||||
}
|
||||
.infoC.vip
|
||||
{
|
||||
.title
|
||||
{
|
||||
color: #AB3D1A;
|
||||
}
|
||||
.tips
|
||||
{
|
||||
color: #AB3D1A;
|
||||
}
|
||||
}
|
||||
}
|
||||
.privilegeCompareC
|
||||
{
|
||||
@@ -203,7 +243,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.privilegeList.vip
|
||||
{
|
||||
box-shadow: 0px 0px 9px 0px rgba(249,115,22,0.4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user