Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_wechat
Overview
Overview
Details
Activity
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
pseer
gxpt_wechat
Commits
59a1608b
Commit
59a1608b
authored
Jan 27, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节优化
parent
5650f3cc
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
10 deletions
+43
-10
index.js
api/index.js
+1
-0
login.vue
components/login/login.vue
+11
-1
noLogin.vue
components/noLogin/noLogin.vue
+9
-0
index.vue
pages/index/index.vue
+7
-7
myInfo.vue
pages/my/myInfo.vue
+0
-1
order.vue
pages/order/order.vue
+15
-1
No files found.
api/index.js
View file @
59a1608b
...
...
@@ -73,3 +73,4 @@ export const getProtocol=(key)=>{
let
url
=
`/protocol/
${
key
}
`
return
http
.
get
(
url
)
}
components/login/login.vue
View file @
59a1608b
...
...
@@ -21,7 +21,8 @@
<
script
>
import
{
login
,
register
register
,
getUserInfo
}
from
"@/api/index.js"
;
export
default
{
...
...
@@ -32,6 +33,13 @@
};
},
methods
:{
onGetUserInfoToSave
(){
getUserInfo
().
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
){
uni
.
setStorageSync
(
'userInfo'
,
res
.
data
.
data
)
}
})
},
open
(){
let
that
=
this
;
wx
.
login
({
...
...
@@ -45,6 +53,7 @@
data
:
res
.
data
.
data
.
token
})
that
.
$emit
(
'success'
)
that
.
onGetUserInfoToSave
()
}
else
{
uni
.
removeStorageSync
(
'tokenHeaders'
)
this
.
$refs
.
popupPhone
.
open
();
...
...
@@ -84,6 +93,7 @@
success
:
(
res
)
=>
{
that
.
$emit
(
'success'
)
this
.
$refs
.
popupPhone
.
close
()
that
.
onGetUserInfoToSave
()
}
})
}
...
...
components/noLogin/noLogin.vue
View file @
59a1608b
...
...
@@ -13,6 +13,7 @@
<
script
>
import
{
register
,
getUserInfo
}
from
"@/api/index.js"
;
export
default
{
...
...
@@ -34,6 +35,13 @@
}
},
methods
:{
onGetUserInfoToSave
(){
getUserInfo
().
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
){
uni
.
setStorageSync
(
'userInfo'
,
res
.
data
.
data
)
}
})
},
onGetPhoneNumber
(
e
){
let
that
=
this
;
this
.
phoneCode
=
e
.
detail
.
code
;
...
...
@@ -54,6 +62,7 @@
data
:
res
.
data
.
data
.
token
,
success
:
(
res
)
=>
{
that
.
$emit
(
'success'
)
that
.
onGetUserInfoToSave
();
}
})
}
...
...
pages/index/index.vue
View file @
59a1608b
...
...
@@ -366,13 +366,13 @@
})
},
onNavToOrder
(
item
)
{
//
if(item.isDirtyRoom >=1){
//
uni.showToast({
//
icon:"none",
//
title:'当前房间未保洁,无法预定,请选择其他房间'
//
})
//
return
//
}
if
(
item
.
isDirtyRoom
>=
1
){
uni
.
showToast
({
icon
:
"none"
,
title
:
'当前房间未保洁,无法预定,请选择其他房间'
})
return
}
uni
.
navigateTo
({
url
:
`/pages/order/order?roomId=
${
item
.
id
}
`
})
...
...
pages/my/myInfo.vue
View file @
59a1608b
...
...
@@ -237,7 +237,6 @@
},
onGetUserInfo
()
{
getUserInfo
().
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
data
.
code
==
200
){
this
.
userInfo
=
res
.
data
.
data
;
this
.
userName
=
this
.
userInfo
.
phone
.
slice
(
-
4
);
...
...
pages/order/order.vue
View file @
59a1608b
...
...
@@ -7,12 +7,21 @@
<view
class=
"part-right"
>
<text
class=
"text-title text-xl text-bold"
>
{{
roomInfo
.
name
||
'凑角'
}}{{
roomInfo
.
roomType
?
'【'
+
roomTypeEnum
[
roomInfo
.
roomType
]
+
'】'
:
''
}}
</text>
<view
class=
"status-icon-box"
>
<view
v-if=
"roomInfo.isDirtyRoom >=1"
class=
"status-icon-box"
>
<view
class=
"status-box"
:class=
"'status-box-1'"
>
<text>
未保洁
</text>
</view>
<image
class=
"img"
:src=
"assetsPath+'/fa_icon_1.png'"
mode=
"widthFix"
></image>
</view>
<view
v-else
class=
"status-icon-box"
>
<view
class=
"status-box"
:class=
"'status-box-'+roomInfo.status"
>
<text>
{{
roomStatusEnum
[
roomInfo
.
status
]
}}
</text>
</view>
<image
class=
"img"
:src=
"assetsPath+'/fa_icon_'+roomInfo.status+'.png'"
mode=
"widthFix"
></image>
</view>
</view>
<view
class=
"part-left"
>
<image
:src=
"roomInfo.images.length?roomInfo.images[0]: assetsPath+'/banner.jpg'"
mode=
"widthFix"
>
...
...
@@ -921,6 +930,11 @@
// uni.hideLoading()
if
(
res
.
data
.
code
==
200
)
{
this
.
computePriceInfo
=
res
.
data
.
data
;
}
else
{
uni
.
showToast
({
icon
:
"none"
,
title
:
res
.
data
.
msg
})
}
})
...
...
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