|
@@ -12,102 +12,206 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="fixed-empty"></div>
|
|
|
- <div>
|
|
|
- <table class="tb-type1 noborder search">
|
|
|
- <tbody>
|
|
|
- <tr style="background: rgb(255, 255, 255);">
|
|
|
- <td>
|
|
|
- <label>全局过滤条件:
|
|
|
- <select name="golbal_last_login" class="golbal_last_login">
|
|
|
- <option value="all">全部</option>
|
|
|
- <option value="10">未登录10天</option>
|
|
|
- <option value="20">未登录20天</option>
|
|
|
- <option value="30">未登录30天</option>
|
|
|
- <option value="40">未登录40天</option>
|
|
|
- </select>
|
|
|
- </label>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
- <table class="table tb-type2" id="prompt">
|
|
|
- <tbody>
|
|
|
- <tr class="space odd">
|
|
|
- <th class="nobg" colspan="12">
|
|
|
- <div class="title">
|
|
|
- <h5><?php echo $lang['nc_prompts']; ?></h5>
|
|
|
- <span class="arrow"></span>
|
|
|
- </div>
|
|
|
- </th>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td>
|
|
|
- <ul>
|
|
|
- <li>根据订单发红包雨</li>
|
|
|
- </ul>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- <form id="points_form" class="form" method="post" action="index.php?act=oper_sms&op=bonus_awaken" name="form1">
|
|
|
- <input type="hidden" name="form_submit" value="ok"/>
|
|
|
- <table class="table tb-type2 nobdb">
|
|
|
- <tbody>
|
|
|
- <tr>
|
|
|
- <td class="w120 align-left">根据订单发红包雨:</td>
|
|
|
- <td class="w400 align-left"><label>paysn:<input class="w300" type="text" name="paysn" placeholder="请输入paysn"></label></td>
|
|
|
- <td class="w200 align-left"><label>金额:<input type="text" name="amount" placeholder="单个用户红包金额"></label></td>
|
|
|
- <td class="w250 align-left"><label>最近多少天注册用户:<input type="text" name="days" placeholder="请输入天数"></label></td>
|
|
|
- <input type="hidden" class="golbal_last_login" name="global_condition" value="all">
|
|
|
- <td class="w200 align-left"><a href="JavaScript:void(0);" class="submit_btn btn" id="submit_form"><span><?php echo $lang['nc_submit']; ?></span></a></td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- </form>
|
|
|
- <table class="table tb-type2" id="prompt">
|
|
|
- <tbody>
|
|
|
- <tr>
|
|
|
- <td>
|
|
|
- <ul>
|
|
|
- <li>短信内容,【熊猫美妆】周末福利大放送,{50}元红包已到账!{雪花秀、兰芝补货,SNP、婵真}上新,传送门:{http://t.cn/RY9Iiba},退订回复N:</li>
|
|
|
- </ul>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
<form id="newbrand_form" class="form" method="post" action="index.php?act=oper_sms&op=brand_awaken" name="form1">
|
|
|
<input type="hidden" name="form_submit" value="ok"/>
|
|
|
- <table class="table tb-type2 nobdb">
|
|
|
- <tbody>
|
|
|
- <tr>
|
|
|
- <td class="w100 align-left">品牌上新:</td>
|
|
|
- <td class="w200 align-left"><label>金额:<input type="text" name="amount" placeholder="单个用户红包金额"></label></td>
|
|
|
- <td class="w250 align-left"><label>品牌:<input class="w200" type="text" name="brand" placeholder="请输入品牌语"></label></td>
|
|
|
- <td class="w200 align-left"><label>网页地址:<input type="text" name="openurl" placeholder="请输入可打开地址"></label></td>
|
|
|
- <td class="w250 align-left"><label>最近多少天注册用户:<input type="text" name="days" placeholder="请输入天数"></label></td>
|
|
|
- <td class="w250 align-left"><label>红包少于多少元用户:<input type="text" name="et_amount" placeholder="请输入金额"></label></td>
|
|
|
- <input type="hidden" class="golbal_last_login" name="global_condition" value="all">
|
|
|
- <td class="w200 align-left"><a href="JavaScript:void(0);" class="submit_btn btn" id="submit_form"><span><?php echo $lang['nc_submit']; ?></span></a></td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
+ <div>
|
|
|
+ <h4>用户筛选条件(按照这个条件给用户发送push和短信)</h4>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <table class="table tb-type2 nobdb">
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <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>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <table class="table tb-type2 nobdb">
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <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>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <table class="table tb-type2 nobdb">
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <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>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <h4>短信接收条件(不具备push条件的用户,给他们发短信)</h4>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <table class="table tb-type2 nobdb">
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <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>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div>
|
|
|
+ <h4>推送内容:</h4>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <table class="table tb-type2" id="prompt">
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <td>【熊猫美妆】周末福利大放送,{金额}元红包已到账!{品牌}上新,传送门:{传送地址},退订回复N:</td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div>
|
|
|
+ <table class="table tb-type2 nobdb">
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <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"><button class="btn" id="view_result" style="width:80px;height:30px;">查看用户</button></td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
</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_btn').on('click', function () {
|
|
|
- var confirm = window.confirm('确认提交?');
|
|
|
- if (confirm) {
|
|
|
- $(this).parents('form').submit();
|
|
|
+ loadObj: function(key) {
|
|
|
+ return JSON.parse(window.localStorage[key] || '{}');
|
|
|
+ },
|
|
|
+
|
|
|
+ remove: function(key) {
|
|
|
+ return window.localStorage.removeItem(key);
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ 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);
|
|
|
}
|
|
|
- else {
|
|
|
- return;
|
|
|
+ }
|
|
|
+
|
|
|
+ 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>
|