Browse Source

Merge remote-tracking branch 'origin/dev' into dev

zhoudw 7 years ago
parent
commit
09ed2c3e8c

BIN
frontend/saas-portal-web/build/logo.png


+ 0 - 3
frontend/saas-portal-web/src/App.vue

@@ -1,17 +1,14 @@
 <template>
   <div id="app">
-    <!-- <headers></headers> -->
     <router-view/>
     <footers></footers>
   </div>
 </template>
 <script>
-// import Headers from './components/header/header.vue';
 import footers from './components/footer/footer.vue';
 export default {
   name: 'App',
   components: {
-      // Headers,
       footers
   },
 }

BIN
frontend/saas-portal-web/src/assets/logo.png


+ 71 - 43
frontend/saas-portal-web/src/components/conenter/addgongsi.vue

@@ -26,15 +26,14 @@
                             </select>
                         </li>
                         <li style="height:60px;">
-                            <span class="qy-biaoti">公司地址</span>
-                            <div class="addbiaoqian">
-                                <v-distpicker @province= 'qyprovince'
-                                              @city= 'qycity'
-                                              @area= 'qyarea'
-                                >
-                                </v-distpicker>
-                                <input ref="address" class="qy-xiangxi" type="text" placeholder="输入企业详细地址">
+                            <span class="qy-biaoti left">公司地址</span>
+                            <div class="addbiaoqian" style="float: left;margin: 0;">
+                                <!-- <v-distpicker @province= 'qyprovince' @city= 'qycity' @area= 'qyarea'></v-distpicker> -->
+                                <v-distpicker @selected= 'selected'></v-distpicker>
+                                <input ref="address" @change="address" class="qy-xiangxi" type="text" placeholder="输入企业详细地址">
+                                
                             </div>
+                            <span ref="ress" style="color:red;margin-top: 40px;display: inline-block;"></span>
                         </li>
                     </ul>
                 </div>
@@ -73,7 +72,12 @@ import VDistpicker from 'v-distpicker'
                 area:'',//区
                 qymingzi: false,//企业名是否注册
                 Email: '',
-                mytoken: JSON.parse(localStorage.getItem('app-state-session'))//本地储存的用户信息
+                mytoken: JSON.parse(localStorage.getItem('app-state-session')),//本地储存的用户信息
+                // reg: new RegExp("[`~!@#$^&*()=+-|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]"),
+                reg: new RegExp(/[\@\#\$\%\&\*!\¥]/),
+                isaddress: false,//公司地址验证
+                isname: false,//姓名验证
+                isspaceName: false,//公司名验证
             }
         },
         components:{
@@ -90,42 +94,68 @@ import VDistpicker from 'v-distpicker'
             },
             //测试企业名称
             spaceName(){
-                let qyname = this.$refs.qyname.value;//公司名字
+                let qyname = this.$refs.qyname.value.replace(/\s+/g, "");//公司名字过滤空格
                 if(qyname == ''){
                     this.$refs.qyno.innerHTML = '企业名不能为空';
                 } else {
-                    this.$refs.qyno.innerHTML = '';
-                    let token = this.mytoken.token;
-                    this.$ajax({
-                        url: this.$url.api+"/api/account/accountCenter/checkSpaceName"+`?spaceName=${qyname}`,
-                        method :'get',
-                        headers: {
-                            "Authorization":token
-                        }
-                    })
-                    .then(res=>{
-                        if (res.data.data.success) {
-                            this.qymingzi = true;
-                        } else {
-                            this.$refs.qyno.innerHTML = '企业已注册';
-                            this.qymingzi = false
-                        }
-                    })
-                    .catch(err=>{
-                        console.log("请求错误",err);
-                    })
+                    if (this.reg.test(qyname)) {
+                        this.$refs.qyno.innerHTML = '包含非法字符';
+                        this.isspaceName = false;
+                    } else {
+                        this.$refs.qyno.innerHTML = '';
+                        this.isspaceName = true;
+                        let token = this.mytoken.token;
+                        this.$ajax({
+                            url: this.$url.api+"/api/account/accountCenter/checkSpaceName"+`?spaceName=${qyname}`,
+                            method :'get',
+                            headers: {
+                                "Authorization":token
+                            }
+                        })
+                        .then(res=>{
+                            if (res.data.data.success) {
+                                this.qymingzi = true;
+                            } else {
+                                this.$refs.qyno.innerHTML = '企业已注册';
+                                this.qymingzi = false
+                            }
+                        })
+                        .catch(err=>{
+                            // console.log("请求错误",err);
+                        })
+                    }
                 }
             },
             //验证个人姓名
             yzusername(){
-                let name = this.$refs.name.value;//个人姓名
+                let name = this.$refs.name.value.replace(/\s+/g, "");//姓名过滤空格
                 if (name == '') {
                     this.$refs.usname.innerHTML = '姓名不能为空'
                 } else {
-                    this.$refs.usname.innerHTML = ''
+                    if (this.reg.test(name)) {
+                        this.$refs.usname.innerHTML = '包含非法字符'
+                        this.isname = false
+                    } else {
+                        this.$refs.usname.innerHTML = ''
+                        this.isname = true
+                    }
+                }
+            },
+            //验证公司详细地址
+            address(){
+                let address = this.$refs.address.value.replace(/\s+/g, "");//过滤空格
+                if (address == '') {
+                    this.$refs.ress.innerHTML = '地址不能为空'
+                } else {
+                    if (this.reg.test(address)) {
+                        this.$refs.ress.innerHTML = '包含非法字符'
+                        this.isaddress = false
+                    } else {
+                        this.$refs.ress.innerHTML = ''
+                        this.isaddress = true
+                    }
                 }
             },
