Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
biz-trina5-app
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
贺双
biz-trina5-app
Commits
70713ab9
Commit
70713ab9
authored
May 29, 2025
by
贺世双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整登录和退出
parent
de139d4c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
31 deletions
+70
-31
apiList.js
api/apiList.js
+13
-5
orderPodItem.vue
components/orderPodItem/orderPodItem.vue
+4
-3
login.vue
pages/login/login.vue
+47
-22
user.vue
pages/user/user.vue
+6
-1
No files found.
api/apiList.js
View file @
70713ab9
...
...
@@ -25,11 +25,23 @@ export function authLogin(loginAction, loginCode, data) {
export
function
userMobileOperation
(
action
,
data
)
{
if
(
action
===
"logout"
)
{
//退出登录
return
Request
(
`/
logout`
,
data
,
"GET"
);
// data: {openId, entryName}
return
Request
(
`/
api/entry/{mini}/m-action/logout`
,
data
);
// data: {openId, entryName}
}
else
{
return
Request
(
`/api/entry/{mini}/m-action/getUserInfo`
,
data
);
}
}
//获取手机验证码
/*export function userMobileSendMessage(data) {
return Request(`/api/auth/app-login/{mini}/sendMessage`, data)
}*/
// 获取手机验证码发送
export
function
userMobileSendMessage
(
data
)
{
return
Request
(
`/handler/sendMessage`
,
data
);
}
//获取地图key
export
function
getMap
()
{
return
Request
(
`/api/query/*/action/getMap`
);
...
...
@@ -333,10 +345,6 @@ export function GetSignUrl(data) {
);
}
// 验证码发送
export
function
SendMessage
(
data
)
{
return
Request
(
`/handler/sendMessage`
,
data
);
}
// 订单轨迹
export
function
findShipmentLbs
(
data
)
{
...
...
components/orderPodItem/orderPodItem.vue
View file @
70713ab9
...
...
@@ -30,11 +30,12 @@
<bs-customCell
label=
"订舱/托书号 :"
:value=
"propData.sp__booking_no"
labelCol=
"3.5"
wrapCol=
"6"
/>
<bs-customCell
label=
"运单号 :"
:value=
"propData.shipment_no"
labelCol=
"2"
wrapCol=
"6"
/>
<bs-customCell
label=
"车牌号 :"
:value=
"propData.truck_no"
labelCol=
"2"
wrapCol=
"6"
/>
<bs-customCell
label=
"回单数量 :"
:value=
"propData.pod_count"
labelCol=
"2.5"
wrapCol=
"6"
/
>
<!--
<bs-customCell
label=
"回单数量 :"
:value=
"propData.pod_count"
labelCol=
"2.5"
wrapCol=
"6"
/>
--
>
</view>
<view
class=
"flex_cen flex_center orderItemButtonGroup"
v-if=
"propData.confirm_status != 'CONFIRMED'"
>
<view
class=
"flex_cen flex_center orderItemButtonGroup"
>
<button
class=
"flex_cen flex_center"
@
click=
"onDetailPodSign()"
>
明细上传
</button>
<button
class=
"flex_cen flex_center"
@
click=
"onAllPodSign()"
>
整单上传
</button>
<button
class=
"flex_cen flex_center"
@
click=
"onAllPodSign()"
>
整单上传
</button>
<!--
<button
class=
"flex_cen flex_center"
style=
"margin-top: 24rpx;"
@
click=
"onChangeShippingDate()"
>
修改船期
</button>
-->
</view>
</view>
...
...
pages/login/login.vue
View file @
70713ab9
...
...
@@ -12,14 +12,15 @@
<u-form-item
prop=
"phone"
>
<u-input
type=
"number"
v-model=
"formData.phone"
placeholder=
"请输入手机号"
/>
</u-form-item>
<u-form-item
prop=
"password"
>
<!--
<u-form-item
prop=
"password"
>
<u-input
type=
"password"
v-model=
"formData.telPassword"
placeholder=
"请输入密码"
/>
</u-form-item>
<!--
<u-form-item
prop=
"authCode"
>
</u-form-item>
-->
<u-form-item
prop=
"authCode"
>
<u-input
type=
"number"
v-model=
"formData.authCode"
maxlength=
"6"
border=
"none"
placeholder=
"验证码"
/>
<u-button
slot=
"right"
@
click=
"getAuthCode"
:text=
"tips"
type=
"success"
size=
"mini"
:disabled=
"disabled"
/>
</u-form-item>
<u-code
ref=
"uCode"
@
change=
"onTipsChange"
seconds=
"60"
@
start=
"disabled"
@
end=
"disabled"
/>
-->
<u-code
ref=
"uCode"
@
change=
"onTipsChange"
seconds=
"60"
@
start=
"start"
@
end=
"end"
/>
</
template
>
<
template
v-else
>
<u-form-item
prop=
"userName"
>
...
...
@@ -42,7 +43,7 @@
<
script
>
import
{
MINI
,
ENV_MODEL
,
TokenPrefix
}
from
'../../publicConfig/config.js'
import
{
userLogin
,
userCarrierLogin
,
SendMessage
,
userMobileOperation
}
from
'../../api/apiList.js'
userMobile
SendMessage
,
userMobileOperation
}
from
'../../api/apiList.js'
const
loginBehavior
=
require
(
'../../mixins/loginBehavior.js'
)
export
default
{
...
...
@@ -54,7 +55,6 @@
userName
:
''
,
//用户名
password
:
''
,
//密码
phone
:
''
,
//电话号码
telPassword
:
''
,
//电话
authCode
:
''
//验证码
},
isVerifLogin
:
true
,
//是否为验证码登录
...
...
@@ -93,20 +93,23 @@
},
//表单提交前规则校验
onSubmitBeforeRule
(
userName
,
password
,
phone
,
telPassword
){
onSubmitBeforeRule
(
userName
,
password
,
phone
,
authCode
){
let
ruleFlag
=
true
let
tostText
=
''
//表单字段校验
if
(
this
.
isVerifLogin
){
if
(
!
phone
&&
!
telPassword
){
tostText
=
'请输入手机号及
密
码'
if
(
!
phone
&&
!
authCode
){
tostText
=
'请输入手机号及
验证
码'
}
else
if
(
!
phone
){
tostText
=
'请输入手机号'
}
else
if
(
!
telPassword
){
tostText
=
'请输入
密
码'
}
else
if
(
!
authCode
){
tostText
=
'请输入
验证
码'
}
else
if
(
phone
&&
!
uni
.
$u
.
test
.
mobile
(
phone
)){
tostText
=
'请输入有效手机号码'
}
}
else
if
(
authCode
&&
!
uni
.
$u
.
test
.
code
(
authCode
,
6
)){
tostText
=
'请输入6位有效验证码'
}
}
else
{
if
(
!
userName
&&
!
password
){
tostText
=
'请输入用户名及密码'
...
...
@@ -152,13 +155,13 @@
//确认提交
submitForm
()
{
const
{
userName
,
password
,
phone
,
telPassword
}
=
this
.
formData
if
(
!
this
.
onSubmitBeforeRule
(
userName
,
password
,
phone
,
telPassword
))
return
//规则校验
const
{
userName
,
password
,
phone
,
authCode
}
=
this
.
formData
if
(
!
this
.
onSubmitBeforeRule
(
userName
,
password
,
phone
,
authCode
))
return
//规则校验
let
{
projectMini
}
=
getApp
().
globalData
;
let
loginAction
=
'loginByUserInfo'
let
reqData
=
{
entryName
:
projectMini
}
if
(
this
.
isVerifLogin
)
{
reqData
=
{...
reqData
,
params
:
{
phone
,
telPassword
}}
reqData
=
{...
reqData
,
params
:
{
phone
,
authCode
}}
loginAction
=
'loginByCustomAuth'
}
else
{
const
encryptedPassword
=
this
.
encryptedText
(
password
)
...
...
@@ -328,12 +331,12 @@
})
})
},
end
()
{},
start
()
{},
//提示文本
onTipsChange
(
text
)
{
this
.
tips
=
text
;
},
//获取手机验证码
getAuthCode
()
{
if
(
this
.
$refs
.
uCode
.
canGetCode
)
{
...
...
@@ -343,19 +346,41 @@
uni
.
$u
.
toast
(
'请稍候重试 !'
);
}
},
//获取验证码
sendMessage
()
{
var
phone
=
this
.
formData
.
phone
;
const
{
projectMini
}
=
getApp
().
globalData
SendMessage
({
phone
:
this
.
formData
.
phone
,
entryName
:
projectMini
}).
then
(()
=>
{
var
baseData
=
{
"phone"
:
this
.
formData
.
phone
,
"entryName"
:
getApp
().
globalData
.
projectMini
}
if
(
!
phone
){
uni
.
showToast
({
title
:
"请输入手机号"
,
icon
:
'none'
,
duration
:
1500
})
return
;
}
if
(
phone
&&
!
uni
.
$u
.
test
.
mobile
(
phone
)){
uni
.
showToast
({
title
:
"请输入有效手机号码"
,
icon
:
'none'
,
duration
:
1500
})
return
;
}
userMobileSendMessage
(
baseData
).
then
(
res
=>
{
// console.log(res)
uni
.
showLoading
({
title
:
'验证码获取中...'
})
setTimeout
(()
=>
{
uni
.
hideLoading
();
uni
.
$u
.
toast
(
'验证码已发送'
);
// 该提示会被this.start()方法中的提示覆盖
this
.
$refs
.
uCode
.
start
();
// 开启倒计时
},
1000
);
const
datas
=
res
.
data
.
data
})
},
}
...
...
pages/user/user.vue
View file @
70713ab9
...
...
@@ -79,7 +79,12 @@
// #endif
const
{
projectMini
}
=
getApp
().
globalData
const
openId
=
this
.
userInfo
.
userExt
?.
openid
const
data
=
{
openId
,
entryName
:
projectMini
}
var
data
=
{
"args"
:
{
"phone"
:
this
.
userInfo
.
mobile
,
"entryName"
:
getApp
().
globalData
.
projectMini
}
}
userMobileOperation
(
'logout'
,
data
).
then
(
res
=>
{
if
(
res
.
data
.
messageType
===
'success'
)
{
_this
.
customTost
()
...
...
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