|
|
@@ -0,0 +1,74 @@
|
|
|
+<config>
|
|
|
+{
|
|
|
+'navigationBarTitleText': '',
|
|
|
+}
|
|
|
+</config>
|
|
|
+<template>
|
|
|
+ <div class="content">
|
|
|
+ <div class="title">
|
|
|
+ {{ info.articleKeyword }}
|
|
|
+ </div>
|
|
|
+ <div class="time">
|
|
|
+ {{ info.createTime }}
|
|
|
+ </div>
|
|
|
+ <rich-text :nodes="content" space="nbsp"></rich-text>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ info: '',
|
|
|
+ content: ''
|
|
|
+ };
|
|
|
+ },
|
|
|
+ onShow() {
|
|
|
+ this.$http.get(`https://www.jetour.com.cn/cmsapi/business/Article/get/${this.$mp.query.id}`).then(res => {
|
|
|
+ this.content = res.data.articleContent.replace(/<img /g, '<img class="rich-text-img"');
|
|
|
+ this.info = res.data;
|
|
|
+
|
|
|
+ wx.setNavigationBarTitle({
|
|
|
+ title: res.data.articleType == '1' ? '新闻详情' : '活动详情'
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less">
|
|
|
+.content {
|
|
|
+ padding: 30px;
|
|
|
+}
|
|
|
+rich-text {
|
|
|
+ width: 100%;
|
|
|
+ background: white;
|
|
|
+}
|
|
|
+.rich-text-img {
|
|
|
+ width: 100% !important;
|
|
|
+ height: auto;
|
|
|
+}
|
|
|
+.p1 {
|
|
|
+ font-size: 13px;
|
|
|
+ line-height: 24px;
|
|
|
+ padding: 10px 0;
|
|
|
+}
|
|
|
+
|
|
|
+.s1 {
|
|
|
+ font-weight: bold;
|
|
|
+}
|
|
|
+
|
|
|
+.title {
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: bold;
|
|
|
+ text-align: center;
|
|
|
+ padding-top: 20px;
|
|
|
+}
|
|
|
+
|
|
|
+.time {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #666;
|
|
|
+ text-align: center;
|
|
|
+ padding-bottom: 10px;
|
|
|
+ margin-top: 5px;
|
|
|
+}
|
|
|
+</style>
|