Commit 7f66c1bb authored by Morson's avatar Morson
parents dc1fd77c eb1f3bb4
......@@ -48,7 +48,7 @@ let orderApiFun = function(vm){
/**
* 查询工单操作记录列表接口
*/
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/V2/'+params.orderId, params);
/**
* 接单
......
......@@ -2,7 +2,7 @@
<template>
<view :style="{'width': fieldsWidth}">
<u-input :type="type" class="input-item" v-model="dataValue" @input="valueChange" :placeholder="placeholder" :placeholder-style="placeholderStyle"
:custom-style="customStyle" :clearable="false" :border="border" border-color="#ECECEC"/>
:custom-style="customStyle" :clearable="false" :border="border" border-color="#ECECEC" :maxlength="maxlength"/>
</view>
</template>
......@@ -23,18 +23,26 @@
// }
},
data() {
return {}
return {
maxlength: 140,
}
},
computed: {
type() {
let ty = this.item.fieldsType.toLocaleLowerCase()
if (this.item && ty == 'password') {
return this.item.fieldsType
}else if (this.item && ty == 'text') {
return 'textarea'
}else {
return 'text'
if (this.item.fieldsId == 200) {
this.maxlength = 9
return 'digit'
} else {
if (this.item && ty == 'password') {
return this.item.fieldsType
}else if (this.item && ty == 'text') {
return 'textarea'
} else {
return 'text'
}
}
},
fieldsWidth() {
return this.item.fieldsWidth ? (this.item.fieldsWidth + 'rpx') : '100%'
......
......@@ -186,8 +186,9 @@
tagText() {
return this.timeout ? '超' : '剩'
},
timeText() {
return this.orderType == 4 ? this.orderData.submissionTime : this.orderData.auditDatetime
timeText() {
let time = this.orderType == 4 ? this.orderData.orderFinishDatetime : this.orderData.auditDatetime
return this.$u.timeFormat(time, 'yyyy.mm.dd hh:MM:ss')
},
timeTitle() {
return this.orderType == 4 ? '提交时间:' : '审核时间:'
......@@ -195,8 +196,8 @@
showReason() {
return this.orderType == 5
},
showDistance() {
return this.orderType == 0 && this.location.length >= 2
showDistance() {
return this.orderType == 0 && this.location.length >= 2 && (this.orderData.contactAddressLatitud || this.orderData.contactAddressLongitud)
},
types() {
return {
......@@ -210,7 +211,6 @@
}
},
orderDistance() {
console.log('orderData.contactAddressLatitud:',this.orderData.contactAddressLatitud,'orderData.contactAddressLongitud',this.orderData.contactAddressLongitud, 'location:',this.location[0], this.location[1])
return this.distance(this.orderData.contactAddressLatitud,this.orderData.contactAddressLongitud, this.location[0], this.location[1])
}
},
......@@ -280,27 +280,29 @@
}
return address
},
/**
* echo distance(116.3896,39.91917,116.3940,39.91726);
* 计算两点之间直线距离
* @param float $lon1 经度
* @param float $lat1 维度
* @param float $lon2 经度
* @param float $lat2 维度
* @return float 浮点数
*/
distance(la1, lo1, la2, lo2) {
var La1 = la1 * Math.PI / 180.0;
var La2 = la2 * Math.PI / 180.0;
var La3 = La1 - La2;
var Lb3 = lo1 * Math.PI / 180.0 - lo2 * Math.PI / 180.0;
var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(La3 / 2), 2), Math.cos(La1) * Math.cos(La2) * Math.pow(
Math.sin(Lb3 / 2), 2)));
s = s * 6378.137; //地球半径
s = Math.round(s * 10000) / 10000;
// console.log("计算结果",s,'KM');
return s ? s.toFixed(2) : 0;
},
/**
* echo distance(116.3896,39.91917,116.3940,39.91726);
* 计算两点之间直线距离
* @param float $lon1 经度
* @param float $lat1 维度
* @param float $lon2 经度
* @param float $lat2 维度
* @return float 浮点数
*/
distance(lat1, lng1, lat2, lng2) {
var radLat1 = this.Rad(lat1);
var radLat2 = this.Rad(lat2);
var a = radLat1 - radLat2;
var b = this.Rad(lng1) - this.Rad(lng2);
var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a/2),2) +
Math.cos(radLat1)*Math.cos(radLat2)*Math.pow(Math.sin(b/2),2)));
s = s *6378.137 ;// EARTH_RADIUS;
s = Math.round(s * 10000)/10000 //输出为米
return Number(s?s.toFixed(2):0);
},
Rad(d){
return d * Math.PI / 180.0;//经纬度转换成三角函数中度分表形式。
},
}
}
</script>
......
......@@ -11,11 +11,23 @@
customStyle: {
type: String,
default: 'background-color: #FFFFFF'
},
type: { // 图片
type: String,
default: 'white',
}
},
computed: {
wudingdanImage() {
return process.uniEnv.qn_base_url + 'wudingdan.png'
wudingdanImage() {
var name = 'wudingdan.png'
switch(this.type) {
case 'black':
name = "zwdd.png"
break
default:
break
}
return process.uniEnv.qn_base_url + name
}
}
}
......
......@@ -6,10 +6,11 @@
"versionCode" : "100",
"transformPx" : false,
"app-plus" : {
"optimization": {
"subPackages": true
},
"runmode" : "liberate", // 开启分包优化后,必须配置资源释放模式
"optimization" : {
"subPackages" : true
},
"runmode" : "liberate", // 开启分包优化后,必须配置资源释放模式
/* 5+App特有相关 */
"usingComponents" : true,
"splashscreen" : {
......@@ -68,7 +69,7 @@
"usingComponents" : true,
"permission" : {
"scope.userLocation" : {
"desc" : "需要获得位置权限以方便用户定位下单地址"
"desc" : "方便查看订单与你的距离"
}
}
},
......
......@@ -26,7 +26,8 @@
"path": "pages/index/learn",
"style": {
"navigationBarTitleText": "学习",
"navigationStyle":"custom"//隐藏系统导航栏
"navigationStyle":"custom",//隐藏系统导航栏
"disableScroll": true
}
},
{
......@@ -89,13 +90,15 @@
{
"path": "news-details",
"style": {
"navigationBarTitleText": ""
"navigationBarTitleText": "",
"navigationStyle":"default"
}
},
{
"path":"section",
"style" :{
"navigationBarTitleText": ""
"navigationBarTitleText": "",
"navigationStyle":"default"
}
},
{
......@@ -243,7 +246,8 @@
"navigationBarTitleText": "规范展示",
"navigationBarBackgroundColor":"#FFFFFF",
"backgroundColor":"#F4F5F7",
"navigationStyle": "custom" // 隐藏系统导航栏
"navigationStyle": "custom", // 隐藏系统导航栏
"disableScroll": true
}
}
]
......@@ -430,6 +434,11 @@
"name": "订单 - 过程反馈", //模式名称
"path": "pages/order/feedback", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
},
{
"name": "学习 - 首页", //模式名称
"path": "pages/index/learn", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
}
]
}
......
......@@ -115,8 +115,8 @@
computed: {
buttonStyle() {
return {
width: "400rpx",
height: "104rpx",
width: "300rpx",
height: "80rpx",
"font-size": "32rpx",
"font-weight": "bold",
};
......@@ -525,7 +525,7 @@
.tip-other {
font-size: 28rpx;
color: #666666;
margin-bottom: 20rpx;
margin-bottom: 30rpx;
}
.settle-button {}
......
......@@ -4,15 +4,13 @@
<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: 100%;padding-top: 30rpx;">
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height:796rpx;width:100%;" @scrolltolower="onreachBottom">
<u-tabs-swiper bg-color="#F4F5F7" inactive-color="#999999" font-size="28" ref="uTabs" :list="tabs"
:current="current" @change="tabsChange" :is-scroll="false" :bar-width="52" swiperWidth="750"></u-tabs-swiper>
<swiper class="swiper_group" :current="swiperCurrent" @animationfinish="animationfinish">
<swiper-item @touchmove.stop.prevent="stopTouchMove" v-show="current == 0">
<scroll-view scroll-y style="height:100%;width:100%;">
<view class="jf-currency-class">
<image :src="jianBianImg" mode="" class="current-img"></image>
<view class="class1" style="position: relative;" @click="goToPrint">
<image class="jf-img" :src="rule.pic" mode=""></image>
<view class="right u-padding-top-10 u-padding-bottom-14 jf-right">
......@@ -24,7 +22,7 @@
</view>
</scroll-view>
</swiper-item>
<swiper-item class="swiper-item">
<swiper-item @touchmove.stop.prevent="stopTouchMove" v-show="current == 1">
<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">
......@@ -33,155 +31,145 @@
<view class="news" v-html="item.body">
<u-parse :html="item.body"></u-parse>
</view>
<u-line color="#F4F5F7" class="content-line" />
<u-line color="#F4F5F7" />
<view class="notice-bottom">
<view class="notice-bottom-left">{{ item.create_at }}</view>
<view class="notice-bottom-right">查看详情</view>
</view>
</view>
<view v-shou="isLoadMore">
<view v-shou="isLoadMore" class="load-more">
<u-loadmore :status="loadStatus" />
</view>
</scroll-view>
</swiper-item>
<swiper-item class="swiper-item">
<swiper-item @touchmove.stop.prevent="stopTouchMove" v-show="current == 2">
<scroll-view scroll-y style="height:100%;width:100%;">
<view class="lean">
<view class="top">
<view class="title u-margin-top-10 u-margin-bottom-30">通用课程</view>
<view class="learn-currency-class">
<view class="learn-class1" @click=goPlay(courselist[0])>
<image class="learn-img" :src="courselist[0].pic" mode=""></image>
<image class="bofang" :src="bofang" mode=""></image>
<view class="learn-desc">
<view class="u-font-28 font-bold h68">
{{ courselist[0].title }}
</view>
<view class="u-font-20 learn-intro h48">
{{ courselist[0].desc }}
</view>
</view>
<view class="line-percent u-margin-top-35">
<u-line-progress active-color="#2979ff" :percent="courselist[0].percent"
:show-percent="false">
</u-line-progress>
<text class="font-default-color"
:class="{'font-active-color':courselist[0].percent}"
v-text="courselist[0].status"></text>
</view>
<view class="title u-margin-top-10 u-margin-bottom-30">通用课程</view>
<view class="learn-currency-class">
<view class="learn-class1" @click="goPlay(courselist[0])">
<image class="learn-img" :src="courselist[0].pic" mode=""></image>
<image class="bofang" :src="bofang" mode=""></image>
<view class="learn-desc">
<view class="u-font-28 font-bold h68">
{{ courselist[0].title }}
</view>
<view class="learn-class1 u-margin-left-30" @click=goPlay(courselist[1])>
<image class="learn-img" :src="courselist[1].pic" mode=""></image>
<image class="bofang" :src="bofang" mode=""></image>
<view class="learn-desc">
<view class="u-font-28 font-bold h68">
{{ courselist[1].title }}
</view>
<view class="u-font-20 learn-intro h48">
{{ courselist[1].desc }}
</view>
</view>
<view class="line-percent u-margin-top-35">
<u-line-progress active-color="#2979ff" :percent="courselist[1].percent"
:show-percent="false">
</u-line-progress>
<text class="font-default-color"
:class="{'font-active-color':courselist[1].percent}"
v-text="courselist[1].status"></text>
</view>
<view class="u-font-20 learn-intro h48">
{{ courselist[0].desc }}
</view>
</view>
<view class="title u-margin-top-50 u-margin-bottom-30">技能课程</view>
<view class="learn-currency-class u-margin-bottom-20">
<view class="learn-class1" @click=goPlay(courselist[2])>
<image class="learn-img" :src="courselist[2].pic" mode=""></image>
<image class="bofang" :src="bofang" mode=""></image>
<view class="learn-desc">
<view class="u-font-28 font-bold h68">
{{ courselist[2].title }}
</view>
<view class="u-font-20 learn-intro h48">
{{ courselist[2].desc }}
</view>
</view>
<view class="line-percent u-margin-top-35" style="display:flex;justify-content: space-between;">
<u-line-progress active-color="#2979ff" :percent="courselist[2].percent"
:show-percent="false">
</u-line-progress>
<text class="font-default-color"
:class="{'font-active-color':courselist[2].percent}"
v-text="courselist[2].status"></text>
</view>
<view class="line-percent u-margin-top-35">
<u-line-progress active-color="#2979ff" :percent="courselist[0].percent"
:show-percent="false">
</u-line-progress>
<text class="font-default-color" :class="{'font-active-color':courselist[0].percent}"
v-text="courselist[0].status"></text>
</view>
</view>
<view class="learn-class1 u-margin-left-30" @click="goPlay(courselist[1])">
<image class="learn-img" :src="courselist[1].pic" mode=""></image>
<image class="bofang" :src="bofang" mode=""></image>
<view class="learn-desc">
<view class="u-font-28 font-bold h68">
{{ courselist[1].title }}
</view>
<view class="u-font-20 learn-intro h48">
{{ courselist[1].desc }}
</view>
</view>
<view class="line-percent u-margin-top-35">
<u-line-progress active-color="#2979ff" :percent="courselist[1].percent"
:show-percent="false">
</u-line-progress>
<text class="font-default-color" :class="{'font-active-color':courselist[1].percent}"
v-text="courselist[1].status"></text>
</view>
</view>
</view>
<view class="title u-margin-top-30 u-margin-bottom-30">技能课程</view>
<view class="learn-currency-class u-margin-bottom-20" style="padding-bottom: 300rpx;">
<view class="learn-class1" @click="goPlay(courselist[2])">
<image class="learn-img" :src="courselist[2].pic" mode=""></image>
<image class="bofang" :src="bofang" mode=""></image>
<view class="learn-desc">
<view class="u-font-28 font-bold h68">
{{ courselist[2].title }}
</view>
<view class="u-font-20 learn-intro h48">
{{ courselist[2].desc }}
</view>
</view>
<view class="line-percent u-margin-top-35"
style="display:flex;justify-content: space-between;">
<u-line-progress active-color="#2979ff" :percent="courselist[2].percent"
:show-percent="false">
</u-line-progress>
<text class="font-default-color" :class="{'font-active-color':courselist[2].percent}"
v-text="courselist[2].status"></text>
</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="title u-margin-top-10 u-margin-bottom-30">通用认证</view>
<view class="currency-class">
<view class="class1" @click="aaa(0)">
<image class="img" :src="examList[0].pic" mode=""></image>
<view class="right">
<view class="u-font-32 font-bold">
{{ examList[0].title }}
</view>
<view class="u-font-24">
{{ examList[0].desc }}
</view>
<view class="u-font-24" style="display:flex;justify-content: space-between;">
<text class="font-color-999999">{{ examList[0].condition }}</text>
<text class="font-default-exam-color"
:class="{'font-active-color':examList[0].isComplete}">
{{ examList[0].status }}
</text>
</view>
</view>
<swiper-item @touchmove.stop.prevent="stopTouchMove" v-show="current == 3">
<scroll-view scroll-y style="height:100%;width:100%;">
<view class="title u-margin-top-10 u-margin-bottom-30">通用认证</view>
<view class="currency-class">
<view class="class1" @click="aaa(0)">
<image class="img" :src="examList[0].pic" mode=""></image>
<view class="right">
<view class="u-font-32 font-bold">
{{ examList[0].title }}
</view>
<view class="u-font-24">
{{ examList[0].desc }}
</view>
<view class="class1 u-margin-top-40" @click="aaa(1)">
<image class="img" :src="examList[1].pic" mode=""></image>
<view class="right">
<view class="u-font-32 font-bold">
{{examList[1].title}}
</view>
<view class="u-font-24">
{{ examList[1].desc }}
</view>
<view class="u-font-24" style="display:flex;justify-content: space-between;">
<text class="font-color-999999">{{ examList[1].condition }}</text>
<text class="font-default-exam-color"
:class="{'font-active-color':examList[1].isComplete}">
{{ examList[1].status }}</text>
</view>
</view>
<view class="u-font-24" style="display:flex;justify-content: space-between;">
<text class="font-color-999999">{{ examList[0].condition }}</text>
<text class="font-default-exam-color"
:class="{'font-active-color':examList[0].isComplete}">
{{ examList[0].status }}
</text>
</view>
</view>
<!-- <view class="title u-margin-top-50 u-margin-bottom-30">技能认证</view>
<view class="currency-class">
<view class="class1" @click="aaa(2)">
<image class="img" :src="examList[2].pic" mode=""></image>
<view class="right">
<view class="u-font-32 font-bold">
{{ examList[2].title }}
</view>
<view class="u-font-24">
{{ examList[2].desc }}
</view>
<view class="u-font-24" style="display:flex;justify-content: space-between;">
<text class="font-color-999999">{{ examList[2].condition }}</text>
<text class="font-default-exam-color"
:class="{'font-active-color':examList[2].isComplete}">
{{ examList[2].status }}</text>
</view>
</view>
</view>
<view class="class1 u-margin-top-40" @click="aaa(1)">
<image class="img" :src="examList[1].pic" mode=""></image>
<view class="right">
<view class="u-font-32 font-bold">
{{examList[1].title}}
</view>
<view class="u-font-24">
{{ examList[1].desc }}
</view>
</view> -->
<view class="u-font-24" style="display:flex;justify-content: space-between;">
<text class="font-color-999999">{{ examList[1].condition }}</text>
<text class="font-default-exam-color"
:class="{'font-active-color':examList[1].isComplete}">
{{ examList[1].status }}</text>
</view>
</view>
</view>
</view>
<!-- <view class="title u-margin-top-30 u-margin-bottom-30">技能认证</view>
<view class="currency-class">
<view class="class1" @click="aaa(2)">
<image class="img" :src="examList[2].pic" mode=""></image>
<view class="right">
<view class="u-font-32 font-bold">
{{ examList[2].title }}
</view>
<view class="u-font-24">
{{ examList[2].desc }}
</view>
<view class="u-font-24" style="display:flex;justify-content: space-between;">
<text class="font-color-999999">{{ examList[2].condition }}</text>
<text class="font-default-exam-color"
:class="{'font-active-color':examList[2].isComplete}">
{{ examList[2].status }}</text>
</view>
</view>
</view>
</view> -->
</scroll-view>
</swiper-item>
</swiper>
......@@ -189,10 +177,8 @@
</template>
<script>
import util from '@/utils/util.js'
var json = {
"dev": [
{
"dev": [{
"title": "服务规范",
"desc": "为用户提供更好服务,自己赚更多钱",
"percent": 0,
......@@ -201,7 +187,7 @@
"sectionId": ""
},
{
"title": "接单操作",
"title": "接单规范",
"desc": "快速学习,使用APP 接单、抢单",
"percent": 0,
"status": "",
......@@ -217,8 +203,7 @@
"sectionId": ""
}
],
"test": [
{
"test": [{
"title": "服务规范",
"desc": "为用户提供更好服务,自己赚更多钱",
"percent": 0,
......@@ -227,7 +212,7 @@
"sectionId": ""
},
{
"title": "接单操作",
"title": "接单规范",
"desc": "快速学习,使用APP 接单、抢单",
"percent": 0,
"status": "",
......@@ -243,8 +228,7 @@
"sectionId": ""
}
],
"prod": [
{
"prod": [{
"title": "服务规范",
"desc": "为用户提供更好服务,自己赚更多钱",
"percent": 0,
......@@ -252,7 +236,7 @@
"sectionId": ""
},
{
"title": "接单操作",
"title": "接单规范",
"desc": "快速学习,使用APP 接单、抢单",
"percent": 0,
"status": "",
......@@ -267,10 +251,9 @@
}
]
}
var examJson = {
"dev": [
{
"dev": [{
title: '服务规范',
desc: '通过本认证,是接单的必要条件',
condition: '随机20题,及格20题',
......@@ -293,8 +276,7 @@
isComplete: false
}
],
"test": [
{
"test": [{
title: '服务规范',
desc: '通过本认证,是接单的必要条件',
condition: '随机10题,及格10题',
......@@ -317,8 +299,7 @@
isComplete: false
}
],
"prod": [
{
"prod": [{
title: '服务规范',
desc: '通过本认证,是接单的必要条件',
condition: '随机20题,及格20题',
......@@ -342,9 +323,8 @@
}
]
}
// import aJson from "@/static/json/learn.json";
let env = process.uniEnv.node_env;
let courseListJson = json.[env];
let courseListJson = json. [env];
let examListJson = examJson[env];
export default {
......@@ -437,23 +417,21 @@
// isComplete: false
// }
],
loadStatus: "loading", //加载样式:loadMore-加载前样式,loading-加载加载中样式,nomore-没有数据样式
isLoadMore: false, //是否加载中
loadStatus: "loading",
isLoadMore: false,
exam: null,
jianBianImg: process.uniEnv.qn_base_url + "jianbian@3x_bak1.png"
};
},
onLoad(param) {
console.log('--node_env--');
console.log(process.uniEnv.node_env);
try{
if(param.tabs){
try {
if (param.tabs) {
this.current = param.tabs;
this.swiperCurrent = param.tabs;
}
}catch(e){}
// this.getList();
// this.getCourseList();
// this.getUserExamInfo();
}
} catch (e) {}
},
computed: {
bannerImage() {
......@@ -461,10 +439,13 @@
},
},
onShow: function() {
// this.onLoad();
this.tabsChange(this.current);
console.log('--返回也可以执行--');
},
methods: {
stopTouchMove() {
return false;
},
getList() {
this.$u.api
.getTrainingNoticeList(this.params)
......@@ -473,8 +454,9 @@
if (res.code == 200) {
if (res.data) {
let length = res.data.length;
for(let i = 0;i<length;i++){
res.data[i].create_at = this.timeFormat(res.data[i].create_at, 'yyyy.MM.dd hh:mm');
for (let i = 0; i < length; i++) {
res.data[i].create_at = this.timeFormat(res.data[i].create_at,
'yyyy.MM.dd hh:mm');
}
this.list = this.list.concat(res.data);
......@@ -514,25 +496,23 @@
},
timeFormat(time, format, fromMysql = true) {
let rate = fromMysql ? 1000 : 1;
let dataFmt = format || 'yyyy-MM-dd hh:mm:ss' // 需要格式化的规则
time = typeof(time) == 'number' ? time : new Date(time * rate) // 处理传入的time
let fmt = {
'y+': time.getFullYear(), // 年份
'M+': time.getMonth() + 1, // 月份
'd+': time.getDate(), // 日
'h+': time.getHours(), // 小时
'm+': time.getMinutes(), // 分钟
's+': time.getSeconds() // 秒
}
for(let i in fmt){
if (new RegExp('(' + i + ')').test(dataFmt)){
dataFmt = dataFmt .replace(RegExp.$1, fmt[i].toString().length <= 1 ? '0' + fmt[i] : fmt[i] )
let dataFmt = format || 'yyyy-MM-dd hh:mm:ss' // 需要格式化的规则
time = typeof(time) == 'number' ? time : new Date(time * rate) // 处理传入的time
let fmt = {
'y+': time.getFullYear(), // 年份
'M+': time.getMonth() + 1, // 月份
'd+': time.getDate(), // 日
'h+': time.getHours(), // 小时
'm+': time.getMinutes(), // 分钟
's+': time.getSeconds() // 秒
}
for (let i in fmt) {
if (new RegExp('(' + i + ')').test(dataFmt)) {
dataFmt = dataFmt.replace(RegExp.$1, fmt[i].toString().length <= 1 ? '0' + fmt[i] : fmt[i])
}
}
return dataFmt;
}
return dataFmt;
},
getTypeName(percent) {
if (percent == 0) {
......@@ -588,11 +568,6 @@
break;
}
},
//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);
......@@ -641,7 +616,7 @@
.then((res) => {
if (res.code == 200) {
this.examList[i].examId = res.data.id;
this.examList[i].examStatus = res.data.examStatus;//i;//
this.examList[i].examStatus = res.data.examStatus; //i;//
let examResult = res.data.examLevelResult;
this.examList[i].status = examResult != '' ? examResult : '未通过';
// examStatus 用户考试状态 0考试中 1考试完成 2未参与
......@@ -687,21 +662,21 @@
var examInfo = this.examList[index];
if (examInfo.examStatus == 0) {
console.log("这是试卷id", examInfo.id);
wx.navigateTo({
url: "/pages/learn/answer?examId=" + examInfo.id,
});
} else if (examInfo.examStatus == 1) {
// debugger;return;
// examInfo.status = '通过';
if(examInfo.status == '通过'){
if (examInfo.status == '通过') {
wx.navigateTo({
url: "/pages/learn/exam-pass?userExamId=" + examInfo.examId,
});
}else{
} else {
wx.navigateTo({
url: "/pages/learn/result?userExamId=" + examInfo.examId + "&examId=" + examInfo.id,
});
url: "/pages/learn/result?userExamId=" + examInfo.examId + "&examId=" + examInfo.id,
});
}
} else if (examInfo.examStatus == 2) {
wx.navigateTo({
......@@ -719,25 +694,18 @@
bbb(e) {
var news = {
body: e.body,
id: e.id,
level: e.level,
title: e.title,
title: e.title
};
// console.log(news)
setTimeout(() => {
uni.$emit("news", news);
console.log("发送数据");
}, 1000);
uni.navigateTo({
url: "/pages/learn/news-details",
wx.navigateTo({
url: '/pages/learn/news-details',
success: function(res) {
res.eventChannel.emit('acceptDataFromLearn', news)
}
});
console.log("跳转结束11111111");
},
},
};
</script>
<style>
.study {
height: 100vh;
......@@ -757,7 +725,7 @@
margin-top: 10rpx;
}
/* //交付规范 */
/* 交付规范 */
.standard {
width: 690rpx;
height: 180rpx;
......@@ -772,7 +740,7 @@
background-color: #FFFFFF;
}
/* //培训通知 */
/* 培训通知 */
.notice {
/* border: #808080 solid 2rpx; */
width: 100%;
......@@ -798,18 +766,17 @@
font-size: 24rpx;
color: #666666;
line-height: 34rpx;
margin-bottom: 20rpx;
}
/* //在线学习 */
/* 在线学习 */
.currency-class {
width: 100%;
/* height: 340rpx; */
background: #ffffff;
padding: 30rpx;
/* margin-bottom: 11px; */
border-radius: 12rpx;
}
.learn-currency-class {
width: 100%;
border-radius: 12rpx;
......@@ -819,10 +786,9 @@
.jf-currency-class {
width: 100%;
height: 180rpx;
background: #ffffff;
position: absolute;
border-radius: 12rpx;
margin-top: 60rpx;
background: #f4f5f7 url(/static/photo/jianbian@3x.png) no-repeat;
}
.title {
......@@ -839,7 +805,7 @@
-webkit-justify-content: space-between;
justify-content: space-between;
}
.learn-class1 {
display: -webkit-box;
display: -webkit-flex;
......@@ -858,12 +824,12 @@
width: 160rpx;
height: 120rpx;
}
.learn-img {
width: 330rpx;
height: 194rpx;
}
.jf-img {
width: 160rpx;
height: 200rpx;
......@@ -902,19 +868,18 @@
}
swiper {
height: 691rpx;
height: 920rpx;
}
.line-percent {
display: flex;
justify-content: space-between;
// line-height: 24rpx;
font-size: 24rpx;
color: #999999;
margin: 20rpx;
margin-top: 25rpx;
}
.jf-line {
display: flex;
justify-content: space-between;
......@@ -955,12 +920,6 @@
color: #999999;
}
.content-line {
margin-top: 30rpx;
}
.standard {}
.standard-img {
width: 160rpx;
height: 120rpx;
......@@ -976,30 +935,29 @@
font-weight: bold;
}
.jf-right {
padding-left: 190rpx;
width: 460rpx;
color: #ffffff;
}
.notice-bottom {
margin-top: 30rpx;
margin-top: 20rpx;
display: flex;
}
.notice-bottom-left {
/* margin-left: 30rpx; */
font-size: 24rpx;
color: #999999;
}
.notice-bottom-right {
margin-left: 330rpx;
font-size: 24rpx;
color: #2272FF;
}
.bofang {
width: 60rpx;
height: 60rpx;
......@@ -1007,7 +965,7 @@
left: 130rpx;
top: 70rpx;
}
.learn-desc {
height: 138rpx;
margin-top: -10rpx;
......@@ -1015,16 +973,25 @@
padding-left: 20rpx;
padding-right: 20rpx;
}
.learn-intro {
color: #999999;
margin-top: 20rpx;
font-size: 20rpx;
}
.h48 {
height: 48rpx;
}
.current-img {
width: 100%;
height: 100%;
position: absolute;
}
.h68 {
// height: 68rpx;
}
.h48 {height: 48rpx;}
.load-more {
padding-top: 50rpx;
padding-bottom: 200rpx;
}
</style>
......@@ -25,7 +25,7 @@
scroll-y="true" refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100"
refresher-background="#F4F5F7" @refresherpulling="triggered = true" @refresherrefresh="onRefresh"
@refresherrestore="onRestore" @refresherabort="onAbort">
<NoOrder v-if="noMore" customStyle="margin-top: 100rpx;background-color: #F4F5F7" />
<NoOrder v-if="noMore" type="black" customStyle="margin-top: 100rpx;background-color: #F4F5F7" />
<template v-else>
<view v-for="(item, index) in orderList" :key="item.orderId">
<OrderCell :orderData="item" :type="orderType" :location="dataValue" @click="handleClick(item)"
......@@ -256,6 +256,9 @@
if (res.data.type != self.orderType) return
self.triggered = false;
self._freshing = false;
if (self.pageNumber == 1) {
self.orderList = []
}
if (res.data.list) {
self.orderList.push(...res.data.list)
if (self.list[self.types[res.data.type]]) {
......
<template>
<view>
<view class="title">
{{newsInfo.title}}
</view>
<view>
<view class="title">
{{ title }}
</view>
<view class="u-content">
<u-parse :html="newsInfo.body" :tag-style="style"></u-parse>
</view>
</view>
<u-parse :html="body" :tag-style="style"></u-parse>
</view>
</view>
</template>
<script>
export default {
data() {
return {
banner:{},
obj:{
},
newsInfo: {
title: '',
body: ''
}
}
},
methods: {
},
onLoad() {
},
onShow(){
uni.$on('news',(news)=>{
this.newsInfo = news;
console.log(news,'news')
})
},
onLoad() {
this.$u.mpShare.path = ''
},
}
export default {
data() {
return {
title: '',
body: ''
}
},
onLoad() {
var that = this;
const eventChannel = this.getOpenerEventChannel()
eventChannel.on('acceptDataFromLearn', function(data) {
that.title = data.title;
that.body = data.body;
})
this.$u.mpShare.path = ''
},
}
</script>
<style>
.title{
.title{
font-size: 32rpx;
font-weight: bold;
margin-left: 30rpx;
margin-top: 30rpx;
}
.content{
}
.u-content{
font-size: 24rpx;
line-height: 36rpx;
color: #666666;
margin-left: 30rpx;
margin-top: 30rpx;
}
margin-top: 30rpx;
margin-right: 30rpx;
}
</style>
......@@ -4,7 +4,7 @@
<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>
@ready="playerReadied" @timeupdate="onPlayerTimeupdate($event)" autoplay="true" controls></video></view>
<view class="title-content">
<view class="item-content">
<view class="item-st">
......@@ -18,23 +18,28 @@
<view class="learn-view" v-if="courseId >= 0">
<view class="learn-view-title color-teacher">课程讲师</view>
<view class="" style="padding-top: 30rpx;display: flex;padding-left: 30rpx;">
<u-avatar :style="{'width':'100rpx', 'height':'100rpx'}" :src="teacherImage" mode="circle"></u-avatar>
<u-avatar :style="{'width':'100rpx', 'height':'100rpx'}" :src="teacherImage" mode="circle">
</u-avatar>
<view style="height:120rpx;font-size: 30rpx;padding-left:30rpx;">
<view class="" style="display: flex;font-size: 32rpx;">
<view class="" style="font-size: 32rpx;font-weight: bold;">{{ teacher.name }}</view>
<view class="" style="font-size: 24rpx;margin-left: 30rpx;margin-top: 6rpx;color: #999999;">课程讲师</view>
<view class=""
style="font-size: 24rpx;margin-left: 30rpx;margin-top: 6rpx;color: #999999;">课程讲师
</view>
</view>
<view class="" style="font-size: 24rpx;margin-top: 30rpx;">{{ teacherIntro }}</view>
</view>
</view>
<view class="learn-view-title">目录</view>
<view class="" style="display: flex;overflow: auto;padding-top: 30rpx;padding-bottom: 30rpx;">
<view class="catalogue">
<view v-for="(item, index) in list" :key="index">
<view @click="goNext(item)" class="list-cell list-default" :class="{'list-default-active': item.isActive}" style="width:280rpx;height:150rpx;margin-left: 20rpx;padding: 20rpx;border-radius: 12rpx;">
<view @click="goNext(item)" class="list-cell list-default"
:class="{'list-default-active': item.isActive}"
style="width:280rpx;height:150rpx;margin-left: 20rpx;padding: 20rpx;border-radius: 12rpx;">
<view class="" style="font-size: 24rpx;">{{ item.title }}</view>
<view class="" style="font-size: 26rpx;margin-top: 16rpx;">
{{ item.intro }}
{{ item.intro }}
</view>
</view>
</view>
......@@ -70,14 +75,41 @@
section_id: 0,
active_section_id: 0,
isShowVideo: false,
CourseSectionlist: {name: '', content: ''}, //节信息
list: [
{'title': '第1节', 'intro': '考核规则1:接单及 时率', 'isActive': true, "id": null},
{'title': '第2节', 'intro': '考核规则1:接单及 时率', 'isActive': false, "id": null},
{'title': '第3节', 'intro': '考核规则1:接单及 时率', 'isActive': false, "id": null},
{'title': '第4节', 'intro': '考核规则1:接单及 时率', 'isActive': false, "id": null},
{'title': '第5节', 'intro': '考核规则1:接单及 时率', 'isActive':false, "id": null},
],
CourseSectionlist: {
name: '',
content: ''
}, //节信息
list: [{
'title': '第1节',
'intro': '考核规则1:接单及 时率',
'isActive': true,
"id": null
},
{
'title': '第2节',
'intro': '考核规则1:接单及 时率',
'isActive': false,
"id": null
},
{
'title': '第3节',
'intro': '考核规则1:接单及 时率',
'isActive': false,
"id": null
},
{
'title': '第4节',
'intro': '考核规则1:接单及 时率',
'isActive': false,
"id": null
},
{
'title': '第5节',
'intro': '考核规则1:接单及 时率',
'isActive': false,
"id": null
},
],
teacher: {
name: "",
avatar: ""
......@@ -100,8 +132,8 @@
fullscreenToggle: true //全屏按钮
}
},
params:{
course_id:null,
params: {
course_id: null,
},
gklog: '',
videoTotalTime: 0,
......@@ -154,7 +186,7 @@
// #endif
},
methods: {
goNext(info){
goNext(info) {
uni.navigateTo({
url: "./section?section_id=" + info.id + "&course_id=" + info.course_id
});
......@@ -207,7 +239,7 @@
this.section_id = res.data.id;
this.section_content = res.data.content;
this.teacher.name = res.data.teachers[0].name;
this.teacher.avatar = res.data.teachers[0].avatar;
this.teacherImage = res.data.teachers[0].avatar;
this.teacherIntro = res.data.teachers[0].intro.replace(/<p.*?>|<\/p>/ig, "");
this.params.course_id = res.data.course_id;
if (this.isShowVideo) {
......@@ -215,7 +247,7 @@
this.courseSrc = coureWareList[0].src;
this.videoTotalTime = parseInt(JSON.parse(coureWareList[0].info).time);
console.log('视频时长信息:' + this.videoTotalTime);
}else{
} else {
this.updateLearnedStatusForText();
}
}
......@@ -287,10 +319,11 @@
this.list = res.data[0].section;
this.courseTotal = this.list.length;
let length = this.list.length;
for(let i = 0; i < length; i++){
for (let i = 0; i < length; i++) {
this.list[i].title = "第" + (i + 1) + "节";
this.list[i].intro = this.list[i].name;
this.list[i].isActive = this.active_section_id == this.list[i].id ? true : false;
this.list[i].isActive = this.active_section_id == this.list[i].id ? true :
false;
}
console.log('--select-list--')
console.log(this.list)
......@@ -413,6 +446,7 @@
// margin-bottom: 20rpx;
font-size: 32rpx;
color: #333333;
height: 820rpx;
.learn-view-title {
font-size: 32rpx;
......@@ -443,13 +477,13 @@
padding: 40rpx 30rpx;
margin-bottom: 20rpx;
}
.list-default {
background-color: #F4F5F7;
border-radius: 12rpx;
color: #333333;
}
.list-default-active {
background-color: #ffffff;
border-radius: 12rpx;
......@@ -457,8 +491,16 @@
border: 2rpx solid #2272FF;
box-sizing: border-box;
}
.color-teacher {
color: #999999;
}
.catalogue {
display: flex;
overflow: auto;
padding-top: 30rpx;
padding-bottom: 30rpx;
padding-right: 30rpx;
}
</style>
......@@ -22,9 +22,9 @@
<view class="class-item" :key="groupIndex" v-show="current == groupIndex">
<view class="title" v-if="groupItem.name !== '基本信息'">{{groupItem.name}}</view>
<view class="class-bd">
<u-form-item v-for="(item,itemIndex) in groupItem.items" :key="itemIndex"
label-position="top" :prop="item.fieldsName" :border-bottom="false">
<view :class="[{'label-bold': groupItem.name === '基本信息'}, 'label']" v-if="typeToComponentType(item.fieldsType)!=='location'">
<u-form-item v-for="(item,itemIndex) in groupItem.items" :key="itemIndex" v-if="typeToComponentType(item.fieldsType)!=='location'"
label-position="top" :prop="item.fieldsName" :border-bottom="false" v-show="item.fieldsId != 200 || show200">
<view :class="[{'label-bold': groupItem.name === '基本信息'}, 'label']">
<image class="item-image" :src="mixingImage" v-if="item.required"></image>
{{item.fieldsTitle}}
</view>
......@@ -124,6 +124,7 @@
inGuaranteePeriod:'',
list: [],
tabIndex: 0,
show200: true, // 基础信息显示金额输入框
scrollTop: 0, //tab标题的滚动条位置
oldScrollTop: 0,
current: 0, // 预设当前项的值
......@@ -385,6 +386,7 @@
if (groupItem.items) {
innerItem = groupItem.items[data.itemIndex]
}
if(innerItem.fieldsType ==='multiInput'){
// 多个输入框的值触发
let key = Object.keys(data.value)[0]
......@@ -392,6 +394,7 @@
}else{
this.$set(this.form,innerItem.fieldsName,data.value)
}
this.show200 = innerItem.fieldsId != 199 || data.value != '03'
console.log(this.form)
},
nextStep() {
......
......@@ -78,15 +78,23 @@
<view v-if="orderRecords.length == 0" class="no-record-view">当前暂无履约记录</view>
<view v-else>
<view class="record-line-view">
<view class="order-cell between-cell" v-for="(record,index) in shwoOrderRecords" :key="record.operationContent">
<view class="order-cell display-cell" v-for="(record,index) in shwoOrderRecords" :key="record.operationContent">
<view class="node-view"></view>
<view class="line-view-left">
<text>{{$u.timeFormat(record.operationDatetime, 'yyyy.mm.dd hh:MM:ss')}} </text>
<text>{{$u.timeFormat(record.operationDatetime, 'yyyy.mm.dd \n hh:MM:ss')}} </text>
</view>
<text v-show="record.operationType==='报备'"> {{record.orderRecordRemark}}</text>
<view class="line-view-right">
<text style="color: red;">{{record.overTime?'(超时)':''}}{{record.exception?'(异常)':''}}</text>
<text>{{record.operationType}}</text>
<view>
<text>{{record.operationType}}</text>
<text style="color: red;">{{record.overTime?'(超时)':''}}{{record.exception?'(异常)':''}}</text>
</view>
<view v-show="record.operationType==='报备' || record.operationType==='改约'">
<text>{{record.operationType==='报备' ? '下次联系时间:' : '改约时间:'}}</text>
<text style="color: #2272FF;">{{
record.operationType==='报备' && record.orderRecordRemark && record.orderRecordRemark.length>1?
record.orderRecordRemark.substring(record.orderRecordRemark.indexOf(':')+1,record.orderRecordRemark.length)
:record.orderRecordRemark}}</text>
</view>
</view>
</view>
</view>
......@@ -340,13 +348,15 @@
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);
}
})
if(this.submitType === "workerAppointment"){
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()
......@@ -499,6 +509,7 @@
// 已派单的时显示拒单按钮
this.allowRejection = true
this.submitType = "orderAccept"
this.readMore = false
} else if (orderStatus < 31 && orderBusinessType === '订单池') {
// 抢单
this.centerButton = "appoint1"
......@@ -506,6 +517,7 @@
this.showCenterBtn = true
this.submitType = "orderGan"
this.showTimeOut=false
this.readMore = false
} else if (orderStatus === 31 && !this.order.appointmentDatetime) {
// 预约
this.centerButton = "appoint2"
......@@ -514,6 +526,7 @@
this.showCenterBtn = true
this.showTimeSelect = true
this.isAllowDianhuaAndDaohang = true
this.readMore = true
this.submitType = "workerAppointment"
this.loadCalendar()
} else if (orderStatus === 31 && this.order.appointmentDatetime) {
......@@ -534,6 +547,7 @@
this.allowFeedback = true
this.showCenterBtn = true
this.scenePhoto = true
this.readMore = true
this.isAllowDianhuaAndDaohang = true
} else {}
},
......@@ -627,7 +641,7 @@
clickFeedback(){
// 过程反馈
uni.navigateTo({
url: 'pages/order/feedback?orderId='+this.order.orderId+'&categoryId='+this.order.categoryId
url: 'pages/order/feedback?orderId='+this.order.orderId+'&categoryId='+this.order.categoryId+'&showGY=' + (this.centerButtonText != '预约' ? '1' : '0')
})
},
filish(){
......@@ -903,11 +917,11 @@
margin-left: 6rpx;
}
.line-view-left {
width: 270rpx;
width: 170rpx;
flex-shrink: 0;
}
.line-view-right {
text-align: right;
// text-align: right;
}
.record-line-view ::before {
......@@ -1063,6 +1077,9 @@
justify-content: space-between;
align-items: flex-start;
}
.display-cell {
display: flex;
}
.cell-title {
text-align: left;
flex-shrink: 0;
......
......@@ -75,6 +75,7 @@ export default {
return {
orderId: null,
categoryId: null,
showGY: true, // 非预约进来才显示改约
background: {
backgroundColor: 'none'
},
......@@ -156,6 +157,7 @@ export default {
if (e) {
this.orderId = e.orderId || null;
this.categoryId = e.categoryId || null;
this.showGY = e.showGY == '1'
}
uni.showLoading({
title: '数据加载中',
......@@ -171,7 +173,18 @@ export default {
let params = { categoryId: self.categoryId };
let res = await self.$u.api.feedbackConfig(params);
if (res && res.code == 200) {
self.feedback = res.data;
if (!self.showGY) {
delete res.code['改约']
}
var data = {}
for (var item in res.data) {
if (item != '改约' || self.showGY) {
data[item] = res.data[item]
}
}
self.feedback = data;
self.buildConfig();
}
uni.hideLoading();
......
......@@ -31,7 +31,7 @@
</view>
<u-loadmore :status="loadStatus" bgColor="#F4F5F7"></u-loadmore>
</view>
<view v-else="search.keyword" class="empty-result">
<view v-else-if="loaded" class="empty-result">
<u-image width="374" height="256" :src="searchEmpty">
<u-loading slot="loading"></u-loading>
</u-image>
......@@ -60,7 +60,7 @@
orderStatusRangeType: '',
},
orderList: [],
loaded: false,
};
},
onLoad() {
......@@ -85,6 +85,7 @@
// 状态处理
self.search.pageNumber += 1
self.loaded = false
self.$u.api.listOrder(self.search).then((res) => {
if (res.code == 200) {
if (res.data) {
......@@ -94,6 +95,7 @@
} else {
self.$u.toast(res.message);
}
self.loaded = true
});
},
......
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