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
f27b898b
Commit
f27b898b
authored
Nov 18, 2023
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
功能完善
parent
f2b55c49
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
319 additions
and
29 deletions
+319
-29
toolBox.vue
components/toolBox/toolBox.vue
+18
-10
pages.json
pages.json
+9
-1
index.vue
pages/cleanRecord/index.vue
+1
-1
myInfo.vue
pages/my/myInfo.vue
+37
-14
order.vue
pages/order/order.vue
+0
-0
orderRecord.vue
pages/orderRecord/orderRecord.vue
+9
-2
orderResult.vue
pages/orderResult/orderResult.vue
+20
-1
index.vue
pages/setUserInfo/index.vue
+225
-0
camera.png
static/camera.png
+0
-0
No files found.
components/toolBox/toolBox.vue
View file @
f27b898b
...
@@ -40,7 +40,8 @@
...
@@ -40,7 +40,8 @@
sortName
:
"客"
sortName
:
"客"
}
}
],
],
timer
:
null
timer
:
null
,
orderInfo
:{}
};
};
},
},
watch
:{
watch
:{
...
@@ -65,8 +66,8 @@
...
@@ -65,8 +66,8 @@
methods
:{
methods
:{
onHandle
(
val
,
index
){
onHandle
(
val
,
index
){
console
.
log
(
val
,
index
)
console
.
log
(
val
,
index
)
if
(
index
===
0
){
if
(
[
0
,
1
].
includes
(
index
)
){
this
.
onGetOrderByAvailable
()
this
.
onGetOrderByAvailable
(
index
)
return
return
}
}
if
(
val
.
routePath
){
if
(
val
.
routePath
){
...
@@ -75,13 +76,23 @@
...
@@ -75,13 +76,23 @@
})
})
}
}
},
},
onGetOrderByAvailable
(){
onGetOrderByAvailable
(
i
){
getOrderByAvailable
().
then
(
res
=>
{
getOrderByAvailable
().
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
.
data
.
code
===
200
){
if
(
res
.
data
.
code
===
200
){
if
(
res
.
data
.
data
&&
res
.
data
.
data
.
length
===
1
){
if
(
res
.
data
.
data
&&
res
.
data
.
data
.
length
===
1
){
this
.
orderNo
=
res
.
data
.
data
[
0
].
orderNo
;
this
.
orderInfo
=
res
.
data
.
data
[
0
];
if
(
i
===
1
){
// 去续单
uni
.
navigateTo
({
url
:
`/pages/order/order?roomId=
${
this
.
orderInfo
.
roomId
}
&orderNo=
${
this
.
orderInfo
.
orderNo
}
`
})
}
else
{
// 去开门
this
.
onOpenDoor
()
this
.
onOpenDoor
()
}
}
else
if
(
res
.
data
.
data
&&
res
.
data
.
data
.
length
>
1
){
}
else
if
(
res
.
data
.
data
&&
res
.
data
.
data
.
length
>
1
){
uni
.
switchTab
({
uni
.
switchTab
({
url
:
"/pages/orderRecord/orderRecord"
url
:
"/pages/orderRecord/orderRecord"
...
@@ -89,7 +100,7 @@
...
@@ -89,7 +100,7 @@
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
icon
:
"none"
,
icon
:
"none"
,
title
:
"暂无可用的订单"
title
:
"暂无可用的订单
,请先下单预约哦!
"
})
})
}
}
}
else
{
}
else
{
...
@@ -104,15 +115,12 @@
...
@@ -104,15 +115,12 @@
uni
.
showLoading
({
uni
.
showLoading
({
title
:
"开门中..."
title
:
"开门中..."
})
})
openDoor
(
this
.
orderNo
).
then
(
res
=>
{
openDoor
(
this
.
order
Info
.
order
No
).
then
(
res
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
uni
.
showToast
({
uni
.
showToast
({
icon
:
"none"
,
icon
:
"none"
,
title
:
res
.
data
.
msg
title
:
res
.
data
.
msg
})
})
// if(res.data.code ==200){
// }
})
})
}
}
}
}
...
...
pages.json
View file @
f27b898b
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
{
{
"path"
:
"pages/order/order"
,
"path"
:
"pages/order/order"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"预约"
,
"navigationBarTitleText"
:
"
房间
预约"
,
"navigationStyle"
:
"default"
"navigationStyle"
:
"default"
}
}
},
},
...
@@ -135,6 +135,14 @@
...
@@ -135,6 +135,14 @@
"navigationBarTitleText"
:
"保洁记录"
,
"navigationBarTitleText"
:
"保洁记录"
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
},
{
"path"
:
"pages/setUserInfo/index"
,
"style"
:
{
"navigationBarTitleText"
:
"资料修改"
,
"enablePullDownRefresh"
:
false
,
"navigationStyle"
:
"custom"
}
}
}
],
],
...
...
pages/cleanRecord/index.vue
View file @
f27b898b
...
@@ -162,7 +162,7 @@ import NoLogin from "@/components/noLogin/noLogin"
...
@@ -162,7 +162,7 @@ import NoLogin from "@/components/noLogin/noLogin"
</
script
>
</
script
>
<
style
>
<
style
>
page
{
page
{
background-color
:
#f
fffff
;
background-color
:
#f
1f1f1
;
}
}
</
style
>
</
style
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
pages/my/myInfo.vue
View file @
f27b898b
...
@@ -4,25 +4,28 @@
...
@@ -4,25 +4,28 @@
<view
class=
"header-content-box"
>
<view
class=
"header-content-box"
>
<view
v-if=
"loginStatus"
class=
"login-content"
>
<view
v-if=
"loginStatus"
class=
"login-content"
>
<view
class=
"flex-1 flex-row"
>
<view
class=
"flex-1 flex-row"
>
<view
class=
"cu-avatar xl round margin-left"
<view
class=
"cu-avatar xl round margin-left"
>
style=
"background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big25002.jpg);"
>
<image
class=
"avatar-img"
:src=
"userInfo.avatar|| assetsPath+'/cart.png'"
mode=
"scaleToFill"
></image
>
</view>
</view>
<view
class=
"flex-col margin-left"
>
<view
class=
"flex-col margin-left"
>
<text
class=
"text-title text-lg text-white text-bold text-xxl"
>
{{
userInfo
.
nickName
||
"凑角001"
}}
</text>
<text
class=
"text-title text-lg text-white text-bold text-xxl"
>
{{
userInfo
.
nickName
||
"凑角001"
}}
</text>
<view
class=
"flex-row
margin-top
"
>
<view
class=
"flex-row
"
style=
"margin-top: 10rpx;
"
>
<
text
class=
"cuIcon-hotfill text-white"
></text
>
<
!--
<text
class=
"cuIcon-hotfill text-white"
></text>
--
>
<text
class=
"text-white text-lg"
>
会员用户
</text>
<text
class=
"text-white text-lg"
>
会员用户
</text>
</view>
</view>
</view>
</view>
<view
class=
"nav-right"
@
tap=
"onNavToSetUserInfo"
>
<text
class=
"text-white text-xl"
>
修改资料
</text>
</view>
</view>
</view>
<view
class=
"flex-row amount-coupon"
>
<view
class=
"flex-row amount-coupon"
>
<view
class=
"flex-col"
>
<!--
<view
class=
"flex-col"
>
<text
class=
"text-white text-xl"
>
余额
</text>
<text
class=
"text-white text-xl"
>
余额
</text>
<text
class=
"text-white text-xl"
>
¥
{{
(
Number
(
userInfo
.
amount
)
+
Number
(
userInfo
.
freeAmount
)).
toFixed
(
2
)
}}
</text>
<text
class=
"text-white text-xl"
>
¥
{{
(
Number
(
userInfo
.
amount
)
+
Number
(
userInfo
.
freeAmount
)).
toFixed
(
2
)
}}
</text>
</view>
</view>
<view
class=
"line"
>
<view
class=
"line"
>
</view>
-->
</view>
<view
class=
"flex-col"
@
tap=
"onNavToMyCoupon"
>
<view
class=
"flex-col"
@
tap=
"onNavToMyCoupon"
>
<text
class=
"text-white text-xl"
>
优惠券
</text>
<text
class=
"text-white text-xl"
>
优惠券
</text>
<text
class=
"text-white text-xl"
>
{{
userInfo
.
number
||
0
}}
张
</text>
<text
class=
"text-white text-xl"
>
{{
userInfo
.
number
||
0
}}
张
</text>
...
@@ -104,13 +107,13 @@
...
@@ -104,13 +107,13 @@
type
:
""
,
type
:
""
,
show
:
true
show
:
true
},
},
{
//
{
label
:
"消费记录"
,
//
label:"消费记录",
iconUrl
:
config
.
assetsPath
+
'/record_icon.png'
,
//
iconUrl:config.assetsPath+'/record_icon.png',
routePath
:
""
,
//
routePath:"",
type
:
""
,
//
type:"",
show
:
true
//
show:true
},
//
},
// {
// {
// label:"立即充值",
// label:"立即充值",
// iconUrl:config.assetsPath+'/vip_icon.png',
// iconUrl:config.assetsPath+'/vip_icon.png',
...
@@ -149,6 +152,7 @@
...
@@ -149,6 +152,7 @@
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
.
data
.
code
==
200
){
if
(
res
.
data
.
code
==
200
){
this
.
userInfo
=
res
.
data
.
data
;
this
.
userInfo
=
res
.
data
.
data
;
uni
.
setStorageSync
(
'userInfo'
,
this
.
userInfo
)
this
.
loginStatus
=
true
;
this
.
loginStatus
=
true
;
}
}
})
})
...
@@ -177,6 +181,13 @@
...
@@ -177,6 +181,13 @@
}
}
},
},
onNavToSetUserInfo
(){
if
(
this
.
loginStatus
==
true
){
uni
.
navigateTo
({
url
:
"/pages/setUserInfo/index"
})
}
},
// 退出登录,解除手机号与当前微信的绑定
// 退出登录,解除手机号与当前微信的绑定
onLoginOut
(){
onLoginOut
(){
uni
.
showLoading
({
uni
.
showLoading
({
...
@@ -228,7 +239,13 @@
...
@@ -228,7 +239,13 @@
width
:
100%
;
width
:
100%
;
>.flex-row
{
>.flex-row
{
position
:
relative
;
align-items
:
center
;
align-items
:
center
;
.nav-right{
position
:
absolute
;
right
:
5vw
;
margin-top
:
40
upx
;
}
}
}
.amount-coupon
{
.amount-coupon
{
...
@@ -309,4 +326,9 @@
...
@@ -309,4 +326,9 @@
width
:
94%
;
width
:
94%
;
margin-top
:
40
upx
;
margin-top
:
40
upx
;
}
}
.avatar-img
{
width
:
100%
;
height
:
100%
;
border-radius
:
50%
;
}
</
style
>
</
style
>
\ No newline at end of file
pages/order/order.vue
View file @
f27b898b
This diff is collapsed.
Click to expand it.
pages/orderRecord/orderRecord.vue
View file @
f27b898b
...
@@ -173,14 +173,21 @@ import NoLogin from "@/components/noLogin/noLogin"
...
@@ -173,14 +173,21 @@ import NoLogin from "@/components/noLogin/noLogin"
</
script
>
</
script
>
<
style
>
<
style
>
page
{
page
{
background-color
:
#f
fffff
;
background-color
:
#f
1f1f1
;
}
}
</
style
>
</
style
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.order-record
{
.order-record
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
padding-top
:
100
upx
;
.nav{
position
:
fixed
;
top
:
0
;
left
:
0
;
height
:
90
upx
;
z-index
:
999
;
}
.content-box
{
.content-box
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
...
...
pages/orderResult/orderResult.vue
View file @
f27b898b
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
</view>
</view>
</view>
</view>
<view
class=
"part-2"
>
<view
v-if=
"orderInfo.status
<
=
1
"
class=
"part-2"
>
<view
class=
"flex-between title"
>
<view
class=
"flex-between title"
>
<view
class=
"flex-row"
>
<view
class=
"flex-row"
>
<text
class=
"cuIcon-titles text-pink text-xl"
></text>
<text
class=
"cuIcon-titles text-pink text-xl"
></text>
...
@@ -95,6 +95,9 @@
...
@@ -95,6 +95,9 @@
</view>
</view>
</view>
</view>
<view
v-if=
"orderInfo.status === 0"
class=
"cancle-btn-box"
>
<button
class=
"cu-btn bg-pink round block lg"
>
立即退单
</button>
</view>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -176,6 +179,7 @@
...
@@ -176,6 +179,7 @@
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
width
:
100vw
;
width
:
100vw
;
padding-bottom
:
120
upx
;
.order-info-content{
.order-info-content{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
...
@@ -309,4 +313,19 @@
...
@@ -309,4 +313,19 @@
}
}
}
}
}
}
.cancle-btn-box
{
position
:
fixed
;
left
:
0
;
bottom
:
0
;
width
:
100%
;
height
:
120
upx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
background-color
:
#ffffff
;
z-index
:
99
;
.cu-btn{
width
:
80%
;
}
}
</
style
>
</
style
>
pages/setUserInfo/index.vue
0 → 100644
View file @
f27b898b
<
template
>
<view
class=
"set-user-info"
>
<f-navbar
title=
"个人资料"
fontColor=
"#333333"
:bgColor=
"PrimaryColor"
:isShowLeft=
"true"
:isShowTransparentTitle=
"true"
>
<view
class=
"u-flex"
slot=
"left"
>
<text
style=
"font-size: 44rpx;"
class=
"cuIcon-back text-black"
></text>
</view>
</f-navbar>
<view
class=
"main-content"
>
<view
class=
"user-avatar-box"
@
tap=
"onChangeAvatar"
>
<view
class=
"avatar"
>
<image
class=
"avatar-img"
:src=
"userInfo.avatar|| assetsPath+'/cart.png'"
mode=
"scaleToFill"
></image>
<view
class=
"camera"
>
<image
src=
"../../static/camera.png"
mode=
"widthFix"
></image>
</view>
</view>
<text
class=
"text-gray margin-top"
>
请上传头像
</text>
</view>
<form>
<view
class=
"cu-form-group"
>
<text
class=
"text-black text-bold margin-right"
>
会员昵称
</text>
<input
v-model=
"userInfo.nickName"
type=
"text"
:maxlength=
"12"
placeholder=
"请输入用户昵称"
name=
"input"
></input>
</view>
<view
class=
"cu-form-group"
>
<view
class=
"text-black text-bold margin-right"
>
会员性别
</view>
<radio-group
class=
"block"
@
change=
"onSwitch"
>
<view
class=
"radio-group-box flex-row"
>
<view
class=
"flex-row"
>
<text>
男
</text>
<radio
class=
'pink radio'
:class=
"userInfo.sex == 1?'checked':''"
:checked=
"userInfo.sex==1?true:false"
value=
"1"
></radio>
</view>
<view
class=
"flex-row"
>
<text>
女
</text>
<radio
class=
'pink radio'
:class=
"userInfo.sex == 2?'checked':''"
:checked=
"userInfo.sex==2?true:false"
value=
"2"
></radio>
</view>
<view
class=
"flex-row"
>
<text>
未知
</text>
<radio
class=
'pink radio'
:class=
"userInfo.sex == '0'?'checked':''"
:checked=
"userInfo.sex=='0'?true:false"
value=
"0"
></radio>
</view>
</view>
</radio-group>
</view>
<view
class=
"cu-form-group"
>
<text
class=
"text-black text-bold margin-right"
>
手机号
</text>
<input
v-model=
"userInfo.phone"
type=
"number"
:maxlength=
"12"
placeholder=
"请输入您的手机号"
name=
"input"
></input>
</view>
</form>
<view
class=
"confirm-btn-box"
>
<view
class=
"confirm-btn"
>
<button
class=
"btn cu-btn bg-pink block"
@
tap=
"onSaveUserInfo"
>
确认修改
</button>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
import
fNavbar
from
'@/components/module/f-navbar/f-navbar'
;
import
{
uploadFile
,
updateUserInfo
}
from
"@/api/index.js"
;
import
config
from
"@/config/index.config"
import
{
checkPhone
}
from
"@/utils/tools.js"
export
default
{
components
:
{
fNavbar
},
data
(){
return
{
userInfo
:{
avatar
:
""
,
nickName
:
""
,
phone
:
''
},
assetsPath
:
config
.
assetsPath
,
nickName
:
""
,
PrimaryColor
:
'#ffffff'
,
//主题色
switchBtn
:
true
}
},
onLoad
()
{
this
.
onLoading
();
},
methods
:{
onLoading
(){
this
.
userInfo
=
uni
.
getStorageSync
(
"userInfo"
)
},
onSwitch
(
e
){
this
.
userInfo
.
sex
=
e
.
target
.
value
;
},
onChangeAvatar
(){
let
that
=
this
;
uni
.
chooseImage
({
count
:
1
,
success
:
(
result
)
=>
{
uploadFile
({
url
:
result
.
tempFilePaths
[
0
]}).
then
(
res
=>
{
let
data
=
JSON
.
parse
(
res
.
data
)
console
.
log
(
data
,
1212
)
if
(
data
.
code
==
200
){
that
.
userInfo
.
avatar
=
data
.
url
;
}
})
}
})
},
onSaveUserInfo
(){
if
(
this
.
userInfo
.
phone
&&
!
checkPhone
(
this
.
userInfo
.
phone
)){
uni
.
showToast
({
icon
:
'none'
,
title
:
'手机号输入不正确'
})
return
}
updateUserInfo
(
this
.
userInfo
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
){
uni
.
showToast
({
icon
:
"none"
,
title
:
"保存成功"
})
}
})
}
}
}
</
script
>
<
style
>
page
{
background-color
:
#FFFFFF
;
}
</
style
>
<
style
lang=
"scss"
scoped
>
.main-content
{
display
:
flex
;
flex-direction
:
column
;
width
:
100vw
;
.user-avatar-box{
height
:
30vh
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
margin-top
:
40
upx
;
.avatar{
width
:
90px
;
height
:
90px
;
border-radius
:
50%
;
position
:
relative
;
overflow
:
hidden
;
.avatar-img{
display
:
block
;
width
:
100%
;
height
:
100%
;
border-radius
:
50%
;
}
.camera
{
position
:
absolute
;
right
:
0
;
bottom
:
0
;
display
:
flex
;
width
:
24px
;
height
:
24px
;
border-radius
:
50%
;
justify-content
:
center
;
align-items
:
center
;
background-color
:
#127FFF
;
image{
display
:
block
;
width
:
28
upx
;
height
:
auto
;
}
}
}
.margin-top
{
margin-top
:
20
upx
;
}
}
.cu-form-group
{
width
:
642
/
750
*
100vw
;
height
:
90
upx
;
margin
:
10
upx
auto
0
;
//
border-bottom
:
1px
solid
#F0F3F6
;
.bg-blue
{
background-color
:
#035EAC
;
}
.bg-gray
{
background-color
:
#999999
;
text
{
color
:
#FFFFFF
;
}
}
}
.confirm-btn-box
{
width
:
100vw
;
margin-top
:
40
upx
;
.confirm-btn
{
margin
:
0
36
upx
;
.btn
{
height
:
90
upx
;
box-shadow
:
0px
12px
26px
1px
rgba
(
7
,
83
,
254
,
0.2
);
border-radius
:
20
upx
;
font-size
:
30
*
1.2
upx
;
color
:
#FFFFFF
;
}
}
}
}
.radio-group-box
{
.flex-row{
display
:
flex
;
align-items
:
center
;
margin
:
0
10
upx
;
text{
margin-right
:
8
upx
;
}
}
}
</
style
>
static/camera.png
0 → 100644
View file @
f27b898b
563 Bytes
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