sy.vue 11 KB

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