-            
             email(){
                 let reg = new RegExp("^[a-z0-9A-Z]+[- | a-z0-9A-Z . _]+@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-z]{2,}$"); 
                 let email = this.$refs.email.value;//邮箱
@@ -134,14 +164,13 @@ import VDistpicker from 'v-distpicker'
                 } else {
                     this.Email = ''
                 }
-
             },
             //保存
             Preservation(){
-                let qyname = this.$refs.qyname.value;//公司名字
+                let qyname = this.$refs.qyname.value.replace(/\s+/g, "");//公司名字
                 let qyindustry = this.$refs.qyindustry.value;//所属行业
-                let address = this.province+this.city+this.area+this.$refs.address.value;//公司详细地址
-                let name = this.$refs.name.value;//个人姓名
+                let address = this.province+this.city+this.area+this.$refs.address.value.replace(/\s+/g, "");//公司详细地址
+                let name = this.$refs.name.value.replace(/\s+/g, "");//个人姓名
                 let email = this.$refs.email.value;//邮箱
                 let mytoken = JSON.parse(localStorage.getItem('app-state-session'));
                 let token = String(mytoken.token);
@@ -149,7 +178,7 @@ import VDistpicker from 'v-distpicker'
                 let mobile = mytoken.account.mobile;//手机号
                 let company = {'name':qyname,'address':address};
                 let account = {'realname':name,'email':email,'mobile':mobile, 'uu':uu}
-                if (name != '' && qyname != '' && this.qymingzi) {
+                if (name != '' && qyname != '' && this.qymingzi && this.isaddress && this.isname && this.isspaceName) {
                     this.$ajax({
                         url: this.$url.api+"/api/account/accountCenter/companyAccount/save",//http://192.168.253.31:8560
                         method: 'post',
@@ -163,19 +192,18 @@ import VDistpicker from 'v-distpicker'
                         }
                     })
                     .then(res=>{
-                        console.log("请求成功",res)
+                        // console.log("请求成功",res)
                         document.documentElement.scrollTop = 0;
-                        // this.$router.push({name:'company', params:{company:company,account:account}});
                         this.$router.push({name:'company'})
                     })
                     .catch(err=>{
-                        console.log("请求失败",err)
+                        // console.log("请求失败",err)
                     })
                 } else {
-                    this.$refs.tjtishi.innerHTML = '企业名称或姓名不能为空'
+                    this.$refs.tjtishi.innerHTML = '企业名称或姓名不能为空或包含有非法字符'
                     setTimeout(() => {
                         this.$refs.tjtishi.innerHTML = ''
-                    }, 2000);
+                    }, 3000);
                 }
                 
             },

