sy.vue 9.5 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. <!-- controls="{{false}}" -->
  54. <video class="myVideo"
  55. :src="src"
  56. :controls="controls"
  57. preload="auto"
  58. autoplay
  59. loop muted>
  60. </video>
  61. <!-- <video v-show="os!=='iOS'"
  62. class="myVideo"
  63. preload="auto"
  64. autoplay
  65. loop muted
  66. webkit-playsinline="true"
  67. playsinline="true"
  68. @loadstart="videoLoadStart"
  69. @canplaythrough="videoLoaded"
  70. poster="./images/cover.png"
  71. ref="videoEle"
  72. id="android"
  73. >
  74. <source :src="src" type="video/mp4">
  75. </video> -->
  76. <!-- <view class = 'theoryLearn' @click="onTheoryLearn()">理论学习</view>
  77. <view class = 'startExperiment' @click="onStartExperiment()">开始实验</view> -->
  78. </view>
  79. </view>
  80. </template>
  81. <script>
  82. export default {
  83. data() {
  84. return {
  85. showIndex: -1,
  86. src:'https://zhongchuan1.oss-cn-beijing.aliyuncs.com/Video/home.MP4?Expires=1623941426&OSSAccessKeyId=TMP.3KfofQDcTSN872xnqTfavvRpfHDZskzYZaTN3RG8rHBboCaYW5Mo28TFeDo1GaJLtVjvEk6wA2zyo2kGiL8BtdKmhJLSb7&Signature=ZtisB%2Fpuzozl6r%2BHlbNXgcYMsqk%3D&versionId=CAEQDxiBgIDmyO_o0BciIGExNjQ1ZmJkNTVkOTRlMWRhNGRkZjAxNTEzZTMxOTll&response-content-type=application%2Foctet-stream',
  87. controls:false,
  88. menu: [{
  89. "title": '虚拟仿真资产库',
  90. "text": '科学实验,是指根据一定目的,运用一定的仪器、设备等物质手'
  91. },
  92. {
  93. "title": '虚拟仿真1号摄影棚',
  94. "text": '科学实验,是指根据一定目的,运用一定的仪器、设备等物质手'
  95. },
  96. {
  97. "title": '影视项目开发管理中心',
  98. "text": '科学实验,是指根据一定目的,运用一定的仪器、设备等物质手'
  99. },
  100. {
  101. "title": '虚拟仿真主题拍摄基地',
  102. "text": '科学实验,是指根据一定目的,运用一定的仪器、设备等物质手'
  103. },
  104. ]
  105. }
  106. },
  107. methods: {
  108. initData() {
  109. this.showIndex = -1;
  110. this.$forceUpdate()
  111. },
  112. onClick_menu(index) {
  113. if(!getApp().globalData.bLogin) {
  114. uni.showModal({
  115. title: '提示',
  116. showCancel: false,
  117. content: '请先点击右上角登录?',
  118. success: function(res) {
  119. if (res.confirm) {
  120. console.log('点击了确认')
  121. } else {
  122. console.log('点击了取消')
  123. }
  124. }
  125. })
  126. return
  127. };
  128. this.showIndex = index;
  129. },
  130. onClick_menu_btn(index) {
  131. if(!getApp().globalData.bLogin) {
  132. uni.showModal({
  133. title: '提示',
  134. showCancel: false,
  135. content: '请先点击右上角登录?',
  136. success: function(res) {
  137. if (res.confirm) {
  138. console.log('点击了确认')
  139. } else {
  140. console.log('点击了取消')
  141. }
  142. }
  143. })
  144. return
  145. };
  146. this.$emit("onClick_menu_btn", index);
  147. },
  148. onTheoryLearn(){
  149. if(!getApp().globalData.bLogin) {
  150. uni.showModal({
  151. title: '提示',
  152. showCancel: false,
  153. content: '请先点击右上角登录?',
  154. success: function(res) {
  155. if (res.confirm) {
  156. console.log('点击了确认')
  157. } else {
  158. console.log('点击了取消')
  159. }
  160. }
  161. })
  162. return
  163. };
  164. this.$emit("onTheoryLearnu_btn");
  165. },
  166. onStartExperiment(){
  167. if(!getApp().globalData.bLogin) {
  168. uni.showModal({
  169. title: '提示',
  170. content: '请先点击右上角登录?',
  171. success: function(res) {
  172. if (res.confirm) {
  173. console.log('点击了确认')
  174. } else {
  175. console.log('点击了取消')
  176. }
  177. }
  178. })
  179. return
  180. };
  181. this.$emit("onStartExperiment_btn");
  182. }
  183. }
  184. }
  185. </script>
  186. <style lang="scss">
  187. .homeBG {
  188. width: 100%;
  189. height: 100%;
  190. // background-image: url('../../assets/home/homeBG.jpg');
  191. }
  192. .homeBG img {
  193. // max-width: 100%;
  194. width: 100%;
  195. }
  196. .theoryLearn{
  197. position: absolute;
  198. left: 35%;
  199. bottom: 10%;
  200. width: 10%;
  201. height: 5%;
  202. display: flex;
  203. justify-content: center;
  204. align-items:center;
  205. background-color: #ff0000;
  206. color: #ffffff;
  207. border-radius: 15px 15px 15px 15px;
  208. }
  209. .startExperiment{
  210. position: absolute;
  211. right: 35%;
  212. bottom: 10%;
  213. width: 10%;
  214. height: 5%;
  215. display: flex;
  216. justify-content: center;
  217. align-items:center;
  218. background-color: #ff0000;
  219. color: #ffffff;
  220. border-radius: 15px 15px 15px 15px;
  221. }
  222. .sy-menu {
  223. // background-image: url('../../assets/home/homeBG.jpg');
  224. // background-repeat: no-repeat;
  225. // background-size: cover;
  226. // background-position: center;
  227. position: absolute;
  228. width: 100%;
  229. height: 100%;
  230. }
  231. .sy-menu-box {
  232. position: absolute;
  233. // background: #FFFFFF;
  234. }
  235. .sy-menu-text {
  236. color: #046093;
  237. }
  238. .menu-box1 {
  239. width: px2vw(350);
  240. height: px2vw(180);
  241. margin-left: px2vw(430);
  242. margin-top: px2vw(588);
  243. }
  244. .menu-text1 {
  245. font-size: px2vw(30);
  246. line-height: px2vw(40);
  247. margin-top: px2vw(40);
  248. }
  249. .menu-box2 {
  250. width: px2vw(350);
  251. height: px2vw(150);
  252. margin-left: px2vw(1150);
  253. margin-top: px2vw(588);
  254. }
  255. .menu-text2 {
  256. font-size: px2vw(26);
  257. line-height: px2vw(35);
  258. margin-top: px2vw(40);
  259. }
  260. .menu-box3 {
  261. width: px2vw(300);
  262. height: px2vw(80);
  263. margin-left: px2vw(600);
  264. margin-top: px2vw(450);
  265. }
  266. .menu-text3 {
  267. font-size: px2vw(20);
  268. line-height: px2vw(26);
  269. margin-top: px2vw(26);
  270. }
  271. .menu-box4 {
  272. width: px2vw(270);
  273. height: px2vw(80);
  274. margin-left: px2vw(1050);
  275. margin-top: px2vw(440);
  276. }
  277. .menu-text4 {
  278. font-size: px2vw(19);
  279. line-height: px2vw(25);
  280. margin-top: px2vw(25);
  281. }
  282. .sy-show-box {
  283. position: absolute;
  284. width: px2vw(361);
  285. height: px2vw(243);
  286. }
  287. .sy-show-content {
  288. position: absolute;
  289. width: px2vw(281);
  290. }
  291. .menu-show-title {
  292. margin-top: px2vw(23);
  293. font-size: px2vw(22);
  294. color: #EA252C;
  295. line-height: px2vw(29);
  296. }
  297. .menu-show-text {
  298. margin-top: px2vw(15);
  299. font-size: px2vw(16);
  300. color: #555555;
  301. line-height: px2vw(30);
  302. text-align: center;
  303. }
  304. .menu-show-btn {
  305. margin-top: px2vw(19);
  306. width: px2vw(183);
  307. height: px2vw(33);
  308. background: #EA252C;
  309. border-radius: px2vw(4);
  310. font-size: px2vw(16);
  311. color: #FFFFFF;
  312. line-height: px2vw(21);
  313. }
  314. .menu-show-btn-gray{
  315. margin-top: px2vw(19);
  316. width: px2vw(183);
  317. height: px2vw(33);
  318. background: #CCCCCC;
  319. border-radius: px2vw(4);
  320. font-size: px2vw(16);
  321. color: #FFFFFF;
  322. line-height: px2vw(21);
  323. }
  324. .menu-show-box1 {
  325. margin-left: px2vw(167);
  326. margin-top: px2vw(299);
  327. }
  328. .menu-show-box2 {
  329. margin-left: px2vw(1373);
  330. margin-top: px2vw(306);
  331. }
  332. .menu-show-box3 {
  333. margin-left: px2vw(670);
  334. margin-top: px2vw(171);
  335. }
  336. .menu-show-box4 {
  337. margin-left: px2vw(1144);
  338. margin-top: px2vw(171);
  339. }
  340. .myVideo{
  341. position: absolute;
  342. left: px2vw(770);
  343. top: px2vw(371);
  344. width: px2vw(360);
  345. height: px2vw(203);
  346. // display: flex;
  347. // justify-content: center;
  348. // align-items:center;
  349. // background-color: #ff0000;
  350. // color: #ffffff;
  351. // border-radius: 15px 15px 15px 15px;
  352. }
  353. </style>