Browse Source

buildfloor:fix:模型id报错问题

haojianlong 4 years ago
parent
commit
8fc18ec2a5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/views/ready/buildfloor/repetitionGraphy.vue

+ 2 - 2
src/views/ready/buildfloor/repetitionGraphy.vue

@@ -59,7 +59,7 @@ export default {
         if (this.modelId != '') {
             this.hasGraph = true;
             const temp = this.modelId.split('.');
-            if (temp.length > 1 && (temp[1] == 'png' || temp[1] == 'jpg')) {
+            if (temp[1] == 'png' || temp[1] == 'jpg') {
                 return
             } else {
                 this.init()
@@ -168,7 +168,7 @@ export default {
         modelId(n, o) {
             if (n != o) {
                 if (n) {
-                    if (n.split('.')[1].toString() == 'png' || n.split('.')[1].toString() == 'jpg') {
+                    if (n.split('.')[1] == 'png' || n.split('.')[1] == 'jpg') {
                         this.$refs.drawFloor.initGraphy(n, 3)
                     } else {
                         this.$refs.drawFloor.initGraphy(n, 1)