zhs 3 년 전
부모
커밋
ff099c39f1

+ 1 - 1
src/main/java/com/supplier/config/InterceptConfig.java

@@ -53,6 +53,6 @@ public class InterceptConfig implements WebMvcConfigurer {
     public void addInterceptors(InterceptorRegistry registry) {
         registry.addInterceptor(new JWTIntercept())
                 .addPathPatterns("/**")   // 正常情况下 拦截所有请求/**,因测试需要就先拦截/user/test
-                .excludePathPatterns("/wx/login/**",  "/page/*", "/js/**", "/i18n/**", "/css/**", "/images/**", "/layui/**", "/json/**" ,"/remixicon/**", "/wxpay/**","/appPay/**", "http://a1-v2.easemob.com/**", "http://39.97.9.52/*", "http://47.95.246.247/**", "ws://39.102.159.61/**");  //放心登录接口,因为要通过登录获取token
+                .excludePathPatterns("/wx/login/**",  "/page/*", "/js/**", "/i18n/**", "/css/**", "/images/**", "/layui/**", "/json/**" ,"/remixicon/**", "/wxpay/**","/appPay/**", "http://a1-v2.easemob.com/**", "http://39.97.9.52/*", "http://47.95.246.247/**", "ws://39.102.159.61/**", "/page/registered/**");  //放心登录接口,因为要通过登录获取token
     }
 }

+ 11 - 0
src/main/java/com/supplier/controller/IndexController.java

@@ -155,4 +155,15 @@ public class IndexController {
     public String Login(Model model){
         return "Login";
     }
+
+    /**
+     * 注册
+     * @param model
+     * @return
+     */
+    @RequestMapping("registered/{phone}")
+    public String registered(Model model, @PathVariable String phone){
+        model.addAttribute("phone", phone);
+        return "registered/index";
+    }
 }

+ 6 - 6
src/main/resources/static/css/demandForSingle/offer.css

@@ -605,16 +605,16 @@
 }
 .radio_icon{
     float: left;
-    width: 24px;
-    height: 24px;
+    width: 20px;
+    height: 20px;
     border-radius: 50%;
     border: 1px solid #ccc;
     text-align: center;
-    line-height: 24px;
+    line-height: 20px;
 }
 .radio_div_select span{
     margin-left: 10px;
-    font-size: 20px;
+    font-size: 16px;
     font-family: PingFang SC, PingFang SC-Medium;
     font-weight: 500;
 }
