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
6b9b32e0
Commit
6b9b32e0
authored
Oct 08, 2021
by
beisir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat
parent
bc7fbac9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
3 deletions
+69
-3
utils.service.js
src/service/utils.service.js
+52
-1
index.vue
src/views/goodsList/index.vue
+8
-1
index.vue
src/views/orderList/index.vue
+9
-1
No files found.
src/service/utils.service.js
View file @
6b9b32e0
import
{
isAndroid
,
isIOS
,
isXyqb
}
from
'
./validation.service
'
;
import
{
isAndroid
,
isIOS
,
isXyqb
,
isWxMp
}
from
'
./validation.service
'
;
import
Bridge
from
'
@qg/js-bridge
'
;
import
Bridge
from
'
@qg/js-bridge
'
;
import
MpBridge
from
'
@/service/mp
'
;
const
jsBridge
=
new
Bridge
();
const
jsBridge
=
new
Bridge
();
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
config
from
'
@/config
'
;
import
config
from
'
@/config
'
;
...
@@ -373,3 +374,53 @@ export function paramsParentheses(pointer) {
...
@@ -373,3 +374,53 @@ export function paramsParentheses(pointer) {
const
paramsString
=
qs
.
stringify
(
params
);
const
paramsString
=
qs
.
stringify
(
params
);
return
`
${
config
.
localHost
}${
path
}
?`
+
paramsString
;
return
`
${
config
.
localHost
}${
path
}
?`
+
paramsString
;
}
}
export
function
firstGroupShare
(
shareInfo
,
type
)
{
if
(
!
isWxMp
)
{
return
;
}
// eslint-disable-next-line no-unused-vars
let
linkPath
=
''
;
let
detailData
=
{
skuNo
:
shareInfo
.
skuNo
,
goodsSpecialId
:
shareInfo
.
goodsSpecialId
,
activityId
:
shareInfo
.
activityId
,
templateId
:
shareInfo
.
templateId
,
templateDetailId
:
shareInfo
.
templateDetailId
,
vccToken
:
encodeURIComponent
(
'
{token}
'
)
};
switch
(
type
)
{
case
0
:
linkPath
=
`
${
config
.
localHost
}
/groupBuy/list?activityId=
${
shareInfo
.
activityId
}
&vccToken=
${
encodeURIComponent
(
'
{token}
'
)}
`
;
break
;
case
1
:
linkPath
=
`
${
config
.
localHost
}
/orderList/0`
;
break
;
case
2
:
case
3
:
if
(
shareInfo
.
groupBuyGroupId
)
{
detailData
.
groupBuyGroupId
=
shareInfo
.
groupBuyGroupId
;
}
linkPath
=
qs
.
stringify
(
detailData
);
linkPath
=
`
${
config
.
localHost
}
/groupBuy/skuInfo?
${
linkPath
}
`
;
break
;
}
shareInfo
.
linkPath
=
`/pages/groupbuy/webview?url=
${
encodeURIComponent
(
JSON
.
stringify
(
linkPath
)
)}
`
;
const
tagName
=
type
?
'
[0元购]
'
:
''
;
let
shareDic
=
{
title
:
`
${
tagName
}${
shareInfo
.
skuName
}
`
,
link
:
shareInfo
.
linkPath
,
// 页面地址
imgUrl
:
shareInfo
.
skuImg
// 图片地
};
console
.
log
(
shareDic
);
new
MpBridge
().
run
({
event
:
'
showShareView
'
,
data
:
{
shareDic
}
});
}
src/views/goodsList/index.vue
View file @
6b9b32e0
...
@@ -74,7 +74,7 @@ import groupSwiper from '@/components/groupSwiper';
...
@@ -74,7 +74,7 @@ import groupSwiper from '@/components/groupSwiper';
import
{
handleRemainTime
,
handleDateFormat
}
from
'
./components/utils
'
;
import
{
handleRemainTime
,
handleDateFormat
}
from
'
./components/utils
'
;
import
localStorage
from
'
@/service/localStorage.service
'
;
import
localStorage
from
'
@/service/localStorage.service
'
;
import
goodsCheckMixin
from
'
@/mixins/goodsCheck.mixin
'
;
import
goodsCheckMixin
from
'
@/mixins/goodsCheck.mixin
'
;
import
{
setAppTitleColor
,
EventBus
}
from
'
@/service/utils.service
'
;
import
{
setAppTitleColor
,
EventBus
,
firstGroupShare
}
from
'
@/service/utils.service
'
;
import
{
saTrackEvent
}
from
'
@/service/sa.service
'
;
import
{
saTrackEvent
}
from
'
@/service/sa.service
'
;
// import { isNull } from '@/service/validation.service';
// import { isNull } from '@/service/validation.service';
// let topicIndex;
// let topicIndex;
...
@@ -167,6 +167,12 @@ export default {
...
@@ -167,6 +167,12 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
// 第一次进来页面分享事件
async
firstShareTemplate
()
{
const
shareInfo
=
await
this
.
getShareData
();
firstGroupShare
(
shareInfo
,
0
);
},
animationEventStart
()
{
animationEventStart
()
{
this
.
showSwipe
=
false
;
this
.
showSwipe
=
false
;
},
},
...
@@ -350,6 +356,7 @@ async function getActivityList(urlQuery, next) {
...
@@ -350,6 +356,7 @@ async function getActivityList(urlQuery, next) {
vm
.
pageNo
=
1
;
vm
.
pageNo
=
1
;
vm
.
getGoodsList
(
true
);
vm
.
getGoodsList
(
true
);
vm
.
reload
=
false
;
vm
.
reload
=
false
;
vm
.
firstShareTemplate
(
t
);
});
});
}
else
{
}
else
{
nextFns
(
vm
=>
{
nextFns
(
vm
=>
{
...
...
src/views/orderList/index.vue
View file @
6b9b32e0
...
@@ -24,7 +24,8 @@
...
@@ -24,7 +24,8 @@
<
script
>
<
script
>
import
groupBuyApi
from
'
@/api/groupBuy
'
;
import
groupBuyApi
from
'
@/api/groupBuy
'
;
import
List
from
'
./components/List
'
;
import
List
from
'
./components/List
'
;
import
{
EventBus
}
from
'
@/service/utils.service
'
;
import
{
EventBus
,
firstGroupShare
}
from
'
@/service/utils.service
'
;
const
commonParams
=
{
const
commonParams
=
{
loading
:
false
,
loading
:
false
,
finished
:
false
,
finished
:
false
,
...
@@ -79,6 +80,13 @@ export default {
...
@@ -79,6 +80,13 @@ export default {
getstatusQuery
()
{
getstatusQuery
()
{
const
{
status
}
=
this
.
$route
.
params
||
{};
const
{
status
}
=
this
.
$route
.
params
||
{};
status
&&
(
this
.
currentTab
=
Number
(
status
));
status
&&
(
this
.
currentTab
=
Number
(
status
));
firstGroupShare
(
{
skuName
:
'
我的拼团
'
,
skuImg
:
'
https://img.lkbang.net/activity/share/default/shareDefault.png
'
},
1
);
},
},
handleTabChange
(
name
)
{
handleTabChange
(
name
)
{
this
.
currentTab
=
name
;
this
.
currentTab
=
name
;
...
...
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