更新8
This commit is contained in:
parent
4596616f99
commit
9af5e2d25e
@ -45,7 +45,7 @@ class Index extends BaseController
|
|||||||
public function main()
|
public function main()
|
||||||
{
|
{
|
||||||
if ($this->adminInfo['id']!=1){
|
if ($this->adminInfo['id']!=1){
|
||||||
$find = Db::name('szxc_information_useraddress')->where('user_id', $this->adminInfo['id'])->find();
|
$find = Db::table('fa_szxc_information_useraddress')->where('user_id', $this->adminInfo['id'])->find();
|
||||||
if ($find) {
|
if ($find) {
|
||||||
if ($find['auth_range']==1){
|
if ($find['auth_range']==1){
|
||||||
$where[] = ['village_id', '=', $find['village_id']];
|
$where[] = ['village_id', '=', $find['village_id']];
|
||||||
@ -93,7 +93,7 @@ class Index extends BaseController
|
|||||||
$work_num = Db::table('fa_szxc_information_usermsg')
|
$work_num = Db::table('fa_szxc_information_usermsg')
|
||||||
->alias('m')
|
->alias('m')
|
||||||
->where($where)
|
->where($where)
|
||||||
->join(['user'=>'u'],'m.user_id=u.id and u.group_id = 3')->count();
|
->join(['fa_user'=>'u'],'m.user_id=u.id and u.group_id = 3')->count();
|
||||||
}else{
|
}else{
|
||||||
$work_num = Db::table('fa_user')
|
$work_num = Db::table('fa_user')
|
||||||
->alias('u')
|
->alias('u')
|
||||||
|
@ -175,18 +175,6 @@ class User extends BaseController
|
|||||||
//种植信息
|
//种植信息
|
||||||
$planting = Db::table('fa_szxc_information_planting')->where('user_id', $params['id'])
|
$planting = Db::table('fa_szxc_information_planting')->where('user_id', $params['id'])
|
||||||
->find();
|
->find();
|
||||||
$strlen = strlen($planting['breed_msg']);
|
|
||||||
if ($strlen != 0 || $strlen > 10) {
|
|
||||||
$planting['breed_msg'] = json_decode($planting['breed_msg'], true);
|
|
||||||
}
|
|
||||||
$strlen1 = strlen($planting['crops_msg']);
|
|
||||||
if ($strlen1 != 0 || $strlen1 > 10) {
|
|
||||||
$planting['crops_msg'] = json_decode($planting['crops_msg'], true);
|
|
||||||
}
|
|
||||||
$strlen2 = strlen($planting['tools_msg']);
|
|
||||||
if ($strlen2 != 0 || $strlen2 > 10) {
|
|
||||||
$planting['tools_msg'] = json_decode($planting['tools_msg'], true);
|
|
||||||
}
|
|
||||||
//保险信息
|
//保险信息
|
||||||
$insurancearr = Db::table('fa_szxc_information_insurance')->where('user_id', $params['id'])->find();
|
$insurancearr = Db::table('fa_szxc_information_insurance')->where('user_id', $params['id'])->find();
|
||||||
//健康信息
|
//健康信息
|
||||||
@ -199,6 +187,19 @@ class User extends BaseController
|
|||||||
"is_wz" => '',
|
"is_wz" => '',
|
||||||
"nature_of_land" => "",
|
"nature_of_land" => "",
|
||||||
];
|
];
|
||||||
|
}else{
|
||||||
|
$strlen = strlen($planting['breed_msg']);
|
||||||
|
if ($strlen != 0 || $strlen > 10) {
|
||||||
|
$planting['breed_msg'] = json_decode($planting['breed_msg'], true);
|
||||||
|
}
|
||||||
|
$strlen1 = strlen($planting['crops_msg']);
|
||||||
|
if ($strlen1 != 0 || $strlen1 > 10) {
|
||||||
|
$planting['crops_msg'] = json_decode($planting['crops_msg'], true);
|
||||||
|
}
|
||||||
|
$strlen2 = strlen($planting['tools_msg']);
|
||||||
|
if ($strlen2 != 0 || $strlen2 > 10) {
|
||||||
|
$planting['tools_msg'] = json_decode($planting['tools_msg'], true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($insurancearr == null) {
|
if ($insurancearr == null) {
|
||||||
$insurancearr = [
|
$insurancearr = [
|
||||||
|
@ -197,11 +197,12 @@
|
|||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
面积 <input type="text" name="crops_msg[{$key-1}][mianji]" autocomplete="off" class="layui-input" value="{$vo.mianji}">
|
面积 <input type="text" name="crops_msg[{$key-1}][mianji]" autocomplete="off" class="layui-input" value="{$vo.mianji}">
|
||||||
</div>
|
</div>
|
||||||
|
<button type="button" class="layui-btn layui-btn-normal a2" style="position: relative; top:18px">删除</button>
|
||||||
|
|
||||||
</div2>
|
</div2>
|
||||||
{/volist}
|
{/volist}
|
||||||
|
|
||||||
<button type="button" class="layui-btn layui-btn-normal" id="a1" style="display: block; margin-left: 100px;">添加</button>
|
<button type="button" class="layui-btn layui-btn-normal" id="a1" style="display: block; margin-left: 100px;">添加</button>
|
||||||
<button type="button" class="layui-btn layui-btn-normal" id="a2" style="position: relative; left: 170px;top:-38px">删除</button>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="pt-3">
|
<div class="pt-3">
|
||||||
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform2">立即提交</button>
|
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform2">立即提交</button>
|
||||||
@ -498,6 +499,9 @@
|
|||||||
{block name="script"}
|
{block name="script"}
|
||||||
<script>
|
<script>
|
||||||
var moduleInit = ['tool'];
|
var moduleInit = ['tool'];
|
||||||
|
function ceshi(e){
|
||||||
|
$(e).parent().remove();
|
||||||
|
}
|
||||||
function gouguInit () {
|
function gouguInit () {
|
||||||
var form = layui.form, tool = layui.tool;
|
var form = layui.form, tool = layui.tool;
|
||||||
var htmlid= $("#nzw").children("div2").length;
|
var htmlid= $("#nzw").children("div2").length;
|
||||||
@ -514,21 +518,13 @@
|
|||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
面积 <input type="text" name="crops_msg[`+htmlid+`][mianji]" autocomplete="off" class="layui-input">
|
面积 <input type="text" name="crops_msg[`+htmlid+`][mianji]" autocomplete="off" class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="layui-btn layui-btn-normal" onclick="ceshi(this)" style="position: relative;top:18px">删除</div>
|
||||||
</div2>
|
</div2>
|
||||||
`
|
`
|
||||||
|
$("#nzw").append(html);
|
||||||
$("#nzw div2:last").after(html);
|
|
||||||
++htmlid
|
++htmlid
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#a2").on("click", function(e) {
|
|
||||||
if(htmlid === 1){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$("#nzw div2:last").remove();
|
|
||||||
--htmlid
|
|
||||||
});
|
|
||||||
|
|
||||||
//监听提交
|
//监听提交
|
||||||
form.on('submit(webform1)', function (data) {
|
form.on('submit(webform1)', function (data) {
|
||||||
let callback = function (e) {
|
let callback = function (e) {
|
||||||
|
@ -16,6 +16,7 @@ class Index extends BaseController
|
|||||||
{
|
{
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
|
return redirect('/admin');
|
||||||
add_user_log('view', '首页');
|
add_user_log('view', '首页');
|
||||||
$count = \think\facade\Db::name('UserLog')->where(array('type' => 'down'))->count();
|
$count = \think\facade\Db::name('UserLog')->where(array('type' => 'down'))->count();
|
||||||
return View('',['count'=>$count]);
|
return View('',['count'=>$count]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user