Commit e696ebf4 authored by Morson's avatar Morson
parents 42fd5dc3 4fd4cf64
......@@ -79,17 +79,33 @@ export default {
},
onShow: async function () {
// 应用启动,或从后台进入前台显示
this.handleImageTask()
},
onHide: function () {
// 应用从前台进入后台
},
watch: {
uploadTask: function(newValue, oldValue) {
console.log("oldValue, newValue", oldValue, newValue)
if(newValue.length > 0) upload.uploadImageTask(this)
}
},
methods: {
// 处理上传图片队列数据
handleImageTask() {
if (this.uploadTask.length > 0) {
upload.uploadImageTask(this)
} else { // 定时清理缓存在本地的文件
const result = uni.getStorageSync('delImg')
if (result.length > 0) {
for (let i of result) {
uni.removeSavedFile({
filePath: i
})
}
uni.setStorageSync('delImg', [])
}
}
},
getSystemInfo() {
try {
let a = wx.getSystemInfoSync();
......
......@@ -318,8 +318,9 @@
border: none;
}
button[disabled]:not([type]) {
background: #d1d4d4;
color: #ffffff;
background: #FFFFFF;
color: #CCCCCC;
border: 2rpx solid #F4F5F7;
}
}
}
......
......@@ -28,7 +28,7 @@
import arrMixin from './arrMixin'
import baseFile from '@/components/upload/index';
import takePhoto from '@/components/take/index.vue'
import uploader from '@/plugins/uploader/index.js'
// import uploader from '@/plugins/uploader/index.js'
export default {
name: 'XhFiles',
......
......@@ -6,7 +6,7 @@
<cover-image @click="setCameraInfo('devicePosition')" class="icon" mode="aspectFit"
src="/static/photo/icon-switch.png"></cover-image>
<cover-image @click="setCameraInfo('flash')" class="icon" mode="aspectFit"
:src="'/static/photo/icon-light-' + cameraInfo.flash +'.png'"></cover-image>
:src="'/static/photo/icon-flash-' + cameraInfo.flash +'.png'"></cover-image>
<cover-image v-if="currentItem.partnerCompanyId" @click="changeType(3)" class="icon" mode="aspectFit"
src="/static/photo/icon-setting.png"></cover-image>
</cover-view>
......@@ -84,7 +84,7 @@
standardShow: false,
cameraInfo: {
devicePosition: 'back',
flash: 'auto'
flash: 'off'
},
waterInfo: {
longitude: '', // 经度
......@@ -222,7 +222,7 @@
val = val === 'back' ? 'front' : 'back'
break;
case 'flash':
val = val === 'auto' ? 'on' : (val === 'on' ? 'off' : 'auto')
val = val === 'off' ? 'torch' : 'off'
break;
defalut:
......
......@@ -7,7 +7,6 @@ export default {
*/
async uploadImageTask(that) {
const uploadTask = that.uploadTask
console.log("uploadTask", uploadTask)
const options = {
files: uploadTask, // 必填 临时文件路径 格式: [{path: "图片地址"}]
......@@ -15,13 +14,27 @@ export default {
maxSize: 300000, //(默认 无 说明:上传的文件最大字节数限制,默认不限制)
onEachUpdate: res => {
console.log("上传成功返回:",res);
const newTask = uploadTask.filter(v => v.key !== res.key)
// that.$u.vuex('uploadTask', newTask)
},
Update: res => {
console.log("上传进度返回:",res);
}
}
uploader.qnFileUpload(options)
},
const result = await uploader.qnFileUpload(options)
if (result) { // 匹配已上传完成的图片,更新缓存数据
let newTask = []
let delImg = []
uploadTask.forEach(v => {
if (result.includes(`/${v.key}`)) { // 删除已上传的图片
delImg.push(v.path)
} else { // 未上传的重新存储
newTask.push(v)
}
})
uni.setStorageSync('delImg', delImg) // 已上传完的图片,会在启动系统的时候做一次清理
that.$u.vuex('uploadTask', newTask)
}
}
}
\ No newline at end of file
......@@ -204,7 +204,8 @@
"path": "cert/index",
"style": {
"navigationBarTitleText": "我的证件",
"navigationStyle":"custom"
"navigationStyle":"custom",
"disableScroll": true
}
},
{
......
<template>
<TabBarPage title="扳手会" :fixed="true">
<view class="content-view">
<scroll-view scroll-y @scrolltolower="reachBottom"
<scroll-view style="height: 100%;" scroll-y @scrolltolower="reachBottom"
scroll-anchoring scroll-y="true" refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100"
refresher-background="#F4F5F7" @refresherpulling="triggered = true" @refresherrefresh="onRefresh"
@refresherrestore="onRestore" @refresherabort="onAbort" enable-back-to-top>
......@@ -172,20 +172,6 @@
this.getLocation()
}
},
// onPullDownRefresh() {
// console.log('------下拉刷新------')
// // 下拉刷洗
// this.initSettleInfo()
// },
// onReachBottom() {
// console.log('----------底部-------------', this.currentLoadStatus)
// if (this.currentLoadStatus != 'loadmore') return
// this.currentLoadStatus == 'loading'
// this.loadOrderList()
// },
// onPageScroll(obj) {
// console.log('---------scroll---------', obj)
// },
methods: {
getData() {
this.getOrderCount()
......@@ -274,9 +260,6 @@
}
});
},
onRestore() {
this.triggered = "restore";
},
reachBottom() {
if (this.vuex_token) {
if (this.currentLoadStatus != 'loadmore') return
......@@ -284,9 +267,6 @@
this.loadOrderList()
}
},
onPulling(e) {
console.log("onpulling", e);
},
onRefresh() {
if (this._freshing) return;
this._freshing = true;
......@@ -294,15 +274,7 @@
},
onRestore() {
this.triggered = 'restore'; // 需要重置
console.log("onRestore");
},
onAbort() {
console.log("onAbort");
},
// clickSwiper(index) {},
handleScroll() {
console.log("-----scroll-------");
},
/* 立即入驻 */
immediatelyIn() {
if (this.vuex_token) {
......
......@@ -7,7 +7,7 @@
<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" @transition="transition" @animationfinish="animationfinish">
<swiper-item @touchmove.stop.prevent="stopTouchMove" v-show="current == 0">
<swiper-item @touchmove.stop.prevent="stopTouchMove">
<scroll-view scroll-y style="height:100%;width:100%;">
<view class="jf-currency-class">
<image :src="jianBianImg" mode="" class="current-img"></image>
......@@ -22,7 +22,7 @@
</view>
</scroll-view>
</swiper-item>
<swiper-item @touchmove.stop.prevent="stopTouchMove" v-show="current == 1">
<swiper-item @touchmove.stop.prevent="stopTouchMove">
<scroll-view scroll-y style="height:100%;width:100%;" @scrolltolower="onreachBottom" scroll-y="true" refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100" @refresherpulling="onPulling" @refresherrefresh="onRefresh" @refresherrestore="onRestore" @refresherabort="onAbort">
<view v-for="item in list" :key="item.id" class="notice" @click="bbb(item)">
<view class="n-head">
......@@ -42,7 +42,7 @@
</view>
</scroll-view>
</swiper-item>
<swiper-item @touchmove.stop.prevent="stopTouchMove" v-show="current == 2">
<swiper-item @touchmove.stop.prevent="stopTouchMove">
<scroll-view scroll-y style="height:100%;width:100%;">
<view class="title u-margin-top-10 u-margin-bottom-30">通用课程</view>
<view class="learn-currency-class">
......@@ -81,8 +81,7 @@
</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-currency-class u-margin-bottom-20 u-margin-top-30" 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>
......@@ -103,7 +102,7 @@
</view>
</scroll-view>
</swiper-item>
<swiper-item @touchmove.stop.prevent="stopTouchMove" v-show="current == 3">
<swiper-item @touchmove.stop.prevent="stopTouchMove">
<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">
......@@ -151,8 +150,8 @@
var json = {
dev: [
{
title: "服务规范",
desc: "为用户提供更好服务,自己赚更多钱",
title: "安装材料及工具准备",
desc: "前期的安装材料及安装工具的准备是工作的良好开始",
pic: process.uniEnv.qn_base_url + "fwgf-3x-v2.png",
percent: 0,
status: "",
......@@ -160,8 +159,8 @@ var json = {
sectionId: "",
},
{
title: "接单规范",
desc: "快速学习,使用APP 接单、抢单",
title: "服务理念与时效",
desc: "为用户提供更好的服务,自己赚更多的钱",
pic: process.uniEnv.qn_base_url + "jdgf-3x-v2.png",
percent: 0,
status: "",
......@@ -169,8 +168,8 @@ var json = {
sectionId: "",
},
{
title: "从0-1学习充电桩安装服务",
desc: "让你全面了解充电桩市场及服务规范",
title: "充电桩安装要点提示",
desc: "在充电装安装过程中需要着重注意的要点",
pic: process.uniEnv.qn_base_url + "cdz-3x-v2.png",
percent: 0,
status: "",
......@@ -180,8 +179,8 @@ var json = {
],
test: [
{
title: "服务规范",
desc: "为用户提供更好服务,自己赚更多钱",
title: "安装材料及工具准备",
desc: "前期的安装材料及安装工具的准备是工作的良好开始",
pic: process.uniEnv.qn_base_url + "fwgf-3x-v2.png",
percent: 0,
status: "",
......@@ -189,8 +188,8 @@ var json = {
sectionId: "",
},
{
title: "接单规范",
desc: "快速学习,使用APP 接单、抢单",
title: "服务理念与时效",
desc: "为用户提供更好的服务,自己赚更多的钱",
pic: process.uniEnv.qn_base_url + "jdgf-3x-v2.png",
percent: 0,
status: "",
......@@ -198,8 +197,8 @@ var json = {
sectionId: "",
},
{
title: "从0-1学习充电桩安装服务",
desc: "让你全面了解充电桩市场及服务规范",
title: "充电桩安装要点提示",
desc: "在充电装安装过程中需要着重注意的要点",
pic: process.uniEnv.qn_base_url + "cdz-3x-v2.png",
percent: 0,
status: "",
......@@ -209,24 +208,24 @@ var json = {
],
prod: [
{
title: "服务规范",
desc: "为用户提供更好服务,自己赚更多钱",
title: "安装材料及工具准备",
desc: "前期的安装材料及安装工具的准备是工作的良好开始",
pic: process.uniEnv.qn_base_url + "fwgf-3x-v2.png",
percent: 0,
status: "",
sectionId: "",
},
{
title: "接单规范",
desc: "快速学习,使用APP 接单、抢单",
title: "服务理念与时效",
desc: "为用户提供更好的服务,自己赚更多的钱",
pic: process.uniEnv.qn_base_url + "jdgf-3x-v2.png",
percent: 0,
status: "",
sectionId: "",
},
{
title: "从0-1学习充电桩安装服务",
desc: "让你全面了解充电桩市场及服务规范",
title: "充电桩安装要点提示",
desc: "在充电装安装过程中需要着重注意的要点",
pic: process.uniEnv.qn_base_url + "cdz-3x-v2.png",
percent: 0,
status: "",
......@@ -238,7 +237,7 @@ var json = {
var examJson = {
dev: [
{
title: "服务规范",
title: "安装材料及工具准备",
desc: "通过本认证,是接单的必要条件",
condition: "随机20题,及格20题",
status: "",
......@@ -264,7 +263,7 @@ var examJson = {
],
test: [
{
title: "服务规范",
title: "安装材料及工具准备",
desc: "通过本认证,是接单的必要条件",
condition: "随机10题,及格10题",
status: "",
......@@ -290,7 +289,7 @@ var examJson = {
],
prod: [
{
title: "服务规范",
title: "安装材料及工具准备",
desc: "通过本认证,是接单的必要条件",
condition: "随机20题,及格20题",
status: "",
......@@ -327,7 +326,7 @@ export default {
name: "交付规范",
},
{
name: "培训通知",
name: "消息通知",
},
{
name: "在线学习",
......@@ -408,6 +407,7 @@ export default {
isReflesh: true,
triggered: false,
_freshing: false,
isOnLoad: 0
};
},
onLoad(param) {
......@@ -425,13 +425,14 @@ export default {
},
},
onShow: function (param) {
this.isOnLoad = 1;
try {
if (param.tabs) {
this.current = param.tabs;
this.swiperCurrent = param.tabs;
}
} catch (e) {}
if (this.current == 2 || this.current == 3) {
if (this.current == 1 ||this.current == 2 || this.current == 3) {
this.tabsChange(this.current);
}
},
......@@ -709,31 +710,9 @@ export default {
index
].questionTime;
var examInfo = this.examList[index];
if (examInfo.examStatus == 0) {
wx.navigateTo({
url: "/pages/learn/assessment?examId=" + examInfo.id,
});
} else if (examInfo.examStatus == 1) {
let url = '';
if (examInfo.status == "已通过") {
url = "/pages/learn/exam-pass?userExamId=" +
examInfo.examId +
"&examId=" +
examInfo.id;
} else {
url = "/pages/learn/result?userExamId=" +
examInfo.examId +
"&examId=" +
examInfo.id
}
wx.navigateTo({
url: url,
});
} else if (examInfo.examStatus == 2) {
wx.navigateTo({
url: "/pages/learn/assessment?examId=" + examInfo.id,
});
}
wx.navigateTo({
url: "/pages/learn/assessment?examId=" + examInfo.id,
});
},
//跳转到播放
goPlay(info) {
......
......@@ -368,7 +368,7 @@ export default {
var wz = str.indexOf(".");
let str1 = str.substring(wz + 1);
console.log(that.currentItem);
that.currentItem.question.content = str1;
that.currentItem.question.content = str1.replace('*', '');
console.log(str1, "切割的字符串");
}
if (res.data.data.answerList) {
......@@ -682,6 +682,7 @@ export default {
display: flex;
justify-content: space-between;
align-items: center;
padding-right: 30rpx;
.title-text {
border-radius: 8rpx;
......
......@@ -159,10 +159,12 @@ export default {
uni.hideLoading();
if (res.data.code == 200) {
if (res.data.data.ruleDisc) {
console.log(res.data.data.ruleDisc);
var str = res.data.data.ruleDisc;
console.log(str.substring(0, 11));
this.ruleDisc = str.substring(0, 11);
let strArr = str.split('(')[0].split(',');
this.desc.title = strArr[0];
this.desc.score = strArr[1];
this.desc.time = strArr[2];
this.ruleDisc = strArr[3];
}
}
},
......@@ -206,7 +208,7 @@ export default {
font-size: 40rpx;
font-weight: bold;
color: #333333;
line-height: 20px;
line-height: 68rpx;
padding: 50rpx 58rpx 46rpx 30rpx;
}
......
......@@ -11,7 +11,7 @@
<view class="title-content">
<view class="item-content">
<view class="item-st">
<image style="width: 80rpx; height: 36rpx" :src="kcImage"></image>
<image class="kc-image" :src="kcImage"></image>
<text class="item-st-text">{{ courseTotal }}课时</text>
</view>
<view class="item-title">{{ courseTitle }}</view>
......@@ -20,19 +20,19 @@
</view>
<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;">
<view class="teacher-desc">
<u-avatar :style="{'width':'100rpx', 'height':'100rpx'}" :src="teacherImage" mode="circle">
</u-avatar>
<view style="height:120rpx;font-size: 30rpx;padding-left:30rpx;padding-right: 30rpx;">
<view class="" style="display: flex;font-size: 32rpx;">
<view class="teacher-right">
<view class="teacher-right-top">
<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 class="teacher-disc">课程讲师
</view>
</view>
<view class="" style="font-size: 24rpx;margin-top: 30rpx;">{{ teacherIntro }}</view>
<view class="teacher-intro">{{ teacherIntro }}</view>
</view>
</view>
<u-line color="#F4F5F7" margin="30rpx 0 0 0" />
<view class="learn-view-title">目录</view>
<view class="scroll_box">
<scroll-view scroll-x @scroll="scroll" :scroll-left="scrollValue">
......@@ -373,13 +373,13 @@
font-size: 32rpx;
color: #333333;
height: 820rpx;
padding: 0 30rpx;
.learn-view-title {
font-size: 32rpx;
font-weight: bold;
margin-bottom: 10rpx;
padding-top: 30rpx;
margin-left: 30rpx;
}
.learn-list {
......@@ -456,10 +456,8 @@
width: 100%;
height: 150rpx;
overflow: hidden;
// padding: 20rpx;
padding-left: 20rpx;
background: #fff;
// border: 1px solid red;
margin-top: 30rpx;
}
.scroll_box scroll-view {
......@@ -484,4 +482,38 @@
border: 2rpx solid #2272FF;
box-sizing: border-box;
}
.teacher-intro {
font-size: 24rpx;
margin-top: 15rpx;
}
.teacher-disc {
font-size: 24rpx;
margin-top: 6rpx;
color: #999999;
padding-left: 30rpx;
}
.kc-image {
width: 80rpx;
height: 36rpx
}
.teacher-desc {
padding-top: 30rpx;
display: flex;
padding-left: 30rpx;
}
.teacher-right {
font-size: 30rpx;
padding-left: 30rpx;
padding-right: 30rpx;
}
.teacher-right-top {
display: flex;
font-size: 32rpx;
}
</style>
......@@ -12,7 +12,8 @@
<view class="content-cody">
<u-cell-group :border="false">
<u-cell-item v-for="(item, index) in list" :title="item.name" :value="item.isUploadName" :arrow="true" :key="index"
:value-style="{'color': item.color}" @click="toDetail(item.keyName)" :title-style="{'padding-left':'20rpx'}">
:value-style="{'color': item.color,'padding-left':'30rpx','padding-right':'30rpx'}" @click="toDetail(item.keyName)"
:title-style="{'padding-left':'20rpx'}">
<u-icon slot="icon" size="32" name="checkmark-circle" :color="item.iconColor"></u-icon>
</u-cell-item>
</u-cell-group>
......@@ -144,5 +145,7 @@
color: #007AFF;
}
.u-cell {
padding: 26rpx 0 !important;
}
</style>
......@@ -769,7 +769,11 @@
let self = this
var nowTime = new Date(); // 当前时间
if(currentOverTime && nowTime.getTime() > currentOverTime){
this.btnClass='timeOut-btn'
if(this.centerBtnDisabled === false && this.submitType === 'maintainWorkerCheckin'){
this.btnClass = "isGan-btn"
}else{
this.btnClass='timeOut-btn'
}
this.$refs['uCountDown'].seconds += 2
}
},
......
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