diff --git a/app/admin/logic/shop/LocalStoreLogic.php b/app/admin/logic/shop/LocalStoreLogic.php index 04c55b39..8a3dd377 100755 --- a/app/admin/logic/shop/LocalStoreLogic.php +++ b/app/admin/logic/shop/LocalStoreLogic.php @@ -73,7 +73,7 @@ class LocalStoreLogic extends Logic public static function update_state($id, $state) { - return LocalStore::where(['lstore_id' => $id])->update(['store_state' => $state]); + return LocalStore::where(['lstore_id' => $id])->update(['store_state' => $state, 'update_time' => date('Y-m-d H:i:s')]); } // 获取未审核数据 diff --git a/app/admin/view/shop/local_store/edit.html b/app/admin/view/shop/local_store/edit.html index 9755d2db..d3061711 100755 --- a/app/admin/view/shop/local_store/edit.html +++ b/app/admin/view/shop/local_store/edit.html @@ -9,7 +9,7 @@
- +
@@ -175,6 +175,11 @@
+ +
+ + +
@@ -212,6 +217,48 @@ }); }); + $(".operation-agree").on('click', function() { + layer.confirm('是否通过审核?', function(index){ + like.ajax({ + url:'{:url("shop.LocalStore/operation")}', + data: {id: $("#lstore_id").val(), state: 1}, + type:"post", + success:function(res) + { + if(res.code == 1) { + layer.close(index); + layui.layer.msg(res.msg, { + offset: '15px' + , icon: 1 + , time: 1000 + }); + } + } + }); + }); + }) + + $(".operation-pass").on('click', function() { + layer.confirm('是否拒绝审核?', function(index){ + like.ajax({ + url:'{:url("shop.LocalStore/operation")}', + data: {id: $("#lstore_id").val(), state: 2}, + type:"post", + success:function(res) + { + if(res.code == 1) { + layer.close(index); + layui.layer.msg(res.msg, { + offset: '15px' + , icon: 1 + , time: 1000 + }); + } + } + }); + }); + }) + // 上传商家LOGO var uploadInst = likeupload.render({ elem: '#add-shop' //绑定元素 diff --git a/app/admin/view/shop/local_store/lists.html b/app/admin/view/shop/local_store/lists.html index 91e48082..224d4d5f 100755 --- a/app/admin/view/shop/local_store/lists.html +++ b/app/admin/view/shop/local_store/lists.html @@ -90,8 +90,8 @@ , {field: "idCard", width: 120, align: "center", title: "自拍照", templet: '#idcard-operation'} , {field: "name", width: 120, align: "center", title: "商户联系人"} , {field: "empowerPhone", width: 120, align: "center", title: "联系电话"} - , {field: "address", width: 300, align: "center", title: "地理位置"} , {field: "store_state", width: 150, align: "center", title: "审核状态", templet: '#storeState-operation'} + , {field: "address", width: 300, align: "center", title: "地理位置"} , {fixed: 'right', title: '操作', width: 280, align: 'center', toolbar: '#localstore-operation'} ]);