syjj_second.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <template>
  2. <!-- 实验简介二级 -->
  3. <view class="myComRoot df jcc syjj-root">
  4. <view class="syjj-body" v-for="(page,pageI) in data_SYJJ" :key="pageI" v-show="checkedIndex_second==pageI">
  5. <!-- 标题 -->
  6. <view class="titleBox df fdr jcc" v-show="data_SYJJ[checkedIndex_second].page.length>1">
  7. <view v-for="(item,i) in data_SYJJ[checkedIndex_second].page" :key="i" @click="onTitleClick(i)" class="df fdc aic jcc title-item"
  8. :style="{color:checkedIndex_bodyTitle==i?checkedColor:unCheckedColor_text,
  9. borderColor:checkedIndex_bodyTitle==i?checkedColor:unCheckedColor_border,
  10. borderLeftStyle:checkedIndex_bodyTitle==i-1?'none':((i!=0&&checkedIndex_bodyTitle!=i)?'none':'solid'),
  11. borderRightStyle:checkedIndex_bodyTitle==i+1?'none':'solid'}">
  12. {{item.title}}
  13. </view>
  14. </view>
  15. <!-- 内容 -->
  16. <view class="df fdc">
  17. <view class="syjj-content" v-for="(content,contentI) in data_SYJJ[checkedIndex_second].page[checkedIndex_bodyTitle].content" :key="contentI">
  18. <!-- 文字 -->
  19. <view v-show="content.type=='text'">
  20. <text selectable="true"v-for="(text,textI) in content.textList" :key="textI" :class="'syjj-text-'+text.textType" v-show="text.textType!='link'">
  21. {{text.text}}
  22. </text>
  23. <!-- link -->
  24. <text selectable="true"v-for="(link,index) in content.textList" v-show="link.textType=='link'">
  25. <a :href="url" style="text-decoration:underline;color:blue">{{link.text}}</a>
  26. </text>
  27. </view>
  28. <!-- 图片 -->
  29. <view class="syjj-pic df jcc" v-show="content.type=='pic'">
  30. <img :src="content.src"></img>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. // import '../../assets/myData/mydata_SYJJ.js';
  39. export default {
  40. data() {
  41. return {
  42. url:'https://dl.google.com/tag/s/appguid%3D%7B8A69D345-D564-463C-AFF1-A69D9E530F96%7D%26iid%3D%7B7869C644-40DB-D051-55C1-EF1EA244A890%7D%26lang%3Dzh-CN%26browser%3D4%26usagestats%3D1%26appname%3DGoogle%2520Chrome%26needsadmin%3Dprefers%26ap%3Dx64-stable-statsdef_1%26installdataindex%3Dempty/update2/installers/ChromeSetup.exe',
  43. checkedIndex_second: 0, //二级页面选择、外部调用:如,评审账号、快速进入实验等
  44. checkedIndex_bodyTitle: 0, //正文小标题选择
  45. //以下为静态
  46. data_SYJJ: [
  47. myData_SYJJ_PSZH, //评审账号
  48. myData_SYJJ_KSJRSY, //快速进入实验
  49. myData_SYJJ_SYGS, //实验概述
  50. myData_SYJJ_SYHJYJSGJ, //使用环境与技术构架
  51. myData_SYJJ_XMJJSP //项目简介视频
  52. ],
  53. checkedColor: "#EA252C",
  54. unCheckedColor_text: "#0E0E0E",
  55. unCheckedColor_border: "#C4C4C4",
  56. }
  57. },
  58. methods: {
  59. // initData(){
  60. // this.checkedIndex_second=0;
  61. // this.checkedIndex_bodyTitle=0;
  62. // },
  63. onTitleClick(index) {
  64. this.checkedIndex_bodyTitle = index
  65. // console.log("***", this.data_SYJJ[this.checkedIndex_second][this.checkedIndex_bodyTitle].content.src.type);
  66. },
  67. showPage(pageIndex) {
  68. // console.log("切换页面", pageIndex);
  69. this.checkedIndex_second = pageIndex;
  70. this.checkedIndex_bodyTitle = 0;
  71. console.log('contentI=',this.data_SYJJ[this.checkedIndex_second].page[this.checkedIndex_bodyTitle].content)
  72. }
  73. }
  74. }
  75. </script>
  76. <style lang="scss">
  77. .syjj-root{
  78. background: #FFFFFF;
  79. box-shadow: 3px 0px 6px 0px rgba(0, 0, 0, 0.1);
  80. }
  81. .syjj-body {
  82. // width: px2vw(1789);
  83. width: px2vw(1150);
  84. margin-bottom: px2vw(63);
  85. }
  86. .titleBox {
  87. margin-top: px2vw(63);
  88. margin-bottom: px2vw(63);
  89. }
  90. .title-item {
  91. font-size: px2vw(20);
  92. padding: px2vw(15) px2vw(56) px2vw(15) px2vw(56);
  93. border: 1px solid;
  94. }
  95. .syjj-content{
  96. margin-top: px2vw(34);
  97. }
  98. .syjj-content text{
  99. font-size: px2vw(22);
  100. line-height: px2vw(46);
  101. }
  102. .syjj-text-nor{
  103. color: #020202;
  104. }
  105. .syjj-text-dif{
  106. color: #EA252C;
  107. }
  108. .syjj-text-dif2{
  109. color: #EA252C;
  110. font-weight: bold;
  111. }
  112. // .syjj-text-link{
  113. // color: #EA252C;
  114. // }
  115. .syjj-pic img {
  116. // max-width: 100%;
  117. width: px2vw(1000);
  118. }
  119. </style>