Browse Source

Merge branch 'release-iframe-hb'

huangb 7 years ago
parent
commit
ee2d378b3a
4 changed files with 136 additions and 184 deletions
  1. 1 1
      app.html
  2. 7 1
      assets/scss/common.scss
  3. 96 87
      pages/sassLogin/index.vue
  4. 32 95
      pages/sassLogin/register.vue

+ 1 - 1
app.html

@@ -6,7 +6,7 @@
   <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"/>
   <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
   <link rel="stylesheet" href="https://unpkg.com/mint-ui/lib/style.css">
-  <link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_921977_p15nnv7y5hs.css"/>
+  <link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_921977_wzqwtx4i39h.css"/>
   <!--<script src="https://wechatfe.github.io/vconsole/lib/vconsole.min.js?v=3.2.0"></script>-->
   <!--<script src="https://biheopen.bgycc.com/cordova-android.js"></script>-->
   <script src="https://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>

+ 7 - 1
assets/scss/common.scss

@@ -951,7 +951,6 @@ form .questions .el-form-item__content span.question {
   .container{
     width: 425px !important ;
     background: #FFFFFF;
-    box-shadow: 0 22px 24px 0 rgba(0,0,0,0.08);
     border-radius: 3px;
     .content {
       padding: 0 !important ;
@@ -995,3 +994,10 @@ form .questions .el-form-item__content span.question {
 .go-register form .el-form-item.agree .el-form-item__content{
   margin-top: 18px!important ;
 }
+//sass登录
+//.el-message{
+//  margin-top: -18px !important ;
+//}
+//.el-message i.el-message__closeBtn{
+//  display: none;
+//}

+ 96 - 87
pages/sassLogin/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="x-container">
+  <div class="x-container y-container">
    <!--登录窗口-->
     <template v-if="!loginIsSuccess">
       <div class="x-login-wrap">
@@ -548,7 +548,10 @@
         this.isShowLoading = true
         if (!this.fastLogin.mobile) {
           this.isShowLoading = false
-          this.$message.error('请填写手机号')
+          this.$message.error({
+            message: '请填写手机号',
+            showClose: true
+          })
         } else {
           let param = new FormData()
           param.append('mobile', this.fastLogin.mobile)
@@ -820,89 +823,95 @@
   }
 </script>
 <style lang="scss" type="text/scss">
- .x-container {
-   width: 346px;
-   margin: 0 auto;
-   text-align: center;
-   /*background: #FFFFFF;*/
-   /*box-shadow: 0 22px 24px 0 rgba(0,0,0,0.08);*/
-   /*border-radius: 3px;*/
-   .login-tab {
-     margin-bottom: 30px;
-     width: 100%;
-     height: 50px;
-     line-height: 50px;
-     border-bottom: 1px solid #dcdcdc;
-     span{
-       display: inline-block;
-       width: 30%;
-       font-size: 16px;
-       color: #999;
-       cursor: pointer;
-       &.active{
-         color: #333;
-         border-bottom: 2px solid #282828;
-       }
-     }
-   }
-   .x-login {
-     width: 100%;
-     .x-login-form {
-       .btn.login{
-         width: 306px;
-         height: 34px;
-         background: #5078cb;
-         color: #fff;
-         font-weight: 700;
-         letter-spacing: 4px;
-         border-radius: 0;
-       }
-       .text-position{
-         .el-form-item__content .el-checkbox{
-           margin-left: 0!important;
-         }
-       }
-     }
-     .link-go {
-       position: relative;
-       text-align: right;
-       margin-top: 35px;
-       padding: 0 21px 20px 0;
-       a{
-         margin-left: 20px;
-         font-size: 14px;
-         color: #999;
-         background: 0 0;
-         text-decoration: none;
-         outline: 0;
-         cursor: pointer;
-       }
-       span{
-         position: absolute;
-         top: 1px;
-         display: inline-block;
-         margin: 0 10px;
-         width: 2px;
-         height: 15px;
-         background-color: #ddd;
-       }
-     }
-   }
-   .login-success {
-     padding-top: 95px;
-     width: 100%;
-     height: 400px;
-     margin: 0 auto;
-     text-align: center;
-     i{
-       font-size: 125px;
-       color: #22ac38;
-     }
-     p{
-       margin-top: 20px;
-       font-size: 28px;
-       color: #333;
-     }
-   }
- }
+  .y-container {
+    position: relative;
+    bottom: -30px;
+    width: 346px !important ;
+    margin: 0 auto;
+    text-align: center;
+    /*background: #FFFFFF;*/
+    /*box-shadow: 0 22px 24px 0 rgba(0,0,0,0.08);*/
+    /*border-radius: 3px;*/
+    .x-login-wrap{
+      margin: 20px 0 0!important ;
+      height: auto;
+    }
+    .login-tab {
+      margin-bottom: 30px;
+      width: 100%;
+      height: 50px;
+      line-height: 50px;
+      border-bottom: 1px solid #dcdcdc;
+      span{
+        display: inline-block;
+        width: 30%;
+        font-size: 16px;
+        color: #999;
+        cursor: pointer;
+        &.active{
+          color: #333;
+          border-bottom: 2px solid #282828;
+        }
+      }
+    }
+    .x-login {
+      width: 100%;
+      .x-login-form {
+        .btn.login{
+          width: 306px;
+          height: 34px;
+          background: #5078cb;
+          color: #fff;
+          font-weight: 700;
+          letter-spacing: 4px;
+          border-radius: 0;
+        }
+        .text-position{
+          .el-form-item__content .el-checkbox{
+            margin-left: 0!important;
+          }
+        }
+      }
+      .link-go {
+        position: relative;
+        text-align: right;
+        margin-top: 35px;
+        padding: 0 21px 20px 0;
+        a{
+          margin-left: 20px;
+          font-size: 14px;
+          color: #999;
+          background: 0 0;
+          text-decoration: none;
+          outline: 0;
+          cursor: pointer;
+        }
+        span{
+          position: absolute;
+          top: 1px;
+          display: inline-block;
+          margin: 0 10px;
+          width: 2px;
+          height: 15px;
+          background-color: #ddd;
+        }
+      }
+    }
+    .login-success {
+      padding-top: 95px;
+      width: 100%;
+      height: 400px;
+      margin: 0 auto;
+      text-align: center;
+      i{
+        font-size: 125px;
+        color: #22ac38;
+      }
+      p{
+        margin-top: 20px;
+        font-size: 28px;
+        color: #333;
+      }
+    }
+  }
 </style>

+ 32 - 95
pages/sassLogin/register.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="go-register register">
     <div class="container">
-      <div class="content">
+      <div class="content" v-if="isSuccess">
         <div class="content-top">
           <h3>注册</h3>
         </div>
@@ -47,6 +47,12 @@
           </el-form>
         </div>
       </div>
+      <div class="content" v-else>
+        <div class="register-success">
+          <i class="iconfont icon-zhucechenggong1"></i>
+          <p>注册成功</p>
+        </div>
+      </div>
       <div class="login">已有账号?<a :href="returnLogin">立即登录</a></div>
       <loading v-show="isShowLoading"/>
     </div>
@@ -190,6 +196,7 @@
         }
       }
       return {
+        isSuccess: true,
         speediness: false,
         ImgCode: '',
         item: {
@@ -263,8 +270,9 @@
       checkboxChecked () {
         this.checked = !this.checked
       },
-      // 快速登录
+      // 快速注册
       waySubmit () {
+        console.log(this.$route.params.baseUrl)
         if (this.mobileChecked && this.codeChecked && this.checked) {
           this.isShowLoading = true
           let param = new FormData()
@@ -286,61 +294,9 @@
             .then(response => {
               this.isShowLoading = false
               if (response.data.success) {
-                if (response.data.content.type) {
-                  if (response.data.content.type === 'mall') {
-                    let param = response.data.content.data
-                    let a = ''
-                    for (let n in param) {
-                      a += (n + '=' + encodeURIComponent(param[n]) + '&')
-                    }
-                    let params = a.substr(0, a.length - 1)
-                    this.isShowLoading = true
-                    if (response.data.content.currentUrl) {
-                      this.$jsonp(`${response.data.content.currentUrl}?${params}`, {
-                        name: 'successCallback',
-                        timeout: 3000
-                      }, (err, data) => {
-                        if (err) {
-                          this.$message.error('注册成功,请点击下方“立即登录”完成登录')
-                          this.isShowLoading = false
-                          throw err
-                        } else {
-                          this.loginOther(response, params)
-                        }
-                      })
-                    } else {
-                      this.loginOther(response, params, 3000)
-                    }
-                  } else if (response.data.content.type === 'city') {
-                    let param = response.data.content.data
-                    let a = ''
-                    for (let n in param) {
-                      a += (n + '=' + encodeURIComponent(param[n]) + '&')
-                    }
-                    let params = a.substr(0, a.length - 1)
-                    this.isShowLoading = true
-                    if (response.data.content.currentUrl) {
-                      this.$jsonp(`${response.data.content.currentUrl}?${params}`, {
-                        name: 'successCallback',
-                        timeout: 3000
-                      }, (err, data) => {
-                        if (err) {
-                          this.$message.error('注册成功,请点击下方“立即登录”完成登录')
-                          this.isShowLoading = false
-                          throw err
-                        } else {
-                          this.loginCityOther(response, params)
-                        }
-                      })
-                    } else {
-                      this.loginCityOther(response, params, 3000)
-                    }
-                  }
-                } else {
-                  let userUU = response.data.content.userUU
-                  console.log(userUU)
-                  window.location.href = `/overRegister/${userUU}`
-                }
+                this.isSuccess = false
+                this.isShowLoading = false
+                this.getJsonp(decodeURIComponent(this.$route.query.baseUrl))
               } else {
                 return Promise.reject(response.data)
               }
@@ -424,62 +380,43 @@
             }
           })
         })
-      },
-      crossAfter (url) {
-        try {
-          window.location.href = url
-        } catch (err) {
-          console.log(err)
-        }
-      },
-      loginOther (response, a, timeout) {
-        const crossAfter = this.crossAfter
-        let promises = []
-        for (let i in response.data.content.loginUrls) {
-          if (response.data.content.currentUrl !== response.data.content.loginUrls[i]) {
-            promises.push(this.getJsonp(`${response.data.content.loginUrls[i]}?${a}`))
-          }
-        }
-        let returnUrl = decodeURIComponent(this.$route.query.returnURL)
-        Promise.all(promises).then(() => {
-          crossAfter(returnUrl || 'http://www.ubtob.com', timeout)
-        }).catch(() => {
-          crossAfter(returnUrl || 'http://www.ubtob.com', timeout)
-        })
-      },
-      loginCityOther (response, a, timeout) {
-        const crossAfter = this.crossAfter
-        let promises = []
-        for (let i in response.data.content.loginUrls) {
-          if (response.data.content.currentUrl !== response.data.content.loginUrls[i]) {
-            promises.push(this.getJsonp(`${response.data.content.loginUrls[i]}?${a}`))
-          }
-        }
-        Promise.all(promises).then(() => {
-          crossAfter('/overRegister/cityRegisterOver/' + this.$store.state.option.fullPath || '/overRegister/cityRegisterOver/' + this.$store.state.option.fullPath, timeout)
-        }).catch(() => {
-          crossAfter('/overRegister/cityRegisterOver/' + this.$store.state.option.fullPath || '/overRegister/cityRegisterOver/' + this.$store.state.option.fullPath, timeout)
-        })
       }
     }
   }
 </script>
 <style lang="scss" scoped>
-  .register {
+  .go-register.register {
+    position: relative;
+    bottom: -18px;
     margin: 0 auto;
     width: 100%;
     background: #eee;
     .container{
-      padding-top: 50px;
+      padding-top: 38px!important;
       margin: 0 auto;
       width: 980px;
       text-align: center;
       background: #fff;
+      box-shadow: none!important;
       .content{
         padding: 0 50px;
         margin: 50px auto 0;
         width: 100%;
         text-align: center;
+        .register-success {
+          padding-top: 40px;
+          width: 100%;
+          height: 380px;
+          i.icon-zhucechenggong1{
+            font-size: 148px;
+            color: #00BB00;
+          }
+          p{
+            margin-top: 20px;
+            font-size: 28px;
+            color: #333;
+          }
+        }
         .content-top{
           position: relative;
           height: 80px;