Browse Source

增加公共方法

zhengjinyi 4 years ago
parent
commit
5da6aea298

+ 6 - 6
src/main/resources/config/dev/application-dev.yml

@@ -52,13 +52,13 @@ logging:
 
 # 服务域名
 caimei:
-#  spiServer: http://192.168.2.75:8008/
-#  imageDomain: https://img-b.caimei365.com
-#  wwwDomain: https://www-b.caimei365.com
+  spiServer: http://192.168.2.75:8008/
+  imageDomain: https://img-b.caimei365.com
+  wwwDomain: https://www-b.caimei365.com
 
-  spiServer: https://spi.caimei365.com
-  imageDomain: https://img.caimei365.com
-  wwwDomain: https://www.caimei365.com
+#    spiServer: https://spi.caimei365.com
+#    imageDomain: https://img.caimei365.com
+#    wwwDomain: https://www.caimei365.com
 
 #DFS配置
 fdfs:

+ 5 - 3
src/main/resources/static/css/account/register.css

@@ -21,7 +21,7 @@ footer .footTop{display:none;}
 .advisoryInfo{display:none;cursor:default;position:absolute;top:40px;left:-32px;box-sizing:border-box;width:386px;padding:32px;background:#fff;box-shadow:0 10px 20px 0 rgba(0,0,0,0.16);z-index:9}
 .advisoryInfo:before{content:'\25B2';position:absolute;top:-30px;left:26px;font-size:50px;-ms-transform:scaleX(2);-webkit-transform:scaleX(2);transform:scaleX(2);text-shadow:2px 0 10px #b8bfca;width:50px;height:30px;overflow:hidden;line-height:50px;text-align:center;color:#FFF}
 .advisoryInfo .info{margin-bottom:15px;color:#1890f9;font-size:14px}
-.advisoryInfo .btn{display:block;width:232px;height:50px;line-height:50px;margin:0 auto;font-size:18px;background-color:#ffe6dc;border-radius:2px;border:solid 1px #e15616;color:#e15616}
+.advisoryInfo .btn{cursor: pointer; display:block;width:232px;height:50px;line-height:50px;margin:0 auto;font-size:18px;background-color:#ffe6dc;border-radius:2px;border:solid 1px #e15616;color:#e15616}
 .signAccount .advisory:hover .advisoryInfo{display:block;transition:all .5s}
 .supplierConfirm .cont{width:880px;height:550px;position: absolute;top: 0;left: 0;right: 0;bottom: 0;margin: auto; box-sizing:border-box;background:#fff;padding:46px;border-radius:4px;color:#333;font-size:16px;box-shadow:0 10px 20px 0 rgba(0,0,0,0.16)}
 .supplierConfirm .cont h3{text-align:center;font-size:24px}
@@ -56,8 +56,10 @@ footer{display:none}
 .selectAccount .cont span{display:inline-block;width:24.8vw;margin:0 6.7vw;line-height:4.6vw;color:#3b77ff;font-size:3.4vw;cursor:pointer}
 .selectAccount .cont img{display:inline-block;width:24.8vw;height:24.8vw;background-color:#c2d8fa;border-radius:12.4vw}
 .signAccount{width:100%;min-height:90vh;font-size:3.4vw;color:#627386;}
-.signAccount .advisory>.mIcon{height:5.6vw;line-height:5.6vw;font-size:1.6vw;color:#1890f9;display: block;position: absolute;right: 4vw;}
-.signAccount .advisory>.mIcon:before{width:5.6vw;height:5.6vw;background-position:-18.8vw -29.8vw;}
+.signAccount .advisory>.duv{float: right;line-height: 5.6vw;padding-right: 4vw;}
+.signAccount .advisory>.duv span{display: inline-block;float: left;}
+.signAccount .advisory>.duv>.mIcon{height:5.6vw;line-height:5.6vw;font-size:1.6vw;color:#1890f9;display: block;}
+.signAccount .advisory>.duv>.mIcon:before{width:5.6vw;height:5.6vw;background-position:-84.2vw -0vw;}
 .signAccount .title{height:6vw;line-height:6vw;font-weight:bold;font-size:4.2vw;color:#22272e;text-align:center;padding:5.2vw 0}
 .registerShop .tit{color:#22272e;font-size:3.7vw;font-weight:normal;margin:3vw 0}
 .signAccount form{width:93.4vw;margin:0 auto;}

+ 21 - 0
src/main/resources/static/css/account/upgrade.css

@@ -6,6 +6,27 @@ li{list-style:none}
 @media screen and (min-width:768px){
 body{background: #FFF url(/img/account/register.png) no-repeat center 84px;background-attachment: fixed;}
 footer .footTop{display:none;}
+.signAccount {width: 968px;margin: 0 auto;}
+.signAccount .title {height: 42px;font-size: 32px;line-height: 42px;font-weight: normal;color: #22272e;padding: 20px 0;text-align: center;}
+.signAccount .title-tips{margin-bottom: 32px;width: 968px;height: 48px;background-image: linear-gradient(270deg,rgba(255,255,255,0.1) 0%,rgba(255,86,11,0.1) 51%,rgba(255,255,255,0.1) 100%);}
+.signAccount .title-tips p{width: 968px;height: 48px;font-family: Microsoft YaHei;font-size: 14px;font-weight: normal;font-stretch: normal;line-height: 48px;letter-spacing: 1px;color: #e15616;text-align: center;}
+.signAccount .registerClub{width:498px;margin:0 auto;min-height: 900px;}
+.formLine .business input[type="text"] {width: 350px;display: block;float: left;margin-right: 20px;}
+.formLine .business a {display: block;float: left; width: 92px;height: 34px;line-height: 34px;font-size: 14px;color: #e15616;background-color: #ffe6dc;border-radius: 2px;border: solid 1px #e15616;text-align: center;}
+.formLine .form-upload{width: 128px;height: 90px;float: left;margin-right: 20px;}
+.formLine .formLine-file{width: 128px;height: 90px;position: relative;}
+.formLine .file{width: 128px;height: 90px;opacity: 0;position: absolute;top: 0;left: 0;z-index: 999;cursor: pointer;}
+.formLine .formLine-file .icon{width: 128px;height: 90px;display: block;}
+.formLine .formLine-file .file-biss{background: url("/img/account/icon-bisse.png") no-repeat;}
+.formLine .formLine-file .file-door{background: url("/img/account/icon-door.png") no-repeat;}
+.formLine .formLine-file .file-zizhi{background: url("/img/account/icon-zizhi.png") no-repeat;}
+
+
+
+
+
+
+
 
 
 }

+ 18 - 5
src/main/resources/static/css/base/form.css

@@ -4,13 +4,13 @@
  */
  .formLine .diyBox i{display:block;font-style:normal;cursor:pointer;width:100%;height:100%;position:relative;overflow:hidden;border-radius:2px;background:#FFF;border:1px solid #b8bfca;color:#627386;}
 @media screen and (min-width:768px){
-.formLine{padding-bottom:4px;font-size:14px;position:relative}
+.formLine{padding-bottom:5px;font-size:14px;position:relative}
 .formLine input,.formLine select{box-sizing:border-box;width:100%;height:36px;line-height:34px;text-indent:1.2em;background-color:#FFF;border:1px solid #b8bfca;border-radius:2px}
-.formLine textarea{width:100%;height:114px;box-sizing:border-box;border:solid 1px #b8bfca;padding:10px 16px;line-height:20px;}
+.formLine textarea{width:100%;height:114px;box-sizing:border-box;border:solid 1px #b8bfca;padding:10px 16px;line-height:20px;resize: none;border-radius: 2px;outline: none;}
 .formLine select{width:154px}
 .formLine.error input{border-color:#f94b4b}
 .formLine input:focus{border-color:#ffe6dc;}
-.formLine p{height:32px;line-height:32px}
+.formLine p{height:auto;line-height:32px}
 .formLine p em{font-style:normal;color:#f94b4b;margin:0 5px}
 .formLine p span{color:#ffb496;}
 .formLine .checked{position:absolute;width:20px;height:20px;top:40px;right:5px;display:none}
@@ -25,12 +25,21 @@
 .formLine.code input{width:312px}
 .formLine.code .checked{right:auto;left:288px}
 .formLine.code .getCode{position:absolute;right:0;top:32px;box-sizing:border-box;width:168px;height:36px;line-height:34px;text-align:center;background-color:#ffe6dc;border-radius:2px;border:solid 1px #e15616;color:#e15616;font-size:14px}
-
+ .formLine.code .getCode.disabled{background-color: #F7F7F7;color: #999999;border-color: #999999;}
 .subLine p{font-size:14px}
 .subLine p input{vertical-align:top;margin-right:10px;cursor:pointer}
 .subLine p a{color:#1890f9}
 .subLine p a:hover{color:#e15616}
-.subLine .btn{display:block;margin:32px auto;width:232px;height:50px;line-height:50px;background-color:#e15616;border-radius:2px;text-align:center;font-size:18px;color:#FFF}
+.subLine .checked{position:absolute;width:20px;height:20px;top:40px;right:5px;display:none}
+.subLine .checked:before{width:20px;height:20px;background-position:-138px -296px}
+.subLine .errTips{display:block;height:20px;line-height:20px;white-space:nowrap;color:red;font-size:12px;visibility:hidden}
+.subLine .checked.show{display:block}
+.subLine .errTips.show{visibility:visible}
+.subLine .errTips:before{width:20px;height:20px;background-position:-172px -296px;vertical-align:top}
+.subLine .btn{cursor: pointer;display:block;margin:32px auto;width:232px;height:50px;line-height:50px;background-color:#e15616;border-radius:2px;text-align:center;font-size:18px;color:#FFF}
+.subLine .iconfont{width:16px;height: 16px;display: block;background:url(/img/base/icon.png) no-repeat;float: left;margin-right: 5px;cursor: pointer;}
+.subLine .icon-weigouxuan{background-position: -236px 0;}
+.subLine .icon-gouxuan{background-position: -210px 0;}
 
 .formLine .address{text-align:justify;line-height:0}
 .formLine .address textarea{margin-top:16px}
@@ -70,6 +79,10 @@
 .subLine p input{margin-right:1vw;}
 .subLine p a{color:#1890f9}
 .subLine .btn{display:block;margin:5vw auto;width:100%;height:11.2vw;line-height:11.2vw;background-color:#e15616;border-radius:2px;text-align:center;font-size:1.8vw;color:#FFF}
+.subLine .iconfont{width:16px;height: 16px;display: block;background:url(/img/base/icon_m.png) no-repeat;float: left;margin-right: 5vm;cursor: pointer;}
+.subLine .icon-weigouxuan{background-position: -236px 0;}
+.subLine .icon-gouxuan{background-position: -210px 0;}
+
 .formLine .address{text-align:justify;line-height:0}
 .formLine .diyBox{width:34vw;height:11.2vw;line-height:11.2vw;margin-right: 1.5vw;box-sizing:border-box;text-align:center;display:inline-block}
 .formLine .diyBox.second{width:20vw;}

+ 93 - 25
src/main/resources/static/js/account/register.js

@@ -5,6 +5,10 @@ var registerPage = new Vue({
         showSupplierConfirm:true,
         advisoryStatus: false,
         showClass:'',
+        mobilCount:0,
+        mobileCodeText:'获取验证码',
+        mobilTime:null,
+        isMobileDisabled:false,
         advisory:{
             name: '',
             phone: ''
@@ -31,6 +35,9 @@ var registerPage = new Vue({
             businessLicense:'',
             businessLicenseImage:''
         },
+        isAgreed:0,
+        isAgree:false,
+        isShowAgree:false,
         mainPros: ['产品','仪器','服务','整形'],
         mainProEdit: '',
         rule:{
@@ -69,10 +76,7 @@ var registerPage = new Vue({
             var el = event.currentTarget;
             verifyHandle(el);
         },
-        /**
-         * 机构入驻咨询提交
-         */
-        postAdvisory: function(){
+        postAdvisory: function(){//机构入驻咨询提交
             var _self = this;
             $('.advisoryInfo').find("[needverify]:visible").each(function (index, ele) {
                 if (!$(ele).siblings('.checked').hasClass("show")) {
@@ -80,38 +84,50 @@ var registerPage = new Vue({
                 }
             });
             var pass = ($('.errTips.show:visible').length === 0);
-            if (this.advisoryStatus) { return false; }
+            if (_self.advisoryStatus) { return false; }
             this.$nextTick(function(){
                 if (!pass) { return false; }
                 _self.advisoryStatus = true;
-                $.post(spiServer + '/club/advisory',{
-                    name: _self.advisory.name,
-                    mobile: _self.advisory.phone
-                }).done(function(res){
+                UserApi.quickConsultation({name: _self.advisory.name,mobile: _self.advisory.phone},function (response) {
                     _self.advisoryStatus = false;
-                    if(res.code === 0){
+                    if(response.code === 0){
                         alertInfo("您的信息已提交成功,采美工作人员会第一时间联系您");
                     } else {
-                        alertInfo(res.msg);
+                        alertInfo(response.msg);
                     }
-                }).fail(function(err){
-                    console.log(err);
-                    alertInfo('提交失败,请稍后重试!');
-                    _self.advisoryStatus = false;
                 });
             });
         },
-        /**
-         * 机构注册提交
-         */
-        clubRegister: function(){
-            alertInfo('机构注册');
-            console.log(JSON.stringify(this.clubUser));
+        clubRegister: function(){ //机构注册提交
+            var _self = this;
+            var pass = verifyForm();
+            if (this.loginLoading) { return false; }
+            this.$nextTick(function() {
+                if (!pass) {return false;}
+                if (!_self.isAgree){
+                    _self.isShowAgree = true;
+                    return;
+                }
+                var params = {
+                        userName : _self.clubUser.name,
+                        bindMobile : _self.clubUser.phone,
+                        password : _self.clubUser.password,
+                        passWordConfirm : _self.clubUser.password2,
+                        activationCode : _self.clubUser.code,
+                        isAgreed :  _self.isAgreed,
+                };
+                UserApi.ClubRegister(params,function (response) {
+                    if(response.code === 0){
+                        dialog('注册成功!',function () {
+                            window.location.href = '/upgrade.html';
+                        });
+                    } else {
+                        alertInfo(response.msg);
+                    }
+                });
+            });
         },
-        /**
-         * 供应商注册提交
-         */
-        supplierRegister: function(){
+        supplierRegister: function(){//供应商注册提交
             alertInfo('供应商注册');
             console.log(JSON.stringify(this.supplierUser));
         },
@@ -122,6 +138,44 @@ var registerPage = new Vue({
                 _self.showSupplierConfirm = true;
             }
         },
+        getMobileCodeFn:function(){//机构注册获取注册短信验证码
+            var _self = this;
+            var pass = verifyCheack('.massageBtn');
+            if (this.loginLoading) { return false; }
+            this.$nextTick(function() {
+                if (!pass) {return false;};
+                var params = {
+                        mobile:this.clubUser.phone,
+                        activateCodeType:2,
+                        platformType:2
+                    };
+                _self.isMobileDisabled = true;
+                UserApi.getRegisterMobileCode(params,function (response) {
+                    if(response.code == 0){
+                        alertInfo('验证短信已发送');
+                        var TIME_COUNT = 60;
+                        if (!_self.mobilTime) {
+                            _self.mobilCount = TIME_COUNT;
+                            _self.isMobileDisabled = true;
+                            _self.mobilTime = setInterval(function(){
+                            if (_self.mobilCount > 1 && _self.mobilCount <= TIME_COUNT) {
+                                _self.mobilCount--;
+                                _self.mobileCodeText = _self.mobilCount +'s重新发送';
+                            } else {
+                                _self.isMobileDisabled = false;
+                                clearInterval(this.mobilTime);
+                                _self.mobilTime = null;
+                                _self.mobileCodeText = '获取验证码'
+                            }
+                        },1000)
+                        }
+                    }else{
+                        alertInfo(response.msg);
+                        _self.isMobileDisabled = false;
+                    }
+                })
+            });
+        },
         showSupplier:function () {
             var _self = this;
             _self.showSupplierConfirm = false;
@@ -133,6 +187,17 @@ var registerPage = new Vue({
         closeVadvisory:function () {
             var _self = this;
             _self.showClass = '';
+        },
+        checkedIsAgreeFn:function () {
+            var _self = this;
+            _self.isAgree = !_self.isAgree;
+            if (_self.isAgree){
+                _self.isShowAgree = false;
+                _self.isAgreed = 1;
+            }else{
+                _self.isShowAgree = true;
+                _self.isAgreed = 0;
+            }
         }
 
     },
@@ -141,5 +206,8 @@ var registerPage = new Vue({
     },
     mounted: function () {
         var _self = this;
+        CAIMEI.Alert('哈哈哈哈哈哈','不想去',function () {
+            console.log('222222222222222222')
+        })
     }
 });

+ 42 - 0
src/main/resources/static/js/account/upgrade.js

@@ -1,13 +1,55 @@
 var upgradePage = new Vue({
     el: "#upgradePage",
     data: {
+        clubUser: {
+            name:'',
+            phone:'',
+            code:'',
+            address:'',
+            mainPros:'',
+            businessLicenseImage:'',
+            businessLicense:'',
+            secondShopType:'',
+            firstShopType:'',
+            department:''
 
+        },
+        mentuzCampNullList:[
+            {value:'1',name:'整形'},
+            {value:'2',name:'轻医美'},
+            {value:'3',name:'皮肤科'},
+        ],
+        medicaCampNullList: [
+            {value:'1',name:'美容'},
+            {value:'2',name:'美体'},
+            {value:'3',name:'美发'},
+            {value:'4',name:'皮肤管理'},
+            {value:'5',name:'光电'},
+            {value:'6',name:'综合类'},
+            {value:'7',name:'中医养生'},
+            {value:'8',name:'spa'},
+        ],
+        mainProEdit: '',
+        rule:{
+            name: '^[a-zA-Z\\u4e00-\\u9fa5]{2,}$',
+            phone: '^\\d{6,12}$',
+            code: '^\\d{6}$',
+            license: '^[a-zA-Z0-9_]{18}$',
+            email: '^(([^<>()\\[\\]\\\\.,;:\\s@&quot;]+(\\.[^<>()\\[\\]\\\\.,;:\\s@&quot;]+)*)|(&quot;.+&quot;))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$',
+            password: "^[^\\u4e00-\\u9fa5]{8,16}$"
+        },
     },
     computed: {
 
     },
     methods: {
+        getMobileCodeFn:function(){
 
+        },
+        blurHandle: function(event) { // 失去焦点校验
+            var el = event.currentTarget;
+            verifyHandle(el);
+        },
     },
     created: function () {
 

+ 13 - 5
src/main/resources/static/js/base.js

@@ -463,7 +463,14 @@ function verifyForm() {
     var len = $('.errTips.show:visible').length;
     return (len === 0);
 }
-
+// 单个验证表单
+function verifyCheack(ele) {
+    if (!$(ele).siblings('.checked').hasClass("show")) {
+        verifyHandle(ele);
+    }
+    var len = $(ele).siblings('.errTips.show:visible').length;
+    return (len === 0);
+}
 
 // 公共信息提示弹框
 function alertInfo(txt) {
@@ -484,20 +491,21 @@ function alertInfo(txt) {
         }
     });
 }
-
-function autoInfo(txt) {
+//公共吐司
+function dialog(txt,callback) {
     $.confirm({
         title: false,
         content: txt,
+        boxWidth: (isPC?'300px':'70%'),
         autoClose: 'close|2000',
+        useBootstrap:false,
         buttons: {
             close:{
                 isHidden: true,
                 action: function () {
-                    console.log(11111111)
+                    callback()
                 }
             }
         }
     });
 }
-

+ 9 - 3
src/main/resources/static/js/common/serviceapi/user.service.js

@@ -24,9 +24,15 @@ var UserApi = {
         },
         ClubRegister: function (params, callback) {//机构注册
             Http.AjaxService({ url:'/club/common', type:'post', data:params, json:false})
-            .then(function(res){
-                callback(res);
-            });
+                .then(function(res){
+                    callback(res);
+                });
+        },
+        getRegisterMobileCode: function (params, callback) {//机构注册
+            Http.AjaxService({ url:'/club/captcha', type:'get', data:params, json:false})
+                .then(function(res){
+                    callback(res);
+                });
         },
         ClubUpgrade : function(params,callback) {//机构注册升级信息
             Http.AjaxService({ url:'/club/upgrade', type:'post', data:params, json:false})

+ 0 - 12
src/main/resources/static/js/common/serviceapi/utils.service.js

@@ -46,18 +46,6 @@ var PublicApi = {
                 callback(res)
             });
         },
-        getWrchatQrcode : function(params,callback){//获取扫码登陆二维码
-            Http.AjaxService({ url:'/user/toWechatLogin', type:'get', data:params, json:true, mask:false,replace:false})
-            .then(function(res){
-                callback(res)
-            });
-        },
-        getWrchatStatus: function(params,callback){//扫码登陆轮询
-            Http.AjaxService({ url:'/user/polling', type:'get', data:params, json:true, mask:false,replace:false})
-            .then(function(res){
-                callback(res)
-            });
-        },
         getImgVerifyCode : function (params,callback){ //获取图形验证图形
             Http.AjaxService({ url:'/user/getImgVerifyCode', type:'get', data:{platformType:0}, json:true, mask:false,replace:false})
             .then(function(res){

+ 193 - 0
src/main/resources/static/js/utils.js

@@ -0,0 +1,193 @@
+var CAIMEI = window.CAIMEI = {};
+var isWuHeng = isLocalStorageSupported();//无痕
+var AmtRegExp =/^(([1-9]\d{0,9})|0)(\.\d{1,2})?$/;
+CAIMEI.Storage = {
+    setItem:function(key,val){
+        if(isWuHeng){
+            window.localStorage.setItem(key,val);
+        }else{
+            setCookie(key,val,{maxAge:300000});
+        }
+    },
+    getItem:function(key){
+        if(isWuHeng){
+            return window.localStorage.getItem(key);
+        }else{
+            var name = getCookie(key);
+            return name;
+        }
+    },
+    clear:function(){
+        if(isWuHeng){
+            window.localStorage.clear();
+        }else{
+            clearCookie();
+        }
+    }
+};
+function isLocalStorageSupported(){
+    var testKey = 'testWu',
+        storage = window.sessionStorage;
+    try {
+        storage.setItem(testKey, 'testValue');
+        storage.removeItem(testKey);
+        return true;
+    } catch (error) {
+        return false;
+    }
+};
+function getCookiesObj(){
+    var cookies = {};
+    if(document.cookie){
+        var objs = document.cookie.split('; ');
+        for(var i in objs){
+            var index = objs[i].indexOf('='),
+                name = objs[i].substr(0, index),
+                value = objs[i].substr(index + 1, objs[i].length);
+            cookies[name] = value;
+        }
+    }
+    return cookies;
+};
+function setCookie(name, value,opts){
+    if(name && value){
+        var cookie = encodeURIComponent(name) + '=' + encodeURIComponent(value);
+        if(opts){
+            if(opts.maxAge){
+                cookie += '; max-age=' + opts.maxAge;
+            }
+        }
+        document.cookie = cookie;
+    }else{
+        return '';
+    }
+};
+//获取cookie
+function getCookie(name){
+    return decodeURIComponent(getCookiesObj()[name]) || null;
+};
+//清除所有cookie
+function clearCookie(){
+    var cookies = getCookiesObj();
+    for(var key in cookies){
+        document.cookie = key + '=; max-age=0';
+    }
+};
+
+/*取消,确定提示弹窗
+ * @param content 提示文字信息
+ * @param cancelText 自定义取消按钮文字
+ * @param confitmText 自定义确认按钮文字
+ * @param callback 回调函数
+ * @auth zhjy
+ */
+CAIMEI.Modal = function(content,cancelText,confitmText,callback){
+    $.confirm({
+        boxWidth: (isPC?'300px':'70%'),
+        title:'提示',
+        content: content,
+        closeIcon: true,
+        animation: 'opacity',
+        closeAnimation: 'opacity',
+        useBootstrap: false,
+        animateFromElement: false,
+        buttons: {
+            cancel: {
+                text: cancelText,
+                btnClass: 'btn-cancel',
+                action:function () {}
+            },
+            confirm:{
+                text: confitmText,
+                btnClass: 'btn-confirm',
+                action:function () {
+                    callback();
+                }
+            }
+        }
+    });
+};
+/*单个确定提示弹窗
+ * @param content 提示文字信息
+ * @param confitmText 自定义按钮文字内容
+ * @param callback 回调函数
+ * @auth zhjy
+ */
+CAIMEI.Alert = function(content,confitmText,callback){
+    $.confirm({
+        boxWidth: (isPC?'300px':'70%'),
+        title:'',
+        content: content,
+        closeIcon: true,
+        animation: 'opacity',
+        closeAnimation: 'opacity',
+        useBootstrap: false,
+        animateFromElement: false,
+        buttons: {
+            confirm:{
+                text: confitmText,
+                btnClass: 'btn-confirm',
+                action:function () {
+                    callback();
+                }
+            }
+        }
+    });
+};
+/*封装的吐司提示
+ * @param content 提示文字信息
+ * @param callback 回调函数
+ * @auth zhjy
+ */
+CAIMEI.dialog = function(content,callback){
+    $.confirm({
+        title: false,
+        content: content,
+        boxWidth: (isPC?'300px':'70%'),
+        autoClose: 'close|2000',
+        useBootstrap:false,
+        buttons: {
+            close:{
+                isHidden: true,
+                action: function () {
+                    callback()
+                }
+            }
+        }
+    });
+};
+/*手机校验
+ * @param m 输入的手机号
+ * @auth zhjy
+ */
+CAIMEI.isPhone = function(mobile){
+    var reg =  /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}$/;
+    return reg.test(mobile);
+};
+/*固话校验
+ * @param m 输入的固定电话
+ * @auth zhjy
+ */
+CAIMEI.isTel = function(mobile){
+    var reg =  /^0\d{2,3}-?\d{7,8}$/;//固定电话
+    return reg.test(mobile)
+};
+/*金额格式校验
+ * @param m 输入的金额
+ * @auth zhjy
+ */
+CAIMEI.isMoney = function(m){
+    if(!AmtRegExp.test(m)){
+        return true;
+    }else{
+        return false;
+    }
+};
+/*邮箱校验
+ * @param m 输入的邮箱号
+ * @auth zhjy
+ */
+CAIMEI.isEmail = function(m){
+    var reg =  /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;//邮箱正则
+    return reg.test(m)
+};

+ 12 - 7
src/main/resources/templates/account/register.html

@@ -24,7 +24,7 @@
         <div class="title">欢迎机构入驻</div>
         <div class="advisory" >
             <span v-if="isPC" class="icon">入驻咨询</span>
-            <span v-else class="mIcon" @click="showVadvisory">入驻咨询</span>
+            <div v-else class="duv" @click="showVadvisory"><span class="mIcon" ></span><span>入驻咨询</span> </div>
             <div class="mask" :class="showClass" @click="closeVadvisory"></div>
             <div class="advisoryInfo" :class="showClass">
                 <div class="info">若暂不方便入驻机构或无法入驻,您可以留下您的姓名和联系方式,采美工作人员会第一时间联系您。</div>
@@ -55,22 +55,22 @@
                     <i class="checked icon mIcon"></i>
                     <span class="errTips icon mIcon" tips="请输入正确的联系人姓名"></span>
                 </div>
-                <div class="formLine">
+                <div class="formLine" >
                     <p><em>*</em>手机号(<span>手机号可用作登录账号</span>):</p>
-                    <input type="text" v-model.trim="clubUser.phone" placeholder="请输入您的常用手机号" :rule="rule.phone" maxlength="12" @blur="blurHandle($event)" needverify>
+                    <input  class="massageBtn"  type="text" v-model.trim="clubUser.phone" placeholder="请输入您的常用手机号" :rule="rule.phone" maxlength="12" @blur="blurHandle($event)" needverify>
                     <i class="checked icon mIcon"></i>
                     <span class="errTips icon mIcon" tips="请输入有效电话号码"></span>
                 </div>
                 <div class="formLine code">
                     <p><em>*</em>短信验证码:</p>
-                    <input type="text" v-model.trim="clubUser.code" placeholder="请输入短信验证码" :rule="rule.code" maxlength="12" @blur="blurHandle($event)" needverify>
+                    <input type="text" v-model.trim="clubUser.code" autocomplete="off" placeholder="请输入短信验证码" :rule="rule.code"  maxlength="6" @blur="blurHandle($event)" needverify>
                     <i class="checked icon mIcon"></i>
                     <span class="errTips icon mIcon" tips="请输入有效短信验证码"></span>
-                    <a class="getCode" href="javascript:void(0);">获取短信验证码</a>
+                    <a class="getCode" href="javascript:void(0);" @click="getMobileCodeFn" :class="[isMobileDisabled  ? 'disabled' : '']">{{ mobileCodeText }}</a>
                 </div>
                 <div class="formLine">
                     <p><em>*</em>登录密码:</p>
-                    <input type="password" v-model.trim="clubUser.password" placeholder="请输入8-16位数字和字母组合" :rule="rule.password" maxlength="16" @blur="blurHandle($event)" needverify>
+                    <input type="password" v-model.trim="clubUser.password" autocomplete="off" placeholder="请输入8-16位数字和字母组合" :rule="rule.password" maxlength="16" @blur="blurHandle($event)" needverify>
                     <i class="checked icon mIcon"></i>
                     <span class="errTips icon mIcon" tips="8-16位数字或字母或字符"></span>
                     <i class="icon showPwd" @click="showPassword($event)"></i>
@@ -83,7 +83,11 @@
                     <i class="icon showPwd" @click="showPassword($event)"></i>
                 </div>
                 <div class="subLine">
-                    <p><input type="checkbox">我已阅读并同意<a href="javascript:void(0);">《机构协议》</a><a href="javascript:void(0);">《用户协议》</a>及<a href="javascript:void(0);">《隐私权政策》</a></p>
+                    <p>
+                        <span class="iconfont icon-weigouxuan" :class="isAgree ? 'icon-gouxuan' : 'icon-weigouxuan' " @click="checkedIsAgreeFn"></span>
+                        我已阅读并同意<a href="javascript:void(0);">《机构协议》</a><a href="javascript:void(0);">《用户协议》</a>及<a href="javascript:void(0);">《隐私权政策》</a>
+                    </p>
+                    <span class="errTips icon mIcon show" v-if="isShowAgree">请阅读并同意协议</span>
                     <button class="btn" type="button" @click="clubRegister()">注册</button>
                     <p class="subLine-p" @click="clickTab(2)">我是供应商,去入驻 ></p>
                 </div>
@@ -223,6 +227,7 @@
 <!-- 引入底部 -->
 <template th:replace="components/footer"></template>
 <template th:replace="components/foot-link"></template>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/user.service.js(v=${version})}"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/account/register.js(v=${version})}"></script>
 </body>
 </html>

+ 113 - 1
src/main/resources/templates/account/upgrade.html

@@ -13,12 +13,124 @@
 
 <!-- 升级机构 -->
 <div id="upgradePage">
-
+    <div class="signAccount">
+        <div class="title">升级会员机构</div>
+        <div class="title-tips"><p>补充以下详细信息即可升级为会员机构,享受更多更好的服务</p></div>
+        <div class="registerClub clear">
+            <!--机构注册表单-->
+            <form>
+                <div class="formLine">
+                    <p><em>*</em>邮箱:</p>
+                    <input type="text" v-model.trim="clubUser.name" placeholder="请输入邮箱地址" :rule="rule.name" maxlength="50" @blur="blurHandle($event)" needverify>
+                    <i class="checked icon mIcon"></i>
+                    <span class="errTips icon mIcon" tips="请输入正确的邮箱地址"></span>
+                </div>
+                <div class="formLine">
+                    <p><em>*</em>机构名称:</p>
+                    <input type="text" v-model.trim="clubUser.name" placeholder="请与营业执照的注册名称保持一致" :rule="rule.name" maxlength="50" @blur="blurHandle($event)" needverify>
+                    <i class="checked icon mIcon"></i>
+                    <span class="errTips icon mIcon" tips="请输入正确的联系人姓名"></span>
+                </div>
+                <div class="formLine">
+                    <p>机构简称:</p>
+                    <input type="text" v-model.trim="clubUser.name" placeholder="请输入机构简称" :rule="rule.name" maxlength="50" needverify>
+                </div>
+                <div class="formLine">
+                    <p><em>*</em>联系地址:</p>
+                    <div class="address">
+                        <select><option value="">请选择</option></select>
+                        <select><option value="">请选择</option></select>
+                        <select><option value="">请选择</option></select>
+                        <textarea placeholder="建议您如实填写详细收货地址,例如:街道名称,门牌号码,楼层和房间号等信息"></textarea>
+                    </div>
+                    <i class="checked icon mIcon"></i>
+                    <span class="errTips icon mIcon" tips="请输入正确的联系地址"></span>
+                </div>
+                <div class="formLine">
+                    <p>营业执照:</p>
+                    <input type="text" v-model.trim="clubUser.businessLicense" placeholder="请输入统一社会信用代码" :rule="rule.license" maxlength="50" @blur="blurHandle($event)" needverify>
+                    <i class="checked icon mIcon"></i>
+                    <span class="errTips icon mIcon" tips="请输入正确的统一社会信用代码"></span>
+                </div>
+                <div class="formLine">
+                    <p><em>*</em>营业执照图片:</p>
+                    <div v-if="clubUser.businessLicenseImage!=''">
+                        <img :src="clubUser.businessLicenseImage" alt="">
+                    </div>
+                    <div class="formLine-file" v-else>
+                        <input class="file" type="file" v-model="clubUser.businessLicenseImage">
+                        <i class="icon file-biss"></i>
+                    </div>
+                    <span class="errTips icon mIcon"></span>
+                </div>
+                <div class="formLine">
+                    <p>门头照:</p>
+                    <div v-if="clubUser.businessLicenseImage!=''">
+                        <img :src="clubUser.businessLicenseImage" alt="">
+                    </div>
+                    <div class="formLine-file" v-else>
+                        <input class="file" type="file" v-model="clubUser.businessLicenseImage">
+                        <i class="icon file-door"></i>
+                    </div>
+                    <span class="errTips icon mIcon"></span>
+                </div>
+                <div class="formLine">
+                    <p><em>*</em>机构类型:</p>
+                    <label class="diyBox"><input type="radio" name="firstShopType" v-model="clubUser.firstShopType" value="1" ><i class="icon mIcon">医美</i></label>
+                    <label class="diyBox"><input type="radio" name="firstShopType" v-model="clubUser.firstShopType" value="2" checked><i class="icon mIcon">生美</i></label>
+                    <span class="errTips icon mIcon mIcon" tips="请选择公司类型"></span>
+                </div>
+                <div v-show="clubUser.firstShopType == 1" class="formLine">
+                    <label class="diyBox second"><input type="radio" name="department" v-model="clubUser.department" value="1" checked><i class="icon mIcon">诊所</i></label>
+                    <label class="diyBox second"><input type="radio" name="department" v-model="clubUser.department" value="2" ><i class="icon mIcon">门诊</i></label>
+                    <label class="diyBox second"><input type="radio" name="department" v-model="clubUser.department" value="3" ><i class="icon mIcon">医院</i></label>
+                    <span class="errTips icon mIcon mIcon" tips="请选择公司类型"></span>
+                </div>
+                <div v-show="clubUser.firstShopType == 1" class="formLine">
+                    <p>资质:</p>
+                    <div v-if="clubUser.businessLicenseImage!=''">
+                        <img :src="clubUser.businessLicenseImage" alt="">
+                    </div>
+                    <div class="formLine-file" v-else>
+                        <input class="file" type="file" v-model="clubUser.businessLicenseImage">
+                        <i class="icon file-zizhi"></i>
+                    </div>
+                    <span class="errTips icon mIcon"></span>
+                </div>
+                <div v-show="clubUser.department != 1" class="formLine">
+                    <p>科室:</p>
+                    <input type="text" v-model.trim="clubUser.name" placeholder="请填写您所经营的科室,用逗号隔开.(至少三个)" :rule="rule.name" maxlength="50">
+                </div>
+                <div class="formLine clear" v-show="clubUser.firstShopType == 1">
+                    <p><em>*</em>主营内容:</p>
+                    <p class="business">
+                        <label v-for="pro in mentuzCampNullList" class="diyBox second"><input type="checkbox" name="secondShopType" v-model="clubUser.mainPros" :value="pro" ><i class="icon mIcon">{{pro.name}}</i></label>
+                        <input type="text" placeholder="请输入其他自定义品项目" v-model.trim="mainProEdit">
+                        <a href="javascript:void(0);" @click="mainProAdd()">确认添加</a>
+                    </p>
+                    <span class="errTips icon mIcon" tips="请选择或添加主营产品"></span>
+                </div>
+                <div class="formLine clear" v-show="clubUser.firstShopType == 2">
+                    <p><em>*</em>主营内容:</p>
+                    <p class="business">
+                        <label v-for="pro in medicaCampNullList" class="diyBox second"><input type="checkbox" name="secondShopType" v-model="clubUser.mainPros" :value="pro" ><i class="icon mIcon">{{pro.name}}</i></label>
+                        <input type="text" placeholder="请输入其他自定义品项目" v-model.trim="mainProEdit">
+                        <a href="javascript:void(0);" @click="mainProAdd()">确认添加</a>
+                    </p>
+                    <span class="errTips icon mIcon" tips="请选择或添加主营产品"></span>
+                </div>
+                <div class="subLine">
+                    <button class="btn" type="button" @click="clubRegister()">提交审核</button>
+                </div>
+            </form>
+        </div>
+    </div>
 </div>
 
 <!-- 引入底部 -->
 <template th:replace="components/footer"></template>
 <template th:replace="components/foot-link"></template>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/user.service.js(v=${version})}"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/account/upgrade.js(v=${version})}"></script>
 </body>
 </html>

+ 1 - 0
src/main/resources/templates/components/foot-link.html

@@ -6,3 +6,4 @@
 <script charset="utf-8" type="text/javascript" src="/lib/layer/layer.min.js"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/common/ajax.service.js(v=${version})}"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/base.js(v=${version})}"></script>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/utils.js(v=${version})}"></script>