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

fix: 调整发送验证码字段

上级 34fff3a2
......@@ -80,7 +80,9 @@ export default {
/* 老版发送验证码 */
mobile: this.setAccount.user,
/* 新版发送验证码 */
account: this.setAccount.user
account: this.setAccount.user,
signName: 'wmp',
template: 'SMS_200181319'
}).then(res => {
/* 发送验证码不管是否成功,都开始倒计时 */
let time = 60
......
......@@ -122,7 +122,7 @@ export default {
/* 发送验证码 */
sendCode () {
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) {
/* 发送验证码不管是否成功,都开始倒计时 */
let time = 60
......
<template>
<div>
<div>
<template v-if="newLiveMsg.live">
<div class="live-msg">
<div class="txt">直播提醒:</div>
......@@ -14,7 +14,15 @@
<div class="name">{{ item.name }}</div>
<ul>
<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>
</ul>
</div>
......@@ -32,12 +40,12 @@
</template>
</ul>
</template>
</div> -->
</div>-->
<!-- <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="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="study-title">我的学习</div>
<div class="con-box">
......@@ -45,53 +53,46 @@
<template v-for="(item, index) in homeList">
<li v-bind:key="index" class="item">
<div class="left-pic">
<template 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>
<img :src="item.src" @click="goCourseContent(item)" v-if="item.src" />
<template v-else>
<img :src="item.src" alt="">
</template>
</template>
<template v-else>
<div class="no-img"><i class="el-icon-self-13"></i></div>
<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="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>
{{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>
</div> -->
</div>-->
<div class="right-sel">{{item.myStatus}}</div>
<template v-if="userInfo.is_open_course == 0">
<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>
</template>
<template v-else>
<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>
</template>
<el-button
class="in-btn"
type="primary"
size="small"
round
@click="goCourseContent(item)"
v-show="canOpenCourse(item)"
>{{ $t('pages.learn.course.showCourse') }}</el-button>
</div>
</li>
</template>
<template v-if="!homeList.length">
<div class='no-data'>{{ $t('pages.learn.course.noCourseStr') }}</div>
<div class="no-data">{{ $t('pages.learn.course.noCourseStr') }}</div>
</template>
</ul>
</div>
</div>
</div>
</div>
</template>
<script>
......@@ -99,14 +100,15 @@ import cAction from '@action'
const UserInfo = window.G.UserInfo.student_info || {}
export default {
components: {},
data () {
data() {
return {
userInfo: {},
filter: {
studyEarly: 'down',
selectTime: 'down'
},
find: [{
find: [
{
name: '课程类型',
isShow: false,
selectIndex: 0,
......@@ -116,7 +118,8 @@ export default {
{ 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: [], // 从后台请求
param: {
course_type: 1,
......@@ -127,7 +130,7 @@ export default {
oneParamYype: 1
}
},
mounted () {
mounted() {
this.userInfo = UserInfo
console.log(this.userInfo, '=====')
if (this.timeInterval) {
......@@ -150,21 +153,30 @@ export default {
// }).catch(e => { this.$message.error(e.message) }).finally(() => { loading.close() })
this.getAjaxList(true, this.$t('pages.learn.course.noFitCourseStr'))
},
destroyed () {
destroyed() {
if (this.timeInterval) {
clearInterval(this.timeInterval)
this.timeInterval = null
}
},
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' })
},
goCourseContent (e) {
const cid = e.currentTarget.dataset.cid
this.$router.push({ path: `/app/learn/course-detail/${cid}?v=${this.homeList[0].course_type}` })
goCourseContent(data) {
if (this.canOpenCourse(data)) {
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 (Number(UserInfo.is_open_textbook_learning) === 1) {
this.param.course_type = 1
......@@ -175,17 +187,22 @@ export default {
}
this.oneParamYype++
}
cAction.Course.getCourseList(bool, this.param).then(json => {
cAction.Course.getCourseList(bool, this.param)
.then(json => {
this.homeList = json
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 index = _data.index
const json = this.find
......@@ -205,8 +222,8 @@ export default {
/**
* 筛选 - 最近学习顺序
*/
studyEarlyUpdate () {
const na = (this.filter.studyEarly === 'up' ? 'down' : 'up')
studyEarlyUpdate() {
const na = this.filter.studyEarly === 'up' ? 'down' : 'up'
this.filter.studyEarly = na
if (na === 'down') {
this.param.order_type = 'learn_time'
......@@ -219,8 +236,8 @@ export default {
/**
* 筛选 - 选修时间顺序
*/
selectTimeUpdate () {
const na = (this.filter.selectTime === 'up' ? 'down' : 'up')
selectTimeUpdate() {
const na = this.filter.selectTime === 'up' ? 'down' : 'up'
this.filter.selectTime = na
if (na === 'down') {
this.param.order_type = 'join_time'
......@@ -231,7 +248,7 @@ export default {
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}` })
}
}
......@@ -285,7 +302,8 @@ ul.tabs-list {
background: #b49441;
color: #ffffff;
}
&:focus, &:hover {
&:focus,
&:hover {
color: #b49441;
background: #eeeeee;
}
......@@ -410,26 +428,26 @@ ul.course-list {
}
}
}
.tab-box{
.tab-box {
margin-left: 80px;
margin-bottom: 20px;
padding-top: 40px;
}
.con-box{
.con-box {
margin: 0;
padding: 20px 0;
}
.new-height{
.new-height {
margin: 0 40px;
background: #fff;
padding: 0 40px;
border-radius: 6px;
}
.study-title{
font-size:18px;
color:rgba(51,51,51,1);
.study-title {
font-size: 18px;
color: rgba(51, 51, 51, 1);
line-height: 65px;
border-bottom:1px solid #CCCCCC;
border-bottom: 1px solid #cccccc;
}
@media (max-width: 767px) {
......@@ -438,31 +456,31 @@ ul.course-list {
}
}
.tap-box{
.tap-box {
display: flex;
align-items: center;
.name{
color:rgba(51,51,51,1);
.name {
color: rgba(51, 51, 51, 1);
font-size: 30px;
line-height: 100%;
}
ul{
ul {
margin: 0;
padding: 0;
margin-left: 20px;
display: flex;
li:last-child{
li:last-child {
border: none;
}
li.active{
color: #2994EA;
li.active {
color: #2994ea;
}
li{
font-size:24px;
li {
font-size: 24px;
color: #999;
list-style: none;
padding: 0 20px;
border-right: 1px solid rgba(204,204,204,1);
border-right: 1px solid rgba(204, 204, 204, 1);
cursor: pointer;
}
}
......
......@@ -189,7 +189,7 @@ export default {
}
if (this.vCode.flag) {
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) {
this.vCode.flag = false
this.tick()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论