home.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817
  1. <template>
  2. <view class="mybody bgclF8 df fdc">
  3. <TopMenu ref="TopMenu" v-on:onTopSYClick="onTopSYClick" v-on:onTopQXZBClick="onTopQXZBClick"
  4. v-on:onLoginClick="onLoginClick" v-on:onTopXXYSYClick="onTopXXYSYClick"
  5. v-on:onTopMenuIconClick="onTopMenuIconClick" v-on:onClick_return="onClick_return"
  6. v-on:onClick_avatar="onClick_avatar" v-on:onClick_topMenu_sy="onClick_topMenu_sy"
  7. v-on:onClick_exit="onClick_userExit"></TopMenu>
  8. <view class="content homeContent">
  9. <Login ref="Login" v-show="bShow[0]" v-on:onLogin="onLogin"></Login>
  10. <SYJJ ref="SYJJ" v-show="bShow[1]" v-on:onClick_Btn1="onClick_SYJJ_btn1"></SYJJ>
  11. <!-- <XXLC ref="XXLC" v-show="bShow[2]" v-on:onClick_ksxx="onClick_ksxx"></XXLC> -->
  12. <XQDL ref="XQDL" v-show="bShow[2]" v-on:onClick_Btn1="onClick_XQDL_btn1"></XQDL>
  13. <KSXX ref="KSXX" v-show="bShow[3]" v-on:on2thTitleClick="on2thKSXXClick"></KSXX>
  14. <!-- <image v-show="bShow[4]" class="homeBG" mode="aspectFill" src="../assets/home/homeBG.jpg"></image> -->
  15. <SY ref="SY" v-show="bShow[4]" v-on:onClick_menu_btn="onClick_sy_btn" v-on:onTheoryLearnu_btn="onTheoryLearnu_btn" v-on:onStartExperiment_btn="onStartExperiment_btn"></SY>
  16. <QXZB ref="QXZB" v-show="bShow[5]"></QXZB>
  17. <XXYSY ref="XXYSY" v-show="bShow[6]" v-on:onClick_KSRZ="onClick_KSRZ" v-on:onClick_KSKC="onClick_KSKC"
  18. v-on:onShowWebview720="onShowWebview720"></XXYSY>
  19. <YLRZ ref="YLRZ" v-show="bShow[7]" v-on:initData="initData"></YLRZ>
  20. <SYJJ2 ref="SYJJ2" v-show="bShow[8]"></SYJJ2>
  21. <simulation ref="simulation" v-show="bShow[9]"></simulation>
  22. <simulationLibrary ref="simulationLibrary" v-show="bShow[10]"></simulationLibrary>
  23. <simulationcore ref="simulationcore" v-show="bShow[11]" v-on:goToTeachCreation="goToTeachCreation"
  24. v-on:goToStudentPlatform="goToStudentPlatform"></simulationcore>
  25. <simulationBase ref="simulationBase" v-show="bShow[12]"></simulationBase>
  26. <teacherCreation ref="teacherCreation" v-show="bShow[13]" v-on:enter="enter"></teacherCreation>
  27. <User ref="User" v-show="bShow[14]" v-on:onClick_proManage="onClick_proManage"></User>
  28. <XXGY ref="XXGY" v-show="bShow[15]"></XXGY>
  29. <SYBZ ref="SYBZ" v-show="bShow[16]" v-on:onClick_ksxx="onClick_ksxx"></SYBZ>
  30. <SYYDSP ref="SYYDSP" v-show="bShow[17]"></SYYDSP>
  31. <student ref="student" v-show="bShow[18]"></student>
  32. <vstudentPlatform ref="vstudentPlatform" v-show="bShow[19]"></vstudentPlatform>
  33. <survey ref="survey" v-show="bShow[20]"></survey>
  34. <SJKC ref="SJKC" v-show="bShow[21]" v-on:initData="initData"></SJKC>
  35. <XXZLXZ ref="XXZLXZ" v-show="bShow[22]"></XXZLXZ>
  36. </view>
  37. <!-- 左侧导航栏永远保持在最上层 -->
  38. <LeftMenu ref="LeftMenu" v-on:onLeftMenuClick="onLeftMenuClick"></LeftMenu>
  39. <webview720 ref="webview720"></webview720>
  40. <shutDownWebview ref="shutDownWebview" v-on:onHideWebview="onHideWebview" v-on:onClick_KSKC="onClick_KSKC"></shutDownWebview>
  41. <!-- 联系方式 -->
  42. <!-- <view class='contact'> -->
  43. <!-- 弹出框 -->
  44. <!-- <view class='contactPopView'>
  45. <view class='qrcode' v-show="bShowQrCode">
  46. <img class="contactPopViewContent" src="../assets/contact/QRCode.png"></img>
  47. </view>
  48. <view class='mail' v-show="bShowMail">
  49. <img class="contactPopViewBg" src="../assets/contact/bubble_02.png"></img>
  50. <text selectable="true" class="contactPopViewContent" src="../assets/contact/QRCode.png">2812319400@qq.com</text>
  51. </view>
  52. <view class='tel' v-show="bShowTel">
  53. <img class="contactPopViewBg" src="../assets/contact/bubble_02.png"></img>
  54. <text selectable="true" class="contactPopViewContent" src="../assets/contact/QRCode.png">15017534446</text>
  55. </view>
  56. </view> -->
  57. <!-- 背景 -->
  58. <!-- <view class='contactBg'></view> -->
  59. <!-- icon -->
  60. <!-- <view class="imageBg">
  61. <img src="../assets/contact/qrcode_icon.png" @mousemove="showContact(0)" @mouseout="showContact(4)"></img>
  62. <img src="../assets/contact/mail_icon.png" @mousemove="showContact(1)" @mouseout="showContact(4)"></img>
  63. <img src="../assets/contact/tel_icon.png" @mousemove="showContact(2)" @mouseout="showContact(4)"></img>
  64. </view> -->
  65. </view>
  66. </view>
  67. </template>
  68. <script>
  69. import SY from '../components/home/sy.vue'
  70. import LeftMenu from '../components/leftMenu.vue'
  71. import TopMenu from '../components/topMenu.vue'
  72. import Login from '../components/login/login.vue'
  73. import simulation from "../components/home/simulation.vue"
  74. import simulationLibrary from "../components/home/simulationLibrary.vue"
  75. import simulationcore from "../components/home/simulationCore.vue"
  76. import simulationBase from "../components/home/simulationBase.vue"
  77. import teacherCreation from "../components/home/teacherCreation.vue"
  78. import vstudentPlatform from "../components/student/Index.vue"
  79. import student from "../components/student/commoand.vue"
  80. import survey from "../components/student/survey.vue"
  81. //一级页面
  82. import KSXX from '../components/startLearning/startLearning.vue' //开始学习
  83. import SYJJ from '../components/introductionToTheExperiment/introductionToTheExperiment.vue' //实验简介
  84. // import XXLC from '../components/learningProcess/learningProcess.vue' //学习流程
  85. //二级页面
  86. //开始学习
  87. import QXZB from '../components/startLearning/preludePreparation/preludePreparation.vue' //前序准备
  88. import XXYSY from '../components/startLearning/learningAndExperiment/learningAndExperiment.vue' //学习与实验
  89. import YLRZ from '../components/startLearning/learningAndExperiment/ksxx_xxysy_ylrz/ksxx_xxysy_ylrz.vue' //原理认知
  90. //实验简介的详情页
  91. import SYJJ2 from '../components/introductionToTheExperiment/syjj_second.vue' //实验简介的详情页
  92. import User from '../components/user/user.vue' //用户信息等
  93. import XQDL from '../components/learningProcess/xqdl.vue' //学前导览
  94. import XXGY from '../components/learningProcess/xxgy.vue' //学习概要
  95. import SYBZ from '../components/learningProcess/learningProcess.vue' //实验步骤
  96. import SYYDSP from '../components/learningProcess/syydsp.vue' //实验引导视频
  97. import XXZLXZ from '../components/learningProcess/xxzlxz.vue' //学习资料下载
  98. import SJKC from '../components/startLearning/learningAndExperiment/ksxx_xxysy_sjkc/ksxx_xxysy_sjkc.vue' //实景勘察
  99. import shutDownWebview from '../components/home/shutDownWebview.vue' //实景勘察720
  100. import webview720 from '../components/home/webview720.vue' //实景勘察720
  101. export default {
  102. components: {
  103. LeftMenu,
  104. TopMenu,
  105. Login,
  106. SYJJ,
  107. XQDL,
  108. KSXX,
  109. QXZB,
  110. XXYSY,
  111. YLRZ,
  112. SYJJ2,
  113. simulation,
  114. simulationLibrary,
  115. simulationcore,
  116. simulationBase,
  117. teacherCreation,
  118. User,
  119. XXGY,
  120. SYBZ,
  121. SYYDSP,
  122. SY,
  123. student,
  124. vstudentPlatform,
  125. survey,
  126. SJKC,
  127. XXZLXZ,
  128. shutDownWebview,
  129. webview720
  130. },
  131. data() {
  132. return {
  133. curShowPage: 4,
  134. //这里记录当前需要显示哪个页面。每新添加一个页面,都需要在这里注册。
  135. bShow: [
  136. false, //0登录
  137. false, //1实验简介一级页面
  138. false, //2学习流程一级页面----改为学前导览
  139. false, //3开始学习一级页面
  140. true, //4首页
  141. false, //5开始学习-前序准备
  142. false, //6开始学习-学习与实验
  143. false, //7开始学习-学习与实验-原理认知
  144. false, //8实验简介的详情页
  145. false, //9虚拟仿真1号摄影棚
  146. false, //10虚拟仿真资产库
  147. false, //11虚拟影视项目开发管理中心
  148. false, //12虚拟仿真真题拍摄基地
  149. false, //13老师创作管理平台
  150. false, //14用户(个人信息等)
  151. false, //15学习概要
  152. false, //16实验步骤
  153. false, //17实验引导视频
  154. false, //18 学生信息
  155. false, //19 学生创作项目管理平台
  156. false, //20开始勘测
  157. false, //21实景勘察
  158. false, //22学习资料下载
  159. ],
  160. checkedIndex_SYJJ: 0, //实F验简介选中标题索引值
  161. bShowQrCode:false,
  162. bShowMail:false,
  163. bShowTel:false,
  164. }
  165. },
  166. onLoad() {
  167. let aUserID = this.getCookie("AutoUserID");
  168. let aName = this.getCookie("AutoName");
  169. let aType = this.getCookie("AutoType");
  170. let aIsAdmin = this.getCookie("AutoIsAdmin");
  171. let aImage = this.getCookie("AutoImage");
  172. let AToken = this.getCookie("AutoToken");
  173. if(aUserID!='') console.log('AToken=',AToken)
  174. if(aUserID!='') console.log('aUserID=',aUserID)
  175. if(aName!='') console.log('aName=',aName)
  176. if(aType!='') console.log('aType=',aType)
  177. if(aIsAdmin!='') console.log('aIsAdmin=',aIsAdmin)
  178. if(aImage!='') console.log('aImage=',aImage)
  179. let self = this;
  180. if(aUserID!='')
  181. {
  182. console.log('从Liab跳转登录')
  183. console.log('登录时间戳=',new Date().getTime());
  184. console.log("aUserID=", aUserID);
  185. setTimeout(function(){
  186. self.onLoginSuccess(aUserID,aName,aType,aImage);
  187. },500)
  188. return;
  189. }
  190. // console.log('从保存用户名密码登录')
  191. let account = localStorage.getItem("account");
  192. let password = localStorage.getItem("password");
  193. if (account != null && password != null) {
  194. let url = mydata_api + "/user/loginin";
  195. uni.request({
  196. header: {
  197. 'Content-Type': 'application/json;charset=UTF-8'
  198. },
  199. url: url,
  200. method: 'POST',
  201. data: {
  202. "IlabAccount": account,
  203. "Password": password
  204. },
  205. dataType: 'json',
  206. success: (res) => {
  207. let data = res.data;
  208. //登录成功
  209. if (data.Code == 100) {
  210. console.log('登录时间戳=',new Date().getTime());
  211. console.log("home从保存用户名密码登录data=", data);
  212. console.log("Token=", data.Token);
  213. this.onLoginSuccess(data.UserID,data.Name,data.Type,data.Image);
  214. }
  215. },
  216. fail: (res) => {
  217. console.log("fail+**+*", res)
  218. }
  219. });
  220. }
  221. },
  222. methods: {
  223. onLoginSuccess(UserID,Name,Type,Image)
  224. {
  225. mydata_userInfo.UserID = UserID;
  226. mydata_userInfo.Name = Name;
  227. mydata_userInfo.role = Type;
  228. mydata_userInfo.avatarSrc = Image;
  229. if (mydata_userInfo.role == '老师') {
  230. userController.updateStudentList(null, null);
  231. }
  232. else{
  233. mydata_userInfo.role = '学生';
  234. }
  235. userController.updateUserInfo();
  236. userController.updateScore();
  237. // MyRequest.SetUserType(mydata_userInfo.role,null,null);
  238. getApp().globalData.bLogin = true;
  239. this.onLogin();
  240. },
  241. getQueryVariable(variable)
  242. {
  243. var query = window.location.search.substring(1);
  244. var vars = query.split("&");
  245. for (var i=0;i<vars.length;i++) {
  246. var pair = vars[i].split("=");
  247. if(pair[0] == variable){return pair[1];}
  248. }
  249. return(false);
  250. },
  251. getCookie(name){
  252. var strcookie = document.cookie;//获取cookie字符串
  253. var arrcookie = strcookie.split("; ");//分割
  254. //遍历匹配
  255. for ( var i = 0; i < arrcookie.length; i++) {
  256. var arr = arrcookie[i].split("=");
  257. if (arr[0] == name){
  258. return arr[1];
  259. }
  260. }
  261. return "";
  262. },
  263. onTopSYClick(index) {
  264. if (!getApp().globalData.bLogin) {
  265. // uni.showToast({
  266. // title: '请先点击右上角登录',
  267. // duration: 2000,
  268. // mask: true //是否有透明蒙层,默认为false
  269. // })
  270. uni.showModal({
  271. title: '提示',
  272. showCancel: false,
  273. content: '请先点击右上角登录?',
  274. success: function(res) {
  275. if (res.confirm) {
  276. console.log('点击了确认')
  277. } else {
  278. console.log('点击了取消')
  279. }
  280. }
  281. })
  282. return
  283. };
  284. // console.log("点击了首页标题", index, myData_QXZB_SYQY.length);
  285. let pageIndex = -1;
  286. switch (index) {
  287. case 0: //实验简介
  288. pageIndex = 1;
  289. // this.$refs.SYJJ.initData();
  290. break;
  291. case 1: //学习流程
  292. pageIndex = 2;
  293. // this.$refs.XXLC.initData();
  294. break;
  295. case 2: //开始学习
  296. pageIndex = 3;
  297. this.$refs.KSXX.initData();
  298. break;
  299. default:
  300. console.log("选中状态为home:", state);
  301. }
  302. this.showPage(pageIndex);
  303. },
  304. onLogin: function() {
  305. // console.log("登陆成功home");
  306. this.$refs.TopMenu.switchLoginState(true);
  307. this.showPage(4);
  308. },
  309. showPage(index) {
  310. this.curShowPage = index;
  311. for (let i = 0; i < this.bShow.length; i++) {
  312. if (i == index) {
  313. this.bShow[i] = true;
  314. } else {
  315. this.bShow[i] = false;
  316. }
  317. }
  318. // console.log("显示页面", index, this.bShow, this.bShow.length);
  319. this.$forceUpdate();
  320. },
  321. //2级开始学习标题点击事件
  322. on2thKSXXClick(data) {
  323. // console.log("2级点击", data);
  324. let lineIndex = data.indexOf("-");
  325. let type = data.substr(0, lineIndex)
  326. let index = data.substr(lineIndex + 1, data.length - 1)
  327. // console.log("2级点击home---", type, index);
  328. //前序准备
  329. if (type == "QXZB") {
  330. this.showPage(5)
  331. this.$refs.TopMenu.switchMiddleState(topMenuS.QXZB, index);
  332. this.$refs.QXZB.onTopQXZBClick(index);
  333. }
  334. //学习与实验
  335. else if (type == "XXYSY") {
  336. this.showPage(6)
  337. this.$refs.TopMenu.switchMiddleState(topMenuS.XXYSY, index);
  338. this.$refs.XXYSY.onTopXXYSYClick(index);
  339. } else {
  340. console.log("2级点击---", lineIndex, type, index);
  341. }
  342. },
  343. //顶部前序准备小标题点击事件
  344. onTopQXZBClick(index) {
  345. // console.log("顶部点击home",index);
  346. this.$refs.QXZB.onTopQXZBClick(index);
  347. },
  348. //顶部学习与实验小标题点击事件
  349. onTopXXYSYClick(index) {
  350. // console.log("顶部点击home",index);
  351. this.$refs.XXYSY.onTopXXYSYClick(index);
  352. },
  353. //左侧导航点击事件
  354. onLeftMenuClick(indexArr) {
  355. let targetPage = -1;
  356. let topMiddleState = '';
  357. let target2thIndex = indexArr[1];
  358. switch (indexArr[0]) {
  359. case 0: //首页
  360. if (indexArr[1] == 0) {
  361. targetPage = 9;
  362. topMiddleState = topMenuS.home1;
  363. } else if (indexArr[1] == 1) {
  364. targetPage = 10;
  365. topMiddleState = topMenuS.home2;
  366. } else if (indexArr[1] == 2) {
  367. targetPage = 11;
  368. topMiddleState = topMenuS.home3;
  369. } else if (indexArr[1] == 3) {
  370. targetPage = 12;
  371. topMiddleState = topMenuS.home4;
  372. } else if (indexArr[1] == 4) {
  373. targetPage = 13;
  374. topMiddleState = topMenuS.home5;
  375. } else {
  376. targetPage = 4;
  377. topMiddleState = topMenuS.SY;
  378. }
  379. break;
  380. case 1: //实验简介
  381. if (indexArr[1] == 1) {
  382. //点击快速进入实验后跳转到原理认知页
  383. targetPage = 6;
  384. topMiddleState = topMenuS.XXYSY;
  385. this.$refs.XXYSY.onTopXXYSYClick(0);
  386. target2thIndex = 0;
  387. } else {
  388. targetPage = 8;
  389. topMiddleState = topMenuS.SYJJ;
  390. this.$refs.SYJJ2.showPage(indexArr[1]);
  391. this.$refs.TopMenu.switchState_syjj(indexArr[1]);
  392. }
  393. break;
  394. case 2: //学习流程
  395. switch (indexArr[1]) {
  396. case 0: //学习概要
  397. targetPage = indexArr[1] + 15;
  398. topMiddleState = topMenuS.XXGY;
  399. break;
  400. case 1: //实验步骤
  401. targetPage = indexArr[1] + 15;
  402. topMiddleState = topMenuS.SYBZ;
  403. break;
  404. case 2: //实验引导视频
  405. targetPage = indexArr[1] + 15;
  406. topMiddleState = topMenuS.SYYDSP;
  407. break;
  408. case 3: //学习资料下载
  409. targetPage = 22;
  410. topMiddleState = topMenuS.XXZLXZ;
  411. break;
  412. default:
  413. }
  414. break;
  415. case 3: //开始学习
  416. targetPage = 6;
  417. topMiddleState = topMenuS.XXYSY;
  418. this.$refs.XXYSY.checkedIndex_topTitle = indexArr[1];
  419. break;
  420. case 4:
  421. targetPage = 18;
  422. topMiddleState = topMenuS.info;
  423. break;
  424. case 5:
  425. targetPage = 19;
  426. topMiddleState = topMenuS.info;
  427. break;
  428. case 6:
  429. targetPage = 20;
  430. topMiddleState = '开始勘测'
  431. break;
  432. default:
  433. console.log("展示页面home:", this.curShowPage);
  434. }
  435. this.showPage(targetPage);
  436. this.$refs.TopMenu.switchMiddleState(topMiddleState, target2thIndex);
  437. // console.log("左侧导航点击home", indexArr);
  438. this.$forceUpdate();
  439. },
  440. goToTeachCreation() {
  441. // console.log('2222222')
  442. // this.$refs.teacherCreation.enter();
  443. this.showPage(13);
  444. },
  445. goToStudentPlatform() {
  446. this.showPage(19);
  447. this.$refs.vstudentPlatform.updateInfo();
  448. },
  449. //顶部导航左上角icon点击事件
  450. onTopMenuIconClick() {
  451. if (!getApp().globalData.bLogin) {
  452. alert('请先登录')
  453. return
  454. };
  455. let indexArr = [];
  456. switch (this.curShowPage) {
  457. case 0: //登录
  458. indexArr = [-1, -1];
  459. break;
  460. case 1: //实验简介1级
  461. indexArr = [1, -1];
  462. break;
  463. case 2: //学习流程1级
  464. indexArr = [2, -1];
  465. break;
  466. case 3: //开始学习1级
  467. indexArr = [3, -1];
  468. break;
  469. case 4: //首页
  470. indexArr = [0, -1];
  471. break;
  472. case 5: //开始学习-前序准备
  473. indexArr = [3, 0];
  474. break;
  475. case 6: //开始学习-学习与实验
  476. indexArr = [3, 1];
  477. break;
  478. case 7: //开始学习-学习与实验-原理认知
  479. indexArr = [3, 1];
  480. break;
  481. case 8: //实验简介2级
  482. indexArr = [1, this.checkedIndex_SYJJ];
  483. break;
  484. default:
  485. console.log("展示页面home:", this.curShowPage);
  486. }
  487. this.$refs.LeftMenu.show(indexArr);
  488. },
  489. //开始学习-学习与实验-开始认知按钮
  490. onClick_KSRZ() {
  491. this.showPage(7);
  492. // console.log('33333333333333333')
  493. this.$refs.YLRZ.initData();
  494. this.$refs.TopMenu.switchMiddleState(topMenuS.YLRZ, -1);
  495. },
  496. //开始学习-实景勘察-开始勘察按钮
  497. onClick_KSKC() {
  498. this.showPage(21);
  499. // console.log('44444444444444')
  500. this.$refs.SJKC.initData();
  501. this.$refs.TopMenu.switchMiddleState(topMenuS.SJKC, -1);
  502. },
  503. onClick_return(type) {
  504. //从首页建筑页返回到首页
  505. if (type == 9 || type == 10 || type == 11 || type == 12) {
  506. this.showPage(4);
  507. this.$refs.SY.initData();
  508. }
  509. //学前导览三级级返回到学前导览
  510. else if (type == 5 || type == 6 || type == 7 || type == 8) {
  511. this.showPage(2);
  512. } else {
  513. switch (type) {
  514. case 1: //前序准备-返回上一层:返回到开始学习-前序准备的展开页 type-1
  515. this.showPage(3);
  516. this.$refs.KSXX.switchSecondTitle(0);
  517. break;
  518. case 2: //学习与实验-返回上一层:返回到开始学习-学习与实验的展开页 type-2
  519. this.showPage(3);
  520. this.$refs.KSXX.switchSecondTitle(1);
  521. break;
  522. case 3: //原理认知-返回上一层:返回到开始学习-学习与实验-原理认知页 type-3
  523. this.showPage(6);
  524. this.$refs.XXYSY.checkedIndex_topTitle = 0;
  525. break;
  526. case 4: //实验简介-返回上一层:返回到实验简介的展开页 type-4
  527. this.showPage(1);
  528. break;
  529. case 14: //开始勘察-返回上一层:返回到开始学习-实景勘察页
  530. this.showPage(6);
  531. this.$refs.XXYSY.checkedIndex_topTitle = 1;
  532. break;
  533. default:
  534. console.log("返回上一层", type);
  535. }
  536. }
  537. },
  538. //实验简介按钮点击
  539. onClick_SYJJ_btn1(index) {
  540. if (index == 1) { //点击快速进入实验后跳转到原理认知页
  541. this.showPage(6)
  542. this.$refs.TopMenu.switchMiddleState(topMenuS.XXYSY, 0);
  543. this.$refs.XXYSY.onTopXXYSYClick(0);
  544. } else {
  545. this.showPage(8);
  546. this.checkedIndex_SYJJ = index;
  547. this.$refs.SYJJ2.showPage(index);
  548. this.$refs.TopMenu.switchMiddleState(topMenuS.SYJJ, -1);
  549. this.$refs.TopMenu.switchState_syjj(index);
  550. this.$forceUpdate();
  551. }
  552. },
  553. onClick_ksxx() {
  554. this.showPage(3);
  555. this.$refs.KSXX.initData();
  556. this.$refs.TopMenu.switchMiddleState(topMenuS.SY, 2);
  557. },
  558. //顶部导航栏-头像点击事件
  559. onClick_avatar() {
  560. this.showPage(14);
  561. this.$refs.User.initData();
  562. },
  563. //学前导览
  564. onClick_XQDL_btn1(index) {
  565. let targetPage = 0;
  566. switch (index) {
  567. case 0: //学习概要
  568. this.$refs.TopMenu.switchMiddleState(topMenuS.XXGY, -1);
  569. targetPage = index + 15;
  570. break;
  571. case 1: //实验步骤
  572. this.$refs.TopMenu.switchMiddleState(topMenuS.SYBZ, -1);
  573. targetPage = index + 15;
  574. break;
  575. case 2: //实验引导视频
  576. this.$refs.TopMenu.switchMiddleState(topMenuS.SYYDSP, -1);
  577. targetPage = index + 15;
  578. break;
  579. case 3: //学习资料下载
  580. this.$refs.TopMenu.switchMiddleState(topMenuS.XXZLXZ, -1);
  581. targetPage = 22;
  582. break;
  583. default:
  584. console.log("onClick_XQDL_btn1", type);
  585. }
  586. this.showPage(targetPage);
  587. },
  588. //顶部导航点击"影视与演播空间设计虚拟仿真实验"
  589. onClick_topMenu_sy() {
  590. this.showPage(4);
  591. this.$refs.SY.initData();
  592. },
  593. //首页建筑按钮点击事件
  594. onClick_sy_btn(index) {
  595. let targetPage = -1;
  596. let topMiddleState = '';
  597. switch (index) {
  598. case 0: //资产库
  599. targetPage = 10;
  600. topMiddleState = topMenuS.home2;
  601. this.$refs.simulationLibrary.init();
  602. break;
  603. case 1: //摄影棚
  604. targetPage = 9;
  605. topMiddleState = topMenuS.home1;
  606. break;
  607. case 2: //管理中心
  608. targetPage = 11;
  609. topMiddleState = topMenuS.home3;
  610. this.$refs.simulationcore.init();
  611. break;
  612. case 3: //拍摄基地
  613. targetPage = 12;
  614. topMiddleState = topMenuS.home4;
  615. break;
  616. default:
  617. console.log("展示页面home:", this.curShowPage);
  618. }
  619. this.showPage(targetPage);
  620. this.$refs.TopMenu.switchMiddleState(topMiddleState, index);
  621. this.$forceUpdate();
  622. },
  623. //项目管理平台
  624. onClick_proManage() {
  625. let targetPage = -1;
  626. let topMiddleState = '';
  627. if (mydata_userInfo.role == '老师') {
  628. this.$refs.teacherCreation.enter();
  629. targetPage = 13;
  630. } else {
  631. targetPage = 19;
  632. this.$refs.vstudentPlatform.updateInfo();
  633. }
  634. topMiddleState = topMenuS.SY;
  635. this.showPage(targetPage);
  636. this.$refs.TopMenu.switchMiddleState(topMiddleState, -1);
  637. this.$forceUpdate();
  638. },
  639. //用户退出
  640. onClick_userExit() {
  641. this.showPage(4);
  642. this.$refs.TopMenu.switchMiddleState(topMenuS.SY, -1);
  643. getApp().globalData.bLogin = false;
  644. },
  645. onLoginClick() {
  646. this.showPage(0);
  647. this.$refs.Login.initData();
  648. this.$refs.TopMenu.switchMiddleState(topMenuS.SY, -1);
  649. },
  650. onHideWebview() {
  651. this.$refs.TopMenu.hideTopMenu(true);
  652. this.$refs.webview720.onClickShutWebview();
  653. },
  654. onShowWebview720() {
  655. this.$refs.TopMenu.hideTopMenu(false);
  656. this.$refs.shutDownWebview.onClickShow();
  657. this.$refs.webview720.onClickShow();
  658. },
  659. showContact(idx){
  660. // console.log('idx=',idx)
  661. if(0==idx)
  662. {
  663. this.bShowQrCode = true;
  664. this.bShowMail = false;
  665. this.bShowTel = false;
  666. }
  667. else if(1==idx)
  668. {
  669. this.bShowQrCode = false;
  670. this.bShowMail = true;
  671. this.bShowTel = false;
  672. }
  673. else if(2==idx)
  674. {
  675. this.bShowQrCode = false;
  676. this.bShowMail = false;
  677. this.bShowTel = true;
  678. }
  679. else{
  680. this.bShowQrCode = false;
  681. this.bShowMail = false;
  682. this.bShowTel = false;
  683. }
  684. },
  685. onTheoryLearnu_btn(){
  686. this.showPage(6);
  687. this.$refs.XXYSY.checkedIndex_topTitle = 0;
  688. },
  689. onStartExperiment_btn(){
  690. this.showPage(6)
  691. this.$refs.TopMenu.switchMiddleState(topMenuS.XXYSY, 3);
  692. this.$refs.XXYSY.onTopXXYSYClick(3);
  693. }
  694. }
  695. }
  696. </script>
  697. <style lang="scss">
  698. .homeBG {
  699. width: 100%;
  700. height: 100%;
  701. }
  702. .homeContent {
  703. margin-top: px2vw(120);
  704. }
  705. //联系方式
  706. .contact{
  707. width: 20%;
  708. height: 30%;
  709. position: fixed;
  710. bottom: 1%;
  711. right: 1%;
  712. // border: 1px solid #ff0000;
  713. }
  714. //联系方式图标
  715. .contactBg{
  716. width: 15%;
  717. height: 60%;
  718. position: absolute;
  719. right: 0;
  720. bottom: 0;
  721. background-color: #000000;
  722. opacity: 0.5;
  723. }
  724. .imageBg{
  725. width: 15%;
  726. height: 60%;
  727. position: absolute;
  728. right: 0;
  729. bottom: 0;
  730. display: flex;
  731. justify-content: space-around;
  732. align-items:center;
  733. flex-direction:column;
  734. }
  735. .contact img{
  736. width: 50%;
  737. // border: 5px solid #0000ff;
  738. }
  739. // 联系方式弹出框
  740. .contactPopView {
  741. width: 85%;
  742. height: 100%;
  743. // border: 5px solid #0000ff;
  744. }
  745. .qrcode{
  746. position: absolute;
  747. width: 100%;
  748. height: 100%;
  749. // border: 5px solid #00aa00;
  750. display: flex;
  751. justify-content: center;
  752. align-items:center;
  753. }
  754. .mail{
  755. position: absolute;
  756. width: 100%;
  757. height: 100%;
  758. display: flex;
  759. justify-content: center;
  760. align-items:center;
  761. }
  762. .tel{
  763. position: absolute;
  764. width: 100%;
  765. height: 100%;
  766. display: flex;
  767. justify-content: center;
  768. align-items:center;
  769. }
  770. .contactPopViewBg{
  771. position: absolute;
  772. width: 100%;
  773. // border: 5px solid #00aa00;
  774. }
  775. .contactPopViewContent{
  776. position: absolute;
  777. width: 100%;
  778. font-size: px2vw(12);
  779. display: flex;
  780. justify-content: center;
  781. align-items:center;
  782. // border: 5px solid #00aa00;
  783. }
  784. </style>