Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
group-buy-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
group-buy-ui
Commits
91ad93f9
Commit
91ad93f9
authored
Sep 24, 2021
by
beisir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:更新
parent
760d2df7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
18 deletions
+39
-18
groupShare.vue
src/components/groupShare.vue
+4
-2
groupBuy.js
src/router/groupBuy.js
+1
-1
index.vue
src/views/goodsList/index.vue
+27
-12
index.vue
src/views/orderList/index.vue
+7
-3
No files found.
src/components/groupShare.vue
View file @
91ad93f9
...
...
@@ -53,8 +53,10 @@ export default {
this
.
shareDialogConfirm
();
}
const
nativeBridge
=
this
.
nativeBridge
;
console
.
log
(
'
派发事件!
'
);
EventBus
.
$emit
(
'
shareClickItem
'
,
{
ev
,
nativeBridge
});
const
name
=
this
.
$route
.
name
;
console
.
log
(
`shareClickItem
${
name
}
`
);
console
.
log
(
name
);
EventBus
.
$emit
(
`shareClickItem
${
name
}
`
,
{
ev
,
nativeBridge
});
registeredEvents
(
'
H5_GroupZeroYuanPurchaseActivityPageSharePopupWindowBtnClick
'
,
{
sku_no
:
''
,
buttons_name
:
''
,
// 按钮名称
...
...
src/router/groupBuy.js
View file @
91ad93f9
...
...
@@ -15,7 +15,7 @@ module.exports = [
path
:
'
/groupBuy/list
'
,
name
:
'
groupBuyList
'
,
component
:
()
=>
import
(
'
../views/goodsList/index.vue
'
),
meta
:
{
title
:
'
0元购大牌
'
,
keepLive
:
true
}
meta
:
{
title
:
'
0元购大牌
'
}
},
{
path
:
'
/orderList/:status
'
,
...
...
src/views/goodsList/index.vue
View file @
91ad93f9
...
...
@@ -135,7 +135,14 @@ export default {
// this.hasLogin = !!localStorage.get('vccToken');
},
mounted
()
{
this
.
showLoops
=
true
;
this
.
$nextTick
(()
=>
{
this
.
$refs
.
swipeRota
&&
this
.
$refs
.
swipeRota
.
onSlidePrevChange
();
});
this
.
showLoading
=
true
;
this
.
onShareEventChange
();
console
.
log
(
'
开启EventBus
'
);
},
beforeRouteEnter
(
to
,
from
,
next
)
{
const
{
activityId
}
=
to
.
query
;
...
...
@@ -149,20 +156,27 @@ export default {
getActivityList
(
to
.
query
,
next
);
}
},
deactivated
()
{
beforeDestroy
()
{
console
.
log
(
'
关闭EventBus
'
);
const
name
=
this
.
$route
.
name
;
EventBus
.
$off
(
`shareClickItem
${
name
}
`
);
clearTimeout
((
this
.
$refs
.
swipeRota
&&
this
.
$refs
.
swipeRota
.
timer
)
||
null
);
this
.
showLoops
=
false
;
EventBus
.
$off
(
'
shareClickItem
'
);
},
activated
()
{
this
.
showLoops
=
true
;
this
.
$nextTick
(()
=>
{
this
.
$refs
.
swipeRota
&&
this
.
$refs
.
swipeRota
.
onSlidePrevChange
();
});
this
.
onShareEventChange
();
// this.setTitleColor(this.goodsTemp.bgcolor);
// store.commit('changeTitle', this.goodsTemp.title || '活动页');
},
// deactivated() {
// clearTimeout((this.$refs.swipeRota && this.$refs.swipeRota.timer) || null);
// this.showLoops = false;
// },
// activated() {
// this.showLoops = true;
// this.$nextTick(() => {
// this.$refs.swipeRota && this.$refs.swipeRota.onSlidePrevChange();
// });
// console.log('开启EventBus');
// // this.setTitleColor(this.goodsTemp.bgcolor);
// // store.commit('changeTitle', this.goodsTemp.title || '活动页');
// },
methods
:
{
animationEventStart
()
{
this
.
showSwipe
=
false
;
...
...
@@ -190,7 +204,8 @@ export default {
},
onShareEventChange
()
{
const
vm
=
this
;
EventBus
.
$on
(
'
shareClickItem
'
,
async
function
({
ev
,
nativeBridge
})
{
const
name
=
this
.
$route
.
name
;
EventBus
.
$on
(
`shareClickItem
${
name
}
`
,
async
function
({
ev
,
nativeBridge
})
{
let
shareDic
=
await
vm
.
getShareData
();
if
(
ev
===
'
pic
'
)
{
// 分享海报跳转小程序海报分享页面
...
...
src/views/orderList/index.vue
View file @
91ad93f9
...
...
@@ -88,7 +88,9 @@ export default {
this
.
onShareEventChange
();
},
beforeDestroy
()
{
EventBus
.
$off
(
'
shareClickItem
'
);
console
.
log
(
'
订单页EventBusClose
'
);
const
name
=
this
.
$route
.
name
;
EventBus
.
$off
(
`shareClickItem
${
name
}
`
);
},
created
()
{
this
.
nativeBridge
=
new
MpBridge
();
...
...
@@ -118,7 +120,10 @@ export default {
},
onShareEventChange
()
{
const
vm
=
this
;
EventBus
.
$on
(
'
shareClickItem
'
,
async
function
({
ev
,
nativeBridge
})
{
const
name
=
this
.
$route
.
name
;
console
.
log
(
`shareClickItem
${
name
}
`
);
EventBus
.
$on
(
`shareClickItem
${
name
}
`
,
async
function
({
ev
,
nativeBridge
})
{
console
.
log
(
'
订单页EventBusOpen
'
);
const
shareDic
=
await
vm
.
getShareData
(
vm
.
sharePicData
);
console
.
log
(
shareDic
);
if
(
ev
===
'
pic
'
)
{
...
...
@@ -126,7 +131,6 @@ export default {
// 分享海报跳转小程序海报分享页面
}
if
(
ev
===
'
weixin
'
)
{
// const res = await groupBuyApi.getGroupShareInfo(this.shareInfo.order);
// 分享朋友派发微信postMessage事件
nativeBridge
.
run
({
event
:
'
showShareView
'
,
...
...
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