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
258829e6
Commit
258829e6
authored
Nov 25, 2020
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改样式
parent
7661d345
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
306 additions
and
44 deletions
+306
-44
myVipList.vue
pages/reserve/personal/myVipList.vue
+245
-1
vipDetail.vue
pages/reserve/personal/vipDetail.vue
+56
-36
storeDetails.vue
pages/reserve/storeDetails.vue
+5
-7
No files found.
pages/reserve/personal/myVipList.vue
View file @
258829e6
<
template
>
<view
class=
"myVipList"
:style=
"
{ height: contentHeight }">
<u-empty
v-if=
"g.length == 0"
text=
"暂无相关会员卡"
mode=
"coupon"
></u-empty>
<view
v-if=
"g.length > 0"
style=
"
height: calc(100vh );
width: calc(100vw);
overflow: hidden;
padding-bottom: 10px;
"
>
<scroll-view
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
:style=
"
{ height: '100%' }"
>
<view
class=
"details"
v-for=
"(x, i) in g"
:key=
"i"
@
click=
"gocoupon(x)"
>
<view
class=
"d-t-box"
>
<image
mode=
"aspectFill"
:src=
"x.CardBagIco"
style=
"width: 100%;height: 100%;border-radius: 6px;"
></image>
<view
class=
"bj"
></view>
<view
class=
"btext"
>
<text>
{{
x
.
Name
}}
</text>
</view>
<view
class=
"bj2"
v-if=
"x.IsOver==1"
></view>
<image
mode=
"aspectFill"
v-if=
"x.IsOver==1"
class=
"imgs"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/studycardgq.png"
></image>
</view>
</view>
<u-loadmore
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"#FFF"
/>
</scroll-view>
</view>
<!-- 加载中 -->
<view
class=
"loading"
v-if=
"loading"
>
<u-loading
mode=
"flower"
size=
"48"
>
>
</u-loading>
<Text
style=
"color: #fff; margin-top: 10rpx;"
>
加载中...
</Text>
</view>
<!-- 取消提示 -->
<u-toast
ref=
"uToast"
/>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
'gbAuth'
></auth>
</view>
</
template
>
<
script
>
import
auth
from
"@/components/auth/index.vue"
;
export
default
{
components
:
{
auth
},
data
()
{
return
{
pageTitle
:
"会员卡"
,
showAuth
:
false
,
u
:{},
mainColor
:
""
,
contentHeight
:
0
,
msg
:{
pageIndex
:
1
,
pageSize
:
10
,
},
page_count
:
1
,
g
:
[],
loading
:
false
,
status
:
"loadmore"
,
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
nomore
:
"没有更多了"
,
},
};
},
created
()
{
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
-
40
)
+
"px"
;
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
},
mounted
()
{
let
currentPages
=
getCurrentPages
();
let
u
=
"/"
+
currentPages
[
currentPages
.
length
-
1
].
route
;
let
pages
=
wx
.
getStorageSync
(
"basedata"
)
?
wx
.
getStorageSync
(
"basedata"
).
bar_title
:
[];
pages
.
forEach
((
x
)
=>
{
if
(
x
.
value
==
u
)
{
this
.
pageTitle
=
x
.
new_name
?
x
.
new_name
:
x
.
name
;
}
});
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
},
onLoad
:
function
(
option
)
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
};
this
.
showAuth
=
true
;
}
else
{
this
.
init
();
}
},
methods
:
{
init
()
{
this
.
request2
(
{
url
:
'/api/AppletStores/GetMemberCardBagList'
,
data
:
this
.
msg
},
res
=>
{
if
(
res
.
resultCode
==
1
){
this
.
loading
=
false
;
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
pageCount
;
if
(
this
.
page_count
==
1
)
{
this
.
status
=
"nomore"
;
}
}
}
);
},
lower
(
e
)
{
if
(
this
.
msg
.
pageIndex
<
this
.
page_count
)
{
this
.
msg
.
pageIndex
++
;
this
.
status
=
"loading"
;
this
.
init
();
}
else
{
this
.
status
=
"nomore"
;
}
},
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
// this.showAuth=false;
this
.
init
();
},
//关闭登录窗口
gbAuth
(){
uni
.
navigateBack
()
},
gocoupon
(
item
){
if
(
item
.
IsOver
==
0
){
uni
.
navigateTo
({
url
:
"/pages/reserve/personal/vipDetail?ID="
+
item
.
ID
,
})
}
}
},
};
</
script
>
<
style
>
.myVipList
{
width
:
100%
;
height
:
100%
;
background
:
#FFF
;
position
:
relative
;
}
.myVipList
.loading
{
width
:
180
rpx
;
height
:
180
rpx
;
background
:
#000000
;
opacity
:
0.7
;
border-radius
:
10
rpx
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
position
:
fixed
;
left
:
50%
;
top
:
30%
;
margin-left
:
-100
rpx
;
z-index
:
999
;
}
.myVipList
.details
{
width
:
100%
;
padding
:
0
15px
;
margin-top
:
15px
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
.d-t-box
{
width
:
100%
;
height
:
83px
;
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
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.bj2
{
width
:
100%
;
height
:
100%
;
position
:
absolute
;
left
:
0
;
top
:
0
;
background
:
rgba
(
153
,
153
,
153
,
0.6
);
border-radius
:
6px
;
}
.imgs
{
width
:
55px
;
height
:
52px
;
position
:
absolute
;
top
:
0px
;
right
:
0px
;
}
</
style
>
pages/reserve/personal/vipDetail.vue
View file @
258829e6
...
...
@@ -17,18 +17,28 @@
.vipDetail
.submit
{
width
:
100%
;
height
:
60px
;
background
:
#FFF
;
height
:
65px
;
position
:
fixed
;
background
:
#FAF8F9
;
left
:
0
;
bottom
:
0
;
padding
:
0
15px
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
center
;
z-index
:
99
;
}
.vipDetail
.submit-box
{
width
:
100%
;
height
:
45px
;
border-radius
:
23px
;
font-size
:
16px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.vipDetail
.bj
{
width
:
100%
;
...
...
@@ -48,42 +58,55 @@
font-size
:
12px
;
color
:
#FFF
;
padding
:
15px
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-between
;
}
</
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=
"bj"
></view>
--
>
<view
class=
"btext"
>
<text>
{{
cdetail
.
Name
}}
</text>
<text></text>
<view
style=
"width: 100%;color: #FFF;font-size: 15px;"
>
<view>
{{
cdetail
.
CardNo
}}
</view>
<view
style=
"margin-top: 12px;font-size: 12px;display: flex;flex-direction: row;align-items: center;"
>
<view
style=
"margin-right: 10px;max-width: 100px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"
>
{{
useName
}}
</view>
<!--
{{
cdetail
.
StartDate
.
split
(
'T'
)[
0
].
split
(
'-'
)[
0
]
+
'/'
+
cdetail
.
StartDate
.
split
(
'T'
)[
0
].
split
(
'-'
)[
1
]
}}
~
{{
cdetail
.
EndDate
.
split
(
'T'
)[
0
].
split
(
'-'
)[
0
]
+
'/'
+
cdetail
.
EndDate
.
split
(
'T'
)[
0
].
split
(
'-'
)[
1
]
}}
-->
{{
cdetail
.
EndDate
.
split
(
'T'
)[
0
].
split
(
'-'
)[
1
]
+
'/'
+
cdetail
.
EndDate
.
split
(
'T'
)[
0
].
split
(
'-'
)[
0
].
toString
().
substr
(
2
,
2
)
}}
</view>
</view>
</view>
</view>
<view
style=
"width: 100%;height: 40px;line-height: 40px;font-weight: bold;color: #111111;font-size: 14px;"
>
会员卡详情
</view>
<view
style=
"width: 100%;margin-bottom: 100px;"
>
<h-parse
:content=
"detailContent"
@
navigate=
"clickDescription"
></h-parse>
</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',
}"
<view
class=
"submit-box"
:style=
"
{'background':cdetail.MemberNum==0?mc:'#D4D4D4',color:cdetail.MemberNum==0?'#FFF':'#999999'}"
@click="submitreceive()"
>
{{
cdetail
.
MemberNum
>
0
?
'去使用'
:
'立即领取'
}}
</u-button>
<text
v-if=
"cdetail.MemberNum==0"
>
立即领取
</text>
<text
v-if=
"cdetail.MemberNum!=0"
>
已领取
</text>
</view>
</view>
</view>
</
template
>
<
script
>
import
hParse
from
"@/components/u-parse/parse.vue"
;
export
default
{
components
:
{
hParse
,
},
data
()
{
return
{
pageTitle
:
"会员卡详情"
,
...
...
@@ -96,6 +119,8 @@
submitOrder
:
false
,
cstore
:
0
,
detailContent
:
''
,
useName
:
''
,
};
},
...
...
@@ -109,7 +134,7 @@
this
.
storeId
=
option
.
storeId
}
this
.
getDetail
()
//获取套餐卡详情
this
.
useName
=
uni
.
getStorageSync
(
"mall_UserInfo"
)?
uni
.
getStorageSync
(
"mall_UserInfo"
).
Name
:
''
},
...
...
@@ -128,12 +153,14 @@
});
this
.
request2
({
url
:
'/api/AppletStores/GetReserveCardBagDetail'
,
data
:
{
ID
:
this
.
ID
,
StoreId
:
this
.
storeId
}
data
:
{
ID
:
this
.
ID
,
StoreId
:
this
.
storeId
==
0
?
'-1'
:
this
.
storeId
}
//判断下如果是列表没传门店id时候传-1
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
loading
=
true
this
.
cdetail
=
res
.
data
var
richtext
=
this
.
cdetail
.
Describe
;
this
.
detailContent
=
richtext
;
}
uni
.
hideLoading
();
}
...
...
@@ -142,7 +169,7 @@
submitreceive
(){
if
(
this
.
cdetail
.
MemberNum
==
0
){
this
.
request2
({
url
:
'/api/AppletStores/GrantC
oupon
'
,
url
:
'/api/AppletStores/GrantC
ardBag
'
,
data
:
{
CouponId
:
this
.
ID
,
StoreId
:
this
.
storeId
}
},
res
=>
{
...
...
@@ -156,17 +183,10 @@
}
);
}
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'
});
}
uni
.
showToast
({
title
:
'已经领取过了!'
,
icon
:
"none"
,
});
}
},
...
...
pages/reserve/storeDetails.vue
View file @
258829e6
...
...
@@ -484,10 +484,10 @@
<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"
>
<
!--
<view
class=
"bj"
></view>
--
>
<!--
<view
class=
"btext"
>
<text>
{{
cl
.
Name
}}
</text>
</view>
</view>
-->
</view>
</view>
</view>
...
...
@@ -496,7 +496,6 @@
<view
class=
"title-c"
@
click=
"goPersonal"
v-if=
"personalList.length>0"
>
<text>
设计师
</text>
<u-icon
name=
"arrow"
:size=
"30"
color=
"#666666"
></u-icon>
</view>
<view
class=
"designer u-skeleton-rect"
v-if=
"personalList.length>0"
>
<view
class=
"designer-item"
v-for=
"(x, ci2) in personalList"
:key=
"ci2"
v-if=
"personalList.length>0"
@
click=
"godesigner(x)"
>
...
...
@@ -521,7 +520,7 @@
</view>
</view>
</view>
<view
class=
"designer-btn"
:style=
"
{'background':mc}" @click.stop="gosubscribe(x)">
<view
class=
"designer-btn"
v-if=
"g.IsHaveGoods>0"
:style=
"
{'background':mc}" @click.stop="gosubscribe(x)">
预约
</view>
</view>
...
...
@@ -581,7 +580,7 @@
<view
class=
"richtext2"
>
<h-parse
:content=
"detailContent2"
@
navigate=
"clickDescription"
></h-parse>
</view>
<view
class=
"btn"
>
<view
class=
"btn"
v-if=
"g.IsHaveGoods>0"
>
<view
class=
"btn-box"
:style=
"
{'background':mc}" @click="gosubscribe2()">
预约
</view>
...
...
@@ -1102,7 +1101,6 @@
})
},
govipD
(
item
){
//会员卡详情
console
.
log
(
this
.
id
)
uni
.
navigateTo
({
url
:
"/pages/reserve/personal/vipDetail?ID="
+
item
.
CouponId
+
'&storeId='
+
this
.
id
,
})
...
...
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