Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
飞鱼0526
ShopXO
提交
5d33d37d
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,发现更多精彩内容 >>
提交
5d33d37d
编写于
10月 11, 2019
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
评论新增支持图片
上级
a1fd5d17
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
106 addition
and
64 deletion
+106
-64
application/admin/view/default/goodscomments/index.html
application/admin/view/default/goodscomments/index.html
+27
-0
application/admin/view/default/orderaftersale/index.html
application/admin/view/default/orderaftersale/index.html
+3
-1
application/index/controller/Common.php
application/index/controller/Common.php
+1
-1
application/index/controller/Order.php
application/index/controller/Order.php
+3
-0
application/index/view/default/goods/index.html
application/index/view/default/goods/index.html
+18
-16
application/index/view/default/order/comments.html
application/index/view/default/order/comments.html
+9
-3
application/service/BuyService.php
application/service/BuyService.php
+0
-5
application/service/GoodsCommentsService.php
application/service/GoodsCommentsService.php
+1
-2
config/shopxo.sql
config/shopxo.sql
+28
-33
public/appmini/old/alipay/pages/goods-comment/goods-comment.axml
...appmini/old/alipay/pages/goods-comment/goods-comment.axml
+1
-1
public/appmini/old/baidu/pages/goods-comment/goods-comment.swan
.../appmini/old/baidu/pages/goods-comment/goods-comment.swan
+1
-1
public/appmini/old/weixin/pages/goods-comment/goods-comment.wxml
...appmini/old/weixin/pages/goods-comment/goods-comment.wxml
+1
-1
public/static/admin/default/css/goodscomments.css
public/static/admin/default/css/goodscomments.css
+7
-0
public/static/index/default/css/order.comments.css
public/static/index/default/css/order.comments.css
+4
-0
public/static/index/default/js/order.js
public/static/index/default/js/order.js
+2
-0
未找到文件。
application/admin/view/default/goodscomments/index.html
浏览文件 @
5d33d37d
...
...
@@ -98,6 +98,7 @@
<th
class=
"am-hide-md-down"
>
用户信息
</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>
...
...
@@ -142,6 +143,21 @@
{{$v.content}}
</div>
</td>
<td
class=
"am-hide-sm-only"
>
{{if !empty($v['images'])}}
<div
data-am-widget=
"slider"
class=
"am-slider am-slider-a1"
data-am-slider=
'{"directionNav":false, slideshow:false}'
>
<ul
class=
"am-slides"
>
{{foreach $v.images as $img}}
<li>
<a
href=
"{{$img}}"
target=
"_blank"
>
<img
src=
"{{$img}}"
/>
</a>
</li>
{{/foreach}}
</ul>
</div>
{{/if}}
</td>
<td
class=
"am-hide-sm-only"
>
<span
class=
"am-badge am-radius {{$common_goods_comments_rating_list[$v['rating']]['badge']}}"
>
{{$v.rating_text}}
</span>
</td>
...
...
@@ -201,6 +217,17 @@
<dt>
评论内容
</dt>
<dd>
{{$v.content}}
</dd>
<dt>
评论图片
</dt>
<dd>
{{if !empty($v['images'])}}
{{foreach $v.images as $img}}
<a
href=
"{{$img}}"
target=
"_blank"
>
<img
src=
"{{$img}}"
class=
"am-img-thumbnail"
width=
"80"
height=
"80"
/>
</a>
{{/foreach}}
{{/if}}
</dd>
<dt>
评分
</dt>
<dd>
<span
class=
"am-badge am-radius {{$common_goods_comments_rating_list[$v['rating']]['badge']}}"
>
{{$v.rating_text}}
</span>
...
...
application/admin/view/default/orderaftersale/index.html
浏览文件 @
5d33d37d
...
...
@@ -137,7 +137,9 @@
<ul
class=
"am-slides"
>
{{foreach $v.images as $img}}
<li>
<img
src=
"{{$img}}"
/>
<a
href=
"{{$img}}"
target=
"_blank"
>
<img
src=
"{{$img}}"
/>
</a>
</li>
{{/foreach}}
</ul>
...
...
application/index/controller/Common.php
浏览文件 @
5d33d37d
...
...
@@ -299,7 +299,7 @@ class Common extends Controller
$this
->
assign
(
'common_bottom_nav_list'
,
NavigationService
::
BottomNavigation
([
'user'
=>
$this
->
user
]));
// 编辑器文件存放地址
$this
->
assign
(
'editor_path_type'
,
empty
(
$this
->
user
[
'id'
])
?
'public'
:
'user
_
'
.
$this
->
user
[
'id'
]);
$this
->
assign
(
'editor_path_type'
,
empty
(
$this
->
user
[
'id'
])
?
'public'
:
'user
-
'
.
$this
->
user
[
'id'
]);
}
/**
...
...
application/index/controller/Order.php
浏览文件 @
5d33d37d
...
...
@@ -171,6 +171,9 @@ class Order extends Common
{
$this
->
assign
(
'referer_url'
,
empty
(
$_SERVER
[
'HTTP_REFERER'
])
?
MyUrl
(
'index/order/index'
)
:
$_SERVER
[
'HTTP_REFERER'
]);
$this
->
assign
(
'data'
,
$data
[
'data'
][
0
]);
// 编辑器文件存放地址
$this
->
assign
(
'editor_path_type'
,
'order_comments-'
.
$this
->
user
[
'id'
]
.
'-'
.
$data
[
'data'
][
0
][
'id'
]);
return
$this
->
fetch
();
}
else
{
$this
->
assign
(
'msg'
,
'没有相关数据'
);
...
...
application/index/view/default/goods/index.html
浏览文件 @
5d33d37d
...
...
@@ -490,22 +490,24 @@
<div
class=
"am-progress am-fr"
>
{{if isset($goods_score['avg']) and $goods_score['avg'] gt 0 and !empty($goods_score['rating'])}}
{{foreach $goods_score.rating as $score}}
<div
class=
"am-progress-bar
{{switch score.rating}}
{{case 1}}
am-progress-bar-danger
{{/case}}
{{case 2}}
am-progress-bar-warning
{{/case}}
{{case 3}}
am-progress-bar-secondary
{{/case}}
{{case 5}}
am-progress-bar-success
{{/case}}
{{/switch}}"
style=
"width: {{$score.portion}}%"
>
{{$score.name}}({{$score.portion}}%)
</div>
{{if $score.portion gt 0}}
<div
class=
"am-progress-bar
{{switch score.rating}}
{{case 1}}
am-progress-bar-danger
{{/case}}
{{case 2}}
am-progress-bar-warning
{{/case}}
{{case 3}}
am-progress-bar-secondary
{{/case}}
{{case 5}}
am-progress-bar-success
{{/case}}
{{/switch}}"
style=
"width: {{$score.portion}}%"
>
{{$score.name}}({{$score.portion}}%)
</div>
{{/if}}
{{/foreach}}
{{else /}}
没有评分数据
...
...
application/index/view/default/order/comments.html
浏览文件 @
5d33d37d
...
...
@@ -36,7 +36,7 @@
</tr>
</thead>
<tbody>
{{foreach $data.items as $goods}}
{{foreach $data.items as $
key=>$
goods}}
<tr
id=
"data-list-{{$goods.id}}"
data-id=
"{{$goods.id}}"
data-goods-id=
"{{$goods.goods_id}}"
class=
"am-form-group business-form-block"
>
<td
class=
"base"
>
<div
class=
"goods-detail"
>
...
...
@@ -76,11 +76,17 @@
<li><i
class=
"am-icon-star-o am-icon-md"
></i></li>
<li><i
class=
"am-icon-star-o am-icon-md"
></i></li>
<li><i
class=
"am-icon-star-o am-icon-md"
></i></li>
<li
class=
"tips-text"
></li>
</ul>
<input
type=
"text"
name=
"rating[]"
value=
""
class=
"input-rating"
data-validation-message=
"请选择评分"
required
/>
</div>
<textarea
name=
"content[]"
class=
"am-radius"
rows=
"4"
minlength=
"6"
maxlength=
"230"
data-validation-message=
"评论内容 6~230 个字符之间"
required
></textarea>
<textarea
name=
"content[]"
class=
"am-radius"
placeholder=
"宝贝满足你的期待吗?说说它的优点和美中不足的地方吧"
rows=
"4"
minlength=
"6"
maxlength=
"230"
data-validation-message=
"评论内容 6~230 个字符之间"
required
></textarea>
<input
type=
"hidden"
name=
"goods_id[]"
value=
"{{$goods.goods_id}}"
/>
<ul
class=
"plug-file-upload-view goods-images-view-{{$key}}"
data-form-name=
"images[{{$key}}][]"
data-max-number=
"3"
data-dialog-type=
"images"
>
</ul>
<div
class=
"plug-file-upload-submit"
data-view-tag=
"ul.goods-images-view-{{$key}}"
>
+上传图片
</div>
<span
class=
"am-form-group-label-tips"
>
最多上传3张图片
</span>
</td>
</tr>
{{/foreach}}
...
...
@@ -90,7 +96,7 @@
{{/if}}
<div
class=
"am-form-group business-form-block"
>
<label
class=
"block"
>
是否匿名
</label>
<label
class=
"block"
>
是否匿名
<
span
class=
"am-form-group-label-tips"
>
开启后你写的评论会以匿名的形式展现
</span><
/label>
<input
name=
"is_anonymous"
value=
"1"
type=
"checkbox"
data-off-text=
"否"
data-on-text=
"是"
data-size=
"xs"
data-on-color=
"success"
data-off-color=
"default"
data-handle-width=
"50"
data-am-switch
/>
</div>
...
...
application/service/BuyService.php
浏览文件 @
5d33d37d
...
...
@@ -830,14 +830,10 @@ class BuyService
$address
=
$buy
[
'data'
][
'base'
][
'address'
];
}
// 店铺
$shop_id
=
0
;
// 订单写入
$order
=
[
'order_no'
=>
date
(
'YmdHis'
)
.
GetNumberCode
(
6
),
'user_id'
=>
$params
[
'user'
][
'id'
],
'shop_id'
=>
$shop_id
,
'receive_address_id'
=>
$address
[
'id'
],
'receive_name'
=>
$address
[
'name'
],
'receive_tel'
=>
$address
[
'tel'
],
...
...
@@ -888,7 +884,6 @@ class BuyService
$detail
=
[
'order_id'
=>
$order_id
,
'user_id'
=>
$params
[
'user'
][
'id'
],
'shop_id'
=>
$shop_id
,
'goods_id'
=>
$v
[
'goods_id'
],
'title'
=>
$v
[
'title'
],
'images'
=>
$v
[
'images_old'
],
...
...
application/service/GoodsCommentsService.php
浏览文件 @
5d33d37d
...
...
@@ -133,7 +133,7 @@ class GoodsCommentsService
// 获取订单信息
$order_id
=
intval
(
$params
[
'id'
]);
$where
=
[
'id'
=>
$order_id
,
'user_id'
=>
$params
[
'user'
][
'id'
],
'is_delete_time'
=>
0
,
'user_is_delete_time'
=>
0
];
$order
=
Db
::
name
(
'Order'
)
->
where
(
$where
)
->
field
(
'id,status,
shop_id,
user_is_comments'
)
->
find
();
$order
=
Db
::
name
(
'Order'
)
->
where
(
$where
)
->
field
(
'id,status,user_is_comments'
)
->
find
();
if
(
empty
(
$order
))
{
return
DataReturn
(
'资源不存在或已被删除'
,
-
1
);
...
...
@@ -155,7 +155,6 @@ class GoodsCommentsService
{
$data
=
[
'user_id'
=>
$params
[
'user'
][
'id'
],
'shop_id'
=>
$order
[
'shop_id'
],
'order_id'
=>
$order_id
,
'goods_id'
=>
$goods_id
,
'business_type'
=>
$params
[
'business_type'
],
...
...
config/shopxo.sql
浏览文件 @
5d33d37d
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
public/appmini/old/alipay/pages/goods-comment/goods-comment.axml
浏览文件 @
5d33d37d
...
...
@@ -7,7 +7,7 @@
<view class="progress fr tc">
<block a:if="{{goods_score.avg > 0}}">
<block a:for="{{goods_score.rating}}">
<view class="progress-bar {{progress_class[index]}}" style="width: {{item.portion}}%;">{{item.name}}</view>
<view
a:if="{{item.portion > 0}}"
class="progress-bar {{progress_class[index]}}" style="width: {{item.portion}}%;">{{item.name}}</view>
</block>
</block>
<text a:else class="cr-888">暂无评分</text>
...
...
public/appmini/old/baidu/pages/goods-comment/goods-comment.swan
浏览文件 @
5d33d37d
...
...
@@ -7,7 +7,7 @@
<view class="progress fr tc">
<block s-if="goods_score.avg > 0">
<block s-for="item, index in goods_score.rating" s-key="key">
<view class="progress-bar {{progress_class[index]}}" style="width: {{item.portion}}%;">{{item.name}}</view>
<view
s-if="item.portion > 0"
class="progress-bar {{progress_class[index]}}" style="width: {{item.portion}}%;">{{item.name}}</view>
</block>
</block>
<text s-else class="cr-888">暂无评分</text>
...
...
public/appmini/old/weixin/pages/goods-comment/goods-comment.wxml
浏览文件 @
5d33d37d
...
...
@@ -7,7 +7,7 @@
<view class="progress fr tc">
<block wx:if="{{goods_score.avg > 0}}">
<block wx:for="{{goods_score.rating}}" wx:key="key">
<view class="progress-bar {{progress_class[index]}}" style="width: {{item.portion}}%;">{{item.name}}</view>
<view
wx:if="{{item.portion > 0}}"
class="progress-bar {{progress_class[index]}}" style="width: {{item.portion}}%;">{{item.name}}</view>
</block>
</block>
<text wx:else class="cr-888">暂无评分</text>
...
...
public/static/admin/default/css/goodscomments.css
浏览文件 @
5d33d37d
...
...
@@ -56,6 +56,13 @@
.content-right
table
.am-table
.view-operation
{
width
:
85px
;
}
.content-right
table
.am-table
.am-slider
{
width
:
100px
;
max-height
:
108px
;
overflow
:
hidden
;
box-shadow
:
none
;
-webkit-box-shadow
:
none
;
}
/**
...
...
public/static/index/default/css/order.comments.css
浏览文件 @
5d33d37d
...
...
@@ -5,6 +5,7 @@
overflow
:
hidden
;
margin-bottom
:
2px
;
padding
:
3px
5px
;
line-height
:
22px
;
}
.user-content-body
ul
.rating
li
{
float
:
left
;
...
...
@@ -19,6 +20,9 @@
.user-content-body
ul
.rating
li
i
.am-icon-star
{
color
:
#d13b49
;
}
.user-content-body
ul
.rating
li
.tips-text
{
width
:
38px
;
}
.user-content-body
.rating-items
{
margin-bottom
:
0
;
}
...
...
public/static/index/default/js/order.js
浏览文件 @
5d33d37d
...
...
@@ -57,10 +57,12 @@ $(function()
{
$
(
this
).
parent
().
find
(
'
li i
'
).
removeClass
(
'
am-icon-star
'
).
addClass
(
'
am-icon-star-o
'
);
var
index
=
$
(
this
).
index
();
var
rating_msg
=
[
'
非常差
'
,
'
差
'
,
'
一般
'
,
'
好
'
,
'
非常好
'
];
for
(
var
i
=
0
;
i
<=
index
;
i
++
)
{
$
(
this
).
parent
().
find
(
'
li
'
).
eq
(
i
).
find
(
'
i
'
).
removeClass
(
'
am-icon-star-o
'
).
addClass
(
'
am-icon-star
'
);
}
$
(
this
).
parent
().
find
(
'
li.tips-text
'
).
text
(
rating_msg
[
index
]);
$
(
this
).
parents
(
'
td
'
).
find
(
'
input.input-rating
'
).
val
(
index
+
1
).
trigger
(
'
blur
'
);
$
(
this
).
parent
().
removeClass
(
'
not-selected
'
);
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录