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
7a29e875
Commit
7a29e875
authored
Nov 27, 2023
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
个人中心界面优化
parent
13516cb9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
109 additions
and
53 deletions
+109
-53
index.vue
pages/index/index.vue
+58
-36
myInfo.vue
pages/my/myInfo.vue
+0
-0
order.vue
pages/order/order.vue
+1
-1
orderRecord.vue
pages/orderRecord/orderRecord.vue
+1
-1
index.vue
pages/payRecord/index.vue
+20
-5
index.vue
pages/setUserInfo/index.vue
+29
-10
No files found.
pages/index/index.vue
View file @
7a29e875
...
@@ -68,9 +68,12 @@
...
@@ -68,9 +68,12 @@
<view
class=
"room-name"
>
<view
class=
"room-name"
>
<text>
{{
item
.
name
}}{{
item
.
roomType
?
'【'
+
roomTypeEnum
[
item
.
roomType
]
+
'】'
:
''
}}
</text>
<text>
{{
item
.
name
}}{{
item
.
roomType
?
'【'
+
roomTypeEnum
[
item
.
roomType
]
+
'】'
:
''
}}
</text>
</view>
</view>
<view
class=
"price"
@
tap
.
stop=
"onNavToInfo(item)"
>
<view
class=
"price"
>
<text>
查看包厢
</text>
<!--
<text>
查看包厢
</text>
<text
class=
"cuIcon-playfill text-gray text-lg"
></text>
<text
class=
"cuIcon-playfill text-gray text-lg"
></text>
-->
<view
class=
""
>
<view
class=
'cu-tag radius'
:class=
"item.status==0?'line-green':item.status==1?'line-orange':'line-blue'"
>
{{
roomStatusEnum
[
item
.
status
]
}}
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"facilitie-box"
>
<view
class=
"facilitie-box"
>
...
@@ -99,11 +102,11 @@
...
@@ -99,11 +102,11 @@
<text>
惠
</text>
<text>
惠
</text>
</view>
</view>
<view
class=
"part-2"
>
<view
class=
"part-2"
>
<text>
{{
val
.
duration
}}
小时
{{
val
.
price
}}
元
</text>
<text>
{{
val
.
duration
}}
小时
套餐
{{
val
.
price
}}
元
</text>
</view>
</view>
<view
class=
"part-3"
>
<
!--
<
view
class=
"part-3"
>
<text>
{{
(
val
.
price
/
val
.
duration
).
toFixed
(
2
)
}}
/小时
</text>
<text>
{{
(
val
.
price
/
val
.
duration
).
toFixed
(
2
)
}}
/小时
</text>
</view>
</view>
-->
</view>
</view>
</view>
</view>
<view
class=
""
>
<view
class=
""
>
...
@@ -212,28 +215,36 @@
...
@@ -212,28 +215,36 @@
],
],
facilitieList
:
{},
facilitieList
:
{},
roomTypeEnum
:{},
roomTypeEnum
:{},
roomStatusEnum
:{},
show
:
true
,
show
:
true
,
timer
:
null
timer
:
null
}
}
},
},
onShow
()
{
onShow
()
{
this
.
onGetSysConfig
();
this
.
onGetSysConfig
();
uni
.
showLoading
({
title
:
'加载中'
})
if
(
uni
.
getStorageSync
(
"storeId"
)
&&
this
.
storeList
.
length
)
{
if
(
uni
.
getStorageSync
(
"storeId"
)
&&
this
.
storeList
.
length
)
{
this
.
storeId
=
uni
.
getStorageSync
(
"storeId"
)
this
.
storeId
=
uni
.
getStorageSync
(
"storeId"
)
let
obj
=
this
.
storeList
.
filter
(
item
=>
item
.
id
===
this
.
storeId
)[
0
]
let
obj
=
this
.
storeList
.
filter
(
item
=>
item
.
id
===
this
.
storeId
)[
0
]
console
.
log
(
obj
,
909090
)
this
.
storeInfo
=
{
...
obj
,
distance
:
obj
.
distance
?
Number
(
obj
.
distance
.
substr
(
0
,
8
)).
toFixed
(
2
):
0
,
roomVoList
:
obj
.
roomVoList
.
length
?
obj
.
roomVoList
.
map
(
item
=>
{
return
{
...
item
,
facilities
:
Array
.
isArray
(
item
.
facilities
)
?
item
.
facilities
:
item
.
facilities
?
item
.
facilities
.
split
(
","
)
:
[],
images
:
item
.
images
?
item
.
images
.
split
(
","
).
map
(
val
=>
this
.
hostUrl
+
val
)
:
[]
}
})
:
[]
}
new
Promise
((
resolve
)
=>
{
this
.
storeInfo
=
{
...
obj
,
distance
:
obj
.
distance
?
Number
(
obj
.
distance
.
substr
(
0
,
8
)).
toFixed
(
2
):
0
,
roomVoList
:
obj
.
roomVoList
.
length
?
obj
.
roomVoList
.
map
(
item
=>
{
return
{
...
item
,
facilities
:
Array
.
isArray
(
item
.
facilities
)
?
item
.
facilities
:
item
.
facilities
?
item
.
facilities
.
split
(
","
)
:
[],
images
:
item
.
images
?
item
.
images
.
split
(
","
).
map
(
val
=>
this
.
hostUrl
+
val
)
:
[]
}
})
:
[]
}
resolve
()
}).
then
(()
=>
{
uni
.
hideLoading
()
})
}
else
{
}
else
{
this
.
onLoading
()
this
.
onLoading
()
}
}
...
@@ -248,9 +259,6 @@
...
@@ -248,9 +259,6 @@
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
uni
.
showLoading
({
title
:
"加载中"
})
// 隐藏原生的tabbar
// 隐藏原生的tabbar
uni
.
hideTabBar
();
uni
.
hideTabBar
();
this
.
onCheckUserLogin
();
this
.
onCheckUserLogin
();
...
@@ -280,6 +288,7 @@
...
@@ -280,6 +288,7 @@
uni
.
setStorageSync
(
'dicts'
,
JSON
.
stringify
(
res
.
data
.
data
))
uni
.
setStorageSync
(
'dicts'
,
JSON
.
stringify
(
res
.
data
.
data
))
this
.
facilitieList
=
getDictItem
(
dicts
,
"indoor_facilities"
);
this
.
facilitieList
=
getDictItem
(
dicts
,
"indoor_facilities"
);
this
.
roomTypeEnum
=
getDictItem
(
dicts
,
"store_room_type"
);
this
.
roomTypeEnum
=
getDictItem
(
dicts
,
"store_room_type"
);
this
.
roomStatusEnum
=
getDictItem
(
dicts
,
"store_room_status"
);
})
})
// }
// }
},
},
...
@@ -340,28 +349,38 @@
...
@@ -340,28 +349,38 @@
})
})
},
},
onGetListStore
()
{
onGetListStore
()
{
let
that
=
this
;
getListStore
({
getListStore
({
...
this
.
queryParams
,
...
this
.
queryParams
,
nowLatitude
:
this
.
latitude
||
''
,
nowLatitude
:
this
.
latitude
||
''
,
nowLongitude
:
this
.
longitude
||
''
nowLongitude
:
this
.
longitude
||
''
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
.
length
)
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
.
length
)
{
uni
.
hideLoading
()
this
.
storeList
=
res
.
data
.
data
;
this
.
storeList
=
res
.
data
.
data
;
let
obj
=
{}
let
obj
=
{}
obj
=
res
.
data
.
data
[
0
];
obj
=
res
.
data
.
data
[
0
];
this
.
storeInfo
=
{
...
obj
,
distance
:
obj
.
distance
?
Number
(
obj
.
distance
.
substr
(
0
,
8
)).
toFixed
(
2
):
0
,
new
Promise
((
resolve
,
reject
)
=>
{
roomVoList
:
obj
.
roomVoList
.
map
(
item
=>
{
that
.
storeInfo
=
{
return
{
...
obj
,
...
item
,
distance
:
obj
.
distance
?
Number
(
obj
.
distance
.
substr
(
0
,
8
)).
toFixed
(
2
):
0
,
facilities
:
item
.
facilities
?
item
.
facilities
.
split
(
","
)
:
[],
roomVoList
:
obj
.
roomVoList
.
map
(
item
=>
{
images
:
item
.
images
?
item
.
images
return
{
.
split
(
","
).
map
(
val
=>
this
.
hostUrl
+
val
)
:
[]
...
item
,
}
facilities
:
item
.
facilities
?
item
.
facilities
.
split
(
","
)
:
[],
})
images
:
item
.
images
?
item
.
images
}
.
split
(
","
).
map
(
val
=>
this
.
hostUrl
+
val
)
:
[]
}
})
}
resolve
()
}).
then
(()
=>
{
uni
.
hideLoading
()
})
// this.$nextTick(()=>{
// })
}
}
})
})
},
},
...
@@ -955,12 +974,14 @@
...
@@ -955,12 +974,14 @@
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
align-items
:
center
;
align-items
:
center
;
width
:
48%
;
height
:
44
rpx
;
height
:
44
rpx
;
background
:
#FFFFFF
;
background
:
#FFFFFF
;
border-radius
:
8
upx
;
border-radius
:
8
upx
;
border
:
2
rpx
solid
#fc3f21
;
border
:
2
rpx
solid
#fc3f21
;
margin
:
8
upx
;
margin
:
8
upx
1%
;
overflow
:
hidden
;
overflow
:
hidden
;
.part-1{
.part-1{
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
...
@@ -974,11 +995,12 @@
...
@@ -974,11 +995,12 @@
}
}
.part-2
{
.part-2
{
display
:
flex
;
display
:
flex
;
flex
:
1
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
height
:
100%
;
height
:
100%
;
padding
:
8
upx
;
padding
:
8
upx
;
border-right
:
2
upx
solid
#fc3f21
;
//
border-right
:
2
upx
solid
#fc3f21
;
}
}
.part-3
{
.part-3
{
display
:
flex
;
display
:
flex
;
...
...
pages/my/myInfo.vue
View file @
7a29e875
This diff is collapsed.
Click to expand it.
pages/order/order.vue
View file @
7a29e875
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
<view
v-for=
"(item,index) in packageMode"
:key=
"index"
class=
"flex-col item"
<view
v-for=
"(item,index) in packageMode"
:key=
"index"
class=
"flex-col item"
:class=
"
{active: modeIndex===index,'item-3':packageMode.length
<3
,'
item-n
'
:packageMode
.
length
>
=3}"
:class=
"
{active: modeIndex===index,'item-3':packageMode.length
<3
,'
item-n
'
:packageMode
.
length
>
=3}"
@tap="onChangeMode(index)">
@tap="onChangeMode(index)">
<text
class=
"text-title"
>
{{
item
.
name
}}
</text>
<text
class=
"text-title"
>
{{
item
.
duration
}}
小时套餐
</text>
<view
class=
"flex-row"
style=
"margin-top: 12upx;"
>
<view
class=
"flex-row"
style=
"margin-top: 12upx;"
>
<text
style=
"margin-bottom: 4upx;"
>
¥
</text>
<text
style=
"margin-bottom: 4upx;"
>
¥
</text>
<text
class=
"text-title text-bold text-xl"
>
{{
item
.
price
}}
</text>
<text
class=
"text-title text-bold text-xl"
>
{{
item
.
price
}}
</text>
...
...
pages/orderRecord/orderRecord.vue
View file @
7a29e875
...
@@ -75,7 +75,7 @@
...
@@ -75,7 +75,7 @@
<text
class=
"text-gray margin-right"
>
优惠券抵扣
</text>
<text
class=
"text-gray margin-right"
>
优惠券抵扣
</text>
<text
class=
"text-title"
>
{{
item
.
couponName
}}
</text>
<text
class=
"text-title"
>
{{
item
.
couponName
}}
</text>
</view>
</view>
<view
class=
"flex-
row
part-1"
>
<view
class=
"flex-
between
part-1"
>
<text
class=
"text-gray margin-right"
>
订单编号:
</text>
<text
class=
"text-gray margin-right"
>
订单编号:
</text>
<text
class=
"text-title"
>
{{
item
.
orderNo
}}
</text>
<text
class=
"text-title"
>
{{
item
.
orderNo
}}
</text>
</view>
</view>
...
...
pages/payRecord/index.vue
View file @
7a29e875
...
@@ -5,15 +5,16 @@
...
@@ -5,15 +5,16 @@
<view
v-for=
"(item,index) in list"
:key=
"index"
class=
"list-item"
@
tap=
"onNavToOrderInfo(item)"
>
<view
v-for=
"(item,index) in list"
:key=
"index"
class=
"list-item"
@
tap=
"onNavToOrderInfo(item)"
>
<view
class=
"flex-between part-1"
>
<view
class=
"flex-between part-1"
>
<view
class=
""
>
<view
class=
""
>
<text
class=
"text-title"
>
{{
item
.
name
}}
:
</text>
<text
class=
"text-title"
>
{{
item
.
name
}}
</text>
</view>
</view>
<view
class=
"flex-row"
>
<view
class=
"flex-row"
>
<text
class=
"text-black text-bold text-lg"
>
{{
item
.
price
}}
元
</text>
<text
class=
"text-bold text-xl"
:class=
"item.sign=='income'?'text-red':'text-black'"
>
{{
payStatus
[
item
.
sign
||
'expenditure'
]
}}
</text>
<text
class=
"text-black text-bold text-lg"
>
{{
item
.
price
}}
元
</text>
</view>
</view>
</view>
</view>
<view
class=
"flex-between part-1"
>
<view
class=
"flex-between part-1"
>
<text>
创建时间:
</text>
<text>
{{
item
.
createTime
}}
</text>
<text>
{{
item
.
createTime
}}
</text>
<text>
{{
payTypeEnum
[
item
.
payType
||
'1'
]
}}
</text>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -74,7 +75,16 @@ import NoLogin from "@/components/noLogin/noLogin"
...
@@ -74,7 +75,16 @@ import NoLogin from "@/components/noLogin/noLogin"
pageSize
:
10
pageSize
:
10
},
},
loginStatus
:
true
,
loginStatus
:
true
,
orderStatusEnum
:{}
orderStatusEnum
:{},
payTypeEnum
:{
1
:
"微信支付"
,
2
:
"支付宝支付"
,
3
:
"余额支付"
},
payStatus
:{
expenditure
:
'-'
,
income
:
'+'
}
};
};
},
},
onLoad
()
{
onLoad
()
{
...
@@ -163,7 +173,7 @@ import NoLogin from "@/components/noLogin/noLogin"
...
@@ -163,7 +173,7 @@ import NoLogin from "@/components/noLogin/noLogin"
align-items
:
center
;
align-items
:
center
;
.list-item{
.list-item{
width
:
94%
;
width
:
94%
;
padding
:
3
0
upx
20
upx
;
padding
:
2
0
upx
20
upx
;
border-radius
:
20
upx
;
border-radius
:
20
upx
;
background-color
:
#ffffff
;
background-color
:
#ffffff
;
margin-top
:
30
upx
;
margin-top
:
30
upx
;
...
@@ -171,6 +181,11 @@ import NoLogin from "@/components/noLogin/noLogin"
...
@@ -171,6 +181,11 @@ import NoLogin from "@/components/noLogin/noLogin"
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
padding
:
10
upx
;
padding
:
10
upx
;
.flex-row{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
}
}
}
}
}
}
}
...
...
pages/setUserInfo/index.vue
View file @
7a29e875
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
userInfo
:{
userInfo
:{
avatar
:
""
,
avatar
:
""
,
nickName
:
""
,
nickName
:
""
,
phone
:
''
sex
:
''
},
},
assetsPath
:
config
.
assetsPath
,
assetsPath
:
config
.
assetsPath
,
nickName
:
""
,
nickName
:
""
,
...
@@ -101,18 +101,37 @@
...
@@ -101,18 +101,37 @@
})
})
},
},
onSaveUserInfo
(){
onSaveUserInfo
(){
if
(
this
.
userInfo
.
phone
&&
!
checkPhone
(
this
.
userInfo
.
phone
)){
// if(this.userInfo.phone && !checkPhone(this.userInfo.phone)){
uni
.
showToast
({
// uni.showToast({
icon
:
'none'
,
// icon:'none',
title
:
'手机号输入不正确'
// title:'手机号输入不正确'
})
// })
return
// return
}
// }
updateUserInfo
(
this
.
userInfo
).
then
(
res
=>
{
uni
.
showLoading
({
title
:
'提交中'
})
updateUserInfo
({
id
:
this
.
userInfo
.
id
,
avatar
:
this
.
userInfo
.
avatar
,
nickName
:
this
.
userInfo
.
nickName
,
sex
:
this
.
userInfo
.
sex
}).
then
(
res
=>
{
uni
.
hideLoading
()
if
(
res
.
data
.
code
==
200
){
if
(
res
.
data
.
code
==
200
){
uni
.
showToast
({
uni
.
showToast
({
icon
:
"none"
,
icon
:
"none"
,
title
:
"保存成功"
title
:
"保存成功"
,
success
:
()
=>
{
setTimeout
(()
=>
{
uni
.
navigateBack
()
},
500
)
}
})
}
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