7.10 增加登录页面,事件详情接口对接,我的点赞,关注收藏页面搭建,接口对接
This commit is contained in:
@@ -1,22 +1,43 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const request_api = require("../../../request/api.js");
|
||||
const utils_util = require("../../../utils/util.js");
|
||||
const common_assets = require("../../../common/assets.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
navH: common_vendor.inject("navHeight"),
|
||||
windowWidth: common_vendor.inject("windowWidth"),
|
||||
eventId: "",
|
||||
//事件id
|
||||
eventDetails: null,
|
||||
//事件详情
|
||||
categoryList: ["相关标的", "相关概念", "历史事件", "时间传导链分析", "关联数据"],
|
||||
targetList: [],
|
||||
//相关标的
|
||||
conceptList: [],
|
||||
//相关概念
|
||||
historyEventList: [],
|
||||
//历史事件
|
||||
historyEventRelatedStockList: [],
|
||||
//历史事件相关股票
|
||||
selectCategory: 0,
|
||||
headingList: ["名称代码", "分时图", "开盘价", "最新价", "涨跌幅"]
|
||||
headingList: ["名称代码", "分时图", "开盘价", "最新价", "涨跌幅"],
|
||||
getLocaleTime: utils_util.getLocaleTime,
|
||||
getRateUpOrDown: utils_util.getRateUpOrDown,
|
||||
getRateStr: utils_util.getRateStr,
|
||||
scoreTop: "",
|
||||
eventComment: "",
|
||||
//事件评论
|
||||
expectScore: 0
|
||||
//预期得分
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
if (e.id) {
|
||||
this.eventId = e.id;
|
||||
this.getEventDetailsData();
|
||||
this.getEventRelatedStockData();
|
||||
this.getEventCommentListData();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -26,14 +47,21 @@ const _sfc_main = {
|
||||
clickCategoryItem(index) {
|
||||
if (this.selectCategory != index) {
|
||||
this.selectCategory = index;
|
||||
if (index == 0) {
|
||||
this.getEventRelatedStockData();
|
||||
} else if (index == 1) {
|
||||
this.getEventRelatedConceptData();
|
||||
} else if (index == 2) {
|
||||
this.getEventHistoryEventData();
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击查看股票详情
|
||||
*/
|
||||
clickStockItem() {
|
||||
clickStockItem(code) {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/index/stockDetails/stockDetails"
|
||||
url: "/pages/index/stockDetails/stockDetails?code=" + code
|
||||
});
|
||||
},
|
||||
/**
|
||||
@@ -44,21 +72,125 @@ const _sfc_main = {
|
||||
url: "/pages/index/conceptDetails/conceptDetails"
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 点击查看历史事件的相关股票
|
||||
*/
|
||||
clickLookHistoricalEventRelatedStock(item) {
|
||||
this.historyEventRelatedStockList = item.related_stocks;
|
||||
this.$refs["stockPopup"].open();
|
||||
},
|
||||
/**
|
||||
* 点击关闭相关股票弹窗
|
||||
*/
|
||||
closeRelatedStockPopup() {
|
||||
this.$refs["stockPopup"].close();
|
||||
},
|
||||
/**
|
||||
* 点击查看超预期得分
|
||||
*/
|
||||
clickExpectScore(e) {
|
||||
this.scoreTop = e.currentTarget.offsetTop + this.navH + (70 + 10 + 20) / 750 * this.windowWidth;
|
||||
this.$refs["expectScorePopup"].open();
|
||||
},
|
||||
/**
|
||||
* 点击发送事件评论
|
||||
*/
|
||||
sendEventComment() {
|
||||
if (!this.eventComment) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请输入评论内容",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
let eventId = this.eventId;
|
||||
let param = { content: this.eventComment };
|
||||
request_api.commentEvent(eventId, param).then((res) => {
|
||||
}).catch((error) => {
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 点击评论
|
||||
*/
|
||||
clickComment() {
|
||||
this.$refs["popup"].open();
|
||||
},
|
||||
/**
|
||||
* 点击关闭评论弹窗
|
||||
*/
|
||||
closeCommentPopup() {
|
||||
this.$refs["popup"].close();
|
||||
},
|
||||
/**
|
||||
* 获取事件详情数据
|
||||
* 点击关注
|
||||
*/
|
||||
getEventDetailsData() {
|
||||
clickFollow() {
|
||||
let eventId = this.eventId;
|
||||
request_api.eventDetails(eventId).then((res) => {
|
||||
followEvent(eventId).then((res) => {
|
||||
common_vendor.index.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取事件相关标的数据
|
||||
*/
|
||||
getEventRelatedStockData() {
|
||||
let eventId = this.eventId;
|
||||
request_api.eventRelatedStock(eventId).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.eventDetails = res.data;
|
||||
this.targetList = res.data.related_stocks;
|
||||
} else
|
||||
common_vendor.index.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取事件相关概念数据
|
||||
*/
|
||||
getEventRelatedConceptData() {
|
||||
let eventId = this.eventId;
|
||||
request_api.eventRelatedConcept(eventId).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.conceptList = res.data.related_concepts;
|
||||
} else
|
||||
common_vendor.index.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取事件历史事件数据
|
||||
*/
|
||||
getEventHistoryEventData() {
|
||||
let eventId = this.eventId;
|
||||
request_api.eventHistoryEvent(eventId).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.expectScore = res.data.invest_score;
|
||||
this.historyEventList = res.data.historical_events;
|
||||
} else
|
||||
common_vendor.index.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取事件评论列表
|
||||
*/
|
||||
getEventCommentListData() {
|
||||
let eventId = this.eventId;
|
||||
request_api.eventCommentList(eventId).then((res) => {
|
||||
this.commentList = res.data.comments;
|
||||
}).catch((error) => {
|
||||
});
|
||||
}
|
||||
@@ -80,7 +212,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
leftText: "事件详情"
|
||||
}),
|
||||
b: common_assets._imports_0,
|
||||
c: common_vendor.f($data.categoryList, (item, index, i0) => {
|
||||
c: $data.eventDetails
|
||||
}, $data.eventDetails ? common_vendor.e({
|
||||
d: common_vendor.t($data.eventDetails.event_type),
|
||||
e: common_vendor.t($data.eventDetails.event_title),
|
||||
f: common_vendor.t($data.eventDetails.event_created_at.substr(0, 16)),
|
||||
g: common_vendor.t($data.eventDetails.event_desc),
|
||||
h: common_vendor.f($data.categoryList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(item),
|
||||
b: $data.selectCategory == index
|
||||
@@ -90,33 +228,129 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
e: common_vendor.o(($event) => $options.clickCategoryItem(index), index)
|
||||
});
|
||||
}),
|
||||
d: $data.selectCategory == 0
|
||||
i: $data.selectCategory == 0
|
||||
}, $data.selectCategory == 0 ? {
|
||||
e: common_vendor.f($data.headingList, (item, index, i0) => {
|
||||
j: common_vendor.f($data.headingList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item),
|
||||
b: index
|
||||
};
|
||||
})
|
||||
} : {}, {
|
||||
f: $data.selectCategory == 0
|
||||
}, $data.selectCategory == 0 ? {} : {}, {
|
||||
g: $data.selectCategory == 1
|
||||
}, $data.selectCategory == 1 ? {
|
||||
h: common_vendor.o(($event) => $options.clickConceptItem())
|
||||
k: $data.selectCategory == 0
|
||||
}, $data.selectCategory == 0 ? {
|
||||
l: common_vendor.f($data.targetList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.stock_name),
|
||||
b: common_vendor.t(item.stock_code),
|
||||
c: common_vendor.t(item.trade_data.open_price),
|
||||
d: common_vendor.t(item.trade_data.latest_price),
|
||||
e: common_vendor.t(item.trade_data.change_pct),
|
||||
f: common_vendor.n("chg flex1 " + ($data.getRateUpOrDown(item.trade_data.change_pct) ? "down" : "up")),
|
||||
g: common_vendor.t(item.relation_desc),
|
||||
h: index,
|
||||
i: common_vendor.o(($event) => $options.clickStockItem(item.stock_code), index)
|
||||
};
|
||||
})
|
||||
} : {}, {
|
||||
i: common_vendor.s("top:" + $data.navH + "px;"),
|
||||
j: common_assets._imports_1$1,
|
||||
k: common_assets._imports_2$1,
|
||||
l: common_vendor.o(($event) => $options.clickComment()),
|
||||
m: common_assets._imports_3$1,
|
||||
n: common_assets._imports_4$2,
|
||||
o: common_vendor.o(($event) => $options.closeCommentPopup()),
|
||||
p: common_assets._imports_5$2,
|
||||
q: common_assets._imports_6,
|
||||
r: common_assets._imports_5$2,
|
||||
s: common_vendor.sr("popup", "6e1a61f1-1"),
|
||||
t: common_vendor.p({
|
||||
m: $data.selectCategory == 1
|
||||
}, $data.selectCategory == 1 ? {
|
||||
n: common_vendor.f($data.conceptList, (item, index, i0) => {
|
||||
return {
|
||||
a: item.first_image,
|
||||
b: common_vendor.t(item.concept),
|
||||
c: common_vendor.t(item.reason),
|
||||
d: index,
|
||||
e: common_vendor.o(($event) => $options.clickConceptItem(), index)
|
||||
};
|
||||
})
|
||||
} : {}, {
|
||||
o: $data.selectCategory == 2
|
||||
}, $data.selectCategory == 2 ? {
|
||||
p: common_assets._imports_1$4,
|
||||
q: common_vendor.t($data.expectScore),
|
||||
r: common_assets._imports_2$6,
|
||||
s: common_vendor.o(($event) => $options.clickExpectScore($event)),
|
||||
t: common_vendor.f($data.historyEventList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(item.title),
|
||||
b: common_vendor.t(item.content),
|
||||
c: $data.getRateUpOrDown(item.related_avg_chg)
|
||||
}, $data.getRateUpOrDown(item.related_avg_chg) ? {
|
||||
d: common_assets._imports_1$1
|
||||
} : {
|
||||
e: common_assets._imports_2$2
|
||||
}, {
|
||||
f: common_vendor.t($data.getRateStr(item.related_avg_chg)),
|
||||
g: common_vendor.n("rateItem " + ($data.getRateUpOrDown(item.related_avg_chg) ? "down" : "up")),
|
||||
h: $data.getRateUpOrDown(item.related_max_chg)
|
||||
}, $data.getRateUpOrDown(item.related_max_chg) ? {
|
||||
i: common_assets._imports_1$1
|
||||
} : {
|
||||
j: common_assets._imports_2$2
|
||||
}, {
|
||||
k: common_vendor.t($data.getRateStr(item.related_max_chg)),
|
||||
l: common_vendor.n("rateItem " + ($data.getRateUpOrDown(item.related_max_chg) ? "down" : "up")),
|
||||
m: common_vendor.o(($event) => $options.clickLookHistoricalEventRelatedStock(item), index),
|
||||
n: common_vendor.t($data.getLocaleTime(item.event_date)),
|
||||
o: index
|
||||
});
|
||||
}),
|
||||
v: common_assets._imports_1$4
|
||||
} : {}, {
|
||||
w: common_vendor.s("top:" + $data.navH + "px;")
|
||||
}) : {}, {
|
||||
x: $data.eventDetails
|
||||
}, $data.eventDetails ? {
|
||||
y: common_vendor.o(($event) => $options.sendEventComment()),
|
||||
z: $data.eventComment,
|
||||
A: common_vendor.o(($event) => $data.eventComment = $event.detail.value),
|
||||
B: common_assets._imports_3,
|
||||
C: common_vendor.t($data.eventDetails.view_count),
|
||||
D: common_assets._imports_4,
|
||||
E: common_vendor.t($data.eventDetails.post_count),
|
||||
F: common_vendor.o(($event) => $options.clickComment()),
|
||||
G: common_assets._imports_7,
|
||||
H: common_vendor.t($data.eventDetails.follower_count),
|
||||
I: common_vendor.o(($event) => $options.clickFollow())
|
||||
} : {}, {
|
||||
J: common_assets._imports_8,
|
||||
K: common_vendor.o(($event) => $options.closeCommentPopup()),
|
||||
L: common_assets._imports_9,
|
||||
M: common_assets._imports_10,
|
||||
N: common_assets._imports_9,
|
||||
O: common_vendor.sr("popup", "6e1a61f1-1"),
|
||||
P: common_vendor.p({
|
||||
type: "bottom"
|
||||
}),
|
||||
Q: common_assets._imports_11$1,
|
||||
R: common_vendor.s("margin-top:" + $data.scoreTop + "px;"),
|
||||
S: common_vendor.sr("expectScorePopup", "6e1a61f1-2"),
|
||||
T: common_vendor.p({
|
||||
type: "top",
|
||||
["mask-background-color"]: "transparent"
|
||||
}),
|
||||
U: common_assets._imports_8,
|
||||
V: common_vendor.o(($event) => $options.closeRelatedStockPopup()),
|
||||
W: common_vendor.f($data.historyEventRelatedStockList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(item.stock_name + "(" + item.stock_code + ")"),
|
||||
b: common_vendor.t(item.correlation * 100),
|
||||
c: common_vendor.t(item.sector),
|
||||
d: $data.getRateUpOrDown(item.daily_change)
|
||||
}, $data.getRateUpOrDown(item.daily_change) ? {
|
||||
e: common_assets._imports_1$1
|
||||
} : {
|
||||
f: common_assets._imports_2$2
|
||||
}, {
|
||||
g: common_vendor.t($data.getRateStr(item.daily_change)),
|
||||
h: common_vendor.t(item.relation_desc),
|
||||
i: index,
|
||||
j: common_vendor.o(($event) => $options.clickStockItem(item.stock_code), index)
|
||||
});
|
||||
}),
|
||||
X: common_vendor.sr("stockPopup", "6e1a61f1-3"),
|
||||
Y: common_vendor.p({
|
||||
type: "bottom"
|
||||
})
|
||||
});
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -12,7 +12,7 @@
|
||||
right: 0;
|
||||
bottom: calc(20rpx + 70rpx + 20rpx + env(safe-area-inset-bottom));
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
overflow-y: hidden;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.eventDetailsC .categoryTitleC {
|
||||
padding: 0 25rpx;
|
||||
@@ -33,7 +33,7 @@
|
||||
font-weight: bold;
|
||||
color: #222;
|
||||
}
|
||||
.eventDetailsC .time {
|
||||
.eventDetailsC .eventTime {
|
||||
margin: 20rpx 25rpx 0;
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
@@ -99,14 +99,17 @@
|
||||
color: #888;
|
||||
}
|
||||
.eventDetailsC .targetList .item .nameCodePriceC .price {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #222;
|
||||
text-align: center;
|
||||
}
|
||||
.eventDetailsC .targetList .item .nameCodePriceC .chg {
|
||||
text-align: center;
|
||||
}
|
||||
.eventDetailsC .targetList .item .nameCodePriceC .chg.up {
|
||||
color: #FF2929;
|
||||
}
|
||||
.eventDetailsC .targetList .item .nameCodePriceC .chg.down {
|
||||
color: #22C55E;
|
||||
}
|
||||
.eventDetailsC .targetList .item .content {
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
@@ -115,8 +118,10 @@
|
||||
.eventDetailsC .conceptList {
|
||||
padding: 30rpx 25rpx;
|
||||
}
|
||||
.eventDetailsC .conceptList .item {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.eventDetailsC .conceptList .item .cover {
|
||||
background-color: red;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 350rpx;
|
||||
@@ -128,6 +133,7 @@
|
||||
left: 0;
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
border-radius: ;
|
||||
color: white;
|
||||
}
|
||||
.eventDetailsC .conceptList .item .infoC .title {
|
||||
@@ -135,14 +141,146 @@
|
||||
font-weight: bold;
|
||||
}
|
||||
.eventDetailsC .conceptList .item .infoC .content {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
margin-top: 10rpx;
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
line-height: 1.2rem;
|
||||
}
|
||||
.eventDetailsC .conceptList .item .infoC .content .lookDetails {
|
||||
right: 0;
|
||||
color: #F97316;
|
||||
}
|
||||
.eventDetailsC .historyEventList {
|
||||
padding: 34rpx 25rpx;
|
||||
}
|
||||
.eventDetailsC .historyEventList .expectScoreC {
|
||||
background-color: #FBEFE7;
|
||||
padding: 0 25rpx;
|
||||
height: 70rpx;
|
||||
}
|
||||
.eventDetailsC .historyEventList .expectScoreC .icon {
|
||||
margin-right: 14rpx;
|
||||
width: 24rpx;
|
||||
height: auto;
|
||||
}
|
||||
.eventDetailsC .historyEventList .expectScoreC .score {
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #F97316;
|
||||
}
|
||||
.eventDetailsC .historyEventList .expectScoreC .tips {
|
||||
margin-left: 14rpx;
|
||||
width: 24rpx;
|
||||
height: auto;
|
||||
}
|
||||
.eventDetailsC .historyEventList .list {
|
||||
padding: 23rpx 0;
|
||||
}
|
||||
.eventDetailsC .historyEventList .list .item .eventLineC {
|
||||
padding: 0 43rpx 0 15rpx;
|
||||
}
|
||||
.eventDetailsC .historyEventList .list .item .eventLineC .line {
|
||||
background-color: #F0F0F0;
|
||||
width: 1px;
|
||||
height: 100%;
|
||||
}
|
||||
.eventDetailsC .historyEventList .list .item .eventLineC .pointC {
|
||||
background-color: #F9731680;
|
||||
top: 0;
|
||||
left: 5rpx;
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.eventDetailsC .historyEventList .list .item .eventLineC .pointC .point {
|
||||
background-color: #F97316;
|
||||
width: 10rpx;
|
||||
height: 10rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.eventDetailsC .historyEventList .list .item .eventInfoC {
|
||||
box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.07);
|
||||
margin-bottom: 20rpx;
|
||||
padding-top: 27rpx;
|
||||
min-width: 0;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.eventDetailsC .historyEventList .list .item .eventInfoC .titleCorrelationC {
|
||||
padding: 0 24rpx 0 30rpx;
|
||||
}
|
||||
.eventDetailsC .historyEventList .list .item .eventInfoC .titleCorrelationC .title {
|
||||
min-width: 0;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: #222;
|
||||
}
|
||||
.eventDetailsC .historyEventList .list .item .eventInfoC .titleCorrelationC .correlation {
|
||||
background-color: #F973161A;
|
||||
padding: 0 12rpx;
|
||||
line-height: 40rpx;
|
||||
border-radius: 5rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #F97316;
|
||||
}
|
||||
.eventDetailsC .historyEventList .list .item .eventInfoC .content {
|
||||
margin: 16rpx 30rpx 0;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #666;
|
||||
}
|
||||
.eventDetailsC .historyEventList .list .item .eventInfoC .increaseRateList {
|
||||
white-space: nowrap;
|
||||
padding: 0 30rpx;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
.eventDetailsC .historyEventList .list .item .eventInfoC .increaseRateList .rateItem {
|
||||
display: inline-block;
|
||||
margin-right: 15rpx;
|
||||
line-height: 44rpx;
|
||||
padding: 0 14rpx;
|
||||
border-radius: 10rpx;
|
||||
font-size: 22rpx;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
}
|
||||
.eventDetailsC .historyEventList .list .item .eventInfoC .increaseRateList .rateItem .arrow {
|
||||
width: 15rpx;
|
||||
height: auto;
|
||||
}
|
||||
.eventDetailsC .historyEventList .list .item .eventInfoC .increaseRateList .rateItem.up {
|
||||
background-color: #C00000;
|
||||
}
|
||||
.eventDetailsC .historyEventList .list .item .eventInfoC .increaseRateList .rateItem.down {
|
||||
background-color: #355422;
|
||||
}
|
||||
.eventDetailsC .historyEventList .list .item .eventInfoC .relatedStockTimeC {
|
||||
padding-right: 28rpx;
|
||||
}
|
||||
.eventDetailsC .historyEventList .list .item .eventInfoC .relatedStockTimeC .relatedStockC {
|
||||
padding: 16rpx 30rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: bold;
|
||||
color: #F97316;
|
||||
}
|
||||
.eventDetailsC .historyEventList .list .item .eventInfoC .relatedStockTimeC .relatedStockC .icon {
|
||||
margin-right: 13rpx;
|
||||
width: 24rpx;
|
||||
height: auto;
|
||||
}
|
||||
.eventDetailsC .historyEventList .list .item .eventInfoC .relatedStockTimeC .time {
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
color: #aaa;
|
||||
text-align: right;
|
||||
}
|
||||
.bottomC {
|
||||
padding: 20rpx 25rpx calc(20rpx + env(safe-area-inset-bottom));
|
||||
left: 0;
|
||||
@@ -163,12 +301,13 @@
|
||||
font-weight: 500;
|
||||
}
|
||||
.bottomC .commentLikeNumC .item {
|
||||
padding: 0 20rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
}
|
||||
.bottomC .commentLikeNumC .item .icon {
|
||||
margin: 0 20rpx;
|
||||
width: 35rpx;
|
||||
height: auto;
|
||||
}
|
||||
@@ -201,7 +340,6 @@
|
||||
display: flex;
|
||||
}
|
||||
.popup .list .item .originComment .avatar {
|
||||
background-color: red;
|
||||
margin-right: 23rpx;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
@@ -271,7 +409,6 @@
|
||||
border-bottom: solid 1rpx #E4E4E4;
|
||||
}
|
||||
.popup .list .item .replyList .replyItem .avatar {
|
||||
background-color: red;
|
||||
margin-right: 23rpx;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
@@ -332,3 +469,98 @@
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
.expectScorePopup {
|
||||
background-color: white;
|
||||
margin-left: calc(100% - 320rpx - 24rpx);
|
||||
width: 320rpx;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.expectScorePopup .arrow {
|
||||
top: -13rpx;
|
||||
right: 38rpx;
|
||||
width: 26rpx;
|
||||
height: auto;
|
||||
}
|
||||
.expectScorePopup .tips {
|
||||
padding: 30rpx 22rpx 20rpx;
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
color: #444;
|
||||
}
|
||||
.stockPopup {
|
||||
background-color: white;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
}
|
||||
.stockPopup .titleCloseC {
|
||||
padding-left: 25rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #222;
|
||||
}
|
||||
.stockPopup .titleCloseC .closeC {
|
||||
padding: 28rpx;
|
||||
}
|
||||
.stockPopup .titleCloseC .closeC .icon {
|
||||
width: 28rpx;
|
||||
height: auto;
|
||||
}
|
||||
.stockPopup .list {
|
||||
border-top: solid 1rpx #E4E4E4;
|
||||
margin: 0 25rpx;
|
||||
max-height: 800rpx;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.stockPopup .list .item {
|
||||
padding: 36rpx 0 28rpx;
|
||||
border-bottom: solid 1rpx #E4E4E4;
|
||||
}
|
||||
.stockPopup .list .item .titleCorrelationC .title {
|
||||
min-width: 0;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: #222;
|
||||
}
|
||||
.stockPopup .list .item .titleCorrelationC .correlation {
|
||||
background-color: #F973161A;
|
||||
padding: 0 12rpx;
|
||||
line-height: 40rpx;
|
||||
border-radius: 5rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #F97316;
|
||||
}
|
||||
.stockPopup .list .item .sectorRateC .sector {
|
||||
display: inline-block;
|
||||
margin-right: 20rpx;
|
||||
padding: 0 11rpx;
|
||||
line-height: 30rpx;
|
||||
border-radius: 5rpx;
|
||||
border: solid 0.5px #F6604A;
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
color: #F6604A;
|
||||
}
|
||||
.stockPopup .list .item .sectorRateC .rateC {
|
||||
background-color: #C00000;
|
||||
display: inline-block;
|
||||
padding: 0 10rpx;
|
||||
height: 30rpx;
|
||||
border-radius: 5rpx;
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
color: white;
|
||||
}
|
||||
.stockPopup .list .item .sectorRateC .rateC .arrow {
|
||||
width: 15rpx;
|
||||
height: auto;
|
||||
}
|
||||
.stockPopup .list .item .content {
|
||||
margin-top: 16rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
354
unpackage/dist/dev/mp-weixin/pages/index/index.js
vendored
354
unpackage/dist/dev/mp-weixin/pages/index/index.js
vendored
@@ -10,18 +10,24 @@ const _sfc_main = {
|
||||
menuTop: common_vendor.inject("menuTop"),
|
||||
menuH: common_vendor.inject("menuHeight"),
|
||||
navH: common_vendor.inject("navHeight"),
|
||||
windowWidth: common_vendor.inject("windowWidth"),
|
||||
contentTop: "",
|
||||
listTop: "",
|
||||
sortListTop: "",
|
||||
keywords: "",
|
||||
//关键词
|
||||
sortList: [],
|
||||
selectSortKey: "",
|
||||
//选中排序key
|
||||
timeCategoryList: [],
|
||||
selectTimeCategory: 0,
|
||||
topCategoryList: ["全部", "大周期", "大消费", "大金融地产", "TMT板块", "公共产业板块"],
|
||||
stockCategoryList: [],
|
||||
topScrollWidth: 0,
|
||||
secondScrollWidth: 0,
|
||||
selectTopCategory: 0,
|
||||
secondCategoryList: ["全部", "石油石化", "煤炭", "有色金属", "钢铁", "基础化工", "建筑材料"],
|
||||
topScrollLeft: 0,
|
||||
selectSecondCategory: 0,
|
||||
secondScrollLeft: 0,
|
||||
screenCategoryList: ["日期范围", "行业分类", "重要性"],
|
||||
selectYearMonth: "",
|
||||
//选择的年月日
|
||||
@@ -39,7 +45,10 @@ const _sfc_main = {
|
||||
//选中月份下标
|
||||
selectMonth: "",
|
||||
//选中年月
|
||||
industryTopCategoryList: ["巨潮行业分类", "新财富行业分类", "申银万国行业分类", "证监会行业分类"],
|
||||
industryTopCategoryList: [],
|
||||
//行业一级分类
|
||||
selectIndustryTopCategory: 0,
|
||||
//
|
||||
selectScreenCategory: 0,
|
||||
importanceList: [],
|
||||
//重要性数组
|
||||
@@ -173,11 +182,13 @@ const _sfc_main = {
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.contentTop = this.navH + (75 + 20) / 750 * common_vendor.inject("windowWidth");
|
||||
this.listTop = this.contentTop + (22 + 80 + 72 + 44 + 44) / 750 * common_vendor.inject("windowWidth");
|
||||
this.sortListTop = this.navH + (22 + 80 + 80) / 750 * common_vendor.inject("windowWidth");
|
||||
this.contentTop = this.navH + (75 + 20) / 750 * this.windowWidth;
|
||||
this.listTop = this.contentTop + (22 + 80 + 72) / 750 * this.windowWidth;
|
||||
this.sortListTop = this.navH + (22 + 80 + 80) / 750 * this.windowWidth;
|
||||
this.getEventFilterListData();
|
||||
this.getEventListData();
|
||||
this.getIndustryCategoryListData();
|
||||
this.getStockCategoryListData();
|
||||
let currentDate = /* @__PURE__ */ new Date();
|
||||
let currentYear = currentDate.getFullYear();
|
||||
let currentMonth = currentDate.getMonth() + 1;
|
||||
@@ -239,6 +250,16 @@ const _sfc_main = {
|
||||
}
|
||||
this.monthDateList = monthDateList;
|
||||
},
|
||||
onReady() {
|
||||
common_vendor.index.createSelectorQuery().select("#topCategory").boundingClientRect((rect) => {
|
||||
this.topScrollWidth = Math.round(rect.width);
|
||||
}).exec();
|
||||
common_vendor.index.createSelectorQuery().select("#secondCategory").boundingClientRect((rect) => {
|
||||
if (rect) {
|
||||
this.secondScrollWidth = Math.round(rect.width);
|
||||
}
|
||||
}).exec();
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.page = 1;
|
||||
this.getEventListData();
|
||||
@@ -268,14 +289,29 @@ const _sfc_main = {
|
||||
clickTimeCategoryItem(index) {
|
||||
if (this.selectTimeCategory != index) {
|
||||
this.selectTimeCategory = index;
|
||||
if (index == 0) {
|
||||
this.getEventListData();
|
||||
} else
|
||||
this.getHotEventListData();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击排序
|
||||
*/
|
||||
clickSortItem() {
|
||||
clickSort() {
|
||||
this.$refs["sortPopup"].open();
|
||||
},
|
||||
/**
|
||||
* 点击排序选项
|
||||
*/
|
||||
clickSortListItem(item) {
|
||||
this.selectSortKey = item.key;
|
||||
this.$refs["sortPopup"].close();
|
||||
if (this.selectTimeCategory == 0) {
|
||||
this.getEventListData();
|
||||
} else
|
||||
this.getHotEventListData();
|
||||
},
|
||||
/**
|
||||
* 点击筛选
|
||||
*/
|
||||
@@ -308,18 +344,26 @@ const _sfc_main = {
|
||||
* 点击选择一级分类
|
||||
* @param {Object} index
|
||||
*/
|
||||
clickTopCategoryItem(index) {
|
||||
clickTopCategoryItem(event, index) {
|
||||
if (this.selectTopCategory != index) {
|
||||
this.selectTopCategory = index;
|
||||
let offsetLeft = event.currentTarget.offsetLeft;
|
||||
this.topScrollLeft = offsetLeft - this.topScrollWidth / 2;
|
||||
if (index == 0) {
|
||||
this.listTop = this.contentTop + (22 + 80 + 72) / 750 * this.windowWidth;
|
||||
} else
|
||||
this.listTop = this.contentTop + (22 + 80 + 72 + 44 + 44) / 750 * this.windowWidth;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击选择二级分类
|
||||
* @param {Object} index
|
||||
*/
|
||||
clickSecondCategoryItem(index) {
|
||||
clickSecondCategoryItem(event, index) {
|
||||
if (this.selectSecondCategory != index) {
|
||||
this.selectSecondCategory = index;
|
||||
let offsetLeft = event.currentTarget.offsetLeft;
|
||||
this.secondScrollLeft = offsetLeft - this.secondScrollWidth / 2;
|
||||
}
|
||||
},
|
||||
/**
|
||||
@@ -378,6 +422,14 @@ const _sfc_main = {
|
||||
this.startTimeStamp = item.timestamp;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 选择行业分类一级分类
|
||||
*/
|
||||
clickSelectIndustryTopCategoryItem(index) {
|
||||
if (this.selectIndustryTopCategory != index) {
|
||||
this.selectIndustryTopCategory = index;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击选择重要性
|
||||
*/
|
||||
@@ -386,6 +438,35 @@ const _sfc_main = {
|
||||
this.selectImportanceIndex = index;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击展开收起内容
|
||||
* @param {Object} index
|
||||
*/
|
||||
clickExpandOrRetract(index) {
|
||||
this.eventList[index].isExpand = !this.eventList[index].isExpand;
|
||||
},
|
||||
/**
|
||||
* 点击相关股票
|
||||
* @param {Object} code
|
||||
*/
|
||||
clickLookRelatedStockItem(code) {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/index/stockDetails/stockDetails?code=" + code
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 点击关注事件
|
||||
* @param {Object} id
|
||||
*/
|
||||
clickFollowEvent(id) {
|
||||
request_api.followEvent(id).then((res) => {
|
||||
common_vendor.index.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 查看事件详情
|
||||
*/
|
||||
@@ -398,24 +479,58 @@ const _sfc_main = {
|
||||
* 获取事件筛选项
|
||||
*/
|
||||
getEventFilterListData() {
|
||||
request_api.eventFilterList().then((res) => {
|
||||
let timeList = [...res.data.available_sorts];
|
||||
this.timeCategoryList = timeList.splice(0, 2);
|
||||
let sortList = [...res.data.available_sorts];
|
||||
for (let item of sortList) {
|
||||
if (item.name == "最新") {
|
||||
item.icon = "/static/icon/home/new.png";
|
||||
request_api.filterOptions().then((res) => {
|
||||
if (res.code == 200) {
|
||||
let timeList = [...res.data.sort_options];
|
||||
this.timeCategoryList = timeList.splice(0, 2);
|
||||
let sortList = [...res.data.sort_options];
|
||||
for (let item of sortList) {
|
||||
if (item.name == "最新") {
|
||||
item.icon = "/static/icon/home/new.png";
|
||||
}
|
||||
if (item.name == "热门") {
|
||||
item.icon = "/static/icon/home/hot.png";
|
||||
}
|
||||
if (item.name == "收益率") {
|
||||
item.icon = "/static/icon/home/yield.png";
|
||||
}
|
||||
}
|
||||
if (item.name == "热门") {
|
||||
item.icon = "/static/icon/home/hot.png";
|
||||
this.sortList = res.data.sort_options.splice(0, 3);
|
||||
this.importanceList = res.data.importance_options;
|
||||
this.importanceList.unshift({ desc: "全部", key: "all", name: "全部" });
|
||||
} else
|
||||
common_vendor.index.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取行业分类
|
||||
*/
|
||||
getIndustryCategoryListData() {
|
||||
request_api.industryCategoryList().then((res) => {
|
||||
this.industryTopCategoryList = res.data;
|
||||
}).catch((error) => {
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取股票分类
|
||||
*/
|
||||
getStockCategoryListData() {
|
||||
request_api.stockCategoryList().then((res) => {
|
||||
if (res.code == 200) {
|
||||
for (let item of res.data) {
|
||||
item.sub_sectors.unshift("全部");
|
||||
}
|
||||
if (item.name == "收益率") {
|
||||
item.icon = "/static/icon/home/yield.png";
|
||||
}
|
||||
}
|
||||
this.sortList = res.data.available_sorts.splice(0, 3);
|
||||
this.importanceList = res.data.available_importance_levels;
|
||||
this.importanceList.unshift({ desc: "全部", key: "all", name: "全部" });
|
||||
res.data.unshift({ primary_sector: "全部", sub_sectors: [] });
|
||||
this.stockCategoryList = res.data;
|
||||
} else
|
||||
common_vendor.index.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
},
|
||||
@@ -433,6 +548,9 @@ const _sfc_main = {
|
||||
if (this.selectImportanceIndex > 0) {
|
||||
param.importance = this.importanceList[this.selectImportanceIndex].key;
|
||||
}
|
||||
if (this.selectSortKey) {
|
||||
param.sort = this.selectSortKey;
|
||||
}
|
||||
request_api.eventList(param).then((res) => {
|
||||
if (res.success) {
|
||||
if (this.page == 1) {
|
||||
@@ -442,6 +560,38 @@ const _sfc_main = {
|
||||
}
|
||||
}).catch((error) => {
|
||||
});
|
||||
let token = common_vendor.index.getStorageSync("token");
|
||||
if (!token) {
|
||||
let param1 = { email: "1198731706@qq.com", password: "Aa123456", isJson: 1 };
|
||||
request_api.loginByEmail(param1).then((res) => {
|
||||
if (res.code == 200) {
|
||||
common_vendor.index.setStorageSync("token", res.data.token);
|
||||
} else
|
||||
common_vendor.index.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取热门事件数据
|
||||
*/
|
||||
getHotEventListData() {
|
||||
request_api.homeData().then((res) => {
|
||||
if (res.code == 200) {
|
||||
if (this.page == 1) {
|
||||
this.eventList = res.data.events;
|
||||
} else
|
||||
this.eventList = this.eventList.concat(res.data.events);
|
||||
} else
|
||||
common_vendor.index.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -470,87 +620,104 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
d: common_vendor.o(($event) => $options.clickTimeCategoryItem(index), index)
|
||||
};
|
||||
}),
|
||||
i: common_assets._imports_2,
|
||||
j: common_vendor.o(($event) => $options.clickSortItem()),
|
||||
k: common_assets._imports_3,
|
||||
i: common_assets._imports_2$1,
|
||||
j: common_vendor.o(($event) => $options.clickSort()),
|
||||
k: common_assets._imports_3$1,
|
||||
l: common_vendor.o(($event) => $options.clickScreenItem()),
|
||||
m: common_vendor.f($data.topCategoryList, (item, index, i0) => {
|
||||
m: common_vendor.f($data.stockCategoryList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item),
|
||||
a: common_vendor.t(item.primary_sector),
|
||||
b: common_vendor.n("item relative " + ($data.selectTopCategory == index ? "select" : "")),
|
||||
c: index,
|
||||
d: common_vendor.o(($event) => $options.clickTopCategoryItem(index), index)
|
||||
d: common_vendor.o(($event) => $options.clickTopCategoryItem($event, index), index)
|
||||
};
|
||||
}),
|
||||
n: common_vendor.f($data.secondCategoryList, (item, index, i0) => {
|
||||
n: $data.topScrollLeft,
|
||||
o: $data.stockCategoryList.length > 0 && $data.stockCategoryList[$data.selectTopCategory].sub_sectors.length > 0
|
||||
}, $data.stockCategoryList.length > 0 && $data.stockCategoryList[$data.selectTopCategory].sub_sectors.length > 0 ? {
|
||||
p: common_vendor.f($data.stockCategoryList[$data.selectTopCategory].sub_sectors, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item),
|
||||
b: common_vendor.n("item " + ($data.selectSecondCategory == index ? "select" : "")),
|
||||
c: index,
|
||||
d: common_vendor.o(($event) => $options.clickSecondCategoryItem(index), index)
|
||||
d: common_vendor.o(($event) => $options.clickSecondCategoryItem($event, index), index)
|
||||
};
|
||||
}),
|
||||
o: common_vendor.s("top:" + $data.contentTop + "px"),
|
||||
p: common_vendor.f($data.eventList, (item, index, i0) => {
|
||||
q: $data.secondScrollLeft
|
||||
} : {}, {
|
||||
r: common_vendor.s("top:" + $data.contentTop + "px"),
|
||||
s: common_vendor.f($data.eventList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(item.importance),
|
||||
b: common_vendor.n("level " + item.importance),
|
||||
c: common_vendor.t(item.title),
|
||||
d: common_vendor.t(item.description),
|
||||
e: $data.getRateUpOrDown(item.related_avg_chg)
|
||||
e: common_vendor.n("content " + (item.isExpand ? "" : "retract")),
|
||||
f: common_vendor.o(($event) => $options.clickExpandOrRetract(index), index),
|
||||
g: $data.getRateUpOrDown(item.related_avg_chg)
|
||||
}, $data.getRateUpOrDown(item.related_avg_chg) ? {
|
||||
f: common_assets._imports_4
|
||||
h: common_assets._imports_1$1
|
||||
} : {
|
||||
g: common_assets._imports_5
|
||||
i: common_assets._imports_2$2
|
||||
}, {
|
||||
h: common_vendor.t($data.getRateStr(item.related_avg_chg)),
|
||||
i: common_vendor.n("rateItem " + ($data.getRateUpOrDown(item.related_avg_chg) ? "down" : "up")),
|
||||
j: $data.getRateUpOrDown(item.related_max_chg)
|
||||
j: common_vendor.t($data.getRateStr(item.related_avg_chg)),
|
||||
k: common_vendor.n("rateItem " + ($data.getRateUpOrDown(item.related_avg_chg) ? "down" : "up")),
|
||||
l: $data.getRateUpOrDown(item.related_max_chg)
|
||||
}, $data.getRateUpOrDown(item.related_max_chg) ? {
|
||||
k: common_assets._imports_4
|
||||
m: common_assets._imports_1$1
|
||||
} : {
|
||||
l: common_assets._imports_5
|
||||
n: common_assets._imports_2$2
|
||||
}, {
|
||||
m: common_vendor.t($data.getRateStr(item.related_max_chg)),
|
||||
n: common_vendor.n("rateItem " + ($data.getRateUpOrDown(item.related_max_chg) ? "down" : "up")),
|
||||
o: $data.getRateUpOrDown(item.related_week_chg)
|
||||
o: common_vendor.t($data.getRateStr(item.related_max_chg)),
|
||||
p: common_vendor.n("rateItem " + ($data.getRateUpOrDown(item.related_max_chg) ? "down" : "up")),
|
||||
q: $data.getRateUpOrDown(item.related_week_chg)
|
||||
}, $data.getRateUpOrDown(item.related_week_chg) ? {
|
||||
p: common_assets._imports_4
|
||||
r: common_assets._imports_1$1
|
||||
} : {
|
||||
q: common_assets._imports_5
|
||||
s: common_assets._imports_2$2
|
||||
}, {
|
||||
r: common_vendor.t($data.getRateStr(item.related_week_chg)),
|
||||
s: common_vendor.n("rateItem " + ($data.getRateUpOrDown(item.related_week_chg) ? "down" : "up")),
|
||||
t: common_vendor.t($data.getLocaleTime(item.created_at)),
|
||||
v: common_vendor.t(item.view_count),
|
||||
w: common_vendor.t(item.post_count),
|
||||
x: common_vendor.t(item.follower_count),
|
||||
y: common_vendor.o(($event) => $options.clickEventItem(item.id), index),
|
||||
z: index
|
||||
t: common_vendor.t($data.getRateStr(item.related_week_chg)),
|
||||
v: common_vendor.n("rateItem " + ($data.getRateUpOrDown(item.related_week_chg) ? "down" : "up")),
|
||||
w: common_vendor.f(item.related_stocks, (sitem, sindex, i1) => {
|
||||
return {
|
||||
a: common_vendor.t(sitem.stock_name),
|
||||
b: common_vendor.t(($data.getRateUpOrDown(sitem.daily_change) ? "" : "+") + sitem.daily_change),
|
||||
c: sindex,
|
||||
d: common_vendor.o(($event) => $options.clickLookRelatedStockItem(sitem.stock_code), sindex)
|
||||
};
|
||||
}),
|
||||
x: common_vendor.t($data.getLocaleTime(item.created_at)),
|
||||
y: common_vendor.t(item.view_count),
|
||||
z: common_vendor.t(item.post_count),
|
||||
A: common_vendor.t(item.follower_count),
|
||||
B: common_vendor.o(($event) => $options.clickFollowEvent(item.id), index),
|
||||
C: common_vendor.o(($event) => $options.clickEventItem(item.id), index),
|
||||
D: index
|
||||
});
|
||||
}),
|
||||
q: common_assets._imports_1$1,
|
||||
r: common_assets._imports_2$1,
|
||||
s: common_assets._imports_3$1,
|
||||
t: common_vendor.s("top:" + $data.listTop + "px"),
|
||||
v: common_vendor.o(($event) => $options.loadMoreData()),
|
||||
w: common_assets._imports_9,
|
||||
x: common_vendor.f($data.sortList, (item, index, i0) => {
|
||||
t: common_assets._imports_3,
|
||||
v: common_assets._imports_4,
|
||||
w: common_assets._imports_7,
|
||||
x: common_vendor.s("top:" + $data.listTop + "px"),
|
||||
y: common_vendor.o(($event) => $options.loadMoreData()),
|
||||
z: common_assets._imports_11$1,
|
||||
A: common_vendor.f($data.sortList, (item, index, i0) => {
|
||||
return {
|
||||
a: item.icon,
|
||||
b: common_vendor.t(item.name),
|
||||
c: index
|
||||
c: index,
|
||||
d: common_vendor.o(($event) => $options.clickSortListItem(item), index)
|
||||
};
|
||||
}),
|
||||
y: common_vendor.s("margin-top:" + $data.sortListTop + "px;"),
|
||||
z: common_vendor.sr("sortPopup", "9dfd58d8-0"),
|
||||
A: common_vendor.p({
|
||||
B: common_vendor.s("margin-top:" + $data.sortListTop + "px;"),
|
||||
C: common_vendor.sr("sortPopup", "9dfd58d8-0"),
|
||||
D: common_vendor.p({
|
||||
type: "top",
|
||||
["mask-background-color"]: "transparent"
|
||||
}),
|
||||
B: common_assets._imports_2$2,
|
||||
C: common_vendor.s("height:" + $data.menuH + "px;"),
|
||||
D: common_vendor.f($data.screenCategoryList, (item, index, i0) => {
|
||||
E: common_assets._imports_2,
|
||||
F: common_vendor.s("height:" + $data.menuH + "px;"),
|
||||
G: common_vendor.f($data.screenCategoryList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(item),
|
||||
b: $data.selectScreenCategory == index
|
||||
@@ -560,22 +727,22 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
e: common_vendor.o(($event) => $options.clickScreenCategoryItem(index), index)
|
||||
});
|
||||
}),
|
||||
E: $data.selectScreenCategory == 0
|
||||
H: $data.selectScreenCategory == 0
|
||||
}, $data.selectScreenCategory == 0 ? {
|
||||
F: common_vendor.t($data.startDate),
|
||||
G: common_vendor.t($data.endDate),
|
||||
H: common_assets._imports_11,
|
||||
I: common_vendor.o(($event) => $options.clickPreMonth()),
|
||||
J: common_vendor.t($data.selectMonth),
|
||||
K: common_assets._imports_12,
|
||||
L: common_vendor.o(($event) => $options.clickNextMonth()),
|
||||
M: common_vendor.f($data.weekList, (item, index, i0) => {
|
||||
I: common_vendor.t($data.startDate),
|
||||
J: common_vendor.t($data.endDate),
|
||||
K: common_assets._imports_11,
|
||||
L: common_vendor.o(($event) => $options.clickPreMonth()),
|
||||
M: common_vendor.t($data.selectMonth),
|
||||
N: common_assets._imports_12,
|
||||
O: common_vendor.o(($event) => $options.clickNextMonth()),
|
||||
P: common_vendor.f($data.weekList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item),
|
||||
b: index
|
||||
};
|
||||
}),
|
||||
N: common_vendor.f($data.monthDateList[$data.selectMonthIndex], (item, index, i0) => {
|
||||
Q: common_vendor.f($data.monthDateList[$data.selectMonthIndex], (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: item.isToday || item.date == $data.startDate || item.date == $data.endDate
|
||||
}, item.isToday || item.date == $data.startDate || item.date == $data.endDate ? {
|
||||
@@ -596,19 +763,22 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
});
|
||||
})
|
||||
} : {}, {
|
||||
O: $data.selectScreenCategory == 1
|
||||
R: $data.selectScreenCategory == 1
|
||||
}, $data.selectScreenCategory == 1 ? {
|
||||
P: common_vendor.f($data.industryTopCategoryList, (item, index, i0) => {
|
||||
S: common_vendor.f($data.industryTopCategoryList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item),
|
||||
b: index
|
||||
a: common_vendor.t(item.classification_name),
|
||||
b: common_vendor.n("item " + ($data.selectIndustryTopCategory == index ? "select" : "")),
|
||||
c: index,
|
||||
d: common_vendor.o(($event) => $options.clickSelectIndustryTopCategoryItem(index), index)
|
||||
};
|
||||
}),
|
||||
Q: common_assets._imports_1
|
||||
T: common_assets._imports_1,
|
||||
U: common_vendor.t($data.industryTopCategoryList[$data.selectIndustryTopCategory].classification_name)
|
||||
} : {}, {
|
||||
R: $data.selectScreenCategory == 2
|
||||
V: $data.selectScreenCategory == 2
|
||||
}, $data.selectScreenCategory == 2 ? {
|
||||
S: common_vendor.f($data.importanceList, (item, index, i0) => {
|
||||
W: common_vendor.f($data.importanceList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.name),
|
||||
b: common_vendor.n("item " + ($data.selectImportanceIndex == index ? "select" : "")),
|
||||
@@ -617,11 +787,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
};
|
||||
})
|
||||
} : {}, {
|
||||
T: common_vendor.o(($event) => $options.clickCancel()),
|
||||
U: common_vendor.o(($event) => $options.clickCertain()),
|
||||
V: common_vendor.s("padding-top:" + $data.menuTop + "px;"),
|
||||
W: common_vendor.sr("screenPopup", "9dfd58d8-1"),
|
||||
X: common_vendor.p({
|
||||
X: common_vendor.o(($event) => $options.clickCancel()),
|
||||
Y: common_vendor.o(($event) => $options.clickCertain()),
|
||||
Z: common_vendor.s("padding-top:" + $data.menuTop + "px;"),
|
||||
aa: common_vendor.sr("screenPopup", "9dfd58d8-1"),
|
||||
ab: common_vendor.p({
|
||||
type: "top"
|
||||
})
|
||||
});
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -168,14 +168,17 @@
|
||||
}
|
||||
.eventListC .list .item .content {
|
||||
margin-top: 20rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #666;
|
||||
word-break: break-all;
|
||||
}
|
||||
.eventListC .list .item .content.retract {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 3;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #666;
|
||||
}
|
||||
.eventListC .list .item .increaseRateList {
|
||||
white-space: nowrap;
|
||||
@@ -207,6 +210,7 @@
|
||||
}
|
||||
.eventListC .list .item .stockList .stockItem {
|
||||
background-color: #F8F8F8;
|
||||
margin-right: 21rpx;
|
||||
display: inline-block;
|
||||
padding: 0 20rpx;
|
||||
line-height: 60rpx;
|
||||
@@ -215,6 +219,9 @@
|
||||
font-weight: bold;
|
||||
color: #222;
|
||||
}
|
||||
.eventListC .list .item .stockList .stockItem .change {
|
||||
color: #F97316;
|
||||
}
|
||||
.eventListC .list .item .timeToolBarC {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
@@ -430,6 +437,15 @@
|
||||
width: 30rpx;
|
||||
height: auto;
|
||||
}
|
||||
.screenPopup .screenContentC .industryList {
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
.screenPopup .screenContentC .industryList .list .topCategory {
|
||||
padding: 0 30rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #F97316;
|
||||
}
|
||||
.screenPopup .screenContentC .importanceList {
|
||||
margin-top: 16rpx;
|
||||
padding: 0 20rpx;
|
||||
|
||||
@@ -1,26 +1,256 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const request_api = require("../../../request/api.js");
|
||||
const common_assets = require("../../../common/assets.js");
|
||||
const echarts = require("../../../uni_modules/lime-echart/static/echarts.min.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {};
|
||||
return {
|
||||
navH: common_vendor.inject("navHeight"),
|
||||
contentTop: "",
|
||||
navTitle: "",
|
||||
stockCode: "",
|
||||
//股票code
|
||||
categoryList: ["分钟线", "分时图", "日K线"],
|
||||
selectCategory: 0,
|
||||
option: {
|
||||
title: {
|
||||
show: false
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
axisPointer: {
|
||||
type: "cross"
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
show: false
|
||||
},
|
||||
grid: {
|
||||
left: "10%",
|
||||
right: "10%",
|
||||
bottom: "15%"
|
||||
},
|
||||
xAxis: {
|
||||
type: "category",
|
||||
data: [],
|
||||
boundaryGap: false,
|
||||
axisLine: { onZero: false },
|
||||
splitLine: { show: false },
|
||||
min: "dataMin",
|
||||
max: "dataMax"
|
||||
},
|
||||
yAxis: {
|
||||
scale: true,
|
||||
splitArea: {
|
||||
show: true
|
||||
}
|
||||
},
|
||||
dataZoom: [
|
||||
{
|
||||
type: "inside",
|
||||
start: 50,
|
||||
end: 100
|
||||
},
|
||||
{
|
||||
show: true,
|
||||
type: "slider",
|
||||
top: "90%",
|
||||
start: 50,
|
||||
end: 100
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: "日K",
|
||||
type: "candlestick",
|
||||
data: [],
|
||||
itemStyle: {
|
||||
color: "#ec0000",
|
||||
color0: "#8A0000",
|
||||
borderColor: "#00da3c",
|
||||
borderColor0: "#008F28"
|
||||
},
|
||||
markPoint: {
|
||||
label: {
|
||||
formatter: function(param) {
|
||||
return param != null ? Math.round(param.value) + "" : "";
|
||||
}
|
||||
},
|
||||
data: [
|
||||
{
|
||||
name: "Mark",
|
||||
coord: ["2013/5/31", 2300],
|
||||
value: 2300,
|
||||
itemStyle: {
|
||||
color: "rgb(41,60,85)"
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "highest value",
|
||||
type: "max",
|
||||
valueDim: "highest"
|
||||
},
|
||||
{
|
||||
name: "lowest value",
|
||||
type: "min",
|
||||
valueDim: "lowest"
|
||||
},
|
||||
{
|
||||
name: "average value on close",
|
||||
type: "average",
|
||||
valueDim: "close"
|
||||
}
|
||||
],
|
||||
tooltip: {
|
||||
formatter: function(param) {
|
||||
return param.name + "<br>" + (param.data.coord || "");
|
||||
}
|
||||
}
|
||||
},
|
||||
markLine: {
|
||||
symbol: ["none", "none"],
|
||||
data: [
|
||||
[
|
||||
{
|
||||
name: "from lowest to highest",
|
||||
type: "min",
|
||||
valueDim: "lowest",
|
||||
symbol: "circle",
|
||||
symbolSize: 10,
|
||||
label: {
|
||||
show: false
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type: "max",
|
||||
valueDim: "highest",
|
||||
symbol: "circle",
|
||||
symbolSize: 10,
|
||||
label: {
|
||||
show: false
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: false
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
{
|
||||
name: "min line on close",
|
||||
type: "min",
|
||||
valueDim: "close"
|
||||
},
|
||||
{
|
||||
name: "max line on close",
|
||||
type: "max",
|
||||
valueDim: "close"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {}
|
||||
onLoad(e) {
|
||||
this.contentTop = this.navH + (60 + 10) / 750 * common_vendor.inject("windowWidth");
|
||||
if (e.code) {
|
||||
this.stockCode = e.code;
|
||||
this.getStockDetailsData();
|
||||
this.getStockCandlestickChartData();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async init() {
|
||||
const chart = await this.$refs.chartRef.init(echarts);
|
||||
chart.setOption(this.option);
|
||||
},
|
||||
/**
|
||||
* 点击切换分类
|
||||
* @param {Object} index
|
||||
*/
|
||||
clickCategoryItem(index) {
|
||||
if (this.selectCategory != index) {
|
||||
this.selectCategory = index;
|
||||
if (index == 0 || index == 2) {
|
||||
this.getStockCandlestickChartData();
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取股票详情数据
|
||||
*/
|
||||
getStockDetailsData() {
|
||||
let stockCode = this.stockCode;
|
||||
request_api.stockDetails(stockCode).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.navTitle = res.data.basic_info.stock_name + "(" + res.data.basic_info.stock_code + ")";
|
||||
} else
|
||||
common_vendor.index.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取股票K线数据
|
||||
*/
|
||||
getStockCandlestickChartData() {
|
||||
let stockCode = this.stockCode;
|
||||
let param = { chart_type: "minute" };
|
||||
if (this.selectCategory == 2) {
|
||||
param.chart_type = "daily";
|
||||
}
|
||||
request_api.stockCandlestickChartData(stockCode, param).then((res) => {
|
||||
let data = res.data;
|
||||
let categoryData = [];
|
||||
for (let item of data) {
|
||||
categoryData.push(item.time);
|
||||
}
|
||||
this.option.xAxis.data = categoryData;
|
||||
this.init();
|
||||
}).catch((error) => {
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_navBar2 = common_vendor.resolveComponent("navBar");
|
||||
_easycom_navBar2();
|
||||
const _easycom_l_echart2 = common_vendor.resolveComponent("l-echart");
|
||||
(_easycom_navBar2 + _easycom_l_echart2)();
|
||||
}
|
||||
const _easycom_navBar = () => "../../../components/navBar/navBar.js";
|
||||
const _easycom_l_echart = () => "../../../uni_modules/lime-echart/components/l-echart/l-echart.js";
|
||||
if (!Math) {
|
||||
_easycom_navBar();
|
||||
(_easycom_navBar + _easycom_l_echart)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.p({
|
||||
leftText: "科锐国际(300662.SZ)"
|
||||
leftText: $data.navTitle
|
||||
}),
|
||||
b: common_assets._imports_0
|
||||
b: common_assets._imports_0,
|
||||
c: common_vendor.f($data.categoryList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(item),
|
||||
b: $data.selectCategory == index
|
||||
}, $data.selectCategory == index ? {} : {}, {
|
||||
c: common_vendor.n("item relative " + ($data.selectCategory == index ? "select" : "")),
|
||||
d: index,
|
||||
e: common_vendor.o(($event) => $options.clickCategoryItem(index), index)
|
||||
});
|
||||
}),
|
||||
d: common_vendor.s("top:" + $data.navH + "px;"),
|
||||
e: common_vendor.sr("chartRef", "42054871-1"),
|
||||
f: common_vendor.s("top:" + $data.contentTop + "px;")
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"usingComponents": {
|
||||
"nav-bar": "../../../components/navBar/navBar"
|
||||
"nav-bar": "../../../components/navBar/navBar",
|
||||
"l-echart": "../../../uni_modules/lime-echart/components/l-echart/l-echart"
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
<view><nav-bar wx:if="{{a}}" u-i="42054871-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image></view>
|
||||
<view><nav-bar wx:if="{{a}}" u-i="42054871-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="tabC fixed" style="{{d}}"><view wx:for="{{c}}" wx:for-item="item" wx:key="d" class="{{item.c}}" bindtap="{{item.e}}">{{item.a}} <view wx:if="{{item.b}}" class="line absolute"></view></view></view><view class="contentC fixed" style="{{f}}"><view style="width:750rpx;height:400rpx"><l-echart class="r" u-r="chartRef" u-i="42054871-1" bind:__l="__l"></l-echart></view><view class="section">关联描述</view><view class="des">全球原油运输巨头,VLCC运力规模全球第一,直接受益于霍尔木兹海峡地缘风险带来的运价上涨及风险溢价。</view></view></view>
|
||||
@@ -4,3 +4,48 @@
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.tabC {
|
||||
background-color: white;
|
||||
margin-top: 10rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
}
|
||||
.tabC .item {
|
||||
display: inline-block;
|
||||
padding: 0 30rpx;
|
||||
line-height: 60rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
color: #42485B;
|
||||
}
|
||||
.tabC .item.select {
|
||||
font-weight: bold;
|
||||
color: #F97316;
|
||||
}
|
||||
.tabC .item.select .line {
|
||||
background-color: #F97316;
|
||||
left: calc((100% - 50rpx)/2);
|
||||
bottom: 0;
|
||||
width: 50rpx;
|
||||
height: 2rpx;
|
||||
}
|
||||
.contentC {
|
||||
background-color: white;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
.contentC .section {
|
||||
padding: 0 28rpx;
|
||||
line-height: 80rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #222;
|
||||
}
|
||||
.contentC .des {
|
||||
padding: 0 30rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
258
unpackage/dist/dev/mp-weixin/pages/invest/invest.js
vendored
258
unpackage/dist/dev/mp-weixin/pages/invest/invest.js
vendored
@@ -1,6 +1,7 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const request_api = require("../../request/api.js");
|
||||
const utils_util = require("../../utils/util.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
@@ -21,14 +22,19 @@ const _sfc_main = {
|
||||
//是否展开日期
|
||||
tabList: ["事件", "数据"],
|
||||
selectTab: 0,
|
||||
topCategoryList: ["全部", "大周期", "大消费", "大金融地产", "TMT板块", "公共产业板块"],
|
||||
stockCategoryList: [],
|
||||
selectTopCategory: 0,
|
||||
listTop: "",
|
||||
todayDate: "",
|
||||
//今日日期
|
||||
selectDate: "",
|
||||
//选择查看的日期
|
||||
progress: 75,
|
||||
eventList: []
|
||||
eventList: [],
|
||||
//事件列表
|
||||
dataList: [],
|
||||
//数据列表
|
||||
getLocaleHourMinute: utils_util.getLocaleHourMinute
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
@@ -37,7 +43,7 @@ const _sfc_main = {
|
||||
let year = date.getFullYear();
|
||||
let month = date.getMonth() + 1;
|
||||
let day = date.getDate();
|
||||
this.selectDate = date.getFullYear() + "-" + (month > 9 ? month : "0" + month) + "-" + (day > 9 ? day : "0" + day);
|
||||
this.todayDate = this.selectDate = date.getFullYear() + "-" + (month > 9 ? month : "0" + month) + "-" + (day > 9 ? day : "0" + day);
|
||||
let week = date.getDay() || 7;
|
||||
let diff = week - 1;
|
||||
let daysOfWeek = [];
|
||||
@@ -85,6 +91,7 @@ const _sfc_main = {
|
||||
}
|
||||
this.monthDateList = daysOfMonth;
|
||||
this.listTop = this.contentTop + (68 + 40 + 96 + 74 + 70 + 74 + 22) / 750 * common_vendor.inject("windowWidth");
|
||||
this.getStockCategoryListData();
|
||||
this.getEventListData();
|
||||
this.getCurrentMonthEventCountData();
|
||||
},
|
||||
@@ -94,6 +101,18 @@ const _sfc_main = {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 点击今日日期
|
||||
*/
|
||||
clickTodayDate() {
|
||||
if (this.selectDate != this.todayDate) {
|
||||
this.selectDate = this.todayDate;
|
||||
if (this.selectTab == 0) {
|
||||
this.getEventListData();
|
||||
} else
|
||||
this.getDataListData();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击展开或收起
|
||||
*/
|
||||
@@ -111,7 +130,10 @@ const _sfc_main = {
|
||||
clickSelectDate(item) {
|
||||
if (this.selectDate != item.date) {
|
||||
this.selectDate = item.date;
|
||||
this.getEventListData();
|
||||
if (this.selectTab == 0) {
|
||||
this.getEventListData();
|
||||
} else
|
||||
this.getDataListData();
|
||||
}
|
||||
},
|
||||
/**
|
||||
@@ -120,6 +142,10 @@ const _sfc_main = {
|
||||
clickTabItem(index) {
|
||||
if (this.selectTab != index) {
|
||||
this.selectTab = index;
|
||||
if (this.selectTab == 0) {
|
||||
this.getEventListData();
|
||||
} else
|
||||
this.getDataListData();
|
||||
}
|
||||
},
|
||||
/**
|
||||
@@ -128,28 +154,68 @@ const _sfc_main = {
|
||||
clickTopCategoryItem(index) {
|
||||
if (this.selectTopCategory != index) {
|
||||
this.selectTopCategory = index;
|
||||
if (this.selectTab == 0) {
|
||||
this.getEventListData();
|
||||
} else
|
||||
this.getDataListData();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击查看事件详情
|
||||
*/
|
||||
clickEventItem() {
|
||||
clickEventItem(id) {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/invest/investDetails/investDetails"
|
||||
url: "/pages/invest/investDetails/investDetails?id=" + id
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取股票分类
|
||||
*/
|
||||
getStockCategoryListData() {
|
||||
request_api.stockCategoryList().then((res) => {
|
||||
if (res.code == 200) {
|
||||
res.data.unshift({ primary_sector: "全部", sub_sectors: [] });
|
||||
this.stockCategoryList = res.data;
|
||||
} else
|
||||
common_vendor.index.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取事件列表数据
|
||||
*/
|
||||
getEventListData() {
|
||||
let param = { date: this.selectDate };
|
||||
let param = { start: this.selectDate };
|
||||
if (this.selectTopCategory > 0) {
|
||||
param.category = this.stockCategoryList[this.selectTopCategory].primary_sector;
|
||||
}
|
||||
request_api.calendarEventList(param).then((res) => {
|
||||
for (let item of res) {
|
||||
let calendarTime = item.calendar_time;
|
||||
let time = calendarTime.split("T")[1];
|
||||
item.time = time.substr(0, 5);
|
||||
}
|
||||
this.eventList = res;
|
||||
if (res.code == 200) {
|
||||
this.eventList = res.data.events;
|
||||
} else
|
||||
common_vendor.index.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取事件列表数据
|
||||
*/
|
||||
getDataListData() {
|
||||
let param = { start: this.selectDate };
|
||||
request_api.calendarDataList(param).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.dataList = res.data.data_list;
|
||||
} else
|
||||
common_vendor.index.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
},
|
||||
@@ -195,72 +261,91 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
e: common_vendor.t($data.selectDate),
|
||||
f: common_assets._imports_2$3,
|
||||
g: common_vendor.o(($event) => $options.clickExpandOrRetract()),
|
||||
h: common_vendor.f($data.weekList, (item, index, i0) => {
|
||||
h: common_vendor.o(($event) => $options.clickTodayDate()),
|
||||
i: common_vendor.f($data.weekList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item),
|
||||
b: index
|
||||
};
|
||||
}),
|
||||
i: $data.isExpand
|
||||
j: $data.isExpand
|
||||
}, $data.isExpand ? {
|
||||
j: common_vendor.f($data.monthDateList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(item.day),
|
||||
b: common_vendor.n("date " + (item.isToday ? "today" : item.isCurrentMonth ? "" : " notCurrentMonth")),
|
||||
c: item.className
|
||||
k: common_vendor.f($data.monthDateList, (item, index, i0) => {
|
||||
return common_vendor.e($data.selectDate != $data.todayDate ? common_vendor.e({
|
||||
a: $data.selectDate == item.date
|
||||
}, $data.selectDate == item.date ? {
|
||||
b: common_vendor.t(item.day)
|
||||
} : {
|
||||
c: common_vendor.t(item.day),
|
||||
d: common_vendor.n("date " + (item.isCurrentMonth ? "" : " notCurrentMonth"))
|
||||
}) : {
|
||||
e: common_vendor.t(item.day),
|
||||
f: common_vendor.n("date " + (item.isToday ? "today" : item.isCurrentMonth ? "" : " notCurrentMonth"))
|
||||
}, {
|
||||
g: item.className
|
||||
}, item.className ? common_vendor.e({
|
||||
d: item.className == "bg-gradient-danger"
|
||||
h: item.className == "bg-gradient-danger"
|
||||
}, item.className == "bg-gradient-danger" ? {
|
||||
e: common_vendor.t(item.eventCount)
|
||||
} : {}, {
|
||||
f: item.className == "bg-gradient-warning"
|
||||
}, item.className == "bg-gradient-warning" ? {
|
||||
g: common_vendor.t(item.eventCount)
|
||||
} : {}, {
|
||||
h: item.className == "bg-gradient-info"
|
||||
}, item.className == "bg-gradient-info" ? {
|
||||
i: common_vendor.t(item.eventCount)
|
||||
} : {}, {
|
||||
j: item.className == "bg-gradient-success"
|
||||
}, item.className == "bg-gradient-success" ? {
|
||||
j: item.className == "bg-gradient-warning"
|
||||
}, item.className == "bg-gradient-warning" ? {
|
||||
k: common_vendor.t(item.eventCount)
|
||||
} : {}, {
|
||||
l: item.className == "bg-gradient-info"
|
||||
}, item.className == "bg-gradient-info" ? {
|
||||
m: common_vendor.t(item.eventCount)
|
||||
} : {}, {
|
||||
n: item.className == "bg-gradient-success"
|
||||
}, item.className == "bg-gradient-success" ? {
|
||||
o: common_vendor.t(item.eventCount)
|
||||
} : {}) : {}, {
|
||||
l: index,
|
||||
m: common_vendor.o(($event) => $options.clickSelectDate(item), index)
|
||||
p: index,
|
||||
q: common_vendor.o(($event) => $options.clickSelectDate(item), index)
|
||||
});
|
||||
})
|
||||
}),
|
||||
l: $data.selectDate != $data.todayDate
|
||||
} : {
|
||||
k: common_vendor.f($data.weekDateList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(item.day),
|
||||
b: common_vendor.n("date " + (item.isToday ? "today" : "")),
|
||||
c: item.className
|
||||
m: common_vendor.f($data.weekDateList, (item, index, i0) => {
|
||||
return common_vendor.e($data.selectDate != $data.todayDate ? common_vendor.e({
|
||||
a: $data.selectDate == item.date
|
||||
}, $data.selectDate == item.date ? {
|
||||
b: common_vendor.t(item.day)
|
||||
} : {
|
||||
c: common_vendor.t(item.day),
|
||||
d: common_vendor.n("date " + (item.isCurrentMonth ? "" : " notCurrentMonth"))
|
||||
}) : {
|
||||
e: common_vendor.t(item.day),
|
||||
f: common_vendor.n("date " + (item.isToday ? "today" : item.isCurrentMonth ? "" : " notCurrentMonth"))
|
||||
}, {
|
||||
g: item.className
|
||||
}, item.className ? common_vendor.e({
|
||||
d: item.className == "bg-gradient-danger"
|
||||
h: item.className == "bg-gradient-danger"
|
||||
}, item.className == "bg-gradient-danger" ? {
|
||||
e: common_vendor.t(item.eventCount)
|
||||
} : {}, {
|
||||
f: item.className == "bg-gradient-warning"
|
||||
}, item.className == "bg-gradient-warning" ? {
|
||||
g: common_vendor.t(item.eventCount)
|
||||
} : {}, {
|
||||
h: item.className == "bg-gradient-info"
|
||||
}, item.className == "bg-gradient-info" ? {
|
||||
i: common_vendor.t(item.eventCount)
|
||||
} : {}, {
|
||||
j: item.className == "bg-gradient-success"
|
||||
}, item.className == "bg-gradient-success" ? {
|
||||
j: item.className == "bg-gradient-warning"
|
||||
}, item.className == "bg-gradient-warning" ? {
|
||||
k: common_vendor.t(item.eventCount)
|
||||
} : {}, {
|
||||
l: item.className == "bg-gradient-info"
|
||||
}, item.className == "bg-gradient-info" ? {
|
||||
m: common_vendor.t(item.eventCount)
|
||||
} : {}, {
|
||||
n: item.className == "bg-gradient-success"
|
||||
}, item.className == "bg-gradient-success" ? {
|
||||
o: common_vendor.t(item.eventCount)
|
||||
} : {}) : {}, {
|
||||
l: common_vendor.o(($event) => $options.clickSelectDate(item), index),
|
||||
m: index
|
||||
p: common_vendor.o(($event) => $options.clickSelectDate(item), index),
|
||||
q: index
|
||||
});
|
||||
})
|
||||
}),
|
||||
n: $data.selectDate != $data.todayDate
|
||||
}, {
|
||||
l: common_vendor.t($data.isExpand ? "收起" : "展开"),
|
||||
m: common_assets._imports_3$2,
|
||||
n: common_vendor.o(($event) => $options.clickExpandOrRetract()),
|
||||
o: common_vendor.f($data.tabList, (item, index, i0) => {
|
||||
o: common_vendor.t($data.isExpand ? "收起" : "展开"),
|
||||
p: common_assets._imports_3$2,
|
||||
q: common_vendor.o(($event) => $options.clickExpandOrRetract()),
|
||||
r: common_vendor.f($data.tabList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item),
|
||||
b: common_vendor.n("item " + ($data.selectTab == index ? "select" : "")),
|
||||
@@ -268,9 +353,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
d: common_vendor.o(($event) => $options.clickTabItem(index), index)
|
||||
};
|
||||
}),
|
||||
p: common_vendor.f($data.topCategoryList, (item, index, i0) => {
|
||||
s: common_vendor.f($data.stockCategoryList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(item),
|
||||
a: common_vendor.t(item.primary_sector),
|
||||
b: $data.selectTopCategory == index
|
||||
}, $data.selectTopCategory == index ? {} : {}, {
|
||||
c: common_vendor.n("item relative " + ($data.selectTopCategory == index ? "select" : "")),
|
||||
@@ -278,20 +363,23 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
e: common_vendor.o(($event) => $options.clickTopCategoryItem(index), index)
|
||||
});
|
||||
}),
|
||||
q: $data.selectTab == 0
|
||||
t: $data.selectTab == 0
|
||||
}, $data.selectTab == 0 ? {
|
||||
r: common_vendor.f($data.eventList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.time),
|
||||
v: common_vendor.f($data.eventList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t($data.getLocaleHourMinute(item.start_time)),
|
||||
b: common_vendor.f(5, (sitem, sindex, i1) => {
|
||||
return {
|
||||
a: sindex < item.star ? "/static/icon/invest/star_s.png" : "/static/icon/invest/star.png"
|
||||
};
|
||||
}),
|
||||
c: index,
|
||||
d: common_vendor.t(item.title),
|
||||
e: common_vendor.t(item.forecast),
|
||||
f: common_vendor.f(JSON.parse(item.concepts), (citem, cindex, i1) => {
|
||||
d: common_vendor.t(item.category.event_type),
|
||||
e: common_vendor.t(item.title),
|
||||
f: common_vendor.t(item.description),
|
||||
g: item.concepts
|
||||
}, item.concepts ? {
|
||||
h: common_vendor.f(JSON.parse(item.concepts), (citem, cindex, i1) => {
|
||||
return {
|
||||
a: common_vendor.t(citem[0]),
|
||||
b: common_vendor.t(citem[2] * 100),
|
||||
@@ -305,28 +393,36 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
}),
|
||||
e: cindex
|
||||
};
|
||||
}),
|
||||
g: index,
|
||||
h: common_vendor.o(($event) => $options.clickEventItem(), index)
|
||||
};
|
||||
})
|
||||
} : {}, {
|
||||
i: index,
|
||||
j: common_vendor.o(($event) => $options.clickEventItem(item.id), index)
|
||||
});
|
||||
})
|
||||
} : {}, {
|
||||
s: $data.selectTab == 1
|
||||
w: $data.selectTab == 1
|
||||
}, $data.selectTab == 1 ? {
|
||||
t: common_vendor.f(5, (item, index, i0) => {
|
||||
x: common_vendor.f($data.dataList, (item, index, i0) => {
|
||||
return {
|
||||
a: index
|
||||
a: common_vendor.t($data.getLocaleHourMinute(item.created_at)),
|
||||
b: common_vendor.f(5, (item2, index2, i1) => {
|
||||
return {
|
||||
a: index2
|
||||
};
|
||||
}),
|
||||
c: common_vendor.f(5, (item2, index2, i1) => {
|
||||
return {
|
||||
a: index2
|
||||
};
|
||||
}),
|
||||
d: common_vendor.t(item.title),
|
||||
e: index
|
||||
};
|
||||
}),
|
||||
v: common_assets._imports_4$1,
|
||||
w: common_vendor.f(5, (item, index, i0) => {
|
||||
return {
|
||||
a: index
|
||||
};
|
||||
}),
|
||||
x: common_assets._imports_5$1
|
||||
y: common_assets._imports_4$1,
|
||||
z: common_assets._imports_5
|
||||
} : {}, {
|
||||
y: common_vendor.s("top:" + $data.contentTop + "px;")
|
||||
A: common_vendor.s("top:" + $data.contentTop + "px;")
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view><image class="topBg absolute" src="{{a}}" mode="widthFix"></image><view class="navTitle fixed" style="{{b}}">投资</view><view class="searchC fixed flex" style="{{d}}"><image class="icon" src="{{c}}" mode="widthFix"></image><input class="flex1" type="text" placeholder="搜索话题/股票名称" placeholder-style="color:#94989A"/><view class="line"></view><view class="search">搜索</view></view><view class="contentC fixed" style="{{y}}"><view class=""><view class="todayC flex" bindtap="{{g}}"><view class="todayDateC flex"><view class="date">{{e}}</view><image class="icon" src="{{f}}" mode="widthFix"></image></view><view class="flex1"></view><view class="today">今</view></view><view class="weekList flex"><view wx:for="{{h}}" wx:for-item="item" wx:key="b" class="item flex1">{{item.a}}</view></view><view wx:if="{{i}}" class="monthDateList flexWrap"><view wx:for="{{j}}" wx:for-item="item" wx:key="l" class="item flexColumnCenter" bindtap="{{item.m}}"><view class="{{item.b}}">{{item.a}}</view><block wx:if="{{item.c}}"><view wx:if="{{item.d}}" class="eventNum danger">{{item.e}}</view><view wx:if="{{item.f}}" class="eventNum warning">{{item.g}}</view><view wx:if="{{item.h}}" class="eventNum info">{{item.i}}</view><view wx:if="{{item.j}}" class="eventNum success">{{item.k}}</view></block><block wx:else><view class="eventNum"></view></block></view></view><view wx:else class="weekDateList flex"><view wx:for="{{k}}" wx:for-item="item" wx:key="m" class="item flex1 flexColumnCenter" bindtap="{{item.l}}"><view class="{{item.b}}">{{item.a}}</view><block wx:if="{{item.c}}"><view wx:if="{{item.d}}" class="eventNum danger">{{item.e}}</view><view wx:if="{{item.f}}" class="eventNum warning">{{item.g}}</view><view wx:if="{{item.h}}" class="eventNum info">{{item.i}}</view><view wx:if="{{item.j}}" class="eventNum success">{{item.k}}</view></block><block wx:else><view class="eventNum"></view></block></view></view><view class="expandBgC flexCenter"><view class="expandC flex" bindtap="{{n}}"><text>{{l}}</text><image class="arrow" src="{{m}}" mode="widthFix"></image></view></view></view><view class="tabC"><view wx:for="{{o}}" wx:for-item="item" wx:key="c" class="{{item.b}}" bindtap="{{item.d}}">{{item.a}}</view></view><scroll-view scroll-x class="topCategoryC"><view wx:for="{{p}}" wx:for-item="item" wx:key="d" class="{{item.c}}" bindtap="{{item.e}}">{{item.a}} <view wx:if="{{item.b}}" class="line absolute"></view></view></scroll-view><view wx:if="{{q}}" class="eventList"><view wx:for="{{r}}" wx:for-item="item" wx:key="g" class="item" bindtap="{{item.h}}"><view class="flex"><view class="time flex1">{{item.a}}</view><view class="starC relative"><view class="starList flex"><image wx:for="{{item.b}}" wx:for-item="sitem" wx:key="c" class="icon" src="{{sitem.a}}" mode="widthFix"></image></view></view></view><view class="categoryTitleC flex"><view class="category">宏观政策</view><view class="title flex1">{{item.d}}</view></view><view class="labelC"><view class="label"></view></view><view class="content"><text>{{item.e}}</text></view><scroll-view scroll-x class="percentList"><view wx:for="{{item.f}}" wx:for-item="citem" wx:key="e" class="percentItem">{{citem.a}} <zui-progress-circle wx:if="{{citem.d}}" u-s="{{['d']}}" u-i="{{citem.c}}" bind:__l="__l" u-p="{{citem.d}}"><view class="num">{{citem.b}}%</view></zui-progress-circle></view></scroll-view></view></view><view wx:if="{{s}}" class="dataList"><view class="item"><view class="flex"><view class="time flex1">21:00</view><view class="starC relative"><view class="starBgList flex"><image wx:for="{{t}}" wx:for-item="item" wx:key="a" class="icon" src="{{v}}" mode="widthFix"></image></view><view class="starList absolute flex"><image wx:for="{{w}}" wx:for-item="item" wx:key="a" class="icon" src="{{x}}" mode="widthFix"></image></view></view></view><view class="title">外交部长王毅将对俄罗斯进行正式访问。</view><view class="valueList flex between"><view class="pre">前值 -7.1</view><view class="prediction">预测 93</view><view class="actual">实际 ————</view></view></view></view></view></view>
|
||||
<view><image class="topBg absolute" src="{{a}}" mode="widthFix"></image><view class="navTitle fixed" style="{{b}}">投资</view><view class="searchC fixed flex" style="{{d}}"><image class="icon" src="{{c}}" mode="widthFix"></image><input class="flex1" type="text" placeholder="搜索话题/股票名称" placeholder-style="color:#94989A"/><view class="line"></view><view class="search">搜索</view></view><view class="contentC fixed" style="{{A}}"><view class=""><view class="todayC flex"><view class="todayDateC flex" bindtap="{{g}}"><view class="date">{{e}}</view><image class="icon" src="{{f}}" mode="widthFix"></image></view><view class="flex1"></view><view class="today" bindtap="{{h}}">今</view></view><view class="weekList flex"><view wx:for="{{i}}" wx:for-item="item" wx:key="b" class="item flex1">{{item.a}}</view></view><view wx:if="{{j}}" class="monthDateList flexWrap"><view wx:for="{{k}}" wx:for-item="item" wx:key="p" class="item flexColumnCenter" bindtap="{{item.q}}"><block wx:if="{{l}}"><view wx:if="{{item.a}}" class="date today">{{item.b}}</view><view wx:else class="{{item.d}}">{{item.c}}</view></block><block wx:else><view class="{{item.f}}">{{item.e}}</view></block><block wx:if="{{item.g}}"><view wx:if="{{item.h}}" class="eventNum danger">{{item.i}}</view><view wx:if="{{item.j}}" class="eventNum warning">{{item.k}}</view><view wx:if="{{item.l}}" class="eventNum info">{{item.m}}</view><view wx:if="{{item.n}}" class="eventNum success">{{item.o}}</view></block><block wx:else><view class="eventNum"></view></block></view></view><view wx:else class="weekDateList flex"><view wx:for="{{m}}" wx:for-item="item" wx:key="q" class="item flex1 flexColumnCenter" bindtap="{{item.p}}"><block wx:if="{{n}}"><view wx:if="{{item.a}}" class="date today">{{item.b}}</view><view wx:else class="{{item.d}}">{{item.c}}</view></block><block wx:else><view class="{{item.f}}">{{item.e}}</view></block><block wx:if="{{item.g}}"><view wx:if="{{item.h}}" class="eventNum danger">{{item.i}}</view><view wx:if="{{item.j}}" class="eventNum warning">{{item.k}}</view><view wx:if="{{item.l}}" class="eventNum info">{{item.m}}</view><view wx:if="{{item.n}}" class="eventNum success">{{item.o}}</view></block><block wx:else><view class="eventNum"></view></block></view></view><view class="expandBgC flexCenter"><view class="expandC flex" bindtap="{{q}}"><text>{{o}}</text><image class="arrow" src="{{p}}" mode="widthFix"></image></view></view></view><view class="tabC"><view wx:for="{{r}}" wx:for-item="item" wx:key="c" class="{{item.b}}" bindtap="{{item.d}}">{{item.a}}</view></view><scroll-view scroll-x class="topCategoryC"><view wx:for="{{s}}" wx:for-item="item" wx:key="d" class="{{item.c}}" bindtap="{{item.e}}">{{item.a}} <view wx:if="{{item.b}}" class="line absolute"></view></view></scroll-view><view wx:if="{{t}}" class="eventList"><view wx:for="{{v}}" wx:for-item="item" wx:key="i" class="item" bindtap="{{item.j}}"><view class="flex"><view class="time flex1">{{item.a}}</view><view class="starC relative"><view class="starList flex"><image wx:for="{{item.b}}" wx:for-item="sitem" wx:key="c" class="icon" src="{{sitem.a}}" mode="widthFix"></image></view></view></view><view class="categoryTitleC flex"><view class="category">{{item.d}}</view><view class="title flex1">{{item.e}}</view></view><view class="labelC"><view class="label"></view></view><view class="content"><text>{{item.f}}</text></view><scroll-view wx:if="{{item.g}}" scroll-x class="percentList"><view wx:for="{{item.h}}" wx:for-item="citem" wx:key="e" class="percentItem">{{citem.a}} <zui-progress-circle wx:if="{{citem.d}}" u-s="{{['d']}}" u-i="{{citem.c}}" bind:__l="__l" u-p="{{citem.d}}"><view class="num">{{citem.b}}%</view></zui-progress-circle></view></scroll-view></view></view><view wx:if="{{w}}" class="dataList"><view wx:for="{{x}}" wx:for-item="item" wx:key="e" class="item"><view class="flex"><view class="time flex1">{{item.a}}</view><view class="starC relative"><view class="starBgList flex"><image wx:for="{{item.b}}" wx:for-item="item" wx:key="a" class="icon" src="{{y}}" mode="widthFix"></image></view><view class="starList absolute flex"><image wx:for="{{item.c}}" wx:for-item="item" wx:key="a" class="icon" src="{{z}}" mode="widthFix"></image></view></view></view><view class="title">{{item.d}}</view><view class="valueList flex between"><view class="pre">前值 -7.1</view><view class="prediction">预测 93</view><view class="actual">实际 ————</view></view></view></view></view></view>
|
||||
@@ -42,8 +42,12 @@ const _sfc_main = {
|
||||
]
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(e) {
|
||||
this.contentTop = this.navH + (30 + 74) / 750 * common_vendor.inject("windowWidth");
|
||||
if (e.id) {
|
||||
this.eventId = e.id;
|
||||
this.getEventDetailsData();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
|
||||
92
unpackage/dist/dev/mp-weixin/pages/login/codeLogin/codeLogin.js
vendored
Normal file
92
unpackage/dist/dev/mp-weixin/pages/login/codeLogin/codeLogin.js
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const request_api = require("../../../request/api.js");
|
||||
const common_assets = require("../../../common/assets.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
contentTop: "",
|
||||
mobile: "",
|
||||
//手机号
|
||||
code: ""
|
||||
//验证码
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.contentTop = common_vendor.inject("navHeight") + 230 / 750 * common_vendor.inject("windowWidth");
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 点击获取验证码
|
||||
*/
|
||||
clickGetCode() {
|
||||
},
|
||||
/**
|
||||
* 点击立即登录
|
||||
*/
|
||||
clickLoginAtOnce() {
|
||||
if (!this.mobile) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请输入手机号",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!this.code) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请输入验证码",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
let param = { phone: this.mobile, code: this.code, isJson: 1 };
|
||||
request_api.loginByPhone(param).then((res) => {
|
||||
if (res.code == 200)
|
||||
;
|
||||
else
|
||||
common_vendor.index.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 点击一键登录
|
||||
*/
|
||||
clickOneClickLogin() {
|
||||
common_vendor.index.navigateBack();
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_navBar2 = common_vendor.resolveComponent("navBar");
|
||||
_easycom_navBar2();
|
||||
}
|
||||
const _easycom_navBar = () => "../../../components/navBar/navBar.js";
|
||||
if (!Math) {
|
||||
_easycom_navBar();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.p({
|
||||
leftText: "登录",
|
||||
hideNavBg: true,
|
||||
backBlack: true
|
||||
}),
|
||||
b: common_vendor.s("margin-top:" + $data.contentTop + "px;"),
|
||||
c: common_assets._imports_0$1,
|
||||
d: common_assets._imports_1$7,
|
||||
e: $data.mobile,
|
||||
f: common_vendor.o(($event) => $data.mobile = $event.detail.value),
|
||||
g: common_assets._imports_2$8,
|
||||
h: $data.code,
|
||||
i: common_vendor.o(($event) => $data.code = $event.detail.value),
|
||||
j: common_vendor.o(($event) => $options.clickGetCode()),
|
||||
k: common_vendor.o(($event) => $options.clickLoginAtOnce()),
|
||||
l: common_vendor.o(($event) => $options.clickOneClickLogin())
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/login/codeLogin/codeLogin.js.map
|
||||
6
unpackage/dist/dev/mp-weixin/pages/login/codeLogin/codeLogin.json
vendored
Normal file
6
unpackage/dist/dev/mp-weixin/pages/login/codeLogin/codeLogin.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"usingComponents": {
|
||||
"nav-bar": "../../../components/navBar/navBar"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/login/codeLogin/codeLogin.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/login/codeLogin/codeLogin.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view><nav-bar wx:if="{{a}}" u-i="426e5c02-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="logo" style="{{b}}" src="{{c}}" mode="widthFix"></image><view class="loginTitle">欢迎登录价值前沿平台</view><view class="inputC mobile flex"><image class="icon" src="{{d}}" mode="widthFix"></image><input class="flex1" type="number" placeholder="请输入手机号" placeholder-style="color: #aaa" value="{{e}}" bindinput="{{f}}"/></view><view class="inputC code flex"><image class="icon" src="{{g}}" mode="widthFix"></image><input class="flex1" type="number" placeholder="请输入验证码" placeholder-style="color: #aaa" value="{{h}}" bindinput="{{i}}"/><view class="getCode" bindtap="{{j}}">获取验证码</view></view><view class="btn loginAtOnce" bindtap="{{k}}">立即登录</view><view class="btn oneClickLogin" bindtap="{{l}}">授权手机号一键登录</view><view class="agreeProtocolC fixed flexCenter"><view class="agreeC"><image class="icon" src="{{''}}" mode="widthFix"></image></view> 阅读并同意我们的<text class="protocol">《用户服务协议》</text>和<text class="protocol">《隐私政策》</text></view></view>
|
||||
80
unpackage/dist/dev/mp-weixin/pages/login/codeLogin/codeLogin.wxss
vendored
Normal file
80
unpackage/dist/dev/mp-weixin/pages/login/codeLogin/codeLogin.wxss
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
.logo {
|
||||
margin-left: calc((100% - 144rpx)/2);
|
||||
width: 144rpx;
|
||||
height: auto;
|
||||
}
|
||||
.loginTitle {
|
||||
margin: 40rpx 80rpx 0;
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
.inputC {
|
||||
background-color: #f8f8f8;
|
||||
margin: 0 75rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.inputC input {
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.inputC.mobile {
|
||||
margin-top: 40rpx;
|
||||
padding-left: 29rpx;
|
||||
}
|
||||
.inputC.mobile .icon {
|
||||
margin-right: 13rpx;
|
||||
width: 26rpx;
|
||||
height: auto;
|
||||
}
|
||||
.inputC.code {
|
||||
margin-top: 36rpx;
|
||||
padding-left: 27rpx;
|
||||
}
|
||||
.inputC.code .icon {
|
||||
margin-right: 10rpx;
|
||||
width: 26rpx;
|
||||
height: auto;
|
||||
}
|
||||
.inputC.code .getCode {
|
||||
padding: 0 30rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: #F97316;
|
||||
}
|
||||
.btn {
|
||||
margin: 0 75rpx;
|
||||
line-height: 80rpx;
|
||||
border-radius: 20rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
}
|
||||
.btn.loginAtOnce {
|
||||
background-color: #F97316;
|
||||
margin-top: 60rpx;
|
||||
color: white;
|
||||
}
|
||||
.btn.oneClickLogin {
|
||||
background-color: #FFF1E8;
|
||||
margin-top: 28rpx;
|
||||
color: #F97316;
|
||||
}
|
||||
.agreeProtocolC {
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: calc(120rpx + env(safe-area-inset-bottom));
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.agreeProtocolC .agreeC {
|
||||
padding: 14rpx;
|
||||
}
|
||||
.agreeProtocolC .agreeC .icon {
|
||||
width: 28rpx;
|
||||
height: auto;
|
||||
}
|
||||
.agreeProtocolC .protocol {
|
||||
color: #F97316;
|
||||
}
|
||||
77
unpackage/dist/dev/mp-weixin/pages/login/login.js
vendored
Normal file
77
unpackage/dist/dev/mp-weixin/pages/login/login.js
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const request_api = require("../../request/api.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
contentTop: ""
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.contentTop = common_vendor.inject("navHeight") + 230 / 750 * common_vendor.inject("windowWidth");
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 点击一键登录
|
||||
*/
|
||||
clickOneClickLogin() {
|
||||
common_vendor.index.login({
|
||||
provider: "weixin",
|
||||
success(res) {
|
||||
let param = { code: res.code, isJson: 1 };
|
||||
request_api.loginByWx(param).then((res2) => {
|
||||
}).catch((error) => {
|
||||
});
|
||||
},
|
||||
fail() {
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 点击验证码登录
|
||||
*/
|
||||
clickCodeLogin() {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/login/codeLogin/codeLogin"
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 点击同意
|
||||
*/
|
||||
clickAgree() {
|
||||
},
|
||||
/**
|
||||
* 点击查看协议
|
||||
*/
|
||||
clickProtocol() {
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_navBar2 = common_vendor.resolveComponent("navBar");
|
||||
_easycom_navBar2();
|
||||
}
|
||||
const _easycom_navBar = () => "../../components/navBar/navBar.js";
|
||||
if (!Math) {
|
||||
_easycom_navBar();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.p({
|
||||
leftText: "登录",
|
||||
hideNavBg: true,
|
||||
backBlack: true
|
||||
}),
|
||||
b: common_vendor.s("margin-top:" + $data.contentTop + "px;"),
|
||||
c: common_assets._imports_0$1,
|
||||
d: common_vendor.o(($event) => $options.clickOneClickLogin()),
|
||||
e: common_vendor.o(($event) => $options.clickCodeLogin()),
|
||||
f: common_vendor.o(($event) => $options.clickAgree()),
|
||||
g: common_vendor.o(($event) => $options.clickProtocol()),
|
||||
h: common_vendor.o(($event) => $options.clickProtocol())
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/login/login.js.map
|
||||
6
unpackage/dist/dev/mp-weixin/pages/login/login.json
vendored
Normal file
6
unpackage/dist/dev/mp-weixin/pages/login/login.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"usingComponents": {
|
||||
"nav-bar": "../../components/navBar/navBar"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/login/login.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/login/login.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view><nav-bar wx:if="{{a}}" u-i="f90ca6fc-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="logo" style="{{b}}" src="{{c}}" mode="widthFix"></image><view class="loginTitle">欢迎登录价值前沿平台</view><view class="btn oneClickLogin" bindtap="{{d}}">授权手机号一键登录</view><view class="btn codeLogin" bindtap="{{e}}">使用短信验证登录</view><view class="agreeProtocolC fixed flexCenter"><view class="agreeC" bindtap="{{f}}"><image class="icon" src="{{''}}" mode="widthFix"></image></view> 阅读并同意我们的<text class="protocol" bindtap="{{g}}">《用户服务协议》</text>和<text class="protocol" bindtap="{{h}}">《隐私政策》</text></view></view>
|
||||
46
unpackage/dist/dev/mp-weixin/pages/login/login.wxss
vendored
Normal file
46
unpackage/dist/dev/mp-weixin/pages/login/login.wxss
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
.logo {
|
||||
margin-left: calc((100% - 144rpx)/2);
|
||||
width: 144rpx;
|
||||
height: auto;
|
||||
}
|
||||
.loginTitle {
|
||||
margin: 40rpx 80rpx 0;
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
.btn {
|
||||
margin: 0 75rpx;
|
||||
line-height: 80rpx;
|
||||
border-radius: 20rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
}
|
||||
.btn.oneClickLogin {
|
||||
background-color: #F97316;
|
||||
margin-top: 60rpx;
|
||||
color: white;
|
||||
}
|
||||
.btn.codeLogin {
|
||||
background-color: #FFF1E8;
|
||||
margin-top: 28rpx;
|
||||
color: #F97316;
|
||||
}
|
||||
.agreeProtocolC {
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: calc(120rpx + env(safe-area-inset-bottom));
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.agreeProtocolC .agreeC {
|
||||
padding: 14rpx;
|
||||
}
|
||||
.agreeProtocolC .agreeC .icon {
|
||||
width: 28rpx;
|
||||
height: auto;
|
||||
}
|
||||
.agreeProtocolC .protocol {
|
||||
color: #F97316;
|
||||
}
|
||||
@@ -1,22 +1,47 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const request_api = require("../../../request/api.js");
|
||||
require("../../../request/http.js");
|
||||
const common_assets = require("../../../common/assets.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
avatarTop: "",
|
||||
contentTop: "",
|
||||
avatar: "",
|
||||
//选择头像临时地址
|
||||
avatarUrl: "",
|
||||
//已上传的链接
|
||||
nickname: "",
|
||||
//昵称
|
||||
mobile: "",
|
||||
//手机号
|
||||
sexList: ["男", "女"],
|
||||
sex: ""
|
||||
sex: "",
|
||||
profile: ""
|
||||
//个人简介
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.avatarTop = common_vendor.inject("navHeight") + 60 / 750 * common_vendor.inject("windowWidth");
|
||||
this.contentTop = this.avatarTop + 75 / 750 * common_vendor.inject("windowWidth");
|
||||
this.getUserInfoData();
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 点击选择头像
|
||||
* @param {Object} e
|
||||
*/
|
||||
chooseAvatar(e) {
|
||||
common_vendor.index.__f__("log", "at pages/mine/basicInfo/basicInfo.vue:65", e);
|
||||
this.avatar = e.detail.avatarUrl;
|
||||
},
|
||||
/**
|
||||
* 点击选择性别
|
||||
* @param {Object} e
|
||||
*/
|
||||
sexChange(e) {
|
||||
common_vendor.index.__f__("log", "at pages/mine/basicInfo/basicInfo.vue:54", e);
|
||||
common_vendor.index.__f__("log", "at pages/mine/basicInfo/basicInfo.vue:74", e);
|
||||
let value = e.detail.value;
|
||||
this.sex = this.sexList[value];
|
||||
},
|
||||
@@ -24,8 +49,79 @@ const _sfc_main = {
|
||||
* 点击下一步
|
||||
*/
|
||||
clickNext() {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/mine/investPreference/investPreference"
|
||||
if (!this.avatar && !this.avatarUrl) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请选择头像",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!this.nickname) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请输入昵称",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!this.sex) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请选择性别",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!this.profile) {
|
||||
common_vendor.index.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
|
||||
};
|
||||
request_api.updateBasicInfo(param).then((res) => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/mine/investPreference/investPreference"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
} else {
|
||||
let param = {
|
||||
nickname: this.nickname,
|
||||
gender: this.sex == "男" ? "male" : "female",
|
||||
bio: this.profile
|
||||
};
|
||||
request_api.updateBasicInfo(param).then((res) => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/mine/investPreference/investPreference"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取用户信息数据
|
||||
*/
|
||||
getUserInfoData() {
|
||||
request_api.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
|
||||
common_vendor.wx$1.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -44,14 +140,21 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
leftText: "信息完善"
|
||||
}),
|
||||
b: common_assets._imports_0,
|
||||
c: common_assets._imports_1$3,
|
||||
d: common_vendor.s("top:" + $data.avatarTop + "px;"),
|
||||
e: common_vendor.t($data.sex),
|
||||
f: common_assets._imports_2$5,
|
||||
g: $data.sexList,
|
||||
h: common_vendor.o((...args) => $options.sexChange && $options.sexChange(...args)),
|
||||
i: common_vendor.s("top:" + $data.contentTop + "px;"),
|
||||
j: common_vendor.o(($event) => $options.clickNext())
|
||||
c: $data.avatar ? $data.avatar : $data.avatarUrl,
|
||||
d: common_assets._imports_1$3,
|
||||
e: common_vendor.o((...args) => $options.chooseAvatar && $options.chooseAvatar(...args)),
|
||||
f: common_vendor.s("top:" + $data.avatarTop + "px;"),
|
||||
g: $data.nickname,
|
||||
h: common_vendor.o(($event) => $data.nickname = $event.detail.value),
|
||||
i: common_vendor.t($data.mobile),
|
||||
j: common_vendor.t($data.sex),
|
||||
k: common_assets._imports_2$5,
|
||||
l: $data.sexList,
|
||||
m: common_vendor.o((...args) => $options.sexChange && $options.sexChange(...args)),
|
||||
n: $data.profile,
|
||||
o: common_vendor.o(($event) => $data.profile = $event.detail.value),
|
||||
p: common_vendor.s("top:" + $data.contentTop + "px;"),
|
||||
q: common_vendor.o(($event) => $options.clickNext())
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view><nav-bar wx:if="{{a}}" u-i="8b6eb184-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="avatarC fixed" style="{{d}}"><image class="avatar" src="{{''}}" mode="aspectFill"></image><image class="icon absolute" src="{{c}}" mode="widthFix"></image></view><view class="basicInfoC fixed" style="{{i}}"><view class="title">基本信息</view><view class="section">昵称</view><view class="inputC"><input type="text"/></view><view class="section">手机号</view><view class="inputC"><input type="text"/></view><view class="section">性别</view><picker mode="selector" range="{{g}}" bindchange="{{h}}"><view class="selectC flex"><view class="flex1">{{e}}</view><image class="arrow" src="{{f}}" mode="widthFix"></image></view></picker><view class="section">个人简介</view><view class="textareaC"><textarea placeholder="简单介绍一下自己吧" placeholder-style="color:#AAA"></textarea></view></view><view class="next fixed" bindtap="{{j}}">下一步</view></view>
|
||||
<view><nav-bar wx:if="{{a}}" u-i="8b6eb184-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="avatarC fixed" style="{{f}}"><image class="avatar" src="{{c}}" mode="aspectFill"></image><image class="icon absolute" src="{{d}}" mode="widthFix"></image><button class="absolute" open-type="chooseAvatar" bindchooseavatar="{{e}}"></button></view><view class="basicInfoC fixed" style="{{p}}"><view class="title">基本信息</view><view class="section">昵称</view><view class="inputC"><input type="nickname" value="{{g}}" bindinput="{{h}}"/></view><view class="section">手机号</view><view class="inputC">{{i}}</view><view class="section">性别</view><picker mode="selector" range="{{l}}" bindchange="{{m}}"><view class="selectC flex"><view class="flex1">{{j}}</view><image class="arrow" src="{{k}}" mode="widthFix"></image></view></picker><view class="section">个人简介</view><view class="textareaC"><block wx:if="{{r0}}"><textarea placeholder="简单介绍一下自己吧" placeholder-style="color:#AAA" value="{{n}}" bindinput="{{o}}"></textarea></block></view></view><view class="next fixed" bindtap="{{q}}">下一步</view></view>
|
||||
@@ -11,7 +11,6 @@
|
||||
z-index: 10;
|
||||
}
|
||||
.avatarC .avatar {
|
||||
background-color: red;
|
||||
width: 100%;
|
||||
height: 150rpx;
|
||||
border-radius: 50%;
|
||||
@@ -23,6 +22,12 @@
|
||||
width: 40rpx;
|
||||
height: auto;
|
||||
}
|
||||
.avatarC button {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.basicInfoC {
|
||||
background-color: white;
|
||||
left: 0;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const request_api = require("../../../request/api.js");
|
||||
const utils_util = require("../../../utils/util.js");
|
||||
const common_assets = require("../../../common/assets.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
@@ -7,11 +9,26 @@ const _sfc_main = {
|
||||
navH: common_vendor.inject("navHeight"),
|
||||
listTop: "",
|
||||
tabList: ["评论我的", "我评论的"],
|
||||
selectTab: 0
|
||||
selectTab: 0,
|
||||
commentList: [],
|
||||
page: 1,
|
||||
loadAll: false,
|
||||
getLocaleDate: utils_util.getLocaleDate
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.listTop = this.navH + (75 + 10) / 750 * common_vendor.inject("windowWidth");
|
||||
this.getCommentListData();
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.page = 1;
|
||||
this.getCommentListData();
|
||||
},
|
||||
onReachBottom() {
|
||||
if (!this.loadAll) {
|
||||
this.page++;
|
||||
this.getCommentListData();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
@@ -21,7 +38,30 @@ const _sfc_main = {
|
||||
clickTabItem(index) {
|
||||
if (this.selectTab != index) {
|
||||
this.selectTab = index;
|
||||
this.getCommentListData();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取评论列表数据
|
||||
*/
|
||||
getCommentListData() {
|
||||
let param = { page: this.page, type: this.selectTab == 0 ? "commented" : "comments" };
|
||||
request_api.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
|
||||
common_vendor.index.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -34,7 +74,7 @@ if (!Math) {
|
||||
_easycom_navBar();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.p({
|
||||
leftText: "评论回复"
|
||||
}),
|
||||
@@ -50,8 +90,25 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
});
|
||||
}),
|
||||
d: common_vendor.s("top:" + $data.navH + "px;"),
|
||||
e: common_vendor.s("top:" + $data.listTop + "px;")
|
||||
};
|
||||
e: $data.selectTab == 0
|
||||
}, $data.selectTab == 0 ? {
|
||||
f: common_vendor.f($data.commentList, (item, index, i0) => {
|
||||
return {
|
||||
a: index
|
||||
};
|
||||
})
|
||||
} : {
|
||||
g: common_vendor.f($data.commentList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t($data.getLocaleDate(item.created_at)),
|
||||
b: common_vendor.t(item.content),
|
||||
c: common_vendor.t(item.event_title),
|
||||
d: index
|
||||
};
|
||||
})
|
||||
}, {
|
||||
h: common_vendor.s("top:" + $data.listTop + "px;")
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view><nav-bar wx:if="{{a}}" u-i="dc49bf38-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="tabC fixed flex" style="{{d}}"><view wx:for="{{c}}" wx:for-item="item" wx:key="d" class="{{item.c}}" bindtap="{{item.e}}">{{item.a}} <view wx:if="{{item.b}}" class="line absolute"></view></view></view><view class="list fixed" style="{{e}}"><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></view></view><view class="reply">回复</view></view><view class="content"> 回复<text class="originNickname">永不落的梦想</text><text>:四部门联合启动的人力资源服务业与制造业融合发展点。</text></view></view><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></view>
|
||||
<view><nav-bar wx:if="{{a}}" u-i="dc49bf38-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="tabC fixed flex" style="{{d}}"><view wx:for="{{c}}" wx:for-item="item" wx:key="d" class="{{item.c}}" bindtap="{{item.e}}">{{item.a}} <view wx:if="{{item.b}}" class="line absolute"></view></view></view><view class="list fixed" style="{{h}}"><block wx:if="{{e}}"><view wx:for="{{f}}" wx:for-item="item" wx:key="a" class="commentMeItem"><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><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></block><block wx:else><view wx:for="{{g}}" wx:for-item="item" wx:key="d" class="myCommentItem"><view class="replyContentC"><view class="flex"><image class="avatar" src="{{''}}" mode="aspectFill"></image><view class="flex1"><view class="nickname">逸尘破晓</view><view class="time">{{item.a}}</view></view></view><view class="content">{{item.b}}</view></view><view class="originEventC"><view class="levelTitleC flex"><view class="level">C</view><view class="title">{{item.c}}</view></view><view class="eventContent">人社部、工信部等四部门印发通知,明确在30个城市开展3年期试点,培育人力资源服务与制造业协同机构...</view></view></view></block></view></view>
|
||||
@@ -37,24 +37,26 @@
|
||||
bottom: 0;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.list .item .replyContentC {
|
||||
.list .commentMeItem .replyContentC {
|
||||
padding: 40rpx 25rpx 0;
|
||||
}
|
||||
.list .item .replyContentC .avatar {
|
||||
background-color: red;
|
||||
.list .commentMeItem .replyContentC .avatar {
|
||||
margin-right: 22rpx;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.list .item .replyContentC .replyNickname {
|
||||
.list .commentMeItem .replyContentC .replyNickname {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #111;
|
||||
}
|
||||
.list .item .replyContentC .time {
|
||||
.list .commentMeItem .replyContentC .time {
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: #aaa;
|
||||
}
|
||||
.list .item .replyContentC .reply {
|
||||
.list .commentMeItem .replyContentC .reply {
|
||||
width: 90rpx;
|
||||
height: 52rpx;
|
||||
line-height: 50rpx;
|
||||
@@ -63,38 +65,38 @@
|
||||
font-size: 24rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.list .item .replyContentC .content {
|
||||
.list .commentMeItem .replyContentC .content {
|
||||
margin-top: 20rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #444;
|
||||
}
|
||||
.list .item .replyContentC .content .originNickname {
|
||||
.list .commentMeItem .replyContentC .content .originNickname {
|
||||
color: #F97316;
|
||||
}
|
||||
.list .item .originalTextC {
|
||||
.list .commentMeItem .originalTextC {
|
||||
background-color: #F7F7F7;
|
||||
margin-top: 20rpx;
|
||||
padding: 20rpx 25rpx 25rpx;
|
||||
}
|
||||
.list .item .originalTextC .originReply {
|
||||
.list .commentMeItem .originalTextC .originReply {
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #444;
|
||||
}
|
||||
.list .item .originalTextC .originReply .originNickname {
|
||||
.list .commentMeItem .originalTextC .originReply .originNickname {
|
||||
color: #F97316;
|
||||
}
|
||||
.list .item .originalTextC .originEventC {
|
||||
.list .commentMeItem .originalTextC .originEventC {
|
||||
background-color: white;
|
||||
margin-top: 20rpx;
|
||||
padding: 34rpx 16rpx;
|
||||
}
|
||||
.list .item .originalTextC .originEventC .levelTitleC {
|
||||
.list .commentMeItem .originalTextC .originEventC .levelTitleC {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.list .item .originalTextC .originEventC .levelTitleC .level {
|
||||
.list .commentMeItem .originalTextC .originEventC .levelTitleC .level {
|
||||
background-color: #FEC44F;
|
||||
margin-right: 17rpx;
|
||||
width: 50rpx;
|
||||
@@ -105,10 +107,64 @@
|
||||
color: white;
|
||||
text-align: center;
|
||||
}
|
||||
.list .item .originalTextC .originEventC .levelTitleC .title {
|
||||
.list .commentMeItem .originalTextC .originEventC .levelTitleC .title {
|
||||
color: #222;
|
||||
}
|
||||
.list .item .originalTextC .originEventC .eventContent {
|
||||
.list .commentMeItem .originalTextC .originEventC .eventContent {
|
||||
margin-top: 20rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #666;
|
||||
}
|
||||
.list .myCommentItem .replyContentC {
|
||||
padding: 40rpx 25rpx 0;
|
||||
}
|
||||
.list .myCommentItem .replyContentC .avatar {
|
||||
margin-right: 22rpx;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.list .myCommentItem .replyContentC .nickname {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #111;
|
||||
}
|
||||
.list .myCommentItem .replyContentC .time {
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: #aaa;
|
||||
}
|
||||
.list .myCommentItem .replyContentC .content {
|
||||
margin-top: 20rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #444;
|
||||
}
|
||||
.list .myCommentItem .originEventC {
|
||||
background-color: #F7F7F7;
|
||||
margin-top: 20rpx;
|
||||
padding: 20rpx 40rpx;
|
||||
}
|
||||
.list .myCommentItem .originEventC .levelTitleC {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.list .myCommentItem .originEventC .levelTitleC .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;
|
||||
}
|
||||
.list .myCommentItem .originEventC .levelTitleC .title {
|
||||
color: #222;
|
||||
}
|
||||
.list .myCommentItem .originEventC .eventContent {
|
||||
margin-top: 20rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
|
||||
@@ -1,15 +1,44 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const request_api = require("../../../request/api.js");
|
||||
const common_assets = require("../../../common/assets.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
navH: common_vendor.inject("navHeight")
|
||||
navH: common_vendor.inject("navHeight"),
|
||||
content: ""
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
},
|
||||
methods: {}
|
||||
methods: {
|
||||
clickSubmit() {
|
||||
if (!this.content) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请输入您要反馈的问题",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
let param = { content: this.content, isJson: 1 };
|
||||
request_api.feedback(param).then((res) => {
|
||||
if (res.code == 200) {
|
||||
common_vendor.index.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
setTimeout(function() {
|
||||
common_vendor.index.navigateBack();
|
||||
}, 1e3);
|
||||
} else
|
||||
common_vendor.index.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_navBar2 = common_vendor.resolveComponent("navBar");
|
||||
@@ -25,7 +54,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
leftText: "意见反馈"
|
||||
}),
|
||||
b: common_assets._imports_0,
|
||||
c: common_vendor.s("top:" + $data.navH + "px;")
|
||||
c: $data.content,
|
||||
d: common_vendor.o(($event) => $data.content = $event.detail.value),
|
||||
e: common_vendor.s("top:" + $data.navH + "px;"),
|
||||
f: common_vendor.o(($event) => $options.clickSubmit())
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view><nav-bar wx:if="{{a}}" u-i="315da0a4-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="feedbackC fixed" style="{{c}}"><view class="textareaC"><textarea placeholder="请输入您要反馈的问题(200 字以内)" placeholder-style="color:#C5C5C5" maxlength="200"></textarea></view></view><view class="submit fixed">提交</view></view>
|
||||
<view><nav-bar wx:if="{{a}}" u-i="315da0a4-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="feedbackC fixed" style="{{e}}"><view class="textareaC"><block wx:if="{{r0}}"><textarea placeholder="请输入您要反馈的问题(200 字以内)" placeholder-style="color:#C5C5C5" maxlength="200" value="{{c}}" bindinput="{{d}}"></textarea></block></view></view><view class="submit fixed" bindtap="{{f}}">提交</view></view>
|
||||
156
unpackage/dist/dev/mp-weixin/pages/mine/followCollect/followCollect.js
vendored
Normal file
156
unpackage/dist/dev/mp-weixin/pages/mine/followCollect/followCollect.js
vendored
Normal file
@@ -0,0 +1,156 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const request_api = require("../../../request/api.js");
|
||||
const utils_util = require("../../../utils/util.js");
|
||||
const common_assets = require("../../../common/assets.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
navH: common_vendor.inject("navHeight"),
|
||||
followList: [],
|
||||
page: 1,
|
||||
loadAll: false,
|
||||
getRateStr: utils_util.getRateStr,
|
||||
getRateUpOrDown: utils_util.getRateUpOrDown,
|
||||
getLocaleTime: utils_util.getLocaleTime
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.getFollowCollectListData();
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.page = 1;
|
||||
this.getFollowCollectListData();
|
||||
},
|
||||
onReachBottom() {
|
||||
if (!this.loadAll) {
|
||||
this.page++;
|
||||
this.getFollowCollectListData();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 点击相关股票
|
||||
* @param {Object} code
|
||||
*/
|
||||
clickLookRelatedStockItem(code) {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/index/stockDetails/stockDetails?code=" + code
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 点击关注事件
|
||||
* @param {Object} id
|
||||
*/
|
||||
clickFollowEvent(id, index) {
|
||||
request_api.followEvent(id).then((res) => {
|
||||
common_vendor.index.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
this.followList.splice(index, 1);
|
||||
}).catch((error) => {
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 查看事件详情
|
||||
*/
|
||||
clickEventItem(id) {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/index/eventDetails/eventDetails?id=" + id
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取关注收藏列表数据
|
||||
*/
|
||||
getFollowCollectListData() {
|
||||
let param = { page: this.page, type: "follows" };
|
||||
request_api.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
|
||||
common_vendor.index.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_navBar2 = common_vendor.resolveComponent("navBar");
|
||||
_easycom_navBar2();
|
||||
}
|
||||
const _easycom_navBar = () => "../../../components/navBar/navBar.js";
|
||||
if (!Math) {
|
||||
_easycom_navBar();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.p({
|
||||
leftText: "关注收藏"
|
||||
}),
|
||||
b: common_assets._imports_0,
|
||||
c: common_vendor.f($data.followList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(item.importance),
|
||||
b: common_vendor.n("level " + item.importance),
|
||||
c: common_vendor.t(item.event_title),
|
||||
d: common_vendor.t(item.event_description),
|
||||
e: $data.getRateUpOrDown(item.related_avg_chg)
|
||||
}, $data.getRateUpOrDown(item.related_avg_chg) ? {
|
||||
f: common_assets._imports_1$1
|
||||
} : {
|
||||
g: common_assets._imports_2$2
|
||||
}, {
|
||||
h: common_vendor.t($data.getRateStr(item.related_avg_chg)),
|
||||
i: common_vendor.n("rateItem " + ($data.getRateUpOrDown(item.related_avg_chg) ? "down" : "up")),
|
||||
j: $data.getRateUpOrDown(item.related_max_chg)
|
||||
}, $data.getRateUpOrDown(item.related_max_chg) ? {
|
||||
k: common_assets._imports_1$1
|
||||
} : {
|
||||
l: common_assets._imports_2$2
|
||||
}, {
|
||||
m: common_vendor.t($data.getRateStr(item.related_max_chg)),
|
||||
n: common_vendor.n("rateItem " + ($data.getRateUpOrDown(item.related_max_chg) ? "down" : "up")),
|
||||
o: $data.getRateUpOrDown(item.related_week_chg)
|
||||
}, $data.getRateUpOrDown(item.related_week_chg) ? {
|
||||
p: common_assets._imports_1$1
|
||||
} : {
|
||||
q: common_assets._imports_2$2
|
||||
}, {
|
||||
r: common_vendor.t($data.getRateStr(item.related_week_chg)),
|
||||
s: common_vendor.n("rateItem " + ($data.getRateUpOrDown(item.related_week_chg) ? "down" : "up")),
|
||||
t: common_vendor.f(item.related_stocks, (sitem, sindex, i1) => {
|
||||
return {
|
||||
a: common_vendor.t(sitem.stock_name),
|
||||
b: common_vendor.t(($data.getRateUpOrDown(sitem.daily_change) ? "" : "+") + sitem.daily_change),
|
||||
c: sindex,
|
||||
d: common_vendor.o(($event) => $options.clickLookRelatedStockItem(sitem.stock_code), sindex)
|
||||
};
|
||||
}),
|
||||
v: common_vendor.t($data.getLocaleTime(item.created_at)),
|
||||
w: common_vendor.t(item.view_count),
|
||||
x: common_vendor.t(item.comment_count),
|
||||
y: common_vendor.t(item.follower_count),
|
||||
z: common_vendor.o(($event) => $options.clickFollowEvent(item.event_id, index), index),
|
||||
A: common_vendor.o(($event) => $options.clickEventItem(item.event_id), index),
|
||||
B: index
|
||||
});
|
||||
}),
|
||||
d: common_assets._imports_3,
|
||||
e: common_assets._imports_4,
|
||||
f: common_assets._imports_5$2,
|
||||
g: common_vendor.s("top:" + $data.navH + "px;")
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/mine/followCollect/followCollect.js.map
|
||||
6
unpackage/dist/dev/mp-weixin/pages/mine/followCollect/followCollect.json
vendored
Normal file
6
unpackage/dist/dev/mp-weixin/pages/mine/followCollect/followCollect.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"usingComponents": {
|
||||
"nav-bar": "../../../components/navBar/navBar"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/mine/followCollect/followCollect.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/mine/followCollect/followCollect.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view><nav-bar wx:if="{{a}}" u-i="340e4710-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="list fixed" style="{{g}}"><view wx:for="{{c}}" wx:for-item="item" wx:key="B" class="item" bindtap="{{item.A}}"><view class="flex"><view class="{{item.b}}">{{item.a}}</view><view class="title">{{item.c}}</view></view><view class="content">{{item.d}}</view><scroll-view scroll-x class="increaseRateList"><view class="{{item.i}}"> 平均涨幅: <image wx:if="{{item.e}}" class="arrow" src="{{item.f}}" mode="widthFix"></image><image wx:else class="arrow" src="{{item.g}}" mode="widthFix"></image> {{item.h}}% </view><view class="{{item.n}}"> 最大涨幅: <image wx:if="{{item.j}}" class="arrow" src="{{item.k}}" mode="widthFix"></image><image wx:else class="arrow" src="{{item.l}}" mode="widthFix"></image> {{item.m}}% </view><view class="{{item.s}}"> 周涨幅: <image wx:if="{{item.o}}" class="arrow" src="{{item.p}}" mode="widthFix"></image><image wx:else class="arrow" src="{{item.q}}" mode="widthFix"></image> {{item.r}}% </view></scroll-view><scroll-view scroll-x class="stockList"><view wx:for="{{item.t}}" wx:for-item="sitem" wx:key="c" class="stockItem" catchtap="{{sitem.d}}">{{sitem.a}} <text class="change">{{sitem.b}}%</text></view></scroll-view><view class="timeToolBarC flex"><view class="time flex1">{{item.v}}</view><view class="toolBarC flex"><view class="toolItem flex"><image class="icon" src="{{d}}" mode="widthFix"></image><text>{{item.w}}</text></view><view class="toolItem flex"><image class="icon" src="{{e}}" mode="widthFix"></image><text>{{item.x}}</text></view><view class="toolItem flex" catchtap="{{item.z}}"><image class="icon" src="{{f}}" mode="widthFix"></image><text>{{item.y}}</text></view></view></view></view></view></view>
|
||||
122
unpackage/dist/dev/mp-weixin/pages/mine/followCollect/followCollect.wxss
vendored
Normal file
122
unpackage/dist/dev/mp-weixin/pages/mine/followCollect/followCollect.wxss
vendored
Normal file
@@ -0,0 +1,122 @@
|
||||
.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;
|
||||
}
|
||||
.list .item {
|
||||
padding: 30rpx 0;
|
||||
border-bottom: solid 1rpx #E4E4E4;
|
||||
}
|
||||
.list .item .level {
|
||||
margin-right: 16rpx;
|
||||
width: 50rpx;
|
||||
line-height: 40rpx;
|
||||
border-radius: 10rpx;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
text-align: center;
|
||||
}
|
||||
.list .item .level.S {
|
||||
background-color: #CC4C02;
|
||||
}
|
||||
.list .item .level.A {
|
||||
background-color: #EC7014;
|
||||
}
|
||||
.list .item .level.B {
|
||||
background-color: #FB9A29;
|
||||
}
|
||||
.list .item .level.C {
|
||||
background-color: #FEC44F;
|
||||
}
|
||||
.list .item .title {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: #222;
|
||||
}
|
||||
.list .item .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;
|
||||
}
|
||||
.list .item .increaseRateList {
|
||||
white-space: nowrap;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
.list .item .increaseRateList .rateItem {
|
||||
display: inline-block;
|
||||
margin-right: 15rpx;
|
||||
line-height: 44rpx;
|
||||
padding: 0 14rpx;
|
||||
border-radius: 10rpx;
|
||||
font-size: 22rpx;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
}
|
||||
.list .item .increaseRateList .rateItem .arrow {
|
||||
width: 15rpx;
|
||||
height: auto;
|
||||
}
|
||||
.list .item .increaseRateList .rateItem.up {
|
||||
background-color: #C00000;
|
||||
}
|
||||
.list .item .increaseRateList .rateItem.down {
|
||||
background-color: #355422;
|
||||
}
|
||||
.list .item .stockList {
|
||||
white-space: nowrap;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.list .item .stockList .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;
|
||||
}
|
||||
.list .item .stockList .stockItem .change {
|
||||
color: #F97316;
|
||||
}
|
||||
.list .item .timeToolBarC {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.list .item .timeToolBarC .time {
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
color: #aaa;
|
||||
}
|
||||
.list .item .timeToolBarC .toolBarC .toolItem {
|
||||
padding: 0 20rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
color: #666;
|
||||
}
|
||||
.list .item .timeToolBarC .toolBarC .toolItem .icon {
|
||||
margin-right: 13rpx;
|
||||
width: 29rpx;
|
||||
height: auto;
|
||||
}
|
||||
.list .item .timeToolBarC .toolBarC .toolItem:first-child .icon {
|
||||
margin-right: 15rpx;
|
||||
width: 33rpx;
|
||||
height: auto;
|
||||
}
|
||||
@@ -1,11 +1,16 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const request_api = require("../../../request/api.js");
|
||||
const common_assets = require("../../../common/assets.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
avatarTop: "",
|
||||
contentTop: "",
|
||||
avatar: "",
|
||||
//选择头像临时地址
|
||||
avatarUrl: "",
|
||||
//已上传的链接
|
||||
investPreferenceList: ["长期投资", "中短期投资", "风险控制型"],
|
||||
selectInvestIndex: -1,
|
||||
stockYearList: ["新手入门", "1年以内", "1-3年", "3-5年", "5-10年", "10年以上"],
|
||||
@@ -20,8 +25,16 @@ const _sfc_main = {
|
||||
onLoad() {
|
||||
this.avatarTop = common_vendor.inject("navHeight") + 60 / 750 * common_vendor.inject("windowWidth");
|
||||
this.contentTop = this.avatarTop + 75 / 750 * common_vendor.inject("windowWidth");
|
||||
this.getUserInfoData();
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 点击选择头像
|
||||
* @param {Object} e
|
||||
*/
|
||||
chooseAvatar(e) {
|
||||
this.avatar = e.detail.avatarUrl;
|
||||
},
|
||||
/**
|
||||
* 点击选择投资偏好
|
||||
* @param {Object} index
|
||||
@@ -64,6 +77,129 @@ const _sfc_main = {
|
||||
*/
|
||||
clickMarketItem(index) {
|
||||
this.preferredMarketList[index].select = !this.preferredMarketList[index].select;
|
||||
},
|
||||
/**
|
||||
* 点击上一步
|
||||
*/
|
||||
clickPre() {
|
||||
common_vendor.index.navigateBack();
|
||||
},
|
||||
/**
|
||||
* 点击完成
|
||||
*/
|
||||
clickFinish() {
|
||||
if (this.selectInvestIndex < 0) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请选择投资偏好",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.selectYearIndex < 0) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请选择炒股年限",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.selectRiskIndex < 0) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请选择风险偏好",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.selectScaleIndex < 0) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请选择投资规模",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
let arr2 = [];
|
||||
for (let item of this.preferredMarketList) {
|
||||
if (item.select) {
|
||||
arr2.push(item.title);
|
||||
}
|
||||
}
|
||||
if (arr2.length == 0) {
|
||||
common_vendor.index.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
|
||||
};
|
||||
request_api.updateInvestPreference(param).then((res) => {
|
||||
common_vendor.index.navigateBack({
|
||||
delta: 2
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取用户偏好设置数据
|
||||
*/
|
||||
getUserInfoData() {
|
||||
request_api.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.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 arr2 = JSON.parse(data.preferred_markets);
|
||||
let arr1 = arr2[0].split(",");
|
||||
if (arr1.indexOf(item.title) > -1) {
|
||||
item.select = true;
|
||||
} else {
|
||||
item.select = false;
|
||||
}
|
||||
}
|
||||
} else
|
||||
common_vendor.wx$1.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -81,9 +217,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
leftText: "信息完善"
|
||||
}),
|
||||
b: common_assets._imports_0,
|
||||
c: common_assets._imports_1$3,
|
||||
d: common_vendor.s("top:" + $data.avatarTop + "px;"),
|
||||
e: common_vendor.f($data.investPreferenceList, (item, index, i0) => {
|
||||
c: $data.avatar ? $data.avatar : $data.avatarUrl,
|
||||
d: common_assets._imports_1$3,
|
||||
e: common_vendor.o((...args) => $options.chooseAvatar && $options.chooseAvatar(...args)),
|
||||
f: common_vendor.s("top:" + $data.avatarTop + "px;"),
|
||||
g: common_vendor.f($data.investPreferenceList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item),
|
||||
b: common_vendor.n("item " + ($data.selectInvestIndex == index ? "select" : "")),
|
||||
@@ -91,7 +229,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
d: common_vendor.o(($event) => $options.clickInvestItem(index), index)
|
||||
};
|
||||
}),
|
||||
f: common_vendor.f($data.stockYearList, (item, index, i0) => {
|
||||
h: common_vendor.f($data.stockYearList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item),
|
||||
b: common_vendor.n("item " + ($data.selectYearIndex == index ? "select" : "")),
|
||||
@@ -99,7 +237,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
d: common_vendor.o(($event) => $options.clickYearItem(index), index)
|
||||
};
|
||||
}),
|
||||
g: common_vendor.f($data.riskPreferenceList, (item, index, i0) => {
|
||||
i: common_vendor.f($data.riskPreferenceList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item),
|
||||
b: common_vendor.n("item " + ($data.selectRiskIndex == index ? "select" : "")),
|
||||
@@ -107,7 +245,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
d: common_vendor.o(($event) => $options.clickRiskItem(index), index)
|
||||
};
|
||||
}),
|
||||
h: common_vendor.f($data.investmentScaleList, (item, index, i0) => {
|
||||
j: common_vendor.f($data.investmentScaleList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item),
|
||||
b: common_vendor.n("item " + ($data.selectScaleIndex == index ? "select" : "")),
|
||||
@@ -115,7 +253,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
d: common_vendor.o(($event) => $options.clickScaleItem(index), index)
|
||||
};
|
||||
}),
|
||||
i: common_vendor.f($data.preferredMarketList, (item, index, i0) => {
|
||||
k: common_vendor.f($data.preferredMarketList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.title),
|
||||
b: common_vendor.n("item " + (item.select ? "select" : "")),
|
||||
@@ -123,7 +261,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
d: common_vendor.o(($event) => $options.clickMarketItem(index), index)
|
||||
};
|
||||
}),
|
||||
j: common_vendor.s("top:" + $data.contentTop + "px;")
|
||||
l: common_vendor.s("top:" + $data.contentTop + "px;"),
|
||||
m: common_vendor.o(($event) => $options.clickPre()),
|
||||
n: common_vendor.o(($event) => $options.clickFinish())
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view><nav-bar wx:if="{{a}}" u-i="ea3a6ff8-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="avatarC fixed" style="{{d}}"><image class="avatar" src="{{''}}" mode="aspectFill"></image><image class="icon absolute" src="{{c}}" mode="widthFix"></image></view><view class="preferenceC fixed" style="{{j}}"><view class="title">投资偏好设置</view><view class="section first">投资偏好</view><view class="list flexWrap"><view wx:for="{{e}}" wx:for-item="item" wx:key="c" class="{{item.b}}" bindtap="{{item.d}}">{{item.a}}</view></view><view class="section">炒股年限</view><view class="list flexWrap"><view wx:for="{{f}}" wx:for-item="item" wx:key="c" class="{{item.b}}" bindtap="{{item.d}}">{{item.a}}</view></view><view class="section">风险偏好</view><view class="list flexWrap"><view wx:for="{{g}}" wx:for-item="item" wx:key="c" class="{{item.b}}" bindtap="{{item.d}}">{{item.a}}</view></view><view class="section">投资规模</view><view class="list flexWrap"><view wx:for="{{h}}" wx:for-item="item" wx:key="c" class="{{item.b}}" bindtap="{{item.d}}">{{item.a}}</view></view><view class="section">偏好市场(可多选)</view><view class="list flexWrap"><view wx:for="{{i}}" wx:for-item="item" wx:key="c" class="{{item.b}}" bindtap="{{item.d}}">{{item.a}}</view></view></view><view class="bottomC fixed flex"><view class="pre btn">上一步</view><view class="finish btn flex1">完成</view></view></view>
|
||||
<view><nav-bar wx:if="{{a}}" u-i="ea3a6ff8-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="avatarC fixed" style="{{f}}"><image class="avatar" src="{{c}}" mode="aspectFill"></image><image class="icon absolute" src="{{d}}" mode="widthFix"></image><button class="absolute" open-type="chooseAvatar" bindchooseavatar="{{e}}"></button></view><view class="preferenceC fixed" style="{{l}}"><view class="title">投资偏好设置</view><view class="section first">投资偏好</view><view class="list flexWrap"><view wx:for="{{g}}" wx:for-item="item" wx:key="c" class="{{item.b}}" bindtap="{{item.d}}">{{item.a}}</view></view><view class="section">炒股年限</view><view class="list flexWrap"><view wx:for="{{h}}" wx:for-item="item" wx:key="c" class="{{item.b}}" bindtap="{{item.d}}">{{item.a}}</view></view><view class="section">风险偏好</view><view class="list flexWrap"><view wx:for="{{i}}" wx:for-item="item" wx:key="c" class="{{item.b}}" bindtap="{{item.d}}">{{item.a}}</view></view><view class="section">投资规模</view><view class="list flexWrap"><view wx:for="{{j}}" wx:for-item="item" wx:key="c" class="{{item.b}}" bindtap="{{item.d}}">{{item.a}}</view></view><view class="section">偏好市场(可多选)</view><view class="list flexWrap"><view wx:for="{{k}}" wx:for-item="item" wx:key="c" class="{{item.b}}" bindtap="{{item.d}}">{{item.a}}</view></view></view><view class="bottomC fixed flex"><view class="pre btn" bindtap="{{m}}">上一步</view><view class="finish btn flex1" bindtap="{{n}}">完成</view></view></view>
|
||||
@@ -11,7 +11,6 @@
|
||||
z-index: 10;
|
||||
}
|
||||
.avatarC .avatar {
|
||||
background-color: red;
|
||||
width: 100%;
|
||||
height: 150rpx;
|
||||
border-radius: 50%;
|
||||
@@ -23,6 +22,12 @@
|
||||
width: 40rpx;
|
||||
height: auto;
|
||||
}
|
||||
.avatarC button {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.preferenceC {
|
||||
background-color: white;
|
||||
left: 0;
|
||||
|
||||
58
unpackage/dist/dev/mp-weixin/pages/mine/mine.js
vendored
58
unpackage/dist/dev/mp-weixin/pages/mine/mine.js
vendored
@@ -1,5 +1,6 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const request_api = require("../../request/api.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
@@ -7,6 +8,7 @@ const _sfc_main = {
|
||||
menuTop: common_vendor.inject("menuTop"),
|
||||
menuH: common_vendor.inject("menuHeight"),
|
||||
infoTop: "",
|
||||
userInfo: null,
|
||||
menuList: [
|
||||
{
|
||||
icon: "/static/icon/mine/aboutUs.png",
|
||||
@@ -39,6 +41,9 @@ const _sfc_main = {
|
||||
onLoad() {
|
||||
this.infoTop = common_vendor.inject("navHeight") + 32 / 750 * common_vendor.inject("windowWidth");
|
||||
},
|
||||
onShow() {
|
||||
this.getUserInfoData();
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 点击查看个人信息
|
||||
@@ -65,7 +70,14 @@ const _sfc_main = {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/mine/commentReply/commentReply"
|
||||
});
|
||||
}
|
||||
} else if (index == 1) {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/mine/followCollect/followCollect"
|
||||
});
|
||||
} else
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/mine/myLike/myLike"
|
||||
});
|
||||
},
|
||||
clickMenuItem(url) {
|
||||
if (url) {
|
||||
@@ -73,22 +85,42 @@ const _sfc_main = {
|
||||
url
|
||||
});
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取用户信息数据
|
||||
*/
|
||||
getUserInfoData() {
|
||||
request_api.userInfo().then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.userInfo = res.data;
|
||||
} else
|
||||
common_vendor.wx$1.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
return common_vendor.e({
|
||||
a: common_assets._imports_0,
|
||||
b: common_vendor.s("top:" + $data.menuTop + "px;line-height:" + $data.menuH + "px;"),
|
||||
c: common_assets._imports_1$2,
|
||||
d: common_vendor.s("margin-top:" + $data.infoTop + "px;"),
|
||||
e: common_vendor.o(($event) => $options.clickPersonalInfo()),
|
||||
f: common_vendor.o(($event) => $options.clickNumItem(0)),
|
||||
g: common_vendor.o(($event) => $options.clickNumItem(1)),
|
||||
h: common_vendor.o(($event) => $options.clickNumItem(2)),
|
||||
i: common_assets._imports_2$4,
|
||||
j: common_vendor.o(($event) => $options.clickVip()),
|
||||
k: common_vendor.f($data.menuList, (item, index, i0) => {
|
||||
c: $data.userInfo
|
||||
}, $data.userInfo ? {
|
||||
d: $data.userInfo.basic_info.avatar_url,
|
||||
e: common_vendor.t($data.userInfo.basic_info.username),
|
||||
f: common_vendor.t($data.userInfo.basic_info.phone),
|
||||
g: common_assets._imports_1$2,
|
||||
h: common_vendor.s("margin-top:" + $data.infoTop + "px;"),
|
||||
i: common_vendor.o(($event) => $options.clickPersonalInfo())
|
||||
} : {}, {
|
||||
j: common_vendor.o(($event) => $options.clickNumItem(0)),
|
||||
k: common_vendor.o(($event) => $options.clickNumItem(1)),
|
||||
l: common_vendor.o(($event) => $options.clickNumItem(2)),
|
||||
m: common_assets._imports_2$4,
|
||||
n: common_vendor.o(($event) => $options.clickVip()),
|
||||
o: common_vendor.f($data.menuList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: item.icon,
|
||||
b: common_vendor.t(item.title),
|
||||
@@ -98,8 +130,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
e: common_vendor.o(($event) => $options.clickMenuItem(item.url), index)
|
||||
});
|
||||
}),
|
||||
l: common_assets._imports_3$3
|
||||
};
|
||||
p: common_assets._imports_3$3
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view><image class="topBg absolute" src="{{a}}" mode="widthFix"></image><view class="navTitle fixed" style="{{b}}">个人中心</view><view class="personalInfoC relative flex" style="{{d}}" bindtap="{{e}}"><image class="avatar" src="{{''}}" mode="aspectFill"></image><view class="flex1"><view class="nickname">星河滚烫的理想</view><view class="mobile">手机号:13654800065</view></view><image class="arrow" src="{{c}}" mode="widthFix"></image></view><view class="numList relative flex"><view class="item flex1 flexColumnCenter" bindtap="{{f}}"><view class="num">1</view><view class="title">评论回复</view></view><view class="item flex1 flexColumnCenter" bindtap="{{g}}"><view class="num">1</view><view class="title">关注收藏</view></view><view class="item flex1 flexColumnCenter" bindtap="{{h}}"><view class="num">1</view><view class="title">我的点赞</view></view></view><view class="vipC relative" bindtap="{{j}}"><image class="icon" src="{{i}}" mode="widthFix"></image></view><view class="menuList relative"><view class="list"><view wx:for="{{k}}" wx:for-item="item" wx:key="d" class="item relative flex" bindtap="{{item.e}}"><image class="icon" src="{{item.a}}" mode="aspectFit"></image><view class="title flex1">{{item.b}}</view><image class="arrow" src="{{l}}" mode="widthFix"></image><button wx:if="{{item.c}}" class="absolute" open-type="contact"></button></view></view></view></view>
|
||||
<view><image class="topBg absolute" src="{{a}}" mode="widthFix"></image><view class="navTitle fixed" style="{{b}}">个人中心</view><view wx:if="{{c}}" class="personalInfoC relative flex" style="{{h}}" bindtap="{{i}}"><image class="avatar" src="{{d}}" mode="aspectFill"></image><view class="flex1"><view class="nickname">{{e}}</view><view class="mobile">手机号:{{f}}</view></view><image class="arrow" src="{{g}}" mode="widthFix"></image></view><view class="numList relative flex"><view class="item flex1 flexColumnCenter" bindtap="{{j}}"><view class="num">1</view><view class="title">评论回复</view></view><view class="item flex1 flexColumnCenter" bindtap="{{k}}"><view class="num">1</view><view class="title">关注收藏</view></view><view class="item flex1 flexColumnCenter" bindtap="{{l}}"><view class="num">1</view><view class="title">我的点赞</view></view></view><view class="vipC relative" bindtap="{{n}}"><image class="icon" src="{{m}}" mode="widthFix"></image></view><view class="menuList relative"><view class="list"><view wx:for="{{o}}" wx:for-item="item" wx:key="d" class="item relative flex" bindtap="{{item.e}}"><image class="icon" src="{{item.a}}" mode="aspectFit"></image><view class="title flex1">{{item.b}}</view><image class="arrow" src="{{p}}" mode="widthFix"></image><button wx:if="{{item.c}}" class="absolute" open-type="contact"></button></view></view></view></view>
|
||||
83
unpackage/dist/dev/mp-weixin/pages/mine/myLike/myLike.js
vendored
Normal file
83
unpackage/dist/dev/mp-weixin/pages/mine/myLike/myLike.js
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const request_api = require("../../../request/api.js");
|
||||
const utils_util = require("../../../utils/util.js");
|
||||
const common_assets = require("../../../common/assets.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
navH: common_vendor.inject("navHeight"),
|
||||
myLikeList: [],
|
||||
page: 1,
|
||||
loadAll: false,
|
||||
getLocaleHourMinute: utils_util.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" };
|
||||
request_api.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
|
||||
common_vendor.index.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_navBar2 = common_vendor.resolveComponent("navBar");
|
||||
_easycom_navBar2();
|
||||
}
|
||||
const _easycom_navBar = () => "../../../components/navBar/navBar.js";
|
||||
if (!Math) {
|
||||
_easycom_navBar();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.p({
|
||||
leftText: "我的点赞"
|
||||
}),
|
||||
b: common_assets._imports_0,
|
||||
c: common_vendor.f($data.myLikeList, (item, index, i0) => {
|
||||
return {
|
||||
a: item.author.avatarurl,
|
||||
b: common_vendor.t(item.author.nickname),
|
||||
c: item.post_content,
|
||||
d: common_vendor.t($data.getLocaleHourMinute(item.like_time)),
|
||||
e: index
|
||||
};
|
||||
}),
|
||||
d: common_assets._imports_1$6,
|
||||
e: common_vendor.s("top:" + $data.navH + "px;")
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/mine/myLike/myLike.js.map
|
||||
6
unpackage/dist/dev/mp-weixin/pages/mine/myLike/myLike.json
vendored
Normal file
6
unpackage/dist/dev/mp-weixin/pages/mine/myLike/myLike.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"usingComponents": {
|
||||
"nav-bar": "../../../components/navBar/navBar"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/mine/myLike/myLike.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/mine/myLike/myLike.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view><nav-bar wx:if="{{a}}" u-i="005f0838-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="list fixed" style="{{e}}"><view wx:for="{{c}}" wx:for-item="item" wx:key="e" class="item"><image class="avatar" src="{{item.a}}" mode="aspectFill"></image><view class="flex1"><view class="nickname">{{item.b}}</view><rich-text class="content" nodes="{{item.c}}"></rich-text><view class="timeReplyLikeC flex between"><view class="timeReplyC flex"><view class="time">{{item.d}}</view></view><view class="likeC flex"><image class="icon" src="{{d}}" mode="widthFix"></image></view></view></view></view></view></view>
|
||||
79
unpackage/dist/dev/mp-weixin/pages/mine/myLike/myLike.wxss
vendored
Normal file
79
unpackage/dist/dev/mp-weixin/pages/mine/myLike/myLike.wxss
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
.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;
|
||||
}
|
||||
.list .item {
|
||||
display: flex;
|
||||
padding: 30rpx 25rpx;
|
||||
border-bottom: solid 1rpx #E4E4E4;
|
||||
}
|
||||
.list .item .avatar {
|
||||
margin-right: 23rpx;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.list .item .nickname {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #111;
|
||||
}
|
||||
.list .item .content {
|
||||
margin-top: 10rpx;
|
||||
line-height: 1.2rem;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #666;
|
||||
}
|
||||
.list .item .timeReplyLikeC .time {
|
||||
margin-right: 36rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: #aaa;
|
||||
}
|
||||
.list .item .timeReplyLikeC .reply {
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: #F97316;
|
||||
}
|
||||
.list .item .timeReplyLikeC .likeC {
|
||||
padding: 14rpx 0;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #999;
|
||||
}
|
||||
.list .item .timeReplyLikeC .likeC .icon {
|
||||
margin-right: 12rpx;
|
||||
width: 27rpx;
|
||||
height: auto;
|
||||
}
|
||||
.list .item .timeReplyLikeC .likeC.like {
|
||||
color: #F97316;
|
||||
}
|
||||
.list .item .totalCommentNumC {
|
||||
padding: 14rpx 0 22rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: #999;
|
||||
}
|
||||
.list .item .totalCommentNumC .line {
|
||||
background-color: #aaa;
|
||||
margin-right: 18rpx;
|
||||
width: 30rpx;
|
||||
height: 2rpx;
|
||||
}
|
||||
.list .item .totalCommentNumC .arrow {
|
||||
margin-left: 14rpx;
|
||||
width: 13rpx;
|
||||
height: auto;
|
||||
}
|
||||
150
unpackage/dist/dev/mp-weixin/pages/mine/vip/vip.js
vendored
150
unpackage/dist/dev/mp-weixin/pages/mine/vip/vip.js
vendored
@@ -1,54 +1,66 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const request_api = require("../../../request/api.js");
|
||||
const common_assets = require("../../../common/assets.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
navH: common_vendor.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: "不定期上线新功能"
|
||||
}
|
||||
@@ -56,6 +68,7 @@ const _sfc_main = {
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.getMemberStatus();
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
@@ -65,6 +78,21 @@ const _sfc_main = {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/mine/vipMeal/vipMeal"
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取会员状态
|
||||
*/
|
||||
getMemberStatus() {
|
||||
request_api.membershipStatus().then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.memberInfo = res.data;
|
||||
} else
|
||||
common_vendor.index.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -77,44 +105,120 @@ if (!Math) {
|
||||
_easycom_navBar();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.p({
|
||||
leftText: "会员中心"
|
||||
}),
|
||||
b: common_assets._imports_0,
|
||||
c: common_assets._imports_1$4,
|
||||
d: common_assets._imports_2$6,
|
||||
e: common_assets._imports_3$4,
|
||||
f: common_assets._imports_4$3,
|
||||
g: common_assets._imports_5$3,
|
||||
h: common_assets._imports_6$1,
|
||||
i: common_assets._imports_7,
|
||||
j: common_assets._imports_8,
|
||||
k: common_vendor.f($data.questionList, (item, index, i0) => {
|
||||
c: $data.memberInfo
|
||||
}, $data.memberInfo ? common_vendor.e({
|
||||
d: $data.memberInfo.is_member
|
||||
}, $data.memberInfo.is_member ? {
|
||||
e: common_assets._imports_1$5
|
||||
} : {
|
||||
f: common_assets._imports_2$7
|
||||
}, {
|
||||
g: $data.memberInfo.is_member
|
||||
}, $data.memberInfo.is_member ? {
|
||||
h: common_vendor.t($data.memberInfo.member_expire_date)
|
||||
} : {}, {
|
||||
i: $data.memberInfo.is_member
|
||||
}, $data.memberInfo.is_member ? {
|
||||
j: common_assets._imports_3$4
|
||||
} : {
|
||||
k: common_assets._imports_4$2
|
||||
}, {
|
||||
l: $data.memberInfo.is_member
|
||||
}, $data.memberInfo.is_member ? {
|
||||
m: common_assets._imports_5$1
|
||||
} : {
|
||||
n: common_assets._imports_6
|
||||
}, {
|
||||
o: common_vendor.n("impormant " + ($data.memberInfo.is_member ? "vip" : "")),
|
||||
p: $data.memberInfo.is_member
|
||||
}, $data.memberInfo.is_member ? {
|
||||
q: common_assets._imports_7$1
|
||||
} : {
|
||||
r: common_assets._imports_8$1
|
||||
}, {
|
||||
s: $data.memberInfo.is_member
|
||||
}, $data.memberInfo.is_member ? {
|
||||
t: common_assets._imports_9$1
|
||||
} : {
|
||||
v: common_assets._imports_10$1
|
||||
}, {
|
||||
w: common_vendor.n("impormant " + ($data.memberInfo.is_member ? "vip" : "")),
|
||||
x: common_vendor.n("impormant " + ($data.memberInfo.is_member ? "vip" : "")),
|
||||
y: $data.memberInfo.is_member
|
||||
}, $data.memberInfo.is_member ? {
|
||||
z: common_assets._imports_11$2
|
||||
} : {
|
||||
A: common_assets._imports_12$1
|
||||
}, {
|
||||
B: $data.memberInfo.is_member
|
||||
}, $data.memberInfo.is_member ? {
|
||||
C: common_assets._imports_13
|
||||
} : {
|
||||
D: common_assets._imports_14
|
||||
}, {
|
||||
E: common_assets._imports_15,
|
||||
F: common_vendor.f($data.questionList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item),
|
||||
b: index
|
||||
};
|
||||
}),
|
||||
l: common_assets._imports_2$6,
|
||||
m: common_assets._imports_3$4,
|
||||
n: common_assets._imports_9$1,
|
||||
o: common_assets._imports_2$6,
|
||||
p: common_assets._imports_3$4,
|
||||
q: common_assets._imports_10,
|
||||
r: common_assets._imports_2$6,
|
||||
s: common_assets._imports_3$4,
|
||||
t: common_vendor.f($data.privilegeList, (item, index, i0) => {
|
||||
G: common_vendor.n("item " + ($data.memberInfo.is_member ? "vip" : "")),
|
||||
H: $data.memberInfo.is_member
|
||||
}, $data.memberInfo.is_member ? {
|
||||
I: common_assets._imports_3$4
|
||||
} : {
|
||||
J: common_assets._imports_4$2
|
||||
}, {
|
||||
K: $data.memberInfo.is_member
|
||||
}, $data.memberInfo.is_member ? {
|
||||
L: common_assets._imports_5$1
|
||||
} : {
|
||||
M: common_assets._imports_6
|
||||
}, {
|
||||
N: common_assets._imports_16,
|
||||
O: $data.memberInfo.is_member
|
||||
}, $data.memberInfo.is_member ? {
|
||||
P: common_assets._imports_3$4
|
||||
} : {
|
||||
Q: common_assets._imports_4$2
|
||||
}, {
|
||||
R: $data.memberInfo.is_member
|
||||
}, $data.memberInfo.is_member ? {
|
||||
S: common_assets._imports_5$1
|
||||
} : {}, {
|
||||
T: common_assets._imports_6,
|
||||
U: common_assets._imports_17,
|
||||
V: $data.memberInfo.is_member
|
||||
}, $data.memberInfo.is_member ? {
|
||||
W: common_assets._imports_3$4
|
||||
} : {
|
||||
X: common_assets._imports_4$2
|
||||
}, {
|
||||
Y: $data.memberInfo.is_member
|
||||
}, $data.memberInfo.is_member ? {
|
||||
Z: common_assets._imports_5$1
|
||||
} : {
|
||||
aa: common_assets._imports_6
|
||||
}, {
|
||||
ab: common_vendor.f($data.privilegeList, (item, index, i0) => {
|
||||
return {
|
||||
a: item.icon,
|
||||
a: $data.memberInfo.is_member ? item.icon_v : item.icon,
|
||||
b: common_vendor.t(item.title),
|
||||
c: common_vendor.t(item.tips),
|
||||
d: index
|
||||
};
|
||||
}),
|
||||
v: common_vendor.s("margin-top:" + $data.navH + "px;"),
|
||||
w: common_vendor.o(($event) => $options.clickVipMeal())
|
||||
};
|
||||
ac: common_vendor.n("privilegeList flexWrap " + ($data.memberInfo.is_member ? "vip" : "")),
|
||||
ad: common_vendor.s("margin-top:" + $data.navH + "px;")
|
||||
}) : {}, {
|
||||
ae: common_vendor.o(($event) => $options.clickVipMeal())
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -28,6 +28,12 @@
|
||||
font-weight: 500;
|
||||
color: #65758A;
|
||||
}
|
||||
.vipC .vipInfoC .infoC.vip .title {
|
||||
color: #AB3D1A;
|
||||
}
|
||||
.vipC .vipInfoC .infoC.vip .tips {
|
||||
color: #AB3D1A;
|
||||
}
|
||||
.vipC .vipProfitIntroC {
|
||||
background-color: white;
|
||||
margin-top: -70rpx;
|
||||
@@ -79,6 +85,9 @@
|
||||
.vipC .vipProfitIntroC .stepC .step .impormant {
|
||||
font-weight: bold;
|
||||
}
|
||||
.vipC .vipProfitIntroC .stepC .step .impormant.vip {
|
||||
color: #F97316;
|
||||
}
|
||||
.vipC .vipProfitIntroC .picList {
|
||||
padding: 0 25rpx;
|
||||
margin-top: 34rpx;
|
||||
@@ -120,6 +129,10 @@
|
||||
color: #555;
|
||||
text-align: center;
|
||||
}
|
||||
.vipC .vipProfitIntroC .questionC .iconListC .list .item.vip {
|
||||
background-color: #FFEBDB;
|
||||
color: #F97316;
|
||||
}
|
||||
.vipC .vipProfitIntroC .introC {
|
||||
display: flex;
|
||||
box-shadow: 0px 0px 9rpx 0px rgba(0, 0, 0, 0.1);
|
||||
@@ -168,6 +181,9 @@
|
||||
font-size: 22rpx;
|
||||
color: #555;
|
||||
}
|
||||
.vipC .vipProfitIntroC .privilegeList.vip {
|
||||
box-shadow: 0px 0px 9px 0px rgba(249, 115, 22, 0.4);
|
||||
}
|
||||
.vipC .vipProfitIntroC .bottomTitle {
|
||||
margin-top: 80rpx;
|
||||
font-size: 45rpx;
|
||||
|
||||
@@ -1,18 +1,39 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const request_api = require("../../../request/api.js");
|
||||
const common_assets = require("../../../common/assets.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
navH: common_vendor.inject("navHeight"),
|
||||
memberInfo: null,
|
||||
//会员信息
|
||||
privilegeList: ["高效选股工具", "股票基金明星榜单", "定期专属晨报、股票动态", "独家产业研报", "个股产业分析", "股票、基金基础指标", "7x24 财经直播"]
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.getMemberStatus();
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 点击加入vip
|
||||
*/
|
||||
clickJoinVip() {
|
||||
},
|
||||
/**
|
||||
* 获取会员状态
|
||||
*/
|
||||
getMemberStatus() {
|
||||
request_api.membershipStatus().then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.memberInfo = res.data;
|
||||
} else
|
||||
common_vendor.index.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -25,20 +46,41 @@ if (!Math) {
|
||||
_easycom_navBar();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.p({
|
||||
leftText: "会员中心"
|
||||
}),
|
||||
b: common_assets._imports_0,
|
||||
c: common_assets._imports_1$4,
|
||||
d: common_assets._imports_2$6,
|
||||
e: common_assets._imports_3$4,
|
||||
f: common_vendor.f($data.privilegeList, (item, index, i0) => {
|
||||
c: $data.memberInfo
|
||||
}, $data.memberInfo ? common_vendor.e({
|
||||
d: $data.memberInfo.is_member
|
||||
}, $data.memberInfo.is_member ? {
|
||||
e: common_assets._imports_1$5
|
||||
} : {
|
||||
f: common_assets._imports_2$7
|
||||
}, {
|
||||
g: $data.memberInfo.is_member
|
||||
}, $data.memberInfo.is_member ? {
|
||||
h: common_vendor.t($data.memberInfo.member_expire_date)
|
||||
} : {}, {
|
||||
i: $data.memberInfo.is_member
|
||||
}, $data.memberInfo.is_member ? {
|
||||
j: common_assets._imports_3$4
|
||||
} : {
|
||||
k: common_assets._imports_4$2
|
||||
}, {
|
||||
l: $data.memberInfo.is_member
|
||||
}, $data.memberInfo.is_member ? {
|
||||
m: common_assets._imports_5$1
|
||||
} : {
|
||||
n: common_assets._imports_6
|
||||
}, {
|
||||
o: common_vendor.f($data.privilegeList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(item),
|
||||
b: index == 0 || index == 1 || index == 2
|
||||
}, index == 0 || index == 1 || index == 2 ? {
|
||||
c: common_assets._imports_4$4
|
||||
c: common_assets._imports_7$2
|
||||
} : {}, {
|
||||
d: index == 3 || index == 4
|
||||
}, index == 3 || index == 4 ? common_vendor.e({
|
||||
@@ -48,15 +90,20 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
}, index == 4 ? {} : {}) : {}, {
|
||||
g: index == 5 || index == 6
|
||||
}, index == 5 || index == 6 ? {
|
||||
h: common_assets._imports_5$4
|
||||
h: common_assets._imports_8$2
|
||||
} : {}, {
|
||||
i: index
|
||||
});
|
||||
}),
|
||||
g: common_assets._imports_5$4,
|
||||
h: common_vendor.s("margin-top:" + $data.navH + "px;"),
|
||||
i: common_vendor.o(($event) => $options.clickJoinVip())
|
||||
};
|
||||
p: common_assets._imports_8$2,
|
||||
q: common_vendor.n("privilegeList " + ($data.memberInfo.is_member ? "vip" : "")),
|
||||
r: common_vendor.s("margin-top:" + $data.navH + "px;")
|
||||
}) : {}, {
|
||||
s: $data.memberInfo
|
||||
}, $data.memberInfo ? {
|
||||
t: common_vendor.t($data.memberInfo.is_member ? "您已是年度VIP" : "立即加入年度VIP"),
|
||||
v: common_vendor.o(($event) => $options.clickJoinVip())
|
||||
} : {});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view><nav-bar wx:if="{{a}}" u-i="667ff406-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="vipC" style="{{h}}"><view class="vipInfoC relative"><image class="bg" src="{{c}}" mode="widthFix"></image><view 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="{{d}}" mode="widthFix"></image><view class="title">特权对比</view><image class="icon" src="{{e}}" mode="widthFix"></image></view><view class="privilegeList"><view class="header flex"><view class="privilege item">专属特权</view><view class="item free">普通免费</view><view class="item vip">VIP会员</view></view><view class="list"><view wx:for="{{f}}" wx:for-item="item" wx:key="i" class="item flex"><view class="optionItem privilege flex">{{item.a}}</view><view class="optionItem free flexCenter"><block wx:if="{{item.b}}"><image class="notContain" src="{{item.c}}" mode="widthFix"></image></block><block wx:if="{{item.d}}"><block wx:if="{{item.e}}">限制查看数量</block><block wx:if="{{item.f}}">每日查看2只</block></block><block wx:if="{{item.g}}"><image class="contain" src="{{item.h}}" mode="widthFix"></image></block></view><view class="optionItem vip flexCenter"><image class="contain" src="{{g}}" mode="widthFix"></image></view></view></view></view></view></view><view class="joinVipC fixed" bindtap="{{i}}">立即加入年度VIP</view></view>
|
||||
<view><nav-bar wx:if="{{a}}" u-i="667ff406-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view wx:if="{{c}}" class="vipC" style="{{r}}"><view class="vipInfoC relative"><image wx:if="{{d}}" class="bg" src="{{e}}" mode="widthFix"></image><image wx:else class="bg" src="{{f}}" mode="widthFix"></image><view wx:if="{{g}}" class="infoC vip absolute"><view class="title">尊贵的VIP会员</view><view class="tips">会员有效期至:{{h}}</view></view><view wx:else class="infoC absolute"><view class="title">价值前沿</view><view class="tips">您还不是会员 加入尊享N项服务</view></view></view><view class="privilegeCompareC relative"><view class="titleC flexCenter"><image wx:if="{{i}}" class="icon" src="{{j}}" mode="widthFix"></image><image wx:else class="icon" src="{{k}}" mode="widthFix"></image><view class="title">特权对比</view><image wx:if="{{l}}" class="icon" src="{{m}}" mode="widthFix"></image><image wx:else class="icon" src="{{n}}" mode="widthFix"></image></view><view class="{{q}}"><view class="header flex"><view class="privilege item">专属特权</view><view class="item free">普通免费</view><view class="item vip">VIP会员</view></view><view class="list"><view wx:for="{{o}}" wx:for-item="item" wx:key="i" class="item flex"><view class="optionItem privilege flex">{{item.a}}</view><view class="optionItem free flexCenter"><block wx:if="{{item.b}}"><image class="notContain" src="{{item.c}}" mode="widthFix"></image></block><block wx:if="{{item.d}}"><block wx:if="{{item.e}}">限制查看数量</block><block wx:if="{{item.f}}">每日查看2只</block></block><block wx:if="{{item.g}}"><image class="contain" src="{{item.h}}" mode="widthFix"></image></block></view><view class="optionItem vip flexCenter"><image class="contain" src="{{p}}" mode="widthFix"></image></view></view></view></view></view></view><view wx:if="{{s}}" class="joinVipC fixed" bindtap="{{v}}">{{t}}</view></view>
|
||||
@@ -28,6 +28,12 @@
|
||||
font-weight: 500;
|
||||
color: #65758A;
|
||||
}
|
||||
.vipC .vipInfoC .infoC.vip .title {
|
||||
color: #AB3D1A;
|
||||
}
|
||||
.vipC .vipInfoC .infoC.vip .tips {
|
||||
color: #AB3D1A;
|
||||
}
|
||||
.vipC .privilegeCompareC {
|
||||
background-color: white;
|
||||
margin-top: -70rpx;
|
||||
@@ -100,6 +106,9 @@
|
||||
.vipC .privilegeCompareC .privilegeList .list .optionItem.vip {
|
||||
width: 160rpx;
|
||||
}
|
||||
.vipC .privilegeCompareC .privilegeList.vip {
|
||||
box-shadow: 0px 0px 9px 0px rgba(249, 115, 22, 0.4);
|
||||
}
|
||||
.joinVipC {
|
||||
background-color: #F97316;
|
||||
margin: 0 25rpx;
|
||||
|
||||
Reference in New Issue
Block a user