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
3d831121
Commit
3d831121
authored
Jun 03, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改商品页
parent
5723292a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
481 additions
and
472 deletions
+481
-472
goodsku.vue
components/goods/goodsku.vue
+444
-449
style1.vue
components/goods/style1.vue
+1
-1
style2.vue
components/goods/style2.vue
+1
-1
style3.vue
components/goods/style3.vue
+1
-1
style4.vue
components/goods/style4.vue
+12
-12
style5.vue
components/goods/style5.vue
+13
-4
style6.vue
components/goods/style6.vue
+1
-1
api.js
plugin/api.js
+8
-3
No files found.
components/goods/goodsku.vue
View file @
3d831121
This diff is collapsed.
Click to expand it.
components/goods/style1.vue
View file @
3d831121
...
...
@@ -46,7 +46,7 @@
</div>
<div
class=
"good-price-info"
>
<span
class=
"price"
:style=
"
{ color: mainColor }">
{{
goodsInfo
.
showGoodsPrice
?
item
.
price
:
""
goodsInfo
.
showGoodsPrice
?
getPrice
(
item
.
price
)
:
""
}}
</span>
<span
class=
"buy"
v-if=
"goodsInfo.showBuyBtn"
@
click
.
stop=
"showSkuHandler(item)"
>
<u-icon
...
...
components/goods/style2.vue
View file @
3d831121
...
...
@@ -43,7 +43,7 @@
</view>
<view
class=
"good-price-info"
>
<view
class=
"price"
:style=
"
{'color':mainColor}">
{{
goodsInfo
.
showGoodsPrice
?
item
.
price
:
""
goodsInfo
.
showGoodsPrice
?
getPrice
(
item
.
price
)
:
""
}}
</view>
<view
class=
"buy"
v-if=
"goodsInfo.showBuyBtn"
>
<u-icon
...
...
components/goods/style3.vue
View file @
3d831121
...
...
@@ -43,7 +43,7 @@
</div>
<div
class=
"good-price-info"
>
<view
class=
"price"
:style=
"
{'color':mainColor}">
{{
goodsInfo
.
showGoodsPrice
?
item
.
price
:
""
goodsInfo
.
showGoodsPrice
?
getPrice
(
item
.
price
)
:
""
}}
</view>
<view
class=
"buy"
v-if=
"goodsInfo.showBuyBtn"
@
click
.
stop=
"showSkuHandler(item)"
>
<u-icon
...
...
components/goods/style4.vue
View file @
3d831121
...
...
@@ -109,18 +109,18 @@ export default {
this
.
showSku
=
true
},
//格式化价格添加.00
getPrice
(
value
){
var
html
,
_val
;
value
=
Number
(
value
).
toFixed
(
2
);
if
(
value
==
0
){
value
=
0
;
return
html
=
"¥0"
;
}
else
if
(
value
.
split
(
'.'
)[
1
].
substring
(
1
)
==
0
){
value
=
Number
(
value
).
toFixed
(
2
);
}
_val
=
value
.
split
(
'.'
);
return
html
=
'¥'
+
_val
[
0
]
+
'.'
+
_val
[
1
];
}
//
getPrice(value){
//
var html,_val;
//
value =Number(value).toFixed(2);
//
if(value==0){
//
value=0;
//
return html = "¥0";
//
}else if(value.split('.')[1].substring(1)==0){
//
value = Number(value).toFixed(2);
//
}
//
_val = value.split('.');
//
return html = '¥'+_val[0]+'.'+_val[1];
//
}
},
};
</
script
>
...
...
components/goods/style5.vue
View file @
3d831121
...
...
@@ -40,9 +40,9 @@
</view>
<view
class=
"good-price-info"
>
<view
class=
"price"
:style=
"
{'color':mainColor}">
{{
goodsInfo
.
showGoodsPrice
?
item
.
price
:
""
goodsInfo
.
showGoodsPrice
?
getPrice
(
item
.
price
)
:
""
}}
</view>
<view
class=
"buy"
v-if=
"goodsInfo.showBuyBtn"
>
<view
class=
"buy"
v-if=
"goodsInfo.showBuyBtn"
@
click
.
stop=
"showSkuHandler(item)"
>
<u-icon
name=
"cart-o"
size=
"40"
...
...
@@ -78,17 +78,22 @@
</view>
</view>
</view>
<
view
style=
"color:rgba(0,0,0,0);font-size:12px;"
>
0
</view
>
<
good-sku
v-if=
"showSku"
:option-type=
"2"
borderRadius=
"20"
v-model=
"showSku"
:good=
"sku"
></good-sku
>
</view>
</
template
>
<
script
>
import
goodSku
from
'../goods/goodsku'
export
default
{
components
:{
goodSku
},
props
:
[
"goodList"
,
"goodsInfo"
],
data
()
{
return
{
mainColor
:
""
,
activeKey
:
0
,
showSku
:
false
,
sku
:{}
};
},
created
()
{
...
...
@@ -98,6 +103,10 @@ export default {
openGood
(
e
)
{
console
.
log
(
e
);
},
showSkuHandler
(
g
){
this
.
sku
=
g
this
.
showSku
=
true
},
},
};
</
script
>
...
...
components/goods/style6.vue
View file @
3d831121
...
...
@@ -38,7 +38,7 @@
}}
</view>
<view
class=
"good-price-info"
>
<view
class=
"price"
:style=
"
{'color':mainColor}">
{{
goodsInfo
.
showGoodsPrice
?
item
.
price
:
""
goodsInfo
.
showGoodsPrice
?
getPrice
(
item
.
price
)
:
""
}}
</view>
<view
class=
"buy"
v-if=
"goodsInfo.showBuyBtn"
>
<u-icon
...
...
plugin/api.js
View file @
3d831121
...
...
@@ -44,9 +44,9 @@ export default {
'content-type'
:
"application/json"
},
data
:
{
"MallBaseId"
:
1
,
"TenantId"
:
1
,
"OpenId"
:
this
.
GetOpenId
().
OpenId
,
MallBaseId
:
1
,
TenantId
:
1
,
OpenId
:
this
.
GetOpenId
().
OpenId
,
UserId
:
this
.
GetOpenId
().
UserId
,
MiniAppId
:
this
.
GetMiniAppId
(),
msg
:
param
.
data
...
...
@@ -97,6 +97,11 @@ export default {
return
str
;
}
}
//价格返回.00
Vue
.
prototype
.
getPrice
=
function
(
val
){
val
=
Number
(
val
).
toFixed
(
2
);
return
val
}
Vue
.
prototype
.
apiheader
=
function
()
{
return
{
...
...
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