Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
595e9674
Commit
595e9674
authored
Feb 06, 2023
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支付成功支持营销组件
parent
30da3d20
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
10 deletions
+85
-10
src/pages/paySuccess/index.vue
+78
-5
src/pages/paySuccess/main.json
+3
-1
static/nativeComponents/TimeLimitedDiscount/index.js
+4
-4
No files found.
src/pages/paySuccess/index.vue
View file @
595e9674
...
...
@@ -37,6 +37,25 @@
>
<notice
:datas=
"item"
></notice>
</div>
<!-- 营销组件 -->
<div
v-if=
"item.componentCode == 'coupon' && item.componentInfo.visible == 1"
>
<coupon
:datas=
"item"
></coupon>
</div>
<div
v-if=
"item.componentCode == 'time-limited-discount' && item.componentInfo.visible == 1"
>
<time-limited-discount
:class=
"'time-limited-discount'+index"
:datas=
"item"
:k=
"index"
></time-limited-discount>
</div>
<div
v-if=
"item.componentCode == 'integral-turntable' && item.componentInfo.visible == 1"
>
<integralTurntable
:datas=
"item"
></integralTurntable>
</div>
<div
v-if=
"item.componentCode == 'live-broadcast' && item.componentInfo.visible == 1"
>
<live-broadcast
:datas=
"item"
></live-broadcast>
</div>
<div
v-if=
"item.componentCode == 'spell-group' && item.componentInfo.visible == 1"
>
<spell-group
:datas=
"item"
></spell-group>
</div>
<div
v-if=
"item.componentCode == 'official-account' && item.componentInfo.visible == 1"
>
<official-account></official-account>
</div>
<pay-success-info
v-if=
"item.componentCode=='pay-success-info' && item.componentInfo.visible==1"
:render=
"true"
...
...
@@ -92,6 +111,10 @@ import text from "@/components/content/text";
import
richText
from
"../../components/basicTool/rich-text"
;
import
interval
from
"@/components/basicTool/interval/index.vue"
;
import
partition
from
"@/components/basicTool/partition/index.vue"
;
import
coupon
from
'@/components/activity/coupon'
import
integralTurntable
from
'@/components/activity/integralTurntable'
import
spellGroup
from
'@/components/activity/spellGroup'
import
tool
from
'../../utils/tool.js'
const
app
=
getApp
();
const
{
log
}
=
app
;
export
default
{
...
...
@@ -137,16 +160,22 @@ export default {
partition
,
paySuccessInfo
,
PayElectronCard
,
automatiCard
automatiCard
,
coupon
,
integralTurntable
,
spellGroup
,
},
computed
:
{
// 是否开启企业要货
whetherOpenEnterprisesWantGoods
()
{
return
this
.
mpApp
.
globalData
.
shopInfo
.
whetherOpenEnterprisesWantGoods
||
0
let
{
shopInfo
}
=
this
.
mpApp
.
globalData
;
let
whetherOpenEnterprisesWantGoods
=
shopInfo
?
shopInfo
.
whetherOpenEnterprisesWantGoods
:
0
return
whetherOpenEnterprisesWantGoods
;
},
// 是否开启待审核
whetherOpenApproval
()
{
return
this
.
mpApp
.
shop_configuration
.
whetherOpenApproval
||
0
let
whetherOpenApproval
=
this
.
mpApp
.
shop_configuration
?
this
.
mpApp
.
shop_configuration
.
whetherOpenApproval
:
0
;
return
whetherOpenApproval
;
},
},
onLoad
(
options
)
{
...
...
@@ -186,7 +215,52 @@ export default {
onShow
()
{
console
.
log
(
"--paySuccess-onShow"
);
},
// 滚动节流方法
onPageScroll
:
tool
.
throttle
(
function
(
el
)
{
console
.
log
(
el
,
'--onPageScroll'
);
this
.
scrolls
(
el
[
0
])
},
200
),
methods
:
{
scrolls
(
el
){
// this.setFooterShow(el);
if
(
this
.
pageData
)
{
for
(
let
i
=
0
;
i
<
this
.
pageData
.
length
;
i
++
)
{
const
element
=
this
.
pageData
[
i
]
if
(
element
.
componentCode
==
"time-limited-discount"
){
let
com
=
this
.
$mp
.
page
.
selectComponent
(
".time-limited-discount"
+
i
)
;
com
&&
com
.
getScroll
(
el
);
}
if
(
element
.
componentCode
==
"goods-list"
){
let
com
=
this
.
$mp
.
page
.
selectComponent
(
".goodsListItem"
+
i
)
;
com
&&
com
.
getScroll
(
el
);
}
if
(
element
.
componentCode
==
"merchants-list"
){
let
com
=
this
.
$mp
.
page
.
selectComponent
(
".merchants-list"
+
i
)
;
com
&&
com
.
getScroll
(
el
);
}
if
(
element
.
componentCode
==
"video-player"
){
console
.
log
(
"视频组件滚动"
)
let
com
=
this
.
$mp
.
page
.
selectComponent
(
".VideoPlayer"
+
i
);
console
.
log
(
com
,
i
,
'--com'
)
com
&&
com
.
getScroll
(
el
);
}
}
}
if
(
this
.
$mp
.
page
&&
this
.
$mp
.
page
.
selectComponent
(
".getIndexHomePage"
)){
this
.
$mp
.
page
.
selectComponent
(
".getIndexHomePage"
).
getScroll
(
el
);
}
if
(
this
.
$mp
.
page
&&
this
.
$mp
.
page
.
selectComponent
(
".goodsListItem"
)){
this
.
$mp
.
page
.
selectComponent
(
".goodsListItem"
).
getScroll
(
el
);
}
if
(
this
.
$mp
.
page
&&
this
.
$mp
.
page
.
selectAllComponents
(
".transverse-label-goodsListItem"
)){
this
.
$mp
.
page
.
selectAllComponents
(
".transverse-label-goodsListItem"
).
forEach
(
item
=>
{
console
.
log
(
item
,
'-this.$mp.page.selectComponent(".goodsListItem")'
)
item
.
getScroll
(
el
)
})
}
},
orderMsg
()
{
order
.
orderDetail
(
this
.
query
).
then
(
res1
=>
{
let
res
=
res1
.
data
;
...
...
@@ -500,8 +574,7 @@ export default {
.paySuccess
{
position
:
relative
;
width
:
100vw
;
height
:
100vh
;
overflow-y
:
auto
;
height
:
auto
;
.tabbar{
position
:
sticky
;
top
:
0
;
...
...
src/pages/paySuccess/main.json
View file @
595e9674
...
...
@@ -8,7 +8,9 @@
"van-picker"
:
"/static/vant/picker/index"
,
"van-icon"
:
"/static/vant/icon/index"
,
"photo-gallery"
:
"/static/nativeComponents/PhotoGallery/index"
,
"notice"
:
"/static/nativeComponents/Notice/index"
"notice"
:
"/static/nativeComponents/Notice/index"
,
"time-limited-discount"
:
"/static/nativeComponents/TimeLimitedDiscount/index"
,
"live-broadcast"
:
"/static/nativeComponents/LiveBroadcast/index"
},
"navigationStyle"
:
"custom"
}
static/nativeComponents/TimeLimitedDiscount/index.js
View file @
595e9674
...
...
@@ -263,8 +263,8 @@ const componentOptions = {
});
},
getScroll
()
{
this
.
getData
();
this
.
getEleInfo
(()
=>
{
this
.
getData
();
});
},
// 获取当前组件位置信息
...
...
@@ -329,7 +329,7 @@ const componentOptions = {
});
},
getData
()
{
if
(
this
.
loaded
)
return
;
//
if (this.loaded) return;
this
.
loaded
=
true
;
let
{
dimension
}
=
this
.
data
.
datas
.
componentData
;
if
(
dimension
==
0
)
{
...
...
@@ -345,8 +345,8 @@ const componentOptions = {
ready
()
{
this
.
loaded
=
false
;
this
.
isContain
=
false
;
this
.
getData
();
this
.
getEleInfo
(()
=>
{
this
.
getData
();
});
},
moved
()
{},
...
...
@@ -359,8 +359,8 @@ const componentOptions = {
show
()
{
this
.
loaded
=
false
;
this
.
isContain
=
false
;
this
.
getData
();
this
.
getEleInfo
(()
=>
{
this
.
getData
();
});
const
{
isPageHidden
}
=
this
.
data
;
// show事件发生前,页面不是处于隐藏状态时
...
...
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