@@ -888,8 +888,8 @@ img {
 .percentage_fee_price{
     width: 100%;
     float: left;
-    font-size: 20px;
-    font-weight: 600;
+    font-size: 16px;
     margin-top: 10px;
     color: red;
+    padding-left: 60px;
 }

+ 40 - 0
src/main/resources/static/css/registered.css

@@ -0,0 +1,40 @@
+html,body{
+    width: 100%;
+    height: 100%;
+    overflow: hidden;
+}
+.form_div{
+    width: 500px;
+    height: auto;
+    margin: auto;
+    margin-top: 100px;
+}
+.layui-form-label{
+    width: 90px;
+    padding-right: 0;
+}
+.layui-upload-list {
+    margin: 10px 0;
+}
+.layui-upload-img {
+    width: 160px;
+    height: 160px;
+}
+.layui-form-item .layui-input-inline{
+    margin-left: 5px;
+}
+.layui-upload{
+    float: left;
+    margin-right: 10px;
+}
+.layui-btn{
+    width: 160px;
+}
+.layui-upload:last-child{
+    margin-right: 0;
+}
+.button_div{
+    float: left;
+    width: 100%;
+    text-align: center;
+}

+ 8 - 2
src/main/resources/static/js/Login/index.js

@@ -16,7 +16,7 @@ layui.use(["layer", "form"], function(){
         }
         //发送验证码
         $.ajax({
-            url: "http://192.168.0.115:9600/supplier/checkTele",
+            url: "http://192.168.0.116:9600/supplier/checkTele",
             type: "get",
             data: {
                 "phone": tel
@@ -68,7 +68,7 @@ layui.use(["layer", "form"], function(){
         }
         //登录
         $.ajax({
-            url: "http://192.168.0.115:9600/supplier/updateUser",
+            url: "http://192.168.0.116:9600/supplier/updateUser",
             type: "get",
             data: {
                 "phone": tel,
@@ -76,6 +76,12 @@ layui.use(["layer", "form"], function(){
             },
             dataType: "json",
             success: (data) => {
+                if(data.msg == "500"){
+                    layer.msg(data.errMsg, {icon: 2});
+                    return false;
+                } else {
+                    window.location.href="/page/registered/" + tel;
+                }
                 localStorage.setItem("token", data.data.token);
                 window.location.href="/page/index"
             },

+ 6 - 6
src/main/resources/static/js/demandForSingle/offer/function.js

@@ -540,7 +540,7 @@ function elementDrawing(data){
                 "                    </div>");
         }else if(elem.typeVal == "1"){
             $(".content_add_div[daynum="+ elem.dayNum +"] .play_div").append("<!-- 酒店 -->\n" +
-                "                    <div class=\"play_content_div scenic_spot_div "+ elem.uuid + "-" + elem.typeVal +"\">\n" +
+                "                    <div class=\"play_content_div hotel_play_div "+ elem.uuid + "-" + elem.typeVal +"\">\n" +
                 "                        <div class=\"title_name_spot\">\n" +
                 "                            <svg viewBox=\"0 0 1024 1024\" class=\"title_name_img\">\n" +
                 "                                <path d=\"M512 64C317.92 64 160 221.92 160 416c0 187.36 315.424 520.032 328.832 534.08C494.88 956.448 503.264 960 512 960c0.224 0 0.48 0 0.704 0 8.992 0 17.472-4.192 23.392-10.944l109.216-125.12C790.432 646.176 864 508.928 864 416 864 221.92 706.08 64 512 64zM512 576c-88.384 0-160-71.616-160-160s71.616-160 160-160 160 71.616 160 160S600.384 576 512 576z\" p-id=\"2190\"></path>\n" +
@@ -571,7 +571,7 @@ function elementDrawing(data){
                 "                    </div>");
         }else if(elem.typeVal == "2"){
             $(".content_add_div[daynum="+ elem.dayNum +"] .play_div").append("<!-- 包车,车型-->\n" +
-                "                    <div class=\"play_content_div scenic_spot_div "+ elem.uuid + "-" + elem.typeVal +"\">\n" +
+                "                    <div class=\"play_content_div charte_play_div "+ elem.uuid + "-" + elem.typeVal +"\">\n" +
                 "                        <div class=\"title_name_spot\">\n" +
                 "                            <svg viewBox=\"0 0 1024 1024\" class=\"title_name_img\">\n" +
                 "                                <path d=\"M512 64C317.92 64 160 221.92 160 416c0 187.36 315.424 520.032 328.832 534.08C494.88 956.448 503.264 960 512 960c0.224 0 0.48 0 0.704 0 8.992 0 17.472-4.192 23.392-10.944l109.216-125.12C790.432 646.176 864 508.928 864 416 864 221.92 706.08 64 512 64zM512 576c-88.384 0-160-71.616-160-160s71.616-160 160-160 160 71.616 160 160S600.384 576 512 576z\" p-id=\"2190\"></path>\n" +
@@ -866,7 +866,7 @@ function getValue(obj){
 }
 //加载模板
 function loadTemplate(name){
-    layer.load(3);
+    parent.layer.load(3);
     $.ajax({
         url: "/template/getSupplierRelease",
         type: "get",
@@ -891,11 +891,11 @@ function loadTemplate(name){
                         "                </article>");
                 });
             }
-            layer.closeAll("loading");
+            parent.layer.closeAll("loading");
         },
         error: () => {
-            layer.alert(paramReturn("服务器异常,请联系管理员", parent.type), {icon: 2});
-            layer.closeAll("loading");
+            parent.layer.alert(paramReturn("服务器异常,请联系管理员", parent.type), {icon: 2});
+            parent.layer.closeAll("loading");
         }
     });
 }

+ 7 - 0
src/main/resources/static/js/registered/even.js

@@ -0,0 +1,7 @@
+var $ = null;
+var form = null;
+var layer = null;
+var laydate = null;
+var upload = null;
+
+var token = "07E20E117812C34B244EA73B99A65918CAD573DFB012FC523FD3CDA2E259EA06BC98731115C4DEFFF5C1226FE6DF8105BE05E02D2B00C7E0E290A0374F63501FD94410D859FAA2F632043C3BA9FB6390EAB2B1D0D0591F8C97D5F042D2125F6B8BBD9E98FE880117670FF09AD41C940E0733A77D74D32C309706077C3BED2D30E2B10428838320F0432612C843E7EDA6";

+ 0 - 0
src/main/resources/static/js/registered/function.js


+ 151 - 0
src/main/resources/static/js/registered/index.js

@@ -0,0 +1,151 @@
+layui.use(["layer", "form", "laydate", "upload"], function(){
+    $ = layui.$;
+    form = layui.form;
+    layer = layui.layer;
+    laydate = layui.laydate;
+    upload = layui.upload;
+    //手机号
+    $("input[name=phone]").val(phone);
+    //日期
+    laydate.render({
+        elem: '#date'
+    });
+
+    //营业执照
+    upload.render({
+        elem: '#test1'
+        , url: 'https://www.tuyatrip.com/api/upload/uploadFile' //此处用的是第三方的 http 请求演示,实际使用时改成您自己的上传接口即可。
+        ,method: 'post'  //可选项。HTTP类型,默认post
+        ,accept: 'images'
+        ,acceptMime: 'image/*'
+        ,headers: {token: token}
+        , before: function (obj) {
+            //预读本地文件示例,不支持ie8
+            // obj.preview(function (index, file, result) {
+            //     $('#demo1').attr('src', result); //图片链接(base64)
+            // });
+            layer.load(3);
+        }
+        , done: function (res) {
+            console.log(res)
+            $('#demo1').attr('src', res.data); //图片链接(base64)
+            $("input[name=businessLicense]").val(res.data);
+            layer.closeAll("loading");
+        }
+        , error: function () {
+        }
+        //进度条
+        , progress: function (n, elem, e) {
+        }
+    });
+    //身份证正面
+    upload.render({
+        elem: '#test2'
+        , url: 'https://www.tuyatrip.com/api/upload/uploadFile' //此处用的是第三方的 http 请求演示,实际使用时改成您自己的上传接口即可。
+        ,method: 'post'  //可选项。HTTP类型,默认post
+        ,accept: 'images'
+        ,acceptMime: 'image/*'
+        ,headers: {token: token}
+        , before: function (obj) {
+            layer.load(3);
+        }
+        , done: function (res) {
+            console.log(res)
+            $('#demo2').attr('src', res.data); //图片链接(base64)
+            $("input[name=idCardJust]").val(res.data);
+            layer.closeAll("loading");
+        }
+        , error: function () {
+        }
+        //进度条
+        , progress: function (n, elem, e) {
+        }
+    });
+    //身份证反面
+    upload.render({
+        elem: '#test3'
+        , url: 'https://www.tuyatrip.com/api/upload/uploadFile' //此处用的是第三方的 http 请求演示,实际使用时改成您自己的上传接口即可。
+        ,method: 'post'  //可选项。HTTP类型,默认post
+        ,accept: 'images'
+        ,acceptMime: 'image/*'
+        ,headers: {token: token}
+        , before: function (obj) {
+            layer.load(3);
+        }
+        , done: function (res) {
+            console.log(res)
+            $('#demo3').attr('src', res.data); //图片链接(base64)
+            $("input[name=idCardReverse]").val(res.data);
+            layer.closeAll("loading");
+        }
+        , error: function () {
+        }
+        //进度条
+        , progress: function (n, elem, e) {
+        }
+    });
+
+    //注册
+    $(".registered_button").on("click", () => {
+        if($("input[name=company]").val() == null || $("input[name=company]").val() == ""){
+            layer.msg("请输入公司名称", {icon: 2});
+            return false;
+        }
+        if($("input[name=representative]").val() == null || $("input[name=representative]").val() == ""){
+            layer.msg("请输入法人", {icon: 2});
+            return false;
+        }
+        if($("select[name=documentType]").val() == null || $("select[name=documentType]").val() == ""){
+            layer.msg("请选择证件类型", {icon: 2});
+            return false;
+        }
+        if($("input[name=idNumber]").val() == null || $("input[name=idNumber]").val() == ""){
+            layer.msg("请输入证件号码", {icon: 2});
+            return false;
+        }
+        if($("input[name=registeredCapital]").val() == null || $("input[name=registeredCapital]").val() == ""){
+            layer.msg("请输入资本", {icon: 2});
+            return false;
+        }
+        if($("input[name=setUpTheDate]").val() == null || $("input[name=setUpTheDate]").val() == ""){
+            layer.msg("请选择成立日期", {icon: 2});
+            return false;
+        }
+        if($("input[name=residence]").val() == null || $("input[name=residence]").val() == ""){
+            layer.msg("请输入地址", {icon: 2});
+            return false;
+        }
+        if($("input[name=businessLicense]").val() == null || $("input[name=businessLicense]").val() == ""){
+            layer.msg("请上传营业执照", {icon: 2});
+            return false;
+        }
+        if($("input[name=idCardJust]").val() == null || $("input[name=idCardJust]").val() == ""){
+            layer.msg("请上传身份证正面", {icon: 2});
+            return false;
+        }
+        if($("input[name=idCardReverse]").val() == null || $("input[name=idCardReverse]").val() == ""){
+            layer.msg("请上传身份证反面", {icon: 2});
+            return false;
+        }
+        $.ajax({
+            url: "http://192.168.0.116:9600/supplier/registered",
+            type: "post",
+            data: $("#form").serialize(),
+            dataType: "text",
+            headers: {token: token},
+            success: (data) => {
+                if(data.msg == "200"){
+                    if(data.data != null){
+                        localStorage.setItem("token", data.data.token);
+                        window.location.href="/page/index"
+                    }
+                }
+                layer.closeAll("loading");
+            },
+            error: () => {
+                layer.alert("服务器异常,请联系管理员", {icon: 2});
+                layer.closeAll("loading");
+            }
+        });
+    });
+})

+ 98 - 0
src/main/resources/templates/registered/index.html

@@ -0,0 +1,98 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>注册</title>
+    <link rel="stylesheet" href="/layui/css/layui.css">
+    <link rel="stylesheet" href="/css/registered.css">
+    <script src="/layui/layui.js"></script>
+    <script src="/js/jquery.js"></script>
+    <script src="/js/common.js"></script>
+    <script src="/js/registered/even.js"></script>
+    <script src="/js/registered/index.js"></script>
+    <script src="/js/registered/function.js"></script>
+    <script type="text/javascript">
+        var phone = "[[${phone}]]";
+    </script>
+</head>
+<body>
+    <div class="form_div layui-form">
+        <form id="form">
+            <input name="phone" hidden>
+            <div class="layui-form-item">
+                <label class="layui-form-label">公司名称:</label>
+                <div class="layui-input-block">
+                    <input type="text" name="company" lay-verify="title" autocomplete="off" placeholder="请输入公司名称" class="layui-input">
+                </div>
+            </div>
+            <div class="layui-form-item">
+                <label class="layui-form-label">法定代表人:</label>
+                <div class="layui-input-block">
+                    <input type="text" name="representative" lay-verify="title" autocomplete="off" placeholder="请输入法定代表人" class="layui-input">
+                </div>
+            </div>
+            <div class="layui-form-item">
+                <label class="layui-form-label">证件类型:</label>
+                <div class="layui-input-block">
+                    <select name="documentType" lay-filter="aihao">
+                        <option value="" selected="">请选择</option>
+                        <option value="0">身份证</option>
+                        <option value="1">护照</option>
+                        <option value="2">港澳台通行证</option>
+                    </select>
+                </div>
+            </div>
+            <div class="layui-form-item">
+                <label class="layui-form-label">证件号码:</label>
+                <div class="layui-input-block">
+                    <input type="text" name="idNumber" lay-verify="title" autocomplete="off" placeholder="请输入证件号码" class="layui-input">
+                </div>
+            </div>
+            <div class="layui-form-item">
+                <label class="layui-form-label">注册资本:</label>
+                <div class="layui-input-block">
+                    <input type="text" name="registeredCapital" lay-verify="title" autocomplete="off" placeholder="¥" class="layui-input">
+                </div>
+            </div>
+            <div class="layui-form-item">
+                <div class="layui-inline">
+                    <label class="layui-form-label">成立日期:</label>
+                    <div class="layui-input-inline">
+                        <input type="text" name="setUpTheDate" id="date" lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
+                    </div>
+                </div>
+            </div>
+            <div class="layui-form-item">
+                <label class="layui-form-label">住所:</label>
+                <div class="layui-input-block">
+                    <input type="text" name="residence" lay-verify="title" autocomplete="off" placeholder="请输入住所" class="layui-input">
+                </div>
+            </div>
+            <div class="layui-upload">
+                <button type="button" class="layui-btn" id="test1">上传营业执照</button>
+                <div class="layui-upload-list">
+                    <img class="layui-upload-img" id="demo1">
+                    <input name="businessLicense" hidden>
+                </div>
+            </div>
+            <div class="layui-upload">
+                <button type="button" class="layui-btn" id="test2">上传身份证正面</button>
+                <div class="layui-upload-list">
+                    <img class="layui-upload-img" id="demo2">
+                    <input name="idCardJust" hidden>
+                </div>
+            </div>
+            <div class="layui-upload">
+                <button type="button" class="layui-btn" id="test3">上传身份证反面</button>
+                <div class="layui-upload-list">
+                    <img class="layui-upload-img" id="demo3">
+                    <input name="idCardReverse" hidden>
+                </div>
+            </div>
+        </form>
+        <div class="button_div">
+            <button class="layui-btn layui-btn-normal registered_button">注册</button>
+        </div>
+    </div>
+</body>
+</html>