Browse Source

Merge branch 'release-201846-wangcz'

# Conflicts:
#	.babelrc
#	nuxt.config.js
#	package.json
wangcz 7 years ago
parent
commit
1b0824299d

+ 1 - 1
components/appeal/AccountAppeal.vue

@@ -219,7 +219,7 @@
           this.contactEmailChecked = false
         } else {
           if (this.account.contactEmail !== '') {
-            var reg = /^([\w-])+(\.\w+)*@([\w-])+((\.\w{2,3}){1,3})$/
+            var reg = /@/
             if (!reg.test(value)) {
               callback(new Error('请输入正确的邮箱地址格式'))
               this.contactEmailChecked = false

+ 1 - 1
components/appeal/ChangeManagerAppeal.vue

@@ -337,7 +337,7 @@
           this.contactEmailChecked = false
         } else {
           if (this.changeManager.contactEmail !== '') {
-            var reg = /^([\w-])+(\.\w+)*@([\w-])+((\.\w{2,3}){1,3})$/
+            var reg = /@/
             if (!reg.test(value)) {
               callback(new Error('请输入正确的邮箱地址格式'))
               this.contactEmailChecked = false

+ 1 - 1
components/appeal/PasswordRestAppeal.vue

@@ -307,7 +307,7 @@
           this.contactEmailChecked = false
         } else {
           if (this.passwordRest.contactEmail !== '') {
-            var reg = /^([\w-])+(\.\w+)*@([\w-])+((\.\w{2,3}){1,3})$/
+            var reg = /@/
             if (!reg.test(value)) {
               callback(new Error('请输入正确的邮箱地址格式'))
               this.contactEmailChecked = false

+ 5 - 3
components/default/CloudHeader.vue

@@ -4,16 +4,15 @@
       <div class="navbar-container container">
         <div class="navbar-header">
           <a href="http://www.usoftchina.com" class="item navbar-link">
-            <img src="/images/logo/uas.png" class="navbar-logo">
+            <img src="/images/logo/uas.png" class="navbar-logo"> | &nbsp;&nbsp; 云中心
           </a>
-          <a href=""><span class="navbar-slogan">云中心</span></a>
         </div>
         <ul class="nav nav-pills f-nav">
           <li>
             <nuxt-link to="/cloudcenter" class="menu-item" exact>基本信息</nuxt-link>
           </li>
           <li>
-            <nuxt-link to="/cloudcenter/enterprise" class="menu-item">企业管理</nuxt-link>
+            <nuxt-link to="/cloudcenter/enterprise" class="menu-item">员工管理</nuxt-link>
           </li>
         </ul>
       </div>
@@ -208,6 +207,9 @@
   .navbar-logo {
     margin-bottom: 2px;
   }
+    .navbar-link {
+      font-size:14px;
+    }
 
   .navbar-slogan {
     margin-left: $sm-pad;

+ 1 - 1
components/mobile/changeManager/StepAppeal.vue

@@ -440,7 +440,7 @@
       },
       // 验证邮箱
       validateContactEmail () {
-        let reg = /^([\w-])+(\.\w+)*@([\w-])+((\.\w{2,3}){1,3})$/
+        let reg = /@/
         if (!this.valid.contactEmail) {
           this.downToast('请填写联系电子邮箱')
           this.state.contactEmail = 'error'

+ 2 - 2
components/mobile/cloudcenter/cloudCenter.vue

@@ -3,8 +3,8 @@
     <div class="box-header"><img src="/images/all/uas-m.png" alt="">账号中心</div>
     <div class="w-over-box">
       <div class="basic-nav">
-        <span @click="activeTab = 0" :class="{active: activeTab === 0}">个人账号信息<em></em></span>
-        <span @click="activeTab = 1" :class="{active: activeTab === 1}" v-show="user.userspace">绑定企业信息<em></em></span>
+        <span @click="activeTab = 0" :class="{active: activeTab === 0}">个人信息<em></em></span>
+        <span @click="activeTab = 1" :class="{active: activeTab === 1}" v-show="user.userspace">企业信息<em></em></span>
       </div>
       <div class="basic-info" v-show="activeTab === 0">
         <div class="basic-top">

+ 1 - 1
components/mobile/registerEnterprise/index.vue

@@ -416,7 +416,7 @@
       },
       // 验证邮箱
       validateEmail () {
-        let reg = /^([\w-])+(\.\w+)*@([\w-])+((\.\w{2,3}){1,3})$/
+        let reg = /@/
         if (this.step2.email) {
           if (!reg.test(this.step2.email)) {
             this.downToast('请输入正确的邮箱地址格式')

+ 1 - 1
components/mobile/reset/stepAppeal.vue

@@ -286,7 +286,7 @@
         },
         // 验证邮箱
         validateContactEmail () {
-          let reg = /^([\w-])+(\.\w+)*@([\w-])+((\.\w{2,3}){1,3})$/
+          let reg = /@/
           if (!this.valid.contactEmail) {
             this.downToast('请填写联系电子邮箱')
             this.state.contactEmail = 'error'

+ 1 - 1
components/mobile/validation/StepAppeal.vue

@@ -266,7 +266,7 @@
       },
       // 验证邮箱
       validateContactEmail () {
-        let reg = /^([\w-])+(\.\w+)*@([\w-])+((\.\w{2,3}){1,3})$/
+        let reg = /@/
         if (!this.valid.contactEmail) {
           this.downToast('请填写联系电子邮箱')
           this.state.contactEmail = 'error'

+ 1 - 1
components/mobile/validation/ValidationEmailStepNew.vue

@@ -47,7 +47,7 @@
       },
       // 验证邮箱号
       validateEmail () {
-        let reg = /^([\w-])+(\.\w+)*@([\w-])+((\.\w{2,3}){1,3})$/
+        let reg = /@/
         if (!this.valid.email) {
           this.downToast('请先填写邮箱号')
           this.state.email = 'error'

+ 1 - 1
components/register/EnterpriseRegistration.vue

@@ -449,7 +449,7 @@
           this.emailHasRegister = false
         } else {
           if (this.enterprise1.email) {
-            var reg = /^([\w-])+(\.\w+)*@([\w-])+((\.\w{2,3}){1,3})$/
+            var reg = /@/
             if (!reg.test(value)) {
               callback(new Error('请输入正确的邮箱地址格式'))
               this.emailChecked = false

+ 1 - 1
components/register/EnterpriseRegistrationSecondStep.vue

@@ -246,7 +246,7 @@
             this.emailChecked = false
           } else {
             if (this.enterprise1.email) {
-              var reg = /^([\w-])+(\.\w+)*@([\w-])+((\.\w{2,3}){1,3})$/
+              var reg = /@/
               if (!reg.test(value)) {
                 callback(new Error('请输入正确的邮箱地址格式'))
                 this.emailChecked = false

+ 1 - 1
components/validation/EmailStepNew.vue

@@ -50,7 +50,7 @@
           this.emailSecondChecked = false
         } else {
           if (this.valid2.email !== '') {
-            var reg = /^([\w-])+(\.\w+)*@([\w-])+((\.\w{2,3}){1,3})$/
+            var reg = /@/
             if (!reg.test(value)) {
               callback(new Error('请填写正确的邮箱号'))
               this.emailSecondChecked = false

+ 72 - 34
nuxt.config.js

@@ -44,6 +44,43 @@ module.exports = {
       config.resolve.alias['~assets'] = path.join(__dirname, 'assets')
       config.resolve.alias['~plugins'] = path.join(__dirname, 'plugins')
       config.resolve.alias['~store'] = path.join(__dirname, 'store')
+     ** Run ESLINT on save
+     */
+    extractCSS: {
+      allChunks: true
+    },
+    extend(config, {
+      dev,
+      isClient,
+      isServer
+    }) {
+      Object.assign(config.resolve.alias, {
+        '~utils': path.resolve(__dirname, 'utils'),
+        '~components': path.join(__dirname, 'components'),
+        '~assets': path.join(__dirname, 'assets'),
+        '~plugins': path.join(__dirname, 'plugins'),
+        '~store': path.join(__dirname, 'store')
+      })
+
+      // nuxt ^2.00 版本后,webpack HtmlWebpackPlguin插件打包 会存在htlm5不能转换的问题
+      // 已经命令是将 该插件 压缩部分进行重新处理
+      for (let i = 0; i < config.plugins.length; i++) {
+        if (config.plugins[i] && config.plugins[i].options && config.plugins[i].options.minify) {
+          config.plugins[i].options.minify = {
+            removeAttributeQuotes: true,
+            collapseWhitespace: true,
+            html5: true,
+            minifyCSS: true,
+            removeComments: true,
+            removeEmptyAttributes: true,
+          }
+        }
+      }
+      // config.resolve.alias['~utils'] = path.join(__dirname, 'utils')
+      // config.resolve.alias['~components'] = path.join(__dirname, 'components')
+      // config.resolve.alias['assets'] = path.join(__dirname, './assets')
+      // config.resolve.alias['~plugins'] = path.join(__dirname, 'plugins')
+      // config.resolve.alias['~store'] = path.join(__dirname, 'store')
       // config.module.rules.push({
       //   test: /\.scss$/,
       //   loader: 'vue-style-loader!css-loader!sass-loader'
@@ -69,22 +106,22 @@ module.exports = {
       'vee-validate'
     ],
     babel: {
-      presets: ['es2015', 'stage-2'],
-      plugins: [
-        'transform-async-to-generator',
-        'transform-runtime'
-      ],
-      comments: true
-    },
-    postcss: [
-      require('autoprefixer')({
-        browsers: ['last 3 versions']
-      })
-    ]
+      presets: ['@nuxt/babel-preset-app']
+    }
+    // postcss: [
+    //   require('autoprefixer')({
+    //     browsers: ['last 3 versions']
+    //   })
+    // ]
   },
-  css: [
-    {src: '~assets/scss/mobileCommon.scss', lang: 'scss'},
-    {src: '~assets/scss/app.scss', lang: 'scss'}
+  css: [{
+      src: '~assets/scss/mobileCommon.scss',
+      lang: 'scss'
+    },
+    {
+      src: '~assets/scss/app.scss',
+      lang: 'scss'
+    }
   ],
   dev: !isProdMode,
   env: {
@@ -94,26 +131,27 @@ module.exports = {
     // {
     //   src: '~plugins/axios-nuxt.js'
     // },
-  //   {
-  //   src: '~plugins/axios.js'
-  // },
+    //   {
+    //   src: '~plugins/axios.js'
+    // },
     {
-    src: '~plugins/element-ui.js'
-  }, {
-    src: '~plugins/mint-ui.js'
-  }, {
-    src: '~plugins/filters.js',
-    ssr: false
-  }, {
-    src: '~plugins/jsonp.js',
-    ssr: false
-  }, {
-    src: '~plugins/vuerify.js',
-    ssr: false
-  }, {
-    src: '~plugins/vee-validate.js',
-    ssr: true
-  }],
+      src: '~plugins/element-ui.js'
+    }, {
+      src: '~plugins/mint-ui.js'
+    }, {
+      src: '~plugins/filters.js',
+      ssr: false
+    }, {
+      src: '~plugins/jsonp.js',
+      ssr: false
+    }, {
+      src: '~plugins/vuerify.js',
+      ssr: false
+    }, {
+      src: '~plugins/vee-validate.js',
+      ssr: true
+    }
+  ],
   /* TODO 代理 */
   proxyTable: ['/api/**', '/login/**', '/user**', '/logout**', '/sso/**', '/appeal/**', '/update/user/**', '/valid/**', '/im/**', '/weChat/**', '/bh/**', '/foreign/**']
 }

+ 19 - 4
pages/cloudcenter/enterprise/index.vue

@@ -7,7 +7,7 @@
           <div class="table-list">
             <div class="table-top">
               <h3>成员列表</h3>
-              <a class="btn-us-apply" @click="user.userspace.admin.userUU === user.user.userUU ? toggle = !toggle : isToggleDialogVisible = true">申请列表</a>
+              <a class="btn-us-apply" @click="toggleClick(true)">申请列表</a>
             </div>
             <table class="table table-striped" v-if="member.content.length !== 0">
               <thead>
@@ -42,7 +42,7 @@
           <div class="table-list">
             <div class="table-top">
               <h3>申请列表</h3>
-              <a class="btn-us-member" @click="toggle = !toggle">成员列表</a>
+              <a class="btn-us-member" @click="toggleClick(false)">成员列表</a>
             </div>
             <table class="table table-striped" v-if="apple.content.length !== 0">
               <thead>
@@ -146,6 +146,19 @@
       }
     },
     methods: {
+      toggleClick (type) {
+        if(type) {
+          if(this.user.userspace.admin.userUU === this.user.user.userUU) {
+            this.toggle = !this.toggle
+            this.handleApplyChange(1)
+          } else {
+            this.isToggleDialogVisible = true
+          }
+        } else {
+          this.toggle = !this.toggle
+          this.handleMemberChange(1)
+        }
+      },
       bingEnterpriseClick: function () {
         window.location.href = '/bindEnterPrise/' + this.user.user.userUU
       },
@@ -170,7 +183,8 @@
           this.$http.post('/sso/center/agree/apply', param, config)
             .then(res => {
               if (res.data.success) {
-                this.handleApplyChange()
+                this.page = 1
+                this.handleApplyChange(1)
                 this.$message({
                   message: '操作成功',
                   type: 'success'
@@ -184,7 +198,8 @@
           this.$http.post('/sso/center/disagree/apply', param, config)
             .then(res => {
               if (res.data.success) {
-                this.handleApplyChange()
+                this.page = 1
+                this.handleApplyChange(1)
                 this.$message({
                   message: '操作成功',
                   type: 'success'

+ 3 - 3
pages/cloudcenter/index.vue

@@ -8,8 +8,8 @@
       <div class="w-over-box">
         <div class="container">
           <div class="basic-nav">
-            <span @click="activeTab = 0" :class="{active: activeTab === 0}">个人账号信息<em></em></span>
-            <span @click="activeTab = 1" :class="{active: activeTab === 1}" v-show="user.userspace">绑定企业信息<em></em></span></div>
+            <span @click="activeTab = 0" :class="{active: activeTab === 0}">个人信息<em></em></span>
+            <span @click="activeTab = 1" :class="{active: activeTab === 1}" v-show="user.userspace">企业信息<em></em></span></div>
           <div class="basic-info" v-show="activeTab === 0">
             <div class="basic-top">
               <div class="line">
@@ -303,7 +303,7 @@
           content: '';
           position: absolute;
           bottom: 0;
-          left: 30px;
+          left: 15px;
           width: 52px;
           height: 6px;
           background: transparent ;

+ 1 - 0
server.js

@@ -1,3 +1,4 @@
+require("@babel/polyfill");
 const { Nuxt, Builder } = require('nuxt')
 const app = require('express')()
 const proxy = require('http-proxy-middleware')

File diff suppressed because it is too large
+ 464 - 568
yarn.lock


Some files were not shown because too many files changed in this diff