Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李俊赕
self-support
Commits
d7e7b4bf
Commit
d7e7b4bf
authored
Aug 24, 2021
by
Damon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-photo-upload' into test
parents
26c47c98
adc87381
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
14 additions
and
7 deletions
+14
-7
.env.dev.js
.env.dev.js
+1
-1
.env.js
.env.js
+1
-1
.env.prod.js
.env.prod.js
+1
-1
.env.test.js
.env.test.js
+1
-1
index.js
src/components/upload/index.js
+2
-1
task.js
src/components/upload/task.js
+3
-2
detail.vue
src/pages/order/detail.vue
+5
-0
No files found.
.env.dev.js
View file @
d7e7b4bf
...
@@ -11,6 +11,6 @@ const UNI_APP = {
...
@@ -11,6 +11,6 @@ const UNI_APP = {
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
,
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
,
qn_asset_url
:
'http://deudn.c.pp.cc/'
,
qn_asset_url
:
'http://deudn.c.pp.cc/'
,
argoDebugMode
:
1
,
argoDebugMode
:
1
,
version
:
'v1.
3.9
'
version
:
'v1.
4.7
'
}
}
module
.
exports
=
UNI_APP
;
module
.
exports
=
UNI_APP
;
.env.js
View file @
d7e7b4bf
;(
function
()
{
;(
function
()
{
let
NODE_ENV
=
'prod'
// dev:开发环境 | test:测试环境 | prod:生产环境
let
NODE_ENV
=
'prod'
// dev:开发环境 | test:测试环境 | prod:生产环境
let
ENV_VAR
=
null
let
ENV_VAR
=
null
let
VERSION_NUMBER
=
'1.4.
6
'
//版本号
let
VERSION_NUMBER
=
'1.4.
7
'
//版本号
//小程序是否审核通过,参数配置在ucenter库version表,对应版本号的is_audit设置为1,将显示学习视频
//小程序是否审核通过,参数配置在ucenter库version表,对应版本号的is_audit设置为1,将显示学习视频
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
if
(
NODE_ENV
===
'dev'
)
{
if
(
NODE_ENV
===
'dev'
)
{
...
...
.env.prod.js
View file @
d7e7b4bf
...
@@ -10,7 +10,7 @@ const UNI_APP = {
...
@@ -10,7 +10,7 @@ const UNI_APP = {
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
,
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
,
qn_asset_url
:
'https://qn-static.banshouhui.com'
,
qn_asset_url
:
'https://qn-static.banshouhui.com'
,
argoDebugMode
:
0
,
argoDebugMode
:
0
,
version
:
'v1.4.
6
'
version
:
'v1.4.
7
'
}
}
module
.
exports
=
UNI_APP
;
module
.
exports
=
UNI_APP
;
.env.test.js
View file @
d7e7b4bf
...
@@ -11,6 +11,6 @@ const UNI_APP = {
...
@@ -11,6 +11,6 @@ const UNI_APP = {
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
,
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
,
qn_asset_url
:
'https://qn-static.banshouhui.com'
,
qn_asset_url
:
'https://qn-static.banshouhui.com'
,
argoDebugMode
:
1
,
argoDebugMode
:
1
,
version
:
'v1.
3.9
'
version
:
'v1.
4.7
'
}
}
module
.
exports
=
UNI_APP
;
module
.
exports
=
UNI_APP
;
src/components/upload/index.js
View file @
d7e7b4bf
...
@@ -50,6 +50,7 @@ export default {
...
@@ -50,6 +50,7 @@ export default {
let
lists
=
files
.
map
(
v
=>
{
let
lists
=
files
.
map
(
v
=>
{
const
key
=
randomChar
(
10
)
const
key
=
randomChar
(
10
)
return
{
return
{
time
:
this
.
$u
.
timeFormat
(
new
Date
().
getTime
(),
'yyyy-mm-dd hh:MM:ss'
),
key
:
key
,
key
:
key
,
path
:
v
,
path
:
v
,
src
:
key
,
src
:
key
,
...
@@ -61,7 +62,7 @@ export default {
...
@@ -61,7 +62,7 @@ export default {
// const row = await this.saveFiles(path)
// const row = await this.saveFiles(path)
// lists.push(row)
// lists.push(row)
// }
// }
const
data
=
this
.
uploadTask
const
data
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
uploadTask
))
const
saveLists
=
data
.
concat
(
lists
)
const
saveLists
=
data
.
concat
(
lists
)
this
.
$u
.
vuex
(
'uploadTask'
,
saveLists
)
this
.
$u
.
vuex
(
'uploadTask'
,
saveLists
)
return
lists
return
lists
...
...
src/components/upload/task.js
View file @
d7e7b4bf
...
@@ -32,9 +32,10 @@ export default {
...
@@ -32,9 +32,10 @@ export default {
err
.
mobile
=
that
.
vuex_user
.
mobile
err
.
mobile
=
that
.
vuex_user
.
mobile
if
(
!
err
.
key
)
err
.
files
=
uploadTask
if
(
!
err
.
key
)
err
.
files
=
uploadTask
if
(
!
err
.
orderNumber
)
err
.
orderNumber
=
uploadTask
[
0
].
orderNumber
ERROR
(
'upload_photo_error'
,
err
)
ERROR
(
'upload_photo_error'
,
err
)
if
(
err
.
errMsg
&&
err
.
errMsg
.
indexOf
(
'fail file not found'
)
!==
-
1
)
{
// 在任务中删除不存在的图片
if
(
err
.
errMsg
&&
(
err
.
errMsg
.
indexOf
(
'fail file not found'
)
!==
-
1
||
err
.
errMsg
.
indexOf
(
'file doesn'
)
!==
-
1
)
)
{
// 在任务中删除不存在的图片
const
newTask
=
uploadTask
.
filter
(
v
=>
v
.
key
!==
err
.
key
)
const
newTask
=
uploadTask
.
filter
(
v
=>
v
.
key
!==
err
.
key
)
that
.
$u
.
vuex
(
'uploadTask'
,
newTask
)
that
.
$u
.
vuex
(
'uploadTask'
,
newTask
)
}
}
...
...
src/pages/order/detail.vue
View file @
d7e7b4bf
...
@@ -166,6 +166,7 @@ import Record from '@/components/order/performanceRecord.vue'
...
@@ -166,6 +166,7 @@ import Record from '@/components/order/performanceRecord.vue'
import
Detail
from
'@/components/order/detail.vue'
import
Detail
from
'@/components/order/detail.vue'
import
BottomButtons
from
'@/components/order/bottomButtons.vue'
import
BottomButtons
from
'@/components/order/bottomButtons.vue'
import
FeedbackContent
from
'@/components/order/feedback.vue'
import
FeedbackContent
from
'@/components/order/feedback.vue'
import
upload
from
'@/components/upload/task.js'
// import ApplyList from "@/components/parts/applyList.vue"
// import ApplyList from "@/components/parts/applyList.vue"
let
now
=
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
()
let
now
=
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
()
...
@@ -450,6 +451,10 @@ export default {
...
@@ -450,6 +451,10 @@ export default {
}
}
},
},
onShow
()
{
onShow
()
{
if
(
this
.
uploadTask
.
length
>
0
)
{
upload
.
uploadImageTask
(
this
)
}
// 从过程反馈回来,需要刷新数据
// 从过程反馈回来,需要刷新数据
let
pages
=
getCurrentPages
()
let
pages
=
getCurrentPages
()
let
page
=
pages
[
pages
.
length
-
1
]
let
page
=
pages
[
pages
.
length
-
1
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment