Explorar o código

Merge branch 'dev' of http://git.izouma.com/xiongzhu/raex_front into dev

panhui %!s(int64=4) %!d(string=hai) anos
pai
achega
2d88c2b8fb
Modificáronse 3 ficheiros con 17 adicións e 6 borrados
  1. 5 1
      src/views/account/Login.vue
  2. 5 1
      src/views/account/Register.vue
  3. 7 4
      src/views/asset/Detail.vue

+ 5 - 1
src/views/account/Login.vue

@@ -128,6 +128,7 @@
 
 
 <script>
 <script>
 import phone from '../../mixins/phone';
 import phone from '../../mixins/phone';
+let fromRoute = null;
 export default {
 export default {
     mixins: [phone],
     mixins: [phone],
     data() {
     data() {
@@ -141,6 +142,9 @@ export default {
             checked: false
             checked: false
         };
         };
     },
     },
+    beforeRouteEnter(to, from) {
+        fromRoute = from;
+    },
     methods: {
     methods: {
         sendPhone() {
         sendPhone() {
             this.$refs.code.validate('手机号码').then(() => {
             this.$refs.code.validate('手机号码').then(() => {
@@ -155,7 +159,7 @@ export default {
             this.check().then(() => {
             this.check().then(() => {
                 this.$toast.success('登录成功');
                 this.$toast.success('登录成功');
                 setTimeout(() => {
                 setTimeout(() => {
-                    if (history.length <= 2) {
+                    if (!fromRoute.name) {
                         this.$router.replace('/home');
                         this.$router.replace('/home');
                     } else {
                     } else {
                         this.$router.back();
                         this.$router.back();

+ 5 - 1
src/views/account/Register.vue

@@ -124,6 +124,7 @@
 
 
 <script>
 <script>
 import phone from '../../mixins/phone';
 import phone from '../../mixins/phone';
+let fromRoute = null;
 export default {
 export default {
     mixins: [phone],
     mixins: [phone],
     data() {
     data() {
@@ -139,6 +140,9 @@ export default {
             checked: false
             checked: false
         };
         };
     },
     },
+    beforeRouteEnter(to, from) {
+        fromRoute = from;
+    },
     methods: {
     methods: {
         sendPhone() {
         sendPhone() {
             this.$refs.form.validate('手机号码').then(() => {
             this.$refs.form.validate('手机号码').then(() => {
@@ -163,7 +167,7 @@ export default {
                 .then(() => {
                 .then(() => {
                     this.$toast.success('注册成功');
                     this.$toast.success('注册成功');
                     setTimeout(() => {
                     setTimeout(() => {
-                        if (history.length <= 2) {
+                        if (!fromRoute.name) {
                             this.$router.replace('/home');
                             this.$router.replace('/home');
                         } else {
                         } else {
                             this.$router.back();
                             this.$router.back();

+ 7 - 4
src/views/asset/Detail.vue

@@ -568,10 +568,10 @@ export default {
             });
             });
             this.$http.get('/asset/get/' + this.$route.query.id).then(res => {
             this.$http.get('/asset/get/' + this.$route.query.id).then(res => {
                 this.info = res;
                 this.info = res;
-                if(res.orderId){
-                this.$http.get('/order/get/' + res.orderId).then(res => {
-                    this.orderInfo = res;
-                });
+                if (res.orderId) {
+                    this.$http.get('/order/get/' + res.orderId).then(res => {
+                        this.orderInfo = res;
+                    });
                 }
                 }
                 wx.updateAppMessageShareData({
                 wx.updateAppMessageShareData({
                     title: '第九空间-' + res.name,
                     title: '第九空间-' + res.name,
@@ -776,6 +776,7 @@ export default {
             line-height: 24px;
             line-height: 24px;
             background: linear-gradient(135deg, @prim 0%, @warn 100%);
             background: linear-gradient(135deg, @prim 0%, @warn 100%);
             -webkit-background-clip: text;
             -webkit-background-clip: text;
+            background-clip: text;
             -webkit-text-fill-color: transparent;
             -webkit-text-fill-color: transparent;
             border-width: 0px;
             border-width: 0px;
             margin-left: 10px;
             margin-left: 10px;
@@ -1026,6 +1027,7 @@ export default {
             line-height: 22px;
             line-height: 22px;
             background: linear-gradient(135deg, @prim 0%, @warn 100%);
             background: linear-gradient(135deg, @prim 0%, @warn 100%);
             -webkit-background-clip: text;
             -webkit-background-clip: text;
+            background-clip: text;
             -webkit-text-fill-color: transparent;
             -webkit-text-fill-color: transparent;
             &.prim {
             &.prim {
                 color: @text3;
                 color: @text3;
@@ -1198,6 +1200,7 @@ export default {
             line-height: 17px;
             line-height: 17px;
             background: linear-gradient(135deg, @prim 0%, @warn 100%);
             background: linear-gradient(135deg, @prim 0%, @warn 100%);
             -webkit-background-clip: text;
             -webkit-background-clip: text;
+            background-clip: text;
             -webkit-text-fill-color: transparent;
             -webkit-text-fill-color: transparent;
         }
         }