Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
梁建民
/
h5
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
cc3d423e
authored
May 27, 2019
by
施宇
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
zyh5
parent
d2018dc7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
18 deletions
src/store/modules/xianhuo/xianhuo.js
src/views/common/GoodsOne.vue
src/store/modules/xianhuo/xianhuo.js
View file @
cc3d423e
...
@@ -5,6 +5,7 @@ import {
...
@@ -5,6 +5,7 @@ import {
}
from
'../../../api/index'
}
from
'../../../api/index'
var
qs
=
require
(
'qs'
);
var
qs
=
require
(
'qs'
);
import
Util
from
'../../../util/index'
const
state
=
{
const
state
=
{
zyFilter
:
false
,
zyFilter
:
false
,
...
@@ -45,7 +46,10 @@ const actions = {
...
@@ -45,7 +46,10 @@ const actions = {
if
(
p
==
1
){
if
(
p
==
1
){
state
.
zyData
=
[];
state
.
zyData
=
[];
}
}
Services
.
getZyData
(
qs
.
stringify
(
payload
.
data
)).
then
((
res
)
=>
{
let
params
=
Util
.
getParams
({
...
payload
.
data
})
Services
.
getZyData
(
params
).
then
((
res
)
=>
{
state
.
loading
=
false
;
state
.
loading
=
false
;
let
data
=
res
.
data
;
let
data
=
res
.
data
;
if
(
data
.
error_code
==
0
)
{
if
(
data
.
error_code
==
0
)
{
...
...
src/views/common/GoodsOne.vue
View file @
cc3d423e
...
@@ -46,16 +46,18 @@
...
@@ -46,16 +46,18 @@
</a>
</a>
</dl>
</dl>
<div
class=
"mui-row block-but"
>
<div
class=
"mui-row block-but"
>
<div
class=
"morePrice"
:id=
"'morePrice'+itemchild.goods_id"
>
<div
class=
"morePrice"
>
<
template
v-if=
"isZy"
>
<
template
v-if=
"isZy"
>
<div
<div
class=
"mui-row list_data"
:id=
"'priceContent'+itemchild.goods_id"
v-for=
"(itemPrice,index) in itemchild.ladder_price"
:class=
"
{'zyClass':itemchild.ladder_price
&&
itemchild.ladder_price.length
<4
,'
zyMoreData
'
:itemchild
.
ladder_price
&&
itemchild
.
ladder_price
.
length
>
3}"
:class=
"
{'dataNo':(index>(limitLength-1))
&&
!itemchild.check}"
>
>
<p
class=
"mui-col-sm-6 mui-col-xs-6"
v-html=
"itemPrice.purchases+'+'"
></p>
<div
class=
"mui-row list_data"
v-for=
"(itemPrice,index) in itemchild.ladder_price"
>
<p
class=
"mui-col-sm-6 mui-col-xs-6"
>
¥
{{
itemPrice
.
price_cn
}}
</p>
<p
class=
"mui-col-sm-6 mui-col-xs-6"
v-html=
"itemPrice.purchases+'+'"
></p>
<p
class=
"mui-col-sm-6 mui-col-xs-6"
>
¥
{{
itemPrice
.
price_cn
}}
</p>
</div>
</div>
</div>
<div
<div
class=
"mui-row list_data f-fff"
class=
"mui-row list_data f-fff"
v-if=
"itemchild.ladder_price&&itemchild.ladder_price.length==0"
v-if=
"itemchild.ladder_price&&itemchild.ladder_price.length==0"
...
@@ -66,13 +68,14 @@
...
@@ -66,13 +68,14 @@
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<div
<div
class=
"mui-row list_data"
:id=
"'priceContent'+itemchild.goods_id"
v-for=
"(itemPrice,index) in itemchild.ladder_price"
:class=
"
{'lyClass':itemchild.ladder_price
&&
itemchild.ladder_price.length
<4
,'
lyMoreData
'
:itemchild
.
ladder_price
&&
itemchild
.
ladder_price
.
length
>
3}"
:class=
"
{'dataNo':(index>(limitLength-1))
&&
!itemchild.check}"
>
>
<p
class=
"mui-col-sm-4 mui-col-xs-4"
v-html=
"itemPrice.purchases+'+'"
></p>
<div
class=
"mui-row list_data"
v-for=
"(itemPrice,index) in itemchild.ladder_price"
>
<p
class=
"mui-col-sm-4 mui-col-xs-4"
>
¥
{{
itemPrice
.
price_cn
}}
</p>
<p
class=
"mui-col-sm-4 mui-col-xs-4"
v-html=
"itemPrice.purchases+'+'"
></p>
<p
class=
"mui-col-sm-4 mui-col-xs-4"
>
$
{{
itemPrice
.
price_us
}}
</p>
<p
class=
"mui-col-sm-4 mui-col-xs-4"
>
¥
{{
itemPrice
.
price_cn
}}
</p>
<p
class=
"mui-col-sm-4 mui-col-xs-4"
>
$
{{
itemPrice
.
price_us
}}
</p>
</div>
</div>
</div>
<div
<div
class=
"mui-row list_data f-fff"
class=
"mui-row list_data f-fff"
...
@@ -137,24 +140,27 @@ export default {
...
@@ -137,24 +140,27 @@ export default {
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
priceRow
:
function
(
index
,
id
)
{
priceRow
:
function
(
index
,
id
)
{
let
dom
=
document
.
getElementById
(
"
morePrice
"
+
id
);
let
dom
=
document
.
getElementById
(
"
priceContent
"
+
id
);
let
arrLength
=
this
.
dataList
[
index
].
ladder_price
.
length
;
let
arrLength
=
this
.
dataList
[
index
].
ladder_price
.
length
;
if
(
this
.
dataList
[
index
][
"check"
])
{
if
(
this
.
dataList
[
index
][
"check"
])
{
dom
.
style
.
height
=
"57px"
;
this
.
$set
(
this
.
dataList
[
index
],
"check"
,
false
);
this
.
$set
(
this
.
dataList
[
index
],
"check"
,
false
);
this
.
$set
(
this
.
$set
(
this
.
dataList
[
index
],
this
.
dataList
[
index
],
"checkBtn"
,
"checkBtn"
,
'更多梯度价格
<
i
class
=
"icon-bot"
><
/i>
'
'更多梯度价格
<
i
class
=
"icon-bot"
><
/i>
'
);
);
dom
.
style
.
height
=
"81px"
;
}
else
{
}
else
{
dom
.
style
.
height
=
19
*
arrLength
+
"px"
;
dom
.
style
.
transition
=
`height
${(
arrLength
-
3
)
*
0.125
}
s linear`
;
dom
.
style
.
webkitTransition
=
`height
${(
arrLength
-
3
)
*
0.125
}
s linear`
;
this
.
$set
(
this
.
dataList
[
index
],
"check"
,
true
);
this
.
$set
(
this
.
dataList
[
index
],
"check"
,
true
);
this
.
$set
(
this
.
$set
(
this
.
dataList
[
index
],
this
.
dataList
[
index
],
"checkBtn"
,
"checkBtn"
,
'收起梯度价格
<
i
class
=
"icon-top"
><
/i>
'
'收起梯度价格
<
i
class
=
"icon-top"
><
/i>
'
);
);
dom
.
style
.
height
=
"200px"
;
}
}
},
},
placeOrder
(
id
)
{
placeOrder
(
id
)
{
...
@@ -267,8 +273,16 @@ export default {
...
@@ -267,8 +273,16 @@ export default {
color
:
#666
;
color
:
#666
;
font-size
:
12px
;
font-size
:
12px
;
width
:
100%
;
width
:
100%
;
height
:
81px
;
.zyClass,
transition
:
all
2s
ease-in
;
.lyClass
{
height
:
auto
!important
;
}
.zyMoreData
,
.lyMoreData
{
height
:
57px
;
border
:
1px
solid
transparent
;
overflow
:
hidden
;
}
.list_data
{
.list_data
{
height
:
19px
;
height
:
19px
;
&.dataNo
{
&.dataNo
{
...
...
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