From 5c52892f34b725c3f7fc2b4cc7e9a9ba68f26648 Mon Sep 17 00:00:00 2001 From: woody Date: Tue, 3 Jun 2025 13:47:45 +0800 Subject: [PATCH] =?UTF-8?q?feat(notice):=20=E9=A6=96=E9=A1=B5=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=85=AC=E5=91=8A=E8=BD=AE=E6=92=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/notice-styles-demo.vue | 535 +++++++++++++++++++++++++ components/slot-swiper-example.vue | 618 ----------------------------- pages.json | 7 - pages/index/index.vue | 211 +++++++++- pages/test-swiper.vue | 289 -------------- pages/test-ticket.vue | 95 ----- 6 files changed, 739 insertions(+), 1016 deletions(-) create mode 100644 components/notice-styles-demo.vue delete mode 100644 components/slot-swiper-example.vue delete mode 100644 pages/test-swiper.vue delete mode 100644 pages/test-ticket.vue diff --git a/components/notice-styles-demo.vue b/components/notice-styles-demo.vue new file mode 100644 index 0000000..f71eff9 --- /dev/null +++ b/components/notice-styles-demo.vue @@ -0,0 +1,535 @@ + + + + + diff --git a/components/slot-swiper-example.vue b/components/slot-swiper-example.vue deleted file mode 100644 index 7def49e..0000000 --- a/components/slot-swiper-example.vue +++ /dev/null @@ -1,618 +0,0 @@ - - - - - diff --git a/pages.json b/pages.json index a29608d..3ecc5fa 100644 --- a/pages.json +++ b/pages.json @@ -814,13 +814,6 @@ "style": { "navigationBarTitleText": "我的门票" } - }, - { - "path": "pages/test-ticket", - "style": { - "navigationBarTitleText": "门票模块测试", - "navigationBarBackgroundColor": "#fff" - } } ], "tabBar": { diff --git a/pages/index/index.vue b/pages/index/index.vue index 4ea7222..6786d3e 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -29,15 +29,19 @@ @@ -402,6 +406,7 @@ export default { this.getGoodsInfo() this.getAreaGoods() this.getBanners() + this.getNoticeList() // this.getLanguage(); this.getService() }, @@ -431,7 +436,14 @@ export default { }, getNoticeList() { ban.getNoticeList({ functionType: 1 }).then(res => { - this.noticeList = res.data + this.noticeList = res.rows || [] + }) + }, + goNotice(item) { + console.log(item, '....item') + return + uni.navigateTo({ + url: '/pages/notice/index?id=' + item.id, }) }, goAreaUrl() { @@ -894,7 +906,7 @@ header { // padding: 30rpx 0 0 0; text-align: center; width: 100%; - margin-bottom: 20rpx; + margin-bottom: 10rpx; } .changeLanguages { @@ -1007,4 +1019,189 @@ page { opacity: 0.5; z-index: 1; } + +// 简洁实用的公告样式 +.notice-wrapper { + margin-bottom: 20rpx; + // border-radius: 12rpx; + overflow: hidden; + background: #fff; + box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08); + border: 1rpx solid #f0f0f0; +} + +.clean-notice-item { + display: flex; + padding: 16rpx 20rpx; + background: #fff; + margin: 0; + height: calc(100% - 32rpx); + width: 100%; + align-items: center; + .notice-icon { + margin-right: 16rpx; + flex-shrink: 0; + } + + .notice-content { + flex: 1; + display: flex; + justify-content: space-between; + .notice-text { + color: #333; + font-size: 26rpx; + font-weight: 500; + line-height: 1.5; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; + word-break: break-word; + } + + .notice-time { + color: #999; + font-size: 22rpx; + margin-top: 8rpx; + display: block; + } + } + + .notice-arrow { + color: #ccc; + font-size: 32rpx; + margin-left: 16rpx; + margin-top: 8rpx; + flex-shrink: 0; + } +} + +.index-left { + font-weight: bold; + + .english { + font-size: 24rpx; + color: #333; + } + + .text { + font-size: 30rpx; + color: #333; + margin-top: 2rpx; + letter-spacing: 16rpx; + } +} + +.index-top { + // background: url('~@/static/images/tBgd.jpg') no-repeat; + background-size: 100% 100%; + // padding: 30rpx 20rpx; // height: 100rpx; + background-color: #fff; + display: flex; + justify-content: space-between; + position: fixed; + z-index: 10; + width: 100%; + height: 20rpx; + .index_t { + padding: 30rpx 20rpx; + } +} +.index-top1 { + background: url('~@/static/images/tBgd.jpg') no-repeat; + background-size: 100% 100%; + // padding: 30rpx 20rpx; // height: 100rpx; + // background-color: #fff; + display: flex; + justify-content: space-between; + position: fixed; + z-index: 10; + width: 100%; + height: 100%; + .index_t { + padding: 30rpx 20rpx; + } +} + +.index-right { + display: flex; +} + +.kf_A { + position: fixed; + background: rgba(256, 256, 256, 0.8); + width: 62px; + // height: 60px; + z-index: 10; + right: 40rpx; + top: 11%; + border-radius: 10px; + text-align: center; + padding: 20rpx 0; +} + +.kf { + image { + width: 48rpx; + height: 48rpx; + margin-bottom: 10rpx; + } + + font-size: 10px; + color: #333333; +} +.fly { + position: absolute; + width: 100%; + height: 100%; + top: 0; + background: #eee; + opacity: 0.5; + z-index: 1; +} + +// 动画定义 +@keyframes pulse { + 0% { + transform: scale(1); + opacity: 0.7; + } + 50% { + transform: scale(1.1); + opacity: 0.3; + } + 100% { + transform: scale(1); + opacity: 0.7; + } +} + +@keyframes arrow-bounce { + 0%, + 100% { + transform: translateX(0); + } + 50% { + transform: translateX(6rpx); + } +} + +@keyframes dot-fade { + 0%, + 100% { + opacity: 0.4; + } + 50% { + opacity: 1; + } +} + +@keyframes rotate { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} diff --git a/pages/test-swiper.vue b/pages/test-swiper.vue deleted file mode 100644 index ab4abb9..0000000 --- a/pages/test-swiper.vue +++ /dev/null @@ -1,289 +0,0 @@ - - - - - diff --git a/pages/test-ticket.vue b/pages/test-ticket.vue deleted file mode 100644 index a3373b7..0000000 --- a/pages/test-ticket.vue +++ /dev/null @@ -1,95 +0,0 @@ - - - - - -