提交 99bba362 authored 作者: lihuihui's avatar lihuihui

updata

上级 cc8ce306
......@@ -11,13 +11,34 @@ export function getMyQuestion(data) {
})
}
/* 模拟考试设置角色 */
/**
* 获取我的试题详情
*/
export function getMyQuestionDetail(data) {
return httpRequest.get('/zy/v2/examination/question/detail', data)
}
/* 删除试题 */
export function deleteQuestion(data) {
return httpRequest.post('/zy/v2/examination/delete-my-question', data, {
headers: { 'Content-Type': 'multipart/form-data' }
})
}
/* 收藏试题 */
export function collectQuestion(data) {
return httpRequest.post('/zy/v2/examination/question/add', data, {
headers: { 'Content-Type': 'multipart/form-data' }
})
}
/* 意见反馈 */
export function submitFeedback(data) {
return httpRequest.post('/zy/v2/feedback/commit', data, {
headers: { 'Content-Type': 'multipart/form-data' }
})
}
// /* 获取考试状态 */
// export function getExamStatus(data) {
// return httpRequest.get('/zy/v2/examination/examination-papers-status', data, {
......
......@@ -82,6 +82,7 @@
<div class="btn right" @click="submitShowPop" v-show="!nextBtnShow && isExamEnd">交卷</div>
</div>
<div class="padd new-btn" v-else>
<div class="btn left" @click="swiper.slidePrev()" v-if="isExamEnd">返回答题</div>
<div class="btn right" @click="submitShowPop" v-if="isExamEnd">交卷</div>
</div>
</div>
......@@ -852,11 +853,6 @@ export default {
align-items: center;
height: 100%;
}
.new-btn{
.btn{
width: 100%;
}
}
.analysis{
white-space: nowrap;
margin-right: .3rem;
......
<template>
<div>
<div class="feed-box">
<div class="title">留下您的宝贵意见,我们会第一时间联系您</div>
<textarea name="" id="" v-model="contentText"></textarea>
<div class="title">您的联系方式</div>
<input type="number" v-model="mobile">
</div>
<div class="feed-btn" @click="submit">提交</div>
</div>
</template>
<script>
import * as api from '@/api/my.js'
import { Toast } from 'vant'
export default {
metaInfo: {
title: '意见反馈'
},
components: {
[Toast.name]: Toast
},
data() {
return {
contentText: '',
mobile: ''
}
},
methods: {
submit() {
if (this.contentText === '') {
Toast({ message: '请输入意见' })
return false
}
if (!/^1[34578]\d{9}$/.test(this.mobile)) {
Toast({ message: '请输入正确手机号' })
return false
}
api.submitFeedback({ title: this.mobile, contents: this.contentText }).then(res => {
Toast({ message: '已提交' })
this.contentText = ''
this.mobile = ''
})
}
}
}
</script>
<style lang="scss" scoped>
.feed-box{
padding: 0 .4rem;
.title{
color: #222;
font-size: .3rem;
line-height: 1.1rem;
font-weight: bold;
}
textarea{
padding:.1rem .2rem;
resize:none;
width:6.3rem;
height:3.77rem;
border-radius:.07rem;
border:0.01px solid rgba(204,204,204,1);
font-size:.26rem;
color:rgba(34,34,34,1);
line-height: .43rem;
}
input{
padding:0 .2rem;
outline: none;
width:6.3rem;
height:.8rem;
border-radius:.07rem;
border:.01rem solid rgba(204,204,204,1);
color:rgba(34,34,34,1);
font-size:.26rem;
}
}
.feed-btn{
position: fixed;
bottom: .4rem;
left: 50%;
-webkit-transform: translateX(-50%);
text-align: center;
line-height: .7rem;
width:6.7rem;
height:.7rem;
background:rgba(43,124,233,1);
border-radius:.12rem;
font-weight:bold;
color:rgba(255,255,255,1);
line-height: .7rem;
}
</style>
......@@ -29,10 +29,10 @@ export default {
title: '已购课程',
url: '/my/buyCourses'
},
// {
// title: '已做试题',
// url: '/my/exam'
// }
{
title: '已做试题',
url: '/my/questionsList'
},
// {
// title: '已学课程',
// url: '/my/buyCourses'
......@@ -41,10 +41,10 @@ export default {
// title: '消息/通知',
// url: '/my/buyCourses'
// },
// {
// title: '意见反馈',
// url: '/my/buyCourses'
// }
{
title: '意见反馈',
url: '/my/feedback'
},
{
title: '联系客服',
url: '/my/service'
......
<template>
<div>
<div class="exam-box">
<div class="topic-box">
<swiper ref="mySwiper" :options="swiperOptions">
<template v-for="item in questionData.list">
<swiper-slide :key="item.id" :data-id="item.id">
<div id="top-view">
<div class="tool-box">
<div class="time">{{ item.sheet_time }}</div>
<div class="tool-all">
<div class="icon1"></div>
<div class="icon2"></div>
</div>
</div>
</div>
<div class="title">
<div class="type">{{ other.type[item.question_type] }}</div>
<div class="count">{{ item.num }}/{{ questionData.error_total }}</div>
</div>
<div class="topic-bt" v-if="item.question_type == '5'" v-html="item.common_content"></div>
<div class="topic" v-html="item.question_content"></div>
<ul class="option">
<template v-for="opt in item.question_options">
<li
:key="opt.id"
@click="selectOptions(item, opt)"
:class="isAnalysis && item.question_answer.find(id => { return id === opt.id })
? 'active2'
: item.user_answer.find(id => { return id === opt.id })
? 'active'
: ''"
>{{ opt.option }}</li>
</template>
</ul>
<div class="analy" v-show="isAnalysis">
<div class="tit">答案解析</div>
<div class="txt">正确答案:<span>A</span></div>
<div class="txt">您的答案:<span>A</span></div>
<div class="exp">
<p class="name">解析:</p>
<p class="nr"></p>
</div>
</div>
</swiper-slide>
</template>
</swiper>
</div>
<template>
<div class="btn-box">
<div class="padd">
<div class="analysis" @click="isAnalysis = !isAnalysis" v-if="$route.query.type == 1">查看解析</div>
<div class="btn left" @click="switchQuestions('left')">上一题</div>
<div class="btn right" @click="switchQuestions('right')" >下一题</div>
</div>
</div>
</template>
</div>
</div>
</template>
<script>
import * as api from '@/api/my.js'
import { Toast, Dialog } from 'vant'
import { Swiper, SwiperSlide, directive } from 'vue-awesome-swiper'
import 'swiper/css/swiper.css'
export default {
metaInfo: {
title: '已做试题'
},
components: {
[Toast.name]: Toast,
Swiper,
SwiperSlide,
[Dialog.name]: Dialog
},
directives: {
swiper: directive
},
data() {
const _this = this
return {
i: 1,
other: {
type: {
1: '单选题',
2: '多选题',
5: '案例题',
6: '判断题'
}
},
questionData: [],
isAnalysis: false,
swiperOptions: {
observer: true,
autoHeight: true,
on: {
slideChangeTransitionStart: function() {
_this.switchPages()
}
}
}
}
},
created() {
parseInt(this.$route.query.type) === 3 ? this.isAnalysis = true : this.isAnalysis = false
this.initData()
},
mounted() {
},
computed: {
swiper() {
return this.$refs.mySwiper.$swiper
}
},
methods: {
switchQuestions(e) {
if (e === 'left') {
this.swiper.slidePrev()
} else {
this.swiper.slideNext()
}
},
switchPages() {
parseInt(this.$route.query.type) === 3 ? this.isAnalysis = true : this.isAnalysis = false
},
selectOptions(item, opt) {
if (parseInt(item.question_type) === 1 || parseInt(item.question_type) === 6) {
item.user_answer = [opt.id]
} else {
}
},
delQuestion(id) {
const param = {
id: id,
type: this.$route.query.type
}
api.deleteQuestion(param).then(res => {
if (res.code === 0) {
Toast('删除成功')
this.initData()
}
})
},
collectQuestion() {
api.collectQuestion({ question_id: 111 }).then(res => {
if (res.code === 0) {
Toast('删除成功')
this.initData()
}
})
},
initData() {
const datas = {
error_total: 10,
list: []
}
for (let i = 0; i < 50; i++) {
const data = {
num: 1,
id: `${i}`,
question_type: '1',
question_content: 'xinjia',
common_content: null,
question_options: [
{
id: '667965608969004648412',
option: 'A选项'
},
{
id: '667965608969004648512',
option: 'B选项'
}
],
question_answer: ['667965608969004648412'],
question_analysis: '解析',
answer_count: 1,
user_answer: ['11111'],
sheet_time: '2020-07xxxx'
}
datas.list.push(data)
}
this.questionData = datas
}
}
}
</script>
<style lang="scss">
.exam-box{
.swiper-wrapper{
padding-bottom: env(safe-area-inset-bottom);
.swiper-slide{
padding-bottom: 1.2rem;
}
}
.head{
color: #222;
display: flex;
padding: .4rem 0;
align-items: center;
i{
font-size: .35rem;
margin-left: .28rem;
}
.title{
margin-left: .03rem;
font-size: .3rem;
}
}
.tool-box{
width: 6.7rem;
border-bottom: .01rem solid rgba(238,238,238,1);
padding: .35rem 0;
display: flex;
align-items: center;
margin: 0 auto;
color: #222;
.tool-all{
margin-left: auto;
display: flex;
.icon1{
width: .44rem;
height: .44rem;
background: url('../../assets/images/del.png');
background-size: 100% 100%;
margin-right: .53rem;
}
.icon2{
width: .41rem;
height: .44rem;
background: url('../../assets/images/collect.png');
background-size: 100% 100%;
}
}
.time{
font-size: .3rem;
}
.tag-box{
margin-left: auto;
display: flex;
span{
padding: .1rem .2rem;
font-size: .2rem;
color: #fff;
background: #67A8FF;
border-radius: .25rem;
margin-left: .2rem;
}
.active{
background: #FF8000;
}
}
}
.topic-box{
width: 100%;
margin: 0 auto;
font-size: .3rem;
color: #222;
overflow-y: scroll;
.title{
padding: .4rem;
display: flex;
align-items: center;
.count{
margin-left: auto;
}
}
.topic{
font-size: .26rem;
line-height: .4rem;
padding: 0 .4rem;
span{
width: 100%;
display: block;
}
img{
width: 100%;
display: block;
}
}
.topic-bt{
font-size: .26rem;
line-height: .4rem;
padding: 0 .4rem;
font-weight: bold;
margin-bottom: .2rem;
span{
width: 100%;
display: block;
}
img{
width: 100%;
display: block;
}
}
.option{
list-style: none;
margin: .35rem 0 0 0;
padding: 0 .4rem;
li{
background:rgba(247,247,247,1);
border-radius: .2rem;
font-weight: bold;
padding: .35rem .2rem;
margin-bottom: .2rem;
word-wrap:break-word;
}
.active{
color: #fff;
background:#67A8FF;
}
.active2{
color: #fff;
background:#67C23A;
}
}
.analy{
font-size: .3rem;
color: #222;
padding: 0.2rem .4rem 1.2rem .4rem;
.tit{
font-weight: bold;
line-height: 100%;
}
.txt{
line-height: 100%;
margin-top: .4rem;
span{
font-weight: bold;
}
}
.exp{
margin-top: .4rem;
overflow: hidden;
p{
float: left;
}
.nr{
width: 5.8rem;
p{
width: 100%;
}
img{
width: 100%;
}
}
}
}
}
.topic-box.hide{
overflow: hidden;
}
.btn-box{
position: fixed;
bottom: 0;
left: 0;
height: 1rem;
box-shadow:0px 0px 6px 0px rgba(0,0,0,0.05);
background: #fff;
color: #222;
font-size: .3rem;
width: 100%;
z-index: 99;
padding-bottom: env(safe-area-inset-bottom);
.padd{
display: flex;
padding: 0 .4rem;
align-items: center;
height: 100%;
}
.analysis{
white-space: nowrap;
margin-right: .3rem;
}
.btn{
width:2.4rem;
height:.7rem;
background:rgba(43,124,233,1);
border-radius:.12rem;
text-align: center;
line-height: .7rem;
color: #fff;
}
.left{
margin-right: .4rem;
}
.right{
margin-left: auto;
// background:rgba(255,103,103,1);
}
}
.exam_submit{
position: fixed;
top: 0;
left: 0;
z-index: 999999;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.6);
.pop{
width: 5.9rem;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%,-50%);
background:rgba(255,255,255,1);
border-radius:.12rem;
padding: 0.4rem 0;
.tit{
font-weight:bold;
color:rgba(34,34,34,1);
font-size:.3rem;
text-align: center;
line-height: 100%;
}
.txt{
color:rgba(34,34,34,1);
font-size:.3rem;
text-align: center;
line-height: 100%;
margin-top: .8rem;
}
.btn_box{
padding:0 0.2rem;
display: flex;
margin-top: .8rem;
.btn{
width:2.6rem;
height:.7rem;
background:rgba(43,124,233,1);
border-radius:.12rem;
text-align: center;
line-height: .7rem;
color: #fff;
font-size: .3rem;
}
.btn2{
margin-left: auto;
}
}
}
}
.exam-end-pop{
position: fixed;
top: 0;
left: 0;
z-index: 999999;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.6);
.pop{
width: 5.9rem;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%,-50%);
background:rgba(255,255,255,1);
border-radius:.12rem;
padding: .4rem 0;
.tit{
font-size: .3rem;
color: #222;
text-align: center;
font-weight: bold;
}
img{
width: 1.59rem;
height: 1.35rem;
display: block;
margin: 0.4rem auto 0.2rem auto;
}
.txt{
color: #222;
font-size: .3rem;
line-height: 100%;
text-align: center;
}
.btn{
margin: .4rem auto 0 auto;
width:5.5rem;
height:.7rem;
background:rgba(255,103,103,1);
border-radius:.12rem;
text-align: center;
line-height: .7rem;
color: #fff;
font-size: .3rem;
}
}
}
}
</style>
......@@ -24,26 +24,22 @@
<div class="question-box" id="bottom-view">
<ul>
<template v-for="(item, index) in question.list">
<template v-if="screen.screenVal == 0">
<li :key="index" v-if="item.is_right == '0'">
<img src="../../assets/images/que-type1.png" alt="" v-if="item.question_type == '6'">
<img src="../../assets/images/que-type2.png" alt="" v-if="item.question_type == '5'">
<img src="../../assets/images/que-type3.png" alt="" v-if="item.question_type == '2'">
<img src="../../assets/images/que-type4.png" alt="" v-if="item.question_type == '1'">
<div class="text">{{ item.question.question_content }}</div>
<div class="del" @click="del(item.id)">删除</div>
</li>
</template>
<template v-else>
<li :key="index" v-if="item.is_right == '0' && item.question_type == screen.screenVal">
<img src="../../assets/images/que-type1.png" alt="" v-if="item.question_type == '6'">
<img src="../../assets/images/que-type2.png" alt="" v-if="item.question_type == '5'">
<img src="../../assets/images/que-type3.png" alt="" v-if="item.question_type == '2'">
<img src="../../assets/images/que-type4.png" alt="" v-if="item.question_type == '1'">
<div class="text">{{ item.question.question_content }}</div>
<div class="del" @click="del(item.id)">删除</div>
</li>
</template>
<li :key="index" @click="listClick(item.question_id)">
<img src="../../assets/images/que-type1.png" alt="" v-if="item.question_type == '6'">
<img src="../../assets/images/que-type2.png" alt="" v-if="item.question_type == '5'">
<img src="../../assets/images/que-type3.png" alt="" v-if="item.question_type == '2'">
<img src="../../assets/images/que-type4.png" alt="" v-if="item.question_type == '1'">
<div class="text">{{ item.question_content }}</div>
<template v-if="!batchDel.selectShow">
<div class="del">
<div class="dels" @click.prevent.stop.stop="del(item.question_id)"></div>
<div :class="item.is_collection ? 'collect active' : 'collect'" @click.prevent.stop.stop="collectQuestion(item.question_id)"></div>
</div>
</template>
<template v-else>
<div :class="batchDel.countData.find(id => { return id === item.question_id }) ? 'opt active' : 'opt'"></div>
</template>
</li>
</template>
</ul>
<div class="loading" v-if="isLogding">
......@@ -58,9 +54,21 @@
show-toolbar
:columns="screen.columns"
@confirm="onConfirm"
@cancel="onCancel"
/>
</div>
</div>
<div class="btn-box">
<template v-if="!batchDel.selectShow">
<div class="w-btn" @click="batchToolShow">批量管理</div>
<div class="w-btn col">删除</div>
</template>
<template v-else>
<div class="z-btn" @click="batchDel.selectShow = false">返回</div>
<div class="z-btn mar" @click="allSelect">{{ batchDel.countData.length === question.list.length ? '取消全选' : '全选' }}</div>
<div :class="!batchDel.isDelBtn ? 'z-btn col' : 'z-btn'" @click="batchDelClick">删除</div>
</template>
</div>
</div>
</template>
......@@ -68,11 +76,19 @@
import * as api from '@/api/my.js'
import { Toast } from 'vant'
export default {
metaInfo: {
title: '已做试题'
},
components: {
[Toast.name]: Toast
},
data() {
return {
batchDel: {
selectShow: false,
isDelBtn: false,
countData: []
},
screen: {
isShow: false,
checkedText: '全部',
......@@ -86,82 +102,186 @@ export default {
changeGroup: false,
isLogding: false,
params: {
is_error: 1,
type: 1,
page: 1,
page_size: 20
page_size: 50
},
scrollFlag: false
}
},
methods: {
batchToolShow() {
this.question.list.length ? this.batchDel.selectShow = true : Toast('没有可操作项')
},
batchDelClick() {
this.batchDel.isDelBtn ? this.del(this.batchDel.countData) : Toast('请选择删除内容')
},
allSelect() {
if (this.batchDel.countData.length === this.question.list.length) {
this.batchDel.countData = []
this.batchDel.isDelBtn = false
} else {
this.batchDel.countData = []
this.question.list.map(item => {
this.batchDel.countData.push(item.question_id)
})
this.batchDel.isDelBtn = true
}
},
listClick(id) {
this.batchDel.selectShow ? this.selectOpt(id) : this.onCancel()
// this.$router.push({
// path: '/my/questionsDetails',
// query: {
// id: id,
// isError: this.params.is_error
// }
// })
},
selectOpt(id) {
const isArr = this.batchDel.countData.findIndex(item => { return item === id })
const length = this.batchDel.countData.length
length === 0
? this.batchDel.countData.push(id)
: isArr === -1
? this.batchDel.countData.push(id)
: this.batchDel.countData.splice(isArr, 1)
this.batchDel.countData.length === 0
? this.batchDel.isDelBtn = false
: this.batchDel.isDelBtn = true
},
onCancel() {
this.screen.isShow = false
},
handleScroll(e) {
const scrollTop = e.target.scrollTop
const eScroll = e.target.scrollHeight - (document.getElementsByTagName('body')[0].offsetHeight - document.getElementById('top-view').offsetHeight)
console.log(this.scrollFlag)
const contentH = document.getElementsByTagName('body')[0].offsetHeight
const clientH = document.documentElement.clientHeight
const pageScrollH = document.documentElement.scrollTop || document.body.scrollTop
if (this.scrollFlag) { return false }
if (scrollTop === eScroll) {
if (contentH - clientH === pageScrollH) {
this.scrollFlag = true
this.isLogding = true
this.params.page = this.params.page + 1
this.initData()
}
},
scrollDom() {
const topViewH = document.getElementById('top-view').offsetHeight
const clientHeight = document.documentElement.clientHeight
const bottomView = document.getElementById('bottom-view')
bottomView.style.height = (clientHeight - topViewH) + 'px'
},
del(id) {
api.deleteQuestion({ id: id }).then(res => {
// scrollDom() {
// const topViewH = document.getElementById('top-view').offsetHeight
// const clientHeight = document.documentElement.clientHeight
// const bottomView = document.getElementById('bottom-view')
// bottomView.style.height = (clientHeight - topViewH) + 'px'
// },
del(ids) {
const idGroup = Array.isArray(ids) ? ids : [ids]
const param = {
question_id: idGroup.toString(),
type: this.activeClass === '0' ? 1 : 3
}
api.deleteQuestion(param).then(res => {
if (res.code === 0) {
idGroup.map(id => {
const index = this.question.list.findIndex(item => { return item.question_id === id })
this.question.list.splice(index, 1)
})
if (this.question.list.length === 0) {
this.clear()
}
this.batchDel.isDelBtn = false
Toast('删除成功')
this.initData()
this.initData(true)
}
})
},
collectQuestion(queId) {
// const idGroup = Array.isArray(ids) ? ids : [ids]
const queIds = Array.isArray(queId) ? queId : [queId]
queIds.map(id => {
const items = this.question.list.find(item => { return item.question_id === queId })
items.is_collection ? this.removeColl(queIds, () => {
Toast('取消收藏成功')
items.is_collection = false
}) : this.addColl(queIds, () => {
Toast('收藏成功')
items.is_collection = true
})
})
},
addColl(idGroup, callback) {
api.collectQuestion({ question_id: idGroup.toString() }).then(res => {
if (res.code === 0) {
callback()
}
})
},
removeColl(idGroup, callback) {
api.deleteQuestion({ type: 2, question_id: idGroup.toString() }).then(res => {
if (res.code === 0) {
callback()
}
console.log(res)
})
},
tab(e) {
if (e === '0') {
this.params = {
is_error: 1,
type: 1,
page: 1,
page_size: 20
page_size: 50
}
} else {
this.params = {
is_error: 0,
type: 3,
page: 1,
page_size: 20
page_size: 50
}
}
this.screen.checkedText = '全部'
this.screen.screenVal = 0
this.activeClass = e
e === '0' ? this.changeGroup = false : this.changeGroup = true
this.clear()
document.getElementById('bottom-view').scrollTop = 0
this.question.list = []
this.initData()
},
onConfirm(value, index) {
const arr = [0, 1, 2, 5, 6]
const n = {
0: 0,
1: 1,
2: 2,
3: 5,
4: 6
}
this.params = {
type: this.activeClass === '0' ? 1 : 3,
question_type: n[index],
page: 1,
page_size: 50
}
this.screen.checkedText = value
this.screen.screenVal = arr[index]
this.clear()
this.screen.isShow = false
this.initData()
},
clear() {
this.batchDel.selectShow = false
this.batchDel.isDelBtn = false
this.batchDel.countData = []
this.question.list = []
},
initData() {
initData(isDel) {
api.getMyQuestion(this.params).then(res => {
res.list.map(item => {
this.question.list.push(item)
})
if (!isDel) {
res.list.map(item => {
this.question.list.push(item)
})
}
this.question.total = res.total
this.question.errorTotal = res.error_total
this.scrollDom()
// this.scrollDom()
if (res.list.length === 0) {
Toast('没有更多了')
// Toast('没有更多了')
} else {
this.scrollFlag = false
}
this.isLogding = false
this.$forceUpdate()
})
}
},
......@@ -173,10 +293,54 @@ export default {
</script>
<style lang="scss" scoped>
.btn-box{
position: fixed;
bottom: 0;
left: 0;
width:100%;
height:1rem;
background:rgba(255,255,255,1);
box-shadow:0 0 .06rem 0 rgba(0,0,0,0.05);
display: flex;
padding: 0 .4rem;
.w-btn{
width:3rem;
height:.7rem;
background:rgba(43,124,233,1);
border-radius:.12rem;
font-size:.3rem;
text-align: center;
line-height: .7rem;
color:rgba(255,255,255,1);
margin-top: .15rem;
}
.z-btn{
width:2.1rem;
height:.7rem;
background:rgba(43,124,233,1);
border-radius:.12rem;
font-size: .3rem;
text-align: center;
line-height: .7rem;
margin: .15rem 0;
color: #fff;
}
.z-btn.mar{
margin: .15rem .2rem;
}
.z-btn.col{
background:rgba(247,247,247,1);
color:rgba(204,204,204,1);
}
.w-btn.col{
background:rgba(247,247,247,1);
color:rgba(204,204,204,1);
margin-left: .7rem;
}
}
.top-tab{
width: 6.7rem;
height: 1.76rem;
border-bottom: 0.01rem solid #eee;
margin: 0 auto;
display: flex;
.btn{
......@@ -213,10 +377,12 @@ export default {
.exam-con{
padding: 0 .4rem;
.sele{
border-bottom: 0.01rem solid #eee;
height: 1.06rem;
display: flex;
align-items: center;
font-weight: bold;
margin-top: .4rem;
.title{
font-size: .26rem;
color: #222;
......@@ -247,11 +413,12 @@ export default {
overflow-y: scroll;
padding: 0 .4rem;
ul{
padding-bottom: 1rem;
li{
position: relative;
border-bottom: 0.01rem solid #eee;
display: flex;
padding-bottom: .4rem;
margin-bottom: .4rem;
padding: .4rem 0;
img{
width: .48rem;
height: .6rem;
......@@ -269,6 +436,38 @@ export default {
font-size:.26rem;
color: #999;
line-height: 100%;
.dels{
width: .41rem;
height: .44rem;
background: url('../../assets/images/del.png');
background-size: 100% 100%;
}
.collect{
width: .44rem;
height: .44rem;
background: url('../../assets/images/collect.png');
background-size: 100% 100%;
margin-top: .2rem;
}
.active{
background: url('../../assets/images/collect2.png');
background-size: 100% 100%;
}
}
.opt{
position: absolute;
top: 50%;
right: 0;
-webkit-transform: translateY(-50%);
width:.44rem;
height:.44rem;
background:rgba(204,204,204,1);
border-radius: 50%;
}
.opt.active{
background: url('../../assets/images/zq-icon.png');
background-size: 100% 100%;
background-color: none;
}
}
}
......
......@@ -10,10 +10,12 @@
<div class="num">
¥
<span>199</span>.00
<!-- <i>课程有效期剩余30天</i> -->
</div>
<div class="btn" @click="goPay" v-if="orderStatus === 100">立即购买</div>
<div class="btn active" v-if="orderStatus === 1" @click="goHome">已购买</div>
<div class="btn" v-if="orderStatus === -1" @click="goMyOrder">待支付</div>
<!-- <div class="btn xf" @click="goMyOrder">续费</div> -->
</div>
<pay-we-chart :requestParam="requestParam"></pay-we-chart>
</div>
......@@ -119,6 +121,10 @@ export default {
.num {
font-size: 0.26rem;
color: #ff6767;
font-weight: bold;
i{
font-weight: normal;
}
span {
font-size: 0.4rem;
}
......@@ -134,6 +140,11 @@ export default {
font-size: 0.3rem;
margin: 0.15rem 0;
}
.xf {
width:2.51rem;
height:.7rem;
background:rgba(198,24,24,1);
}
.active {
background: #ccc;
}
......
......@@ -112,9 +112,16 @@ export default [
},
// 我的-已做试题
{
path: '/my/exam',
name: 'examQuestions',
component: () => import('../pages/my/examQuestions.vue'),
path: '/my/questionsList',
name: 'questionsList',
component: () => import('../pages/my/questionsList.vue'),
meta: { requiredLogin: true }
},
// 我的-已做试题详情
{
path: '/my/questionsDetails',
name: 'questionsDetails',
component: () => import('../pages/my/questionsDetails.vue'),
meta: { requiredLogin: true }
},
// 我的-发票页面
......@@ -124,11 +131,18 @@ export default [
component: () => import('../pages/my/invoice.vue'),
meta: { requiredLogin: true }
},
// 我的-联系客服
{
path: '/my/service',
name: 'myService',
component: () => import('../pages/my/service.vue')
},
// 我的-意见反馈
{
path: '/my/feedback',
name: 'myFeedback',
component: () => import('../pages/my/feedback.vue')
},
// 支付
{
path: '/pay',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论