Your Name 3 سال پیش
والد
کامیت
e8ecfe64ae
1فایلهای تغییر یافته به همراه5 افزوده شده و 4 حذف شده
  1. 5 4
      learn/active/assets/pc/html/off_code.html

+ 5 - 4
learn/active/assets/pc/html/off_code.html

@@ -75,7 +75,7 @@ td {
       <div class="grid-demo">活动时间:<{$act_time}></div>
     </div>
   </div>
-    <input type="text" value="<{$write_code}>" autocomplete="off" id="date" class="layui-input" style="width: auto;display: inline;" placeholder="输入核销码">
+    <input type="text" value="<{$write_code}>" autocomplete="off" id="content" class="layui-input" style="width: auto;display: inline;" placeholder="输入核销码">
   <div class="layui-card-body">
 <{if(isset($write_code)):}>
     <table class="table layui-table layui-table-body" id="table">
@@ -126,8 +126,9 @@ layui.use('layer', function(){
 // $('#search').click(function() {
 //   search();
 // })
+$('#content').focus();
 var id = '<{$active_id}>';
-$('#date').bind('keydown',function(event){
+$('#content').bind('keydown',function(event){
    if(event.keyCode == "13")    
    {
 
@@ -136,13 +137,13 @@ $('#date').bind('keydown',function(event){
       url:config.host + 'lib/manage.code',
       data: {
         id : id,
-        code : $('#date').val(),
+        code : $('#content').val(),
       },
       dataType: "json",
       success: function (data) {
 
         if (data.msg == 'success'){
-           location.href = config.host + 'lib/manage.code&type=1&code=' + $('#date').val() +'&id=<{$active_id}>';
+           location.href = config.host + 'lib/manage.code&type=1&code=' + $('#content').val() +'&id=<{$active_id}>';
         } else {
           layer.alert('填写错误');
           // alert('填写错误');