Commit 28665836 authored by jiaoyahui's avatar jiaoyahui

对接接口

parent 2354540c
......@@ -7,53 +7,61 @@ import http from '../utils/http'
// get请求
const testApi = {
getListAPI(params) {
return http.get('/api/joke/list', params)
},
postFormAPI(params) {
return http.post('/api/user/reg', params)
},
//策略列表/invest/admin/pc/smart/product/{id}
getListAPI(params) {
return http.get('/api/joke/list', params)
},
postFormAPI(params) {
return http.post('/api/user/reg', params)
},
//策略列表/invest/admin/pc/smart/product/{id}
getstrge(params) {
return http.post('/invest/admin/pc/smart/product-list', params)
return http.post('/invest/admin/pc/smart/product-list', params)
},
//策略详情
// getproduct_strge(params,id) {
// return http.get('/invest/admin/pc/smart/product/2', params)
// },
//今日入选
getselectedToday(params) {
return http.post('/invest/admin/pc/smart/selectedToday', params)
},
//历史战绩
historicalRecord(params) {
return http.post('/invest/admin/pc/smart/historicalRecord', params)
},
//历史战绩
pageStockProfitLogList(params) {
return http.post('/invest/admin/pc/smart/pageStockProfitLogList', params)
// getproduct_strge(params,id) {
// return http.get('/invest/admin/pc/smart/product/2', params)
// },
//今日持仓
getselectedToday(params) {
return http.post('/invest/admin/pc/smart/stockInfo', params)
},
//历史战绩
historicalRecord(params) {
return http.post('/invest/admin/pc/smart/historicalRecord', params)
},
//历史战绩
pageStockProfitLogList(params) {
return http.post('/invest/admin/pc/smart/pageStockProfitLogList', params)
},
//AI账户首页收益接口
followaccount(data){
return http.post('/invest/admin/pc/followaccount/queryFollowAccountNewYields', data)
followaccount(data) {
return http.post('/invest/admin/pc/followaccount/queryFollowAccountNewYields', data)
},
//跟投产品详情
productDetail(data){
return http.post('/newcrm/open/vip/product/detail', data)
productDetail(data) {
return http.post('/newcrm/open/vip/product/detail', data)
},
//兑换产品
exchangeProduct(data){
return http.post('/open/vip/product/exchange/product', data)
exchangeProduct(data) {
return http.post('/open/vip/product/exchange/product', data)
},
//异动点评列表
queryFollowAccountReviews(data){
return http.post('/invest/admin/pc/followaccount/queryFollowAccountReviews', data)
queryFollowAccountReviews(data) {
return http.post('/invest/admin/pc/followaccount/queryFollowAccountReviews', data)
},
//解锁订阅
newcrmqueryproduct(data) {
return http.post('/newcrm/open/vip/product/exchange/product', data)
},
//产品周期
detail(data) {
return http.post('/newcrm/open/vip/product/detail', data)
},
};
......
......@@ -20,7 +20,7 @@ service.interceptors.request.use(config => {
config.data = JSON.stringify(config.data); //数据转化,也可以使用qs转换
config.headers = {
'Content-Type':'application/json' ,//配置请求头
'Authorization': 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJleHAiOjE3MjY1Mzk4MjksInN1YiI6IjQ4MjY2NiIsImlhdCI6MTcyNTkzNTAyOX0.DMmSGiAtf4h_mu8mtjUz-f67efeYz4sedzJNaoFnkFicBuAdZM_6fjuAhl5OCum77lrFSMORtc_qst3l06MjLQ'
'Authorization': 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJleHAiOjE3MjY2NTY2NjUsInN1YiI6IjQ4MjY2NiIsImlhdCI6MTcyNjA1MTg2NX0.obv2AOw311MIF_Wx9ese0IS4BhE3CY3hEy7NFi17VovEc24hpQw-i8_ZaftK6NKd_AY0Q0bfU62I-wEGGiNx_Q'
}
//如有需要:注意使用token的时候需要引入cookie方法或者用本地localStorage等方法,推荐js-cookie
//const token = getCookie('名称');//这里取token之前,你肯定需要先拿到token,存一下
......
<template>
<div class="contain">
<van-nav-bar
title="历史战绩"
left-text=""
left-arrow
@click-left="onClickLeft"
/>
<div style="width: 500px">
<div>
<div class="plog">
<div class="oul">
<div>股票代码</div>
<div>
⼊选⽇期
<img
src="../../assets/bottom.png"
alt=""
class="oimg_sent"
v-if="is_show"
@click="tab_omg"
/>
<img
src="../../assets/top.png"
alt=""
class="oimg_sent"
v-if="isshow"
@click="tab_img"
/>
<van-nav-bar title="" left-text="" left-arrow @click-left="onClickLeft" />
</div>
<div class="scrop">
<div class="plog" v-if="isBuyShow == 2">
<div class="oul">
<div>股票代码</div>
<div>
⼊选⽇期
<img
src="../../assets/bottom.png"
alt=""
class="oimg_sent"
v-if="is_show"
@click="tab_img('createdTime:desc')"
/>
<img
src="../../assets/top.png"
alt=""
class="oimg_sent"
v-if="isshow"
@click="tab_img_two('createdTime:asc')"
/>
</div>
<div>⼊选价格</div>
<div>
⼊选后最⾼涨幅
<img
src="../../assets/top.png"
alt=""
class="oimg_sent"
v-if="s_show"
@click="tab_sel('maxRise:asc')"
/>
<img
src="../../assets/bottom.png"
alt=""
class="oimg_sent"
v-if="l_show"
@click="tab_let('maxRise:desc')"
/>
</div>
<div>持仓天数</div>
</div>
<div>⼊选价格</div>
<div>
⼊选后最⾼涨幅
<img
src="../../assets/top.png"
alt=""
class="oimg_sent"
v-if="s_show"
@click="tab_sel"
/>
<img
src="../../assets/bottom.png"
alt=""
class="oimg_sent"
v-if="l_show"
@click="tab_let"
/>
<ul class="user_ul">
<li
class="name"
v-for="(item, index) in user_codeName"
:key="index"
>
<div class="price">
<div>{{ item.codeName }}</div>
<div>{{ item.code }}</div>
</div>
<div class="se_data">{{ item.createdTime }}</div>
<div class="se_data">{{ item.price }}</div>
<div class="se_data_p">{{ item.maxRise }}</div>
<div class="se_data_t">{{ item.positionDay }}</div>
</li>
</ul>
</div>
<div>持仓天数</div>
</div>
<ul class="user_ul">
<li class="name">
<div class="price">
<div>三祥新材</div>
<div>999</div>
</div>
<div class="se_data">2024-08-28</div>
<div class="se_data">14.5</div>
<div class="se_data_p">+7.71%</div>
<div class="se_data_t">2</div>
</li>
<li class="name">
<div class="price">
<div>三祥新材</div>
<div>999</div>
<!-- // 已购买 -->
<div class="plog" v-if="isBuyShow == 1">
<div class="oul">
<div>
买入⽇期
<img
src="../../assets/bottom.png"
alt=""
class="oimg_sent"
v-if="time_bottom_is_show"
@click="time_bottom('buyingTime:desc')"
/>
<img
src="../../assets/top.png"
alt=""
class="oimg_sent"
v-if="time_top_is_show"
@click="time_top('buyingTime:asc')"
/>
</div>
<div class="se_data">2024-08-28</div>
<div class="se_data">14.5</div>
<div class="se_data_p">+7.71%</div>
<div class="se_data_t">2</div>
</li>
</ul>
</div>
<div class="plog_p">
<div class="oul">
<div>
买入⽇期
<img
src="../../assets/bottom.png"
alt=""
class="oimg_sent"
v-if="is_show"
@click="tab_omg"
/>
<img
src="../../assets/top.png"
alt=""
class="oimg_sent"
v-if="isshow"
@click="tab_img"
/>
</div>
<div>
卖出⽇期
<img
src="../../assets/bottom.png"
alt=""
class="oimg_sent"
v-if="is_show"
@click="tab_omg"
/>
<img
src="../../assets/top.png"
alt=""
class="oimg_sent"
v-if="isshow"
@click="tab_img"
/>
</div>
<div>股票代码</div>
卖出日期
<img
src="../../assets/top.png"
alt=""
class="oimg_sent"
v-if="shop_top_is_show"
@click="shop_top('sellingTime:asc')"
/>
<img
src="../../assets/bottom.png"
alt=""
class="oimg_sent"
v-if="shop_bottom_is_show"
@click="shop_bottom('sellingTime:desc')"
/>
</div>
<div>股票代码</div>
<div>股票名称</div>
<div>盈亏金额</div>
<div>盈亏比例</div>
<!-- <div>
⼊选后最⾼涨幅
<img
src="../../assets/top.png"
alt=""
class="oimg_sent"
v-if="s_show"
@click="tab_sel"
/>
<img
src="../../assets/bottom.png"
alt=""
class="oimg_sent"
v-if="l_show"
@click="tab_let"
/>
</div> -->
<div>持仓天数</div>
<div>持仓天数</div>
</div>
<div>
<ul class="user_ul">
<li class="name" v-for="(item, index) in pageStockPro" :key="index">
<div class="se_data">{{ item.buyingTime }}</div>
<div class="se_data">{{ item.sellingTime }}</div>
<div class="se_data">{{ item.code }}</div>
<div class="se_data">{{ item.name }}</div>
<div class="se_data_p">{{ item.profitRatio }}</div>
<div class="se_data_p">{{ item.profitPrice / 100 }}%</div>
<div class="se_data_t">{{ item.holdingDays }}</div>
</li>
</ul>
</div>
</div>
<ul class="user_ul">
<li class="name">
<div class="price">
<div>三祥新材</div>
<div>999</div>
</div>
<div class="se_data">2024-08-28</div>
<div class="se_data">14.5</div>
<div class="se_data_p">+7.71%</div>
<div class="se_data_t">2</div>
</li>
<li class="name">
<div class="price">
<div>三祥新材</div>
<div>999</div>
</div>
<div class="se_data">2024-08-28</div>
<div class="se_data">14.5</div>
<div class="se_data_p">+7.71%</div>
<div class="se_data_t">2</div>
</li>
</ul>
</div>
</div>
</div>
</template>
......@@ -174,77 +141,133 @@ export default {
is_show: false,
s_show: true,
l_show: false,
pageNo:1,
pageSize:10,
codeName:'',
pageStockPro:[]
pageNo: 1,
pageSize: 10,
user_codeName: "",
createdTime: "",
pageStockPro: [],
orderBy: "createdTime:desc",
isBuyShow: 0,
// orderBy:"createdTime:desc"
time_bottom_is_show: true,
time_top_is_show: false,
shop_top_is_show: false,
shop_bottom_is_show: true,
yimai_orderBy: "buyingTime:desc",
};
},
created() {
this.detInfo = this.$route.query.detInfo ;
localStorage.getItem('detInfo',this.detInfo)
// this.detInfo = this.$route.query.detInfo ;
// localStorage.getItem('detInfo',this.detInfo)
this.detInfo = JSON.parse(localStorage.getItem("detInfo"));
},
mounted() {
this.get_elected()
this.get_Pro()
this.isBuyShow = this.detInfo.isBuy;
if (this.detInfo.isBuy == 2) {
this.get_elected(); //未购买
} else {
this.get_Pro(); //已购买
}
},
methods: {
get_elected(){
let params={
productId:this.detInfo.id,
pageNo:this.pageNo,
pageSize:this.pageSize
}
this.server.historicalRecord(params).then(res=>{
if(res.data.code == 200){
this.codeName = res.data.data.list
}
})
//未购买---------------开始
get_elected() {
let params = {
productId: this.detInfo.id,
pageNo: this.pageNo,
pageSize: this.pageSize,
orderBy: this.orderBy,
};
this.server.historicalRecord(params).then((res) => {
if (res.data.code == 200) {
this.user_codeName = res.data.data.list;
this.pageNum = res.data.data.pageNum;
this.pageSize = res.data.data.pageSize;
this.total = res.data.data.total;
this.totalPage = res.data.data.totalPage;
console.log(this.totalPage, "pppl");
}
});
},
get_Pro(){
let params={
marketId:this.detInfo.marketId,
pageNo:this.pageNo,
pageSize:this.pageSize
}
this.server.pageStockProfitLogList(params).then(res=>{
if(res.data.code == 200){
this.pageStockPro = res.data.data.list
}
})
},
onClickLeft() {
localStorage.getItem('detInfo',this.detInfo)
this.$router.push({
path: '../strategy',
query: {detInfo : this.detInfo }
})
tab_img: function (orderBy) {
this.isshow = true;
this.is_show = false;
this.orderBy = orderBy;
this.get_elected();
},
tab_img: function () {
tab_img_two: function (orderBy) {
this.isshow = false;
this.is_show = true;
this.orderBy = orderBy;
this.get_elected();
},
tab_omg: function () {
this.isshow = true;
this.is_show = false;
},
tab_sel: function () {
tab_sel: function (orderBy) {
this.s_show = false;
this.l_show = true;
this.orderBy = orderBy;
this.get_elected();
},
tab_let: function () {
tab_let: function (orderBy) {
this.s_show = true;
this.l_show = false;
this.orderBy = orderBy;
this.get_elected();
},
//未购买---------------结束
//已购买---------------开始
get_Pro() {
let params = {
marketId: this.detInfo.marketId,
pageNo: this.pageNo,
pageSize: this.pageSize,
orderBy: this.yimai_orderBy,
};
this.server.pageStockProfitLogList(params).then((res) => {
if (res.data.code == 200) {
this.pageStockPro = res.data.data.list;
this.pageNum = res.data.data.pageNum;
this.pageSize = res.data.data.pageSize;
this.total = res.data.data.total;
this.totalPage = res.data.data.totalPage;
console.log(this.totalPage, "pppl");
}
});
},
time_bottom: function (orderBy) {
this.time_bottom_is_show = false;
this.time_top_is_show = true;
this.yimai_orderBy = orderBy;
this.get_Pro();
},
time_top: function (orderBy) {
this.time_bottom_is_show = true;
this.time_top_is_show = false;
this.yimai_orderBy = orderBy;
this.get_Pro();
},
shop_top: function (orderBy) {
this.shop_top_is_show = false;
this.shop_bottom_is_show = true;
this.yimai_orderBy = orderBy;
this.get_Pro();
},
shop_bottom: function (orderBy) {
this.shop_top_is_show = true;
this.shop_bottom_is_show = false;
this.yimai_orderBy = orderBy;
this.get_Pro();
},
//已购买---------------结束
onClickLeft() {
// localStorage.getItem('detInfo',this.detInfo)
this.$router.push({
path: "../strategy",
// query: {detInfo : this.detInfo }
});
},
},
components: {},
......@@ -253,24 +276,45 @@ export default {
<style scoped>
.oul {
width: 100%;
display: flex;
justify-content: space-around;
margin-top: 10px;
padding-top: 14px;
border-bottom: 1px solid #d5d8db;
padding-bottom: 21px;
/* padding-left: 10px; */
margin-left: 6px;
padding-left: 6px;
margin-right: 6px;
border: 1px solid red;
/* width: 436px; */
background: rgb(241, 238, 238);
position: fixed;
top: 46px;
left: 0%;
/* line-height: 28px; */
/* height: 40px;
}
.scrop{
/* width: 435px; */
overflow-x: scroll;
white-space: nowrap;
border: 1px solid red;
/* height: 200px; */
}
.contain {
position: relative;
width: 100%;
}
.plog {
position: fixed;
top: 83px;
width: 100%;
/* position: fixed;
top: 40px;
left: 0%; */
width: 500px;
/* width: 334px;
overflow-x: scroll;
white-space: nowrap; */
}
.plog_p{
.plog_p {
position: fixed;
top: 283px;
width: 100%;
......@@ -294,7 +338,6 @@ export default {
display: flex;
-webkit-box-adivgn: center;
-webkit-adivgn-items: center;
height: 58px;
}
::v-deep .van-nav-bar__title {
......@@ -311,11 +354,11 @@ export default {
border-bottom: 1px solid #d5d8db;
display: flex;
line-height: 27px;
margin-top: 7px;
}
.user_ul {
margin-top: 52px;
border-bottom: 1px solid #d5d8db;
margin-left: 6px;
margin-right: 6px;
......@@ -331,30 +374,33 @@ export default {
margin-left: 1px;
}
.se_data {
width:18%;
width: 18%;
line-height: 41px;
text-align:center;
text-align: center;
}
.se_data_p {
text-align:center;
text-align: center;
color: red;
line-height: 41px;
width:28%
width: 28%;
}
.se_data_t{
width:16%;
text-align:center;
line-height: 41px;
.se_data_t {
width: 16%;
text-align: center;
line-height: 41px;
}
.price{
text-align: center;
.price {
text-align: center;
width: 17%;
}
::v-deep .van-nav-bar__title {
max-width: 60%;
margin: 0 auto;
font-size: 16px;
font-weight: bolder;
color: white !important;
max-width: 60%;
margin: 0 auto;
font-size: 16px;
font-weight: bolder;
color: white !important;
}
.sent{
margin-top: 10px;
}
</style>
......@@ -27,37 +27,36 @@
/>
</div>
<div class="data_time">今日入选</div>
<div class="data_time">当前持仓</div>
<div>
<div class="nav">
<div>股票代码</div>
<div>⼊选时间</div>
<div>⼊选价格</div>
<div>买入时间</div>
<div>成本价格</div>
<div>涨跌幅</div>
</div>
<div class="p_alog">
<div class="oul" v-for="(item,index) in codeName" :key="index">
<div class="odiv">
<div>{{item.codeName}}</div>
<div>{{item.name}}</div>
<div>{{item.code}}</div>
</div>
<div class="odiv">{{item.createTime}}</div>
<div class="odiv_p">{{item.price}}</div>
<div class="odiv">{{item.createdTime}}</div>
<div class="odiv_p">{{item.cost}}</div>
<div class="odiv">{{item.profitLossRatio}}</div>
</div>
<div class="user_con">
<div class="user_con" v-if="detInfo.isBuy == 2">
<div class="sent">
<img
src="../../assets/sure.png"
alt=""
style="width:8%; height: 36px
margin-left:38%;"
/>
</div>
<van-button type="danger">解锁订阅</van-button>
<van-button type="danger" @click="tab_a">解锁订阅</van-button>
</div>
</div>
......@@ -78,28 +77,121 @@
</div>
<!-- <div class="uaser_a">
<img src="../../assets/jian.png" alt="" class="tab_img">
<div class="cont">紫天科技</div>
<div class="cont_p">97.06%</div>
<div class="cont_sent">⼊选最⾼涨幅</div>
</div>
<div class="uaser_a">
<div class="cont">紫天科技</div>
<div class="cont_p">97.06%</div>
<div class="cont_sent">⼊选最⾼涨幅</div>
</div>
<div class="uaser_a">
<div class="cont">紫天科技</div>
<div class="cont_p">97.06%</div>
<div class="cont_sent">⼊选最⾼涨幅</div>
</div> -->
</div>
<img
src=""
alt=""
style="width: 100%; height: 200px; border: 1px solid red"
style="width: 100%; height: 200px; "
/>
<div>
<!-- 弹出层 -->
<van-popup v-model="show" position="bottom" :style="{ height: '70%' }">
<div class="popup-title">
<span style="font-size: 0.5rem; font-weight: bold">热点精选</span
><span style="font-size: 0.4rem; color: gray; margin-left: 0.3rem"
>智能策略</span
>
<span style="font-size: 0.3rem; color: gray; display: block"
>热点股票强度深度建模后优选好股票</span
>
</div>
<div class="popup-title" style="margin-bottom: 0.5rem">
<span style="font-size: 0.4rem">产品周期</span>
</div>
<div
style="font-size: 0.3rem; height: 3rem; width: 90%; margin: 0 auto"
>
<van-radio-group @change="clickBox" v-model="radio2">
<div
class="checkBox"
v-for="(i, index) in checkList"
:key="index"
>
<van-radio
:name="index"
icon-size="12px"
checked-color="#ee0a24"
:value="i.point"
>{{ i.countName }}</van-radio
><span class="usePoint">{{ i.point }}</span
><span class="usePointTwo">积分</span>
</div>
</van-radio-group>
</div>
<div class="checkBoxTwo" style="margin-bottom: 0.5rem; color: black">
<span style="font-size: 0.4rem">当前积分</span
><span class="usePointThree">{{ crmIntegral }}</span
><span class="usePointFour">积分</span>
</div>
<div v-if="ifexchange" class="exchange">
<span @click="sure">立即兑换1 </span>
</div>
<div v-if="!ifexchange" class="exchangeTwo">
<span>立即兑换</span>
</div>
</van-popup>
<!-- 弹出层 声明-->
<van-popup v-model="po_show" position="bottom" :style="{}">
<div class="b_user" v-if="is_showlive">
<div class="text_p">免责声明</div>
<div class="user_p">
<div
ref="scrollContainer"
style="overflow-y: auto; height: 200px; position: relative"
@scroll="checkScroll"
>
<!-- 这里是长内容 -->
<p>
这是第哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈啊哈哈哈哈哈哈哈行内容
这是第哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈啊哈哈哈哈哈哈哈行内容
这是第哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈啊哈哈哈哈哈哈哈行内容
这是第哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈啊哈哈哈哈哈哈哈行内容
这是第哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈啊哈哈哈哈哈哈哈行内容
这是第哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈啊哈哈哈哈哈哈哈行内容
这是第哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈啊哈哈哈哈哈哈哈行内容
这是第哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈啊哈哈哈哈哈哈哈行内容
这是第哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈啊哈哈哈哈哈哈哈行内容
这是第哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈啊哈哈哈哈哈哈哈行内容
这是第哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈啊哈哈哈哈哈哈哈行内容
这是第哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈啊哈哈哈哈哈哈哈行内容
这是第哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈啊哈哈哈哈哈哈哈行内容
这是第哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈啊哈哈哈哈哈哈哈行内容
这是第哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈啊哈哈哈哈哈哈哈行内容
这是第哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈啊哈哈哈哈哈哈哈行内容
这是第哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈啊哈哈哈哈哈哈哈行内容
这是第哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈啊哈哈哈哈哈哈哈行内容
这是第哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈啊哈哈哈哈哈哈哈行内容
这是第哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈啊哈哈哈哈哈哈哈行内容
这是第哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈啊哈哈哈哈哈哈哈行内容
这是第哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈啊哈哈哈哈哈哈哈行内容
这是第哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈啊哈哈哈哈哈哈哈行内容
</p>
</div>
<div>
<!-- 点击 -->
<button
type="default"
v-if="isshowButton"
@click="is_scrollToTop"
class="bu_p"
>
下滑至底部并同意
</button>
<button
type="default"
v-if="showButton"
@click="scrollToTop()"
class="con_P"
>
我已知晓并同意
</button>
</div>
</div>
</div>
</van-popup>
<div></div>
</div>
</div>
</template>
......@@ -122,14 +214,28 @@ export default {
pageSize:10,
codeName:[],
detInfo:{},
show:false,
tableName: "总收益",
radio2: "1",
crmIntegral:'',
checkList:[],
ifexchange: true,
po_show: false,
is_showlive: false,
isshowButton: true,
showButton: false,
scrollThreshold: 100, // 滚动阈值
monthNum : "",
useIntegrationTotal:"",
productTypeCode:''
};
},
created() {
// this.detInfo = JSON.parse(this.$route.query.detInfo) ;
// localStorage.getItem('detInfo',this.detInfo)
this.detInfo = JSON.parse(localStorage.getItem('detInfo'))
console.log(this.detInfo,'ppp12')
this.detInfo = JSON.parse(localStorage.getItem('detInfo'))
this.productType = this.detInfo.productType
console.log(this.productType,'ppp12')
},
......@@ -146,8 +252,12 @@ export default {
}
this.server.getselectedToday(params).then(res=>{
if(res.data.code == 200){
this.codeName = res.data.data.list
this.codeName = res.data.data.list;
this.pageNum = res.data.data.pageNum;
this.pageSize = res.data.data.pageSize;
this.total = res.data.data.total;
this.totalPage = res.data.data.totalPage;
console.log(this.totalPage,'pppl')
}
})
......@@ -163,7 +273,12 @@ export default {
}
this.server.historicalRecord(params).then(res=>{
if(res.data.code == 200){
this.codeName = res.data.data.list
this.codeName = res.data.data.list;
this.pageNum = res.data.data.pageNum;
this.pageSize = res.data.data.pageSize;
this.total = res.data.data.total;
this.totalPage = res.data.data.totalPage;
console.log(this.totalPage,'pppl')
}
......@@ -187,6 +302,91 @@ export default {
},
tab_a:function(){
console.log(this.detInfo.productType,'aa')
let params={
productId:this.detInfo.id,
productTypeCode:this.detInfo.productType,
}
this.server.detail(params).then(res=>{
if(res.data.code == 200){
this.show = true;
this.checkList = res.data.data.investProductCycles;
this.crmIntegral = res.data.data.crmIntegral;
}else if(res.data.code == 500){
alert("网络错误,请稍后重试");
}else if(res.data.code == 600){
alert(res.data.message);
}
})
},
checkScroll() {
const scrollTop = this.$refs.scrollContainer.scrollTop;
this.showButton = scrollTop > this.scrollThreshold;
if (this.$refs.scrollContainer.scrollTop != 0) {
this.isshowButton = false;
}
},
is_scrollToTop() {
this.$refs.scrollContainer.scrollTop = 0;
},
scrollToTop() {
console.log(this.productTypeCode,11111)
this.$refs.scrollContainer.scrollTop != 0;
this.showButton = true;
let params={
clientAppType:"H5",
investProductId:this.detInfo.id,
investProductTypeCode:this.productType, //类型
monthNum:this.monthNum,
useIntegrationTotal : this.useIntegrationTotal
// useIntegrationTotal : this.crmIntegral
}
this.server.newcrmqueryproduct(params).then(res=>{
if(res.data.code == 200){
alert('兑换成功')
this.$router.push('../strategyversion')
alert(1)
}else if(res.data.code == 500){
alert("网络错误,请稍后重试");
}else if(res.data.code == 600){
alert(res.data.message);
}
})
},
sure() {
this.is_showlive = true;
this.show = false;
this.po_show = true;
},
//选择积分
clickBox(val) {
if (this.crmIntegral >= this.checkList[val].point) {
this.monthNum = this.checkList[val].count
this.useIntegrationTotal = this.checkList[val].point
this.ifexchange = true;
} else {
this.ifexchange = false;
}
// this.checkList.forEach((i, index) => {
// if (checkList.val.point == i.id) {
// console.log("我的积分", this.crmIntegral >= i.point);
// if (this.crmIntegral >= this.checkList.val.point) {
// this.ifexchange = true;
// } else {
// this.ifexchange = false;
// }
// }
// });
},
},
components: {},
};
......@@ -306,7 +506,7 @@ export default {
}
.user_con{
text-align: center;
display: none;
/* display: none; */
}
.usert_n {
font-size: 0.2rem;
......@@ -319,7 +519,7 @@ export default {
height: 102px;
position: relative;
background: #fffbe8;
border: 1px solid red;
/* border: 1px solid red; */
border-radius: 6%;
}
.alogn {
......@@ -374,7 +574,7 @@ export default {
width: 40%;
height: 85%;
background: #fffbe8;
border: 1px solid red;
/* border: 1px solid red; */
border-radius: 6%;
margin: 5px;
position: relative;
......@@ -411,4 +611,123 @@ export default {
padding-top: 9px;
text-align: center;
}
.popup-title {
width: 90%;
margin: 0 auto;
}
.checkBox {
width: 100%;
height: 0.8rem;
position: relative;
}
.usePoint {
position: absolute;
right: 0.8rem;
color: red;
font-size: 0.4rem;
top: 0;
}
.usePointTwo {
position: absolute;
right: 0;
color: red;
font-size: 0.3rem;
top: 0.05rem;
}
.checkBoxTwo {
width: 90%;
height: 0.8rem;
margin: 0 auto;
position: relative;
line-height: 0.8rem;
}
.usePointThree {
position: absolute;
top: 0.1rem;
right: 0.8rem;
font-size: 0.4rem;
}
.usePointFour {
position: absolute;
top: 0.1rem;
right: 0;
font-size: 0.3rem;
}
.exchange {
width: 5rem;
height: 1rem;
background-color: rgb(226, 74, 68);
color: white;
line-height: 1rem;
border-radius: 0.2rem;
text-align: center;
font-size: 0.4rem;
margin: 3rem auto;
}
.exchangeTwo {
width: 5rem;
height: 1rem;
background-color: gray;
color: white;
line-height: 1rem;
border-radius: 0.2rem;
text-align: center;
font-size: 0.4rem;
margin: 3rem auto;
}
.b_user {
width: 100%;
height: 322px;
background: white;
position: relative;
}
.text_p {
text-align: center;
font-size: 0.4rem;
padding-top: 10px;
font-weight: bolder;
}
.user_p {
padding: 0.2rem;
font-size: 0.25rem;
}
.bu_p {
position: absolute;
bottom: 12px;
width: 41%;
height: 30px;
border-radius: 20px;
background: #bbb3b3;
border: none;
/* text-align: center; */
left: 31%;
color: white;
font-size: 0.2rem;
}
.user_p .con_P {
position: absolute;
bottom: 5px;
width: 34%;
height: 30px;
border-radius: 20px;
background: #e03939;
border: none;
left: 31%;
color: white;
font-size: 0.2rem;
}
.contain {
position: relative;
}
.list-container {
height: 100vh; /* 根据实际情况设置高度 */
overflow-y: scroll;
position: relative;
}
.loading-more {
position: absolute;
bottom: 0;
width: 100%;
text-align: center;
}
</style>
......@@ -2,18 +2,47 @@
<div class="">
<div class="contain">
<van-nav-bar title="策略版" left-text="" @click-left="onClickLeft" />
<!-- <van-notice-bar left-icon="volume-o" :scrollable="false">
<van-swipe
vertical
class="notice-swipe"
:autoplay="3000"
:show-indicators="false"
>
<van-swipe-item>内容 1</van-swipe-item>
<van-swipe-item>内容 2</van-swipe-item>
<van-swipe-item>内容 3</van-swipe-item>
</van-swipe>
</van-notice-bar> -->
<!-- <van-list
v-model="loading"
:finished="finished"
finished-text="没有更多了"
@load="onLoad"
>
<van-cell v-for="(item, index) in getList" :key="index" />
<div class="user">
<div class="sre_p">
<div class="uset_a" @click="tab_let(item)">
<span>{{ item.productName }}</span>
<span class="num">{{ item.numberSubscriptions }}⼈订阅</span>
</div>
<div>
<span
>综合胜率: <span>{{ item.successPercent }}</span></span
>
<span style="margin-left: 14px"
>平均涨幅: <span>{{ item.avgIncrease }}</span></span
>
</div>
<div class="read" @click="showPopup(item.id)">解锁订阅</div>
</div>
<div class="cont">
<div
class="tab_p"
v-for="(i, index) in item.pcSmartStockInfoVOList"
:key="index"
>
<img src="../../assets/jian.png" alt="" class="tab_img" />
<div class="name_u">{{ i.code }}</div>
<div class="user_t">{{ i.winRate }}</div>
<div class="user_se">⼊选最⾼涨幅</div>
</div>
</div>
</div>
</van-list> -->
<div class="user" v-for="(item, index) in getList" :key="index">
<div class="sre_p">
<div class="uset_a" @click="tab_let(item)">
......@@ -29,7 +58,9 @@
>平均涨幅: <span>{{ item.avgIncrease }}</span></span
>
</div>
<div class="read" @click="showPopup()">解锁订阅</div>
<div class="read" @click="showPopup(item.id, item.productType)">
解锁订阅
</div>
</div>
<div class="cont">
......@@ -70,10 +101,11 @@
:key="index"
>
<van-radio
:name="i.id"
:name="index"
icon-size="12px"
checked-color="#ee0a24"
>{{ i.name }}</van-radio
:value="i.point"
>{{ i.countName }}</van-radio
><span class="usePoint">{{ i.point }}</span
><span class="usePointTwo">积分</span>
</div>
......@@ -81,7 +113,7 @@
</div>
<div class="checkBoxTwo" style="margin-bottom: 0.5rem; color: black">
<span style="font-size: 0.4rem">当前积分</span
><span class="usePointThree">{{ morePoint }}</span
><span class="usePointThree">{{ crmIntegral }}</span
><span class="usePointFour">积分</span>
</div>
<div v-if="ifexchange" class="exchange">
......@@ -162,73 +194,88 @@ export default {
return {
getList: [],
pageNo: 1,
pageSize: 10,
pageSize: 1,
total: "", //总页数
pageNum: "", //当前页面
user_pro: [],
detInfo: {},
ifexchange: true,
show: false,
tableName: "总收益",
radio2: "1",
morePoint: 12345,
checkList: [
{
id: "1",
name: "1个月",
point: "1222",
},
{
id: "2",
name: "3个月",
point: "1222211",
},
{
id: "3",
name: "6个月",
point: "1222",
},
{
id: "4",
name: "12个月",
point: "1222",
},
],
crmIntegral: "",
checkList: [],
showButton: false,
isshowButton: true,
scrollThreshold: 100, // 滚动阈值
is_showlive: false,
po_show: false,
loading: false,
finished: false,
checkList: [],
productId: "",
productTypeCode: "",
loading: false,
finished: false,
};
},
created() {},
mounted() {
this.getsent();
this.checkScroll();
if (this.morePoint >= this.checkList[0].point) {
if (this.crmIntegral >= this.checkList[0].point) {
this.ifexchange = true;
} else {
this.ifexchange = false;
}
//分页
},
methods: {
onLoad() {
// 异步更新数据
// setTimeout 仅做示例,真实场景中一般为 ajax 请求
let params = {};
this.server.getstrge(params).then((res) => {
if (res.data.code == 200) {
this.getList = res.data.data.list;
this.user_pro = res.data.data.pcSmartStockInfoVOList;
this.pageNo = res.data.data.pageNum; //页数 当前页
this.pageSize = res.data.data.pageSize; // 页数多少条数据
this.total = res.data.data.total; //全部总页数
// 加载状态结束
this.loading = false;
// 数据全部加载完成
if (this.getList.length <= 0) {
this.finished = true;
}
}
});
},
getsent() {
let params = {};
this.server.getstrge(params).then((res) => {
if (res.data.code == 200) {
this.getList = res.data.data.list;
this.user_pro = res.data.data.pcSmartStockInfoVOList;
console.log(res);
this.pageNo = res.data.data.pageNum; //页数 当前页
this.pageSize = res.data.data.pageSize; // 页数多少条数据
this.total = res.data.data.total; //全部总页数
console.log(this.total, "pppl");
}
});
},
tab_let(item) {
const detInfo = JSON.stringify(item);
console.log(detInfo, "aa");
localStorage.setItem("detInfo", detInfo);
this.$router.push({
path: "../strategy",
query: { detInfo: detInfo },
// query: { detInfo: detInfo },
});
},
......@@ -236,7 +283,25 @@ export default {
this.$router.push("../strategy");
Toast("返回");
},
showPopup() {
showPopup(productId, productType) {
console.log(productType, "hhh");
this.productId = productId;
this.productType = productType;
let params = {
productId: this.productId,
productTypeCode: this.productType,
};
this.server.detail(params).then((res) => {
if (res.data.code == 200) {
this.show = true;
this.checkList = res.data.data.investProductCycles;
this.crmIntegral = res.data.data.crmIntegral;
} else if (res.data.code == 500) {
alert("网络错误,请稍后重试");
} else if (res.data.code == 600) {
alert(res.data.message);
}
});
this.show = true;
},
//点击标签页
......@@ -246,17 +311,23 @@ export default {
},
//选择积分
clickBox(val) {
console.log("这是啥啊", val);
this.checkList.forEach((i, index) => {
if (val == i.id) {
console.log("我的积分", this.morePoint >= i.point);
if (this.morePoint >= i.point) {
this.ifexchange = true;
} else {
this.ifexchange = false;
}
}
});
if (this.crmIntegral >= this.checkList[val].point) {
this.monthNum = this.checkList[val].count;
this.useIntegrationTotal = this.checkList[val].point;
this.ifexchange = true;
} else {
this.ifexchange = false;
}
// this.checkList.forEach((i, index) => {
// if (checkList.val.point == i.id) {
// console.log("我的积分", this.crmIntegral >= i.point);
// if (this.crmIntegral >= this.checkList.val.point) {
// this.ifexchange = true;
// } else {
// this.ifexchange = false;
// }
// }
// });
},
checkScroll() {
const scrollTop = this.$refs.scrollContainer.scrollTop;
......@@ -271,13 +342,45 @@ export default {
scrollToTop() {
this.$refs.scrollContainer.scrollTop != 0;
this.showButton = true;
let params = {
clientAppType: "H5",
investProductId: this.productId,
investProductTypeCode: this.productType,
monthNum: this.monthNum,
useIntegrationTotal: this.useIntegrationTotal,
// useIntegrationTotal : this.crmIntegral
};
this.server.newcrmqueryproduct(params).then((res) => {
if (res.data.code == 200) {
alert("兑换成功");
this.$router.push("../strategyversion");
} else if (res.data.code == 500) {
alert("网络错误,请稍后重试");
} else if (res.data.code == 600) {
alert(res.data.message);
}
});
},
sure() {
this.is_showlive = true;
this.show = false;
this.po_show = true;
},
handleScroll(event) {
alert(1);
const { scrollTop, scrollHeight, clientHeight } = event.target;
// 检查是否已滚动到底部
if (scrollTop + clientHeight >= scrollHeight - 5 && !this.loadingMore) {
// 留5px的缓冲区
this.loadMoreData();
}
},
onLoad() {
// 异步更新数据
// setTimeout 仅做示例,真实场景中一般为 ajax 请求
},
},
components: {},
};
......@@ -388,6 +491,7 @@ export default {
border: 1px solid red;
border-radius: 6%;
margin: 5px;
margin-top: 8px;
position: relative;
}
.name_u {
......@@ -509,10 +613,10 @@ export default {
position: relative;
}
.text_p {
text-align: center;
font-size: 0.4rem;
padding-top: 10px;
font-weight: bolder;
text-align: center;
font-size: 0.4rem;
padding-top: 10px;
font-weight: bolder;
}
.user_p {
padding: 0.2rem;
......@@ -546,4 +650,15 @@ export default {
.contain {
position: relative;
}
.list-container {
height: 100vh; /* 根据实际情况设置高度 */
overflow-y: scroll;
position: relative;
}
.loading-more {
position: absolute;
bottom: 0;
width: 100%;
text-align: center;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment