Commit ffca9b40 authored by IvyXia123's avatar IvyXia123

测试提交

parent f77499fc
...@@ -112,6 +112,9 @@ ...@@ -112,6 +112,9 @@
mounted() { mounted() {
window.addEventListener('scroll', this.scrollEvent, false) window.addEventListener('scroll', this.scrollEvent, false)
this.userGrowthRecordList() this.userGrowthRecordList()
this.$nextTick(() => {
console.log(document.querySelectorAll('.fa-text'));
})
} }
} }
</script> </script>
......
...@@ -796,19 +796,19 @@ ...@@ -796,19 +796,19 @@
} }
// debugger // debugger
}); });
setTimeout(() => { // setTimeout(() => {
if (this.$store.state.lookStatus == 0) { // if (this.$store.state.lookStatus == 0) {
this.audioPoint = audioGood; // this.audioPoint = audioGood;
} else if (this.$store.state.lookStatus == 1) { // } else if (this.$store.state.lookStatus == 1) {
this.audioPoint = audioGreat; // this.audioPoint = audioGreat;
} else { // } else {
this.audioPoint = audioPerfect; // this.audioPoint = audioPerfect;
} // }
this.$refs.audioDom.load(); // this.$refs.audioDom.load();
setTimeout(() => { // setTimeout(() => {
this.$refs.audioDom.play(); // this.$refs.audioDom.play();
}, 100); // }, 100);
}, 300); // }, 300);
} }
}); });
// this.$refs.sharePage.playAudio() // this.$refs.sharePage.playAudio()
......
...@@ -96,7 +96,6 @@ ...@@ -96,7 +96,6 @@
}, },
handleInput(e){ handleInput(e){
let classQuery = JSON.parse(sessionStorage.getItem("classQuery")) let classQuery = JSON.parse(sessionStorage.getItem("classQuery"))
let checkboxPutContenteditable = document.querySelector('.checkbox-put-contenteditable');
this.cache = Object.assign({}, { imageNum: this.imageNum, imageNum2: this.imageNum2, imageNum3: this.imageNum3, inner: this.myHtmlCode, id: classQuery.elementId }) this.cache = Object.assign({}, { imageNum: this.imageNum, imageNum2: this.imageNum2, imageNum3: this.imageNum3, inner: this.myHtmlCode, id: classQuery.elementId })
localStorage.setItem('cache', JSON.stringify(this.cache)) localStorage.setItem('cache', JSON.stringify(this.cache))
}, },
...@@ -105,16 +104,15 @@ ...@@ -105,16 +104,15 @@
* @returns {Promise.<void>} * @returns {Promise.<void>}
*/ */
async userCategoryClick() { async userCategoryClick() {
let checkboxPutContenteditable = document.querySelector('.checkbox-put-contenteditable');
let nowTime = Date.parse(new Date()), // 时间 let nowTime = Date.parse(new Date()), // 时间
classQuery = JSON.parse(sessionStorage.getItem("classQuery")), // 获取elementId,category_id,periods_id classQuery = JSON.parse(sessionStorage.getItem("classQuery")), // 获取elementId,category_id,periods_id
lessonDetail = JSON.parse(localStorage.getItem("lessonDetail")),// 获取延长时间 lessonDetail = JSON.parse(localStorage.getItem("lessonDetail")),// 获取延长时间
lookTime = (nowTime - lessonDetail.nowTime) / 1000, lookTime = (nowTime - lessonDetail.nowTime) / 1000,
watchLog = { page_type: 0, page_id: 7, stay_time: lookTime }; watchLog = { page_type: 0, page_id: 7, stay_time: lookTime };
let data = { interest: this.imageNum, concert: this.imageNum2, parent_child: this.imageNum3, growth_record: checkboxPutContenteditable.innerHTML } let data = { interest: this.imageNum, concert: this.imageNum2, parent_child: this.imageNum3, growth_record: this.myHtmlCode }
// 字数限制 // 字数限制
if(this.imageNum !== 0 && this.imageNum2 !== 0 && this.imageNum3 !== 0) { if(this.imageNum !== 0 && this.imageNum2 !== 0 && this.imageNum3 !== 0) {
if(checkboxPutContenteditable.innerHTML.length > 15 && checkboxPutContenteditable.innerHTML.length < 100) { if(this.myHtmlCode.length > 15 && this.myHtmlCode.length < 100) {
// 提交评价页面 // 提交评价页面
const postUserGrowthAddData = await postUserGrowthAddApi(classQuery.elementId, classQuery.category_id, classQuery.periods_id, data) const postUserGrowthAddData = await postUserGrowthAddApi(classQuery.elementId, classQuery.category_id, classQuery.periods_id, data)
// 提交看课数据 // 提交看课数据
...@@ -133,9 +131,9 @@ ...@@ -133,9 +131,9 @@
buttonName:'提交成长记录加一颗星' buttonName:'提交成长记录加一颗星'
}); });
}else { }else {
if(checkboxPutContenteditable.innerHTML.length > 100) { if(this.myHtmlCode.length > 100) {
Toast(`您多输入了${ checkboxPutContenteditable.innerHTML.length - 100 }个字`); Toast(`您多输入了${ this.myHtmlCode.length - 100 }个字`);
}else if(checkboxPutContenteditable.innerHTML.length < 15){ }else if(this.myHtmlCode.length < 15){
Toast("输入字数不满15个"); Toast("输入字数不满15个");
} }
} }
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
</template> </template>
<script> <script>
import { getUserWatchApi } from "../../service/api";
import star_btn from '../../assets/star/star_btn.png' import star_btn from '../../assets/star/star_btn.png'
import star1 from '../../assets/star/star1.png' import star1 from '../../assets/star/star1.png'
import star2 from '../../assets/star/star2.png' import star2 from '../../assets/star/star2.png'
...@@ -87,7 +88,10 @@ ...@@ -87,7 +88,10 @@
this.popupVisible = false; this.popupVisible = false;
if(this.starNum == 2){ if(this.starNum == 2){
this.sendConsole('分享赚星星'); this.sendConsole('分享赚星星');
this.$emit('showShare') getUserWatchApi({ category_id: this.$route.query.category_id }).then(res => {
this.$router.push({name: 'evaluate', query: res})
});
this.$router.push({name: 'evaluate'})
}else{ }else{
this.sendConsole('关闭集星'); this.sendConsole('关闭集星');
} }
...@@ -115,7 +119,6 @@ ...@@ -115,7 +119,6 @@
width: 230*@toVw; width: 230*@toVw;
padding:50*@toVw 10*@toVw 10*@toVw 10*@toVw; padding:50*@toVw 10*@toVw 10*@toVw 10*@toVw;
position: relative; position: relative;
// height: 142*@toVw;
.star-all{ .star-all{
width: 154*@toVw; width: 154*@toVw;
position: absolute; position: absolute;
......
...@@ -369,19 +369,19 @@ ...@@ -369,19 +369,19 @@
this.$router.push({name: 'evaluate', query: res}) this.$router.push({name: 'evaluate', query: res})
} }
}); });
setTimeout(() => { // setTimeout(() => {
if (this.$store.state.lookStatus == 0) { // if (this.$store.state.lookStatus == 0) {
this.audioPoint = audioGood; // this.audioPoint = audioGood;
} else if (this.$store.state.lookStatus == 1) { // } else if (this.$store.state.lookStatus == 1) {
this.audioPoint = audioGreat; // this.audioPoint = audioGreat;
} else { // } else {
this.audioPoint = audioPerfect; // this.audioPoint = audioPerfect;
} // }
this.$refs.audioDom.load(); // this.$refs.audioDom.load();
setTimeout(() => { // setTimeout(() => {
this.$refs.audioDom.play(); // this.$refs.audioDom.play();
}, 100); // }, 100);
}, 300); // }, 300);
} }
}); });
}, },
......
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