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
6a9ff6c8
Commit
6a9ff6c8
authored
Jan 09, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
功能较大优化
parent
af5ed6ad
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
97 additions
and
39 deletions
+97
-39
login.vue
components/login/login.vue
+2
-1
toolBox.vue
components/toolBox/toolBox.vue
+8
-8
index.vue
pages/index/index.vue
+31
-17
myInfo.vue
pages/my/myInfo.vue
+6
-3
order.vue
pages/order/order.vue
+0
-0
orderResult.vue
pages/orderResult/orderResult.vue
+50
-10
No files found.
components/login/login.vue
View file @
6a9ff6c8
...
...
@@ -64,6 +64,7 @@
this
.
$refs
.
popupPhone
.
close
()
},
onGetPhoneNumber
(
e
){
let
that
=
this
;
this
.
phoneCode
=
e
.
detail
.
code
;
wx
.
login
({
success
:
(
res
)
=>
{
...
...
@@ -81,8 +82,8 @@
key
:
uni
.
getStorageSync
(
'tokenHeaders'
),
data
:
res
.
data
.
data
.
token
,
success
:
(
res
)
=>
{
this
.
$refs
.
popupPhone
.
close
()
that
.
$emit
(
'success'
)
this
.
$refs
.
popupPhone
.
close
()
}
})
}
...
...
components/toolBox/toolBox.vue
View file @
6a9ff6c8
...
...
@@ -38,13 +38,13 @@
imgUrl
:
config
.
assetsPath
+
'/order_2_icon.png'
,
sortName
:
"续"
},
{
name
:
"验券"
,
url
:
config
.
assetsPath
+
'/tool_3.png'
,
imgUrl
:
config
.
assetsPath
+
'/scan_code_icon.png'
,
sortName
:
"验"
,
routePath
:
"/pages/useCouponIllustrate/useCouponIllustrate?keyData=coupon_use_process"
},
//
{
//
name:"验券",
//
url:config.assetsPath+'/tool_3.png',
//
imgUrl: config.assetsPath+'/scan_code_icon.png',
//
sortName:"验",
//
routePath:"/pages/useCouponIllustrate/useCouponIllustrate?keyData=coupon_use_process"
//
},
{
name
:
"客服"
,
url
:
config
.
assetsPath
+
'/tool_4.png'
,
...
...
@@ -88,7 +88,7 @@
}
},
onHandle
(
val
,
index
){
if
(
index
===
3
){
if
(
index
===
2
){
this
.
onGetSysConfig
()
return
};
...
...
pages/index/index.vue
View file @
6a9ff6c8
...
...
@@ -95,10 +95,10 @@
</view>
<view
class=
"flex-row list-point-box"
>
<view
v-for=
"(val,k) in list"
:key=
"k"
class=
"flex-1 flex-col"
>
<view
class=
"box"
:class=
"
objListDate.length && objListDate[index] && objListDate[index].length && objListDate[index][k].status==1&& objListDate[index][k
+1].status==1?'bg-pink':'bg-gray'"
>
<view
class=
"box"
:class=
"
item.list && item.list[val].status==1 && item.list[val
+1].status==1?'bg-pink':'bg-gray'"
>
</view>
<text
class=
"text-gray text-sm"
>
{{
val
>=
24
?
val
-
24
:
val
}}
</text>
<text
class=
"text-gray text-sm"
>
{{
val
==
24
?
'次日'
:
val
>
24
?
val
-
24
:
val
}}
</text>
</view>
</view>
</view>
...
...
@@ -156,11 +156,6 @@
LoginPop
},
data
()
{
let
h
=
new
Date
().
getHours
();
let
list
=
[]
for
(
let
i
=
0
;
i
<
24
;
i
++
){
list
.
push
(
h
+
i
)
}
return
{
scrollTop
:
0
,
storeId
:
''
,
...
...
@@ -214,13 +209,14 @@
show
:
true
,
timer
:
null
,
roomVoList
:[],
list
,
list
:[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
18
,
19
,
20
,
21
,
22
,
23
]
,
objListDate
:[]
}
},
onShow
()
{
this
.
onGetSysConfig
();
this
.
onLoading
()
this
.
list
=
[];
this
.
onSetShowPoint
()
},
onReachBottom
()
{
if
(
this
.
status
==
'loadmore'
)
{
...
...
@@ -238,6 +234,15 @@
this
.
onGetDicts
();
},
methods
:
{
onSetShowPoint
(){
let
h
=
new
Date
().
getHours
();
let
list
=
[]
for
(
let
i
=
0
;
i
<
24
;
i
++
){
list
.
push
(
h
+
i
)
}
this
.
list
=
list
;
this
.
onLoading
()
},
onGetSysConfig
(){
systemConfig
().
then
(
res
=>
{
uni
.
setStorage
({
...
...
@@ -254,6 +259,9 @@
this
.
facilitieList
=
getDictItem
(
dicts
,
"indoor_facilities"
);
this
.
roomTypeEnum
=
getDictItem
(
dicts
,
"store_room_type"
);
this
.
roomStatusEnum
=
getDictItem
(
dicts
,
"store_room_status"
);
if
(
this
.
roomVoList
.
length
){
this
.
$forceUpdate
()
}
})
},
onLoading
()
{
...
...
@@ -283,7 +291,6 @@
nowLatitude
:
this
.
latitude
,
nowLongitude
:
this
.
longitude
}).
then
(
res
=>
{
uni
.
hideLoading
()
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
.
length
)
{
this
.
storeList
=
res
.
data
.
data
;
let
obj
=
{}
...
...
@@ -304,6 +311,7 @@
images
:
item
.
images
?
item
.
images
.
split
(
","
).
map
(
val
=>
this
.
hostUrl
+
val
)
:
[]
}
})
uni
.
hideLoading
()
that
.
onGetSortDistance
(
0
);
}
}
...
...
@@ -311,7 +319,7 @@
},
onGetSortDistance
(
i
=
0
){
if
(
i
>=
this
.
roomVoList
.
length
){
this
.
$forceUpdate
();
//
this.$forceUpdate();
return
}
listSortDistance
({
...
...
@@ -320,8 +328,13 @@
day
:
moment
().
format
(
"YYYY-MM-DD"
),
orderType
:
1
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
&&
i
<=
this
.
roomVoList
.
length
-
1
){
this
.
objListDate
[
i
]
=
this
.
list
.
map
(
val
=>
res
.
data
.
data
[
val
])
if
(
res
.
data
.
code
==
200
){
this
.
roomVoList
=
this
.
roomVoList
.
map
((
item
,
k
)
=>
{
return
{
...
item
,
list
:
i
===
k
?
res
.
data
.
data
:
item
.
list
&&
item
.
list
.
length
?
item
.
list
:
[]
}
})
this
.
onGetSortDistance
(
++
i
)
}
})
...
...
@@ -991,12 +1004,13 @@
width
:
100%
;
margin-bottom
:
20
upx
;
.flex-col{
text-align
:
center
;
align-items
:
center
;
}
.box
{
margin
:
0
4
upx
6
upx
;
height
:
20
upx
;
border-radius
:
8
upx
;
margin
:
0
2
upx
6
upx
;
width
:
10px
;
height
:
10px
;
border-radius
:
5px
;
}
.text-sm
{
font-size
:
20
upx
;
...
...
pages/my/myInfo.vue
View file @
6a9ff6c8
...
...
@@ -22,11 +22,11 @@
<text
class=
"text-gray"
>
修改资料
</text>
</view>
</view>
<view
v-else
class=
"none-login margin-left"
>
<view
v-else
class=
"none-login margin-left"
@
tap=
"onNavToLogin"
>
<view
class=
"cu-avatar xl round"
>
<image
class=
"avatar-img"
:src=
" assetsPath+'/avatar_no.png'"
mode=
"scaleToFill"
></image>
</view>
<text
class=
"text-gray margin-left"
@
tap=
"onNavToLogin"
>
未授权
</text>
<text
class=
"text-gray margin-left"
>
授权登录
</text>
</view>
<view
class=
"flex-between amount-coupon"
:style=
"
{background:'url('+assetsPath+'/my_coupon_bg.png) 0 0 / 100% 100% no-repeat'}">
<view
class=
"part-left"
>
...
...
@@ -216,11 +216,14 @@
},
onCheckUserLogin
()
{
let
tokenHeaders
=
uni
.
getStorageSync
(
"tokenHeaders"
);
console
.
log
(
tokenHeaders
,
909090
)
if
(
tokenHeaders
)
{
this
.
onGetUserInfo
();
}
else
{
this
.
loginStatus
=
false
;
uni
.
removeStorage
({
key
:
'userInfo'
})
this
.
userInfo
=
{}
}
},
onGetUserInfo
()
{
...
...
pages/order/order.vue
View file @
6a9ff6c8
This diff is collapsed.
Click to expand it.
pages/orderResult/orderResult.vue
View file @
6a9ff6c8
...
...
@@ -97,10 +97,10 @@
<view
class=
"part"
>
<button
class=
"cu-btn block round bg-pink lg"
:class=
"openDoorStatus?'bg-gray':'bg-pink'"
@
tap=
"onOpenDoor"
>
进店开门
</button>
</view>
<view
class=
"part"
>
<view
v-if=
"userInfo.id == orderInfo.consumerId"
class=
"part"
>
<button
class=
"cu-btn block round line-pink lg"
open-type=
"share"
>
分享好友
</button>
</view>
<view
v-if=
"orderInfo.status === 1"
class=
"part"
>
<view
v-if=
"orderInfo.status === 1
&& userInfo.id == orderInfo.consumerId
"
class=
"part"
>
<button
class=
"cu-btn block round bg-mauve lg"
@
tap=
"onNavToOrder"
>
房间续单
</button>
</view>
</view>
...
...
@@ -122,7 +122,7 @@
</view>
</view>
<view
v-if=
"orderInfo.status ===0 && orderInfo.isRefund"
class=
"cancle-btn-box"
>
<view
v-if=
"orderInfo.status ===0 && orderInfo.isRefund
&& !shareOrder
"
class=
"cancle-btn-box"
>
<button
class=
"cu-btn bg-pink round block lg"
@
tap=
"onOrderRefund"
>
立即退单
</button>
</view>
</view>
...
...
@@ -133,14 +133,12 @@
</
template
>
<
script
>
import
{
getDictItem
}
from
"@/utils/tools.js"
import
{
getDictItem
}
from
"@/utils/tools.js"
import
fNavbar
from
'@/components/module/f-navbar/f-navbar'
;
import
{
getOrderInfoByNo
,
orderRefund
}
from
"@/api/order.js"
import
{
getOrderInfoByNo
,
orderRefund
,
openDoor
}
from
"@/api/order.js"
import
moment
from
"@/common/moment_zh_cn.js"
;
import
{
openDoor
}
from
"@/api/order.js"
import
config
from
"@/config/index.config"
import
{
listSortDistance
}
from
"@/api/store.js"
;
export
default
{
components
:{
...
...
@@ -154,11 +152,24 @@
hostUrl
:
config
.
hostUrl
,
orderStatusEnum
:{},
roomTypeEnum
:{},
openDoorStatus
:
false
openDoorStatus
:
false
,
shareOrder
:
false
,
userInfo
:{
id
:
''
}
};
},
onLoad
(
option
)
{
this
.
userInfo
=
uni
.
getStorageSync
(
'userInfo'
)
console
.
log
(
this
.
userInfo
,
"用户信息"
)
this
.
orderNo
=
option
.
orderNo
;
if
(
option
.
share
&&
option
.
share
==
"share"
){
this
.
shareOrder
=
true
}
else
{
this
.
shareOrder
=
false
}
this
.
onGetDicts
()
this
.
onLoading
();
if
(
option
.
success
){
...
...
@@ -169,7 +180,7 @@
onShareAppMessage
()
{
return
{
title
:
`
${
this
.
orderInfo
.
storeName
}
-
${
this
.
orderInfo
.
roomName
}
【
${
this
.
orderInfo
.
roomTypeName
}
】`
,
path
:
`/pages/orderResult/orderResult?orderNo=
${
this
.
orderNo
}
`
path
:
`/pages/orderResult/orderResult?orderNo=
${
this
.
orderNo
}
&share=share
`
}
},
methods
:{
...
...
@@ -231,6 +242,9 @@
icon
:
"none"
,
title
:
res
.
data
.
msg
})
if
(
res
.
data
.
code
==
200
){
this
.
onLoading
();
}
setTimeout
(()
=>
{
this
.
openDoorStatus
=
false
;
},
5000
)
...
...
@@ -249,9 +263,34 @@
})
},
onNavToOrder
(){
listSortDistance
({
storeId
:
this
.
orderInfo
.
storeId
,
roomId
:
this
.
orderInfo
.
roomId
,
day
:
this
.
orderInfo
.
endDate
,
orderType
:
2
}).
then
(
res
=>
{
let
h
=
this
.
orderInfo
.
endTime
.
split
(
":"
).
map
(
item
=>
Number
(
item
))
if
(
res
.
data
.
code
==
200
){
let
val
=
res
.
data
.
data
[
h
[
0
]
+
1
];
if
(
val
.
status
===
0
){
uni
.
navigateTo
({
url
:
`/pages/order/order?roomId=
${
this
.
orderInfo
.
roomId
}
&orderNo=
${
this
.
orderInfo
.
orderNo
}
`
})
}
else
if
(
val
.
status
===
1
){
let
nextStartH
=
moment
(
val
.
startHoldTime
).
format
(
"HH:mm"
).
split
(
":"
).
map
(
item
=>
Number
(
item
))
if
(
nextStartH
[
1
]
>
h
[
1
]){
uni
.
navigateTo
({
url
:
`/pages/order/order?roomId=
${
this
.
orderInfo
.
roomId
}
&orderNo=
${
this
.
orderInfo
.
orderNo
}
`
})
}
else
{
uni
.
showToast
({
icon
:
"none"
,
title
:
"此订单已无可续单时段"
})
}
}
}
})
},
onOrderRefund
(){
this
.
$refs
.
popup
.
open
();
...
...
@@ -298,6 +337,7 @@
display
:
flex
;
flex-direction
:
column
;
width
:
100vw
;
padding-bottom
:
120
upx
;
.order-info-content{
display
:
flex
;
flex-direction
:
column
;
...
...
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