2 Revīzijas a1b0ccb5f4 ... 96ca781d2f

Autors SHA1 Ziņojums Datums
  changjiaming 96ca781d2f Merge branch 'dev1.0' of http://192.168.0.200:3000/zhangxj/trade-platform-c-front-end into dev1.0 1 nedēļu atpakaļ
  changjiaming 35baa70d04 shouye xiugai 1 nedēļu atpakaļ

+ 1 - 1
src/router/index.js

@@ -60,7 +60,7 @@ export const constantRoutes = [
       },
       {
         path: 'register',
-        component: () => import('@/views/login/components/register.vue')
+        component: () => import('@/views/login/components/RegisterContent.vue')
       },
       {
         path: 'tradeTool',

+ 2 - 1
src/store/getters.js

@@ -7,6 +7,7 @@ const getters = {
   constant: state => state.constant.constant,
   showAllMenu: state => state.user.showAllMenu,
   authStatus: state => state.user.authStatus,
-  enterpriseInfo: state => state.user.enterpriseInfo
+  enterpriseInfo: state => state.user.enterpriseInfo,
+  registerState: state => state.app.openRegister
 }
 export default getters

+ 5 - 1
src/store/modules/app.js

@@ -6,7 +6,8 @@ const state = {
     withoutAnimation: false
   },
   device: 'desktop',
-  isMobile: false
+  isMobile: false,
+  openRegister: false
 }
 
 const mutations = {
@@ -34,6 +35,9 @@ const mutations = {
   },
   UPDATE_DEVICE_TYPE: (state, type) => {
     state.isMobile = type
+  },
+  SET_REGISTER_STATE: (state, type) => {
+    state.openRegister = type
   }
 }
 

+ 0 - 94
src/views/login/component/pageHead.vue

