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
7c179a86
Commit
7c179a86
authored
Nov 05, 2020
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
65a1bba7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
87 additions
and
46 deletions
+87
-46
packagecart.vue
components/coupon/packagecart.vue
+7
-7
index.vue
pages/index/index.vue
+21
-14
storeList.vue
pages/reserve/storeList.vue
+2
-1
subscribe.vue
pages/reserve/subscribe.vue
+57
-24
No files found.
components/coupon/packagecart.vue
View file @
7c179a86
...
...
@@ -18,14 +18,14 @@
<view
class=
"details"
>
<view
class=
"item"
v-for=
"(x, i) in ts"
:key=
"i"
>
<view
class=
"ticket"
>
<image
mode=
"aspectFill"
:src=
"x.
C
ouponIco"
style=
"width: 100%; height: 100%;border-top-left-radius: 5px;border-bottom-left-radius: 5px;"
></image>
<image
mode=
"aspectFill"
:src=
"x.
coupon_data.c
ouponIco"
style=
"width: 100%; height: 100%;border-top-left-radius: 5px;border-bottom-left-radius: 5px;"
></image>
</view>
<view
class=
"detail"
>
<view
class=
"coupond"
>
<view
class=
"name"
>
{{
x
.
N
ame
}}
</view>
<view
class=
"rule"
>
{{
x
.
Describ
e
}}
</view>
<view
class=
"date"
v-if=
"x.IndateType==2"
>
{{
x
.
StartDate
+
"-"
+
x
.
EndDat
e
}}
</view>
<view
class=
"date"
v-if=
"x.IndateType==1"
>
{{
x
.
StartDate
+
"-"
+
x
.
EndDate
}}
</view>
<view
class=
"name"
>
{{
x
.
coupon_data
.
n
ame
}}
</view>
<view
class=
"rule"
>
{{
x
.
coupon_data
.
rul
e
}}
</view>
<view
class=
"date"
>
{{
x
.
start_time
+
"-"
+
x
.
end_tim
e
}}
</view>
</view>
<view
class=
"chosen"
>
<u-radio-group
v-model=
"currentChosen"
>
...
...
@@ -77,8 +77,8 @@ export default {
this
.
currentChosen
=
this
.
current
;
this
.
ts
=
this
.
list
this
.
ts
.
forEach
(
x
=>
{
x
.
StartDate
=
x
.
StartDat
e
.
split
(
' '
)[
0
].
replace
(
/-/g
,
'.'
)
x
.
EndDate
=
x
.
EndDat
e
.
split
(
' '
)[
0
].
replace
(
/-/g
,
'.'
)
x
.
start_time
=
x
.
start_tim
e
.
split
(
' '
)[
0
].
replace
(
/-/g
,
'.'
)
x
.
end_time
=
x
.
end_tim
e
.
split
(
' '
)[
0
].
replace
(
/-/g
,
'.'
)
})
},
methods
:
{
...
...
pages/index/index.vue
View file @
7c179a86
...
...
@@ -375,22 +375,10 @@
});
// #endif
uni
.
getLocation
({
type
:
'wgs84'
,
success
:
function
(
res
)
{
let
position
=
res
.
latitude
+
','
+
res
.
longitude
;
uni
.
setStorageSync
(
"position"
,
{
position
:
position
});
that
.
getCurrentStore
()
},
fail
:
function
(
err
)
{
that
.
getCurrentStore
()
}
});
this
.
init
();
this
.
getstore
()
let
set
=
uni
.
getStorageSync
(
"basedata"
)
?
uni
.
getStorageSync
(
"basedata"
).
mall
.
setting
:
{};
...
...
@@ -483,6 +471,7 @@
},
500
);
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
init
();
this
.
getstore
()
},
methods
:
{
...
...
@@ -744,10 +733,28 @@
this
.
isShowBack
();
}
this
.
formatBg
();
},
(
error
)
=>
{}
);
},
getstore
(){
let
that
=
this
;
uni
.
getLocation
({
type
:
'wgs84'
,
success
:
function
(
res
)
{
let
position
=
res
.
latitude
+
','
+
res
.
longitude
;
uni
.
setStorageSync
(
"position"
,
{
position
:
position
});
that
.
getCurrentStore
()
},
fail
:
function
(
err
)
{
that
.
getCurrentStore
()
}
});
},
getCurrentStore
()
{
let
storeId
=
uni
.
getStorageSync
(
"storeId"
)
&&
uni
.
getStorageSync
(
"storeId"
).
storeId
?
uni
.
getStorageSync
(
"storeId"
)
.
storeId
:
0
;
...
...
pages/reserve/storeList.vue
View file @
7c179a86
...
...
@@ -186,7 +186,8 @@
},
gostoreDetails
(
item
)
{
uni
.
setStorageSync
(
"storeId"
,
{
storeId
:
item
.
Id
});
this
.
currentChosen
=
item
.
Id
uni
.
navigateTo
({
url
:
"/pages/reserve/storeDetails?id="
+
item
.
Id
,
});
...
...
pages/reserve/subscribe.vue
View file @
7c179a86
...
...
@@ -222,6 +222,7 @@
color
:
#232323
;
text-align
:
right
;
display
:
flex
;
justify-content
:
flex-end
;
}
</
style
>
<
template
>
...
...
@@ -329,10 +330,10 @@
<view
class=
"info-item"
>
<text
class=
"info-i-l"
>
套餐卡
</text>
<view
class=
"right"
>
<text
class=
"content"
v-if=
"courseList.length>0"
@
click=
"showCourseHandler"
>
选择套餐卡
<text
class=
"content"
v-if=
"courseList.length>0
&& User_Coupon_Id==0
"
@
click=
"showCourseHandler"
>
选择套餐卡
</text>
<text
class=
"content"
v-else-if=
"courseList.length==0"
>
暂无套餐卡
</text>
<text
class=
"content"
v-else
:style=
"
{ color: pricecolor }" @click="showCourseHandler">已优惠
0
元
</text>
<text
class=
"content"
v-else
:style=
"
{ color: pricecolor }" @click="showCourseHandler">已优惠
{{
CouponMoney
}}
元
</text>
<u-icon
name=
"ellipsis"
size=
"36"
v-if=
"courseList.length > 0"
@
click=
"showCourseHandler"
></u-icon>
</view>
</view>
...
...
@@ -350,15 +351,16 @@
<view
class=
"submit"
>
<view
class=
"submit-l"
>
<text>
定金:
</text>
<text
:style=
"
{'color':mainColor}">¥
<text
style=
'font-size: 20px;'
>
{{
goods
.
pric
e
*
value
}}
</text></text>
<text
:style=
"
{'color':mainColor}">¥
<text
style=
'font-size: 20px;'
>
{{
Incom
e
*
value
}}
</text></text>
</view>
<u-button
:disabled =
'Nosubmit'
size=
"80"
:ripple=
"true"
shape=
"square"
@
click=
"submitOrderHandler()"
:custom-style=
"
{
backgroundColor:
mainColor
,
backgroundColor:
Nosubmit==false? mainColor:'#D4D4D4'
,
height: '80rpx',
color: '#FFF',
fontSize: '14px'
...
...
@@ -451,6 +453,9 @@
courseList
:[],
showCourse
:
false
,
User_Coupon_Id
:
0
,
Nosubmit
:
true
,
Income
:
0
,
CouponMoney
:
0
,
};
},
...
...
@@ -467,7 +472,7 @@
this
.
GetApplOGInfo
()
//商品详情
}
this
.
payInfo
.
OpenId
=
uni
.
getStorageSync
(
'mall_UserInfo'
).
OpenId
;
this
.
getAllCPList
()
},
mounted
()
{
uni
.
setNavigationBarTitle
({
...
...
@@ -500,16 +505,21 @@
console
.
log
(
e
)
if
(
e
!=
-
1
)
{
this
.
User_Coupon_Id
=
e
;
this
.
Income
=
0
;
this
.
CouponMoney
=
this
.
goods
.
price
*
this
.
value
// this.courseList.forEach(x=>{
// if(x.CouponId == e){
// this.CouponMoney = x.discount_limit
// }
// })
}
this
.
showCoupon
=
false
;
this
.
showCourse
=
false
;
},
showCourseHandler
(){
this
.
showCourse
=
true
;
},
GetAppOGList
(){
this
.
Nosubmit
=
true
;
uni
.
showLoading
({
title
:
'加载中'
});
...
...
@@ -518,29 +528,43 @@
data
:
{
categoryIds
:
this
.
categoryIds
,
StoreId
:
this
.
id
}
},
res
=>
{
this
.
OfflineGoods
=
res
.
data
;
this
.
GoodsId
=
0
;
this
.
dayList
=
[];
this
.
timeList
=
[];
this
.
designerList
=
[];
this
.
User_Coupon_Id
=
0
;
if
(
this
.
OfflineGoods
.
length
>
0
){
this
.
GoodsId
=
this
.
OfflineGoods
[
0
].
id
;
this
.
GetApplOGInfo
()
}
uni
.
hideLoading
();
}
);
},
getAllCPList
(){
schoolCoupon
(){
let
ProductList
=
[];
let
obj
=
{
GoodsClassId
:
this
.
goods
.
categoryIdList
,
GoodsPrice
:
this
.
goods
.
price
*
this
.
value
,
ProductId
:
this
.
goods
.
id
,
StoreId
:
this
.
id
,
};
ProductList
.
push
(
obj
);
//获取套餐卡的处理
this
.
User_Coupon_Id
=
0
,
this
.
Income
=
this
.
goods
.
price
;
this
.
CouponMoney
=
0
;
this
.
request2
({
url
:
'/api/AppletStores/Get
AllCouponPage
List'
,
data
:
{
pageIndex
:
1
,
pageSize
:
999
,
StoreId
:
this
.
id
}
url
:
'/api/AppletStores/Get
NoUseCoupon
List'
,
data
:
{
ProductList
:
ProductList
}
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
courseList
=
res
.
data
.
pageData
this
.
courseList
=
res
.
data
}
}
);
...
...
@@ -548,7 +572,7 @@
GetApplOGInfo
(){
uni
.
showLoading
({
title
:
'加载中'
title
:
'加载中'
,
});
this
.
request2
({
url
:
'/api/AppletGoods/GetAppletOfflineGoodsInfo'
,
...
...
@@ -565,6 +589,7 @@
this
.
timeList
=
this
.
dayList
[
0
].
TimeList
;
this
.
selecttime
=
this
.
timeList
[
0
];
this
.
designerList
=
res
.
data
.
goods
.
persionList
;
var
richtext
=
this
.
goods
.
detail
;
this
.
detailContent
=
richtext
;
let
obj
=
{
...
...
@@ -575,6 +600,8 @@
this
.
designerList
.
unshift
(
obj
)
this
.
selectdesigner
=
this
.
designerList
[
0
].
Gender
;
this
.
schoolCoupon
();
//获取套餐卡
this
.
Nosubmit
=
false
;
}
}
...
...
@@ -583,13 +610,14 @@
},
submitOrderHandler
(){
//提交订单
let
that
=
this
;
this
.
submitOrder
=
true
;
if
(
that
.
Mobile
==
''
){
uni
.
showToast
({
title
:
'填写手机号码'
title
:
'填写手机号码'
,
icon
:
'none'
})
return
return
false
}
this
.
submitOrder
=
true
;
uni
.
requestSubscribeMessage
({
tmplIds
:
that
.
goods
.
template_message_list
,
complete
(
res
)
{
...
...
@@ -599,7 +627,9 @@
form
.
Mobile
=
that
.
Mobile
;
form
.
Income
=
that
.
goods
.
price
*
that
.
value
;
form
.
Remark
=
that
.
remarks
;
form
.
CouponMoney
=
0
;
form
.
User_Coupon_Id
=
this
.
User_Coupon_Id
;
//优惠券id
form
.
User_Coupon_Id
=
this
.
User_Coupon_Id
;
//优惠券id
form
.
CouponMoney
=
this
.
CouponMoney
;
form
.
DetailList
=
[];
let
obj
=
{
GoodsId
:
that
.
goods
.
id
,
...
...
@@ -661,7 +691,9 @@
this
.
selectdesigner
=
item
.
Gender
},
valChange
(
e
){
this
.
value
=
e
.
value
this
.
value
=
e
.
value
;
this
.
schoolCoupon
();
//获取套餐卡
console
.
log
(
e
)
},
closePay
()
{
this
.
payBtn
=
false
;
...
...
@@ -669,15 +701,16 @@
},
exitPay
()
{
this
.
payExit
=
false
;
//
uni.redirectTo({
// url: "/pages/order/index/index
?status=0",
//
});
uni
.
redirectTo
({
url
:
"/pages/reserve/personal/orderlist
?status=0"
,
});
},
clickDescription
(
e
){
},
goodsdetails
(){
//商品详情
// this.goods
uni
.
navigateTo
({
url
:
"/pages/reserve/goodsDetails?GoodsId="
+
this
.
goods
.
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