完成公告
This commit is contained in:
parent
5e3d0bccfd
commit
a01d2aebeb
|
@ -20,7 +20,7 @@
|
|||
interval="3000"
|
||||
duration="1000"
|
||||
>
|
||||
<swiper-item v-for="(item, index) in notifyList" :key="index">
|
||||
<swiper-item v-for="(item, index) in notifyList" :key="index" @click="notifyDetail(item)">
|
||||
<view class="swiper-item notify-item">
|
||||
<text class="limit-line clamp-1">
|
||||
{{ item.title }}
|
||||
|
@ -75,6 +75,11 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<widget-modal v-show="showNotifyModal" @close="showNotifyModal = false" :title="notify.title">
|
||||
<view class="message-box">
|
||||
<rich-text :nodes="notify.content"></rich-text>
|
||||
</view>
|
||||
</widget-modal>
|
||||
</app-layout>
|
||||
</template>
|
||||
|
||||
|
@ -82,6 +87,7 @@
|
|||
import AppLayout from "@/components/layout/layout";
|
||||
import AppBanner from "@/components/banner/banner";
|
||||
import WidgetSearch from "@/components/widgets/search";
|
||||
import WidgetModal from "@/components/widgets/modal";
|
||||
export default {
|
||||
name: "index",
|
||||
data() {
|
||||
|
@ -89,6 +95,11 @@ export default {
|
|||
utils: this.$utils,
|
||||
bannerList: [],
|
||||
notifyList: [],
|
||||
showNotifyModal: false,
|
||||
notify: {
|
||||
title: "",
|
||||
content: "",
|
||||
},
|
||||
installServiceList: [],
|
||||
aftermarketServiceList: [],
|
||||
bussinessServiceList: [
|
||||
|
@ -111,6 +122,7 @@ export default {
|
|||
AppLayout,
|
||||
AppBanner,
|
||||
WidgetSearch,
|
||||
WidgetModal,
|
||||
},
|
||||
onLoad() {
|
||||
// 轮播
|
||||
|
@ -129,6 +141,7 @@ export default {
|
|||
this.notifyList.push({
|
||||
id: item.id,
|
||||
title: item.title,
|
||||
content: item.message,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -149,6 +162,11 @@ export default {
|
|||
this.$store.commit("system/indexCateId", id);
|
||||
this.$utils.toPage("/pages/service/cate", {}, "switch");
|
||||
},
|
||||
notifyDetail(detail) {
|
||||
this.showNotifyModal = true;
|
||||
this.notify.title = detail.title;
|
||||
this.notify.content = detail.content;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -193,4 +211,8 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
.message-box {
|
||||
max-height: 400rpx;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue