Commit 3865b055 authored by IvyXia123's avatar IvyXia123

三颗星不显示问题

parent 1d1f6e63
......@@ -67,6 +67,8 @@
item.month[k][0].ataer = 1;
// 数据重新整合
for(let i = 0; i < item.month[k].length; i++) {
// console.log(new Date(item.month[k][i].created_at).getDate());
// new Date(returns.openData).getDate()
item.monthArr.push(item.month[k][i])
}
}
......
......@@ -42,7 +42,7 @@
<div class="skip-text" @click="skipTextClick">跳过</div>
</div>
<div v-if="shareShow">
<share-page @closeShare="closeShare()" :route="query" />
<share-page @closeShare="closeShare()" :route="query" :totalStarNum="totalStarNum"/>
</div>
</div>
</template>
......@@ -66,7 +66,8 @@
growthRecord: growthRecord,
scoringCategoryImage: scoringCategory,
shareShow: false,
query: {}
query: {},
totalStarNum: 0
}
},
components: {
......@@ -99,19 +100,20 @@
*/
async userCategoryClick() {
let checkboxPutContenteditable = document.querySelector('.checkbox-put-contenteditable');
let classQuery = JSON.parse(sessionStorage.getItem("classQuery")), // 获取elementId,category_id,periods_id
nowTime = Date.parse(new Date()), // 时间
let nowTime = Date.parse(new Date()), // 时间
classQuery = JSON.parse(sessionStorage.getItem("classQuery")), // 获取elementId,category_id,periods_id
lessonDetail = JSON.parse(localStorage.getItem("lessonDetail")),// 获取延长时间
lookTime = (nowTime - lessonDetail.nowTime) / 1000,
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 }
// 字数限制
if(this.imageNum !== 0 && this.imageNum2 !== 0 && this.imageNum3 !== 0) {
if(checkboxPutContenteditable.innerHTML.length > 15 && checkboxPutContenteditable.innerHTML.length < 100) {
if(this.imageNum !== 0 || this.imageNum !== 0 || this.imageNum !== 0) {
// 提交评价页面
const postUserGrowthAddData = await postUserGrowthAddApi(classQuery.elementId, classQuery.category_id, classQuery.periods_id, data)
// 提交看课数据
const subUserLessonDatac = subUserLessonApi(classQuery.elementId, classQuery.category_id, classQuery.periods_id, watchLog)
const subUserLessonDatac = await subUserLessonApi(classQuery.elementId, classQuery.category_id, classQuery.periods_id, watchLog)
this.totalStarNum = subUserLessonDatac.total_star_num
// 删除缓存
localStorage.removeItem("cache");
// 展示网页生成图片
......@@ -122,17 +124,16 @@
buttonType:'点击',
buttonName:'提交成长记录加一颗星'
});
}else {
Toast("请填写相关信息");
}
}else {
if(checkboxPutContenteditable.innerHTML.length > 100) {
console.log(checkboxPutContenteditable.innerHTML.length)
Toast(`您多输入了${ checkboxPutContenteditable.innerHTML.length - 100 }个字`);
}else if(checkboxPutContenteditable.innerHTML.length < 15){
Toast("输入字数不满15个");
}
}
}else {
Toast("请填写相关信息");
}
},
skipTextClick() {
let classQuery = JSON.parse(sessionStorage.getItem("classQuery"))
......
......@@ -6,7 +6,7 @@
<img :src="img_logo" class="imgLogo" />
<div class="main-content">
<div class="topBox">
<div v-if="starNum == 3">
<div v-if="totalStarNum == 3">
<div class="diyikexing animated">
<img :src="diyikexing" alt="">
</div>
......@@ -101,7 +101,7 @@
</div>-->
</div>
</div>
<img class="canvasImg" @touchstart="touchStart" @touchend="touchEnd" :src="canvasData" alt />
<img class="canvasImg" @touchstart="touchStart" @touchend="touchEnd" :src="canvasData" alt /> <!-- @touchstart="touchStart" -->
<div class="test"></div>
<div class="white-pannel">
<div class="trs"></div>
......@@ -191,10 +191,11 @@
starNum: 0,
};
},
props: ["route"],
props: ["route", "totalStarNum"],
mounted() {
// 判断星星
this.starNum = JSON.parse(localStorage.getItem('lessonDetail')).star_num
console.log(this.starNum)
Toast.loading({
mask: true,
message: "",
......@@ -244,21 +245,21 @@
});
let lessonDetail = JSON.parse(localStorage.getItem("lessonDetail"));
let nowTime = Date.parse(new Date());
let json = {
page_type: 0,
page_id: 4,
stay_time: 0
};
subUserLessonApi(
query.elementId,
query.category_id,
query.periods_id,
json
).then(res => {
lessonDetail.total_watch_time = res;
lessonDetail.nowTime = nowTime;
localStorage.setItem("lessonDetail", JSON.stringify(lessonDetail));
});
// let json = {
// page_type: 0,
// page_id: 4,
// stay_time: 0
// };
// subUserLessonApi(
// query.elementId,
// query.category_id,
// query.periods_id,
// json
// ).then(res => {
// lessonDetail.total_watch_time = res;
// lessonDetail.nowTime = nowTime;
// localStorage.setItem("lessonDetail", JSON.stringify(lessonDetail));
// });
}, 800);
},
touchEnd() {
......
......@@ -62,8 +62,8 @@ export default {
this.page++;
let json = {
page: this.page,
limit: "50",
source:0,
limit: "100",
source:'0,5',
periods_id:this.$route.query.starInfo.periods_id
};
getUserIntegralListApi(json).then(res => {
......
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