提交 4a153b9a authored 作者: lihuihui's avatar lihuihui

update

上级 416b167e
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
</template> </template>
<script> <script>
import { getDocDetails } from '../api'
export default { export default {
props: { props: {
data: { type: Array } data: { type: Array }
...@@ -48,11 +49,18 @@ export default { ...@@ -48,11 +49,18 @@ export default {
this.$router.push({ path: '/list', query: { id: row.id } }) this.$router.push({ path: '/list', query: { id: row.id } })
}, },
goDetail(row) { goDetail(row) {
if (row.url === '') { getDocDetails({ id: row.id }).then(res => {
this.$router.push({ path: '/details', query: { id: row.id } }) if (res.data.content === '') {
} else { window.location.href = row.url
window.location.href = row.url } else {
} this.$router.push({ path: '/details', query: { id: row.id } })
}
})
// if (row.url === '') {
// this.$router.push({ path: '/details', query: { id: row.id } })
// } else {
// window.location.href = row.url
// }
} }
} }
} }
......
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
<div class="show_content_img" v-html="data.content"></div> <div class="show_content_img" v-html="data.content"></div>
</div> </div>
</div> </div>
<div class="main_content_footer" v-if="data.url != ''">
<div class="show_content_btn" @click="goPage">立即报名</div>
</div>
</div> </div>
</template> </template>
...@@ -22,6 +25,9 @@ export default { ...@@ -22,6 +25,9 @@ export default {
} }
}, },
methods: { methods: {
goPage() {
window.location.href = this.data.url
},
getDocDetails() { getDocDetails() {
getDocDetails({ id: this.$route.query.id }).then(res => { getDocDetails({ id: this.$route.query.id }).then(res => {
this.data = res.data this.data = res.data
...@@ -37,7 +43,7 @@ export default { ...@@ -37,7 +43,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.main { .main {
.main_content { .main_content {
padding: 1.2rem 0.32rem; padding: 1.2rem 0.32rem 1.6rem;
.show_content { .show_content {
.show_content_img { .show_content_img {
// width: 6.9rem; // width: 6.9rem;
...@@ -59,4 +65,27 @@ export default { ...@@ -59,4 +65,27 @@ export default {
// border-radius: 0.1rem; // border-radius: 0.1rem;
} }
} }
.main_content_footer {
width: 100%;
height: 1.6rem;
background: rgba(255, 255, 255, 0.5);
position: fixed;
bottom: 0;
left: 0;
.show_content_btn {
width: 6.54rem;
background: #2c4694;
border-radius: 0.44rem;
font-weight: 500;
color: #fff;
font-size: 0.3rem;
text-align: center;
line-height: 0.68rem;
position: fixed;
bottom: 0.4rem;
left: 50%;
transform: translate(-50%);
cursor: pointer;
}
}
</style> </style>
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
<div class="show_content_img" v-html="data.content"></div> <div class="show_content_img" v-html="data.content"></div>
</div> </div>
</div> </div>
<div class="main_content_footer" v-if="data.url != ''">
<div class="show_content_btn" @click="goPage">立即报名</div>
</div>
</div> </div>
</template> </template>
...@@ -22,9 +25,13 @@ export default { ...@@ -22,9 +25,13 @@ export default {
} }
}, },
methods: { methods: {
goPage() {
window.location.href = this.data.url
},
getDocDetails() { getDocDetails() {
getDocDetails({ id: this.$route.query.id }).then(res => { getDocDetails({ id: this.$route.query.id }).then(res => {
this.data = res.data this.data = res.data
console.log(this.data, 'data')
}) })
} }
}, },
...@@ -37,7 +44,7 @@ export default { ...@@ -37,7 +44,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.main { .main {
.main_content { .main_content {
padding: 1.2rem 0.32rem; padding: 1.2rem 0.32rem 1.6rem;
.show_content { .show_content {
.show_content_img { .show_content_img {
// width: 6.9rem; // width: 6.9rem;
...@@ -59,4 +66,27 @@ export default { ...@@ -59,4 +66,27 @@ export default {
// border-radius: 0.1rem; // border-radius: 0.1rem;
} }
} }
.main_content_footer {
width: 100%;
height: 1.6rem;
background: rgba(255, 255, 255, 0.5);
position: fixed;
bottom: 0;
left: 0;
.show_content_btn {
width: 6.54rem;
background: #2c4694;
border-radius: 0.44rem;
font-weight: 500;
color: #fff;
font-size: 0.3rem;
text-align: center;
line-height: 0.68rem;
position: fixed;
bottom: 0.4rem;
left: 50%;
transform: translate(-50%);
cursor: pointer;
}
}
</style> </style>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</template> </template>
<script> <script>
import { getList } from '../api' import { getList, getDocDetails } from '../api'
import Foot from '@/components/Foot.vue' import Foot from '@/components/Foot.vue'
export default { export default {
components: { components: {
...@@ -34,15 +34,25 @@ export default { ...@@ -34,15 +34,25 @@ export default {
}, },
methods: { methods: {
goPage(item) { goPage(item) {
if (item.url !== '') { getDocDetails({ id: item.id }).then(res => {
window.location.href = item.url if (res.data.content === '') {
} else { window.location.href = item.url
console.log(111) } else {
this.$router.push({ this.$router.push({
path: '/message/details', path: '/message/details',
query: { id: item.id } query: { id: item.id }
}) })
} }
})
// if (item.url !== '') {
// window.location.href = item.url
// } else {
// console.log(111)
// this.$router.push({
// path: '/message/details',
// query: { id: item.id }
// })
// }
} }
}, },
mounted() { mounted() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论