Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
viitto
mallapp
Commits
28291870
Commit
28291870
authored
Aug 12, 2020
by
黄媛媛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改分类的售完和下架的处理
parent
2dfc5d8e
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
263 additions
and
33 deletions
+263
-33
style11.vue
components/cats/style11.vue
+42
-2
style3.vue
components/cats/style3.vue
+41
-7
style4.vue
components/cats/style4.vue
+41
-7
style7.vue
components/cats/style7.vue
+41
-7
style8.vue
components/cats/style8.vue
+41
-3
goodsku.vue
components/goods/goodsku.vue
+19
-1
list.vue
components/goods/list.vue
+5
-1
cart.vue
pages/cart/cart.vue
+5
-2
goodsaction.vue
pages/goods/components/goodsaction.vue
+15
-2
goods.vue
pages/goods/goods.vue
+5
-1
list.vue
pages/goods/list.vue
+4
-0
search.vue
pages/search/search.vue
+4
-0
No files found.
components/cats/style11.vue
View file @
28291870
...
...
@@ -25,9 +25,35 @@
<view
:style=
"
{ height: scrollHeight }">
<scroll-view
:scroll-y=
"true"
@
scrolltolower=
"lower"
:enable-back-to-top=
"true"
:enable-flex=
"true"
:style=
"
{ height: '100%', padding: '0 0 0 10px' }">
<view
class=
"good"
v-for=
"(cx, ci) in g"
:key=
"ci"
@
click=
"clickHandler(cx)"
>
<view
class=
"good-img"
><image
mode=
"aspectFit"
:src=
"cx.cover_pic"
style=
"width: 100%; height: 100%;"
/></view>
<view
class=
"good-img"
style=
"position: relative;"
>
<image
mode=
"aspectFit"
:src=
"cx.cover_pic"
style=
"width: 100%; height: 100%;"
>
<image
src=
"../../static/images/icon/plugins-out.png"
v-if=
"cx.totalStock==0"
style=
"width: 100%; height: 100%;position: absolute;left:0;top:0;background: #000;opacity: 0.6;"
/>
</image>
</view>
<view
class=
"good-info"
>
<view
class=
"good-name"
>
{{
cx
.
name
}}
</view>
<view
class=
"good-name"
>
<view
v-if=
"cx.marketingLogo.iswords && cx.marketingLogo.iswords==1&& cx.marketingLogo.words!=''"
class=
"Logo"
:style=
"
{color: cx.marketingLogo.wordsColor,
background:cx.marketingLogo.wordsBack ,}"
>
{{
cx
.
marketingLogo
.
words
}}
</view>
<image
v-if=
"cx.marketingLogo.iswords&&cx.marketingLogo.iswords==2&& cx.marketingLogo.ico!=''"
mode=
"heightFix"
:src=
"cx.marketingLogo.ico"
style=
" height: 11px;"
/>
<view
style=
"color: #FF4048;background: #fdf6ec;padding: 0 5px;display: inline-block;height: 32rpx;font-size: 20rpx;margin-right: 5rpx;"
v-if=
"cx.freeShippingFullMoneyPinkage>0 || cx.freeShippingFullNumPinkage>0"
>
{{
cx
.
freeShippingFullMoneyPinkage
>
0
&&
cx
.
freeShippingFullNumPinkage
==
0
?
cx
.
freeShippingFullMoneyPinkage
+
'元包邮'
:
''
}}
{{
cx
.
freeShippingFullMoneyPinkage
==
0
&&
cx
.
freeShippingFullNumPinkage
>
0
?
cx
.
freeShippingFullNumPinkage
+
'件包邮'
:
''
}}
</view>
{{
cx
.
name
}}
</view>
<view
class=
"goodprice"
>
<view
class=
"left"
>
<view
v-if=
"cx.is_level==1"
>
...
...
@@ -155,6 +181,13 @@ export default {
this
.
loading
=
false
;
console
.
log
(
'resggg'
,
res
);
if
(
res
.
resultCode
==
1
)
{
res
.
data
.
pageData
.
forEach
(
x
=>
{
x
.
marketingLogo
=
JSON
.
parse
(
x
.
marketingLogo
)
x
.
totalStock
=
0
;
x
.
attr
.
forEach
(
j
=>
{
x
.
totalStock
+=
j
.
stock
})
})
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
pageCount
;
if
(
this
.
page_count
==
1
||
this
.
page_count
==
0
)
{
...
...
@@ -305,4 +338,11 @@ export default {
border
:
1px
solid
transparent
;
font-size
:
12px
;
}
.catstyle11
.Logo
{
padding
:
1px
5px
;
display
:
inline-block
;
font-size
:
22
rpx
;
margin-right
:
5
rpx
;
border-radius
:
4px
;
}
</
style
>
components/cats/style3.vue
View file @
28291870
...
...
@@ -31,14 +31,34 @@
<u-row
gutter=
"20"
>
<u-col
span=
"6"
v-for=
"(cx, ci) in g"
:key=
"ci"
>
<view
class=
"good"
@
click=
"clickHandler(cx)"
>
<view
class=
"good-img"
>
<image
mode=
"aspectFit"
:src=
"cx.cover_pic"
style=
"width: 100%; height: 100%;"
/>
<view
class=
"good-img"
style=
"position: relative;"
>
<image
mode=
"aspectFit"
:src=
"cx.cover_pic"
style=
"width: 100%; height: 100%"
>
<image
src=
"../../static/images/icon/plugins-out.png"
v-if=
"cx.totalStock==0"
style=
"width: 100%; height: 100%;position: absolute;left:0;top:0;background: #000;opacity: 0.6;"
/>
</image>
</view>
<view
class=
"good-name"
>
{{
cx
.
name
}}
</view>
<view
class=
"good-name"
>
<view
v-if=
"cx.marketingLogo.iswords && cx.marketingLogo.iswords==1&& cx.marketingLogo.words!=''"
class=
"Logo"
:style=
"
{color: cx.marketingLogo.wordsColor,
background:cx.marketingLogo.wordsBack ,}"
>
{{
cx
.
marketingLogo
.
words
}}
</view>
<image
v-if=
"cx.marketingLogo.iswords&&cx.marketingLogo.iswords==2&& cx.marketingLogo.ico!=''"
mode=
"heightFix"
:src=
"cx.marketingLogo.ico"
style=
" height: 11px;"
/>
<view
style=
"color: #FF4048;background: #fdf6ec;padding: 0 5px;display: inline-block;height: 32rpx;font-size: 20rpx;margin-right: 5rpx;"
v-if=
"cx.freeShippingFullMoneyPinkage>0 || cx.freeShippingFullNumPinkage>0"
>
{{
cx
.
freeShippingFullMoneyPinkage
>
0
&&
cx
.
freeShippingFullNumPinkage
==
0
?
cx
.
freeShippingFullMoneyPinkage
+
'元包邮'
:
''
}}
{{
cx
.
freeShippingFullMoneyPinkage
==
0
&&
cx
.
freeShippingFullNumPinkage
>
0
?
cx
.
freeShippingFullNumPinkage
+
'件包邮'
:
''
}}
</view>
{{
cx
.
name
}}
</view>
<view
class=
"good-info"
>
<view
class=
"price"
:style=
"
{ color: mainColor }">
{{
cx
.
price_content
...
...
@@ -108,6 +128,13 @@ export default {
this
.
loading
=
false
;
console
.
log
(
"resggg"
,
res
);
if
(
res
.
resultCode
==
1
){
res
.
data
.
pageData
.
forEach
(
x
=>
{
x
.
marketingLogo
=
JSON
.
parse
(
x
.
marketingLogo
)
x
.
totalStock
=
0
;
x
.
attr
.
forEach
(
j
=>
{
x
.
totalStock
+=
j
.
stock
})
})
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
pageCount
;
if
(
this
.
page_count
==
1
||
this
.
page_count
==
0
)
{
...
...
@@ -195,4 +222,11 @@ export default {
flex
:
1
;
text-align
:
right
;
}
.catstyle3
.Logo
{
padding
:
1px
5px
;
display
:
inline-block
;
font-size
:
22
rpx
;
margin-right
:
5
rpx
;
border-radius
:
4px
;
}
</
style
>
components/cats/style4.vue
View file @
28291870
...
...
@@ -35,15 +35,35 @@
:key=
"ci"
@
click=
"clickHandler(cx)"
>
<div
class=
"good-img"
>
<image
mode=
"aspectFit"
:src=
"cx.cover_pic"
style=
"width: 100%; height: 100%;"
/>
<div
class=
"good-img"
style=
"position: relative;"
>
<image
mode=
"aspectFit"
:src=
"cx.cover_pic"
style=
"width: 100%; height: 100%;"
>
<image
src=
"../../static/images/icon/plugins-out.png"
v-if=
"cx.totalStock==0"
style=
"width: 100%; height: 100%;position: absolute;left:0;top:0;background: #000;opacity: 0.6;"
/>
</image>
</div>
<div
class=
"good-info"
>
<div
class=
"good-name"
>
{{
cx
.
name
}}
</div>
<div
class=
"good-name"
>
<view
v-if=
"cx.marketingLogo.iswords && cx.marketingLogo.iswords==1&& cx.marketingLogo.words!=''"
class=
"Logo"
:style=
"
{color: cx.marketingLogo.wordsColor,
background:cx.marketingLogo.wordsBack ,}"
>
{{
cx
.
marketingLogo
.
words
}}
</view>
<image
v-if=
"cx.marketingLogo.iswords&&cx.marketingLogo.iswords==2&& cx.marketingLogo.ico!=''"
mode=
"heightFix"
:src=
"cx.marketingLogo.ico"
style=
" height: 11px;"
/>
<view
style=
"color: #FF4048;background: #fdf6ec;padding: 0 5px;display: inline-block;height: 32rpx;font-size: 20rpx;margin-right: 5rpx;"
v-if=
"cx.freeShippingFullMoneyPinkage>0 || cx.freeShippingFullNumPinkage>0"
>
{{
cx
.
freeShippingFullMoneyPinkage
>
0
&&
cx
.
freeShippingFullNumPinkage
==
0
?
cx
.
freeShippingFullMoneyPinkage
+
'元包邮'
:
''
}}
{{
cx
.
freeShippingFullMoneyPinkage
==
0
&&
cx
.
freeShippingFullNumPinkage
>
0
?
cx
.
freeShippingFullNumPinkage
+
'件包邮'
:
''
}}
</view>
{{
cx
.
name
}}
</div>
<div
class=
"goodprice"
>
<div
class=
"left"
>
<div
v-if=
"cx.is_level==1"
>
...
...
@@ -153,6 +173,13 @@ export default {
this
.
loading
=
false
;
console
.
log
(
"resggg"
,
res
);
if
(
res
.
resultCode
==
1
){
res
.
data
.
pageData
.
forEach
(
x
=>
{
x
.
marketingLogo
=
JSON
.
parse
(
x
.
marketingLogo
)
x
.
totalStock
=
0
;
x
.
attr
.
forEach
(
j
=>
{
x
.
totalStock
+=
j
.
stock
})
})
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
pageCount
;
if
(
this
.
page_count
==
1
||
this
.
page_count
==
0
)
{
...
...
@@ -293,4 +320,11 @@ export default {
width
:
100%
;
height
:
calc
(
100vw
-
105px
/
3.37
);
}
.catstyle4
.Logo
{
padding
:
1px
5px
;
display
:
inline-block
;
font-size
:
22
rpx
;
margin-right
:
5
rpx
;
border-radius
:
4px
;
}
</
style
>
components/cats/style7.vue
View file @
28291870
...
...
@@ -43,14 +43,34 @@
<u-row
gutter=
"10"
>
<u-col
span=
"6"
v-for=
"(cx, ci) in g"
:key=
"ci"
>
<div
class=
"good"
@
click=
"clickHandler(cx)"
>
<div
class=
"good-img"
>
<image
mode=
"aspectFit"
:src=
"cx.cover_pic"
style=
"width: 100%; height: 100%;"
/>
<div
class=
"good-img"
style=
"position: relative;"
>
<image
mode=
"aspectFit"
:src=
"cx.cover_pic"
style=
"width: 100%; height: 100%;"
>
<image
src=
"../../static/images/icon/plugins-out.png"
v-if=
"cx.totalStock==0"
style=
"width: 100%; height: 100%;position: absolute;left:0;top:0;background: #000;opacity: 0.6;"
/>
</image>
</div>
<div
class=
"good-name"
>
{{
cx
.
name
}}
</div>
<div
class=
"good-name"
>
<view
v-if=
"cx.marketingLogo.iswords && cx.marketingLogo.iswords==1&& cx.marketingLogo.words!=''"
class=
"Logo"
:style=
"
{color: cx.marketingLogo.wordsColor,
background:cx.marketingLogo.wordsBack ,}"
>
{{
cx
.
marketingLogo
.
words
}}
</view>
<image
v-if=
"cx.marketingLogo.iswords&&cx.marketingLogo.iswords==2&& cx.marketingLogo.ico!=''"
mode=
"heightFix"
:src=
"cx.marketingLogo.ico"
style=
" height: 11px;"
/>
<view
style=
"color: #FF4048;background: #fdf6ec;padding: 0 5px;display: inline-block;height: 32rpx;font-size: 20rpx;margin-right: 5rpx;"
v-if=
"cx.freeShippingFullMoneyPinkage>0 || cx.freeShippingFullNumPinkage>0"
>
{{
cx
.
freeShippingFullMoneyPinkage
>
0
&&
cx
.
freeShippingFullNumPinkage
==
0
?
cx
.
freeShippingFullMoneyPinkage
+
'元包邮'
:
''
}}
{{
cx
.
freeShippingFullMoneyPinkage
==
0
&&
cx
.
freeShippingFullNumPinkage
>
0
?
cx
.
freeShippingFullNumPinkage
+
'件包邮'
:
''
}}
</view>
{{
cx
.
name
}}
</div>
<div
class=
"good-info"
>
<div
class=
"price"
:style=
"
{ color: mainColor }">
{{
cx
.
price_content
}}
...
...
@@ -156,6 +176,13 @@ export default {
this
.
loading
=
false
;
console
.
log
(
"resggg"
,
res
);
if
(
res
.
resultCode
==
1
){
res
.
data
.
pageData
.
forEach
(
x
=>
{
x
.
marketingLogo
=
JSON
.
parse
(
x
.
marketingLogo
)
x
.
totalStock
=
0
;
x
.
attr
.
forEach
(
j
=>
{
x
.
totalStock
+=
j
.
stock
})
})
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
pageCount
;
if
(
this
.
page_count
==
1
||
this
.
page_count
==
0
)
{
...
...
@@ -256,4 +283,11 @@ export default {
border
:
1px
solid
transparent
;
font-size
:
12px
;
}
.catstyle7
.Logo
{
padding
:
1px
5px
;
display
:
inline-block
;
font-size
:
22
rpx
;
margin-right
:
5
rpx
;
border-radius
:
4px
;
}
</
style
>
components/cats/style8.vue
View file @
28291870
...
...
@@ -42,11 +42,35 @@
:style=
"
{ height: '100%', padding: '0 0 0 10px' }"
>
<view
class=
"good"
v-for=
"(cx, ci) in g"
:key=
"ci"
@
click=
"clickHandler(cx)"
>
<view
class=
"good-img"
>
<image
mode=
"aspectFit"
:src=
"cx.cover_pic"
style=
"width: 100%; height: 100%;"
/>
<view
class=
"good-img"
style=
"position: relative;"
>
<image
mode=
"aspectFit"
:src=
"cx.cover_pic"
style=
"width: 100%; height: 100%;"
>
<image
src=
"../../static/images/icon/plugins-out.png"
v-if=
"cx.totalStock==0"
style=
"width: 100%; height: 100%;position: absolute;left:0;top:0;background: #000;opacity: 0.6;"
/>
</image>
</view>
<view
class=
"good-info"
>
<view
class=
"good-name"
>
{{
cx
.
name
}}
</view>
<view
class=
"good-name"
>
<view
v-if=
"cx.marketingLogo.iswords && cx.marketingLogo.iswords==1&& cx.marketingLogo.words!=''"
class=
"Logo"
:style=
"
{color: cx.marketingLogo.wordsColor,
background:cx.marketingLogo.wordsBack ,}"
>
{{
cx
.
marketingLogo
.
words
}}
</view>
<image
v-if=
"cx.marketingLogo.iswords&&cx.marketingLogo.iswords==2&& cx.marketingLogo.ico!=''"
mode=
"heightFix"
:src=
"cx.marketingLogo.ico"
style=
" height: 11px;"
/>
<view
style=
"color: #FF4048;background: #fdf6ec;padding: 0 5px;display: inline-block;height: 32rpx;font-size: 20rpx;margin-right: 5rpx;"
v-if=
"cx.freeShippingFullMoneyPinkage>0 || cx.freeShippingFullNumPinkage>0"
>
{{
cx
.
freeShippingFullMoneyPinkage
>
0
&&
cx
.
freeShippingFullNumPinkage
==
0
?
cx
.
freeShippingFullMoneyPinkage
+
'元包邮'
:
''
}}
{{
cx
.
freeShippingFullMoneyPinkage
==
0
&&
cx
.
freeShippingFullNumPinkage
>
0
?
cx
.
freeShippingFullNumPinkage
+
'件包邮'
:
''
}}
</view>
{{
cx
.
name
}}
</view>
<view
class=
"goodprice"
>
<view
class=
"left"
>
<view
v-if=
"cx.is_level==1"
>
...
...
@@ -181,6 +205,13 @@ export default {
this
.
loading
=
false
;
console
.
log
(
"resggg"
,
res
);
if
(
res
.
resultCode
==
1
){
res
.
data
.
pageData
.
forEach
(
x
=>
{
x
.
marketingLogo
=
JSON
.
parse
(
x
.
marketingLogo
)
x
.
totalStock
=
0
;
x
.
attr
.
forEach
(
j
=>
{
x
.
totalStock
+=
j
.
stock
})
})
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
pageCount
;
if
(
this
.
page_count
==
1
||
this
.
page_count
==
0
)
{
...
...
@@ -330,4 +361,11 @@ export default {
border
:
1px
solid
transparent
;
font-size
:
12px
;
}
.catstyle8
.Logo
{
padding
:
1px
5px
;
display
:
inline-block
;
font-size
:
22
rpx
;
margin-right
:
5
rpx
;
border-radius
:
4px
;
}
</
style
>
components/goods/goodsku.vue
View file @
28291870
...
...
@@ -49,10 +49,14 @@
<text
class=
"label"
>
购买数量
</text>
<u-number-box
:disabled=
"!skuObj"
v-model=
"gc"
:min=
"1"
:max=
"goodamount"
@
change=
"valChange"
></u-number-box>
</view>
<view
class=
"btn-box"
>
<view
class=
"btn-box"
v-if=
"g.totalStock>0&& g.status==1"
>
<view
style=
"flex: 1;"
v-if=
"optionType != 1"
><u-button
@
click=
"joinCar"
:ripple=
"true"
:hair-line=
"false"
:custom-style=
"btn1"
>
加入购物车
</u-button></view>
<view
style=
"flex: 1;"
v-if=
"optionType != 0"
><u-button
@
click=
"buy"
:ripple=
"true"
:hair-line=
"false"
:custom-style=
"btn2"
>
立即购买
</u-button></view>
</view>
<view
class=
"btn-box"
v-if=
"g.totalStock==0||g.status==2"
>
<view
style=
"flex: 1;"
><u-button
:ripple=
"true"
:hair-line=
"false"
:custom-style=
"btn3"
>
售馨
</u-button></view>
</view>
</view>
</u-popup>
</
template
>
...
...
@@ -119,6 +123,16 @@ export default {
fontSize
:
'13px'
,
width
:
'100%'
},
btn3
:
{
flex
:
1
,
height
:
'100%'
,
borderRadius
:
'40px'
,
border
:
'none'
,
color
:
'#FFF'
,
fontSize
:
'13px'
,
width
:
'100%'
,
background
:
'#ababab'
},
sku
:
''
,
g
:
{},
skuObj
:
null
,
...
...
@@ -149,6 +163,10 @@ export default {
},
res
=>
{
this
.
g
=
res
.
data
.
goods
;
this
.
g
.
totalStock
=
0
;
this
.
g
.
attr
.
forEach
(
x
=>
{
this
.
g
.
totalStock
+=
x
.
stock
})
this
.
goodimage
=
this
.
g
.
cover_pic
;
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
...
...
components/goods/list.vue
View file @
28291870
...
...
@@ -4,7 +4,10 @@
<u-col
span=
"6"
v-for=
"(cx, ci) in g"
:key=
"ci"
>
<view
class=
"good"
@
click=
"clickHandler(cx)"
>
<view
class=
"good-img"
>
<image
mode=
"aspectFill"
:src=
"cx.cover_pic"
style=
"width: 100%; height: 100%;"
/>
<image
mode=
"aspectFill"
:src=
"cx.cover_pic"
style=
"width: 100%; height: 100%;"
>
<image
src=
"../../static/images/icon/plugins-out.png"
v-if=
"cx.totalStock==0"
style=
"width: 100%; height: 100%;position: absolute;left:0;top:0;background: #000;opacity: 0.6;"
/>
</image>
</view>
<view
class=
"good-name"
v-if=
"setting.is_show_goods_name==1"
>
...
...
@@ -85,6 +88,7 @@ export default {
this
.
setting
=
uni
.
getStorageSync
(
"basedata"
).
mall
.
setting
;
},
clickHandler
(
item
)
{
console
.
log
(
item
)
console
.
log
(
"GoodsId"
,
item
);
uni
.
navigateTo
({
url
:
"/pages/goods/goods?GoodsId="
+
item
.
id
});
},
...
...
pages/cart/cart.vue
View file @
28291870
...
...
@@ -40,7 +40,7 @@
</u-checkbox-group>
</view>
<view
class=
"cartList_item"
v-for=
"(item, index) in c.GoodsList"
:key=
"index"
:name=
"item.GoodsName"
>
<view
style=
"width: 40px;text-align: center;"
v-if=
"
item.GoodsStatus == 1 || editType == true
"
>
<view
style=
"width: 40px;text-align: center;"
v-if=
"
(item.GoodsStatus == 1 && editType == true) || (item.InventoryNum!=0&&editType == false)
"
>
<u-checkbox-group
@
change=
"clickcheckbox(item.checked, item.Price, index, i)"
>
<u-checkbox
v-model=
"item.checked"
shape=
"circle"
:active-color=
"mc"
></u-checkbox>
</u-checkbox-group>
...
...
@@ -49,6 +49,9 @@
<view
class=
"invalid"
:style=
"
{ background: mc }" v-if="item.GoodsStatus != 1
&&
editType == false">
<Text
style=
"color: #fff; width: 22px;font-size: 20rpx;"
>
失效
</Text>
</view>
<view
class=
"invalid"
:style=
"
{ background: mc }" v-if="item.InventoryNum == 0
&&
editType == false">
<Text
style=
"color: #fff; width: 22px;font-size: 20rpx;"
>
售馨
</Text>
</view>
<image
:src=
"item.CoverImage"
...
...
@@ -781,7 +784,7 @@ export default {
text-align
:
center
;
width
:
40px
;
height
:
20px
;
line-height
:
20
px
;
line-height
:
18
px
;
border-radius
:
10px
;
}
.cartStyle
.Logo
{
...
...
pages/goods/components/goodsaction.vue
View file @
28291870
...
...
@@ -13,10 +13,13 @@
<view
style=
"width: 22px; margin: auto;"
><u-icon
:name=
"favorStatus ? 'like' : 'like-o'"
size=
"44"
:color=
"favorStatus ? mc : '#333'"
></u-icon></view>
<text
class=
"text"
>
收藏
</text>
</view>
<view
class=
"item2"
>
<view
class=
"item2"
v-if=
"totalStock>0 && status==1"
>
<view
style=
"flex: 1;"
><u-button
@
click=
"joinCar"
:ripple=
"true"
:hair-line=
"false"
:custom-style=
"btn1"
>
加入购物车
</u-button></view>
<view
style=
"flex: 1;"
><u-button
@
click=
"buy"
:ripple=
"true"
:hair-line=
"false"
:custom-style=
"btn2"
>
立即购买
</u-button></view>
</view>
<view
class=
"item2"
v-if=
"totalStock==0|| status==2"
>
<view
style=
"flex: 1;"
><u-button
:ripple=
"true"
:hair-line=
"false"
:custom-style=
"btn3"
>
售馨
</u-button></view>
</view>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
</view>
</
template
>
...
...
@@ -24,7 +27,7 @@
<
script
>
import
auth
from
"@/components/auth/index"
;
export
default
{
props
:
[
'coverPic'
,
'goodName'
,
'favorite'
,
'goodId'
],
props
:
[
'coverPic'
,
'goodName'
,
'favorite'
,
'goodId'
,
'totalStock'
,
'status'
],
data
()
{
return
{
mc
:
''
,
...
...
@@ -48,6 +51,16 @@ export default {
fontSize
:
'13px'
,
width
:
'100%'
},
btn3
:
{
flex
:
1
,
height
:
'100%'
,
borderRadius
:
'40px'
,
border
:
'none'
,
color
:
'#FFF'
,
fontSize
:
'13px'
,
width
:
'100%'
,
background
:
'#ababab'
},
path
:
''
,
favorStatus
:
false
,
//是否显示登陆
...
...
pages/goods/goods.vue
View file @
28291870
...
...
@@ -179,7 +179,7 @@
<view
style=
"width: calc(100vw - 20px); margin-left: 10px; overflow: hidden;"
><goodlist
:list=
"recommend"
></goodlist></view>
<u-skeleton
v-if=
"loading"
:loading=
"true"
:animation=
"true"
bgcolor=
"#FFF"
></u-skeleton>
<goodsaction
v-if=
"!loading"
:good-name=
"g.name"
:cover-pic=
"g.cover_pic"
:favorite=
"g.favorite"
:good-id=
"id"
@
joincar=
"joinCar"
@
buy=
"buy"
></goodsaction>
<goodsaction
v-if=
"!loading"
:good-name=
"g.name"
:cover-pic=
"g.cover_pic"
:favorite=
"g.favorite"
:good-id=
"id"
:total-stock =
'g.totalStock'
:status=
'g.status'
@
joincar=
"joinCar"
@
buy=
"buy"
></goodsaction>
<goodsku
v-if=
"!loading && showSku"
border-radius=
"10"
...
...
@@ -428,6 +428,10 @@ export default {
res
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
g
=
res
.
data
.
goods
;
this
.
g
.
totalStock
=
0
;
this
.
g
.
attr
.
forEach
(
x
=>
{
this
.
g
.
totalStock
+=
x
.
stock
})
this
.
g
.
marketingLogo
=
JSON
.
parse
(
this
.
g
.
marketingLogo
)
this
.
isAllowShare
=
res
.
data
.
goods
.
isAllowShare
;
//1为可以分享 2为不能分享
if
(
this
.
isAllowShare
==
2
)
{
...
...
pages/goods/list.vue
View file @
28291870
...
...
@@ -177,6 +177,10 @@ export default {
if
(
res
.
resultCode
==
1
){
res
.
data
.
pageData
.
forEach
(
x
=>
{
x
.
marketingLogo
=
JSON
.
parse
(
x
.
marketingLogo
)
x
.
totalStock
=
0
;
x
.
attr
.
forEach
(
j
=>
{
x
.
totalStock
+=
j
.
stock
})
})
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
pageCount
;
...
...
pages/search/search.vue
View file @
28291870
...
...
@@ -265,6 +265,10 @@ export default {
this
.
showLoading
=
true
;
res
.
data
.
pageData
.
forEach
(
x
=>
{
x
.
marketingLogo
=
JSON
.
parse
(
x
.
marketingLogo
)
x
.
totalStock
=
0
;
x
.
attr
.
forEach
(
j
=>
{
x
.
totalStock
+=
j
.
stock
})
})
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
...
...
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