Browse Source

Merge branch 'deploy' of chelingzhu-web/qhsxKx-cardSend-html into master

lilei 4 years ago
parent
commit
4ddf8b2fb7

+ 2 - 2
src/store/modules/user.js

@@ -45,11 +45,11 @@ const user = {
       return new Promise((resolve, reject) => {
         login(userInfo).then(res => {
           console.log(res, 'login success')
-          if (res.userid) {
+          if (res && res.userid) {
             Vue.ls.set('hasError', 0)
             commit('SET_TOKEN', res.userid)
             commit('SET_STORENAME', res.orgName)
-            commit('SET_NAME', { name: res.username, welcome: welcome() })
+            commit('SET_NAME', { name: res.userNameCN, welcome: welcome() })
             commit('SET_AVATAR', res.avatar ? res.avatar : '')
             Vue.ls.set('rolesAccess', { permissionList: res.permCodes }, 7 * 24 * 60 * 60 * 1000)
             // 记住密码

+ 15 - 9
src/utils/request.js

@@ -53,16 +53,22 @@ service.interceptors.request.use(config => {
 // response interceptor
 service.interceptors.response.use((response) => {
   // console.log(response, 'responseresponseresponse')
-  if (response.data.status == '-1') {
-    notification.error({
-      message: '提示',
-      description: response.data.message
-    })
-    setTimeout(function () {
-      store.dispatch('Logout').then(() => {
-        window.location.reload()
+  if (window.location.pathname != '/user/login') {
+    if (response.data.status == '900') {
+      notification.destroy()
+      notification.error({
+        message: '提示',
+        description: response.data.message
       })
-    }, 2000)
+    }
+  } else {
+    if (response.data.status == '500') {
+      notification.destroy()
+      notification.error({
+        message: '提示',
+        description: response.data.message
+      })
+    }
   }
   return response.data
 }, err)

+ 6 - 19
src/views/AvailableCoupon/couponCode.vue

@@ -2,8 +2,7 @@
   <div>
     <a-modal
       v-model="isShow"
-      class-name="cashier-modal"
-      width="60%"
+      width="50%"
       @cancel="cansel"
       :footer="null"
       :maskClosable="false"
@@ -104,15 +103,6 @@ export default {
 </script>
 
 <style lang="less">
-  .cashier-modal{
-        display: flex;
-        align-items: center;
-        justify-content: center;
-
-        .ivu-modal{
-            top: 0;
-        }
-    }
   .pay-box{
     .title{
       text-align: center;
@@ -138,19 +128,15 @@ export default {
         width: 100%;
         min-height: 260px;
         position: relative;
-        // #canvas{
-        //     width: 70%!important;
-        //     height: auto!important;
-        //   }
         img{
-          width: 70%;
-          height: 100%;
+          width: 60%;
+          max-width: 530px;
           // border: 1px solid #eee;
         }
         .spin{
           position: absolute;
-          top: 40%;
-          left: 45%;
+          top: 42%;
+          left: 47%;
           z-index: 999;
         }
       }
@@ -168,6 +154,7 @@ export default {
       text-align: center;
       padding: 20px 0 10px;
       button{
+        width: 80%;
         margin: 0 10px;
       }
     }

+ 1 - 1
src/views/user/ChangePwd.vue

@@ -123,7 +123,7 @@ export default {
               _this.$message.success('修改成功, 请重新登录')
               _this.logout()
             } else {
-              // _this.$message.error(res.message)
+              _this.$message.error(res.message)
             }
           })
         }

+ 2 - 2
vue.config.js

@@ -109,7 +109,7 @@ const vueConfig = {
     proxy: {
       '/api': {
         // target: 'http://192.168.16.104:8104/cw-coupon/',
-        target: 'https://carwash-store.test.zyucgj.com/cw-coupon/',
+        target: 'http://carwash-store.test.zyucgj.com/cw-store/',
         ws: false,
         changeOrigin: true,
         pathRewrite: {
@@ -117,7 +117,7 @@ const vueConfig = {
         },
         // ÖØÐ´cookie·¾¶
         cookiePathRewrite: {
-          '/cw-coupon/': '/'
+          '/cw-store/': '/'
         }
       }
     }