sy.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  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" src="https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/%E7%AC%AC1%E8%AE%B2%EF%BC%88uni-app%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D%EF%BC%89-%20DCloud%E5%AE%98%E6%96%B9%E8%A7%86%E9%A2%91%E6%95%99%E7%A8%8B@20200317.mp4"
  54. @error="videoErrorCallback" :danmu-list="danmuList" enable-danmu danmu-btn controls>
  55. </video>
  56. <!-- <view class = 'theoryLearn' @click="onTheoryLearn()">理论学习</view>
  57. <view class = 'startExperiment' @click="onStartExperiment()">开始实验</view> -->
  58. </view>
  59. </view>
  60. </template>
  61. <script>
  62. export default {
  63. data() {
  64. return {
  65. showIndex: -1,
  66. menu: [{
  67. "title": '虚拟仿真资产库',
  68. "text": '科学实验,是指根据一定目的,运用一定的仪器、设备等物质手'
  69. },
  70. {
  71. "title": '虚拟仿真1号摄影棚',
  72. "text": '科学实验,是指根据一定目的,运用一定的仪器、设备等物质手'
  73. },
  74. {
  75. "title": '影视项目开发管理中心',
  76. "text": '科学实验,是指根据一定目的,运用一定的仪器、设备等物质手'
  77. },
  78. {
  79. "title": '虚拟仿真主题拍摄基地',
  80. "text": '科学实验,是指根据一定目的,运用一定的仪器、设备等物质手'
  81. },
  82. ]
  83. }
  84. },
  85. methods: {
  86. initData() {
  87. this.showIndex = -1;
  88. this.$forceUpdate()
  89. },
  90. onClick_menu(index) {
  91. if(!getApp().globalData.bLogin) {
  92. alert('请先登录')
  93. return
  94. };
  95. this.showIndex = index;
  96. },
  97. onClick_menu_btn(index) {
  98. if(!getApp().globalData.bLogin) {
  99. alert('请先登录')
  100. return
  101. };
  102. this.$emit("onClick_menu_btn", index);
  103. },
  104. onTheoryLearn(){
  105. if(!getApp().globalData.bLogin) {
  106. alert('请先登录')
  107. return
  108. };
  109. this.$emit("onTheoryLearnu_btn");
  110. },
  111. onStartExperiment(){
  112. if(!getApp().globalData.bLogin) {
  113. alert('请先登录')
  114. return
  115. };
  116. this.$emit("onStartExperiment_btn");
  117. }
  118. }
  119. }
  120. </script>
  121. <style lang="scss">
  122. .homeBG {
  123. width: 100%;
  124. height: 100%;
  125. // background-image: url('../../assets/home/homeBG.jpg');
  126. }
  127. .homeBG img {
  128. // max-width: 100%;
  129. width: 100%;
  130. }
  131. .theoryLearn{
  132. position: absolute;
  133. left: 35%;
  134. bottom: 10%;
  135. width: 10%;
  136. height: 5%;
  137. display: flex;
  138. justify-content: center;
  139. align-items:center;
  140. background-color: #ff0000;
  141. color: #ffffff;
  142. border-radius: 15px 15px 15px 15px;
  143. }
  144. .startExperiment{
  145. position: absolute;
  146. right: 35%;
  147. bottom: 10%;
  148. width: 10%;
  149. height: 5%;
  150. display: flex;
  151. justify-content: center;
  152. align-items:center;
  153. background-color: #ff0000;
  154. color: #ffffff;
  155. border-radius: 15px 15px 15px 15px;
  156. }
  157. .sy-menu {
  158. // background-image: url('../../assets/home/homeBG.jpg');
  159. // background-repeat: no-repeat;
  160. // background-size: cover;
  161. // background-position: center;
  162. position: absolute;
  163. width: 100%;
  164. height: 100%;
  165. }
  166. .sy-menu-box {
  167. position: absolute;
  168. // background: #FFFFFF;
  169. }
  170. .sy-menu-text {
  171. color: #046093;
  172. }
  173. .menu-box1 {
  174. width: px2vw(350);
  175. height: px2vw(180);
  176. margin-left: px2vw(430);
  177. margin-top: px2vw(588);
  178. }
  179. .menu-text1 {
  180. font-size: px2vw(30);
  181. line-height: px2vw(40);
  182. margin-top: px2vw(40);
  183. }
  184. .menu-box2 {
  185. width: px2vw(350);
  186. height: px2vw(150);
  187. margin-left: px2vw(1150);
  188. margin-top: px2vw(588);
  189. }
  190. .menu-text2 {
  191. font-size: px2vw(26);
  192. line-height: px2vw(35);
  193. margin-top: px2vw(40);
  194. }
  195. .menu-box3 {
  196. width: px2vw(300);
  197. height: px2vw(80);
  198. margin-left: px2vw(600);
  199. margin-top: px2vw(450);
  200. }
  201. .menu-text3 {
  202. font-size: px2vw(20);
  203. line-height: px2vw(26);
  204. margin-top: px2vw(26);
  205. }
  206. .menu-box4 {
  207. width: px2vw(270);
  208. height: px2vw(80);
  209. margin-left: px2vw(1050);
  210. margin-top: px2vw(440);
  211. }
  212. .menu-text4 {
  213. font-size: px2vw(19);
  214. line-height: px2vw(25);
  215. margin-top: px2vw(25);
  216. }
  217. .sy-show-box {
  218. position: absolute;
  219. width: px2vw(361);
  220. height: px2vw(243);
  221. }
  222. .sy-show-content {
  223. position: absolute;
  224. width: px2vw(281);
  225. }
  226. .menu-show-title {
  227. margin-top: px2vw(23);
  228. font-size: px2vw(22);
  229. color: #EA252C;
  230. line-height: px2vw(29);
  231. }
  232. .menu-show-text {
  233. margin-top: px2vw(15);
  234. font-size: px2vw(16);
  235. color: #555555;
  236. line-height: px2vw(30);
  237. text-align: center;
  238. }
  239. .menu-show-btn {
  240. margin-top: px2vw(19);
  241. width: px2vw(183);
  242. height: px2vw(33);
  243. background: #EA252C;
  244. border-radius: px2vw(4);
  245. font-size: px2vw(16);
  246. color: #FFFFFF;
  247. line-height: px2vw(21);
  248. }
  249. .menu-show-btn-gray{
  250. margin-top: px2vw(19);
  251. width: px2vw(183);
  252. height: px2vw(33);
  253. background: #CCCCCC;
  254. border-radius: px2vw(4);
  255. font-size: px2vw(16);
  256. color: #FFFFFF;
  257. line-height: px2vw(21);
  258. }
  259. .menu-show-box1 {
  260. margin-left: px2vw(167);
  261. margin-top: px2vw(299);
  262. }
  263. .menu-show-box2 {
  264. margin-left: px2vw(1373);
  265. margin-top: px2vw(306);
  266. }
  267. .menu-show-box3 {
  268. margin-left: px2vw(670);
  269. margin-top: px2vw(171);
  270. }
  271. .menu-show-box4 {
  272. margin-left: px2vw(1144);
  273. margin-top: px2vw(171);
  274. }
  275. .myVideo{
  276. position: absolute;
  277. left: px2vw(770);
  278. top: px2vw(371);
  279. // width: px2vw(361);
  280. // height: px2vw(143);
  281. // display: flex;
  282. // justify-content: center;
  283. // align-items:center;
  284. // background-color: #ff0000;
  285. // color: #ffffff;
  286. // border-radius: 15px 15px 15px 15px;
  287. }
  288. </style>