Commit f77499fc authored by IvyXia123's avatar IvyXia123

chess

parent 1f59f303
......@@ -8,8 +8,8 @@
</div>-->
<div class="contentBox">
<div class="left">
<img class="header-icon" :src="userDetail.avatar" />
<p class="name">{{userDetail.nickname}}</p>
<img class="header-icon" :src="avatarActive" />
<p class="name">{{ nicknameActive }}</p>
</div>
<div class="right">
<p class="id">学员号:{{userDetail.user_id}}</p>
......@@ -102,7 +102,9 @@ export default {
phoneNumber: "",
starNum: "",
addressInfo: {},
acitivityType:1
acitivityType:1,
avatarActive: '',
nicknameActive: ''
};
},
mounted() {
......@@ -119,6 +121,17 @@ export default {
// getUserAdressApi().then(res => {
// this.addressInfo = res;
// });
getUserDetailApi()
.then(res => {
console.log(res)
this.avatarActive = res.avatar
this.nicknameActive = res.nickname
localStorage.setItem("userDesc", JSON.stringify(res));
})
.catch(res => {
if (localStorage.getItem("userDesc")) {
}
});
getStarInfoApi().then(res =>{
if(res.code==500){
this.acitivityType = 2
......
......@@ -28,7 +28,8 @@
</ul>
<!-- 输入框 -->
<div class="checkbox-put">
<div contenteditable="true" class="checkbox-put-contenteditable" v-text="myHtmlCode" @input="handleInput" placeholder="点击输入宝贝今天的学习表现、收获…"></div>
<!-- <div contenteditable="true" class="checkbox-put-contenteditable" v-text="myHtmlCode" @input="handleInput" placeholder="点击输入宝贝今天的学习表现、收获…"></div>-->
<textarea class="checkbox-put-contenteditable" v-model="myHtmlCode" @change="handleInput"></textarea>
<div class="checkbox-text">*可输入15-100字</div>
</div>
<!-- btn -->
......@@ -44,6 +45,7 @@
<div v-if="shareShow">
<share-page @closeShare="closeShare()" @backList="backList()" :route="query" :totalStarNum="totalStarNum"/>
</div>
<audio ref="audioDom" id="audioDom" class="audio" :src="audioPoint"></audio>
</div>
</template>
......@@ -53,6 +55,9 @@
import growthRecord from "../../assets/growth_record.png";
import { Toast } from "vant";
import sharePage from "./share";
import audioGood from "../../assets/good.mp3";
import audioGreat from "../../assets/great.mp3";
import audioPerfect from "../../assets/perfect.mp3";
export default {
name: 'evaluate',
......@@ -68,6 +73,7 @@
shareShow: false,
query: {},
totalStarNum: 0,
audioPoint: "",
}
},
components: {
......@@ -91,7 +97,7 @@
handleInput(e){
let classQuery = JSON.parse(sessionStorage.getItem("classQuery"))
let checkboxPutContenteditable = document.querySelector('.checkbox-put-contenteditable');
this.cache = Object.assign({}, this.cache, { inner: checkboxPutContenteditable.innerHTML, 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))
},
/**
......@@ -118,20 +124,7 @@
localStorage.removeItem("cache");
// 展示网页生成图片
this.shareShow = true
/*setTimeout(() => {
if (this.$store.state.lookStatus == 0) {
this.audioPoint = audioGood;
} else if (this.$store.state.lookStatus == 1) {
this.audioPoint = audioGreat;
} else {
this.audioPoint = audioPerfect;
}
this.$refs.audioDom.load();
setTimeout(() => {
this.$refs.audioDom.play();
}, 100);
}, 300);*/
this.audioFn()
this.$sa.track('buttonClick',{
tabTitle:'评价',
......@@ -159,6 +152,22 @@
buttonName:'提交成长记录不提交跳过'
});
this.shareShow = true
this.audioFn()
},
audioFn(){
setTimeout(() => {
if (this.$store.state.lookStatus == 0) {
this.audioPoint = audioGood;
} else if (this.$store.state.lookStatus == 1) {
this.audioPoint = audioGreat;
} else {
this.audioPoint = audioPerfect;
}
this.$refs.audioDom.load();
setTimeout(() => {
this.$refs.audioDom.play();
}, 100);
}, 300);
},
/**
* 初始化
......@@ -172,7 +181,7 @@
this.imageNum = cacheObj.imageNum || 0;
this.imageNum2 = cacheObj.imageNum2 || 0;
this.imageNum3 = cacheObj.imageNum3 || 0;
this.myHtmlCode = cacheObj.inner || '';
this.myHtmlCode = cacheObj.inner || 0;
}else {
localStorage.removeItem("cache");
}
......
......@@ -19,10 +19,10 @@
</div>
<img class="shareTitle" :src="shareTitle" />
<div class="head-block">
<img :src="userDetail.avatar" />
<img :src="avatarActive" />
</div>
<div class="content-title">
<span class>{{nickname}}</span>
<span class>{{nicknameActive}}</span>
<span>家宝宝</span>
</div>
</div>
......@@ -142,7 +142,8 @@
getUserWatchApi,
getShortApi,
subUserLessonApi,
postErrorLogApi
postErrorLogApi,
getUserDetailApi
} from "../../service/api";
import share_code_bg from "../../assets/newLesson/share-code-bg.png";
import img_logo from "../../assets/newLesson/logo@2x.png";
......@@ -189,13 +190,28 @@
dierkexing: dierkexing, // 三颗星第一第三颗
diyikexing: diyikexing, // 第二课星
starNum: 0,
avatarActive: '',
nicknameActive: ''
};
},
props: ["route", "totalStarNum"],
mounted() {
// 判断星星
// this.starNum = JSON.parse(localStorage.getItem('lessonDetail')).star_num
// console.log(this.starNum)
getUserDetailApi()
.then(res => {
console.log(res)
this.avatarActive = res.avatar
this.nicknameActive = res.nickname
localStorage.setItem("userDesc", JSON.stringify(res));
})
.catch(res => {
if (localStorage.getItem("userDesc")) {
}
});
this.starNum = JSON.parse(localStorage.getItem('lessonDetail')).star_num
console.log(this.starNum)
Toast.loading({
mask: true,
message: "",
......@@ -1295,17 +1311,17 @@
}
.animated {
animation: mymove 1s .5s ease;
animation: mymove 1s .5s;
animation-fill-mode: forwards;
}
.animated1 {
animation: mymove 1s 1s ease;
animation: mymove 1s 1s;
animation-fill-mode: forwards;
}
.animated2 {
animation: mymove 1s 1.5s ease;
animation: mymove 1s 1.5s;
animation-fill-mode: forwards;
}
......
......@@ -39,9 +39,9 @@ Vue.config.errorHandler = errorHandler;
Vue.prototype.$throw = (error)=> errorHandler(error,this);
Vue.prototype.$common = common
//VConsole关闭屏蔽代码
if (process.env.NODE_ENV != 'production') {
new VConsole();
}
// if (process.env.NODE_ENV != 'production') {
// new VConsole();
// }
router.beforeEach((to, from, next) => {
next()
......
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