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
c9da01dd
Commit
c9da01dd
authored
Oct 01, 2021
by
Xuguangxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
e353a38d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
7 deletions
+24
-7
index.vue
src/views/goodsDetail/index.vue
+18
-5
smallPic.vue
src/views/goodsDetail/smallPic.vue
+2
-2
createOrder.vue
src/views/order/createOrder.vue
+4
-0
No files found.
src/views/goodsDetail/index.vue
View file @
c9da01dd
...
...
@@ -279,7 +279,7 @@ export default {
localStorage
.
remove
(
'
orderData
'
);
localStorage
.
set
(
'
templateId
'
,
this
.
detailParam
.
templateId
);
// 设置活动模板id,用于下单
if
(
this
.
detailParam
.
groupBuyGroupId
)
{
localStorage
.
set
(
'
groupBuyGroupId
'
,
this
.
detailParam
.
groupBuyGroupId
);
// 设置groupBuyGroupId,用于下单
//
localStorage.set('groupBuyGroupId', this.detailParam.groupBuyGroupId); // 设置groupBuyGroupId,用于下单
this
.
groupId
=
+
this
.
detailParam
.
groupBuyGroupId
;
}
else
{
localStorage
.
remove
(
'
groupBuyGroupId
'
);
...
...
@@ -369,7 +369,7 @@ export default {
sku_no
:
this
.
detailInfo
.
skuNo
,
buttons_name
:
buttonNameMap
[
res
]
});
this
.
toOrder
();
this
.
toOrder
(
res
);
},
setStartStatus
(
data
)
{
const
currentTime
=
new
Date
(
data
.
currentTime
.
replace
(
/
\-
/g
,
'
/
'
)).
getTime
();
...
...
@@ -403,7 +403,7 @@ export default {
// canJoinGroupBuyAgain groupStatus
try
{
if
(
res
.
groupBuyInfo
?.
groupId
)
{
localStorage
.
set
(
'
groupBuyGroupId
'
,
res
.
groupBuyInfo
.
groupId
||
''
);
// 设置groupBuyGroupId,用于下单
//
localStorage.set('groupBuyGroupId', res.groupBuyInfo.groupId || ''); // 设置groupBuyGroupId,用于下单
this
.
groupId
=
+
res
.
groupBuyInfo
.
groupId
||
0
;
}
if
(
res
.
groupBuyInfo
?.
joinGroup
)
{
...
...
@@ -494,7 +494,7 @@ export default {
this
.
show
=
false
;
this
.
$router
.
push
({
name
:
'
addressManage
'
});
},
toOrder
()
{
toOrder
(
type
)
{
if
(
!
this
.
hasLogin
)
{
this
.
checkLogin
();
return
;
...
...
@@ -518,7 +518,20 @@ export default {
};
localStorage
.
set
(
'
orderData
'
,
order
);
localStorage
.
remove
(
'
addressList
'
);
this
.
$router
.
push
({
name
:
'
createOrder
'
});
// const buttonNameMap = {
// 3: '立即参团',
// 1: '立即开团',
// 2: '自己做团长'
// };
const
query
=
{};
if
(
type
==
3
)
{
query
.
groupBuyGroupId
=
this
.
groupId
;
}
this
.
$router
.
push
({
name
:
'
createOrder
'
,
query
});
},
changeAddress
(
address
)
{
// 选取规格需要清空,init会重新赋值
...
...
src/views/goodsDetail/smallPic.vue
View file @
c9da01dd
...
...
@@ -165,7 +165,7 @@ export default {
this
.
detailParam
=
{
...
this
.
$route
.
query
};
localStorage
.
set
(
'
templateId
'
,
this
.
detailParam
.
templateId
);
// 设置活动模板id,用于下单
if
(
this
.
detailParam
.
groupBuyGroupId
)
{
localStorage
.
set
(
'
groupBuyGroupId
'
,
this
.
detailParam
.
groupBuyGroupId
);
// 设置groupBuyGroupId,用于下单
//
localStorage.set('groupBuyGroupId', this.detailParam.groupBuyGroupId); // 设置groupBuyGroupId,用于下单
this
.
groupId
=
+
this
.
detailParam
.
groupBuyGroupId
;
}
else
{
localStorage
.
remove
(
'
groupBuyGroupId
'
);
...
...
@@ -211,7 +211,7 @@ export default {
async
init
(
detailParam
)
{
const
[
res
]
=
await
goods
.
detailInfo
(
detailParam
);
if
(
res
.
groupBuyInfo
.
groupId
)
{
localStorage
.
set
(
'
groupBuyGroupId
'
,
res
.
groupBuyInfo
.
groupId
||
''
);
// 设置groupBuyGroupId,用于下单
//
localStorage.set('groupBuyGroupId', res.groupBuyInfo.groupId || ''); // 设置groupBuyGroupId,用于下单
this
.
groupId
=
+
res
.
groupBuyInfo
.
groupId
||
''
;
}
if
(
res
.
saleCount
&&
res
.
activitySkuTotalCount
)
{
...
...
src/views/order/createOrder.vue
View file @
c9da01dd
...
...
@@ -100,6 +100,10 @@ export default {
created
()
{
if
(
isApp
)
this
.
nativeBridge
=
new
Bridge
();
else
if
(
isWxMp
)
this
.
nativeBridge
=
new
MpBridge
();
const
groupId
=
this
.
$route
.
query
.
groupBuyGroupId
;
if
(
this
.
$route
.
query
.
groupBuyGroupId
)
{
localStorage
.
set
(
'
groupBuyGroupId
'
,
groupId
);
}
},
methods
:
{
init
()
{
...
...
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