Commit 8b91f718 authored by 李超鹏's avatar 李超鹏

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/common/api/order.js
parents 37caa8cc 4eee97a2
const UNI_APP = {
ucenterUrl: {
apiUrl: 'http://192.168.1.46', //php端域名请求头
xueUrl: 'http://192.168.1.46:8088', //学院
apiUrl: 'http://rest-u.yunya.com', //php端域名请求头
xueUrl: 'http://xue.yunya.com', //学院
// banshou: 'https://m.banshou.com', //扳手app
},
systemUrl: {
apiUrl: 'http://192.168.1.22', //java端域名请求头
// apiUrl: 'http://apidoc.banshouhui.com:3000/mock/31', // mock端域名请求头
// apiUrl: 'http://192.168.1.22', //java端域名请求头
apiUrl: 'http://apidoc.banshouhui.com:3000/mock/31', // mock端域名请求头
},
qn_base_url: 'https://qn-static.banshouhui.com/self-support/'
}
......
......@@ -7,7 +7,7 @@ let learnApiFun = function(vm){
let getTrainingNoticeList = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/notice/list', params);
/* 获取学习视频基本信息 */
let CourseList = async (params = {}) => await vm.$u.get(collegeApiUrl+'/v1/course-details?course_id=173',params);
let CourseList = async (params = {}) => await vm.$u.get(collegeApiUrl+'/v1/course-details',params);
/* 获取章节详情 */
let ChapterDetails = async (params = {}) => await vm.$u.get(collegeApiUrl+'/v1/chapter-sections',params);
/* 获取课程节信息*/
......
import util from '@/utils/util.js'
// 接口公共前缀
const prefix = '/wxh-worker-rest/rest/'
let orderApiFun = function(vm){
let listByRecommendOrder = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/recommend/order', params);
let listByRecommendOrder = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/recommend/order', params);
/**
* 工单数量查询接口
*/
let listOrderCount = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/'+ vm.vuex_token+'/wokerOrder/queryOrdersCount/V2', params);
let listOrderCount = async (params = {}) => await vm.$u.get(prefix + vm.vuex_token + '/wokerOrder/queryOrdersCount/V2', params);
/**
* 工单列表接口 wxh-worker-rest/rest/order/revision/{token}/list
* 工单列表接口
*/
let listOrder = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/order/revision/'+ vm.vuex_token+'/list', params);
let listOrder = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/order/revision/' + vm.vuex_token + '/list', params);
/**
* 获取师傅的预约日历
*/
let workerCalendar = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/'+ vm.vuex_token+'/wokerOrder/appointment/calendar', params);
let workerCalendar = async (params = {}) => await vm.$u.get(prefix + vm.vuex_token + '/wokerOrder/appointment/calendar', params);
/**
* 师傅预约
*/
let workerAppointment = async (params = {}) => await vm.$u.post('/wxh-worker-rest/rest/order/traceAndAppointment/traceOrder/'+ vm.vuex_token+'/order/{orderId}', params,{'content-type': 'application/x-www-form-urlencoded'});
let workerAppointment = async (params = {}) => await vm.$u.post('/wxh-worker-rest/rest/order/traceAndAppointment/traceOrder/'+ vm.vuex_token+'/order/{orderId}', params,{'content-type': 'application/x-www-form-urlencoded'});
// 联系顾客时间更新接口,暂时没有
/**
* 师傅签到接口
* 师傅签到接口
*/
let maintainWorkerCheckin = async (params = {},orderId) => await vm.$u.post(prefix + '/wxh-worker-rest/rest/'+ vm.vuex_token+'/order/'+orderId+'/maintainWorkerCheckin', params,{'content-type': 'application/x-www-form-urlencoded'});
let maintainWorkerCheckin = async (params = {},orderId) => await vm.$u.post(prefix + vm.vuex_token + '/order/'+orderId+'/maintainWorkerCheckin', params,{'content-type': 'application/x-www-form-urlencoded'});
/**
* 订单详情查询
* 订单详情查询
*/
let orderDetail = async (params = {},orderId) => await vm.$u.get('/wxh-worker-rest/rest/order/revision/'+ vm.vuex_token+'/'+orderId, params);
let orderDetail = async (params = {},orderId) => await vm.$u.get('/wxh-worker-rest/rest/order/revision/'+ vm.vuex_token+'/'+orderId, params);
/* 过程反馈查询接口 */
let feedbackConfig = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rst/order/v2/getFeedBack/' + vm.vuex_token, params)
let feedbackConfig = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/order/v2/getFeedBack/' + vm.vuex_token, params)
/* 预约+过程反馈 接口 */
let traceAndAppointment = async (params = {}, orderId) => await vm.$u.post('/wxh-worker-rest/rest/order/traceAndAppointment/trace/V2/' + vm.vuex_token + '/' + orderId, params)
let traceAndAppointment = async (params = {}, orderId) => await vm.$u.post('/wxh-worker-rest/rest/order/traceAndAppointment/trace/V2/' + vm.vuex_token + `/${orderId}`, params)
/* 师傅拒单 */
let rejectOrder = async (params = {}, orderId) => await vm.$u.get('/wxh-worker-rest/rest/' + vm.vuex_token + '/order/' + orderId + '/workerReject/V2', params)
let rejectOrder = async (params = {}, orderId) => await vm.$u.get(prefix + vm.vuex_token + `/order/${orderId}/workerReject/V2`, params)
/**
* 查询工单操作记录列表接口
*/
let listOrderRecord = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/order/record/'+ vm.vuex_token+'/listOrderRecord/'+params.orderId, params);
let listOrderRecord = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/order/record/'+ vm.vuex_token+'/listOrderRecord/'+params.orderId, params);
/**
* 接单
*/
let orderAccept= async (params = {},orderId) => await vm.$u.get('/wxh-worker-rest/rest/'+ vm.vuex_token+'/order/'+orderId+'/accept', params);
let orderAccept = async (params = {},orderId) => await vm.$u.get(prefix + vm.vuex_token+'/order/'+orderId+'/accept', params);
/**
* 抢单
*/
let orderGan = async (params = {},orderId) => await vm.$u.post('/wxh-worker-rest/rest/order/revision/applets/'+ vm.vuex_token+'/order/acceptAppletsOrder', params,{'content-type': 'application/x-www-form-urlencoded'});
let orderGan = async (params = {},orderId) => await vm.$u.post('/wxh-worker-rest/rest/order/revision/applets/'+ vm.vuex_token+'/order/acceptAppletsOrder', params,{'content-type': 'application/x-www-form-urlencoded'});
/**
* 获取拍照标准
*/
let orderStandard = async (params = {}) => await vm.$u.get('wxh-worker-rest/rest/'+ vm.vuex_token+'/photo/standard', params);
let orderStandard = async (params = {}) => await vm.$u.get(prefix + vm.vuex_token+'/photo/standard', params);
/**
* 保存图片信息
*/
let saveImage = async (params = {},orderId) => await vm.$u.post('/wxh-worker-rest/rest/'+ vm.vuex_token+'/order/'+orderId+'/maintain/saveImage', params);
let saveImage = async (params = {},orderId) => await vm.$u.post(prefix + vm.vuex_token + '/order/'+orderId+'/maintain/saveImage', params);
/**
* 获取师傅水印 or 默认水印
*/
let getWatermark= async (params = {}) => await vm.$u.get('wxh-worker-rest/rest/'+ vm.vuex_token+'/photo/watermark', params);
let getWatermark = async (params = {}) => await vm.$u.get(prefix + vm.vuex_token + '/photo/watermark', params);
/**
* 获取师傅开放可选时间段
*/
let openTimerange = async (params = {}) => await vm.$u.get(prefix + vm.vuex_token + '/wokerOrder/appointment/timerange', params);
/**
* 联系时间接口
*/
let contactTime = async (params = {},orderId) => await vm.$u.get('/wxh-worker-rest/rest/order/record/'+ vm.vuex_token+'/contact/'+orderId, params);
/**
* 检查是否可以拒单
*/
let checkRejectable = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/order/'+ vm.vuex_token+'/wokerOrder/checkRejectable', params);
/**
* 获取订单的完工项目(配置+数据)
*/
let getCompleteConfigAndData= async (orderId) => await vm.$u.get('wxh-worker-rest/rest/'+ vm.vuex_token+'/order/'+ orderId +'/maintain/info');
/**
* 查询措施
*/
let getMeasure= async (params = {}) => await vm.$u.get('wxh-worker-rest/rest/service/'+ vm.vuex_token+'/measure/queryMeasureItems', params);
/**
* 保存售后记录
*/
let saveCompleteData = async (params = {},orderId) => await vm.$u.post('wxh-worker-rest/rest/'+ vm.vuex_token+'/order/'+ orderId +'/maintain/saveMaintainInfoV2', params);
const orderApi = {
listByRecommendOrder,
listOrderCount,
......@@ -105,6 +123,9 @@ let orderApiFun = function(vm){
orderStandard,
saveImage,
getWatermark,
openTimerange,
contactTime,
checkRejectable,
getCompleteConfigAndData,
getMeasure,
saveCompleteData
......@@ -113,4 +134,4 @@ let orderApiFun = function(vm){
}
module.exports = {
orderApiFun
}
\ No newline at end of file
}
......@@ -39,7 +39,7 @@ let settledApiFun = function(vm){
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);
let listByNotice = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/notice/home-list', params);
const settledApi = {
getSettleBaseInfo,
......
......@@ -12,6 +12,7 @@ const globalUrl = process.uniEnv || {}
const install = (Vue, vm) => {
let systemApiUrl = globalUrl.systemUrl.apiUrl
let ucenterApiUrl = globalUrl.ucenterUrl.apiUrl
let xueApiUrl = globalUrl.ucenterUrl.xueUrl
function toLoginPage(){
const app = getApp()
......@@ -48,7 +49,7 @@ const install = (Vue, vm) => {
config.url += '?access-token=' + token
}
}
if(config.url.indexOf(ucenterApiUrl)>-1){
if(config.url.indexOf(ucenterApiUrl)>-1 || config.url.indexOf(xueApiUrl)>-1){
// php端增加header Authorization
config.header['Authorization'] = token
}
......
<!-- 预约时间 -->
<template>
<view :class="{'con-box':titleShow}">
<view class="title" v-if="titleShow">{{ '预约时间' }}</view>
<view class="title" v-if="titleShow">{{ title }}</view>
<view class="u-m-t-40">
<view class="appoint-box">
<view class="select-date">
<view class="u-flex u-row-between ">
<view class="txt">选择日期</view>
<view class="txt active">{{ dateList[currentDay].day }}</view>
<view class="txt">选择日期:</view>
<view class="txt active">{{appointTime | datefmt('YYYY.MM.DD')}}</view>
</view>
<view class="u-m-t-30 u-flex u-row-between date-list">
<view :class="{'date-item':true,'active':index===currentDay}"
@click="dateChange(item,index,dateList)" v-for="(item,index) in dateList" :key="index">
<text class="day">{{item.weekDay}}</text>
<text class="day day1">{{item.day}}</text>
<view v-show="hasLast" class="last" @click="lastWeek(dateList[0],dateList)">
<u-icon name="arrow-left" color="#2979ff" size="28"></u-icon>
</view>
<view class="next" @click="weekChange">
<view class="u-flex u-row-between date-box">
<view :class="{'date-item':true,'active':item.day===appointTime}"
@click="dateChange(item,index,dateList)" v-for="(item,index) in dateList" :key="index">
<text class="day">{{ item.day | datefmt('周dd')}}</text>
<text class="day day1">{{ item.day | datefmt('DD')}}</text>
</view>
</view>
<view class="next" @click="nextWeek(dateList[0],dateList)">
<u-icon name="arrow-right" color="#2979ff" size="28"></u-icon>
</view>
</view>
......@@ -23,14 +28,18 @@
<!-- weekChange -->
<view class="select-time u-p-t-50">
<view class="u-flex u-row-between">
<view class="txt">选择时间</view>
<view class="txt">选择时间:</view>
<view class="txt active">{{ currentTimeTxt }}</view>
</view>
<view class="u-p-t-30 u-flex u-flex-wrap time-list">
<view @click="timeChange(item,index,timeList)"
:class="{'time-item':true,'active': (currentTime && index===currentTime)}" v-for="(item,index) in timeList"
:key="index">
<text class="time">{{item}}</text>
<view
:class="{'time-item':true,'active': index===currentTime}" v-for="(item,index) in timeList"
:key="item.pkey">
<button class="time" :plain="true"
:disabled="item.disabled" :hair-line="false"
@click="timeChange(item,index,timeList)">
{{item.name}}
</button>
</view>
</view>
</view>
......@@ -41,45 +50,72 @@
</template>
<script>
let now = Date.now()
export default {
props: {
titleShow: {
type: Boolean,
default: true
},
title: {
type: String,
default(){
return "预约时间"
}
},
dateList: {
type: Array,
default(){
return [
{day: now, timeRange: []},
{day: now + (1*86400000), timeRange: []},
{day: now + (2*86400000), timeRange: []},
{day: now + (3*86400000), timeRange: []},
{day: now + (4*86400000), timeRange: []},
{day: now + (5*86400000), timeRange: []},
{day: now + (6*86400000), timeRange: []},
]
}
},
timeList: {
type: Array,
default(){
return [
{"name":"06:00-08:00","pkey":"appointment_range_8","disabled":false},
{"name":"08:00-10:00","pkey":"appointment_range_10","disabled":false},
{"name":"10:00-12:00","pkey":"appointment_range_12","disabled":false},
{"name":"12:00-14:00","pkey":"appointment_range_14","disabled":false},
{"name":"14:00-16:00","pkey":"appointment_range_16","disabled":false},
{"name":"16:00-18:00","pkey":"appointment_range_18","disabled":false},
{"name":"18:00-20:00","pkey":"appointment_range_20","disabled":false},
{"name":"20:00-22:00","pkey":"appointment_range_22","disabled":false},
{"name":"22:00-24:00","pkey":"appointment_range_24","disabled":false}
]
}
},
},
data() {
return {
currentDay: 0,
currentTime: null,
dateList: [{
weekDay: '周三',
day: '21',
}, {
weekDay: '周四',
day: '22',
}, {
weekDay: '周五',
day: '23',
}, {
weekDay: '周六',
day: '24',
}, {
weekDay: '周日',
day: '25',
}, {
weekDay: '周一',
day: '26',
}, ],
timeList: ['06:00-08:00', '08:00-10:00', '10:00-12:00', '12:00-14:00', '14:00-16:00', '16:00-18:00',
'18:00-20:00', '20:00-22:00', '22:00-24:00'
],
appointTime: Date.now(),
appointRange: "",
num: 0,
hasLast: false
}
},
watch: {
title() {
this.currentDay = 0
this.appointTime = Date.now()
this.currentTime = null
this.appointRange = ""
}
},
computed: {
currentTimeTxt() {
if(this.currentTime != null) {
return this.timeList[this.currentTime]
return this.timeList[this.currentTime].name
}
return ''
},
......@@ -88,13 +124,16 @@
getDateList() {
// 获取日期
},
dateChange(item, index, list) {
async dateChange(item, index, list) {
let data = {
item,
index,
list,
}
this.currentDay = index
this.appointTime = item.day
this.currentTime = null
this.appointRange = ""
this.$emit('date-change', data)
},
timeChange(item, index, list) {
......@@ -104,6 +143,7 @@
list,
}
this.currentTime = index
this.appointRange = item.pkey
this.$emit('time-change', data)
},
weekChange(item, index, list) {
......@@ -114,7 +154,34 @@
}
this.$emit('week-change', data)
},
lastWeek(item, list) {
if(this.num > 0) {
this.num --
let len = list.length
if(this.num == 0) {
this.hasLast = false
len ++
}
let time = item.day - len*86400000
let data = {
time: time,
num: this.num
}
this.$emit('week-change', data)
}
},
nextWeek(item, list) {
this.hasLast = true
this.num ++
let len = list.length
let time = item.day + len*86400000
let data = {
time: time,
num: this.num
}
this.$emit('week-change', data)
},
}
}
</script>
......@@ -146,59 +213,71 @@
.date-list {
background-color: #F4F5F7;
.next{
.last{
width: 60rpx;
height: 120rpx;
line-height: 120rpx;
text-align: center;
border-left: 2rpx solid #fff;
border-right: 2rpx solid #fff;
}
.date-item {
padding: 20rpx 20rpx 16rpx;
border-radius: 12rpx;
.day {
display: block;
font-size: 24rpx;
line-height: 26rpx;
color: #999;
&.day1 {
width: 48rpx;
height: 48rpx;
margin-top: 10rpx;
border-radius: 50%;
font-size: 28rpx;
text-align: center;
line-height: 48rpx;
}
}
&.active {
// background-color: #2272FF;
.date-box {
padding: 20rpx 18rpx 16rpx 20rpx;
width: 568rpx;
.date-item {
// padding: 20rpx 20rpx 16rpx;
border-radius: 12rpx;
.day {
color: #2272FF;
display: block;
font-size: 24rpx;
line-height: 26rpx;
color: #999;
&.day1 {
background-color: #2272FF;
color: #fff !important;
width: 48rpx;
height: 48rpx;
margin-top: 10rpx;
border-radius: 50%;
font-size: 28rpx;
text-align: center;
line-height: 48rpx;
}
}
&.active {
// background-color: #2272FF;
.day {
color: #2272FF;
&.day1 {
background-color: #2272FF;
color: #fff !important;
}
}
}
}
}
.next{
width: 60rpx;
height: 120rpx;
line-height: 120rpx;
text-align: center;
border-left: 2rpx solid #fff;
}
}
.time-list {
justify-content: space-between;
margin-bottom: -30rpx;
.time-item {
min-width: 196rpx;
margin-right: 21rpx;
margin-bottom: 24rpx;
// margin-right: 24rpx;
margin-bottom: 20rpx;
border-radius: 12rpx;
padding: 26rpx 20rpx 24rpx;
background-color: #F4F5F7;
&:nth-child(3n) {
......@@ -212,9 +291,17 @@
}
.time {
font-size: 26rpx;
line-height: 26rpx;
line-height: 76rpx;
color: #999;
}
/deep/ button {
padding: 0;
height: 76rpx;
}
/deep/ button[plain] {
border: none;
}
}
}
</style>
......@@ -26,8 +26,8 @@
</view>
<view class="line-view"></view>
<view class="reason-view" v-if="showReason"><text>未通过原因:</text>
<text class="reason-text">{{orderData.auditResults.remark}}</text>
<view class="reason-view" v-if="showReason"><text class="reason-text">未通过原因:</text>
<text>{{orderData.auditResults.remark}}</text>
</view>
<view class="bottom-view">
<view>
......@@ -78,13 +78,15 @@
}
}
},
// waitAccept:待接单、
// waitAppointment:待预约、
// waitCheckIn:待签到、
// waitFinish:待完工、
// review: 审核中、
// exception:异常单、
// finish:已完工
/* 订单类型
waitAccept:待接单、
waitAppointment:待预约、
waitCheckIn:待签到、
waitFinish:待完工、
audit: 审核中、
exception:异常单、
finish:已完工
*/
type: String,
location: { // 当前坐标
type: Array,
......@@ -156,7 +158,7 @@
.orderBusinessType != 'R')
},
showTime() {
return [4, 6].indexOf(this.orderType) != -1
return [4, 5, 6].indexOf(this.orderType) != -1
},
infoTexts() {
return {
......@@ -222,7 +224,7 @@
'waitAppointment': 1, // 待预约、
'waitCheckIn': 2, // 待签到、
'waitFinish': 3, // 待完工、
'review': 4, // 审核中、
'audit': 4, // 审核中、
'exception': 5, // 异常单、
'finish': 6, //已完工
}
......@@ -367,10 +369,12 @@
text-align: left;
margin-top: 30rpx;
font-size: 26rpx;
color: #666666;
color: #FA5A49;
display: flex;
align-items: flex-start;
.reason-text {
color: #FA5A49;
flex-shrink: 0;
color: #666666;
}
}
......
......@@ -6,7 +6,12 @@
<view class="order-pop-title">
<text>{{title}}</text>
</view>
<view class="line-view" />
<view class="line-view" />
<view class="order-content">
<view v-if="count">
你本月还有<text class="order-content-count">{{count}}</text>次拒单机会
</view>
</view>
<view class="order-pop-text">
<text>{{message}}</text>
</view>
......@@ -16,7 +21,7 @@
取消
</u-button>
<u-button :custom-style="customStyleSave" shape="circle" type="primary" @click="handleClickSure">
查看
{{buttonText}}
</u-button>
</view>
</view>
......@@ -29,7 +34,12 @@
props: {
visible: Boolean,
title: String,
message: String,
message: String,
count: Number, // 剩余次数
buttonText: { // 确定按钮
type: String,
default: '查看'
},
},
data() {
return {}
......@@ -76,21 +86,32 @@
<style lang="scss" scoped>
.order-pop-view {
padding: 30rpx;
min-height: 520rpx;
.order-pop-title {
font-size: 40rpx;
margin-top: 40rpx;
margin-bottom: 40rpx;
margin-top: 30rpx;
margin-bottom: 34rpx;
text-align: center;
color: #333333;
}
.order-content {
min-height: 14rpx;
text-align: center;
color: #333333;
font-size: 32rpx;
margin-top: 26rpx;
.order-content-count {
color: #FA5A49;
}
}
.order-pop-text {
color: #999999;
text-align: center;
margin-top: 40rpx;
margin-top: 30rpx;
font-size: 28rpx;
margin-bottom: 260rpx;
// margin-bottom: 180rpx;
}
.line-view {
......
......@@ -3,7 +3,7 @@
<u-navbar style="position: absolute;" title="入驻" background="{background: transparent}" :border-bottom="false"
back-icon-color="#ffffff" title-color="#ffffff"></u-navbar>
<image :src="url" style="width: 100%;" mode="widthFix"></image>
<view class="introduction">
<view :class="['introduction', {'active': type}]">
<slot></slot>
</view>
<view class="settle-bottom">
......@@ -18,6 +18,11 @@
index: {
type: Number,
default: 1
},
// 0: introduction距离底部168rpx 1: introduction距离底部0rpx
type: {
type: Number,
default: 0
}
},
data() {
......@@ -45,7 +50,10 @@
top: 370rpx;
bottom: 168rpx;
left: 30rpx;
right: 30rpx;
right: 30rpx;
&.active {
bottom: 0rpx;
}
}
.settle-bottom {
......
import Vue from 'vue'
import Vue from 'vue'
import moment from 'moment'
import App from './App'
import uView from "uview-ui";
import vuexStore from "@/store/$u.mixin.js";
......@@ -7,13 +8,24 @@ import {router,RouterMount} from '@/router/index.js' //路径换成自己的
Vue.config.productionTip = false
Vue.mixin(vuexStore)
Vue.use(uView);
Vue.use(uView);
App.mpType = 'app'
const app = new Vue({
store,
...App
})
// 引入时间组件 moment
moment.locale('zh-cn');
Vue.prototype.moment = moment
Vue.filter('datefmt',function (input,fmtstring) {//当input为时间戳,需转为Number类型
if(input){
return moment(input).format(fmtstring);
}else{
return "";
}
});
// http拦截器,将此部分放在new Vue()和app.$mount()之间,才能App.vue中正常使用
import httpInterceptor from '@/common/http.interceptor.js'
......
......@@ -324,9 +324,10 @@
"path": "pages/photo/index", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
},
{
"name": "工单搜索",
"path": "pages/order/search",
{
// gaomingbo
"name": "工单-过程反馈",
"path": "pages/order/feedback",
"query": ""
},
{
......@@ -368,6 +369,11 @@
"name": "订单 - 拒单", //模式名称
"path": "pages/order/refuse", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
},
{
"name": "订单 - 过程反馈", //模式名称
"path": "pages/order/feedback", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
}
]
}
......
......@@ -13,12 +13,12 @@
</view>
<image class="right-icon" :src="shouyeyouImage"></image>
</view>
<view class="line-view" v-if="index != 2"></view>
<view class="line-view" v-if="index != 1"></view>
</view>
</view>
</view>
<!-- 订单推荐吸顶 -->
<u-sticky>
<u-sticky offset-top="60">
<view class="sticky">
<text>订单推荐</text>
</view>
......@@ -73,7 +73,7 @@
},
data() {
return {
status: 0, // 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
status: 0, // 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',6=>'已签约',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
location: [116.3896, 39.91917], // 经纬度
title: false,
title: "Hello",
......@@ -87,7 +87,7 @@
search: {
token: "",
pageNumber: 0,
pageSize: 100,
pageSize: 10,
},
bottomLoading: false
};
......@@ -179,8 +179,8 @@
self.$u.api.listByNotice().then((res) => {
uni.stopPullDownRefresh() // 结束下拉刷新
if (res.code == 200) {
if (res.data && res.data.length > 3) {
self.messageList = res.data.slice(0, 3);
if (res.data && res.data.length > 2) {
self.messageList = res.data.slice(0, 2);
} else {
self.messageList = res.data || [];
}
......@@ -197,8 +197,8 @@
self.$u.api.listByRecommendOrder(self.search).then((res) => {
uni.stopPullDownRefresh() // 结束下拉刷新
if (res.code == 200) {
if (res.data && res.data.length > 0) {
self.orderList.push(...res.data);
if (res.data && res.data.list && res.data.list.length > 0) {
self.orderList.push(...res.data.list);
}
} else {
console.log(res.message, "初始化订单列表异常");
......@@ -235,10 +235,12 @@
handleScroll() {
console.log("-----scroll-------");
},
/* 立即入驻 */
immediatelyIn() {
if (this.vuex_token) {
// 0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
// 用户已登录
var pageIndex = 1;
// 0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
switch (this.status) {
case 1:
case 2:
......@@ -266,6 +268,7 @@
"/pages/settle/prompt?pageIndex=" + pageIndex : "/pages/settle/index",
});
} else {
// 用户未登录
uni.navigateTo({
url: "pages/login/index",
});
......@@ -294,7 +297,7 @@
border-radius: 12rpx;
background-color: #ffffff;
padding: 12rpx 30rpx;
height: 252rpx;
height: 174rpx;
}
.msg-content {
......
<template>
<view class="content">
<view class="">
<view class="" style="padding-left: 94rpx;margin:36rpx 0">
<text class="dx">多选</text><text class="num">第1题</text><text class="all">/共30题</text>
</view>
<view class="" style="text-align: center;">
一下对压缩机故障描述有误的是?
</view>
<view class="" style="margin-top: 130rpx;">
<view class="list-box">
<view v-for="(item,index) in list" :key="index" @click="choice(index)" :class="[item.selected?'selde':'noselde']">
{{item.selected?item.title:item.title}}
</view>
</view>
</view>
<button class="btn">下一题</button>
</view>
</view>
<view class="content">
<view class="">
<view class="" style="padding-left: 94rpx; margin: 36rpx 0">
<text class="dx">多选</text
><text class="all">{{ ExaminationQuestions.progress }}</text>
</view>
<view class="" style="text-align: center">
{{ ExaminationQuestions.question.content }}
</view>
<view class="" style="margin-top: 130rpx">
<view class="list-box">
<view
v-for="(item, index) in list"
:key="index"
@click="choice(index)"
:class="[item.isRight ? 'selde' : 'noselde']"
>
{{ item.content }}
</view>
</view>
</view>
<button class="btn" @click="nextClick()">下一题</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: [{
selected: false,
title: 'A'
},
{
selected: false,
title: 'B'
},
{
selected: false,
title: 'C'
},
{
selected: false,
title: 'D'
},
{
selected: false,
title: 'E'
}
],
selectId:[],
};
},
onLoad() {
this.getUserExamInfo()
},
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")
}
}
export default {
data() {
return {
list: [
{
isRight: false,
title: "A",
},
{
isRight: false,
title: "B",
},
{
isRight: false,
title: "C",
},
{
isRight: false,
title: "D",
},
{
isRight: false,
title: "E",
},
],
isSelect: false,
selectId: [],
userExamId: null,
ExaminationQuestions: null,
isQuestion: true,
};
},
onLoad(num) {
console.log("标识符4", this.userExamId);
console.log("标识符3" + num);
this.userExamId = num;
this.getExaminationQuestions();
},
onUnload() {
wx.reLaunch({
url: "./index",
});
},
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].isRight == true) {
this.list[index].isRight = false;
this.isSelect = false;
console.log(this.isSelect);
//取消选中时删除数组中的值
for (var i = 0; i < this.selectId.length; i++) {
if (this.selectId[i] === this.list[index].id) {
this.selectId.splice(i, 1);
}
}
console.log("选中的值", this.selectId);
} else {
this.list[index].isRight = true;
this.isSelect = true;
console.log(this.isSelect);
this.selectId.push(this.list[index].id);
console.log("选中的值", this.selectId);
}
},
//申请考试题目
getExaminationQuestions: function () {
uni.request({
url:
"http://192.168.1.22" +
"/wxh-worker-rest/rest/exam" +
"/serviceRule/next/" +
this.vuex_token +
"?userExamId=" +
this.userExamId.userExamId,
method: "POST",
header: {
"Content-Type": "application/x-www-form-urlencoded",
},
success: (res) => {
if (res.data.code == 200) {
this.ExaminationQuestions = res.data.data;
this.list = res.data.data.answerList;
console.log(this.ExaminationQuestions);
}
},
});
console.log("answer的userExamId是", this.userExamId);
},
//下一题
nextClick: function () {
//判断
if (this.isQuestion == "第20题/共20题") {
this.isQuestion = "";
console.log("标识符6666", this.userExamId.userExamId);
wx.navigateTo({
url: "./result?userExamId=" + this.userExamId.userExamId,
});
}
//判断有没有选
if (this.selectId.length == 0) {
wx.showToast({
title: "请选择",
icon: "none", //当icon:'none'时,没有图标 只有文字
duration: 2000,
});
return;
}
uni.request({
url:
"http://192.168.1.22" +
"/wxh-worker-rest/rest/exam" +
"/serviceRule/next/" +
this.vuex_token +
"?userExamId=" +
this.userExamId.userExamId +
"&questionId=" +
this.ExaminationQuestions.question.id +
"&userAnswerIds=" +
this.selectId,
method: "POST",
header: {
"Content-Type": "application/x-www-form-urlencoded",
},
success: (res) => {
console.log("sssss", res);
if (res.data.code == 200) {
this.ExaminationQuestions = res.data.data;
this.list = res.data.data.answerList;
this.isQuestion = res.data.data.progress;
console.log("uuuuuuuu", this.ExaminationQuestions);
}
this.selectId = [];
console.log("zzy", this.selectId);
},
});
},
},
};
</script>
<style lang="scss">
.content {
width: 600rpx;
height: 800rpx;
/* background: #8F8F94; */
margin: 0 auto;
}
.dx {
padding: 0rpx;
background: #2979FF;
color: #FFFFFF;
border-radius: 0px;
}
.num {
color: #2B85E4;
}
.all {
color: #8F8F94;
}
.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;
}
.content {
width: 600rpx;
height: 800rpx;
/* background: #8F8F94; */
margin: 0 auto;
}
.dx {
padding: 0rpx;
background: #2979ff;
color: #ffffff;
border-radius: 0px;
}
.num {
color: #2b85e4;
}
.all {
color: #8f8f94;
}
.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>
<template>
<view class="content">
<view class="title">考试规则说明</view>
<view class="test">
<view class="text">
<text class="left">考试科目:</text><text style="color: #007AFF;">{{exam.examName}}</text>
</view>
<view class="text">
<text class="left">合格条件:</text><text>{{exam.ruleDisc}}</text>
</view>
<view class="text">
<text class="left">考试时间:</text><text>30分钟</text>
</view>
<view class="text">
<text class="left">题目规则:</text><text>题库100题,随机抽20题</text>
</view>
<view class="text">
<text class="left">备注说明:</text><text>无</text>
</view>
</view>
<button @click="aaa">开始考试</button>
</view>
<view class="content">
<view class="title">考试规则说明</view>
<view class="test">
<view class="text">
<text class="left">考试科目:</text
><text style="color: #007aff">{{ exam.examName }}</text>
</view>
<view class="text">
<text class="left">合格条件:</text
><text>{{ exam.ruleDisc }}</text>
</view>
<view class="text">
<text class="left">考试时间:</text><text>30分钟</text>
</view>
<view class="text">
<text class="left">题目规则:</text
><text>题库100题,随机抽20题</text>
</view>
<view class="text">
<text class="left">备注说明:</text><text>无</text>
</view>
</view>
<button @click="getUserExamId()">开始考试</button>
</view>
</template>
<script>
export default {
data() {
return {
examId:1,
exam:null
}
},
onLoad() {
this.getUserExamInfo()
},
methods: {
aaa(){
wx.navigateTo({
url:'./answer'
})
},
//获取考试信息
getUserExamInfo: function() {
uni.showLoading({
title: '请稍候'
})
let that = this
uni.request({
url: 'https://system.banshouhui.com' +
'/wxh-worker-rest/rest/exam' +
'/serviceRule/userExamInfo/' +
'RTOKENf86a7c0606ef5ebf36f211ace3466b7f9de56e37' +
'?examId=' + this.examId,
method: 'POST',
data: {
//examId:this.examId,
},
header: {
'Content-Type': 'application/x-www-form-urlencoded'
},
success: (res) => {
console.log(res.data)
uni.hideLoading()
if (!res.data) {
return
}
if (res.data.code == 401 || res.data.code == 403) {
// uni.navigateTo({
// url: '/pages/login/wxlogin'
// })
// return
console.log('洪塘张学友')
}
if (res.data.code == 200) {
//examStatus 用户考试状态 0考试中 1考试完成 2未参与
that.exam = res.data.data
console.log(that.exam)
if (res.data.data.examStatus == 2) {
that.applyExam()
return
}
if(res.data.data.examStatus == 1){
console.log('111111111111111111111111111')
that.isComplete = true
that.examScore = res.data.data.examScore
that.postResult()
return
}
if (res.data.data.examStatus == 0 ) {
that.userExamId = res.data.data.id
that.getNext()
}
} else {
uni.showToast({
icon: 'none',
title: res.data.message
})
}
},
fail: (e) => {
uni.hideLoading()
uni.showToast({
icon: 'none',
title: '获取考试信息失败'
})
}
})
},
}
}
export default {
data() {
return {
examId: 2,
exam: null,
userExamId: null,
};
},
onLoad() {
// this.getUserExamInfo();
},
methods: {
//申请考试获取userExamId
getUserExamId: function () {
var that = this;
console.log("这是一条消息");
uni.request({
url:
"http://192.168.1.22" +
"/wxh-worker-rest/rest/exam/serviceRule/" +
that.vuex_token +
"?examId=" +
this.examId,
method: "POST",
header: {
"Content-Type": "application/x-www-from-urlencoded",
},
success: (res) => {
console.log("标识符1", res.data);
uni.hideLoading();
if (res.data.code == 200) {
if (res.data.data.userExamId) {
that.userExamId = res.data.data.userExamId;
console.log("这个是个标识符", that.userExamId);
}
}
},
});
setTimeout(() => {
wx.navigateTo({
url: "./answer?userExamId=" + that.userExamId,
});
}, 1000);
},
},
};
</script>
<style >
.content{
margin: 187rpx 80rpx;
}
.title{
font-size: 17px;
text-align: center;
}
.test{
margin: 0 0 ;
}
.left{
margin-right: 8rpx;
margin-left: 68rpx;
}
.text{
margin: 50rpx 0;
}
button{
width:364rpx;
height: 56rpx;
background: #007AFF;
font-size: 24rpx;
color: #FFFFFF;
}
<style>
.content {
margin: 187rpx 80rpx;
}
.title {
font-size: 17px;
text-align: center;
}
.test {
margin: 0 0;
}
.left {
margin-right: 8rpx;
margin-left: 68rpx;
}
.text {
margin: 50rpx 0;
}
button {
width: 364rpx;
height: 56rpx;
background: #007aff;
font-size: 24rpx;
color: #ffffff;
}
</style>
......@@ -3,30 +3,34 @@
<view class="title">
课程简介
</view>
<view class="u-content">
<u-parse :html="courseInfo.intro"></u-parse>
</view>
<view class="lecturer">
<view class="" style="font-size: 40rpx;font-weight: bold;margin: 30rpx 0;">
讲师
</view>
<view class="" style="display: flex;">
<image src="../../static/logo.png" mode=""></image>
<view style="font-size: 30rpx;font-weight:1000;margin: 19px 24px;">扳手卢老师</view>
<view class="" v-if="courseInfo.isTeachers">
<view class="" style="font-size: 40rpx;font-weight: bold;margin: 30rpx 0;">
讲师
</view>
<view class="" style="display: flex;">
<image src="../../static/logo.png" mode=""></image>
<view style="font-size: 30rpx;font-weight:1000;margin: 19px 24px;">{{ courseInfo.teacher.name }}</view>
</view>
</view>
<view class="" style="margin: 36rpx 0;">
<view class="" style="font-size: 40rpx;font-weight:1000">
目录
</view>
<view v-for="item in list">
<view v-for="(item,index) in list">
<view class="chapter">
{{item.name}}
</view>
<view class="video" v-for="key in item.section" @click=details(key.id)>
<view class="video" v-for="(section,key) in item.section" @click=details(section.id)>
<view class="video_1" >
<view class="text" v-text="wareType(key.ware)">
<view class="text" v-text="wareType(section.ware)">
</view>
<text>1-{{key.order}}</text>
<text class="text2">{{key.name}}</text>
<text class="text3" v-text="key.isLearned==false?'未开始':'完成'"></text>
<text class="texts">{{index+1}}-{{key+1}}</text>
<text class="text2">{{section.name}}</text>
<text class="text3" v-text="section.isLearned==false?'未开始':'完成'"></text>
</view>
</view>
</view>
......@@ -45,6 +49,11 @@
},
list:[],
examId:1,
courseInfo: {
intro: '',
isTeachers: false,
teacher: {}
}
}
},
onLoad(a){
......@@ -52,8 +61,31 @@
this.params.course_id=a.course_id
console.log(this.params.course_id)
this.getCapterDetails()
this.getCourseInfo()
},
methods: {
getCourseInfo() {
let param = {
course_id: this.params.course_id
};
this.$u.api
.CourseList(param)
.then((res) => {
if (res.code == 200) {
if (res.data) {
this.courseInfo.intro = res.data.course.intro;
this.courseInfo.isTeachers = res.data.course.teachers.length > 0;
this.courseInfo.teacher = this.courseInfo.isTeachers ? res.data.course.teachers[0] : {};
}
}
})
.catch((err) => {
uni.showToast({
title: err,
icon: "none",
});
});
},
//获取章节详情
getCapterDetails() {
console.log('获取章节详情')
......@@ -133,7 +165,7 @@
<style lang="scss">
.title{
height: 164rpx;
height: 64rpx;
font-size: 40rpx;
font-weight: bold;
margin: 24rpx 34rpx;
......@@ -158,6 +190,12 @@
margin: 20rpx 0;
position: relative;
width: 100%;
.texts{
border:1px solid #8F8F94;
text-align: center;
line-height: 38rpx;
margin-right: 5rpx;
}
.text{
width: 100rpx;
height: 38rpx;
......@@ -179,4 +217,7 @@
right: 0;
}
}
.u-content {
padding: 0rpx 34rpx;
}
</style>
<template>
<view class="study">
<u-navbar
:is-back="false"
background="{background: transparent}"
:border-bottom="false"
:is-fixed="false"
>
<text class="title-view">学习</text>
</u-navbar>
<image :src="bannerImage" mode="" class="banner"></image>
<!-- <u-tabs :list="tabs" :is-scroll="false" :current="current" @change="change"></u-tabs> -->
<view>
<u-tabs-swiper bg-color="#F4F5F7" inactive-color="#999999" font-size="28" ref="uTabs" :list="tabs" :current="current" @change="tabsChange" :is-scroll="false" swiperWidth="750"></u-tabs-swiper>
</view>
<swiper :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish" style="height: 755rpx;">
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height:796rpx;width:100%;" @scrolltolower="onreachBottom">
<view class="standard" @click="goToPrint">
<text>充电桩交付规范</text>
<text>></text>
</view>
</scroll-view>
</swiper-item>
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height:100%;width:100%;" @scrolltolower="onreachBottom">
<view v-for="item in list" :key="item.id" class="notice" @click="bbb(item)">
<view class="n-head">
《{{item.title}}》
</view>
<view class="news" v-html="item.body">
{{item.body}}
</view>
</view>
<view v-shou="isLoadMore">
<u-loadmore :status="loadStatus" />
</view>
</scroll-view>
</swiper-item>
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height:100%;width:100%;">
<view class="lean">
<view class="top">
<view class="currency-class">
<view class="title">通用课程</view>
<view class="class1" @click=ccc(173)>
<image class="img" :src=courselist.course.preview_pic mode=""></image>
<view class="right">
<view class="">
{{courselist.course.name}}
</view>
<view class="intro" v-html="courselist.course.intro">
{{courselist.course.intro}}
</view>
<view class="" style="display:flex;justify-content: space-between;">
<u-line-progress active-color="#2979ff" :percent=courselist.learnedInfo.learnPercent style="width:54%;"></u-line-progress>
<text v-text="(courselist.learnedInfo.isLearned) ?(courselist.learnedInfo.learnPercent==1)?'已完成':'继续':'未观看' "></text>
</view>
</view>
</view>
<view class="class1">
<image class="img" src="../../static/logo.png" mode=""></image>
<view class="right">
<view class="">
接单操作
</view>
<view class="">
快速学习,使用APP接单、抢单
</view>
<view class="" style="display:flex;justify-content: space-between;">
<u-line-progress active-color="#2979ff" :percent="30" style="width:54%;"></u-line-progress>
<text>继续</text>
</view>
</view>
</view>
</view>
<view class="currency-class">
<view class="title">技能课程</view>
<view class="class1">
<image class="img" src="../../static/logo.png" mode=""></image>
<view class="right">
<view class="">
从0-1学习充电桩安装服务
</view>
<view class="">
让你全面了解充电桩市场及服务规范
</view>
<view class="" style="display:flex;justify-content: space-between;">
<u-line-progress active-color="#2979ff" :percent="100" style="width:54%;"></u-line-progress>
<text>完成</text>
</view>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
</swiper-item>
<swiper-item>
<scroll-view scroll-y style="height:100%;width:100%;" @scrolltolower="onreachBottom">
<view class="lean">
<view class="top">
<view class="currency-class">
<text class="title">通用认证</text>
<view class="class1" @click="aaa">
<image class="img" src="../../static/logo.png" mode=""></image>
<view class="right">
<view class="">
服务规范
</view>
<view class="">
通过本认证,是接单的前提条件
</view>
<view class="" style="display:flex;justify-content: space-between;">
<text style="color: #a69999;">随机20题,及格20题</text>
<text>通过</text>
</view>
</view>
</view>
<view class="class1" @click="aaa">
<image class="img" src="../../static/logo.png" mode=""></image>
<view class="right">
<view class="">
接单操作
</view>
<view class="">
快速认证,是否具备接单操作能力
</view>
<view class="" style="display:flex;justify-content: space-between;">
<text style="color: #a69999">随机20题,及格16题</text>
<text>未通过</text>
</view>
</view>
</view>
</view>
<view class="currency-class">
<text class="title">技能认证</text>
<view class="class1" @click="aaa">
<image class="img" src="../../static/logo.png" mode=""></image>
<view class="right">
<view class="">
从0-1学习充电桩安装服务
</view>
<view class="">
通过本认证后,可接充电桩业务单
</view>
<view class="" style="display:flex;justify-content: space-between;">
<text style="color: #a69999;">随机30题,及格25题</text>
<text>未通过</text>
</view>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
</swiper-item>
</swiper>
</view>
</view>
<view class="study">
<u-navbar
:is-back="false"
background="{background: transparent}"
:border-bottom="false"
:is-fixed="false"
>
<text class="title-view">学习</text>
</u-navbar>
<image :src="bannerImage" mode="" class="banner"></image>
<view>
<u-tabs-swiper
bg-color="#F4F5F7"
inactive-color="#999999"
font-size="28"
ref="uTabs"
:list="tabs"
:current="current"
@change="tabsChange"
:is-scroll="false"
swiperWidth="750"
></u-tabs-swiper>
</view>
<swiper
:current="swiperCurrent"
@transition="transition"
@animationfinish="animationfinish"
style="height: 755rpx"
>
<swiper-item class="swiper-item">
<scroll-view
scroll-y
style="height: 796rpx; width: 100%"
@scrolltolower="onreachBottom"
>
<view class="standard" @click="goToPrint">
<text>充电桩交付规范</text>
<text>></text>
</view>
</scroll-view>
</swiper-item>
<swiper-item class="swiper-item">
<scroll-view
scroll-y
style="height: 100%; width: 100%"
@scrolltolower="onreachBottom"
>
<view
v-for="item in list"
:key="item.id"
class="notice"
@click="bbb(item)"
>
<view class="n-head"> 《{{ item.title }}》 </view>
<view class="news" v-html="item.body">
{{ item.body }}
</view>
</view>
<view v-shou="isLoadMore">
<u-loadmore :status="loadStatus" />
</view>
</scroll-view>
</swiper-item>
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height: 100%; width: 100%">
<view class="lean">
<view class="top">
<view class="currency-class">
<view class="title">通用课程</view>
<view
class="class1"
@click="ccc(courselist[0].id)"
>
<image
class="img"
:src="courselist[0].pic"
mode=""
></image>
<view class="right">
<view class="">
{{ courselist[0].title }}
</view>
<view class="intro">
{{ courselist[0].desc }}
</view>
<view
class=""
style="
display: flex;
justify-content: space-between;
"
>
<u-line-progress
active-color="#2979ff"
:percent="courselist[0].percent"
style="width: 54%"
>
</u-line-progress>
<text
v-text="courselist[0].status"
></text>
</view>
</view>
</view>
<view
class="class1"
@click="ccc(courselist[1].id)"
>
<image
class="img"
:src="courselist[1].pic"
mode=""
></image>
<view class="right">
<view class="">
{{ courselist[1].title }}
</view>
<view class="">
{{ courselist[1].desc }}
</view>
<view
class=""
style="
display: flex;
justify-content: space-between;
"
>
<u-line-progress
active-color="#2979ff"
:percent="courselist[1].percent"
style="width: 54%"
>
</u-line-progress>
<text
v-text="courselist[1].status"
></text>
</view>
</view>
</view>
</view>
<view class="currency-class">
<view class="title">技能课程</view>
<view
class="class1"
@click="ccc(courselist[2].id)"
>
<image
class="img"
:src="courselist[2].pic"
mode=""
></image>
<view class="right">
<view class="">
{{ courselist[2].title }}
</view>
<view class="">
{{ courselist[2].desc }}
</view>
<view
class=""
style="
display: flex;
justify-content: space-between;
"
>
<u-line-progress
active-color="#2979ff"
:percent="courselist[2].percent"
style="width: 54%"
>
</u-line-progress>
<text
v-text="courselist[2].status"
></text>
</view>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
</swiper-item>
<swiper-item>
<scroll-view
scroll-y
style="height: 100%; width: 100%"
@scrolltolower="onreachBottom"
>
<view class="lean">
<view class="top">
<view class="currency-class">
<text class="title">通用认证</text>
<view class="class1" @click="aaa">
<image
class="img"
src="../../static/logo.png"
mode=""
></image>
<view class="right">
<view class=""> 服务规范 </view>
<view class="">
通过本认证,是接单的前提条件
</view>
<view
class=""
style="
display: flex;
justify-content: space-between;
"
>
<text style="color: #a69999"
>随机20题,及格20题</text
>
<text>通过</text>
</view>
</view>
</view>
<view class="class1" @click="aaa">
<image
class="img"
src="../../static/logo.png"
mode=""
></image>
<view class="right">
<view class=""> 接单操作 </view>
<view class="">
快速认证,是否具备接单操作能力
</view>
<view
class=""
style="
display: flex;
justify-content: space-between;
"
>
<text style="color: #a69999"
>随机20题,及格16题</text
>
<text>未通过</text>
</view>
</view>
</view>
</view>
<view class="currency-class">
<text class="title">技能认证</text>
<view class="class1" @click="aaa">
<image
class="img"
src="../../static/logo.png"
mode=""
></image>
<view class="right">
<view class="">
从0-1学习充电桩安装服务
</view>
<view class="">
通过本认证后,可接充电桩业务单
</view>
<view
class=""
style="
display: flex;
justify-content: space-between;
"
>
<text style="color: #a69999"
>随机30题,及格25题</text
>
<text>未通过</text>
</view>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
</swiper-item>
</swiper>
</view>
</template>
<script>
export default {
data() {
return {
msg: "赣南吴彦祖",
tabs: [
{
name: "交付规范",
},
{
name: "培训通知",
},
{
name: "在线学习",
},
{
name: "考核认证",
data() {
return {
msg: "赣南吴彦祖",
tabs: [
{
name: "交付规范",
},
{
name: "培训通知",
},
{
name: "在线学习",
},
{
name: "考核认证",
},
],
current: 0,
swiperCurrent: 0,
params: {
start: 0,
},
list: [],
courselist: [
{
title: "服务规范",
desc: "为用户提供更好服务,自己赚更多钱",
percent: 0,
status: "",
pic: process.uniEnv.qn_base_url + "guifan1@3x.png",
id: 173,
},
{
title: "接单操作",
desc: "快速学习,使用APP 接单、抢单",
percent: 0,
status: "",
pic: process.uniEnv.qn_base_url + "guifan2@3x.png",
id: 173,
},
{
title: "从0-1学习充电桩安装服务",
desc: "让你全面了解充电桩市场及服务规范",
percent: 0,
status: "",
pic: process.uniEnv.qn_base_url + "kecehng1@3x.png",
id: 173,
},
],
loadStatus: "loading", //加载样式:loadMore-加载前样式,loading-加载加载中样式,nomore-没有数据样式
isLoadMore: false, //是否加载中
course_id: "course_id_=173",
exam: null,
};
},
onLoad() {
// this.getList();
// this.getCourseList();
// this.getUserExamInfo();
},
computed: {
bannerImage() {
return process.uniEnv.qn_base_url + "banner-xx@3x.png";
},
],
current: 0,
swiperCurrent: 0,
params: {
start: 0,
},
list: [],
courselist: null,
loadStatus: "loading", //加载样式:loadMore-加载前样式,loading-加载加载中样式,nomore-没有数据样式
isLoadMore: false, //是否加载中
course_id: "course_id_=173",
exam: null,
};
},
onLoad() {
this.getList();
this.getCourseList();
this.getUserExamInfo();
},
computed: {
bannerImage() {
return process.uniEnv.qn_base_url + "banner-xx.png";
},
},
methods: {
getList() {
this.$u.api
.getTrainingNoticeList(this.params)
.then((res) => {
if (res.code == 200) {
if (res.data) {
this.list = this.list.concat(res.data);
if (res.data.length < 5) {
//判断接口返回数据量小于请求数据量,则表示此为最后一页
this.isLoadMore = true;
this.loadStatus = "nomore";
} else {
this.isLoadMore = false;
}
methods: {
getList() {
this.$u.api
.getTrainingNoticeList(this.params)
.then((res) => {
if (res.code == 200) {
if (res.data) {
this.list = this.list.concat(res.data);
if (res.data.length < 5) {
//判断接口返回数据量小于请求数据量,则表示此为最后一页
this.isLoadMore = true;
this.loadStatus = "nomore";
} else {
this.isLoadMore = false;
}
} else {
this.isLoadMore = true;
this.loadStatus = "nomore";
}
} else {
//接口请求失败的处理
uni.showToast({
title: res.message,
icon: "none",
});
this.isLoadMore = false;
if (this.params.start > 0) {
this.page -= 5;
}
}
})
.catch((err) => {
uni.showToast({
title: err,
icon: "none",
});
this.isLoadMore = false;
if (this.params.start > 0) {
this.page -= 5;
}
});
},
getTypeName(percent) {
if (percent == 0) {
return "未开始";
} else if (percent == "100") {
return "已完成";
} else {
this.isLoadMore = true;
this.loadStatus = "nomore";
}
} else {
//接口请求失败的处理
uni.showToast({
title: res.message,
icon: "none",
});
this.isLoadMore = false;
if (this.params.start > 0) {
this.page -= 5;
return "继续";
}
}
})
.catch((err) => {
uni.showToast({
title: err,
icon: "none",
});
this.isLoadMore = false;
if (this.params.start > 0) {
this.page -= 5;
}
});
},
//在线学习通用课程信息
getCourseList() {
this.$u.api
.CourseList()
.then((res) => {
if (res.code == 200) {
if (res.data) {
this.courselist = res.data;
console.log("--------");
console.log(this.courselist);
if (res.data.length < 5) {
//判断接口返回数据量小于请求数据量,则表示此为最后一页
this.isLoadMore = true;
this.loadStatus = "nomore";
} else {
this.isLoadMore = false;
}
} else {
this.isLoadMore = true;
this.loadStatus = "nomore";
},
//在线学习通用课程信息
getCourseList() {
let courseLength = this.courselist.length;
for (let i = 0; i < courseLength; i++) {
let param = {
course_id: this.courselist[i].id,
};
this.$u.api
.CourseList(param)
.then((res) => {
if (res.code == 200) {
if (res.data) {
this.courselist[i].status = this.getTypeName(
res.data.learnedInfo.learnPercent
);
this.courselist[i].percent =
res.data.learnedInfo.learnPercent;
}
}
})
.catch((err) => {
uni.showToast({
title: err,
icon: "none",
});
});
}
} else {
//接口请求失败的处理
uni.showToast({
title: res.message,
icon: "none",
});
this.isLoadMore = false;
if (this.params.start > 0) {
this.page -= 5;
},
//tabs通知swiper切换
tabsChange(index) {
this.swiperCurrent = index;
switch (index) {
case 1:
this.params.start = 0;
this.list = [];
this.getList();
break;
case 2:
this.getCourseList();
console.log("重新加载学习进度");
break;
case 3:
this.getUserExamInfo();
break;
}
}
})
.catch((err) => {
uni.showToast({
title: 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",
});
},
//跳转到课程介绍
ccc(id) {
uni.navigateTo({
url: "./curriculum?course_id=" + id,
});
},
//跳转到
bbb(e) {
var news = {
body: e.body,
id: e.id,
level: e.level,
title: e.title,
};
// console.log(news)
uni.navigateTo({
url: "./news-details",
});
setTimeout(() => {
uni.$emit("news", news), console.log("发送数据");
}, 500);
console.log("跳转结束11111111");
},
//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);
//swiper-item左右移动,通知tabs的滑块跟随移动
transition(e) {
let dx = e.detail.dx;
this.$refs.uTabs.setDx(dx);
},
});
},
//考核认证,通用认证,考试通过or未通过查询接口请求
getUserExamInfo() {
uni.showLoading({
title: "请稍候",
});
animationfinish(e) {
let current = e.detail.current;
this.$refs.uTabs.setFinishCurrent(current);
this.swiperCurrent = current;
this.current = current;
},
//跳转到assessment页面
aaa() {
var id = this.exam.id;
if (this.exam.examStatus == 0) {
console.log("这是个标识符", this.exam.id);
let that = this;
uni.request({
url:
"http://192.168.1.22" +
"/wxh-worker-rest/rest/exam" +
"/serviceRule/userExamInfo/" +
getApp().globalData.token +
"?examId=" +
2,
method: "POST",
data: {
//examId:this.examId,
wx.navigateTo({
url: "./answer?userExamId=" + id,
});
} else if (this.exam.examStatus == 1) {
wx.navigateTo({
url: "./result?userExamId=" + id,
});
} else if (this.exam.examStatus == 2) {
wx.navigateTo({
url: "./assessment",
});
}
},
header: {
"Content-Type": "application/x-www-form-urlencoded",
//跳转到课程介绍
ccc(id) {
uni.navigateTo({
url: "./curriculum?course_id=" + id,
});
},
success: (res) => {
console.log(res.data);
uni.hideLoading();
if (!res.data) {
return;
}
if (res.data.code == 401 || res.data.code == 403) {
// uni.navigateTo({
// url: '/pages/login/wxlogin'
// })
// return
console.log("洪塘张学友");
}
if (res.data.code == 200) {
//examStatus 用户考试状态 0考试中 1考试完成 2未参与
that.exam = res.data.data;
console.log(that.exam);
if (res.data.data.examStatus == 2) {
that.applyExam();
return;
}
if (res.data.data.examStatus == 1) {
console.log("111111111111111111111111111");
that.isComplete = true;
that.examScore = res.data.data.examScore;
that.postResult();
return;
}
if (res.data.data.examStatus == 0) {
that.userExamId = res.data.data.id;
that.getNext();
//跳转到
bbb(e) {
var news = {
body: e.body,
id: e.id,
level: e.level,
title: e.title,
};
// console.log(news)
uni.navigateTo({
url: "./news-details",
});
setTimeout(() => {
uni.$emit("news", news), console.log("发送数据");
}, 500);
console.log("跳转结束11111111");
},
//scroll-view到底部加载更多
onreachBottom() {
console.log("上拉触底函数");
//上拉触底函数
if (!this.isLoadMore) {
this.isLoadMore = true;
this.params.start += 5;
if (this.loadStatus !== "nomore") {
this.getList();
}
}
} else {
uni.showToast({
icon: "none",
title: res.data.message,
},
//跳转到拍照小程序首页
goToPrint() {
console.log("111111");
uni.navigateToMiniProgram({
appId: "wxd1d6eede324b0465",
success(res) {
//打开成功
console.log("success", res);
},
fail(err) {
console.log("err", err);
},
});
}
},
fail: (e) => {
uni.hideLoading();
uni.showToast({
icon: "none",
title: "获取考试信息失败",
});
//考核认证,通用认证,考试通过or未通过查询接口请求
getUserExamInfo() {
uni.showLoading({
title: "请稍候",
});
let that = this;
uni.request({
url:
"http://192.168.1.22" +
"/wxh-worker-rest/rest/exam" +
"/serviceRule/userExamInfo/" +
that.vuex_token +
"?examId=" +
2,
method: "POST",
data: {
//examId:this.examId,
},
header: {
"Content-Type": "application/x-www-form-urlencoded",
},
success: (res) => {
console.log(res.data);
uni.hideLoading();
if (!res.data) {
return;
}
if (res.data.code == 401 || res.data.code == 403) {
// uni.navigateTo({
// url: '/pages/login/wxlogin'
// })
// return
console.log("洪塘张学友");
}
if (res.data.code == 200) {
//examStatus 用户考试状态 0考试中 1考试完成 2未参与
that.exam = res.data.data;
console.log(that.exam);
if (res.data.data.examStatus == 2) {
that.applyExam();
return;
}
if (res.data.data.examStatus == 1) {
console.log("111111111111111111111111111");
that.isComplete = true;
that.examScore = res.data.data.examScore;
that.postResult();
return;
}
if (res.data.data.examStatus == 0) {
that.userExamId = res.data.data.id;
that.getNext();
}
} else {
uni.showToast({
icon: "none",
title: res.data.message,
});
}
},
fail: (e) => {
uni.hideLoading();
uni.showToast({
icon: "none",
title: "获取考试信息失败",
});
},
});
},
});
},
},
};
</script>
<style>
.study {
height: 100vh;
background-color: #f4f5f7;
padding: 0rpx 30rpx 0 30rpx;
height: 100vh;
background-color: #f4f5f7;
padding: 0rpx 30rpx 0 30rpx;
}
.title-view {
color: #333333;
font-weight: bold;
font-size: 40rpx;
color: #333333;
font-weight: bold;
font-size: 40rpx;
}
.banner {
width: 690rpx;
height: 240rpx;
/* margin-left: -15rpx; */
width: 690rpx;
height: 240rpx;
margin-top: 10rpx;
}
/* //交付规范 */
.standard {
width: 656rpx;
display: flex;
justify-content: space-between;
border-bottom: 1rpx solid #82848a;
padding: 0 34rpx;
margin: 72rpx auto;
width: 656rpx;
display: flex;
justify-content: space-between;
border-bottom: 1rpx solid #82848a;
padding: 0 34rpx;
margin: 72rpx auto;
}
/* //培训通知 */
.notice {
border: #808080 solid 2rpx;
width: 100%;
height: 400rpx;
margin-top: 36rpx;
overflow: hidden;
border: #808080 solid 2rpx;
width: 100%;
height: 400rpx;
margin-top: 36rpx;
overflow: hidden;
}
.n-head {
text-align: center;
margin: 32rpx 0;
text-align: center;
margin: 32rpx 0;
}
.news {
}
/* //在线学习 */
.currency-class {
width: 100%;
background: #ffffff;
padding: 18rpx;
margin-bottom: 11px;
border-radius: 12rpx;
width: 100%;
background: #ffffff;
padding: 18rpx;
margin-bottom: 11px;
border-radius: 12rpx;
}
.title {
font-size: 32rpx;
font-weight: bold;
font-family: PingFang-SC-Bold, PingFang-SC;
font-size: 32rpx;
font-weight: bold;
font-family: PingFang-SC-Bold, PingFang-SC;
}
.class1 {
display: flex;
justify-content: space-between;
padding-top: 22rpx;
margin-top: 28rpx;
border-top: 1rpx solid #808080;
display: flex;
justify-content: space-between;
padding-top: 22rpx;
margin-top: 28rpx;
border-top: 1rpx solid #808080;
}
.img {
width: 201rpx;
height: 201rpx;
display: block;
margin-right: 0rpx;
width: 201rpx;
height: 201rpx;
display: block;
margin-right: 0rpx;
}
.right {
width: 428rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
width: 428rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.intro {
color: #9999a6;
color: #9999a6;
}
.tab {
background: #fff;
height: 82rpx;
margin: 0 0;
background: #fff;
height: 82rpx;
margin: 0 0;
}
.text {
margin: 0 40rpx;
line-height: 82rpx;
color: #667eb5;
margin: 0 40rpx;
line-height: 82rpx;
color: #667eb5;
}
.content {
margin: 5px 0;
height: 485rpx;
background: #fff;
margin: 5px 0;
height: 485rpx;
background: #fff;
}
swiper {
height: 691rpx;
height: 691rpx;
}
</style>
</style>
\ No newline at end of file
<template>
<view class="test-result">
<text class="title">考试结果</text>
<view class="result">
未通过
</view>
<view class="test-explain">
<view class="hang">
<text class="text1">合格条件:</text><text class="text2">答对20题</text>
</view>
<view class="hang">
<text class="text1">考试结果:</text><text class="text2">答对10题</text>
</view>
<view class="hang">
<text class="text1">考试用时:</text><text class="text2">16分29秒</text>
</view>
</view>
<view class="btn">
<button class="btn1">再答一次</button>
<button class="btn2">退出重考</button>
</view>
</view>
<view class="test-result">
<text class="title">考试结果</text>
<view class="result"> {{ text }} </view>
<view class="test-explain">
<view class="hang">
<text class="text1">合格条件:</text
><text class="text2">答对20题</text>
</view>
<view class="hang">
<text class="text1">考试结果:</text
><text class="text2">答对10题</text>
</view>
<view class="hang">
<text class="text1">考试用时:</text
><text class="text2">16分29秒</text>
</view>
</view>
<view class="btn">
<button class="btn1" @click="getAgain()">再答一次</button>
<button class="btn2" @click="toIndex">下次再考</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
export default {
data() {
return {
text: "",
examId: 2,
result: null,
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:
"http://192.168.1.22" +
"/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;
console.log("标识符55", this.result);
},
});
},
//再次考试
getAgain: function () {
wx.navigateTo({
url: "./assessment",
});
},
//下次再考跳转到学习主界面页面
toIndex: function () {
wx.reLaunch({
url: "./index",
});
},
},
};
</script>
<style lang="scss">
.test-result{
width: 610rpx;
height: 965rpx;
margin: 70rpx auto 0;
.title{
margin: 0 44rpx 0;
}
.result{
color: red;
font-size: 66rpx;
text-align: center;
border-bottom: 1px dashed #000000;
margin: 74rpx 0;
padding: 66rpx;
}
.test-explain{
.hang{
margin: 26rpx 26rpx;
.text1{
color: #a69999;
margin-right: 22rpx;
}
.text2{
color: #333333;
}
}
}
.btn{
margin-top: 236rpx;
.btn1{
width: 478rpx;
height: 60rpx;
background: #0079fe;
color: #fff;
font-size: 26rpx;
line-height: 60rpx;
margin: 20rpx auto;
}
.btn2{
width: 478rpx;
height: 60rpx;
background: #f2f2f2;
color: #333333;
font-size: 26rpx;
line-height: 60rpx;
margin:0 auto;
}
}
}
.test-result {
width: 610rpx;
height: 965rpx;
margin: 70rpx auto 0;
.title {
margin: 0 44rpx 0;
}
.result {
color: red;
font-size: 66rpx;
text-align: center;
border-bottom: 1px dashed #000000;
margin: 74rpx 0;
padding: 66rpx;
}
.test-explain {
.hang {
margin: 26rpx 26rpx;
.text1 {
color: #a69999;
margin-right: 22rpx;
}
.text2 {
color: #333333;
}
}
}
.btn {
margin-top: 236rpx;
.btn1 {
width: 478rpx;
height: 60rpx;
background: #0079fe;
color: #fff;
font-size: 26rpx;
line-height: 60rpx;
margin: 20rpx auto;
}
.btn2 {
width: 478rpx;
height: 60rpx;
background: #f2f2f2;
color: #333333;
font-size: 26rpx;
line-height: 60rpx;
margin: 0 auto;
}
}
}
</style>
<template>
<view class="learn-vedio" v-if="isShowVideo">
<view class="uni-padding-wrap uni-common-mt">
<view><video
object-fit="cover"
class="course-video"
id="courseVideo"
:src="courseSrc"
:options="playerOptions"
:playsinline="true"
@play="playCourse"
@error="videoErrorCallback"
@ready="playerReadied"
@timeupdate = "onPlayerTimeupdate($event)"
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>
</view>
<view class="item-title">{{
courseTitle.split(" ") ? courseTitle.split(" ")[1] : ""
}}</view>
</view>
<view
>接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。</view
>
</view>
<view class="learn-view" v-if="courseId >= 0">
<view class="learn-view-title">视频内容介绍</view>
<!-- <view
<view class="learn-vedio" v-if="isShowVideo">
<view class="uni-padding-wrap uni-common-mt">
<view><video object-fit="cover" class="course-video" id="courseVideo" :src="courseSrc"
:options="playerOptions" :playsinline="true" @play="playCourse" @error="videoErrorCallback"
@ready="playerReadied" @timeupdate="onPlayerTimeupdate($event)" 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>
</view>
<view class="item-title">{{ courseTitle.split(" ") ? courseTitle.split(" ")[1] : "" }}</view>
</view>
<view>接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。</view>
</view>
<view class="learn-view" v-if="courseId >= 0">
<view class="learn-view-title">视频内容介绍</view>
<!-- <view
class="learn-list"
v-for="(item, key) in courseOutlines[courseId]"
:key="key"
> -->
<view class="learn-list-item">{{ item }}</view>
</view>
</view>
</view>
<!-- <view class="learn-list-item">{{ item }}</view> -->
<view class="u-content">
<u-parse :html="CourseSectionlist.content"></u-parse>
</view>
</view>
</view>
</view>
<view v-else>
<view class="title">
{{CourseSectionlist.name}}
</view>
<view class="content" v-html="CourseSectionlist.content">
{{CourseSectionlist.content}}
</view>
</view>
</view>
<view class="title">
{{CourseSectionlist.name}}
</view>
<view class="u-content">
<u-parse :html="CourseSectionlist.content"></u-parse>
</view>
</view>
</template>
<script>
let app = getApp();
export default {
data() {
return {
courseId: "",
courseStatus: 0,
courseSrc: "",
courseTitle: "",
courseDesc: "",
currentIndex: -1, // 第几个视频
section_id:0,
isShowVideo: false,
CourseSectionlist: {},//节信息
playerOptions : {
playbackRates: [0.7, 1.0, 1.5, 2.0], //播放速度
autoplay: false, //如果true,浏览器准备好时开始回放。
muted: false, // 默认情况下将会消除任何音频。
loop: false, // 导致视频一结束就重新开始。
preload: 'auto',
language: 'zh-CN',
aspectRatio: '16:9',
fluid: true,
// sources: [{
// type: "",
// src: "" //url地址
// }],
// poster: "../../static/images/test.jpg", //你的封面地址
// width: document.documentElement.clientWidth,
notSupportedMessage: '此视频暂无法播放,请稍后再试',
controlBar: {
timeDivider: true,
durationDisplay: true,
remainingTimeDisplay: false,
fullscreenToggle: true //全屏按钮
}
},
gklog: '',
videoTotalTime: 0,
howTimeToUpdateLearnedStatus: 5,//设置几秒提交一次状态
status: 1,//是否已学习默认1已学习
howLongIsLearned: this.videoTotalTime/2,//默认设置观看1/2就是已学
};
},
computed: {
courseOutlines() {
// 视频内容介绍
return {
1: [
"1、考核规则:接单及时率",
"2、考核规则:上门及时率",
"3、考核规则:安装完工率",
"4、考核规则:资料提交及时率",
"5、考核规则:安装完工率",
"6、考核规则:客户满意度",
],
2: ["1、必备材料4大类", "2、施工工具准备"],
3: [
"1、接线安装工艺标准",
"2、PVC、镀锌管电缆管明敷",
"3、电缆敷设的防火要求",
"4、电源点标识",
"5、配电箱接线及安装",
"6、管线敷设接头处理",
"7、充电桩内部接线",
"8、配电箱安装",
],
4: ["1、勘测环节录单要求", "2、安装环节录单要求"],
};
},
kcImage() {
return process.uniEnv.qn_base_url + "kc.png";
},
},
onLoad(e) {
this.getCourseSection({section_id:e.section_id})
},
onReady: function (res) {
// #ifndef MP-ALIPAY
this.videoContext = uni.createVideoContext("courseVideo");
// #endif
},
methods: {
onPlayerTimeupdate (player) {
console.log('-----onplay----');
console.log(player);
let intCurrentTime = parseInt(player.detail.currentTime);
this.updateLearnedStatus(intCurrentTime);
this.gklog = intCurrentTime;
console.log(' onPlayerTimeupdate!', this.gklog)
},
videoErrorCallback: function (e) {
uni.showModal({
content: e.target.errMsg,
showCancel: false,
});
},
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;
rgb.push(color);
}
return "#" + rgb.join("");
},
playCourse: function (e) {
if(this.courseStatus && (this.courseStatus == "1"||this.courseStatus == 1)) {
return
}
this.changeCourseStatus();
},
playerReadied (player) {
console.log('i go to playerReadied gklog:' + this.gklog)
player.currentTime(this.gklog)
},
changeCourseStatus() {
let that = this;
if (that.courseId) {
that.$u.api
.saveCourseRate({
courseId: that.courseId,
})
.then((res) => {
if (res.code !== 200) {
uni.showToast({
icon: "none",
title: "更新课程状态失败",
});
}
});
} else {
uni.showToast({
title: "课程ID为空,请重新选择课程",
});
}
},
getCourseSection(param) {
this.$u.api
.CourseSection(param)
.then((res) => {
if (res.code == 200) {
if (res.data) {
this.CourseSectionlist = res.data;
console.log("--------")
console.log(this.CourseSectionlist)
let wareVal = this.CourseSectionlist.ware;
this.isShowVideo = wareVal == "0";
if(this.isShowVideo){
let coureWareList = res.data.courseware;
this.courseSrc = coureWareList[0].src;
this.videoTotalTime = parseInt(JSON.parse(coureWareList[0].info).time);
console.log('视频时长信息:' + this.videoTotalTime);
this.courseTitle = res.data.name;
this.courseDesc = res.data.content;
this.section_id = res.data.id;
}
let app = getApp();
export default {
data() {
return {
courseId: "",
courseStatus: 0,
courseSrc: "",
courseTitle: "",
courseDesc: "",
currentIndex: -1, // 第几个视频
section_id: 0,
isShowVideo: false,
CourseSectionlist: {name: '', content: ''}, //节信息
playerOptions: {
playbackRates: [0.7, 1.0, 1.5, 2.0], //播放速度
autoplay: true, //如果true,浏览器准备好时开始回放。
muted: false, // 默认情况下将会消除任何音频。
loop: false, // 导致视频一结束就重新开始。
preload: 'auto',
language: 'zh-CN',
aspectRatio: '16:9',
fluid: true,
notSupportedMessage: '此视频暂无法播放,请稍后再试',
controlBar: {
timeDivider: true,
durationDisplay: true,
remainingTimeDisplay: false,
fullscreenToggle: true //全屏按钮
}
}
},
gklog: '',
videoTotalTime: 0,
howTimeToUpdateLearnedStatus: 5, //设置几秒提交一次状态
status: 1, //是否已学习默认1已学习
howLongIsLearned: this.videoTotalTime / 2, //默认设置观看1/2就是已学
};
},
computed: {
courseOutlines() {
// 视频内容介绍
return {
1: [
"1、考核规则:接单及时率",
"2、考核规则:上门及时率",
"3、考核规则:安装完工率",
"4、考核规则:资料提交及时率",
"5、考核规则:安装完工率",
"6、考核规则:客户满意度",
],
2: ["1、必备材料4大类", "2、施工工具准备"],
3: [
"1、接线安装工艺标准",
"2、PVC、镀锌管电缆管明敷",
"3、电缆敷设的防火要求",
"4、电源点标识",
"5、配电箱接线及安装",
"6、管线敷设接头处理",
"7、充电桩内部接线",
"8、配电箱安装",
],
4: ["1、勘测环节录单要求", "2、安装环节录单要求"],
};
},
kcImage() {
return process.uniEnv.qn_base_url + "kc.png";
},
},
onLoad(e) {
this.getCourseSection({
section_id: e.section_id
})
.catch((err) => {
console.log('--------settttt---------');
console.log(err);
uni.showToast({
title: err,
icon: "none",
},
onReady: function(res) {
// #ifndef MP-ALIPAY
this.videoContext = uni.createVideoContext("courseVideo");
// #endif
},
methods: {
onPlayerTimeupdate(player) {
console.log('-----onplay----');
console.log(player);
let intCurrentTime = parseInt(player.detail.currentTime);
this.updateLearnedStatus(intCurrentTime);
this.gklog = intCurrentTime;
console.log(' onPlayerTimeupdate!', this.gklog)
},
videoErrorCallback: function(e) {
uni.showModal({
content: e.target.errMsg,
showCancel: false,
});
});
},
updateLearnedStatus(nowLength) {
if(this.gklog != nowLength && nowLength%this.howTimeToUpdateLearnedStatus == 0){
if(nowLength < this.howLongIsLearned){
this.status = 0;
}else{
this.status = 1;
console.log('--已学习--');
}
//大于
let param = {
section_id: this.section_id,
video_time: nowLength,
status: this.status,
};
this.$u.api.updateLearnCourses(param).then((res) => {
console.log('--'+this.howTimeToUpdateLearnedStatus+'更新一次观看状态--time:' + nowLength);
});
}
}
},
};
},
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;
rgb.push(color);
}
return "#" + rgb.join("");
},
playCourse: function(e) {
if (this.courseStatus && (this.courseStatus == "1" || this.courseStatus == 1)) {
return
}
},
playerReadied(player) {
console.log('i go to playerReadied gklog:' + this.gklog)
player.currentTime(this.gklog)
},
getCourseSection(param) {
this.$u.api
.CourseSection(param)
.then((res) => {
if (res.code == 200) {
if (res.data) {
this.CourseSectionlist = res.data;
console.log("--------")
console.log(this.CourseSectionlist)
let wareVal = this.CourseSectionlist.ware;
this.isShowVideo = wareVal == "0";
this.courseTitle = res.data.name;
this.courseDesc = res.data.content;
this.section_id = res.data.id;
this.section_content = res.data.content;
if (this.isShowVideo) {
let coureWareList = res.data.courseware;
this.courseSrc = coureWareList[0].src;
this.videoTotalTime = parseInt(JSON.parse(coureWareList[0].info).time);
console.log('视频时长信息:' + this.videoTotalTime);
}else{
this.updateLearnedStatusForText();
}
}
}
})
.catch((err) => {
console.log('--------settttt---------');
console.log(err);
uni.showToast({
title: err,
icon: "none",
});
});
},
updateLearnedStatusForText() {
if (this.isShowVideo) {
return false;
}
let param = {
section_id: this.section_id,
video_time: 0,
status: 1,
};
this.$u.api.updateLearnCourses(param).then((res) => {
console.log('--' + this.howTimeToUpdateLearnedStatus + '更新一次观看状态--time:' + nowTime);
}).catch((err) => {
console.log('--------updateLearnedStatusForText---------');
console.log(err);
uni.showToast({
title: err,
icon: "none",
});
});
},
updateLearnedStatus(nowTime) {
if (this.gklog != nowTime && nowTime % this.howTimeToUpdateLearnedStatus == 0) {
if (nowTime < this.howLongIsLearned) {
this.status = 0;
} else {
this.status = 1;
console.log('--大于规定时间标记为已学习--');
}
let param = {
section_id: this.section_id,
video_time: nowTime,
status: this.status,
};
this.$u.api.updateLearnCourses(param).then((res) => {
console.log('--' + this.howTimeToUpdateLearnedStatus + '更新一次观看状态--time:' + nowTime);
}).catch((err) => {
console.log('--------updateLearnedStatus---------');
console.log(err);
uni.showToast({
title: err,
icon: "none",
});
});
}
}
},
};
</script>
<style lang="scss" scoped>
.learn-vedio {
background-color: #f4f5f7;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
overflow-y:auto;
}
.learn-vedio {
background-color: #f4f5f7;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
overflow-y: auto;
}
.course-video {
width: 100%;
}
.course-title {
font-size: 36rpx;
font-weight: 700;
padding: 40rpx 40rpx 10rpx 40rpx;
}
.title {
font-weight: 700;
font-family: Medium, Helvetica Neue, Helvetica, Arial, sans-serif;
font-size: 77rpx;
color: #333;
padding: 80rpx 60rpx 40rpx 60rpx;
}
.course-video {
width: 100%;
}
.content {
padding: 40rpx 30rpx;
margin-bottom: 20rpx;
}
.course-title {
font-size: 36rpx;
font-weight: 700;
padding: 80rpx 60rpx 40rpx 60rpx;
}
.course-desc {
margin-left: 60rpx;
}
.title {
font-weight: 700;
font-family: Medium,Helvetica Neue,Helvetica,Arial,sans-serif;
font-size: 77rpx;
color: #333;
padding: 80rpx 60rpx 40rpx 60rpx;
}
.title-content {
padding: 40rpx 30rpx;
margin-bottom: 20rpx;
background-color: #ffffff;
color: #999999;
font-size: 24rpx;
.content {
padding: 40rpx 30rpx;
margin-bottom: 20rpx;
}
.item-content {
display: flex;
align-items: center;
}
.course-desc {
margin-left: 60rpx;
}
.item-st {
width: 80rpx;
height: 36rpx;
padding-right: 2rpx;
text-align: center;
margin-right: 20rpx;
line-height: 24rpx;
position: relative;
.title-content {
padding: 40rpx 30rpx;
margin-bottom: 20rpx;
background-color: #ffffff;
color: #999999;
font-size: 24rpx;
.item-st-text {
color: #ffffff;
position: absolute;
font-size: 16rpx;
left: 20rpx;
top: 8rpx;
line-height: 28rpx;
}
}
.item-content {
display: flex;
align-items: center;
}
.item-title {
color: #333333;
font-size: 44rpx;
font-weight: bold;
}
}
.item-st {
width: 80rpx;
height: 36rpx;
padding-right: 2rpx;
text-align: center;
margin-right: 20rpx;
line-height: 24rpx;
position: relative;
.item-st-text {
color: #ffffff;
position: absolute;
font-size: 16rpx;
left: 20rpx;
top: 8rpx;
line-height: 28rpx;
}
}
.item-content {
display: flex;
padding-bottom: 30rpx;
}
.item-title {
color: #333333;
font-size: 44rpx;
font-weight: bold;
}
}
.item-title {
color: #333333;
font-size: 28rpx;
}
.item-content {
display: flex;
padding-bottom: 30rpx;
}
.learn-view {
background-color: #ffffff;
border-radius: 12rpx;
padding: 38rpx 30rpx 30rpx 30rpx;
margin-bottom: 20rpx;
font-size: 32rpx;
color: #333333;
.item-title {
color: #333333;
font-size: 28rpx;
}
.learn-view-title {
font-size: 32rpx;
font-weight: bold;
margin-bottom: 10rpx;
}
.learn-view {
background-color: #ffffff;
border-radius: 12rpx;
padding: 38rpx 30rpx 30rpx 30rpx;
margin-bottom: 20rpx;
font-size: 32rpx;
color: #333333;
.learn-list {
.learn-list-item {
font-size: 28rpx;
margin-top: 30rpx;
margin-bottom: 30rpx;
color: #333333;
}
.learn-view-title {
font-size: 32rpx;
font-weight: bold;
margin-bottom: 10rpx;
}
.learn-list {
.learn-list-item {
font-size: 28rpx;
margin-top: 30rpx;
margin-bottom: 30rpx;
color: #333333;
}
.line-view {
background-color: #f4f5f7;
height: 2rpx;
width: 100%;
}
}
}
.line-view {
background-color: #f4f5f7;
height: 2rpx;
width: 100%;
}
}
}
.u-content {
// margin-top: 10rpx;
padding: 40rpx 30rpx;
margin-bottom: 20rpx;
}
</style>
......@@ -9,7 +9,7 @@
<view class="card base-item">
<view class="top-item">
<view class="left">
<view class="tag">{{ order.orderServiceType }}</view>
<view :class="['tag', {'active': order.orderServiceType == '安装'}]">{{ order.orderServiceType }}</view>
<text class="title">{{ order.categoryName }}</text>
</view>
<view class="right">{{ order.orderBusinessTypeText }}</view>
......@@ -23,7 +23,7 @@
<text>客户信息:</text>
<text>{{ order.contactName }}</text>
</view>
<u-image width="60rpx" height="60rpx" :src="phoneIcon"></u-image>
<u-image width="48rpx" height="48rpx" :src="phoneIcon" @click="phoneToCustomer(order.contactPhone)" ></u-image>
</view>
<view class="order-cell">
<text>联系方式:</text>
......@@ -34,52 +34,74 @@
<u-icon name="map" size="28"></u-icon>
<text class="address-txt">{{ order.contactAddress }}</text>
</view>
<u-image width="60rpx" height="60rpx" :src="navigationIcon"></u-image>
<u-image width="48rpx" height="48rpx" :src="navigationIcon" @click="openLocation"></u-image>
</view>
<!-- <u-read-more ref="uReadMore" :show-height="40" :shadowStyle="{paddingTop: '0rpx',marginTop: '0rpx'}" close-text="查看更多" open-text="点击收起" toggle color="#2272FF" font-size="26"> -->
<view v-if="readMore" @click="readMore = false" class="read-more-toggle">
<u-icon name="arrow-down"></u-icon>
<text class="read-more-text">查看更多</text>
</view>
<view v-else class="order-item-more">
<view class="line-view"></view>
<view class="order-cell between-cell">
<text>品牌:</text>
<text>{{ order.brandName }}</text>
</view>
<view class="order-cell between-cell">
<text>数量:</text>
<text>x{{ order.orderProductCount }}</text>
</view>
<view class="order-cell between-cell">
<text>信息:</text>
<text>{{ order.serviceContent }}</text>
</view>
<view class="order-cell between-cell">
<text>备注:</text>
<text>{{ order.serviceContent }}</text>
</view>
<view class="read-more-toggle">
<u-icon name="arrow-up"></u-icon>
<text class="read-more-text" @click="readMore = true">点击收起</text>
</view>
</view>
<!-- </u-read-more> -->
</view>
<view class="card order-item">
<view class="top-item">
<text class="title">订单内容</text>
</view>
<view class="order-cell between-cell">
<text>品牌:</text>
<text>{{ order.brandName }}</text>
</view>
<view class="order-cell between-cell">
<text>数量:</text>
<text>x{{ order.orderProductCount }}</text>
</view>
<view class="order-cell between-cell">
<text>信息:</text>
<text>{{ order.serviceContent }}</text>
</view>
<view class="order-cell between-cell">
<text>备注:</text>
<text>{{ order.serviceContent }}</text>
</view>
<view class="card appoint-item" v-show="showTimeSelect">
<appoint-time @dateChange="dateChange" @timeChange="timeChange" @weekChange="weekChange"></appoint-time>
</view>
<view class="card order-item record-item">
<view class="top-item">
<text class="title">履约记录</text>
</view>
<view class="order" v-for="(record,index) in orderRecords" :key="record.operationContent">
<view class="order-cell between-cell">
<text>{{record.operationType}}</text>
<text>{{$u.timeFormat(record.operationDatetime, 'yyyy-mm-dd hh:MM:ss')}} </text>
<text style="color: red;">{{record.overTime?'':'超时 '}}{{record.exception?'':' 异常'}}</text>
<view v-if="orderRecords.length == 0" class="no-record-view">当前暂无履约记录</view>
<view v-else>
<view class="order" v-for="(record,index) in shwoOrderRecords" :key="record.operationContent">
<view class="order-cell between-cell">
<text>{{record.operationType}}</text>
<text>{{$u.timeFormat(record.operationDatetime, 'yyyy-mm-dd hh:MM:ss')}} </text>
<text style="color: red;">{{record.overTime?'':'超时 '}}{{record.exception?'':' 异常'}}</text>
</view>
</view>
<view v-if="orderRecords.length > showLenght">
<view v-if="readMoreRecord" @click="readMoreRecord = false" class="read-more-toggle">
<u-icon name="arrow-down"></u-icon>
<text class="read-more-text">查看更多</text>
</view>
<view v-else class="read-more-toggle">
<u-icon name="arrow-up"></u-icon>
<text class="read-more-text" @click="readMoreRecord = true">点击收起</text>
</view>
</view>
<view v-else style="height: 10rpx;"></view>
</view>
</view>
<view class="card appoint-item" v-show="showTimeSelect">
<appoint-time @dateChange="dateChange" @timeChange="timeChange" @weekChange="weekChange"></appoint-time>
</view>
</view>
<view class="toolbar">
<!-- 背景,内容,请求接口 根据状态不同改变 {{operationDoing[order.orderStatus].background}} -->
<!-- 过程反馈 -->
<view class="left">
<view v-show="allowFeedback" @click="clickFeedback" class="button">
过程反馈
<text>过程反馈</text>
</view>
</view>
<!--接单,抢单,已被抢, 预约 ,签到 ,去完工 timestampDiff(order.currentOverTime)>0 -->
......@@ -87,27 +109,29 @@
<view>
<u-toast ref="uToast" />
</view>
<view v-if="showCenterBtn" @click="handleBtn" class="button" :class="btnClass">
{{ centerButtonText }}
<view v-if="showCenterBtn" @click="handleBtn" class="button" :class="['center-button-view', btnClass]">
<text>{{ centerButtonText }}抢单</text>
<view v-if="order.currentOverTime > 0" class="time-view">
<text>{{order.currentOverTime * 1000 > new Date().getTime()?'剩':'超'}}</text>
<u-count-down
:timestamp="timestampDiff(order.currentOverTime)"
font-size="20"
color="#FFFFFF"
bg-color="transparent"
separator-color="#FFFFFF"
separator-size="20"
:ref="'uCountDown'"
@change="timeOutChange(order.currentOverTime)" >
</u-count-down>
</view>
</view>
<view v-show="order.currentOverTime > 0" >
<view class="tag">{{order.currentOverTime * 1000 > new Date().getTime()?'剩':'超'}}</view>
<u-count-down
:timestamp="timestampDiff(order.currentOverTime)"
font-size="30"
:ref="'uCountDown'"
@change="timeOutChange(order.currentOverTime)" >
</u-count-down>
</view>
</view>
<!-- 异常预约 ,现场拍照 这里是调用拍照的两个组件-->
<view class="right">
<view v-if="errorSignIn" @click="take" class="button">
<text>异常签到</text>
</view>
<view v-if="scenePhoto" @click="scenePhotoClick" class="button">
<text>现场拍照</text>
<view v-if="errorSignIn || scenePhoto" @click="$u.debounce(handleClickRight, 500)" :class="['button', {'active': scenePhoto}]">
<text>{{errorSignIn ? '异常签到' : '现场拍照'}}</text>
</view>
</view>
</view>
......@@ -128,6 +152,9 @@
},
data() {
return {
readMore: true,
readMoreRecord: true,
showLenght: 5,
background: {
backgroundColor: 'none',
// 导航栏背景图
......@@ -146,14 +173,17 @@
centerButtonText: '',
orderRecords: [],
method: null,
showCenterBtn: false,
showCenterBtn: true,
showTimeSelect: false,
submitType: '',
nextUrl:'',
btnClass:'appoint-btn',
takeStatus:false,
errorSignIn:false,
scenePhoto: true
scenePhoto: true,
isErrorSign:false,
errorSignUrl:'',
isAllowDianhuaAndDaohang : false
}
},
onLoad(option) {
......@@ -164,23 +194,85 @@
} else {
// 异常处理
}
this.orderId = '8371315'
this.loadOrderDetail()
this.loadOrderRecord()
this.getLocation()
},
computed: {
phoneIcon() {
return process.uniEnv.qn_base_url + 'icon/dianhua-1@2x.png'
//self-support/icon/dianhua-0@2x.png
if(this.isAllowDianhuaAndDaohang){
return process.uniEnv.qn_base_url + 'dianhua-1.png'
}else{
return process.uniEnv.qn_base_url + 'dianhua-0.png'
}
},
navigationIcon() {
return process.uniEnv.qn_base_url + 'icon/daohang-1@2x.png'
//self-support/icon/daohang-0@2x.png
if(this.isAllowDianhuaAndDaohang){
return process.uniEnv.qn_base_url + 'daohang-1.png'
}else{
return process.uniEnv.qn_base_url + 'daohang-0.png'
}
},
centerButtonClass() {
let btnClass = "appoint-btn"
return btnClass
},
shwoOrderRecords() {
if (this.readMoreRecord) {
return this.orderRecords.slice(0, 5)
} else {
return this.orderRecords
}
}
},
methods: {
openLocation(){
if(this.isAllowDianhuaAndDaohang){
uni.getLocation({
type: 'gcj02', //返回可以用于uni.openLocation的经纬度
success: function (res) {
const latitude = res.latitude;
const longitude = res.longitude;
uni.openLocation({
latitude: latitude,
longitude: longitude,
success: function () {
console.log('success');
}
});
}
});
}
},
phoneToCustomer(phone){ // 联系客户
if(this.isAllowDianhuaAndDaohang){
uni.makePhoneCall({
phoneNumber: phone ,//仅为示例
complete() {
}
});
this.contactTime()
}
},
contactTime() {
let self = this
var data={}
self.$u.api.contactTime(data,this.order.orderId).then((res)=>{
if (res.code == 200) {
console.log("===", res.data)
} else {
console.log(res.message);
}
})
},
handleClickRight(active) {
this.scenePhoto ? this.scenePhotoClick() : this.take()
},
scenePhotoClick() { // 跳转拍照小程序
uni.navigateTo({
url: 'pages/photo/list?orderId='+this.order.orderId+'&brandId='+this.order.lianbaoBrandId+'&brand='+this.order.brandName
......@@ -192,22 +284,16 @@
this.takeStatus = true
},
closeTake(img) {
console.log(img)
this.takeStatus = false
// 获取返回的图片 ,如果返回的图片存在则直接异常签约,成功后跳转到去完工页面,
if(img){ // 拍照完成
this.$refs.uToast.show({
title: '签到成功',
type: 'success',
url: 'pages/order/detail',
params: {
id: 1
}
})
this.isErrorSign = true
this.errorSignUrl = img
this.handleBtn()
}else{
this.$refs.uToast.show({
title: '异常签到失败,请先按要求拍照',
type: 'waning'
type: 'warning'
})
}
},
......@@ -222,14 +308,8 @@
console.log("===", res.data)
self.order = res.data
this.getCurrentBtn()
this.visibale = true
// self.order.operationType = "accept"
// }else{
// self.order.operationType = "appointment"
// }
// self.method =self.operationDoing[self.order.operationType].action;
// // 根据工单的状态确定是否需要过程反馈
// self.allowFeedback = self.allowFeedbackStatus.indexOf(self.order.orderStatus)>0
if(self.order.isFirstOrder){
}
} else {
console.log(res.message, "获取订单详情失败!");
}
......@@ -238,7 +318,7 @@
loadOrderRecord() {
let self = this
var param = {
'orderId': self.orderId
orderId: self.orderId
};
self.$u.api.listOrderRecord(param).then((res) => {
if (res.code == 200) {
......@@ -248,9 +328,6 @@
}
})
},
rejectOrder() { // 拒单
console.log("点击拒单")
},
/**
* 点击下一周
* @param {Object} data
......@@ -297,6 +374,7 @@
this.allowFeedback = true
this.showCenterBtn = true
this.showTimeSelect = true
this.isAllowDianhuaAndDaohang = true
this.submitType = "workerAppointment"
} else if (orderStatus === 31 && this.order.appointmentDatetime) {
// 签到
......@@ -310,36 +388,44 @@
// 完工
this.centerButton = "filish"
this.centerButtonText = "去完工"
this.submitType = "toFilish"
this.allowFeedback = true
this.showCenterBtn = true
this.scenePhoto = true
} else {}
},
handleBtn() {
if(this.centerButton === "filish"){
this.filish()
return
}
if(!this.submitType){
return;
}
const data = {}
// 不同请求类型传递不同数据
if (this.submitType === 'maintainWorkerCheckin') { // 签到
// 检查见到距离是否符合
if(this.getDistance(this.order.contactAddressLatitud,this.order.contactAddressLongitud)>3){
this.$refs.uToast.show({
title: '签到失败,请点击异常签到处理或联系客服',
type: 'error'
})
return
}
data.remark = "123"
data.revert = true
}else if(this.submitType === 'orderAccept'){ // 接单
if(this.submitType === 'orderAccept'){ // 接单
data.orderId = this.order.orderId
}else if(this.submitType === 'orderGan'){ // 抢单
data.orderId = this.order.orderId
}else if(this.submitType === 'workerAppointment'){ // 预约
data.appointmentDatetime = ''
data.appointmentDatetimeRange = ''
if(!data.appointmentDatetime || !data.appointmentDatetimeRange ){
this.commonToast('请选择预约时间和时间段','waring')
return
}
}else if (this.submitType === 'maintainWorkerCheckin') { // 签到
// 检查见到距离是否符合
if(!this.isErrorSign){
if(this.getDistance(this.order.contactAddressLatitud,this.order.contactAddressLongitud)>3){
this.commonToast('签到失败,请点击异常签到处理或联系客服','error')
return
}
}
data.exception = this.isErrorSign
data.coordinate = this.dataValue ? this.dataValue[0]+','+this.dataValue[1]:''
data.url = this.errorSignUrl?this.errorSignUrl:''
}else if(this.submitType === 'toFilish'){ // 去完工
this.filish()
return
}
this.$u.api[this.submitType](data, this.order.orderId).then(res => {
if ((res.data.code!==undefined && res.data.code === 200)
......@@ -349,8 +435,7 @@
type: 'success',
url: 'pages/order/detail',
params: {
id: 1,
menu: 2
id: this.order.orderId
}
})
} else {
......@@ -363,6 +448,14 @@
}
})
},
commonToast(message,type,url,params){ // 统一得toast
this.$refs.uToast.show({
title: message,
type: type,
url: url,
params:params
})
},
isGan(){
this.centerButtonText = "已被抢"
this.submitType = ""
......@@ -382,6 +475,17 @@
+ "&orderServiceType=" + this.order.orderServiceType
})
},
rejectOrder() { // 拒单
// 检查是否可以拒单
var data={}
this.$u.api.checkRejectable(data).then(res => {
if (res.data.code === 200 && res.data.data === true) {
uni.navigateTo({
url: 'pages/order/refuse?orderId='+this.order.orderId
})
}
})
},
/**
* 获取当前位置的经纬度
*/
......@@ -443,13 +547,14 @@
this.btnClass='timeOut-btn'
self.$refs['uCountDown'].seconds += 2
}
},handleClick(){
},
handleClick(){
this.visibale = false
// 去完工
uni.navigateTo({
url: 'pages/photo/list'
})
}
}
}
};
</script>
......@@ -460,52 +565,57 @@
height: 100vh;
overflow: auto;
background-color: #F4F5F7;
background-image: linear-gradient(to top, #F4F5F7, #2272FF);
background-image: linear-gradient(to top, #F4F5F7 0%, #2272FF 50%);
background-size: 750rpx 600rpx;
background-repeat: no-repeat;
display: flex;
flex-direction: column;
.header {
padding: 12rpx 30rpx 40rpx 30rpx;
padding: 30rpx 30rpx 46rpx 30rpx;
display: flex;
justify-content: space-between;
align-items: center;
.title {
font-size: 40rpx;
font-weight: bold;
color: #FFFFFF;
line-height: 40rpx;
font-size:40rpx;
color:#fff;
}
.button {
text-align: center;
width: 106rpx;
height: 52rpx;
background: #FFFFFF;
border-radius: 40rpx;
font-size: 24rpx;
font-weight: 400;
color: #2272FF;
line-height: 52rpx;
color: #DEDEDE;
}
}
.content {
height: 2000rpx;
height: 100%;
border-radius: 12rpx;
overflow: auto;
margin-right: 30rpx;
margin-left: 30rpx;
.card {
background-color: #FFFFFF;
margin: 0 30rpx 20rpx 30rpx;
margin-bottom: 20rpx;
padding: 30rpx 30rpx 0 30rpx;
border-radius: 6px;
}
.base-item {
padding-bottom: 36rpx;
padding-bottom: 6rpx;
.top-item {
display: flex;
justify-content: space-between;
margin-bottom: 20rpx;
margin-bottom: 30rpx;
.left {
display: flex;
......@@ -515,16 +625,20 @@
text-align: center;
width: 84rpx;
height: 40rpx;
background-image: linear-gradient(270deg, #47ABFF 0%, #2272FF 100%);
border-radius: 8rpx;
font-size: 22rpx;
font-weight: 500;
color: #FFFFFF;
line-height: 40rpx;
background-image: linear-gradient(to right, #FF930D, #FFC174);
&.active {
background-image: linear-gradient(to right, #2272FF, #47ABFF);
}
}
.title {
margin-left: 30rpx;
margin-left: 20rpx;
height: 36rpx;
font-size: 36rpx;
font-weight: bold;
......@@ -552,7 +666,8 @@
font-weight: 400;
color: #333333;
line-height: 24rpx;
margin-top: 20rpx;
margin-bottom: 40rpx;
.left {
.address-txt {
margin-left: 8rpx;
......@@ -560,9 +675,33 @@
}
}
}
.read-more-toggle {
text-align: center;
color: #2272FF;
font-size: 26rpx;
margin-top: 30rpx;
padding-bottom: 30rpx;
}
.read-more-text {
padding-left: 8rpx;
}
.order-item-more {
font-size: 26rpx;
color: #333333;
.line-view {
background-color: #F4F5F7;
height: 2rpx;
margin-bottom: 20rpx;
}
}
.order-item {
padding-bottom: 34rpx;
padding-bottom: 6rpx;
.top-item {
display: flex;
......@@ -570,12 +709,19 @@
margin-bottom: 20rpx;
.title {
height: 36rpx;
font-size: 36rpx;
height: 32rpx;
font-size: 32rpx;
font-weight: bold;
color: #333333;
line-height: 36rpx;
}
}
.no-record-view {
font-size: 26rpx;
color: #333333;
margin-top: 30rpx;
}
.address-cell {
......@@ -593,7 +739,9 @@
}
}
.record-item {}
.record-item {
margin-bottom: 0rpx;
}
.appoint-item {
padding: 0;
......@@ -601,7 +749,8 @@
}
.toolbar {
margin-bottom: 104rpx;
margin-top: 30rpx;
margin-bottom: 44rpx;
display: flex;
justify-content: center;
align-items: center;
......@@ -615,10 +764,13 @@
height: 100rpx;
background: #929CB8;
border-radius: 100rpx;
font-size: 25rpx;
font-weight: bold;
align-items: center;
display: flex;
text-align: center;
align-items: center;
justify-content: center;
font-size: 20rpx;
color: #FFFFFF;
}
}
......@@ -628,16 +780,23 @@
margin-left: 74rpx;
margin-right: 74rpx;
.button {
.center-button-view {
width: 140rpx;
height: 140rpx;
border-radius: 100rpx;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
color: #FFFFFF;
font-size: 32rpx;
font-weight: bold;
.time-view {
display: flex;
font-size: 20rpx;
color: #FFFFFF;
}
}
.appoint-btn {
......@@ -646,13 +805,13 @@
}
.isGan-btn {
background: #93a7a6;
box-shadow: 2px 2px 20px 0px rgba(34, 114, 255, 0.3);
background: #D1D4D4;
box-shadow: 2px 2px 20px 0px rgba(181, 181, 181, 0.3);
}
.timeOut-btn {
background: #ff0000;
box-shadow: 2px 2px 20px 0px rgba(34, 114, 255, 0.3);
background: #e86552;
box-shadow: 2px 2px 20px 0px rgba(232, 101, 82, 0.3);
}
}
......@@ -663,12 +822,17 @@
.button {
width: 100rpx;
height: 100rpx;
background: #d99100;
background: #FF930D;
border-radius: 100rpx;
font-size: 25rpx;
font-size: 20rpx;
font-weight: bold;
align-items: center;
display: flex;
color: #FFFFFF;
justify-content: center;
&.active {
background-color: #D1D4D4;
}
}
}
}
......@@ -681,7 +845,8 @@
font-weight: 400;
color: #333333;
line-height: 48rpx;
margin-bottom: 30rpx;
margin-bottom: 10rpx;
text-align: left;
}
.between-cell {
......
......@@ -20,14 +20,15 @@
<u-tabs
:list="tabList"
:current="curTab"
height="80"
height="60"
gutter="89"
bar-height="4"
bar-width="44"
bg-color="none"
active-color="#FFFFFF"
inactive-color="#FFFFFF"
inactive-color="#DEDEDE"
font-size="32"
bold
@change="changeTab"
></u-tabs>
</view>
......@@ -35,6 +36,7 @@
<!-- <view class="con-box">
</view> -->
<view class="content-view">
<view class="con-box">
<view class="title">{{feedback.own.title}}</view>
<view class="u-flex u-flex-wrap">
......@@ -43,7 +45,7 @@
:key="index"
@click="changeOwn(index)"
:class="{'txt-item':true,'active': (trace.reasonRelegation == index)}">
<text class="txt">{{index}}</text>
<text class="txt">{{item}}</text>
</view>
</view>
<u-gap height="30"></u-gap>
......@@ -53,21 +55,27 @@
v-for="(txt, index) in options[curTab][trace.reasonRelegation]"
:key="index"
@click="changeType(txt)"
:class="{'txt-item':true,'active': (trace.reason == txt)}">
:class="{'txt-item':true,'active': (trace.reason == txt)}" style="width: 306rpx;margin-right: 18rpx">
<text class="txt">{{txt}}</text>
</view>
</view>
<u-input v-show="showRemark" v-model="trace.remark" class="textarea" height="156" type="textarea" placeholder="请补充详细说明,以便于记录您的接单信用分"></u-input>
<view class="input-view" v-show="showRemark">
<u-input v-model="trace.remark" class="textarea" height="156" type="textarea" placeholder="请补充详细说明,以便于记录您的接单信用分"></u-input>
</view>
</view>
<view class="time-view">
<appoint-time :dateList="dateList" :title="appointTitle" :timeList="timeList" @dateChange="dateChange" @timeChange="timeChange" @weekChange="weekChange"></appoint-time>
</view>
</view>
<appoint-time @dateChange="dateChange" @timeChange="timeChange" @weekChange="weekChange"></appoint-time>
</view>
<view class="u-m-60">
<button class="btn" @click="submitForm" :loading="submiting" :disabled="disabledSubmit">确定</button>
<view class="bottom-view">
<button class="btn, bottom-btn" @click="submitForm" :loading="submiting" :disabled="disabledSubmit"><text class="button-text">确定</text></button>
</view>
</view>
</template>
<script>
let now = Date.now()
import appointTime from '@/components/appoint/appoint-time.vue'
export default {
data() {
......@@ -76,6 +84,26 @@
categoryId: null,
showRemark: false,
submiting: false,
dateList: [
{day: now, timeRange: []},
{day: now + (1*86400000), timeRange: []},
{day: now + (2*86400000), timeRange: []},
{day: now + (3*86400000), timeRange: []},
{day: now + (4*86400000), timeRange: []},
{day: now + (5*86400000), timeRange: []},
{day: now + (6*86400000), timeRange: []},
],
timeList: [
{"name":"06:00-08:00","pkey":"appointment_range_8","disabled":false},
{"name":"08:00-10:00","pkey":"appointment_range_10","disabled":false},
{"name":"10:00-12:00","pkey":"appointment_range_12","disabled":false},
{"name":"12:00-14:00","pkey":"appointment_range_14","disabled":false},
{"name":"14:00-16:00","pkey":"appointment_range_16","disabled":false},
{"name":"16:00-18:00","pkey":"appointment_range_18","disabled":false},
{"name":"18:00-20:00","pkey":"appointment_range_20","disabled":false},
{"name":"20:00-22:00","pkey":"appointment_range_22","disabled":false},
{"name":"22:00-24:00","pkey":"appointment_range_24","disabled":false}
],
background: {
backgroundColor: 'none',
},
......@@ -96,7 +124,7 @@
config: null,
options: [],
trace: {
reasonType: '', // 反馈类型
reasonType: '报单', // 反馈类型
reasonRelegation: '', // 反馈归属
reason: '', // 反馈原因
appointmentDatetime: null, // 预约时间
......@@ -115,7 +143,6 @@
}
},
computed: {
disabledSubmit() {
let self = this
if(self.trace.reasonType && self.trace.reasonType == '报备'){
......@@ -132,8 +159,12 @@
return true
},
appointTitle() {
return this.feedback.appoint[this.trace.reasonType]
},
},
async onLoad(e) {
this.$u.vuex('vuex_token', 'RTOKEN7493e6defc2f1a77782f105dc297a9366763fec5');
this.orderId = 1
this.categoryId = 88
if(e) {
......@@ -144,9 +175,12 @@
title: "数据加载中",
mask: true
})
this.loadCalendar()
this.loadTimerange()
await this.initPageData()
},
methods: {
/* 初始化页面数据 */
async initPageData() {
let self = this
let params = {categoryId: self.categoryId}
......@@ -158,6 +192,7 @@
}
uni.hideLoading()
},
/* 组装参数 */
buildConfig() {
let self = this
if(self.config) {
......@@ -169,6 +204,7 @@
})
}
},
/* 初始化参数 */
initParams() {
let self = this
if(self.config) {
......@@ -188,6 +224,32 @@
}
}
},
/* 加载日历数据 */
async loadCalendar() {
let self = this
let params = {
num: 1
}
let res = await this.$u.api.workerCalendar(params)
if(res && res.code == 200) {
self.dateList = res.data
}
},
/* 加载预约时间段 */
async loadTimerange() {
let self = this
let res = await this.$u.api.openTimerange()
if(res && res.code == 200) {
let list = res.data
list.map((item, index) => {
item.disabled = false
})
self.timeList = list
}
},
/**
* 切换tab项
*/
......@@ -212,18 +274,54 @@
weekChange(data){
// 点击下一周
console.log(data,'week-data')
if (data && data.time) {
let num = data.num
let time = data.time
if (num == 0) {
this.dateList = [
{day: time, timeRange: []},
{day: time + (1*86400000), timeRange: []},
{day: time + (2*86400000), timeRange: []},
{day: time + (3*86400000), timeRange: []},
{day: time + (4*86400000), timeRange: []},
{day: time + (5*86400000), timeRange: []},
{day: time + (6*86400000), timeRange: []},
]
} else {
this.dateList = [
{day: time, timeRange: []},
{day: time + (1*86400000), timeRange: []},
{day: time + (2*86400000), timeRange: []},
{day: time + (3*86400000), timeRange: []},
{day: time + (4*86400000), timeRange: []},
{day: time + (5*86400000), timeRange: []},
]
}
}
},
dateChange(data){
debugger
// 点击日期选择
console.log(data,'week-data')
let self = this
if(self.trace.reasonType == '报备') {
self.trace.appointmentDatetime = null
self.trace.nextTraceDatetime = data.item.day
self.timeList.map((item, index) => {
item.disabled = false
})
} else if(self.trace.reasonType == '改约') {
self.trace.appointmentDatetime = data.item.day
self.trace.nextTraceDatetime = null
self.timeList.map((item, index) => {
if(data.item.timeRange.indexOf(item.pkey) > -1) {
item.disabled = true
} else {
item.disabled = false
}
})
}
},
......@@ -257,11 +355,13 @@
height: 100vh;
overflow: auto;
background-color: #F4F5F7;
background-image: linear-gradient(to top, #F4F5F7 0%, #2272FF 100%);
background-image: linear-gradient(to top, #F4F5F7 0%, #2272FF 50%);
background-size: 750rpx 600rpx;
background-repeat: no-repeat;
}
.feedback-box {
display: flex;
flex-direction: column;
.header {
padding: 12rpx 30rpx 40rpx 30rpx;
display: flex;
......@@ -280,9 +380,43 @@
.top-tab{
text-align: center;
}
.content {
display: flex;
flex-direction: column;
overflow: hidden;
margin-bottom: 188rpx;
.content-view {
height: 100%;
border-radius: 12rpx;
overflow: auto;
margin-top:30rpx;
.time-view {
border-radius: 12rpx;
background-color: #FFFFFF;
padding-bottom: 20rpx;
}
}
}
.bottom-view {
position: fixed;
bottom: 44rpx;
width: 100%;
}
.bottom-btn {
height: 104rpx;
width: 600rpx;
display: flex;
align-items: center;
justify-content: center;
.button-text {
font-size: 32rpx;
font-weight: bold;
}
}
.con-box{
margin-top:30rpx;
padding: 30rpx 30rpx 28rpx 30rpx;
padding: 30rpx 30rpx 8rpx 30rpx;
border-radius: 12rpx;
background-color: #FFFFFF;
.title{
......@@ -293,28 +427,39 @@
}
&>.u-flex{
margin-top:40rpx;
margin-right:-20rpx;
margin-right:-24rpx;
.txt-item{
border-radius: 12rpx;
padding:24rpx 38rpx;
min-width: 196rpx;
width: 196rpx;
height: 72rpx;
text-align: center;
margin-right: 20rpx;
margin-right: 22rpx;
margin-bottom: 20rpx;
background-color: #F4F5F7;
&.active{
background-color: #2272FF;
.txt{
color: #fff;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
}
}
}
.txt{
display:block;
font-size: 26rpx;
line-height: 26rpx;
color: #333;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.input-view {
margin-bottom: 24rpx;
}
.textarea{
......
......@@ -83,10 +83,13 @@
loaded: false
};
},
onLoad() {
onLoad() {
this.getLocation();
this.getOrderCount();
// this.getOrderCount();
this.getOrderList(0);
},
onShow() {
this.getOrderCount()
},
computed: {
subList() {
......@@ -107,7 +110,7 @@
'waitAppointment': 0, // 待预约、
'waitCheckIn': 1, // 待签到、
'waitFinish': 2, // 待完工、
'review': 3, // 审核中、
'audit': 3, // 审核中、
'exception': 4, // 异常单、
'finish': 5, //已完工
}
......@@ -118,7 +121,7 @@
0: 'waitAppointment',
1: 'waitCheckIn',
2: 'waitFinish',
3: 'review',
3: 'audit',
4: 'exception',
5: 'finish'
}
......@@ -134,7 +137,7 @@
this.pageNumber = 0
this.orderList = []
this.loadStatus = 'loading'
this.getOrderList(index === 0 ? 0 : 5)
this.getOrderList(index === 0 ? this.currentIndex : 5)
},
// tab栏切换
change(index) {
......@@ -187,8 +190,8 @@
/*↓↓↓↓↓↓↓↓↓↓测试数据↓↓↓↓↓↓↓↓↓↓*/
res.data.type = self.orderType
if (res.data.list) {
res.data.total = 15
if (res.data.list.length == 0 && res.data.total > 0) {
if (res.data.list.length == 0 && res.data.total > 0) {
res.data.total = 15
res.data.list = [{
orderServiceType: '安装', // 服务类型:安装、维修
categoryName: '充电桩', // 品类:充电桩
......@@ -208,13 +211,13 @@
auditResults: {}, // 审核结果
orderBusinessType: 'R', // 业务类型 R 为抢单
orderId:'1100000216'
}]
}]
res.data.list = [...res.data.list, ...res.data.list, ...res.data.list, ...res.data
.list,
...res.data.list, ...res.data.list, ...res.data.list, ...res.data.list, ...res
.data.list, ...res.data.list
]
}
res.data.list = [...res.data.list, ...res.data.list, ...res.data.list, ...res.data
.list,
...res.data.list, ...res.data.list, ...res.data.list, ...res.data.list, ...res
.data.list, ...res.data.list
]
}
/*↑↑↑↑↑↑↑↑↑↑测试数据↑↑↑↑↑↑↑↑↑↑↑↑↑*/
......@@ -255,7 +258,9 @@
item.count = res.data.exceptionCount
}
})
}
}
// 修改tab总数
// ...
} else {
console.log(res.message, "获取订单数量失败!");
}
......
<!-- 过程反馈 -->
<template>
<view class="refuse-box bg">
<u-navbar back-icon-color="#FFFFFF" :background="background" title="拒单" title-color="#fff" :border-bottom="false"></u-navbar>
<u-navbar back-icon-color="#FFFFFF" :background="background" title-color="#fff" :border-bottom="false"></u-navbar>
<view class="title">拒单说明</view>
<view class="content">
<view class="con-box">
......@@ -17,22 +17,26 @@
</view>
</view>
</view>
<view class="con-box">
<view class="tit u-m-b-40">补充说明</view>
<u-input v-model="formData.remark" class="textarea" height="156" type="textarea" placeholder="请补充详细说明,以便于记录您的接单信用分"></u-input>
<view class="con-box" style="padding-top: 10rpx;">
<view class="tit u-m-b-20">补充说明</view>
<u-input v-model="formData.remark" class="textarea" height="156" type="textarea" placeholder="请补充详细说明,以便于记录您的接单信用分" :clearable="false"></u-input>
</view>
</view>
<view class="u-m-60">
<button :loading="submiting" :disabled="disabledSubmit" class="btn" @click="submitForm">确定</button>
<view class="bottom-btn-view">
<button :loading="submiting" :disabled="disabledSubmit" class="btn bottom-btn" @click="handleClickSubmit"><text class="button-text">提交</text></button>
</view>
<PopView title="拒单提示" message="确定“拒单”操作,将影响对您的派单频率,\n甚至进入黑名单,请谨慎操作"
:visible.sync="visibale" :count="count" @click="handleClick" buttonText="确定"/>
</view>
</template>
<script>
import PopView from "@/components/popView/index.vue"
export default {
data() {
return {
visibale: false,
orderId: '',
submiting: false,
background: {
......@@ -46,6 +50,7 @@
rejectReason: '',
remark: ''
},
count: 0, // 剩余次数
};
},
computed: {
......@@ -53,7 +58,9 @@
return !this.formData.rejectReason
}
},
components:{},
components:{
PopView
},
onLoad(e) {
this.orderId = 111
if(e && e.orderId) {
......@@ -64,6 +71,21 @@
changeReason(reason) {
this.formData.rejectReason = reason
},
handleClickSubmit() {
if (this.count > 0) {
this.visibale = true
} else {
uni.showToast({
icon: 'none',
title: '本月无拒单机会,请联系客服',
})
}
},
handleClick() {
this.visibale = false
this.submitForm()
},
async submitForm() {
let self = this
self.submiting = true
......@@ -88,13 +110,13 @@
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.bg {
width: 750rpx;
height: 100vh;
overflow: auto;
background-color: #F4F5F7;
background-image: linear-gradient(to top, #F4F5F7 0%, #2272FF 100%);
background-image: linear-gradient(to top, #F4F5F7 0%, #2272FF 50%);
background-size: 750rpx 600rpx;
background-repeat: no-repeat;
}
......@@ -107,6 +129,7 @@
border-radius: 12rpx;
padding-bottom: 60rpx;
background-color: #fff;
min-height: 800rpx;
}
.con-box{
padding: 30rpx;
......@@ -123,10 +146,11 @@
margin-right:-20rpx;
.txt-item{
border-radius: 12rpx;
padding:24rpx 38rpx;
min-width: 196rpx;
padding-top:24rpx;
padding-bottom: 24rpx;
width: 196rpx;
text-align: center;
margin-right: 20rpx;
margin-right: 22rpx;
margin-bottom: 20rpx;
background-color: #F4F5F7;
&.active{
......@@ -193,4 +217,21 @@
margin-right: 10rpx;
color:#FA5A49
}
.bottom-btn-view {
width: 100%;
padding: 0 80rpx;
position: absolute;
bottom: 44rpx;
.bottom-btn {
height: 104rpx;
display: flex;
align-items: center;
justify-content: center;
.button-text {
font-size: 32rpx;
font-weight: bold;
}
}
}
</style>
<template>
<view class="container u-row-between" v-if="info">
<Settle :index="pageIndex">
<Settle :index="pageIndex" :type="1">
<view class="content-view">
<!-- <view style="min-height: 120rpx;" v-if="status == 8"></view> -->
<view class="u-flex u-row-center">
......
......@@ -470,7 +470,7 @@
}
.item {
display: flex;
padding: 28rpx 30rpx;
padding: 28rpx 0rpx;
width: 100%;
font-size: 32rpx;
color: #333;
......
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