Commit 90567237 by doszhang

dos

parent 4611c855
......@@ -42,6 +42,17 @@ class IndexController extends Controller
header("HTTP/1.0 404 Not Found");
exit;
}
M('num')->where('id=1')->setInc('num');
$name = $_POST['name'];
$business = $_POST['business'];
if($name)
{
M('num')->where('id=1')->setInc('num');
M('info')->add(array(
'name' => $name,
'business' => $business,
'addtime' => time()
));
}
}
}
\ No newline at end of file
......@@ -64,11 +64,11 @@ let noInfo = {
width: 24,
height: 12
}
$('.page1').show();
let createPosterLock = false;
preloadimages(preloadImageList, function () {
$('.page1').show();
$('input[name=name]').attr('placeholder', '姓名').attr('id', 'name');;
$('input[name=business]').attr('placeholder', '业务号').attr('type', 'tel').attr('maxlength', 10);
$('.page1 .num').html('已有<span class="numbig">' + window.num + '</span>人发起承诺');
......@@ -167,6 +167,10 @@ function createPoster(name, business) {
$.ajax({
url: '/index/addNum',
data: {
name: name,
business: business
},
type: 'POST'
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment