jinx 4 лет назад
Родитель
Сommit
253a9c7c2d

+ 2 - 2
pc/src/App.vue

@@ -1,6 +1,6 @@
 <template>
-  <div id="app" :style="{transform:scale!==1 && gre150? `scale(${scale})`:'none','paddingTop':deviceLogin?'0px':'80px'}">
-  <!-- <div id="app"> -->
+  <!-- <div id="app" :style="{transform:scale!==1 && gre150? `scale(${scale})`:'none','paddingTop':deviceLogin?'0px':'80px'}"> -->
+  <div id="app">
     <router-view />
   </div>
 </template>

+ 1 - 1
pc/src/lang/en/modules/login.js

@@ -18,7 +18,7 @@ module.exports = {
   'rePassword': 'Enter password again',
   'cluse': 'I have read 《4DKanKan User Agreement》',
   'findPassword': 'Password Reset',
-  'emailPlaceholder': 'Please enter your email address or Phone Number',
+  'emailPlaceholder': 'Please enter your email address',
   'hasAccount': 'Already had an account, ',
   'zhijieLogin': 'Log in Now',
   'resendTime': '{time}s resend',

+ 1 - 1
pc/src/lang/zh/modules/login.js

@@ -19,7 +19,7 @@ module.exports = {
   cluse: '我已阅读并同意《四维看看用户协议》',
   findPassword: '找回密码',
   // emailPlaceholder: '请输入邮箱地址',
-  emailPlaceholder: '请输入邮箱地址或者手机号码',
+  emailPlaceholder: '请输入邮箱地址',
   hasAccount: '已有账号,',
   zhijieLogin: '直接登录',
   resendTime: '{time}s后重新发送',

+ 3 - 0
pc/src/page/layout/aside/index.vue

@@ -88,6 +88,9 @@ export default {
     }
   },
   mounted () {
+    // if (this.login) {
+    //   this.$router.replace('/information')
+    // }
     this.sizeHandle()
     this.$bus.$on('openClause', data => {
       this.openClause = data.show

+ 3 - 3
pc/src/page/login/components/forget/index.vue

@@ -28,7 +28,7 @@ export default {
       return this.$t('login.findPassword')
     },
     page () {
-      return this.isInternational ? 'email' : 'phone'
+      return this.isInternational ? 'email' : 'email'
     }
   },
   methods: {
@@ -48,6 +48,6 @@ export default {
     color: #202020;
     font-weight: bold;
   }
-  
+
 }
-</style>
+</style>

+ 16 - 2
pc/src/page/login/index.vue

@@ -36,6 +36,8 @@
           <h-icon type="xingouwuche" class="icon" />
           <span v-if="cartCount">{{cartCount}}</span>
         </div> -->
+
+    <div class="copyright">Copyright ©  2021 Falcon Visual.All rights reserved.</div>
     </div>
   </div>
 </template>
@@ -87,9 +89,18 @@ export default {
 </script>
 
 <style lang="scss">
+.copyright{
+  font-size: 14px;
+  color:#666;
+  position: fixed;
+  left: 50%;
+  transform: translateX(-50%);
+  bottom: 20px;
+}
 .login-page {
   width: 100%;
-  height: calc(100vh - 80px);
+  // height: calc(100vh - 80px);
+  height: 100vh;
   background: url(~@/assets/images/refactor/login/login-bg.jpg) no-repeat center
     center;
   .login-container {
@@ -154,6 +165,8 @@ export default {
 .language-w {
   .header-item {
     margin-right: 20px !important;
+    display: inline-block;
+    height: 100px;
     // position: absolute;
     // top: 50px;
     // right: 200px;
@@ -193,7 +206,7 @@ export default {
   }
   .header-item {
     width: 100%;
-    height: 100%;
+    height: 100px
   }
   .header-item:hover,
   .header-item.is-hover {
@@ -225,6 +238,7 @@ export default {
   box-shadow: 0px -2px 6px rgba(113, 113, 113, 0.16);
   margin-top: -10px;
   left: 50%;
+  top: 50px;
   transform: translateX(-50%);
   z-index: 0;
   display: none;

+ 2 - 2
pc/src/page/manage/temp/device.vue

@@ -63,9 +63,9 @@
                       <span class="spot"></span>
                     </div>
                     <ul :style="{minWidth: language==='en'?'150px': '90px'}">
-                      <li @click="$router.push({name:'introduce',params:{id:item.childName}})">
+                      <!-- <li @click="$router.push({name:'introduce',params:{id:item.childName}})">
                         {{langDevices.capacity}}
-                      </li>
+                      </li> -->
                       <li @click="unbind(item)">{{langDevices.unbind}}</li>
                       <li v-if="item.status !== 0" @click="handleCooperation(item)">{{langDevices.fenpei}}</li>
                     </ul>

+ 138 - 119
pc/src/page/manage/temp/information.vue

@@ -1,12 +1,6 @@
 <template>
   <div class="info-layout">
-    <edit
-      :name="langAccount.info"
-      @clickOper="handleOper('infoStatus')"
-      :oper="infoStatus?langAccount.edit:langAccount.show"
-      :isActive="infoStatus"
-      class=""
-    >
+    <edit :name="langAccount.info" @clickOper="handleOper('infoStatus')" :oper="infoStatus?langAccount.edit:langAccount.show" :isActive="infoStatus" class="">
       <div class="info" :class="{'info-en':language==='en'}" slot="show">
         <div class="s-tx">
           <p>{{langAccount.avatar}}</p>
@@ -21,7 +15,7 @@
           <div class="i-tx">
             <p>{{langAccount.avatar}}</p>
             <div class="itx-con">
-            <div class="card-img avatar" :style="{backgroundImage: info.head?`url(${info.head})`:'#e6e6e6'}"></div>
+              <div class="card-img avatar" :style="{backgroundImage: info.head?`url(${info.head})`:'#e6e6e6'}"></div>
               <div class="btn choose">
                 <input class="el-upload" ref="uploadInput" name="file" type="file" @change="update" alt="sadasdasd">
                 <span>{{langAccount.select}}</span>
@@ -32,25 +26,11 @@
           <p><span>{{langAccount.account}}</span><span>{{info.userName}}</span></p>
           <p>
             <span>{{langAccount.nickname}}</span>
-            <input
-              autofocus
-              v-model="editinfo.nickName"
-              :placeholder="langAccount.placeholder.nickname"
-              class="nickname"
-              maxlength="10"
-              type="text"
-            >
+            <input autofocus v-model="editinfo.nickName" :placeholder="langAccount.placeholder.nickname" class="nickname" maxlength="10" type="text">
           </p>
           <p>
             <span>{{langAccount.email}}</span>
-            <input
-              autofocus
-              v-model="editinfo.email"
-              :placeholder="langAccount.placeholder.email"
-              class="nickname"
-              maxlength="40"
-              type="text"
-            >
+            <input autofocus v-model="editinfo.email" :placeholder="langAccount.placeholder.email" class="nickname" maxlength="40" type="text">
           </p>
           <!-- <label class="check-con" @click="isReceive=!isReceive">
             <span class="check-box">
@@ -123,46 +103,58 @@ export default {
   components: { edit, citySelect },
   computed: {
     ...mapState({
-      info: state => state.user.info,
-      langAccount: state => state.language.home.manage.account,
-      language: state => state.language.current,
-      langToast: state => state.language.home.toast,
-      editinfo: state => cloneObj(state.user.info),
-      token: state => state.user.token,
-      invoice2: state => {
+      info: (state) => state.user.info,
+      langAccount: (state) => state.language.home.manage.account,
+      language: (state) => state.language.current,
+      langToast: (state) => state.language.home.toast,
+      editinfo: (state) => cloneObj(state.user.info),
+      token: (state) => state.user.token,
+      invoice2: (state) => {
         let type = Object.prototype.toString.call(state.user.invoice2)
         if (type === '[object Object]') {
           return state.user.invoice2
         }
-        let condition = state.user.invoice2 && state.user.invoice2 !== 'null' && type !== '[object Array]'
-        return (condition ? JSON.parse(state.user.invoice2) : {})
+        let condition =
+          state.user.invoice2 &&
+          state.user.invoice2 !== 'null' &&
+          type !== '[object Array]'
+        return condition ? JSON.parse(state.user.invoice2) : {}
       },
-      editInvoice2: state => {
+      editInvoice2: (state) => {
         let type = Object.prototype.toString.call(state.user.invoice2)
         if (type === '[object Object]') {
           return state.user.invoice2
         }
-        let condition = state.user.invoice2 && state.user.invoice2 !== 'null' && type !== '[object Array]'
+        let condition =
+          state.user.invoice2 &&
+          state.user.invoice2 !== 'null' &&
+          type !== '[object Array]'
         return cloneObj(condition ? JSON.parse(state.user.invoice2) : {})
       },
-      invoice3: state => {
+      invoice3: (state) => {
         let type = Object.prototype.toString.call(state.user.invoice3)
         if (type === '[object Object]') {
           return state.user.invoice3
         }
-        let condition = state.user.invoice3 && state.user.invoice3 !== 'null' && type !== '[object Array]'
-        return (condition ? JSON.parse(state.user.invoice3) : {})
+        let condition =
+          state.user.invoice3 &&
+          state.user.invoice3 !== 'null' &&
+          type !== '[object Array]'
+        return condition ? JSON.parse(state.user.invoice3) : {}
       },
-      editInvoice3: state => {
+      editInvoice3: (state) => {
         let type = Object.prototype.toString.call(state.user.invoice3)
         if (type === '[object Object]') {
           return state.user.invoice3
         }
-        let condition = state.user.invoice3 && state.user.invoice3 !== 'null' && type !== '[object Array]'
+        let condition =
+          state.user.invoice3 &&
+          state.user.invoice3 !== 'null' &&
+          type !== '[object Array]'
         return cloneObj(condition ? JSON.parse(state.user.invoice3) : {})
       },
-      address: state => state.user.address || {},
-      editAdd: state => cloneObj(state.user.address) || {}
+      address: (state) => state.user.address || {},
+      editAdd: (state) => cloneObj(state.user.address) || {}
     })
   },
   data () {
@@ -191,29 +183,31 @@ export default {
       if (this.editinfo.email.trim() && !reg.email.test(this.editinfo.email)) {
         return this.$toast.show('warn', this.langToast['8'])
       }
-      let res = await this.$http
-        .post(
-          '/user/updateUserDetail',
-          {
-            nickName: this.editinfo.nickName,
-            email: this.editinfo.email || null,
-            isNotice: Number(this.isReceive)
-          },
-          {
-            headers: {
-              token: this.token
-            }
+      let res = await this.$http.post(
+        '/user/updateUserDetail',
+        {
+          nickName: this.editinfo.nickName,
+          email: this.editinfo.email || null,
+          isNotice: Number(this.isReceive)
+        },
+        {
+          headers: {
+            token: this.token
           }
-        )
+        }
+      )
       let data = res.data
       if (data.code === 0) {
         this.infoStatus = true
-        this.$store.dispatch('getInfo', {url: '/user/getUserInfo', name: 'info'})
+        this.$store.dispatch('getInfo', {
+          url: '/user/getUserInfo',
+          name: 'info'
+        })
       } else {
         this.$toast.show('warn', this.langToast[data.code], async () => {
           if (data.code === 3004) {
             await this.$store.dispatch('logout')
-            this.$router.push({name: 'home'})
+            this.$router.push({ name: 'home' })
           }
         })
       }
@@ -225,10 +219,14 @@ export default {
       }
       let params = {}
       let invoiceType = ''
-      let check = value => {
+      let check = (value) => {
         for (let i = 0, len = value.length; i < len; i++) {
           if (!value[i].val) {
-            return this.$toast.show('warn', (this.language === 'en' ? value[i].En : value[i].name) + this.langToast['7'])
+            return this.$toast.show(
+              'warn',
+              (this.language === 'en' ? value[i].En : value[i].name) +
+                this.langToast['7']
+            )
           }
         }
         return true
@@ -259,7 +257,14 @@ export default {
           return
         }
       } else {
-        let {title: title1, code: code1, organizedAddress: organizedAddress1, registerPhone: registerPhone1, bankName: bankName1, bankAccount: bankAccount1} = this.editInvoice3
+        let {
+          title: title1,
+          code: code1,
+          organizedAddress: organizedAddress1,
+          registerPhone: registerPhone1,
+          bankName: bankName1,
+          bankAccount: bankAccount1
+        } = this.editInvoice3
         invoiceType = 3
 
         let title = isObject(title1)
@@ -321,7 +326,7 @@ export default {
             token: this.token
           }
         })
-        .then(data => {
+        .then((data) => {
           this.invoiceStatus = true
           this.$store.dispatch('getInvoice', {
             type: invoiceType,
@@ -345,10 +350,14 @@ export default {
         id
       } = this.editAdd
 
-      let check = value => {
+      let check = (value) => {
         for (let i = 0, len = value.length; i < len; i++) {
           if (!value[i].val) {
-            return this.$toast.show('warn', (this.language === 'en' ? value[i].En : value[i].name) + this.langToast['7'])
+            return this.$toast.show(
+              'warn',
+              (this.language === 'en' ? value[i].En : value[i].name) +
+                this.langToast['7']
+            )
           }
         }
         return true
@@ -390,7 +399,7 @@ export default {
             token: this.token
           }
         })
-        .then(data => {
+        .then((data) => {
           this.addressStatus = true
           this.$store.dispatch('getInfo', {
             url: '/user/getReceiverInfo',
@@ -400,26 +409,34 @@ export default {
     },
     update (e) {
       let file = e.target.files[0]
-      let type = file.type.toLowerCase()
-      if (type !== 'image/jpeg' && type !== 'image/png') {
-        return this.$toast.show('warn', this.langToast['36'])
-      }
+      try {
+        let type = file.type.toLowerCase()
+        console.log(file.size / 1000)
+        if (type !== 'image/jpeg' && type !== 'image/png') {
+          return this.$toast.show('warn', this.langToast['36'])
+        }
+        if (file.size / 1000 > 1024) {
+          return this.$toast.show('warn', this.langToast['46'])
+        }
 
-      let token = this.token
-      let config = {
-        headers: {
-          token
+        let token = this.token
+        let config = {
+          headers: {
+            token
+          }
+        } // 添加请求头
+        var reader = new FileReader()
+        reader.onload = async (e) => {
+          let imgdata = e.target.result
+          this.$http
+            .post('/user/uploadHead', { imgdata }, config)
+            .then((data) => {
+              this.info.head = data.data.msg
+              localStorage.setItem('info', JSON.stringify(this.info))
+            })
         }
-      } // 添加请求头
-      var reader = new FileReader()
-      reader.onload = async e => {
-        let imgdata = e.target.result
-        this.$http.post('/user/uploadHead', { imgdata }, config).then(data => {
-          this.info.head = data.data.msg
-          localStorage.setItem('info', JSON.stringify(this.info))
-        })
-      }
-      reader.readAsDataURL(file)
+        reader.readAsDataURL(file)
+      } catch (err) {}
     }
   },
   watch: {},
@@ -428,18 +445,20 @@ export default {
       url: '/user/getReceiverInfo',
       name: 'address'
     })
-    Object.keys(this.invoice2).length === 0 && this.$store.dispatch('getInvoice', {
-      type: 2,
-      params: {
-        invoiceType: 2
-      }
-    })
-    Object.keys(this.invoice3).length === 0 && this.$store.dispatch('getInvoice', {
-      type: 3,
-      params: {
-        invoiceType: 3
-      }
-    })
+    Object.keys(this.invoice2).length === 0 &&
+      this.$store.dispatch('getInvoice', {
+        type: 2,
+        params: {
+          invoiceType: 2
+        }
+      })
+    Object.keys(this.invoice3).length === 0 &&
+      this.$store.dispatch('getInvoice', {
+        type: 3,
+        params: {
+          invoiceType: 3
+        }
+      })
   }
 }
 </script>
@@ -481,7 +500,7 @@ export default {
     height: 26px;
     font-size: 12px;
     margin: 12px 0 20px;
-    &:hover{
+    &:hover {
       background: #1fe4dc;
     }
   }
@@ -499,7 +518,7 @@ export default {
       color: #a0a0a0;
       line-height: 24px;
     }
-    .card-img{
+    .card-img {
       font-size: 0;
       display: inline-block;
       cursor: pointer;
@@ -520,37 +539,37 @@ export default {
     }
   }
 
-  .info{
-    .s-tx{
+  .info {
+    .s-tx {
       position: relative;
-      &>p{
+      & > p {
         position: absolute;
         left: 0;
         top: 0;
       }
-      .avatar{
-        margin-left: 80px
+      .avatar {
+        margin-left: 80px;
       }
     }
-    p{
-      span{
+    p {
+      span {
         display: inline-block;
-        &:first-of-type{
+        &:first-of-type {
           width: 80px;
         }
       }
     }
   }
 
-  .info-en{
-    .s-tx{
-      .avatar{
+  .info-en {
+    .s-tx {
+      .avatar {
         margin-left: $info-width;
       }
     }
-    p{
-      span{
-        &:first-of-type{
+    p {
+      span {
+        &:first-of-type {
           width: $info-width;
         }
       }
@@ -560,18 +579,18 @@ export default {
   .edit-info {
     display: flex;
     .info-left {
-      &>p{
+      & > p {
         margin: 10px 0;
       }
       min-width: 210px;
-      .i-tx{
+      .i-tx {
         position: relative;
-        &>p{
+        & > p {
           position: absolute;
           left: 0;
           top: 0;
         }
-        .itx-con{
+        .itx-con {
           margin-left: 80px;
           font-size: 14px;
         }
@@ -601,10 +620,10 @@ export default {
     }
   }
 
-  .edit-en{
-     .info-left {
-      .i-tx{
-        .itx-con{
+  .edit-en {
+    .info-left {
+      .i-tx {
+        .itx-con {
           margin-left: $info-width;
         }
       }
@@ -665,7 +684,7 @@ export default {
 }
 @media screen and (min-width: 2000px) {
   .edit-layout {
-    max-width: 75%!important;
+    max-width: 75% !important;
   }
 }
 </style>

+ 1 - 0
pc/src/store/language/cn/toast.js

@@ -44,6 +44,7 @@ export default{
   '43': '请绑定用户账号后,进行充值扩容。',
   '44': '分配成功',
   '45': '已取消协作',
+  '46': '图片大小不能超过1MB',
 
   '4007': '用户名不存在',
   '4010': '绑定的相机不存在',

+ 1 - 0
pc/src/store/language/en/toast.js

@@ -44,6 +44,7 @@ export default{
   '43': 'Please bind this camera to a user account before expanding the storage.',
   '44': 'Collaborator added',
   '45': 'Collaborator canceled.',
+  '46': 'Picture size cannot exceed 1MB',
 
   '4007': 'User name doesn\'t exist.',
   '4010': 'The bound camera doesn\'t exist.',