Commit 6df21b2d authored by zhengzy's avatar zhengzy

服务规范

parent 8d601a36
const globalUrl = process.uniEnv || {} const globalUrl = process.uniEnv || {}
const ucenterApiUrl = globalUrl.ucenterUrl.apiUrl const ucenterApiUrl = globalUrl.ucenterUrl.apiUrl
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);
const learnApi = { const learnApi = {
getTrainingNoticeList, getTrainingNoticeList,CourseList
} }
return learnApi return learnApi
} }
......
...@@ -5,21 +5,20 @@ ...@@ -5,21 +5,20 @@
</view> </view>
<!-- <u-tabs :list="tabs" :is-scroll="false" :current="current" @change="change"></u-tabs> --> <!-- <u-tabs :list="tabs" :is-scroll="false" :current="current" @change="change"></u-tabs> -->
<view> <view>
<u-tabs-swiper ref="uTabs" :list="tabs" :current="current" @change="tabsChange" :is-scroll="false" <u-tabs-swiper ref="uTabs" :list="tabs" :current="current" @change="tabsChange" :is-scroll="false" swiperWidth="750"></u-tabs-swiper>
swiperWidth="750"></u-tabs-swiper>
</view> </view>
<swiper :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish" > <swiper :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish">
<swiper-item class="swiper-item"> <swiper-item class="swiper-item">
<scroll-view scroll-y style="height: 800rpx;width:100%;" @scrolltolower="onreachBottom"> <scroll-view scroll-y style="height:100%;width:100%;" @scrolltolower="onreachBottom">
<view class="standard" @click="goToPrint"> <view class="standard" @click="goToPrint">
<text>充电桩交付规范</text> <text>充电桩交付规范</text>
<text >></text> <text>></text>
</view> </view>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
<swiper-item class="swiper-item"> <swiper-item class="swiper-item">
<scroll-view scroll-y style="height: 666rpx;width:100%;" @scrolltolower="onreachBottom" > <scroll-view scroll-y style="height:100%;width:100%;" @scrolltolower="onreachBottom">
<view v-for="item in list" :key="item.id" class="notice" @click="bbb"> <view v-for="item in list" :key="item.id" class="notice" @click="bbb(item)">
<view class="n-head"> <view class="n-head">
《{{item.title}}》 《{{item.title}}》
</view> </view>
...@@ -33,19 +32,19 @@ ...@@ -33,19 +32,19 @@
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
<swiper-item class="swiper-item"> <swiper-item class="swiper-item">
<scroll-view scroll-y style="height:500rpx;width:100%;"> <scroll-view scroll-y style="height:100%;width:100%;">
<view class="lean"> <view class="lean">
<view class="top"> <view class="top">
<view class="currency-class"> <view class="currency-class">
<text class="title">通用课程</text> <view class="title">通用课程</view>
<view class="class1"> <view class="class1" @click="ccc">
<image class="img" src="../../static/logo.png" 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}}
</view> </view>
<view class=""> <view class="intro" v-html="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="30" style="width:54%;"></u-line-progress>
...@@ -70,7 +69,7 @@ ...@@ -70,7 +69,7 @@
</view> </view>
</view> </view>
<view class="currency-class"> <view class="currency-class">
<text class="title">技能课程</text> <view class="title">技能课程</view>
<view class="class1"> <view class="class1">
<image class="img" src="../../static/logo.png" mode=""></image> <image class="img" src="../../static/logo.png" mode=""></image>
<view class="right"> <view class="right">
...@@ -92,7 +91,7 @@ ...@@ -92,7 +91,7 @@
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
<swiper-item> <swiper-item>
<scroll-view scroll-y style="height:800rpx;width:100%;" @scrolltolower="onreachBottom"> <scroll-view scroll-y style="height:100%;width:100%;" @scrolltolower="onreachBottom">
<view class="lean"> <view class="lean">
<view class="top"> <view class="top">
<view class="currency-class"> <view class="currency-class">
...@@ -156,11 +155,10 @@ ...@@ -156,11 +155,10 @@
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
banner: [ banner: [{
{
image: "https://cdn.uviewui.com/uview/swiper/1.jpg", image: "https://cdn.uviewui.com/uview/swiper/1.jpg",
title: "昨夜星辰昨夜风,画楼西畔桂堂东", title: "昨夜星辰昨夜风,画楼西畔桂堂东",
}, },
...@@ -173,8 +171,7 @@ export default { ...@@ -173,8 +171,7 @@ export default {
title: "谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳", title: "谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳",
}, },
], ],
tabs: [ tabs: [{
{
name: "交付规范", name: "交付规范",
}, },
{ {
...@@ -193,14 +190,21 @@ export default { ...@@ -193,14 +190,21 @@ export default {
start: 0, start: 0,
}, },
list: [], list: [],
courselist:null,
loadStatus: "loading", //加载样式:loadMore-加载前样式,loading-加载加载中样式,nomore-没有数据样式 loadStatus: "loading", //加载样式:loadMore-加载前样式,loading-加载加载中样式,nomore-没有数据样式
isLoadMore: false, //是否加载中 isLoadMore: false, //是否加载中
course_id:"course_id_=173"
}; };
}, },
onLoad() { onLoad() {
this.getList(); this.getList();
this.getCourseList();
}, },
computed:{
dd(){
}
},
methods: { methods: {
getList() { getList() {
this.$u.api this.$u.api
...@@ -222,7 +226,54 @@ export default { ...@@ -222,7 +226,54 @@ export default {
} }
} else { } 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; this.isLoadMore = false;
if (this.params.start > 0) { if (this.params.start > 0) {
this.page -= 5; this.page -= 5;
...@@ -261,11 +312,29 @@ export default { ...@@ -261,11 +312,29 @@ export default {
url: "./assessment", url: "./assessment",
}); });
}, },
//跳转到课程介绍
ccc(){
uni.navigateTo({
url:"./curriculum"
})
},
//跳转到 //跳转到
bbb() { bbb(e) {
wx.navigateTo({ var news = {
url: "./news-details", 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到底部加载更多 //scroll-view到底部加载更多
onreachBottom() { onreachBottom() {
...@@ -294,79 +363,91 @@ export default { ...@@ -294,79 +363,91 @@ export default {
}); });
}, },
}, },
}; };
</script> </script>
<style> <style>
.study { .study {
background: #f9f9f9; background: #f9f9f9;
padding: 15rpx; padding: 15rpx;
height: 100%; height: 100%;
} }
.banner {
.banner {
padding: 2rpx; padding: 2rpx;
} }
//交付规范
.standard { //交付规范
.standard {
width: 656rpx; width: 656rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
border-bottom: 1rpx solid #82848a; border-bottom: 1rpx solid #82848a;
padding: 0 34rpx; padding: 0 34rpx;
margin: 72rpx auto; margin: 72rpx auto;
} }
//培训通知
.notice { //培训通知
.notice {
border: #808080 solid 2rpx; border: #808080 solid 2rpx;
width: 100%; width: 100%;
height: 400rpx; height: 400rpx;
margin-top: 36rpx; margin-top: 36rpx;
} }
.n-head {
.n-head {
text-align: center; text-align: center;
margin: 32rpx 0; margin: 32rpx 0;
} }
//在线学习
.currency-class { //在线学习
.currency-class {
width: 100%; width: 100%;
height: 455rpx;
background: #ffffff; background: #ffffff;
padding: 18rpx; padding: 18rpx;
margin-bottom: 11px; margin-bottom: 11px;
} }
.class1 {
.class1 {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding-top: 22rpx; padding-top: 22rpx;
margin-top: 28rpx; margin-top: 28rpx;
border-top: 1rpx solid #808080; border-top: 1rpx solid #808080;
} }
.img {
width: 200rpx; .img {
height: 126rpx; width: 201rpx;
height: 201rpx;
display: block; display: block;
margin-right: 0rpx; margin-right: 0rpx;
} }
.right {
.right {
width: 428rpx; width: 428rpx;
height: 147rpx; }
} .intro{
.tab { color: #9999a6;
}
.tab {
background: #fff; background: #fff;
height: 82rpx; height: 82rpx;
margin: 0 0; margin: 0 0;
} }
.text {
.text {
margin: 0 40rpx; margin: 0 40rpx;
line-height: 82rpx; line-height: 82rpx;
color: #667eb5; color: #667eb5;
} }
.content {
.content {
margin: 5px 0; margin: 5px 0;
height: 485rpx; height: 485rpx;
background: #fff; background: #fff;
} }
swiper {
swiper {
height: 691rpx; height: 691rpx;
} }
</style> </style>
<template> <template>
<view> <view>
<view class="title"> <view class="title">
《关于充电桩xxxx》 {{newsInfo.title}}
</view> </view>
<view class="content"> <view class="content">
于2021年3月23日 10:00 进行《xxx》内容进行培训。 <button @click="add">aaa</button>
{{newsInfo.body}}
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> </view>
</view> </view>
</template> </template>
...@@ -18,11 +14,32 @@ ...@@ -18,11 +14,32 @@
export default { export default {
data() { data() {
return { return {
banner:{},
obj:{
},
newsInfo:null
} }
}, },
methods: { methods: {
},
onLoad(event) {
// 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(){
uni.$on('news',(news)=>{
this.newsInfo = news;
console.log(news,'news')
})
} }
} }
</script> </script>
......
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