Commit c701448c authored by Facius's avatar Facius
parents 2547ffbd 36601a7b
...@@ -18,19 +18,24 @@ ...@@ -18,19 +18,24 @@
// 服务规范教程视频 // 服务规范教程视频
service_standard: { service_standard: {
"Course1": { "Course1": {
url: "https://xy-hybrid.kakalili.com/web/vivaVideo/home/static/img/videoen.mp4", url: "https://qn-static.banshouhui.com/self-support/videoen.mp4",
title: "第一节 接单服务标准", title: "第一节 师傅考核规则",
desc: "1.不同车企品牌结算价格不一,675元-1890元不等;", desc: "接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。",
}, },
"Course2": { "Course2": {
url: "https://xy-hybrid.kakalili.com/web/vivaVideo/home/static/img/videoen.mp4", url: "https://qn-static.banshouhui.com/self-support/videoen.mp4",
title: "第二节 完工服务标准", title: "第二节 安装材料及工具",
desc: "2.结算价格为包工包料价,安装材料根据车企品牌规格自行采购(电缆、空开、漏保);", desc: "接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。",
}, },
"Course3": { "Course3": {
url: "https://xy-hybrid.kakalili.com/web/vivaVideo/home/static/img/videoen.mp4", url: "https://qn-static.banshouhui.com/self-support/videoen.mp4",
title: "第二节 结算服务标准", title: "第二节 安装施工规范",
desc: "3.需具备一定的作业工具:如液压压线钳、冲击钻、电锤、登高安全带、电锤、绝缘电阻仪(摇表)、交流充电模拟器等;", desc: "接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。",
},
"Course4": {
url: "https://qn-static.banshouhui.com/self-support/videoen.mp4",
title: "第二节 录单上传要求",
desc: "接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。",
}, },
}, },
...@@ -46,10 +51,12 @@ ...@@ -46,10 +51,12 @@
that.globalData.token = util.getToken() that.globalData.token = util.getToken()
AnalysysAgent.registerSuperProperty("platform", "self-support"); AnalysysAgent.registerSuperProperty("platform", "self-support");
// 应用启动,或从后台进入前台显示
this.autoLogin()
}, },
onShow: function() { onShow: function() {
// 应用启动,或从后台进入前台显示 // 应用启动,或从后台进入前台显示
this.autoLogin() // this.autoLogin()
}, },
onHide: function() { onHide: function() {
// 应用从前台进入后台 // 应用从前台进入后台
...@@ -73,7 +80,9 @@ ...@@ -73,7 +80,9 @@
if (!res.data) { if (!res.data) {
return return
} }
if(typeof callBack == 'function') {
callBack(vm, res.data) callBack(vm, res.data)
}
uni.hideLoading() uni.hideLoading()
return res.data return res.data
...@@ -95,6 +104,7 @@ ...@@ -95,6 +104,7 @@
if (result) { if (result) {
if (result.code == 200 && result.data) { if (result.code == 200 && result.data) {
that.setUserData(result.data) that.setUserData(result.data)
that.getBaseInfo(that)
} }
} else { } else {
uni.showModal({ uni.showModal({
......
...@@ -8,16 +8,19 @@ import { ...@@ -8,16 +8,19 @@ import {
settledApiFun settledApiFun
} from '@/common/api/settled.js'; } from '@/common/api/settled.js';
import { learnApiFun } from "@/common/api/learn.js"; import { learnApiFun } from "@/common/api/learn.js";
import { orderApiFun } from "@/common/api/order.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)
let cloudApi = cloudRulesApiFun(vm) let cloudApi = cloudRulesApiFun(vm)
let learnApi=learnApiFun(vm) let learnApi=learnApiFun(vm)
let orderApi=orderApiFun(vm)
let apiUrl = { let apiUrl = {
...commonApi, ...commonApi,
...settledApi, ...settledApi,
...cloudApi, ...cloudApi,
...learnApi ...learnApi,
...orderApi,
} }
return apiUrl 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){ ...@@ -36,7 +36,10 @@ let settledApiFun = function(vm){
let listOrderingTutorials = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/settled/get-course-rate', params); 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 = { const settledApi = {
getSettleBaseInfo, getSettleBaseInfo,
...@@ -52,6 +55,7 @@ let settledApiFun = function(vm){ ...@@ -52,6 +55,7 @@ let settledApiFun = function(vm){
checkSettleSignInfo, checkSettleSignInfo,
listOrderingTutorials, listOrderingTutorials,
saveCourseRate, saveCourseRate,
listByNotice,
} }
return settledApi return settledApi
} }
......
...@@ -254,11 +254,6 @@ ...@@ -254,11 +254,6 @@
"path": "pages/settle/sign-contract", //启动页面,必选 "path": "pages/settle/sign-contract", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到 "query": "" //启动参数,在页面的onLoad函数里面得到
}, },
{
"name": "订单列表", //模式名称
"path": "pages/order/index", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
},
{ {
"name": "订单 - 完工配置", //模式名称 "name": "订单 - 完工配置", //模式名称
"path": "pages/order/complete", //启动页面,必选 "path": "pages/order/complete", //启动页面,必选
......
...@@ -4,27 +4,44 @@ ...@@ -4,27 +4,44 @@
@scroll="handleScroll" refresher-enabled :refresher-triggered="triggered" @refresherrefresh="onRefresh" @scroll="handleScroll" refresher-enabled :refresher-triggered="triggered" @refresherrefresh="onRefresh"
scroll-anchoring @refresherrestore="onRestore" @refresherpulling="triggered = true" :show-scrollbar="false" scroll-anchoring @refresherrestore="onRestore" @refresherpulling="triggered = true" :show-scrollbar="false"
enable-back-to-top> --> enable-back-to-top> -->
<view style="width: 700rpx; height: 800rpx;"> <view style="width: 700rpx; height: 800rpx">
<!-- <view class="title-view">充电桩自营平台</view> --> <!-- <view class="title-view">充电桩自营平台</view> -->
<u-navbar :is-back="false" background="{background: transparent}" :border-bottom="false" <u-navbar
:is-fixed="false"> :is-back="false"
background="{background: transparent}"
:border-bottom="false"
:is-fixed="false"
>
<text class="title-view">充电桩自营平台</text> <text class="title-view">充电桩自营平台</text>
</u-navbar> </u-navbar>
<u-swiper :height="240" :list="list" :indicator-pos="indicatorPos" :mode="mode" :interval="3000" <u-swiper
@click="clickSwiper"> :height="240"
:list="list"
:indicator-pos="indicatorPos"
:mode="mode"
:interval="3000"
@click="clickSwiper"
>
</u-swiper> </u-swiper>
<view class="msg-view"> <view class="msg-view">
<view class="msg-title">最新消息</view> <view class="msg-title">最新消息</view>
<view class="msg-list-view"> <view class="msg-list-view">
<view class="msg-content" v-for="(item, index) in messageList" :key="index"> <view
class="msg-content"
v-for="(item, index) in messageList"
:key="index"
>
<view class="msg-content-view"> <view class="msg-content-view">
<view class="left-view"> <view class="left-view">
<image class="msg-icon"></image> <image class="msg-icon"></image>
<text>{{item.body}}</text> <text>{{ item.body }}</text>
</view> </view>
<image class="right-icon"></image> <image class="right-icon"></image>
</view> </view>
<view class="line-view" v-if="messageList.length > index + 1"></view> <view
class="line-view"
v-if="messageList.length > index + 1"
></view>
</view> </view>
</view> </view>
</view> </view>
...@@ -35,29 +52,42 @@ ...@@ -35,29 +52,42 @@
</view> </view>
</u-sticky> </u-sticky>
<view class="order-view"> <view class="order-view">
<!-- 入驻成功之后显示推荐订单列表 --> <!-- 入驻成功之后显示推荐订单列表 -->
<view class="order-list-view"> <view class="order-list-view">
<view v-if="status == 7 && orderList.length > 0" class="order-item-view">
<view v-for="(item, index) in orderList" :key="index">
<OrderCell :orderData="item"> </OrderCell>
</view>
<u-loadmore :status="currentLoadStatus" bgColor="#f2f2f2"></u-loadmore>
</view>
<!-- 入驻成功之后无推荐订单 -->
<view v-else-if="status == 7 && orderList.length <= 0" class="no-order-view">
暂无订单
</view>
<!-- 入驻前--> <!-- 入驻前-->
<view v-else-if="loaded" class="tip-view"> <view v-if="needSettled" class="tip-view">
<view class="tip-title">当前订单(笔)</view> <view class="tip-title">当前订单(笔)</view>
<view class="tip-count">{{ count }}</view> <view class="tip-count">{{ count }}</view>
<view class="tip-other">入驻通过后平台将向您推荐订单</view> <view class="tip-other">入驻通过后平台将向您推荐订单</view>
<u-button class="settle-button" type="primary" shape="circle" @click="immediatelyIn" <u-button
:custom-style="buttonStyle"> class="settle-button"
type="primary"
shape="circle"
@click="immediatelyIn"
:custom-style="buttonStyle"
>
立即入驻 立即入驻
</u-button> </u-button>
</view> </view>
<view
v-else-if="!needSettled && orderList.length > 0"
class="order-item-view"
>
<view v-for="(item, index) in orderList" :key="index">
<OrderCell :orderData="item"> </OrderCell>
</view>
<u-loadmore
:status="currentLoadStatus"
bgColor="#f2f2f2"
></u-loadmore>
</view>
<!-- 入驻成功之后无推荐订单 -->
<view
v-else-if="!needSettled && orderList.length <= 0"
class="no-order-view"
>
暂无订单
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -66,12 +96,12 @@ ...@@ -66,12 +96,12 @@
</template> </template>
<script> <script>
import util from "@/utils/util.js"; import util from "@/utils/util.js";
const app = getApp(); const app = getApp();
import OrderCell from "@/components/order/index.vue"; import OrderCell from "@/components/order/index.vue";
export default { export default {
components: { components: {
OrderCell, OrderCell,
}, },
...@@ -79,7 +109,8 @@ ...@@ -79,7 +109,8 @@
return { return {
status: 0, // 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交' status: 0, // 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
triggered: false, triggered: false,
list: [{ list: [
{
image: "https://cdn.uviewui.com/uview/swiper/1.jpg", image: "https://cdn.uviewui.com/uview/swiper/1.jpg",
}, },
{ {
...@@ -94,54 +125,37 @@ ...@@ -94,54 +125,37 @@
indicatorPos: "bottomCenter", indicatorPos: "bottomCenter",
title: "Hello", title: "Hello",
loaded: false, loaded: false,
needSettled: true,
count: 0, // 推荐订单数量 count: 0, // 推荐订单数量
messageList: [{ messageList: [],
id: 1234,
type: "",
level: "",
title: "",
url: "",
body: "好消息",
},
{
id: 1234,
type: "",
level: "",
title: "",
url: "",
body: "好消息",
},
{
id: 1234,
type: "",
level: "",
title: "",
url: "",
body: "好消息",
},
],
loadStatus: ["more", "loading", "noMore"], loadStatus: ["more", "loading", "noMore"],
currentLoadStatus: "loading", currentLoadStatus: "loading",
orderList: [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}], orderList: [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}],
search: {
token: app.globalData.token || "",
pageNumber: 0,
pageSize: 10,
},
bottomLoading: false, bottomLoading: false,
}; };
}, },
watch: {},
computed: { computed: {
buttonStyle() { buttonStyle() {
return { return {
'width': '400rpx', width: "400rpx",
'height': '104rpx', height: "104rpx",
'font-size': '32rpx', "font-size": "32rpx",
'font-weight': 'bold' "font-weight": "bold",
}; };
}, },
msgStyle() { msgStyle() {
return { return {
'1': '', // 置顶 1: "", // 置顶
'2': '', // 通知 2: "", // 通知
'3': '' // 消息 3: "", // 消息
} };
} },
}, },
onLoad() { onLoad() {
this._freshing = false; this._freshing = false;
...@@ -150,22 +164,59 @@ ...@@ -150,22 +164,59 @@
onShow() { onShow() {
// 每次进入页面都刷新入驻状态 // 每次进入页面都刷新入驻状态
if (app.globalData.token) { if (app.globalData.token) {
// 获取是否显示入驻按钮 // 初始化入驻信息
this.initSettleInfo(); this.initSettleInfo();
} else {
// 初始化订单数据
this.loadOrderList();
} }
}, },
methods: { methods: {
async initSettleInfo() { async initSettleInfo() {
if (this.status == 7) return; let self = this;
if (self.status == 7) return;
const callBack = (vm, result) => { const callBack = (vm, result) => {
// 后台自动判断入驻流程是否完成,前台通过status确定状态 // 后台自动判断入驻流程是否完成,前台通过status确定状态
if (result && result.record) { if (result && result.record) {
vm.loaded = true; vm.loaded = true;
vm.needSettled = result.needSettled;
vm.status = Number(result.record.status); vm.status = Number(result.record.status);
// vm.status = 8 // vm.status = 8
} }
}; };
await app.getBaseInfo(this, callBack); await app.getBaseInfo(self, callBack);
// 加载消息列表
self.loadMessageList();
self.loadOrderList();
},
loadMessageList() {
let self = this;
self.$u.api.listByNotice().then((res) => {
if (res.code == 200) {
if (res.data && res.data.length > 3) {
self.messageList = res.data.slice(0, 3);
} else {
self.messageList = res.data || [];
}
} else {
console.log(res.message, "初始化消息列表异常");
}
});
},
loadOrderList() {
let self = this;
// 加载订单列表
self.search.token = app.globalData.token;
self.$u.api.listByRecommendOrder(self.search).then((res) => {
if (res.code == 200) {
if (res.data && res.data.length > 0) {
self.orderList.push().apply(res.data);
}
} else {
console.log(res.message, "初始化订单列表异常");
}
});
}, },
onRefresh() { onRefresh() {
if (this._freshing) return; if (this._freshing) return;
...@@ -200,10 +251,10 @@ ...@@ -200,10 +251,10 @@
this.orderList.push(...[{}, {}, {}, {}, {}, {}, {}, {}, {}, {}]); this.orderList.push(...[{}, {}, {}, {}, {}, {}, {}, {}, {}, {}]);
// 加载完成 // 加载完成
this.currentLoadStatus = false /*是否还有*/ ? this.currentLoadStatus = false /*是否还有*/
this.loadStatus[1] : ? this.loadStatus[1]
this.loadStatus[2]; : this.loadStatus[2];
this.$nextTick(function() { this.$nextTick(function () {
this.bottomLoading = false; this.bottomLoading = false;
}); });
}, 1000); }, 1000);
...@@ -215,31 +266,34 @@ ...@@ -215,31 +266,34 @@
immediatelyIn() { immediatelyIn() {
if (util.getToken()) { if (util.getToken()) {
// 0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交' // 0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
var pageIndex = 1 var pageIndex = 1;
switch(this.status) { switch (this.status) {
case 1: case 1:
case 2: case 2:
case 3: case 3:
case 4: case 4:
pageIndex = 2 pageIndex = 2;
break break;
case 8: case 8:
pageIndex = 3 pageIndex = 3;
break break;
case 5: case 5:
case 6: case 6:
pageIndex = 4 pageIndex = 4;
break break;
case 7: case 7:
pageIndex = 5 pageIndex = 5;
break break;
default: default:
pageIndex = 1 pageIndex = 1;
break break;
} }
uni.navigateTo({ uni.navigateTo({
url: this.status > 0 ? "/pages/settle/prompt?pageIndex=" + pageIndex : "/pages/settle/index", url:
this.status > 0
? "/pages/settle/prompt?pageIndex=" + pageIndex
: "/pages/settle/index",
}); });
} else { } else {
uni.navigateTo({ uni.navigateTo({
...@@ -248,13 +302,13 @@ ...@@ -248,13 +302,13 @@
} }
}, },
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content { .content {
height: 100vh; height: 100vh;
background-color: #F4F5F7; background-color: #f4f5f7;
padding: 0rpx 30rpx 0 30rpx; padding: 0rpx 30rpx 0 30rpx;
.scroll-view { .scroll-view {
...@@ -280,8 +334,9 @@ ...@@ -280,8 +334,9 @@
.msg-list-view { .msg-list-view {
border-radius: 12rpx; border-radius: 12rpx;
background-color: #FFFFFF; background-color: #ffffff;
padding: 6rpx 30rpx; padding: 6rpx 30rpx;
height: 268rpx;
} }
.msg-content { .msg-content {
...@@ -309,45 +364,43 @@ ...@@ -309,45 +364,43 @@
width: 14rpx; width: 14rpx;
height: 24px; height: 24px;
} }
} }
.line-view { .line-view {
height: 2rpx; height: 2rpx;
background-color: #F4F5F7; background-color: #f4f5f7;
}
} }
} }
} }
}
.logo { .logo {
height: 200 rpx; height: 200 rpx;
width: 100%; width: 100%;
margin: 0 rpx auto 50 rpx auto; margin: 0 rpx auto 50 rpx auto;
} }
.text-area { .text-area {
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
.title { .title {
font-size: 36 rpx; font-size: 36 rpx;
color: #8f8f94; color: #8f8f94;
} }
// .sticky-view { // .sticky-view {
// position: sticky; // position: sticky;
// position: -webkit-sticky; // position: -webkit-sticky;
// top: 0rpx; // top: 0rpx;
// width: 100%; // width: 100%;
// height: 200rpx; // height: 200rpx;
// background-color: black; // background-color: black;
// } // }
.sticky { .sticky {
background-color: #F4F5F7; background-color: #f4f5f7;
color: #fff; color: #fff;
padding: 24 rpx; padding: 24 rpx;
text-align: left; text-align: left;
...@@ -355,25 +408,25 @@ ...@@ -355,25 +408,25 @@
font-weight: bold; font-weight: bold;
color: #333333; color: #333333;
padding: 46rpx 0 28rpx 0; padding: 46rpx 0 28rpx 0;
} }
.order-view { .order-view {
text-align: center; text-align: center;
.order-list-view { .order-list-view {
background-color: #FFFFFF; background-color: #ffffff;
border-radius: 12rpx; border-radius: 12rpx;
min-height: 460rpx; min-height: 460rpx;
padding: 30rpx; padding: 30rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
.order-item-view {} .order-item-view {
}
.no-order-view {} .no-order-view {
}
.tip-view { .tip-view {
.tip-title { .tip-title {
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
...@@ -382,7 +435,7 @@ ...@@ -382,7 +435,7 @@
} }
.tip-count { .tip-count {
color: #2272FF; color: #2272ff;
font-size: 70rpx; font-size: 70rpx;
font-weight: bold; font-weight: bold;
margin-top: 50rpx; margin-top: 50rpx;
...@@ -396,5 +449,5 @@ ...@@ -396,5 +449,5 @@
} }
} }
} }
} }
</style> </style>
<template> <template>
<view class="learn-vedio"> <view class="learn-vedio">
<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
@error="videoErrorCallback" controls></video></view> ><video
object-fit="cover"
class="course-video"
id="courseVideo"
:src="courseSrc"
@error="videoErrorCallback"
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">
<image style="width: 80rpx;height: 36rpx;" :src="kcImage"></image> <image style="width: 80rpx; height: 36rpx" :src="kcImage"></image>
<text class="item-st-text">{{courseTitle.split(' ') ? courseTitle.split(' ')[0] : ''}}</text> <text class="item-st-text">{{
courseTitle.split(" ") ? courseTitle.split(" ")[0] : ""
}}</text>
</view> </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> </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-view-title">视频内容介绍</view>
<view class="learn-list" v-for="(item, key) in courseOutlines[currentIndex]" :key="key"> <view
<view class="learn-list-item">{{item}}</view> class="learn-list"
v-for="(item, key) in courseOutlines[courseId]"
:key="key"
>
<view class="learn-list-item">{{ item }}</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -24,50 +42,47 @@ ...@@ -24,50 +42,47 @@
</template> </template>
<script> <script>
let app = getApp(); let app = getApp();
export default { export default {
data() { data() {
return { return {
courseId: '', courseId: "",
courseStatus: 0, courseStatus: 0,
courseSrc: '', courseSrc: "",
courseTitle: '', courseTitle: "",
courseDesc: '', courseDesc: "",
currentIndex: -1 // 第几个视频 currentIndex: -1, // 第几个视频
}; };
}, },
computed: { computed: {
courseOutlines() { // 视频内容介绍 courseOutlines() {
return [[ // 视频内容介绍
'1、考核规则:接单及时率', return {
'2、考核规则:上门及时率', 1: [
'3、考核规则:安装完工率', "1、考核规则:接单及时率",
'4、考核规则:资料提交及时率', "2、考核规则:上门及时率",
'5、考核规则:安装完工率', "3、考核规则:安装完工率",
'6、考核规则:客户满意度' "4、考核规则:资料提交及时率",
], "5、考核规则:安装完工率",
[ "6、考核规则:客户满意度",
'1、必备材料4大类',
'2、施工工具准备'
], ],
[ 2: ["1、必备材料4大类", "2、施工工具准备"],
'1、接线安装工艺标准', 3: [
'2、PVC、镀锌管电缆管明敷', "1、接线安装工艺标准",
'3、电缆敷设的防火要求', "2、PVC、镀锌管电缆管明敷",
'4、电源点标识', "3、电缆敷设的防火要求",
'5、配电箱接线及安装', "4、电源点标识",
'6、管线敷设接头处理', "5、配电箱接线及安装",
'7、充电桩内部接线', "6、管线敷设接头处理",
'8、配电箱安装' "7、充电桩内部接线",
"8、配电箱安装",
], ],
[ 4: ["1、勘测环节录单要求", "2、安装环节录单要求"],
'1、勘测环节录单要求', };
'2、安装环节录单要求'
]]
}, },
kcImage() { kcImage() {
return qn_base_url + 'kc.png' return qn_base_url + "kc.png";
} },
}, },
onLoad(e) { onLoad(e) {
if (e) { if (e) {
...@@ -87,60 +102,55 @@ ...@@ -87,60 +102,55 @@
} }
} }
}, },
onReady: function(res) { onReady: function (res) {
// #ifndef MP-ALIPAY // #ifndef MP-ALIPAY
this.videoContext = uni.createVideoContext('courseVideo'); this.videoContext = uni.createVideoContext("courseVideo");
// #endif // #endif
}, },
methods: { methods: {
videoErrorCallback: function(e) { videoErrorCallback: function (e) {
uni.showModal({ uni.showModal({
content: e.target.errMsg, content: e.target.errMsg,
showCancel: false showCancel: false,
}); });
}, },
getRandomColor: function() { getRandomColor: function () {
const rgb = []; const rgb = [];
for (let i = 0; i < 3; ++i) { for (let i = 0; i < 3; ++i) {
let color = Math.floor(Math.random() * 256).toString(16); 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); rgb.push(color);
} }
return '#' + rgb.join(''); return "#" + rgb.join("");
}, },
changeCourseStatus() { changeCourseStatus() {
let that = this let that = this;
if (that.courseId) { if (that.courseId) {
that.$u.api.saveCourseRate({ that.$u.api
courseId: that.courseId .saveCourseRate({
}).then(res => { courseId: that.courseId,
if (res.code == 200) {
// uni.navigateBack({delta: 1})
uni.navigateTo({
url: "/pages/learn/exam"
}) })
} else { .then((res) => {
if (res.code !== 200) {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
title: "更新课程状态失败" title: "更新课程状态失败",
}) });
} }
}).catch(e => { });
})
} else { } else {
uni.showToast({ uni.showToast({
title: "课程ID为空,请重新选择课程" title: "课程ID为空,请重新选择课程",
}) });
} }
}, },
} },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.learn-vedio { .learn-vedio {
background-color: #F4F5F7; background-color: #f4f5f7;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
...@@ -148,26 +158,26 @@ ...@@ -148,26 +158,26 @@
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.course-video { .course-video {
width: 100%; width: 100%;
} }
.course-title { .course-title {
font-size: 36rpx; font-size: 36rpx;
font-weight: 700; font-weight: 700;
padding: 80rpx 60rpx 40rpx 60rpx; padding: 80rpx 60rpx 40rpx 60rpx;
} }
.course-desc { .course-desc {
margin-left: 60rpx; margin-left: 60rpx;
} }
.title-content { .title-content {
padding: 40rpx 30rpx; padding: 40rpx 30rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
background-color: #FFFFFF; background-color: #ffffff;
color: #999999; color: #999999;
font-size: 24rpx; font-size: 24rpx;
...@@ -185,7 +195,7 @@ ...@@ -185,7 +195,7 @@
line-height: 24rpx; line-height: 24rpx;
position: relative; position: relative;
.item-st-text { .item-st-text {
color: #FFFFFF; color: #ffffff;
position: absolute; position: absolute;
font-size: 16rpx; font-size: 16rpx;
left: 20rpx; left: 20rpx;
...@@ -199,35 +209,32 @@ ...@@ -199,35 +209,32 @@
font-size: 44rpx; font-size: 44rpx;
font-weight: bold; font-weight: bold;
} }
}
} .item-content {
.item-content {
display: flex; display: flex;
padding-bottom: 30rpx; padding-bottom: 30rpx;
} }
.item-title { .item-title {
color: #333333; color: #333333;
font-size: 28rpx; font-size: 28rpx;
} }
.learn-view { .learn-view {
background-color: #FFFFFF; background-color: #ffffff;
border-radius: 12rpx; border-radius: 12rpx;
padding: 38rpx 30rpx 30rpx 30rpx; padding: 38rpx 30rpx 30rpx 30rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
font-size: 32rpx; font-size: 32rpx;
color: #333333; color: #333333;
.learn-view-title { .learn-view-title {
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.learn-list { .learn-list {
.learn-list-item { .learn-list-item {
font: 24rpx; font: 24rpx;
margin-top: 30rpx; margin-top: 30rpx;
...@@ -235,10 +242,10 @@ ...@@ -235,10 +242,10 @@
} }
.line-view { .line-view {
background-color: #F4F5F7; background-color: #f4f5f7;
height: 2rpx; height: 2rpx;
width: 100%; width: 100%;
} }
} }
} }
</style> </style>
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
id: 'Course1', id: 'Course1',
courseId: 1, courseId: 1,
title: '', title: '',
value: '已学习', value: '去学习',
courseActive: {}, courseActive: {},
status: 1, status: 1,
url: '' url: ''
...@@ -104,6 +104,15 @@ ...@@ -104,6 +104,15 @@
courseActive: {}, courseActive: {},
status: 0, status: 0,
url: '' url: ''
},
{
id: 'Course4',
courseId: 4,
title: '',
value: '去学习',
courseActive: {},
status: 0,
url: ''
} }
], ],
tipsDescription: '接单考核可让您快速了解如何使用小程序,建议先查看学习教程' tipsDescription: '接单考核可让您快速了解如何使用小程序,建议先查看学习教程'
...@@ -160,8 +169,9 @@ ...@@ -160,8 +169,9 @@
that.$u.api that.$u.api
.listOrderingTutorials() .listOrderingTutorials()
.then(res => { .then(res => {
debugger
const results = res.data; 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) => { that.tutorials.forEach((data, i) => {
if (results.hasOwnProperty(data.id)) { if (results.hasOwnProperty(data.id)) {
data.status = results[data.id]; data.status = results[data.id];
......
...@@ -8,11 +8,11 @@ ...@@ -8,11 +8,11 @@
</image> </image>
</view> </view>
<view class="txt-box"> <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>
<view class="tips-box" v-if="info.tipsArr"> <view class="tips-box" v-if="info.tipsArr">
<text :class="['tips',info.tipsArr.length>1 && index===0 ? 'red' : '']" <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>
<view class="services-view"> <view class="services-view">
<image class="service-info-image" :src="erweimaImage"></image> <image class="service-info-image" :src="erweimaImage"></image>
......
...@@ -33,6 +33,7 @@ function authorization(data) { ...@@ -33,6 +33,7 @@ function authorization(data) {
if (res) { if (res) {
if (res.code == 200 && res.data) { if (res.code == 200 && res.data) {
app.setUserData(res.data) app.setUserData(res.data)
app.getBaseInfo(app.$vm)
resolve(res); resolve(res);
} else { } else {
reject(res); reject(res);
...@@ -53,6 +54,7 @@ function signup(data) { ...@@ -53,6 +54,7 @@ function signup(data) {
if (res) { if (res) {
if (res.code == 200 && res.data) { if (res.code == 200 && res.data) {
app.setUserData(res.data) app.setUserData(res.data)
app.getBaseInfo(app.$vm)
resolve(res); resolve(res);
} else { } else {
uni.showModal({ 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