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 @@
...
@@ -37,6 +37,25 @@
>
>
<notice
:datas=
"item"
></notice>
<notice
:datas=
"item"
></notice>
</div>
</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
<pay-success-info
v-if=
"item.componentCode=='pay-success-info' && item.componentInfo.visible==1"
v-if=
"item.componentCode=='pay-success-info' && item.componentInfo.visible==1"
:render=
"true"
:render=
"true"
...
@@ -92,6 +111,10 @@ import text from "@/components/content/text";
...
@@ -92,6 +111,10 @@ import text from "@/components/content/text";
import
richText
from
"../../components/basicTool/rich-text"
;
import
richText
from
"../../components/basicTool/rich-text"
;
import
interval
from
"@/components/basicTool/interval/index.vue"
;
import
interval
from
"@/components/basicTool/interval/index.vue"
;
import
partition
from
"@/components/basicTool/partition/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
app
=
getApp
();
const
{
log
}
=
app
;
const
{
log
}
=
app
;
export
default
{
export
default
{
...
@@ -137,16 +160,22 @@ export default {
...
@@ -137,16 +160,22 @@ export default {
partition
,
partition
,
paySuccessInfo
,
paySuccessInfo
,
PayElectronCard
,
PayElectronCard
,
automatiCard
automatiCard
,
coupon
,
integralTurntable
,
spellGroup
,
},
},
computed
:
{
computed
:
{
// 是否开启企业要货
// 是否开启企业要货
whetherOpenEnterprisesWantGoods
()
{
whetherOpenEnterprisesWantGoods
()
{
return
this
.
mpApp
.
globalData
.
shopInfo
.
whetherOpenEnterprisesWantGoods
||
0
let
{
shopInfo
}
=
this
.
mpApp
.
globalData
;
let
whetherOpenEnterprisesWantGoods
=
shopInfo
?
shopInfo
.
whetherOpenEnterprisesWantGoods
:
0
return
whetherOpenEnterprisesWantGoods
;
},
},
// 是否开启待审核
// 是否开启待审核
whetherOpenApproval
()
{
whetherOpenApproval
()
{
return
this
.
mpApp
.
shop_configuration
.
whetherOpenApproval
||
0
let
whetherOpenApproval
=
this
.
mpApp
.
shop_configuration
?
this
.
mpApp
.
shop_configuration
.
whetherOpenApproval
:
0
;
return
whetherOpenApproval
;
},
},
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
...
@@ -186,7 +215,52 @@ export default {
...
@@ -186,7 +215,52 @@ export default {
onShow
()
{
onShow
()
{
console
.
log
(
"--paySuccess-onShow"
);
console
.
log
(
"--paySuccess-onShow"
);
},
},
// 滚动节流方法
onPageScroll
:
tool
.
throttle
(
function
(
el
)
{
console
.
log
(
el
,
'--onPageScroll'
);
this
.
scrolls
(
el
[
0
])
},
200
),
methods
:
{
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
()
{
orderMsg
()
{
order
.
orderDetail
(
this
.
query
).
then
(
res1
=>
{
order
.
orderDetail
(
this
.
query
).
then
(
res1
=>
{
let
res
=
res1
.
data
;
let
res
=
res1
.
data
;
...
@@ -500,8 +574,7 @@ export default {
...
@@ -500,8 +574,7 @@ export default {
.paySuccess
{
.paySuccess
{
position
:
relative
;
position
:
relative
;
width
:
100vw
;
width
:
100vw
;
height
:
100vh
;
height
:
auto
;
overflow-y
:
auto
;
.tabbar{
.tabbar{
position
:
sticky
;
position
:
sticky
;
top
:
0
;
top
:
0
;
...
...
src/pages/paySuccess/main.json
View file @
595e9674
...
@@ -8,7 +8,9 @@
...
@@ -8,7 +8,9 @@
"van-picker"
:
"/static/vant/picker/index"
,
"van-picker"
:
"/static/vant/picker/index"
,
"van-icon"
:
"/static/vant/icon/index"
,
"van-icon"
:
"/static/vant/icon/index"
,
"photo-gallery"
:
"/static/nativeComponents/PhotoGallery/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"
"navigationStyle"
:
"custom"
}
}
static/nativeComponents/TimeLimitedDiscount/index.js
View file @
595e9674
...
@@ -263,8 +263,8 @@ const componentOptions = {
...
@@ -263,8 +263,8 @@ const componentOptions = {
});
});
},
},
getScroll
()
{
getScroll
()
{
this
.
getData
();
this
.
getEleInfo
(()
=>
{
this
.
getEleInfo
(()
=>
{
this
.
getData
();
});
});
},
},
// 获取当前组件位置信息
// 获取当前组件位置信息
...
@@ -329,7 +329,7 @@ const componentOptions = {
...
@@ -329,7 +329,7 @@ const componentOptions = {
});
});
},
},
getData
()
{
getData
()
{
if
(
this
.
loaded
)
return
;
//
if (this.loaded) return;
this
.
loaded
=
true
;
this
.
loaded
=
true
;
let
{
dimension
}
=
this
.
data
.
datas
.
componentData
;
let
{
dimension
}
=
this
.
data
.
datas
.
componentData
;
if
(
dimension
==
0
)
{
if
(
dimension
==
0
)
{
...
@@ -345,8 +345,8 @@ const componentOptions = {
...
@@ -345,8 +345,8 @@ const componentOptions = {
ready
()
{
ready
()
{
this
.
loaded
=
false
;
this
.
loaded
=
false
;
this
.
isContain
=
false
;
this
.
isContain
=
false
;
this
.
getData
();
this
.
getEleInfo
(()
=>
{
this
.
getEleInfo
(()
=>
{
this
.
getData
();
});
});
},
},
moved
()
{},
moved
()
{},
...
@@ -359,8 +359,8 @@ const componentOptions = {
...
@@ -359,8 +359,8 @@ const componentOptions = {
show
()
{
show
()
{
this
.
loaded
=
false
;
this
.
loaded
=
false
;
this
.
isContain
=
false
;
this
.
isContain
=
false
;
this
.
getData
();
this
.
getEleInfo
(()
=>
{
this
.
getEleInfo
(()
=>
{
this
.
getData
();
});
});
const
{
isPageHidden
}
=
this
.
data
;
const
{
isPageHidden
}
=
this
.
data
;
// show事件发生前,页面不是处于隐藏状态时
// 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