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
e60e858b
Commit
e60e858b
authored
Sep 07, 2021
by
Damon
Browse files
Options
Browse Files
Download
Plain Diff
chore: merge
parents
97000fd0
85c30197
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
343 additions
and
61 deletions
+343
-61
.env.dev.js
.env.dev.js
+1
-1
.env.js
.env.js
+2
-2
.env.prod.js
.env.prod.js
+1
-1
.env.test.js
.env.test.js
+1
-1
App.vue
src/App.vue
+5
-14
order.js
src/common/api/order.js
+3
-0
http.interceptor.js
src/common/http.interceptor.js
+3
-0
XhFiles.vue
src/components/createCom/XhFiles.vue
+1
-1
settlement.vue
src/components/mine/settlement.vue
+7
-7
upload-progress.vue
src/components/upload-progress/upload-progress.vue
+256
-0
index.js
src/components/upload/index.js
+5
-5
task.js
src/components/upload/task.js
+18
-3
main.js
src/main.js
+10
-10
index.vue
src/pages/index/index.vue
+1
-0
order.vue
src/pages/index/order.vue
+1
-0
settlement.vue
src/pages/mine/wallet/settlement.vue
+9
-6
complete.vue
src/pages/order/complete.vue
+1
-0
list.vue
src/pages/photo/list.vue
+6
-4
index.js
src/plugins/uploader/index.js
+4
-4
index.js
src/store/index.js
+8
-2
No files found.
.env.dev.js
View file @
e60e858b
...
...
@@ -11,6 +11,6 @@ const UNI_APP = {
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
,
qn_asset_url
:
'http://deudn.c.pp.cc/'
,
argoDebugMode
:
1
,
version
:
'v1.5.
0
'
version
:
'v1.5.
2
'
}
module
.
exports
=
UNI_APP
;
.env.js
View file @
e60e858b
;(
function
()
{
let
NODE_ENV
=
'
test
'
// dev:开发环境 | test:测试环境 | prod:生产环境
let
NODE_ENV
=
'
prod
'
// dev:开发环境 | test:测试环境 | prod:生产环境
let
ENV_VAR
=
null
let
VERSION_NUMBER
=
'1.
4.6
'
//版本号
let
VERSION_NUMBER
=
'1.
5.2
'
//版本号
//小程序是否审核通过,参数配置在ucenter库version表,对应版本号的is_audit设置为1,将显示学习视频
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
if
(
NODE_ENV
===
'dev'
)
{
...
...
.env.prod.js
View file @
e60e858b
...
...
@@ -10,7 +10,7 @@ const UNI_APP = {
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
,
qn_asset_url
:
'https://qn-static.banshouhui.com'
,
argoDebugMode
:
0
,
version
:
'v1.5.
0
'
version
:
'v1.5.
2
'
}
module
.
exports
=
UNI_APP
;
.env.test.js
View file @
e60e858b
...
...
@@ -11,6 +11,6 @@ const UNI_APP = {
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
,
qn_asset_url
:
'https://qn-static.banshouhui.com'
,
argoDebugMode
:
1
,
version
:
'v1.5.
0
'
version
:
'v1.5.
2
'
}
module
.
exports
=
UNI_APP
;
src/App.vue
View file @
e60e858b
...
...
@@ -4,6 +4,8 @@ import { AnalysysAgent } from "@/utils/analysys_paas.js";
import
util
from
"@/utils/util.js"
;
import
login
from
"@/utils/login.js"
;
import
upload
from
'@/components/upload/task.js'
import
{
ERROR
}
from
"@/common/log.js"
export
default
{
globalData
:
{
// 开发环境
...
...
@@ -74,8 +76,6 @@ export default {
this
.
getSystemInfo
();
// 系统自动登录::每次运行小程序重新获取用户信息
await
this
.
autoLogin
();
//this.deleteTempImg()
},
onShow
:
function
()
{
// 应用启动,或从后台进入前台显示
...
...
@@ -85,6 +85,9 @@ export default {
},
onHide
:
function
()
{
// 应用从前台进入后台
// if (this.uploadTask.length > 0) {
// ERROR('onUnload', {task: this.uploadTask.length, mobile: this.vuex_user.mobile})
// }
},
watch
:
{
uploadTask
:
function
(
newValue
,
oldValue
)
{
...
...
@@ -92,18 +95,6 @@ export default {
}
},
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
=
this
.
$u
.
sys
();
...
...
src/common/api/order.js
View file @
e60e858b
...
...
@@ -183,6 +183,8 @@ let orderApiFun = function(vm){
let
listStatementDetails
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
settle
+
vm
.
vuex_token
+
'/queryStatementByPayableNo'
,
params
);
// 获取我的钱包-支付单一览
let
payableRecord
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
settle
+
vm
.
vuex_token
+
'/payable/v2/queryPayableRecord'
,
params
,
formType
);
// 获取我的钱包-支付单一览版本3
let
listPayableRecordByPayTime
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
settle
+
vm
.
vuex_token
+
'/payable/listPayableRecordByPayTime'
,
params
,
formType
);
// 获取我的钱包-师傅提现
let
workerApplyPay
=
async
()
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/applypay/batch/workerApplyPay'
);
// 是否有特殊登录权限
...
...
@@ -254,6 +256,7 @@ let orderApiFun = function(vm){
getAssets
,
listStatement
,
payableRecord
,
listPayableRecordByPayTime
,
listStatementDetails
,
workerApplyPay
,
allowLogin
,
...
...
src/common/http.interceptor.js
View file @
e60e858b
...
...
@@ -76,6 +76,9 @@ const install = (Vue, vm) => {
function
getMsg
(
res
){
const
result
=
res
.
data
||
res
let
msg
=
result
.
message
||
result
.
errMsg
||
res
.
message
||
res
.
errMsg
if
(
msg
.
indexOf
(
'request:fail'
)
!==
-
1
)
{
msg
=
'当前网络较差,请重试'
}
if
(
res
.
code
==
200
||
res
.
status
==
true
||
msg
)
{
return
msg
}
...
...
src/components/createCom/XhFiles.vue
View file @
e60e858b
...
...
@@ -17,7 +17,7 @@
@
click
.
stop=
"prviewImage(item, index)"
fade
lazy-load
></u-image>
><
view
slot=
"error"
style=
"font-size: 24rpx;"
>
上传中
</view><
/u-image>
<view
class=
"icon-del-box"
v-if=
"!disabled"
...
...
src/components/mine/settlement.vue
View file @
e60e858b
...
...
@@ -10,7 +10,7 @@
</view>
<view
class=
"right-view"
>
<view
:class=
"['settlement-status-view', settlementTypeClass]"
>
{{
data
.
payableRecordStatusText
}}
</view>
<view
class=
"settlement-amount-view"
>
¥
{{
data
.
settlementAmount
}}
</view>
<view
class=
"settlement-amount-view"
>
¥
{{
data
.
paidAmount
||
0
}}
</view>
</view>
</view>
<view
class=
"line-view"
></view>
...
...
@@ -24,11 +24,11 @@
type
:
Object
,
default
()
{
return
{
paymentTime
:
new
Date
().
getTime
(),
payableRecordStatusText
:
'提现'
,
payableRecordNumber
:
'EE999777'
,
payableRecordId
:
''
,
settlementAmount
:
9899
paidTime
:
new
Date
().
getTime
(),
payableRecordStatusText
:
'提现'
,
payableRecordNumber
:
''
,
paidAmount
:
0
}
},
}
...
...
@@ -56,13 +56,13 @@
timeText
()
{
let
now
=
this
.
moment
().
startOf
(
'day'
).
unix
()
let
yesterday
=
this
.
moment
(
now
*
1000
).
subtract
(
1
,
'days'
).
unix
()
let
date
=
this
.
moment
(
this
.
data
.
updateDatet
ime
).
startOf
(
'day'
).
unix
()
let
date
=
this
.
moment
(
this
.
data
.
paidT
ime
).
startOf
(
'day'
).
unix
()
if
(
date
==
now
)
{
return
'今天'
}
else
if
(
date
==
yesterday
)
{
return
'昨天'
}
else
{
return
this
.
$u
.
timeFormat
(
this
.
data
.
updateDatet
ime
,
'mm.dd'
)
return
this
.
$u
.
timeFormat
(
this
.
data
.
paidT
ime
,
'mm.dd'
)
}
}
},
...
...
src/components/upload-progress/upload-progress.vue
0 → 100644
View file @
e60e858b
<
template
>
<view
class=
"upload-progress"
>
<view
:class=
"['u-flex', 'suspension',
{'error': uploadStatus === 3}]" @click="openpRrogress">
<view
class=
"progress"
v-if=
"taskCount > 0"
>
{{
uploadPercentage
}}
%
</view>
<view
class=
"upload-img"
v-if=
"taskCount === 0"
>
<image
class=
"icon"
:src=
"icon"
></image>
</view>
</view>
<u-popup
v-model=
"open"
border-radius=
"12"
mode=
"center"
:animation=
"false"
@
close=
"closePopup"
width=
"690rpx"
>
<view
class=
"slot-content"
>
<view
class=
"upload-title"
>
<text
class=
'status-txt'
>
图片上传进度
</text>
</view>
<view
v-if=
"taskCount > 0"
>
<view
class=
"progress-circle"
>
<u-loading
class=
"loading"
v-if=
"!progressStatus"
mode=
"circle"
></u-loading>
<u-circle-progress
v-if=
"progressStatus"
:width=
"320"
:border-width=
"20"
inactive-color=
"#F4F5F7"
:active-color=
"progressColor"
:percent=
"uploadPercentage"
>
<view
:class=
"['u-progress-content',
{'error': uploadStatus === 3}]">
{{
uploadPercentage
}}
%
</view>
</u-circle-progress>
</view>
<view
class=
"u-flex upload-data"
>
<view
class=
"u-flex"
>
<view
class=
"title"
>
需上传
</view>
<view
class=
"pending"
>
{{
taskCount
}}
</view>
</view>
<view
class=
"u-flex"
>
<view
class=
"title"
>
已上传
</view>
<view
class=
"resolve"
>
{{
uploadSuccess
}}
</view>
</view>
<view
class=
"u-flex"
>
<view
class=
"title"
>
状态
</view>
<view
:class=
"['status',
{'error': uploadStatus === 3}]">
{{
uploadStatusName
}}
</view>
</view>
</view>
<view
class=
"upload-bottom"
v-if=
"uploadStatus === 3"
>
<view
class=
"button confirm"
@
click=
"$u.throttle(retry, 500)"
>
重试
</view>
</view>
</view>
<view
class=
"u-flex default"
v-if=
"taskCount === 0"
>
<view><image
class=
"default-img"
:src=
"defaultImg"
></image></view>
<view
class=
"text"
>
当前暂无上传图片
</view>
</view>
</view>
</u-popup>
</view>
</
template
>
<
script
>
/**
* upload-progress 图片上传进度
*/
import
upload
from
'@/components/upload/task.js'
export
default
{
name
:
"upload-progress"
,
data
()
{
return
{
open
:
false
,
progressStatus
:
false
}
},
computed
:
{
icon
()
{
return
process
.
uniEnv
.
qn_base_url
+
'upload-photo.png'
},
defaultImg
()
{
return
process
.
uniEnv
.
qn_base_url
+
'upload-default.png'
},
taskCount
()
{
return
this
.
uploadTotal
},
uploadStatusName
()
{
let
status
switch
(
this
.
uploadStatus
)
{
case
1
:
status
=
'等待上传'
break
;
case
2
:
status
=
'上传中'
break
;
case
3
:
status
=
'上传中断'
break
;
}
return
status
},
progressColor
()
{
return
this
.
uploadStatus
===
3
?
'#FA5A49'
:
'#2272FF'
},
uploadPercentage
()
{
const
num
=
this
.
uploadSuccess
const
total
=
this
.
uploadTotal
return
total
>
0
?
Math
.
floor
(
Math
.
round
(
num
/
total
*
10000
)
/
100.00
)
:
0
}
},
watch
:
{
uploadStatus
(
newValue
)
{
this
.
progressStatus
=
false
this
.
$nextTick
(()
=>
{
this
.
progressStatus
=
true
})
}
},
methods
:
{
closePopup
()
{
this
.
progressStatus
=
false
},
openpRrogress
()
{
this
.
open
=
true
this
.
progressStatus
=
false
setTimeout
(()
=>
{
this
.
progressStatus
=
true
},
300
)
},
retry
()
{
if
(
this
.
uploadStatus
!==
2
)
upload
.
uploadImageTask
(
this
)
}
}
}
</
script
>
<
style
lang=
"scss"
>
.upload-progress
{
width
:
100%
;
height
:
100%
;
.suspension
{
position
:
fixed
;
right
:
5%
;
bottom
:
20%
;
width
:
80rpx
;
height
:
80rpx
;
border-radius
:
50%
;
background
:
#2272FF
;
z-index
:
999
;
&
.error
{
background
:
#FA5A49
;
}
.progress
{
font-size
:
24rpx
;
color
:
#fff
;
width
:
100%
;
text-align
:
center
;
}
.upload-img
{
width
:
100%
;
text-align
:
center
;
padding-top
:
8rpx
;
.icon
{
width
:
36rpx
;
height
:
32rpx
;
}
}
}
.slot-content
{
padding
:
40rpx
30rpx
30rpx
30rpx
;
.upload-title
{
margin
:
20rpx
0
50rpx
0
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
.status-txt
{
height
:
46rpx
;
font-size
:
40rpx
;
font-weight
:
bold
;
color
:
#333
;
line-height
:
46rpx
;
}
}
.progress-circle
{
width
:
100%
;
height
:
320rpx
;
text-align
:
center
;
.loading
{
line-height
:
320rpx
;
}
.u-progress-content
{
color
:
#2272FF
;
font-size
:
60rpx
;
&
.error
{
color
:
#FA5A49
;
}
}
}
.upload-data
{
margin
:
50rpx
0
30rpx
0
;
.u-flex
{
flex-flow
:
column
;
font-size
:
48rpx
;
width
:
210rpx
;
height
:
120rpx
;
.title
{
color
:
#666
;
font-size
:
28rpx
;
padding-bottom
:
20rpx
;
}
.pending
{
color
:
#333
;
}
.resolve
{
color
:
#2272FF
;
}
.status
{
color
:
#2272FF
;
font-size
:
36rpx
;
&
.error
{
color
:
#FA5A49
;
}
}
}
}
.upload-bottom
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
.button
{
text-align
:
center
;
height
:
104rpx
;
width
:
300rpx
;
border-radius
:
52rpx
;
font-size
:
32rpx
;
font-weight
:
600
;
line-height
:
104rpx
;
}
.confirm
{
margin
:
36rpx
30rpx
52rpx
15rpx
;
background
:
#2272FF
;
color
:
#FFFFFF
;
}
}
.default
{
flex-flow
:
column
;
margin
:
150rpx
0
;
.default-img
{
width
:
360rpx
;
height
:
240rpx
;
}
.text
{
color
:
#666
;
font-size
:
28rpx
;
margin-top
:
50rpx
;
}
}
}
}
</
style
>
src/components/upload/index.js
View file @
e60e858b
...
...
@@ -69,14 +69,14 @@ export default {
...
order
}
})
// for (let i = 0; i < files.length; i++) {
// const path = files[i]
// const row = await this.saveFiles(path)
// lists.push(row)
// }
const
data
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
uploadTask
))
const
saveLists
=
data
.
concat
(
lists
)
this
.
$u
.
vuex
(
'uploadTask'
,
saveLists
)
const
newTotal
=
this
.
uploadTotal
+
lists
.
length
this
.
$u
.
vuex
(
'uploadTotal'
,
newTotal
)
//this.$u.vuex('uploadSuccess', 0)
return
lists
},
/**
...
...
src/components/upload/task.js
View file @
e60e858b
...
...
@@ -19,10 +19,13 @@ export default {
* 执行任务队列
*/
async
uploadImageTask
(
that
)
{
if
(
that
.
uploadStatus
===
2
)
return
that
.
$u
.
vuex
(
'uploadStatus'
,
2
)
const
uploadTask
=
JSON
.
parse
(
JSON
.
stringify
(
that
.
uploadTask
)).
reverse
()
const
networkType
=
await
getNetworkType
()
const
options
=
{
files
:
uploadTask
,
// 必填 临时文件路径 格式: [{path: "图片地址"}]
files
:
uploadTask
.
slice
(
0
,
5
)
,
// 必填 临时文件路径 格式: [{path: "图片地址"}]
load
:
false
,
//(默认 true 说明:本接口是否提示加载动画)
onEachUpdate
:
res
=>
{
console
.
log
(
"上传成功返回:"
,
res
);
...
...
@@ -41,10 +44,12 @@ export default {
}
uploader
.
qnFileUpload
(
options
).
then
(
res
=>
{
const
newSuccess
=
that
.
uploadSuccess
+
res
.
length
that
.
$u
.
vuex
(
'uploadSuccess'
,
newSuccess
)
this
.
refreshTask
(
that
,
res
)
}).
catch
(
err
=>
{
console
.
log
(
"err"
,
err
)
that
.
$u
.
vuex
(
'uploadStatus'
,
3
)
err
.
mobile
=
that
.
vuex_user
.
mobile
if
(
!
err
.
key
)
err
.
files
=
uploadTask
if
(
!
err
.
orderNumber
)
err
.
orderNumber
=
uploadTask
[
0
].
orderNumber
...
...
@@ -54,6 +59,7 @@ export default {
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
)
that
.
$u
.
vuex
(
'uploadTask'
,
newTask
)
this
.
resetProgress
(
that
)
}
})
},
...
...
@@ -66,7 +72,16 @@ export default {
}
})
// uni.setStorageSync('delImg', delImg) // 已上传完的图片,会在启动系统的时候做一次清理
that
.
$u
.
vuex
(
'uploadStatus'
,
1
)
that
.
$u
.
vuex
(
'uploadTask'
,
newTask
)
this
.
resetProgress
(
that
)
},
// 重置任务状态
resetProgress
(
that
)
{
if
(
that
.
uploadTask
.
length
===
0
)
{
// 上传完本地所有照片
that
.
$u
.
vuex
(
'uploadSuccess'
,
0
)
that
.
$u
.
vuex
(
'uploadTotal'
,
0
)
that
.
$u
.
vuex
(
'uploadStatus'
,
1
)
}
}
}
src/main.js
View file @
e60e858b
import
Vue
from
'vue'
import
Vue
from
'vue'
import
moment
from
'moment'
import
App
from
'./App'
import
uView
from
"uview-ui"
;
...
...
@@ -8,24 +8,24 @@ import {router,RouterMount} from '@/router/index.js' //路径换成自己的
Vue
.
config
.
productionTip
=
false
Vue
.
mixin
(
vuexStore
)
Vue
.
use
(
uView
);
Vue
.
use
(
uView
);
App
.
mpType
=
'app'
const
app
=
new
Vue
({
store
,
...
App
})
// 引入时间组件 moment
moment
.
locale
(
'zh-cn'
);
Vue
.
prototype
.
moment
=
moment
// 引入时间组件 moment
moment
.
locale
(
'zh-cn'
);
Vue
.
prototype
.
moment
=
moment
Vue
.
filter
(
'datefmt'
,
function
(
input
,
fmtstring
)
{
//当input为时间戳,需转为Number类型
if
(
input
){
return
moment
(
input
).
format
(
fmtstring
);
}
else
{
return
""
;
}
});
});
// http拦截器,将此部分放在new Vue()和app.$mount()之间,才能App.vue中正常使用
import
httpInterceptor
from
'@/common/http.interceptor.js'
...
...
@@ -33,9 +33,9 @@ Vue.use(httpInterceptor, app)
Vue
.
use
(
router
)
// http接口API抽离,免于写url或者一些固定的参数
import
httpApi
from
'@/common/http.api.js'
Vue
.
use
(
httpApi
,
app
)
// 分享
Vue
.
use
(
httpApi
,
app
)
// 分享
let
mpShare
=
require
(
'@/uview-ui/libs/mixin/mpShare.js'
)
Vue
.
mixin
(
mpShare
)
//v1.3.5起 H5端 你应该去除原有的app.$mount();使用路由自带的渲染方式
...
...
src/pages/index/index.vue
View file @
e60e858b
...
...
@@ -109,6 +109,7 @@
<!-- 悬浮按钮 -->
<!-- <EusingList /> -->
</view>
<upload-progress
/>
</TabBarPage>
</template>
...
...
src/pages/index/order.vue
View file @
e60e858b
...
...
@@ -101,6 +101,7 @@ import TabBarPage from '@/components/tabBarList/index.vue'
import
OrderCell
from
'@/components/order/index.vue'
import
NoOrder
from
'@/components/order/noOrder.vue'
import
upload
from
'@/components/upload/task.js'
// import EusingList from '@/components/order/eusingList.vue'
export
default
{
components
:
{
...
...
src/pages/mine/wallet/settlement.vue
View file @
e60e858b
...
...
@@ -13,10 +13,13 @@
</view>
</picker>
</view>
<view
class=
"head-bottom-view"
>
<view
class=
"head-bottom-view
u-flex u-row-between
"
>
<view
class=
"head-amount-view"
>
<view><text>
已结算金额(元)
</text></view>
<view
class=
"head-amount-text"
><text>
{{
info
.
totalAmount
}}
</text></view>
<view
class=
"head-amount-text"
><text>
{{
info
.
totalAmount
||
0
}}
</text></view>
<!--
<view
class=
"head-amount-view"
>
<view><text>
待结算金额(元)
</text></view>
<view
class=
"head-amount-text"
><text>
{{
info
.
waitPaidAmount
||
0
}}
</text></view>
-->
</view>
</view>
</view>
...
...
@@ -46,7 +49,7 @@
let
now
=
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
();
import
util
from
'@/utils/util.js'
import
Settlement
from
"@/components/mine/settlement.vue"
const
baseinfo
=
{
totalAmount
:
0
,
payableRecordExtendDtos
:
[]}
const
baseinfo
=
{
totalAmount
:
0
,
waitPaidAmount
:
0
,
payableRecordExtendDtos
:
[]}
export
default
{
components
:
{
Settlement
...
...
@@ -58,7 +61,7 @@
date
:
''
,
params
:
{
payableRecordStatus
:
null
,
starDate
:
null
,
star
t
Date
:
null
,
endDate
:
null
,
},
}
...
...
@@ -88,9 +91,9 @@
self
.
loading
=
true
let
startTime
=
self
.
moment
(
self
.
date
).
format
(
'YYYY-MM-DD'
)
let
endTime
=
self
.
moment
(
self
.
date
).
endOf
(
'month'
).
format
(
'YYYY-MM-DD'
)
self
.
params
.
starDate
=
startTime
self
.
params
.
star
t
Date
=
startTime
self
.
params
.
endDate
=
endTime
let
res
=
await
self
.
$u
.
api
.
payableRecord
(
self
.
params
)
let
res
=
await
self
.
$u
.
api
.
listPayableRecordByPayTime
(
self
.
params
)
self
.
loading
=
false
if
(
res
&&
res
.
code
==
200
)
{
self
.
info
=
res
.
data
&&
res
.
data
[
self
.
date
]
||
baseinfo
...
...
src/pages/order/complete.vue
View file @
e60e858b
...
...
@@ -315,6 +315,7 @@
:cancel-btn=
"true"
@
click=
"uploadSelect"
></u-action-sheet>
<upload-progress
/>
</view>
</template>
<
script
>
...
...
src/pages/photo/list.vue
View file @
e60e858b
...
...
@@ -23,8 +23,10 @@
<!--
<text
class=
"rightContent u-m-t-14 u-m-l-30 u-p-b-30"
>
{{
item
.
describe
}}
</text>
-->
</view>
<view
class=
"rightImageView"
v-if=
"item.orderImages && item.orderImages.length > 0"
>
<image
class=
"rightImage"
v-for=
"(image, index) in item.orderImages"
:src=
"image"
:key=
"index"
@
click
.
stop=
"handleClickImage(item, index)"
mode=
"aspectFill"
></image>
<u-image
class=
"rightImage"
v-for=
"(image, index) in item.orderImages"
:src=
"image + '?imageView2/1/w/100/h/100/q/75'"
:key=
"index"
@
tap
.
stop=
"handleClickImage(item, index)"
width=
"116"
height=
"116"
>
<view
slot=
"error"
style=
"font-size: 24rpx;"
>
上传中
</view>
</u-image>
</view>
</view>
</
template
>
...
...
@@ -419,8 +421,8 @@
.rightImage
{
background-color
:
#F3F3F3
;
width
:
116
rpx
;
height
:
116
rpx
;
/*
width: 116rpx;
height: 116rpx;
*/
margin
:
0
rpx
12
rpx
12
rpx
0
rpx
;
}
...
...
src/plugins/uploader/index.js
View file @
e60e858b
...
...
@@ -183,10 +183,10 @@ uploader.requestError = function(e) {
if
(
e
.
statusCode
===
0
)
{
throw
e
;
}
else
{
uni
.
showToast
({
title
:
"当前网络信号较差,请耐心等待或尝试切换网络环境"
,
icon
:
"none"
});
//
uni.showToast({
//
title: "当前网络信号较差,请耐心等待或尝试切换网络环境",
//
icon: "none"
//
});
}
}
export
default
uploader
;
src/store/index.js
View file @
e60e858b
...
...
@@ -12,7 +12,7 @@ try {
}
// 需要永久存储,且下次APP启动需要取出的,在state中的变量名
let
saveStateKeys
=
[
'vuex_user'
,
'vuex_wx_uid'
,
'vuex_token'
,
'vuex_cache'
,
'uploadTask'
,
'
vuex_superuser'
,
'vuex_last_five_orders
'
];
let
saveStateKeys
=
[
'vuex_user'
,
'vuex_wx_uid'
,
'vuex_token'
,
'vuex_cache'
,
'uploadTask'
,
'
uploadTotal'
,
'uploadSuccess'
,
'vuex_superuser
'
];
// 保存变量到本地存储中
const
saveLifeData
=
function
(
key
,
value
)
{
...
...
@@ -43,7 +43,13 @@ const store = new Vuex.Store({
// 授权用户信息
vuex_auth_user
:
{},
// 上传队列
uploadTask
:
lifeData
.
uploadTask
?
lifeData
.
uploadTask
:
[]
uploadTask
:
lifeData
.
uploadTask
?
lifeData
.
uploadTask
:
[],
// 上传状态 1 未开始 2 上传中 3 上传中断
uploadStatus
:
1
,
// 上传总数量
uploadTotal
:
lifeData
.
uploadTotal
?
lifeData
.
uploadTotal
:
0
,
// 已上传数量
uploadSuccess
:
lifeData
.
uploadSuccess
?
lifeData
.
uploadSuccess
:
0
,
},
mutations
:
{
$uStore
(
state
,
payload
)
{
...
...
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