7.10 增加登录页面,事件详情接口对接,我的点赞,关注收藏页面搭建,接口对接
This commit is contained in:
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: {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user