yujialong 2 days ago
parent 63ad31bb3c
commit d4dc133ef0
  1. 8
      apis/modules/course.js
  2. 2
      apis/modules/user.js
  3. 3
      components/empty/empty.vue
  4. 5
      components/realName/realName.vue
  5. 63
      course/courseDetail/courseDetail.vue
  6. 16
      pages.json
  7. 15
      pages/achievement/achievement.vue
  8. 66
      pages/index/index.vue
  9. 50
      pages/login/login.vue
  10. 9
      pages/person/person.vue
  11. 17
      styles/common.scss
  12. 9
      user/info/info.vue
  13. 69
      user/reg/reg.vue
  14. 4
      user/selectAccount/selectAccount.vue

@ -21,8 +21,8 @@ export const queryChaptersAndSubsections = data => {
return get('nakadai/nakadai/curriculum/chapter/queryChaptersAndSubsections', data)
}
export const curriculumDetail = (cid, mallId) => {
return post(`nakadai/nakadai/curriculum/curriculumDetail?cid=${cid}&mallId=${mallId}`)
export const detailsOfGoods = data => {
return get(`nakadai/mall/detailsOfGoods`, data)
}
export const queryPracticeByStudent = data => {
@ -47,4 +47,8 @@ export const getSchoolEffectiveCourse = () => {
export const exportExamPaperReport = data => {
return get('exam/exam/paper/exportExamPaperReport', data)
}
export const playRecordSave = data => {
return post('occupationlab/occupationlab/playRecord/save', data)
}

@ -49,7 +49,7 @@ export const courseProfessional = data => {
}
export const updateAvatars = url => {
return post(`users/users/user/updateAvatars?url=` + url)
return post(`users/users/user/updateAvatars?platformId=1&url=` + url)
}
export const userBinding = (data) => {

@ -29,8 +29,7 @@
padding: 100rpx 0;
text-align: center;
.pic {
width: 400rpx;
// margin-bottom: 52rpx;
width: 200rpx;
}
.text {
font-size: 28rpx;

@ -29,14 +29,14 @@
},
mounted() {
console.log('realname:')
this.handleRealName()
// this.handleRealName()
},
methods: {
//
async handleRealName () {
const res = await checkUserNameOrWorkNumber()
//
if (!res.hasName) this.$refs.alertDialog.open()
this.$refs.alertDialog[res.hasName ? 'close' : 'open']()
},
//
async realNameSubmit() {
@ -46,6 +46,7 @@
userName: form.userName,
workNumber: form.workNumber
})
this.$refs.alertDialog.close()
},
}
}

@ -21,13 +21,13 @@
<cover-view class="chapterName">{{ item.name }}</cover-view>
<cover-view class="section" v-if="item.subsectionList.length">
<cover-view v-for="(section, j) in item.subsectionList" :key="j"class="sectionName" :class="{ active: curRow.id === section.id }" @click="secClick(section, item)">
<cover-image v-if="section.fileType === 'pptx'" class="ext" src="https://izhixinyun.com/images/exts/ppt.png" alt="" mode="widthFix" />
<cover-image v-else-if="section.fileType === 'mp4'" class="ext" src="https://izhixinyun.com/images/exts/video.png" alt="" mode="widthFix" />
<cover-image v-if="section.fileType === 'pptx'" class="ext" src="https://eduvessel.com/images/occupationlab/exts/ppt.png" alt="" mode="widthFix" />
<cover-image v-else-if="section.fileType === 'mp4'" class="ext" src="https://eduvessel.com/images/occupationlab/exts/video.png" alt="" mode="widthFix" />
<cover-image v-else-if="section.fileType === 'doc' || section.fileType === 'docx'" class="ext"
src="https://izhixinyun.com/images/exts/word.png" alt="" mode="widthFix" />
<cover-image v-else-if="section.fileType === 'txt'" class="ext" src="https://izhixinyun.com/images/exts/txt.png" alt="" mode="widthFix" />
<cover-image v-else-if="section.fileType === 'pdf'" class="ext" src="https://izhixinyun.com/images/exts/pdf.png" alt="" mode="widthFix" />
<cover-image v-else class="ext" src="https://izhixinyun.com/images/exts/pic.png" alt="" mode="widthFix" />
src="https://eduvessel.com/images/occupationlab/exts/word.png" alt="" mode="widthFix" />
<cover-image v-else-if="section.fileType === 'txt'" class="ext" src="https://eduvessel.com/images/occupationlab/exts/txt.png" alt="" mode="widthFix" />
<cover-image v-else-if="section.fileType === 'pdf'" class="ext" src="https://eduvessel.com/images/occupationlab/exts/pdf.png" alt="" mode="widthFix" />
<cover-image v-else class="ext" src="https://eduvessel.com/images/occupationlab/exts/pic.png" alt="" mode="widthFix" />
<cover-view class="text">{{ section.name }}</cover-view>
</cover-view>
</cover-view>
@ -49,8 +49,6 @@
<!-- 课程目录 -->
<view v-show="curTab === 1">
<uni-search-bar class="search" radius="30" placeholder="请输入章节名称" v-model="keyword" clearButton="auto" cancelButton="none" />
<view v-if="chapterList.length" class="chapters">
<view class="chapter" v-for="(item, i) in chapterList" :key="i">
<view class="chapterName">
@ -59,13 +57,13 @@
</view>
<view :class="['section', {shrink: item.shrink}]" v-if="item.subsectionList.length">
<view v-for="(section, j) in item.subsectionList" :key="j"class="sectionName" :class="{ active: curRow.id === section.id }" @click="secClick(section, item)">
<image v-if="section.fileType === 'pptx'" class="ext" src="https://izhixinyun.com/images/exts/ppt.png" alt="">
<image v-else-if="section.fileType === 'mp4'" class="ext" src="https://izhixinyun.com/images/exts/video.png" alt="">
<image v-if="section.fileType === 'pptx'" class="ext" src="https://eduvessel.com/images/occupationlab/exts/ppt.png" alt="">
<image v-else-if="section.fileType === 'mp4'" class="ext" src="https://eduvessel.com/images/occupationlab/exts/video.png" alt="">
<image v-else-if="section.fileType === 'doc' || section.fileType === 'docx'" class="ext"
src="https://izhixinyun.com/images/exts/word.png" alt="">
<image v-else-if="section.fileType === 'txt'" class="ext" src="https://izhixinyun.com/images/exts/txt.png" alt="">
<image v-else-if="section.fileType === 'pdf'" class="ext" src="https://izhixinyun.com/images/exts/pdf.png" alt="">
<image v-else class="ext" src="https://izhixinyun.com/images/exts/pic.png" alt="">
src="https://eduvessel.com/images/occupationlab/exts/word.png" alt="">
<image v-else-if="section.fileType === 'txt'" class="ext" src="https://eduvessel.com/images/occupationlab/exts/txt.png" alt="">
<image v-else-if="section.fileType === 'pdf'" class="ext" src="https://eduvessel.com/images/occupationlab/exts/pdf.png" alt="">
<image v-else class="ext" src="https://eduvessel.com/images/occupationlab/exts/pic.png" alt="">
{{ section.name }}
</view>
</view>
@ -106,12 +104,13 @@
</template>
<script>
import { queryChaptersAndSubsections, curriculumDetail, queryPracticeByStudent, queryAssessmentByStudent, getPlayAuth } from '@/apis/modules/course.js'
import { queryChaptersAndSubsections, detailsOfGoods, queryPracticeByStudent, queryAssessmentByStudent, getPlayAuth, playRecordSave } from '@/apis/modules/course.js'
export default {
data() {
return {
cid: '',
mallId: '',
startTime: Date.now(), //
curTab: 1,
tabs: [
{
@ -209,6 +208,17 @@
}
}
},
onUnload () {
console.log('hide fn')
//
if (this.cid) {
playRecordSave({
courseId: this.cid,
courseType: 0,
playTime: Math.ceil((Date.now() - this.startTime) / 1000 / 60)
})
}
},
onShow() {
const pages = getCurrentPages()
const { options } = pages[pages.length - 1]
@ -223,20 +233,20 @@
if (this.cid) {
const res = await queryChaptersAndSubsections({
keyword: this.keyword,
courseId: this.courseId,
courseId: this.cid,
})
this.chapterList = res.chapterList
// if (this.chapterList.length && this.chapterList[0].subsectionList && this.chapterList[0].subsectionList.length && !this.commentId) {
// this.preview(this.chapterList[0].subsectionList[0], this.chapterList[0].name, 1);
// }
}
},
//
async getInfo () {
if (this.cid && this.mallId) {
const { data } = await curriculumDetail(this.cid, this.mallId)
this.coverUrl = data.coverUrl
this.briefIntroduction = data.briefIntroduction
if (this.mallId) {
const res = await detailsOfGoods({
mallId: this.mallId
})
const e = res.orderDetails.mall
this.coverUrl = e.coverDrawing
this.briefIntroduction = e.detailedIntroduction
}
},
//
@ -389,6 +399,9 @@
</script>
<style scoped lang="scss">
page {
background-color: #fff;
}
.file-wrap {
position: relative;
.pic, .video {
@ -556,7 +569,9 @@
.item {
position: relative;
padding: 20rpx 0;
border-bottom: 1px solid #e6e6e6;
&:not(:last-child) {
border-bottom: 1px solid #e6e6e6;
}
}
.c-name {
font-size: 32rpx;

@ -52,6 +52,22 @@
"navigationBarTitleText": "练习情况",
"enablePullDownRefresh": true
}
},
{
"path" : "serviceAgreement/serviceAgreement",
"style" :
{
"navigationBarTitleText" : "用户服务协议",
"enablePullDownRefresh" : false
}
},
{
"path" : "privacyAgreement/privacyAgreement",
"style" :
{
"navigationBarTitleText" : "用户隐私协议",
"enablePullDownRefresh" : false
}
}
]
},

@ -47,7 +47,7 @@
<view class="c-name">{{ item.projectName }}</view>
<view class="line">最高分{{ item.hightScore }}&emsp;&emsp;练习次数{{ item.practiceNum }}</view>
<view class="line">累计练习时长小时{{ item.hightScore }}</view>
<view class="line">最近练习时间{{ item.lastTime }}</view>
<view class="line">最近练习时间{{ item.duration }}</view>
<view class="btn">练习情况</view>
</view>
</view>
@ -69,7 +69,7 @@
</template>
</view>
<realName />
<realName ref="realName" />
</view>
</template>
@ -102,6 +102,7 @@
onShow() {
this.getOverview()
this.getCourse()
this.$refs.realName.handleRealName()
},
methods: {
//
@ -182,12 +183,10 @@
.tab-wrap {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
/deep/.select {
width: 60%;
.uni-select {
border: 0;
}
/deep/.picker-input {
max-width: 70%;
}
}
.tabs {
@ -242,7 +241,7 @@
}
.item {
width: calc(50% - 16rpx);
width: calc(50% - 18rpx);
padding: 30rpx;
border-radius: 8rpx;
box-sizing: border-box;

@ -1,36 +1,32 @@
<template>
<view>
<view class="filter">
<view class="top">
<uni-search-bar class="search" radius="30" placeholder="请输入课程名称" v-model="keyword" clearButton="auto" cancelButton="none" />
</view>
<ul class="tab-wrap">
<scroll-view scroll-x :scroll-left="scrollLeft" class="tab tab-scroll">
<li v-for="(tab, i) in tabs" :key="i" :class="{active: curTab === tab.classificationId}" @click="tabChange(tab.classificationId)">{{ tab.classificationName }}</li>
<scroll-view scroll-x :scroll-left="scrollLeft" class="tabs">
<view v-for="(tab, i) in tabs" :key="i" :class="['item', {active: curTab === tab.classificationId}]" @click="tabChange(tab.classificationId)">{{ tab.classificationName }}</view>
</scroll-view>
</ul>
</view>
<ul v-if="list.length" class="list">
<li v-for="(item, i) in list" :key="i" @click="toDetail(item)">
<image class="cover" :src="item.coverUrl"></image>
<view class="name">{{ item.goodsName }}</view>
<view class="entry">进入课程</view>
<view class="entry">{{ !item.isInEffect ? '续费' : '进入课程' }}</view>
</li>
</ul>
<empty v-else />
<realName />
<realName ref="realName" />
</view>
</template>
<script>
import { schoolCourse, recentUse, getSchoolCourseAuthority } from '@/apis/modules/course.js'
// import RealName from '@/components/realName/realName.vue'
export default {
// components: { RealName },
data() {
return {
curTab: 0,
curTab: -1,
tabs: [],
scrollLeft: 0,
reachBottom: 0, // 0->,1->,-1->
@ -61,6 +57,7 @@
},
onShow() {
// uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOjM5NTc2LCJyblN0ciI6ImtOaUd2TVI4dlA5eldNZTFlbUFKSmoycWRHMENaU1Q5IiwiYWNjb3VudElkIjozOTU3NiwidXNlcklkIjozOTU3NSwic2Nob29sSWQiOjI4NDYsInVzZXJOYW1lIjoiYWMiLCJwbGF0Zm9ybUlkIjoiMSJ9.JRcmjfyBUik35mG8UxtGTsD0hFGdQfY63cQKQMajq3I')
this.$refs.realName.handleRealName()
this.getTab()
},
methods: {
@ -91,14 +88,14 @@
async getTab () {
const { data } = await getSchoolCourseAuthority()
this.tabs = [
{
classificationId: 0,
classificationName: '最近使用',
},
{
classificationId: -1,
classificationName: '全部',
},
{
classificationId: 0,
classificationName: '最近使用',
},
...data,
]
this.getList()
@ -110,26 +107,48 @@
},
//
toDetail(item) {
this.$util.to(`/course/courseDetail/courseDetail?cid=${item.cid}&mallId=${item.mallId}`)
if (!item.isInEffect) {
this.$util.errMsg('课程已到期,请联系课程负责老师!')
} else {
this.$util.to(`/course/courseDetail/courseDetail?cid=${item.cid}&mallId=${item.mallId}`)
}
},
}
}
</script>
<style scoped lang="scss">
.tab-wrap {
display: flex;
.tab-scroll {
.top {
padding: 20rpx 20rpx 0;
margin-bottom: 20rpx;
background-color: #fff;
.tabs {
display: flex;
margin-top: 10rpx;
white-space: nowrap;
li {
.item {
position: relative;
display: inline-block;
padding: 0 4rpx 8rpx;
text-align: center;
font-size: 28rpx;
color: #333;
&:not(:last-child) {
margin-right: 40rpx;
}
}
.active {
border-bottom: 4rpx solid #007EFF;
}
}
}
.list {
display: flex;
flex-wrap: wrap;
max-height: calc(100vh - 262rpx);
padding: 40rpx 30rpx 30rpx;
overflow: auto;
li {
width: calc(50% - 16rpx);
padding: 24rpx;
@ -155,10 +174,9 @@
text-overflow: ellipsis;
overflow: hidden;
height: 64rpx;
margin: 10rpx 0;
font-size: 24rpx;
margin: 10rpx 0 16rpx;
font-size: 26rpx;
color: #333;
}
.entry {
font-size: 26rpx;

@ -1,16 +1,10 @@
<template>
<view class="page">
<view class="wrap">
<view class="logo">
<image class="icon" src="https://izhixinyun.com/images/hjyz-logo.png" mode="widthFix"></image>
<view class="texts">
<view class="cn">慧教云舟</view>
<view class="en">EduVessel</view>
</view>
</view>
<image class="logo" src="https://eduvessel.com/images/occupationlab/hjyz-logo.png" mode="widthFix"></image>
<template v-if="isLogin">
<button class="btn phone" open-type="getPhoneNumber" @getphonenumber="onGetPhoneNumber">
<image src="@/static/image/phone.png" mode="widthFix"></image>
<!-- <image src="@/static/image/phone.png" mode="widthFix"></image> -->
{{ isReg ? '获取手机号' : '绑定手机'}}
</button>
</template>
@ -61,6 +55,8 @@
} else {
uni.clearStorageSync()
this.isLogin = false
this.isReg = false
this.submiting = false
}
},
//
@ -144,7 +140,7 @@
}
},
toAgreement(id) {
this.$util.to(id ? `/order/privacyAgreement/privacyAgreement` : `/order/serviceAgreement/serviceAgreement`)
this.$util.to(id ? `/course/privacyAgreement/privacyAgreement` : `/course/serviceAgreement/serviceAgreement`)
},
//
toIndex() {
@ -169,37 +165,12 @@
height: 60vh;
padding: 214rpx 74rpx 28rpx;
margin: 0 61rpx;
text-align: center;
background-color: #fff;
border-radius: 20rpx;
.logo {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 40rpx;
color: #333;
.icon {
width: 150rpx;
margin-right: 20rpx;
}
.cn {
margin-bottom: 10rpx;
font-size: 40rpx;
font-weight: 600;
}
.en {
font-size: 28rpx;
}
}
.hello {
margin: 36rpx 0;
font-size: 28rpx;
color: #333;
}
.tips {
margin-top: 30rpx;
font-size: 26rpx;
color: #adadad;
text-align: left;
width: 500rpx;
margin-bottom: 80rpx;
}
.btn {
display: flex;
@ -207,6 +178,7 @@
align-items: center;
width: 100%;
height: 88rpx;
margin-bottom: 50rpx;
font-size: 32rpx;
border-radius: 10rpx;
image {
@ -215,7 +187,6 @@
}
}
.wechat {
margin-bottom: 38rpx;
color: #fff;
background-color: #007EFF;
}
@ -233,9 +204,6 @@
text-align: right;
}
.agree {
position: absolute;
bottom: 28rpx;
left: 0%;
display: flex;
justify-content: center;
align-items: center;

@ -1,7 +1,7 @@
<template>
<view class="page">
<view class="status-bar"></view>
<image class="bg" src="@/static/image/person-bg.png"></image>
<image class="bg" src="https://eduvessel.com/images/occupationlab/person-bg.png"></image>
<view class="wrap">
<view class="info">
<image class="avatar" :src="info.avatar" mode=""></image>
@ -54,7 +54,7 @@
</view>
</uni-popup>
<realName />
<realName ref="realName" />
</view>
</template>
@ -75,6 +75,7 @@
},
onShow() {
this.getInfo()
this.$refs.realName.handleRealName()
},
methods: {
//
@ -160,9 +161,9 @@
color: #333;
}
.tag {
padding: 8rpx 16rpx;
padding: 2rpx 10rpx;
margin-left: 10rpx;
font-size: 24rpx;
font-size: 20rpx;
color: #333;
white-space: nowrap;
border-radius: 20px;

@ -130,23 +130,6 @@ ul {
line-height: 1.4rem;
}
}
.tab {
display: flex;
justify-content: space-around;
margin-bottom: 20rpx;
background-color: #fff;
li {
padding: 0 20rpx;
font-size: 28rpx;
white-space: nowrap;
line-height: 100rpx;
border-bottom: 3px solid transparent;
}
.active {
color: $uni-primary;
border-bottom-color: $uni-primary;
}
}
.btn-wrap {
z-index: 10;
position: fixed;

@ -11,7 +11,7 @@
</button>
<view class="line">
<view class="name">学号</view>
<view class="val">{{ userAccount.workNumber }}</view>
<input type="text" placeholder="请输入学号" v-model="userAccount.workNumber" />
</view>
<view class="line">
<view class="name">手机号</view>
@ -111,7 +111,7 @@
<view class="name">专业</view>
<uni-data-picker class="picker-input" placeholder="请选择专业" popup-title="请选择专业" preload :clear-icon="false" :localdata="archive.ProfessionalList" v-model="archive.professionalId" :readonly="!archive.professionalClassId"></uni-data-picker>
</view>
<uni-icons class="del" type="trash" size="20" color="#ccc" @click="delArchive(i)"></uni-icons>
<uni-icons v-if="i" class="del" type="trash" size="20" color="#ccc" @click="delArchive(i)"></uni-icons>
</view>
</view>
<view class="fold" v-if="archivesList.length > 1">
@ -479,6 +479,11 @@
}
updatePersonCenter(data)
this.$util.sucMsg('保存成功')
setTimeout(() => {
uni.switchTab({
url: '/pages/person/person'
})
}, 1500)
},
}
}

@ -1,26 +1,10 @@
<template>
<view class="page">
<view class="logo">
<image class="icon" src="https://izhixinyun.com/images/hjyz-logo.png" mode="widthFix"></image>
<view class="texts">
<view class="cn">慧教云舟</view>
<view class="en">EduVessel</view>
</view>
</view>
<view class="wrap">
<image class="logo" src="https://eduvessel.com/images/occupationlab/hjyz-logo.png" mode="widthFix"></image>
<uni-forms>
<uni-forms-item>
<uni-easyinput type="text" v-model.trim="form.account" placeholder="请输入账号" />
</uni-forms-item>
<uni-forms-item>
<uni-easyinput type="password" v-model.trim="form.password" placeholder="请输入密码" />
</uni-forms-item>
<uni-forms-item>
<view class="ver-code">
<uni-easyinput type="text" v-model.trim="form.code" placeholder="请输入验证码" />
<image class="ver-img" :src="verImg" mode="widthFix" @click="getVerImg"></image>
</view>
</uni-forms-item>
<input type="text" v-model.trim="form.account" placeholder="请输入账号" />
<input type="password" v-model.trim="form.password" placeholder="请输入密码" />
</uni-forms>
<button class="btn" type="primary" @click="submit">登录</button>
</view>
@ -37,7 +21,6 @@
form: {
account: '',
password: '',
code: '',
random: '',
},
verImg: '',
@ -60,7 +43,6 @@
const { form } = this
if (!form.account) return this.$util.errMsg('请输入账号!')
if (!form.password) return this.$util.errMsg('请输入密码!')
if (!form.code) return this.$util.errMsg('请输入验证码!')
const { data } = await weChatToken({
...form,
openid: this.openid,
@ -78,31 +60,15 @@
<style scoped lang="scss">
.page {
display: flex;
flex-direction: column;
justify-content: center;
padding-top: 300rpx;
min-height: 100%;
text-align: center;
background: url(https://eduvessel.com/images/occupationlab/login1.png) 0 0/175rpx auto no-repeat,
url(https://eduvessel.com/images/occupationlab/login2.png) bottom right/123rpx auto no-repeat;
box-sizing: border-box;
.logo {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 40rpx;
color: #333;
.icon {
width: 150rpx;
margin-right: 20rpx;
}
.cn {
margin-bottom: 10rpx;
font-size: 40rpx;
font-weight: 600;
}
.en {
font-size: 28rpx;
}
width: 500rpx;
margin-bottom: 80rpx;
}
}
.wrap {
@ -110,19 +76,22 @@
padding: 60rpx;
margin: 0 61rpx;
text-align: center;
border-radius: 8rpx;
border-radius: 20rpx;
background-color: #fff;
.ver-code {
display: flex;
.ver-img {
width: 200rpx;
height: 80rpx;
margin-left: 20rpx;
}
input {
padding: 10rpx 16rpx;
margin-bottom: 40rpx;
font-size: 28rpx;
text-align: left;
color: #333;
border-bottom: 1px solid #e0e0e0;
}
.btn {
width: 100%;
height: 80rpx;
margin-top: 50rpx;
font-size: 32rpx;
line-height: 80rpx;
}
}
</style>

@ -83,12 +83,12 @@
border-radius: 50%;
}
.name {
margin-bottom: 6rpx;
margin-bottom: 8rpx;
font-size: 32rpx;
color: #333;
}
.org {
font-size: 28rpx;
font-size: 26rpx;
color: #333;
}
.btn {

Loading…
Cancel
Save