Commit f77499fc authored by IvyXia123's avatar IvyXia123

chess

parent 1f59f303
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
</div>--> </div>-->
<div class="contentBox"> <div class="contentBox">
<div class="left"> <div class="left">
<img class="header-icon" :src="userDetail.avatar" /> <img class="header-icon" :src="avatarActive" />
<p class="name">{{userDetail.nickname}}</p> <p class="name">{{ nicknameActive }}</p>
</div> </div>
<div class="right"> <div class="right">
<p class="id">学员号:{{userDetail.user_id}}</p> <p class="id">学员号:{{userDetail.user_id}}</p>
...@@ -102,7 +102,9 @@ export default { ...@@ -102,7 +102,9 @@ export default {
phoneNumber: "", phoneNumber: "",
starNum: "", starNum: "",
addressInfo: {}, addressInfo: {},
acitivityType:1 acitivityType:1,
avatarActive: '',
nicknameActive: ''
}; };
}, },
mounted() { mounted() {
...@@ -119,6 +121,17 @@ export default { ...@@ -119,6 +121,17 @@ export default {
// getUserAdressApi().then(res => { // getUserAdressApi().then(res => {
// this.addressInfo = 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 =>{ getStarInfoApi().then(res =>{
if(res.code==500){ if(res.code==500){
this.acitivityType = 2 this.acitivityType = 2
......
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
</ul> </ul>
<!-- 输入框 --> <!-- 输入框 -->
<div class="checkbox-put"> <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 class="checkbox-text">*可输入15-100字</div>
</div> </div>
<!-- btn --> <!-- btn -->
...@@ -44,6 +45,7 @@ ...@@ -44,6 +45,7 @@
<div v-if="shareShow"> <div v-if="shareShow">
<share-page @closeShare="closeShare()" @backList="backList()" :route="query" :totalStarNum="totalStarNum"/> <share-page @closeShare="closeShare()" @backList="backList()" :route="query" :totalStarNum="totalStarNum"/>
</div> </div>
<audio ref="audioDom" id="audioDom" class="audio" :src="audioPoint"></audio>
</div> </div>
</template> </template>
...@@ -53,6 +55,9 @@ ...@@ -53,6 +55,9 @@
import growthRecord from "../../assets/growth_record.png"; import growthRecord from "../../assets/growth_record.png";
import { Toast } from "vant"; import { Toast } from "vant";
import sharePage from "./share"; import sharePage from "./share";
import audioGood from "../../assets/good.mp3";
import audioGreat from "../../assets/great.mp3";
import audioPerfect from "../../assets/perfect.mp3";
export default { export default {
name: 'evaluate', name: 'evaluate',
...@@ -68,6 +73,7 @@ ...@@ -68,6 +73,7 @@
shareShow: false, shareShow: false,
query: {}, query: {},
totalStarNum: 0, totalStarNum: 0,
audioPoint: "",
} }
}, },
components: { components: {
...@@ -91,7 +97,7 @@ ...@@ -91,7 +97,7 @@
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'); 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)) localStorage.setItem('cache', JSON.stringify(this.cache))
}, },
/** /**
...@@ -118,20 +124,7 @@ ...@@ -118,20 +124,7 @@
localStorage.removeItem("cache"); localStorage.removeItem("cache");
// 展示网页生成图片 // 展示网页生成图片
this.shareShow = true this.shareShow = true
this.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);*/
this.$sa.track('buttonClick',{ this.$sa.track('buttonClick',{
tabTitle:'评价', tabTitle:'评价',
...@@ -159,6 +152,22 @@ ...@@ -159,6 +152,22 @@
buttonName:'提交成长记录不提交跳过' buttonName:'提交成长记录不提交跳过'
}); });
this.shareShow = true 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 @@ ...@@ -172,7 +181,7 @@
this.imageNum = cacheObj.imageNum || 0; this.imageNum = cacheObj.imageNum || 0;
this.imageNum2 = cacheObj.imageNum2 || 0; this.imageNum2 = cacheObj.imageNum2 || 0;
this.imageNum3 = cacheObj.imageNum3 || 0; this.imageNum3 = cacheObj.imageNum3 || 0;
this.myHtmlCode = cacheObj.inner || ''; this.myHtmlCode = cacheObj.inner || 0;
}else { }else {
localStorage.removeItem("cache"); localStorage.removeItem("cache");
} }
......
...@@ -19,10 +19,10 @@ ...@@ -19,10 +19,10 @@
</div> </div>
<img class="shareTitle" :src="shareTitle" /> <img class="shareTitle" :src="shareTitle" />
<div class="head-block"> <div class="head-block">
<img :src="userDetail.avatar" /> <img :src="avatarActive" />
</div> </div>
<div class="content-title"> <div class="content-title">
<span class>{{nickname}}</span> <span class>{{nicknameActive}}</span>
<span>家宝宝</span> <span>家宝宝</span>
</div> </div>
</div> </div>
...@@ -89,16 +89,16 @@ ...@@ -89,16 +89,16 @@
<img src="../../assets/icon_copy.png" alt /> <img src="../../assets/icon_copy.png" alt />
<p>以下学习心得,可复制粘贴到朋友圈啦!</p> <p>以下学习心得,可复制粘贴到朋友圈啦!</p>
</div> </div>
<div class="pannel-main" v-html="htmlContent"></div> <div class="pannel-main" v-html="htmlContent"></div>
<div class="pannel-footer"> <div class="pannel-footer">
<span @click="changeText"> <span @click="changeText">
<img :src="icon_change" alt=""> 换一换</span> <img :src="icon_change" alt=""> 换一换</span>
</div>
</div> </div>
</div> <div @click="copyText" class='transparentBtn'>
<div @click="copyText" class='transparentBtn'> 复制心得
复制心得 </div>
</div> </div>-->
</div>-->
</div> </div>
</div> </div>
<img class="canvasImg" @touchstart="touchStart" @touchend="touchEnd" :src="canvasData" alt /> <!-- @touchstart="touchStart" --> <img class="canvasImg" @touchstart="touchStart" @touchend="touchEnd" :src="canvasData" alt /> <!-- @touchstart="touchStart" -->
...@@ -142,7 +142,8 @@ ...@@ -142,7 +142,8 @@
getUserWatchApi, getUserWatchApi,
getShortApi, getShortApi,
subUserLessonApi, subUserLessonApi,
postErrorLogApi postErrorLogApi,
getUserDetailApi
} from "../../service/api"; } from "../../service/api";
import share_code_bg from "../../assets/newLesson/share-code-bg.png"; import share_code_bg from "../../assets/newLesson/share-code-bg.png";
import img_logo from "../../assets/newLesson/logo@2x.png"; import img_logo from "../../assets/newLesson/logo@2x.png";
...@@ -189,13 +190,28 @@ ...@@ -189,13 +190,28 @@
dierkexing: dierkexing, // 三颗星第一第三颗 dierkexing: dierkexing, // 三颗星第一第三颗
diyikexing: diyikexing, // 第二课星 diyikexing: diyikexing, // 第二课星
starNum: 0, starNum: 0,
avatarActive: '',
nicknameActive: ''
}; };
}, },
props: ["route", "totalStarNum"], props: ["route", "totalStarNum"],
mounted() { 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({ Toast.loading({
mask: true, mask: true,
message: "", message: "",
...@@ -1295,17 +1311,17 @@ ...@@ -1295,17 +1311,17 @@
} }
.animated { .animated {
animation: mymove 1s .5s ease; animation: mymove 1s .5s;
animation-fill-mode: forwards; animation-fill-mode: forwards;
} }
.animated1 { .animated1 {
animation: mymove 1s 1s ease; animation: mymove 1s 1s;
animation-fill-mode: forwards; animation-fill-mode: forwards;
} }
.animated2 { .animated2 {
animation: mymove 1s 1.5s ease; animation: mymove 1s 1.5s;
animation-fill-mode: forwards; animation-fill-mode: forwards;
} }
......
...@@ -39,9 +39,9 @@ Vue.config.errorHandler = errorHandler; ...@@ -39,9 +39,9 @@ Vue.config.errorHandler = errorHandler;
Vue.prototype.$throw = (error)=> errorHandler(error,this); Vue.prototype.$throw = (error)=> errorHandler(error,this);
Vue.prototype.$common = common Vue.prototype.$common = common
//VConsole关闭屏蔽代码 //VConsole关闭屏蔽代码
if (process.env.NODE_ENV != 'production') { // if (process.env.NODE_ENV != 'production') {
new VConsole(); // new VConsole();
} // }
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
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