+ 3 - 7
frontend/saas-portal-web/src/components/conenter/company.vue

@@ -1,6 +1,5 @@
 <template>
   <div>
-    <!-- <iframe hidden :src="setTokenPage"></iframe> -->
     <!-- 遮罩 -->
     <div class="zhezhao" v-if="issetDefault || isOpensaas || isNoopen"></div>
     <!-- 设置默认弹窗 -->
@@ -121,7 +120,6 @@
         mounted(){
             let mytoken = JSON.parse(localStorage.getItem('app-state-session'));
             let token = String(mytoken.token);
-            // console.log(mytoken.account)
             //企业列表
             this.$ajax({
                     url: this.$url.api+"/api/account/accountCenter/company/list",
@@ -154,7 +152,7 @@
                     // console.log(res.data.data)
                 })
                 .catch(err=>{
-                    console.log("请求失败",err)
+                    // console.log("请求失败",err)
                 })
             this.boxheight();
         },
@@ -177,7 +175,6 @@
                     },
                     headers: {
                         "Authorization":token,
-                        // "Content-Type":'application/x-www-form-urlencoded'
                     }
                 })
                 .then(res=>{
@@ -186,7 +183,7 @@
                     this.$router.go(0);
                 })
                 .catch(err=>{
-                    console.log('请求失败',err);
+                    // console.log('请求失败',err);
                 });
                 
             },
@@ -211,7 +208,7 @@
                     window.location.href = this.$url.web
                 })
                 .catch(err=>{
-                    console.log('请求失败',err)
+                    // console.log('请求失败',err)
                 })
             
             },
@@ -275,7 +272,6 @@
             //查看企业详情
             getEnterpriseInfo(d){
                 document.documentElement.scrollTop = 0;
-                // this.$router.push({path:'/details',query:{content:d}});
                 this.$router.push({path:'/details'});
                 window.sessionStorage.setItem('content',JSON.stringify(d))
             },

+ 7 - 9
frontend/saas-portal-web/src/components/conenter/enterprise.vue

@@ -20,9 +20,9 @@
                 <ul id="nav" class="nav navbar-nav menu">
                     <li><router-link to="/home"><a href="#"><span style="color: white">首页</span></a></router-link></li>
                     <li><a href="https://uas.usoftchina.com/about" target="_blank"><span>关于我们</span></a></li>
-                    <li>
+                    <li style="margin-left:30px">
                         <span style="color:#fff;font-size: 16px;">
-                            <img style="width: 24px;" src="/static/img/assets/denglu3x.png" alt="">
+                            <img style="width: 20px;" src="/static/img/assets/denglu3x.png" alt="">
                             {{mytoken.realname}}
                         </span>
                         <a href=""><span @click="loginout">【退出】</span></a>
