review.html
4.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!--S 产品展示-->
{echo:JS::import('form')}
<link type="text/css" rel="stylesheet" href="{url:#css/product.css}" />
<link type="text/css" rel="stylesheet" href="{url:#js/stars/stars.css}" />
<script type='text/javascript' src="{url:#js/stars/stars.js}"></script>
<div class="container">
<div class="layout-2col mt20 clearfix" >
<div class="sidebar">
<div class="box">
<h2 class="title">商品信息:</h2>
<div style="width: 200px; padding:15px;" >
<img class="big-pic" width="200px" src="{url:@$review[img]}" source="{url:@$review[img]}">
<h1><a href="{url:/index/product/id/$review[gid]}">{$review['name']}</a></h1>
<p>销售价:<b class="red">{$currency_symbol}{$review['sell_price']}</b></p>
<p class="tc"><a href="{url:/index/product/id/$review[gid]}" class="btn btn-main" target="_blank">前去购买</a></p>
</div>
</div>
</div>
<div class="content">
<div class="spec-info mt10 clearfix">
<h1 class="title"><span style="font-size: 14px;">我要评价:</span></h1>
<form action="{url:/}" method="post ">
<input type="hidden" name="con" value="index">
<input type="hidden" name="act" value="review_act">
<table class="mt20 " style="width:100%">
<tr><td class="label" width="100">*商品满意度</td> <td>
<div class=rate-comm id='rate-comment'></div>
<input type="hidden" name="id" value="{$review['id']}">
<input style="visibility: hidden;width: 10px;" name="point" id="comment-point" pattern="int" alt="打分后才能提交!"><label></label>
</td>
</tr>
<tr class="mt20"><td class="label"> </td> <td><div class="mt20"><textarea name="content" style="height: 140px; width:100%"></textarea></div></td></tr>
<tr><td colspan="2" class="tc"><input type="submit" value="提交评价" class="btn btn-main"></td></tr>
</table>
</form>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(function(){
var options = {
max : 5,
image:'{url:#js/stars/stars.jpg}',
imageAll:'{url:#js/stars/stars-all.gif}',
title_format : function(value) {
var title = '';
switch (value) {
case 1 :
title = '很不满意';
break;
case 2 :
title = '不满意';
break;
case 3 :
title = '一般';
break;
case 4 :
title = '满意';
break;
case 5 :
title = '非常满意';
break;
default :
title = comment_rank;
break;
}
$('#comment-point').val(value);
FireEvent(document.getElementById('comment-point'),'change');
return title;
},
info_format : function(value) {
var info = '';
switch (value) {
case 1 :
info = '<div class="info-box">1分 很不满意<div>商品样式和质量都非常差,太令人失望了!</div></div>';
break;
case 2 :
info = '<div class="info-box">2分 不满意<div>商品样式和质量不好,不能满足要求。</div></div>';
break;
case 3 :
info = '<div class="info-box">3分 一般<div>商品样式和质量感觉一般。</div></div>';
break;
case 4 :
info = '<div class="info-box">4分 满意<div>商品样式和质量都比较满意,符合我的期望。</div></div>';
break;
case 5 :
info = '<div class="info-box">5分 非常满意<div>我很喜欢!商品样式和质量都很满意,太棒了!</div></div>';
break;
default :
info = value;
break;
}
return info;
}
}
$('#rate-comment').rater(options);
})
</script>