Commit c701448c authored by Facius's avatar Facius
parents 2547ffbd 36601a7b
......@@ -18,19 +18,24 @@
// 服务规范教程视频
service_standard: {
"Course1": {
url: "https://xy-hybrid.kakalili.com/web/vivaVideo/home/static/img/videoen.mp4",
title: "第一节 接单服务标准",
desc: "1.不同车企品牌结算价格不一,675元-1890元不等;",
url: "https://qn-static.banshouhui.com/self-support/videoen.mp4",
title: "第一节 师傅考核规则",
desc: "接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。",
},
"Course2": {
url: "https://xy-hybrid.kakalili.com/web/vivaVideo/home/static/img/videoen.mp4",
title: "第二节 完工服务标准",
desc: "2.结算价格为包工包料价,安装材料根据车企品牌规格自行采购(电缆、空开、漏保);",
url: "https://qn-static.banshouhui.com/self-support/videoen.mp4",
title: "第二节 安装材料及工具",
desc: "接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。",
},
"Course3": {
url: "https://xy-hybrid.kakalili.com/web/vivaVideo/home/static/img/videoen.mp4",
title: "第二节 结算服务标准",
desc: "3.需具备一定的作业工具:如液压压线钳、冲击钻、电锤、登高安全带、电锤、绝缘电阻仪(摇表)、交流充电模拟器等;",
url: "https://qn-static.banshouhui.com/self-support/videoen.mp4",
title: "第二节 安装施工规范",
desc: "接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。",
},
"Course4": {
url: "https://qn-static.banshouhui.com/self-support/videoen.mp4",
title: "第二节 录单上传要求",
desc: "接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。",
},
},
......@@ -46,10 +51,12 @@
that.globalData.token = util.getToken()
AnalysysAgent.registerSuperProperty("platform", "self-support");
// 应用启动,或从后台进入前台显示
this.autoLogin()
},
onShow: function() {
// 应用启动,或从后台进入前台显示
this.autoLogin()
// this.autoLogin()
},
onHide: function() {
// 应用从前台进入后台
......@@ -73,7 +80,9 @@
if (!res.data) {
return
}
if(typeof callBack == 'function') {
callBack(vm, res.data)
}
uni.hideLoading()
return res.data
......@@ -95,6 +104,7 @@
if (result) {
if (result.code == 200 && result.data) {
that.setUserData(result.data)
that.getBaseInfo(that)
}
} else {
uni.showModal({
......
......@@ -8,16 +8,19 @@ import {
settledApiFun
} from '@/common/api/settled.js';
import { learnApiFun } from "@/common/api/learn.js";
import { orderApiFun } from "@/common/api/order.js";
let apiFun = function(vm) {
let commonApi = commonApiFun(vm);
let settledApi = settledApiFun(vm)
let cloudApi = cloudRulesApiFun(vm)
let learnApi=learnApiFun(vm)
let orderApi=orderApiFun(vm)
let apiUrl = {
...commonApi,
...settledApi,
...cloudApi,
...learnApi
...learnApi,
...orderApi,
}
return apiUrl
}
......
let orderApiFun = function(vm){
let listByRecommendOrder = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/recommend/order', params);
const orderApi = {
listByRecommendOrder,
}
return orderApi
}
module.exports = {
orderApiFun
}
\ No newline at end of file
......@@ -36,7 +36,10 @@ let settledApiFun = function(vm){
let listOrderingTutorials = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/settled/get-course-rate', params);
/* 更新接单教程状态 */
let saveCourseRate = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/settled/save-course-rate', params);
let saveCourseRate = async (params = {}) => await vm.$u.post(ucenterApiUrl+'/v1/settled/save-course-rate', params);
/* 获取消息内容列表 */
let listByNotice = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/notice/list', params);
const settledApi = {
getSettleBaseInfo,
......@@ -52,6 +55,7 @@ let settledApiFun = function(vm){
checkSettleSignInfo,
listOrderingTutorials,
saveCourseRate,
listByNotice,
}
return settledApi
}
......
......@@ -254,11 +254,6 @@
"path": "pages/settle/sign-contract", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
},
{
"name": "订单列表", //模式名称
"path": "pages/order/index", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
},
{
"name": "订单 - 完工配置", //模式名称
"path": "pages/order/complete", //启动页面,必选
......
This diff is collapsed.
<template>
<view class="learn-vedio">
<view class="uni-padding-wrap uni-common-mt">
<view><video object-fit="cover" class="course-video" id="courseVideo" :src="courseSrc"
@error="videoErrorCallback" controls></video></view>
<view
><video
object-fit="cover"
class="course-video"
id="courseVideo"
:src="courseSrc"
@error="videoErrorCallback"
controls
></video
></view>
<view class="title-content">
<view class="item-content">
<view class="item-st">
<image style="width: 80rpx;height: 36rpx;" :src="kcImage"></image>
<text class="item-st-text">{{courseTitle.split(' ') ? courseTitle.split(' ')[0] : ''}}</text>
<image style="width: 80rpx; height: 36rpx" :src="kcImage"></image>
<text class="item-st-text">{{
courseTitle.split(" ") ? courseTitle.split(" ")[0] : ""
}}</text>
</view>
<view class="item-title">{{courseTitle.split(' ') ? courseTitle.split(' ')[1] : ''}}</view>
<view class="item-title">{{
courseTitle.split(" ") ? courseTitle.split(" ")[1] : ""
}}</view>
</view>
<view>接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。</view>
<view
>接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。</view
>
</view>
<view class="learn-view" v-if="currentIndex >= 0">
<view class="learn-view" v-if="courseId >= 0">
<view class="learn-view-title">视频内容介绍</view>
<view class="learn-list" v-for="(item, key) in courseOutlines[currentIndex]" :key="key">
<view class="learn-list-item">{{item}}</view>
<view
class="learn-list"
v-for="(item, key) in courseOutlines[courseId]"
:key="key"
>
<view class="learn-list-item">{{ item }}</view>
</view>
</view>
</view>
......@@ -24,50 +42,47 @@
</template>
<script>
let app = getApp();
export default {
let app = getApp();
export default {
data() {
return {
courseId: '',
courseId: "",
courseStatus: 0,
courseSrc: '',
courseTitle: '',
courseDesc: '',
currentIndex: -1 // 第几个视频
courseSrc: "",
courseTitle: "",
courseDesc: "",
currentIndex: -1, // 第几个视频
};
},
computed: {
courseOutlines() { // 视频内容介绍
return [[
'1、考核规则:接单及时率',
'2、考核规则:上门及时率',
'3、考核规则:安装完工率',
'4、考核规则:资料提交及时率',
'5、考核规则:安装完工率',
'6、考核规则:客户满意度'
],
[
'1、必备材料4大类',
'2、施工工具准备'
courseOutlines() {
// 视频内容介绍
return {
1: [
"1、考核规则:接单及时率",
"2、考核规则:上门及时率",
"3、考核规则:安装完工率",
"4、考核规则:资料提交及时率",
"5、考核规则:安装完工率",
"6、考核规则:客户满意度",
],
[
'1、接线安装工艺标准',
'2、PVC、镀锌管电缆管明敷',
'3、电缆敷设的防火要求',
'4、电源点标识',
'5、配电箱接线及安装',
'6、管线敷设接头处理',
'7、充电桩内部接线',
'8、配电箱安装'
2: ["1、必备材料4大类", "2、施工工具准备"],
3: [
"1、接线安装工艺标准",
"2、PVC、镀锌管电缆管明敷",
"3、电缆敷设的防火要求",
"4、电源点标识",
"5、配电箱接线及安装",
"6、管线敷设接头处理",
"7、充电桩内部接线",
"8、配电箱安装",
],
[
'1、勘测环节录单要求',
'2、安装环节录单要求'
]]
4: ["1、勘测环节录单要求", "2、安装环节录单要求"],
};
},
kcImage() {
return qn_base_url + 'kc.png'
}
return qn_base_url + "kc.png";
},
},
onLoad(e) {
if (e) {
......@@ -87,60 +102,55 @@
}
}
},
onReady: function(res) {
onReady: function (res) {
// #ifndef MP-ALIPAY
this.videoContext = uni.createVideoContext('courseVideo');
this.videoContext = uni.createVideoContext("courseVideo");
// #endif
},
methods: {
videoErrorCallback: function(e) {
videoErrorCallback: function (e) {
uni.showModal({
content: e.target.errMsg,
showCancel: false
showCancel: false,
});
},
getRandomColor: function() {
getRandomColor: function () {
const rgb = [];
for (let i = 0; i < 3; ++i) {
let color = Math.floor(Math.random() * 256).toString(16);
color = color.length == 1 ? '0' + color : color;
color = color.length == 1 ? "0" + color : color;
rgb.push(color);
}
return '#' + rgb.join('');
return "#" + rgb.join("");
},
changeCourseStatus() {
let that = this
let that = this;
if (that.courseId) {
that.$u.api.saveCourseRate({
courseId: that.courseId
}).then(res => {
if (res.code == 200) {
// uni.navigateBack({delta: 1})
uni.navigateTo({
url: "/pages/learn/exam"
that.$u.api
.saveCourseRate({
courseId: that.courseId,
})
} else {
.then((res) => {
if (res.code !== 200) {
uni.showToast({
icon: "none",
title: "更新课程状态失败"
})
title: "更新课程状态失败",
});
}
}).catch(e => {
})
});
} else {
uni.showToast({
title: "课程ID为空,请重新选择课程"
})
title: "课程ID为空,请重新选择课程",
});
}
},
}
};
},
};
</script>
<style lang="scss" scoped>
.learn-vedio {
background-color: #F4F5F7;
.learn-vedio {
background-color: #f4f5f7;
position: absolute;
top: 0;
left: 0;
......@@ -148,26 +158,26 @@
height: 100%;
display: flex;
flex-direction: column;
}
}
.course-video {
.course-video {
width: 100%;
}
}
.course-title {
.course-title {
font-size: 36rpx;
font-weight: 700;
padding: 80rpx 60rpx 40rpx 60rpx;
}
}
.course-desc {
.course-desc {
margin-left: 60rpx;
}
}
.title-content {
.title-content {
padding: 40rpx 30rpx;
margin-bottom: 20rpx;
background-color: #FFFFFF;
background-color: #ffffff;
color: #999999;
font-size: 24rpx;
......@@ -185,7 +195,7 @@
line-height: 24rpx;
position: relative;
.item-st-text {
color: #FFFFFF;
color: #ffffff;
position: absolute;
font-size: 16rpx;
left: 20rpx;
......@@ -199,35 +209,32 @@
font-size: 44rpx;
font-weight: bold;
}
}
}
.item-content {
.item-content {
display: flex;
padding-bottom: 30rpx;
}
}
.item-title {
.item-title {
color: #333333;
font-size: 28rpx;
}
}
.learn-view {
background-color: #FFFFFF;
.learn-view {
background-color: #ffffff;
border-radius: 12rpx;
padding: 38rpx 30rpx 30rpx 30rpx;
margin-bottom: 20rpx;
font-size: 32rpx;
color: #333333;
.learn-view-title {
.learn-view-title {
font-size: 32rpx;
font-weight: bold;
margin-bottom: 10rpx;
}
}
.learn-list {
.learn-list-item {
font: 24rpx;
margin-top: 30rpx;
......@@ -235,10 +242,10 @@
}
.line-view {
background-color: #F4F5F7;
background-color: #f4f5f7;
height: 2rpx;
width: 100%;
}
}
}
}
</style>
......@@ -82,7 +82,7 @@
id: 'Course1',
courseId: 1,
title: '',
value: '已学习',
value: '去学习',
courseActive: {},
status: 1,
url: ''
......@@ -104,6 +104,15 @@
courseActive: {},
status: 0,
url: ''
},
{
id: 'Course4',
courseId: 4,
title: '',
value: '去学习',
courseActive: {},
status: 0,
url: ''
}
],
tipsDescription: '接单考核可让您快速了解如何使用小程序,建议先查看学习教程'
......@@ -160,8 +169,9 @@
that.$u.api
.listOrderingTutorials()
.then(res => {
debugger
const results = res.data;
if (res.status == 200 && results && results.length > 0) {
if (res.code == 200 && results && results.length > 0) {
that.tutorials.forEach((data, i) => {
if (results.hasOwnProperty(data.id)) {
data.status = results[data.id];
......
......@@ -8,11 +8,11 @@
</image>
</view>
<view class="txt-box">
<text :class="['title', {failed: status == 4} ,index ? 'active' : '']" v-for="(txt,index) in info.txtArr">{{txt}}</text>
<text :class="['title', {failed: status == 4} ,index ? 'active' : '']" v-for="(txt,index) in info.txtArr" :key="index">{{txt}}</text>
</view>
<view class="tips-box" v-if="info.tipsArr">
<text :class="['tips',info.tipsArr.length>1 && index===0 ? 'red' : '']"
v-for="(txt,index) in info.tipsArr">{{txt}}</text>
v-for="(txt,index) in info.tipsArr" :key="index">{{txt}}</text>
</view>
<view class="services-view">
<image class="service-info-image" :src="erweimaImage"></image>
......
......@@ -33,6 +33,7 @@ function authorization(data) {
if (res) {
if (res.code == 200 && res.data) {
app.setUserData(res.data)
app.getBaseInfo(app.$vm)
resolve(res);
} else {
reject(res);
......@@ -53,6 +54,7 @@ function signup(data) {
if (res) {
if (res.code == 200 && res.data) {
app.setUserData(res.data)
app.getBaseInfo(app.$vm)
resolve(res);
} else {
uni.showModal({
......
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