12.4 概念模块功能完善
This commit is contained in:
1
unpackage/dist/build/mp-weixin/pages/index/historicalTimeline/historicalTimeline.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/pages/index/historicalTimeline/historicalTimeline.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const t=require("../../../common/vendor.js"),e=require("../../../common/assets.js"),n={data:()=>({navH:t.inject("navHeight"),contentTop:"",weekList:["一","二","三","四","五","六","日"],monthDateList:[],selectMonthIndex:0,selectMonth:"",selectDate:""}),onLoad(){this.contentTop=this.navH+70/750*t.inject("windowWidth");let e=new Date,n=e.getFullYear(),o=e.getMonth()+1,s=e.getDate(),a=[];this.selectMonthIndex=240+o-1,this.selectMonth=n+"年"+o+"月";for(var h=n-20;h<n+20;h++)for(var i=0;i<12;i++){let t=new Date(h,i+1,0),e=new Date(h,i+1,0);e.setDate(1);let r=t.getDate(),c=e.getDay()||7,d=[];for(var l=1;l<=r;l++){let t=new Date(h,i+1,0);t.setDate(l);let e=t.getMonth()+1,a=t.getDate(),r=t.getTime(),c=h+"-"+(e>9?e:"0"+e)+"-"+(a>9?a:"0"+a);d.push({date:c,year:h,month:e,day:a,isToday:h==n&&e==o&&a==s,isCurrentMonth:!0,timestamp:r})}for(l=0;l<c-1;l++){let t=h,e=i;i<1&&(t=h-1,e=12);let n=new Date(t,e,0).getDate(),o=new Date(t,e-1,n-l),s=o.getMonth()+1,a=o.getDate(),r=o.getTime(),c=t+"-"+(s>9?s:"0"+s)+"-"+(a>9?a:"0"+a);d.unshift({date:c,year:t,month:s,day:a,isToday:!1,isCurrentMonth:!1,timestamp:r})}let m=new Date(h,i+1,1),D=new Date(m-864e5).getDay()||7;for(l=1;l<8-D;l++){let t=h,e=i;e>11&&(e=0,t++);let n=new Date(t,e+1,l),o=n.getMonth()+1,s=n.getDate(),a=n.getTime(),r=t+"-"+(o>9?o:"0"+o)+"-"+(s>9?s:"0"+s);d.push({date:r,year:t,month:o,day:s,isToday:!1,isCurrentMonth:!1,timestamp:a})}a.push(d)}this.monthDateList=a},methods:{clickPreMonth(){if(this.selectMonthIndex>0){this.selectMonthIndex--;let t=this.monthDateList[this.selectMonthIndex],e="",n="";for(let o of t)if(o.isCurrentMonth){e=o.year,n=o.month;break}this.selectMonth=e+"年"+n+"月"}},clickNextMonth(){if(this.selectMonthIndex<this.monthDateList.length-1){this.selectMonthIndex++;let t=this.monthDateList[this.selectMonthIndex],e="",n="";for(let o of t)if(o.isCurrentMonth){e=o.year,n=o.month;break}this.selectMonth=e+"年"+n+"月"}},monthChange(t){console.log(t);let e=(new Date).getFullYear(),n=t.detail.value,o=parseInt(n.split("-")[0]),s=parseInt(n.split("-")[1]);this.selectMonthIndex=12*(o-(e-20))+s-1,this.selectMonth=o+"年"+s+"月"},clickSelectDate(t){this.selectDate!=t.date&&(this.selectDate=t.date)}}};if(!Array){t.resolveComponent("navBar")()}Math;const o=t._export_sfc(n,[["render",function(n,o,s,a,h,i){return{a:t.p({leftText:"历史时间轴",hideNavBg:!0}),b:e._imports_0$2,c:t.s("top: "+h.navH+"px;"),d:e._imports_1$7,e:t.o((t=>i.clickPreMonth())),f:t.t(h.selectMonth),g:t.o(((...t)=>i.monthChange&&i.monthChange(...t))),h:e._imports_2$8,i:t.o((t=>i.clickNextMonth())),j:t.f(h.weekList,((e,n,o)=>({a:t.t(e),b:n}))),k:t.f(h.monthDateList[h.selectMonthIndex],((e,n,o)=>t.e({a:e.date==h.selectDate},e.date==h.selectDate?{b:t.t(e.day)}:t.e({c:!e.isCurrentMonth},e.isCurrentMonth?{e:t.t(e.day)}:{d:t.t(e.day)}),{f:n,g:t.o((t=>i.clickSelectDate(e)),n)}))),l:e._imports_3$7,m:e._imports_4$6,n:t.s("top: "+h.contentTop+"px;")}}]]);wx.createPage(o);
|
||||
6
unpackage/dist/build/mp-weixin/pages/index/historicalTimeline/historicalTimeline.json
vendored
Normal file
6
unpackage/dist/build/mp-weixin/pages/index/historicalTimeline/historicalTimeline.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"usingComponents": {
|
||||
"nav-bar": "../../../components/navBar/navBar"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/build/mp-weixin/pages/index/historicalTimeline/historicalTimeline.wxml
vendored
Normal file
1
unpackage/dist/build/mp-weixin/pages/index/historicalTimeline/historicalTimeline.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view><nav-bar wx:if="{{a}}" u-i="1881f0d1-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="timelineTitle fixed" style="{{c}}">电解液添加剂 - 历史时间轴</view><view class="dateStatisticsC fixed" style="{{n}}"><view class="dateC"><view class="yearMonthC flex"><view class="btn" bindtap="{{e}}"><image class="icon" src="{{d}}" mode="widthFix"></image></view><view class="yearMonth flex1"><picker mode="date" fields="month" bindchange="{{g}}">{{f}}</picker></view><view class="btn" bindtap="{{i}}"><image class="icon" src="{{h}}" mode="widthFix"></image></view></view><view class="weekList flex"><view wx:for="{{j}}" wx:for-item="item" wx:key="b" class="item flex1">{{item.a}}</view></view><view class="monthDateList flexWrap"><view wx:for="{{k}}" wx:for-item="item" wx:key="f" class="item flexColumnCenter" bindtap="{{item.g}}"><block wx:if="{{item.a}}"><view class="date select">{{item.b}}</view></block><block wx:else><block wx:if="{{item.c}}"><view class="date notCurrentMonth">{{item.d}}</view></block><block wx:else><view class="date">{{item.e}}</view></block></block></view></view></view><view class="statisticsC"><view class="date">2025-11-10统计</view><view class="chgStockNumC flex"><view class="chgC flex flex1"><view class="title">涨跌幅</view><image class="icon" src="{{l}}" mode="widthFix"></image><view class="chg">+4.66%</view></view><view class="stockNumC flex flex1"><view class="title">涨跌幅</view><view class="stockNum">28 只股票</view></view></view><view class="newsReportC flex"><image class="icon" src="{{m}}" mode="widthFix"></image><text class="news">5 条新闻 · </text><text class="report" decode> 3 份研报</text></view><view class="list"><view class="item"><view class="flex"><view class="type">新闻</view><view class="title flex1">【招商电新】坚定看好锂电材料</view></view><view class="content">坚定看好锂电材料,建议继续加配坚定六氟、添加剂,关注隔膜更加坚定的看好六氟:下游传导如期</view></view></view></view></view></view>
|
||||
1
unpackage/dist/build/mp-weixin/pages/index/historicalTimeline/historicalTimeline.wxss
vendored
Normal file
1
unpackage/dist/build/mp-weixin/pages/index/historicalTimeline/historicalTimeline.wxss
vendored
Normal file
@@ -0,0 +1 @@
|
||||
page{background-color:#070707}.topBg{top:0;left:0;width:100%;height:auto}.timelineTitle{background-color:#fff9f5;left:0;right:0;margin:0 25rpx;padding:30rpx 27rpx 0;border-radius:10rpx 10rpx 0 0;font-size:28rpx;font-weight:700;color:#2b2b2b}.dateStatisticsC{background-color:#fff9f5;left:0;right:0;bottom:86rpx;margin:0 25rpx;padding:24rpx 25rpx 0;border-radius:0 0 10rpx 10rpx}.dateStatisticsC .dateC{background-color:#fff;box-shadow:0 5rpx 10rpx rgba(127,127,127,.1);border-radius:10rpx;padding:30rpx 25rpx 0}.dateStatisticsC .dateC .yearMonthC{background-color:#f7f7f7;height:70rpx;border-radius:35rpx}.dateStatisticsC .dateC .yearMonthC .btn{padding:0 52rpx}.dateStatisticsC .dateC .yearMonthC .btn .icon{width:13rpx;height:auto}.dateStatisticsC .dateC .yearMonthC .yearMonth{font-size:32rpx;font-weight:500;color:#070707;text-align:center}.dateStatisticsC .dateC .weekList .item{margin-right:13rpx;line-height:72rpx;font-size:26rpx;font-weight:500;color:#a7a7a7;text-align:center}.dateStatisticsC .dateC .monthDateList .item{margin-bottom:12rpx;width:calc(100%/7)}.dateStatisticsC .dateC .monthDateList .item .date{background-color:#f8f8f8;width:calc(100% - 10rpx);line-height:64rpx;border-radius:15rpx;font-size:24rpx;font-weight:700;color:#2a2a2a;text-align:center}.dateStatisticsC .dateC .monthDateList .item .date.select{background-color:#f2c367;color:#fff}.dateStatisticsC .dateC .monthDateList .item .date.notCurrentMonth{background-color:#fcfcfc;color:#999}.dateStatisticsC .statisticsC{background-color:#fff;margin-top:20rpx;padding:28rpx 20rpx 0;border-radius:10rpx}.dateStatisticsC .statisticsC .date{font-size:30rpx;font-weight:500;text-align:center}.dateStatisticsC .statisticsC .chgStockNumC{margin-top:36rpx;padding:0 13rpx 28rpx;border-bottom:solid 1rpx #EDEDED;font-size:26rpx}.dateStatisticsC .statisticsC .chgStockNumC .title{margin-right:18rpx;font-weight:500;color:#94979c}.dateStatisticsC .statisticsC .chgStockNumC .chgC .icon{margin-right:9rpx;width:17rpx;height:auto}.dateStatisticsC .statisticsC .chgStockNumC .chgC .chg{font-weight:700}.dateStatisticsC .statisticsC .chgStockNumC .chgC .chg.up{color:#ec3440}.dateStatisticsC .statisticsC .chgStockNumC .chgC .chg.down{color:#38a169}.dateStatisticsC .statisticsC .chgStockNumC .stockNum{font-weight:700;color:#070707}.dateStatisticsC .statisticsC .newsReportC{padding-top:20rpx;font-size:28rpx;font-weight:700}.dateStatisticsC .statisticsC .newsReportC .icon{margin-right:20rpx;width:24rpx;height:auto}.dateStatisticsC .statisticsC .newsReportC .news{color:#ff7723}.dateStatisticsC .statisticsC .newsReportC .report{color:#333}.dateStatisticsC .statisticsC .list .item{padding:30rpx 0;border-bottom:solid 1rpx #EDEDED}.dateStatisticsC .statisticsC .list .item .type{margin-right:18rpx;line-height:40rpx;border-radius:5rpx;font-size:22rpx;font-weight:500}.dateStatisticsC .statisticsC .list .item .title{font-size:26rpx;font-weight:700;color:#070707}.dateStatisticsC .statisticsC .list .item .content{margin-top:20rpx;font-size:24rpx;font-weight:500;color:#333;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis}
|
||||
Reference in New Issue
Block a user