Commit be83661b by hank

代码优化

parent b2acb410
......@@ -4,5 +4,5 @@ const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"',
BASE_API: '"http://equipment.bdideal.com"'
BASE_API: '"https://equipment.bdideal.com"'
})
\ No newline at end of file
......@@ -89,12 +89,13 @@ export default {
},
methods: {
loaded(index) {
console.log("child mouted", index);
setTimeout(() => {
this.$refs["child" + this.sliderActiveIndex][0].enter().then(() => {
console.log(index, "enter 完毕");
});
}, 1000);
if (!this.isEditMode) {
setTimeout(() => {
this.$refs["child" + this.sliderActiveIndex][0].enter().then(() => {
console.log(index, "enter 完毕");
});
}, 1000);
}
},
message(data) {
Message.send(data, "*");
......@@ -130,20 +131,25 @@ export default {
});
},
created() {
Scene.EventBus.on("leaveBefore", e => {
console.log("leaveBefore");
if (this.pages.length > 1) {
this.$refs["child" + this.sliderActiveIndex][0].leave().then(() => {
console.log("leaveBefore then");
var index = this.sliderActiveIndex;
if (index >= this.pages.length - 1) {
index = -1;
console.log(index);
}
this.swiper.slideTo(index + 1, 0, false);
});
}
});
if (getQuery("isEdit")) {
this.isEditMode = true;
} else {
Scene.EventBus.on("leaveBefore", e => {
console.log("leaveBefore");
if (this.pages.length > 1) {
this.$refs["child" + this.sliderActiveIndex][0].leave().then(() => {
console.log("leaveBefore then");
var index = this.sliderActiveIndex;
if (index >= this.pages.length - 1) {
index = -1;
console.log(index);
}
this.swiper.slideTo(index + 1, 0, false);
});
}
});
this.isEditMode = false;
}
var vm = this;
Message.init(e => {
var isObj = typeof e.data === "object";
......@@ -200,11 +206,6 @@ export default {
}
}
};
if (getQuery("isEdit")) {
this.isEditMode = true;
} else {
this.isEditMode = false;
}
if (getQuery("filmId") && !this.isEditMode) {
getFilmDetail(getQuery("filmId")).then(result => {
console.log(result);
......@@ -242,7 +243,7 @@ export default {
position: relative;
opacity: 1;
.ant {
clip-path: url(#cd-image-1)
clip-path: url(#cd-image-1);
}
.decoration {
position: absolute;
......
......@@ -45,28 +45,28 @@ export default [
type: 'text',
name: '亮点二名称',
description: '填写亮点二名称不超过三个字',
dataKey: 'brighTwoName',
dataKey: 'brightTwoName',
valueRule: ''
},
{
type: 'text',
name: '亮点二内容',
description: '填写亮点二内容不超过五个字',
dataKey: 'brighTwoContent',
dataKey: 'brightTwoContent',
valueRule: ''
},
{
type: 'text',
name: '亮点三名称',
description: '填写亮点三名称不超过三个字',
dataKey: 'brighThreeName',
dataKey: 'brightThreeName',
valueRule: ''
},
{
type: 'text',
name: '亮点三内容',
description: '填写亮点三内容不超过五个字',
dataKey: 'brighThreeContent',
dataKey: 'brightThreeContent',
valueRule: ''
},
{
......
......@@ -42,7 +42,7 @@
</div>
<div class="surrounding" zh="房源特色" ref="surrounding">PROPERTY FEATURES</div>
<div class="feature-list" ref="feature-list">
<div class="feature-item" v-for="(item, index) in feutrueList" :key="index">{{item}}</div>
<div class="feature-item" v-for="(item, index) in feutrueList" :key="index">{{item}}</div>
</div>
</div>
</div>
......@@ -54,7 +54,7 @@ import { swiper, swiperSlide } from "vue-awesome-swiper";
import StarSky from "@/framework/components/BoxShadowSky";
import methods from "../methods";
import anime from "animejs/lib/anime.es.js";
import Scene from '@/framework/utils/sence'
import Scene from "@/framework/utils/sence";
export default {
name: "welcome",
props: ["schemaData", "page", "isEditMode", "cancelEdit"],
......@@ -93,16 +93,16 @@ export default {
easing: "easeOutQuad"
}).finished
];
var enPromise = Promise.all(PromiseAll)
var enPromise = Promise.all(PromiseAll);
return enPromise;
},
enter() {
console.log('enter anime')
console.log("enter anime");
var PromiseAll = [
anime({
targets: this.$refs["house-list"],
translateX: 0,
opacity: 1,
opacity: 1,
duration: 1000
}).finished,
anime({
......@@ -149,8 +149,8 @@ export default {
}).finished
];
Promise.all(PromiseAll).then(() => {
this.enterAfter()
})
this.enterAfter();
});
return Promise.all(PromiseAll);
},
enterBefore() {
......@@ -215,8 +215,12 @@ export default {
}
},
mounted() {
console.log('mounted')
this.enterBefore()
console.log(this.isEditMode);
if (!this.isEditMode) {
console.log(this.isEditMode);
this.enterBefore();
}
},
data() {
return {
......
......@@ -246,8 +246,9 @@ export default {
}
},
mounted() {
console.log("mounted");
this.enterBefore();
if (!this.isEditMode) {
this.enterBefore();
}
},
data() {
return {
......
......@@ -243,8 +243,9 @@ export default {
}
},
mounted() {
console.log("mounted");
this.enterBefore();
if (!this.isEditMode) {
this.enterBefore();
}
},
data() {
return {
......
......@@ -266,7 +266,9 @@ export default {
}
},
mounted() {
this.enterBefore();
if (!this.isEditMode) {
this.enterBefore();
}
},
data() {
return {
......
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 sign in to comment