Commit e0d30d13 authored by Damon's avatar Damon
parents 1bf52ac1 771e4d90
const UNI_APP = { const UNI_APP = {
ucenterUrl: { ucenterUrl: {
apiUrl: 'http://rest-u.yunya.com', //php端域名请求头 apiUrl: 'http://rest-u.yunya.com', //php端域名请求头
xueUrl: 'http://xue.yunya.com', //学院 xueUrl: 'http://rest-xue.yunya.com', //学院
// banshou: 'https://m.banshou.com', //扳手app // banshou: 'https://m.banshou.com', //扳手app
}, },
systemUrl: { systemUrl: {
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
} }
if (ENV_VAR) { if (ENV_VAR) {
process.uniEnv = {}; process.uniEnv = {};
process.uniEnv['node_env'] = NODE_ENV;
for (let key in ENV_VAR) { for (let key in ENV_VAR) {
process.uniEnv[key] = ENV_VAR[key]; process.uniEnv[key] = ENV_VAR[key];
} }
......
const UNI_APP = { const UNI_APP = {
ucenterUrl: { ucenterUrl: {
apiUrl: 'https://rest-u.banshouhui.com', //php端域名请求头 apiUrl: 'https://rest-u.banshouhui.com', //php端域名请求头
xueUrl:'https://xue.banshouhui.com', //学院 xueUrl:'https://rest-xue.banshouhui.com', //学院
banshou:'https://m.banshou.com' ,//扳手app banshou:'https://m.banshou.com' ,//扳手app
}, },
systemUrl: { systemUrl: {
......
const UNI_APP = { const UNI_APP = {
ucenterUrl: { ucenterUrl: {
apiUrl: 'https://rest-u.test.ibanshou.cn', //php端域名请求头 apiUrl: 'https://rest-u.test.ibanshou.cn', //php端域名请求头
// xueUrl: 'https://xue.banshouhui.com', //学院 xueUrl: 'https://rest-xue.test.ibanshou.cn', //学院
banshou: 'https://m.test.ibanshou.cn', //扳手app banshou: 'https://m.test.ibanshou.cn', //扳手app
}, },
systemUrl: { systemUrl: {
......
...@@ -88,7 +88,7 @@ let orderApiFun = function(vm){ ...@@ -88,7 +88,7 @@ let orderApiFun = function(vm){
/** /**
* 检查是否可以拒单 * 检查是否可以拒单
*/ */
let checkRejectable = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/order/'+ vm.vuex_token+'/wokerOrder/checkRejectable', params); let checkRejectable = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/'+ vm.vuex_token+'/wokerOrder/checkRejectable', params);
/** /**
* 获取签到距离 * 获取签到距离
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
</view> </view>
</view> </view>
<u-button class="right-btn" @click.stop="handleClick" :custom-style="buttonStyle" type="primary" <u-button class="right-btn" @click.stop="handleClick" :custom-style="buttonStyle" type="primary"
shape="circle"> shape="circle" :hover-class="buttonTextType ? 'none' : ''">
{{orderText}} {{orderText}}
</u-button> </u-button>
</view> </view>
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
currentWillOverTime: 10000, // 剩余时间 currentWillOverTime: 10000, // 剩余时间
currentOverTime: new Date().getTime() + 10000, // 超过时间点 currentOverTime: new Date().getTime() + 10000, // 超过时间点
auditDatetime: '2021.04.19 12:45:09', // 审核时间 auditDatetime: '2021.04.19 12:45:09', // 审核时间
submissionTime: '2021.04.19 16:24:48', // 提交时间 orderFinishDatetime: '2021.04.19 16:24:48', // 提交时间
auditResults: {}, // 审核结果 auditResults: {}, // 审核结果
orderBusinessType: 'R', // 业务类型 R 为抢单 orderBusinessType: 'R', // 业务类型 R 为抢单
orderId: '0', // 订单id orderId: '0', // 订单id
...@@ -174,7 +174,7 @@ ...@@ -174,7 +174,7 @@
'width': '100rpx' 'width': '100rpx'
}] }]
}, },
buttonDisabled() { buttonTextType() {
return this.orderType == 4 || this.orderType == 6 return this.orderType == 4 || this.orderType == 6
}, },
dizhiImage() { dizhiImage() {
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
}, },
methods: { methods: {
handleClick() { handleClick() {
if (this.buttonDisabled) return // if (this.buttonDisabled) return
this.$emit('action') this.$emit('action')
}, },
handleClickCell() { handleClickCell() {
......
<template>
<view class="settle-view">
<u-navbar style="position: absolute;" title="考核认证" background="{background: transparent}" :border-bottom="false"
back-icon-color="#333333" title-color="#333333"></u-navbar>
<view :class="['introduction', {'active': type}]">
<slot></slot>
</view>
<view class="settle-bottom">
<slot name="bottom"></slot>
</view>
</view>
</template>
<script>
export default {
props: {
index: {
type: Number,
default: 1
},
// 0: introduction距离底部168rpx 1: introduction距离底部0rpx
type: {
type: Number,
default: 0
}
},
data() {
return {}
},
computed: {
url() {
return process.uniEnv.qn_base_url + 'topl' + this.index + '.png'
}
}
}
</script>
<style lang="scss" scoped>
.settle-view {
::-webkit-scrollbar {
width: 0;
}
}
.introduction {
border-radius: 12rpx;
overflow: auto;
position: fixed;
top: 160rpx;
bottom: 168rpx;
left: 30rpx;
right: 30rpx;
&.active {
bottom: 0rpx;
}
}
.settle-bottom {
position: fixed;
bottom: 44rpx;
width: 100%;
}
</style>
...@@ -75,14 +75,15 @@ ...@@ -75,14 +75,15 @@
{ {
"path": "answer", "path": "answer",
"style": { "style": {
"navigationBarTitleText": "考试答题", "navigationBarTitleText": "考核认证",
"navigationStyle":"custom" "navigationStyle":"custom"
} }
}, },
{ {
"path":"result", "path":"result",
"style":{ "style":{
"navigationBarTitleText":"考试答题" "navigationBarTitleText":"",
"navigationStyle":"custom"
} }
}, },
{ {
...@@ -100,7 +101,8 @@ ...@@ -100,7 +101,8 @@
{ {
"path": "curriculum", "path": "curriculum",
"style": { "style": {
"navigationBarTitleText": "" "navigationBarTitleText": "",
"navigationStyle": "custom" // 隐藏系统导航栏
} }
}, },
{ {
...@@ -116,7 +118,16 @@ ...@@ -116,7 +118,16 @@
"path": "course-detail", "path": "course-detail",
"style": { "style": {
"navigationBarTitleText": "培训视频", "navigationBarTitleText": "培训视频",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"navigationStyle": "custom" // 隐藏系统导航栏
}
},
{
"path": "exam-pass",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom" // 隐藏系统导航栏
} }
} }
] ]
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<scroll-view scroll-y style="margin-bottom: 20rpx;height: 100vh;" @scrolltolower="reachBottom" <scroll-view scroll-y style="margin-bottom: 20rpx;height: 100vh;" @scrolltolower="reachBottom"
scroll-anchoring scroll-y="true" refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100" scroll-anchoring scroll-y="true" refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100"
refresher-background="#F4F5F7" @refresherpulling="triggered = true" @refresherrefresh="onRefresh" refresher-background="#F4F5F7" @refresherpulling="triggered = true" @refresherrefresh="onRefresh"
@refresherrestore="onRestore" @refresherabort="onAbort"> @refresherrestore="onRestore" @refresherabort="onAbort" enable-back-to-top>
<TabBarPage title="充电桩自营平台"> <TabBarPage title="充电桩自营平台">
<image class="banner-image" :src="bannerImage"></image> <image class="banner-image" :src="bannerImage"></image>
...@@ -22,11 +22,11 @@ ...@@ -22,11 +22,11 @@
</view> </view>
</view> </view>
<!-- 订单推荐吸顶 --> <!-- 订单推荐吸顶 -->
<u-sticky offset-top="0"> <!-- <u-sticky offset-top="0"> -->
<view class="sticky"> <view class="sticky">
<text>订单推荐</text> <text>订单推荐</text>
</view> </view>
</u-sticky> <!-- </u-sticky> -->
<view class="order-view"> <view class="order-view">
<!-- 入驻成功之后显示推荐订单列表 --> <!-- 入驻成功之后显示推荐订单列表 -->
<view class="order-list-view" v-if="loaded"> <view class="order-list-view" v-if="loaded">
......
This diff is collapsed.
...@@ -100,6 +100,7 @@ ...@@ -100,6 +100,7 @@
} }
}, },
onShow() { onShow() {
this.pageNumber = 0
this.getOrderCount() this.getOrderCount()
this.getOrderList(this.currentIndex); this.getOrderList(this.currentIndex);
}, },
......
This diff is collapsed.
...@@ -8,21 +8,21 @@ ...@@ -8,21 +8,21 @@
></u-navbar> ></u-navbar>
<view class="title">考试规则</view> <view class="title">考试规则</view>
<view class="test"> <view class="test">
<view class="slogan" <view class="slogan">
>这是一场严肃的考试,请认真查看 规则,预祝您顺利通过考试!</view 这是一场严肃的考试,请认真查看 规则,预祝您顺利通过考试!
> </view>
<view class="text"> <view class="text">
<text class="left">考试科目:</text <text class="left">考试科目:</text
><text style="color: #007aff">服务规范</text> ><text style="color: #007aff">{{ desc.title }}</text>
</view> </view>
<view class="text"> <view class="text">
<text class="left">合格条件:</text><text>60分</text> <text class="left">合格条件:</text><text>{{ desc.score }}</text>
</view> </view>
<view class="text"> <view class="text">
<text class="left">考试时间:</text><text>30分钟</text> <text class="left">考试时间:</text><text>{{ desc.time }}</text>
</view> </view>
<view class="text"> <view class="text">
<text class="left">题目来源:</text><text>系统随机20题</text> <text class="left">题目来源:</text><text>系统随机{{ desc.number }}题</text>
</view> </view>
<button @click="getUserExamId()">开始考试</button> <button @click="getUserExamId()">开始考试</button>
</view> </view>
...@@ -30,27 +30,99 @@ ...@@ -30,27 +30,99 @@
</template> </template>
<script> <script>
let condition = {
"dev": {
"id-2": {
"score": "60分",
"time": "30分钟",
"number": "20",
"title": "服务规范"
},
"id-3": {
"score": "30分",
"time": "15分钟",
"number": "10",
"title": "服务规范"
},
"id-4": {
"score": "15分",
"time": "6分钟",
"number": "4",
"title": "交付规范"
}
},
"test": {
"id-2": {
"score": "60分",
"time": "30分钟",
"number": "20",
"title": "服务规范"
},
"id-3": {
"score": "30分",
"time": "15分钟",
"number": "10",
"title": "服务规范"
},
"id-4": {
"score": "15分",
"time": "6分钟",
"number": "4",
"title": "交付规范"
}
},
"prod": {
"id-2": {
"score": "60分",
"time": "30分钟",
"number": "20",
"title": "服务规范"
},
"id-3": {
"score": "30分",
"time": "15分钟",
"number": "10",
"title": "服务规范"
},
"id-4": {
"score": "15分",
"time": "6分钟",
"number": "4",
"title": "交付规范"
}
}
};
let env = process.uniEnv.node_env;
let desc = condition[env];
export default { export default {
data() { data() {
return { return {
examId: 2, desc: null,
examId: null,
exam: null, exam: null,
userExamId: null, userExamId: null,
}; };
}, },
onLoad() { onLoad(param) {
this.examId = param.examId
this.desc = desc["id-" + this.examId]
// this.getUserExamInfo(); // this.getUserExamInfo();
}, },
methods: { methods: {
//申请考试获取userExamId //申请考试获取userExamId
getUserExamId: function () { getUserExamId: function () {
var that = this; let examId = this.examId;
console.log("这是一条消息"); wx.navigateTo({
url: "/pages/learn/answer?examId=" + examId,
});
},
getUserExamInfo() {
uni.request({ uni.request({
url: url:
"http://192.168.1.22" + process.uniEnv.systemUrl.apiUrl +
"/wxh-worker-rest/rest/exam/serviceRule/" + "/wxh-worker-rest/rest/exam/serviceRule/" +
that.vuex_token + this.vuex_token +
"?examId=" + "?examId=" +
this.examId, this.examId,
method: "POST", method: "POST",
...@@ -63,15 +135,15 @@ export default { ...@@ -63,15 +135,15 @@ export default {
uni.hideLoading(); uni.hideLoading();
if (res.data.code == 200) { if (res.data.code == 200) {
if (res.data.data.userExamId) { if (res.data.data.userExamId) {
that.userExamId = res.data.data.userExamId; this.userExamId = res.data.data.userExamId;
console.log("这个是个标识符", that.userExamId); console.log("这个是个标识符", this.userExamId);
} }
} }
}, },
}); });
setTimeout(() => { setTimeout(() => {
wx.navigateTo({ wx.navigateTo({
url: "./answer?userExamId=" + that.userExamId, url: "/pages/learn/answer?userExamId=" + this.userExamId,
}); });
}, 1000); }, 1000);
}, },
......
<template>
<view class="content">
<u-navbar
back-icon-color="#FFFFFF"
:background="background"
title-color="#fff"
:border-bottom="false"
></u-navbar>
<view class="title">考试结果</view>
<view class="test">
<view class="result">
<view class="circle">{{ score }}</view>
</view>
<view class="test-explain">
<view class="text1">
您已成功通过本次考试
</view>
<view class="text2">
通过本科目后,可进行其他科目考试
</view>
</view>
<view class="btn">
<button class="btnStyle btn2" @click="toIndex()">我知道了</button>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
text: "",
examId: 2,
result: null,
is_pass: false,
score: 0,
userExamId: null,
};
},
onLoad(a) {
this.userExamId = a.userExamId;
console.log("userExamId是", this.userExamId);
this.nextClick();
},
// onUnload() {
// wx.reLaunch({
// url: "./index",
// });
// },
methods: {
//考试结果
nextClick: function () {
console.log("wwwwwwwwww");
uni.request({
url:
process.uniEnv.systemUrl.apiUrl +
"/wxh-worker-rest/rest/exam" +
"/serviceRule/next/" +
this.vuex_token +
"?userExamId=" +
this.userExamId,
method: "POST",
header: {
"Content-Type": "application/x-www-form-urlencoded",
},
success: (res) => {
this.result = res.data.data;
this.text = res.data.data.examLevelResult;
this.score = this.result.examScore;
this.is_pass = this.result.result == '通过';
console.log("标识符55", this.result);
},
});
},
//再次考试
getAgain: function () {
wx.navigateTo({
url: "./assessment",
});
},
//下次再考跳转到学习主界面页面
toIndex: function () {
wx.reLaunch({
url: "/pages/index/learn?tabs=3",
});
// wx.navigateBack({ delta: 1 })//返回上一级页面
},
},
};
</script>
<style lang="scss">
.test {
margin: 0 30rpx;
overflow: hidden;
border-radius: 12rpx;
padding-bottom: 60rpx;
// background-image: url(../../static/photo/examination.png);
background-repeat: no-repeat;
background-size: 66%;
background-color: #fff;
background-position: right bottom;
min-height: 800rpx;
}
.content {
width: 750rpx;
height: 100vh;
overflow: auto;
background-color: #f4f5f7;
background-image: linear-gradient(to top, #f4f5f7 0%, #2272ff 50%);
background-size: 750rpx 600rpx;
background-repeat: no-repeat;
.title {
padding: 30rpx 30rpx 46rpx;
line-height: 40rpx;
font-size: 40rpx;
color: #fff;
font-weight: bold;
}
.result {
width: 320rpx;
height: 320rpx;
margin-top: 80rpx;
margin-left: 186rpx;
// color: red;
// font-size: 66rpx;
// text-align: center;
// // border:
// border-bottom: 1px dashed #000000;
// margin: 74rpx 0;
// padding: 66rpx;
background-image: linear-gradient(#47ABFF, #2272FF) ;
border-radius:50%;
text-align:center;
padding:10rpx;
font-size:28rpx;
box-sizing:border-box;
}
.result .circle{
width:100%;
height:100%;
background:#fff;
border-radius:50%;
font-size: 120rpx;
color: #2272FF;
text-align: center;
padding-top: 20%;
}
.test-explain {
margin-top: 80rpx;
margin-left: 84rpx;
margin-right: 84rpx;
text-align: center;
.text1 {
font-size: 40rpx;
font-weight: bold;
color: #2272FF;
}
.text2 {
font-size: 24rpx;
color: #666666;
margin-top: 30rpx;
}
}
.btn {
margin-top: 100rpx;
display: flex;
font-size: 32rpx;
font-weight: bold;
.btnStyle {
width: 600rpx;
height: 104rpx;
background-color: #ffffff;
color: #2272FF;
line-height: 90rpx;
margin: 20rpx auto;
border: 2rpx solid #2272FF;
border-radius: 52rpx;
}
.btn2 {
background-color: #2272FF;
color: #ffffff;
}
}
}
</style>
This diff is collapsed.
...@@ -3,9 +3,8 @@ ...@@ -3,9 +3,8 @@
<view class="title"> <view class="title">
{{newsInfo.title}} {{newsInfo.title}}
</view> </view>
<view class="content" v-html="newsInfo.body"> <view class="u-content">
<button @click="add">aaa</button> <u-parse :html="newsInfo.body" :tag-style="style"></u-parse>
{{newsInfo.body}}
</view> </view>
</view> </view>
</template> </template>
...@@ -18,7 +17,10 @@ ...@@ -18,7 +17,10 @@
obj:{ obj:{
}, },
newsInfo:null newsInfo: {
title: '',
body: ''
}
} }
}, },
methods: { methods: {
...@@ -32,7 +34,6 @@ ...@@ -32,7 +34,6 @@
this.newsInfo = news; this.newsInfo = news;
console.log(news,'news') console.log(news,'news')
}) })
}, },
onLoad() { onLoad() {
this.$u.mpShare.path = '' this.$u.mpShare.path = ''
...@@ -42,10 +43,16 @@ ...@@ -42,10 +43,16 @@
<style> <style>
.title{ .title{
text-align: center; font-size: 32rpx;
margin: 34rpx; font-weight: bold;
margin-left: 30rpx;
margin-top: 30rpx;
} }
.content{ .content{
padding: 38rpx; font-size: 24rpx;
line-height: 36rpx;
color: #666666;
margin-left: 30rpx;
margin-top: 30rpx;
} }
</style> </style>
<template> <template>
<view class="test-result"> <view class="content">
<text class="title">考试结果</text> <u-navbar
<view class="result"> {{ text }} </view> back-icon-color="#FFFFFF"
<view class="test-explain"> :background="background"
<view class="hang"> title-color="#fff"
<text class="text1">合格条件:</text :border-bottom="false"
><text class="text2">答对20题</text> ></u-navbar>
<!-- <u-navbar style="position: absolute;" background="{background: transparent}" :border-bottom="false"
back-icon-color="#ffffff" title-color="#ffffff"></u-navbar> -->
<view class="title">考试成绩</view>
<view class="test">
<view class="result">
<view class="circle">{{ score }}</view>
</view> </view>
<view class="hang"> <view class="test-explain">
<text class="text1">考试结果:</text <view class="text1">
><text class="text2">答对10题</text> 很遗憾,您未能通过本次考试
</view> </view>
<view class="hang"> <view class="text2">
<text class="text1">考试用时:</text 您可点击再考一次重新进行考试
><text class="text2">16分29秒</text>
</view> </view>
</view> </view>
<view class="btn"> <view class="btn">
<button class="btn1" @click="getAgain()">再答一次</button> <button class="btnStyle" @click="getAgain()">再答一次</button>
<button class="btn2" @click="toIndex">下次再考</button> <button class="btnStyle btn2" @click="toIndex()">我知道了</button>
</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -28,28 +36,30 @@ export default { ...@@ -28,28 +36,30 @@ export default {
data() { data() {
return { return {
text: "", text: "",
examId: 2, examId: null,
result: null, result: null,
score: 0,
userExamId: null, userExamId: null,
}; };
}, },
onLoad(a) { onLoad(a) {
this.userExamId = a.userExamId; this.userExamId = a.userExamId;
this.examId = a.examId;
console.log("userExamId是", this.userExamId); console.log("userExamId是", this.userExamId);
this.nextClick(); this.nextClick();
}, },
onUnload() { // onUnload() {
wx.reLaunch({ // wx.reLaunch({
url: "./index", // url: "./index",
}); // });
}, // },
methods: { methods: {
//考试结果 //考试结果
nextClick: function () { nextClick: function () {
console.log("wwwwwwwwww"); console.log("wwwwwwwwww");
uni.request({ uni.request({
url: url:
"http://192.168.1.22" + process.uniEnv.systemUrl.apiUrl +
"/wxh-worker-rest/rest/exam" + "/wxh-worker-rest/rest/exam" +
"/serviceRule/next/" + "/serviceRule/next/" +
this.vuex_token + this.vuex_token +
...@@ -63,73 +73,127 @@ export default { ...@@ -63,73 +73,127 @@ export default {
success: (res) => { success: (res) => {
this.result = res.data.data; this.result = res.data.data;
this.text = res.data.data.examLevelResult; this.text = res.data.data.examLevelResult;
this.score = this.result.examScore;
console.log("标识符55", this.result); console.log("标识符55", this.result);
}, },
}); });
}, },
//再次考试 //再次考试
getAgain: function () { getAgain: function () {
let examId = this.examId;
wx.navigateTo({ wx.navigateTo({
url: "./assessment", url: "/pages/learn/assessment?examId=" + examId,
}); });
}, },
//下次再考跳转到学习主界面页面 //下次再考跳转到学习主界面页面
toIndex: function () { toIndex: function () {
wx.reLaunch({ wx.reLaunch({
url: "./index", url: "/pages/index/learn?tabs=3",
}); });
// wx.navigateBack({ delta: 1 })//返回上一级页面
}, },
}, },
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.test-result { .test {
width: 610rpx; margin: 0 30rpx;
height: 965rpx; overflow: hidden;
margin: 70rpx auto 0; border-radius: 12rpx;
padding-bottom: 60rpx;
// background-image: url(../../static/photo/examination.png);
background-repeat: no-repeat;
background-size: 66%;
background-color: #fff;
background-position: right bottom;
min-height: 800rpx;
}
.content {
width: 750rpx;
height: 100vh;
overflow: auto;
background-color: #f4f5f7;
background-image: linear-gradient(to top, #f4f5f7 0%, #2272ff 50%);
background-size: 750rpx 600rpx;
background-repeat: no-repeat;
.title { .title {
margin: 0 44rpx 0; padding: 30rpx 30rpx 46rpx;
line-height: 40rpx;
font-size: 40rpx;
color: #fff;
font-weight: bold;
} }
.result { .result {
color: red; width: 320rpx;
font-size: 66rpx; height: 320rpx;
margin-top: 80rpx;
margin-left: 186rpx;
// color: red;
// font-size: 66rpx;
// text-align: center;
// // border:
// border-bottom: 1px dashed #000000;
// margin: 74rpx 0;
// padding: 66rpx;
background-image: linear-gradient(#FF930D, #FA5A49) ;
border-radius:50%;
text-align:center;
padding:10rpx;
font-size:28rpx;
box-sizing:border-box;
}
.result .circle{
width:100%;
height:100%;
background:#fff;
border-radius:50%;
font-size: 120rpx;
color: #FA5A49;
text-align: center; text-align: center;
border-bottom: 1px dashed #000000; padding-top: 20%;
margin: 74rpx 0;
padding: 66rpx;
} }
.test-explain { .test-explain {
.hang { margin-top: 80rpx;
margin: 26rpx 26rpx; margin-left: 84rpx;
margin-right: 84rpx;
text-align: center;
.text1 { .text1 {
color: #a69999; font-size: 40rpx;
margin-right: 22rpx; font-weight: bold;
color: #FA5A49;
} }
.text2 { .text2 {
color: #333333; font-size: 24rpx;
} color: #666666;
margin-top: 30rpx;
} }
} }
.btn { .btn {
margin-top: 236rpx; margin-top: 100rpx;
.btn1 { display: flex;
width: 478rpx; font-size: 32rpx;
height: 60rpx; font-weight: bold;
background: #0079fe; .btnStyle {
color: #fff; width: 300rpx;
font-size: 26rpx; height: 104rpx;
line-height: 60rpx; background-color: #ffffff;
color: #2272FF;
line-height: 90rpx;
margin: 20rpx auto; margin: 20rpx auto;
border: 2rpx solid #2272FF;
border-radius: 52rpx;
} }
.btn2 { .btn2 {
width: 478rpx; background-color: #2272FF;
height: 60rpx; color: #ffffff;
background: #f2f2f2;
color: #333333;
font-size: 26rpx;
line-height: 60rpx;
margin: 0 auto;
} }
} }
} }
......
...@@ -9,29 +9,29 @@ ...@@ -9,29 +9,29 @@
<view class="item-content"> <view class="item-content">
<view class="item-st"> <view class="item-st">
<image style="width: 80rpx; height: 36rpx" :src="kcImage"></image> <image style="width: 80rpx; height: 36rpx" :src="kcImage"></image>
<text class="item-st-text">5课时</text> <text class="item-st-text">{{ courseTotal }}课时</text>
</view> </view>
<view class="item-title">服务规范</view> <view class="item-title">{{ courseTitle }}</view>
</view> </view>
<view>接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。</view> <view>{{ courseDesc }}</view>
</view> </view>
<view class="learn-view" v-if="courseId >= 0"> <view class="learn-view" v-if="courseId >= 0">
<view class="learn-view-title">课程讲师</view> <view class="learn-view-title color-teacher">课程讲师</view>
<view class="" style="padding-top: 30rpx;display: flex;padding-left: 30rpx;"> <view class="" style="padding-top: 30rpx;display: flex;padding-left: 30rpx;">
<u-avatar :style="{'width':'100rpx', 'height':'100rpx'}" :src="teacher.avatar" mode="circle"></u-avatar> <u-avatar :style="{'width':'100rpx', 'height':'100rpx'}" :src="teacherImage" mode="circle"></u-avatar>
<view style="height:120rpx;font-size: 30rpx;padding-left:30rpx;"> <view style="height:120rpx;font-size: 30rpx;padding-left:30rpx;">
<view class="" style="display: flex;font-size: 32rpx;"> <view class="" style="display: flex;font-size: 32rpx;">
<view class="" style="font-size: 32rpx;font-weight: bold;">{{ teacher.name }}</view> <view class="" style="font-size: 32rpx;font-weight: bold;">{{ teacher.name }}</view>
<view class="" style="font-size: 24rpx;margin-left: 30rpx;margin-top: 6rpx;">课程讲师</view> <view class="" style="font-size: 24rpx;margin-left: 30rpx;margin-top: 6rpx;color: #999999;">课程讲师</view>
</view> </view>
<view class="" style="font-size: 24rpx;margin-top: 30rpx;">反正这里就是放老师的简介,只是写啥我也不知道,反正就是写很厉害的简介啦</view> <view class="" style="font-size: 24rpx;margin-top: 30rpx;">{{ teacherIntro }}</view>
</view> </view>
</view> </view>
<view class="learn-view-title">目录</view> <view class="learn-view-title">目录</view>
<view class="" style="display: flex;overflow: auto;padding-top: 30rpx;padding-bottom: 30rpx;"> <view class="" style="display: flex;overflow: auto;padding-top: 30rpx;padding-bottom: 30rpx;">
<view v-for="(item, index) in list" :key="index"> <view v-for="(item, index) in list" :key="index">
<view @click="goNext(item.id)" class="list-cell list-default" :class="{'list-default-active': item.isActive}" style="width:280rpx;height:150rpx;margin-left: 20rpx;padding: 20rpx;border-radius: 12rpx;"> <view @click="goNext(item)" class="list-cell list-default" :class="{'list-default-active': item.isActive}" style="width:280rpx;height:150rpx;margin-left: 20rpx;padding: 20rpx;border-radius: 12rpx;">
<view class="" style="font-size: 24rpx;">{{ item.title }}</view> <view class="" style="font-size: 24rpx;">{{ item.title }}</view>
<view class="" style="font-size: 26rpx;margin-top: 16rpx;"> <view class="" style="font-size: 26rpx;margin-top: 16rpx;">
{{ item.intro }} {{ item.intro }}
...@@ -59,26 +59,30 @@ ...@@ -59,26 +59,30 @@
export default { export default {
data() { data() {
return { return {
teacherImage: process.uniEnv.qn_base_url + "avatar.gif",
courseId: "", courseId: "",
courseStatus: 0, courseStatus: 0,
courseSrc: "", courseSrc: "",
courseTitle: "", courseTitle: "",
courseDesc: "", courseDesc: "",
courseTotal: null,
currentIndex: -1, // 第几个视频 currentIndex: -1, // 第几个视频
section_id: 0, section_id: 0,
active_section_id: 0,
isShowVideo: false, isShowVideo: false,
CourseSectionlist: {name: '', content: ''}, //节信息 CourseSectionlist: {name: '', content: ''}, //节信息
list: [ list: [
{'title': '第一节', 'intro': '考核规则1:接单及 时率', 'isActive': true, "id": 288}, {'title': '第1节', 'intro': '考核规则1:接单及 时率', 'isActive': true, "id": null},
{'title': '第二节', 'intro': '考核规则1:接单及 时率', 'isActive': false, "id": 288}, {'title': '第2节', 'intro': '考核规则1:接单及 时率', 'isActive': false, "id": null},
{'title': '第三节', 'intro': '考核规则1:接单及 时率', 'isActive': false, "id": 288}, {'title': '第3节', 'intro': '考核规则1:接单及 时率', 'isActive': false, "id": null},
{'title': '第四节', 'intro': '考核规则1:接单及 时率', 'isActive': false, "id": 288}, {'title': '第4节', 'intro': '考核规则1:接单及 时率', 'isActive': false, "id": null},
{'title': '第五节', 'intro': '考核规则1:接单及 时率', 'isActive':false, "id": 288}, {'title': '第5节', 'intro': '考核规则1:接单及 时率', 'isActive':false, "id": null},
], ],
teacher: { teacher: {
name: "", name: "",
avatar: "" avatar: ""
}, },
teacherIntro: "",
playerOptions: { playerOptions: {
playbackRates: [0.7, 1.0, 1.5, 2.0], //播放速度 playbackRates: [0.7, 1.0, 1.5, 2.0], //播放速度
autoplay: true, //如果true,浏览器准备好时开始回放。 autoplay: true, //如果true,浏览器准备好时开始回放。
...@@ -97,7 +101,7 @@ ...@@ -97,7 +101,7 @@
} }
}, },
params:{ params:{
course_id:173, course_id:null,
}, },
gklog: '', gklog: '',
videoTotalTime: 0, videoTotalTime: 0,
...@@ -137,6 +141,8 @@ ...@@ -137,6 +141,8 @@
}, },
}, },
onLoad(e) { onLoad(e) {
this.active_section_id = e.section_id;
this.params.course_id = e.course_id;
this.getCourseSection({ this.getCourseSection({
section_id: e.section_id section_id: e.section_id
}) })
...@@ -148,9 +154,9 @@ ...@@ -148,9 +154,9 @@
// #endif // #endif
}, },
methods: { methods: {
goNext(id){ goNext(info){
uni.navigateTo({ uni.navigateTo({
url: "./section?section_id=" + id, url: "./section?section_id=" + info.id + "&course_id=" + info.course_id
}); });
}, },
onPlayerTimeupdate(player) { onPlayerTimeupdate(player) {
...@@ -197,11 +203,12 @@ ...@@ -197,11 +203,12 @@
let wareVal = this.CourseSectionlist.ware; let wareVal = this.CourseSectionlist.ware;
this.isShowVideo = wareVal == "0"; this.isShowVideo = wareVal == "0";
this.courseTitle = res.data.name; this.courseTitle = res.data.name;
this.courseDesc = res.data.content; this.courseDesc = res.data.content.replace(/<p.*?>|<\/p>/ig, "");
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.teacher.avatar = res.data.teachers[0].avatar;
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) {
let coureWareList = res.data.courseware; let coureWareList = res.data.courseware;
...@@ -277,9 +284,16 @@ ...@@ -277,9 +284,16 @@
.then((res) => { .then((res) => {
if (res.code == 200) { if (res.code == 200) {
if (res.data) { if (res.data) {
// debugger this.list = res.data[0].section;
// this.list = this.list.concat(res.data); this.courseTotal = this.list.length;
// console.log(this.list) let length = this.list.length;
for(let i = 0; i < length; i++){
this.list[i].title = "第" + (i + 1) + "节";
this.list[i].intro = this.list[i].name;
this.list[i].isActive = this.active_section_id == this.list[i].id ? true : false;
}
console.log('--select-list--')
console.log(this.list)
} }
} else { } else {
//接口请求失败的处理 //接口请求失败的处理
...@@ -443,4 +457,8 @@ ...@@ -443,4 +457,8 @@
border: 2rpx solid #2272FF; border: 2rpx solid #2272FF;
box-sizing: border-box; box-sizing: border-box;
} }
.color-teacher {
color: #999999;
}
</style> </style>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<view class="between-cell address-cell"> <view class="between-cell address-cell">
<view class="left"> <view class="left">
<u-icon name="map" size="28"></u-icon> <u-icon name="map" size="28"></u-icon>
<text class="address-txt">{{ order.contactAddress }}</text> <text class="address-txt">{{ formatAddress }}</text>
</view> </view>
<u-image width="48rpx" height="48rpx" :src="navigationIcon" @click="openLocation(order.contactAddress)"></u-image> <u-image width="48rpx" height="48rpx" :src="navigationIcon" @click="openLocation(order.contactAddress)"></u-image>
</view> </view>
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
<!-- 过程反馈 --> <!-- 过程反馈 -->
<view class="left"> <view class="left">
<view v-if="allowFeedback" @click="clickFeedback" class="button"> <view v-if="allowFeedback" @click="clickFeedback" class="button">
<text>过程反馈</text> <text>反馈</text>
</view> </view>
</view> </view>
<!--接单,抢单,已被抢, 预约 ,签到 ,去完工 timestampDiff(order.currentOverTime)>0 --> <!--接单,抢单,已被抢, 预约 ,签到 ,去完工 timestampDiff(order.currentOverTime)>0 -->
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
<!-- 异常预约 ,现场拍照 这里是调用拍照的两个组件--> <!-- 异常预约 ,现场拍照 这里是调用拍照的两个组件-->
<view class="right"> <view class="right">
<view v-if="errorSignIn || scenePhoto" @click="$u.debounce(handleClickRight, 500)" :class="['button', {'active': scenePhoto}]"> <view v-if="errorSignIn || scenePhoto" @click="$u.debounce(handleClickRight, 500)" :class="['button', {'active': scenePhoto}]">
<text>{{errorSignIn ? '异常签到' : '现场拍照'}}</text> <text>{{errorSignIn ? '异常' : '拍照'}}</text>
</view> </view>
</view> </view>
...@@ -265,7 +265,19 @@ ...@@ -265,7 +265,19 @@
} else { } else {
return this.orderRecords return this.orderRecords
} }
} },
formatAddress() {
let self = this
let address = ""
if(self.order) {
address = self.order.contactProvinceText || ""
address += self.order.contactCityText || ""
address += self.order.contactCommunityText || ""
address += self.order.contactStreetText || ""
address += self.order.contactAddress || ""
}
return address
},
}, },
methods: { methods: {
openLocation(address){ openLocation(address){
...@@ -374,7 +386,7 @@ ...@@ -374,7 +386,7 @@
self.order = res.data self.order = res.data
this.getCurrentBtn() this.getCurrentBtn()
var nowTime = new Date(); var nowTime = new Date();
if(this.order.currentOverTime && nowTime.getTime() > this.order.currentOverTime){ if(this.showTimeOut && this.order.currentOverTime && nowTime.getTime() > this.order.currentOverTime){
this.btnClass='timeOut-btn' this.btnClass='timeOut-btn'
} }
if(self.order.isFirstOrder){ if(self.order.isFirstOrder){
...@@ -444,7 +456,7 @@ ...@@ -444,7 +456,7 @@
} }
}, },
dateChange(data){ dateChange(data){
this.loadTimerange() // this.loadTimerange()
// 点击日期选择 // 点击日期选择
console.log(data,'dateChange') console.log(data,'dateChange')
let self = this let self = this
...@@ -571,14 +583,21 @@ ...@@ -571,14 +583,21 @@
return return
} }
this.$u.api[this.submitType](data, this.order.orderId).then(res => { this.$u.api[this.submitType](data, this.order.orderId).then(res => {
let self = this
if ((res.data.code!==undefined && res.data.code === 200) if ((res.data.code!==undefined && res.data.code === 200)
|| (res.code!==undefined && res.code === 200) ) { || (res.code!==undefined && res.code === 200) ) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: this.centerButtonText + '操作成功', title: this.centerButtonText + '操作成功',
type: 'success', type: 'success',
url: 'pages/order/detail', // isTab:true,
params: { // url: 'pages/order/detail',
id: this.order.orderId // params: {
// id: this.order.orderId
// }
callback : function(){
uni.redirectTo({
url: 'pages/order/detail?id='+self.order.orderId
});
} }
}) })
} else { } else {
...@@ -623,8 +642,8 @@ ...@@ -623,8 +642,8 @@
// 检查是否可以拒单 // 检查是否可以拒单
var data={} var data={}
this.$u.api.checkRejectable(data).then(res => { this.$u.api.checkRejectable(data).then(res => {
if (res.data.code === 200 ) { if (res.code === 200 ) {
if( res.data.data === true){ if( res.data === true){
uni.navigateTo({ uni.navigateTo({
url: 'pages/order/refuse?orderId='+this.order.orderId url: 'pages/order/refuse?orderId='+this.order.orderId
}) })
...@@ -957,7 +976,7 @@ ...@@ -957,7 +976,7 @@
text-align: center; text-align: center;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
font-size: 20rpx; font-size: 28rpx;
color: #FFFFFF; color: #FFFFFF;
} }
} }
...@@ -1000,7 +1019,7 @@ ...@@ -1000,7 +1019,7 @@
} }
.timeOut-btn { .timeOut-btn {
background: #e86552; background: #FA5A49;
box-shadow: 2px 2px 20px 0px rgba(232, 101, 82, 0.3); box-shadow: 2px 2px 20px 0px rgba(232, 101, 82, 0.3);
} }
} }
...@@ -1012,16 +1031,16 @@ ...@@ -1012,16 +1031,16 @@
.button { .button {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
background: #FF930D; background-color: #929CB8;
border-radius: 100rpx; border-radius: 100rpx;
font-size: 20rpx; font-size: 28rpx;
font-weight: bold; font-weight: bold;
align-items: center; align-items: center;
display: flex; display: flex;
color: #FFFFFF; color: #FFFFFF;
justify-content: center; justify-content: center;
&.active { &.active {
background-color: #D1D4D4; background-color: #FF930D;
} }
} }
} }
......
src/static/photo/jianbian@3x.png

21.9 KB | W: | H:

src/static/photo/jianbian@3x.png

7.64 KB | W: | H:

src/static/photo/jianbian@3x.png
src/static/photo/jianbian@3x.png
src/static/photo/jianbian@3x.png
src/static/photo/jianbian@3x.png
  • 2-up
  • Swipe
  • Onion skin
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