Commit 3b451003 authored by 罗超's avatar 罗超

2

parent 59b0eaae
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
innerAudioContext.autoplay = false; innerAudioContext.autoplay = false;
export default { export default {
props: { props: {
type:{ type: {
type: Number, type: Number,
default: 0 default: 0
}, },
...@@ -63,12 +63,18 @@ ...@@ -63,12 +63,18 @@
} }
}, },
setup(props) { setup(props) {
const url=ref('./cesi.mp3') const methods = {
const methods={ play() {
play(){ innerAudioContext.src=props.item.FileUrl
// innerAudioContext.src=props.item.FileUrl
innerAudioContext.src=url
innerAudioContext.play() innerAudioContext.play()
// innerAudioContext.src =
// decodeURIComponent('http%3A%2F%2Fimgfile.oytour.com%2FEduSystem%2FTest%2FUpload%2FAttachment%2F20210413060328967.mp3')
// if(innerAudioContext.pause){
// }else{
// innerAudioContext.pause()
// }
// console.log(innerAudioContext)
} }
} }
return { return {
......
...@@ -9,19 +9,7 @@ ...@@ -9,19 +9,7 @@
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},{ }, {
"path": "pages/study/index",
"style": {
"navigationStyle": "custom"
}
},{
"path": "pages/study/courseList"
},{
"path": "pages/study/studyComplete",
"style": {
"navigationStyle": "custom"
}
},{
"path": "pages/login/login", "path": "pages/login/login",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
...@@ -39,11 +27,11 @@ ...@@ -39,11 +27,11 @@
}, { }, {
"path": "pages/activity/activityMedia" //活动图片、视频 "path": "pages/activity/activityMedia" //活动图片、视频
}, { }, {
"path": "pages/person/person", "path": "pages/person/person",
"style":{ "style": {
"navigationBarTitleText":"个人中心", "navigationBarTitleText": "个人中心",
"backgroundColor":"#f5f5f5", "backgroundColor": "#f5f5f5",
"navigationBarBackgroundColor":"#f5f5f5" "navigationBarBackgroundColor": "#f5f5f5"
} }
}], }],
"subPackages": [{ "subPackages": [{
...@@ -105,12 +93,24 @@ ...@@ -105,12 +93,24 @@
}] }]
}, },
{ {
"root": "pages/word", //单词分包 "root": "pages/study", //学习分包
"pages": [{ "pages": [{
"path": "index", //
"style": {
"navigationStyle": "custom"
}
}, {
"path": "word", // "path": "word", //
"style":{ "style": {
"backgroundColor":"#f5f5f5", "backgroundColor": "#f5f5f5",
"navigationBarBackgroundColor":"#f5f5f5" "navigationBarBackgroundColor": "#f5f5f5"
}
},{
"path": "courseList"
},{
"path": "studyComplete",
"style": {
"navigationStyle": "custom"
} }
}] }]
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
首页 首页
</view> </view>
<view class="loginBox"> <view class="loginBox">
<indexassembly @success='againdata'> <indexassembly @success='againdata' v-if="userData.AccountId==0">
<view class="flex_start_center"> <view class="flex_start_center">
<image <image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/login2x.png" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/login2x.png"
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
登录 登录
</view> </view>
</indexassembly> </indexassembly>
<view class="" v-else>
{{userData.AccountName}}
</view>
</view> </view>
<view class="scanBox"> <view class="scanBox">
...@@ -168,6 +171,7 @@ ...@@ -168,6 +171,7 @@
}, },
ActivityList: [], ActivityList: [],
pageData: {}, pageData: {},
userData:{}
}); });
let methods = { let methods = {
...@@ -203,6 +207,8 @@ ...@@ -203,6 +207,8 @@
onMounted(() => { onMounted(() => {
methods.getIndexData(); methods.getIndexData();
data.userData=uni.getStorageSync('userInfo');
console.log(208,data.userData)
}); });
return { return {
...toRefs(data), ...toRefs(data),
......
<template> <template>
<view class="word"> <view class="word">
<swiper class="swiper" next-margin="60rpx"> <swiper class="swiper" next-margin="60rpx" @change="swiperChange" :current="85">
<swiper-item v-for="(item,index) in StudyList" :key="index" class="swiper-item" > <swiper-item v-for="(item,index) in StudyList" :key="index" class="swiper-item" >
<Pronunciation :item="item" :cur="index+1" :total="StudyList.length"></Pronunciation> <Pronunciation :item="item" :cur="index+1" :total="StudyList.length"></Pronunciation>
</swiper-item> </swiper-item>
...@@ -46,6 +46,12 @@ ...@@ -46,6 +46,12 @@
data.StudyList=res.Data.StudyList data.StudyList=res.Data.StudyList
data.ReviewList=res.Data.ReviewList data.ReviewList=res.Data.ReviewList
}) })
},
swiperChange(val){
const total=data.StudyList.length+data.ReviewList.length
if(val.detail.current+1==total&&total>0){
console.log(val,1111111111111111111)
}
} }
} }
onMounted(() => { onMounted(() => {
......
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