index.html 10.3 KB
Newer Older
D
v1.2.0  
devil_gong 已提交
1 2 3 4 5 6 7 8 9 10 11 12
{{include file="public/header" /}}

<!-- right content start  -->
<div class="content-right">
	<div class="content">
		<!-- form start -->
		<form class="am-form view-list" action="{{:MyUrl('admin/answer/index')}}" method="POST">
			<div class="am-g">
				<input type="text" autocomplete="off" class="am-radius form-keyword" placeholder="联系人/内容" name="keywords" {{if !empty($params['keywords'])}} value="{{$params.keywords}}"{{/if}} />
				<button type="submit" class="am-btn am-btn-secondary am-btn-sm am-radius form-submit">查询</button>
				<label class="fs-12 m-l-5 c-p fw-100 more-submit">
					更多筛选
D
devil_gong 已提交
13 14 15 16 17 18 19
                    {{if isset($params['is_more']) and $params['is_more'] eq 1}}
                        <input type="checkbox" name="is_more" value="1" id="is_more" checked />
                        <i class="am-icon-angle-up"></i>
                    {{else /}}
                        <input type="checkbox" name="is_more" value="1" id="is_more" />
                        <i class="am-icon-angle-down"></i>
                    {{/if}}
D
v1.2.0  
devil_gong 已提交
20 21 22 23 24 25 26 27 28
				</label>

				<div class="more-where {{if !isset($params['is_more']) or $params['is_more'] neq 1}}none{{/if}}">
					<select name="is_show" class="am-radius c-p m-t-10 m-l-5 param-where">
						<option value="-1">是否显示</option>
						{{foreach $common_is_show_list as $v}}
							<option value="{{$v.id}}" {{if isset($params['is_show']) and $params['is_show'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
						{{/foreach}}
					</select>
D
devil_gong 已提交
29 30 31 32 33 34 35 36
					<select name="is_reply" class="am-radius c-p m-t-10 m-l-5 param-where" data-placeholder="是否回复...">
                        <option value="-1">是否回复...</option>
                        {{if !empty($common_is_text_list)}}
                            {{foreach $common_is_text_list as $v}}
                                <option value="{{$v.id}}" {{if isset($params['is_reply']) and $params['is_reply'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
                            {{/foreach}}
                        {{/if}}
                    </select>
D
v1.2.0  
devil_gong 已提交
37 38 39 40 41 42 43 44 45 46
					<div class="param-date param-where m-l-5">
						<input type="text" autocomplete="off" name="time_start" class="Wdate am-radius m-t-10" placeholder="起始时间" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd HH:mm:ss'})" {{if isset($params['time_start'])}}value="{{$params.time_start}}"{{/if}}/>
						<span>~</span>
						<input type="text" autocomplete="off" class="Wdate am-radius m-t-10" placeholder="结束时间" name="time_end" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd HH:mm:ss'})" {{if isset($params['time_end'])}}value="{{$params.time_end}}"{{/if}}/>
					</div>
				</div>
			</div>
        </form>
        <!-- form end -->

G
gongfuxiang 已提交
47 48 49 50 51 52
        <!-- operation start -->
        <div class="am-g m-t-15">
            <a href="{{:MyUrl('admin/answer/saveinfo')}}" class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus"> 新增</a>
        </div>
        <!-- operation end -->

D
v1.2.0  
devil_gong 已提交
53 54 55 56 57
		<!-- list start -->
		<table class="am-table am-table-striped am-table-hover am-text-middle m-t-10">
			<thead>
				<tr>
					<th class="am-hide-sm-only">用户信息</th>
58
					<th class="am-hide-sm-only">联系信息</th>
D
devil_gong 已提交
59 60
					<th>标题</th>
					<th class="am-hide-sm-only">内容</th>
D
v1.2.0  
devil_gong 已提交
61
					<th class="am-hide-sm-only">回复内容</th>
62
					<th class="am-hide-sm-only">访问次数</th>
D
devil_gong 已提交
63
					<th class="am-hide-sm-only">回复时间</th>
D
v1.2.0  
devil_gong 已提交
64
					<th class="am-hide-sm-only">创建时间</th>
D
devil_gong 已提交
65
					<th>是否显示</th>
D
v1.2.0  
devil_gong 已提交
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
					<th>更多</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				{{if !empty($data_list)}}
					{{foreach $data_list as $v}}
						<tr id="data-list-{{$v.id}}" {{if $v['is_show'] eq 0}}class="am-active"{{/if}}>
							<td class="am-hide-sm-only">
								{{if !empty($v['username'])}}
									{{$v.username}}
									{{if !empty($v['nickname'])}}
										({{$v.nickname}})
									{{/if}}
									{{if !empty($v['gender_text'])}}
										({{$v.gender_text}})
									{{/if}}
								{{/if}}
								{{if !empty($v['mobile'])}}
									<br />{{$v.mobile}}
								{{/if}}
87 88 89
								{{if empty($v['username']) and empty($v['mobile'])}}
									<span class="cr-ddd"></span>
								{{/if}}
D
v1.2.0  
devil_gong 已提交
90 91
							</td>
							<td class="am-hide-sm-only">
92 93 94 95 96 97 98 99 100 101 102
								{{if !empty($v['name']) and !empty($v['tel'])}}
									{{$v.name}}
									<br />
									{{$v.tel}}
								{{elseif !empty($v['name']) }}
									{{$v.name}}
								{{elseif !empty($v['tel']) /}}
									{{$v.tel}}
								{{else /}}
									<span class="cr-ddd">未填写</span>
								{{/if}}
D
v1.2.0  
devil_gong 已提交
103
							</td>
D
devil_gong 已提交
104
							<td>{{$v.title}}</td>
G
gongfuxiang 已提交
105 106 107 108 109 110
							<td class="am-hide-sm-only">
								<div class="reply-content">
									{{$v.content|raw}}
								</div>
							</td>
							<td class="am-hide-sm-only">
G
gongfuxiang 已提交
111
								{{if !empty($v['reply'])}}
G
gongfuxiang 已提交
112 113 114
									<div class="reply-content">
	                                    {{$v.reply|raw}}
	                                </div>
D
devil_gong 已提交
115 116 117 118
                                {{else /}}
                                    <span class="cr-ddd">未回复</span>
                                {{/if}}
							</td>
119
							<td class="am-hide-sm-only">{{$v.access_count}}</td>
D
devil_gong 已提交
120 121
							<td class="am-hide-sm-only">{{$v.reply_time}}</td>
							<td class="am-hide-sm-only">{{$v.add_time}}</td>
D
v1.2.0  
devil_gong 已提交
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149
							<td>
								<a href="javascript:;" class="am-icon-btn am-icon-check submit-state {{if $v['is_show'] eq 1}}am-success{{else /}}am-default{{/if}}" data-url="{{:MyUrl('admin/answer/statusupdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_show']}}" data-is-update-status="1"></a>
							</td>
							<td>
								<span class="am-icon-caret-down c-p" data-am-modal="{target: '#my-popup{{$v.id}}'}"> 查看更多</span>
								<div class="am-popup am-radius" id="my-popup{{$v.id}}">
									<div class="am-popup-inner">
										<div class="am-popup-hd">
											<h4 class="am-popup-title">详情内容</h4>
											<span data-am-modal-close
											class="am-close">&times;</span>
										</div>
										<div class="am-popup-bd">
											<dl class="dl-content">
												<dt>用户信息</dt>
												<dd>
													{{if !empty($v['username'])}}
														{{$v.username}}
														{{if !empty($v['nickname'])}}
															({{$v.nickname}})
														{{/if}}
														{{if !empty($v['gender_text'])}}
															({{$v.gender_text}})
														{{/if}}
													{{/if}}
													{{if !empty($v['mobile'])}}
														<br />{{$v.mobile}}
													{{/if}}
150 151 152
													{{if empty($v['username']) and empty($v['mobile'])}}
														<span class="cr-ddd"></span>
													{{/if}}
D
v1.2.0  
devil_gong 已提交
153 154 155 156
												</dd>

												<dt>联系人</dt>
												<dd>
157 158 159 160 161 162 163 164 165 166 167
													{{if !empty($v['name']) and !empty($v['tel'])}}
														{{$v.name}}
														<br />
														{{$v.tel}}
													{{elseif !empty($v['name']) }}
														{{$v.name}}
													{{elseif !empty($v['tel']) /}}
														{{$v.tel}}
													{{else /}}
														<span class="cr-ddd">未填写</span>
													{{/if}}
D
v1.2.0  
devil_gong 已提交
168 169
												</dd>

D
devil_gong 已提交
170 171 172
												<dt>标题</dt>
												<dd>{{if empty($v['title'])}}<span class="cr-ddd">未填写</span>{{else /}}{{$v.title}}{{/if}}</dd>

D
v1.2.0  
devil_gong 已提交
173
												<dt>内容</dt>
G
gongfuxiang 已提交
174
												<dd>{{$v.content|raw}}</dd>
D
v1.2.0  
devil_gong 已提交
175 176 177 178 179

												<dt>是否显示</dt>
												<dd>{{if empty($v['is_show_text'])}}<span class="cr-ddd">未填写</span>{{else /}}{{$v.is_show_text}}{{/if}}</dd>

												<dt>回复内容</dt>
D
devil_gong 已提交
180
												<dd>
G
gongfuxiang 已提交
181
													{{if !empty($v['reply'])}}
G
gongfuxiang 已提交
182
			                                            {{$v.reply|raw}}
D
devil_gong 已提交
183 184 185 186 187 188 189
			                                        {{else /}}
			                                            <span class="cr-ddd">未回复</span>
			                                        {{/if}}
			                                    </dd>

												<dt>回复时间</dt>
												<dd>{{$v.reply_time}}</dd>
D
v1.2.0  
devil_gong 已提交
190 191 192 193 194 195 196 197 198 199 200 201

												<dt>创建时间</dt>
												<dd>{{$v.add_time}}</dd>

												<dt>更新时间</dt>
												<dd>{{$v.upd_time}}</dd>
											</dl>
										</div>
									</div>
								</div>
							</td>
							<td class="view-operation">
G
gongfuxiang 已提交
202 203 204
								<a href="{{:MyUrl('admin/answer/saveinfo', array_merge($params, ['id'=>$v['id']]))}}">
                                    <button class="am-btn am-btn-secondary am-btn-xs am-radius am-icon-edit"> 编辑</button>
                                </a>
D
v1.2.0  
devil_gong 已提交
205
								{{if $v['is_reply'] eq 0}}
G
gongfuxiang 已提交
206
									<button class="am-btn am-btn-success am-btn-xs am-radius submit-reply am-icon-gavel" data-am-modal="{target: '#my-popup-reply'}" data-json='{{:json_encode($v)}}'> 回复</button>
D
v1.2.0  
devil_gong 已提交
207
								{{/if}}
G
gongfuxiang 已提交
208
								<button class="am-btn am-btn-danger am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:MyUrl('admin/answer/delete')}}" data-id="{{$v.id}}"> 删除</button>
D
v1.2.0  
devil_gong 已提交
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
							</td>
						</tr>
					{{/foreach}}
				{{else /}}
					<tr><td colspan="20" class="table-no">没有相关数据</td></tr>
				{{/if}}
			</tbody>
		</table>
		<!-- list end -->

		<!-- 处理窗口 -->
		<div class="am-popup am-radius" id="my-popup-reply">
			<div class="am-popup-inner">
				<div class="am-popup-hd">
					<h4 class="am-popup-title">回复</h4>
					<span data-am-modal-close class="am-close">&times;</span>
				</div>
				<div class="am-popup-bd">
					<dl class="dl-content">
						<dt>联系人</dt>
						<dd>
							<span class="reply-name"></span> - <span class="reply-tel"></span>
						</dd>
					</dl>

					<form class="am-form form-validation" action="{{:MyUrl('admin/answer/reply')}}" method="POST" request-type="ajax-reload" enctype="multipart/form-data">
						<div class="am-form-group">
							<label>回复内容</label>
							<textarea name="reply" rows="5" class="am-radius" placeholder="回复内容格式 2~230 个字符" data-validation-message="回复内容格式 2~230 个字符" maxlength="230"></textarea>
						</div>

G
gongfuxiang 已提交
240
						<div class="am-form-group reply-submit am-form-group-refreshing t-c">
D
v1.2.0  
devil_gong 已提交
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260
							<input type="hidden" name="id" value="" />
							<button type="submit" class="am-btn am-btn-success am-radius am-btn-sm" data-am-loading="{loadingText:'处理中...'}" data-status="0">回复</button>
						</div>
					</form>
				</div>
			</div>
		</div>

		<!-- page start -->
		{{if !empty($data_list)}}
			{{$page_html|raw}}
		{{/if}}
		<!-- page end -->
	</div>
</div>
<!-- right content end  -->
		
<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->