update
This commit is contained in:
parent
c48289bb60
commit
4491ce3042
0
pages/index/new_file.js
Normal file
0
pages/index/new_file.js
Normal file
File diff suppressed because it is too large
Load Diff
@ -728,12 +728,60 @@ export default {
|
|||||||
if (query.type) {
|
if (query.type) {
|
||||||
this.type = Number(query.type);
|
this.type = Number(query.type);
|
||||||
}
|
}
|
||||||
if (query.festivalType) {
|
if (query.festivalObj) {
|
||||||
this.selectFestival = Number(query.festivalType);
|
this.festivalObj = JSON.parse(query.festivalObj);
|
||||||
|
console.log("this.festivalObj", this.festivalObj);
|
||||||
|
this.selectFestival = this.festivalObj.HolidayType;
|
||||||
}
|
}
|
||||||
if (query.time) {
|
if (query.time) {
|
||||||
this.currentScroll = "item" + query.time;
|
this.currentScroll = "item" + query.time;
|
||||||
|
this.allDateDay = this.currentScroll.split("item")[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.lastDay = uni.getStorageSync("lastDay");
|
||||||
|
const currentDate = new Date(this.lastDay);
|
||||||
|
let nowTime = currentDate.getTime();
|
||||||
|
let dayList = [];
|
||||||
|
if (
|
||||||
|
new Date(this.festivalObj.startTime).getTime() <= nowTime &&
|
||||||
|
new Date(this.festivalObj.endTime).getTime() > nowTime
|
||||||
|
) {
|
||||||
|
let dayNumber = moment(this.lastDay).diff(
|
||||||
|
this.festivalObj.startTime,
|
||||||
|
"days"
|
||||||
|
);
|
||||||
|
console.log("dayNumber", dayNumber);
|
||||||
|
if (dayNumber > 0) {
|
||||||
|
for (let i = 0; i < dayNumber; i++) {
|
||||||
|
dayList.push({
|
||||||
|
label: `第${i + 1}天`,
|
||||||
|
value: moment(this.festivalObj.startTime)
|
||||||
|
.add(i, "days")
|
||||||
|
.format("YYYY-MM-DD"),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (new Date(this.festivalObj.endTime).getTime() < nowTime) {
|
||||||
|
// 当前时间已经过了这个时间范围了
|
||||||
|
let dayNumber =
|
||||||
|
moment(this.festivalObj.endTime).diff(
|
||||||
|
this.festivalObj.startTime,
|
||||||
|
"days"
|
||||||
|
) + 1;
|
||||||
|
console.log("dayNumber", dayNumber);
|
||||||
|
if (dayNumber > 0) {
|
||||||
|
for (let i = 0; i < dayNumber; i++) {
|
||||||
|
dayList.push({
|
||||||
|
label: `第${i + 1}天`,
|
||||||
|
value: moment(this.festivalObj.startTime)
|
||||||
|
.add(i, "days")
|
||||||
|
.format("YYYY-MM-DD"),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.scrollList = dayList;
|
||||||
|
this.handleGetData();
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.lastDay = uni.getStorageSync("lastDay");
|
this.lastDay = uni.getStorageSync("lastDay");
|
||||||
@ -909,7 +957,7 @@ export default {
|
|||||||
const time = new Date(date);
|
const time = new Date(date);
|
||||||
let m = time.getMonth() + 1;
|
let m = time.getMonth() + 1;
|
||||||
let d = time.getDate();
|
let d = time.getDate();
|
||||||
this.allDateDay = `${m < 10 ? "0" + m : m}月${d < 10 ? "0" + d : d}日`;
|
this.allDateDay = date;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.handleGetData(date);
|
this.handleGetData(date);
|
||||||
@ -926,26 +974,26 @@ export default {
|
|||||||
: this.currentScroll.split("item")[1];
|
: this.currentScroll.split("item")[1];
|
||||||
const req = {
|
const req = {
|
||||||
calcType: this.pageType,
|
calcType: this.pageType,
|
||||||
pushProvinceCode: this.useInfo.userData.ProvinceCode || "340000",
|
pushProvinceCode: "340000",
|
||||||
curYear: this.curYear,
|
curYear: this.festivalObj.curYear,
|
||||||
compareYear: this.compareYear,
|
compareYear: this.festivalObj.compareYear,
|
||||||
HolidayType:
|
HolidayType: this.selectFestival,
|
||||||
this.selectFestival === 0
|
// this.selectFestival === 0
|
||||||
? 2
|
// ? 2
|
||||||
: this.selectFestival === 1
|
// : this.selectFestival === 1
|
||||||
? 3
|
// ? 3
|
||||||
: this.selectFestival === 2
|
// : this.selectFestival === 2
|
||||||
? 4
|
// ? 4
|
||||||
: this.selectFestival === 3
|
// : this.selectFestival === 3
|
||||||
? 5
|
// ? 5
|
||||||
: this.selectFestival === 4
|
// : this.selectFestival === 4
|
||||||
? 6
|
// ? 6
|
||||||
: this.selectFestival === 5
|
// : this.selectFestival === 5
|
||||||
? 7
|
// ? 7
|
||||||
: this.selectFestival === 6
|
// : this.selectFestival === 6
|
||||||
? 8
|
// ? 8
|
||||||
: "",
|
// : "",
|
||||||
StatisticsDate: time,
|
StatisticsDate: this.allDateDay,
|
||||||
businessRegion: 1,
|
businessRegion: 1,
|
||||||
SortStr: `${
|
SortStr: `${
|
||||||
this.type === 1
|
this.type === 1
|
||||||
@ -1320,12 +1368,13 @@ export default {
|
|||||||
Serverpart_ID: obj.ServerpartId,
|
Serverpart_ID: obj.ServerpartId,
|
||||||
};
|
};
|
||||||
uni.setStorageSync("springService", springObj); //当前选中服务区信息
|
uni.setStorageSync("springService", springObj); //当前选中服务区信息
|
||||||
|
console.log("obj", obj);
|
||||||
this.$util.toNextRoute(
|
this.$util.toNextRoute(
|
||||||
"navigateTo",
|
"navigateTo",
|
||||||
`/pages/nationalPage/merchantRevenue?ServerpartId=${
|
`/pages/nationalPage/merchantRevenue?ServerpartId=${
|
||||||
obj.ServerpartId
|
obj.ServerpartId
|
||||||
}&type=${this.type}&serverPartList=${JSON.stringify(
|
}&type=${this.type}&festivalObj=${JSON.stringify(
|
||||||
this.serverPartList
|
this.festivalObj
|
||||||
)}¤tScroll=${this.currentScroll}&festivalType=${
|
)}¤tScroll=${this.currentScroll}&festivalType=${
|
||||||
this.selectFestival
|
this.selectFestival
|
||||||
}`
|
}`
|
||||||
|
|||||||
@ -86,14 +86,29 @@
|
|||||||
class="pick"
|
class="pick"
|
||||||
@change="handleChangeFestival($event)"
|
@change="handleChangeFestival($event)"
|
||||||
:value="currentIndex"
|
:value="currentIndex"
|
||||||
:range="defaultFestivalList"
|
:range="canSelectFestivalList"
|
||||||
range-key="label"
|
range-key="label"
|
||||||
>
|
>
|
||||||
|
<!-- :range="defaultFestivalList" -->
|
||||||
<div
|
<div
|
||||||
class="festivalChangeBox"
|
class="festivalChangeBox"
|
||||||
:style="{ paddingTop: menu.bottom + 32 + 'px' }"
|
:style="{ paddingTop: menu.bottom + 32 + 'px' }"
|
||||||
>
|
>
|
||||||
|
<div class="newChangeBox">
|
||||||
<image
|
<image
|
||||||
|
class="changeIcon"
|
||||||
|
src="https://eshangtech.com/ShopICO/ahyd-BID/newIndex/1stDateTime.svg"
|
||||||
|
/>
|
||||||
|
<!-- defaultFestivalList[currentIndex].label -->
|
||||||
|
<span class="festivalName">{{
|
||||||
|
canSelectFestivalList[currentIndex].label
|
||||||
|
}}</span>
|
||||||
|
<image
|
||||||
|
class="changeIcon"
|
||||||
|
src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/rightArrow.svg"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<!-- <image
|
||||||
:style="{
|
:style="{
|
||||||
width:
|
width:
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival===2
|
||||||
@ -146,8 +161,8 @@
|
|||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/nationalDayTitleIcon.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/nationalDayTitleIcon.png'
|
||||||
: ''
|
: ''
|
||||||
"
|
"
|
||||||
/>
|
/> -->
|
||||||
<image
|
<!-- <image
|
||||||
class="changeIcon"
|
class="changeIcon"
|
||||||
:src="
|
:src="
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival===2
|
||||||
@ -166,7 +181,7 @@
|
|||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/nationalDayRightArrow.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/nationalDayRightArrow.png'
|
||||||
: ''
|
: ''
|
||||||
"
|
"
|
||||||
/>
|
/> -->
|
||||||
</div>
|
</div>
|
||||||
</picker>
|
</picker>
|
||||||
</div>
|
</div>
|
||||||
@ -177,7 +192,7 @@
|
|||||||
<!-- 对客营收 -->
|
<!-- 对客营收 -->
|
||||||
<div
|
<div
|
||||||
:class="
|
:class="
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? 'overAllDataTop springTop'
|
? 'overAllDataTop springTop'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? 'overAllDataTop qmTop'
|
? 'overAllDataTop qmTop'
|
||||||
@ -200,7 +215,7 @@
|
|||||||
<img
|
<img
|
||||||
class="titleImg"
|
class="titleImg"
|
||||||
:src="
|
:src="
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/allDataTitle.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/allDataTitle.png'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmSumData.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmSumData.png'
|
||||||
@ -217,7 +232,10 @@
|
|||||||
: ''
|
: ''
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
<text
|
<text class="titleNotice"
|
||||||
|
>/共统计节日数据{{ currentHoliday }}天</text
|
||||||
|
>
|
||||||
|
<!-- <text
|
||||||
class="titleNotice"
|
class="titleNotice"
|
||||||
v-if="!isShowWarningTime && selectFestival === 0"
|
v-if="!isShowWarningTime && selectFestival === 0"
|
||||||
>{{ `/统计到${StatisticsDate}` }}</text
|
>{{ `/统计到${StatisticsDate}` }}</text
|
||||||
@ -241,7 +259,7 @@
|
|||||||
class="titleNotice"
|
class="titleNotice"
|
||||||
v-if="!isShowWarningTime && selectFestival === 4"
|
v-if="!isShowWarningTime && selectFestival === 4"
|
||||||
>{{ `/统计到${StatisticsDate}` }}</text
|
>{{ `/统计到${StatisticsDate}` }}</text
|
||||||
>
|
> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="typeChangeBox" v-if="!showSpring">
|
<div class="typeChangeBox" v-if="!showSpring">
|
||||||
<div
|
<div
|
||||||
@ -325,7 +343,7 @@
|
|||||||
<div class="pkBox">
|
<div class="pkBox">
|
||||||
<div
|
<div
|
||||||
:class="
|
:class="
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? 'leftBox springLeftBox'
|
? 'leftBox springLeftBox'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? 'leftBox qmLeftBox'
|
? 'leftBox qmLeftBox'
|
||||||
@ -351,11 +369,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
:class="
|
:class="
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? 'rightBox springRightBox'
|
? 'rightBox springRightBox'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? 'rightBox qmRightBox'
|
? 'rightBox qmRightBox'
|
||||||
: selectFestival ===4
|
: selectFestival === 4
|
||||||
? 'rightBox labourRightBox'
|
? 'rightBox labourRightBox'
|
||||||
: selectFestival === 5
|
: selectFestival === 5
|
||||||
? 'rightBox dragonBoatRightBox'
|
? 'rightBox dragonBoatRightBox'
|
||||||
@ -378,7 +396,7 @@
|
|||||||
<img
|
<img
|
||||||
class="pkLogo"
|
class="pkLogo"
|
||||||
:src="
|
:src="
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/vs.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/vs.png'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmPk1st.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmPk1st.png'
|
||||||
@ -1125,7 +1143,7 @@
|
|||||||
<div class="pkBox">
|
<div class="pkBox">
|
||||||
<div
|
<div
|
||||||
:class="
|
:class="
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? 'leftBox revenueLeft'
|
? 'leftBox revenueLeft'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? 'leftBox qmRevenueLeft'
|
? 'leftBox qmRevenueLeft'
|
||||||
@ -1137,7 +1155,7 @@
|
|||||||
? 'leftBox summerHolidayRevenueLeft'
|
? 'leftBox summerHolidayRevenueLeft'
|
||||||
: selectFestival === 7
|
: selectFestival === 7
|
||||||
? 'leftBox midAutumnRevenueLeft'
|
? 'leftBox midAutumnRevenueLeft'
|
||||||
: selectFestival ===8
|
: selectFestival === 8
|
||||||
? 'leftBox nationalDayRevenueLeft'
|
? 'leftBox nationalDayRevenueLeft'
|
||||||
: ''
|
: ''
|
||||||
"
|
"
|
||||||
@ -1151,7 +1169,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
:class="
|
:class="
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? 'rightBox revenueRight'
|
? 'rightBox revenueRight'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? 'rightBox qmRevenueRight'
|
? 'rightBox qmRevenueRight'
|
||||||
@ -1178,7 +1196,7 @@
|
|||||||
<img
|
<img
|
||||||
class="pkLogo"
|
class="pkLogo"
|
||||||
:src="
|
:src="
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/revenueVS.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/revenueVS.png'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmPk2st.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmPk2st.png'
|
||||||
@ -1722,9 +1740,9 @@
|
|||||||
<div class="pkBox" style="margin-bottom: 20px">
|
<div class="pkBox" style="margin-bottom: 20px">
|
||||||
<div
|
<div
|
||||||
:class="
|
:class="
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? 'leftBox carLeft'
|
? 'leftBox carLeft'
|
||||||
: selectFestival ===3
|
: selectFestival === 3
|
||||||
? 'leftBox qmCarLeft'
|
? 'leftBox qmCarLeft'
|
||||||
: selectFestival === 4
|
: selectFestival === 4
|
||||||
? 'leftBox labourCarLeft'
|
? 'leftBox labourCarLeft'
|
||||||
@ -1748,11 +1766,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
:class="
|
:class="
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? 'rightBox carRight'
|
? 'rightBox carRight'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? 'rightBox qmCarRight'
|
? 'rightBox qmCarRight'
|
||||||
: selectFestival ===4
|
: selectFestival === 4
|
||||||
? 'rightBox labourCarRight'
|
? 'rightBox labourCarRight'
|
||||||
: selectFestival === 5
|
: selectFestival === 5
|
||||||
? 'rightBox dragonBoatCarRight'
|
? 'rightBox dragonBoatCarRight'
|
||||||
@ -1775,7 +1793,7 @@
|
|||||||
<img
|
<img
|
||||||
class="pkLogo"
|
class="pkLogo"
|
||||||
:src="
|
:src="
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/carVS.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/carVS.png'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmPk3st.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmPk3st.png'
|
||||||
@ -1905,7 +1923,7 @@
|
|||||||
<div class="revenueDetail">
|
<div class="revenueDetail">
|
||||||
<div
|
<div
|
||||||
:class="
|
:class="
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? 'springTitleBox revenueDetailTitleBox'
|
? 'springTitleBox revenueDetailTitleBox'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? 'qmTitleBox revenueDetailTitleBox'
|
? 'qmTitleBox revenueDetailTitleBox'
|
||||||
@ -1926,7 +1944,7 @@
|
|||||||
<img
|
<img
|
||||||
class="detailLogo"
|
class="detailLogo"
|
||||||
:src="
|
:src="
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/revenueDetailLogo.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/revenueDetailLogo.png'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmDaily.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmDaily.png'
|
||||||
@ -1946,7 +1964,7 @@
|
|||||||
<img
|
<img
|
||||||
class="detailIcon"
|
class="detailIcon"
|
||||||
:src="
|
:src="
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/revenueDetailIcon.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/revenueDetailIcon.png'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmDetailIcon.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmDetailIcon.png'
|
||||||
@ -1973,7 +1991,7 @@
|
|||||||
class="goTest"
|
class="goTest"
|
||||||
@click="handleGoTest"
|
@click="handleGoTest"
|
||||||
:src="
|
:src="
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/springTravelBtn.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/springTravelBtn.png'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmPic.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmPic.png'
|
||||||
@ -1995,7 +2013,7 @@
|
|||||||
<scroll-view
|
<scroll-view
|
||||||
scroll-x="true"
|
scroll-x="true"
|
||||||
:class="
|
:class="
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? 'navList springNav'
|
? 'navList springNav'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? 'navList qmNav'
|
? 'navList qmNav'
|
||||||
@ -2039,13 +2057,13 @@
|
|||||||
class="modalIndex"
|
class="modalIndex"
|
||||||
:style="{
|
:style="{
|
||||||
background:
|
background:
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? '#DB6465'
|
? '#DB6465'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? '#3B9285'
|
? '#3B9285'
|
||||||
: selectFestival ===4
|
: selectFestival === 4
|
||||||
? '#D14702'
|
? '#D14702'
|
||||||
: selectFestival ===5
|
: selectFestival === 5
|
||||||
? '#3E8958'
|
? '#3E8958'
|
||||||
: selectFestival === 6
|
: selectFestival === 6
|
||||||
? '#007797'
|
? '#007797'
|
||||||
@ -2064,7 +2082,7 @@
|
|||||||
class="moreText"
|
class="moreText"
|
||||||
:style="{
|
:style="{
|
||||||
color:
|
color:
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? '#ED3E48'
|
? '#ED3E48'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? '#226C61'
|
? '#226C61'
|
||||||
@ -2086,13 +2104,13 @@
|
|||||||
<img
|
<img
|
||||||
class="moreIcon"
|
class="moreIcon"
|
||||||
:src="
|
:src="
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/redRightArrow.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/redRightArrow.png'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/greenRightArrow.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/greenRightArrow.png'
|
||||||
: selectFestival === 4
|
: selectFestival === 4
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/labourRight.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/labourRight.png'
|
||||||
: selectFestival ===5
|
: selectFestival === 5
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/dragonBoatRight.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/dragonBoatRight.png'
|
||||||
: selectFestival === 6
|
: selectFestival === 6
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/summerHolidayRight.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/summerHolidayRight.png'
|
||||||
@ -2114,7 +2132,7 @@
|
|||||||
class="modalIndex"
|
class="modalIndex"
|
||||||
:style="{
|
:style="{
|
||||||
background:
|
background:
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? '#DB6465'
|
? '#DB6465'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? '#3B9285'
|
? '#3B9285'
|
||||||
@ -2139,7 +2157,7 @@
|
|||||||
class="moreText"
|
class="moreText"
|
||||||
:style="{
|
:style="{
|
||||||
color:
|
color:
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? '#ED3E48'
|
? '#ED3E48'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? '#226C61'
|
? '#226C61'
|
||||||
@ -2161,11 +2179,11 @@
|
|||||||
<img
|
<img
|
||||||
class="moreIcon"
|
class="moreIcon"
|
||||||
:src="
|
:src="
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/redRightArrow.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/redRightArrow.png'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/greenRightArrow.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/greenRightArrow.png'
|
||||||
: selectFestival ===4
|
: selectFestival === 4
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/labourRight.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/labourRight.png'
|
||||||
: selectFestival === 5
|
: selectFestival === 5
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/dragonBoatRight.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/dragonBoatRight.png'
|
||||||
@ -2693,7 +2711,7 @@
|
|||||||
class="modalIndex"
|
class="modalIndex"
|
||||||
:style="{
|
:style="{
|
||||||
background:
|
background:
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? '#DB6465'
|
? '#DB6465'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? '#3B9285'
|
? '#3B9285'
|
||||||
@ -2718,11 +2736,11 @@
|
|||||||
class="moreText"
|
class="moreText"
|
||||||
:style="{
|
:style="{
|
||||||
color:
|
color:
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? '#ED3E48'
|
? '#ED3E48'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? '#226C61'
|
? '#226C61'
|
||||||
: selectFestival ===4
|
: selectFestival === 4
|
||||||
? '#D14702'
|
? '#D14702'
|
||||||
: selectFestival === 5
|
: selectFestival === 5
|
||||||
? '#226C61'
|
? '#226C61'
|
||||||
@ -2740,7 +2758,7 @@
|
|||||||
<img
|
<img
|
||||||
class="moreIcon"
|
class="moreIcon"
|
||||||
:src="
|
:src="
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/redRightArrow.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/redRightArrow.png'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/greenRightArrow.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/greenRightArrow.png'
|
||||||
@ -2778,7 +2796,7 @@
|
|||||||
class="modalIndex"
|
class="modalIndex"
|
||||||
:style="{
|
:style="{
|
||||||
background:
|
background:
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? '#DB6465'
|
? '#DB6465'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? '#3B9285'
|
? '#3B9285'
|
||||||
@ -2803,7 +2821,7 @@
|
|||||||
class="moreText"
|
class="moreText"
|
||||||
:style="{
|
:style="{
|
||||||
color:
|
color:
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? '#ED3E48'
|
? '#ED3E48'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? '#226C61'
|
? '#226C61'
|
||||||
@ -2825,7 +2843,7 @@
|
|||||||
<img
|
<img
|
||||||
class="moreIcon"
|
class="moreIcon"
|
||||||
:src="
|
:src="
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/redRightArrow.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/redRightArrow.png'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/greenRightArrow.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/greenRightArrow.png'
|
||||||
@ -3359,7 +3377,7 @@
|
|||||||
class="modalIndex"
|
class="modalIndex"
|
||||||
:style="{
|
:style="{
|
||||||
background:
|
background:
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? '#DB6465'
|
? '#DB6465'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? '#3B9285'
|
? '#3B9285'
|
||||||
@ -3384,7 +3402,7 @@
|
|||||||
class="moreText"
|
class="moreText"
|
||||||
:style="{
|
:style="{
|
||||||
color:
|
color:
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? '#ED3E48'
|
? '#ED3E48'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? '#226C61'
|
? '#226C61'
|
||||||
@ -3406,9 +3424,9 @@
|
|||||||
<img
|
<img
|
||||||
class="moreIcon"
|
class="moreIcon"
|
||||||
:src="
|
:src="
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/redRightArrow.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/redRightArrow.png'
|
||||||
: selectFestival ===3
|
: selectFestival === 3
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/greenRightArrow.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/greenRightArrow.png'
|
||||||
: selectFestival === 4
|
: selectFestival === 4
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/labourRight.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/labourRight.png'
|
||||||
@ -3444,7 +3462,7 @@
|
|||||||
class="modalIndex"
|
class="modalIndex"
|
||||||
:style="{
|
:style="{
|
||||||
background:
|
background:
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? '#DB6465'
|
? '#DB6465'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? '#3B9285'
|
? '#3B9285'
|
||||||
@ -3452,7 +3470,7 @@
|
|||||||
? '#D14702'
|
? '#D14702'
|
||||||
: selectFestival === 5
|
: selectFestival === 5
|
||||||
? '#3E8958'
|
? '#3E8958'
|
||||||
: selectFestival ===6
|
: selectFestival === 6
|
||||||
? '#007797'
|
? '#007797'
|
||||||
: selectFestival === 7
|
: selectFestival === 7
|
||||||
? '#DA5015'
|
? '#DA5015'
|
||||||
@ -3469,7 +3487,7 @@
|
|||||||
class="moreText"
|
class="moreText"
|
||||||
:style="{
|
:style="{
|
||||||
color:
|
color:
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? '#ED3E48'
|
? '#ED3E48'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? '#226C61'
|
? '#226C61'
|
||||||
@ -3491,7 +3509,7 @@
|
|||||||
<img
|
<img
|
||||||
class="moreIcon"
|
class="moreIcon"
|
||||||
:src="
|
:src="
|
||||||
selectFestival === 1 || selectFestival===2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/redRightArrow.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/redRightArrow.png'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/greenRightArrow.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/greenRightArrow.png'
|
||||||
@ -3861,7 +3879,7 @@ export default {
|
|||||||
HolidayType: 2,
|
HolidayType: 2,
|
||||||
curYear: 2025,
|
curYear: 2025,
|
||||||
compareYear: 2024,
|
compareYear: 2024,
|
||||||
startTime: "2025-01-13",
|
startTime: "2025-01-14",
|
||||||
endTime: "2025-02-23",
|
endTime: "2025-02-23",
|
||||||
lastYearStart: "2024/01/26",
|
lastYearStart: "2024/01/26",
|
||||||
lastYearEnd: "2024/03/05",
|
lastYearEnd: "2024/03/05",
|
||||||
@ -3906,9 +3924,9 @@ export default {
|
|||||||
curYear: 2025,
|
curYear: 2025,
|
||||||
compareYear: 2024,
|
compareYear: 2024,
|
||||||
startTime: "2025-06-30",
|
startTime: "2025-06-30",
|
||||||
endTime: "2025-09-01",
|
endTime: "2025-08-31",
|
||||||
lastYearStart: "2024/06/30",
|
lastYearStart: "2024/06/30",
|
||||||
lastYearEnd: "2024/09/01",
|
lastYearEnd: "2024/08/31",
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// label: "25年中秋",
|
// label: "25年中秋",
|
||||||
@ -3991,9 +4009,9 @@ export default {
|
|||||||
curYear: 2024,
|
curYear: 2024,
|
||||||
compareYear: 2023,
|
compareYear: 2023,
|
||||||
startTime: "2024-06-30",
|
startTime: "2024-06-30",
|
||||||
endTime: "2024-09-01",
|
endTime: "2024-08-31",
|
||||||
lastYearStart: "2023/06/30",
|
lastYearStart: "2023/06/30",
|
||||||
lastYearEnd: "2023/09/01",
|
lastYearEnd: "2023/08/31",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "24年中秋",
|
label: "24年中秋",
|
||||||
@ -4021,6 +4039,8 @@ export default {
|
|||||||
currentFestival: {}, // 当前节日的对象
|
currentFestival: {}, // 当前节日的对象
|
||||||
currentIndex: 0, // 当前节日的索引
|
currentIndex: 0, // 当前节日的索引
|
||||||
StatisticsDate: "", // 请求时间
|
StatisticsDate: "", // 请求时间
|
||||||
|
currentHoliday: 0, // 当前时间是这个节日的第几天
|
||||||
|
canSelectFestivalList:[], // 可以选择的节日列表
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
async onLoad(query) {
|
async onLoad(query) {
|
||||||
@ -4042,15 +4062,24 @@ export default {
|
|||||||
let nowTime = currentDate.getTime(); // 当前的时间戳 来拿到现在的时间 是过了哪个节日 没到哪个节日
|
let nowTime = currentDate.getTime(); // 当前的时间戳 来拿到现在的时间 是过了哪个节日 没到哪个节日
|
||||||
let currentIndex = 0; // 当前节日的索引
|
let currentIndex = 0; // 当前节日的索引
|
||||||
let currentObj = {}; // 当前节日的对象
|
let currentObj = {}; // 当前节日的对象
|
||||||
|
|
||||||
|
let nowBeforeList = [];
|
||||||
|
|
||||||
this.defaultFestivalList.forEach((item, index) => {
|
this.defaultFestivalList.forEach((item, index) => {
|
||||||
|
if (new Date(item.startTime).getTime() <= nowTime) {
|
||||||
|
nowBeforeList.push(item);
|
||||||
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
new Date(item.startTime).getTime() < nowTime &&
|
new Date(item.startTime).getTime() <= nowTime &&
|
||||||
new Date(item.endTime).getTime() > nowTime
|
new Date(item.endTime).getTime() > nowTime
|
||||||
) {
|
) {
|
||||||
currentIndex = index;
|
currentIndex = index;
|
||||||
currentObj = item;
|
currentObj = item;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
console.log("nowBeforeList", nowBeforeList);
|
||||||
|
this.canSelectFestivalList = nowBeforeList
|
||||||
// 如果当前时间不在任何一个节日范围内 那么 currentObj 肯定是空的 那我们就找已经过了 且最时间最大的
|
// 如果当前时间不在任何一个节日范围内 那么 currentObj 肯定是空的 那我们就找已经过了 且最时间最大的
|
||||||
// 因为默认的节日列表 要25年先 所以还得排序出时间大的
|
// 因为默认的节日列表 要25年先 所以还得排序出时间大的
|
||||||
if (!currentObj.label) {
|
if (!currentObj.label) {
|
||||||
@ -4086,10 +4115,11 @@ export default {
|
|||||||
if (currentObj) {
|
if (currentObj) {
|
||||||
// 当前时间 在这个节日时间范围内
|
// 当前时间 在这个节日时间范围内
|
||||||
if (
|
if (
|
||||||
new Date(currentObj.startTime).getTime() < nowTime &&
|
new Date(currentObj.startTime).getTime() <= nowTime &&
|
||||||
new Date(currentObj.endTime).getTime() > nowTime
|
new Date(currentObj.endTime).getTime() > nowTime
|
||||||
) {
|
) {
|
||||||
let dayNumber = moment(this.lastDay).diff(currentObj.startTime, "days");
|
let dayNumber =
|
||||||
|
moment(this.lastDay).diff(currentObj.startTime, "days") + 1;
|
||||||
console.log("dayNumber", dayNumber);
|
console.log("dayNumber", dayNumber);
|
||||||
if (dayNumber > 0) {
|
if (dayNumber > 0) {
|
||||||
for (let i = 0; i < dayNumber; i++) {
|
for (let i = 0; i < dayNumber; i++) {
|
||||||
@ -4101,6 +4131,7 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.currentHoliday = dayNumber;
|
||||||
this.currentScroll = "item" + this.lastDay;
|
this.currentScroll = "item" + this.lastDay;
|
||||||
this.StatisticsDate = this.lastDay;
|
this.StatisticsDate = this.lastDay;
|
||||||
} else if (new Date(currentObj.endTime).getTime() < nowTime) {
|
} else if (new Date(currentObj.endTime).getTime() < nowTime) {
|
||||||
@ -4118,6 +4149,7 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.currentHoliday = dayNumber;
|
||||||
this.currentScroll = "item" + currentObj.endTime;
|
this.currentScroll = "item" + currentObj.endTime;
|
||||||
this.StatisticsDate = currentObj.endTime;
|
this.StatisticsDate = currentObj.endTime;
|
||||||
}
|
}
|
||||||
@ -4370,21 +4402,21 @@ export default {
|
|||||||
let currentObj = this.defaultFestivalList[Number(e.detail.value)];
|
let currentObj = this.defaultFestivalList[Number(e.detail.value)];
|
||||||
this.selectFestival = currentObj.HolidayType;
|
this.selectFestival = currentObj.HolidayType;
|
||||||
this.currentFestival = currentObj;
|
this.currentFestival = currentObj;
|
||||||
|
console.log("this.currentFestival", this.currentFestival);
|
||||||
this.currentIndex = Number(e.detail.value);
|
this.currentIndex = Number(e.detail.value);
|
||||||
const currentDate = new Date(this.lastDay);
|
const currentDate = new Date(this.lastDay);
|
||||||
let nowTime = currentDate.getTime(); // 当前的时间戳 来拿到现在的时间 是过了哪个节日 没到哪个节日
|
let nowTime = currentDate.getTime(); // 当前的时间戳 来拿到现在的时间 是过了哪个节日 没到哪个节日
|
||||||
|
console.log("currentObj", currentObj);
|
||||||
|
console.log("this.lastDay", this.lastDay);
|
||||||
let dayList = [];
|
let dayList = [];
|
||||||
if (currentObj) {
|
if (currentObj) {
|
||||||
// 当前时间 在这个节日时间范围内
|
// 当前时间 在这个节日时间范围内
|
||||||
if (
|
if (
|
||||||
new Date(currentObj.startTime).getTime() < nowTime &&
|
new Date(currentObj.startTime).getTime() <= nowTime &&
|
||||||
new Date(currentObj.endTime).getTime() > nowTime
|
new Date(currentObj.endTime).getTime() > nowTime
|
||||||
) {
|
) {
|
||||||
let dayNumber = moment(this.lastDay).diff(
|
let dayNumber =
|
||||||
currentObj.startTime,
|
moment(this.lastDay).diff(currentObj.startTime, "days") + 1;
|
||||||
"days"
|
|
||||||
);
|
|
||||||
console.log("dayNumber", dayNumber);
|
console.log("dayNumber", dayNumber);
|
||||||
if (dayNumber > 0) {
|
if (dayNumber > 0) {
|
||||||
for (let i = 0; i < dayNumber; i++) {
|
for (let i = 0; i < dayNumber; i++) {
|
||||||
@ -4396,6 +4428,7 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.currentHoliday = dayNumber;
|
||||||
this.currentScroll = "item" + this.lastDay;
|
this.currentScroll = "item" + this.lastDay;
|
||||||
this.StatisticsDate = this.lastDay;
|
this.StatisticsDate = this.lastDay;
|
||||||
} else if (new Date(currentObj.endTime).getTime() < nowTime) {
|
} else if (new Date(currentObj.endTime).getTime() < nowTime) {
|
||||||
@ -4413,6 +4446,7 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.currentHoliday = dayNumber;
|
||||||
this.currentScroll = "item" + currentObj.endTime;
|
this.currentScroll = "item" + currentObj.endTime;
|
||||||
this.StatisticsDate = currentObj.endTime;
|
this.StatisticsDate = currentObj.endTime;
|
||||||
}
|
}
|
||||||
@ -5465,7 +5499,9 @@ export default {
|
|||||||
let time = this.currentScroll.split("item")[1];
|
let time = this.currentScroll.split("item")[1];
|
||||||
this.$util.toNextRoute(
|
this.$util.toNextRoute(
|
||||||
"navigateTo",
|
"navigateTo",
|
||||||
`/pages/nationalPage/rankPage?type=${type}&time=${time}&festivalType=${this.currentFestival.HolidayType}`
|
`/pages/nationalPage/rankPage?type=${type}&time=${time}&festivalObj=${JSON.stringify(
|
||||||
|
this.currentFestival
|
||||||
|
)}`
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
handleGoTest(type) {
|
handleGoTest(type) {
|
||||||
@ -5709,16 +5745,35 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 32rpx;
|
padding: 32rpx;
|
||||||
.festivalImg {
|
.newChangeBox {
|
||||||
width: 168rpx;
|
background: #fff;
|
||||||
height: 68rpx;
|
padding: 16rpx 16rpx 16rpx 32rpx;
|
||||||
|
border-radius: 32rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.festivalName {
|
||||||
|
margin: 0 16rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #160002;
|
||||||
|
line-height: 36rpx;
|
||||||
}
|
}
|
||||||
.changeIcon {
|
.changeIcon {
|
||||||
width: 32rpx;
|
width: 32rpx;
|
||||||
height: 32rpx;
|
height: 32rpx;
|
||||||
margin-left: 12rpx;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// .festivalImg {
|
||||||
|
// width: 168rpx;
|
||||||
|
// height: 68rpx;
|
||||||
|
// }
|
||||||
|
// .changeIcon {
|
||||||
|
// width: 32rpx;
|
||||||
|
// height: 32rpx;
|
||||||
|
// margin-left: 12rpx;
|
||||||
|
// }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.pageContent {
|
.pageContent {
|
||||||
|
|||||||
@ -51,7 +51,7 @@
|
|||||||
: ''
|
: ''
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
<div class="contentText" v-if="selectFestival === 1">
|
<div class="contentText" v-if="selectFestival === 2">
|
||||||
根据历史大数据显示:<br />
|
根据历史大数据显示:<br />
|
||||||
<div style="text-indent: 2rem; font-size: 24rpx">
|
<div style="text-indent: 2rem; font-size: 24rpx">
|
||||||
服务区会在春运前至农历小年夜前(<span class="red"
|
服务区会在春运前至农历小年夜前(<span class="red"
|
||||||
@ -70,13 +70,13 @@
|
|||||||
<div
|
<div
|
||||||
class="noticeBox"
|
class="noticeBox"
|
||||||
style="height: 500rpx"
|
style="height: 500rpx"
|
||||||
v-if="selectFestival === 3"
|
v-if="selectFestival === 4"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
:class="
|
:class="
|
||||||
selectFestival === 1 || selectFestival === 2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? 'boxBg springBox'
|
? 'boxBg springBox'
|
||||||
: selectFestival ===3
|
: selectFestival === 3
|
||||||
? 'boxBg qmBox'
|
? 'boxBg qmBox'
|
||||||
: selectFestival === 4
|
: selectFestival === 4
|
||||||
? 'boxBg labourBox'
|
? 'boxBg labourBox'
|
||||||
@ -99,7 +99,7 @@
|
|||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/imgDesc.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/imgDesc.png'
|
||||||
: selectFestival === 3
|
: selectFestival === 3
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/trendChart.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/trendChart.png'
|
||||||
: selectFestival ===4
|
: selectFestival === 4
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/larburTrendChart.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/larburTrendChart.png'
|
||||||
: selectFestival === 5
|
: selectFestival === 5
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/dragonBoatChart.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/dragonBoatChart.png'
|
||||||
@ -165,7 +165,7 @@
|
|||||||
:src="
|
:src="
|
||||||
selectFestival === 1 || selectFestival === 2
|
selectFestival === 1 || selectFestival === 2
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/allDataTitle.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/allDataTitle.png'
|
||||||
: selectFestival ===3
|
: selectFestival === 3
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmSumData.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmSumData.png'
|
||||||
: selectFestival === 4
|
: selectFestival === 4
|
||||||
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/labourAllData.png'
|
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/labourAllData.png'
|
||||||
@ -216,7 +216,7 @@
|
|||||||
? 'rightBox qmRightBox'
|
? 'rightBox qmRightBox'
|
||||||
: selectFestival === 4
|
: selectFestival === 4
|
||||||
? 'rightBox labourRightBox'
|
? 'rightBox labourRightBox'
|
||||||
: selectFestival ===5
|
: selectFestival === 5
|
||||||
? 'rightBox dragonBoatRightBox'
|
? 'rightBox dragonBoatRightBox'
|
||||||
: selectFestival === 6
|
: selectFestival === 6
|
||||||
? 'rightBox summerHolidayRightBox'
|
? 'rightBox summerHolidayRightBox'
|
||||||
@ -609,62 +609,7 @@ export default {
|
|||||||
let realCompareList = [];
|
let realCompareList = [];
|
||||||
|
|
||||||
if (dataObj && dataObj.compareList && dataObj.compareList.length > 0) {
|
if (dataObj && dataObj.compareList && dataObj.compareList.length > 0) {
|
||||||
// 根据字段 拿到开始结束时间 月日 因为年份不好添加 所以只能用月日 来筛选开始结束时间
|
dataObj.compareList.forEach((item) => {
|
||||||
console.log("type", typeof dataObj.compareHoliday);
|
|
||||||
let startIndex = 0;
|
|
||||||
let endIndex = 0;
|
|
||||||
if (dataObj.compareHoliday.indexOf("-") === -1) {
|
|
||||||
let midIndex = 0;
|
|
||||||
let time = dataObj.compareHoliday.replace(".", "/");
|
|
||||||
dataObj.compareList.forEach((item, index) => {
|
|
||||||
let date = new Date(item.name);
|
|
||||||
let dateM = date.getMonth() + 1;
|
|
||||||
if (dateM < 10) {
|
|
||||||
dateM = "0" + dateM;
|
|
||||||
}
|
|
||||||
let dateD = date.getDate();
|
|
||||||
if (dateD < 10) {
|
|
||||||
dateD = "0" + dateD;
|
|
||||||
}
|
|
||||||
let monthDay = `${dateM}/${dateD}`;
|
|
||||||
if (monthDay === time) {
|
|
||||||
midIndex = index;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
startIndex = midIndex - 1;
|
|
||||||
endIndex = midIndex + 1;
|
|
||||||
} else {
|
|
||||||
let [start, end] = dataObj.compareHoliday.split("-");
|
|
||||||
start = start.replace(".", "/");
|
|
||||||
end = end.replace(".", "/");
|
|
||||||
console.log("start", start);
|
|
||||||
console.log("end", end);
|
|
||||||
// 拿到开始结束时间的索引 因为年份不好添加 不好用开始结束时间去判断 所以直接用索引去取
|
|
||||||
|
|
||||||
dataObj.compareList.forEach((item, index) => {
|
|
||||||
let date = new Date(item.name);
|
|
||||||
let dateM = date.getMonth() + 1;
|
|
||||||
if (dateM < 10) {
|
|
||||||
dateM = "0" + dateM;
|
|
||||||
}
|
|
||||||
let dateD = date.getDate();
|
|
||||||
if (dateD < 10) {
|
|
||||||
dateD = "0" + dateD;
|
|
||||||
}
|
|
||||||
let monthDay = `${dateM}/${dateD}`;
|
|
||||||
if (monthDay === start) {
|
|
||||||
startIndex = index;
|
|
||||||
}
|
|
||||||
if (monthDay === end) {
|
|
||||||
endIndex = index;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 截取出来的实际数据数组
|
|
||||||
let list = dataObj.compareList.slice(startIndex, endIndex + 1);
|
|
||||||
if (list && list.length > 0) {
|
|
||||||
list.forEach((item) => {
|
|
||||||
realCompareList.push(Number(item.value));
|
realCompareList.push(Number(item.value));
|
||||||
compareList.push(Number(item.value) / 10000);
|
compareList.push(Number(item.value) / 10000);
|
||||||
const date = new Date(item.name);
|
const date = new Date(item.name);
|
||||||
@ -674,7 +619,72 @@ export default {
|
|||||||
item.easyDate = dateText;
|
item.easyDate = dateText;
|
||||||
compareDateList.push(moment(item.name).format("YYYY-MM-DD"));
|
compareDateList.push(moment(item.name).format("YYYY-MM-DD"));
|
||||||
});
|
});
|
||||||
}
|
// 根据字段 拿到开始结束时间 月日 因为年份不好添加 所以只能用月日 来筛选开始结束时间
|
||||||
|
console.log("type", typeof dataObj.compareHoliday);
|
||||||
|
let startIndex = 0;
|
||||||
|
let endIndex = 0;
|
||||||
|
// if (dataObj.compareHoliday.indexOf("-") === -1) {
|
||||||
|
// let midIndex = 0;
|
||||||
|
// let time = dataObj.compareHoliday.replace(".", "/");
|
||||||
|
// dataObj.compareList.forEach((item, index) => {
|
||||||
|
// let date = new Date(item.name);
|
||||||
|
// let dateM = date.getMonth() + 1;
|
||||||
|
// if (dateM < 10) {
|
||||||
|
// dateM = "0" + dateM;
|
||||||
|
// }
|
||||||
|
// let dateD = date.getDate();
|
||||||
|
// if (dateD < 10) {
|
||||||
|
// dateD = "0" + dateD;
|
||||||
|
// }
|
||||||
|
// let monthDay = `${dateM}/${dateD}`;
|
||||||
|
// if (monthDay === time) {
|
||||||
|
// midIndex = index;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// startIndex = midIndex - 1;
|
||||||
|
// endIndex = midIndex + 1;
|
||||||
|
// } else {
|
||||||
|
// let [start, end] = dataObj.compareHoliday.split("-");
|
||||||
|
// start = start.replace(".", "/");
|
||||||
|
// end = end.replace(".", "/");
|
||||||
|
// console.log("start", start);
|
||||||
|
// console.log("end", end);
|
||||||
|
// // 拿到开始结束时间的索引 因为年份不好添加 不好用开始结束时间去判断 所以直接用索引去取
|
||||||
|
|
||||||
|
// dataObj.compareList.forEach((item, index) => {
|
||||||
|
// let date = new Date(item.name);
|
||||||
|
// let dateM = date.getMonth() + 1;
|
||||||
|
// if (dateM < 10) {
|
||||||
|
// dateM = "0" + dateM;
|
||||||
|
// }
|
||||||
|
// let dateD = date.getDate();
|
||||||
|
// if (dateD < 10) {
|
||||||
|
// dateD = "0" + dateD;
|
||||||
|
// }
|
||||||
|
// let monthDay = `${dateM}/${dateD}`;
|
||||||
|
// if (monthDay === start) {
|
||||||
|
// startIndex = index;
|
||||||
|
// }
|
||||||
|
// if (monthDay === end) {
|
||||||
|
// endIndex = index;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // 截取出来的实际数据数组
|
||||||
|
// let list = dataObj.compareList.slice(startIndex, endIndex + 1);
|
||||||
|
// if (list && list.length > 0) {
|
||||||
|
// list.forEach((item) => {
|
||||||
|
// realCompareList.push(Number(item.value));
|
||||||
|
// compareList.push(Number(item.value) / 10000);
|
||||||
|
// const date = new Date(item.name);
|
||||||
|
// let m = date.getMonth() + 1;
|
||||||
|
// let d = date.getDate();
|
||||||
|
// let dateText = `${m}.${d}`;
|
||||||
|
// item.easyDate = dateText;
|
||||||
|
// compareDateList.push(moment(item.name).format("YYYY-MM-DD"));
|
||||||
|
// });
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
// 今年的具体日期
|
// 今年的具体日期
|
||||||
let curDateList = [];
|
let curDateList = [];
|
||||||
@ -686,56 +696,7 @@ export default {
|
|||||||
let startIndex = 0;
|
let startIndex = 0;
|
||||||
let endIndex = 0;
|
let endIndex = 0;
|
||||||
if (dataObj && dataObj.curList && dataObj.curList.length > 0) {
|
if (dataObj && dataObj.curList && dataObj.curList.length > 0) {
|
||||||
if (dataObj.curHoliday.indexOf("-") === -1) {
|
dataObj.curList.forEach((item) => {
|
||||||
let midIndex = 0;
|
|
||||||
let time = dataObj.curHoliday.replace(".", "/");
|
|
||||||
dataObj.curList.forEach((item, index) => {
|
|
||||||
let date = new Date(item.name);
|
|
||||||
let dateM = date.getMonth() + 1;
|
|
||||||
if (dateM < 10) {
|
|
||||||
dateM = "0" + dateM;
|
|
||||||
}
|
|
||||||
let dateD = date.getDate();
|
|
||||||
if (dateD < 10) {
|
|
||||||
dateD = "0" + dateD;
|
|
||||||
}
|
|
||||||
let monthDay = `${dateM}/${dateD}`;
|
|
||||||
if (monthDay === time) {
|
|
||||||
midIndex = index;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
startIndex = midIndex - 1;
|
|
||||||
endIndex = midIndex + 1;
|
|
||||||
} else {
|
|
||||||
// 根据字段 拿到开始结束时间 月日 因为年份不好添加 所以只能用月日 来筛选开始结束时间
|
|
||||||
let [start, end] = dataObj.curHoliday.split("-");
|
|
||||||
start = start.replace(".", "/");
|
|
||||||
end = end.replace(".", "/");
|
|
||||||
console.log("start", start);
|
|
||||||
console.log("end", end);
|
|
||||||
|
|
||||||
dataObj.curList.forEach((item, index) => {
|
|
||||||
let date = new Date(item.name);
|
|
||||||
let dateM = date.getMonth() + 1;
|
|
||||||
if (dateM < 10) {
|
|
||||||
dateM = "0" + dateM;
|
|
||||||
}
|
|
||||||
let dateD = date.getDate();
|
|
||||||
if (dateD < 10) {
|
|
||||||
dateD = "0" + dateD;
|
|
||||||
}
|
|
||||||
let monthDay = `${dateM}/${dateD}`;
|
|
||||||
if (monthDay === start) {
|
|
||||||
startIndex = index;
|
|
||||||
}
|
|
||||||
if (monthDay === end) {
|
|
||||||
endIndex = index;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// 截取出来的实际数据数组
|
|
||||||
let list = dataObj.curList.slice(startIndex, endIndex + 1);
|
|
||||||
if (list && list.length > 0) {
|
|
||||||
list.forEach((item) => {
|
|
||||||
realCurList.push(Number(item.value));
|
realCurList.push(Number(item.value));
|
||||||
curListList.push(Number(item.value) / 10000);
|
curListList.push(Number(item.value) / 10000);
|
||||||
const date = new Date(item.name);
|
const date = new Date(item.name);
|
||||||
@ -745,12 +706,73 @@ export default {
|
|||||||
item.easyDate = dateText;
|
item.easyDate = dateText;
|
||||||
curDateList.push(moment(item.name).format("YYYY-MM-DD"));
|
curDateList.push(moment(item.name).format("YYYY-MM-DD"));
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
console.log("startIndex", startIndex);
|
// if (dataObj.curHoliday.indexOf("-") === -1) {
|
||||||
console.log("endIndex", endIndex);
|
// let midIndex = 0;
|
||||||
console.log("list", list);
|
// let time = dataObj.curHoliday.replace(".", "/");
|
||||||
}
|
// dataObj.curList.forEach((item, index) => {
|
||||||
|
// let date = new Date(item.name);
|
||||||
|
// let dateM = date.getMonth() + 1;
|
||||||
|
// if (dateM < 10) {
|
||||||
|
// dateM = "0" + dateM;
|
||||||
|
// }
|
||||||
|
// let dateD = date.getDate();
|
||||||
|
// if (dateD < 10) {
|
||||||
|
// dateD = "0" + dateD;
|
||||||
|
// }
|
||||||
|
// let monthDay = `${dateM}/${dateD}`;
|
||||||
|
// if (monthDay === time) {
|
||||||
|
// midIndex = index;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// startIndex = midIndex - 1;
|
||||||
|
// endIndex = midIndex + 1;
|
||||||
|
// } else {
|
||||||
|
// // 根据字段 拿到开始结束时间 月日 因为年份不好添加 所以只能用月日 来筛选开始结束时间
|
||||||
|
// let [start, end] = dataObj.curHoliday.split("-");
|
||||||
|
// start = start.replace(".", "/");
|
||||||
|
// end = end.replace(".", "/");
|
||||||
|
// console.log("start", start);
|
||||||
|
// console.log("end", end);
|
||||||
|
|
||||||
|
// dataObj.curList.forEach((item, index) => {
|
||||||
|
// let date = new Date(item.name);
|
||||||
|
// let dateM = date.getMonth() + 1;
|
||||||
|
// if (dateM < 10) {
|
||||||
|
// dateM = "0" + dateM;
|
||||||
|
// }
|
||||||
|
// let dateD = date.getDate();
|
||||||
|
// if (dateD < 10) {
|
||||||
|
// dateD = "0" + dateD;
|
||||||
|
// }
|
||||||
|
// let monthDay = `${dateM}/${dateD}`;
|
||||||
|
// if (monthDay === start) {
|
||||||
|
// startIndex = index;
|
||||||
|
// }
|
||||||
|
// if (monthDay === end) {
|
||||||
|
// endIndex = index;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
|
// console.log("startIndex", startIndex);
|
||||||
|
// console.log("endIndex", endIndex);
|
||||||
|
// console.log("list", list);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // 截取出来的实际数据数组
|
||||||
|
// let list = dataObj.curList.slice(startIndex, endIndex + 1);
|
||||||
|
// if (list && list.length > 0) {
|
||||||
|
// list.forEach((item) => {
|
||||||
|
// realCurList.push(Number(item.value));
|
||||||
|
// curListList.push(Number(item.value) / 10000);
|
||||||
|
// const date = new Date(item.name);
|
||||||
|
// let m = date.getMonth() + 1;
|
||||||
|
// let d = date.getDate();
|
||||||
|
// let dateText = `${m}.${d}`;
|
||||||
|
// item.easyDate = dateText;
|
||||||
|
// curDateList.push(moment(item.name).format("YYYY-MM-DD"));
|
||||||
|
// });
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
console.log("compareDateMax", compareDateMax);
|
console.log("compareDateMax", compareDateMax);
|
||||||
console.log("compareDateList", compareDateList);
|
console.log("compareDateList", compareDateList);
|
||||||
@ -789,6 +811,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.res = normalData;
|
this.res = normalData;
|
||||||
|
this.res2 = normalData;
|
||||||
this.opts = {
|
this.opts = {
|
||||||
categories: normalData.categories,
|
categories: normalData.categories,
|
||||||
series: normalData.series,
|
series: normalData.series,
|
||||||
@ -840,7 +863,11 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
let phoneInfo = uni.getStorageSync("phoneInfo");
|
||||||
|
console.log("phoneInfo", phoneInfo);
|
||||||
this.opts2 = {
|
this.opts2 = {
|
||||||
|
width: phoneInfo.screenHeight + "px",
|
||||||
|
height: 2 * phoneInfo.screenWidth + "px",
|
||||||
categories: normalData.categories,
|
categories: normalData.categories,
|
||||||
series: normalData.series,
|
series: normalData.series,
|
||||||
animation: false,
|
animation: false,
|
||||||
@ -883,6 +910,8 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
console.log("this.opts2", this.opts2);
|
||||||
|
console.log("this.res2", this.res2);
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
return;
|
return;
|
||||||
// let dateList = [];
|
// let dateList = [];
|
||||||
@ -1213,8 +1242,8 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
let phoneInfo = uni.getStorageSync("phoneInfo");
|
// let phoneInfo = uni.getStorageSync("phoneInfo");
|
||||||
console.log("phoneInfo", phoneInfo);
|
// console.log("phoneInfo", phoneInfo);
|
||||||
let _this = this;
|
let _this = this;
|
||||||
this.opts2 = {
|
this.opts2 = {
|
||||||
// width:phoneInfo.screenHeight+'px',
|
// width:phoneInfo.screenHeight+'px',
|
||||||
@ -1266,6 +1295,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleShowAllScreen() {
|
handleShowAllScreen() {
|
||||||
this.allScreen = !this.allScreen;
|
this.allScreen = !this.allScreen;
|
||||||
|
console.log("this.allScreen", this.allScreen);
|
||||||
},
|
},
|
||||||
getSplitNumber(value) {
|
getSplitNumber(value) {
|
||||||
if (value === 0 || value < 5) {
|
if (value === 0 || value < 5) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user