This commit is contained in:
Vinjor 2025-01-22 14:30:50 +08:00
parent afe1959390
commit 0a6e180643
11 changed files with 74 additions and 5 deletions

View File

@ -1,17 +1,17 @@
// 应用全局配置 // 应用全局配置
module.exports = { module.exports = {
//生产 //生产
baseUrl: 'https://www.nuoyunr.com', // baseUrl: 'https://www.nuoyunr.com',
//开发 //开发
// baseUrl: "http://192.168.1.17:48080", baseUrl: "http://192.168.1.17:48080",
// baseUrl: "http://rzqhb7.natappfree.cc", // baseUrl: "http://rzqhb7.natappfree.cc",
imagesUrl: 'http://shequ.0315e.com/static/images/pages/', imagesUrl: 'http://shequ.0315e.com/static/images/pages/',
baseImageUrl: 'https://www.nuoyunr.com/minio/', baseImageUrl: 'https://www.nuoyunr.com/minio/',
shareUrl: 'https://www.lighting-it.cn/share?inviteId=', shareUrl: 'https://www.lighting-it.cn/share?inviteId=',
//生产 //生产
wsUrl: 'ws://122.51.230.86:48080', // wsUrl: 'ws://122.51.230.86:48080',
//本地 //本地
// wsUrl: 'ws://192.168.1.17:48080', wsUrl: 'ws://192.168.1.17.48080',
//com.carService.qx //com.carService.qx
// 应用信息 // 应用信息
appInfo: { appInfo: {

View File

@ -589,6 +589,10 @@ export default {
}) })
}, },
afterRead(file) { afterRead(file) {
uni.showLoading({
title: '正在上传中...',
mask:true
});
for (let i = 0; i < file.tempFilePaths.length; i++) { for (let i = 0; i < file.tempFilePaths.length; i++) {
upload({ upload({
url:'/admin-api/infra/file/upload', url:'/admin-api/infra/file/upload',
@ -597,6 +601,9 @@ export default {
this.fileList.push({ this.fileList.push({
url: config.baseImageUrl+res.data url: config.baseImageUrl+res.data
}) })
if(i==file.tempFilePaths.length-1){
uni.hideLoading()
}
console.log(this.fileList) console.log(this.fileList)
}) })
} }

View File

@ -634,6 +634,10 @@ export default {
} }
}, },
afterRead(file) { afterRead(file) {
uni.showLoading({
title: '正在上传中...',
mask:true
});
for (let i = 0; i < file.tempFilePaths.length; i++) { for (let i = 0; i < file.tempFilePaths.length; i++) {
upload({ upload({
url:'/admin-api/infra/file/upload', url:'/admin-api/infra/file/upload',
@ -642,6 +646,9 @@ export default {
this.fileList.push({ this.fileList.push({
url: config.baseImageUrl+res.data url: config.baseImageUrl+res.data
}) })
if(i==file.tempFilePaths.length-1){
uni.hideLoading()
}
console.log(this.fileList) console.log(this.fileList)
}) })
} }

View File

@ -225,6 +225,8 @@ export default {
busiFromIndex:0, busiFromIndex:0,
partDisposals:[], partDisposals:[],
partDisposalIndex:0, partDisposalIndex:0,
//
canClick:true,
formData:{ formData:{
userName: "", userName: "",
userMobile: "", userMobile: "",
@ -287,6 +289,10 @@ export default {
}, },
methods: { methods: {
afterRead(file) { afterRead(file) {
uni.showLoading({
title: '正在上传中...',
mask:true
});
for (let i = 0; i < file.tempFilePaths.length; i++) { for (let i = 0; i < file.tempFilePaths.length; i++) {
upload({ upload({
url:'/admin-api/infra/file/upload', url:'/admin-api/infra/file/upload',
@ -295,6 +301,9 @@ export default {
this.fileList.push({ this.fileList.push({
url: config.baseImageUrl+res.data url: config.baseImageUrl+res.data
}) })
if(i==file.tempFilePaths.length-1){
uni.hideLoading()
}
console.log(this.fileList) console.log(this.fileList)
}) })
} }
@ -467,6 +476,10 @@ export default {
this.$refs.popup.open("bottom") this.$refs.popup.open("bottom")
}, },
applyData(){ applyData(){
if(!this.canClick){
return
}
this.canClick = false
let fileStr = this.fileList.map(item=>item.url.replace(config.baseImageUrl,"")).join(",") let fileStr = this.fileList.map(item=>item.url.replace(config.baseImageUrl,"")).join(",")
let dataObj = this.formData let dataObj = this.formData
dataObj.image=fileStr dataObj.image=fileStr
@ -478,6 +491,7 @@ export default {
method: 'POST', method: 'POST',
data: this.formData data: this.formData
}).then(res => { }).then(res => {
this.canClick =true
this.$refs.popup.close() this.$refs.popup.close()
uni.showToast({ uni.showToast({
title: '修改成功', title: '修改成功',

View File

@ -164,6 +164,10 @@ export default {
}, },
afterRead(file) { afterRead(file) {
uni.showLoading({
title: '正在上传中...',
mask:true
});
for (let i = 0; i < file.tempFilePaths.length; i++) { for (let i = 0; i < file.tempFilePaths.length; i++) {
upload({ upload({
url:'/admin-api/infra/file/upload', url:'/admin-api/infra/file/upload',
@ -172,6 +176,9 @@ export default {
this.fileList.push({ this.fileList.push({
url: config.baseImageUrl+res.data url: config.baseImageUrl+res.data
}) })
if(i==file.tempFilePaths.length-1){
uni.hideLoading()
}
console.log(this.fileList) console.log(this.fileList)
}) })
} }

View File

@ -708,6 +708,10 @@ export default {
} }
}, },
afterRead(file) { afterRead(file) {
uni.showLoading({
title: '正在上传中...',
mask:true
});
for (let i = 0; i < file.tempFilePaths.length; i++) { for (let i = 0; i < file.tempFilePaths.length; i++) {
upload({ upload({
url:'/admin-api/infra/file/upload', url:'/admin-api/infra/file/upload',
@ -716,6 +720,9 @@ export default {
this.fileList.push({ this.fileList.push({
url: config.baseImageUrl+res.data url: config.baseImageUrl+res.data
}) })
if(i==file.tempFilePaths.length-1){
uni.hideLoading()
}
console.log(this.fileList) console.log(this.fileList)
}) })
} }

View File

@ -202,6 +202,10 @@
this.$refs.popup.open("bottom") this.$refs.popup.open("bottom")
}, },
afterRead(file) { afterRead(file) {
uni.showLoading({
title: '正在上传中...',
mask:true
});
for (let i = 0; i < file.tempFilePaths.length; i++) { for (let i = 0; i < file.tempFilePaths.length; i++) {
upload({ upload({
url: '/admin-api/infra/file/upload', url: '/admin-api/infra/file/upload',
@ -210,6 +214,9 @@
this.fileList.push({ this.fileList.push({
url: config.baseImageUrl + res.data url: config.baseImageUrl + res.data
}) })
if(i==file.tempFilePaths.length-1){
uni.hideLoading()
}
console.log(this.fileList) console.log(this.fileList)
}) })
} }

View File

@ -127,6 +127,10 @@ export default {
afterRead(file) { afterRead(file) {
uni.showLoading({
title: '正在上传中...',
mask:true
});
for (let i = 0; i < file.tempFilePaths.length; i++) { for (let i = 0; i < file.tempFilePaths.length; i++) {
upload({ upload({
url:'/admin-api/infra/file/upload', url:'/admin-api/infra/file/upload',
@ -135,6 +139,9 @@ export default {
this.fileList.push({ this.fileList.push({
url: config.baseImageUrl+res.data url: config.baseImageUrl+res.data
}) })
if(i==file.tempFilePaths.length-1){
uni.hideLoading()
}
console.log(this.fileList) console.log(this.fileList)
}) })
} }

View File

@ -42,6 +42,7 @@
data() { data() {
return { return {
data:{}, data:{},
canClick:true,
showPickerColor: false, showPickerColor: false,
ctx: '', ctx: '',
canvasWidth: 0, canvasWidth: 0,
@ -409,6 +410,10 @@
}); });
return return
} }
if(!this.canClick){
return
}
this.canClick=false
console.log(this.data,'uploa') console.log(this.data,'uploa')
const newData = this.data const newData = this.data
uni.canvasToTempFilePath({ uni.canvasToTempFilePath({
@ -437,6 +442,7 @@
method: 'POST', method: 'POST',
data: newData data: newData
}).then(res => { }).then(res => {
this.canClick=true
uni.showToast({ uni.showToast({
title: '创建工单成功', title: '创建工单成功',
icon: 'success' icon: 'success'

View File

@ -178,6 +178,10 @@ export default {
}) })
}, },
afterRead(file) { afterRead(file) {
uni.showLoading({
title: '正在上传中...',
mask:true
});
for (let i = 0; i < file.tempFilePaths.length; i++) { for (let i = 0; i < file.tempFilePaths.length; i++) {
upload({ upload({
url: '/admin-api/infra/file/upload', url: '/admin-api/infra/file/upload',
@ -186,6 +190,9 @@ export default {
this.fileList.push({ this.fileList.push({
url: config.baseImageUrl + res.data url: config.baseImageUrl + res.data
}) })
if(i==file.tempFilePaths.length-1){
uni.hideLoading()
}
console.log(this.fileList) console.log(this.fileList)
}) })
} }

View File

@ -177,7 +177,7 @@
sizeType: { sizeType: {
type: Array, type: Array,
default () { default () {
return ['original', 'compressed'] return ['compressed']
} }
}, },
sourceType: { sourceType: {