sy.vue 6.9 KB

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