sy.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421
  1. <template>
  2. <view class="myComRoot">
  3. <view class="df homeBG">
  4. <img src="../../assets/home/homeBG.jpg" />
  5. <view class='introVideo'>
  6. <video class="myVideo"
  7. :src="src">
  8. </video>
  9. <view class='videoControl'>
  10. <view :class="[bExperimentIntroSelected==1?'experimentIntro-selected':'experimentIntro-noselect']" @click="onClickExperimentIntro">实验简介视频</view>
  11. <view class='slice'> / </view>
  12. <view :class="[bteachingGuideSelected==1?'teachingGuide-selected':'teachingGuide-noselect']" @click="onClickTeachingGuide">教学引导视频</view>
  13. </view>
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. data() {
  21. return {
  22. showIndex: -1,
  23. src:'https://zhongchuan1.oss-cn-beijing.aliyuncs.com/Video/WebHome.mp4?Expires=1625227885&OSSAccessKeyId=TMP.3KiMMJBRriGg5tHahuqtbtCSdMLJXVFefqedqGyGqUGDZ7DWv42e53HVSuvhQV3hdzJka6B79tmibriJHfQMmHV59hFCn3&Signature=OdA2bzn%2B83zIt5Xedmmf0S8f%2FNg%3D&versionId=CAEQDxiBgMD7r9Sb0xciIDQwNDg2ODgzMzFlMjQ3ZTRhYWU1ZjNmNDUxZjI5ZDRk&response-content-type=application%2Foctet-stream',
  24. // controls:false,
  25. bExperimentIntroSelected:1,
  26. bteachingGuideSelected:0,
  27. menu: [{
  28. "title": '虚拟仿真资产库',
  29. "text": '科学实验,是指根据一定目的,运用一定的仪器、设备等物质手'
  30. },
  31. {
  32. "title": '虚拟仿真1号摄影棚',
  33. "text": '科学实验,是指根据一定目的,运用一定的仪器、设备等物质手'
  34. },
  35. {
  36. "title": '影视项目开发管理中心',
  37. "text": '科学实验,是指根据一定目的,运用一定的仪器、设备等物质手'
  38. },
  39. {
  40. "title": '虚拟仿真主题拍摄基地',
  41. "text": '科学实验,是指根据一定目的,运用一定的仪器、设备等物质手'
  42. },
  43. ]
  44. }
  45. },
  46. methods: {
  47. initData() {
  48. this.showIndex = -1;
  49. this.$forceUpdate()
  50. },
  51. onClick_menu(index) {
  52. if(!getApp().globalData.bLogin) {
  53. uni.showModal({
  54. title: '提示',
  55. showCancel: false,
  56. content: '请先点击右上角登录?',
  57. success: function(res) {
  58. if (res.confirm) {
  59. console.log('点击了确认')
  60. } else {
  61. console.log('点击了取消')
  62. }
  63. }
  64. })
  65. return
  66. };
  67. this.showIndex = index;
  68. },
  69. onClick_menu_btn(index) {
  70. if(!getApp().globalData.bLogin) {
  71. uni.showModal({
  72. title: '提示',
  73. showCancel: false,
  74. content: '请先点击右上角登录?',
  75. success: function(res) {
  76. if (res.confirm) {
  77. console.log('点击了确认')
  78. } else {
  79. console.log('点击了取消')
  80. }
  81. }
  82. })
  83. return
  84. };
  85. this.$emit("onClick_menu_btn", index);
  86. },
  87. onTheoryLearn(){
  88. if(!getApp().globalData.bLogin) {
  89. uni.showModal({
  90. title: '提示',
  91. showCancel: false,
  92. content: '请先点击右上角登录?',
  93. success: function(res) {
  94. if (res.confirm) {
  95. console.log('点击了确认')
  96. } else {
  97. console.log('点击了取消')
  98. }
  99. }
  100. })
  101. return
  102. };
  103. this.$emit("onTheoryLearnu_btn");
  104. },
  105. onStartExperiment(){
  106. if(!getApp().globalData.bLogin) {
  107. uni.showModal({
  108. title: '提示',
  109. content: '请先点击右上角登录?',
  110. success: function(res) {
  111. if (res.confirm) {
  112. console.log('点击了确认')
  113. } else {
  114. console.log('点击了取消')
  115. }
  116. }
  117. })
  118. return
  119. };
  120. this.$emit("onStartExperiment_btn");
  121. },
  122. onClickExperimentIntro(){
  123. this.bExperimentIntroSelected=1;
  124. this.bteachingGuideSelected=0;
  125. this.src='https://zhongchuan1.oss-cn-beijing.aliyuncs.com/Video/home.MP4?versionId=CAEQDxiBgIDmyO_o0BciIGExNjQ1ZmJkNTVkOTRlMWRhNGRkZjAxNTEzZTMxOTll';
  126. },
  127. onClickTeachingGuide(){
  128. this.bExperimentIntroSelected=0;
  129. this.bteachingGuideSelected=1;
  130. this.src='https://zhongchuan1.oss-cn-beijing.aliyuncs.com/Video/home.MP4?versionId=CAEQDxiBgIDmyO_o0BciIGExNjQ1ZmJkNTVkOTRlMWRhNGRkZjAxNTEzZTMxOTll';
  131. }
  132. }
  133. }
  134. </script>
  135. <style lang="scss">
  136. .homeBG {
  137. width: 100%;
  138. height: 100%;
  139. }
  140. .homeBG img {
  141. width: 100%;
  142. }
  143. .theoryLearn{
  144. position: absolute;
  145. left: 35%;
  146. bottom: 10%;
  147. width: 10%;
  148. height: 5%;
  149. display: flex;
  150. justify-content: center;
  151. align-items:center;
  152. background-color: #ff0000;
  153. color: #ffffff;
  154. border-radius: 15px 15px 15px 15px;
  155. }
  156. .startExperiment{
  157. position: absolute;
  158. right: 35%;
  159. bottom: 10%;
  160. width: 10%;
  161. height: 5%;
  162. display: flex;
  163. justify-content: center;
  164. align-items:center;
  165. background-color: #ff0000;
  166. color: #ffffff;
  167. border-radius: 15px 15px 15px 15px;
  168. }
  169. .sy-menu {
  170. position: absolute;
  171. width: 100%;
  172. height: 100%;
  173. }
  174. .sy-menu-box {
  175. position: absolute;
  176. }
  177. .sy-menu-text {
  178. color: #046093;
  179. }
  180. .menu-box1 {
  181. width: px2vw(350);
  182. height: px2vw(180);
  183. margin-left: px2vw(430);
  184. margin-top: px2vw(588);
  185. }
  186. .menu-text1 {
  187. font-size: px2vw(30);
  188. line-height: px2vw(40);
  189. margin-top: px2vw(40);
  190. }
  191. .menu-box2 {
  192. width: px2vw(350);
  193. height: px2vw(150);
  194. margin-left: px2vw(1150);
  195. margin-top: px2vw(588);
  196. }
  197. .menu-text2 {
  198. font-size: px2vw(26);
  199. line-height: px2vw(35);
  200. margin-top: px2vw(40);
  201. }
  202. .menu-box3 {
  203. width: px2vw(300);
  204. height: px2vw(80);
  205. margin-left: px2vw(600);
  206. margin-top: px2vw(450);
  207. }
  208. .menu-text3 {
  209. font-size: px2vw(20);
  210. line-height: px2vw(26);
  211. margin-top: px2vw(26);
  212. }
  213. .menu-box4 {
  214. width: px2vw(270);
  215. height: px2vw(80);
  216. margin-left: px2vw(1050);
  217. margin-top: px2vw(440);
  218. }
  219. .menu-text4 {
  220. font-size: px2vw(19);
  221. line-height: px2vw(25);
  222. margin-top: px2vw(25);
  223. }
  224. .sy-show-box {
  225. position: absolute;
  226. width: px2vw(361);
  227. height: px2vw(243);
  228. }
  229. .sy-show-content {
  230. position: absolute;
  231. width: px2vw(281);
  232. }
  233. .menu-show-title {
  234. margin-top: px2vw(23);
  235. font-size: px2vw(22);
  236. color: #EA252C;
  237. line-height: px2vw(29);
  238. }
  239. .menu-show-text {
  240. margin-top: px2vw(15);
  241. font-size: px2vw(16);
  242. color: #555555;
  243. line-height: px2vw(30);
  244. text-align: center;
  245. }
  246. .menu-show-btn {
  247. margin-top: px2vw(19);
  248. width: px2vw(183);
  249. height: px2vw(33);
  250. background: #EA252C;
  251. border-radius: px2vw(4);
  252. font-size: px2vw(16);
  253. color: #FFFFFF;
  254. line-height: px2vw(21);
  255. }
  256. .menu-show-btn-gray{
  257. margin-top: px2vw(19);
  258. width: px2vw(183);
  259. height: px2vw(33);
  260. background: #CCCCCC;
  261. border-radius: px2vw(4);
  262. font-size: px2vw(16);
  263. color: #FFFFFF;
  264. line-height: px2vw(21);
  265. }
  266. .menu-show-box1 {
  267. margin-left: px2vw(167);
  268. margin-top: px2vw(299);
  269. }
  270. .menu-show-box2 {
  271. margin-left: px2vw(1373);
  272. margin-top: px2vw(306);
  273. }
  274. .menu-show-box3 {
  275. margin-left: px2vw(670);
  276. margin-top: px2vw(171);
  277. }
  278. .menu-show-box4 {
  279. margin-left: px2vw(1144);
  280. margin-top: px2vw(171);
  281. }
  282. .introVideo{
  283. position: absolute;
  284. left: px2vw(24);
  285. top: px2vw(154);
  286. // width: px2vw(380);
  287. // height: px2vw(232);
  288. display: flex;
  289. justify-content: center;
  290. align-items:center;
  291. flex-direction: column;
  292. // border: 3rpx solid #D7D7D7;
  293. }
  294. .myVideo{
  295. width: px2vw(380);
  296. height: px2vw(232);
  297. }
  298. .videoControl{
  299. width: 100%;
  300. height: 100%;
  301. display: flex;
  302. justify-content: center;
  303. align-items:center;
  304. flex-direction: row;
  305. // border: 3rpx solid #D7D7D7;
  306. }
  307. .experimentIntro-selected{
  308. width: 100%;
  309. height: 100%;
  310. font-size: 30rpx;
  311. color: #ff0000;
  312. display: flex;
  313. justify-content: center;
  314. align-items:center;
  315. margin-left: 15%;
  316. // border: 3rpx solid #D7D7D7;
  317. }
  318. .experimentIntro-noselect{
  319. width: 100%;
  320. height: 100%;
  321. font-size: 30rpx;
  322. color: #c0c0c0;
  323. display: flex;
  324. justify-content: center;
  325. align-items:center;
  326. margin-left: 15%;
  327. // border: 3rpx solid #D7D7D7;
  328. }
  329. .slice{
  330. // width: 100%;
  331. height: 100%;
  332. font-size: 30rpx;
  333. color: #c0c0c0;
  334. display: flex;
  335. justify-content: center;
  336. align-items:center;
  337. // border: 3rpx solid #D7D7D7;
  338. }
  339. .teachingGuide-selected{
  340. width: 100%;
  341. height: 100%;
  342. font-size: 30rpx;
  343. color: #ff0000;
  344. display: flex;
  345. justify-content: center;
  346. align-items:center;
  347. margin-right: 15%;
  348. // border: 3rpx solid #D7D7D7;
  349. }
  350. .teachingGuide-noselect{
  351. width: 100%;
  352. height: 100%;
  353. font-size: 30rpx;
  354. color: #c0c0c0;
  355. display: flex;
  356. justify-content: center;
  357. align-items:center;
  358. margin-right: 15%;
  359. // border: 3rpx solid #D7D7D7;
  360. }
  361. </style>