Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
纵之格
ShopXO
提交
f95f93fc
ShopXO
项目概览
纵之格
/
ShopXO
通知
394
Star
16
Fork
11
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f95f93fc
编写于
6月 28, 2019
作者:
G
gongfuxiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
细节优化
上级
986f7068
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
59 addition
and
25 deletion
+59
-25
application/admin/view/default/appconfig/index.html
application/admin/view/default/appconfig/index.html
+8
-0
application/api/controller/Goods.php
application/api/controller/Goods.php
+24
-2
config/shopxo.sql
config/shopxo.sql
+21
-21
public/appmini/old/alipay/pages/goods-detail/goods-detail.axml
...c/appmini/old/alipay/pages/goods-detail/goods-detail.axml
+3
-1
public/appmini/old/weixin/pages/goods-detail/goods-detail.wxml
...c/appmini/old/weixin/pages/goods-detail/goods-detail.wxml
+3
-1
未找到文件。
application/admin/view/default/appconfig/index.html
浏览文件 @
f95f93fc
...
@@ -21,6 +21,14 @@
...
@@ -21,6 +21,14 @@
{{/foreach}}
{{/foreach}}
</select>
</select>
</div>
</div>
<div
class=
"am-form-group"
>
<label>
{{$data.common_app_is_use_mobile_detail.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.common_app_is_use_mobile_detail.describe}}
</span></label>
<select
name=
"{{$data.common_app_is_use_mobile_detail.only_tag}}"
class=
"am-radius chosen-select c-p"
data-validation-message=
"{{$data.common_app_is_use_mobile_detail.error_tips}}"
required
>
{{foreach $common_is_text_list as $v}}
<option
value=
"{{$v.id}}"
{{
if
isset
($
data
['
common_app_is_use_mobile_detail
']['
value
'])
and
$
data
['
common_app_is_use_mobile_detail
']['
value
']
eq
$
v
['
id
']}}
selected
{{/
if
}}
>
{{$v.name}}
</option>
{{/foreach}}
</select>
</div>
<div
class=
"am-form-group"
>
<div
class=
"am-form-group"
>
<label>
{{$data.common_app_customer_service_tel.name}}
</label>
<label>
{{$data.common_app_customer_service_tel.name}}
</label>
<input
type=
"text"
name=
"{{$data.common_app_customer_service_tel.only_tag}}"
placeholder=
"{{$data.common_app_customer_service_tel.name}}"
data-validation-message=
"{{$data.common_app_customer_service_tel.error_tips}}"
class=
"am-radius"
{{
if
!
empty
($
data
)}}
value=
"{{$data.common_app_customer_service_tel.value}}"
{{/
if
}}
/>
<input
type=
"text"
name=
"{{$data.common_app_customer_service_tel.only_tag}}"
placeholder=
"{{$data.common_app_customer_service_tel.name}}"
data-validation-message=
"{{$data.common_app_customer_service_tel.error_tips}}"
class=
"am-radius"
{{
if
!
empty
($
data
)}}
value=
"{{$data.common_app_customer_service_tel.value}}"
{{/
if
}}
/>
...
...
application/api/controller/Goods.php
浏览文件 @
f95f93fc
...
@@ -50,6 +50,9 @@ class Goods extends Common
...
@@ -50,6 +50,9 @@ class Goods extends Common
return
DataReturn
(
'参数有误'
,
-
1
);
return
DataReturn
(
'参数有误'
,
-
1
);
}
}
// 商品详情方式
$is_use_mobile_detail
=
intval
(
MyC
(
'common_app_is_use_mobile_detail'
));
// 获取商品
// 获取商品
$goods_id
=
intval
(
$this
->
data_post
[
'goods_id'
]);
$goods_id
=
intval
(
$this
->
data_post
[
'goods_id'
]);
$params
=
[
$params
=
[
...
@@ -59,14 +62,32 @@ class Goods extends Common
...
@@ -59,14 +62,32 @@ class Goods extends Common
],
],
'is_photo'
=>
true
,
'is_photo'
=>
true
,
'is_spec'
=>
true
,
'is_spec'
=>
true
,
'is_content_app'
=>
true
,
'is_content_app'
=>
(
$is_use_mobile_detail
==
1
)
,
];
];
$ret
=
GoodsService
::
GoodsList
(
$params
);
$ret
=
GoodsService
::
GoodsList
(
$params
);
if
(
empty
(
$ret
[
'data'
][
0
])
||
$ret
[
'data'
][
0
][
'is_delete_time'
]
!=
0
)
if
(
empty
(
$ret
[
'data'
][
0
])
||
$ret
[
'data'
][
0
][
'is_delete_time'
]
!=
0
)
{
{
return
DataReturn
(
'商品不存在或已删除'
,
-
1
);
return
DataReturn
(
'商品不存在或已删除'
,
-
1
);
}
}
// 商品详情处理
if
(
$is_use_mobile_detail
==
1
)
{
unset
(
$ret
[
'data'
][
0
][
'content_web'
]);
unset
(
$ret
[
'data'
][
0
][
'content_web'
]);
}
else
{
// 标签处理,兼容小程序rich-text
$search
=
[
'<img '
,
'<section'
,
'/section>'
];
$replace
=
[
'<img style="max-width:100%;margin:0;display:block;" '
,
'<div'
,
'/div>'
,
];
$ret
[
'data'
][
0
][
'content_web'
]
=
str_replace
(
$search
,
$replace
,
$ret
[
'data'
][
0
][
'content_web'
]);
}
// 当前登录用户是否已收藏
// 当前登录用户是否已收藏
$ret_favor
=
GoodsService
::
IsUserGoodsFavor
([
'goods_id'
=>
$goods_id
,
'user'
=>
$this
->
user
]);
$ret_favor
=
GoodsService
::
IsUserGoodsFavor
([
'goods_id'
=>
$goods_id
,
'user'
=>
$this
->
user
]);
...
@@ -82,6 +103,7 @@ class Goods extends Common
...
@@ -82,6 +103,7 @@ class Goods extends Common
$result
=
[
$result
=
[
'goods'
=>
$ret
[
'data'
][
0
],
'goods'
=>
$ret
[
'data'
][
0
],
'common_order_is_booking'
=>
(
int
)
MyC
(
'common_order_is_booking'
,
0
),
'common_order_is_booking'
=>
(
int
)
MyC
(
'common_order_is_booking'
,
0
),
'is_use_mobile_detail'
=>
$is_use_mobile_detail
,
];
];
return
DataReturn
(
'success'
,
0
,
$result
);
return
DataReturn
(
'success'
,
0
,
$result
);
}
}
...
...
config/shopxo.sql
浏览文件 @
f95f93fc
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
public/appmini/old/alipay/pages/goods-detail/goods-detail.axml
浏览文件 @
f95f93fc
...
@@ -50,7 +50,9 @@
...
@@ -50,7 +50,9 @@
<text class="text-wrapper">详情</text>
<text class="text-wrapper">详情</text>
</view>
</view>
<!-- web详情 -->
<!-- web详情 -->
<rich-text a:if="{{is_use_mobile_detail == 0}}" nodes="{{goods.content_web || ''}}"></rich-text>
<view a:if="{{is_use_mobile_detail == 0}}" class="bg-white">
<rich-text nodes="{{goods.content_web || ''}}"></rich-text>
</view>
<!-- 手机独立详情 -->
<!-- 手机独立详情 -->
<block a:if="{{is_use_mobile_detail == 1 && goods_content_app.length > 0}}">
<block a:if="{{is_use_mobile_detail == 1 && goods_content_app.length > 0}}">
<view a:for="{{goods_content_app}}" class="goods-detail-app bg-white">
<view a:for="{{goods_content_app}}" class="goods-detail-app bg-white">
...
...
public/appmini/old/weixin/pages/goods-detail/goods-detail.wxml
浏览文件 @
f95f93fc
...
@@ -61,7 +61,9 @@
...
@@ -61,7 +61,9 @@
<text class="text-wrapper">详情</text>
<text class="text-wrapper">详情</text>
</view>
</view>
<!-- web详情 -->
<!-- web详情 -->
<rich-text wx:if="{{is_use_mobile_detail == 0}}" nodes="{{goods.content_web || ''}}"></rich-text>
<view wx:if="{{is_use_mobile_detail == 0}}" class="bg-white">
<rich-text nodes="{{goods.content_web || ''}}"></rich-text>
</view>
<!-- 手机独立详情 -->
<!-- 手机独立详情 -->
<block wx:if="{{is_use_mobile_detail == 1 && goods_content_app.length > 0}}">
<block wx:if="{{is_use_mobile_detail == 1 && goods_content_app.length > 0}}">
<view wx:for="{{goods_content_app}}" wx:key="key" class="goods-detail-app bg-white">
<view wx:for="{{goods_content_app}}" wx:key="key" class="goods-detail-app bg-white">
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录