Commit 45da3ae0 authored by zhengzy's avatar zhengzy
parents 155b62bc 2432a8f1
;
(function() {
let NODE_ENV = 'test'; // dev:开发环境 | test:测试环境
let NODE_ENV = 'prod'; // dev:开发环境 | test:测试环境 | prod:生产环境
let ENV_VAR = null;
if (process.env.NODE_ENV === "development") {
if (NODE_ENV === 'dev') {
ENV_VAR = require('./.env.dev.js');
} else if (NODE_ENV === 'test') {
ENV_VAR = require('./.env.test.js');
} else if (NODE_ENV === 'prod') {
ENV_VAR = require('./.env.prod.js');
}
} else if (process.env.NODE_ENV === "production") {
......@@ -15,7 +17,7 @@
}
if (ENV_VAR) {
process.uniEnv = {};
process.uniEnv['node_env'] = NODE_ENV;
process.uniEnv['node_env'] = NODE_ENV;
for (let key in ENV_VAR) {
process.uniEnv[key] = ENV_VAR[key];
}
......
......@@ -11,11 +11,6 @@ export default {
// 微信小程序平台编号,空--家维广场,1--自营平台
wxAppNo: 1,
//授权提示 图标
icon_auth_notice: "https://qn-static.banshouhui.com/auth_notice.png",
//授权提示新 图标
icon_auth_notice_new:
"https://qn-static.banshouhui.com/auth_notice_new.png",
// 服务规范教程视频
service_standard: {
course1: {
......@@ -47,8 +42,6 @@ export default {
// 授权用户信息
authUserInfo: "",
// 用户入驻信息
settledInfo: {},
navHeight: 0, //导航栏高度
rpxScreenHeight: 0, // 照相视框高度
safeHeight: 0, // 安全高度
......@@ -81,30 +74,41 @@ export default {
// 版本更新
await this.updateApp();
// 系统自动登录
// 系统自动登录::每次运行小程序重新获取用户信息
await this.autoLogin();
//this.deleteTempImg()
},
onShow: async function () {
// 应用启动,或从后台进入前台显示
if (this.uploadTask.length > 0) {
upload.uploadImageTask(this)
}
},
onHide: function () {
// 应用从前台进入后台
},
watch: {
uploadTask: function(newValue, oldValue) {
console.log("oldValue, newValue", oldValue, newValue)
if(newValue.length > 0) upload.uploadImageTask(this)
}
},
methods: {
// 处理已上传完成的图片
deleteTempImg() {
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();
// this.globalData.platform = systemInfo.platform, this.globalData.pixelRatio = a.pixelRatio,
// this.globalData.statusBarHeight = a.statusBarHeight, this.globalData.navHeight = a.statusBarHeight / a.screenWidth * 750 + 90,
// this.globalData.rpxScreenHeight = a.screenHeight / a.screenWidth * 750, this.globalData.screenWidth = a.screenWidth,
// this.globalData.screenHeight = a.screenHeight;
this.globalData.navHeight =
(a.statusBarHeight / a.screenWidth) * 750 + 90;
this.globalData.rpxScreenHeight =
......@@ -138,11 +142,11 @@ export default {
*/
async autoLogin() {
let that = this;
// 如果token不为空,则跳过自动登录
if (that.vuex_token) {
return;
// 如果token不为空,则跳过自动登录
if(that.vuex_token) {
return false
}
await login.oauth().then(async (res) => {
await login.oauth().then(async (res) => {
if (res.code) {
let params = {
code: res.code,
......@@ -180,6 +184,7 @@ export default {
this.$u.vuex("vuex_user", null);
this.$u.vuex("vuex_wx_uid", "");
}
this.$u.vuex("vuex_settled", null);
},
/* 版本更新 */
......@@ -189,7 +194,6 @@ export default {
updateManager.onCheckForUpdate(function (res) {
// 请求完新版本信息的回调
console.log(res.hasUpdate);
});
updateManager.onUpdateReady(function (res) {
......@@ -268,7 +272,6 @@ export default {
}
},
initShare(option) {
console.log(option, "option-initShare");
option = option || {};
if (AnalysysAgent && option.user_id) {
let shareUserInfo = {
......
const db = uniCloud.database({
spaceId: 'tcb-nikbzhlwnpd5n913e1c5e-50f4bbo'
})
let cloudRulesApiFun = function(vm){
/* 查询所有产品 废弃*/
let getAllProduct = async () => await db.collection("product").get();
/* 查询产品下的品牌 {product_code:"P0001"} 废弃*/
let getBrand = async (params = {}) => await db.collection("brand").where(params).get();
/* 查询规范项目 {product_code:"P0001"} 废弃*/
let getstandard = async (params = {}) => await db.collection("standard").where(params).get();
/* 查询分组规范项目 废弃*/
let getGroupStandard = async (params = {}) => await uniCloud.callFunction({name: 'getGroupStandard', data: params});
/* 查询类别数据 */
let getClassifyDictionary = async () => await db.collection("dictionary").where({"type":"classify"}).get()
/* 查询有数据的系统 或者 品牌 数据 {"classify_id":"","system_id":"","field":"system_id|brand_id"}*/
let getRelationDictionary = async (params = {}) => await uniCloud.callFunction({name: 'getRelationDictionary', data: params});
let getRelationDictionaryV2 = async () => await uniCloud.callFunction({name: 'getRelationDictionaryV2'});
/* 查询规范 根据 分类、系统、品牌 {"token":"", "classify_id":"","system_id":"","brand_id":""} */
let getGroupStandardV2 = async (params = {}) => await uniCloud.callFunction({name: 'getGroupStandardV2', data: params});
/* 保存图片 {"token":"", "standardId":"", "url":""} */
let saveImage = async (params = {}) => await uniCloud.callFunction({name: 'saveImage', data: params});
/* 获取用户水印,首次返回默认水印 {"token":"", "systemId":""} */
let getUserWatermark = async (params = {}) => await uniCloud.callFunction({name: 'getUserWatermark', data: params});
/* 保存用户水印配置 {"token":"", "watermark": getUserWatemark返回的数据} */
let saveUserWatermark = async (params = {}) => await uniCloud.callFunction({name: 'saveUserWatermark', data: params});
const rulesApi = {
getAllProduct,
getBrand,
getstandard,
getGroupStandard,
// 新接口
getClassifyDictionary,
getRelationDictionary,
getRelationDictionaryV2,
getGroupStandardV2,
saveImage,
getUserWatermark,
saveUserWatermark
}
return rulesApi
}
module.exports = {
cloudRulesApiFun
}
\ No newline at end of file
import {
cloudRulesApiFun
} from "@/common/api/cloud_rules.js"
import {
commonApiFun
} from '@/common/api/common.js';
......@@ -14,7 +11,6 @@ import {certApiFun} from"@/common/api/cert.js"
let apiFun = function(vm) {
let commonApi = commonApiFun(vm);
let settledApi = settledApiFun(vm)
let cloudApi = cloudRulesApiFun(vm)
let learnApi=learnApiFun(vm)
let assessmentApi = assessmentApiFun(vm)
let orderApi=orderApiFun(vm)
......@@ -22,7 +18,6 @@ let apiFun = function(vm) {
let apiUrl = {
...commonApi,
...settledApi,
...cloudApi,
...learnApi,
...orderApi,
...assessmentApi,
......
import {apiFun} from '@/common/api/index.js';
import {
cloudRulesApiFun
} from "@/common/api/cloud_rules.js"
const install = (Vue, vm) => {
let apiUrls = apiFun(vm)
......@@ -9,10 +7,6 @@ const install = (Vue, vm) => {
vm.$u.api = {
...apiUrls,
};
let cloudRules = cloudRulesApiFun(vm)
vm.$u.cloudApi = {
...cloudRules
}
}
export default {
......
......@@ -97,6 +97,7 @@ const install = (Vue, vm) => {
vm.$u.vuex('vuex_token', '');
vm.$u.vuex('vuex_user', null);
vm.$u.vuex('vuex_wx_uid', '');
vm.$u.vuex("vuex_settled", null);
toLoginPage()
case 403://没有权限访问
case 500:
......
......@@ -318,8 +318,9 @@
border: none;
}
button[disabled]:not([type]) {
background: #d1d4d4;
color: #ffffff;
background: #FFFFFF;
color: #CCCCCC;
border: 2rpx solid #F4F5F7;
}
}
}
......
......@@ -32,7 +32,6 @@
}
const dataValue = this.dataValue
let flag = Array.isArray(dataValue) && dataValue.indexOf(item)>-1
console.log(flag,'flag')
return flag
},
setValue(txt) {
......
This diff is collapsed.
......@@ -64,15 +64,12 @@
})
this.dataValue = result
this.valueChange(result)
console.log(result,'result')
},
columnchange(data){
console.log(data,'data')
// 树列改变时进行联动操作
const {column ,index} = data
let arr = [9,10,50]
this.settings.splice(column+1,1,arr)
console.log(this.settings,'this.settings')
},
}
}
......
......@@ -44,8 +44,6 @@
success: function (res) {
self.dataValue = res.result
self.valueChange(res.result)
// console.log('条码类型:' + res.scanType);
// console.log('条码内容:' + res.result);
}
});
},
......
......@@ -146,12 +146,10 @@
this.valueChange(JSON.stringify(result))
},
columnchange(data){
// console.log(data,'data')
// // 树列改变时进行联动操作
// const {column ,index} = data
// let arr = [9,10,50]
// this.settings.splice(column+1,1,arr)
// console.log(this.settings,'this.settings')
},
}
}
......
......@@ -64,36 +64,39 @@
methods: {
// 保存照片到本地
async saveTempToLocal(tempImagePath) {
//has_origin //是否保存原图
let that = this
const photo = getApp().globalData.photo
if(!photo.tempPath){
return
}
let path = ''
if(photo.tempPath.origin && photo.waterSetting.hasOrigin){
// 保存原图到本地
path = photo.tempPath.origin
let result = await this.saveLocal(path)
if(result){
uni.showToast({
icon: 'none',
title: '已将照片原图保存到本地相册'
})
return new Promise(async (resolve, reject) => {
//has_origin //是否保存原图
let that = this
const photo = getApp().globalData.photo
if(!photo.tempPath){
return
}
}
if(photo.tempPath.mixWater){
// 保存水印处理图片到本地
path = photo.tempPath.mixWater
let result1 = await this.saveLocal(path)
if(result1){
uni.showToast({
icon: 'none',
title: '已将水印图片保存到本地相册'
})
let path = ''
if(photo.tempPath.origin && photo?.waterSetting?.hasOrigin){
// 保存原图到本地
path = photo.tempPath.origin
let result = await this.saveLocal(path)
if(result){
uni.showToast({
icon: 'none',
title: '已将照片原图保存到本地相册'
})
}
}
}
if(photo.tempPath.mixWater){
// 保存水印处理图片到本地
path = photo.tempPath.mixWater
let result1 = await this.saveLocal(path)
if(result1){
uni.showToast({
icon: 'none',
title: '已将水印图片保存到本地相册'
})
resolve()
}
}
})
},
saveLocal(path){
return new Promise((resolve,reject)=>{
......@@ -128,13 +131,13 @@
//this.$emit('finish')
},
// 确认图片
continuePhoto() {
async continuePhoto() {
const photo = getApp().globalData.photo
let self = this
uni.showLoading({
title:'图片保存中…'
})
self.saveTempToLocal()
await self.saveTempToLocal()
if (this.upload) {
self.confirmUpload(true)
......
......@@ -89,7 +89,6 @@
},
computed: {
itemList() {
console.log(this.result)
if (this.result['lowerLeft']) {
var arr = this.result['lowerLeft']['body']
return arr.filter((item) => {
......
......@@ -64,17 +64,14 @@
// let swiperList = JSON.parse(JSON.stringify(val))
// let len = tabs.length
// let tabList = [{name:'拍照要求'}].concat(Array.from({name:'示意图'},len))
// console.log(tabList,'tabList')
}
},
},
created() {
// getApp().trackPage('照片预览页')
// console.log(e, 'e')
// if (e.img) {
// this.images = [e.img]
// }
// console.log(this.images, 'this.images')
},
mounted(){
this.changeList(this.currentItem.images)
......@@ -112,7 +109,6 @@
},
// swiper-item左右移动,通知tabs的滑块跟随移动
transition(e) {
// console.log(e.detail,'e.detail-transition')
// let dx = e.detail.dx;
// this.$refs.uTabs.setDx(dx);
},
......@@ -122,7 +118,6 @@
// 由于swiper的内部机制问题,快速切换swiper不会触发dx的连续变化,需要在结束时重置状态
// swiper滑动结束,分别设置tabs和swiper的状态
animationfinish(e) {
// console.log(e.detail,'e.detail-animationfinish')
// let current = e.detail.current;
// this.$refs.uTabs.setFinishCurrent(current);
// this.swiperCurrent = current;
......
<template>
<view :class="['content', {'fixed': fixed}]">
<u-navbar :is-back="false" :is-fixed="false" :background="{ background: 'transparent' }" :border-bottom="false">
<text class="title-view">{{title}}</text>
</u-navbar>
<view :class="['content', {'fixed': fixed}]">
<view @click="handleClick">
<u-navbar :is-back="false" :is-fixed="false" :background="{ background: 'transparent' }" :border-bottom="false">
<text class="title-view">{{title}}</text>
</u-navbar>
</view>
<slot></slot>
</view>
</template>
......@@ -25,7 +27,9 @@
}
},
methods: {
handleClick() {
this.$emit('click')
}
}
}
</script>
......
......@@ -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>
......@@ -60,7 +60,7 @@
_id: '', // 规格ID
system_id: '', // 系统ID
brand_id: '', // 品牌ID
classify_id: '', // 分类ID
classify_id: '', // 分类ID
images: [], // 拍照要求示意图
main_point: [] // 要点
}
......@@ -84,7 +84,7 @@
standardShow: false,
cameraInfo: {
devicePosition: 'back',
flash: 'auto'
flash: 'off'
},
waterInfo: {
longitude: '', // 经度
......@@ -121,7 +121,7 @@
this.updateTime()
const locationData = uni.getStorageSync('locationData')
const validityTime = 60000
const validityTime = 60000
if (Date.now() - locationData.locationTime < validityTime) { // 1分钟内不重复请求位置信息
this.waterInfo.latitude = locationData.waterInfo.latitude
this.waterInfo.longitude = locationData.waterInfo.longitude
......@@ -129,13 +129,13 @@
} else {
this.getLocation()
}
this.getMarkPath()
this.initData()
photo.currentItem = this.currentItem
if (this.currentItem.images && this.currentItem.images.length > 0) {
this.shadowInitShow = true
this.shadowInitShow = false
this.standardShow = true
this.standardStatus = true
}
......@@ -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:
......@@ -248,7 +248,7 @@
waterInfo.address = i
},
fail: function(err) {
//console.log(err, 'err')
console.log(err, 'err')
}
};
if (waterInfo.latitude && waterInfo.longitude) {
......@@ -383,7 +383,6 @@
const waterSetting = this.waterSetting
const globalTempPath = getApp().globalData.photo.tempPath
const ratio = this.ratio
console.log(this.ratio,'this.ratio')
// const ratio = 0.5
let canvasWidth = this.cameraWidth * ratio
let canvasHeight = this.cameraHeight * ratio
......
......@@ -84,7 +84,6 @@ export default {
},
// 拍照完成或关闭相机
closeTake(images) {
console.log(images)
this.takeStatus = false
}
}
......
......@@ -91,7 +91,6 @@ export default {
}
qiniuUploader.upload(params, (res) => {
console.log(res,'res')
let inLen = self.maximum - fileList.length
if (inLen > 0) {
item.src = file
......
......@@ -61,7 +61,6 @@ export default {
uni.chooseImage({
count: this.selectNum, //默认9 this.selectNum
success: (chooseImageRes) => {
console.log(chooseImageRes,'chooseImageRes')
for (var i = 0; i < chooseImageRes.tempFilePaths.length; i++) {
let file = chooseImageRes.tempFilePaths[i];
let index = file.lastIndexOf('/');
......@@ -82,7 +81,6 @@ export default {
}
if (newLen > 0) {
qiniuUploader.upload(params, (res) => {
console.log(res,'res')
let inLen = this.selectNum - this.imgList.length
if (inLen > 0) {
item.src = file
......
import uploader from '@/plugins/uploader/index.js'
const globalUrl = process.uniEnv || {}
const randomChar = function(l, url = "") {
const x = "0123456789qwertyuioplkjhgfdsazxcvbnm";
let tmp = "";
let time = new Date();
for (let i = 0; i < l; i++) {
tmp += x.charAt(Math.ceil(Math.random() * 100000000) % x.length);
}
return (
"file/" +
url +
time.getTime() +
tmp
);
}
export default {
name: 'upload',
components: {},
data() {
return {
imgList:[],
// 上传文件种类:0--头像、1--证件、2--身份证
categories: ['avatar', 'cert', 'id'],
};
},
created() {
// console.log(uploader,'uploader')
// this.initQiniu()
},
methods: {
async uploadPath(type){
// 可以直接上传path
const self = this
let imgList = []
let options = {
files:[] // 文件路径
}
if(type==='qiniu'){
let res = await uploader.qnFileUpload(options)
return
}
let res = await uploader.urlFileUpload(options)
},
/**
* 存储图片到任务队列
* @param {Array} files 图片路径
*/
async saveToTask(files) {
// 生成key返回,然后把key放到异步上传的任务队列
let lists = []
for (let i = 0; i < files.length; i++) {
const path = files[i]
const row = await this.saveFiles(path)
lists.push(row)
}
const data = this.uploadTask
const saveLists = data.concat(lists)
this.$u.vuex('uploadTask', saveLists)
return lists
},
/**
* 选择图片
* @param {Object} data option
*/
async chooseImg(data){
const self = this
return new Promise((resolve, reject) => {
uni.chooseImage({
count: data.count || 9, //默认9
sizeType: data.sizeType || ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: data.sourceType || ['album', 'camera'], //从相册选择
success: function(res) {
const lists = self.saveToTask(res.tempFilePaths)
resolve(lists)
},
fail: err => {
console.log("err", err)
}
})
})
},
// 保存图片到本地
saveFiles(path) {
return new Promise((resolve, reject) => {
uni.saveFile({
tempFilePath: path,
success(e) {
const { savedFilePath } = e
const img = {
key: randomChar(10),
path: savedFilePath,
src: ''
}
resolve(img)
},
fail: reject
})
})
},
/**
* 上传图片公用组件
* @param {Object} type 文件上传方式
* @param {Object} attr 文件属性:图片种类[category](身份证、证件、头像);
* 图片上传其他配置[options】(如,选择图片或拍摄options.consourceType,['album', 'camera'];)其他
*/
async chooseImage(type, attr={}){
const self = this
let imgList = []
if(type==='qiniu'){
// 图片种类
let category = attr && attr.category || self.categories[0]
let config = attr && attr.options || {} // 图片上传参数配置
// 七牛上传
let options = {
onProgressUpdate(res){
let item = {
path:res.path, // 图片临时缓存路径
key:'', // 图片上传成功后相对路径
src:'', // 访问图片的绝对路径
progress:res.progress // 图片上传进度
}
if(res.fileIndex<imgList.length){
imgList[res.fileIndex].progress = res.progress
}else{
imgList.push(item)
}
imgList[res.fileIndex]
self.imgList = imgList
// 多文件上传每个文件进度条
//console.log(res,'res---onProgressUpdate')
},
onEachUpdate(res){
// 多文件上传每个文件上传成功触发
if(imgList.length>res.fileIndex){
imgList[res.fileIndex].key = res.url
imgList[res.fileIndex].src = uploader.qiniuTokenObj.visitPrefix + res.url
}
self.imgList = imgList
//console.log(res,'res---onEachUpdate')
},
cardType: category,
...config
}
// 不需要进度条等可直接获取
let res = await uploader.qnImgUpload(options)
// console.log(self.imgList,'self.imgList')
// console.log(uploader,uploader.qiniuTokenObj,'qiniuTokenObj')
// let imgList = res.map(item=>{
// return {
// key:item,
// src:uploader.qiniuTokenObj.visitPrefix + item
// }
// })
// this.imgList = imgList
return
}
// 本地服务上传
let res = await uploader.urlUpload()
this.imgList = res
},
perviewImg(index) {
let urls = []
this.imgList.map(item => {
urls.push(item.src)
})
uni.previewImage({
current: index,
urls: urls
});
},
removeImg(index) {
this.imgList.splice(index, 1)
// this.$emit('image-change', this.imgList) //将图片回传父页面
},
}
}
import uploader from '@/plugins/uploader/index.js'
const globalUrl = process.uniEnv || {}
const randomChar = function(l, url = "") {
const x = "0123456789qwertyuioplkjhgfdsazxcvbnm";
let tmp = "";
let time = new Date();
for (let i = 0; i < l; i++) {
tmp += x.charAt(Math.ceil(Math.random() * 100000000) % x.length);
}
return (
"file/" +
url +
time.getTime() +
tmp
);
}
export default {
name: 'upload',
components: {},
data() {
return {
imgList:[],
// 上传文件种类:0--头像、1--证件、2--身份证
categories: ['avatar', 'cert', 'id'],
};
},
created() {
// this.initQiniu()
},
methods: {
async uploadPath(type){
// 可以直接上传path
const self = this
let imgList = []
let options = {
files:[] // 文件路径
}
if(type==='qiniu'){
let res = await uploader.qnFileUpload(options)
return
}
let res = await uploader.urlFileUpload(options)
},
/**
* 存储图片到任务队列
* @param {Array} files 图片路径
*/
async saveToTask(files) {
// 生成key返回,然后把key放到异步上传的任务队列
let lists = files.map(v => {
return {
key: randomChar(10),
path: v,
src: ''
}
})
// for (let i = 0; i < files.length; i++) {
// const path = files[i]
// const row = await this.saveFiles(path)
// lists.push(row)
// }
const data = this.uploadTask
const saveLists = data.concat(lists)
this.$u.vuex('uploadTask', saveLists)
return lists
},
/**
* 选择图片
* @param {Object} data option
*/
async chooseImg(data){
const self = this
return new Promise((resolve, reject) => {
uni.chooseImage({
count: data.count || 9, //默认9
sizeType: data.sizeType || ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: data.sourceType || ['album', 'camera'], //从相册选择
success: function(res) {
const lists = self.saveToTask(res.tempFilePaths)
resolve(lists)
},
fail: err => {
console.log("err", err)
}
})
})
},
// 保存图片到本地
saveFiles(path) {
return new Promise((resolve, reject) => {
uni.saveFile({
tempFilePath: path,
success(e) {
const { savedFilePath } = e
const img = {
key: randomChar(10),
path: savedFilePath,
src: ''
}
resolve(img)
},
fail: reject
})
})
},
/**
* 上传图片公用组件
* @param {Object} type 文件上传方式
* @param {Object} attr 文件属性:图片种类[category](身份证、证件、头像);
* 图片上传其他配置[options】(如,选择图片或拍摄options.consourceType,['album', 'camera'];)其他
*/
async chooseImage(type, attr={}){
const self = this
let imgList = []
if(type==='qiniu'){
// 图片种类
let category = attr && attr.category || self.categories[0]
let config = attr && attr.options || {} // 图片上传参数配置
// 七牛上传
let options = {
onProgressUpdate(res){
let item = {
path:res.path, // 图片临时缓存路径
key:'', // 图片上传成功后相对路径
src:'', // 访问图片的绝对路径
progress:res.progress // 图片上传进度
}
if(res.fileIndex<imgList.length){
imgList[res.fileIndex].progress = res.progress
}else{
imgList.push(item)
}
imgList[res.fileIndex]
self.imgList = imgList
// 多文件上传每个文件进度条
},
onEachUpdate(res){
// 多文件上传每个文件上传成功触发
if(imgList.length>res.fileIndex){
imgList[res.fileIndex].key = res.url
imgList[res.fileIndex].src = uploader.qiniuTokenObj.visitPrefix + res.url
}
self.imgList = imgList
},
cardType: category,
...config
}
// 不需要进度条等可直接获取
let res = await uploader.qnImgUpload(options)
// let imgList = res.map(item=>{
// return {
// key:item,
// src:uploader.qiniuTokenObj.visitPrefix + item
// }
// })
// this.imgList = imgList
return
}
// 本地服务上传
let res = await uploader.urlUpload()
this.imgList = res
},
perviewImg(index) {
let urls = []
this.imgList.map(item => {
urls.push(item.src)
})
uni.previewImage({
current: index,
urls: urls
});
},
removeImg(index) {
this.imgList.splice(index, 1)
// this.$emit('image-change', this.imgList) //将图片回传父页面
},
}
}
......@@ -91,7 +91,6 @@ export default {
}
qiniuUploader.upload(params, (res) => {
console.log(res,'res111')
let inLen = self.maximum - fileList.length
if (inLen > 0) {
item.src = file
......
......@@ -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 && !result.statusCode) { // 匹配已上传完成的图片,更新缓存数据
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
}
},
{
......
......@@ -392,15 +392,6 @@
itemClick: function(currentItem, ikey) {
this.isSelect = true
// console.log('选点点击--处理前--this.currentItem:')
// console.log(this.currentItem)
// console.log('选点点击--处理前--ikey:')
// console.log(ikey)
// console.log('选点点击--处理前--题目类型,1单选,2多选,3简答:')
// console.log(this.currentItem.question.answerType)
//answerType 题目类型,1单选,2多选,3简答,
for (let i = 0; i < this.currentItem.answerList.length; i++) {
......@@ -434,12 +425,6 @@
//有选答案
this.isSelect = isSelect
// console.log('选点点击--处理后--this.currentItem.answerList:')
// console.log(this.currentItem.answerList)
},
// 点击下一步
handleClick() {
......
<template>
<TabBarPage title="扳手会" :fixed="true">
<TabBarPage title="扳手会" :fixed="true" @click="goTop">
<view class="content-view">
<scroll-view scroll-y @scrolltolower="reachBottom"
<scroll-view style="height: 100%;" scroll-y @scrolltolower="reachBottom" :scroll-top="scrollTop" @scroll="scroll"
scroll-anchoring scroll-y="true" refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100"
refresher-background="#F4F5F7" @refresherpulling="triggered = true" @refresherrefresh="onRefresh"
refresher-background="#F4F5F7" @refresherpulling="triggered = true" @refresherrefresh="onRefresh"
@refresherrestore="onRestore" @refresherabort="onAbort" enable-back-to-top>
<!-- <TabBarPage title="扳手会"> -->
<image class="banner-image" :src="bannerImage" @click="handleClickBanner"></image>
......@@ -116,7 +116,11 @@
waitInit: false, // 当token为空时,等待自动登录结束
triggered: false,
_freshing: false,
visible: false,
visible: false,
scrollTop: 0,
old: {
scrollTop: 0
}
};
},
watch: {
......@@ -172,20 +176,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 +264,6 @@
}
});
},
onRestore() {
this.triggered = "restore";
},
reachBottom() {
if (this.vuex_token) {
if (this.currentLoadStatus != 'loadmore') return
......@@ -284,9 +271,6 @@
this.loadOrderList()
}
},
onPulling(e) {
console.log("onpulling", e);
},
onRefresh() {
if (this._freshing) return;
this._freshing = true;
......@@ -294,15 +278,16 @@
},
onRestore() {
this.triggered = 'restore'; // 需要重置
console.log("onRestore");
},
onAbort() {
console.log("onAbort");
},
// clickSwiper(index) {},
handleScroll() {
console.log("-----scroll-------");
},
scroll(e) {
this.old.scrollTop = e.detail.scrollTop
},
goTop(e) {
this.scrollTop = this.old.scrollTop
this.$nextTick(function() {
this.scrollTop = 0
});
},
/* 立即入驻 */
immediatelyIn() {
if (this.vuex_token) {
......
......@@ -6,7 +6,7 @@
<image :src="bannerImage" mode="" class="banner"></image>
<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>
......@@ -21,7 +21,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">
......@@ -41,7 +41,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">
......@@ -101,7 +101,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">
......@@ -212,6 +212,7 @@ var json = {
pic: process.uniEnv.qn_base_url + "fwgf-3x-v2.png",
percent: 0,
status: "",
id: 597,
sectionId: "",
},
{
......@@ -220,6 +221,7 @@ var json = {
pic: process.uniEnv.qn_base_url + "jdgf-3x-v2.png",
percent: 0,
status: "",
id: 598,
sectionId: "",
},
{
......@@ -228,6 +230,7 @@ var json = {
pic: process.uniEnv.qn_base_url + "cdz-3x-v2.png",
percent: 0,
status: "",
id: 599,
sectionId: "",
},
],
......@@ -264,7 +267,7 @@ var examJson = {
{
title: "安装材料及工具准备",
desc: "通过本认证,是接单的必要条件",
condition: "随机10题,及格10题",
condition: "随机4题,及格4题",
status: "",
pic: process.uniEnv.qn_base_url + "fwgf-e-3x.png",
id: 3,
......@@ -274,7 +277,7 @@ var examJson = {
isComplete: false,
},
{
title: "交付规范",
title: "接单规范",
desc: "快速认证,是否具备接单操作能力",
condition: "随机5题,及格5题",
status: "",
......@@ -290,7 +293,7 @@ var examJson = {
{
title: "安装材料及工具准备",
desc: "通过本认证,是接单的必要条件",
condition: "随机20题,及格20题",
condition: "随机4题,及格4题",
status: "",
pic: process.uniEnv.qn_base_url + "fwgf-e-3x.png",
id: 3,
......@@ -300,9 +303,9 @@ var examJson = {
questionTime: null,
},
{
title: "接单操作",
title: "接单规范",
desc: "快速认证,是否具备接单操作能力",
condition: "随机20题,及格16题",
condition: "随机5题,及格5题",
status: "",
pic: process.uniEnv.qn_base_url + "jdgf-e-3x.png",
id: 4,
......@@ -406,6 +409,7 @@ export default {
isReflesh: true,
triggered: false,
_freshing: false,
isOnLoad: 0
};
},
onLoad(param) {
......@@ -423,13 +427,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);
}
},
......@@ -443,7 +448,6 @@ export default {
},
onPulling(e) {
return true;
console.log("onpulling", e);
},
onRefresh() {
if (this._freshing) return;
......@@ -455,7 +459,6 @@ export default {
},
onRestore() {
this.triggered = "restore"; // 需要重置
console.log("onRestore");
},
onAbort() {
console.log("onAbort");
......@@ -652,10 +655,6 @@ export default {
this.examList[i].examId = res.data.id;
this.examList[i].examStatus = res.data.examStatus; //i;//
this.examList[i].questionTime = res.data.questionTime;
console.log(
this.examList[i].questionTime,
"每题考试时间"
);
let examResult = res.data.examLevelResult;
this.examList[i].status =
examResult != "" ? examResult : "未通过";
......@@ -672,25 +671,20 @@ export default {
// examStatus 用户考试状态 0考试中 1考试完成 2未参与
that.exam = res.data;
console.log(that.exam);
if (res.data.examStatus == 2) {
console.log("examStatus " + i + " 2");
return;
}
if (res.data.examStatus == 1) {
console.log("examStatus " + i + " 1");
that.examList[i].isComplete =
this.examList[i].status == "通过";
that.examScore = res.data.examScore;
return;
}
if (res.data.examStatus == 0) {
console.log("examStatus " + i + " 0");
that.userExamId = res.data.id;
}
})
.catch((err) => {
console.log("getUserExamInfo err" + err);
uni.hideLoading();
uni.showToast({
icon: "none",
......
......@@ -21,7 +21,7 @@
<view class="list-view">
<u-cell-group :border="false">
<view v-for="(item, index) in items" :key="index">
<u-cell-item :value="item.value" :border-bottom="false" @click="handleClick(index)">
<u-cell-item :value="item.value" :border-bottom="false" @click="handleClick(item.pathName)">
<image slot="icon" :src="qnPath + item.icon" :style="item.imageStyle"></image>
<view slot="title" class="item-title">{{item.title}}</view>
<view slot="value" class="item-value">{{value}}</view>
......@@ -49,56 +49,63 @@
},
computed: {
settled() {
return this.vuex_settled && this.vuex_settled.record || null
return this.vuex_token && this.vuex_settled && this.vuex_settled.record || null
},
avatar() {
return this.vuex_settled && this.vuex_settled.avatar || ''
},
name() {
return this.settled && (this.settled.id_card_name
|| this.settled.nickname || this.settled.name) || ''
return this.vuex_settled && this.vuex_settled.avatar
},
name() {
return (this.settled && (this.settled.id_card_name || this.settled.name)) || (this.vuex_user && (this.vuex_user.name || this.vuex_user.loginName))
},
mobile() {
return this.settled && this.settled.mobile || ''
return (this.settled && this.settled.mobile) || (this.vuex_user && this.vuex_user.mobile)
},
items() {
return [{
return [
{
pathName: 'wallet',
title: '我的钱包',
value: '',
icon: 'qianbao.png',
imageStyle: 'width:34rpx;height:32rpx'
},
{
{
pathName: 'deposit',
title: '配件押金',
value: '',
icon: 'yajin.png',
imageStyle: 'width:32rpx;height:32rpx'
},
{
{
pathName: 'contract',
title: '我的合同',
value: '',
icon: 'hetong.png',
imageStyle: 'width:34rpx;height:32rpx'
},
{
{
pathName: 'cert',
title: '我的证件',
value: '',
icon: 'zhengjian.png',
imageStyle: 'width:36rpx;height:28rpx'
},
{
{
pathName: 'address',
title: '收货地址',
value: '',
icon: 'wddizhi.png',
imageStyle: 'width:32rpx;height:32rpx'
},
{
{
pathName: 'warehouse',
title: '我的仓库',
value: '',
icon: 'cangku.png',
imageStyle: 'width:36rpx;height:32rpx'
},
{
{
pathName: 'customer',
title: '联系客服',
value: this.serviceTel,
icon: 'lxkefu.png',
......@@ -109,9 +116,6 @@
telTip() {
return this.mobile && '已绑定手机'|| '绑定手机号'
},
pages() {
return ['wallet', 'deposit', 'contract', 'cert', 'address', 'warehouse', 'customer']
},
headImageUrl() {
return this.avatar || this.placeholderImage
},
......@@ -138,10 +142,10 @@
let self = this
app.getBaseInfo(self);
},
handleClick(index) {
handleClick(path) {
if(this.vuex_token) {
this.$u.route({
url: 'pages/mine/' + this.pages[index] + '/index'
url: 'pages/mine/' + path + '/index'
})
} else {
this.$u.route({url: "pages/login/index"})
......@@ -239,8 +243,9 @@
.list-view {
background-color: #FFFFFF;
border-radius: 16rpx 16rpx 0 0;
border-radius: 32rpx 32rpx 0 0;
overflow: hidden;
padding-top: 16rpx;
.item-title {
font-size: 32rpx;
......
......@@ -24,7 +24,7 @@
<scroll-view scroll-y style="height: 100%;width: 100%;" @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">
@refresherrestore="onRestore">
<NoOrder v-if="noMore" type="black" :customStyle="noOrderCustomStyle" />
<template v-else>
<view v-for="(item, index) in orderList" :key="item.orderId">
......@@ -315,9 +315,6 @@
url: 'pages/order/search'
})
},
onPulling(e) {
console.log("onpulling", e);
},
onRefresh() {
if (this._freshing) return;
this._freshing = true;
......@@ -329,11 +326,7 @@
},
onRestore() {
this.triggered = 'restore'; // 需要重置
console.log("onRestore");
},
onAbort() {
console.log("onAbort");
}
}
};
</script>
......
......@@ -217,7 +217,6 @@ export default {
return;
}
if (res.data.data.examStatus == 1) {
console.log("111111111111111111111111111");
that.isComplete = true;
that.examScore = res.data.data.examScore;
return;
......@@ -285,11 +284,6 @@ export default {
// this.endTime = timestamp + time * 1000;
this.currentTime = parseInt(time * 1000); //this.formatTimeToMini(timestamp);//endTime-currentTime再格式化时间显示
that.getNext();
console.log(
this.endTime,
this.currentTime,
"总时间"
);
}
} else {
uni.showToast({
......@@ -361,15 +355,12 @@ export default {
}
if (res.data.code == 200) {
that.currentItem = res.data.data;
console.log(that.currentItem);
that.progress = res.data.data.progress;
if (res.data.data.isQuestion) {
let str = res.data.data.question.content;
var wz = str.indexOf(".");
let str1 = str.substring(wz + 1);
console.log(that.currentItem);
that.currentItem.question.content = str1.replace('*', '');
console.log(str1, "切割的字符串");
}
if (res.data.data.answerList) {
that.handleData();
......@@ -423,12 +414,6 @@ export default {
if (this.everyTime > 0) {
this.timer = setTimeout(this.startCounting, 1000);
console.log(
"endTime:" + this.endTime,
"everyTime:" + this.everyTime,
"currentTime:" + this.currentTime,
"答案:" + this.userAnswerIds
);
} else {
clearTimeout(this.timer);
this.everyTime = 90;
......@@ -438,16 +423,7 @@ export default {
itemClick: function (currentItem, ikey) {
this.isSelect = true;
// console.log('选点点击--处理前--this.currentItem:')
// console.log(this.currentItem)
// console.log('选点点击--处理前--ikey:')
// console.log(ikey)
// console.log('选点点击--处理前--题目类型,1单选,2多选,3简答:')
// console.log(this.currentItem.question.answerType)
//answerType 题目类型,1单选,2多选,3简答,
//answerType 题目类型,1单选,2多选,3简答
for (let i = 0; i < this.currentItem.answerList.length; i++) {
var item = this.currentItem.answerList[i];
......@@ -481,9 +457,6 @@ export default {
//有选答案
this.isSelect = isSelect;
// console.log('选点点击--处理后--this.currentItem.answerList:')
// console.log(this.currentItem.answerList)
},
// 点击下一步
handleClick() {
......@@ -531,7 +504,6 @@ export default {
// if(this.userAnswerIds.length == 1)
this.userAnswerIds =
this.userAnswerIds + "," + item.id;
console.log(this.userAnswerIds, "答案答案");
}
//*/
} else {
......
......@@ -41,7 +41,6 @@ export default {
onLoad(a) {
this.examId = a.examId;
this.userExamId = a.userExamId;
console.log("userExamId是", this.userExamId);
this.getCourseResult();
},
onUnload() {
......@@ -54,7 +53,6 @@ export default {
.getExamResult(this.examId)
.then((res) => {
if (res.code != 200) {
console.log("getUserExamInfo 200 err");
uni.showToast({
icon: "none",
title: "获取考试结果失败",
......@@ -65,7 +63,6 @@ export default {
this.score = this.result.examScore;
})
.catch((err) => {
console.log("getUserExamInfo err" + err);
uni.hideLoading();
uni.showToast({
icon: "none",
......
......@@ -45,7 +45,6 @@ export default {
onLoad(a) {
this.userExamId = a.userExamId;
this.examId = a.examId;
console.log("userExamId是", this.userExamId);
this.getCourseResult();
},
onUnload() {
......@@ -58,7 +57,6 @@ export default {
.getExamResult(this.examId)
.then((res) => {
if (res.code != 200) {
console.log("getUserExamInfo 200 err");
uni.showToast({
icon: "none",
title: "获取考试结果失败",
......@@ -69,7 +67,6 @@ export default {
this.score = this.result.examScore;
})
.catch((err) => {
console.log("getUserExamInfo err" + err);
uni.hideLoading();
uni.showToast({
icon: "none",
......@@ -81,7 +78,6 @@ export default {
getAgain: function () {
let examId = this.examId;
let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
console.log(routes.length);
uni.navigateTo({
url: "/pages/learn/assessment?examId=" + examId,
});
......
......@@ -32,6 +32,7 @@
<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">
......@@ -120,8 +121,6 @@
},
methods: {
scroll: function(e) {
console.log('--scroll--')
console.log(e)
this.old.scrollTop = e.detail.scrollTop
},
goNext(info) {
......@@ -149,8 +148,6 @@
}else{
this.scrollValue = 0
}
console.log('--移动距离--')
console.log(this.scrollValue)
},
onPlayerTimeupdate(player) {
let intCurrentTime = parseInt(player.detail.currentTime);
......@@ -219,8 +216,6 @@
}
if (res.data) {
this.sectionInfo = res.data
console.log("----节信息----")
console.log(this.sectionInfo)
this.nextSectionId = this.sectionInfo.nextSectionId
let wareVal = this.sectionInfo.ware
this.courseTitle = res.data.name
......@@ -236,7 +231,6 @@
let coureWareList = res.data.courseware
this.courseSrc = coureWareList[0].src
this.videoTotalTime = parseInt(JSON.parse(coureWareList[0].info).time) - 1;
console.log('视频时长信息:' + this.videoTotalTime)
}
}
})
......@@ -372,13 +366,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 {
......@@ -455,7 +449,6 @@
width: 100%;
height: 150rpx;
overflow: hidden;
padding-left: 20rpx;
background: #fff;
margin-top: 30rpx;
}
......@@ -490,9 +483,9 @@
.teacher-disc {
font-size: 24rpx;
margin-left: 30rpx;
margin-top: 6rpx;
color: #999999;
padding-left: 30rpx;
}
.kc-image {
......
......@@ -209,6 +209,7 @@ export default {
this.$u.vuex('vuex_user', null);
this.$u.vuex('vuex_wx_uid', '');
}
this.$u.vuex('vuex_settled', null);
},
setLoginStatus(authed = true) {
......
......@@ -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>
......@@ -55,7 +55,6 @@ export default {
res.data[i].name = res.data[i].name.replace(re, "");
}
this.res = this.res.concat(res.data);
console.log(this.res);
}
} else {
//接口请求失败的处理
......
......@@ -10,7 +10,7 @@
<view class="amount"><text class="prefix">¥</text>{{ amount }}</view>
</view>
<view class="rules">
<view class="title">质保金规则</view>
<view class="title">配件押金规则</view>
<view class="item" v-for="(item, index) in rules" :key="index">
<view class="question">
<view class="qa-icon danger-bg">Q</view>
......@@ -33,15 +33,12 @@
return {
rules: [
{
question: '为什么缴纳设备押金?',
answer: `设备押金是什么什么什么,应该巴拉巴拉巴拉,所以
要缴纳,巴拉巴拉巴拉。`
question: '为什么缴纳配件押金?',
answer: '充电桩为客户私人设备,由扳手会保管代发,为安装流程顺利进行,在接单至订单完工过程中由技工师傅保管,因此需缴纳一定额度配件押金,押金可退还。'
},
{
question: '退还设备押金说明',
answer: `设备押金的退还说明是什么什么样的,应该怎么怎么
样,先找客服,然后再怎么怎么样,然后再怎么怎么
样,这样就可以了。`
question: '退还配件押金说明',
answer: '技工师傅与扳手会结束合作关系后即可申请退还缴纳的配件押金。'
}
],
};
......@@ -68,7 +65,6 @@
},
refund() {
this.$u.route({
type: 'redirect',
url: "pages/mine/customer/index"
})
},
......
......@@ -4,7 +4,7 @@
:border-bottom="false" title-bold></u-navbar>
<view class="wallet-content-view">
<view class="header-view">
<image class="header-image" mode="widthFix" :src="qianbaobeijing"></image>
<image class="header-image" :src="qianbaobeijing"></image>
</view>
<view class="survey-view">
<view class="survey-top-view">
......@@ -35,7 +35,7 @@
</view>
</view>
<view class="content-list-right">
<text class="content-list-right-text">点击查看</text>
<text class="content-list-right-text">{{ item.value }}</text>
<u-icon name="arrow-right"></u-icon>
</view>
</view>
......@@ -90,11 +90,13 @@
return [{
title: '结算账单',
content: '展示您已提现的账单信息',
icon: this.imageUrl + 'jiesuan.png'
icon: this.imageUrl + 'jiesuan.png',
value: '点击查看'
}, {
title: '收入流水',
content: this.statementContent,
icon: this.imageUrl + 'liushui.png'
icon: this.imageUrl + 'liushui.png',
value: '查看全部'
}]
},
items() {
......@@ -124,13 +126,13 @@
return ['settlement','statement']
}
},
onLoad() {
// 未登录,先跳转登录
if(!this.vuex_token) {
this.$u.route({url: 'pages/login/index'})
}
this.loadAssets()
this.loadStatement()
onShow() {
// 未登录,先跳转登录
if(!this.vuex_token) {
this.$u.route({url: 'pages/login/index'})
}
this.loadAssets()
this.loadStatement()
},
methods: {
// 提现
......@@ -191,9 +193,10 @@
position: absolute;
width: 100%;
padding-top: 10rpx;
padding-left: 6rpx;
padding-left: 14rpx;
.header-image {
width: 100%;
width: 730rpx;
height: 420rpx;
}
}
......
......@@ -73,7 +73,7 @@
return this.loading || this.info.payableRecordExtendDtos && this.info.payableRecordExtendDtos.length
},
banner() {
return this.imageUrl + 'Bill.png'
return this.imageUrl + 'receipt.png'
},
},
onLoad() {
......
......@@ -72,8 +72,8 @@
number: this.data.statementList.length
}
},
endTime() {
this.$u.DateTimeFormat(new Date().getTime(), 'YYYY-MM-DD')
endTime() {
this.moment().format('YYYY-MM-DD')
},
items() {
return {
......@@ -90,7 +90,7 @@
return process.uniEnv.qn_base_url
},
banner() {
return this.imageUrl + 'Bill.png'
return this.imageUrl + 'receipt.png'
},
hasInfo() {
return this.loading || this.data.statementList && this.data.statementList.length
......
......@@ -3,15 +3,24 @@
<u-navbar back-icon-color="#333333" background="#F4F5F7" title="提现" titleColor="#333333" :border-bottom="false" title-bold>
</u-navbar>
<view class="withdraw-content">
<view class="withdraw-content-main">
<view class="amount-title">可提现金额</view>
<view class="amount-text"><text class="amount-symbol">¥</text>{{amount}}</view>
<u-button type="primary" shape="circle" :custom-style="buttonStyle" @click="handleClick">提现</u-button>
<view v-if="!submit">
<view class="withdraw-content-main">
<view class="amount-title">可提现金额</view>
<view class="amount-text"><text class="amount-symbol">¥</text>{{amount}}</view>
<u-button type="primary" shape="circle" :custom-style="buttonStyle" @click="handleClick">全部提现</u-button>
</view>
<view class="line-view"></view>
<view class="rule-title">提现规则说明</view>
<view class="rule-content">1.提现金额:提现金额是指已完工订单通过平台审核后且达到合同账期的订单费用之总和。</view>
<view class="rule-content">2.提现到账时间具体以银行结果为准</view>
</view>
<view class="line-view"></view>
<view class="rule-title">提现规则说明</view>
<view class="rule-content">1.提现金额:提现金额是指已完工订单通过平台审核后且达到合同账期的订单费用之总和。</view>
<view class="rule-content">2.提现到账时间为1-3个工作日,最终以银行结果为准</view>
<view v-else class="submited-view">
<image class="success-image" :src="imageUrl"></image>
<view>您已提交提现申请</view>
<view class="submited-button">
<u-button type="primary" shape="circle" :custom-style="buttonStyle" @click="handleClickSure">我知道了</u-button>
</view>
</view>
</view>
</view>
</template>
......@@ -20,7 +29,8 @@
export default {
data() {
return {
amount: 0,
amount: 0,
submit: false
}
},
computed: {
......@@ -31,6 +41,9 @@
"font-size": "32rpx",
"font-weight": "bold",
};
},
imageUrl() {
return process.uniEnv.qn_base_url + 'chenggong.png'
},
},
onLoad() {
......@@ -42,7 +55,7 @@
if(self.amount) {
let res = await self.$u.api.workerApplyPay()
if(res && res.code == 200) {
self.$u.route({type: 'redirect', url: 'pages/mine/wallet/index'})
self.submit = true
} else {
self.$u.toast(res.message || '系统异常,提现失败!');
}
......@@ -54,7 +67,10 @@
if(res && res.code == 200) {
self.amount = res.data && res.data.canApplyAmount
}
},
},
handleClickSure() {
this.$u.route({type: 'back'})
}
}
}
</script>
......@@ -110,6 +126,22 @@
color: #666666;
margin-bottom: 20rpx;
line-height: 40rpx;
}
.submited-view {
text-align: center;
color: #2272FF;
font-size: 40rpx;
font-weight: bold;
.success-image {
width: 224rpx;
height: 224rpx;
margin-top: 80rpx;
}
}
.submited-button {
margin-top: 100rpx;
margin-bottom: 100rpx;
}
}
......
......@@ -32,7 +32,7 @@
<view class="width-80 center">{{ item.outAmount }}</view>
<view class="width-140 create-time">{{ (item.updateTime || item.createTime) | datefmt('YYYY.MM.DD HH:mm:ss')}}</view>
</view>
<u-loadmore :status="status" @loadmore="loadRecord" />
<u-loadmore class="load-more" :status="status" @loadmore="loadRecord" />
</view>
</view>
</view>
......@@ -180,4 +180,7 @@
.break {
word-break:break-all;
}
.load-more {
margin-top: 20rpx;
}
</style>
......@@ -247,7 +247,7 @@
}
this.loadOrderDetail()
this.loadOrderRecord()
// this.getLocation()
this.getLocation()
this.getSignDistance()
},
onHide() {
......@@ -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
}
},
......
......@@ -108,7 +108,7 @@
self.loadStatus = res.data.total > self.orderList.length ? 'loadmore' : 'nomore'
}
} else {
self.$u.toast(res.message);
self.$u.toast('请求失败');
}
self.loaded = true
});
......
This diff is collapsed.
......@@ -144,27 +144,6 @@
}
},
methods: {
getListData: function() {
this.loading = true
let that = this
this.$u.cloudApi.getGroupStandardV2({
'token': this.vuex_token,
'classify_id': this.classifyId,
'system_id': this.systemId,
'brand_id': this.brandId
}).then(res => {
this.loading = false
if (res && res.result) {
if (res.result.error_code) {
uni.showToast({
title: res.result.error_msg
})
} else {
that.handleData(res.result)
}
}
})
},
getListDataNew() {
this.loading = true
let self = this
......@@ -251,17 +230,6 @@
url: '/pages/photo/take'
})
},
// 清除图片
handleClickSure: function() {
this.$u.cloudApi.cleanImage({
'token': this.vuex_token,
}).then(res => {
this.isPopShow = false
if (res && res.result) {
this.getListData()
}
})
},
take(item,ikey) {
this.currentItemDate = item
......
This diff is collapsed.
......@@ -122,46 +122,8 @@
const globalData = getApp().globalData
this.icon_close_new = globalData.icon_close_new
this.systemId = globalData.photo.product.systemId
this.getItemList()
},
methods: {
getItemList: function() {
// this.systemId = '79550af260555cc20afb34156c94b32c' // 测试数据
this.loading = true
this.$u.cloudApi.getUserWatermark({
'token': this.vuex_token,
'system_id': this.systemId
}).then(res => {
if (res && res.result) {
if(res.result.error_code){
uni.showToast({title: res.result.error_msg})
}else{
this.result = res.result
}
}else{
uni.showToast({title: '网络异常'})
}
this.loading = false
})
},
saveUserWatermark: function() {
this.loading = true
this.$u.cloudApi.saveUserWatermark({
'token': this.vuex_token,
'watermark': this.result
}).then(res => {
if (res.result.code == true) {
const photo = getApp().globalData.photo
photo.waterSetting = this.result
}else{
uni.showToast({title: res.result.msg})
}
this.loading = false
})
},
//保存原图 开关
handleOrigineChange: function(e) {
this.result['hasOrigin'] = !this.result['hasOrigin']
......
......@@ -45,8 +45,6 @@
itemClick: function (item, ikey) {
this.selected_age = item.title
this.selected_index = ikey
console.log(item.title)
console.log(ikey)
},
confirmClick: function () {
......
......@@ -344,7 +344,6 @@
...baseInfo,
recommender: getApp().globalData.settleRecommend
}
console.log(params, 'params')
params.service_area = baseInfo.service_area.join(',')
const res = await this.$u.api.submitSettleBaseInfo(params)
this.saving = false;
......
......@@ -322,11 +322,16 @@ export default {
break;
}
await self.chooseImage("qiniu", {...attr, options: {count: 1}})
if (self.uploadType === 'id_card_front' || self.uploadType === 'id_card_back') {
await self.chooseImage("qiniu", {...attr, options: {count: 1}})
} else {
self.imgList = await self.chooseImg({count: 1})
}
if(self.uploadType && self.imgList && self.imgList.length > 0) {
// 设置图片对象
self.imgObj[self.uploadType] = self.imgList
self.formShowList[index].imgs[key] = self.imgList[0].src
self.formShowList[index].imgs[key] = self.imgList[0].path
this.updateImgs()
}
},
......@@ -349,14 +354,14 @@ export default {
let imgs = []
otherImgs.map(item => {
const img = item.key || item.src || ''
const img = item.key || ''
imgs.push(img)
})
this.fileInfo['other_photos'][photoType]['url'] = imgs.join(',')
return
}
this.fileInfo[uploadType] = uploadImgs[0].key || uploadImgs[0].src || ''
this.fileInfo[uploadType] = uploadImgs[0].key || '' //(uploadType === 'id_card_front' || uploadType === 'id_card_back') ? uploadImgs[0].src : (uploadImgs[0].key || '')
},
toUploadImg(item, index) {
this.uploadType = item.filedName
......@@ -372,7 +377,7 @@ export default {
},
async checkIdCard(type) {
uni.showLoading({
title: '加载中'
title: '识别中'
})
let request = {
front: this.$u.api.checkSettleIDCardFront,
......@@ -461,9 +466,9 @@ export default {
return formFlag;
},
async submitFileInfo() {
if (!this.submitBtnStatus) {
return
async submitFileInfo() {
if (!this.submitBtnStatus) {
return
}
if (!this.checkFileInfo()) {
return;
......@@ -472,7 +477,7 @@ export default {
fileInfo.other_photos = JSON.stringify(fileInfo.other_photos)
let submitInfoData = {
...fileInfo,
recommender: getApp().globalData.settleRecommend
recommender: getApp().globalData.settleRecommend,
}
uni.showLoading({
title: '加载中……'
......@@ -529,7 +534,7 @@ export default {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
flex-direction: column;
overflow-y:auto;
}
......@@ -748,9 +753,9 @@ export default {
padding: 38rpx 30rpx 30rpx 30rpx;
margin-bottom: 20rpx;
font-size: 32rpx;
color: #333333;
.title-left-view {
font-weight: bold;
color: #333333;
.title-left-view {
font-weight: bold;
}
.title-image {
......
......@@ -161,7 +161,6 @@
// appid:'wxd1d6eede324b0465'
}
const response = await this.$u.api.paySettleDeposit(params)
console.log(response)
if (response.code !== 200) {
this.saving = false
uni.showToast({
......@@ -188,7 +187,6 @@
})
} else if (result == "fail") {
// charge 不正确或者微信公众账号/QQ 公众号/支付宝口碑支付失败时会在此处返回
// console.log(err.msg)
this.showPopView()
} else if (result == "cancel") {
// 微信公众账号、QQ 公众号、支付宝口碑支付取消支付
......@@ -210,11 +208,9 @@
cancelText: '失败',
success: ((res) => {
if (res.confirm) {
// console.log(res.confirm,'res.confirm')
this.pending()
} else if (res.cancel) {
this.pending()
console.log('用户点击取消');
}
})
});
......
......@@ -169,7 +169,6 @@
// const status = 7
const infoArr = this.promptList.filter(item => {
const itemStatus = item.status
// console.log(itemStatus,'itemStatus')
let idx = -2
if (Array.isArray(itemStatus)) {
idx = itemStatus.indexOf(status)
......@@ -229,7 +228,6 @@
// if (res.confirm) {
// uni.openSetting({
// success(res) {
// console.log(res.authSetting)
// }
// });
// }
......
......@@ -28,7 +28,6 @@ let uploader = new request(baseOptions);
// 添加获取七牛云token的方法
uploader.getQnToken = function(params) {
//该地址需要开发者自行配置(每个后台的接口风格都不一样)
// console.log(uploader.get,'uploader.get')
return new Promise((resolve, reject) => {
uploader.post(baseOptions.qiniuUploadUrl, params).then(data => {
/*
......@@ -118,13 +117,6 @@ let loginPopupNum = 0;
//所有接口数据处理(可在接口里设置不调用此方法)
//此方法需要开发者根据各自的接口返回类型修改,以下只是模板
uploader.dataFactory = async function(res) {
console.log("接口请求数据", {
url: res.url,
resolve: res.response,
header: res.header,
data: res.data,
method: res.method,
});
if (res.response.statusCode && res.response.statusCode == 200) {
// let httpData = res.response.data;
let httpData = res.response;
......@@ -132,7 +124,6 @@ uploader.dataFactory = async function(res) {
httpData = JSON.parse(httpData);
}
/*********以下只是模板(及共参考),需要开发者根据各自的接口返回类型修改*********/
console.log(httpData, 'httpData')
//判断数据是否请求成功
if (httpData.statusCode === 200) {
// 返回正确的结果(then接受数据)
......
......@@ -31,7 +31,6 @@ export default class request {
//get请求
get(url = '', data = {}, options = {}) {
console.log(this.request,'this.request')
return this.request({
method: "GET",
data: data,
......
......@@ -67,7 +67,6 @@ export const dispatchRequest = function(requestInfo) {
}
// #endif
let requestTask = uni.request(requestData);
console.log(requestTask,requestData,'requestTask')
setTimeout(() => {
if(requestAbort){
requestTask.abort();
......
......@@ -16,7 +16,6 @@ export const randomChar = function(l, url = "") {
}
//图片选择
export const chooseImage = function(data) {
console.log(data,'data-chooseImage')
return new Promise((resolve, reject) => {
uni.chooseImage({
count: data.count || 9, //默认9
......@@ -125,9 +124,6 @@ export const qiniuUpload = function(requestInfo, qnRes) {
uptokenURL: 'UpTokenURL.com/uptoken' // 上传地址
}, (res) => {
requestInfo.onProgressUpdate && requestInfo.onProgressUpdate(Object.assign({}, fileData, res));
// console.log('上传进度', res.progress)
// console.log('已经上传的数据长度', res.totalBytesSent)
// console.log('预期需要上传的数据总长度', res.totalBytesExpectedToSend)
});
}
// });
......
......@@ -15,7 +15,6 @@ router.beforeEach((to, from, next) => {
});
// 全局路由后置守卫
router.afterEach((to, from) => {
console.log('跳转结束')
})
export {
......
......@@ -2,7 +2,6 @@ import {
mapState
} from 'vuex'
import store from "@/store/index"
console.log(store, store.state, 'store')
// 尝试将用户在根目录中的store/index.js的vuex的state变量,全部加载到全局变量中
let $uStoreKey = [];
......
......@@ -63,6 +63,5 @@ const store = new Vuex.Store({
}
}
})
console.log(store,'store----------------')
export default store
......@@ -77,7 +77,6 @@ function oauth() {
uni.getProvider({
service: 'oauth',
success: function (res) {
console.log(res.provider)
if (~res.provider.indexOf('weixin')) {
// weixin 微信登录
login('weixin').then(res=>{resolve(res)}).catch(err=>{reject(err)})
......@@ -107,7 +106,6 @@ function login(provider) {
uni.login({
provider: provider,
success(res) {
console.log(JSON.stringify(res));
resolve(res);
},
fail(err) {
......
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