Commit b542092f authored by Facius's avatar Facius
parents f4c4b441 033ec3e0
...@@ -12,11 +12,12 @@ let apiFun = function(vm) { ...@@ -12,11 +12,12 @@ let apiFun = function(vm) {
let commonApi = commonApiFun(vm); let commonApi = commonApiFun(vm);
let settledApi = settledApiFun(vm) let settledApi = settledApiFun(vm)
let cloudApi = cloudRulesApiFun(vm) let cloudApi = cloudRulesApiFun(vm)
let learnApi=learnApiFun(vm)
let apiUrl = { let apiUrl = {
...commonApi, ...commonApi,
...settledApi, ...settledApi,
...cloudApi, ...cloudApi,
...learnApiFun ...learnApi
} }
return apiUrl return apiUrl
} }
......
...@@ -3,7 +3,7 @@ const ucenterApiUrl = globalUrl.ucenterUrl.apiUrl ...@@ -3,7 +3,7 @@ const ucenterApiUrl = globalUrl.ucenterUrl.apiUrl
let learnApiFun = function(vm){ let learnApiFun = function(vm){
/* 查询用户基本信息 */ /* 查询用户基本信息 */
let getTrainingNoticeList = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/settled/get-cert-list', params); let getTrainingNoticeList = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/notice/list', params);
const learnApi = { const learnApi = {
getTrainingNoticeList, getTrainingNoticeList,
......
<template> <template>
<view class="study"> <view class="study">
<view class="banner"> <view class="banner">
<u-swiper :list="list"></u-swiper> <u-swiper :list="banner"></u-swiper>
</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>
...@@ -18,140 +18,22 @@ ...@@ -18,140 +18,22 @@
</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: 666rpx;width:100%;" @scrolltolower="onreachBottom" >
<view class="notice" @click="bbb"> <view v-for="item in list" :key="item.id" class="notice" @click="bbb">
<view class="n-head"> <view class="n-head">
《关于充电桩xxxx》 《{{item.title}}》
</view> </view>
<view class=""> <view class="">
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx {{item.body}}
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</view> </view>
</view> </view>
<view class="notice" @click="bbb"> <view v-shou="isLoadMore">
<view class="n-head"> <u-loadmore :status="loadStatus" />
《关于充电桩xxxx》
</view>
<view class="">
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</view>
</view>
<view class="notice" @click="bbb">
<view class="n-head">
《关于充电桩xxxx》
</view>
<view class="">
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</view>
</view>
<view class="notice" @click="bbb">
<view class="n-head">
《关于充电桩xxxx》
</view>
<view class="">
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</view>
</view>
<view class="notice" @click="bbb">
<view class="n-head">
《关于充电桩xxxx》
</view>
<view class="">
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</view>
</view>
<view class="notice" @click="bbb">
<view class="n-head">
《关于充电桩xxxx》
</view>
<view class="">
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</view>
</view>
<view class="notice" @click="bbb">
<view class="n-head">
《关于充电桩xxxx》
</view>
<view class="">
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</view>
</view>
<view class="notice" @click="bbb">
<view class="n-head">
《关于充电桩xxxx》
</view>
<view class="">
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</view>
</view><view class="notice" @click="bbb">
<view class="n-head">
《关于充电桩xxxx》
</view>
<view class="">
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</view>
</view>
<view class="notice" @click="bbb">
<view class="n-head">
《关于充电桩xxxx》
</view>
<view class="">
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</view>
</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:500rpx;width:100%;" @scrolltolower="onreachBottom"> <scroll-view scroll-y style="height:500rpx;width:100%;">
<view class="lean"> <view class="lean">
<view class="top"> <view class="top">
<view class="currency-class"> <view class="currency-class">
...@@ -271,167 +153,220 @@ ...@@ -271,167 +153,220 @@
</swiper> </swiper>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default{ export default {
data() { data() {
return { return {
list: [{ banner: [
image: 'https://cdn.uviewui.com/uview/swiper/1.jpg', {
title: '昨夜星辰昨夜风,画楼西畔桂堂东' 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/2.jpg",
}, title: "身无彩凤双飞翼,心有灵犀一点通",
{ },
image: 'https://cdn.uviewui.com/uview/swiper/3.jpg', {
title: '谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳' image: "https://cdn.uviewui.com/uview/swiper/3.jpg",
} title: "谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳",
], },
tabs:[ ],
{ tabs: [
name:'交付规范' {
},{ name: "交付规范",
name:'培训通知' },
},{ {
name:'在线学习', name: "培训通知",
},{ },
name:'考核认证' {
} name: "在线学习",
], },
current:0, {
swiperCurrent:0, name: "考核认证",
} },
}, ],
methods: { current: 0,
//tabs通知swiper切换 swiperCurrent: 0,
tabsChange(index){ params: {
this.swiperCurrent = index; start: 0,
}, },
//swiper-item左右移动,通知tabs的滑块跟随移动 list: [],
transition(e){ loadStatus: "loading", //加载样式:loadMore-加载前样式,loading-加载加载中样式,nomore-没有数据样式
let dx = e.detail.dx; isLoadMore: false, //是否加载中
this.$refs.uTabs.setDx(dx); };
}, },
animationfinish(e) { onLoad() {
let current = e.detail.current; this.getList();
this.$refs.uTabs.setFinishCurrent(current); },
this.swiperCurrent = current;
this.current = current; methods: {
}, getList() {
//跳转到assessment页面 this.$u.api
aaa(){ .getTrainingNoticeList(this.params)
.then((res) => {
wx.navigateTo({ if (res.code == 200) {
if (res.data) {
url:'./assessment' this.list = this.list.concat(res.data);
}) if (res.data.length < 5) {
}, //判断接口返回数据量小于请求数据量,则表示此为最后一页
//跳转到 this.isLoadMore = true;
bbb(){ this.loadStatus = "nomore";
wx.navigateTo({ } else {
this.isLoadMore = false;
url:'./news-details' }
}) } else {
}, this.isLoadMore = true;
//scroll-view到底部加载更多 this.loadStatus = "nomore";
onreachBottom() { }
} else {
}, //接口请求失败的处理
//跳转到拍照小程序首页 uni.showToast({ title: res.message, icon: "none" });
goToPrint(){ this.isLoadMore = false;
console.log("111111") if (this.params.start > 0) {
uni.navigateToMiniProgram({ this.page -= 5;
appId:'wxd1d6eede324b0465', }
success(res) { }
//打开成功 })
console.log('success',res) .catch((err) => {
}, uni.showToast({
fail(err){ title: err,
console.log('err',err) icon: "none",
} });
}) this.isLoadMore = false;
} if (this.params.start > 0) {
this.page -= 5;
} }
} });
},
//tabs通知swiper切换
tabsChange(index) {
this.swiperCurrent = index;
},
//swiper-item左右移动,通知tabs的滑块跟随移动
transition(e) {
let dx = e.detail.dx;
this.$refs.uTabs.setDx(dx);
},
animationfinish(e) {
let current = e.detail.current;
this.$refs.uTabs.setFinishCurrent(current);
this.swiperCurrent = current;
this.current = current;
},
//跳转到assessment页面
aaa() {
wx.navigateTo({
url: "./assessment",
});
},
//跳转到
bbb() {
wx.navigateTo({
url: "./news-details",
});
},
//scroll-view到底部加载更多
onreachBottom() {
console.log("上拉触底函数");
//上拉触底函数
if (!this.isLoadMore) {
this.isLoadMore = true;
this.params.start += 5;
if (this.loadStatus !== "nomore") {
this.getList();
}
}
},
//跳转到拍照小程序首页
goToPrint() {
console.log("111111");
uni.navigateToMiniProgram({
appId: "wxd1d6eede324b0465",
success(res) {
//打开成功
console.log("success", res);
},
fail(err) {
console.log("err", err);
},
});
},
},
};
</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; 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{ .img {
width: 200rpx; width: 200rpx;
height: 126rpx; height: 126rpx;
display: block; display: block;
margin-right: 0rpx; margin-right: 0rpx;
}
} .right {
.right{ width: 428rpx;
width: 428rpx; height: 147rpx;
height: 147rpx; }
} .tab {
.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>
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