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
c7ca8382
Commit
c7ca8382
authored
Nov 08, 2023
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
功能完善
parent
4df2577e
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
324 additions
and
25 deletions
+324
-25
coupon.js
api/coupon.js
+6
-0
index.js
common/vmeitime-http/index.js
+2
-1
toolBox.vue
components/toolBox/toolBox.vue
+14
-7
index.config.js
config/index.config.js
+4
-4
pages.json
pages.json
+8
-0
couponCheck.vue
pages/couponCheck/couponCheck.vue
+256
-0
index.vue
pages/index/index.vue
+34
-13
mt_icon.png
static/mt_icon.png
+0
-0
No files found.
api/coupon.js
View file @
c7ca8382
...
...
@@ -11,4 +11,10 @@ export const getUseCoupon=(data)=>{
return
http
.
post
(
url
,
data
)
}
export
const
couponChecked
=
(
code
)
=>
{
let
url
=
`/chessCards/consumeByUser?code=`
+
code
return
http
.
get
(
url
)
}
common/vmeitime-http/index.js
View file @
c7ca8382
...
...
@@ -69,7 +69,8 @@ http.interceptor.response = (config) => {
/
\/
order
\/
creat/g
,
/
\/
order
\/
list/g
,
/
\/
consumerCoupon
\/
list/g
,
/
\/
consumerCoupon
\/
query/g
/
\/
consumerCoupon
\/
query/g
,
/
\/
chessCards
\/
consumeByUser/g
]
if
(
urls
.
some
(
item
=>
item
.
test
(
config
.
config
.
url
))
&&
config
.
data
.
code
==
401
)
{
...
...
components/toolBox/toolBox.vue
View file @
c7ca8382
...
...
@@ -30,7 +30,8 @@
},
{
name
:
"验券"
,
sortName
:
"验"
sortName
:
"验"
,
routePath
:
"/pages/couponCheck/couponCheck"
},
{
name
:
"客服"
,
...
...
@@ -62,6 +63,11 @@
methods
:{
onHandle
(
val
){
console
.
log
(
val
)
if
(
val
.
routePath
){
uni
.
navigateTo
({
url
:
val
.
routePath
})
}
}
}
}
...
...
@@ -70,16 +76,16 @@
<
style
lang=
"scss"
scoped
>
.tool-box
{
position
:
fixed
;
bottom
:
160
upx
;
bottom
:
5vh
;
right
:
0
;
z-index
:
99
;
.tool-item{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
width
:
12
0
upx
;
height
:
60
upx
;
border-radius
:
30
upx
0
0
30
upx
;
width
:
12
vw
;
height
:
12vw
;
border-radius
:
50%
;
background
:
#ff55ff
;
border-top
:
1px
solid
#ff00ff
;
border-left
:
1px
solid
#ff00ff
;
...
...
@@ -91,11 +97,12 @@
text{
white-space
:
nowrap
;
font-style
:
italic
;
letter-spacing
:
10
upx
;
letter-spacing
:
2
upx
;
}
}
.active
{
width
:
60
upx
;
width
:
6vw
;
height
:
6vw
;
opacity
:
0.6
;
}
}
...
...
config/index.config.js
View file @
c7ca8382
...
...
@@ -2,10 +2,10 @@ const CONFIG = {
// 开发环境配置
development
:
{
assetsPath
:
'/static'
,
// 静态资源路径
baseUrl
:
'http://10.106.30.135:8883/front'
,
// 后台接口请求地址
hostUrl
:
'http://10.106.30.135:8882'
,
// H5地址(前端运行地址)
// baseUrl: 'http://192.168.43.242
:8883/front', // 后台接口请求地址
// hostUrl: 'http://192.168.43.242
:8882', // H5地址(前端运行地址)
//
baseUrl: 'http://10.106.30.135:8883/front', // 后台接口请求地址
//
hostUrl: 'http://10.106.30.135:8882', // H5地址(前端运行地址)
baseUrl
:
'http://192.168.1.189
:8883/front'
,
// 后台接口请求地址
hostUrl
:
'http://192.168.1.189
:8882'
,
// H5地址(前端运行地址)
websocketUrl
:
''
,
// websocket服务端地址
weixinAppId
:
''
,
// 微信公众号appid
codeHeadUrl
:
""
,
...
...
pages.json
View file @
c7ca8382
...
...
@@ -111,6 +111,14 @@
"navigationStyle"
:
"default"
}
},
{
"path"
:
"pages/couponCheck/couponCheck"
,
"style"
:
{
"navigationBarTitleText"
:
"券码核销"
,
"enablePullDownRefresh"
:
false
}
}
],
...
...
pages/couponCheck/couponCheck.vue
0 → 100644
View file @
c7ca8382
<
template
>
<view
class=
"flex-col coupon-checked"
>
<view
class=
"icon-list"
>
<view
class=
"img-box"
v-for=
"(item,index) in list"
:key=
"index"
>
<image
:src=
"item.iconUrl"
mode=
""
></image>
</view>
</view>
<view
class=
"text-box margin-top"
>
<view
v-for=
"(item,index) in list"
:key=
"index"
class=
"text-item"
>
<text>
{{
item
.
name
}}
</text>
<text
v-if=
"index
<list
.
length-1
"
>
、
</text>
</view>
<text>
自助验券
</text>
</view>
<view
class=
"input-box"
>
<view
class=
"cu-form-group"
>
<input
class=
"input"
placeholder=
"点击输入卡券兑换码"
name=
"input"
v-mode=
"code"
></input>
<text
class=
"cuIcon-qr_code text-gray text-xxl"
@
tap=
"onScanCode"
></text>
</view>
</view>
<view
class=
"confirm-box"
>
<button
class=
"cu-btn round block bg-pink lg"
@
tap=
"onConfirm"
>
兑换
</button>
</view>
<view
class=
"tips-box margin-top"
>
<view
class=
""
>
<text
class=
"text-black text-bold text-xl"
>
温馨提示
</text>
</view>
<view
class=
"flex-col margin-top"
>
<text>
1.可将各平台的兑换码复制进输入框内,点击兑换,兑换成功后可进入我的优惠券内查看
</text>
<text>
2.可扫码各平台的兑换码,兑换成功后可进入我的优惠券内查看
</text>
<text>
3.核销验券之后的券会进入到我的优惠券当中,可去门店预约时自动抵扣使用,若显示无法使用团购券,请核验团购券的可用门店、可用时间段。团购券过期后自动作废,不退款不更换不延期,请尽快使用。
</text>
</view>
</view>
<uni-popup
ref=
"popup"
type=
"center"
>
<view
class=
"content-box"
>
<view
class=
"content"
>
<view
class=
"title-box"
>
<text
class=
"text-black text-bold text-xl"
>
提示
</text>
<view
class=
"close-box"
@
tap=
"onClose"
>
<text
class=
"cuIcon-close text-gray text-bold text-xl"
></text>
</view>
</view>
<view
class=
"tip"
>
<view
class=
"text-1"
>
<text
class=
"text-bold text-lg text-black"
>
核销成功
</text>
</view>
<view
class=
"flex-col"
>
<text
>
优惠券名称:
</text>
</view>
<view
class=
"flex-col"
>
<text
>
到期时间:
</text>
</view>
</view>
</view>
<view
class=
"margin-top"
>
<button
class=
"cu-btn round block bg-pink lg"
@
tap=
"onNavHome"
>
去使用
</button>
</view>
</view>
</uni-popup>
</view>
</
template
>
<
script
>
import
{
couponChecked
}
from
"@/api/coupon.js"
import
mtIcon
from
"@/static/mt_icon.png"
export
default
{
data
()
{
return
{
code
:
""
,
list
:[
{
iconUrl
:
mtIcon
,
name
:
"美团"
}
],
couponInfo
:
''
};
},
mounted
()
{
},
methods
:{
onConfirm
(){
if
(
!
this
.
code
){
uni
.
showToast
({
icon
:
"none"
,
title
:
"请输入兑换码或扫码兑换"
})
return
}
uni
.
showLoading
({
title
:
"券码核验中"
})
couponChecked
(
this
.
code
).
then
(
res
=>
{
console
.
log
(
res
,
909090
)
if
(
res
.
data
.
code
===
200
){
this
.
couponInfo
=
res
.
data
.
data
this
.
$refs
.
popup
.
open
()
}
})
},
onScanCode
(){
uni
.
scanCode
({
complete
:
(
res
)
=>
{
console
.
log
(
res
)
if
(
res
.
result
){
this
.
code
=
res
.
result
this
.
onConfirm
()
}
}
})
},
onNavHome
(){
uni
.
switchTab
({
url
:
"/pages/index/index"
})
},
onClose
(){
this
.
$refs
.
popup
.
close
()
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.coupon-checked
{
display
:
flex
;
flex-direction
:
column
;
width
:
100vw
;
min-height
:
100vh
;
align-items
:
center
;
.icon-list{
display
:
flex
;
flex-direction
:
row
;
justify-content
:
center
;
align-items
:
center
;
margin-top
:
14vh
;
.img-box{
display
:
flex
;
width
:
120
upx
;
height
:
120
upx
;
margin
:
0
20
upx
;
border-radius
:
24
upx
;
overflow
:
hidden
;
image{
display
:
block
;
width
:
100%
;
height
:
100%
;
}
}
}
.text-box
{
display
:
flex
;
flex-direction
:
row
;
justify-content
:
center
;
align-items
:
center
;
font-size
:
36
upx
;
color
:
#000000
;
font-weight
:
bold
;
.text-item{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
}
}
}
.input-box
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
width
:
70%
;
margin-top
:
30
upx
;
.cu-form-group{
width
:
100%
;
border-bottom
:
1px
solid
#999999
;
background
:
transparent
;
padding
:
1
upx
12
upx
;
.input{
padding
:
4
upx
6
upx
;
}
.cuIcon-qr_code
{
font-size
:
60
upx
;
}
}
}
.confirm-box
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
width
:
70%
;
margin-top
:
30
upx
;
.cu-btn{
width
:
100%
;
}
}
.tips-box
{
display
:
flex
;
flex-direction
:
column
;
width
:
90%
;
}
.content-box
{
display
:
flex
;
flex-direction
:
column
;
width
:
70vw
;
height
:
40vh
;
.content{
display
:
flex
;
flex-direction
:
column
;
width
:
100%
;
padding
:
10
upx
0
50
upx
;
border-radius
:
24
upx
;
background-color
:
#ffffff
;
.title-box{
position
:
relative
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
padding
:
20
upx
0
;
border-bottom
:
1px
solid
#e5e5e5
;
.close-box{
position
:
absolute
;
right
:
20
upx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
height
:
100%
;
width
:
60
upx
;
text{
font-size
:
50
upx
;
}
}
}
}
.tip
{
display
:
flex
;
flex-direction
:
column
;
.text-1{
display
:
flex
;
width
:
100%
;
justify-content
:
center
;
align-items
:
center
;
margin
:
30
upx
0
;
}
.flex-col
{
width
:
100%
;
margin
:
10
upx
30
upx
;
text{
font-size
:
32
upx
;
color
:
#666666
;
}
}
}
}
</
style
>
pages/index/index.vue
View file @
c7ca8382
...
...
@@ -57,20 +57,20 @@
<view
class=
"title"
>
<text
class=
"text-title"
>
房间预览
</text>
</view>
<view
v-for=
"(item,index) in storeInfo.roomVoList"
:key=
"index"
class=
"list-item-box"
>
<view
v-for=
"(item,index) in storeInfo.roomVoList"
:key=
"index"
class=
"list-item-box"
@
tap=
"onNavToOrder(item)"
>
<view
class=
"relative part-top"
>
<image
class=
"room-img"
:src=
"item.images[0]"
mode=
"
widthFix
"
></image>
<image
class=
"room-img"
:src=
"item.images[0]"
mode=
"
scaleToFill
"
></image>
<view
class=
"absolute part-top-content"
>
<view
class=
"flex-between"
>
<view></view>
<image
src=
"../../static/nav_to_icon.png"
mode=
"widthFix"
@
tap=
"onNavToInfo(item)"
>
<image
src=
"../../static/nav_to_icon.png"
mode=
"widthFix"
@
tap
.
stop
=
"onNavToInfo(item)"
>
</image>
</view>
<view
class=
"tip-list-box"
>
<!--
<view
class=
"tip-list-box"
>
<view
v-for=
"(item,index) in iconList"
:key=
"index"
class=
"tip-item"
>
<image
:src=
"item.url"
mode=
"widthFix"
></image>
</view>
</view>
</view>
-->
</view>
</view>
<view
class=
"flex-col part-bottom"
>
...
...
@@ -82,14 +82,19 @@
<text>
¥
</text><text
class=
"text-pink"
>
{{
item
.
price
}}
</text><text>
/小时
</text>
</view>
</view>
<view
class=
"facilitie-box"
>
<view
v-for=
"(val,i) in item.facilities"
:key=
"i"
class=
'cu-tag radius light bg-pink'
>
<text>
{{
facilitieList
[
val
]
}}
</text>
</view>
</view>
<view
class=
"flex-1 flex-between"
>
<view
class=
"flex-row room-type"
>
<text>
优惠套餐:
</text>
<view
v-for=
"(
item
,i) in item.packList"
:key=
"i"
class=
"item"
>
<text>
{{
item
.
name
}}
</text>
<view
v-for=
"(
val
,i) in item.packList"
:key=
"i"
class=
"item"
>
<text>
{{
val
.
name
}}
</text>
</view>
</view>
<view
class=
"confirm"
@
tap=
"onNavToOrder(item)"
>
<view
class=
"confirm"
>
<text
class=
"cuIcon-add text-white text-lg"
></text>
</view>
</view>
...
...
@@ -166,6 +171,7 @@
label
:
"8小时"
}
],
facilitieList
:{},
show
:
true
,
timer
:
null
}
...
...
@@ -203,13 +209,21 @@
},
onLoad
(
option
)
{
console
.
log
(
option
,
909090
)
},
mounted
()
{
this
.
facilitieList
=
this
.
getDictItem
(
"indoor_facilities"
);
console
.
log
(
this
.
facilitieList
)
},
methods
:
{
onScroll
(
e
)
{
this
.
scrollTop
=
e
.
target
.
scrollTop
;
},
onLoading
()
{
uni
.
removeStorage
({
key
:
'storeId'
})
this
.
onGetListStore
()
},
onGetListStore
()
{
...
...
@@ -228,12 +242,13 @@
roomVoList
:
obj
.
roomVoList
.
map
(
item
=>
{
return
{
...
item
,
facilities
:
item
.
facilities
?
item
.
facilities
.
split
(
","
):[],
images
:
item
.
images
?
item
.
images
.
split
(
","
).
map
(
val
=>
this
.
hostUrl
+
val
)
:
[]
}
})
}
console
.
log
(
this
.
storeInfo
,
909090
)
}
})
...
...
@@ -513,7 +528,7 @@
.part-top
{
position
:
relative
;
width
:
600
upx
;
min-height
:
2
00
upx
;
min-height
:
3
00
upx
;
z-index
:
10
;
background-color
:
#FFFFFF
;
border-radius
:
36
upx
36
upx
36
upx
36
upx
;
...
...
@@ -524,7 +539,7 @@
display
:
block
;
width
:
100%
;
border-radius
:
36
upx
36
upx
36
upx
36
upx
;
height
:
auto
;
height
:
100%
;
}
.part-top-content
{
...
...
@@ -631,8 +646,8 @@
justify-content
:
center
;
align-items
:
center
;
align-self
:
flex-end
;
width
:
76
upx
;
height
:
62
upx
;
width
:
80
upx
;
height
:
80
upx
;
background
:
#E40583
;
border-radius
:
0
0
32
rpx
0
;
...
...
@@ -645,4 +660,9 @@
}
}
}
.facilitie-box
{
display
:
flex
;
flex-wrap
:
wrap
;
padding
:
12
upx
20
upx
;
}
</
style
>
\ No newline at end of file
static/mt_icon.png
0 → 100644
View file @
c7ca8382
10 KB
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