diff --git a/pages/index/index.vue b/pages/index/index.vue index bc6c2ce..cc4cb2f 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -5,6 +5,20 @@ + + + @@ -1602,12 +1616,14 @@ export default { profitSharingList:[],// 分润占比旁边的list isShowFestival:'labour',// 显示的节日 oldSwiperIndex: 0,// 移动swiper 等待1秒钟 如果保持一致就请求 不一致就return + showAdvertisement: false,// 是否显示一开始的广告 + isShowCloseAnimal: false,// 是否显示关闭动画 } }, watch:{ user:{ // 新用户刚进来的时候可能onLoad会执行不了 监听他的user变化确保能请求 - handler:function (value){ + handler:async function (value){ let userInfo = uni.getStorageSync('vuex') userInfo = JSON.parse(userInfo) if (this.isReturn===true){ @@ -1663,6 +1679,7 @@ export default { this.getData(this.option) this.handleNoticeMonth() this.handleNoticeYear() + } } }, @@ -1695,10 +1712,19 @@ export default { ...mapGetters({'user':'getUser'}) }, onLoad(option){ - // if (new Date().getTime() > new Date('2024-04-04 00:00:00').getTime()){ - // this.isShowFestival = 'qm' - // } - const _this = this + if (new Date().getTime() < new Date('2024-05-03 00:00:00').getTime()){ + this.showAdvertisement = true + } + let _this = this + + + // setTimeout(()=>{ + // _this.showAdvertisement = false + // },6000) + + + + // setTimeout(()=>{ // _this.moneyRateList = [0,0] // },3000) @@ -1813,6 +1839,7 @@ export default { //问号显示的内容 月份的数据请求 和 年份的数据请求 this.handleNoticeMonth() this.handleNoticeYear() + // 如果十秒之后 isSuccess 没有变成true 说明接口有慢的或者报错了 才出现提示 setTimeout(()=>{ if (!this.isSuccess){ @@ -1844,6 +1871,10 @@ export default { if (!this.isReturn){ this.getData(this.option) this.currentMoney = 0 + if (new Date().getTime() < new Date('2024-05-03 00:00:00').getTime()){ + this.showAdvertisement = true + this.isShowCloseAnimal = false + } this.handleRealRevenue() } uni.stopPullDownRefresh(); @@ -1851,6 +1882,21 @@ export default { methods:{ numeral, ...mapActions(['memberLogin','getLoginCode']), + // 关闭广告 + handleClose(){ + this.isShowCloseAnimal = true + let _this = this + setTimeout(()=>{ + _this.showAdvertisement = false + },500) + }, + // 预览图片 + handlePreview(){ + uni.previewImage({ + current:'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/advertisement.jpg', + urls:['https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/advertisement.jpg'] + }) + }, // 显示悬浮框 handleShowMore(){ this.showMoreFixed = !this.showMoreFixed @@ -3002,7 +3048,12 @@ export default { uni.hideLoading() this.isSuccess = true this.stopSwiper = false - _this.$forceUpdate() + + + _this.$forceUpdate() + + + }, getDetail(obj) { let _this = this @@ -3187,6 +3238,73 @@ $iphoneHeight: env(safe-area-inset-bottom); } } } + + @keyframes moveAndShrink { + 0% { + transform: translateX(0) scale(1); + } + 50% { + transform: translate(5%,150px) scale(0.5); + } + 100% { + transform: translate(10%,300px) scale(0); + } + } + + .advertisement{ + width: 100vw; + height: 100vh; + position: fixed; + top: 0;left: 0; + background: rgba(7, 7, 7, 0.5); + z-index: 999998; + .advertisementNormalContent{ + height: 500px; + position: absolute; + top: 10vh;left: 50%; + transform: translateX(-50%); + background: #fff; + border-radius: 16px; + box-sizing: border-box; + padding: 16px; + display: flex; + flex-direction: column; + align-items: center; + .topImg{ + width: 200px; + height: 49px; + } + .adverImg{ + width: 200px; + height: 683px; + } + .text{ + font-size: 18px; + color: #7F020B; + display: inline-block; + white-space: nowrap; + } + } + .advertisementContent{ + animation: moveAndShrink 0.5s; + } + .closeBox{ + position: absolute; + top: calc(10vh + 510px);left: 50%; + transform: translateX(-50%); + width: 100%; + display: flex; + justify-content: center; + .closeIcon{ + width: 30px; + height: 30px; + } + } + } + + + + .header { width: 100%; background: linear-gradient(180deg, #DCE6FF 0%, #F3F4F9 100%); diff --git a/pages/nationalPage/merchantRevenue.vue b/pages/nationalPage/merchantRevenue.vue index db8c58a..70c6c1a 100644 --- a/pages/nationalPage/merchantRevenue.vue +++ b/pages/nationalPage/merchantRevenue.vue @@ -1,7 +1,7 @@