右侧快捷导航新增在线留言
parent
c5a682d56b
commit
9e078e36f3
|
|
@ -36,7 +36,7 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th class="am-hide-sm-only">用户信息</th>
|
||||
<th class="am-hide-sm-only">联系人</th>
|
||||
<th class="am-hide-sm-only">联系信息</th>
|
||||
<th style="width: 25%;">内容</th>
|
||||
<th>是否显示</th>
|
||||
<th class="am-hide-sm-only">回复内容</th>
|
||||
|
|
@ -62,10 +62,22 @@
|
|||
{{if !empty($v['mobile'])}}
|
||||
<br />{{$v.mobile}}
|
||||
{{/if}}
|
||||
{{if empty($v['username']) and empty($v['mobile'])}}
|
||||
<span class="cr-ddd">空</span>
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="am-hide-sm-only">
|
||||
{{$v.name}}<br />
|
||||
{{$v.tel}}
|
||||
{{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}}
|
||||
</td>
|
||||
<td>{{$v.content}}</td>
|
||||
<td>
|
||||
|
|
@ -98,11 +110,24 @@
|
|||
{{if !empty($v['mobile'])}}
|
||||
<br />{{$v.mobile}}
|
||||
{{/if}}
|
||||
{{if empty($v['username']) and empty($v['mobile'])}}
|
||||
<span class="cr-ddd">空</span>
|
||||
{{/if}}
|
||||
</dd>
|
||||
|
||||
<dt>联系人</dt>
|
||||
<dd>
|
||||
{{$v.name}}<br />{{$v.tel}}
|
||||
{{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}}
|
||||
</dd>
|
||||
|
||||
<dt>内容</dt>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ShopXO 国内领先企业级B2C免费开源电商系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: Devil
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\plugins\commonrightnavigation;
|
||||
|
||||
use think\Controller;
|
||||
use app\service\AnswerService;
|
||||
|
||||
/**
|
||||
* 右侧快捷导航 - 前端
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
class Index extends Controller
|
||||
{
|
||||
/**
|
||||
* 留言
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @datetime 2019-02-07T08:21:54+0800
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public function answer($params = [])
|
||||
{
|
||||
$params = input('post.');
|
||||
$params['user'] = session('user');
|
||||
return AnswerService::Add($params);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -76,6 +76,33 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 在线留言 -->
|
||||
<div class="base-nav answer-content">
|
||||
<i class="am-icon-edit"></i>
|
||||
<div class="mui-mbar-popup am-animation-slide-left">
|
||||
<form class="am-form form-validation view-save" action="{{:PluginsHomeUrl('commonrightnavigation', 'index', 'answer')}}" method="POST" request-type="ajax-reload">
|
||||
<legend>
|
||||
<span class="fs-16">在线留言</span>
|
||||
</legend>
|
||||
<div class="am-form-group">
|
||||
<label>姓名</label>
|
||||
<input type="text" name="name" placeholder="姓名" data-validation-message="请填写姓名" class="am-radius" required />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>电话</label>
|
||||
<input type="text" name="tel" placeholder="电话" data-validation-message="请填写电话" class="am-radius" required />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>内容</label>
|
||||
<textarea class="am-radius am-validate" name="content" rows="3" minlength="5" maxlength="300" placeholder="内容至少5个字" data-validation-message="内容格式 5~300 个字符之间" required></textarea>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'处理中...'}">提交</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 回顶部 -->
|
||||
<div class="base-nav go-top" data-am-smooth-scroll id="plugins-commonrightnavigation">
|
||||
<i class="am-icon-arrow-up"></i>
|
||||
|
|
|
|||
|
|
@ -161,12 +161,7 @@ class AnswerService
|
|||
'checked_type' => 'empty',
|
||||
'key_name' => 'content',
|
||||
'error_msg' => '详细内容有误',
|
||||
],
|
||||
[
|
||||
'checked_type' => 'empty',
|
||||
'key_name' => 'user',
|
||||
'error_msg' => '用户信息有误',
|
||||
],
|
||||
]
|
||||
];
|
||||
$ret = ParamsChecked($params, $p);
|
||||
if($ret !== true)
|
||||
|
|
@ -176,7 +171,7 @@ class AnswerService
|
|||
|
||||
// 开始操作
|
||||
$data = [
|
||||
'user_id' => $params['user']['id'],
|
||||
'user_id' => isset($params['user']['id']) ? intval($params['user']['id']) : 0,
|
||||
'name' => $params['name'],
|
||||
'tel' => $params['tel'],
|
||||
'content' => $params['content'],
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -51,7 +51,7 @@
|
|||
.mui-mbar-popup {
|
||||
height: auto;
|
||||
position: absolute;
|
||||
right: 36px;
|
||||
right: 35px;
|
||||
display: none;
|
||||
box-shadow: -5px 5px 15px 0px rgba(0,0,0,.4);
|
||||
}
|
||||
|
|
@ -82,6 +82,11 @@
|
|||
height: 35px;
|
||||
display: none;
|
||||
}
|
||||
.commonrightnavigation-right-nav .answer-content {
|
||||
bottom: 70px;
|
||||
left: 0;
|
||||
height: 35px;
|
||||
}
|
||||
.commonrightnavigation-right-nav .qrcode-content {
|
||||
bottom: 35px;
|
||||
left: 0;
|
||||
|
|
@ -153,6 +158,22 @@
|
|||
.commonrightnavigation-right-nav .qrcode-items img {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.commonrightnavigation-right-nav .answer-content .mui-mbar-popup {
|
||||
bottom: 0;
|
||||
width: 230px;
|
||||
height: 335px;
|
||||
background: #fff;
|
||||
padding: 10px;
|
||||
text-align: left;
|
||||
color: #666;
|
||||
}
|
||||
.commonrightnavigation-right-nav .answer-content .mui-mbar-popup legend span {
|
||||
font-weight: 500;
|
||||
}
|
||||
.commonrightnavigation-right-nav .answer-content .am-form-group {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width:640px) {
|
||||
|
|
@ -161,7 +182,8 @@
|
|||
.commonrightnavigation-right-nav .favor-content,
|
||||
.commonrightnavigation-right-nav .qrcode-content,
|
||||
.commonrightnavigation-right-nav .cart-content,
|
||||
.commonrightnavigation-right-nav .go-top .mui-mbar-tab-tip {
|
||||
.commonrightnavigation-right-nav .go-top .mui-mbar-tab-tip,
|
||||
.commonrightnavigation-right-nav .answer-content {
|
||||
display: none;
|
||||
}
|
||||
.commonrightnavigation-right-nav .go-top {
|
||||
|
|
|
|||
Loading…
Reference in New Issue