提交 ab64d60d authored 作者: 王鹏飞's avatar 王鹏飞

fix: 调整发送验证码字段

上级 34fff3a2
...@@ -80,7 +80,9 @@ export default { ...@@ -80,7 +80,9 @@ export default {
/* 老版发送验证码 */ /* 老版发送验证码 */
mobile: this.setAccount.user, mobile: this.setAccount.user,
/* 新版发送验证码 */ /* 新版发送验证码 */
account: this.setAccount.user account: this.setAccount.user,
signName: 'wmp',
template: 'SMS_200181319'
}).then(res => { }).then(res => {
/* 发送验证码不管是否成功,都开始倒计时 */ /* 发送验证码不管是否成功,都开始倒计时 */
let time = 60 let time = 60
......
...@@ -122,7 +122,7 @@ export default { ...@@ -122,7 +122,7 @@ export default {
/* 发送验证码 */ /* 发送验证码 */
sendCode () { sendCode () {
if (!this.isSendCode) { if (!this.isSendCode) {
Login.sendResetPwdCode({ account: this.accountSet.account }).then(res => { Login.sendResetPwdCode({ account: this.accountSet.account, signName: 'wmp', template: 'SMS_200191908' }).then(res => {
if (res.code === 0) { if (res.code === 0) {
/* 发送验证码不管是否成功,都开始倒计时 */ /* 发送验证码不管是否成功,都开始倒计时 */
let time = 60 let time = 60
......
<template> <template>
<div> <div>
<template v-if="newLiveMsg.live"> <template v-if="newLiveMsg.live">
<div class="live-msg"> <div class="live-msg">
<div class="txt">直播提醒:</div> <div class="txt">直播提醒:</div>
<div class="txt">您的直播课程 《{{newLiveMsg.course_name}}》 将于 {{newLiveMsg.live.start_time}} 开始</div> <div class="txt">您的直播课程 《{{newLiveMsg.course_name}}》 将于 {{newLiveMsg.live.start_time}} 开始</div>
<el-button class="in-btn" type="primary" size="small" round @click="goLive">进入直播</el-button> <el-button class="in-btn" type="primary" size="small" round @click="goLive">进入直播</el-button>
</div> </div>
</template> </template>
<!-- <div class="con-title">{{ $t('pages.learn.course.title') }}</div> --> <!-- <div class="con-title">{{ $t('pages.learn.course.title') }}</div> -->
<div class="tab-box"> <div class="tab-box">
<template v-for="(item, index) in find"> <template v-for="(item, index) in find">
<div class="tap-box" :key="index"> <div class="tap-box" :key="index">
<div class="name">{{ item.name }}</div> <div class="name">{{ item.name }}</div>
<ul> <ul>
<template v-for="(item1, index1) in item.arrItem"> <template v-for="(item1, index1) in item.arrItem">
<li :class="['tab', (item.selectIndex == index1 ? 'active' : '')]" @click="selFindSelect" :key="index1" :data-index='index1' :data-i="index" :data-key='item.key' :data-val='item1.val'>{{item1.name}}</li> <li
:class="['tab', (item.selectIndex == index1 ? 'active' : '')]"
@click="selFindSelect"
:key="index1"
:data-index="index1"
:data-i="index"
:data-key="item.key"
:data-val="item1.val"
>{{item1.name}}</li>
</template> </template>
</ul> </ul>
</div> </div>
</template> </template>
</div> </div>
<!-- <div class="con-box"> <!-- <div class="con-box">
<template v-for="(item, index) in find"> <template v-for="(item, index) in find">
<ul v-bind:key="index" class="tabs-list" v-if="index != 0"> <ul v-bind:key="index" class="tabs-list" v-if="index != 0">
<li class="tabs-hd">{{item.name}}</li> <li class="tabs-hd">{{item.name}}</li>
...@@ -32,66 +40,59 @@ ...@@ -32,66 +40,59 @@
</template> </template>
</ul> </ul>
</template> </template>
</div> --> </div>-->
<!-- <div class="switch-box"> <!-- <div class="switch-box">
<el-button type="info" size="medium" @click="studyEarlyUpdate" plain>{{ $t('pages.learn.course.lastLearn') }}<i :class="['el-icon-caret-' + (filter.studyEarly == 'down' ? 'bottom' : 'top'), 'icon']"></i></el-button> <el-button type="info" size="medium" @click="studyEarlyUpdate" plain>{{ $t('pages.learn.course.lastLearn') }}<i :class="['el-icon-caret-' + (filter.studyEarly == 'down' ? 'bottom' : 'top'), 'icon']"></i></el-button>
<el-button type="info" size="medium" @click="selectTimeUpdate" plain>{{ $t('pages.learn.course.updateTime') }}<i :class="['el-icon-caret-' + (filter.selectTime == 'down' ? 'bottom' : 'top'), 'icon']"></i></el-button> <el-button type="info" size="medium" @click="selectTimeUpdate" plain>{{ $t('pages.learn.course.updateTime') }}<i :class="['el-icon-caret-' + (filter.selectTime == 'down' ? 'bottom' : 'top'), 'icon']"></i></el-button>
</div> --> </div>-->
<div class="new-height"> <div class="new-height">
<div class="study-title">我的学习</div> <div class="study-title">我的学习</div>
<div class="con-box"> <div class="con-box">
<ul class="course-list"> <ul class="course-list">
<template v-for="(item, index) in homeList"> <template v-for="(item, index) in homeList">
<li v-bind:key="index" class="item"> <li v-bind:key="index" class="item">
<div class="left-pic"> <div class="left-pic">
<template v-if="item.src"> <img :src="item.src" @click="goCourseContent(item)" v-if="item.src" />
<template v-if="userInfo.is_open_course == 0">
<img :src="item.src" alt="" @click="goCourseContent" :data-cid='item.id' :data-sid='item.sid'>
</template>
<template v-else> <template v-else>
<img :src="item.src" alt=""> <div class="no-img">
<i class="el-icon-self-13"></i>
</div>
</template> </template>
</template>
<template v-else>
<div class="no-img"><i class="el-icon-self-13"></i></div>
</template>
</div>
<div class="right-bd">
<template v-if="userInfo.is_open_course == 0">
<div class="title" @click="goCourseContent" :data-cid='item.id' :data-sid='item.sid'>{{item.title}}</div>
</template>
<template v-else>
<div class="title">{{item.title}}</div>
</template>
<div class="tags">
<template v-for="(item1, index) in item.arrTab">
<span v-bind:key="index">{{item1}}</span>
</template>
</div>
<div class="time">
{{item.status}}&emsp;&emsp;<em>{{item.time}}</em>
</div> </div>
<!-- <div class="progress"> <div class="right-bd">
<div class="title" @click="goCourseContent(item)">{{item.title}}</div>
<div class="tags">
<template v-for="(item1, index) in item.arrTab">
<span v-bind:key="index">{{item1}}</span>
</template>
</div>
<div class="time">
{{item.status}}&emsp;&emsp;
<em>{{item.time}}</em>
</div>
<!-- <div class="progress">
{{ $t('pages.learn.course.progress') }}&emsp;<el-progress :percentage="item.progress > 99.5 ? 100 : item.progress" color="#b49441"></el-progress> {{ $t('pages.learn.course.progress') }}&emsp;<el-progress :percentage="item.progress > 99.5 ? 100 : item.progress" color="#b49441"></el-progress>
</div> --> </div>-->
<div class="right-sel">{{item.myStatus}}</div> <div class="right-sel">{{item.myStatus}}</div>
<template v-if="userInfo.is_open_course == 0"> <el-button
<el-button class="in-btn" type="primary" size="small" round @click="goCourseContent" :data-cid='item.id' :data-sid='item.sid'>{{ $t('pages.learn.course.showCourse') }}</el-button> class="in-btn"
</template> type="primary"
<template v-else> size="small"
<el-button v-if="!!(userInfo.open_course_id.find(ids => { return ids == item.id }))" class="in-btn" type="primary" size="small" round @click="goCourseContent" :data-cid='item.id' :data-sid='item.sid'>{{ $t('pages.learn.course.showCourse') }}</el-button> round
</template> @click="goCourseContent(item)"
</div> v-show="canOpenCourse(item)"
</li> >{{ $t('pages.learn.course.showCourse') }}</el-button>
</template> </div>
<template v-if="!homeList.length"> </li>
<div class='no-data'>{{ $t('pages.learn.course.noCourseStr') }}</div> </template>
</template> <template v-if="!homeList.length">
</ul> <div class="no-data">{{ $t('pages.learn.course.noCourseStr') }}</div>
</template>
</ul>
</div>
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
...@@ -99,24 +100,26 @@ import cAction from '@action' ...@@ -99,24 +100,26 @@ import cAction from '@action'
const UserInfo = window.G.UserInfo.student_info || {} const UserInfo = window.G.UserInfo.student_info || {}
export default { export default {
components: {}, components: {},
data () { data() {
return { return {
userInfo: {}, userInfo: {},
filter: { filter: {
studyEarly: 'down', studyEarly: 'down',
selectTime: 'down' selectTime: 'down'
}, },
find: [{ find: [
name: '课程类型', {
isShow: false, name: '课程类型',
selectIndex: 0, isShow: false,
key: 'course_type', selectIndex: 0,
arrItem: [ key: 'course_type',
{ val: '1', name: this.$t('action.courseAction.mustLearn'), show: UserInfo.is_open_textbook_learning }, arrItem: [
{ val: '2', name: this.$t('action.courseAction.changeLearn'), show: UserInfo.is_open_required_course }, { val: '1', name: this.$t('action.courseAction.mustLearn'), show: UserInfo.is_open_textbook_learning },
{ val: '3', name: this.$t('action.courseAction.repeatLearn'), show: UserInfo.is_open_extended_course } { val: '2', name: this.$t('action.courseAction.changeLearn'), show: UserInfo.is_open_required_course },
] { val: '3', name: this.$t('action.courseAction.repeatLearn'), show: UserInfo.is_open_extended_course }
}], ]
}
],
homeList: [], // 从后台请求 homeList: [], // 从后台请求
param: { param: {
course_type: 1, course_type: 1,
...@@ -127,7 +130,7 @@ export default { ...@@ -127,7 +130,7 @@ export default {
oneParamYype: 1 oneParamYype: 1
} }
}, },
mounted () { mounted() {
this.userInfo = UserInfo this.userInfo = UserInfo
console.log(this.userInfo, '=====') console.log(this.userInfo, '=====')
if (this.timeInterval) { if (this.timeInterval) {
...@@ -150,21 +153,30 @@ export default { ...@@ -150,21 +153,30 @@ export default {
// }).catch(e => { this.$message.error(e.message) }).finally(() => { loading.close() }) // }).catch(e => { this.$message.error(e.message) }).finally(() => { loading.close() })
this.getAjaxList(true, this.$t('pages.learn.course.noFitCourseStr')) this.getAjaxList(true, this.$t('pages.learn.course.noFitCourseStr'))
}, },
destroyed () { destroyed() {
if (this.timeInterval) { if (this.timeInterval) {
clearInterval(this.timeInterval) clearInterval(this.timeInterval)
this.timeInterval = null this.timeInterval = null
} }
}, },
methods: { methods: {
goCourseAll () { // 是否可以打开课程详情
canOpenCourse(data) {
if (this.userInfo.is_open_course) {
const ids = this.userInfo.open_course_id || []
return !!ids.find(item => item.id === data.id)
}
return true
},
goCourseAll() {
this.$router.push({ path: '/app/learn/course-all' }) this.$router.push({ path: '/app/learn/course-all' })
}, },
goCourseContent (e) { goCourseContent(data) {
const cid = e.currentTarget.dataset.cid if (this.canOpenCourse(data)) {
this.$router.push({ path: `/app/learn/course-detail/${cid}?v=${this.homeList[0].course_type}` }) this.$router.push({ path: `/app/learn/course-detail/${data.id}?v=${this.homeList[0].course_type}` })
}
}, },
getAjaxList (bool, str) { getAjaxList(bool, str) {
if (this.oneParamYype === 1) { if (this.oneParamYype === 1) {
if (Number(UserInfo.is_open_textbook_learning) === 1) { if (Number(UserInfo.is_open_textbook_learning) === 1) {
this.param.course_type = 1 this.param.course_type = 1
...@@ -175,17 +187,22 @@ export default { ...@@ -175,17 +187,22 @@ export default {
} }
this.oneParamYype++ this.oneParamYype++
} }
cAction.Course.getCourseList(bool, this.param).then(json => { cAction.Course.getCourseList(bool, this.param)
this.homeList = json .then(json => {
if (!json.length) { this.homeList = json
this.$message(str) if (!json.length) {
} this.$message(str)
}).catch(e => { this.$message.error(e.message) }).finally(() => {}) }
})
.catch(e => {
this.$message.error(e.message)
})
.finally(() => {})
}, },
/** /**
* 分类选择 - 选中某一项 * 分类选择 - 选中某一项
*/ */
selFindSelect (e) { selFindSelect(e) {
const _data = e.currentTarget.dataset const _data = e.currentTarget.dataset
const index = _data.index const index = _data.index
const json = this.find const json = this.find
...@@ -205,8 +222,8 @@ export default { ...@@ -205,8 +222,8 @@ export default {
/** /**
* 筛选 - 最近学习顺序 * 筛选 - 最近学习顺序
*/ */
studyEarlyUpdate () { studyEarlyUpdate() {
const na = (this.filter.studyEarly === 'up' ? 'down' : 'up') const na = this.filter.studyEarly === 'up' ? 'down' : 'up'
this.filter.studyEarly = na this.filter.studyEarly = na
if (na === 'down') { if (na === 'down') {
this.param.order_type = 'learn_time' this.param.order_type = 'learn_time'
...@@ -219,8 +236,8 @@ export default { ...@@ -219,8 +236,8 @@ export default {
/** /**
* 筛选 - 选修时间顺序 * 筛选 - 选修时间顺序
*/ */
selectTimeUpdate () { selectTimeUpdate() {
const na = (this.filter.selectTime === 'up' ? 'down' : 'up') const na = this.filter.selectTime === 'up' ? 'down' : 'up'
this.filter.selectTime = na this.filter.selectTime = na
if (na === 'down') { if (na === 'down') {
this.param.order_type = 'join_time' this.param.order_type = 'join_time'
...@@ -231,7 +248,7 @@ export default { ...@@ -231,7 +248,7 @@ export default {
this.getAjaxList(true, this.$t('pages.learn.course.noFitCourseStr')) this.getAjaxList(true, this.$t('pages.learn.course.noFitCourseStr'))
}, },
/* 直接进直播 */ /* 直接进直播 */
goLive () { goLive() {
this.$router.push({ path: `/player/${this.newLiveMsg.course_id}/live/${this.newLiveMsg.live.id}` }) this.$router.push({ path: `/player/${this.newLiveMsg.course_id}/live/${this.newLiveMsg.live.id}` })
} }
} }
...@@ -285,7 +302,8 @@ ul.tabs-list { ...@@ -285,7 +302,8 @@ ul.tabs-list {
background: #b49441; background: #b49441;
color: #ffffff; color: #ffffff;
} }
&:focus, &:hover { &:focus,
&:hover {
color: #b49441; color: #b49441;
background: #eeeeee; background: #eeeeee;
} }
...@@ -410,26 +428,26 @@ ul.course-list { ...@@ -410,26 +428,26 @@ ul.course-list {
} }
} }
} }
.tab-box{ .tab-box {
margin-left: 80px; margin-left: 80px;
margin-bottom: 20px; margin-bottom: 20px;
padding-top: 40px; padding-top: 40px;
} }
.con-box{ .con-box {
margin: 0; margin: 0;
padding: 20px 0; padding: 20px 0;
} }
.new-height{ .new-height {
margin: 0 40px; margin: 0 40px;
background: #fff; background: #fff;
padding: 0 40px; padding: 0 40px;
border-radius: 6px; border-radius: 6px;
} }
.study-title{ .study-title {
font-size:18px; font-size: 18px;
color:rgba(51,51,51,1); color: rgba(51, 51, 51, 1);
line-height: 65px; line-height: 65px;
border-bottom:1px solid #CCCCCC; border-bottom: 1px solid #cccccc;
} }
@media (max-width: 767px) { @media (max-width: 767px) {
...@@ -438,31 +456,31 @@ ul.course-list { ...@@ -438,31 +456,31 @@ ul.course-list {
} }
} }
.tap-box{ .tap-box {
display: flex; display: flex;
align-items: center; align-items: center;
.name{ .name {
color:rgba(51,51,51,1); color: rgba(51, 51, 51, 1);
font-size: 30px; font-size: 30px;
line-height: 100%; line-height: 100%;
} }
ul{ ul {
margin: 0; margin: 0;
padding: 0; padding: 0;
margin-left: 20px; margin-left: 20px;
display: flex; display: flex;
li:last-child{ li:last-child {
border: none; border: none;
} }
li.active{ li.active {
color: #2994EA; color: #2994ea;
} }
li{ li {
font-size:24px; font-size: 24px;
color: #999; color: #999;
list-style: none; list-style: none;
padding: 0 20px; padding: 0 20px;
border-right: 1px solid rgba(204,204,204,1); border-right: 1px solid rgba(204, 204, 204, 1);
cursor: pointer; cursor: pointer;
} }
} }
......
...@@ -189,7 +189,7 @@ export default { ...@@ -189,7 +189,7 @@ export default {
} }
if (this.vCode.flag) { if (this.vCode.flag) {
mobile.isTips = false mobile.isTips = false
cAction.Other.sendCode({ account: mobile.value, signName: '紫荆教育', template: 'SMS_200186414' }).then(res => { cAction.Other.sendCode({ account: mobile.value, signName: 'wmp', template: 'SMS_200186414' }).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.vCode.flag = false this.vCode.flag = false
this.tick() this.tick()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论