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
cedd6f6f
Commit
cedd6f6f
authored
Mar 17, 2020
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
直播商品跳转
parent
5184386f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
6 deletions
+70
-6
src/components/livedModel/livedGoodsDia.vue
+18
-2
src/components/livedModel/livedSelectionSpe.vue
+43
-3
src/pages/index/index.vue
+8
-0
src/pages/lived/index.vue
+1
-1
No files found.
src/components/livedModel/livedGoodsDia.vue
View file @
cedd6f6f
...
...
@@ -9,7 +9,7 @@
>
<div
class=
"list"
>
<div
class=
"item"
v-for=
"(item,index) in goodsList"
:key=
"index"
>
<div
class=
"img"
>
<div
class=
"img"
@
click=
"toGoodsInfo(item)"
>
<img
:src=
"item.productImgUrl"
alt
/>
</div>
<div
class=
"info"
>
...
...
@@ -52,6 +52,7 @@ export default {
name
:
""
,
data
()
{
return
{
liveId
:
0
,
goodsList
:
[
{
productId
:
"266"
,
...
...
@@ -73,7 +74,9 @@ export default {
},
computed
:
{},
created
()
{},
inLoad
(){
onLoad
(
options
){
let
params
=
JSON
.
parse
(
options
.
params
);
this
.
liveId
=
params
.
liveId
;
this
.
goodsList
.
forEach
((
item
,
index
)
=>
{
item
.
img
=
DFSImg
(
item
.
productImgUrl
);
})
...
...
@@ -108,6 +111,19 @@ export default {
},
closeSpeDia
()
{
this
.
showSpe
=
false
;
},
// 到商品详情
toGoodsInfo
(
val
){
let
query
=
{
fromLived
:
1
,
liveId
:
this
.
liveId
,
}
this
.
backPath
=
`/goods/
${
val
.
productId
}
`
;
wx
.
reLaunch
({
url
:
`../index/main?from=livedToGoodsInfo&backpath=
${
this
.
backPath
}
¶ms=
${
JSON
.
stringify
(
query
)}
`
})
}
}
};
...
...
src/components/livedModel/livedSelectionSpe.vue
View file @
cedd6f6f
...
...
@@ -165,8 +165,9 @@ export default {
components
:
{},
computed
:
{},
created
()
{},
onLoad
()
{
console
.
log
(
this
.
productInfoId
,
'-------------167'
)
onLoad
(
options
)
{
let
params
=
JSON
.
parse
(
options
.
params
);
this
.
liveId
=
params
.
liveId
;
this
.
init
();
},
mounted
()
{},
...
...
@@ -335,6 +336,45 @@ export default {
});
}
},
// 立即购买
onBuyClicked
(){
if
(
this
.
goodsGuige
.
length
<
this
.
goodsGuiges
.
length
||
this
.
checkGoodsGuigeValue
()
)
{
wx
.
showToast
({
title
:
'请选择规格'
,
icon
:
'none'
,
})
}
else
if
(
this
.
product_goods_info
.
oversoldFlag
==
0
&&
this
.
product_goods_info
.
sellMaxQty
<=
0
)
{
wx
.
showToast
({
title
:
'商品暂无库存'
,
icon
:
'none'
,
})
}
else
{
let
query
=
{};
query
.
productGoodsMixId
=
this
.
product_goods_info
.
productGoodsMixId
;
query
.
productGoodsId
=
this
.
product_goods_info
.
productGoodsId
;
query
.
goodsId
=
this
.
product_goods_info
.
goodsId
;
query
.
qty
=
this
.
buyQty
;
query
.
goodsString
=
JSON
.
stringify
(
this
.
goodsString
);
query
.
maxQty
=
this
.
product_goods_info
.
maxQty
;
query
.
productMinCount
=
this
.
product_goods_info
.
productMinCount
;
query
.
fromLived
=
1
;
query
.
liveId
=
this
.
liveId
;
// 将规格转化为json字符串
this
.
backPath
=
`/order/orderConfirm`
;
wx
.
reLaunch
({
url
:
`../index/main?from=livedToOrderConfirm&backpath=
${
this
.
backPath
}
¶ms=
${
JSON
.
stringify
(
query
)}
`
})
}
},
// 取价格
getMixId
(
val
)
{
if
(
!
this
.
isDefault
){
...
...
@@ -724,7 +764,7 @@ export default {
height
:
50px
;
text-align
:
center
;
line-height
:
50px
;
font-size
:
20
px
;
font-size
:
14
px
;
}
.toPay
{
background
:
#ff4240
;
...
...
src/pages/index/index.vue
View file @
cedd6f6f
...
...
@@ -91,6 +91,14 @@ export default {
}
else
if
(
options
.
from
&&
options
.
from
==
"livedToIndex"
)
{
//来自直播详情
this
.
page
=
decodeURIComponent
(
options
.
backpath
);
}
else
if
(
options
.
from
&&
options
.
from
==
"livedToGoodsInfo"
)
{
//从直播详情商品列表到商城商品详情
this
.
page
=
decodeURIComponent
(
options
.
backpath
);
this
.
params
+=
"&"
+
serialize
(
options
.
params
);
}
else
if
(
options
.
from
&&
options
.
from
==
"livedToOrderConfirm"
)
{
//从直播详情商品列表到商城确认订单
this
.
page
=
decodeURIComponent
(
options
.
backpath
);
this
.
params
+=
"&"
+
serialize
(
options
.
params
);
}
else
if
(
options
.
from
&&
options
.
from
==
"login"
)
{
//来自小程序登录页面
this
.
page
=
decodeURIComponent
(
options
.
backpath
);
...
...
src/pages/lived/index.vue
View file @
cedd6f6f
...
...
@@ -21,7 +21,7 @@
<span>
999
</span>
<span>
观看
</span>
</p>
</div>
<
!--
<div
class=
"toShop"
@
click=
"toShop"
>
进店
</div>
--
>
<
div
class=
"toShop"
@
click=
"toShop"
>
进店
</div
>
</div>
</div>
<!-- 未开始展示 -->
...
...
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