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