@@ -124,8 +124,7 @@ import Session from '@/utils/session'
             }
         },
         mounted(){
-            console.log(window.frames[window.frames.length - 1])
-            console.log(window.frames.length)
+
         },
         methods: {
             // tab切换
@@ -144,9 +143,8 @@ import Session from '@/utils/session'
 </script>
 
 <style scoped>
-.navbar-inverse {
-    /* background-color: rgba(0, 0, 0, 0.77);
-    height: 70px;
-    line-height: 70px; */
-}
+    .div {
+        padding-top: 100px;
+        background: #FDFDFD;
+    }
 </style>

+ 16 - 18
frontend/saas-portal-web/src/components/conenter/home.vue

@@ -1,10 +1,5 @@
 <template>
     <div>
-      <div id="preloader" style="display:none">
-        <div class="loder-box">
-          <div class="battery"></div>
-        </div>
-      </div>
 		<div id="navigation" class="navbar-inverse navbar-fixed-top animated-header">
         <div class="container">
             <div class="navbar-header">
@@ -31,7 +26,7 @@
             <li><a href="#service"><span>功能</span></a></li>
             <!-- <li><a href="#prototype"><span>帮助中心</span></a></li> -->
             <li><a href="https://uas.usoftchina.com/about" target="_blank"><span>关于我们</span></a></li>
-            <li class="login" v-if="!account" style="margin-left: 20px;">
+            <li class="login" v-if="!account" style="margin-left: 30px;">
               <span @click="login"><img src="/static/img/assets/denglu3x.png" alt="">登录  &nbsp;</span>
               <span @click="register"><img src="/static/img/assets/zhuce3x.png" alt="">注册</span>
             </li>
@@ -66,14 +61,14 @@
       <div class="tiyan" v-if="isexperience">
         <img @click="Closeexperience" class="tc-on ty-out" src="/static/img/qiye/x.png" alt="" />
         <div><img class="ty-logo" src="/static/img/assets/dalogo@2x.png" alt=""></div>
-        <div><p class="ty-logotxt">欢迎你访问U企云服</p></div>
-        <div class="ty-title"><span>填写手机号后,即刻体验电子行业贸易版所有功能</span></div>
+        <!-- <div><p class="ty-logotxt">欢迎你访问U企云服</p></div> -->
+        <!-- <div class="ty-title"><span>填写手机号后,即刻体验电子行业贸易版所有功能</span></div> -->
         <div class="ty-phone over">
           <div class="left ty-input">
             <span><img style="margin: 6px 8px 10px 15px;" src="/static/img/assets/phone.png" alt=""></span>
             <input ref="typhone" type="text" placeholder="请输入您的11位手机号">
           </div>
-          <div class="left" style="margin-left: 8px;"><button @click="experience1">立即试用</button></div>
+          <div class="left" style="margin-left: 8px;"><button @click="experience1">立即体验</button></div>
         </div>
         <div style="text-align: left;">
           <span class="Caution" ref="Caution"></span>
@@ -308,7 +303,7 @@
 <script>
   import {subscribe, disconnect} from '@/api/socket'
   import Session from '@/utils/session'
-import { setTimeout } from 'timers';
+  import { setTimeout } from 'timers'
 
   export default {
     data() {
@@ -319,7 +314,7 @@ import { setTimeout } from 'timers';
         account: null,
         isexperience: false,
         arr: ["操作文档","常见手册"],
-        Nowindex: 0
+        Nowindex: 0,
       }
     },
     mounted() {
@@ -413,12 +408,15 @@ import { setTimeout } from 'timers';
         let reg = new RegExp('^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|(147))\\d{8}$')
         if (phone == '') {
           this.$refs.Caution.innerHTML = '号码不能为空'
+          setTimeout(()=>{
+            this.$refs.Caution.innerHTML = ''
+          },3000)
         } else {
           if (!reg.test(phone)) {
-            this.$refs.Caution.innerHTML = '号码格式错误'
-            // setTimeout(()=>{
-            //   this.$refs.Caution.innerHTML = ''
-            // },2000)
+            this.$refs.Caution.innerHTML = '请输入正确的手机号码'
+            setTimeout(()=>{
+              this.$refs.Caution.innerHTML = ''
+            },3000)
           } else {
             this.$refs.Caution.innerHTML = ''
             this.$ajax({
@@ -470,9 +468,9 @@ import { setTimeout } from 'timers';
   top: 50%;
   left: 50%;
 	width: 640px;
-	height: 320px;
+	height: 283px;
 	margin-left: -320px;
-  margin-top: -160px;
+  margin-top: -141px;
   z-index: 10001;
   background: white;
   padding: 24px;
@@ -485,7 +483,7 @@ import { setTimeout } from 'timers';
 }
 .ty-logo {
   width: 140px;
-  margin: 15px 0 10px 13px;
+  margin: 15px 0 50px 13px;
 }
 .ty-logotxt {
   font-family: PingFangSC-Regular;

+ 1 - 3
frontend/saas-portal-web/src/components/conenter/qiyexiangxi.vue

@@ -9,7 +9,6 @@
                 <div class="tc-conent"><img src="/static/img/qiye/buneng kaitong@1x.png" alt=""></div>
                 <div class="tc-text">
                 <p>您不是管理员不能修改企业信息</p>
-                <!-- <p>不能再继续开通服务</p> -->
                 </div>
             </div>
         </div>
@@ -96,7 +95,6 @@
         data(){
             return {
                 xiugai:true,
-                // content: this.$route.query.content,
                 content: JSON.parse(window.sessionStorage.getItem("content")),
                 Email: '',
                 mytoken: JSON.parse(localStorage.getItem('app-state-session')),//本地储存的用户信息
@@ -172,7 +170,7 @@
                     // this.isTipsmail = true;
                     setTimeout(()=>{
                         this.$refs.Tips.innerHTML= ""
-                    },2000)
+                    },3000)
                 }
             },
             //返回

+ 0 - 55
frontend/saas-portal-web/src/components/header/header.vue

@@ -1,55 +0,0 @@
-<template>
-    <div>
-        <!-- 页面加载loding -->
-        <!-- <div id="preloader">
-            <div class="loder-box">
-            	<div class="battery"></div>
-            </div>
-		</div> -->
-        <div id="navigation" class="navbar-inverse navbar-fixed-top animated-header">
-        <div class="container">
-            <div class="navbar-header">
-                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
-                    <span class="sr-only">Toggle navigation</span>
-                    <span class="icon-bar"></span>
-                    <span class="icon-bar"></span>
-                    <span class="icon-bar"></span>
-                </button>
-                <h1 class="navbar-brand">
-                    <a href="#">
-                        <img class="logo-img" src="../../../static/img/assets/dalogo3x.png" alt="">
-                    </a>
-                </h1>
-            </div>
-            <div class="collapse navbar-collapse navbar-right" role="navigation">
-                <ul id="nav" class="nav navbar-nav menu">
-                    <li><a href="#"><span>首页</span></a></li>
-                    <!-- <li @click= "home"><router-link to="/home"><a href="#"><span>首页</span></a></router-link></li> -->
-                    <!-- <li><a href="#feature"><span>特色</span></a></li> -->
-                    <li @click= "home"><router-link to="/enterprise"><a href="#"><span>特色</span></a></router-link></li>
-                    <li><a href="#service"><span>功能</span></a></li>
-                    <li><a href="#prototype"><span>帮助中心</span></a></li>
-                    <li><a href="#prototype"><span>联系我们</span></a></li>
-                    <li class="login">
-                        <span class="btn1"><img src="../../../static/img/assets/denglu3x.png" alt="">登录  &nbsp;</span>
-                        <span class="register"><img src="../../../static/img/assets/zhuce3x.png" alt="">注册</span>
-                    </li>
-                </ul>
-            </div>
-        </div>
-        </div>
-    </div>
-</template>
-<script>
-    export default {
-        methods:{
-            home(){
-                document.documentElement.scrollTop = 0;
-            }
-        }
-    }
-</script>
-
-<style>
-
-</style>

+ 0 - 2
frontend/saas-portal-web/src/main.js

@@ -1,5 +1,3 @@
-// The Vue build version to load with the `import` command
-// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
 
 import Vue from 'vue'
 import App from './App'

+ 0 - 4
frontend/saas-portal-web/static/css/gongsi.css

@@ -1,7 +1,3 @@
-.div {
-    padding-top: 100px;
-    background: #FDFDFD;
-}
 .xs:hover {
     cursor:pointer;
     border-bottom: 1px solid #2868c8;

+ 2 - 47
frontend/saas-portal-web/static/css/main.css

@@ -1,14 +1,3 @@
-/**
-*
-* ---------------------------------------------------------------------------
-*
-* Template : Blue - A One-Page HTML Portfolio/Business Template
-* Author : Muhammad Morshd
-* Author URI : http://morshed.im
-*
-* ---------------------------------------------------------------------------
-*
-*/
 
 /* =================================== */
 /*	Basic Style
@@ -79,8 +68,7 @@ main > section {
     background-color: #0aa6bd;
 }
 .logo-img {
-    width: 123px;
-    height: 50px;
+    width: 120px;
     margin-top: -4px;
 }
 /* 遮罩 */
@@ -95,9 +83,6 @@ main > section {
     z-index: 10000;
 }
 /* 登录弹窗 */
-/* input {
-    outline: none;
-} */
 .tishi {
     font-size: 12px;
     color: #FF6A1A;
@@ -283,7 +268,7 @@ main > section {
    margin: 0 15px;
 }
 .login img,.profile img {
-    width: 24px;
+    width: 20px;
     margin-right: 5px;
 }
 .login > span:hover,.profile > span:hover{
@@ -325,30 +310,9 @@ main > section {
     position: absolute;
     top: 76%;
     left: 7%;
-    /* z-index: 5; */
-    /* width: 468px;
-    height: 300px; */
-}
-.sy-dianzi {
-    width: 100%;
-    height: 50px;
-}
-.sy-mb {
-    margin-bottom: 25px;
-}
-.sy-mb img{
-    width: 100px;
-    height: 36px;
-}
-.sy-mbimg2 {
-    width: 150px !important;
-}
-.sy-mb>img:nth-child(2) {
-    margin-left: 15px;
 }
 .my-tiyan {
     background: #5172DD;
-    /* box-shadow: 0 0 19px 0 rgba(137,143,164,0.63); */
     border-radius: 4px;
     width: 100px;
     height: 36px;
@@ -357,15 +321,6 @@ main > section {
     color: #FFFFFF;
     border: 0;
 }
-.chrw {
-    width: 486px;
-    height: 508px;
-}
-.sy-img {
-    position: absolute;
-    top: 100px;
-    right: 130px;
-}
 /* 特色 .......................................*/
 .ts-worp {
     width: 100%;

+ 0 - 9
frontend/saas-portal-web/static/js/mains.js

@@ -13,20 +13,15 @@ jQuery(window).load(function(){
 /* ========================================================================= */
 
 $(function() {
-
     var Page = (function() {
-
         var $navArrows = $( '#nav-arrows' ),
             $nav = $( '#nav-dots > span' ),
             slitslider = $( '#slider' ).slitslider( {
                 onBeforeChange : function( slide, pos ) {
-
                     $nav.removeClass( 'nav-dot-current' );
                     $nav.eq( pos ).addClass( 'nav-dot-current' );
-
                 }
             } ),
-
             init = function() {
                 initEvents();
             },
@@ -36,7 +31,6 @@ $(function() {
                     slitslider.next();
                     return false;
                 } );
-
                 $navArrows.children( ':first' ).on( 'click', function() {
                     slitslider.previous();
                     return false;
@@ -59,7 +53,6 @@ $(function() {
 });
 
 
-
 $(document).ready(function(){
     /* ========================================================================= */
     /*  Portfolio
@@ -135,8 +128,6 @@ $(document).ready(function(){
     //     $('#home-slider, #slider, .sl-slider, .sl-content-wrapper').css('height',slideHeight);
     // });
 	
-	
-	
 	$("#works, #testimonial").owlCarousel({	 
 		navigation : true,
 		pagination : false,