Commit f4c2b692 authored by zhengzy's avatar zhengzy

no message

parent 9a68de66
...@@ -3,14 +3,17 @@ const ucenterApiUrl = globalUrl.ucenterUrl.apiUrl ...@@ -3,14 +3,17 @@ const ucenterApiUrl = globalUrl.ucenterUrl.apiUrl
const collegeApiUrl = globalUrl.ucenterUrl.xueUrl const collegeApiUrl = globalUrl.ucenterUrl.xueUrl
let learnApiFun = function(vm){ let learnApiFun = function(vm){
/* 查询用户基本信息 */ /* 通知消息基本信息 */
let getTrainingNoticeList = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/notice/list', params); let getTrainingNoticeList = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/notice/list', params);
/* 获取学习视频基本信息 */ /* 获取学习视频基本信息 */
let CourseList = async (params = {}) => await vm.$u.get(collegeApiUrl+'/v1/course-details?course_id=173',params); let CourseList = async (params = {}) => await vm.$u.get(collegeApiUrl+'/v1/course-details?course_id=173',params);
/* 获取章节详情 */
let ChapterDetails = async (params = {}) => await vm.$u.get(collegeApiUrl+'/v1/chapter-sections',params);
/* 获取课程节信息*/
let CourseSection = async (params = {}) => await vm.$u.get(collegeApiUrl+'/v1/section-details',params);
const learnApi = { const learnApi = {
getTrainingNoticeList,CourseList getTrainingNoticeList,CourseList,ChapterDetails,CourseSection
} }
return learnApi return learnApi
} }
......
...@@ -79,6 +79,12 @@ ...@@ -79,6 +79,12 @@
"navigationBarTitleText": "" "navigationBarTitleText": ""
} }
}, },
{
"path":"pages/learn/section",
"style" :{
"navigationBarTitleText": ""
}
},
{ {
"path": "pages/learn/curriculum", "path": "pages/learn/curriculum",
"style": { "style": {
......
...@@ -45,8 +45,12 @@ ...@@ -45,8 +45,12 @@
} }
], ],
selectId:[], selectId:[],
}; };
}, },
onLoad() {
this.getUserExamInfo()
},
methods: { methods: {
abc() { abc() {
console.log("11111") console.log("11111")
...@@ -73,7 +77,10 @@ ...@@ -73,7 +77,10 @@
this.selectId.push(this.list[index].title) this.selectId.push(this.list[index].title)
console.log("选中的值", this.selectId) console.log("选中的值", this.selectId)
} }
} },
}, },
mounted() { mounted() {
console.log("111111") console.log("111111")
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
<view class="title">考试规则说明</view> <view class="title">考试规则说明</view>
<view class="test"> <view class="test">
<view class="text"> <view class="text">
<text class="left">考试科目:</text><text style="color: #007AFF;">服务规范</text> <text class="left">考试科目:</text><text style="color: #007AFF;">{{exam.examName}}</text>
</view> </view>
<view class="text"> <view class="text">
<text class="left">合格条件:</text><text>随机20题,答对20题</text> <text class="left">合格条件:</text><text>{{exam.ruleDisc}}</text>
</view> </view>
<view class="text"> <view class="text">
<text class="left">考试时间:</text><text>30分钟</text> <text class="left">考试时间:</text><text>30分钟</text>
...@@ -26,9 +26,13 @@ ...@@ -26,9 +26,13 @@
export default { export default {
data() { data() {
return { return {
examId:1,
exam:null
} }
}, },
onLoad() {
this.getUserExamInfo()
},
methods: { methods: {
aaa(){ aaa(){
...@@ -36,7 +40,82 @@ ...@@ -36,7 +40,82 @@
url:'./answer' url:'./answer'
}) })
},
//获取考试信息
getUserExamInfo: function() {
uni.showLoading({
title: '请稍候'
})
let that = this
uni.request({
url: 'https://system.banshouhui.com' +
'/wxh-worker-rest/rest/exam' +
'/serviceRule/userExamInfo/' +
'RTOKENf86a7c0606ef5ebf36f211ace3466b7f9de56e37' +
'?examId=' + this.examId,
method: 'POST',
data: {
//examId:this.examId,
},
header: {
'Content-Type': 'application/x-www-form-urlencoded'
},
success: (res) => {
console.log(res.data)
uni.hideLoading()
if (!res.data) {
return
}
if (res.data.code == 401 || res.data.code == 403) {
// uni.navigateTo({
// url: '/pages/login/wxlogin'
// })
// return
console.log('洪塘张学友')
}
if (res.data.code == 200) {
//examStatus 用户考试状态 0考试中 1考试完成 2未参与
that.exam = res.data.data
console.log(that.exam)
if (res.data.data.examStatus == 2) {
that.applyExam()
return
} }
if(res.data.data.examStatus == 1){
console.log('111111111111111111111111111')
that.isComplete = true
that.examScore = res.data.data.examScore
that.postResult()
return
}
if (res.data.data.examStatus == 0 ) {
that.userExamId = res.data.data.id
that.getNext()
}
} else {
uni.showToast({
icon: 'none',
title: res.data.message
})
}
},
fail: (e) => {
uni.hideLoading()
uni.showToast({
icon: 'none',
title: '获取考试信息失败'
})
}
})
},
} }
} }
</script> </script>
......
...@@ -15,59 +15,22 @@ ...@@ -15,59 +15,22 @@
<view class="" style="font-size: 40rpx;font-weight:1000"> <view class="" style="font-size: 40rpx;font-weight:1000">
目录 目录
</view> </view>
<view class="" style="font-size: 40rpx;font-weight: 1000;"> <view v-for="item in list">
第一章 充电桩常见问题答疑 <view class="chapter">
{{item.name}}
</view> </view>
<view class="video" > <view class="video" v-for="key in item.section" @click=details(key.id)>
<view class="video_1" > <view class="video_1" >
<view class="text" > <view class="text" v-text="key.ware=='0'?'视频':'图文'">
视频
</view>
<text class="text2">1-1唯修汇公司简介</text>
</view>
<view class="video_1" >
<view class="text">
视频
</view>
<text class="text2">1-2可接单评定标准</text>
</view>
<view class="video_1" >
<view class="text">
视频
</view>
<text class="text2">1-3结算规则</text>
</view>
<view class="video_1">
<view class="text">
视频
</view>
<text class="text2">1-4充电桩安装开城计划</text>
</view>
<view class="video_1">
<view class="text">
视频
</view>
<text class="text2">1-5缴纳质保金和费用答疑</text>
</view>
<view class="video_1" >
<view class="text" >
视频
</view>
<text class="text2">1-6安装材料品牌答疑1</text>
</view>
<view class="video_1" >
<view class="text">
视频
</view>
<text class="text2">1-7安装材料答疑2</text>
</view> </view>
<view class="video_1"> <text>1-{{key.order}}</text>
<view class="text"> <text class="text2">{{key.name}}</text>
视频 <text class="text3" v-text="key.isLearned==false?'未开始':'完成'"></text>
</view> </view>
<text class="text2">1-8其他问题答疑</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
...@@ -77,11 +40,72 @@ ...@@ -77,11 +40,72 @@
export default { export default {
data() { data() {
return { return {
params:{
course_id:0,
},
list:[],
examId:1,
} }
}, },
onLoad(a){
console.log(a)
this.params.course_id=a.course_id
console.log(this.params.course_id)
this.getCapterDetails()
},
methods: { methods: {
//获取章节详情
getCapterDetails() {
console.log(1111111)
this.$u.api
.ChapterDetails(this.params)
.then((res) => {
if (res.code == 200) {
if (res.data) {
this.list = this.list.concat(res.data);
console.log(this.list)
if (res.data.length < 5) {
//判断接口返回数据量小于请求数据量,则表示此为最后一页
this.isLoadMore = true;
this.loadStatus = "nomore";
} else {
this.isLoadMore = false;
}
} else {
this.isLoadMore = true;
this.loadStatus = "nomore";
}
} else {
//接口请求失败的处理
uni.showToast({
title: res.message,
icon: "none"
});
this.isLoadMore = false;
if (this.params.start > 0) {
this.page -= 5;
}
}
})
.catch((err) => {
uni.showToast({
title: err,
icon: "none",
});
this.isLoadMore = false;
if (this.params.start > 0) {
this.page -= 5;
}
});
},
//跳转到小节
details(id){
console.log(id)
uni.navigateTo({
url:"./section?section_id=" + id
})
}
} }
} }
</script> </script>
...@@ -101,9 +125,18 @@ ...@@ -101,9 +125,18 @@
width: 128rpx; width: 128rpx;
height: 128rpx; height: 128rpx;
} }
.chapter{
font-size: 37rpx;
font-weight: 700;
}
.video{
width: 100%;
}
.video_1{ .video_1{
display: flex; display: flex;
margin: 20rpx 0; margin: 20rpx 0;
position: relative;
width: 100%;
.text{ .text{
width: 100rpx; width: 100rpx;
height: 38rpx; height: 38rpx;
...@@ -114,8 +147,15 @@ ...@@ -114,8 +147,15 @@
} }
.text2{ .text2{
width: 397rpx;
font-size: 33rpx; font-size: 33rpx;
color: #82848A; color: #82848A;
margin-right: 0rpx;
}
.text3{
float: right;
position: relative;
right: 0;
} }
} }
</style> </style>
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
<view> <view>
<u-tabs-swiper ref="uTabs" :list="tabs" :current="current" @change="tabsChange" :is-scroll="false" swiperWidth="750"></u-tabs-swiper> <u-tabs-swiper ref="uTabs" :list="tabs" :current="current" @change="tabsChange" :is-scroll="false" swiperWidth="750"></u-tabs-swiper>
</view> </view>
<swiper :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish"> <swiper :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish" style="height: 755rpx;">
<swiper-item class="swiper-item"> <swiper-item class="swiper-item">
<scroll-view scroll-y style="height:100%;width:100%;" @scrolltolower="onreachBottom"> <scroll-view scroll-y style="height:796rpx;width:100%;" @scrolltolower="onreachBottom">
<view class="standard" @click="goToPrint"> <view class="standard" @click="goToPrint">
<text>充电桩交付规范</text> <text>充电桩交付规范</text>
<text>></text> <text>></text>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<view class="n-head"> <view class="n-head">
《{{item.title}}》 《{{item.title}}》
</view> </view>
<view class=""> <view class="news" v-html="item.body">
{{item.body}} {{item.body}}
</view> </view>
</view> </view>
...@@ -37,18 +37,19 @@ ...@@ -37,18 +37,19 @@
<view class="top"> <view class="top">
<view class="currency-class"> <view class="currency-class">
<view class="title">通用课程</view> <view class="title">通用课程</view>
<view class="class1" @click="ccc"> <view class="class1" @click=ccc(173)>
<image class="img" :src=courselist.course.preview_pic mode=""></image> <image class="img" :src=courselist.course.preview_pic mode=""></image>
<view class="right"> <view class="right">
<view class=""> <view class="">
{{courselist.course.name}} {{courselist.course.name}}
</view> </view>
<view class="intro" v-html="courselist.course.intro"> <view class="intro" v-html="courselist.course.intro">
{{courselist.course.intro}} {{courselist.course.intro}}
</view> </view>
<view class="" style="display:flex;justify-content: space-between;"> <view class="" style="display:flex;justify-content: space-between;">
<u-line-progress active-color="#2979ff" :percent="30" style="width:54%;"></u-line-progress> <u-line-progress active-color="#2979ff" :percent=courselist.learnedInfo.learnPercent style="width:54%;"></u-line-progress>
<text>继续</text> <text v-text="(courselist.learnedInfo.isLearned) ?(courselist.learnedInfo.learnPercent==1)?'已完成':'继续':'未观看' "></text>
</view> </view>
</view> </view>
</view> </view>
...@@ -63,7 +64,7 @@ ...@@ -63,7 +64,7 @@
</view> </view>
<view class="" style="display:flex;justify-content: space-between;"> <view class="" style="display:flex;justify-content: space-between;">
<u-line-progress active-color="#2979ff" :percent="30" style="width:54%;"></u-line-progress> <u-line-progress active-color="#2979ff" :percent="30" style="width:54%;"></u-line-progress>
<text>未观看</text> <text>继续</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -106,7 +107,7 @@ ...@@ -106,7 +107,7 @@
通过本认证,是接单的前提条件 通过本认证,是接单的前提条件
</view> </view>
<view class="" style="display:flex;justify-content: space-between;"> <view class="" style="display:flex;justify-content: space-between;">
<text>随机20题,及格20题</text> <text style="color: #a69999;">随机20题,及格20题</text>
<text>通过</text> <text>通过</text>
</view> </view>
</view> </view>
...@@ -121,7 +122,7 @@ ...@@ -121,7 +122,7 @@
快速认证,是否具备接单操作能力 快速认证,是否具备接单操作能力
</view> </view>
<view class="" style="display:flex;justify-content: space-between;"> <view class="" style="display:flex;justify-content: space-between;">
<text>随机20题,及格16题</text> <text style="color: #a69999">随机20题,及格16题</text>
<text>未通过</text> <text>未通过</text>
</view> </view>
</view> </view>
...@@ -139,7 +140,7 @@ ...@@ -139,7 +140,7 @@
通过本认证后,可接充电桩业务单 通过本认证后,可接充电桩业务单
</view> </view>
<view class="" style="display:flex;justify-content: space-between;"> <view class="" style="display:flex;justify-content: space-between;">
<text>随机30题,及格25题</text> <text style="color: #a69999;">随机30题,及格25题</text>
<text>未通过</text> <text>未通过</text>
</view> </view>
</view> </view>
...@@ -158,6 +159,7 @@ ...@@ -158,6 +159,7 @@
export default { export default {
data() { data() {
return { return {
msg:"赣南吴彦祖",
banner: [{ banner: [{
image: "https://cdn.uviewui.com/uview/swiper/1.jpg", image: "https://cdn.uviewui.com/uview/swiper/1.jpg",
title: "昨夜星辰昨夜风,画楼西畔桂堂东", title: "昨夜星辰昨夜风,画楼西畔桂堂东",
...@@ -201,9 +203,6 @@ ...@@ -201,9 +203,6 @@
this.getCourseList(); this.getCourseList();
}, },
computed:{ computed:{
dd(){
}
}, },
methods: { methods: {
getList() { getList() {
...@@ -313,9 +312,9 @@ ...@@ -313,9 +312,9 @@
}); });
}, },
//跳转到课程介绍 //跳转到课程介绍
ccc(){ ccc(id){
uni.navigateTo({ uni.navigateTo({
url:"./curriculum" url:"./curriculum?course_id=" + id
}) })
}, },
//跳转到 //跳转到
...@@ -393,13 +392,16 @@ ...@@ -393,13 +392,16 @@
width: 100%; width: 100%;
height: 400rpx; height: 400rpx;
margin-top: 36rpx; margin-top: 36rpx;
overflow: hidden;
} }
.n-head { .n-head {
text-align: center; text-align: center;
margin: 32rpx 0; margin: 32rpx 0;
} }
.news{
}
//在线学习 //在线学习
.currency-class { .currency-class {
width: 100%; width: 100%;
...@@ -425,6 +427,9 @@ ...@@ -425,6 +427,9 @@
.right { .right {
width: 428rpx; width: 428rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
} }
.intro{ .intro{
color: #9999a6; color: #9999a6;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view class="title"> <view class="title">
{{newsInfo.title}} {{newsInfo.title}}
</view> </view>
<view class="content"> <view class="content" v-html="newsInfo.body">
<button @click="add">aaa</button> <button @click="add">aaa</button>
{{newsInfo.body}} {{newsInfo.body}}
</view> </view>
...@@ -24,14 +24,7 @@ ...@@ -24,14 +24,7 @@
methods: { methods: {
}, },
onLoad(event) { onLoad() {
// var str= JSON.parse(decodeURIComponent(event.detailDate));
// console.log(str)
// var str1=(decodeURIComponent(event.detailDate))
// console.log(str1)
// this.obj=decodeURI(str1)
// console.log(this.obj)
// 监听事件
}, },
onShow(){ onShow(){
......
<template>
<view>
<view class="title">
{{CourseSectionlist.name}}
</view>
<view class="content" v-html="CourseSectionlist.content">
{{CourseSectionlist.content}}
</view>
</view>
</template>
<script>
export default {
data() {
return {
CourseSectionlist:null,
section_id:{
section_id:0
}
}
},
onLoad(id) {
this.section_id.section_id = id.section_id
this.getCourseSection()
},
methods: {
getCourseSection() {
this.$u.api
.CourseSection(this.section_id)
.then((res) => {
if (res.code == 200) {
if (res.data) {
this.CourseSectionlist = res.data;
console.log("--------")
console.log(this.CourseSectionlist)
if (res.data.length < 5) {
//判断接口返回数据量小于请求数据量,则表示此为最后一页
this.isLoadMore = true;
this.loadStatus = "nomore";
} else {
this.isLoadMore = false;
}
} else {
this.isLoadMore = true;
this.loadStatus = "nomore";
}
} else {
//接口请求失败的处理
uni.showToast({
title: res.message,
icon: "none"
});
this.isLoadMore = false;
if (this.params.start > 0) {
this.page -= 5;
}
}
})
.catch((err) => {
uni.showToast({
title: err,
icon: "none",
});
this.isLoadMore = false;
if (this.params.start > 0) {
this.page -= 5;
}
});
},
}
}
</script>
<style lang="scss">
.title{
text-align: center;
font-size: 45rpx;
font-weight: 700;
margin: 24rpx;
}
.content{
font-size: 30rpx;
padding: 50rpx;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment