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

Merge branch 'master' into zyd

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