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
77eaebdf
Commit
77eaebdf
authored
Dec 31, 2020
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
2324240a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
8 deletions
+23
-8
index.vue
components/auth/index.vue
+7
-3
coupons.vue
components/coupons/coupons.vue
+12
-3
index.vue
pages/index/index.vue
+4
-2
No files found.
components/auth/index.vue
View file @
77eaebdf
...
...
@@ -5,7 +5,7 @@
<button
:style=
"sureStyle"
class=
"hotsopt"
open-type=
"getUserInfo"
@
getuserinfo=
"getUserInfo"
></button>
<button
:style=
"cancelStyle"
class=
"hotsopt"
@
click=
"close"
></button>
</u-popup>
<coupon
v-if=
"showCoupons"
:coupon-message=
"couponMessage"
@
goLook=
"goLook"
@
closeBtn=
"closeBtn"
></coupon>
<coupon
v-if=
"showCoupons"
:coupon-message=
"couponMessage"
:cform=
"ComeFrom"
@
goLook=
"goLook"
@
closeBtn=
"closeBtn"
></coupon>
</div>
</
template
>
...
...
@@ -23,6 +23,7 @@
showDialog
:
true
,
showCoupons
:
false
,
couponMessage
:
''
,
ComeFrom
:
''
,
};
},
created
()
{
...
...
@@ -140,8 +141,11 @@
uni
.
setStorageSync
(
'mall_UserInfo'
,
res
.
data
);
that
.
$emit
(
'changeuserinfo'
);
if
(
res
.
couponResultCode
==
1
)
{
this
.
showCoupons
=
true
;
this
.
couponMessage
=
res
.
couponMessage
;
if
(
uni
.
getStorageSync
(
"ComeFrom"
)){
that
.
ComeFrom
=
uni
.
getStorageSync
(
"ComeFrom"
).
ComeFrom
}
that
.
showCoupons
=
true
;
that
.
couponMessage
=
res
.
couponMessage
;
}
uni
.
removeStorageSync
(
'pid'
);
uni
.
removeStorageSync
(
'SmallShopId'
);
...
...
components/coupons/coupons.vue
View file @
77eaebdf
...
...
@@ -5,7 +5,8 @@
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/couponsbg.png"
mode=
"widthFix"
/>
<view
class=
"coupons-box"
>
<text
style=
"font-size: 18px;color: #FFFFFF;"
>
恭喜获得
{{
msgtype
==
1
?
'优惠券'
:
'积分'
}}
</text>
<text
style=
"font-size: 14px;color: #FFFFFF;margin-top: 20rpx;"
>
{{
couponMessage
}}
</text>
<text
style=
"font-size: 14px;color: #FDE005;;margin-top: 20rpx;"
>
{{
couponMessage
}}
</text>
<text
style=
"font-size: 12px;color: #FDE005;;margin-top: 20rpx;"
v-if=
"cform!=null && cform!=''"
>
{{
cform
}}
</text>
<view
class=
"btn"
@
click=
"goLook"
>
<text>
立即查看
</text>
</view>
...
...
@@ -25,19 +26,26 @@
},
msgtype
:
{
type
:
String
,
default
:
1
default
:
"1"
},
cform
:
{
type
:
String
,
default
:
""
}
},
data
()
{
return
{
pageinfo
:
{},
showDialog
:
true
showDialog
:
true
,
};
},
created
()
{
},
methods
:
{
goLook
()
{
uni
.
removeStorageSync
(
"ComeFrom"
);
this
.
showDialog
=
false
;
if
(
this
.
msgtype
==
1
)
{
uni
.
navigateTo
({
...
...
@@ -51,6 +59,7 @@
this
.
$emit
(
'goLook'
);
},
closeBtn
()
{
uni
.
removeStorageSync
(
"ComeFrom"
);
this
.
showDialog
=
false
;
this
.
$emit
(
'closeBtn'
);
}
...
...
pages/index/index.vue
View file @
77eaebdf
...
...
@@ -76,7 +76,7 @@
<Text
style=
"color: #fff;"
>
{{setting.add_app_text}}
</Text>
<view
class=
"triangle-up"
:style=
"{'top':pagePaddingBottom}"
></view>
</view>
<coupon
v-if=
"showCoupons"
:coupon-message=
"couponMessage"
@
goLook=
"goLook"
@
closeBtn=
"closeBtn"
></coupon>
<coupon
v-if=
"showCoupons"
:coupon-message=
"couponMessage"
:cform=
"ComeFrom"
@
goLook=
"goLook"
@
closeBtn=
"closeBtn"
></coupon>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
<official-account></official-account>
</view>
...
...
@@ -130,7 +130,7 @@
add_show
:
1
,
showtabs
:
true
,
showCoupons
:
false
,
couponMessage
:
"
恭喜获得20元优惠券
"
,
couponMessage
:
""
,
pageTitleStr
:
""
,
titleStyle
:
""
,
pagePaddingBottom
:
"0px"
,
...
...
@@ -150,6 +150,7 @@
fxstoreId
:
0
,
//分享过来的门店id
showStart
:
false
,
//是否显示启动页
startData
:{},
ComeFrom
:
''
,
};
},
components
:
{
...
...
@@ -272,6 +273,7 @@
});
}
if
(
options
&&
options
.
ComeFrom
)
{
//跳过来的文字描述
this
.
ComeFrom
=
options
.
ComeFrom
;
uni
.
setStorageSync
(
"ComeFrom"
,
{
ComeFrom
:
options
.
ComeFrom
});
...
...
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