// Generated by CoffeeScript 1.8.0
(function() {
  $(function() {
    $(".toast").hide();
    $("#text").html("意见反馈");
    $("#img").attr("onclick","location.href='../product/index.html'");
   $("button.am-button").click(function() {
        if (!isMobile($("#mobile")[0], "手机号")) {
          return;
        }
        return Ajax({
          url: baseUrl + '/api/user/add_feedback.do',
          data: {content:$("#description").val(),mobile:$("#mobile").val()},
          success: function(data) {
            if (data.status === 200) {
            	toast.success({msg:"提交成功"});
            	setTimeout(function(){
            		return location.href ='./../product/productList.html';
            	},1000);  
                
            }else{
          	  wrongMsg(data.message);
            }
          }
        });
      });
    
  });

}).call(this);
