Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
飞鱼0526
ShopXO
提交
86c5e6dc
ShopXO
项目概览
飞鱼0526
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
86c5e6dc
编写于
7月 25, 2019
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
系统优化
上级
1b1af214
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
168 addition
and
54 deletion
+168
-54
application/index/controller/Goods.php
application/index/controller/Goods.php
+9
-0
application/index/view/default/goods/index.html
application/index/view/default/goods/index.html
+25
-6
application/service/BuyService.php
application/service/BuyService.php
+18
-18
application/service/GoodsService.php
application/service/GoodsService.php
+52
-11
application/tags.php
application/tags.php
+8
-0
public/static/index/default/css/goods.css
public/static/index/default/css/goods.css
+7
-8
public/static/index/default/js/goods.js
public/static/index/default/js/goods.js
+49
-11
未找到文件。
application/index/controller/Goods.php
浏览文件 @
86c5e6dc
...
...
@@ -225,6 +225,15 @@ class Goods extends Common
'goods_id'
=>
$goods_id
,
'goods'
=>
&
$goods
,
]));
// 商品页面基础信息面板售价顶部钩子
$this
->
assign
(
'plugins_view_goods_detail_panel_price_top_data'
,
Hook
::
listen
(
'plugins_view_goods_detail_panel_price_top'
,
[
'hook_name'
=>
'plugins_view_goods_detail_panel_price_top'
,
'is_backend'
=>
false
,
'goods_id'
=>
$goods_id
,
'goods'
=>
&
$goods
,
]));
}
/**
...
...
application/index/view/default/goods/index.html
浏览文件 @
86c5e6dc
...
...
@@ -173,20 +173,39 @@
<!-- 基础面板 -->
<div
class=
"tb-detail-price"
>
{{if isset($goods['original_price']) and $goods['original_price'] gt 0 and !empty($goods['show_field_original_price_text'])}}
<div
class=
"items price iteminfo_price"
>
<!-- 原价 -->
<div
class=
"items price"
>
<dt>
{{$goods.show_field_original_price_text|raw}}
</dt>
<dd>
<b
class=
"
sys_item_mktprice"
data-original-price=
"{{$goods.original_price}}"
>
¥
{{$goods.original_price}}
</b>
<b
class=
"
goods-original-price original-price-value"
data-original-price=
"{{$goods.original_price}}"
>
¥
{{$goods.original_price}}
</b>
</dd>
</div>
{{/if}}
<!-- 商品页面基础信息面板售价顶部钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
<div
class=
"plugins-tag"
>
<span>
plugins_view_goods_detail_panel_price_top
</span>
</div>
{{/if}}
{{if !empty($plugins_view_goods_detail_panel_price_top_data) and is_array($plugins_view_goods_detail_panel_price_top_data)}}
{{foreach $plugins_view_goods_detail_panel_price_top_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
<!-- 售价 -->
<div
class=
"items price iteminfo_mktprice"
>
<dt>
{{if empty($goods['show_field_price_text'])}}销售价{{else /}}{{$goods.show_field_price_text|raw}}{{/if}}
</dt>
<dd>
<em>
¥
</em>
<b
class=
"
sys_item_
price"
data-original-price=
"{{$goods.price}}"
>
{{$goods.price}}
</b>
<em>
¥
</em>
<b
class=
"
goods-
price"
data-original-price=
"{{$goods.price}}"
>
{{$goods.price}}
</b>
</dd>
</div>
<!-- 二维码 -->
<div
class=
"goods-qrcode am-hide-sm-only"
>
<i
class=
"am-icon-qrcode am-icon-sm"
></i>
<img
class=
"qrcode-images am-img-thumbnail"
src=
"{{$qrcode_url}}"
/>
...
...
@@ -281,7 +300,7 @@
<img
src=
"{{$goods.images}}"
/>
</div>
<div
class=
"text-info"
>
<span
class=
"price-now"
data-original-price=
"{{$goods.price}}"
>
¥
{{$goods.price}}
</span>
<span
class=
"price-now"
data-original-price=
"{{$goods.price}}"
>
¥
{{$goods.price}}
</span>
</div>
</div>
</form>
...
...
@@ -516,7 +535,7 @@
<p
class=
"am-text-truncate"
{{
if
!
empty
($
v.title_color
)}}
style=
"color:{{$v.title_color}};"
{{/
if
}}
>
{{$v.title}}
</p>
</a>
<p
class=
"price fl"
>
<strong>
¥
{{$v.price}}
</strong>
<strong>
¥
{{$v.price}}
</strong>
</p>
</div>
</li>
...
...
application/service/BuyService.php
浏览文件 @
86c5e6dc
...
...
@@ -97,8 +97,8 @@ class BuyService
'goods_id'
=>
$goods_id
,
'title'
=>
$goods
[
'title'
],
'images'
=>
$goods
[
'images'
],
'original_price'
=>
$goods_base
[
'data'
][
'original_price'
],
'price'
=>
$goods_base
[
'data'
][
'price'
],
'original_price'
=>
$goods_base
[
'data'
][
'
spec_base'
][
'
original_price'
],
'price'
=>
$goods_base
[
'data'
][
'
spec_base'
][
'
price'
],
'stock'
=>
intval
(
$params
[
'stock'
]),
'spec'
=>
empty
(
$spec
)
?
''
:
json_encode
(
$spec
),
];
...
...
@@ -197,12 +197,12 @@ class BuyService
$goods_base
=
GoodsService
::
GoodsSpecDetail
([
'id'
=>
$v
[
'goods_id'
],
'spec'
=>
$v
[
'spec'
]]);
if
(
$goods_base
[
'code'
]
==
0
)
{
$v
[
'inventory'
]
=
$goods_base
[
'data'
][
'inventory'
];
$v
[
'price'
]
=
(
float
)
$goods_base
[
'data'
][
'price'
];
$v
[
'original_price'
]
=
(
float
)
$goods_base
[
'data'
][
'original_price'
];
$v
[
'spec_weight'
]
=
$goods_base
[
'data'
][
'weight'
];
$v
[
'spec_coding'
]
=
$goods_base
[
'data'
][
'coding'
];
$v
[
'spec_barcode'
]
=
$goods_base
[
'data'
][
'barcode'
];
$v
[
'inventory'
]
=
$goods_base
[
'data'
][
'
spec_base'
][
'
inventory'
];
$v
[
'price'
]
=
(
float
)
$goods_base
[
'data'
][
'
spec_base'
][
'
price'
];
$v
[
'original_price'
]
=
(
float
)
$goods_base
[
'data'
][
'
spec_base'
][
'
original_price'
];
$v
[
'spec_weight'
]
=
$goods_base
[
'data'
][
'
spec_base'
][
'
weight'
];
$v
[
'spec_coding'
]
=
$goods_base
[
'data'
][
'
spec_base'
][
'
coding'
];
$v
[
'spec_barcode'
]
=
$goods_base
[
'data'
][
'
spec_base'
][
'
barcode'
];
}
else
{
return
$goods_base
;
}
...
...
@@ -406,12 +406,12 @@ class BuyService
$goods_base
=
GoodsService
::
GoodsSpecDetail
([
'id'
=>
$ret
[
'data'
][
0
][
'goods_id'
],
'spec'
=>
$ret
[
'data'
][
0
][
'spec'
]]);
if
(
$goods_base
[
'code'
]
==
0
)
{
$ret
[
'data'
][
0
][
'inventory'
]
=
$goods_base
[
'data'
][
'inventory'
];
$ret
[
'data'
][
0
][
'price'
]
=
(
float
)
$goods_base
[
'data'
][
'price'
];
$ret
[
'data'
][
0
][
'original_price'
]
=
(
float
)
$goods_base
[
'data'
][
'original_price'
];
$ret
[
'data'
][
0
][
'spec_weight'
]
=
$goods_base
[
'data'
][
'weight'
];
$ret
[
'data'
][
0
][
'spec_coding'
]
=
$goods_base
[
'data'
][
'coding'
];
$ret
[
'data'
][
0
][
'spec_barcode'
]
=
$goods_base
[
'data'
][
'barcode'
];
$ret
[
'data'
][
0
][
'inventory'
]
=
$goods_base
[
'data'
][
'
spec_base'
][
'
inventory'
];
$ret
[
'data'
][
0
][
'price'
]
=
(
float
)
$goods_base
[
'data'
][
'
spec_base'
][
'
price'
];
$ret
[
'data'
][
0
][
'original_price'
]
=
(
float
)
$goods_base
[
'data'
][
'
spec_base'
][
'
original_price'
];
$ret
[
'data'
][
0
][
'spec_weight'
]
=
$goods_base
[
'data'
][
'
spec_base'
][
'
weight'
];
$ret
[
'data'
][
0
][
'spec_coding'
]
=
$goods_base
[
'data'
][
'
spec_base'
][
'
coding'
];
$ret
[
'data'
][
0
][
'spec_barcode'
]
=
$goods_base
[
'data'
][
'
spec_base'
][
'
barcode'
];
}
else
{
return
$goods_base
;
}
...
...
@@ -630,8 +630,8 @@ class BuyService
$goods_base
=
GoodsService
::
GoodsSpecDetail
([
'id'
=>
$v
[
'goods_id'
],
'spec'
=>
isset
(
$v
[
'spec'
])
?
$v
[
'spec'
]
:
[]]);
if
(
$goods_base
[
'code'
]
==
0
)
{
$goods
[
'price'
]
=
$goods_base
[
'data'
][
'price'
];
$goods
[
'inventory'
]
=
$goods_base
[
'data'
][
'inventory'
];
$goods
[
'price'
]
=
$goods_base
[
'data'
][
'
spec_base'
][
'
price'
];
$goods
[
'inventory'
]
=
$goods_base
[
'data'
][
'
spec_base'
][
'
inventory'
];
}
else
{
return
$goods_base
;
}
...
...
@@ -983,7 +983,7 @@ class BuyService
if
(
$base
[
'code'
]
==
0
)
{
// 扣除规格操作
if
(
!
Db
::
name
(
'GoodsSpecBase'
)
->
where
([
'id'
=>
$base
[
'data'
][
'id'
],
'goods_id'
=>
$v
[
'goods_id'
]])
->
setDec
(
'inventory'
,
$v
[
'buy_number'
]))
if
(
!
Db
::
name
(
'GoodsSpecBase'
)
->
where
([
'id'
=>
$base
[
'data'
][
'
spec_base'
][
'
id'
],
'goods_id'
=>
$v
[
'goods_id'
]])
->
setDec
(
'inventory'
,
$v
[
'buy_number'
]))
{
return
DataReturn
(
'规格库存扣减失败['
.
$params
[
'order_id'
]
.
'-'
.
$v
[
'goods_id'
]
.
'('
.
$goods
[
'inventory'
]
.
'-'
.
$v
[
'buy_number'
]
.
')]'
,
-
10
);
}
...
...
@@ -1089,7 +1089,7 @@ class BuyService
if
(
$base
[
'code'
]
==
0
)
{
// 回滚规格操作
if
(
!
Db
::
name
(
'GoodsSpecBase'
)
->
where
([
'id'
=>
$base
[
'data'
][
'id'
],
'goods_id'
=>
$v
[
'goods_id'
]])
->
setInc
(
'inventory'
,
$buy_number
))
if
(
!
Db
::
name
(
'GoodsSpecBase'
)
->
where
([
'id'
=>
$base
[
'data'
][
'
spec_base'
][
'
id'
],
'goods_id'
=>
$v
[
'goods_id'
]])
->
setInc
(
'inventory'
,
$buy_number
))
{
return
DataReturn
(
'规格库存回滚失败['
.
$params
[
'order_id'
]
.
'-'
.
$v
[
'goods_id'
]
.
']'
,
-
10
);
}
...
...
application/service/GoodsService.php
浏览文件 @
86c5e6dc
...
...
@@ -294,6 +294,16 @@ class GoodsService
return
$ret
;
}
// 商品价格容器
$v
[
'price_container'
]
=
[
'price'
=>
isset
(
$v
[
'price'
])
?
$v
[
'price'
]
:
0.00
,
'min_price'
=>
isset
(
$v
[
'min_price'
])
?
$v
[
'min_price'
]
:
0.00
,
'max_price'
=>
isset
(
$v
[
'max_price'
])
?
$v
[
'max_price'
]
:
0.00
,
'original_price'
=>
isset
(
$v
[
'original_price'
])
?
$v
[
'original_price'
]
:
0.00
,
'min_original_price'
=>
isset
(
$v
[
'min_original_price'
])
?
$v
[
'min_original_price'
]
:
0.00
,
'max_original_price'
=>
isset
(
$v
[
'max_original_price'
])
?
$v
[
'max_original_price'
]
:
0.00
,
];
// 商品url地址
if
(
!
empty
(
$v
[
'id'
]))
{
...
...
@@ -1916,13 +1926,21 @@ class GoodsService
// 单位 .00 处理
$base
[
'weight'
]
=
PriceBeautify
(
$base
[
'weight'
]);
// 商品处理前钩子
// 处理好的数据
// 扩展元素标记与html内容数据
// extends_element下包含多个元素 ['element'=>'', 'content'=>'']
$data
=
[
'spec_base'
=>
$base
,
'extends_element'
=>
[],
];
// 商品获取规格钩子
$hook_name
=
'plugins_service_goods_spec_base'
;
$ret
=
Hook
::
listen
(
$hook_name
,
[
'hook_name'
=>
$hook_name
,
'is_backend'
=>
true
,
'params'
=>
&
$params
,
'
spec_base'
=>
&
$base
,
'params'
=>
$params
,
'
data'
=>
&
$data
,
'goods_id'
=>
$goods_id
]);
if
(
isset
(
$ret
[
'code'
])
&&
$ret
[
'code'
]
!=
0
)
...
...
@@ -1931,7 +1949,7 @@ class GoodsService
}
// 返回成功
return
DataReturn
(
'操作成功'
,
0
,
$
base
);
return
DataReturn
(
'操作成功'
,
0
,
$
data
);
}
return
DataReturn
(
'没有相关规格'
,
-
100
);
...
...
@@ -1972,9 +1990,9 @@ class GoodsService
$where
=
[
'goods_id'
=>
intval
(
$params
[
'id'
]),
];
$value
=
[];
// 规格不为数组则为json字符串
$value
=
[];
if
(
!
is_array
(
$params
[
'spec'
]))
{
$params
[
'spec'
]
=
json_decode
(
htmlspecialchars_decode
(
$params
[
'spec'
]),
true
);
...
...
@@ -1994,18 +2012,18 @@ class GoodsService
if
(
!
empty
(
$temp_data
))
{
// 根据基础值id分组
$
data
=
[];
$
group
=
[];
foreach
(
$temp_data
as
$v
)
{
$
data
[
$v
[
'goods_spec_base_id'
]][]
=
$v
;
$
group
[
$v
[
'goods_spec_base_id'
]][]
=
$v
;
}
// 获取当前操作元素索引
$last
=
end
(
$params
[
'spec'
]);
$index
=
count
(
$params
[
'spec'
])
-
1
;
$spec_str
=
implode
(
''
,
array_column
(
$params
[
'spec'
],
'value'
));
$
valu
e
=
[];
foreach
(
$
data
as
$v
)
$
spec_typ
e
=
[];
foreach
(
$
group
as
$v
)
{
$temp_str
=
implode
(
''
,
array_column
(
$v
,
'value'
));
if
(
isset
(
$v
[
$index
+
1
])
&&
stripos
(
$temp_str
,
$spec_str
)
!==
false
)
...
...
@@ -2014,11 +2032,34 @@ class GoodsService
$inventory
=
Db
::
name
(
'GoodsSpecBase'
)
->
where
([
'id'
=>
$v
[
$index
+
1
][
'goods_spec_base_id'
]])
->
value
(
'inventory'
);
if
(
$inventory
>
0
)
{
$
valu
e
[
$v
[
$index
+
1
][
'value'
]]
=
$v
[
$index
+
1
][
'value'
];
$
spec_typ
e
[
$v
[
$index
+
1
][
'value'
]]
=
$v
[
$index
+
1
][
'value'
];
}
}
}
return
DataReturn
(
'操作成功'
,
0
,
array_values
(
$value
));
// 处理好的数据
// 扩展元素标记与html内容数据
// extends_element下包含多个元素 ['element'=>'', 'content'=>'']
$data
=
[
'spec_type'
=>
array_values
(
$spec_type
),
'extends_element'
=>
[],
];
// 商品获取规格类型钩子
$hook_name
=
'plugins_service_goods_spec_type'
;
$ret
=
Hook
::
listen
(
$hook_name
,
[
'hook_name'
=>
$hook_name
,
'is_backend'
=>
true
,
'params'
=>
$params
,
'data'
=>
&
$data
,
'goods_id'
=>
$goods_id
]);
if
(
isset
(
$ret
[
'code'
])
&&
$ret
[
'code'
]
!=
0
)
{
return
$ret
;
}
return
DataReturn
(
'操作成功'
,
0
,
$data
);
}
}
return
DataReturn
(
'没有相关规格类型'
,
-
100
);
...
...
application/tags.php
浏览文件 @
86c5e6dc
...
...
@@ -68,5 +68,13 @@ return array (
array
(
0
=>
'app\\plugins\\membershiplevel\\Hook'
,
),
'plugins_view_goods_detail_panel_price_top'
=>
array
(
0
=>
'app\\plugins\\membershiplevel\\Hook'
,
),
'plugins_service_goods_spec_type'
=>
array
(
0
=>
'app\\plugins\\membershiplevel\\Hook'
,
),
);
?>
\ No newline at end of file
public/static/index/default/css/goods.css
浏览文件 @
86c5e6dc
...
...
@@ -181,18 +181,17 @@ fieldset legend{margin-left:15px;padding-left:3px;padding-right:3px;color:#333;}
/*价格*/
.tb-detail-price
{
text-align
:
left
;
position
:
relative
;}
.tb-detail-price
.price
em
{
font-family
:
arial
;}
.
iteminfo_price
.sys_item_mktprice
{
text-decoration
:
line-through
;
padding-top
:
7px
;
padding-bottom
:
0px
;
font-size
:
14px
;
}
.
tb-detail-price
.original-price-value
{
text-decoration
:
line-through
;
font-size
:
14px
;
}
.iteminfo_mktprice
{
padding-top
:
10px
;}
.iteminfo_mktprice
em
,
.sys_item_price
{
color
:
#c00
;}
.sys_item_price
{
font-size
:
20px
;}
.tb-detail-price
dd
{
display
:
inline-block
;}
.goods-favor-count
{
color
:
#999
;
}
.iteminfo_mktprice
em
,
.goods-price
{
color
:
#c00
;}
.tb-detail-price
dd
{
display
:
inline-block
;}
.goods-favor-count
{
color
:
#999
;
}
.iteminfo_parameter
a
:hover
{
text-decoration
:
none
;
color
:
initial
;}
.tm-indcon
.tm-label
,
.tb-detail-price
dt
,
.specpara-title
{
white-space
:
nowrap
;
color
:
#666
;
font-weight
:
400
;
}
.tb-detail-price
{
background
:
#fcf1e3
url(../images/goods-meta-bg.png)
;
background-size
:
cover
;
-moz-background-size
:
cover
;
background-repeat
:
no-repeat
;
height
:
75px
;
padding
:
10px
;
}
.tb-detail-price
.items
{
display
:
block
;
margin-left
:
0
!important
;}
.tb-detail-price
{
background
:
#fcf1e3
url(../images/goods-meta-bg.png)
;
background-size
:
cover
;
-moz-background-size
:
cover
;
background-repeat
:
no-repeat
;
height
:
auto
;
padding
:
10px
;
}
.tb-detail-price
.items
{
display
:
block
;
margin
:
5px
0
;}
.tb-detail-price
.items
dt
{
float
:
left
;
text-align
:
left
;}
.
sys_item_price
{
font-size
:
24px
;
font-weight
:
bold
;
line-height
:
16px
;}
.
tb-detail-price
.goods-price
{
font-size
:
24px
;
font-weight
:
bold
;
line-height
:
16px
;}
/* 二维码 */
.goods-qrcode
{
position
:
absolute
;
bottom
:
5px
;
right
:
10px
;
cursor
:
pointer
;
color
:
#666
;
width
:
150px
;
text-align
:
right
;}
...
...
public/static/index/default/js/goods.js
浏览文件 @
86c5e6dc
...
...
@@ -255,16 +255,29 @@ function GoodsSpecDetail()
$
.
AMUI
.
progress
.
done
();
if
(
result
.
code
==
0
)
{
$
(
'
.text-info .price-now
'
).
text
(
'
¥
'
+
result
.
data
.
price
);
$
(
'
.
sys_item_price
'
).
text
(
result
.
data
.
price
);
$
(
'
.number-tag input[type="number"]
'
).
attr
(
'
max
'
,
result
.
data
.
inventory
);
$
(
'
.stock-tips .stock
'
).
text
(
result
.
data
.
inventory
);
if
(
result
.
data
.
original_price
>
0
)
$
(
'
.text-info .price-now
'
).
text
(
'
¥
'
+
result
.
data
.
spec_base
.
price
);
$
(
'
.
goods-price
'
).
text
(
result
.
data
.
spec_base
.
price
);
$
(
'
.number-tag input[type="number"]
'
).
attr
(
'
max
'
,
result
.
data
.
spec_base
.
inventory
);
$
(
'
.stock-tips .stock
'
).
text
(
result
.
data
.
spec_base
.
inventory
);
if
(
result
.
data
.
spec_base
.
original_price
>
0
)
{
$
(
'
.
sys_item_mktprice
'
).
text
(
'
¥
'
+
result
.
data
.
original_price
);
$
(
'
.
sys_item_mkt
price
'
).
show
();
$
(
'
.
goods-original-price
'
).
text
(
'
¥
'
+
result
.
data
.
spec_base
.
original_price
);
$
(
'
.
goods-original-
price
'
).
show
();
}
else
{
$
(
'
.sys_item_mktprice
'
).
hide
();
$
(
'
.goods-original-price
'
).
hide
();
}
// 扩展数据处理
var
extends_element
=
result
.
data
.
extends_element
||
[];
if
(
extends_element
.
length
>
0
)
{
for
(
var
i
in
extends_element
)
{
if
((
extends_element
[
i
][
'
element
'
]
||
null
)
!=
null
&&
extends_element
[
i
][
'
content
'
]
!==
null
)
{
$
(
extends_element
[
i
][
'
element
'
]).
html
(
extends_element
[
i
][
'
content
'
]);
}
}
}
}
else
{
if
(
$
(
window
).
width
()
<
640
)
...
...
@@ -336,7 +349,7 @@ function GoodsSpecType()
{
$
(
this
).
removeClass
(
'
sku-dont-choose
'
);
var
value
=
$
(
this
).
data
(
'
value
'
).
toString
();
if
(
result
.
data
.
indexOf
(
value
)
==
-
1
)
if
(
result
.
data
.
spec_type
.
indexOf
(
value
)
==
-
1
)
{
$
(
this
).
addClass
(
'
sku-items-disabled
'
);
}
else
{
...
...
@@ -344,6 +357,19 @@ function GoodsSpecType()
}
});
}
// 扩展数据处理
var
extends_element
=
result
.
data
.
extends_element
||
[];
if
(
extends_element
.
length
>
0
)
{
for
(
var
i
in
extends_element
)
{
if
((
extends_element
[
i
][
'
element
'
]
||
null
)
!=
null
&&
extends_element
[
i
][
'
content
'
]
!==
null
)
{
$
(
extends_element
[
i
][
'
element
'
]).
html
(
extends_element
[
i
][
'
content
'
]);
}
}
}
}
else
{
if
(
$
(
window
).
width
()
<
640
)
{
...
...
@@ -377,10 +403,22 @@ function GoodsSpecType()
function
GoodsBaseRestore
()
{
$
(
'
.text-info .price-now
'
).
text
(
'
¥
'
+
$
(
'
.text-info .price-now
'
).
data
(
'
original-price
'
));
$
(
'
.sys_item_mktprice
'
).
text
(
$
(
'
.sys_item_mktprice
'
).
data
(
'
original-price
'
));
$
(
'
.sys_item_price
'
).
text
(
$
(
'
.sys_item_price
'
).
data
(
'
original-price
'
));
$
(
'
.goods-price
'
).
text
(
$
(
'
.goods-price
'
).
data
(
'
original-price
'
));
$
(
'
.number-tag input[type="number"]
'
).
attr
(
'
max
'
,
$
(
'
.number-tag input[type="number"]
'
).
data
(
'
original-max
'
));
$
(
'
.stock-tips .stock
'
).
text
(
$
(
'
.stock-tips .stock
'
).
data
(
'
original-stock
'
));
// 价格处理
if
(
$
(
'
.tb-detail-price .original-price-value
'
).
length
>
0
)
{
$
(
'
.tb-detail-price .original-price-value
'
).
each
(
function
(
k
,
v
)
{
var
price
=
$
(
this
).
data
(
'
original-price
'
);
if
(
price
!==
undefined
)
{
$
(
this
).
text
(
'
¥
'
+
price
);
}
});
}
}
$
(
function
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录