Commit 134d02db authored by 罗超's avatar 罗超

2

parent b0510cf0
<template> <template>
<view class="wordPronItem"> <view class="wordPronItem">
<view class="num"> <view class="num">
1/26 {{cur}}/{{total}}<text style="margin-left: 6rpx;">{{type==0?'':"复习"}}</text>
</view>
<view class="meaning">
{{item.ChineseMean}}
</view>
<view class="Japanese">
{{item.WordWrite}}
</view>
<view class="desc">
<view class="attr">
{{item.WordType}}
</view>
<view class="hiragana">
{{item.WordContent}}
</view>
</view>
<view class="listen" @click="play">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/laba2x.png"
mode="aspectFit" class="listenIcon"></image>
</view>
<view class="listenText">
播放读音
</view> </view>
</view> </view>
</template> </template>
...@@ -18,27 +39,40 @@ ...@@ -18,27 +39,40 @@
onMounted, onMounted,
provide, provide,
} from "vue"; } from "vue";
const innerAudioContext = uni.createInnerAudioContext();
innerAudioContext.autoplay = false;
export default { export default {
components: { props: {
type:{
}, type: Number,
props:{ default: 0
item:{ },
type:Object, cur: {
default:()=>{return {}} type: Number,
default: 0
},
total: {
type: Number,
default: 0
},
item: {
type: Object,
default: () => {
return {}
}
} }
}, },
setup(){ setup(props) {
let data = reactive({ const url=ref('./cesi.mp3')
const methods={
play(){
}) // innerAudioContext.src=props.item.FileUrl
let methods = { innerAudioContext.src=url
innerAudioContext.play()
}
} }
return { return {
...toRefs(data), ...methods
...methods,
}; };
} }
} }
...@@ -48,12 +82,84 @@ ...@@ -48,12 +82,84 @@
.wordPronItem { .wordPronItem {
width: 640rpx; width: 640rpx;
height: 990rpx; height: 990rpx;
box-shadow: 0rpx 15rpx 80rpx 0rpx #E9E9E9;
border-radius: 24rpx;
margin: 100rpx auto 0;
} }
.wordPronItem .num { .wordPronItem .num {
font-size: 26rpx; font-size: 26rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 700;
color: #999999;
padding: 50rpx 0 110rpx 0;
text-align: center;
}
.meaning {
font-size: 28rpx;
font-weight: 500;
color: #111111;
margin-bottom: 80rpx;
text-align: center;
}
.Japanese {
font-size: 60rpx;
font-weight: bold; font-weight: bold;
color: #111111;
text-align: center;
margin-bottom: 60rpx;
}
.wordPronItem .desc {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 200rpx;
}
.wordPronItem .attr {
background-color: #E8E9EA;
border-radius: 6rpx;
display: flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
padding: 5rpx 10rpx;
line-height: 30rpx;
margin-right: 15rpx;
font-size: 24rpx;
font-weight: 500;
color: #666666;
}
.wordPronItem .hiragana {
font-size: 28rpx;
font-weight: 500;
color: #999999; color: #999999;
} }
.listen {
width: 170rpx;
height: 170rpx;
background-color: #E4E5FB;
border-radius: 50%;
margin: 0 auto 30rpx;
display: flex;
justify-content: center;
align-items: center;
}
.listenIcon {
width: 55rpx;
height: 55rpx;
}
.listenText {
font-size: 22rpx;
font-weight: 500;
color: #B8B8B8;
text-align: center;
}
</style> </style>
...@@ -102,7 +102,11 @@ ...@@ -102,7 +102,11 @@
{ {
"root": "pages/word", //单词分包 "root": "pages/word", //单词分包
"pages": [{ "pages": [{
"path": "word" // "path": "word", //
"style":{
"backgroundColor":"#f5f5f5",
"navigationBarBackgroundColor":"#f5f5f5"
}
}] }]
} }
], ],
......
<template> <template>
<view class="indexpage"> <view class="indexpage">
<van-sticky > <van-sticky>
<navbar class="navbarSticky"> <navbar class="navbarSticky">
<view class="navbarCon"> <view class="navbarCon">
<view class="pagetitle" @click="jumpPage('/pages/login/login')"> <view class="pagetitle" @click="jumpPage('/pages/login/login')">
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
mode="aspectFit" class="loginIcon" id="loadImg"></image> mode="aspectFit" class="loginIcon" id="loadImg"></image>
登录 登录
</view> </view>
</indexassembly> </indexassembly>
</view> </view>
<view class="scanBox" @click="jumpPage('/pages/word/word')"> <view class="scanBox">
<image <image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/scan2x.png" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/scan2x.png"
mode="aspectFit" class="scanIcon"></image> mode="aspectFit" class="scanIcon"></image>
...@@ -51,18 +51,19 @@ ...@@ -51,18 +51,19 @@
<view class="flex_around_center "> <view class="flex_around_center ">
<view class="wordItem"> <view class="wordItem">
<text class="wordItemTitle">今日新词</text> <text class="wordItemTitle">今日新词</text>
<text class="wordItemText">{{pageData.Words.NextWord}}<text class="wordItemTextUnit"></text></text> <text class="wordItemText">{{pageData.Words.NextWord||0}}<text class="wordItemTextUnit"></text></text>
</view> </view>
<view class="wordItem"> <view class="wordItem">
<text class="wordItemTitle">复习词语</text> <text class="wordItemTitle">复习词语</text>
<text class="wordItemText">{{pageData.Words.ReviewWord}} <text <text class="wordItemText">{{pageData.Words.ReviewWord||0}} <text
class="wordItemTextUnit"></text></text> class="wordItemTextUnit"></text></text>
</view> </view>
</view> </view>
<view class="wordDuration"> <view class="wordDuration">
预计用时10分钟 预计用时10分钟
</view> </view>
<view class="wordBtn"> <view class="wordBtn"
@click="jumpPage(`/pages/word/word?CourseId=${pageData.Words.CourseId}&&ChapterId=${pageData.Words.NextCourseNo}&&PrevChapterId=${pageData.Words.ReviewCourseNo}`)">
开始学习 开始学习
</view> </view>
</view> </view>
...@@ -82,10 +83,10 @@ ...@@ -82,10 +83,10 @@
</view> </view>
<view class="flex"> <view class="flex">
<view class="courseNameBox"> <view class="courseNameBox">
<view class="className"> <view class="className one_line">
{{pageData.ClassNext.ClassName||'暂无'}} {{pageData.ClassNext.ClassName||'暂无'}}
</view> </view>
<view class="courseName"> <view class="courseName one_line">
{{pageData.ClassNext.CourseName||'暂无'}} {{pageData.ClassNext.CourseName||'暂无'}}
</view> </view>
</view> </view>
...@@ -193,10 +194,10 @@ ...@@ -193,10 +194,10 @@
console.log(168, formatres) console.log(168, formatres)
return formatres return formatres
}, },
againdata(){ againdata() {
data.pageData = uni.getStorageSync("userInfo"); data.pageData = uni.getStorageSync("userInfo");
methods.getIndexData(); methods.getIndexData();
methods.getActivityData(); methods.getActivityData();
} }
}; };
...@@ -240,11 +241,13 @@ ...@@ -240,11 +241,13 @@
box-sizing: border-box; box-sizing: border-box;
padding-bottom: 40rpx; padding-bottom: 40rpx;
} }
.navbarSticky{
.navbarSticky {
display: sticky; display: sticky;
top: 0; top: 0;
z-index: 9; z-index: 9;
} }
.navbarCon { .navbarCon {
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
...@@ -404,6 +407,8 @@ ...@@ -404,6 +407,8 @@
.wordBtn { .wordBtn {
width: 130rpx; width: 130rpx;
height: 50rpx; height: 50rpx;
text-align: center;
line-height: 50rpx;
background-color: #4C50E7; background-color: #4C50E7;
border-radius: 25rpx; border-radius: 25rpx;
margin: 10rpx auto; margin: 10rpx auto;
...@@ -411,9 +416,6 @@ ...@@ -411,9 +416,6 @@
font-family: PingFang SC; font-family: PingFang SC;
font-weight: bold; font-weight: bold;
color: #FEFEFF; color: #FEFEFF;
display: flex;
justify-content: center;
align-items: center;
} }
.courseBox { .courseBox {
...@@ -489,14 +491,14 @@ ...@@ -489,14 +491,14 @@
.courseName { .courseName {
width: 355rrpx; width: 355rrpx;
height: 75rpx; height: 75rpx;
line-height: 73rpx;
background-color: #F5F5F5; background-color: #F5F5F5;
border-radius: 35rpx; border-radius: 35rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 42rpx; font-size: 42rpx;
font-weight: bold; font-weight: bold;
color: #111111; color: #111111;
padding: 0 10rpx;
box-sizing: border-box;
} }
.learningGarden { .learningGarden {
......
<template> <template>
<view class="word"> <view class="word">
<swiper class="swiper"> <swiper class="swiper" next-margin="60rpx">
<swiper-item v-for="(item,index) in test" :key="index"> <swiper-item v-for="(item,index) in StudyList" :key="index" class="swiper-item" >
<view class="swiper-item uni-bg-green">index</view> <Pronunciation :item="item" :cur="index+1" :total="StudyList.length"></Pronunciation>
<Pronunciation></Pronunciation> </swiper-item>
<swiper-item v-for="(item,index) in ReviewList" :key="index" class="swiper-item" >
<Pronunciation :item="item" :cur="index+1" :total="ReviewList.length" :type="1"></Pronunciation>
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
...@@ -27,12 +29,24 @@ ...@@ -27,12 +29,24 @@
Pronunciation Pronunciation
}, },
setup(props) { setup(props) {
let {proxy} = getCurrentInstance();
let data = reactive({ let data = reactive({
test: [1,2,3] test: [1,2,3],
msg:{
ChapterId:0,
CourseId:0,
PrevChapterId:0,
},
StudyList:[],
ReviewList:[],
}) })
let methods = { let methods = {
getData(){
proxy.$request('/AppletWords/GetStudyWords',data.msg).then(res=>{
data.StudyList=res.Data.StudyList
data.ReviewList=res.Data.ReviewList
})
}
} }
onMounted(() => { onMounted(() => {
...@@ -43,10 +57,14 @@ ...@@ -43,10 +57,14 @@
...methods, ...methods,
}; };
}, },
onLoad(option) { onLoad(options) {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: '新的标题' title: '新的标题'
}); });
this.msg.ChapterId=options.ChapterId
this.msg.CourseId=options.CourseId
this.msg.PrevChapterId=options.PrevChapterId
this.getData()
}, },
} }
</script> </script>
...@@ -56,4 +74,13 @@ ...@@ -56,4 +74,13 @@
min-height: 100vh; min-height: 100vh;
background-color: #F5F5F5; background-color: #F5F5F5;
} }
</style> .word .swiper{
min-height: 100vh;
background-color: #F5F5F5;
}
.word .swiper-item{
min-height: 100vh;
background-color: #F5F5F5;
/* padding-left: 55rpx; */
}
</style>
\ No newline at end of file
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