sy.vue 6.1 KB

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