Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
599158a3
Commit
599158a3
authored
Nov 01, 2020
by
linlinjava
Browse files
Merge branch 'gouxionglai-master'
parents
c4da8fb5
f781cdeb
Changes
3
Hide whitespace changes
Inline
Side-by-side
litemall-wx/pages/goods/goods.js
View file @
599158a3
...
...
@@ -21,6 +21,7 @@ Page({
cartGoodsCount
:
0
,
userHasCollect
:
0
,
number
:
1
,
tmpPicUrl
:
''
,
checkedSpecText
:
'
规格数量选择
'
,
tmpSpecText
:
'
请选择规格数量
'
,
checkedSpecPrice
:
0
,
...
...
@@ -133,7 +134,9 @@ Page({
}).
then
(
function
(
res
)
{
if
(
res
.
errno
===
0
)
{
let
_specificationList
=
res
.
data
.
specificationList
let
_specificationList
=
res
.
data
.
productList
;
let
_tmpPicUrl
=
res
.
data
.
productList
[
0
].
url
;
//console.log("pic: "+_tmpPicUrl);
// 如果仅仅存在一种货品,那么商品页面初始化时默认checked
if
(
_specificationList
.
length
==
1
)
{
if
(
_specificationList
[
0
].
valueList
.
length
==
1
)
{
...
...
@@ -149,7 +152,7 @@ Page({
that
.
setData
({
checkedSpecText
:
_specificationList
[
0
].
valueList
[
0
].
value
,
tmpSpecText
:
'
已选择:
'
+
_specificationList
[
0
].
valueList
[
0
].
value
,
tmpSpecText
:
'
已选择:
'
+
_specificationList
[
0
].
valueList
[
0
].
value
});
}
}
...
...
@@ -167,8 +170,11 @@ Page({
checkedSpecPrice
:
res
.
data
.
info
.
retailPrice
,
groupon
:
res
.
data
.
groupon
,
canShare
:
res
.
data
.
share
,
//选择规格时,默认展示第一张图片
tmpPicUrl
:
_tmpPicUrl
});
//如果是通过分享的团购参加团购,则团购项目应该与分享的一致并且不可更改
if
(
that
.
data
.
isGroupon
)
{
let
groupons
=
that
.
data
.
groupon
;
...
...
@@ -372,9 +378,11 @@ Page({
}
let
checkedProduct
=
checkedProductArray
[
0
];
//console.log("checkedProduct: "+checkedProduct.url);
if
(
checkedProduct
.
number
>
0
)
{
this
.
setData
({
checkedSpecPrice
:
checkedProduct
.
price
,
tmpPicUrl
:
checkedProduct
.
url
,
soldout
:
false
});
}
else
{
...
...
litemall-wx/pages/goods/goods.wxml
View file @
599158a3
...
...
@@ -139,7 +139,7 @@
<van-icon class="icon" name="cross" />
</view>
<view class="img-info">
<image class="img" src="{{
goods.p
icUrl}}"></image>
<image class="img" src="{{
tmpP
icUrl}}"></image>
<view class="info">
<view class="c">
<view class="p">价格:¥{{checkedSpecPrice}}</view>
...
...
@@ -174,7 +174,6 @@
</view>
</view>
</view>
</view>
</view>
...
...
litemall-wx/pages/goods/goods.wxss
View file @
599158a3
...
...
@@ -652,6 +652,16 @@
text-align: center;
color: #fff;
}
.bottom-btn .n {
float: left;
background: #d5d8d8e7;
height: 100rpx;
line-height: 96rpx;
flex: 1;
text-align: center;
color: rgb(37, 36, 36);
}
@import "../../lib/wxParse/wxParse.wxss";
.attr-pop-box {
...
...
Write
Preview
Supports
Markdown
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