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
e11668af
Commit
e11668af
authored
Aug 24, 2021
by
Damon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 异步优化
parent
80a643c8
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
8 deletions
+20
-8
.env.js
.env.js
+1
-1
.env.prod.js
.env.prod.js
+1
-1
task.js
src/components/upload/task.js
+3
-3
complete.vue
src/pages/order/complete.vue
+4
-2
list.vue
src/pages/photo/list.vue
+11
-1
No files found.
.env.js
View file @
e11668af
;(
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.
5
'
//版本号
let
VERSION_NUMBER
=
'1.4.
6
'
//版本号
//小程序是否审核通过,参数配置在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 @
e11668af
...
@@ -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.
3.9
'
version
:
'v1.
4.6
'
}
}
module
.
exports
=
UNI_APP
;
module
.
exports
=
UNI_APP
;
src/components/upload/task.js
View file @
e11668af
...
@@ -18,7 +18,7 @@ export default {
...
@@ -18,7 +18,7 @@ export default {
mobile
:
that
.
vuex_user
.
mobile
mobile
:
that
.
vuex_user
.
mobile
}
}
delete
log
.
files
delete
log
.
files
RUN
(
'upload_photo'
,
log
)
RUN
(
'upload_photo
_success
'
,
log
)
},
},
onProgressUpdate
:
res
=>
{
onProgressUpdate
:
res
=>
{
//console.log("上传进度返回:",res);
//console.log("上传进度返回:",res);
...
@@ -31,8 +31,8 @@ export default {
...
@@ -31,8 +31,8 @@ export default {
console
.
log
(
"err"
,
err
)
console
.
log
(
"err"
,
err
)
err
.
mobile
=
that
.
vuex_user
.
mobile
err
.
mobile
=
that
.
vuex_user
.
mobile
err
.
files
=
uploadTask
if
(
!
err
.
key
)
err
.
files
=
uploadTask
ERROR
(
'upload_photo'
,
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
)
{
// 在任务中删除不存在的图片
const
newTask
=
uploadTask
.
filter
(
v
=>
v
.
key
!==
err
.
key
)
const
newTask
=
uploadTask
.
filter
(
v
=>
v
.
key
!==
err
.
key
)
...
...
src/pages/order/complete.vue
View file @
e11668af
...
@@ -1151,7 +1151,8 @@ export default {
...
@@ -1151,7 +1151,8 @@ export default {
const
order
=
{
const
order
=
{
orderNumber
:
this
.
orderNumber
,
orderNumber
:
this
.
orderNumber
,
fieldsName
:
this
.
photoItem
.
fieldsName
,
fieldsName
:
this
.
photoItem
.
fieldsName
,
fieldsTitle
:
this
.
photoItem
.
fieldsTitle
fieldsTitle
:
this
.
photoItem
.
fieldsTitle
,
uploadType
:
'camera'
}
}
const
value
=
await
this
.
saveToTask
(
files
,
order
)
const
value
=
await
this
.
saveToTask
(
files
,
order
)
this
.
$refs
[
this
.
$refs
[
...
@@ -1173,7 +1174,8 @@ export default {
...
@@ -1173,7 +1174,8 @@ export default {
const
order
=
{
const
order
=
{
orderNumber
:
this
.
orderNumber
,
orderNumber
:
this
.
orderNumber
,
fieldsName
:
this
.
photoItem
.
fieldsName
,
fieldsName
:
this
.
photoItem
.
fieldsName
,
fieldsTitle
:
this
.
photoItem
.
fieldsTitle
fieldsTitle
:
this
.
photoItem
.
fieldsTitle
,
uploadType
:
'album'
}
}
const
value
=
await
this
.
chooseImg
(
options
,
order
)
const
value
=
await
this
.
chooseImg
(
options
,
order
)
self
.
$refs
[
self
.
$refs
[
...
...
src/pages/photo/list.vue
View file @
e11668af
...
@@ -104,6 +104,10 @@
...
@@ -104,6 +104,10 @@
if
(
e
&&
e
.
classifyId
)
{
if
(
e
&&
e
.
classifyId
)
{
this
.
classifyId
=
e
.
classifyId
this
.
classifyId
=
e
.
classifyId
}
}
if
(
e
&&
e
.
orderNumber
)
{
this
.
orderNumber
=
e
.
orderNumber
}
// this.getListData()
// this.getListData()
this
.
getListDataNew
()
this
.
getListDataNew
()
this
.
getWatermark
()
this
.
getWatermark
()
...
@@ -254,7 +258,13 @@
...
@@ -254,7 +258,13 @@
// 真实地址key
// 真实地址key
let
saveList
=
this
.
currentItemDate
.
key
let
saveList
=
this
.
currentItemDate
.
key
const
files
=
img
.
map
(
v
=>
v
.
path
)
const
files
=
img
.
map
(
v
=>
v
.
path
)
const
value
=
await
this
.
saveToTask
(
files
)
const
order
=
{
orderNumber
:
this
.
orderNumber
,
fieldsName
:
this
.
currentItemDate
.
fieldsName
,
fieldsTitle
:
this
.
currentItemDate
.
fieldsTitle
,
uploadType
:
'camera'
}
const
value
=
await
this
.
saveToTask
(
files
,
order
)
value
.
forEach
(
item
=>
{
value
.
forEach
(
item
=>
{
// 文件key添加保存数组中
// 文件key添加保存数组中
saveList
.
push
(
item
.
key
)
saveList
.
push
(
item
.
key
)
...
...
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