diff --git a/app/article/view/index/add.html b/app/article/view/index/add.html
index 2887764..e3ffc98 100644
--- a/app/article/view/index/add.html
+++ b/app/article/view/index/add.html
@@ -122,7 +122,7 @@
form.on('submit(webform)', function (data) {
data.field.content = tinyMCE.editors['container'].getContent();
if (data.field.content == '') {
- layer.msg('请先完善公告内容');
+ layer.msg('请先完善文章只是内容');
return false;
}
let callback = function (e) {
diff --git a/app/article/view/index/edit.html b/app/article/view/index/edit.html
index 0deeedb..5c63e48 100644
--- a/app/article/view/index/edit.html
+++ b/app/article/view/index/edit.html
@@ -125,7 +125,7 @@ const moduleInit = ['tool','tagpicker','tinymce'];
form.on('submit(webform)', function (data) {
data.field.content = tinyMCE.editors['container'].getContent();
if (data.field.content == '') {
- layer.msg('请先完善公告内容');
+ layer.msg('请先完善文章只是内容');
return false;
}
let callback = function (e) {
diff --git a/app/customer/controller/Contact.php b/app/customer/controller/Contact.php
index b3bc2ac..f744b3e 100644
--- a/app/customer/controller/Contact.php
+++ b/app/customer/controller/Contact.php
@@ -125,8 +125,11 @@ class Contact extends BaseController
{
if (request()->isDelete()) {
$param = get_params();
- $admin_id = Db::name('CustomerContact')->where(['id' => $param['id']])->value('admin_id');
- if($admin_id != $this->uid){
+ $contact = Db::name('CustomerContact')->where(['id' => $param['id']])->find();
+ if($contact['is_default'] == 1){
+ return to_assign(1, '客户的首要联系人不能删除');
+ }
+ if($contact['admin_id'] != $this->uid){
return to_assign(1, '你不是该联系人的创建人,无权限删除');
}
$param['delete_time'] = time();