| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- <template>
- <view class="content">
- <view class="header">
- <image src="/static/attract/u2043.png" alt="" class="header-image" />
- </view>
- <view class="attracts">
- <view class="activity-theme">活动主题</view>
- <view
- class="notice-content-box"
- v-for="(item, index) in attractList"
- :key="index"
- style="justify-content: start"
- @click="goAttractDeatil(item.id)"
- >
- <image
- :src="item.url"
- mode="aspectFit"
- style="width: 112rpx; height: 112rpx; margin-right: 20rpx"
- ></image>
- <view class="notice-content">
- <view class="notice-content-font">{{ item.title }}</view>
- <view class="attract-content">{{ item.subtitle }}</view>
- <view class="notice-content-time" style="margin-top: 20rpx">{{
- item.time
- }}</view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- attractList: [
- {
- url: "/static/attract/1.png",
- title: "工业互联网",
- subtitle: "工业互联网是全球工业系统与高级计算、分析、...",
- time: "2021-09-05",
- },
- {
- url: "/static/attract/2.png",
- title: "生产性服务业",
- subtitle: "生产性服务业是指为保持工业生产过程的连续性...",
- time: "2021-09-05",
- },
- ],
- };
- },
- methods: {
- goAttractDeatil(id) {
- uni.navigateTo({
- url: "/pages/attract/attract_deatil?id=" + id,
- });
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .content {
- box-sizing: border-box;
- display: flex;
- flex-direction: column;
- .header {
- .header-image {
- width: 100%;
- height: 350rpx;
- }
- }
- .attracts {
- display: flex;
- box-sizing: border-box;
- // justify-content: center;
- padding: 80rpx;
- padding-top: 30rpx;
- align-items: center;
- flex-direction: column;
- .activity-theme {
- font-size: 28rpx;
- font-weight: 600;
- border-left: 10rpx solid #02a7f0;
- padding-left: 20rpx;
- width: 100%;
- justify-items: start;
- }
- .notice-content-box {
- width: 100%;
- display: flex;
- padding: 30rpx;
- background-color: #ffffff;
- box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);
- border-radius: 32rpx;
- margin-top: 20rpx;
- justify-content: space-between;
- .notice-content-font {
- font-size: 26rpx;
- color: #0d1937;
- font-weight: 600;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .attract-content {
- color: #697594;
- font-weight: 600;
- font-size: 20rpx;
- margin-top: 8rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .notice-content-time {
- font-size: 18rpx;
- letter-spacing: 0.02em;
- color: #cfcfcf;
- margin-right: 14rpx;
- }
- }
- }
- }
- </style>
|