Commit 4e5c22c8 authored by 林文清's avatar 林文清

update:学习样式修改

parent eadf0763
...@@ -434,6 +434,11 @@ ...@@ -434,6 +434,11 @@
"name": "订单 - 过程反馈", //模式名称 "name": "订单 - 过程反馈", //模式名称
"path": "pages/order/feedback", //启动页面,必选 "path": "pages/order/feedback", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到 "query": "" //启动参数,在页面的onLoad函数里面得到
},
{
"name": "学习 - 首页", //模式名称
"path": "pages/index/learn", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
} }
] ]
} }
......
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
</u-navbar> </u-navbar>
<image :src="bannerImage" mode="" class="banner"></image> <image :src="bannerImage" mode="" class="banner"></image>
<u-tabs-swiper bg-color="#F4F5F7" inactive-color="#999999" font-size="28" ref="uTabs" :list="tabs" <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> :current="current" @change="tabsChange" :is-scroll="false" :bar-width="52" swiperWidth="750"></u-tabs-swiper>
<swiper :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish"> <swiper class="swiper_group" :current="swiperCurrent" @animationfinish="animationfinish">
<swiper-item class="swiper-item"> <swiper-item @touchmove.stop.prevent="stopTouchMove" v-show="current == 0">
<scroll-view scroll-y style="height:796rpx;width:100%;"> <scroll-view scroll-y style="height:100%;width:100%;">
<view class="jf-currency-class"> <view class="jf-currency-class">
<image :src="jianBianImg" mode="" class="current-img"></image> <image :src="jianBianImg" mode="" class="current-img"></image>
<view class="class1" style="position: relative;" @click="goToPrint"> <view class="class1" style="position: relative;" @click="goToPrint">
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</view> </view>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
<swiper-item class="swiper-item"> <swiper-item @touchmove.stop.prevent="stopTouchMove" v-show="current == 1">
<scroll-view scroll-y style="height:100%;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(item)"> <view v-for="item in list" :key="item.id" class="notice" @click="bbb(item)">
<view class="n-head"> <view class="n-head">
...@@ -37,15 +37,13 @@ ...@@ -37,15 +37,13 @@
<view class="notice-bottom-right">查看详情</view> <view class="notice-bottom-right">查看详情</view>
</view> </view>
</view> </view>
<view v-shou="isLoadMore"> <view v-shou="isLoadMore" class="load-more">
<u-loadmore :status="loadStatus" /> <u-loadmore :status="loadStatus" />
</view> </view>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
<swiper-item class="swiper-item" style="margin-top: 20rpx;"> <swiper-item @touchmove.stop.prevent="stopTouchMove" v-show="current == 2">
<scroll-view scroll-y style="height:100%;width:100%;"> <scroll-view scroll-y style="height:100%;width:100%;">
<view class="lean">
<view class="top">
<view class="title u-margin-top-10 u-margin-bottom-30">通用课程</view> <view class="title u-margin-top-10 u-margin-bottom-30">通用课程</view>
<view class="learn-currency-class"> <view class="learn-currency-class">
<view class="learn-class1" @click="goPlay(courselist[0])"> <view class="learn-class1" @click="goPlay(courselist[0])">
...@@ -63,8 +61,7 @@ ...@@ -63,8 +61,7 @@
<u-line-progress active-color="#2979ff" :percent="courselist[0].percent" <u-line-progress active-color="#2979ff" :percent="courselist[0].percent"
:show-percent="false"> :show-percent="false">
</u-line-progress> </u-line-progress>
<text class="font-default-color" <text class="font-default-color" :class="{'font-active-color':courselist[0].percent}"
:class="{'font-active-color':courselist[0].percent}"
v-text="courselist[0].status"></text> v-text="courselist[0].status"></text>
</view> </view>
</view> </view>
...@@ -83,14 +80,13 @@ ...@@ -83,14 +80,13 @@
<u-line-progress active-color="#2979ff" :percent="courselist[1].percent" <u-line-progress active-color="#2979ff" :percent="courselist[1].percent"
:show-percent="false"> :show-percent="false">
</u-line-progress> </u-line-progress>
<text class="font-default-color" <text class="font-default-color" :class="{'font-active-color':courselist[1].percent}"
:class="{'font-active-color':courselist[1].percent}"
v-text="courselist[1].status"></text> v-text="courselist[1].status"></text>
</view> </view>
</view> </view>
</view> </view>
<view class="title u-margin-top-50 u-margin-bottom-30">技能课程</view> <view class="title u-margin-top-30 u-margin-bottom-30">技能课程</view>
<view class="learn-currency-class u-margin-bottom-20"> <view class="learn-currency-class u-margin-bottom-20" style="padding-bottom: 300rpx;">
<view class="learn-class1" @click="goPlay(courselist[2])"> <view class="learn-class1" @click="goPlay(courselist[2])">
<image class="learn-img" :src="courselist[2].pic" mode=""></image> <image class="learn-img" :src="courselist[2].pic" mode=""></image>
<image class="bofang" :src="bofang" mode=""></image> <image class="bofang" :src="bofang" mode=""></image>
...@@ -107,20 +103,15 @@ ...@@ -107,20 +103,15 @@
<u-line-progress active-color="#2979ff" :percent="courselist[2].percent" <u-line-progress active-color="#2979ff" :percent="courselist[2].percent"
:show-percent="false"> :show-percent="false">
</u-line-progress> </u-line-progress>
<text class="font-default-color" <text class="font-default-color" :class="{'font-active-color':courselist[2].percent}"
:class="{'font-active-color':courselist[2].percent}"
v-text="courselist[2].status"></text> v-text="courselist[2].status"></text>
</view> </view>
</view> </view>
</view> </view>
</view>
</view>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
<swiper-item> <swiper-item @touchmove.stop.prevent="stopTouchMove" v-show="current == 3">
<scroll-view scroll-y style="height:100%;width:100%;"> <scroll-view scroll-y style="height:100%;width:100%;">
<view class="lean">
<view class="top">
<view class="title u-margin-top-10 u-margin-bottom-30">通用认证</view> <view class="title u-margin-top-10 u-margin-bottom-30">通用认证</view>
<view class="currency-class"> <view class="currency-class">
<view class="class1" @click="aaa(0)"> <view class="class1" @click="aaa(0)">
...@@ -159,7 +150,7 @@ ...@@ -159,7 +150,7 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="title u-margin-top-50 u-margin-bottom-30">技能认证</view> <!-- <view class="title u-margin-top-30 u-margin-bottom-30">技能认证</view>
<view class="currency-class"> <view class="currency-class">
<view class="class1" @click="aaa(2)"> <view class="class1" @click="aaa(2)">
<image class="img" :src="examList[2].pic" mode=""></image> <image class="img" :src="examList[2].pic" mode=""></image>
...@@ -179,8 +170,6 @@ ...@@ -179,8 +170,6 @@
</view> </view>
</view> </view>
</view> --> </view> -->
</view>
</view>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
</swiper> </swiper>
...@@ -188,7 +177,6 @@ ...@@ -188,7 +177,6 @@
</template> </template>
<script> <script>
import util from '@/utils/util.js'
var json = { var json = {
"dev": [{ "dev": [{
"title": "服务规范", "title": "服务规范",
...@@ -199,7 +187,7 @@ ...@@ -199,7 +187,7 @@
"sectionId": "" "sectionId": ""
}, },
{ {
"title": "接单操作", "title": "接单规范",
"desc": "快速学习,使用APP 接单、抢单", "desc": "快速学习,使用APP 接单、抢单",
"percent": 0, "percent": 0,
"status": "", "status": "",
...@@ -224,7 +212,7 @@ ...@@ -224,7 +212,7 @@
"sectionId": "" "sectionId": ""
}, },
{ {
"title": "接单操作", "title": "接单规范",
"desc": "快速学习,使用APP 接单、抢单", "desc": "快速学习,使用APP 接单、抢单",
"percent": 0, "percent": 0,
"status": "", "status": "",
...@@ -248,7 +236,7 @@ ...@@ -248,7 +236,7 @@
"sectionId": "" "sectionId": ""
}, },
{ {
"title": "接单操作", "title": "接单规范",
"desc": "快速学习,使用APP 接单、抢单", "desc": "快速学习,使用APP 接单、抢单",
"percent": 0, "percent": 0,
"status": "", "status": "",
...@@ -335,7 +323,6 @@ ...@@ -335,7 +323,6 @@
} }
] ]
} }
// import aJson from "@/static/json/learn.json";
let env = process.uniEnv.node_env; let env = process.uniEnv.node_env;
let courseListJson = json. [env]; let courseListJson = json. [env];
let examListJson = examJson[env]; let examListJson = examJson[env];
...@@ -430,14 +417,13 @@ ...@@ -430,14 +417,13 @@
// isComplete: false // isComplete: false
// } // }
], ],
loadStatus: "loading", //加载样式:loadMore-加载前样式,loading-加载加载中样式,nomore-没有数据样式 loadStatus: "loading",
isLoadMore: false, //是否加载中 isLoadMore: false,
exam: null, exam: null,
jianBianImg: process.uniEnv.qn_base_url + "jianbian@3x_bak1.png" jianBianImg: process.uniEnv.qn_base_url + "jianbian@3x_bak1.png"
}; };
}, },
onLoad(param) { onLoad(param) {
// debugger
console.log('--node_env--'); console.log('--node_env--');
console.log(process.uniEnv.node_env); console.log(process.uniEnv.node_env);
try { try {
...@@ -446,9 +432,6 @@ ...@@ -446,9 +432,6 @@
this.swiperCurrent = param.tabs; this.swiperCurrent = param.tabs;
} }
} catch (e) {} } catch (e) {}
// this.getList();
// this.getCourseList();
// this.getUserExamInfo();
}, },
computed: { computed: {
bannerImage() { bannerImage() {
...@@ -456,11 +439,13 @@ ...@@ -456,11 +439,13 @@
}, },
}, },
onShow: function() { onShow: function() {
// debugger this.tabsChange(this.current);
// this.onLoad();
console.log('--返回也可以执行--'); console.log('--返回也可以执行--');
}, },
methods: { methods: {
stopTouchMove() {
return false;
},
getList() { getList() {
this.$u.api this.$u.api
.getTrainingNoticeList(this.params) .getTrainingNoticeList(this.params)
...@@ -512,9 +497,7 @@ ...@@ -512,9 +497,7 @@
timeFormat(time, format, fromMysql = true) { timeFormat(time, format, fromMysql = true) {
let rate = fromMysql ? 1000 : 1; let rate = fromMysql ? 1000 : 1;
let dataFmt = format || 'yyyy-MM-dd hh:mm:ss' // 需要格式化的规则 let dataFmt = format || 'yyyy-MM-dd hh:mm:ss' // 需要格式化的规则
time = typeof(time) == 'number' ? time : new Date(time * rate) // 处理传入的time time = typeof(time) == 'number' ? time : new Date(time * rate) // 处理传入的time
let fmt = { let fmt = {
'y+': time.getFullYear(), // 年份 'y+': time.getFullYear(), // 年份
'M+': time.getMonth() + 1, // 月份 'M+': time.getMonth() + 1, // 月份
...@@ -585,11 +568,6 @@ ...@@ -585,11 +568,6 @@
break; break;
} }
}, },
//swiper-item左右移动,通知tabs的滑块跟随移动
transition(e) {
let dx = e.detail.dx;
this.$refs.uTabs.setDx(dx);
},
animationfinish(e) { animationfinish(e) {
let current = e.detail.current; let current = e.detail.current;
this.$refs.uTabs.setFinishCurrent(current); this.$refs.uTabs.setFinishCurrent(current);
...@@ -721,17 +699,13 @@ ...@@ -721,17 +699,13 @@
wx.navigateTo({ wx.navigateTo({
url: '/pages/learn/news-details', url: '/pages/learn/news-details',
success: function(res) { success: function(res) {
// 通过eventChannel向被打开页面传送数据
res.eventChannel.emit('acceptDataFromLearn', news) res.eventChannel.emit('acceptDataFromLearn', news)
} }
}); });
console.log("跳转结束11111111");
}, },
}, },
}; };
</script> </script>
<style> <style>
.study { .study {
height: 100vh; height: 100vh;
...@@ -751,7 +725,7 @@ ...@@ -751,7 +725,7 @@
margin-top: 10rpx; margin-top: 10rpx;
} }
/* //交付规范 */ /* 交付规范 */
.standard { .standard {
width: 690rpx; width: 690rpx;
height: 180rpx; height: 180rpx;
...@@ -766,7 +740,7 @@ ...@@ -766,7 +740,7 @@
background-color: #FFFFFF; background-color: #FFFFFF;
} }
/* //培训通知 */ /* 培训通知 */
.notice { .notice {
/* border: #808080 solid 2rpx; */ /* border: #808080 solid 2rpx; */
width: 100%; width: 100%;
...@@ -795,13 +769,11 @@ ...@@ -795,13 +769,11 @@
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
/* //在线学习 */ /* 在线学习 */
.currency-class { .currency-class {
width: 100%; width: 100%;
/* height: 340rpx; */
background: #ffffff; background: #ffffff;
padding: 30rpx; padding: 30rpx;
/* margin-bottom: 11px; */
border-radius: 12rpx; border-radius: 12rpx;
} }
...@@ -896,13 +868,12 @@ ...@@ -896,13 +868,12 @@
} }
swiper { swiper {
height: 691rpx; height: 920rpx;
} }
.line-percent { .line-percent {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
// line-height: 24rpx;
font-size: 24rpx; font-size: 24rpx;
color: #999999; color: #999999;
margin: 20rpx; margin: 20rpx;
...@@ -949,8 +920,6 @@ ...@@ -949,8 +920,6 @@
color: #999999; color: #999999;
} }
.standard {}
.standard-img { .standard-img {
width: 160rpx; width: 160rpx;
height: 120rpx; height: 120rpx;
...@@ -979,7 +948,6 @@ ...@@ -979,7 +948,6 @@
} }
.notice-bottom-left { .notice-bottom-left {
/* margin-left: 30rpx; */
font-size: 24rpx; font-size: 24rpx;
color: #999999; color: #999999;
} }
...@@ -1012,10 +980,6 @@ ...@@ -1012,10 +980,6 @@
font-size: 20rpx; font-size: 20rpx;
} }
.h68 {
// height: 68rpx;
}
.h48 { .h48 {
height: 48rpx; height: 48rpx;
} }
...@@ -1025,4 +989,9 @@ ...@@ -1025,4 +989,9 @@
height: 100%; height: 100%;
position: absolute; position: absolute;
} }
.load-more {
padding-top: 50rpx;
padding-bottom: 200rpx;
}
</style> </style>
...@@ -42,5 +42,6 @@ ...@@ -42,5 +42,6 @@
color: #666666; color: #666666;
margin-left: 30rpx; margin-left: 30rpx;
margin-top: 30rpx; margin-top: 30rpx;
margin-right: 30rpx;
} }
</style> </style>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<view class="uni-padding-wrap uni-common-mt"> <view class="uni-padding-wrap uni-common-mt">
<view><video object-fit="cover" class="course-video" id="courseVideo" :src="courseSrc" <view><video object-fit="cover" class="course-video" id="courseVideo" :src="courseSrc"
:options="playerOptions" :playsinline="true" @play="playCourse" @error="videoErrorCallback" :options="playerOptions" :playsinline="true" @play="playCourse" @error="videoErrorCallback"
@ready="playerReadied" @timeupdate="onPlayerTimeupdate($event)" controls></video></view> @ready="playerReadied" @timeupdate="onPlayerTimeupdate($event)" autoplay="true" controls></video></view>
<view class="title-content"> <view class="title-content">
<view class="item-content"> <view class="item-content">
<view class="item-st"> <view class="item-st">
...@@ -239,7 +239,7 @@ ...@@ -239,7 +239,7 @@
this.section_id = res.data.id; this.section_id = res.data.id;
this.section_content = res.data.content; this.section_content = res.data.content;
this.teacher.name = res.data.teachers[0].name; this.teacher.name = res.data.teachers[0].name;
this.teacher.avatar = res.data.teachers[0].avatar; this.teacherImage = res.data.teachers[0].avatar;
this.teacherIntro = res.data.teachers[0].intro.replace(/<p.*?>|<\/p>/ig, ""); this.teacherIntro = res.data.teachers[0].intro.replace(/<p.*?>|<\/p>/ig, "");
this.params.course_id = res.data.course_id; this.params.course_id = res.data.course_id;
if (this.isShowVideo) { if (this.isShowVideo) {
......
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