mobile
yujialong 2 years ago
parent 171ffb16d7
commit 515dfc6d86
  1. 2
      src/layouts/header/index.vue
  2. 11
      src/pages/exp/index.vue
  3. 51
      src/pages/overviewDevHistory/index.vue
  4. 17
      src/plugins/requests/index.js

@ -10,7 +10,7 @@
<div v-if="showSearch" class="search-wrap" @click.stop="stop"> <div v-if="showSearch" class="search-wrap" @click.stop="stop">
<input ref="search" type="text" :placeholder="$t('column.titlePlaceholder')" v-model="title"> <input ref="search" type="text" :placeholder="$t('column.titlePlaceholder')" v-model="title">
<img class="search-icon" src="@/assets/images/search.png" alt="" @click="handleSearch"> <img class="search-icon" src="@/assets/images/search.png" alt="" @click="handleSearch">
<i class="el-icon-close close-icon"></i> <i class="el-icon-close close-icon" @click="showSearch = false"></i>
</div> </div>
</div> </div>
</div> </div>

@ -15,7 +15,13 @@
<div class="inner"> <div class="inner">
<h6 class="wow fadeInUp">实验线站</h6> <h6 class="wow fadeInUp">实验线站</h6>
<p class="en wow fadeInUp" data-wow-delay="0.5s">EXPERIMENT STATIONS</p> <p class="en wow fadeInUp" data-wow-delay="0.5s">EXPERIMENT STATIONS</p>
<img class="pic" :src="modules[1].form.pic" alt=""> <div v-if="modules[1].form.pic" class="text-center">
<video v-if="Util.isVideo(modules[1].form.mediaType)" class="pic" ref="video" autoplay controls loop>
<source :src="modules[1].form.pic" type="video/mp4">
您的浏览器不支持 video 标签
</video>
<img v-else class="pic" :src="modules[1].form.pic" alt="">
</div>
<div class="des">{{ modules[1].form.des }}</div> <div class="des">{{ modules[1].form.des }}</div>
</div> </div>
</div> </div>
@ -58,7 +64,8 @@ export default {
mixins: [mixins], mixins: [mixins],
data() { data() {
return { return {
routes: [] routes: [],
Util
} }
}, },
mounted() { mounted() {

@ -18,35 +18,24 @@
<h2 class="wow fadeInLeft">发展历程</h2> <h2 class="wow fadeInLeft">发展历程</h2>
<p class="en">DEVELOPMENT HISTORY</p> <p class="en">DEVELOPMENT HISTORY</p>
<div class="event"> <div v-if="modules[1].list.length" class="event">
<ul class="time"> <ul class="time">
<li class="active">2022</li> <template v-for="(item, i) in modules[1].list">
<li>2021</li> <li v-if="item.isEnable" :key="i" :class="{active: curYear == i}" @click="yearClick(i)">{{ item.title }}</li>
<li>2020</li> </template>
</ul> </ul>
<div class="right"> <div class="right">
<h6 class="year">2022</h6> <h6 class="year">{{ modules[1].list[curYear].title }}</h6>
<ul class="list"> <ul class="list">
<li> <template v-for="(e, j) in modules[1].list[curYear].list">
<div class="texts"> <li v-if="e.isEnable" :key="j" :class="{'cursor-pointer': isLink(e.link.linkName)}" @click="openLink(e)">
<p class="date">10月11日</p> <div class="texts">
<p class="text">深圳综合粒子设施研究院加入国际超导加速器联盟</p> <p class="date">{{ e.title }}</p>
</div> <p class="text">{{ e.des }}</p>
<img src="@/assets/images/channel1.png" alt="" class="pic"> </div>
</li> <img v-if="e.pic" :src="e.pic" alt="" class="pic">
<li> </li>
<div class="texts"> </template>
<p class="date">10月11日</p>
<p class="text">深圳综合粒子设施研究院加入国际超导加速器联盟</p>
</div>
<img src="@/assets/images/channel1.png" alt="" class="pic">
</li>
<li>
<div class="texts">
<p class="date">10月11日</p>
<p class="text">深圳综合粒子设施研究院加入国际超导加速器联盟</p>
</div>
</li>
</ul> </ul>
</div> </div>
</div> </div>
@ -63,7 +52,8 @@ export default {
data() { data() {
return { return {
active: 1, active: 1,
tabs: ['S³FEL介绍', '发展历程', 'S³FEL宣传片', '地理位置', '机构设置'] tabs: ['S³FEL介绍', '发展历程', 'S³FEL宣传片', '地理位置', '机构设置'],
curYear: 0
} }
}, },
mounted() { mounted() {
@ -89,6 +79,10 @@ export default {
this.active = i this.active = i
if (i == 2) this.$router.push('/overviewTrailer?id=165&siteId=3') if (i == 2) this.$router.push('/overviewTrailer?id=165&siteId=3')
}, },
//
yearClick(i) {
this.curYear = i
}
} }
}; };
</script> </script>
@ -138,6 +132,7 @@ export default {
display: flex; display: flex;
justify-content: center; justify-content: center;
.time { .time {
width: 200px;
padding-right: 10px; padding-right: 10px;
margin-right: 20px; margin-right: 20px;
border-right: 1px solid #ddd; border-right: 1px solid #ddd;
@ -168,6 +163,9 @@ export default {
} }
} }
} }
.right {
width: 1000px;
}
.year { .year {
margin: 0 0 20px 20px; margin: 0 0 20px 20px;
font-size: 3.8rem; font-size: 3.8rem;
@ -186,7 +184,6 @@ export default {
} }
.texts { .texts {
width: 500px; width: 500px;
margin-right: 100px;
} }
.date { .date {
margin-bottom: 15px; margin-bottom: 15px;

@ -53,8 +53,6 @@ service.interceptors.response.use(
if (error.response.status) { if (error.response.status) {
switch (error.response.status) { switch (error.response.status) {
// 401: 未登录 // 401: 未登录
// 未登录则跳转登录页面,并携带当前页面的路径
// 在登录成功后返回当前页面,这一步需要在登录页操作。
case 401: case 401:
util.local.remove(Setting.storeKey); util.local.remove(Setting.storeKey);
util.local.remove(Setting.tokenKey); util.local.remove(Setting.tokenKey);
@ -65,33 +63,20 @@ service.interceptors.response.use(
}); });
}, 1000); }, 1000);
break; break;
case 500:
util.errorMsg("网络错误");
break;
// 403 token过期 // 403 token过期
// 登录过期对用户进行提示
// 清除本地token和清空vuex中token对象
// 跳转登录页面
case 403: case 403:
util.local.remove(Setting.storeKey); util.local.remove(Setting.storeKey);
util.local.remove(Setting.tokenKey); util.local.remove(Setting.tokenKey);
util.errorMsg("登录过期,请重新登录"); util.errorMsg("登录过期,请重新登录");
// 清除token
// store.commit('loginSuccess', null);
// 跳转登录页面,并将要浏览的页面fullPath传过去,登录成功后跳转需要访问的页面
setTimeout(() => { setTimeout(() => {
router.replace({ router.replace({
path: "/login" path: "/login"
}); });
}, 1000); }, 1000);
break; break;
// 404请求不存在
case 404:
util.errorMsg("网络请求不存在!");
break;
// 其他错误,直接抛出错误提示 // 其他错误,直接抛出错误提示
default: default:
util.errorMsg(error.response.data.message); util.errorMsg(error.response.data.msg);
Promise.reject(res); Promise.reject(res);
} }
return Promise.reject(error.response); return Promise.reject(error.response);

Loading…
Cancel
Save