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
ec94a064
Commit
ec94a064
authored
Sep 25, 2021
by
Xuguangxing
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat/group-buy' of git.quantgroup.cn:ui/group-buy-ui into feat/group-buy
parents
0ac257e2
2ce78d9f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
34 deletions
+24
-34
groupShare.vue
src/components/groupShare.vue
+15
-11
utils.service.js
src/service/utils.service.js
+5
-17
module.js
src/store/module.js
+4
-6
No files found.
src/components/groupShare.vue
View file @
ec94a064
...
@@ -41,7 +41,7 @@ export default {
...
@@ -41,7 +41,7 @@ export default {
sharePicData
:
{},
sharePicData
:
{},
shareInfo
:
{},
shareInfo
:
{},
type
:
0
,
typeStatus
:
{
typeStatus
:
{
0
:
'
入口活动页面
'
,
0
:
'
入口活动页面
'
,
1
:
'
拼团列表页面
'
,
1
:
'
拼团列表页面
'
,
...
@@ -67,10 +67,9 @@ export default {
...
@@ -67,10 +67,9 @@ export default {
if
(
typeof
shareInfo
===
'
object
'
)
{
if
(
typeof
shareInfo
===
'
object
'
)
{
this
.
sharePicData
=
shareInfo
;
this
.
sharePicData
=
shareInfo
;
this
.
handleShareInfo
(
shareInfo
);
this
.
handleShareInfo
(
shareInfo
);
// 如果shareInfo为data数据则直接创建海报
return
;
return
;
}
}
//
调用分享数据接口
//
如果shareInfo为data数据则直接创建海报
this
.
getGroupShareInfo
(
shareInfo
);
this
.
getGroupShareInfo
(
shareInfo
);
});
});
},
},
...
@@ -128,19 +127,24 @@ export default {
...
@@ -128,19 +127,24 @@ export default {
const
type
=
this
.
type
;
const
type
=
this
.
type
;
let
shareInfo
=
this
.
sharePicData
;
let
shareInfo
=
this
.
sharePicData
;
let
linkPath
=
''
;
let
linkPath
=
''
;
switch
(
type
)
{
let
detailData
=
{
case
0
:
linkPath
=
`
${
config
.
localHost
}
/groupBuy/list?h=0&activityId=
${
shareInfo
.
activityId
}
`
;
break
;
case
1
:
linkPath
=
qs
.
stringify
({
skuNo
:
shareInfo
.
skuNo
,
skuNo
:
shareInfo
.
skuNo
,
groupBuyGroupId
:
shareInfo
.
groupBuyGroupId
,
goodsSpecialId
:
shareInfo
.
goodsSpecialId
,
goodsSpecialId
:
shareInfo
.
goodsSpecialId
,
activityId
:
shareInfo
.
activityId
,
activityId
:
shareInfo
.
activityId
,
templateId
:
shareInfo
.
templateId
,
templateId
:
shareInfo
.
templateId
,
templateDetailId
:
shareInfo
.
templateDetailId
templateDetailId
:
shareInfo
.
templateDetailId
});
};
switch
(
type
)
{
case
0
:
linkPath
=
`
${
config
.
localHost
}
/groupBuy/list?h=0&activityId=
${
shareInfo
.
activityId
}
`
;
break
;
case
1
:
case
2
:
case
3
:
if
(
shareInfo
.
groupBuyGroupId
)
{
detailData
.
groupBuyGroupId
=
shareInfo
.
groupBuyGroupId
;
}
linkPath
=
qs
.
stringify
(
detailData
);
linkPath
=
`
${
config
.
localHost
}
/groupBuy/skuInfo?h=0&
${
linkPath
}
`
;
linkPath
=
`
${
config
.
localHost
}
/groupBuy/skuInfo?h=0&
${
linkPath
}
`
;
break
;
break
;
}
}
...
...
src/service/utils.service.js
View file @
ec94a064
...
@@ -2,7 +2,7 @@ import { isAndroid, isIOS, isXyqb } from './validation.service';
...
@@ -2,7 +2,7 @@ import { isAndroid, isIOS, isXyqb } from './validation.service';
import
Bridge
from
'
@qg/js-bridge
'
;
import
Bridge
from
'
@qg/js-bridge
'
;
const
jsBridge
=
new
Bridge
();
const
jsBridge
=
new
Bridge
();
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
// import qs from 'qs';
export
const
EventBus
=
new
Vue
();
export
const
EventBus
=
new
Vue
();
/**
/**
* 替换邮箱字符
* 替换邮箱字符
...
@@ -365,19 +365,7 @@ export function setAppTitleColor(bgcolor = '#fff') {
...
@@ -365,19 +365,7 @@ export function setAppTitleColor(bgcolor = '#fff') {
});
});
}
}
export
function
appShareEventChange
({
title
,
desc
,
link
,
imgUrl
,
posterUrl
})
{
// export function paramsParentheses(urlPath) {
const
data
=
{
// console.log(qs);
event
:
'
showShareView
'
,
// // urlPath
data
:
{
// }
platform
:
[
'
weChat
'
,
'
timeLine
'
,
'
QQ
'
,
'
CopyLink
'
,
'
GeneratePoster
'
],
//依次分别是微信、朋友圈、QQ好友、QQ空间、复制链接
shareDic
:
{
title
,
desc
,
link
,
// 页面地址
imgUrl
,
// 图片地址
posterUrl
}
}
};
jsBridge
.
showShareView
(
data
);
}
src/store/module.js
View file @
ec94a064
import
*
as
types
from
'
./type
'
;
import
*
as
types
from
'
./type
'
;
import
groupBuy
from
'
@/api/groupBuy
'
;
import
groupBuy
from
'
@/api/groupBuy
'
;
import
{
isWxMp
,
isApp
}
from
'
@/service/validation.service
'
;
import
{
isWxMp
}
from
'
@/service/validation.service
'
;
import
{
appShareEventChange
}
from
'
@/service/utils.service
'
;
// import { paramsParentheses
} from '@/service/utils.service';
const
state
=
{
const
state
=
{
header
:
true
,
header
:
true
,
title
:
'
支付中心
'
,
title
:
'
支付中心
'
,
...
@@ -105,7 +105,8 @@ const mutations = {
...
@@ -105,7 +105,8 @@ const mutations = {
// 'https://group-buy-test1.liangkebang.net/groupBuy/list?h=0&activityId=39'//
// 'https://group-buy-test1.liangkebang.net/groupBuy/list?h=0&activityId=39'//
const
[
res
]
=
await
groupBuy
.
getScheme
({
const
[
res
]
=
await
groupBuy
.
getScheme
({
miniUrl
:
'
pages/product/goodDetail
'
,
miniUrl
:
'
pages/product/goodDetail
'
,
params
:
window
.
location
.
href
// params: `url=${window.location.href}`
params
:
`url=
${
'
https://group-buy-test1.liangkebang.net/groupBuy/list&h=0&activityId=39
'
}
`
});
});
const
url
=
res
;
const
url
=
res
;
window
.
location
.
href
=
url
;
// todo 需要验证
window
.
location
.
href
=
url
;
// todo 需要验证
...
@@ -122,9 +123,6 @@ const mutations = {
...
@@ -122,9 +123,6 @@ const mutations = {
state
.
shareInfo
=
options
;
state
.
shareInfo
=
options
;
state
.
showShare
=
true
;
state
.
showShare
=
true
;
}
}
if
(
isApp
)
{
appShareEventChange
(
options
);
}
},
},
[
types
.
GOODS_SHARE_CLOSE
](
state
)
{
[
types
.
GOODS_SHARE_CLOSE
](
state
)
{
state
.
showShare
=
false
;
state
.
showShare
=
false
;
...
...
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