syjj_second.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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. <!-- <uni-link href="link.text" text="下载" :showUnderLine="true" style="text-decoration:underline;color:blue"></uni-link> -->
  26. <!-- <a :href="url" style="text-decoration:underline;color:blue">{{link.text}}</a> -->
  27. <a :href="link.text" style="text-decoration:underline;color:blue">下载</a>
  28. </text>
  29. </view>
  30. <!-- 图片 -->
  31. <view class="syjj-pic df jcc" v-show="content.type=='pic'">
  32. <img :src="content.src"></img>
  33. </view>
  34. </view>
  35. </view>
  36. <view class='videoControl' v-show="checkedIndex_second==4">
  37. <video class='aVideo' :src="videoLink"></video>
  38. </view>
  39. </view>
  40. </view>
  41. </template>
  42. <script>
  43. // import '../../assets/myData/mydata_SYJJ.js';
  44. export default {
  45. data() {
  46. return {
  47. videoLink:'https://zhongchuan1.oss-cn-beijing.aliyuncs.com/Video/项目简介视频.mp4?versionId=CAEQDxiBgICV.9qf1hciIGU4MDVlNDk4YjY0NDQyZGRhOTVjMzg3YmNmZTdkY2M2',
  48. 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',
  49. checkedIndex_second: 0, //二级页面选择、外部调用:如,评审账号、快速进入实验等
  50. checkedIndex_bodyTitle: 0, //正文小标题选择
  51. //以下为静态
  52. data_SYJJ: [
  53. myData_SYJJ_PSZH, //评审账号
  54. myData_SYJJ_KSJRSY, //快速进入实验
  55. myData_SYJJ_SYGS, //实验概述
  56. myData_SYJJ_SYHJYJSGJ, //使用环境与技术构架
  57. myData_SYJJ_XMJJSP //项目简介视频
  58. ],
  59. checkedColor: "#EA252C",
  60. unCheckedColor_text: "#0E0E0E",
  61. unCheckedColor_border: "#C4C4C4",
  62. }
  63. },
  64. methods: {
  65. // initData(){
  66. // this.checkedIndex_second=0;
  67. // this.checkedIndex_bodyTitle=0;
  68. // },
  69. onTitleClick(index) {
  70. this.checkedIndex_bodyTitle = index;
  71. // console.log("***", this.data_SYJJ[this.checkedIndex_second][this.checkedIndex_bodyTitle].content.src.type);
  72. },
  73. showPage(pageIndex) {
  74. // console.log("切换页面", pageIndex);
  75. this.checkedIndex_second = pageIndex;
  76. this.checkedIndex_bodyTitle = 0;
  77. console.log('contentI=',this.data_SYJJ[this.checkedIndex_second].page[this.checkedIndex_bodyTitle].content)
  78. }
  79. }
  80. }
  81. </script>
  82. <style lang="scss">
  83. .syjj-root{
  84. background: #FFFFFF;
  85. box-shadow: 3px 0px 6px 0px rgba(0, 0, 0, 0.1);
  86. }
  87. .syjj-body {
  88. // width: px2vw(1789);
  89. width: px2vw(1150);
  90. margin-bottom: px2vw(63);
  91. }
  92. .titleBox {
  93. margin-top: px2vw(63);
  94. margin-bottom: px2vw(63);
  95. }
  96. .title-item {
  97. font-size: px2vw(20);
  98. padding: px2vw(15) px2vw(56) px2vw(15) px2vw(56);
  99. border: 1px solid;
  100. }
  101. .syjj-content{
  102. margin-top: px2vw(34);
  103. }
  104. .syjj-content text{
  105. font-size: px2vw(22);
  106. line-height: px2vw(46);
  107. }
  108. .syjj-text-nor{
  109. color: #020202;
  110. }
  111. .syjj-text-dif{
  112. color: #EA252C;
  113. }
  114. .syjj-text-dif2{
  115. color: #EA252C;
  116. font-weight: bold;
  117. }
  118. // .syjj-text-link{
  119. // color: #EA252C;
  120. // }
  121. .syjj-pic img {
  122. // max-width: 100%;
  123. width: px2vw(1000);
  124. }
  125. .videoControl{
  126. width: 100%;
  127. height: 100%;
  128. display: flex;
  129. justify-content: center;
  130. align-items:center;
  131. flex-direction: row;
  132. border: 3rpx solid #D7D7D7;
  133. }
  134. .aVideo
  135. {
  136. width: 100%;
  137. height: 100%;
  138. }
  139. </style>