123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233 |
- <template>
- <div class="main_right_height">
- <div class="">
- <div class="">
- <TopDes :flag="true" topDesFont="健康常识"></TopDes>
- <!-- <el-row>
- <el-col :span="1"> </el-col>
- <el-col :span="22" class="navigation_card">
- <div style="display: flex">
- <i
- class="el-icon-arrow-left"
- style="cursor: pointer; line-height: 1.5"
- @click="goBack()"
- ></i>
- <span class="musicTitle">健康常识</span>
- </div>
- </el-col>
- <el-col :span="1"> </el-col>
- </el-row> -->
- <el-row>
- <el-col :span="1"> </el-col>
- <el-col :span="22">
- <el-col>
- <div
- class="flood-plan-page"
- ref="healthFlow"
- style="display: block; height: 80vh; margin-top: 10px"
- >
- <iframe :src="url" frameborder="0" width='100%' height='100%' scrolling='yes'></iframe>
- </div>
-
- <!-- <div v-html='content'></div> -->
- </el-col>
- </el-col>
- <el-col :span="1"> </el-col>
- </el-row>
- <el-row> </el-row>
- </div>
- </div>
- </div>
- </template>
- <script>
- import { session } from "electron";
- const fs = require("fs");
- export default {
- data() {
- return {
- url: "",
- content:''
- };
- },
- //页面初始化函数
- created() {},
- mounted() {
- this.$route.query.name;
- this.$route.query.currentUrl;
- this.url = this.$route.query.currentUrl + this.$route.query.name+'\\index.html';
- console.log(this.url);
- this.readFileContent();
- },
- methods: {
- readFileContent(){
- this.content= fs.readFileSync(this.url)
- },
- goBack() {
- this.$router.go(-1);
- },
- },
- };
- </script>
- <style scoped>
- .provinceClass >>> .el-input__inner {
- border-radius: 20px;
- border: 0px;
- background-color: #f4f4f4;
- }
- .wrap {
- width: 1280px;
- margin: 0 auto;
- }
- .cardList ul {
- display: flex;
- min-height: 562px;
- justify-content: flex-start;
- flex-wrap: wrap;
- }
- .cardList ul li {
- width: 180px;
- height: 221px;
- background: rgb(255, 255, 255);
- box-shadow: 0px 3px 6px rgb(87, 172, 187);
- border-radius: 4px;
- margin: 30px 35px;
- cursor: pointer;
- }
- @media screen and (max-width: 1024px) {
- .cardList ul li {
- margin: 30px 10px;
- }
- .wrap {
- width: 100%;
- margin: 0;
- }
- }
- .cardList ul li img {
- width: 180px;
- height: 112px;
- }
- .cardList ul li h2 {
- width: 142px;
- font-size: 18px;
- font-family: PingFang SC;
- font-weight: 500;
- line-height: 25px;
- color: #333333;
- margin-left: 9px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .cardList ul li p {
- font-size: 16px;
- color: #666666;
- }
- .cardList ul li .content {
- font-size: 12px;
- font-family: PingFang SC;
- font-weight: 400;
- line-height: 20px;
- color: #999999;
- margin-left: 9px;
- }
- .goDetail {
- margin: 5px 0 10px 9px;
- }
- .goDetail a {
- font-size: 14px;
- font-family: PingFang SC;
- font-weight: 400;
- line-height: 20px;
- color: #57acbb;
- }
- .pageNationBox {
- padding: 20px 10px;
- text-align: center;
- }
- .view-text {
- /**
- 思路:
- 1.设置inline-block属相
- 2.强制不换行
- 3.固定高度
- 4.隐藏超出部分
- 5.显示“……”
- */
- display: inline-block;
- word-break: keep-all;
- white-space: nowrap;
- width: 960px;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .imgSiz {
- width: 120px;
- height: 75px;
- margin-right: 15px;
- }
- .main_right_height {
- height: 100vh !important;
- display: block !important;
- overflow-y: auto !important;
- background: #fff;
- }
- .card {
- background: #fff;
- box-shadow: 0 3px 6px #57acbb;
- border-radius: 4px;
- display: block;
- margin-left: 20px;
- margin-right: 20px;
- margin-bottom: 80px;
- }
- .img_card {
- width: 100%;
- height: 100%;
- }
- .h3_card {
- font-size: 18px;
- font-family: PingFang SC;
- font-weight: 500;
- line-height: 20px;
- color: #333;
- margin-left: 9px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .time_card {
- font-size: 12px;
- font-family: PingFang SC;
- font-weight: 500;
- line-height: 15px;
- color: rgb(171, 168, 168);
- margin-left: 9px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .xl_input >>> .el-input__inner {
- border: 0;
- border-radius: 20px;
- background-color: #f4f4f4;
- }
- .search_card {
- margin-left: 20px;
- margin-bottom: 20px;
- }
- .navigation_card {
- margin-left: 20px;
- }
- </style>
|