sy.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  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. <!-- <video v-show="os!=='iOS'"
  61. class="myVideo"
  62. preload="auto"
  63. autoplay
  64. loop muted
  65. webkit-playsinline="true"
  66. playsinline="true"
  67. @loadstart="videoLoadStart"
  68. @canplaythrough="videoLoaded"
  69. poster="./images/cover.png"
  70. ref="videoEle"
  71. id="android"
  72. >
  73. <source :src="src" type="video/mp4">
  74. </video> -->
  75. <!-- <view class = 'theoryLearn' @click="onTheoryLearn()">理论学习</view>
  76. <view class = 'startExperiment' @click="onStartExperiment()">开始实验</view> -->
  77. </view>
  78. </view>
  79. </template>
  80. <script>
  81. export default {
  82. data() {
  83. return {
  84. showIndex: -1,
  85. src:'https://zhongchuan1.oss-cn-beijing.aliyuncs.com/Video/home.MP4?versionId=CAEQDxiBgIDmyO_o0BciIGExNjQ1ZmJkNTVkOTRlMWRhNGRkZjAxNTEzZTMxOTll',
  86. controls:false,
  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. }
  183. }
  184. </script>
  185. <style lang="scss">
  186. .homeBG {
  187. width: 100%;
  188. height: 100%;
  189. // background-image: url('../../assets/home/homeBG.jpg');
  190. }
  191. .homeBG img {
  192. // max-width: 100%;
  193. width: 100%;
  194. }
  195. .theoryLearn{
  196. position: absolute;
  197. left: 35%;
  198. bottom: 10%;
  199. width: 10%;
  200. height: 5%;
  201. display: flex;
  202. justify-content: center;
  203. align-items:center;
  204. background-color: #ff0000;
  205. color: #ffffff;
  206. border-radius: 15px 15px 15px 15px;
  207. }
  208. .startExperiment{
  209. position: absolute;
  210. right: 35%;
  211. bottom: 10%;
  212. width: 10%;
  213. height: 5%;
  214. display: flex;
  215. justify-content: center;
  216. align-items:center;
  217. background-color: #ff0000;
  218. color: #ffffff;
  219. border-radius: 15px 15px 15px 15px;
  220. }
  221. .sy-menu {
  222. // background-image: url('../../assets/home/homeBG.jpg');
  223. // background-repeat: no-repeat;
  224. // background-size: cover;
  225. // background-position: center;
  226. position: absolute;
  227. width: 100%;
  228. height: 100%;
  229. }
  230. .sy-menu-box {
  231. position: absolute;
  232. // background: #FFFFFF;
  233. }
  234. .sy-menu-text {
  235. color: #046093;
  236. }
  237. .menu-box1 {
  238. width: px2vw(350);
  239. height: px2vw(180);
  240. margin-left: px2vw(430);
  241. margin-top: px2vw(588);
  242. }
  243. .menu-text1 {
  244. font-size: px2vw(30);
  245. line-height: px2vw(40);
  246. margin-top: px2vw(40);
  247. }
  248. .menu-box2 {
  249. width: px2vw(350);
  250. height: px2vw(150);
  251. margin-left: px2vw(1150);
  252. margin-top: px2vw(588);
  253. }
  254. .menu-text2 {
  255. font-size: px2vw(26);
  256. line-height: px2vw(35);
  257. margin-top: px2vw(40);
  258. }
  259. .menu-box3 {
  260. width: px2vw(300);
  261. height: px2vw(80);
  262. margin-left: px2vw(600);
  263. margin-top: px2vw(450);
  264. }
  265. .menu-text3 {
  266. font-size: px2vw(20);
  267. line-height: px2vw(26);
  268. margin-top: px2vw(26);
  269. }
  270. .menu-box4 {
  271. width: px2vw(270);
  272. height: px2vw(80);
  273. margin-left: px2vw(1050);
  274. margin-top: px2vw(440);
  275. }
  276. .menu-text4 {
  277. font-size: px2vw(19);
  278. line-height: px2vw(25);
  279. margin-top: px2vw(25);
  280. }
  281. .sy-show-box {
  282. position: absolute;
  283. width: px2vw(361);
  284. height: px2vw(243);
  285. }
  286. .sy-show-content {
  287. position: absolute;
  288. width: px2vw(281);
  289. }
  290. .menu-show-title {
  291. margin-top: px2vw(23);
  292. font-size: px2vw(22);
  293. color: #EA252C;
  294. line-height: px2vw(29);
  295. }
  296. .menu-show-text {
  297. margin-top: px2vw(15);
  298. font-size: px2vw(16);
  299. color: #555555;
  300. line-height: px2vw(30);
  301. text-align: center;
  302. }
  303. .menu-show-btn {
  304. margin-top: px2vw(19);
  305. width: px2vw(183);
  306. height: px2vw(33);
  307. background: #EA252C;
  308. border-radius: px2vw(4);
  309. font-size: px2vw(16);
  310. color: #FFFFFF;
  311. line-height: px2vw(21);
  312. }
  313. .menu-show-btn-gray{
  314. margin-top: px2vw(19);
  315. width: px2vw(183);
  316. height: px2vw(33);
  317. background: #CCCCCC;
  318. border-radius: px2vw(4);
  319. font-size: px2vw(16);
  320. color: #FFFFFF;
  321. line-height: px2vw(21);
  322. }
  323. .menu-show-box1 {
  324. margin-left: px2vw(167);
  325. margin-top: px2vw(299);
  326. }
  327. .menu-show-box2 {
  328. margin-left: px2vw(1373);
  329. margin-top: px2vw(306);
  330. }
  331. .menu-show-box3 {
  332. margin-left: px2vw(670);
  333. margin-top: px2vw(171);
  334. }
  335. .menu-show-box4 {
  336. margin-left: px2vw(1144);
  337. margin-top: px2vw(171);
  338. }
  339. .myVideo{
  340. position: absolute;
  341. left: px2vw(770);
  342. top: px2vw(371);
  343. width: px2vw(360);
  344. height: px2vw(203);
  345. // display: flex;
  346. // justify-content: center;
  347. // align-items:center;
  348. // background-color: #ff0000;
  349. // color: #ffffff;
  350. // border-radius: 15px 15px 15px 15px;
  351. }
  352. </style>