@@ -1,94 +0,0 @@
-<template>
-  <div class="page-head">
-    <div style="display: flex;">
-      <div class="head-log" />
-      <div v-for="(item, index) in bannerList" :key="index" style="display: inline-block;" :class="activeIndex === index ? 'active-menu' : ''" @click="toPage(index)">
-        <span v-if="index !== 1">{{ item }}</span>
-        <el-dropdown v-else trigger="click" @command="toProduct">
-          <span class="el-dropdown-link">
-            产品服务<i class="el-icon-arrow-down el-icon--right" />
-          </span>
-          <el-dropdown-menu slot="dropdown">
-            <el-dropdown-item command="1">长银e融</el-dropdown-item>
-            <el-dropdown-item command="2">长银e贸</el-dropdown-item>
-            <el-dropdown-item command="3">长银钱包</el-dropdown-item>
-          </el-dropdown-menu>
-        </el-dropdown>
-      </div>
-    </div>
-    <div>
-      <el-button type="primary" @click="$emit('btnClick', 'login')">登 录</el-button>
-      <el-button type="primary" @click="$emit('btnClick', 'register')">注册</el-button>
-    </div>
-  </div>
-</template>
-
-<script>
-export default {
-  name: 'PageHeader',
-  data() {
-    return {
-      bannerList: ['首页', '产品服务', '外贸工具', '关于我们'],
-      activeIndex: 0
-    }
-  },
-  watch: {
-    activeIndex: {
-      handler: function(val) {
-        this.$emit('changeMenu', val)
-      },
-      immediate: true
-    }
-  },
-  methods: {
-    toPage(info) {
-      this.activeIndex = info
-    },
-    toProduct(info) {},
-    toNet() {
-      this.$router.push('/login')
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-.page-head {
-  width: 100vw;
-  height: 70px;
-  position: fixed;
-  left: 0;
-  top: 0;
-  border-bottom: 1px solid #E5E7EB;
-  padding: 0 100px;
-  background-color: #ffffff;
-  display: flex;
-  flex-wrap: nowrap;
-  justify-content: space-between;
-  flex-direction: row;
-  line-height: 70px;
-  white-space: nowrap;
-  z-index: 999;
-  .head-log {
-    display: inline-block;
-    width: 136px;
-    height: 100%;
-    background-image: url('../../../assets/login1/comLogo.svg');
-    background-size: 100% 42px;
-    background-position: center;
-    background-repeat: no-repeat;
-    cursor: pointer;
-  }
-  span {
-    display: inline-block;
-    margin-left: 70px;
-    color: #131820;
-    font-size: 14px;
-    font-weight: 400;
-    cursor: pointer;
-  }
-  .active-menu span {
-    color: #FE7D0B
-  }
-}
-</style>

+ 15 - 3
src/views/login/components/RegisterContent.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="register-content">
+  <div class="register-content" :class="isMobile ? 'phone-register-content' : ''">
     <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="110px" label-position="left">
       <el-form-item label="会员名称" prop="userName" style="width: 100%">
         <el-input v-model="ruleForm.userName" size="medium" style="width: 100%" placeholder="请输入会员名称" />
@@ -81,6 +81,11 @@ export default {
       regionList: []
     }
   },
+  computed: {
+    isMobile() {
+      return this.$store.state.app.isMobile
+    }
+  },
   created() {
     // this.getRegionList()
   },
@@ -143,8 +148,10 @@ export default {
     width:100%;
     height: 43px;
     font-size: 16px;
-    margin-bottom: 30px;
-    margin-top: 20px;
+    // margin-bottom: 30px;
+    // margin-top: 20px;
+    margin: 20px auto 30px;
+    display: block;
   }
   .login {
     text-align: center;
@@ -189,6 +196,11 @@ export default {
     }
   }
 }
+
+.phone-register-content {
+  margin-top: 82px;
+  margin-bottom: 200px;
+}
 </style>
 
 <style lang="scss">

+ 15 - 2
src/views/login/index.vue

@@ -74,7 +74,7 @@
             </template>
           </div>
         </div>
-        <div class="back-home" @click="() => { loginStatus = false }">
+        <div class="back-home" @click="() => { loginStatus = false; $store.commit('app/SET_REGISTER_STATE', false) }">
           <svg-icon icon-class="backArrow" style="width: 14px; height: 14px;" />
           返回首页
         </div>
@@ -140,6 +140,7 @@
 
 <script>
 import { isMobileDevice } from '@/utils/index'
+import { mapGetters } from 'vuex'
 
 export default {
   name: 'Login',
@@ -250,7 +251,8 @@ export default {
   computed: {
     key() {
       return this.$route.path
-    }
+    },
+    ...mapGetters(['registerState'])
   },
   watch: {
     $route: {
@@ -277,6 +279,14 @@ export default {
         }
       },
       immediate: true
+    },
+    'registerState': {
+      handler(val) {
+        if (val === true) {
+          this.loginClick('register')
+        }
+      },
+      immediate: true
     }
   },
   mounted() {
@@ -289,6 +299,9 @@ export default {
     window.removeEventListener('resize', this.isMobile)
   },
   methods: {
+    test(val) {
+      console.log(val)
+    },
     preventDefault(e) {
       e.preventDefault()
     },

+ 0 - 27
src/views/login/index1.vue

@@ -1,27 +0,0 @@
-<template>
-  <div class="login-page">
-    
-  </div>
-</template>
-
-<script>
-export default {
-  name: 'Login',
-  components: {},
-  data() {
-    return {}
-  },
-  computed: {},
-  watch: {},
-  mounted() {},
-  destroyed() {},
-  methods: {}
-}
-</script>
-
-<style lang="scss" scoped>
-.login-page {
-  padding: 70px 0 190px;
-  overflow: auto;
-}
-</style>

+ 5 - 4
src/views/login/mobileComponents/TradeSince.vue

@@ -351,10 +351,11 @@ export default {
       this.bacIndex = val
     },
     toRegister() {
-      this.$router.push({
-        path: '/login/register',
-        query: this.$route.query
-      })
+      // this.$router.push({
+      //   path: '/login/register',
+      //   query: this.$route.query
+      // })
+      this.$store.commit('app/SET_REGISTER_STATE', true)
     },
     confirm() {
       this.$refs.tab2.validate(flag => {

+ 3 - 5
src/views/login/pcComponents/TradeSince.vue

@@ -137,7 +137,8 @@
           <div class="caculate-desc">此额度只是初步估算所得,最终的授信额度将根据您的具体情况和申请资料综合确定。</div>
         </template>
         <el-button v-if="money === '--'" type="primary" @click="confirm">提交</el-button>
-        <el-button v-if="money !== '--'" type="primary" @click="toRegister">去注册</el-button>
+        <!-- <el-button v-if="money !== '--'" type="primary" @click="toRegister">去注册</el-button> -->
+        <el-button type="primary" @click="toRegister">去注册</el-button>
       </el-form>
     </div>
     <div style="background-color: #F9FAFB; margin-top: 7vw; padding-bottom: 4.5vw;">
@@ -370,10 +371,7 @@ export default {
       this.bacIndex = val
     },
     toRegister() {
-      this.$router.push({
-        path: '/login/register',
-        query: this.$route.query
-      })
+      this.$store.commit('app/SET_REGISTER_STATE', true)
     },
     confirm() {
       this.$refs.tab2.validate(flag => {