Commit ea7284f4 authored by Facius's avatar Facius
parents b727b587 0bf99ddf
const UNI_APP = {
ucenterUrl: {
apiUrl: 'http://rest-u.yunya.com', //php端域名请求头
// xueUrl: 'https://xue.banshouhui.com', //学院
apiUrl: 'http://192.168.1.46', //php端域名请求头
xueUrl: 'http://192.168.1.46:8088', //学院
// banshou: 'https://m.banshou.com', //扳手app
},
systemUrl: {
......
;
(function() {
let NODE_ENV = 'test'; // dev:开发环境 | test:测试环境
let NODE_ENV = 'dev'; // dev:开发环境 | test:测试环境
let ENV_VAR = null;
if (process.env.NODE_ENV === "development") {
if (NODE_ENV === 'dev') {
......
......@@ -7,7 +7,7 @@ import {
import {
settledApiFun
} from '@/common/api/settled.js';
import { learnApiFun } from "@/common/api/learn.js";
import {learnApiFun} from "@/common/api/learn.js";
import { orderApiFun } from "@/common/api/order.js";
let apiFun = function(vm) {
let commonApi = commonApiFun(vm);
......
const globalUrl = process.uniEnv || {}
const ucenterApiUrl = globalUrl.ucenterUrl.apiUrl
const collegeApiUrl = globalUrl.ucenterUrl.xueUrl
let learnApiFun = function(vm){
/* 查询用户基本信息 */
/* 通知消息基本信息 */
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 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 = {
getTrainingNoticeList,
getTrainingNoticeList,CourseList,ChapterDetails,CourseSection
}
return learnApi
}
......
......@@ -70,7 +70,8 @@
{
"path": "pages/learn/index",
"style": {
"navigationBarTitleText": "学习"
"navigationBarTitleText": "学习",
"navigationStyle":"custom"//隐藏系统导航栏
}
},
{
......@@ -85,17 +86,23 @@
"navigationBarTitleText": "考试答题"
}
},
{
"path": "pages/learn/result",
"style": {
"navigationBarTitleText": "考试结果页"
}
{
"path":"pages/learn/result",
"style":{
"navigationBarTitleText":"考试答题"
}
},
{
"path": "pages/learn/news-details",
"style": {
"navigationBarTitleText": ""
}
},
{
"path":"pages/learn/section",
"style" :{
"navigationBarTitleText": ""
}
},
{
"path": "pages/learn/curriculum",
......
......@@ -45,8 +45,12 @@
}
],
selectId:[],
};
},
onLoad() {
this.getUserExamInfo()
},
methods: {
abc() {
console.log("11111")
......@@ -73,7 +77,10 @@
this.selectId.push(this.list[index].title)
console.log("选中的值", this.selectId)
}
}
},
},
mounted() {
console.log("111111")
......
......@@ -3,10 +3,10 @@
<view class="title">考试规则说明</view>
<view class="test">
<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 class="text">
<text class="left">合格条件:</text><text>随机20题,答对20题</text>
<text class="left">合格条件:</text><text>{{exam.ruleDisc}}</text>
</view>
<view class="text">
<text class="left">考试时间:</text><text>30分钟</text>
......@@ -26,9 +26,13 @@
export default {
data() {
return {
examId:1,
exam:null
}
},
onLoad() {
this.getUserExamInfo()
},
methods: {
aaa(){
......@@ -36,7 +40,83 @@
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>
......
......@@ -15,59 +15,22 @@
<view class="" style="font-size: 40rpx;font-weight:1000">
目录
</view>
<view class="" style="font-size: 40rpx;font-weight: 1000;">
第一章 充电桩常见问题答疑
</view>
<view class="video" >
<view class="video_1" >
<view class="text" >
视频
</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 v-for="item in list">
<view class="chapter">
{{item.name}}
</view>
<view class="video_1">
<view class="text">
视频
<view class="video" v-for="key in item.section" @click=details(key.id)>
<view class="video_1" >
<view class="text" v-text="key.ware=='0'?'视频':'图文'">
</view>
<text>1-{{key.order}}</text>
<text class="text2">{{key.name}}</text>
<text class="text3" v-text="key.isLearned==false?'未开始':'完成'"></text>
</view>
<text class="text2">1-8其他问题答疑</text>
</view>
</view>
</view>
</view>
</view>
......@@ -77,11 +40,72 @@
export default {
data() {
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: {
//获取章节详情
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>
......@@ -101,9 +125,18 @@
width: 128rpx;
height: 128rpx;
}
.chapter{
font-size: 37rpx;
font-weight: 700;
}
.video{
width: 100%;
}
.video_1{
display: flex;
margin: 20rpx 0;
position: relative;
width: 100%;
.text{
width: 100rpx;
height: 38rpx;
......@@ -114,8 +147,15 @@
}
.text2{
width: 397rpx;
font-size: 33rpx;
color: #82848A;
margin-right: 0rpx;
}
.text3{
float: right;
position: relative;
right: 0;
}
}
</style>
<template>
<view class="study">
<view class="banner">
<u-swiper :list="banner"></u-swiper>
</view>
<u-navbar
:is-back="false"
background="{background: transparent}"
:border-bottom="false"
:is-fixed="false"
>
<text class="title-view">学习</text>
</u-navbar>
<image :src="bannerImage" mode="" class="banner"></image>
<!-- <u-tabs :list="tabs" :is-scroll="false" :current="current" @change="change"></u-tabs> -->
<view>
<u-tabs-swiper ref="uTabs" :list="tabs" :current="current" @change="tabsChange" :is-scroll="false"
swiperWidth="750"></u-tabs-swiper>
</view>
<swiper :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish" >
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height: 800rpx;width:100%;" @scrolltolower="onreachBottom">
<view class="standard" @click="goToPrint">
<text>充电桩交付规范</text>
<text >></text>
</view>
</scroll-view>
</swiper-item>
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height: 666rpx;width:100%;" @scrolltolower="onreachBottom" >
<view v-for="item in list" :key="item.id" class="notice" @click="bbb">
<view class="n-head">
《{{item.title}}》
<u-tabs-swiper bg-color="#F4F5F7" inactive-color="#999999" font-size="28" ref="uTabs" :list="tabs" :current="current" @change="tabsChange" :is-scroll="false" swiperWidth="750"></u-tabs-swiper>
</view>
<swiper :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish" style="height: 755rpx;">
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height:796rpx;width:100%;" @scrolltolower="onreachBottom">
<view class="standard" @click="goToPrint">
<text>充电桩交付规范</text>
<text>></text>
</view>
</scroll-view>
</swiper-item>
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height:100%;width:100%;" @scrolltolower="onreachBottom">
<view v-for="item in list" :key="item.id" class="notice" @click="bbb(item)">
<view class="n-head">
《{{item.title}}》
</view>
<view class="news" v-html="item.body">
{{item.body}}
</view>
</view>
<view v-shou="isLoadMore">
<u-loadmore :status="loadStatus" />
</view>
</scroll-view>
</swiper-item>
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height:100%;width:100%;">
<view class="lean">
<view class="top">
<view class="currency-class">
<view class="title">通用课程</view>
<view class="class1" @click=ccc(173)>
<image class="img" :src=courselist.course.preview_pic mode=""></image>
<view class="right">
<view class="">
{{courselist.course.name}}
</view>
<view class="intro" v-html="courselist.course.intro">
{{courselist.course.intro}}
</view>
<view class="" style="display:flex;justify-content: space-between;">
<u-line-progress active-color="#2979ff" :percent=courselist.learnedInfo.learnPercent style="width:54%;"></u-line-progress>
<text v-text="(courselist.learnedInfo.isLearned) ?(courselist.learnedInfo.learnPercent==1)?'已完成':'继续':'未观看' "></text>
</view>
</view>
</view>
<view class="">
{{item.body}}
<view class="class1">
<image class="img" src="../../static/logo.png" mode=""></image>
<view class="right">
<view class="">
接单操作
</view>
<view class="">
快速学习,使用APP接单、抢单
</view>
<view class="" style="display:flex;justify-content: space-between;">
<u-line-progress active-color="#2979ff" :percent="30" style="width:54%;"></u-line-progress>
<text>继续</text>
</view>
</view>
</view>
</view>
<view v-shou="isLoadMore">
<u-loadmore :status="loadStatus" />
<view class="currency-class">
<view class="title">技能课程</view>
<view class="class1">
<image class="img" src="../../static/logo.png" mode=""></image>
<view class="right">
<view class="">
从0-1学习充电桩安装服务
</view>
<view class="">
让你全面了解充电桩市场及服务规范
</view>
<view class="" style="display:flex;justify-content: space-between;">
<u-line-progress active-color="#2979ff" :percent="100" style="width:54%;"></u-line-progress>
<text>完成</text>
</view>
</view>
</view>
</view>
</scroll-view>
</swiper-item>
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height:500rpx;width:100%;">
<view class="lean">
<view class="top">
<view class="currency-class">
<text class="title">通用课程</text>
<view class="class1">
<image class="img" src="../../static/logo.png" mode=""></image>
<view class="right">
<view class="">
服务规范
</view>
<view class="">
为用户提供更好服务,自己赚更多钱
</view>
<view class="" style="display:flex;justify-content: space-between;">
<u-line-progress active-color="#2979ff" :percent="30" style="width:54%;"></u-line-progress>
<text>继续</text>
</view>
</view>
</view>
</view>
</scroll-view>
</swiper-item>
<swiper-item>
<scroll-view scroll-y style="height:100%;width:100%;" @scrolltolower="onreachBottom">
<view class="lean">
<view class="top">
<view class="currency-class">
<text class="title">通用认证</text>
<view class="class1" @click="aaa">
<image class="img" src="../../static/logo.png" mode=""></image>
<view class="right">
<view class="">
服务规范
</view>
<view class="class1">
<image class="img" src="../../static/logo.png" mode=""></image>
<view class="right">
<view class="">
接单操作
</view>
<view class="">
快速学习,使用APP接单、抢单
</view>
<view class="" style="display:flex;justify-content: space-between;">
<u-line-progress active-color="#2979ff" :percent="30" style="width:54%;"></u-line-progress>
<text>未观看</text>
</view>
</view>
<view class="">
通过本认证,是接单的前提条件
</view>
<view class="" style="display:flex;justify-content: space-between;">
<text style="color: #a69999;">随机20题,及格20题</text>
<text>通过</text>
</view>
</view>
<view class="currency-class">
<text class="title">技能课程</text>
<view class="class1">
<image class="img" src="../../static/logo.png" mode=""></image>
<view class="right">
<view class="">
从0-1学习充电桩安装服务
</view>
<view class="">
让你全面了解充电桩市场及服务规范
</view>
<view class="" style="display:flex;justify-content: space-between;">
<u-line-progress active-color="#2979ff" :percent="100" style="width:54%;"></u-line-progress>
<text>完成</text>
</view>
</view>
</view>
<view class="class1" @click="aaa">
<image class="img" src="../../static/logo.png" mode=""></image>
<view class="right">
<view class="">
接单操作
</view>
<view class="">
快速认证,是否具备接单操作能力
</view>
<view class="" style="display:flex;justify-content: space-between;">
<text style="color: #a69999">随机20题,及格16题</text>
<text>未通过</text>
</view>
</view>
</view>
</view>
</scroll-view>
</swiper-item>
<swiper-item>
<scroll-view scroll-y style="height:800rpx;width:100%;" @scrolltolower="onreachBottom">
<view class="lean">
<view class="top">
<view class="currency-class">
<text class="title">通用认证</text>
<view class="class1" @click="aaa">
<image class="img" src="../../static/logo.png" mode=""></image>
<view class="right">
<view class="">
服务规范
</view>
<view class="">
通过本认证,是接单的前提条件
</view>
<view class="" style="display:flex;justify-content: space-between;">
<text>随机20题,及格20题</text>
<text>通过</text>
</view>
</view>
<view class="currency-class">
<text class="title">技能认证</text>
<view class="class1" @click="aaa">
<image class="img" src="../../static/logo.png" mode=""></image>
<view class="right">
<view class="">
从0-1学习充电桩安装服务
</view>
<view class="class1" @click="aaa">
<image class="img" src="../../static/logo.png" mode=""></image>
<view class="right">
<view class="">
接单操作
</view>
<view class="">
快速认证,是否具备接单操作能力
</view>
<view class="" style="display:flex;justify-content: space-between;">
<text>随机20题,及格16题</text>
<text>未通过</text>
</view>
</view>
<view class="">
通过本认证后,可接充电桩业务单
</view>
</view>
<view class="currency-class">
<text class="title">技能认证</text>
<view class="class1" @click="aaa">
<image class="img" src="../../static/logo.png" mode=""></image>
<view class="right">
<view class="">
从0-1学习充电桩安装服务
</view>
<view class="">
通过本认证后,可接充电桩业务单
</view>
<view class="" style="display:flex;justify-content: space-between;">
<text>随机30题,及格25题</text>
<text>未通过</text>
</view>
</view>
<view class="" style="display:flex;justify-content: space-between;">
<text style="color: #a69999;">随机30题,及格25题</text>
<text>未通过</text>
</view>
</view>
</view>
</view>
</scroll-view>
</swiper-item>
</swiper>
</view>
</view>
</view>
</scroll-view>
</swiper-item>
</swiper>
</view>
</view>
</template>
......@@ -159,20 +165,7 @@
export default {
data() {
return {
banner: [
{
image: "https://cdn.uviewui.com/uview/swiper/1.jpg",
title: "昨夜星辰昨夜风,画楼西畔桂堂东",
},
{
image: "https://cdn.uviewui.com/uview/swiper/2.jpg",
title: "身无彩凤双飞翼,心有灵犀一点通",
},
{
image: "https://cdn.uviewui.com/uview/swiper/3.jpg",
title: "谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳",
},
],
msg: "赣南吴彦祖",
tabs: [
{
name: "交付规范",
......@@ -193,15 +186,23 @@ export default {
start: 0,
},
list: [],
courselist: null,
loadStatus: "loading", //加载样式:loadMore-加载前样式,loading-加载加载中样式,nomore-没有数据样式
isLoadMore: false, //是否加载中
course_id: "course_id_=173",
exam: null,
};
},
onLoad() {
this.getList();
this.$u.mpShare.path = ''
this.getList();
this.getCourseList();
this.getUserExamInfo();
},
computed: {
bannerImage() {
return process.uniEnv.qn_base_url + "banner-xx.png";
},
},
methods: {
getList() {
this.$u.api
......@@ -223,7 +224,54 @@ export default {
}
} else {
//接口请求失败的处理
uni.showToast({ title: res.message, icon: "none" });
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;
}
});
},
//在线学习通用课程信息
getCourseList() {
this.$u.api
.CourseList()
.then((res) => {
if (res.code == 200) {
if (res.data) {
this.courselist = res.data;
console.log("--------");
console.log(this.courselist);
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;
......@@ -262,11 +310,30 @@ export default {
url: "./assessment",
});
},
//跳转到课程介绍
ccc(id) {
uni.navigateTo({
url: "./curriculum?course_id=" + id,
});
},
//跳转到
bbb() {
wx.navigateTo({
bbb(e) {
var news = {
body: e.body,
id: e.id,
level: e.level,
title: e.title,
};
// console.log(news)
uni.navigateTo({
url: "./news-details",
});
setTimeout(() => {
uni.$emit("news", news), console.log("发送数据");
}, 500);
console.log("跳转结束11111111");
},
//scroll-view到底部加载更多
onreachBottom() {
......@@ -294,20 +361,99 @@ export default {
},
});
},
//考核认证,通用认证,考试通过or未通过查询接口请求
getUserExamInfo() {
uni.showLoading({
title: "请稍候",
});
let that = this;
uni.request({
url:
"http://192.168.1.22" +
"/wxh-worker-rest/rest/exam" +
"/serviceRule/userExamInfo/" +
getApp().globalData.token +
"?examId=" +
2,
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>
<style>
.study {
background: #f9f9f9;
padding: 15rpx;
height: 100%;
height: 100vh;
background-color: #f4f5f7;
padding: 0rpx 30rpx 0 30rpx;
}
.title-view {
color: #333333;
font-weight: bold;
font-size: 40rpx;
}
.banner {
padding: 2rpx;
width: 690rpx;
height: 240rpx;
/* margin-left: -15rpx; */
}
//交付规范
/* //交付规范 */
.standard {
width: 656rpx;
display: flex;
......@@ -316,24 +462,34 @@ export default {
padding: 0 34rpx;
margin: 72rpx auto;
}
//培训通知
/* //培训通知 */
.notice {
border: #808080 solid 2rpx;
width: 100%;
height: 400rpx;
margin-top: 36rpx;
overflow: hidden;
}
.n-head {
text-align: center;
margin: 32rpx 0;
}
//在线学习
.news {
}
/* //在线学习 */
.currency-class {
width: 100%;
height: 455rpx;
background: #ffffff;
padding: 18rpx;
margin-bottom: 11px;
border-radius: 12rpx;
}
.title {
font-size: 32rpx;
font-weight: bold;
font-family: PingFang-SC-Bold, PingFang-SC;
}
.class1 {
display: flex;
......@@ -342,31 +498,41 @@ export default {
margin-top: 28rpx;
border-top: 1rpx solid #808080;
}
.img {
width: 200rpx;
height: 126rpx;
width: 201rpx;
height: 201rpx;
display: block;
margin-right: 0rpx;
}
.right {
width: 428rpx;
height: 147rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.intro {
color: #9999a6;
}
.tab {
background: #fff;
height: 82rpx;
margin: 0 0;
}
.text {
margin: 0 40rpx;
line-height: 82rpx;
color: #667eb5;
}
.content {
margin: 5px 0;
height: 485rpx;
background: #fff;
}
swiper {
height: 691rpx;
}
......
<template>
<view>
<view class="title">
《关于充电桩xxxx》
{{newsInfo.title}}
</view>
<view class="content">
于2021年3月23日 10:00 进行《xxx》内容进行培训。
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin sodales pulvinar sic tempor. Sociis natoque penatibus et magnis dis parturient montes,
nascetur ridiculus mus. Nam fermentum, nulla luctus pharetra vulputate, felis tellus 。
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
<view class="content" v-html="newsInfo.body">
<button @click="add">aaa</button>
{{newsInfo.body}}
</view>
</view>
</template>
......@@ -18,10 +14,24 @@
export default {
data() {
return {
banner:{},
obj:{
},
newsInfo:null
}
},
methods: {
},
onLoad() {
},
onShow(){
uni.$on('news',(news)=>{
this.newsInfo = news;
console.log(news,'news')
})
},
onLoad() {
......
<template>
<view class="content">
<view class="title">
考试结果
</view>
<view class="test-result">
<text class="title">考试结果</text>
<view class="result">
未通过
</view>
<view class="details">
<view class="">
<text class="first">合格条件:</text><text>答对20题</text>
</view>
<view class="">
<text class="first">考试结果:</text><text>答对10题</text>
<view class="test-explain">
<view class="hang">
<text class="text1">合格条件:</text><text class="text2">答对20题</text>
</view>
<view class="">
<text class="first">考试用时</text><text>16分29秒</text>
<view class="hang">
<text class="text1">考试结果:</text><text class="text2">答对10题</text>
</view>
<view class="btn">
<button class="btn1">再答一次</button>
<button class="btn2">退出重考</button>
<view class="hang">
<text class="text1">考试用时:</text><text class="text2">16分29秒</text>
</view>
</view>
<view class="btn">
<button class="btn1">再答一次</button>
<button class="btn2">退出重考</button>
</view>
</view>
</template>
......@@ -32,57 +29,61 @@
}
},
methods:{
methods: {
}
}
</script>
<style lang="scss">
.content{
width: 100%;
height: 950rpx;
background: #DCDFE6;
padding: 53rpx;
}
.title{
font-size: 30rpx;
}
.result{
color: red;
font-size: 73rpx;
text-align: center;
margin: 46rpx 0;
}
.details{
border-top: 2rpx dashed #808080;
height: 600rpx;
padding-top: 94rpx;
view{
margin: 26rpx 0 0;
.first{
margin: 0 20rpx 0;
}
.test-result{
width: 610rpx;
height: 965rpx;
margin: 70rpx auto 0;
.title{
margin: 0 44rpx 0;
}
}
.btn{
.btn1{
width: 477rpx;
height: 61rpx;
border-radius: 27rpx;
line-height: 61rpx;
font-size: 29rpx;
background: #007AFF;
color: #FFFFFF;
margin: 140rpx auto 34rpx;
.result{
color: red;
font-size: 66rpx;
text-align: center;
border-bottom: 1px dashed #000000;
margin: 74rpx 0;
padding: 66rpx;
}
.test-explain{
.hang{
margin: 26rpx 26rpx;
.text1{
color: #a69999;
margin-right: 22rpx;
}
.text2{
color: #333333;
}
}
}
.btn2{
width: 477rpx;
height: 61rpx;
border-radius: 27rpx;
line-height: 61rpx;
font-size: 29rpx;
.btn{
margin-top: 236rpx;
.btn1{
width: 478rpx;
height: 60rpx;
background: #0079fe;
color: #fff;
font-size: 26rpx;
line-height: 60rpx;
margin: 20rpx auto;
}
.btn2{
width: 478rpx;
height: 60rpx;
background: #f2f2f2;
color: #333333;
font-size: 26rpx;
line-height: 60rpx;
margin:0 auto;
}
}
}
</style>
\ No newline at end of file
</style>
<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