Procházet zdrojové kódy

修改去掉引号不生效问题

lichao před 3 roky
rodič
revize
ad2481d02f

+ 2 - 2
src/views/basicData/customerInformation/detailsPageEdit.vue

@@ -376,8 +376,8 @@ export default {
 
     })
     if (this.$route.query.id){
-      console.log(this.$route.query.id)
       let id = this.$route.query.id.replace(/\"/g, "")
+      // let id = parseInt(this.$route.query.id)
       detail(id).then(res => {
         console.log(res.data.data)
         this.form = res.data.data;
@@ -394,7 +394,7 @@ export default {
     '$route'(to,from) {
       console.log(to,from);
       if (this.$route.query.id){
-        let id = this.$route.query.id.replace(/\"/g, "")
+        let id = JSON.parse(this.$route.query.id).replace(/\"/g, "")
         detail(id).then(res => {
           console.log(res.data.data)
           this.form = res.data.data;