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
a2cf3ed0
Commit
a2cf3ed0
authored
Jul 26, 2022
by
刘文虎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出错误
parent
cb0fbbd4
Pipeline
#2938
canceled with stages
Changes
10
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
186 additions
and
174 deletions
+186
-174
index.js
api/maintain/index.js
+1
-0
index.vue
components/pop-export-bill/index.vue
+3
-0
pages.json
pages.json
+2
-1
bill.vue
pages/index/bill/bill.vue
+8
-3
login.vue
pages/login/login.vue
+4
-4
quick-login - 副本.vue
pages/login/quick-login/quick-login - 副本.vue
+0
-0
quick-login.vue
pages/login/quick-login/quick-login.vue
+166
-164
index.vue
pages/maintain-bill/index.vue
+2
-2
shiyongbanshou@3x.png
static/image/index/shiyongbanshou@3x.png
+0
-0
weixin@3x.png
static/image/index/weixin@3x.png
+0
-0
No files found.
api/maintain/index.js
View file @
a2cf3ed0
...
@@ -46,6 +46,7 @@ export async function repairExport(data) {
...
@@ -46,6 +46,7 @@ export async function repairExport(data) {
url
:
`/rest/repair/export`
,
url
:
`/rest/repair/export`
,
method
:
'POST'
,
method
:
'POST'
,
data
,
data
,
responseType
:
'ArrayBuffer'
,
noLoading
:
true
noLoading
:
true
})
})
}
}
...
...
components/pop-export-bill/index.vue
View file @
a2cf3ed0
...
@@ -133,6 +133,9 @@ export default {
...
@@ -133,6 +133,9 @@ export default {
handleClose
()
{
handleClose
()
{
this
.
changeVisibleValue
(
false
)
this
.
changeVisibleValue
(
false
)
},
},
stopLoading
(){
this
.
loading
=
false
}
},
},
}
}
</
script
>
</
script
>
...
...
pages.json
View file @
a2cf3ed0
...
@@ -56,7 +56,8 @@
...
@@ -56,7 +56,8 @@
"style"
:
"style"
:
{
{
"navigationBarTitleText"
:
"快速登录"
,
"navigationBarTitleText"
:
"快速登录"
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
,
"navigationStyle"
:
"custom"
}
}
}
}
...
...
pages/index/bill/bill.vue
View file @
a2cf3ed0
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
</view>
</view>
</view>
</view>
<u-toast
ref=
"uToast"
/>
<u-toast
ref=
"uToast"
/>
<PopExport
:visible
.
sync=
"visible"
@
confirm=
"handleClickConfirm"
/>
<PopExport
ref=
'pop-export-bill'
:visible
.
sync=
"visible"
@
confirm=
"handleClickConfirm"
/>
<mid-popup
ref=
"midPopup"
@
afterSave=
"afterSave"
></mid-popup>
<mid-popup
ref=
"midPopup"
@
afterSave=
"afterSave"
></mid-popup>
<u-tabbar
:list=
"tabbar"
:mid-button=
"true"
:mid-button-size=
"80"
:before-switch=
"beforeSwitch"
></u-tabbar>
<u-tabbar
:list=
"tabbar"
:mid-button=
"true"
:mid-button-size=
"80"
:before-switch=
"beforeSwitch"
></u-tabbar>
</view>
</view>
...
@@ -138,8 +138,8 @@ export default {
...
@@ -138,8 +138,8 @@ export default {
let
startTime
=
null
;
let
startTime
=
null
;
let
endTime
=
null
;
let
endTime
=
null
;
if
(
range
)
{
if
(
range
)
{
startTime
=
range
[
0
];
startTime
=
range
[
0
]
+
' 00:00:00'
;
endTime
=
range
[
1
];
endTime
=
range
[
1
]
+
' 23:59:59'
;
}
}
this
.
downloadExcel
({
startTime
,
endTime
});
this
.
downloadExcel
({
startTime
,
endTime
});
// 导出
// 导出
...
@@ -164,16 +164,21 @@ export default {
...
@@ -164,16 +164,21 @@ export default {
this
.
saveFile
(
res
);
this
.
saveFile
(
res
);
}
catch
(
e
)
{
}
catch
(
e
)
{
this
.
showToast
(
'下载错误'
);
this
.
showToast
(
'下载错误'
);
this
.
$refs
[
'pop-export-bill'
].
stopLoading
()
console
.
log
(
'downloadExcel_error'
,
e
);
console
.
log
(
'downloadExcel_error'
,
e
);
//TODO handle the exception
//TODO handle the exception
}
}
uni
.
hideLoading
()
},
},
async
saveFile
(
file
)
{
async
saveFile
(
file
)
{
console
.
log
(
'saveFile'
);
console
.
log
(
'saveFile'
);
try
{
try
{
let
res
=
await
downLoad
(
file
);
let
res
=
await
downLoad
(
file
);
this
.
$refs
[
'pop-export-bill'
].
stopLoading
()
this
.
visible
=
false
}
catch
(
e
)
{
}
catch
(
e
)
{
uni
.
hideLoading
();
uni
.
hideLoading
();
this
.
$refs
[
'pop-export-bill'
].
stopLoading
()
console
.
log
(
'saveFile_error'
,
e
);
console
.
log
(
'saveFile_error'
,
e
);
//TODO handle the exception
//TODO handle the exception
}
}
...
...
pages/login/login.vue
View file @
a2cf3ed0
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
<view
class=
"quick-color-cancel"
:style=
"
{ 'padding-top': platform == '3' ? 0 : statusBarHeight + 'px' }">
<u-icon
name=
"close"
@
click=
"toIndex"
></u-icon></view>
<view
class=
"quick-color-cancel"
:style=
"
{ 'padding-top': platform == '3' ? 0 : statusBarHeight + 'px' }">
<u-icon
name=
"close"
@
click=
"toIndex"
></u-icon></view>
</view>
</view>
<view
class=
"quick-background"
>
<view
class=
"quick-background"
>
<image
src=
"/static/image
s
/login/startup/denglulogo@3x.png"
mode=
""
class=
"quick-background-logo"
></image>
<image
src=
"/static/image/login/startup/denglulogo@3x.png"
mode=
""
class=
"quick-background-logo"
></image>
<image
src=
"/static/image
s/login/startup
/shiyongbanshou@3x.png"
mode=
""
class=
"quick-background-slogn"
></image>
<image
src=
"/static/image
/index
/shiyongbanshou@3x.png"
mode=
""
class=
"quick-background-slogn"
></image>
</view>
</view>
<view
class=
"quick-mark"
>
<view
class=
"quick-mark"
>
<view
class=
"quick-center"
v-if=
"isIOS && platform === '4'"
>
<view
class=
"quick-center"
v-if=
"isIOS && platform === '4'"
>
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<view
class=
"quick-center"
v-else
>
<view
class=
"quick-center"
v-else
>
<view
class=
"submit-button-box"
>
<view
class=
"submit-button-box"
>
<view
class=
"submit-button"
@
click
.
stop=
"submit"
:loading=
"loading"
>
<view
class=
"submit-button"
@
click
.
stop=
"submit"
:loading=
"loading"
>
<image
src=
"/static/image
s/login/startup
/weixin@3x.png"
mode=
""
class=
"submit-button-icon"
v-if=
"!(platform == '2' || platform == '3')"
></image>
<image
src=
"/static/image
/index
/weixin@3x.png"
mode=
""
class=
"submit-button-icon"
v-if=
"!(platform == '2' || platform == '3')"
></image>
<text>
{{
platform
==
'2'
||
platform
==
'3'
?
'授权登录'
:
'微信登录'
}}
</text>
<text>
{{
platform
==
'2'
||
platform
==
'3'
?
'授权登录'
:
'微信登录'
}}
</text>
</view>
</view>
</view>
</view>
...
@@ -180,7 +180,7 @@ export default {
...
@@ -180,7 +180,7 @@ export default {
&
-color
{
&
-color
{
width
:
100%
;
width
:
100%
;
height
:
30%
;
height
:
30%
;
background
:
linear-gradient
(
180deg
,
#
e9f3ff
0%
,
#ffffff
100%
);
background
:
linear-gradient
(
180deg
,
#
F4FFFC
0%
,
#ffffff
100%
);
overflow
:
hidden
;
overflow
:
hidden
;
&
-cancel
{
&
-cancel
{
width
:
60upx
;
width
:
60upx
;
...
...
pages/login/quick-login/quick-login - 副本.vue
0 → 100644
View file @
a2cf3ed0
This diff is collapsed.
Click to expand it.
pages/login/quick-login/quick-login.vue
View file @
a2cf3ed0
<
template
>
<
template
>
<view
class=
"login-index"
>
<view
class=
"quick"
>
<view
class=
"main"
>
<view
class=
"quick-color"
>
<view
class=
"m-top flex flex-column flex-yc"
>
<view
class=
"quick-color-cancel"
:style=
"
{ 'padding-top': platform == '3' ? 0 : statusBarHeight + 'px' }">
<u-icon
name=
"close"
@
click=
"toIndex"
></u-icon></view>
<view
class=
"t-logo"
>
<image
class=
"t-logo"
src=
"/static/images/logo_quick_search.png"
/>
</view>
</view>
<text
class=
"t-title"
>
扳手快查
</text>
<view
class=
"quick-background"
>
<image
src=
"/static/images/login/startup/denglulogo@3x.png"
mode=
""
class=
"quick-background-logo"
></image>
<image
src=
"/static/images/login/startup/shiyongbanshou@3x.png"
mode=
""
class=
"quick-background-slogn"
></image>
</view>
</view>
<view
class=
"m-mid
"
>
<view
class=
"quick-mark
"
>
<block
v-if=
"needAuth
"
>
<view
class=
"quick-center
"
>
<view
class=
"auth-tip"
>
我们需要取得您的手机号,以关联您的扳手快查账号
</view>
<view
class=
"auth-tip"
>
我们需要取得您的手机号,以关联您的扳手快查账号
</view>
<view
class=
"flex flex-between
"
>
<view
class=
"quick-center-buttons
"
>
<button
class=
"login-refuse"
@
tap=
"refuseAuth"
>
拒绝
</button>
<button
class=
"login-refuse"
@
tap=
"refuseAuth"
>
拒绝
</button>
<button
class=
"login-accept"
open-type=
"getPhoneNumber"
lang=
"zh_CN"
@
getphonenumber=
"signup"
>
立即登录
</button>
<button
class=
"login-refuse login-accept"
open-type=
"getPhoneNumber"
lang=
"zh_CN"
@
getphonenumber=
"signup"
>
立即登录
</button>
</view>
</block>
<block
v-else
>
<view
class=
"auth-tip"
>
授权成功,立即登录
</view>
<button
class=
"login-now"
open-type=
"getPhoneNumber"
@
getphonenumber=
"signup"
>
立即登录
</button>
</block>
</view>
<view
class=
"m-btm"
>
<view
class=
"b-list"
>
<view
class=
"b-item flex flex-yc"
v-for=
"(item, index) in list"
:key=
"index"
>
<view
class=
"i-img"
>
<image
class=
"i-img"
:src=
"item.img"
/>
</view>
<view
class=
"i-right flex flex-column flex-between"
>
<text
class=
"r-top"
>
{{
item
.
title
}}
</text>
<text
class=
"r-btm"
>
{{
item
.
intro
}}
</text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
log
from
'@/utils/log.js'
import
log
from
'@/utils/log.js'
;
import
{
showToast
}
from
"@/utils/common.js"
import
{
showToast
}
from
'@/utils/common.js'
;
import
{
mapGetters
}
from
'vuex'
;
import
{
mapGetters
}
from
'vuex'
;
export
default
{
export
default
{
components
:
{},
components
:
{},
...
@@ -70,7 +51,8 @@ export default {
...
@@ -70,7 +51,8 @@ export default {
],
],
canIUseGetUserProfile
:
false
,
canIUseGetUserProfile
:
false
,
agree
:
false
,
agree
:
false
,
params
:
{}
params
:
{},
statusBarHeight
:
20
};
};
},
},
computed
:
{
computed
:
{
...
@@ -88,8 +70,15 @@ export default {
...
@@ -88,8 +70,15 @@ export default {
this
.
canIUseGetUserProfile
=
true
;
this
.
canIUseGetUserProfile
=
true
;
break
;
break
;
}
}
let
{
statusBarHeight
}
=
this
.
systemInfo
;
this
.
statusBarHeight
=
statusBarHeight
;
},
},
methods
:
{
methods
:
{
toIndex
(){
uni
.
navigateBack
({
delta
:
1
})
},
// setLoginStatus() {
// setLoginStatus() {
// // 授权用户信息不为空,说明已经授权过无需重新授权
// // 授权用户信息不为空,说明已经授权过无需重新授权
// if (app.globalData.tmp && app.globalData.tmp.wxUserInfo) {
// if (app.globalData.tmp && app.globalData.tmp.wxUserInfo) {
...
@@ -125,7 +114,7 @@ export default {
...
@@ -125,7 +114,7 @@ export default {
if
(
this
.
needAuth
)
{
if
(
this
.
needAuth
)
{
uni
.
getUserProfile
({
uni
.
getUserProfile
({
desc
:
'用于授权登录'
,
desc
:
'用于授权登录'
,
success
:
res
=>
{
success
:
res
=>
{
console
.
log
(
'授权成功'
,
res
);
console
.
log
(
'授权成功'
,
res
);
const
userInfo
=
res
.
userInfo
||
{
const
userInfo
=
res
.
userInfo
||
{
nickName
:
''
,
nickName
:
''
,
...
@@ -264,32 +253,38 @@ export default {
...
@@ -264,32 +253,38 @@ export default {
}
else
{
}
else
{
console
.
log
(
'用户同意'
,
e
.
detail
);
console
.
log
(
'用户同意'
,
e
.
detail
);
const
detail
=
e
.
detail
||
{};
const
detail
=
e
.
detail
||
{};
let
params
=
{
let
params
=
{
encryptedData
:
detail
.
encryptedData
,
encryptedData
:
detail
.
encryptedData
,
iv
:
detail
.
iv
,
iv
:
detail
.
iv
// code: detail.code,
// code: detail.code,
}
};
this
.
$store
.
dispatch
(
'Auto_login'
,
params
).
then
((
res
)
=>
{
this
.
$store
console
.
log
(
"登录成功"
,
res
)
.
dispatch
(
'Auto_login'
,
params
)
this
.
$store
.
dispatch
(
'Get_UserInfo'
).
then
(()
=>
{
.
then
(
res
=>
{
console
.
log
(
'登录成功'
,
res
);
this
.
$store
.
dispatch
(
'Get_UserInfo'
)
.
then
(()
=>
{
showToast
(
'登录成功'
);
showToast
(
'登录成功'
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
uni
.
switchTab
({
uni
.
switchTab
({
url
:
"/pages/index/index"
url
:
'/pages/index/index'
});
},
1000
);
})
})
},
1000
)
.
catch
(()
=>
{
}).
catch
(()
=>
{
showToast
(
'获取用户信息失败'
);
showToast
(
'获取用户信息失败'
);
});
})
})
}).
catch
((
err
)
=>
{
.
catch
(
err
=>
{
showToast
(
'登录失败'
);
showToast
(
'登录失败'
);
console
.
log
(
"登录失败"
,
err
)
console
.
log
(
'登录失败'
,
err
);
})
});
// let userInfo = (app.globalData.tmp && app.globalData.tmp.wxUserInfo) || {
// let userInfo = (app.globalData.tmp && app.globalData.tmp.wxUserInfo) || {
// nickName: '',
// nickName: '',
// avatarUrl: ''
// avatarUrl: ''
// };
// };
return
false
return
false
;
login
login
.
wxLogin
()
.
wxLogin
()
.
then
(
res
=>
{
.
then
(
res
=>
{
...
@@ -419,116 +414,123 @@ export default {
...
@@ -419,116 +414,123 @@ export default {
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.login-index
.main
{
.quick
{
font-size
:
24rpx
;
width
:
100%
;
}
height
:
100vh
;
.login-index
.main
.m-top
{
background
:
#ffffff
;
margin-top
:
30rpx
;
position
:
relative
;
color
:
#333333
;
&
-color
{
width
:
100%
;
height
:
30%
;
background
:
linear-gradient
(
180deg
,
#F4FFFC
0%
,
#ffffff
100%
);
overflow
:
hidden
;
&
-cancel
{
width
:
60upx
;
height
:
60upx
;
text-align
:
left
;
margin-top
:
20upx
;
margin-left
:
32upx
;
font-size
:
32upx
;
}
}
&
-background
{
position
:
absolute
;
overflow
:
hidden
;
top
:
20%
;
text-align
:
center
;
width
:
100%
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
justify-content
:
center
;
}
align-items
:
center
;
.login-index
.main
.m-top
.t-logo
{
flex-direction
:
column
;
margin-bottom
:
15rpx
;
&
-logo
{
width
:
138rpx
;
width
:
144upx
;
height
:
138rpx
;
height
:
144upx
;
background
:
#ffffff
;
}
border-radius
:
50%
;
&
-slogn
{
}
width
:
362upx
;
.login-index
.main
.m-top
.t-title
{
height
:
38upx
;
font-size
:
40rpx
;
margin-top
:
46upx
;
}
}
&
-mark
{
// overflow: hidden;
width
:
100%
;
position
:
absolute
;
left
:
50%
;
top
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
}
&
-center
{
position
:
relative
;
width
:
100%
;
.submit-button-box
{
width
:
100%
;
padding
:
0
80upx
;
margin-bottom
:
54upx
;
.submit-button
{
position
:
relative
;
width
:
100%
;
height
:
104upx
;
border-radius
:
52upx
;
line-height
:
104upx
;
color
:
#ffffff
;
font-size
:
32upx
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#333333
;
text-align
:
center
;
line-height
:
1
;
background
:
#00c802
;
}
box-shadow
:
0px
12upx
24upx
0px
rgba
(
0
,
200
,
2
,
0
.32
);
.login-index
.main
.m-mid
{
font-weight
:
500
;
padding
:
0
40rpx
;
display
:
flex
;
margin-bottom
:
24rpx
;
align-items
:
center
;
}
justify-content
:
center
;
.login-index
.main
.m-mid
.auth-tip
{
&
:active
{
background
:
#41c845
;
}
.submit-button-icon
{
width
:
38upx
;
height
:
32upx
;
margin-right
:
16upx
;
}
}
}
.auth-tip
{
margin-top
:
80rpx
;
margin-top
:
80rpx
;
margin-bottom
:
40rpx
;
margin-bottom
:
40rpx
;
text-align
:
center
;
text-align
:
center
;
font-size
:
24rpx
;
font-size
:
24rpx
;
color
:
#8d8d8d
;
color
:
#8d8d8d
;
line-height
:
1
;
line-height
:
1
;
}
}
.login-index
.main
.m-mid
button
{
&
-buttons
{
padding
:
0
;
margin
:
0
;
}
.login-index
.main
.m-mid
button
.login-now
{
/* margin-top: 138rpx; */
width
:
670rpx
;
height
:
98rpx
;
background
:
#07c160
;
border-radius
:
49rpx
;
color
:
#ffffff
;
font-weight
:
bold
;
box-shadow
:
6rpx
6rpx
40rpx
rgba
(
7
,
193
,
96
,
0
.5
);
}
.login-index
.main
.m-mid
button
.login-refuse
,
.login-index
.main
.m-mid
.login-accept
{
width
:
318rpx
;
height
:
86rpx
;
line-height
:
86rpx
;
border-radius
:
49rpx
;
color
:
#ffffff
;
font-weight
:
bold
;
}
.login-index
.main
.m-mid
button
.login-refuse
{
color
:
#333333
;
background
:
#ededed
;
}
.login-index
.main
.m-mid
button
.login-accept
{
background
:
#07c160
;
box-shadow
:
6rpx
6rpx
40rpx
rgba
(
7
,
193
,
96
,
0
.5
);
}
.login-index
.main
.m-btm
.b-list
{
padding
:
80rpx
40rpx
0
40rpx
;
}
.login-index
.main
.m-btm
.b-list
.b-item
{
margin-bottom
:
55rpx
;
}
.login-index
.main
.m-btm
.b-list
.b-item
.i-img
{
margin-right
:
36rpx
;
width
:
60rpx
;
height
:
60rpx
;
flex-shrink
:
0
;
}
.login-index
.main
.m-btm
.b-list
.b-item
.i-right
.r-top
{
margin-bottom
:
21rpx
;
font-size
:
28rpx
;
color
:
#333333
;
}
.login-index
.main
.m-btm
.b-list
.b-item
.i-right
.r-btm
{
font-size
:
24rpx
;
color
:
#888888
;
}
.agree-view
{
font-size
:
28rpx
;
color
:
#8d8d8d
;
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
}
justify-content
:
space-between
;
}
.login-refuse
{
width
:
292rpx
;
height
:
104rpx
;
border-radius
:
16rpx
;
border
:
2rpx
solid
#cccccc
;
line-height
:
104rpx
;
font-size
:
32rpx
;
color
:
#8d8d8d
;
font-weight
:
bold
;
background
:
#ffffff
;
}
.login-accept
{
color
:
#ffffff
;
background
:
$default-color
;
box-shadow
:
0px
12rpx
24rpx
0px
rgba
(
2
,
160
,
116
,
0
.2
);
border
:
none
;
}
.check-circle-view
{
.cancel-button
{
border-radius
:
50%
;
text-align
:
center
;
border
:
2rpx
solid
#3383fe
;
font-size
:
32upx
;
width
:
36rpx
;
color
:
#8d8d8d
;
height
:
36rpx
;
}
}
}
.icon-view
{
width
:
56rpx
;
height
:
56rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.agree-text-view
{
}
.name-text
{
color
:
#3383fe
;
}
}
</
style
>
</
style
>
pages/maintain-bill/index.vue
View file @
a2cf3ed0
...
@@ -293,8 +293,8 @@ export default {
...
@@ -293,8 +293,8 @@ export default {
}
}
if
(
range
)
{
if
(
range
)
{
param
=
{
param
=
{
end
:
range
[
0
]
+
' 00:00:00
'
,
end
:
range
[
1
]
+
' 23:59:59
'
,
start
:
range
[
1
]
+
' 00:00:00'
,
start
:
range
[
0
]
+
' 00:00:00'
,
}
}
}
}
// 导出
// 导出
...
...
static/image/index/shiyongbanshou@3x.png
0 → 100644
View file @
a2cf3ed0
4.19 KB
static/image/index/weixin@3x.png
0 → 100644
View file @
a2cf3ed0
1.58 KB
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