123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,minimum-scale=1.0,user-scalable=0" />
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <title>品牌招商申请表</title>
- <link rel="stylesheet" href="./common/reset.css">
- <link rel="stylesheet" href="./assert/css/expert.css?v=1.0.1">
- <script>
- document.documentElement.style.fontSize=document.documentElement.clientWidth/375*100+"px";
- window.onresize=function(){
- document.documentElement.style.fontSize=document.documentElement.clientWidth/375*100+"px";
- }
- </script>
- </head>
- <body>
- <div class="item">
- <div class="title">
- <span class="star">*</span><span class="text">所属类目(多选)</span>
- </div>
- <ul class="checkbox" id="cate_id">
- <label class="ci-check-lable">
- <input type="checkbox" name="彩妆护肤"><i></i>
- <span>彩妆护肤</span>
- </label>
- <label>
- <input type="checkbox" name="身体护肤"><i></i>
- <span>身体护肤</span>
- </label>
- <label>
- <input type="checkbox" name="母婴生活"><i></i>
- <span>母婴生活</span>
- </label>
- <label>
- <input type="checkbox" name="营养健康"><i></i>
- <span>营养健康</span>
- </label>
- <label>
- <input type="checkbox" name="服装"><i></i>
- <span>服装</span>
- </label>
- <label>
- <input type="checkbox" name="其他"><i></i>
- <span>其他</span>
- </label>
- </ul>
- </div>
- <div class="item">
- <div class="title">
- <span class="star">*</span><span class="text">公司名称</span>
- </div>
- <ul>
- <textarea placeholder="请输入公司名称" name="" id="compony" rows="1"></textarea>
- </ul>
- </div>
- <div class="item">
- <div class="title">
- <span class="star">*</span><span class="text">贸易方式(多选)</span>
- </div>
- <ul class="checkbox" id="trade_type">
- <label class="ci-check-lable">
- <input type="checkbox" name="1"><i></i>
- <span>保税</span>
- </label>
- <label>
- <input type="checkbox" name="2"><i></i>
- <span>直邮</span>
- </label>
- <label>
- <input type="checkbox" name="3"><i></i>
- <span>完税进口</span>
- </label>
- <label>
- <input type="checkbox" name="4"><i></i>
- <span>国内行货</span>
- </label>
- </ul>
- </div>
- <div class="item">
- <div class="title">
- <span class="star">*</span><span class="text">一件代发</span>
- </div>
- <ul class="radio">
- <label class="ci-check-lable">
- <input class="radio" type="checkbox" name="1" id="cate"><i></i>
- <span>支持</span>
- </label>
- <label>
- <input class="radio" type="checkbox" name="0" id="cate"><i></i>
- <span>不支持</span>
- </label>
- </ul>
- </div>
- <div class="item">
- <div class="title">
- <span class="star">*</span><span class="text">联系人</span>
- </div>
- <ul>
- <textarea placeholder="请您输入联系人" name="" id="contact_name" rows="1"></textarea>
- </ul>
- </div>
- <div class="item">
- <div class="title">
- <span class="star">*</span><span class="text">联系电话</span>
- </div>
- <ul>
- <textarea placeholder="请您输入正确的11位电话" name="" id="tel" rows="1"></textarea>
- </ul>
- </div>
- <div class="item">
- <div class="title">
- <span class="star">*</span><span class="text">留言备注</span>
- </div>
- <ul>
- <textarea placeholder="请您输入您的留言" name="" id="note" rows="6"></textarea>
- </ul>
- </div>
- <button>立即合作</button>
- <div class="alert-info" style="display: none;">
- <!-- tip提示,2s后消失 -->
- <p></p>
- </div>
- <script src="./common/jquery-2.1.0.js"></script>
- <script>
- var cate_id=[],compony_name="",trade_type=[]
- var myreg = /^[0-9]{11}$/;
- $("button").on("click",function(){
- cate_id=[],trade_type=[]
- if($(".checkbox").find(".on").length<=0) {
- showMsg("请完整填写");
- return false;
- }else if($(".radio").find(".on").length<=0) {
- showMsg("请完整填写")
- }else if(!$("#compony").val()||!$("#contact_name").val()||!$("#tel").val()||!$("#note").val()) {
- showMsg("请完整填写")
- }else if(!myreg.test($("#tel").val())) {
- showMsg("请正确填写手机号")
- }else {
- $("#cate_id .on").each(function(index,item){
- cate_id.push($(item).attr("name"))
- })
- $("#trade_type .on").each(function(index,item) {
- trade_type.push($(item).attr("name"))
- })
- send()
- }
- })
- $("input").on("click",function(){
- $(this).toggleClass("on")
- })
- function send() {
- var data={
- "cate_id":cate_id,
- "company_name":$("#compony").val(),
- "trade_type":trade_type,
- "if_one_send":$(".radio .on").attr("name"),
- "contact_name":$("#contact_name").val(),
- "tel":$("#tel").val(),
- "note":$("#note").val()
- }
- $.ajax({
- url:'/api/busInvite',
- type:'post',
- dataType:'json',
- headers:{
- "source":1000
- },
- data:data,
- success:function (res){
- if(res.errno == 0){
- showMsg("提交成功")
- }else{
- showMsg(res.err)
- }
- },
- error:function (err){
- $("#loading").hide();
- }
- })
- }
- //提示信息
- function showMsg(msg) {
- var msg = msg;
- var msgBox = $('.alert-info');
- msgBox.children('p').text(msg);
- msgBox.show();
- setTimeout(function() {
- msgBox.hide();
- }, 2000);
- }
- </script>
- </body>
- </html>
|