Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
飞鱼0526
ShopXO
提交
0df51814
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 搜索 >>
提交
0df51814
编写于
11月 13, 2019
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
商品新增虚拟模式
上级
e3a2e4e2
变更
21
展开全部
隐藏空白更改
内联
并排
Showing
21 changed file
with
297 addition
and
81 deletion
+297
-81
application/admin/controller/Site.php
application/admin/controller/Site.php
+2
-5
application/admin/controller/Slide.php
application/admin/controller/Slide.php
+3
-0
application/admin/view/default/appcenternav/index.html
application/admin/view/default/appcenternav/index.html
+4
-4
application/admin/view/default/apphomenav/index.html
application/admin/view/default/apphomenav/index.html
+4
-4
application/admin/view/default/goods/index.html
application/admin/view/default/goods/index.html
+10
-0
application/admin/view/default/goods/save_info.html
application/admin/view/default/goods/save_info.html
+19
-8
application/admin/view/default/slide/index.html
application/admin/view/default/slide/index.html
+61
-11
application/admin/view/default/slide/save_info.html
application/admin/view/default/slide/save_info.html
+2
-2
application/index/controller/Buy.php
application/index/controller/Buy.php
+21
-2
application/index/controller/Common.php
application/index/controller/Common.php
+3
-0
application/index/controller/Goods.php
application/index/controller/Goods.php
+3
-0
application/index/view/default/goods/index.html
application/index/view/default/goods/index.html
+31
-17
application/service/BuyService.php
application/service/BuyService.php
+6
-0
application/service/ConfigService.php
application/service/ConfigService.php
+30
-0
application/service/GoodsService.php
application/service/GoodsService.php
+8
-0
config/shopxo.sql
config/shopxo.sql
+58
-22
public/static/admin/default/css/goods.css
public/static/admin/default/css/goods.css
+7
-0
public/static/admin/default/css/slide.css
public/static/admin/default/css/slide.css
+1
-0
public/static/admin/default/js/goods.js
public/static/admin/default/js/goods.js
+14
-0
public/static/index/default/css/goods.css
public/static/index/default/css/goods.css
+7
-0
public/static/index/default/js/goods.js
public/static/index/default/js/goods.js
+3
-6
未找到文件。
application/admin/controller/Site.php
浏览文件 @
0df51814
...
...
@@ -87,11 +87,8 @@ class Site extends Common
// 自提点地址处理
if
(
$nav_type
==
'sitetype'
&&
!
empty
(
$data
[
'common_self_extraction_address'
])
&&
!
empty
(
$data
[
'common_self_extraction_address'
][
'value'
]))
{
$address_list
=
json_decode
(
$data
[
'common_self_extraction_address'
][
'value'
],
true
);
if
(
!
empty
(
$address_list
)
&&
is_array
(
$address_list
))
{
$this
->
assign
(
'sitetype_address_list'
,
$address_list
);
}
$address
=
ConfigService
::
SiteTypeExtractionAddressList
(
$data
[
'common_self_extraction_address'
][
'value'
]);
$this
->
assign
(
'sitetype_address_list'
,
$address
[
'data'
]);
}
// 编辑器文件存放地址
...
...
application/admin/controller/Slide.php
浏览文件 @
0df51814
...
...
@@ -133,6 +133,9 @@ class Slide extends Common
// 事件类型
$this
->
assign
(
'common_app_event_type'
,
lang
(
'common_app_event_type'
));
// 参数
$this
->
assign
(
'params'
,
$params
);
// 编辑器文件存放地址
$this
->
assign
(
'editor_path_type'
,
'slide'
);
...
...
application/admin/view/default/appcenternav/index.html
浏览文件 @
0df51814
...
...
@@ -92,9 +92,9 @@
<tr>
<th>
名称
</th>
<th
class=
"am-hide-sm-only"
>
所属平台
</th>
<th>
导航图标
</th>
<th
class=
"am-hide-sm-only"
>
导航图标
</th>
<th
class=
"am-hide-sm-only"
>
事件值
</th>
<th
class=
"am-hide-sm-only"
>
启用
</th>
<th>
启用
</th>
<th>
更多
</th>
<th>
操作
</th>
</tr>
...
...
@@ -105,7 +105,7 @@
<tr
id=
"data-list-{{$v.id}}"
{{
if
$
v
['
is_enable
']
eq
0}}
class=
"am-active"
{{/
if
}}
>
<td>
{{$v.name}}
</td>
<td
class=
"am-hide-sm-only"
>
{{$v.platform_text}}
</td>
<td>
<td
class=
"am-hide-sm-only"
>
{{if !empty($v['images_url'])}}
<a
href=
"{{$v['images_url']}}"
target=
"_blank"
>
<img
src=
"{{$v['images_url']}}"
class=
"am-radius am-vertical-align-middle"
width=
"30"
height=
"30"
/>
...
...
@@ -122,7 +122,7 @@
{{/if}}
</div>
</td>
<td
class=
"am-hide-sm-only"
>
<td>
<a
href=
"javascript:;"
class=
"am-icon-btn am-icon-check submit-state {{if $v['is_enable'] eq 1}}am-success{{else /}}am-default{{/if}}"
data-url=
"{{:MyUrl('admin/appcenternav/statusupdate')}}"
data-id=
"{{$v.id}}"
data-state=
"{{$v['is_enable']}}"
data-field=
"is_enable"
data-is-update-status=
"1"
></a>
</td>
<td>
...
...
application/admin/view/default/apphomenav/index.html
浏览文件 @
0df51814
...
...
@@ -100,10 +100,10 @@
<tr>
<th>
名称
</th>
<th
class=
"am-hide-sm-only"
>
所属平台
</th>
<th>
导航图标
</th>
<th
class=
"am-hide-sm-only"
>
导航图标
</th>
<th
class=
"am-hide-sm-only"
>
事件值
</th>
<th
class=
"am-hide-sm-only"
>
登录
</th>
<th
class=
"am-hide-sm-only"
>
启用
</th>
<th>
启用
</th>
<th>
更多
</th>
<th>
操作
</th>
</tr>
...
...
@@ -114,7 +114,7 @@
<tr
id=
"data-list-{{$v.id}}"
{{
if
$
v
['
is_enable
']
eq
0}}
class=
"am-active"
{{/
if
}}
>
<td>
{{$v.name}}
</td>
<td
class=
"am-hide-sm-only"
>
{{$v.platform_text}}
</td>
<td>
<td
class=
"am-hide-sm-only"
>
<div
class=
"am-circle nav-icon-circle am-vertical-align"
{{
if
!
empty
($
v
['
bg_color
'])}}
style=
"background-color:{{$v.bg_color}};"
{{/
if
}}
>
{{if !empty($v['images_url'])}}
<a
href=
"{{$v['images_url']}}"
target=
"_blank"
>
...
...
@@ -134,7 +134,7 @@
<td
class=
"am-hide-sm-only"
>
<a
href=
"javascript:;"
class=
"am-icon-btn am-icon-check submit-state {{if $v['is_need_login'] eq 1}}am-success{{else /}}am-default{{/if}}"
data-url=
"{{:MyUrl('admin/apphomenav/statusupdate')}}"
data-id=
"{{$v.id}}"
data-state=
"{{$v['is_need_login']}}"
data-field=
"is_need_login"
></a>
</td>
<td
class=
"am-hide-sm-only"
>
<td>
<a
href=
"javascript:;"
class=
"am-icon-btn am-icon-check submit-state {{if $v['is_enable'] eq 1}}am-success{{else /}}am-default{{/if}}"
data-url=
"{{:MyUrl('admin/apphomenav/statusupdate')}}"
data-id=
"{{$v.id}}"
data-state=
"{{$v['is_enable']}}"
data-field=
"is_enable"
data-is-update-status=
"1"
></a>
</td>
<td>
...
...
application/admin/view/default/goods/index.html
浏览文件 @
0df51814
...
...
@@ -215,6 +215,16 @@
<dt>
访问次数
</dt>
<dd>
{{$v.access_count}}
</dd>
<dt>
电脑端详情
</dt>
<dd>
<div
class=
"am-scrollable-vertical web-content"
>
{{$v.content_web|raw}}
</div>
</dd>
<dt>
虚拟商品展示数据
</dt>
<dd>
<div
class=
"am-scrollable-vertical virtual-goods-value"
>
{{$v.virtual_goods_value|raw}}
</div>
</dd>
<dt>
SEO标题
</dt>
<dd>
{{$v.seo_title}}
</dd>
...
...
application/admin/view/default/goods/save_info.html
浏览文件 @
0df51814
...
...
@@ -19,28 +19,31 @@
<nav
class=
"goods-nav"
>
<ul>
<li>
<a
href=
"#goods-nav-base"
>
基础信息
</a>
<a
href=
"
javascript:;"
data-value=
"
#goods-nav-base"
>
基础信息
</a>
</li>
<li>
<a
href=
"#goods-nav-operations"
>
商品规格
</a>
<a
href=
"
javascript:;"
data-value=
"
#goods-nav-operations"
>
商品规格
</a>
</li>
<li>
<a
href=
"#goods-nav-photo"
>
商品相册
</a>
<a
href=
"
javascript:;"
data-value=
"
#goods-nav-photo"
>
商品相册
</a>
</li>
<li>
<a
href=
"#goods-nav-video"
>
商品视频
</a>
<a
href=
"
javascript:;"
data-value=
"
#goods-nav-video"
>
商品视频
</a>
</li>
<li>
<a
href=
"#goods-nav-app"
>
手机端详情
</a>
<a
href=
"
javascript:;"
data-value=
"
#goods-nav-app"
>
手机端详情
</a>
</li>
<li>
<a
href=
"#goods-nav-web"
>
电脑端详情
</a>
<a
href=
"
javascript:;"
data-value=
"
#goods-nav-web"
>
电脑端详情
</a>
</li>
<li>
<a
href=
"
#goods-nav-extends"
>
扩展数据
</a>
<a
href=
"
javascript:;"
data-value=
"#goods-nav-virtual"
>
虚拟商品
</a>
</li>
<li>
<a
href=
"#goods-nav-seo"
>
SEO
</a>
<a
href=
"javascript:;"
data-value=
"#goods-nav-extends"
>
扩展数据
</a>
</li>
<li>
<a
href=
"javascript:;"
data-value=
"#goods-nav-seo"
>
SEO
</a>
</li>
<li
class=
"am-text-center am-padding-xs nav-shrink-submit"
>
<i
class=
"am-icon-angle-double-right am-icon-sm"
></i>
...
...
@@ -506,6 +509,14 @@
</div>
</div>
<!-- 虚拟商品 -->
<div
id=
"goods-nav-virtual"
class=
"division-block"
>
<label
class=
"block nav-detail-title"
>
虚拟商品
<span
class=
"am-form-group-label-tips"
>
用户下单后自动发货,用于将该数据展示在用户订单中
</span></label>
<div
class=
"am-form-group"
>
<script
type=
"text/plain"
id=
"goods-virtual-container"
name=
"virtual_goods_value"
>
{{
if
!
empty
(
$data
)}}{{
$data
.
virtual_goods_value
|
raw
}}{{
/
if
}}
</script>
</div>
</div>
<!-- 扩展数据 -->
<div
id=
"goods-nav-extends"
class=
"division-block"
>
<label
class=
"block nav-detail-title"
>
扩展数据
<span
class=
"am-form-group-label-tips-must"
>
该区域为插件扩展数据,请按照插件文档填写相应的值
</span></label>
...
...
application/admin/view/default/slide/index.html
浏览文件 @
0df51814
...
...
@@ -89,11 +89,11 @@
<thead>
<tr>
<th>
名称
</th>
<th>
所属平台
</th>
<th
>
轮播
图片
</th>
<th>
事件值
</th>
<th>
是否
启用
</th>
<th>
创建时间
</th>
<th
class=
"am-hide-sm-only"
>
所属平台
</th>
<th
class=
"am-hide-sm-only"
>
图片
</th>
<th
class=
"am-hide-sm-only"
>
事件值
</th>
<th>
启用
</th>
<th>
更多
</th>
<th>
操作
</th>
</tr>
</thead>
...
...
@@ -102,8 +102,8 @@
{{foreach $data_list as $v}}
<tr
id=
"data-list-{{$v.id}}"
{{
if
$
v
['
is_enable
']
eq
0}}
class=
"am-active"
{{/
if
}}
>
<td>
{{$v.name}}
</td>
<td>
{{$v.platform_text}}
</td>
<td
{{
if
!
empty
($
v
['
bg_color
'])}}
style=
"background-color:{{$v.bg_color}};"
{{/
if
}}
>
<td
class=
"am-hide-sm-only"
>
{{$v.platform_text}}
</td>
<td
class=
"am-hide-sm-only"
{{
if
!
empty
($
v
['
bg_color
'])}}
style=
"background-color:{{$v.bg_color}};"
{{/
if
}}
>
{{if !empty($v['images_url'])}}
<a
href=
"{{$v['images_url']}}"
target=
"_blank"
>
<img
src=
"{{$v['images_url']}}"
class=
"am-radius"
width=
"100"
height=
"60"
/>
...
...
@@ -112,18 +112,68 @@
<span
class=
"cr-ddd"
>
暂无图片
</span>
{{/if}}
</td>
<td>
<td
class=
"am-hide-sm-only"
>
{{$v.event_value}}
{{if !empty($v['event_value']) and !empty($v['event_type_text'])}}
<br
/><span
class=
"am-badge am-badge-warning am-radius"
>
{{$v.event_type_text}}
</span>
{{/if}}
</td>
<td
class=
"am-hide-sm-only"
>
<td>
<a
href=
"javascript:;"
class=
"am-icon-btn am-icon-check submit-state {{if $v['is_enable'] eq 1}}am-success{{else /}}am-default{{/if}}"
data-url=
"{{:MyUrl('admin/slide/statusUpdate')}}"
data-id=
"{{$v.id}}"
data-state=
"{{$v['is_enable']}}"
data-is-update-status=
"1"
></a>
</td>
<td>
{{$v.add_time_time}}
</td>
<td>
<span
class=
"am-icon-caret-down c-p"
data-am-modal=
"{target: '#my-popup{{$v.id}}'}"
>
查看更多
</span>
<div
class=
"am-popup am-radius"
id=
"my-popup{{$v.id}}"
>
<div
class=
"am-popup-inner"
>
<div
class=
"am-popup-hd"
>
<h4
class=
"am-popup-title"
>
详情内容
</h4>
<span
data-am-modal-close
class=
"am-close"
>
×
</span>
</div>
<div
class=
"am-popup-bd"
>
<dl
class=
"dl-content"
>
<dt>
名称
</dt>
<dd>
{{$v.name}}
</dd>
<dt>
所属平台
</dt>
<dd>
{{$v.platform_text}}
</dd>
<dt>
图片
</dt>
<dd>
{{if !empty($v['images_url'])}}
<a
href=
"{{$v['images_url']}}"
target=
"_blank"
>
<img
src=
"{{$v['images_url']}}"
class=
"am-radius"
width=
"100"
height=
"60"
/>
</a>
{{else /}}
<span
class=
"cr-ddd"
>
暂无图片
</span>
{{/if}}
</dd>
<dt>
事件值
</dt>
<dd>
<div
class=
"event-value"
>
{{$v.event_value}}
{{if !empty($v['event_value'])}}
<br
/><span
class=
"am-badge am-badge-warning am-radius"
>
{{$v.event_type_text}}
</span>
{{/if}}
</div>
</dd>
<dt>
启用
</dt>
<dd>
{{$v.is_enable_text}}
</dd>
<dt>
创建时间
</dt>
<dd>
{{$v.add_time_time}}
</dd>
<dt>
更新时间
</dt>
<dd>
{{$v.upd_time_time}}
</dd>
</dl>
</div>
</div>
</div>
</td>
<td
class=
"view-operation"
>
<a
href=
"{{:MyUrl('admin/slide/saveinfo', array
('id'=>$v['id'
]))}}"
>
<a
href=
"{{:MyUrl('admin/slide/saveinfo', array
_merge($params, ['id'=>$v['id']
]))}}"
>
<button
class=
"am-btn am-btn-secondary am-btn-xs am-radius am-icon-edit"
>
编辑
</button>
</a>
<button
class=
"am-btn am-btn-danger am-btn-xs am-radius am-icon-trash-o submit-delete"
data-url=
"{{:MyUrl('admin/slide/delete')}}"
data-id=
"{{$v.id}}"
>
删除
</button>
...
...
application/admin/view/default/slide/save_info.html
浏览文件 @
0df51814
...
...
@@ -4,7 +4,7 @@
<div
class=
"content-right"
>
<div
class=
"content"
>
<!-- form start -->
<form
class=
"am-form form-validation view-save"
action=
"{{:MyUrl('admin/slide/save')}}"
method=
"POST"
request-type=
"ajax-url"
request-value=
"{{:MyUrl('admin/slide/index')}}"
enctype=
"multipart/form-data"
>
<form
class=
"am-form form-validation view-save"
action=
"{{:MyUrl('admin/slide/save')}}"
method=
"POST"
request-type=
"ajax-url"
request-value=
"{{:MyUrl('admin/slide/index'
, $params
)}}"
enctype=
"multipart/form-data"
>
<legend>
<span
class=
"am-text-default"
>
{{if empty($data['id'])}}
...
...
@@ -13,7 +13,7 @@
轮播编辑
{{/if}}
</span>
<a
href=
"{{:MyUrl('admin/slide/index')}}"
class=
"am-fr am-text-sm am-margin-top-xs am-icon-mail-reply"
>
返回
</a>
<a
href=
"{{:MyUrl('admin/slide/index'
, $params
)}}"
class=
"am-fr am-text-sm am-margin-top-xs am-icon-mail-reply"
>
返回
</a>
</legend>
<div
class=
"am-form-group"
>
<label>
名称
</label>
...
...
application/index/controller/Buy.php
浏览文件 @
0df51814
...
...
@@ -15,6 +15,7 @@ use app\service\GoodsService;
use
app\service\UserService
;
use
app\service\PaymentService
;
use
app\service\BuyService
;
use
app\service\ConfigService
;
/**
* 购买
...
...
@@ -55,8 +56,23 @@ class Buy extends Common
session
(
'buy_post_data'
,
$_POST
);
return
redirect
(
MyUrl
(
'index/buy/index'
));
}
else
{
// 获取商品列表
$params
=
array_merge
(
input
(),
session
(
'buy_post_data'
));
// 站点类型,是否开启了展示型
if
(
MyC
(
'common_site_type'
,
0
,
true
)
==
1
)
{
$this
->
assign
(
'msg'
,
'展示型不允许提交订单'
);
return
$this
->
fetch
(
'public/tips_error'
);
}
// 获取下单信息
$data
=
session
(
'buy_post_data'
);
if
(
empty
(
$data
))
{
$this
->
assign
(
'msg'
,
'商品信息为空'
);
return
$this
->
fetch
(
'public/tips_error'
);
}
// 参数
$params
=
array_merge
(
input
(),
$data
);
$params
[
'user'
]
=
$this
->
user
;
$ret
=
BuyService
::
BuyTypeGoodsList
(
$params
);
...
...
@@ -69,6 +85,9 @@ class Buy extends Common
// 支付方式
$this
->
assign
(
'payment_list'
,
PaymentService
::
BuyPaymentList
([
'is_enable'
=>
1
,
'is_open_user'
=>
1
]));
// 站点类型 - 自提模式下提货地址
$this
->
assign
(
'common_self_extraction_address'
,
ConfigService
::
SiteTypeExtractionAddressList
());
// 页面数据
$this
->
assign
(
'base'
,
$ret
[
'data'
][
'base'
]);
...
...
application/index/controller/Common.php
浏览文件 @
0df51814
...
...
@@ -213,6 +213,9 @@ class Common extends Controller
// 公共参数
$this
->
assign
(
'params'
,
$this
->
params
);
// 站点类型
$this
->
assign
(
'common_site_type'
,
MyC
(
'common_site_type'
,
0
,
true
));
// 商店信息
$this
->
assign
(
'common_customer_store_tel'
,
MyC
(
'common_customer_store_tel'
));
$this
->
assign
(
'common_customer_store_email'
,
MyC
(
'common_customer_store_email'
));
...
...
application/index/controller/Goods.php
浏览文件 @
0df51814
...
...
@@ -129,6 +129,9 @@ class Goods extends Common
$like_goods
=
GoodsService
::
GoodsList
(
$params
);
$this
->
assign
(
'detail_like_goods'
,
$like_goods
[
'data'
]);
// 站点类型 - 展示型模式操作名称
$this
->
assign
(
'common_is_exhibition_mode_btn_text'
,
MyC
(
'common_is_exhibition_mode_btn_text'
,
'立即咨询'
,
true
));
return
$this
->
fetch
();
}
}
...
...
application/index/view/default/goods/index.html
浏览文件 @
0df51814
...
...
@@ -312,7 +312,7 @@
</div>
<!-- 购买导航 -->
<div
class=
"buy-nav"
>
<div
class=
"buy-nav
{{if $common_site_type eq 1}}exhibition-nav{{/if}}
"
>
{{if !empty($goods.is_shelves)}}
{{if $goods['inventory'] gt 0}}
<div
class=
"buy-nav-opt"
>
...
...
@@ -330,25 +330,39 @@
</span>
{{/if}}
</div>
<div
class=
"submit"
>
<div
class=
"clearfix tb-btn tb-btn-buy buy-event login-event buy-submit"
data-type=
"buy"
>
<button
title=
"点此按钮到下一步确认购买信息"
href=
"javascript:;"
type=
"button"
>
立即购买
</button>
<!-- 站点模式 1 展示型 -->
{{if $common_site_type eq 1}}
<div
class=
"submit"
>
<div
class=
"clearfix tb-btn tb-btn-basket"
data-type=
"cart"
data-ajax-url=
"{{:MyUrl('index/Cart/Save')}}"
>
<a
href=
"{{if empty($common_customer_store_tel)}}javascript:;{{else /}}tel:{{$common_customer_store_tel}}{{/if}}"
>
<button
title=
"{{$common_is_exhibition_mode_btn_text}}"
href=
"javascript:;"
type=
"button"
><i
class=
"am-icon-phone"
></i>
{{$common_is_exhibition_mode_btn_text}}
</button>
</a>
</div>
</div>
</div>
<div
class=
"submit"
>
<div
class=
"clearfix tb-btn tb-btn-basket buy-event login-event cart-submit"
data-type=
"cart"
data-ajax-url=
"{{:MyUrl('index/Cart/Save')}}"
>
<button
title=
"加入购物车"
href=
"javascript:;"
type=
"button"
><i></i>
加入购物车
</button>
<!-- 销售型,自提点,虚拟销售 -->
{{else /}}
<div
class=
"submit"
>
<div
class=
"clearfix tb-btn tb-btn-buy buy-event login-event buy-submit"
data-type=
"buy"
>
<button
title=
"点此按钮到下一步确认购买信息"
href=
"javascript:;"
type=
"button"
>
立即购买
</button>
</div>
</div>
<div
class=
"submit"
>
<div
class=
"clearfix tb-btn tb-btn-basket buy-event login-event cart-submit"
data-type=
"cart"
data-ajax-url=
"{{:MyUrl('index/Cart/Save')}}"
>
<button
title=
"加入购物车"
href=
"javascript:;"
type=
"button"
><i></i>
加入购物车
</button>
</div>
</div>
</div>
<!-- 购买表单 -->
<form
action=
"{{:MyUrl('index/buy/index')}}"
method=
"post"
class=
"buy-form"
>
<input
type=
"hidden"
name=
"goods_id"
value=
"{{$goods.id}}"
/>
<input
type=
"hidden"
name=
"buy_type"
value=
"goods"
/>
<input
type=
"hidden"
name=
"stock"
value=
"1"
/>
<input
type=
"hidden"
name=
"spec"
value=
""
/>
<button
type=
"submit"
></button>
</form>
<!-- 购买表单 -->
<form
action=
"{{:MyUrl('index/buy/index')}}"
method=
"post"
class=
"buy-form"
>
<input
type=
"hidden"
name=
"goods_id"
value=
"{{$goods.id}}"
/>
<input
type=
"hidden"
name=
"buy_type"
value=
"goods"
/>
<input
type=
"hidden"
name=
"stock"
value=
"1"
/>
<input
type=
"hidden"
name=
"spec"
value=
""
/>
<button
type=
"submit"
></button>
</form>
{{/if}}
{{else /}}
<p
class=
"goods-not-buy-tips"
>
商品卖光了
</p>
{{/if}}
...
...
application/service/BuyService.php
浏览文件 @
0df51814
...
...
@@ -775,6 +775,12 @@ class BuyService
*/
public
static
function
OrderAdd
(
$params
=
[])
{
// 站点类型,是否开启了展示型
if
(
MyC
(
'common_site_type'
,
0
,
true
)
==
1
)
{
return
DataReturn
(
'展示型不允许提交订单'
,
-
1
);
}
// 请求参数
$p
=
[
[
...
...
application/service/ConfigService.php
浏览文件 @
0df51814
...
...
@@ -267,5 +267,35 @@ class ConfigService
return
DataReturn
(
'操作成功'
,
0
,
$data
);
}
/**
* 站点自提模式 - 自提地址列表
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2019-11-13
* @desc description
* @param [string] $value [自提的配置数据]
*/
public
static
function
SiteTypeExtractionAddressList
(
$value
=
null
)
{
// 未指定内容则从缓存读取
if
(
empty
(
$value
))
{
$value
=
MyC
(
'common_self_extraction_address'
);
}
// 数据处理
$data
=
[];
if
(
!
empty
(
$value
)
&&
is_string
(
$value
))
{
$temp_data
=
json_decode
(
$value
,
true
);
if
(
!
empty
(
$temp_data
)
&&
is_array
(
$temp_data
))
{
$data
=
$temp_data
;
}
}
return
DataReturn
(
'操作成功'
,
0
,
$data
);
}
}
?>
\ No newline at end of file
application/service/GoodsService.php
浏览文件 @
0df51814
...
...
@@ -353,6 +353,12 @@ class GoodsService
$v
[
'content_web'
]
=
ResourcesService
::
ContentStaticReplace
(
$v
[
'content_web'
],
'get'
);
}
// 虚拟商品展示数据
if
(
isset
(
$v
[
'virtual_goods_value'
]))
{
$v
[
'virtual_goods_value'
]
=
ResourcesService
::
ContentStaticReplace
(
$v
[
'virtual_goods_value'
],
'get'
);
}
// 产地
if
(
isset
(
$v
[
'place_origin'
]))
{
...
...
@@ -1109,6 +1115,7 @@ class GoodsService
// 编辑器内容
$content_web
=
empty
(
$params
[
'content_web'
])
?
''
:
ResourcesService
::
ContentStaticReplace
(
htmlspecialchars_decode
(
$params
[
'content_web'
]),
'add'
);
$virtual_goods_value
=
empty
(
$params
[
'virtual_goods_value'
])
?
''
:
ResourcesService
::
ContentStaticReplace
(
htmlspecialchars_decode
(
$params
[
'virtual_goods_value'
]),
'add'
);
// 基础数据
$data
=
[
...
...
@@ -1135,6 +1142,7 @@ class GoodsService
'seo_desc'
=>
empty
(
$params
[
'seo_desc'
])
?
''
:
$params
[
'seo_desc'
],
'is_exist_many_spec'
=>
empty
(
$specifications
[
'data'
][
'title'
])
?
0
:
1
,
'spec_base'
=>
empty
(
$specifications_base
[
'data'
])
?
''
:
json_encode
(
$specifications_base
[
'data'
]),
'virtual_goods_value'
=>
$virtual_goods_value
,
];
// 商品保存处理钩子
...
...
config/shopxo.sql
浏览文件 @
0df51814
此差异已折叠。
点击以展开。
public/static/admin/default/css/goods.css
浏览文件 @
0df51814
...
...
@@ -12,6 +12,13 @@
float
:
left
;
margin-right
:
5px
;
}
.goods-list.am-table
dl
.web-content
img
,
.goods-list.am-table
dl
.virtual-goods-value
img
{
max-width
:
100%
;
}
.goods-list.am-table
dl
.virtual-goods-value
{
height
:
100px
;
}
/**
* 滚动导航
...
...
public/static/admin/default/css/slide.css
浏览文件 @
0df51814
...
...
@@ -4,6 +4,7 @@
@media
only
screen
and
(
max-width
:
321px
)
{
.view-operation
button
{
margin
:
2px
0px
;
}
}
.event-value
{
max-width
:
260px
;
word-wrap
:
break-word
;
word-break
:
break-all
;
}
/**
* 覆盖插件样式
...
...
public/static/admin/default/js/goods.js
浏览文件 @
0df51814
...
...
@@ -55,8 +55,12 @@ $(function()
// 商品导航
$
(
'
.goods-nav li a
'
).
on
(
'
click
'
,
function
()
{
// 样式
$
(
'
.goods-nav li a
'
).
removeClass
(
'
goods-nav-active
'
);
$
(
this
).
addClass
(
'
goods-nav-active
'
);
// 滚动
$
(
window
).
smoothScroll
({
position
:
$
(
$
(
this
).
data
(
'
value
'
)).
offset
().
top
});
});
// 商品导航收缩
...
...
@@ -667,4 +671,14 @@ $(function()
onCancel
:
function
(){}
});
});
// 虚拟商品编辑器初始化
if
(
$
(
'
#goods-virtual-container
'
).
length
>
0
)
{
UE
.
getEditor
(
'
goods-virtual-container
'
,
{
toolbars
:
[[
'
source
'
,
'
undo
'
,
'
redo
'
,
'
bold
'
,
'
italic
'
,
'
underline
'
,
'
fontborder
'
,
'
strikethrough
'
,
'
|
'
,
'
forecolor
'
,
'
backcolor
'
,
'
link
'
,
'
fontsize
'
,
'
insertorderedlist
'
,
'
insertunorderedlist
'
]],
initialFrameHeight
:
100
});
}
});
\ No newline at end of file
public/static/index/default/css/goods.css
浏览文件 @
0df51814
...
...
@@ -447,4 +447,11 @@ ul.detail-attr li {height: 26px;overflow: hidden;line-height: 26px;vertical-alig
/* 底部 */
.am-footer
{
padding-bottom
:
35px
;
}
}
/* 展示模式 */
.exhibition-nav
div
.submit
{
width
:
60%
;
}
@media
only
screen
and
(
min-width
:
641px
)
{
.exhibition-nav
.buy-nav-opt
{
margin-left
:
120px
;
}
}
\ No newline at end of file
public/static/index/default/js/goods.js
浏览文件 @
0df51814
...
...
@@ -656,24 +656,21 @@ $(function() {
GoodsCommentsHtml
(
page
);
// 回到评论顶部位置
var
top
=
$
(
'
.introduce-main
'
).
offset
().
top
;
$
(
window
).
smoothScroll
({
position
:
top
});
$
(
window
).
smoothScroll
({
position
:
$
(
'
.introduce-main
'
).
offset
().
top
});
}
});
// 累计评价点击事件
$
(
'
.tm-ind-panel .ind-panel-comment
'
).
on
(
'
click
'
,
function
()
{
var
top
=
$
(
'
.introduce-main
'
).
offset
().
top
;
$
(
window
).
smoothScroll
({
position
:
top
});
$
(
window
).
smoothScroll
({
position
:
$
(
'
.introduce-main
'
).
offset
().
top
});
$
(
'
.introduce-main .am-tabs
'
).
tabs
(
'
open
'
,
1
);
});
// tab事件
$
(
'
.introduce-main .am-tabs li
'
).
on
(
'
click
'
,
function
()
{
var
top
=
$
(
'
.introduce-main
'
).
offset
().
top
;
$
(
window
).
smoothScroll
({
position
:
top
});
$
(
window
).
smoothScroll
({
position
:
$
(
'
.introduce-main
'
).
offset
().
top
});
});
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录