Commit d5d1c614 authored by 华国豪's avatar 华国豪 🙄

'行程特色样式问题V999@@@'

parent 13915e9f
...@@ -322,11 +322,10 @@ ...@@ -322,11 +322,10 @@
VueDraggableResizable VueDraggableResizable
}, },
created() { created() {
this.scenicArray.forEach(x=>{ // this.scenicArray.forEach(x=>{
if(!x.ScenicJson){ // x.ScenicJson = typeof(x.ScenicJsonStr) === 'string' ? JSON.parse(x.ScenicJsonStr) : { x:0, y:0 };
x.ScenicJson={ x:0, y:0 }; // console.log(typeof(x.ScenicJsonStr) === 'string')
} // })
});
}, },
}; };
</script> </script>
...@@ -304,11 +304,10 @@ ...@@ -304,11 +304,10 @@
} }
}, },
created() { created() {
this.scenicArray.forEach(x=>{ // this.scenicArray.forEach(x=>{
if(!x.ScenicJson){ // x.ScenicJson = typeof(x.ScenicJsonStr) === 'string' ? JSON.parse(x.ScenicJsonStr) : { x:0, y:0 };
x.ScenicJson={ x:0, y:0 }; // console.log(typeof(x.ScenicJsonStr) === 'string')
} // })
});
}, },
}; };
</script> </script>
...@@ -169,11 +169,10 @@ ...@@ -169,11 +169,10 @@
}, },
}, },
created() { created() {
this.scenicArray.forEach(x=>{ // this.scenicArray.forEach(x=>{
if(!x.ScenicJson){ // x.ScenicJson = typeof(x.ScenicJsonStr) === 'string' ? JSON.parse(x.ScenicJsonStr) : { x:0, y:0 };
x.ScenicJson={ x:0, y:0 }; // console.log(typeof(x.ScenicJsonStr) === 'string')
} // })
});
}, },
}; };
</script> </script>
...@@ -258,10 +258,6 @@ ...@@ -258,10 +258,6 @@
// x.ScenicJson= x.ScenicJsonStr ? JSON{ x:0, y:0 }; // x.ScenicJson= x.ScenicJsonStr ? JSON{ x:0, y:0 };
// } // }
// }); // });
this.scenicArray.forEach(x=>{
x.ScenicJson = typeof(x.ScenicJsonStr) === 'string' ? JSON.parse(x.ScenicJsonStr) : { x:0, y:0 };
console.log(typeof(x.ScenicJsonStr) === 'string')
})
}, },
components: { components: {
DMCchooseImg, DMCchooseImg,
......
...@@ -201,11 +201,10 @@ ...@@ -201,11 +201,10 @@
mounted() { mounted() {
}, },
created() { created() {
this.scenicArray.forEach(x=>{ // this.scenicArray.forEach(x=>{
if(!x.ScenicJson){ // x.ScenicJson = typeof(x.ScenicJsonStr) === 'string' ? JSON.parse(x.ScenicJsonStr) : { x:0, y:0 };
x.ScenicJson={ x:0, y:0 }; // console.log(x.CouponsName, JSON.parse(x.ScenicJsonStr))
} // })
});
}, },
components: { components: {
DMCchooseImg, DMCchooseImg,
......
...@@ -359,7 +359,7 @@ ...@@ -359,7 +359,7 @@
} }
}, },
created() { created() {
}, },
computed: { computed: {
//获取行程天数 //获取行程天数
......
...@@ -351,7 +351,7 @@ ...@@ -351,7 +351,7 @@
} }
} }
this.dayObj.ScenicArray.forEach(x=>{ this.dayObj.ScenicArray.forEach(x=>{
x.ScenicJson.y=0; // x.ScenicJson.y=0;
}); });
}, },
//是否有景点切换 //是否有景点切换
...@@ -539,6 +539,19 @@ ...@@ -539,6 +539,19 @@
} }
}, },
created() { created() {
this.dayObj.ScenicArray.forEach(x=>{
// x.ScenicJson = (typeof(x.ScenicJsonStr) === 'string' ? x.ScenicJsonStr : { x:0, y:0 })
let obj = JSON.parse(x.ScenicJsonStr)
if (obj) {
console.log("obj1",obj.y)
x.ScenicJson = obj
} else {
console.log("obj2",obj)
x.ScenicJson = { x:0, y:0 }
}
console.log('222', x.ScenicJson)
})
this.initScenicData(); this.initScenicData();
}, },
watch: { watch: {
...@@ -594,7 +607,7 @@ ...@@ -594,7 +607,7 @@
//移除 //移除
let newScenicObj = []; let newScenicObj = [];
this.dayObj.ScenicArray.forEach(x => { this.dayObj.ScenicArray.forEach(x => {
x.ScenicJson.y=0; // x.ScenicJson.y=0;
let isExist = false; let isExist = false;
this.ChooseScenicArray.forEach(y => { this.ChooseScenicArray.forEach(y => {
if (y === x.CouponsId) { if (y === x.CouponsId) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment