|
@@ -21,8 +21,8 @@
|
|
|
<table class="table tb-type2 nobdb">
|
|
|
<tbody>
|
|
|
<tr>
|
|
|
- <td class="w200 align-left"><label>用户几天未登录:</label><input type="text" name="offtime" placeholder="输入天数"></td>
|
|
|
- <td class="w200 align-left"><label>用户注册天数:</label><input type="text" name="regtime" placeholder="多少天内注册的用户"></td>
|
|
|
+ <td class="w200 align-left"><label>用户几天未登录:</label><input type="text" name="offtime" id="offtime" placeholder="输入天数"></td>
|
|
|
+ <td class="w200 align-left"><label>用户注册天数:</label><input type="text" name="regtime" id="regtime" placeholder="多少天内注册的用户"></td>
|
|
|
<td class="w400 align-left"></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
@@ -32,8 +32,8 @@
|
|
|
<table class="table tb-type2 nobdb">
|
|
|
<tbody>
|
|
|
<tr>
|
|
|
- <td class="w200 align-left"><label>最后下单时间:</label><input type="text" name="order_days" placeholder="多少天内未下单"></td>
|
|
|
- <td class="w200 align-left"><label>用户订单数量大于:</label><input type="text" name="order_numgt" placeholder="用户已下单数量"></td>
|
|
|
+ <td class="w200 align-left"><label>最后下单时间:</label><input type="text" name="order_days" id="order_days" placeholder="多少天内未下单"></td>
|
|
|
+ <td class="w200 align-left"><label>用户订单数量大于:</label><input type="text" name="order_numgt" id="order_numgt" placeholder="用户已下单数量"></td>
|
|
|
<td class="w400 align-left"></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
@@ -43,9 +43,9 @@
|
|
|
<table class="table tb-type2 nobdb">
|
|
|
<tbody>
|
|
|
<tr>
|
|
|
- <td class="w200 align-left"><label>用户红包少于:</label><input type="text" name="bonus_amount" placeholder="多少元"/></td>
|
|
|
- <td class="w200 align-left"><label>用户是否已领首单礼:</label><input type="text" name="gift" placeholder="1为是,0为否"/></td>
|
|
|
- <td class="w400 align-left"><label>用户是否有邀请者:</label><input type="text" name="invitor" placeholder="1为是,0为否" /></td>
|
|
|
+ <td class="w200 align-left"><label>用户红包少于:</label><input type="text" name="bonus_amount" id="bonus_amount" placeholder="多少元"/></td>
|
|
|
+ <td class="w200 align-left"><label>用户是否已领首单礼:</label><input type="text" name="gift" id="gift" placeholder="1为是,0为否"/></td>
|
|
|
+ <td class="w400 align-left"><label>用户是否有邀请者:</label><input type="text" name="invitor" id="invitor" placeholder="1为是,0为否" /></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
@@ -57,8 +57,8 @@
|
|
|
<table class="table tb-type2 nobdb">
|
|
|
<tbody>
|
|
|
<tr>
|
|
|
- <td class="w200 align-left"><label>用户几天未登录:</label><input type="text" name="sms_offtime" class="" placeholder="输入天数"></td>
|
|
|
- <td class="w200 align-left"><label>用户注册天数:</label><input type="text" name="sms_regtime" placeholder="多少天内注册的用户"></td>
|
|
|
+ <td class="w200 align-left"><label>用户几天未登录:</label><input type="text" name="sms_offtime" id="sms_offtime" class="" placeholder="输入天数"></td>
|
|
|
+ <td class="w200 align-left"><label>用户注册天数:</label><input type="text" name="sms_regtime" id="sms_regtime" placeholder="多少天内注册的用户"></td>
|
|
|
<td class="w400 align-left"></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
@@ -82,12 +82,13 @@
|
|
|
<table class="table tb-type2 nobdb">
|
|
|
<tbody>
|
|
|
<tr>
|
|
|
- <td class="w250 align-left"><label>发送红包金额:</label><input type="text" name="bonus_num" placeholder="红包金额" /></td>
|
|
|
- <td class="w200 align-left"><label>宣传品牌:</label><input type="text" name="brand" placeholder="宣传品牌" /></td>
|
|
|
- <td class="w200 align-left"><label>传送地址:</label><input type="text" name="openurl" placeholder="传送地址" /></td>
|
|
|
+ <td class="w250 align-left"><label>发送红包金额:</label><input type="text" name="bonus_num" id="bonus_num" placeholder="红包金额" /></td>
|
|
|
+ <td class="w200 align-left"><label>宣传品牌:</label><input type="text" name="brand" id="brand" placeholder="宣传品牌" /></td>
|
|
|
+ <td class="w200 align-left"><label>传送地址:</label><input type="text" name="openurl" id="openurl" placeholder="传送地址" /></td>
|
|
|
<td class="w200 align-left"></td>
|
|
|
<td class="w100 align-right"><a href="JavaScript:void(0);" class="submit_btn btn" id="submit_form"><span><?php echo $lang['nc_submit']; ?></span></a></td>
|
|
|
- <td class="w100 align-right"><a href="JavaScript:void(0);" class="submit_btn btn" id="view_result"><span>查看用户</span></a></td>
|
|
|
+ <!--<td class="w100 align-right"><a href="JavaScript:void(0);" class="submit_btn btn" id="view_result"><span>查看用户</span></a></td>-->
|
|
|
+ <td class="w100 align-right"><button class="btn" id="view_result" style="width:80px;height:30px;">查看用户</button></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
@@ -95,41 +96,122 @@
|
|
|
</form>
|
|
|
</div>
|
|
|
<script type="text/javascript">
|
|
|
+ var $los = {
|
|
|
+ saveObj: function(key, obj) {
|
|
|
+ if(typeof(obj)=="object") {
|
|
|
+ window.localStorage[key] = JSON.stringify(obj);
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
- $('.golbal_last_login').on('change',function(){
|
|
|
- var last_login = $(this).val();
|
|
|
- $('.golbal_last_login').val(last_login);
|
|
|
- });
|
|
|
+ if(window.localStorage[key]!==undefined){
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
- $('#submit_form').on('click', function () {
|
|
|
- var $submit_url = "index.php?act=oper_sms&op=brand_awaken";
|
|
|
- var confirm = window.confirm('确认提交?');
|
|
|
- if (confirm) {
|
|
|
- $(this).parents('form').attr("action", $submit_url);
|
|
|
- $(this).parents('form').submit();
|
|
|
+ loadObj: function(key) {
|
|
|
+ return JSON.parse(window.localStorage[key] || '{}');
|
|
|
+ },
|
|
|
+
|
|
|
+ remove: function(key) {
|
|
|
+ return window.localStorage.removeItem(key);
|
|
|
}
|
|
|
- else {
|
|
|
- return;
|
|
|
+ };
|
|
|
+
|
|
|
+ function local_save() {
|
|
|
+ if($los) {
|
|
|
+ var $params = {
|
|
|
+ offtime: $("#offtime").val(),
|
|
|
+ regtime: $("#regtime").val(),
|
|
|
+ order_days: $("#order_days").val(),
|
|
|
+ order_numgt: $("#order_numgt").val(),
|
|
|
+ bonus_amount: $("#bonus_amount").val(),
|
|
|
+ gift: $("#gift").val(),
|
|
|
+ invitor: $("#invitor").val(),
|
|
|
+ sms_offtime: $("#sms_offtime").val(),
|
|
|
+ sms_regtime: $("#sms_regtime").val(),
|
|
|
+ bonus_num: $("#bonus_num").val(),
|
|
|
+ brand: $("#brand").val(),
|
|
|
+ openurl: $("#openurl").val()
|
|
|
+ };
|
|
|
+ $los.saveObj('params', $params);
|
|
|
}
|
|
|
- })
|
|
|
-
|
|
|
- $('#view_result').on('click', function () {
|
|
|
- var $view_result_url = "index.php?act=oper_sms&op=view_users";
|
|
|
- //$(this).parents('form').attr("action", $view_result_url);
|
|
|
- //$(this).parents('form').submit();
|
|
|
- $.ajax({
|
|
|
- type: 'post',
|
|
|
- url: $view_result_url,
|
|
|
- data: $("#newbrand_form").serialize(),
|
|
|
- async: false,
|
|
|
- success: function($data) {
|
|
|
- //console.log($data);
|
|
|
- alert(JSON.parse($data).msg);
|
|
|
- },
|
|
|
- error: function($data) {
|
|
|
- alert("error: "+ $data);
|
|
|
+ }
|
|
|
+
|
|
|
+ function local_load() {
|
|
|
+ if($los) {
|
|
|
+ var $params = $los.loadObj('params');
|
|
|
+ if($params && $params!==undefined){
|
|
|
+ $("#offtime").val($params.offtime);
|
|
|
+ $("#regtime").val($params.regtime);
|
|
|
+ $("#order_days").val($params.order_days);
|
|
|
+ $("#order_numgt").val($params.order_numgt);
|
|
|
+ $("#bonus_amount").val($params.bonus_amount);
|
|
|
+ $("#gift").val($params.gift);
|
|
|
+ $("#invitor").val($params.invitor);
|
|
|
+ $("#sms_offtime").val($params.sms_offtime);
|
|
|
+ $("#sms_regtime").val($params.sms_regtime);
|
|
|
+ $("#bonus_num").val($params.bonus_num);
|
|
|
+ $("#brand").val($params.brand);
|
|
|
+ $("#openurl").val($params.openurl);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ function disable_post() {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ function enable_post() {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ function disable_query() {
|
|
|
+ $("#view_result").attr("disabled",true);
|
|
|
+ }
|
|
|
+
|
|
|
+ function enable_query($frequence) {
|
|
|
+ //removeAttr('disabled')
|
|
|
+ var t = setTimeout(
|
|
|
+ "$('#view_result').attr('disabled',false)",
|
|
|
+ $frequence * 1000);
|
|
|
+ }
|
|
|
+
|
|
|
+ $(document).ready(function() {
|
|
|
+ local_load();
|
|
|
+
|
|
|
+ $('#submit_form').on('click', function () {
|
|
|
+ //var $submit_url = "index.php?act=oper_sms&op=brand_awaken";
|
|
|
+ var confirm = window.confirm('确认提交?');
|
|
|
+ if (confirm) {
|
|
|
+ //$(this).parents('form').attr("action", $submit_url);
|
|
|
+ local_save();
|
|
|
+ $(this).parents('form').submit();
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ return;
|
|
|
}
|
|
|
});
|
|
|
- })
|
|
|
|
|
|
+ $('#view_result').on('click', function () {
|
|
|
+ var $view_result_url = "index.php?act=oper_sms&op=view_users";
|
|
|
+ disable_query();
|
|
|
+ $.ajax({
|
|
|
+ type: 'post',
|
|
|
+ url: $view_result_url,
|
|
|
+ data: $("#newbrand_form").serialize(),
|
|
|
+ async: false,
|
|
|
+ success: function($data) {
|
|
|
+ //console.log($data);
|
|
|
+ alert(JSON.parse($data).msg);
|
|
|
+ enable_query(10);
|
|
|
+ },
|
|
|
+ error: function($data) {
|
|
|
+ alert("error: "+ $data);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
</script>
|