Browse Source

注册验证码md5参数

yangc 6 years ago
parent
commit
2c59faba8d
2 changed files with 4 additions and 1 deletions
  1. 1 0
      package.json
  2. 3 1
      pages/businessEnter/index.vue

+ 1 - 0
package.json

@@ -17,6 +17,7 @@
     "font-awesome": "^4.7.0",
     "http-proxy-middleware": "^0.17.4",
     "js-beautify": "1.6.14",
+    "js-md5": "^0.7.3",
     "jsonp": "^0.2.1",
     "node-sass": "^4.5.3",
     "nuxt": "1.3.0",

+ 3 - 1
pages/businessEnter/index.vue

@@ -163,6 +163,7 @@
   </div>
 </template>
 <script>
+  import md5 from 'js-md5'
   export default {
     name: 'businessEnter',
     layout: 'main',
@@ -249,9 +250,10 @@
         imgSrc.setAttribute('src', this.address + '/sso/resetPwd/checkCaptcha?timestamp=' + (new Date()).valueOf())
       },
       getCode () {
+        let md5Code = md5(`{mobile=${this.enterprise.mobile},code=${this.enterprise.ImgCode},salt=sso}`)
         this.showLoading = true
         if (this.mobileChecked) {
-          this.$http.get(`${this.address}/sso/userspace/register/checkCode`, {params: {mobile: this.enterprise.mobile, timestamp: new Date().getTime() + '', code: this.enterprise.ImgCode}})
+          this.$http.get(`${this.address}/sso/userspace/register/checkCode`, {params: {mobile: this.enterprise.mobile, timestamp: new Date().getTime() + '', code: this.enterprise.ImgCode, sign: md5Code}})
             .then(response => {
               this.showLoading = false
               if (response.data) {