Commit 7df02395 authored by zhengzy's avatar zhengzy

增加接口

parent 479b235f
...@@ -7,6 +7,7 @@ import { ...@@ -7,6 +7,7 @@ import {
import { import {
settledApiFun settledApiFun
} from '@/common/api/settled.js'; } from '@/common/api/settled.js';
import { learnApiFun } from "@/common/api/learn.js";
let apiFun = function(vm) { let apiFun = function(vm) {
let commonApi = commonApiFun(vm); let commonApi = commonApiFun(vm);
let settledApi = settledApiFun(vm) let settledApi = settledApiFun(vm)
...@@ -14,7 +15,8 @@ let apiFun = function(vm) { ...@@ -14,7 +15,8 @@ let apiFun = function(vm) {
let apiUrl = { let apiUrl = {
...commonApi, ...commonApi,
...settledApi, ...settledApi,
...cloudApi ...cloudApi,
...learnApiFun
} }
return apiUrl return apiUrl
} }
......
const globalUrl = process.uniEnv || {}
const ucenterApiUrl = globalUrl.ucenterUrl.apiUrl
let learnApiFun = function(vm){
/* 查询用户基本信息 */
let getTrainingNoticeList = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/settled/get-cert-list', params);
const learnApi = {
getTrainingNoticeList,
}
return learnApi
}
module.exports = {
learnApiFun
}
\ No newline at end of file
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
/* 快应用特有相关 */ /* 快应用特有相关 */
"mp-weixin" : { "mp-weixin" : {
/* 微信小程序特有相关 */ /* 微信小程序特有相关 */
"appid" : "wxd1d6eede324b0465", "appid" : "wx402a711597dddbaf",
"setting" : { "setting" : {
"urlCheck" : false, "urlCheck" : false,
"es6" : true, "es6" : true,
......
...@@ -141,6 +141,9 @@ ...@@ -141,6 +141,9 @@
} }
], ],
"navigateToMiniProgramAppIdList":[
"wxd1d6eede324b0465"
],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app", "navigationBarTitleText": "uni-app",
......
<template> <template>
<view class="content"> <view class="content">
<view class=""> <view class="">
<text class="dx">多选</text><text class="num">第1题</text><text class="all">/共30题</text> <view class="" style="padding-left: 94rpx;margin:36rpx 0">
<view class=""> <text class="dx">多选</text><text class="num">第1题</text><text class="all">/共30题</text>
</view>
<view class="" style="text-align: center;">
一下对压缩机故障描述有误的是? 一下对压缩机故障描述有误的是?
</view> </view>
<view class=""> <view class="" style="margin-top: 130rpx;">
<button>A</button> <view class="list-box">
<button>B</button> <view v-for="(item,index) in list" :key="index" @click="choice(index)" :class="[item.selected?'selde':'noselde']">
<button>C</button> {{item.selected?item.title:item.title}}
<button>D</button> </view>
<button>E</button> </view>
</view> </view>
<button class="btn">下一题</button> <button class="btn">下一题</button>
</view> </view>
...@@ -21,35 +23,135 @@ ...@@ -21,35 +23,135 @@
export default { export default {
data() { data() {
return { return {
list: [{
} selected: false,
title: 'A'
},
{
selected: false,
title: 'B'
},
{
selected: false,
title: 'C'
},
{
selected: false,
title: 'D'
},
{
selected: false,
title: 'E'
}
],
selectId:[],
};
}, },
methods: { methods: {
abc() {
console.log("11111")
var arr = document.querySelector(".btm");
for (let i = 0; i < arr.length; i++) {
arr[i].onclick = function() {
console.log(this.value)
}
}
},
//选择按钮
choice(index) {
if (this.list[index].selected == true) {
this.list[index].selected = false;
//取消选中时删除数组中的值
for (var i = 0; i < this.selectId.length; i++) {
if (this.selectId[i] === this.list[index].title) {
this.selectId.splice(i, 1);
}
}
console.log("选中的值", this.selectId)
} else {
this.list[index].selected = true;
this.selectId.push(this.list[index].title)
console.log("选中的值", this.selectId)
}
}
},
mounted() {
console.log("111111")
} }
} }
</script> </script>
<style> <style lang="scss">
.content{ .content {
width: 600rpx; width: 600rpx;
height: 800rpx; height: 800rpx;
/* background: #8F8F94; */ /* background: #8F8F94; */
margin: 0 auto ; margin: 0 auto;
} }
.dx{
.dx {
padding: 0rpx; padding: 0rpx;
background: #2979FF; background: #2979FF;
color: #FFFFFF; color: #FFFFFF;
border-radius: 0px; border-radius: 0px;
} }
.num{
.num {
color: #2B85E4; color: #2B85E4;
} }
.all{
.all {
color: #8F8F94; color: #8F8F94;
} }
.btn{
margin-top:0rpx; .btn {
margin-top: 98rpx;
width: 476rpx;
height: 60rpx;
line-height: 30px;
background: #007AFF;
color: #FFFFFF;
}
.btm {
width: 476rpx;
height: 60rpx;
line-height: 30px;
margin: 34rpx auto;
}
.list-box {
// display: flex;
// flex-wrap: wrap;
padding: 16upx;
border-radius: 10upx;
view {
width: 476rpx;
height: 60upx;
line-height: 60upx;
text-align: center;
margin: 26rpx auto 0;
}
}
/*已选择*/
.selde {
background: #007AFF;
color: #FFFFFF;
border-radius: 20upx;
font-size: 26rpx;
padding: 0 10upx;
}
/*未选择*/
.noselde {
background: #E4E7ED;
color: #959595;
border-radius: 20upx;
font-size: 20upx;
padding: 0 10upx;
} }
</style> </style>
...@@ -18,60 +18,54 @@ ...@@ -18,60 +18,54 @@
<view class="" style="font-size: 40rpx;font-weight: 1000;"> <view class="" style="font-size: 40rpx;font-weight: 1000;">
第一章 充电桩常见问题答疑 第一章 充电桩常见问题答疑
</view> </view>
<view class="" > <view class="video" >
<view class="" style="display: flex; margin: 20rpx 0;"> <view class="video_1" >
<view class="" style="width: 100rpx;height:38rpx;border: 1px solid #8F8F94;text-align: center;line-height: 38rpx;"> <view class="text" >
视频 视频
</view> </view>
<text style="margin-left: 44rpx;">1-1唯修汇公司简介</text> <text class="text2">1-1唯修汇公司简介</text>
</view> </view>
<view class="" style="display: flex;margin:20rpx 0;"> <view class="video_1" >
<view class="" style="width: 100rpx;height:38rpx;border:1px solid #8F8F94;text-align: center;line-height: 38rpx;" > <view class="text">
视频 视频
</view> </view>
<text style="margin-left:44rpx;">1-2可接单评定标准</text> <text class="text2">1-2可接单评定标准</text>
</view> </view>
<view class="" style="display: flex;margin:20rpx 0;"> <view class="video_1" >
<view class="" style="width: 100rpx;height: 38rpx;border:1px solid #8F8F94;text-align: center;line-height: 38rpx;"> <view class="text">
视频 视频
</view> </view>
<text style="margin-left:44rpx;">1-3结算规则</text> <text class="text2">1-3结算规则</text>
</view> </view>
<view class="" style="display: flex;margin: 20rpx 0;"> <view class="video_1">
<view class="" style="width: 100rpx;height: 38rpx;border:1px solid #8F8F94;text-align: center;line-height: 38rpx;"> <view class="text">
视频 视频
</view> </view>
<text style="margin-left: 44rpx;">1-4充电桩安装开城计划</text> <text class="text2">1-4充电桩安装开城计划</text>
</view> </view>
<view class="" style="display: flex;margin: 20rpx 0;"> <view class="video_1">
<view class="" style="width: 100rpx;height: 38rpx;border:1px solid #8F8F94;text-align: center;line-height: 38rpx;"> <view class="text">
视频 视频
</view> </view>
<text style="margin-left: 44rpx;">1-5缴纳质保金和费用答疑</text> <text class="text2">1-5缴纳质保金和费用答疑</text>
</view> </view>
<view class="" style="display: flex;margin: 20rpx 0;"> <view class="video_1" >
<view class="" style="width: 100rpx;height: 38rpx;border: 1px solid #8F8F94;text-align: center;line-height: 38rpx;"> <view class="text" >
视频 视频
</view> </view>
<text style="margin-left:44rpx;">1-6安装材料品牌答疑1</text> <text class="text2">1-6安装材料品牌答疑1</text>
</view> </view>
<view class="" style="display: flex;margin: 20rpx 0;"> <view class="video_1" >
<view class="" style="width: 100rpx;height: 38rpx;border:1px solid #8F8F94;text-align: center;line-height: 38rpx;"> <view class="text">
视频 视频
</view> </view>
<text style="margin-left:44rpx;">1-7安装材料答疑2</text> <text class="text2">1-7安装材料答疑2</text>
</view> </view>
<view class="" style="display: flex;margin: 20rpx 0;"> <view class="video_1">
<view class="" style="width: 100rpx;height: 38rpx;border:1px solid #8F8F94;text-align: center;"> <view class="text">
视频 视频
</view> </view>
<text style="margin-left:44rpx;">1-8其他问题答疑</text> <text class="text2">1-8其他问题答疑</text>
</view>
<view class="" style="display: flex;margin: 20rpx 0;">
<view class="" style="width: 100rpx;height: 38rpx;border: 1px solid #8F8F94;text-align: center;">
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -92,7 +86,7 @@ ...@@ -92,7 +86,7 @@
} }
</script> </script>
<style> <style lang="scss">
.title{ .title{
height: 164rpx; height: 164rpx;
font-size: 40rpx; font-size: 40rpx;
...@@ -107,4 +101,21 @@ ...@@ -107,4 +101,21 @@
width: 128rpx; width: 128rpx;
height: 128rpx; height: 128rpx;
} }
.video_1{
display: flex;
margin: 20rpx 0;
.text{
width: 100rpx;
height: 38rpx;
border:1px solid #8F8F94;
text-align: center;
line-height: 38rpx;
margin-right: 82rpx;
}
.text2{
font-size: 33rpx;
color: #82848A;
}
}
</style> </style>
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
<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: 800rpx;width:100%;" @scrolltolower="onreachBottom">
<view class="standard"> <view class="standard" @click="goToPrint">
<text>充电桩交付规范</text> <text>充电桩交付规范</text>
<text>></text> <text >></text>
</view> </view>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,7 @@
快速学习,使用APP接单、抢单 快速学习,使用APP接单、抢单
</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="0" 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>
...@@ -323,6 +323,7 @@ ...@@ -323,6 +323,7 @@
this.swiperCurrent = current; this.swiperCurrent = current;
this.current = current; this.current = current;
}, },
//跳转到assessment页面
aaa(){ aaa(){
wx.navigateTo({ wx.navigateTo({
...@@ -330,6 +331,7 @@ ...@@ -330,6 +331,7 @@
url:'./assessment' url:'./assessment'
}) })
}, },
//跳转到
bbb(){ bbb(){
wx.navigateTo({ wx.navigateTo({
...@@ -339,7 +341,22 @@ ...@@ -339,7 +341,22 @@
//scroll-view到底部加载更多 //scroll-view到底部加载更多
onreachBottom() { onreachBottom() {
},
//跳转到拍照小程序首页
goToPrint(){
console.log("111111")
uni.navigateToMiniProgram({
appId:'wxd1d6eede324b0465',
success(res) {
//打开成功
console.log('success',res)
},
fail(err){
console.log('err',err)
}
})
} }
} }
} }
</script> </script>
......
...@@ -4,21 +4,24 @@ ...@@ -4,21 +4,24 @@
考试结果 考试结果
</view> </view>
<view class="result"> <view class="result">
考试不通过 未通过
</view> </view>
<view class="details"> <view class="details">
<view class="text1"> <view class="">
<text>合格条件:</text><text>答对20题</text> <text class="first">合格条件:</text><text>答对20题</text>
</view> </view>
<view class="text1"> <view class="">
<text>考试结果:</text><text>答对10题</text> <text class="first">考试结果:</text><text>答对10题</text>
</view> </view>
<view class="text1"> <view class="">
<text>考试用时:</text><text>16分29秒</text> <text class="first">考试用时</text><text>16分29秒</text>
</view>
<view class="btn">
<button class="btn1">再答一次</button>
<button class="btn2">退出重考</button>
</view> </view>
<button class="btn">再答一次</button>
<button class="btn2">退出重考</button>
</view> </view>
</view> </view>
</template> </template>
...@@ -29,47 +32,57 @@ ...@@ -29,47 +32,57 @@
} }
}, },
methods: { methods:{
} }
} }
</script> </script>
<style> <style lang="scss">
.content{ .content{
width: 592rpx; width: 100%;
height: 800rpx; height: 950rpx;
/* background: #19BE6B; */ background: #DCDFE6;
margin: 84rpx auto; padding: 53rpx;
overflow: hidden;
} }
.title{ .title{
margin:7px 13px; font-size: 30rpx;
} }
.result{ .result{
color: red; color: red;
font-size: 56rpx; font-size: 73rpx;
text-align: center; text-align: center;
margin: 52rpx 0; margin: 46rpx 0;
} }
.details{ .details{
height: 400rpx; border-top: 2rpx dashed #808080;
border-top: 1px dashed #808080; height: 600rpx;
} padding-top: 94rpx;
.text1{ view{
margin: 16rpx 24rpx; margin: 26rpx 0 0;
.first{
margin: 0 20rpx 0;
}
}
} }
.btn{ .btn{
width: 476rpx; .btn1{
height: 80rpx; width: 477rpx;
background: #007AFF; height: 61rpx;
font-size: 32rpx; border-radius: 27rpx;
margin:206rpx auto 38rpx ; line-height: 61rpx;
} font-size: 29rpx;
.btn2{ background: #007AFF;
width: 476rpx; color: #FFFFFF;
height: 80rpx; margin: 140rpx auto 34rpx;
font-size: 30rpx; }
margin: 0 auto ; .btn2{
width: 477rpx;
height: 61rpx;
border-radius: 27rpx;
line-height: 61rpx;
font-size: 29rpx;
}
} }
</style> </style>
\ No newline at end of file
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