footers.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370
  1. <template>
  2. <div class="footers2">
  3. <div class="autoBox" >
  4. <span class="LeftBracket"></span>
  5. <span class="RightBracket"></span>
  6. <div class="centerBracket">
  7. <div class="centerBracket_div1">
  8. <span style="color: #e0edee;margin-left: -40px;margin-right: 20px;font-size: 14px;">{{$i18n.locale=='zh'?'主办单位':'Hosts'}}</span>
  9. <img src="@/assets/img/home/footer/footerLogo.png" alt=""
  10. style="height:88%;vertical-align: middle;"
  11. @click="toViewChange">
  12. <!-- href="https://www.geidco.org.cn/" -->
  13. </div>
  14. <div style="margin:10px 0;background:#8395b3;border:1px solid #5a729b"></div>
  15. <div :class="$i18n.locale=='zh'?'centerBracket_div2':'centerBracket_div4'">
  16. <!-- Useragreement -->
  17. <span @click="getAboutMenu('关于我们')" class="cursor">{{$t('common.AboutUs')}}</span>
  18. <span>|</span>
  19. <span @click="getAboutMenu('用户协议')" class="cursor">{{$t('common.Useragreement')}}</span>
  20. <span>|</span>
  21. <span @click="getAboutMenu('隐私政策')" class="cursor">{{$t('common.Privacypolicy')}}</span>
  22. <span>|</span>
  23. <span @click="toViewLega('helpCenter')" class="cursor">{{$t('common.HelpCenter')}}</span>
  24. <span>|</span>
  25. <span @click="cofLogin" class="cursor">{{$t('common.Feedback')}}</span>
  26. </div>
  27. <div class="centerBracket_div3" style="width:100%;min-width: 700px;position: relative;left:50%;transform: translateX(-50%);">
  28. <span>{{year}} GEIDCO
  29. <span @click="toView" class="cursor">All </span>
  30. <span class="cursor" @click="toNewHome"> rights </span>
  31. <span>reserved. <a style="color:#fff;" class="beianSrc" href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank">{{$t('common.RecordNo')}}</a>. </span>
  32. <span> &ensp;&ensp; </span>
  33. <span style="text-align: center;color: #fff;font-size: 14px;">
  34. &emsp; E-mail: <span> </span> geidcp-info@geidco.org
  35. </span>
  36. </span>
  37. </div>
  38. </div>
  39. </div>
  40. <div id="dialog">
  41. <el-dialog
  42. :visible.sync="dialogVisible"
  43. width="30%"
  44. ref="dialog"
  45. center>
  46. <div style="min-height: 120px;">
  47. <span style="font-size: 23px;text-align: center;display: block;width: 100%;">
  48. {{$t('common.Thelinyouvisitedwillleavethewebsiteof')}}
  49. <!-- 您访问的链接即将离开“全球能源互联网发展合作平台”网站,是否继续? -->
  50. </span>
  51. </div>
  52. <span slot="footer" class="dialog-footer"
  53. style="height: 50px;display: block;width: 100%;color: #ab0d07;font-size: 20px;">
  54. <span style="margin-right:30px;padding: 10px 18px;
  55. background:linear-gradient(#eee, #f1f1f1,#e6e6e6);
  56. border-radius: 10px;cursor: pointer;" @click="toViewChange('1')">
  57. {{$t('common.Continuetovisit')}}
  58. </span>
  59. <span @click="dialogVisible=false" style="cursor: pointer;">{{$t('common.giveup')}}</span>
  60. </span>
  61. </el-dialog>
  62. </div>
  63. <!-- 用户协议 -->
  64. <div>
  65. <el-dialog width="60%"
  66. :title=" $i18n.locale=='en'?'《User Agreement of Global Energy Interconnection Development and Cooperation Platform》':'《全球能源互联网发展合作平台用户协议》' "
  67. :visible.sync="innerVisible1" append-to-body>
  68. <!-- <PlatformRegistered ></PlatformRegistered> -->
  69. <iframe v-if="$i18n.locale=='zh'" width="100%" id="embed" name="main" ref="embed1" height="600px" :src="srcPdf3" frameborder="0"></iframe>
  70. <iframe v-if="$i18n.locale=='en'" width="100%" id="embed" name="main" ref="embed1" height="600px" :src="srcPdf4" frameborder="0"></iframe>
  71. </el-dialog>
  72. <el-dialog
  73. width="60%"
  74. :title=" $i18n.locale=='en'?'《Privacy Policy of Global Energy Interconnection Development and Cooperation Platform》':'《全球能源互联网发展合作平台隐私政策》' "
  75. :visible.sync="innerVisible2"
  76. append-to-body
  77. >
  78. <!-- <LegalNotices></LegalNotices> -->
  79. <iframe v-if="$i18n.locale=='zh'" width="100%" id="embed" name="main" ref="embed2" height="600px" :src="srcPdf" frameborder="0"></iframe>
  80. <iframe v-if="$i18n.locale=='en'" width="100%" id="embed" name="main" ref="embed2" height="600px" :src="srcPdf2" frameborder="0"></iframe>
  81. <!-- <div>asdasdasdasd</div> -->
  82. </el-dialog>
  83. </div>
  84. <!-- 登录提示 -->
  85. <el-dialog
  86. :title="$i18n.locale=='zh'?'提示':'Reminder'"
  87. :visible.sync="toViewLogin"
  88. :width="$i18n.locale=='zh'?'500px':'750px'"
  89. :height="$i18n.locale=='zh'?'300px':'386px'"
  90. :before-close="toViewLoginChange"
  91. >
  92. <div style="width: 100%;height: 100%;">
  93. <img src="@/assets/img/loginTips.png" alt="" style="width: 180px;height: 180px;margin-left: 20px;">
  94. <div style="float: right;margin-right: 20px;" :style="$i18n.locale=='zh'?'width: 49%;margin-top: 10px;':'width: 453px;margin-top: -25px;'">
  95. <div style="font-size: 20px;font-weight: normal;color: #333333;
  96. font-family: HiraginoSansGB-W3, HiraginoSansGB;
  97. line-height: 40px;">
  98. {{$t('common.ReminderFirst')}}
  99. </div>
  100. <div style="font-size: 16px;font-family: HiraginoSansGB-W3, HiraginoSansGB;
  101. font-weight: normal;color: #666666;line-height: 30px;">
  102. {{$t('common.ReminderSecond')}} <span style="color: #0091FF;font-size: 18px;">{{num}}</span> {{$t('common.ReminderThird')}}
  103. </div>
  104. <div style="font-size: 14px;font-family: HiraginoSansGB-W3, HiraginoSansGB;
  105. font-weight: normal;color: #666666;line-height: 30px;">
  106. {{$t('common.ReminderForth')}}
  107. </div>
  108. <div style="font-size: 14px;font-family: HiraginoSansGB-W3, HiraginoSansGB;
  109. height:33px;line-height:60px;font-weight: normal;color: #0091FF;">
  110. <span style="margin-left: 40px;" class="cursor" @click="toViewLega('login')">
  111. {{$t('common.ReminderFifth')}}
  112. </span>
  113. <span style="margin-left: 10px;" class="cursor" @click="toViewLega('Register')">
  114. {{$t('common.ReminderSixth')}}
  115. </span>
  116. </div>
  117. </div>
  118. </div>
  119. </el-dialog>
  120. </div>
  121. </template>
  122. <script>
  123. import {getHelpColumnTree} from '@/api/operation/help/helpCenterEntity';
  124. import Base from "@/views/base/Base";
  125. import {getToken} from '@/utils/auth';
  126. export default {
  127. name: 'Footers',
  128. extends: Base,
  129. data () {
  130. return {
  131. dialogVisible:false,
  132. RegistdialogVisible:false,
  133. innerVisible1: false,
  134. innerVisible2: false,
  135. menu:[],
  136. aboutMenu:[],
  137. year:null,
  138. srcPdf: null,
  139. srcPdf2: null,
  140. srcPdf3: null,
  141. srcPdf4: null,
  142. img:[{
  143. url:'Instagram'
  144. },{
  145. url:'YouTube'
  146. },{
  147. url:'faceBook'
  148. },{
  149. url:'in'
  150. },{
  151. url:'Twitter'
  152. },{
  153. url:'WeChat'
  154. },{
  155. url:'microBlog'
  156. }],
  157. toViewLogin:false,
  158. num:0,
  159. timer:null,
  160. }
  161. },
  162. mounted(){
  163. this.srcPdf = '/api/file/pub/def/PrivacyPolicy_CN.pdf';
  164. this.srcPdf2 = '/api/file/pub/def/PrivacyPolicy_EN.pdf';
  165. this.srcPdf3 = '/api/file/pub/def/UserAgreement_CN.pdf';
  166. this.srcPdf4 = '/api/file/pub/def/UserAgreement_EN.pdf';
  167. let date=new Date;
  168. this.year = date.getFullYear();
  169. this.getAboutId();
  170. },
  171. watch:{
  172. "toViewLogin"(){
  173. if(this.toViewLogin==true){
  174. this.loginTipsChange()
  175. }
  176. }
  177. },
  178. methods:{
  179. //登录跳转
  180. loginTipsChange(){
  181. const that=this;
  182. this.num=5;
  183. this.timer = setInterval(function() {
  184. if (that.num > 0) {
  185. that.num--;
  186. console.log(that.num)
  187. } else {
  188. if(that.toViewLogin==false){
  189. clearInterval(that.timer);
  190. that.toViewLega('login')
  191. }else {
  192. clearInterval(that.timer);
  193. }
  194. }
  195. }, 1000)
  196. },
  197. // 判断未登录跳转是否关闭
  198. toViewLoginChange(done){
  199. this.toViewLogin=false;
  200. this.num=5;
  201. clearInterval(this.timer);
  202. },
  203. cofLogin(){
  204. let token = getToken();
  205. if(!token){
  206. this.toViewLogin = true;
  207. }else{
  208. this.toViewLega('Feedback')
  209. }
  210. },
  211. //尾页关于我们数据连接处理
  212. getAboutMenu(type){
  213. this.aboutMenu.forEach(item =>{
  214. if(item.name==type){
  215. this.toViewAbout('helpCenter',item.id);
  216. }
  217. })
  218. },
  219. getIconUrl(url){
  220. return require("@/assets/img/home/footer/"+url+".png");
  221. },
  222. toNewHome(){
  223. this.$router.push({name:'home'});
  224. },
  225. toView(router,json,item){
  226. this.$router.push({name:'HomeHistory'});
  227. },
  228. viewLogin(router, json) {
  229. this.$router.push({
  230. name: router,
  231. query: {
  232. key:json,
  233. }
  234. });
  235. },
  236. toViewLega(router,json,item){
  237. this.$store.commit('modify', router);
  238. window.localStorage.setItem('router', router);
  239. this.$router.push({name:router});
  240. },
  241. toViewChange(json){
  242. this.dialogVisible=true;
  243. console.log(this.$refs.dialog.style)
  244. this.$refs.dialog.style.backgroundColor='rgba(0,0,0,.8)';
  245. if(json==1){
  246. this.dialogVisible=false;
  247. window.open('https://www.geidco.org.cn/');
  248. }
  249. // window.open('https://www.geidco.org.cn/')
  250. },
  251. handleClose(done) {
  252. this.RegistdialogVisible = false;
  253. },
  254. //跳转关于我们
  255. toViewAbout(router,id){
  256. this.$store.commit('modify', router);
  257. window.localStorage.setItem('router', router);
  258. const { href } = this.$router.resolve({
  259. name: router,
  260. query:{
  261. key:id
  262. }
  263. });
  264. window.open(href, '_blank');
  265. },
  266. //获取关于我们id信息
  267. getAboutId() {
  268. var language = "ZH"
  269. getHelpColumnTree(language).then((result) => {
  270. this.aboutMenu = [];
  271. let menuHelp = result.data;
  272. for(let i = 0;i<=menuHelp.length-1;i++){
  273. if(menuHelp[i].name == "关于我们" || menuHelp[i].name == "About Us"){
  274. this.aboutMenu = menuHelp[i].children;
  275. }
  276. }
  277. })
  278. },
  279. }
  280. }
  281. </script>
  282. <style>
  283. a:hover,a:active{
  284. color:red !important;
  285. }
  286. a {
  287. text-decoration:none;
  288. }
  289. .footers1 {
  290. height: 170px;
  291. }
  292. .footers2 {
  293. width: 100%;
  294. height: 170px;
  295. background: #2c558a;
  296. }
  297. .LeftBracket {
  298. float: left;
  299. width: 340px;
  300. height: 170px;
  301. background: url('../assets/img/home/LeftBracket.png') no-repeat;
  302. margin-left: 206px;
  303. margin-right: 240px;
  304. }
  305. .RightBracket {
  306. float: left;
  307. width: 340px;
  308. height: 170px;
  309. background: url('../assets/img/home/RightBracket.png') no-repeat;
  310. }
  311. .centerBracket {
  312. position: absolute;
  313. left: 320px;
  314. top: 0;
  315. width: 559px;
  316. height: 170px;
  317. }
  318. .centerBracket_div1 {
  319. margin-top: 20px;
  320. height: 64px;
  321. text-align: center;
  322. cursor: pointer;
  323. }
  324. .centerBracket_div2 {
  325. display: flex;
  326. justify-content:space-between;
  327. flex-wrap:wrap;
  328. padding: 10px 100px;
  329. font-size: 14px;
  330. color: #e0edee;
  331. }
  332. .centerBracket_div4 {
  333. display: flex;
  334. justify-content:space-between;
  335. flex-wrap:wrap;
  336. padding: 10px 70px;
  337. font-size: 14px;
  338. color: #e0edee;
  339. }
  340. .centerBracket_div3 {
  341. display: flex;
  342. /*justify-content:space-between;*/
  343. flex-wrap:wrap;
  344. justify-content:center;
  345. padding: 0px 90px;
  346. font-size: 14px;
  347. color: #e0edee;
  348. }
  349. .el-dialog__wrapper,
  350. .background {
  351. background-color:rgba(0,0,0,.5)!important;
  352. }
  353. </style>