Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
飞鱼0526
ShopXO
提交
8d85440f
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,发现更多精彩内容 >>
提交
8d85440f
编写于
10月 10, 2019
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
小程序订单评论
上级
38643907
变更
28
隐藏空白更改
内联
并排
Showing
28 changed file
with
1226 addition
and
82 deletion
+1226
-82
application/api/controller/Order.php
application/api/controller/Order.php
+13
-1
application/api/controller/Orderaftersale.php
application/api/controller/Orderaftersale.php
+1
-1
application/index/controller/Orderaftersale.php
application/index/controller/Orderaftersale.php
+1
-1
application/service/ArticleService.php
application/service/ArticleService.php
+18
-3
application/service/CustomViewService.php
application/service/CustomViewService.php
+17
-3
application/service/GoodsCommentsService.php
application/service/GoodsCommentsService.php
+63
-19
public/appmini/old/alipay/app.js
public/appmini/old/alipay/app.js
+1
-0
public/appmini/old/alipay/app.json
public/appmini/old/alipay/app.json
+1
-0
public/appmini/old/alipay/pages/user-order-comments/user-order-comments.axml
...alipay/pages/user-order-comments/user-order-comments.axml
+46
-0
public/appmini/old/alipay/pages/user-order-comments/user-order-comments.axss
...alipay/pages/user-order-comments/user-order-comments.axss
+40
-0
public/appmini/old/alipay/pages/user-order-comments/user-order-comments.js
...d/alipay/pages/user-order-comments/user-order-comments.js
+321
-0
public/appmini/old/alipay/pages/user-order-comments/user-order-comments.json
...alipay/pages/user-order-comments/user-order-comments.json
+3
-0
public/appmini/old/alipay/pages/user-order/user-order.axml
public/appmini/old/alipay/pages/user-order/user-order.axml
+6
-9
public/appmini/old/alipay/pages/user-order/user-order.js
public/appmini/old/alipay/pages/user-order/user-order.js
+8
-1
public/appmini/old/baidu/app.js
public/appmini/old/baidu/app.js
+1
-0
public/appmini/old/baidu/app.json
public/appmini/old/baidu/app.json
+1
-0
public/appmini/old/baidu/pages/user-order-comments/user-order-comments.css
...d/baidu/pages/user-order-comments/user-order-comments.css
+40
-0
public/appmini/old/baidu/pages/user-order-comments/user-order-comments.js
...ld/baidu/pages/user-order-comments/user-order-comments.js
+311
-0
public/appmini/old/baidu/pages/user-order-comments/user-order-comments.json
.../baidu/pages/user-order-comments/user-order-comments.json
+3
-0
public/appmini/old/baidu/pages/user-order-comments/user-order-comments.swan
.../baidu/pages/user-order-comments/user-order-comments.swan
+46
-0
public/appmini/old/baidu/pages/user-order/user-order.js
public/appmini/old/baidu/pages/user-order/user-order.js
+8
-1
public/appmini/old/baidu/pages/user-order/user-order.swan
public/appmini/old/baidu/pages/user-order/user-order.swan
+6
-9
public/appmini/old/weixin/app.json
public/appmini/old/weixin/app.json
+3
-2
public/appmini/old/weixin/pages/user-order-comments/user-order-comments.js
...d/weixin/pages/user-order-comments/user-order-comments.js
+243
-10
public/appmini/old/weixin/pages/user-order-comments/user-order-comments.wxml
...weixin/pages/user-order-comments/user-order-comments.wxml
+11
-12
public/appmini/old/weixin/pages/user-order/user-order.js
public/appmini/old/weixin/pages/user-order/user-order.js
+8
-1
public/appmini/old/weixin/pages/user-order/user-order.wxml
public/appmini/old/weixin/pages/user-order/user-order.wxml
+6
-9
public/static/upload/images/order_comments/3/9/2019/10/10/1570705883308238.png
...images/order_comments/3/9/2019/10/10/1570705883308238.png
+0
-0
未找到文件。
application/api/controller/Order.php
浏览文件 @
8d85440f
...
@@ -12,6 +12,7 @@ namespace app\api\controller;
...
@@ -12,6 +12,7 @@ namespace app\api\controller;
use
app\service\PaymentService
;
use
app\service\PaymentService
;
use
app\service\OrderService
;
use
app\service\OrderService
;
use
app\service\GoodsCommentsService
;
/**
/**
* 我的订单
* 我的订单
...
@@ -152,7 +153,18 @@ class Order extends Common
...
@@ -152,7 +153,18 @@ class Order extends Common
$data
=
OrderService
::
OrderList
(
$data_params
);
$data
=
OrderService
::
OrderList
(
$data_params
);
if
(
!
empty
(
$data
[
'data'
][
0
]))
if
(
!
empty
(
$data
[
'data'
][
0
]))
{
{
return
DataReturn
(
'success'
,
0
,
$data
[
'data'
][
0
]);
// 是否已评论
if
(
$data
[
'data'
][
0
][
'user_is_comments'
]
>
0
)
{
return
DataReturn
(
'你已进行过评论'
,
-
100
);
}
// 返回数据
$result
=
[
'data'
=>
$data
[
'data'
][
0
],
'editor_path_type'
=>
'order_comments-'
.
$this
->
user
[
'id'
]
.
'-'
.
$data
[
'data'
][
0
][
'id'
],
];
return
DataReturn
(
'success'
,
0
,
$result
);
}
}
return
DataReturn
(
'没有相关数据'
,
-
100
);
return
DataReturn
(
'没有相关数据'
,
-
100
);
}
}
...
...
application/api/controller/Orderaftersale.php
浏览文件 @
8d85440f
...
@@ -137,7 +137,7 @@ class Orderaftersale extends Common
...
@@ -137,7 +137,7 @@ class Orderaftersale extends Common
'return_money_goods_reason'
=>
empty
(
$return_money_goods_reason
)
?
[]
:
explode
(
"
\n
"
,
$return_money_goods_reason
),
'return_money_goods_reason'
=>
empty
(
$return_money_goods_reason
)
?
[]
:
explode
(
"
\n
"
,
$return_money_goods_reason
),
'aftersale_type_list'
=>
lang
(
'common_order_aftersale_type_list'
),
'aftersale_type_list'
=>
lang
(
'common_order_aftersale_type_list'
),
'return_goods_address'
=>
MyC
(
'home_order_aftersale_return_goods_address'
,
'管理员未填写'
,
true
),
'return_goods_address'
=>
MyC
(
'home_order_aftersale_return_goods_address'
,
'管理员未填写'
,
true
),
'editor_path_type'
=>
'orderaftersale-'
.
$this
->
user
[
'id'
]
.
'-'
.
$order_id
.
'-'
.
$order_detail_id
,
'editor_path_type'
=>
'order
_
aftersale-'
.
$this
->
user
[
'id'
]
.
'-'
.
$order_id
.
'-'
.
$order_detail_id
,
];
];
return
DataReturn
(
'success'
,
0
,
$result
);
return
DataReturn
(
'success'
,
0
,
$result
);
}
}
...
...
application/index/controller/Orderaftersale.php
浏览文件 @
8d85440f
...
@@ -149,7 +149,7 @@ class Orderaftersale extends Common
...
@@ -149,7 +149,7 @@ class Orderaftersale extends Common
$this
->
assign
(
'common_order_aftersale_type_list'
,
lang
(
'common_order_aftersale_type_list'
));
$this
->
assign
(
'common_order_aftersale_type_list'
,
lang
(
'common_order_aftersale_type_list'
));
// 编辑器文件存放地址
// 编辑器文件存放地址
$this
->
assign
(
'editor_path_type'
,
'orderaftersale-'
.
$this
->
user
[
'id'
]
.
'-'
.
$order_id
.
'-'
.
$order_detail_id
);
$this
->
assign
(
'editor_path_type'
,
'order
_
aftersale-'
.
$this
->
user
[
'id'
]
.
'-'
.
$order_id
.
'-'
.
$order_detail_id
);
$this
->
assign
(
'params'
,
$params
);
$this
->
assign
(
'params'
,
$params
);
return
$this
->
fetch
();
return
$this
->
fetch
();
...
...
application/service/ArticleService.php
浏览文件 @
8d85440f
...
@@ -65,6 +65,21 @@ class ArticleService
...
@@ -65,6 +65,21 @@ class ArticleService
{
{
$v
[
'content'
]
=
ResourcesService
::
ContentStaticReplace
(
$v
[
'content'
],
'get'
);
$v
[
'content'
]
=
ResourcesService
::
ContentStaticReplace
(
$v
[
'content'
],
'get'
);
}
}
// 图片
if
(
isset
(
$v
[
'images'
]))
{
if
(
!
empty
(
$v
[
'images'
]))
{
$images
=
json_decode
(
$v
[
'images'
],
true
);
foreach
(
$images
as
&
$img
)
{
$img
=
ResourcesService
::
AttachmentPathViewHandle
(
$img
);
}
$v
[
'images'
]
=
$images
;
}
}
if
(
isset
(
$v
[
'add_time'
]))
if
(
isset
(
$v
[
'add_time'
]))
{
{
$v
[
'add_time_time'
]
=
date
(
'Y-m-d H:i:s'
,
$v
[
'add_time'
]);
$v
[
'add_time_time'
]
=
date
(
'Y-m-d H:i:s'
,
$v
[
'add_time'
]);
...
@@ -214,15 +229,15 @@ class ArticleService
...
@@ -214,15 +229,15 @@ class ArticleService
$content
=
isset
(
$params
[
'content'
])
?
htmlspecialchars_decode
(
$params
[
'content'
])
:
''
;
$content
=
isset
(
$params
[
'content'
])
?
htmlspecialchars_decode
(
$params
[
'content'
])
:
''
;
// 数据
// 数据
$image
=
self
::
MatchContentImage
(
$content
);
$image
s
=
self
::
MatchContentImage
(
$content
);
$data
=
[
$data
=
[
'title'
=>
$params
[
'title'
],
'title'
=>
$params
[
'title'
],
'title_color'
=>
empty
(
$params
[
'title_color'
])
?
''
:
$params
[
'title_color'
],
'title_color'
=>
empty
(
$params
[
'title_color'
])
?
''
:
$params
[
'title_color'
],
'article_category_id'
=>
intval
(
$params
[
'article_category_id'
]),
'article_category_id'
=>
intval
(
$params
[
'article_category_id'
]),
'jump_url'
=>
empty
(
$params
[
'jump_url'
])
?
''
:
$params
[
'jump_url'
],
'jump_url'
=>
empty
(
$params
[
'jump_url'
])
?
''
:
$params
[
'jump_url'
],
'content'
=>
ResourcesService
::
ContentStaticReplace
(
$content
,
'add'
),
'content'
=>
ResourcesService
::
ContentStaticReplace
(
$content
,
'add'
),
'image
'
=>
empty
(
$image
)
?
''
:
json_encode
(
$image
),
'image
s'
=>
empty
(
$images
)
?
''
:
json_encode
(
$images
),
'image
_count'
=>
count
(
$image
),
'image
s_count'
=>
count
(
$images
),
'is_enable'
=>
isset
(
$params
[
'is_enable'
])
?
intval
(
$params
[
'is_enable'
])
:
0
,
'is_enable'
=>
isset
(
$params
[
'is_enable'
])
?
intval
(
$params
[
'is_enable'
])
:
0
,
'is_home_recommended'
=>
isset
(
$params
[
'is_home_recommended'
])
?
intval
(
$params
[
'is_home_recommended'
])
:
0
,
'is_home_recommended'
=>
isset
(
$params
[
'is_home_recommended'
])
?
intval
(
$params
[
'is_home_recommended'
])
:
0
,
'seo_title'
=>
empty
(
$params
[
'seo_title'
])
?
''
:
$params
[
'seo_title'
],
'seo_title'
=>
empty
(
$params
[
'seo_title'
])
?
''
:
$params
[
'seo_title'
],
...
...
application/service/CustomViewService.php
浏览文件 @
8d85440f
...
@@ -56,6 +56,20 @@ class CustomViewService
...
@@ -56,6 +56,20 @@ class CustomViewService
$v
[
'content'
]
=
ResourcesService
::
ContentStaticReplace
(
$v
[
'content'
],
'get'
);
$v
[
'content'
]
=
ResourcesService
::
ContentStaticReplace
(
$v
[
'content'
],
'get'
);
}
}
// 图片
if
(
isset
(
$v
[
'images'
]))
{
if
(
!
empty
(
$v
[
'images'
]))
{
$images
=
json_decode
(
$v
[
'images'
],
true
);
foreach
(
$images
as
&
$img
)
{
$img
=
ResourcesService
::
AttachmentPathViewHandle
(
$img
);
}
$v
[
'images'
]
=
$images
;
}
}
// 时间
// 时间
if
(
isset
(
$v
[
'add_time'
]))
if
(
isset
(
$v
[
'add_time'
]))
{
{
...
@@ -198,12 +212,12 @@ class CustomViewService
...
@@ -198,12 +212,12 @@ class CustomViewService
$content
=
isset
(
$params
[
'content'
])
?
htmlspecialchars_decode
(
$params
[
'content'
])
:
''
;
$content
=
isset
(
$params
[
'content'
])
?
htmlspecialchars_decode
(
$params
[
'content'
])
:
''
;
// 数据
// 数据
$image
=
self
::
MatchContentImage
(
$content
);
$image
s
=
self
::
MatchContentImage
(
$content
);
$data
=
[
$data
=
[
'title'
=>
$params
[
'title'
],
'title'
=>
$params
[
'title'
],
'content'
=>
ResourcesService
::
ContentStaticReplace
(
$content
,
'add'
),
'content'
=>
ResourcesService
::
ContentStaticReplace
(
$content
,
'add'
),
'image
'
=>
empty
(
$image
)
?
''
:
json_encode
(
$image
),
'image
s'
=>
empty
(
$images
)
?
''
:
json_encode
(
$images
),
'image
_count'
=>
count
(
$image
),
'image
s_count'
=>
count
(
$images
),
'is_enable'
=>
isset
(
$params
[
'is_enable'
])
?
intval
(
$params
[
'is_enable'
])
:
0
,
'is_enable'
=>
isset
(
$params
[
'is_enable'
])
?
intval
(
$params
[
'is_enable'
])
:
0
,
'is_header'
=>
isset
(
$params
[
'is_header'
])
?
intval
(
$params
[
'is_header'
])
:
0
,
'is_header'
=>
isset
(
$params
[
'is_header'
])
?
intval
(
$params
[
'is_header'
])
:
0
,
'is_footer'
=>
isset
(
$params
[
'is_footer'
])
?
intval
(
$params
[
'is_footer'
])
:
0
,
'is_footer'
=>
isset
(
$params
[
'is_footer'
])
?
intval
(
$params
[
'is_footer'
])
:
0
,
...
...
application/service/GoodsCommentsService.php
浏览文件 @
8d85440f
...
@@ -47,35 +47,20 @@ class GoodsCommentsService
...
@@ -47,35 +47,20 @@ class GoodsCommentsService
'error_msg'
=>
'业务类型标记不能为空'
,
'error_msg'
=>
'业务类型标记不能为空'
,
],
],
[
[
'checked_type'
=>
'
isset
'
,
'checked_type'
=>
'
empty
'
,
'key_name'
=>
'goods_id'
,
'key_name'
=>
'goods_id'
,
'error_msg'
=>
'商品id有误'
,
'error_msg'
=>
'商品id有误'
,
],
],
[
[
'checked_type'
=>
'is_array'
,
'checked_type'
=>
'empty'
,
'key_name'
=>
'goods_id'
,
'error_msg'
=>
'商品数据格式有误'
,
],
[
'checked_type'
=>
'isset'
,
'key_name'
=>
'rating'
,
'key_name'
=>
'rating'
,
'error_msg'
=>
'评级有误'
,
'error_msg'
=>
'评级有误'
,
],
],
[
[
'checked_type'
=>
'is_array'
,
'checked_type'
=>
'empty'
,
'key_name'
=>
'rating'
,
'error_msg'
=>
'评级数据格式有误'
,
],
[
'checked_type'
=>
'isset'
,
'key_name'
=>
'content'
,
'key_name'
=>
'content'
,
'error_msg'
=>
'评论内容有误'
,
'error_msg'
=>
'评论内容有误'
,
],
],
[
'checked_type'
=>
'is_array'
,
'key_name'
=>
'content'
,
'error_msg'
=>
'评论内容数据格式有误'
,
],
[
[
'checked_type'
=>
'empty'
,
'checked_type'
=>
'empty'
,
'key_name'
=>
'user'
,
'key_name'
=>
'user'
,
...
@@ -88,6 +73,63 @@ class GoodsCommentsService
...
@@ -88,6 +73,63 @@ class GoodsCommentsService
return
DataReturn
(
$ret
,
-
1
);
return
DataReturn
(
$ret
,
-
1
);
}
}
// 参数处理
if
(
!
is_array
(
$params
[
'goods_id'
]))
{
$params
[
'goods_id'
]
=
json_decode
(
htmlspecialchars_decode
(
$params
[
'goods_id'
]),
true
);
}
if
(
!
is_array
(
$params
[
'rating'
]))
{
$params
[
'rating'
]
=
json_decode
(
htmlspecialchars_decode
(
$params
[
'rating'
]),
true
);
}
if
(
!
is_array
(
$params
[
'content'
]))
{
$params
[
'content'
]
=
json_decode
(
htmlspecialchars_decode
(
$params
[
'content'
]),
true
);
}
// 评分
if
(
min
(
$params
[
'rating'
])
<=
0
)
{
return
DataReturn
(
'评级有误'
,
-
1
);
}
if
(
min
(
$params
[
'rating'
])
<=
0
||
max
(
$params
[
'rating'
])
>
5
)
{
return
DataReturn
(
'评级有误'
,
-
1
);
}
// 评论内容
foreach
(
$params
[
'content'
]
as
$v
)
{
$len
=
mb_strlen
(
$v
,
'utf-8'
);
if
(
$len
<
6
||
$len
>
230
)
{
return
DataReturn
(
'评论内容 6~230 个字符之间'
,
-
1
);
}
}
// 附件处理
if
(
!
empty
(
$params
[
'images'
]))
{
if
(
!
is_array
(
$params
[
'images'
]))
{
$params
[
'images'
]
=
json_decode
(
htmlspecialchars_decode
(
$params
[
'images'
]),
true
);
}
foreach
(
$params
[
'images'
]
as
&
$v
)
{
if
(
!
empty
(
$v
))
{
foreach
(
$v
as
&
$vs
)
{
$vs
=
ResourcesService
::
AttachmentPathHandle
(
$vs
);
}
if
(
count
(
$v
)
>
3
)
{
return
DataReturn
(
'每项评论图片不能超过3张'
,
-
1
);
}
}
}
}
// 获取订单信息
// 获取订单信息
$order_id
=
intval
(
$params
[
'id'
]);
$order_id
=
intval
(
$params
[
'id'
]);
$where
=
[
'id'
=>
$order_id
,
'user_id'
=>
$params
[
'user'
][
'id'
],
'is_delete_time'
=>
0
,
'user_is_delete_time'
=>
0
];
$where
=
[
'id'
=>
$order_id
,
'user_id'
=>
$params
[
'user'
][
'id'
],
'is_delete_time'
=>
0
,
'user_is_delete_time'
=>
0
];
...
@@ -108,6 +150,7 @@ class GoodsCommentsService
...
@@ -108,6 +150,7 @@ class GoodsCommentsService
// 处理数据
// 处理数据
Db
::
startTrans
();
Db
::
startTrans
();
$is_anonymous
=
isset
(
$params
[
'is_anonymous'
])
?
min
(
1
,
intval
(
$params
[
'is_anonymous'
]))
:
0
;
foreach
(
$params
[
'goods_id'
]
as
$k
=>
$goods_id
)
foreach
(
$params
[
'goods_id'
]
as
$k
=>
$goods_id
)
{
{
$data
=
[
$data
=
[
...
@@ -117,8 +160,9 @@ class GoodsCommentsService
...
@@ -117,8 +160,9 @@ class GoodsCommentsService
'goods_id'
=>
$goods_id
,
'goods_id'
=>
$goods_id
,
'business_type'
=>
$params
[
'business_type'
],
'business_type'
=>
$params
[
'business_type'
],
'content'
=>
isset
(
$params
[
'content'
][
$k
])
?
htmlspecialchars
(
trim
(
$params
[
'content'
][
$k
]))
:
''
,
'content'
=>
isset
(
$params
[
'content'
][
$k
])
?
htmlspecialchars
(
trim
(
$params
[
'content'
][
$k
]))
:
''
,
'images'
=>
empty
(
$params
[
'images'
][
$k
])
?
''
:
json_encode
(
$params
[
'images'
][
$k
]),
'rating'
=>
isset
(
$params
[
'rating'
][
$k
])
?
intval
(
$params
[
'rating'
][
$k
])
:
0
,
'rating'
=>
isset
(
$params
[
'rating'
][
$k
])
?
intval
(
$params
[
'rating'
][
$k
])
:
0
,
'is_anonymous'
=>
isset
(
$params
[
'is_anonymous'
])
?
min
(
1
,
intval
(
$params
[
'is_anonymous'
]))
:
0
,
'is_anonymous'
=>
$is_anonymous
,
'add_time'
=>
time
(),
'add_time'
=>
time
(),
];
];
if
(
Db
::
name
(
'GoodsComments'
)
->
insertGetId
(
$data
)
<=
0
)
if
(
Db
::
name
(
'GoodsComments'
)
->
insertGetId
(
$data
)
<=
0
)
...
...
public/appmini/old/alipay/app.js
浏览文件 @
8d85440f
...
@@ -59,6 +59,7 @@ App({
...
@@ -59,6 +59,7 @@ App({
"
goods_comment
"
:
"
商品评论
"
,
"
goods_comment
"
:
"
商品评论
"
,
"
user_orderaftersale
"
:
"
退款/售后
"
,
"
user_orderaftersale
"
:
"
退款/售后
"
,
"
user_orderaftersale_detail
"
:
"
订单售后
"
,
"
user_orderaftersale_detail
"
:
"
订单售后
"
,
"
user_order_comments
"
:
"
订单评论
"
,
},
},
// 请求地址
// 请求地址
...
...
public/appmini/old/alipay/app.json
浏览文件 @
8d85440f
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
"pages/user-address-save/user-address-save"
,
"pages/user-address-save/user-address-save"
,
"pages/user-order/user-order"
,
"pages/user-order/user-order"
,
"pages/user-order-detail/user-order-detail"
,
"pages/user-order-detail/user-order-detail"
,
"pages/user-order-comments/user-order-comments"
,
"pages/user-faovr/user-faovr"
,
"pages/user-faovr/user-faovr"
,
"pages/user-answer-list/user-answer-list"
,
"pages/user-answer-list/user-answer-list"
,
"pages/answer-list/answer-list"
,
"pages/answer-list/answer-list"
,
...
...
public/appmini/old/alipay/pages/user-order-comments/user-order-comments.axml
0 → 100644
浏览文件 @
8d85440f
<view wx:if="{{detail != null}}">
<form bindsubmit="formSubmit" class="form-container">
<view wx:for="{{detail.items}}" wx:key="item" class="form-gorup bg-white oh">
<view class="oh">
<navigator url="/pages/goods-detail/goods-detail?goods_id={{item.goods_id}}" hover-class="none">
<image class="goods-image fl br" src="{{item.images}}" mode="aspectFill" />
</navigator>
<view class="item-base">
<block wx:for="{{[1,2,3,4,5]}}" wx:key="tx" wx:for-index="tx">
<image class="xingxing-icon" src="/images/default-xingxing-icon{{form_rating_list[index] != undefined && form_rating_list[index] >= item ? '-active' : ''}}.png" mode="aspectFill" bindtap="rating_event" data-index="{{index}}" data-value="{{item}}" />
</block>
<text wx:if="{{form_rating_list[index] != undefined}}" class="msg-text cr-888">{{rating_msg[form_rating_list[index]-1]}}</text>
</view>
</view>
<view class="form-content">
<textarea bindinput="form_content_event" data-index="{{index}}" placeholder-class="cr-ccc" class="cr-666" placeholder="退宝贝满足你的期待吗?说说它的有点和美中不足的地方吧" maxlength="230" value="{{form_msg}}" />
<view class="form-container-upload oh">
<view class="form-upload-data fl">
<block wx:if="{{(form_images_list[index] || null) != null && form_images_list[index].length > 0}}">
<view wx:for="{{form_images_list[index]}}" wx:key="item" wx:for-index="ix" class="item fl">
<text class="delete-icon" bindtap="upload_delete_event" data-index="{{index}}" data-ix="{{ix}}">x</text>
<image src="{{item}}" bindtap="upload_show_event" data-index="{{index}}" data-ix="{{ix}}" mode="aspectFill" />
</view>
</block>
</view>
<image wx:if="{{(form_images_list[index] || null) == null || form_images_list[index].length < 3}}" class="upload-icon" src="/images/default-upload-icon.png" mode="aspectFill" bindtap="file_upload_event" data-index="{{index}}" />
</view>
</view>
</view>
<view class="form-gorup bg-white anonymous">
<switch name="is_anonymous" bindchange="anonymous_event" />
<text class="cr-666">匿名</text>
<text class="fr cr-888 tips-text">{{anonymous_msg_list[anonymous_value]}}</text>
</view>
<view class="form-gorup">
<button formType="submit" class="bg-main submit-bottom" type="default" hover-class="none" disabled="{{form_button_disabled}}">提交</button>
</view>
</form>
</view>
<view wx:if="{{detail == null}}">
<import src="/pages/common/nodata.wxml" />
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
</view>
\ No newline at end of file
public/appmini/old/alipay/pages/user-order-comments/user-order-comments.axss
0 → 100644
浏览文件 @
8d85440f
.goods-image {
width: 80rpx;
height: 80rpx;
margin-right: 20rpx;
}
.item-base {
margin: 10rpx 0 0 100rpx;
}
.item-base .xingxing-icon {
width: 60rpx;
height: 60rpx;
margin: 0 15rpx;
vertical-align: middle;
}
.item-base .msg-text {
margin-left: 20rpx;
}
.form-content {
margin-top: 20rpx;
}
.form-content textarea {
height: 160rpx !important;
min-height: 160rpx !important;
}
.form-container-upload {
margin-top: 10rpx;
}
.form-container-upload .form-upload-data image {
width: 100rpx;
height: 100rpx;
padding: 5rpx;
}
.form-container-upload .upload-icon {
margin: 10rpx 0 0 10rpx;
width: 110rpx;
height: 110rpx;
}
.anonymous .tips-text {
margin-top: 10rpx;
}
\ No newline at end of file
public/appmini/old/alipay/pages/user-order-comments/user-order-comments.js
0 → 100644
浏览文件 @
8d85440f
const
app
=
getApp
();
Page
({
data
:
{
data_list_loding_status
:
1
,
data_list_loding_msg
:
''
,
params
:
null
,
detail
:
null
,
editor_path_type
:
''
,
rating_msg
:
[
'
非常差
'
,
'
差
'
,
'
一般
'
,
'
好
'
,
'
非常好
'
],
anonymous_value
:
0
,
anonymous_msg_list
:
[
'
你写的评论会以匿名的形式展现
'
,
'
你写的评论会以昵称的形式展现
'
],
form_rating_list
:
[],
form_images_list
:
[],
form_content_list
:
[],
form_button_disabled
:
false
,
},
onLoad
(
params
)
{
this
.
setData
({
params
:
params
});
this
.
init
();
},
onShow
()
{
wx
.
setNavigationBarTitle
({
title
:
app
.
data
.
common_pages_title
.
user_order_comments
});
},
init
()
{
var
self
=
this
;
wx
.
showLoading
({
title
:
"
加载中...
"
});
this
.
setData
({
data_list_loding_status
:
1
});
wx
.
request
({
url
:
app
.
get_request_url
(
"
comments
"
,
"
order
"
),
method
:
"
POST
"
,
data
:
{
id
:
this
.
data
.
params
.
id
},
dataType
:
"
json
"
,
success
:
res
=>
{
wx
.
hideLoading
();
wx
.
stopPullDownRefresh
();
if
(
res
.
data
.
code
==
0
)
{
var
data
=
res
.
data
.
data
;
self
.
setData
({
editor_path_type
:
data
.
editor_path_type
||
''
,
detail
:
data
.
data
,
data_list_loding_status
:
3
,
data_list_loding_msg
:
''
,
});
}
else
{
self
.
setData
({
data_list_loding_status
:
2
,
data_list_loding_msg
:
res
.
data
.
msg
,
});
app
.
showToast
(
res
.
data
.
msg
);
}
},
fail
:
()
=>
{
wx
.
hideLoading
();
wx
.
stopPullDownRefresh
();
self
.
setData
({
data_list_loding_status
:
2
,
data_list_loding_msg
:
'
服务器请求出错
'
,
});
app
.
showToast
(
"
服务器请求出错
"
);
}
});
},
// 上传图片预览
upload_show_event
(
e
)
{
var
index
=
e
.
currentTarget
.
dataset
.
index
;
var
ix
=
e
.
currentTarget
.
dataset
.
ix
;
wx
.
previewImage
({
current
:
this
.
data
.
form_images_list
[
index
][
ix
],
urls
:
this
.
data
.
form_images_list
[
index
],
});
},
// 图片删除
upload_delete_event
(
e
)
{
var
index
=
e
.
currentTarget
.
dataset
.
index
;
var
ix
=
e
.
currentTarget
.
dataset
.
ix
;
var
self
=
this
;
wx
.
showModal
({
title
:
'
温馨提示
'
,
content
:
'
删除后不可恢复、继续吗?
'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
var
list
=
self
.
data
.
form_images_list
;
list
[
index
].
splice
(
ix
,
1
);
self
.
setData
({
form_images_list
:
list
,
});
}
}
});
},
// 文件上传
file_upload_event
(
e
)
{
// 数据初始化
var
index
=
e
.
currentTarget
.
dataset
.
index
;
var
temp_list
=
this
.
data
.
form_images_list
;
var
length
=
this
.
data
.
detail
.
items
.
length
;
for
(
var
i
=
0
;
i
<
length
;
i
++
)
{
if
(
temp_list
[
i
]
==
undefined
)
{
temp_list
[
i
]
=
[];
}
}
this
.
setData
({
form_images_list
:
temp_list
});
// 处理上传文件
var
self
=
this
;
wx
.
chooseImage
({
count
:
3
,
success
(
res
)
{
var
success
=
0
;
var
fail
=
0
;
var
length
=
res
.
tempFilePaths
.
length
;
var
count
=
0
;
self
.
upload_one_by_one
(
index
,
res
.
tempFilePaths
,
success
,
fail
,
count
,
length
);
}
});
},
// 采用递归的方式上传多张
upload_one_by_one
(
index
,
img_paths
,
success
,
fail
,
count
,
length
)
{
var
self
=
this
;
if
((
self
.
data
.
form_images_list
[
index
]
||
null
)
==
null
||
self
.
data
.
form_images_list
[
index
].
length
<
3
)
{
wx
.
uploadFile
({
url
:
app
.
get_request_url
(
"
index
"
,
"
ueditor
"
),
filePath
:
img_paths
[
count
],
name
:
'
upfile
'
,
formData
:
{
action
:
'
uploadimage
'
,
path_type
:
self
.
data
.
editor_path_type
},
success
:
function
(
res
)
{
success
++
;
if
(
res
.
statusCode
==
200
)
{
var
data
=
(
typeof
(
res
.
data
)
==
'
object
'
)
?
res
.
data
:
JSON
.
parse
(
res
.
data
);
if
(
data
.
code
==
0
&&
(
data
.
data
.
url
||
null
)
!=
null
)
{
var
list
=
self
.
data
.
form_images_list
;
if
((
list
[
index
]
||
null
)
==
null
)
{
list
[
index
]
=
[];
}
list
[
index
].
push
(
data
.
data
.
url
);
self
.
setData
({
form_images_list
:
list
});
}
else
{
app
.
showToast
(
data
.
msg
);
}
}
},
fail
:
function
(
e
)
{
fail
++
;
},
complete
:
function
(
e
)
{
count
++
;
// 下一张
if
(
count
>=
length
)
{
// 上传完毕,作一下提示
//app.showToast('上传成功' + success +'张', 'success');
}
else
{
// 递归调用,上传下一张
self
.
upload_one_by_one
(
index
,
img_paths
,
success
,
fail
,
count
,
length
);
}
}
});
}
},
// 是否匿名事件
anonymous_event
(
e
)
{
this
.
setData
({
anonymous_value
:
e
.
detail
.
value
==
true
?
1
:
0
});
},
// 评分事件
rating_event
(
e
)
{
// 参数
var
index
=
e
.
currentTarget
.
dataset
.
index
;
var
value
=
e
.
currentTarget
.
dataset
.
value
;
// 数据初始化/赋值
var
temp_list
=
this
.
data
.
form_rating_list
;
var
length
=
this
.
data
.
detail
.
items
.
length
;
for
(
var
i
=
0
;
i
<
length
;
i
++
)
{
if
(
temp_list
[
i
]
==
undefined
)
{
temp_list
[
i
]
=
0
;
}
if
(
index
==
i
)
{
temp_list
[
i
]
=
value
;
}
}
this
.
setData
({
form_rating_list
:
temp_list
});
},
// 评论内容
form_content_event
(
e
)
{
// 参数
var
index
=
e
.
currentTarget
.
dataset
.
index
;
var
value
=
e
.
detail
.
value
;
// 数据初始化/赋值
var
temp_list
=
this
.
data
.
form_content_list
;
var
length
=
this
.
data
.
detail
.
items
.
length
;
for
(
var
i
=
0
;
i
<
length
;
i
++
)
{
if
(
temp_list
[
i
]
==
undefined
)
{
temp_list
[
i
]
=
''
;
}
if
(
index
==
i
)
{
temp_list
[
i
]
=
value
;
}
}
this
.
setData
({
form_content_list
:
temp_list
});
},
// 表单
formSubmit
(
e
)
{
// 商品数量
var
length
=
this
.
data
.
detail
.
items
.
length
;
// 评分校验
var
count
=
this
.
data
.
form_rating_list
.
length
;
if
(
count
<
length
)
{
app
.
showToast
(
'
请评分
'
);
return
false
;
}
var
max
=
Math
.
max
.
apply
(
null
,
this
.
data
.
form_rating_list
);
var
min
=
Math
.
min
.
apply
(
null
,
this
.
data
.
form_rating_list
);
if
(
min
<
1
||
max
>
5
)
{
app
.
showToast
(
'
评分有误
'
);
return
false
;
}
// 内容校验
var
count
=
this
.
data
.
form_content_list
.
length
;
if
(
count
<
length
)
{
app
.
showToast
(
'
请填写评论内容
'
);
return
false
;
}
for
(
var
i
in
this
.
data
.
form_content_list
)
{
var
count
=
this
.
data
.
form_content_list
[
i
].
length
;
if
(
count
<
6
||
count
>
230
)
{
app
.
showToast
(
'
评论内容 6~230 个字符之间
'
);
return
false
;
}
}
// 图片校验
if
(
this
.
data
.
form_images_list
.
length
>
0
)
{
for
(
var
i
in
this
.
data
.
form_images_list
)
{
if
(
this
.
data
.
form_images_list
[
i
].
length
>
3
)
{
app
.
showToast
(
'
每项评论图片不能超过3张
'
);
return
false
;
}
}
}
// 表单数据
var
form_data
=
e
.
detail
.
value
;
form_data
[
'
is_anonymous
'
]
=
form_data
[
'
is_anonymous
'
]
==
true
?
1
:
0
;
form_data
[
'
id
'
]
=
this
.
data
.
detail
.
id
;
form_data
[
'
goods_id
'
]
=
JSON
.
stringify
(
this
.
data
.
detail
.
items
.
map
(
function
(
v
)
{
return
v
.
goods_id
}));
form_data
[
'
rating
'
]
=
JSON
.
stringify
(
this
.
data
.
form_rating_list
);
form_data
[
'
content
'
]
=
JSON
.
stringify
(
this
.
data
.
form_content_list
);
form_data
[
'
images
'
]
=
(
this
.
data
.
form_images_list
.
length
>
0
)
?
JSON
.
stringify
(
this
.
data
.
form_images_list
)
:
''
;
// 提交表单
var
self
=
this
;
wx
.
showLoading
({
title
:
"
处理中...
"
});
self
.
setData
({
form_button_disabled
:
true
});
wx
.
request
({
url
:
app
.
get_request_url
(
"
commentssave
"
,
"
order
"
),
method
:
"
POST
"
,
data
:
form_data
,
dataType
:
"
json
"
,
header
:
{
'
content-type
'
:
'
application/x-www-form-urlencoded
'
},
success
:
res
=>
{
wx
.
hideLoading
();
if
(
res
.
data
.
code
==
0
)
{
app
.
showToast
(
res
.
data
.
msg
,
"
success
"
);
setTimeout
(
function
()
{
wx
.
navigateBack
();
},
2000
);
}
else
{
self
.
setData
({
form_button_disabled
:
false
});
app
.
showToast
(
res
.
data
.
msg
);
}
},
fail
:
()
=>
{
wx
.
hideLoading
();
self
.
setData
({
form_button_disabled
:
false
});
app
.
showToast
(
"
服务器请求出错
"
);
}
});
},
// 下拉刷新
onPullDownRefresh
()
{
this
.
init
();
},
});
public/appmini/old/alipay/pages/user-order-comments/user-order-comments.json
0 → 100644
浏览文件 @
8d85440f
{
"enablePullDownRefresh"
:
true
}
\ No newline at end of file
public/appmini/old/alipay/pages/user-order/user-order.axml
浏览文件 @
8d85440f
...
@@ -34,15 +34,12 @@
...
@@ -34,15 +34,12 @@
</navigator>
</navigator>
</view>
</view>
<view class="item-describe tr cr-666">{{item.describe}}</view>
<view class="item-describe tr cr-666">{{item.describe}}</view>
<view a:if="{{item.status <= 3}}" class="item-operation tr br-t">
<view a:if="{{item.status <= 3 || (item.status == 4 && item.user_is_comments == 0)}}" class="item-operation tr br-t">
<button a:if="{{item.status <= 1}}" class="submit-cancel" type="default" size="mini" onTap="cancel_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">取消
<button a:if="{{item.status <= 1}}" class="submit-cancel" type="default" size="mini" onTap="cancel_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">取消</button>
</button>
<button a:if="{{item.status == 1}}" class="submit-pay cr-666" type="default" size="mini" onTap="pay_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">支付</button>
<button a:if="{{item.status == 1}}" class="submit-pay cr-666" type="default" size="mini" onTap="pay_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">支付
<button a:if="{{item.status == 2}}" class="submit-rush cr-666" type="default" size="mini" onTap="rush_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">催催</button>
</button>
<button a:if="{{item.status == 3}}" class="submit-success cr-666" type="default" size="mini" onTap="collect_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">收货</button>
<button a:if="{{item.status == 2}}" class="submit-rush cr-666" type="default" size="mini" onTap="rush_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">催催
<button a:if="{{item.status == 4 && item.user_is_comments == 0}}" class="submit-success cr-666 br" type="default" size="mini" onTap="comments_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">评论</button>
</button>
<button a:if="{{item.status == 3}}" class="submit-success cr-666" type="default" size="mini" onTap="collect_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">收货
</button>
</view>
</view>
</view>
</view>
...
...
public/appmini/old/alipay/pages/user-order/user-order.js
浏览文件 @
8d85440f
...
@@ -41,11 +41,11 @@ Page({
...
@@ -41,11 +41,11 @@ Page({
params
:
params
,
params
:
params
,
nav_status_index
:
nav_status_index
,
nav_status_index
:
nav_status_index
,
});
});
this
.
init
();
},
},
onShow
()
{
onShow
()
{
my
.
setNavigationBar
({
title
:
app
.
data
.
common_pages_title
.
user_order
});
my
.
setNavigationBar
({
title
:
app
.
data
.
common_pages_title
.
user_order
});
this
.
init
();
},
},
init
()
{
init
()
{
...
@@ -393,4 +393,11 @@ Page({
...
@@ -393,4 +393,11 @@ Page({
url
:
"
/pages/user-orderaftersale-detail/user-orderaftersale-detail?oid=
"
+
oid
+
"
&did=
"
+
did
url
:
"
/pages/user-orderaftersale-detail/user-orderaftersale-detail?oid=
"
+
oid
+
"
&did=
"
+
did
});
});
},
},
// 订单评论
comments_event
(
e
)
{
my
.
navigateTo
({
url
:
"
/pages/user-order-comments/user-order-comments?id=
"
+
e
.
target
.
dataset
.
value
});
},
});
});
public/appmini/old/baidu/app.js
浏览文件 @
8d85440f
...
@@ -54,6 +54,7 @@ App({
...
@@ -54,6 +54,7 @@ App({
"
goods_comment
"
:
"
商品评论
"
,
"
goods_comment
"
:
"
商品评论
"
,
"
user_orderaftersale
"
:
"
退款/售后
"
,
"
user_orderaftersale
"
:
"
退款/售后
"
,
"
user_orderaftersale_detail
"
:
"
订单售后
"
,
"
user_orderaftersale_detail
"
:
"
订单售后
"
,
"
user_order_comments
"
:
"
订单评论
"
,
},
},
// 请求地址
// 请求地址
...
...
public/appmini/old/baidu/app.json
浏览文件 @
8d85440f
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
"pages/user-address-save/user-address-save"
,
"pages/user-address-save/user-address-save"
,
"pages/user-order/user-order"
,
"pages/user-order/user-order"
,
"pages/user-order-detail/user-order-detail"
,
"pages/user-order-detail/user-order-detail"
,
"pages/user-order-comments/user-order-comments"
,
"pages/user-faovr/user-faovr"
,
"pages/user-faovr/user-faovr"
,
"pages/user-answer-list/user-answer-list"
,
"pages/user-answer-list/user-answer-list"
,
"pages/answer-list/answer-list"
,
"pages/answer-list/answer-list"
,
...
...
public/appmini/old/baidu/pages/user-order-comments/user-order-comments.css
0 → 100644
浏览文件 @
8d85440f
.goods-image
{
width
:
80
rpx
;
height
:
80
rpx
;
margin-right
:
20
rpx
;
}
.item-base
{
margin
:
10
rpx
0
0
100
rpx
;
}
.item-base
.xingxing-icon
{
width
:
60
rpx
;
height
:
60
rpx
;
margin
:
0
15
rpx
;
vertical-align
:
middle
;
}
.item-base
.msg-text
{
margin-left
:
20
rpx
;
}
.form-content
{
margin-top
:
20
rpx
;
}
.form-content
textarea
{
height
:
160
rpx
!important
;
min-height
:
160
rpx
!important
;
}
.form-container-upload
{
margin-top
:
10
rpx
;
}
.form-container-upload
.form-upload-data
image
{
width
:
100
rpx
;
height
:
100
rpx
;
padding
:
5
rpx
;
}
.form-container-upload
.upload-icon
{
margin
:
10
rpx
0
0
10
rpx
;
width
:
110
rpx
;
height
:
110
rpx
;
}
.anonymous
.tips-text
{
margin-top
:
10
rpx
;
}
\ No newline at end of file
public/appmini/old/baidu/pages/user-order-comments/user-order-comments.js
0 → 100644
浏览文件 @
8d85440f
const
app
=
getApp
();
Page
({
data
:
{
data_list_loding_status
:
1
,
data_list_loding_msg
:
''
,
params
:
null
,
detail
:
null
,
editor_path_type
:
''
,
rating_msg
:
[
'
非常差
'
,
'
差
'
,
'
一般
'
,
'
好
'
,
'
非常好
'
],
anonymous_value
:
0
,
anonymous_msg_list
:
[
'
你写的评论会以匿名的形式展现
'
,
'
你写的评论会以昵称的形式展现
'
],
form_rating_list
:
[],
form_images_list
:
[],
form_content_list
:
[],
form_button_disabled
:
false
},
onLoad
(
params
)
{
this
.
setData
({
params
:
params
});
this
.
init
();
},
onShow
()
{
swan
.
setNavigationBarTitle
({
title
:
app
.
data
.
common_pages_title
.
user_order_comments
});
},
init
()
{
var
self
=
this
;
swan
.
showLoading
({
title
:
"
加载中...
"
});
this
.
setData
({
data_list_loding_status
:
1
});
swan
.
request
({
url
:
app
.
get_request_url
(
"
comments
"
,
"
order
"
),
method
:
"
POST
"
,
data
:
{
id
:
this
.
data
.
params
.
id
},
dataType
:
"
json
"
,
success
:
res
=>
{
swan
.
hideLoading
();
swan
.
stopPullDownRefresh
();
if
(
res
.
data
.
code
==
0
)
{
var
data
=
res
.
data
.
data
;
self
.
setData
({
editor_path_type
:
data
.
editor_path_type
||
''
,
detail
:
data
.
data
,
data_list_loding_status
:
3
,
data_list_loding_msg
:
''
});
}
else
{
self
.
setData
({
data_list_loding_status
:
2
,
data_list_loding_msg
:
res
.
data
.
msg
});
app
.
showToast
(
res
.
data
.
msg
);
}
},
fail
:
()
=>
{
swan
.
hideLoading
();
swan
.
stopPullDownRefresh
();
self
.
setData
({
data_list_loding_status
:
2
,
data_list_loding_msg
:
'
服务器请求出错
'
});
app
.
showToast
(
"
服务器请求出错
"
);
}
});
},
// 上传图片预览
upload_show_event
(
e
)
{
var
index
=
e
.
currentTarget
.
dataset
.
index
;
var
ix
=
e
.
currentTarget
.
dataset
.
ix
;
swan
.
previewImage
({
current
:
this
.
data
.
form_images_list
[
index
][
ix
],
urls
:
this
.
data
.
form_images_list
[
index
]
});
},
// 图片删除
upload_delete_event
(
e
)
{
var
index
=
e
.
currentTarget
.
dataset
.
index
;
var
ix
=
e
.
currentTarget
.
dataset
.
ix
;
var
self
=
this
;
swan
.
showModal
({
title
:
'
温馨提示
'
,
content
:
'
删除后不可恢复、继续吗?
'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
var
list
=
self
.
data
.
form_images_list
;
list
[
index
].
splice
(
ix
,
1
);
self
.
setData
({
form_images_list
:
list
});
}
}
});
},
// 文件上传
file_upload_event
(
e
)
{
// 数据初始化
var
index
=
e
.
currentTarget
.
dataset
.
index
;
var
temp_list
=
this
.
data
.
form_images_list
;
var
length
=
this
.
data
.
detail
.
items
.
length
;
for
(
var
i
=
0
;
i
<
length
;
i
++
)
{
if
(
temp_list
[
i
]
==
undefined
)
{
temp_list
[
i
]
=
[];
}
}
this
.
setData
({
form_images_list
:
temp_list
});
// 处理上传文件
var
self
=
this
;
swan
.
chooseImage
({
count
:
3
,
success
(
res
)
{
var
success
=
0
;
var
fail
=
0
;
var
length
=
res
.
tempFilePaths
.
length
;
var
count
=
0
;
self
.
upload_one_by_one
(
index
,
res
.
tempFilePaths
,
success
,
fail
,
count
,
length
);
}
});
},
// 采用递归的方式上传多张
upload_one_by_one
(
index
,
img_paths
,
success
,
fail
,
count
,
length
)
{
var
self
=
this
;
if
((
self
.
data
.
form_images_list
[
index
]
||
null
)
==
null
||
self
.
data
.
form_images_list
[
index
].
length
<
3
)
{
swan
.
uploadFile
({
url
:
app
.
get_request_url
(
"
index
"
,
"
ueditor
"
),
filePath
:
img_paths
[
count
],
name
:
'
upfile
'
,
formData
:
{
action
:
'
uploadimage
'
,
path_type
:
self
.
data
.
editor_path_type
},
success
:
function
(
res
)
{
success
++
;
if
(
res
.
statusCode
==
200
)
{
var
data
=
typeof
res
.
data
==
'
object
'
?
res
.
data
:
JSON
.
parse
(
res
.
data
);
if
(
data
.
code
==
0
&&
(
data
.
data
.
url
||
null
)
!=
null
)
{
var
list
=
self
.
data
.
form_images_list
;
if
((
list
[
index
]
||
null
)
==
null
)
{
list
[
index
]
=
[];
}
list
[
index
].
push
(
data
.
data
.
url
);
self
.
setData
({
form_images_list
:
list
});
}
else
{
app
.
showToast
(
data
.
msg
);
}
}
},
fail
:
function
(
e
)
{
fail
++
;
},
complete
:
function
(
e
)
{
count
++
;
// 下一张
if
(
count
>=
length
)
{
// 上传完毕,作一下提示
//app.showToast('上传成功' + success +'张', 'success');
}
else
{
// 递归调用,上传下一张
self
.
upload_one_by_one
(
index
,
img_paths
,
success
,
fail
,
count
,
length
);
}
}
});
}
},
// 是否匿名事件
anonymous_event
(
e
)
{
this
.
setData
({
anonymous_value
:
e
.
detail
.
value
==
true
?
1
:
0
});
},
// 评分事件
rating_event
(
e
)
{
// 参数
var
index
=
e
.
currentTarget
.
dataset
.
index
;
var
value
=
e
.
currentTarget
.
dataset
.
value
;
// 数据初始化/赋值
var
temp_list
=
this
.
data
.
form_rating_list
;
var
length
=
this
.
data
.
detail
.
items
.
length
;
for
(
var
i
=
0
;
i
<
length
;
i
++
)
{
if
(
temp_list
[
i
]
==
undefined
)
{
temp_list
[
i
]
=
0
;
}
if
(
index
==
i
)
{
temp_list
[
i
]
=
value
;
}
}
this
.
setData
({
form_rating_list
:
temp_list
});
},
// 评论内容
form_content_event
(
e
)
{
// 参数
var
index
=
e
.
currentTarget
.
dataset
.
index
;
var
value
=
e
.
detail
.
value
;
// 数据初始化/赋值
var
temp_list
=
this
.
data
.
form_content_list
;
var
length
=
this
.
data
.
detail
.
items
.
length
;
for
(
var
i
=
0
;
i
<
length
;
i
++
)
{
if
(
temp_list
[
i
]
==
undefined
)
{
temp_list
[
i
]
=
''
;
}
if
(
index
==
i
)
{
temp_list
[
i
]
=
value
;
}
}
this
.
setData
({
form_content_list
:
temp_list
});
},
// 表单
formSubmit
(
e
)
{
// 商品数量
var
length
=
this
.
data
.
detail
.
items
.
length
;
// 评分校验
var
count
=
this
.
data
.
form_rating_list
.
length
;
if
(
count
<
length
)
{
app
.
showToast
(
'
请评分
'
);
return
false
;
}
var
max
=
Math
.
max
.
apply
(
null
,
this
.
data
.
form_rating_list
);
var
min
=
Math
.
min
.
apply
(
null
,
this
.
data
.
form_rating_list
);
if
(
min
<
1
||
max
>
5
)
{
app
.
showToast
(
'
评分有误
'
);
return
false
;
}
// 内容校验
var
count
=
this
.
data
.
form_content_list
.
length
;
if
(
count
<
length
)
{
app
.
showToast
(
'
请填写评论内容
'
);
return
false
;
}
for
(
var
i
in
this
.
data
.
form_content_list
)
{
var
count
=
this
.
data
.
form_content_list
[
i
].
length
;
if
(
count
<
6
||
count
>
230
)
{
app
.
showToast
(
'
评论内容 6~230 个字符之间
'
);
return
false
;
}
}
// 图片校验
if
(
this
.
data
.
form_images_list
.
length
>
0
)
{
for
(
var
i
in
this
.
data
.
form_images_list
)
{
if
(
this
.
data
.
form_images_list
[
i
].
length
>
3
)
{
app
.
showToast
(
'
每项评论图片不能超过3张
'
);
return
false
;
}
}
}
// 表单数据
var
form_data
=
e
.
detail
.
value
;
form_data
[
'
is_anonymous
'
]
=
form_data
[
'
is_anonymous
'
]
==
true
?
1
:
0
;
form_data
[
'
id
'
]
=
this
.
data
.
detail
.
id
;
form_data
[
'
goods_id
'
]
=
JSON
.
stringify
(
this
.
data
.
detail
.
items
.
map
(
function
(
v
)
{
return
v
.
goods_id
;
}));
form_data
[
'
rating
'
]
=
JSON
.
stringify
(
this
.
data
.
form_rating_list
);
form_data
[
'
content
'
]
=
JSON
.
stringify
(
this
.
data
.
form_content_list
);
form_data
[
'
images
'
]
=
this
.
data
.
form_images_list
.
length
>
0
?
JSON
.
stringify
(
this
.
data
.
form_images_list
)
:
''
;
// 提交表单
var
self
=
this
;
swan
.
showLoading
({
title
:
"
处理中...
"
});
self
.
setData
({
form_button_disabled
:
true
});
swan
.
request
({
url
:
app
.
get_request_url
(
"
commentssave
"
,
"
order
"
),
method
:
"
POST
"
,
data
:
form_data
,
dataType
:
"
json
"
,
header
:
{
'
content-type
'
:
'
application/x-www-form-urlencoded
'
},
success
:
res
=>
{
swan
.
hideLoading
();
if
(
res
.
data
.
code
==
0
)
{
app
.
showToast
(
res
.
data
.
msg
,
"
success
"
);
setTimeout
(
function
()
{
swan
.
navigateBack
();
},
2000
);
}
else
{
self
.
setData
({
form_button_disabled
:
false
});
app
.
showToast
(
res
.
data
.
msg
);
}
},
fail
:
()
=>
{
swan
.
hideLoading
();
self
.
setData
({
form_button_disabled
:
false
});
app
.
showToast
(
"
服务器请求出错
"
);
}
});
},
// 下拉刷新
onPullDownRefresh
()
{
this
.
init
();
}
});
\ No newline at end of file
public/appmini/old/baidu/pages/user-order-comments/user-order-comments.json
0 → 100644
浏览文件 @
8d85440f
{
"enablePullDownRefresh"
:
true
}
\ No newline at end of file
public/appmini/old/baidu/pages/user-order-comments/user-order-comments.swan
0 → 100644
浏览文件 @
8d85440f
<view s-if="detail != null">
<form bindsubmit="formSubmit" class="form-container">
<view s-for="item, index in detail.items" s-key="item" class="form-gorup bg-white oh">
<view class="oh">
<navigator url="/pages/goods-detail/goods-detail?goods_id={{item.goods_id}}" hover-class="none">
<image class="goods-image fl br" src="{{item.images}}" mode="aspectFill" />
</navigator>
<view class="item-base">
<block s-for="item, tx in [1,2,3,4,5]" s-key="tx">
<image class="xingxing-icon" src="/images/default-xingxing-icon{{form_rating_list[index] != undefined && form_rating_list[index] >= item ? '-active' : ''}}.png" mode="aspectFill" bindtap="rating_event" data-index="{{index}}" data-value="{{item}}" />
</block>
<text s-if="form_rating_list[index] != undefined" class="msg-text cr-888">{{rating_msg[form_rating_list[index]-1]}}</text>
</view>
</view>
<view class="form-content">
<textarea bindinput="form_content_event" data-index="{{index}}" placeholder-class="cr-ccc" class="cr-666" placeholder="退宝贝满足你的期待吗?说说它的有点和美中不足的地方吧" maxlength="230" value="{=form_msg=}" />
<view class="form-container-upload oh">
<view class="form-upload-data fl">
<block s-if="(form_images_list[index] || null) != null && form_images_list[index].length > 0">
<view s-for="item, ix in form_images_list[index]" s-key="item" class="item fl">
<text class="delete-icon" bindtap="upload_delete_event" data-index="{{index}}" data-ix="{{ix}}">x</text>
<image src="{{item}}" bindtap="upload_show_event" data-index="{{index}}" data-ix="{{ix}}" mode="aspectFill" />
</view>
</block>
</view>
<image s-if="(form_images_list[index] || null) == null || form_images_list[index].length < 3" class="upload-icon" src="/images/default-upload-icon.png" mode="aspectFill" bindtap="file_upload_event" data-index="{{index}}" />
</view>
</view>
</view>
<view class="form-gorup bg-white anonymous">
<switch name="is_anonymous" bindchange="anonymous_event" />
<text class="cr-666">匿名</text>
<text class="fr cr-888 tips-text">{{anonymous_msg_list[anonymous_value]}}</text>
</view>
<view class="form-gorup">
<button formType="submit" class="bg-main submit-bottom" type="default" hover-class="none" disabled="{{form_button_disabled}}">提交</button>
</view>
</form>
</view>
<view s-if="detail == null">
<import src="/pages/common/nodata.swan" />
<template is="nodata" data="{{{status: data_list_loding_status, msg: data_list_loding_msg}}}"></template>
</view>
\ No newline at end of file
public/appmini/old/baidu/pages/user-order/user-order.js
浏览文件 @
8d85440f
...
@@ -34,11 +34,11 @@ Page({
...
@@ -34,11 +34,11 @@ Page({
params
:
params
,
params
:
params
,
nav_status_index
:
nav_status_index
nav_status_index
:
nav_status_index
});
});
this
.
init
();
},
},
onShow
()
{
onShow
()
{
swan
.
setNavigationBarTitle
({
title
:
app
.
data
.
common_pages_title
.
user_order
});
swan
.
setNavigationBarTitle
({
title
:
app
.
data
.
common_pages_title
.
user_order
});
this
.
init
();
},
},
init
()
{
init
()
{
...
@@ -368,4 +368,11 @@ Page({
...
@@ -368,4 +368,11 @@ Page({
url
:
"
/pages/user-orderaftersale-detail/user-orderaftersale-detail?oid=
"
+
oid
+
"
&did=
"
+
did
url
:
"
/pages/user-orderaftersale-detail/user-orderaftersale-detail?oid=
"
+
oid
+
"
&did=
"
+
did
});
});
},
},
// 订单评论
comments_event
(
e
)
{
swan
.
navigateTo
({
url
:
"
/pages/user-order-comments/user-order-comments?id=
"
+
e
.
currentTarget
.
dataset
.
value
});
},
});
});
\ No newline at end of file
public/appmini/old/baidu/pages/user-order/user-order.swan
浏览文件 @
8d85440f
...
@@ -34,15 +34,12 @@
...
@@ -34,15 +34,12 @@
</navigator>
</navigator>
</view>
</view>
<view class="item-describe tr cr-666">{{item.describe}}</view>
<view class="item-describe tr cr-666">{{item.describe}}</view>
<view s-if="item.status <= 3" class="item-operation tr br-t">
<view s-if="item.status <= 3 || (item.status == 4 && item.user_is_comments == 0)" class="item-operation tr br-t">
<button s-if="item.status <= 1" class="submit-cancel" type="default" size="mini" bindtap="cancel_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">取消
<button s-if="item.status <= 1" class="submit-cancel" type="default" size="mini" bindtap="cancel_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">取消</button>
</button>
<button s-if="item.status == 1" class="submit-pay cr-666 br" type="default" size="mini" bindtap="pay_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">支付</button>
<button s-if="item.status == 1" class="submit-pay cr-666 br" type="default" size="mini" bindtap="pay_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">支付
<button s-if="item.status == 2" class="submit-rush cr-666 br" type="default" size="mini" bindtap="rush_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">催催</button>
</button>
<button s-if="item.status == 3" class="submit-success cr-666 br" type="default" size="mini" bindtap="collect_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">收货</button>
<button s-if="item.status == 2" class="submit-rush cr-666 br" type="default" size="mini" bindtap="rush_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">催催
<button s-if="item.status == 4 && item.user_is_comments == 0" class="submit-success cr-666 br" type="default" size="mini" bindtap="comments_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">评论</button>
</button>
<button s-if="item.status == 3" class="submit-success cr-666 br" type="default" size="mini" bindtap="collect_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">收货
</button>
</view>
</view>
</view>
</view>
...
...
public/appmini/old/weixin/app.json
浏览文件 @
8d85440f
{
{
"pages"
:
[
"pages/user-order
-comments/user-order-comments
"
,
"pages"
:
[
"pages/user-order
/user-order
"
,
"pages/index/index"
,
"pages/index/index"
,
"pages/goods-category/goods-category"
,
"pages/goods-category/goods-category"
,
"pages/cart/cart"
,
"pages/cart/cart"
,
...
@@ -14,8 +14,9 @@
...
@@ -14,8 +14,9 @@
"pages/buy/buy"
,
"pages/buy/buy"
,
"pages/user-address/user-address"
,
"pages/user-address/user-address"
,
"pages/user-address-save/user-address-save"
,
"pages/user-address-save/user-address-save"
,
"pages/user-order/user-order"
,
"pages/user-order-detail/user-order-detail"
,
"pages/user-order-detail/user-order-detail"
,
"pages/user-order-comments/user-order-comments"
,
"pages/user-faovr/user-faovr"
,
"pages/user-faovr/user-faovr"
,
"pages/user-answer-list/user-answer-list"
,
"pages/user-answer-list/user-answer-list"
,
"pages/answer-list/answer-list"
,
"pages/answer-list/answer-list"
,
...
...
public/appmini/old/weixin/pages/user-order-comments/user-order-comments.js
浏览文件 @
8d85440f
...
@@ -6,12 +6,18 @@ Page({
...
@@ -6,12 +6,18 @@ Page({
params
:
null
,
params
:
null
,
detail
:
null
,
detail
:
null
,
rating_list
:
[]
,
editor_path_type
:
''
,
rating_msg
:
[
'
非常差
'
,
'
差
'
,
'
一般
'
,
'
好
'
,
'
非常好
'
],
rating_msg
:
[
'
非常差
'
,
'
差
'
,
'
一般
'
,
'
好
'
,
'
非常好
'
],
anonymous_value
:
0
,
anonymous_msg_list
:
[
'
你写的评论会以匿名的形式展现
'
,
'
你写的评论会以昵称的形式展现
'
],
form_rating_list
:
[],
form_images_list
:
[],
form_content_list
:
[],
form_button_disabled
:
false
,
},
},
onLoad
(
params
)
{
onLoad
(
params
)
{
params
[
'
id
'
]
=
3
;
this
.
setData
({
params
:
params
});
this
.
setData
({
params
:
params
});
this
.
init
();
this
.
init
();
},
},
...
@@ -28,7 +34,7 @@ Page({
...
@@ -28,7 +34,7 @@ Page({
});
});
wx
.
request
({
wx
.
request
({
url
:
app
.
get_request_url
(
"
detail
"
,
"
order
"
),
url
:
app
.
get_request_url
(
"
comments
"
,
"
order
"
),
method
:
"
POST
"
,
method
:
"
POST
"
,
data
:
{
data
:
{
id
:
this
.
data
.
params
.
id
id
:
this
.
data
.
params
.
id
...
@@ -40,7 +46,8 @@ Page({
...
@@ -40,7 +46,8 @@ Page({
if
(
res
.
data
.
code
==
0
)
{
if
(
res
.
data
.
code
==
0
)
{
var
data
=
res
.
data
.
data
;
var
data
=
res
.
data
.
data
;
self
.
setData
({
self
.
setData
({
detail
:
data
,
editor_path_type
:
data
.
editor_path_type
||
''
,
detail
:
data
.
data
,
data_list_loding_status
:
3
,
data_list_loding_status
:
3
,
data_list_loding_msg
:
''
,
data_list_loding_msg
:
''
,
});
});
...
@@ -64,20 +71,246 @@ Page({
...
@@ -64,20 +71,246 @@ Page({
});
});
},
},
// 上传图片预览
upload_show_event
(
e
)
{
var
index
=
e
.
currentTarget
.
dataset
.
index
;
var
ix
=
e
.
currentTarget
.
dataset
.
ix
;
wx
.
previewImage
({
current
:
this
.
data
.
form_images_list
[
index
][
ix
],
urls
:
this
.
data
.
form_images_list
[
index
],
});
},
// 图片删除
upload_delete_event
(
e
)
{
var
index
=
e
.
currentTarget
.
dataset
.
index
;
var
ix
=
e
.
currentTarget
.
dataset
.
ix
;
var
self
=
this
;
wx
.
showModal
({
title
:
'
温馨提示
'
,
content
:
'
删除后不可恢复、继续吗?
'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
var
list
=
self
.
data
.
form_images_list
;
list
[
index
].
splice
(
ix
,
1
);
self
.
setData
({
form_images_list
:
list
,
});
}
}
});
},
// 文件上传
file_upload_event
(
e
)
{
// 数据初始化
var
index
=
e
.
currentTarget
.
dataset
.
index
;
var
temp_list
=
this
.
data
.
form_images_list
;
var
length
=
this
.
data
.
detail
.
items
.
length
;
for
(
var
i
=
0
;
i
<
length
;
i
++
)
{
if
(
temp_list
[
i
]
==
undefined
)
{
temp_list
[
i
]
=
[];
}
}
this
.
setData
({
form_images_list
:
temp_list
});
// 处理上传文件
var
self
=
this
;
wx
.
chooseImage
({
count
:
3
,
success
(
res
)
{
var
success
=
0
;
var
fail
=
0
;
var
length
=
res
.
tempFilePaths
.
length
;
var
count
=
0
;
self
.
upload_one_by_one
(
index
,
res
.
tempFilePaths
,
success
,
fail
,
count
,
length
);
}
});
},
// 采用递归的方式上传多张
upload_one_by_one
(
index
,
img_paths
,
success
,
fail
,
count
,
length
)
{
var
self
=
this
;
if
((
self
.
data
.
form_images_list
[
index
]
||
null
)
==
null
||
self
.
data
.
form_images_list
[
index
].
length
<
3
)
{
wx
.
uploadFile
({
url
:
app
.
get_request_url
(
"
index
"
,
"
ueditor
"
),
filePath
:
img_paths
[
count
],
name
:
'
upfile
'
,
formData
:
{
action
:
'
uploadimage
'
,
path_type
:
self
.
data
.
editor_path_type
},
success
:
function
(
res
)
{
success
++
;
if
(
res
.
statusCode
==
200
)
{
var
data
=
(
typeof
(
res
.
data
)
==
'
object
'
)
?
res
.
data
:
JSON
.
parse
(
res
.
data
);
if
(
data
.
code
==
0
&&
(
data
.
data
.
url
||
null
)
!=
null
)
{
var
list
=
self
.
data
.
form_images_list
;
if
((
list
[
index
]
||
null
)
==
null
)
{
list
[
index
]
=
[];
}
list
[
index
].
push
(
data
.
data
.
url
);
self
.
setData
({
form_images_list
:
list
});
}
else
{
app
.
showToast
(
data
.
msg
);
}
}
},
fail
:
function
(
e
)
{
fail
++
;
},
complete
:
function
(
e
)
{
count
++
;
// 下一张
if
(
count
>=
length
)
{
// 上传完毕,作一下提示
//app.showToast('上传成功' + success +'张', 'success');
}
else
{
// 递归调用,上传下一张
self
.
upload_one_by_one
(
index
,
img_paths
,
success
,
fail
,
count
,
length
);
}
}
});
}
},
// 是否匿名事件
anonymous_event
(
e
)
{
this
.
setData
({
anonymous_value
:
e
.
detail
.
value
==
true
?
1
:
0
});
},
// 评分事件
// 评分事件
rating_event
(
e
)
{
rating_event
(
e
)
{
console
.
log
(
e
.
currentTarget
.
dataset
)
// 参数
var
index
=
e
.
currentTarget
.
dataset
.
index
;
var
index
=
e
.
currentTarget
.
dataset
.
index
;
var
tx
=
e
.
currentTarget
.
dataset
.
tx
;
var
value
=
e
.
currentTarget
.
dataset
.
value
;
var
value
=
e
.
currentTarget
.
dataset
.
value
;
var
temp_list
=
this
.
data
.
rating_list
;
temp_list
[
index
]
=
value
;
// 数据初始化/赋值
this
.
setData
({
rating_list
:
temp_list
});
var
temp_list
=
this
.
data
.
form_rating_list
;
var
length
=
this
.
data
.
detail
.
items
.
length
;
for
(
var
i
=
0
;
i
<
length
;
i
++
)
{
if
(
temp_list
[
i
]
==
undefined
)
{
temp_list
[
i
]
=
0
;
}
if
(
index
==
i
)
{
temp_list
[
i
]
=
value
;
}
}
this
.
setData
({
form_rating_list
:
temp_list
});
},
// 评论内容
form_content_event
(
e
)
{
// 参数
var
index
=
e
.
currentTarget
.
dataset
.
index
;
var
value
=
e
.
detail
.
value
;
// 数据初始化/赋值
var
temp_list
=
this
.
data
.
form_content_list
;
var
length
=
this
.
data
.
detail
.
items
.
length
;
for
(
var
i
=
0
;
i
<
length
;
i
++
)
{
if
(
temp_list
[
i
]
==
undefined
)
{
temp_list
[
i
]
=
''
;
}
if
(
index
==
i
)
{
temp_list
[
i
]
=
value
;
}
}
this
.
setData
({
form_content_list
:
temp_list
});
},
},
// 表单
// 表单
formSubmit
(
e
)
{
formSubmit
(
e
)
{
console
.
log
(
e
.
detail
.
value
)
// 商品数量
var
length
=
this
.
data
.
detail
.
items
.
length
;
// 评分校验
var
count
=
this
.
data
.
form_rating_list
.
length
;
if
(
count
<
length
)
{
app
.
showToast
(
'
请评分
'
);
return
false
;
}
var
max
=
Math
.
max
.
apply
(
null
,
this
.
data
.
form_rating_list
);
var
min
=
Math
.
min
.
apply
(
null
,
this
.
data
.
form_rating_list
);
if
(
min
<
1
||
max
>
5
)
{
app
.
showToast
(
'
评分有误
'
);
return
false
;
}
// 内容校验
var
count
=
this
.
data
.
form_content_list
.
length
;
if
(
count
<
length
)
{
app
.
showToast
(
'
请填写评论内容
'
);
return
false
;
}
for
(
var
i
in
this
.
data
.
form_content_list
)
{
var
count
=
this
.
data
.
form_content_list
[
i
].
length
;
if
(
count
<
6
||
count
>
230
)
{
app
.
showToast
(
'
评论内容 6~230 个字符之间
'
);
return
false
;
}
}
// 图片校验
if
(
this
.
data
.
form_images_list
.
length
>
0
)
{
for
(
var
i
in
this
.
data
.
form_images_list
)
{
if
(
this
.
data
.
form_images_list
[
i
].
length
>
3
)
{
app
.
showToast
(
'
每项评论图片不能超过3张
'
);
return
false
;
}
}
}
// 表单数据
var
form_data
=
e
.
detail
.
value
;
form_data
[
'
is_anonymous
'
]
=
form_data
[
'
is_anonymous
'
]
==
true
?
1
:
0
;
form_data
[
'
id
'
]
=
this
.
data
.
detail
.
id
;
form_data
[
'
goods_id
'
]
=
JSON
.
stringify
(
this
.
data
.
detail
.
items
.
map
(
function
(
v
)
{
return
v
.
goods_id
}));
form_data
[
'
rating
'
]
=
JSON
.
stringify
(
this
.
data
.
form_rating_list
);
form_data
[
'
content
'
]
=
JSON
.
stringify
(
this
.
data
.
form_content_list
);
form_data
[
'
images
'
]
=
(
this
.
data
.
form_images_list
.
length
>
0
)
?
JSON
.
stringify
(
this
.
data
.
form_images_list
)
:
''
;
// 提交表单
var
self
=
this
;
wx
.
showLoading
({
title
:
"
处理中...
"
});
self
.
setData
({
form_button_disabled
:
true
});
wx
.
request
({
url
:
app
.
get_request_url
(
"
commentssave
"
,
"
order
"
),
method
:
"
POST
"
,
data
:
form_data
,
dataType
:
"
json
"
,
header
:
{
'
content-type
'
:
'
application/x-www-form-urlencoded
'
},
success
:
res
=>
{
wx
.
hideLoading
();
if
(
res
.
data
.
code
==
0
)
{
app
.
showToast
(
res
.
data
.
msg
,
"
success
"
);
setTimeout
(
function
()
{
wx
.
navigateBack
();
},
2000
);
}
else
{
self
.
setData
({
form_button_disabled
:
false
});
app
.
showToast
(
res
.
data
.
msg
);
}
},
fail
:
()
=>
{
wx
.
hideLoading
();
self
.
setData
({
form_button_disabled
:
false
});
app
.
showToast
(
"
服务器请求出错
"
);
}
});
},
},
// 下拉刷新
// 下拉刷新
...
...
public/appmini/old/weixin/pages/user-order-comments/user-order-comments.wxml
浏览文件 @
8d85440f
...
@@ -7,36 +7,35 @@
...
@@ -7,36 +7,35 @@
</navigator>
</navigator>
<view class="item-base">
<view class="item-base">
<block wx:for="{{[1,2,3,4,5]}}" wx:key="tx" wx:for-index="tx">
<block wx:for="{{[1,2,3,4,5]}}" wx:key="tx" wx:for-index="tx">
<image class="xingxing-icon" src="/images/default-xingxing-icon{{
rating_list[index] != undefined && rating_list[index] >= item ? '-active' : ''}}.png" mode="aspectFill" bindtap="rating_event" data-index="{{index}}" data-tx="{{t
x}}" data-value="{{item}}" />
<image class="xingxing-icon" src="/images/default-xingxing-icon{{
form_rating_list[index] != undefined && form_rating_list[index] >= item ? '-active' : ''}}.png" mode="aspectFill" bindtap="rating_event" data-index="{{inde
x}}" data-value="{{item}}" />
</block>
</block>
<text wx:if="{{
rating_list[index] != undefined}}" class="msg-text cr-888">{{rating_msg[
rating_list[index]-1]}}</text>
<text wx:if="{{
form_rating_list[index] != undefined}}" class="msg-text cr-888">{{rating_msg[form_
rating_list[index]-1]}}</text>
</view>
</view>
</view>
</view>
<view class="form-content">
<view class="form-content">
<textarea
name="content_
{{index}}" placeholder-class="cr-ccc" class="cr-666" placeholder="退宝贝满足你的期待吗?说说它的有点和美中不足的地方吧" maxlength="230" value="{{form_msg}}" />
<textarea
bindinput="form_content_event" data-index="
{{index}}" placeholder-class="cr-ccc" class="cr-666" placeholder="退宝贝满足你的期待吗?说说它的有点和美中不足的地方吧" maxlength="230" value="{{form_msg}}" />
<view class="form-container-upload oh">
<view class="form-container-upload oh">
<view class="form-upload-data fl">
<view class="form-upload-data fl">
<block wx:if="{{
form_images_list
.length > 0}}">
<block wx:if="{{
(form_images_list[index] || null) != null && form_images_list[index]
.length > 0}}">
<view wx:for="{{form_images_list
}}" wx:key="item"
class="item fl">
<view wx:for="{{form_images_list
[index]}}" wx:key="item" wx:for-index="ix"
class="item fl">
<text class="delete-icon" bindtap="upload_delete_event" data-index="{{index}}">x</text>
<text class="delete-icon" bindtap="upload_delete_event" data-index="{{index}}"
data-ix="{{ix}}"
>x</text>
<image src="{{item}}" bindtap="upload_show_event" data-index="{{index}}" mode="aspectFill" />
<image src="{{item}}" bindtap="upload_show_event" data-index="{{index}}"
data-ix="{{ix}}"
mode="aspectFill" />
</view>
</view>
</block>
</block>
</view>
</view>
<image
class="upload-icon" src="/images/default-upload-icon.png" mode="aspectFill" bindtap="file_upload_event
" />
<image
wx:if="{{(form_images_list[index] || null) == null || form_images_list[index].length < 3}}" class="upload-icon" src="/images/default-upload-icon.png" mode="aspectFill" bindtap="file_upload_event" data-index="{{index}}
" />
</view>
</view>
</view>
</view>
</view>
</view>
<view class="form-gorup bg-white anonymous">
<view class="form-gorup bg-white anonymous">
<switch name="is_anonymous"
checked="{{switch1Checked}}" bindchange="switch1Change"
/>
<switch name="is_anonymous"
bindchange="anonymous_event"
/>
<text class="cr-666">匿名</text>
<text class="cr-666">匿名</text>
<text class="fr cr-888 tips-text">
公开的评论会展示在商品详情页面
</text>
<text class="fr cr-888 tips-text">
{{anonymous_msg_list[anonymous_value]}}
</text>
</view>
</view>
<view class="form-gorup">
<view class="form-gorup">
<button formType="submit" class="bg-main submit-bottom" type="default"
bindtap="form_submit_event"
hover-class="none" disabled="{{form_button_disabled}}">提交</button>
<button formType="submit" class="bg-main submit-bottom" type="default" hover-class="none" disabled="{{form_button_disabled}}">提交</button>
</view>
</view>
</form>
</form>
</view>
</view>
...
...
public/appmini/old/weixin/pages/user-order/user-order.js
浏览文件 @
8d85440f
...
@@ -41,11 +41,11 @@ Page({
...
@@ -41,11 +41,11 @@ Page({
params
:
params
,
params
:
params
,
nav_status_index
:
nav_status_index
,
nav_status_index
:
nav_status_index
,
});
});
this
.
init
();
},
},
onShow
()
{
onShow
()
{
wx
.
setNavigationBarTitle
({
title
:
app
.
data
.
common_pages_title
.
user_order
});
wx
.
setNavigationBarTitle
({
title
:
app
.
data
.
common_pages_title
.
user_order
});
this
.
init
();
},
},
init
()
{
init
()
{
...
@@ -386,4 +386,11 @@ Page({
...
@@ -386,4 +386,11 @@ Page({
url
:
"
/pages/user-orderaftersale-detail/user-orderaftersale-detail?oid=
"
+
oid
+
"
&did=
"
+
did
url
:
"
/pages/user-orderaftersale-detail/user-orderaftersale-detail?oid=
"
+
oid
+
"
&did=
"
+
did
});
});
},
},
// 订单评论
comments_event
(
e
)
{
wx
.
navigateTo
({
url
:
"
/pages/user-order-comments/user-order-comments?id=
"
+
e
.
currentTarget
.
dataset
.
value
});
},
});
});
public/appmini/old/weixin/pages/user-order/user-order.wxml
浏览文件 @
8d85440f
...
@@ -34,15 +34,12 @@
...
@@ -34,15 +34,12 @@
</navigator>
</navigator>
</view>
</view>
<view class="item-describe tr cr-666">{{item.describe}}</view>
<view class="item-describe tr cr-666">{{item.describe}}</view>
<view wx:if="{{item.status <= 3}}" class="item-operation tr br-t">
<view wx:if="{{item.status <= 3 || (item.status == 4 && item.user_is_comments == 0)}}" class="item-operation tr br-t">
<button wx:if="{{item.status <= 1}}" class="submit-cancel" type="default" size="mini" bindtap="cancel_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">取消
<button wx:if="{{item.status <= 1}}" class="submit-cancel" type="default" size="mini" bindtap="cancel_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">取消</button>
</button>
<button wx:if="{{item.status == 1}}" class="submit-pay cr-666 br" type="default" size="mini" bindtap="pay_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">支付</button>
<button wx:if="{{item.status == 1}}" class="submit-pay cr-666 br" type="default" size="mini" bindtap="pay_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">支付
<button wx:if="{{item.status == 2}}" class="submit-rush cr-666 br" type="default" size="mini" bindtap="rush_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">催催</button>
</button>
<button wx:if="{{item.status == 3}}" class="submit-success cr-666 br" type="default" size="mini" bindtap="collect_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">收货</button>
<button wx:if="{{item.status == 2}}" class="submit-rush cr-666 br" type="default" size="mini" bindtap="rush_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">催催
<button wx:if="{{item.status == 4 && item.user_is_comments == 0}}" class="submit-success cr-666 br" type="default" size="mini" bindtap="comments_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">评论</button>
</button>
<button wx:if="{{item.status == 3}}" class="submit-success cr-666 br" type="default" size="mini" bindtap="collect_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">收货
</button>
</view>
</view>
</view>
</view>
...
...
public/static/upload/images/order_comments/3/9/2019/10/10/1570705883308238.png
0 → 100644
浏览文件 @
8d85440f
27.5 KB
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录