2.4 组件结构调整,调整会员权限判断
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
<view v-if="selectCategory==0" class="targetList">
|
||||
<view class="item" v-for="(item,index) in targetList" :key="index" @click="clickStockItem(item.stock_code)">
|
||||
<view class="nameCodePriceC flex">
|
||||
<view class="flex1">
|
||||
<view class="flex1" @click.stop="clickStockName(item.stock_code)">
|
||||
<view class="name">{{item.stock_name}}</view>
|
||||
<view class="code">{{item.stock_code}}</view>
|
||||
</view>
|
||||
@@ -56,7 +56,7 @@
|
||||
<view class="content">{{item.description}}</view>
|
||||
<view class="hotStockC flex">
|
||||
<view class="title">热门个股</view>
|
||||
<view v-if="memberInfo&&memberInfo.is_member&&memberInfo.subscription_type=='pro'" class="stockList flex">
|
||||
<view v-if="memberInfo&&memberInfo.is_member&&(memberInfo.subscription_type=='pro'||memberInfo.subscription_type=='max')" class="stockList flex">
|
||||
<view class="stockItem" v-for="(sitem,sindex) in item.stocks.slice(0,3)" :key="sindex">{{sitem.name}}</view>
|
||||
<view class="more" @click.stop="clickStockMore(item)">+{{item.stock_count-3}}更多</view>
|
||||
</view>
|
||||
@@ -397,7 +397,9 @@
|
||||
this.getEventCommentListData()
|
||||
}
|
||||
},
|
||||
|
||||
onShow() {
|
||||
this.getMemberStatusData()
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 复制标题
|
||||
@@ -488,6 +490,20 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击股票名称查看个股详情
|
||||
* @param {Object} code
|
||||
*/
|
||||
clickStockName(code)
|
||||
{
|
||||
if(code.indexOf('.')>-1)
|
||||
{
|
||||
code = code.split('.')[0]
|
||||
}
|
||||
uni.navigateTo({
|
||||
url:'/pagesStock/stockCenterDetails/stockCenterDetails?code='+code
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 点击查看股票详情
|
||||
*/
|
||||
@@ -757,7 +773,28 @@
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取会员状态
|
||||
*/
|
||||
getMemberStatusData()
|
||||
{
|
||||
let token = uni.getStorageSync('token')
|
||||
if (!token) {
|
||||
return
|
||||
}
|
||||
membershipStatus().then(res=>{
|
||||
if (res.code==200) {
|
||||
this.memberInfo = res.data
|
||||
} else
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none'
|
||||
})
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user