提交 6b729b22 authored 作者: zhengyadong's avatar zhengyadong

Merge branch 'master' into zyd

......@@ -7,11 +7,17 @@
}
}],
"stage-2"
]
// "plugins": ["transform-vue-jsx", "transform-runtime",
// ["import", {
// "libraryName": "vant",
// "libraryDirectory": "es",
// "style": true
// }]]
],
"plugins": ["transform-vue-jsx", "transform-runtime",
["import", {
"libraryName": "vant",
"libraryDirectory": "es",
"style": true
}]],
"env": {
"test": {
"presets": ["env", "stage-2"],
"plugins": ["transform-vue-jsx", "istanbul"]
}
}
}
......@@ -23,7 +23,7 @@ module.exports = {
// Various Dev Server settings
host: '192.168.2.39', // can be overwritten by process.env.HOST
host: '192.168.2.40', // can be overwritten by process.env.HOST
port: 8082, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
errorOverlay: true,
......
......@@ -13,9 +13,9 @@
data() {
return {
link:[
{tit:'首页',icon:'../../static/img/home.png',iconHover:'../../static/img/home-h.png',curLink:'/'},
{tit:'留言板',icon:'../../static/img/massage.png',iconHover:'../../static/img/massage-h.png',curLink:''},
{tit:'我的',icon:'../../static/img/me.png',iconHover:'../../static/img/me-h.png',curLink:'/my'},
{tit:'首页',icon:'./static/img/home.png',iconHover:'./static/img/home-h.png',curLink:'/'},
{tit:'留言板',icon:'./static/img/massage.png',iconHover:'./static/img/massage-h.png',curLink:''},
{tit:'我的',icon:'./static/img/me.png',iconHover:'./static/img/me-h.png',curLink:'/my'},
],
}
},
......
<template>
<!-- 'url(' + (coverImgUrl ? coverImgUrl : baseImg) + ')'-->
<div class="header" :style="{backgroundImage:$route.name=='lineStudy'?'url(../../static/img/top-bg.png)':'',backgroundColor:$route.name=='play'?'':($route.name.indexOf('my')>=0?'#2A80FB':'#02BCBE')}">
<div class="header" :style="{backgroundImage:$route.name=='lineStudy'?'url(./static/img/top-bg.png)':'',backgroundColor:$route.name=='play'?'':($route.name.indexOf('my')>=0?'#2A80FB':'#02BCBE')}">
<h1 v-if="$route.meta!='视频播放'">{{$route.meta.title||$route.meta}}</h1>
<div class="headerB">
<span @click="backBtn"><img src="../assets/img/public/left.png" alt=""></span>
<h2 v-if="$route.name=='play'" @click="collectionV"><img :src="`../../../static/img/icon_soucang_${isColl?'sel':'nor'}.png`" alt=""></h2>
<h2 v-if="$route.name=='play'" @click="collectionV"><img :src="`./static/img/icon_soucang_${isColl?'sel':'nor'}.png`" alt=""></h2>
</div>
</div>
</template>
......
<template>
<div class="noBgHeader" :style="{backgroundImage: `url(../../static/img/${$route.name}.jpg)`}">
<div class="noBgHeader" :style="{backgroundImage: `url(./static/img/${$route.name}.jpg)`}">
<h1>{{$route.meta.title||$route.meta}}</h1>
<div class="headerB">
<span @click="$router.go(-1)"><img src="../assets/img/public/left.png" alt=""></span>
......
......@@ -69,10 +69,13 @@ let router = new Router({
{
path: '/mychangeUnit',
name: 'mychangeUnit',
meta:'更改单位',
/*meta:'更改单位',*/
meta: {
title: "更改单位",
},
component: () => import('@/views/changeUnit/index.vue'),
},
{
/*{
path: '/myAnswerlogs',
name: 'myAnswerlogs',
meta: {
......@@ -80,7 +83,7 @@ let router = new Router({
// isLogin: true
},
component: () => import('@/views/answerLogs/index.vue'),
},
},*/
{
path: '/myWrongbook',
name: 'myWrongbook',
......@@ -115,6 +118,7 @@ let router = new Router({
title: "收藏课件",
keepAlive: true, //此组件需要被缓存
isBack:false, //用于判断上一个页面是哪个
isLogin: true,
},
component: () => import('@/views/courseware/index.vue'),
},
......@@ -127,38 +131,62 @@ let router = new Router({
{
path: '/weekPractice',
name: 'weekPractice',
meta:'周周练',
/*meta:'周周练',*/
meta: {
title: "周周练",
isLogin: true
},
component: () => import('@/views/weekPractice/index.vue'),
},
{
path: '/practice',
name: 'practice',
meta:'周周练试卷',
component: () => import('@/views/weekPractice/practice.vue')
/*meta:'周周练试卷',*/
meta: {
title: "周周练试卷",
isLogin: true
},
component: () => import('@/views/weekPractice/practice.vue'),
},
{
path: '/viewPracticeReport',
name: 'viewPracticeReport',
meta:'答题报告',
/*meta:'答题报告',*/
meta: {
title: "答题报告",
isLogin: true
},
component: () => import('@/views/weekPractice/viewPracticeReport.vue'),
},
{
path: '/moonMatch',
name: 'moonMatch',
meta:'月月赛',
/*meta:'月月赛',*/
meta: {
title: "月月赛",
isLogin: true
},
component: () => import('@/views/moonMatch/index.vue'),
},
{
path: '/match',
name: 'match',
meta:'月月赛试卷',
/*meta:'月月赛试卷',*/
meta: {
title: "月月赛试卷",
isLogin: true
},
component: () => import('@/views/moonMatch/match.vue'),
},
{
path: '/answerRecord',
name: 'answerRecord',
meta:'答题记录',
/*meta:'答题记录',*/
meta: {
title: "答题记录",
isLogin: true
},
component: () => import('@/views/answerRecord/index.vue'),
},
]
......
......@@ -75,7 +75,7 @@
.answerLogs {
width: 3.75rem;
height: 100%;
background: url("../../../static/img/myAnswerlogs.jpg") no-repeat #f3f3f3;
background: url("./static/img/myAnswerlogs.jpg") no-repeat #f3f3f3;
background-size: contain;
margin: 0;
padding: 0;
......
......@@ -9,7 +9,7 @@
finished-text="——这是我的底线——"
@load="onLoad">
<li v-for="(item,index) in list" :key="index" @click="linkDetails(item)">
<div class="title"><img :src="`../../../static/img/${item.resourceType==5?'video':'pdf'}.png`" alt="">
<div class="title"><img :src="`./static/img/${item.resourceType==5?'video':'pdf'}.png`" alt="">
<h1>{{item.name}}</h1></div>
<p v-if="item.test">{{item.test}}</p>
</li>
......@@ -120,7 +120,6 @@
},
activated() {
console.log('离开')
if(!this.$route.meta.isBack|| this.isFirstEnter){
this.list=[];// 把数据清空,可以稍微避免让用户看到之前缓存的数据
// 如果isBack是false,表明需要获取新数据,否则就不再请求,直接使用缓存的数据
......
......@@ -4,7 +4,7 @@
<div v-if="pdfAndPath" v-html="iframeHtml" style="width:100%;height:100%" >
</div>
<ul class="back_btn">
<li @click="collection"><img :src="`../../../static/img/icon_soucang_${isColl?'sel':'nor'}.png`" alt=""></li>
<li @click="collection"><img :src="`./static/img/icon_soucang_${isColl?'sel':'nor'}.png`" alt=""></li>
<li @click="goBack"><img src="../../assets/img/public/fanhui.png" alt=""></li>
</ul>
<!-- <iframe id='previewPdf' :src="'/static/pdf/web/viewer.html?file=' + `${this.domain}/${this.pdfAndPath}`" height="100%"
......@@ -74,7 +74,8 @@ export default {
if(this.isColl){
api=delCollectionAPI;
data={
goodsId:this.$route.query.id
goodsId:this.$route.query.id,
objectType:5,
};
}else{
api=addCollectionAPI;
......
......@@ -5,7 +5,7 @@
<div class="cont1">
<div class="wrongNum">
<h1>{{total}}</h1>
<h2>题数</h2>
<h2>题数</h2>
</div>
<div class="allWrong">全部收藏<img src="../../assets/img/my/user_icon_jiantou_black.png" alt=""></div>
</div>
......
......@@ -27,7 +27,7 @@
<li class="height2">
<h1>单位名称</h1>
<div class="behind" @click="$router.push('/mychangeUnit')">
<h2>{{userMssage.unitName}}</h2>
<h2 style="text-align: right;">{{userMssage.unitName}}</h2>
</div>
</li>
<li class="heightAuto">
......@@ -91,6 +91,7 @@
import {Icon, List, NavBar,Picker,Toast} from "vant";
import $ from 'jquery';
import defoultHead from '../../assets/img/my/head.png';
import Cookies from 'js-cookie';
export default {
name: 'HelloWorld',
......@@ -138,7 +139,6 @@
this.getUserMessage();
},
mounted() {
this.getJob();
},
watch: {
......@@ -221,6 +221,8 @@
if(res.data.status){
this.userMssage=res.data.data;
this.imgId=this.userMssage.reserve4;
this.$store.state.isFirstLogin=res.data.data.reserve5;
Cookies.set('isFirstLogin', res.data.data.reserve5);
}
})
},
......@@ -255,11 +257,13 @@
saveFn(n){
let data={...this.userMssage};
if(n==1){
this.userMssage.realName=this.user.realName;
data.realName=this.user.realName;
}
if(n==2){
this.user.reserve3=Number(this.user.age);
data.reserve3=this.user.age;
}else if(this.userMssage.reserve3&&this.userMssage.reserve3!=null&&this.userMssage.reserve3!=''){
data.reserve3=new Date().getFullYear()-Number(this.userMssage.reserve3)+1;
}
if(n==3){
data.reserve2=this.user.reserve2;
......@@ -267,17 +271,30 @@
if(n==4){
data.reserve4=this.imgId;
}
saveUsermessageAPI(data).then(res=>{
if(res.data.status){
this.curShow=null;
this.isShow=false;
if(n==1){
this.userMssage.realName=this.user.realName;
}
if(n==2){
this.userMssage.reserve3=new Date().getFullYear()-Number(this.user.age)+1;
}
this.userMssage.reserve2=data.reserve2;
}
})
},
},
beforeDestroy() {
this.getUserMessage();
/*this.$store.state.isFirstLogin=res.data.data.reserve5;
Cookies.set('isFirstLogin', res.data.data.reserve5);*/
},
/*reserve5==0 Cookies.set('isFirstLogin', '');*/
}
</script>
......@@ -309,7 +326,8 @@
display: flex;
justify-content: space-between;
align-items: center;
min-width: .24rem;
min-height: .2rem;
img {
width: .45rem;
object-fit: cover;
......@@ -323,6 +341,7 @@
color: #000000;
font-size: .15rem;
font-weight: normal;
/*overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;*/
......
......@@ -21,7 +21,7 @@
finished-text="——这是我的底线——"
@load="onLoad">
<li v-for="(item,index) in list" :key="index" @click="linkDetails(item)">
<div class="title"><img :src="`../../../static/img/${item.type==6?'video':'pdf'}.png`" alt="">
<div class="title"><img :src="`./static/img/${item.type==6?'video':'pdf'}.png`" alt="">
<h1>{{item.name}}</h1></div>
<p v-if="item.test">{{item.test}}</p>
</li>
......
......@@ -12,7 +12,7 @@
<li>
<img src="../../assets/img/my/password.png" alt="">
<input type="text" placeholder="请输入验证码" v-model="imgCode">
<span><img :src="img" alt=""></span>
<span @click="getImgCode"><img :src="img" alt=""></span>
</li>
<li>
<img src="../../assets/img/my/yzm.png" alt="">
......@@ -76,6 +76,7 @@
},
methods: {
getImgCode() {
console.log()
getImgCodeAPI().then(res => {
if (res.data.img) {
this.img = res.data.img;
......@@ -117,7 +118,7 @@
this.interval = setInterval(() => {
self.second--
/*this.addBtnFlag = false*/
if (self.second === 0) {
if (self.second == 0) {
clearInterval(self.interval)
/*this.addBtnFlag = true*/
}
......@@ -158,6 +159,9 @@
}
},
},
destroyed() {
clearInterval(this.interval)
},
}
</script>
......
......@@ -10,7 +10,7 @@
</div>
<ul class="cont1">
<li v-for="(item,index) in liList" :key="index" class="publicMY">
<img :src="`../../../static/img/${item.icon}.png`" alt="" class="icon">
<img :src="`./static/img/${item.icon}.png`" alt="" class="icon">
<div class="word" @click="$router.push(item.link)">
<h1>{{item.name}}</h1>
<img src="../../assets/img/my/icon_jiantou.png" alt="">
......@@ -20,7 +20,7 @@
<div class="cont2">
<div class="publicMY">
<img src="../../../static/img/icon_gerenziliao.png" alt="" class="icon">
<img :src="`./static/img/icon5.png`" alt="" class="icon">
<div class="word" @click="$router.push('/myCompletion')">
<h1>修改个人信息</h1>
<img src="../../assets/img/my/icon_jiantou.png" alt="">
......
......@@ -41,7 +41,8 @@
if(this.isColl){
api=delCollectionAPI;
data={
videoId:this.$route.query.id
videoId:this.$route.query.id,
objectType:6,
};
}else{
api=addCollectionAPI;
......
......@@ -21,7 +21,7 @@
<ul>
<li v-for="(item,index) in liList" :key="index">
<h3 :class="`color-div${index%6+1}`">{{index<9?'0'+(index+1):index+1}}</h3>
<!--<img :src="`../../../static/img/icon_0${index+1}.png`" alt="">-->
<!--<img :src="`./static/img/icon_0${index+1}.png`" alt="">-->
<div class="word">
<p><span>{{item.codeZh}}</span> <span>{{item.num}}道题</span></p>
<h2 @click="toView(item)">查看</h2><!--code-->
......@@ -78,7 +78,7 @@
<style scoped lang="scss">
.wrongBook {
width: 100%;
/*height:100%;*/
/* height:100%;*/
background: url("../../../static/img/myWrongbook.jpg") no-repeat #f3f3f3;
background-size: contain;
min-height: 100%;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论