Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
account-book
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
刘文虎
account-book
Commits
2de2422a
Commit
2de2422a
authored
Jul 27, 2022
by
刘文虎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
退出登录后,数据置空
parent
1b63ddbf
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
102 additions
and
73 deletions
+102
-73
billing-daily.vue
components/billing-daily/billing-daily.vue
+2
-0
index.vue
components/free-audio/index.vue
+1
-1
mid-popup.vue
components/mid-popup/mid-popup.vue
+4
-1
bill-detail.vue
pages/bill/bill-detail/bill-detail.vue
+36
-13
bill.vue
pages/index/bill/bill.vue
+27
-24
scroll-box.vue
pages/index/bill/components/scroll-box.vue
+10
-7
mine.vue
pages/index/mine/mine.vue
+0
-8
plan-view.vue
pages/index/schedule/components/plan-view.vue
+1
-0
schedule.vue
pages/index/schedule/schedule.vue
+1
-0
login.vue
pages/login/login.vue
+1
-1
about.vue
pages/mine/about/about.vue
+1
-1
update-log.vue
pages/mine/update-log/update-log.vue
+1
-3
create-schedule.vue
pages/schedule/create-schedule/create-schedule.vue
+1
-0
index.js
utils/options/mine/index.js
+1
-1
index.js
utils/options/schedule/index.js
+1
-1
request.js
utils/request.js
+14
-12
No files found.
components/billing-daily/billing-daily.vue
View file @
2de2422a
...
...
@@ -140,6 +140,7 @@ export default {
this
.
getBillTypeOptions
();
this
.
getQiniuToken
();
}
this
.
$refs
[
'ab-calculator'
].
clearAll
()
},
async
getBillTypeOptions
()
{
...
...
@@ -187,6 +188,7 @@ export default {
open
(
id
)
{
this
.
getQiniuToken
();
this
.
getBillTypeOptions
();
this
.
$refs
[
'ab-calculator'
].
clearAll
()
if
(
id
)
{
this
.
id
=
id
;
this
.
getDetail
();
...
...
components/free-audio/index.vue
View file @
2de2422a
...
...
@@ -19,7 +19,7 @@
return
{
context
:
null
,
currentTime
:
0
,
duration
:
10
0
,
duration
:
0
,
status
:
false
}
},
...
...
components/mid-popup/mid-popup.vue
View file @
2de2422a
...
...
@@ -49,7 +49,7 @@ export default {
this
.
type
=
item
.
type
;
this
.
close
();
if
(
this
.
type
===
'3'
)
{
this
.
$refs
[
'billing-daily'
].
open
();
this
.
openBillingDaily
()
}
else
{
if
(
item
.
path
)
{
uni
.
navigateTo
({
...
...
@@ -58,6 +58,9 @@ export default {
}
}
},
openBillingDaily
(){
this
.
$refs
[
'billing-daily'
].
open
();
},
afterSave
(){
this
.
$emit
(
"afterSave"
)
}
...
...
pages/bill/bill-detail/bill-detail.vue
View file @
2de2422a
...
...
@@ -17,7 +17,7 @@
<view
class=
"item-label"
>
{{
item
.
label
}}
</view>
<view
class=
"item-value"
>
<text
class=
"item-value-repair"
v-if=
"item.value === 'remark' && detail.repairId"
>
点击查看维修账单
</text>
<text
v-else
>
{{
detail
[
item
.
value
]
||
''
}}
</text>
<text
v-else
>
{{
detail
[
item
.
value
]
||
''
}}
</text>
</view>
</view>
<view
class=
"card-bdoy-images"
v-if=
"detail.attach"
>
...
...
@@ -42,6 +42,7 @@ import PopInput from '@/components/pop-input-view';
import
BillingDetails
from
'@/components/billing-daily/billing-daily.vue'
;
import
{
billBaseUrl
}
from
'@/utils/config.js'
;
import
{
get
}
from
'@/api/bill/index.js'
;
import
{
deleteByIds
}
from
'@/api/bill/daily.js'
;
export
default
{
components
:
{
AbButton
,
...
...
@@ -84,7 +85,8 @@ export default {
label
:
'账单备注:'
,
value
:
'remark'
}
]
],
firstEnter
:
true
};
},
onLoad
(
options
)
{
...
...
@@ -100,12 +102,12 @@ export default {
}
},
onShow
()
{
if
(
this
.
id
)
{
if
(
!
this
.
firstEnter
&&
this
.
id
)
{
this
.
getDetail
();
}
},
methods
:
{
afterSave
(){
afterSave
()
{
this
.
getDetail
();
},
async
getDetail
()
{
...
...
@@ -116,22 +118,43 @@ export default {
}
catch
(
e
)
{
//TODO handle the exception
}
this
.
firstEnter
=
false
},
toDelete
()
{
this
.
showConfirm
=
true
;
},
toEdit
()
{
if
(
this
.
detail
.
repairId
){
}
else
{
if
(
this
.
detail
.
repairId
)
{
}
else
{
this
.
$refs
[
'billing-daily'
].
open
(
this
.
detail
.
id
);
}
},
handleConfirm
()
{
uni
.
showToast
({
icon
:
'none'
,
title
:
'删除成功'
});
async
handleConfirm
()
{
try
{
let
params
=
{
id
:
this
.
detail
.
id
};
let
{
data
}
=
await
deleteByIds
(
params
);
if
(
data
){
this
.
showToast
(
'删除成功'
,
true
);
setTimeout
(()
=>
{
uni
.
navigateBack
({
delta
:
1
});
},
1500
);
}
else
{
this
.
showToast
(
'删除失败'
);
}
}
catch
(
e
)
{
console
.
log
(
e
);
let
{
msg
}
=
e
;
if
(
msg
)
{
this
.
showToast
(
msg
);
}
else
{
this
.
showToast
(
'删除失败'
);
}
//TODO handle the exception
}
},
preview
(
item
,
index
)
{
let
urls
=
this
.
detail
.
attach
;
...
...
@@ -188,7 +211,7 @@ page {
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
&
-image
{
&
-image
{
width
:
76upx
;
height
:
76upx
;
}
...
...
pages/index/bill/bill.vue
View file @
2de2422a
...
...
@@ -11,13 +11,11 @@
</view>
</picker>
</view>
<view
class=
"bill-view"
>
<view
class=
"content-view"
>
<scroll-box
ref=
"scroll-box"
:date=
"defaultDate"
:count=
"statistics"
></scroll-box>
</view>
<view
class=
"bill-view"
>
<view
class=
"content-view"
><scroll-box
ref=
"scroll-box"
:date=
"defaultDate"
:count=
"statistics"
></scroll-box></view>
</view>
<u-toast
ref=
"uToast"
/>
<PopExport
ref=
'pop-export-bill'
:visible
.
sync=
"visible"
@
confirm=
"handleClickConfirm"
/>
<PopExport
ref=
"pop-export-bill"
:visible
.
sync=
"visible"
@
confirm=
"handleClickConfirm"
/>
<mid-popup
ref=
"midPopup"
@
afterSave=
"afterSave"
></mid-popup>
<u-tabbar
:list=
"tabbar"
:mid-button=
"true"
:mid-button-size=
"80"
:before-switch=
"beforeSwitch"
></u-tabbar>
</view>
...
...
@@ -31,7 +29,7 @@ import NavbarNormal from '@/components/navbar-normal';
import
ScrollBox
from
'./components/scroll-box.vue'
;
import
{
tabbar
}
from
'@/utils/settings.js'
;
import
{
baseUrl
}
from
'@/utils/config.js'
;
import
{
keepTwoDecimalFull
,
checkLoginAndVip
}
from
'@/utils/common.js'
;
import
{
keepTwoDecimalFull
,
checkLoginAndVip
,
checkToken
}
from
'@/utils/common.js'
;
import
{
downLoad
}
from
'@/utils/download.js'
;
import
{
getList
,
getStatistics
}
from
'@/api/bill/index.js'
;
import
{
exportBill
}
from
'@/api/bill/index.js'
;
...
...
@@ -57,23 +55,22 @@ export default {
income
:
0
,
surplus
:
0
},
firstEnter
:
true
firstEnter
:
true
};
},
computed
:
{
},
computed
:
{},
onLoad
()
{
this
.
initDate
();
this
.
getMouthStatistics
();
},
onReady
()
{
this
.
$refs
[
'scroll-box'
].
reloadList
();
this
.
firstEnter
=
false
this
.
firstEnter
=
false
;
},
onShow
()
{
console
.
log
(
'onShow'
);
if
(
!
this
.
firstEnter
)
{
this
.
$refs
[
'scroll-box'
].
reloadList
();
this
.
getMouthStatistics
();
}
},
methods
:
{
...
...
@@ -82,7 +79,9 @@ export default {
url
:
'/pages/index/index'
});
},
afterSave
()
{},
afterSave
()
{
this
.
$refs
[
'scroll-box'
].
reloadList
();
},
initDate
()
{
this
.
form
.
date
=
this
.
parseTime
(
new
Date
(),
'{y}年{m}月'
);
this
.
defaultDate
=
this
.
parseTime
(
new
Date
(),
'{y}-{m}'
)
+
'-01'
;
...
...
@@ -97,6 +96,11 @@ export default {
this
.
statistics
.
surplus
=
surplus
;
}
catch
(
e
)
{
//TODO handle the exception
this
.
statistics
=
{
expense
:
0
,
income
:
0
,
surplus
:
0
};
console
.
log
(
e
);
}
},
...
...
@@ -131,17 +135,17 @@ export default {
};
},
handlClickOut
()
{
checkLoginAndVip
(()
=>
{
this
.
visible
=
true
})
checkLoginAndVip
(()
=>
{
this
.
visible
=
true
;
})
;
},
handleClickConfirm
(
range
)
{
console
.
log
(
range
);
let
startTime
=
null
;
let
endTime
=
null
;
if
(
range
)
{
startTime
=
range
[
0
]
+
' 00:00:00'
;
endTime
=
range
[
1
]
+
' 23:59:59'
;
startTime
=
range
[
0
]
+
' 00:00:00'
;
endTime
=
range
[
1
]
+
' 23:59:59'
;
}
this
.
downloadExcel
({
startTime
,
endTime
});
// 导出
...
...
@@ -166,21 +170,21 @@ export default {
this
.
saveFile
(
res
);
}
catch
(
e
)
{
this
.
showToast
(
'下载错误'
);
this
.
$refs
[
'pop-export-bill'
].
stopLoading
()
this
.
$refs
[
'pop-export-bill'
].
stopLoading
()
;
console
.
log
(
'downloadExcel_error'
,
e
);
//TODO handle the exception
}
uni
.
hideLoading
()
uni
.
hideLoading
()
;
},
async
saveFile
(
file
)
{
console
.
log
(
'saveFile'
);
try
{
let
res
=
await
downLoad
(
file
);
this
.
$refs
[
'pop-export-bill'
].
stopLoading
()
this
.
visible
=
false
this
.
$refs
[
'pop-export-bill'
].
stopLoading
()
;
this
.
visible
=
false
;
}
catch
(
e
)
{
uni
.
hideLoading
();
this
.
$refs
[
'pop-export-bill'
].
stopLoading
()
this
.
$refs
[
'pop-export-bill'
].
stopLoading
()
;
console
.
log
(
'saveFile_error'
,
e
);
//TODO handle the exception
}
...
...
@@ -211,7 +215,7 @@ export default {
height
:
100vh
;
display
:
flex
;
flex-direction
:
column
;
.bill-view
{
.bill-view
{
flex
:
1
;
width
:
100%
;
overflow
:
hidden
;
...
...
@@ -240,6 +244,5 @@ export default {
margin-left
:
8upx
;
}
}
}
</
style
>
pages/index/bill/components/scroll-box.vue
View file @
2de2422a
...
...
@@ -92,6 +92,7 @@ export default {
},
async
getList
()
{
if
(
this
.
current
==
0
)
{
this
.
records
=
[];
this
.
loaded
=
false
;
}
try
{
...
...
@@ -102,10 +103,7 @@ export default {
};
console
.
log
(
'23131'
);
let
res
=
await
getList
(
params
);
let
{
records
,
total
}
=
res
.
data
if
(
this
.
current
==
0
)
{
this
.
records
=
[];
}
let
{
records
,
total
}
=
res
.
data
;
if
(
records
)
{
records
.
forEach
(
item
=>
{
let
week
=
''
;
...
...
@@ -120,7 +118,7 @@ export default {
week
=
getWeek
(
item
.
day
);
break
;
}
item
.
week
=
week
item
.
week
=
week
;
});
this
.
records
.
push
(...
records
);
// 更新底部加载状态
...
...
@@ -135,8 +133,13 @@ export default {
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
'error'
,
e
);
this
.
triggered
=
false
;
this
.
freshing
=
false
;
this
.
$nextTick
(()
=>
{
if
(
this
.
freshing
)
{
this
.
triggered
=
false
;
this
.
freshing
=
false
;
}
});
this
.
loadStatus
=
'loadmore'
}
this
.
loaded
=
true
;
},
...
...
pages/index/mine/mine.vue
View file @
2de2422a
...
...
@@ -85,16 +85,8 @@ export default {
onShow
()
{
if
(
checkToken
())
{
this
.
getUserInfo
();
return
;
}
// if (!this.userInfo || !this.userInfo.nickname) {
// uni.navigateTo({
// url: '/pages/login/quick-login/quick-login'
// });
// return;
// }
//拉取新用户信息,更新到storage
// this.getUserInfo()
// this.getUserCount();
// this.hasNewMessage();
},
...
...
pages/index/schedule/components/plan-view.vue
View file @
2de2422a
...
...
@@ -45,6 +45,7 @@ export default {
created
()
{},
methods
:
{
async
getList
(
date
)
{
this
.
list
=
[]
try
{
let
res
=
await
getList
({
day
:
date
...
...
pages/index/schedule/schedule.vue
View file @
2de2422a
...
...
@@ -95,6 +95,7 @@ export default {
this
.
firstEnter
=
false
;
},
async
getSignList
()
{
this
.
signList
=
[]
try
{
let
params
=
{
month
:
this
.
month
...
...
pages/login/login.vue
View file @
2de2422a
...
...
@@ -20,7 +20,7 @@
<text>
{{
platform
==
'2'
||
platform
==
'3'
?
'授权登录'
:
'微信登录'
}}
</text>
</view>
</view>
<
view
class=
"cancel-button"
><text
@
click
.
stop=
"toPhoneLogin"
>
手机验证码登录
</text></view
>
<
!--
<view
class=
"cancel-button"
><text
@
click
.
stop=
"toPhoneLogin"
>
手机验证码登录
</text></view>
--
>
<!--
<view
class=
"other-login"
>
<u-divider>
其他登录方式
</u-divider>
<view
class=
"other-login-item"
>
...
...
pages/mine/about/about.vue
View file @
2de2422a
...
...
@@ -16,7 +16,7 @@
</view>
</view>
</view>
<view
class=
"unsubscribe"
v-if=
"userInfo && userInfo.
userI
d"
><text
@
click=
"$u.throttle(unsubscribe, 500)"
>
注销账号
</text></view>
<view
class=
"unsubscribe"
v-if=
"userInfo && userInfo.
i
d"
><text
@
click=
"$u.throttle(unsubscribe, 500)"
>
注销账号
</text></view>
<unsubscribe-popup
:title=
"title"
:content=
"content"
ref=
"unsubscribe-popup"
@
confirm=
"onUnsubscribe"
></unsubscribe-popup>
</view>
</
template
>
...
...
pages/mine/update-log/update-log.vue
View file @
2de2422a
...
...
@@ -66,6 +66,7 @@ export default {
},
async
getList
()
{
if
(
this
.
current
==
0
)
{
this
.
records
=
[];
this
.
loaded
=
false
;
}
try
{
...
...
@@ -75,9 +76,6 @@ export default {
};
let
res
=
await
getList
(
params
);
let
{
records
,
total
}
=
res
.
data
;
if
(
this
.
current
==
0
)
{
this
.
records
=
[];
}
if
(
records
)
{
this
.
records
.
push
(...
records
);
// 更新底部加载状态
...
...
pages/schedule/create-schedule/create-schedule.vue
View file @
2de2422a
...
...
@@ -164,6 +164,7 @@ export default {
this
.
navigateTo
();
},
1500
);
}
catch
(
error
)
{
console
.
log
(
error
)
this
.
showToast
(
title
+
'失败'
);
}
this
.
loading
=
false
;
...
...
utils/options/mine/index.js
View file @
2de2422a
...
...
@@ -38,7 +38,7 @@ export const packageOptions = [
// },
{
id
:
1
,
title
:
'
用户服务&隐私协议
'
,
title
:
'
关于
'
,
icon
:
'file-text'
,
path
:
"/pages/mine/about/about"
},
...
...
utils/options/schedule/index.js
View file @
2de2422a
...
...
@@ -3,7 +3,7 @@ export const scheduleTypeOptions = [{
label
:
"工作"
},
{
value
:
"LI
f
E"
,
value
:
"LI
F
E"
,
label
:
"生活"
},
]
...
...
utils/request.js
View file @
2de2422a
...
...
@@ -80,21 +80,23 @@ function request({
// 白名单内直接返回
if
(
responseWhiteList
.
findIndex
(
item
=>
url
.
indexOf
(
item
)
!==
-
1
)
!==
-
1
)
{
resolve
(
res
.
data
)
}
else
if
(
res
.
data
.
code
===
23007
||
res
.
data
.
code
===
23009
)
{
if
(
url
.
indexOf
(
"customer/logout"
)
!==
-
1
)
{
resolve
(
res
.
data
)
}
else
{
console
.
log
(
"未登录或者登陆已过期"
)
reject
(
res
.
data
)
store
.
dispatch
(
"LogOut"
)
uni
.
switchTab
({
url
:
"/pages/index/index"
})
}
}
else
if
(
res
.
data
.
code
===
403
||
res
.
data
.
code
===
401
)
{
// if (url.indexOf("customer/logout") !== -1) {
// resolve(res.data)
// } else {
// reject(res.data)
// uni.switchTab({
// url: "/pages/index/index"
// })
// }
console
.
log
(
"未登录或者登陆已过期"
)
console
.
log
(
res
)
store
.
dispatch
(
"LogOut"
)
reject
(
res
.
data
)
}
else
if
(
res
.
data
.
code
===
23001
)
{
reject
(
res
.
data
)
}
else
{
if
(
checkToken
())
{
if
(
checkToken
())
{
showToast
(
res
.
data
.
msg
)
}
reject
(
res
.
data
)
...
...
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