Blame view

apps/home/views/action/comment.hbs 12.6 KB
陈轩 authored
1
<div class="comment-me-page me-page yoho-page clearfix">
yyq authored
2 3 4 5
    {{> path}}
    {{> navigation}}
    <div class="me-main">
        <div class="comment block">
刘传洋 authored
6
        <h2 class="title {{#if isFromOrder}}comment-order{{/if}}"></h2>
陈轩 authored
7
yyq authored
8 9
            {{#with comment}}
                <div class="me-comment">
刘传洋 authored
10
                    {{#unless ../isFromOrder}}
刘传洋 authored
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
                        <div class="main-tip">
                            {{#if isComment}}
                                您己对<span id="goodsNum">{{goodsNum}}</span>件商品发表评论,感谢您优质的评论和分享!
                                <select class="right" onchange="javascript:location.href='/home/comment?isComment='+this.value;">
                                    <option value="N">未发表评论的商品</option>
                                    <option value="Y" selected="">己发表评论的商品</option>
                                </select>
                            {{else}}
                                您还有<span id="goodsNum">{{goodsNum}}</span>件商品未发表评论,欢迎您发表原创、与商品质量相关、对其他用户有参考价值的商品评论。
                                <select class="right" onchange="javascript:location.href='/home/comment?isComment='+this.value;">
                                    <option value="N" selected="">未发表评论的商品</option>
                                    <option value="Y">己发表评论的商品</option>
                                </select>
                            {{/if}}
                        </div>
                    {{/unless}}
yyq authored
27 28
                    <p class="comment-table-header table-header clearfix">
                        <span class="info">商品信息</span>
刘传洋 authored
29
                        <span class="type">操作</span>
yyq authored
30
                    </p>
陈轩 authored
31
yyq authored
32 33 34
                    {{#if orders.length }}
                        <table class="comment-table">
                            {{#each orders}}
刘传洋 authored
35
                                <!--<tr>
yyq authored
36 37 38 39
                                    <th colspan="4">
                                        订单编号:{{orderNum}}
                                        <span class="right">下单时间:{{orderTime}}</span>
                                    </th>
刘传洋 authored
40
                                </tr>-->
yyq authored
41 42
                                {{#each goods}}
                                    <tr>
刘传洋 authored
43
                                        <td width="70">
周少峰 authored
44
                                            <a href="{{href}}" class="goods-img"><img src="{{image2 thumb}}"></a>
yyq authored
45 46
                                        </td>
                                        <td>
刘传洋 authored
47
                                            <a href="{{href}}" class="name">{{name}}</a>
刘传洋 authored
48
                                            <div>下单时间:{{orderTime}}</div>
刘传洋 authored
49
                                        </td>
刘传洋 authored
50
                                        <td style="width:50%" class="center">
刘传洋 authored
51
                                            <button class="btn active radius" data-role="showCommentForm">评价商品</button>
刘传洋 authored
52 53
                                        </td>
                                    </tr>
刘传洋 authored
54
                                    <tr data-role="commentAddForm" class="m-hide">
刘传洋 authored
55
                                        <td colspan="3" class="comment-add">
刘传洋 authored
56
                                            <div class="arrow"><i></i><em></em></div>
刘传洋 authored
57 58 59 60 61 62 63
                                            <input type="hidden" name="productSkn" value="{{productSkn}}"  />
                                            <input type="hidden" name="productId" value="{{productId}}" />
                                            <input type="hidden" name="goodsId" value="{{goodsId}}" />
                                            <input type="hidden" name="orderCode" value="{{orderCode}}" />
                                            <input type="hidden" name="orderId" value="{{orderId}}" />
                                            <input type="hidden" name="erpSkuId" value="{{erpSkuId}}" />
刘传洋 authored
64 65
                                            <div class="row">
                                                <label class="fl-left"><i class="color-warn require-sign">*</i> 商品满意度:</label>
刘传洋 authored
66 67 68 69 70 71
                                                <span class="comment-star editable"data-role="star">
                                                    <span class="star-5" data-star="5"></span>
                                                    <span class="star-4" data-star="4"></span>
                                                    <span class="star-3" data-star="3"></span>
                                                    <span class="star-2" data-star="2"></span>
                                                    <span class="star-1" data-star="1"></span>
刘传洋 authored
72 73 74
                                                </span>
                                            </div>
                                            <div class="row">
刘传洋 authored
75
                                                <span class="col btn-group" data-role="size">
刘传洋 authored
76
                                                    <label><i class="color-warn require-sign">*</i> 尺码符合度:</label>
刘传洋 authored
77 78 79
                                                    <a href="javascript:void(0);" class="btn btn-outline" data-size="SMALL">偏小</a>
                                                    <a href="javascript:void(0);" class="btn btn-outline" data-size="MIDDLE">合身</a>
                                                    <a href="javascript:void(0);" class="btn btn-outline" data-size="BIG">偏大</a>
刘传洋 authored
80 81 82
                                                </span>
                                                <span class="col">
                                                    <label>身高:</label>
刘传洋 authored
83
                                                     <span class="color-gray">
刘传洋 authored
84
                                                         <input class="btn btn-outline disabled s-input" name="height" value="" maxlength="3" /> 厘米
刘传洋 authored
85
                                                     </span>
刘传洋 authored
86 87 88
                                                </span>
                                                <span class="col">
                                                    <label>体重:</label>
刘传洋 authored
89 90 91
                                                    <span class="color-gray">
                                                        <input class="btn btn-outline disabled s-input" name="weight" value="" maxlength="3" /> 公斤
                                                    </span>
刘传洋 authored
92 93
                                                </span>
                                            </div>
刘传洋 authored
94
                                            <div class="row textarea" data-role="goodsCommentWrap">
m  
刘传洋 authored
95
                                                <label for="goodsComment" class="text-tip">晒单有奖,<i>100有货币</i>等你来拿!</label>
刘传洋 authored
96
                                                <label for="goodsComment" class="text-tip-limit">限制200字</label>
刘传洋 authored
97
                                                <textarea name="goodsComment"></textarea>
刘传洋 authored
98
                                            </div>
刘传洋 authored
99
                                            <div class="row img-list clearfix">
刘传洋 authored
100 101
                                                <div class="img-preview">
                                                    <img src="" />
刘传洋 authored
102
                                                    <input type="file" name="file" accept="image/*" id="upload-{{../orderId}}-{{goodsId}}" />
刘传洋 authored
103
                                                    <input type="hidden" name="imgUrl" />
刘传洋 authored
104 105
                                                    <i class="view">查看</i>
                                                    <i class="del">删除</i>
刘传洋 authored
106
                                                </div>
刘传洋 authored
107
                                                <span class="color-warn"><i class="iconfont">&#xe671;</i> 最多上传1张图片</span>
刘传洋 authored
108 109
                                            </div>
                                            <div class="btns">
刘传洋 authored
110 111 112
                                                <a href="javascript:void(0);"
                                                   class="btn btn-submit active radius"
                                                   data-iid="{{orderId}}-{{goodsId}}">提交评价</a>
刘传洋 authored
113
                                                <span class="color-warn">带*为必填选项</span>
刘传洋 authored
114
                                            </div>
yyq authored
115 116
                                        </td>
                                    </tr>
刘传洋 authored
117 118 119 120 121 122 123 124 125 126
                                    <tr class="commented-list {{#unless comments}}m-hide{{/unless}}" data-role="commentList" data-lid="{{orderId}}-{{goodsId}}">
                                        <td class="vtop right">购买评价:</td>
                                        <td colspan="2" data-role="clist">
                                            {{#each comments}}
                                                <div class="item">
                                                    <div class="comment-info clearfix color-gray">
                                                        <span class="comment-star fl-left">
                                                            <span class="star-{{satisfied}} active"></span>
                                                        </span>
                                                        <span>{{sizeLabel}}</span>
刘传洋 authored
127 128
                                                        {{#if height}}<span>身高:{{height}} 厘米</span>{{/if}}
                                                        {{#if weight}}<span>体重:{{weight}} 公斤</span>{{/if}}
刘传洋 authored
129 130
                                                    </div>
                                                    <p>{{content}}</p>
刘传洋 authored
131 132 133
                                                    {{#if url}}
                                                        <div class="clearfix">
                                                            <div class="img-preview selected">
周少峰 authored
134
                                                                <img src="{{image2 url}}" source-url="{{image2 sourceUrl}}" />
刘传洋 authored
135 136
                                                                <i class="view view-only">查看</i>
                                                            </div>
刘传洋 authored
137
                                                        </div>
刘传洋 authored
138
                                                    {{/if}}
刘传洋 authored
139
                                                    <p class="color-gray">评论时间:{{createTime}}</p>
刘传洋 authored
140 141 142 143
                                                </div>
                                            {{/each}}
                                        </td>
                                    </tr>
yyq authored
144 145 146
                                {{/each}}
                            {{/each}}
                        </table>
刘传洋 authored
147
                        {{#with ../pager}}
yyq authored
148 149 150 151 152 153 154
                            {{> common/foot-pager footPager=this}}
                        {{/with}}
                    {{else}}
                        {{> empty this}}
                    {{/if}}
                </div>
            {{/with}}
陈轩 authored
155
        </div>
yyq authored
156
刘传洋 authored
157 158 159 160 161 162 163 164 165 166 167 168 169
        <script type="text/x-handlebars" id="comment-list-item-tpl">
            <div class="item">
                <div class="comment-info clearfix color-gray">
                    <span class="comment-star fl-left">
                        <span class="star-\{{satisfied}} active"></span>
                    </span>
                    <span>\{{sizeLabel}}</span>
                    <span>身高:\{{height}} 厘米</span>
                    <span>体重:\{{weight}} 公斤</span>
                </div>
                <p>\{{content}}</p>
                <div class="clearfix">
                    <div class="img-preview selected">
周少峰 authored
170
                        <img src="\{{image2 url}}" />
刘传洋 authored
171 172 173
                        <i class="view view-only">查看</i>
                    </div>
                </div>
刘传洋 authored
174
                <p class="color-gray">评论时间:\{{createTime}}</p>
刘传洋 authored
175 176 177
            </div>
        </script>
yyq authored
178 179 180
        {{> help-us}}
    </div>
    <div id="comment-dialog-widget" class="comment-dialog-widget hide">
陈轩 authored
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197
        <div class="dialog-titlebar">
            <span class="dialog-close-btn"></span>
        </div>
        <div class="dialog-content">
            <dl>
                <dd>商品评论:</dd>
                <dd>
                    <textarea id="comment-content"></textarea>
                </dd>
            </dl>
        </div>
        <div class="dialog-buttons">
            <button class="dialog-close-btn">取消</button>
            <button class="dialog-save-btn">提交评论</button>
        </div>
    </div>
</div>