Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
Project
Project
Details
Activity
Releases
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
viitto
mallapp
Commits
7661d345
Commit
7661d345
authored
Nov 24, 2020
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
卡包
parent
1b604318
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
276 additions
and
13 deletions
+276
-13
pages.json
pages.json
+4
-0
couponDetail.vue
pages/reserve/personal/couponDetail.vue
+6
-3
myVipList.vue
pages/reserve/personal/myVipList.vue
+8
-0
vipDetail.vue
pages/reserve/personal/vipDetail.vue
+179
-0
storeDetails.vue
pages/reserve/storeDetails.vue
+79
-10
No files found.
pages.json
View file @
7661d345
...
...
@@ -456,6 +456,10 @@
}
},{
"path"
:
"draw"
},{
"path"
:
"personal/myVipList"
},{
"path"
:
"personal/vipDetail"
}
]
},
...
...
pages/reserve/personal/couponDetail.vue
View file @
7661d345
...
...
@@ -258,11 +258,14 @@
uni
.
showLoading
({
title
:
'加载中'
});
let
storeId
=
uni
.
getStorageSync
(
"storeId"
)
&&
uni
.
getStorageSync
(
"storeId"
).
storeId
?
uni
.
getStorageSync
(
"storeId"
)
.
storeId
:
0
;
if
(
this
.
storeId
==
0
){
this
.
storeId
=
uni
.
getStorageSync
(
"storeId"
)
&&
uni
.
getStorageSync
(
"storeId"
).
storeId
?
uni
.
getStorageSync
(
"storeId"
)
.
storeId
:
0
;
}
this
.
request2
({
url
:
'/api/AppletStores/GetReserveCouponDetail'
,
data
:
{
ID
:
this
.
ID
,
StoreId
:
storeId
}
data
:
{
ID
:
this
.
ID
,
StoreId
:
this
.
storeId
}
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
...
...
pages/reserve/personal/myVipList.vue
0 → 100644
View file @
7661d345
<
template
>
</
template
>
<
script
>
</
script
>
<
style
>
</
style
>
pages/reserve/personal/vipDetail.vue
0 → 100644
View file @
7661d345
<
style
scoped
>
.vipDetail
{
width
:
100%
;
height
:
100vh
;
background
:
#FAF8F9
;
font-family
:
aa
;
padding
:
15px
;
}
.vipDetail
.vipd_top
{
width
:
100%
;
height
:
194px
;
border-radius
:
10px
;
overflow
:
hidden
;
position
:
relative
;
}
.vipDetail
.submit
{
width
:
100%
;
height
:
60px
;
background
:
#FFF
;
position
:
fixed
;
left
:
0
;
bottom
:
0
;
padding
:
0
15px
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
z-index
:
99
;
}
.vipDetail
.bj
{
width
:
100%
;
height
:
100%
;
position
:
absolute
;
left
:
0
;
top
:
0
;
background
:
rgba
(
0
,
0
,
0
,
0.3
);
border-radius
:
10px
;
}
.vipDetail
.btext
{
width
:
100%
;
height
:
100%
;
position
:
absolute
;
left
:
0
;
top
:
0
;
font-size
:
12px
;
color
:
#FFF
;
padding
:
15px
;
}
</
style
>
<
template
>
<view
class=
"vipDetail"
v-if=
"loading"
>
<view
class=
"vipd_top"
>
<image
mode=
"aspectFill"
:src=
"cdetail.CardBagIco"
style=
"width: 100%;height: 100%;border-radius: 10px;"
></image>
<view
class=
"bj"
></view>
<view
class=
"btext"
>
<text>
{{
cdetail
.
Name
}}
</text>
</view>
</view>
<view
class=
"submit"
>
<text>
{{
cdetail
.
Name
}}
</text>
<u-button
size=
"80"
:ripple=
"true"
shape=
"circle"
@
click=
"submitreceive()"
:custom-style=
"
{
backgroundColor:mc,
height: '80rpx',
color: '#FFF',
fontSize: '14px',
}"
>
{{
cdetail
.
MemberNum
>
0
?
'去使用'
:
'立即领取'
}}
</u-button>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
pageTitle
:
"会员卡详情"
,
mc
:
""
,
loading
:
false
,
ID
:
0
,
storeId
:
0
,
cdetail
:{},
current
:
0
,
submitOrder
:
false
,
cstore
:
0
,
};
},
onLoad
(
option
)
{
console
.
log
(
option
)
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
if
(
option
&&
option
.
ID
){
this
.
ID
=
option
.
ID
}
if
(
option
&&
option
.
storeId
){
this
.
storeId
=
option
.
storeId
}
this
.
getDetail
()
//获取套餐卡详情
},
mounted
()
{
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
},
methods
:
{
getDetail
(){
uni
.
showLoading
({
title
:
'加载中'
});
this
.
request2
({
url
:
'/api/AppletStores/GetReserveCardBagDetail'
,
data
:
{
ID
:
this
.
ID
,
StoreId
:
this
.
storeId
}
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
loading
=
true
this
.
cdetail
=
res
.
data
}
uni
.
hideLoading
();
}
);
},
submitreceive
(){
if
(
this
.
cdetail
.
MemberNum
==
0
){
this
.
request2
({
url
:
'/api/AppletStores/GrantCoupon'
,
data
:
{
CouponId
:
this
.
ID
,
StoreId
:
this
.
storeId
}
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
"none"
,
});
this
.
cdetail
.
MemberNum
=
1
}
}
);
}
else
{
let
data
=
[]
let
g
=
this
.
cdetail
if
(
g
.
UseType
==
1
||
g
.
UseType
==
2
){
g
.
ProductList
.
forEach
(
x
=>
{
data
.
push
(
x
.
ProductId
)
})
let
id
=
data
.
toString
()
uni
.
redirectTo
({
url
:
'/pages/goods/list?coupon_id='
+
id
+
'&UseType='
+
g
.
UseType
});
}
else
{
uni
.
redirectTo
({
url
:
'/pages/goods/list'
});
}
}
},
},
};
</
script
>
pages/reserve/storeDetails.vue
View file @
7661d345
...
...
@@ -303,6 +303,34 @@
font-size
:
14px
;
color
:
#FFFFFF
;
}
.d-t-box
{
width
:
150px
;
height
:
75px
;
border-radius
:
6px
;
overflow
:
hidden
;
background-repeat
:
no-repeat
;
background-size
:
cover
;
position
:
relative
;
}
.bj
{
width
:
100%
;
height
:
100%
;
position
:
absolute
;
left
:
0
;
top
:
0
;
background
:
rgba
(
0
,
0
,
0
,
0.2
);
border-radius
:
6px
;
}
.btext
{
width
:
100%
;
height
:
100%
;
position
:
absolute
;
left
:
0
;
top
:
0
;
font-size
:
12px
;
color
:
#FFF
;
padding
:
5px
;
}
</
style
>
<
template
>
<view
class=
'storeDetails'
...
...
@@ -444,16 +472,25 @@
</view>
</view>
</view>
<view
class=
"title-c"
>
卡包
<view
class=
"title-c"
v-if=
"vipList.length>0"
>
会员卡
</view>
<view
class=
"cardbag"
>
<view
v-if=
"allCoupon.length==0"
style=
"width: 100%;height: 50px;line-height: 50px;text-align: center;"
>
暂无任何卡包~
<view
class=
"cardbag"
v-if=
"vipList.length>0"
>
<view
v-if=
"vipList.length==0"
style=
"width: 100%;height: 50px;line-height: 50px;text-align: center;"
>
暂无任何会员卡~
</view>
<view
v-for=
"(cl, ci) in vipList"
:key=
"ci"
@
click=
"govipD(cl)"
v-if=
"vipList.length>0"
>
<view
class=
"setmeal-item u-skeleton-rect"
:style=
"
{'margin-left':ci==0?'15px':'0','margin-right': ci+1==vipList.length?'15px':'5px','width':'150px'}">
<view
class=
"d-t-box"
>
<image
mode=
"aspectFill"
:src=
"cl.CardBagIco"
style=
"width: 100%;height: 100%;border-radius: 6px;"
></image>
<view
class=
"bj"
></view>
<view
class=
"btext"
>
<text>
{{
cl
.
Name
}}
</text>
</view>
</view>
</view>
</view>
<!-- TOdo 卡包的列表-->
<view
style=
"width: 100%;height: 200px;"
></view>
</view>
<view
class=
"title-c"
@
click=
"goPersonal"
v-if=
"personalList.length>0"
>
...
...
@@ -589,7 +626,7 @@
couponMessage
:
""
,
list
:[
{
name
:
'优惠'
},
{
name
:
'
卡包
'
},
{
name
:
'
会员卡
'
},
{
name
:
'设计师'
},
{
name
:
'评价'
},
{
name
:
'价目表'
},
...
...
@@ -601,7 +638,7 @@
headH
:
68
,
stickyH
:
0
,
setmealH
:
0
,
//套餐卡的高度
cardbagH
:
0
,
//
卡包
的高度
cardbagH
:
0
,
//
会员卡
的高度
designerH
:
0
,
//设计师的高度
richtextH
:
0
,
//富文本的高度
richtextH2
:
0
,
//富文本的高度
...
...
@@ -615,6 +652,7 @@
detailContent2
:
''
,
personalList
:[],
allCoupon
:[],
vipList
:[],
count
:
0
,
positionObj
:{}
//位置
}
...
...
@@ -626,6 +664,7 @@
}
else
{
this
.
id
=
option
.
GoodsId
?
option
.
GoodsId
:
2
;
}
if
(
option
&&
option
.
custom_params
)
{
let
custom_params
=
JSON
.
parse
(
decodeURIComponent
(
option
.
custom_params
));
if
(
custom_params
.
user_id
)
{
...
...
@@ -862,6 +901,29 @@
}
}
}
this
.
getViplist
()
}
}
);
},
getViplist
(){
this
.
request2
({
url
:
'/api/AppletStores/GetAllCardBagList'
,
data
:
{
pageIndex
:
1
,
pageSize
:
999
,
StoreId
:
this
.
id
}
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
vipList
=
res
.
data
.
pageData
if
(
this
.
vipList
.
length
==
0
){
for
(
let
i
=
0
;
i
<
this
.
list
.
length
;
i
++
){
if
(
this
.
list
[
i
].
name
==
'会员卡'
){
this
.
list
.
splice
(
i
,
1
)
}
}
}
}
}
);
...
...
@@ -895,7 +957,7 @@
uni
.
pageScrollTo
({
scrollTop
:
that
.
setmealH
-
that
.
headH
-
40
-
30
})
}
else
if
(
that
.
list
[
e
].
name
==
'
卡包
'
){
}
else
if
(
that
.
list
[
e
].
name
==
'
会员卡
'
){
uni
.
pageScrollTo
({
scrollTop
:
that
.
cardbagH
-
that
.
headH
-
40
-
30
})
...
...
@@ -1039,6 +1101,13 @@
url
:
"/pages/reserve/designerDetail?ID="
+
item
.
ID
+
'&storeId='
+
this
.
id
,
})
},
govipD
(
item
){
//会员卡详情
console
.
log
(
this
.
id
)
uni
.
navigateTo
({
url
:
"/pages/reserve/personal/vipDetail?ID="
+
item
.
CouponId
+
'&storeId='
+
this
.
id
,
})
},
lookLocation
(
storeAddress
){
uni
.
openLocation
({
latitude
:
''
,
...
...
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