Commit b2047a44 authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/youjie/thinkapp

# Conflicts:
#	src/pages/index/index.vue
parents efceaef5 1cfb0f4f
<template> <template>
<view class="indexpage" :class="[{'no-scroll':SurveyObj.ActivitySurveyId>0}]"> <view class="indexpage">
<view v-if="false"> <navbar class="navbarSticky" bg="#F6F6F6">
<navbar class="navbarSticky" bg="#F5F5F5"> <view class="index-header-box">
<view class="navbarCon"> <view class="index-header-img">
<view class="pagetitle"> <van-image width="54rpx" height="50rpx" fit="cover" class="img"
首页 src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653464014000_713.png" />
</view>
<view class="loginBox">
<view v-if="userData && userData.AccountName && userData.AccountId>0">
{{userData.AccountName}}
</view>
<indexassembly @success='againdata' v-else>
<view class="flex_start_center">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/login2x.png"
mode="aspectFit" class="loginIcon" id="loadImg"></image>
登录
</view>
</indexassembly>
</view>
<!-- 扫码登陆 -->
<view class="scanBox" @click="scan">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/scan2x.png"
mode="aspectFit" class="scanIcon">
</image>
</view>
</view>
</navbar>
<view class="activeContent" v-if="ActivityList.length > 0">
<swiper class="swiper" :indicator-dots="indicatorDots" :autoplay="autoplay" indicator-color="#CCCCCC"
indicator-active-color="#000000" :vertical="true" circular>
<swiper-item v-for="(item, index) in ActivityList" :key="index" @click="goActiveDetail(item.Id)">
<view class="swiperList" :style="{
'background-image': item.CoverImg
? `url(${item.CoverImg})`
: `url(https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/defaultBgimg.png)`,
}">
<view class="swiper_Time">{{ item.BMStart }}</view>
<view class="swiper_Name">{{ item.ActivityName }}</view>
</view>
</swiper-item>
</swiper>
</view>
<view class="wordBox">
<view class="wordTitle">
单词练习
</view>
<view class="flex_around_center ">
<view class="wordItem">
<text class="wordItemTitle">今日新词</text>
<text class="wordItemText">{{pageData.Words.NextWord||0}}<text
class="wordItemTextUnit"></text></text>
</view>
<view class="wordItem">
<text class="wordItemTitle">复习词语</text>
<text class="wordItemText">{{pageData.Words.ReviewWord||0}} <text
class="wordItemTextUnit"></text></text>
</view>
</view>
<view class="wordDuration" style="visibility: hidden;">
预计用时10分钟
</view>
<view style="text-align: center;font-size: 22rpx;color: #4C50E7;"
v-if="(pageData.Words.NextWord==0||!pageData.Words.NextWord)&&(pageData.Words.ReviewWord==0||!pageData.Words.ReviewWord)">
暂无新词</view>
<view class="wordBtn" v-else
@click="jumpPage(`/pages/word/word?CourseId=${pageData.Words.CourseId||0}&&ChapterId=${pageData.Words.NextCourseNo||0}&&ReviewChapterId=${pageData.Words.ReviewCourseNo||0}&&ClassId=${pageData.Words.ClassId||0}`)">
开始学习
</view>
</view>
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/coffee/xbkbanner2.png"
mode="widthFix" class="starbucks" @click="jumpJiahemini"></image>
<view class="courseBox">
<view class="courseInnerBox" @click="jumpTimetable">
<view class="top">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/classtime.png"
mode="aspectFit" class="courseIcon"></image>
<text class="courseDateStr"
style="margin: 0 16rpx 0 8rpx;">{{pageData.ClassNext.DateStr||'暂无'}}</text>
<text class="courseDateStr"
v-if="pageData.ClassNext.DateStart">{{pageData.ClassNext.DateStart}}</text>
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/classroom.png"
mode="aspectFit" class="courseIcon" style="margin: 0 12rpx 0 50rpx;"></image>
<text class="courseDateStr"
style="margin-right: 30rpx;">{{pageData.ClassNext.RoomName||'暂无'}}</text>
</view>
<view class="flex">
<view class="courseNameBox">
<view class="className one_line">
{{pageData.ClassNext.ClassName||'暂无'}}
</view>
<view class="courseName one_line">
{{pageData.ClassNext.CourseName||'暂无'}}
</view>
</view>
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/female2x.png"
mode="aspectFit" class="courseIcon2"></image>
</view>
</view>
<view class="courseTitle">
<text v-if="pageData.ClassNext.ClassPlanState==1">上课中</text>
<text v-else-if="pageData.ClassNext.ClassPlanState==2">下节课</text>
<text v-else>暂无</text>
</view>
</view>
<view class="learningGarden" v-if="pageData.LearningGardenList.length>0">
<view class="learningGardenSbutitle">
扩展学习
</view> </view>
<view v-for="(item,index) in pageData.LearningGardenList" :key="index" v-if="item.List.length>0"> <view class="index-header-tetx">
<view class="learningGardenTitle"> <view class="index-header-title">
<text>{{item.Name}}</text> welcome
<view style="
height: 60rpx;
font-size: 24rpx;
font-weight: 500;
color: #4C50E7;display: flex;align-items: center;" @click="jumpGarden(item.Id)">查看更多
<van-icon name="arrow" />
</view>
</view>
<view class="gardenCon" v-for="(item1,index1) in item.List" :key="index1" id="img"
@click="jumpPage(`/pages/learningGarden/learningGardenDetails?Id=${item1.Id}`)">
<image :src="item1.Img" mode="aspectFill" :id="'img'+index1"
style="width: 100%;height:100%;border-radius: 24rpx 24rpx 0 0;"></image>
<view class="gardenTextBox"
:style="{'background':`linear-gradient(to bottom,${item1.bgcolor},${item1.bgcolor1} , ${item1.bgcolor2})` }">
<view class="gardenTitle one_line">
{{item1.Title}}
</view>
<view class="gardenDigest one_line">
{{item1.Digest}}
</view>
</view>
</view> </view>
<view class="index-header-name">周一围</view>
</view> </view>
</view> </view>
<bottom></bottom> </navbar>
<canvas canvas-id="myCanvas" class="canvas" style="position:absolute;left: -1000px;"></canvas>
<van-toast id="van-toast" />
<view class="diaocha-box" v-if="SurveyObj.ActivitySurveyId>0">
<image @click="goTongji()" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1652251724000_835.png" mode="widthFix"></image>
</view>
</view>
<view>
<view class="navbarCon">
</view>
<course-card></course-card>
</view>
</view> </view>
</template> </template>
...@@ -179,7 +43,6 @@ ...@@ -179,7 +43,6 @@
import indexassembly from './components/indexassembly.vue' import indexassembly from './components/indexassembly.vue'
import navbar from '../../components/navbar.vue' import navbar from '../../components/navbar.vue'
import bottom from '../../components/bottom.vue' import bottom from '../../components/bottom.vue'
import courseCard from '../../components/index/course-card.vue'
export default { export default {
// data(){ // data(){
// return{ // return{
...@@ -189,8 +52,7 @@ ...@@ -189,8 +52,7 @@
components: { components: {
indexassembly, indexassembly,
navbar, navbar,
bottom, bottom
courseCard
}, },
setup(props) { setup(props) {
let { let {
...@@ -231,7 +93,7 @@ ...@@ -231,7 +93,7 @@
}, },
//跳转至详情 //跳转至详情
goActiveDetail(Id) { goActiveDetail(Id) {
this.jumpPage(`/pages/activity/activityDetails?Id=${Id}`); // this.jumpPage(`/pages/activity/activityDetails?Id=${Id}`);
}, },
base64_decode(data) { base64_decode(data) {
var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
...@@ -424,371 +286,45 @@ ...@@ -424,371 +286,45 @@
</script> </script>
<style scoped> <style scoped>
.indexpage { .index-header-name{
min-height: 100vh; font-size: 30rpx;
background-color: #F5F5F5; color: #474747;
box-sizing: border-box;
}
.wenjuan_dc {
position: fixed;
width: 83rpx;
height: 83rpx;
right: 30rpx;
bottom: 200rpx;
z-index: 999;
}
.wenjuan_dc img {
width: 100%;
height: 100%;
}
.navbarSticky {
display: sticky;
top: 0;
z-index: 9;
} }
.index-header-tetx{
.navbarCon { color: #D0D0D0;
height: 100%;
box-sizing: border-box;
padding: 0 30rpx;
display: flex;
align-items: center;
background-color: #F5F5F5;
}
.pagetitle {
font-size: 46rpx;
font-weight: 800;
color: #111111;
margin-right: 30rpx;
}
.loginBox {
width: 110rpx;
height: 100%;
display: flex;
align-items: center;
font-size: 24rpx; font-size: 24rpx;
font-family: PingFang SC;
font-weight: 800;
color: #4C50E7;
margin-right: 220rpx;
}
.loginIcon {
width: 50rpx;
height: 50rpx;
margin-right: 10rpx;
}
.scanBox {
width: 40rpx;
display: flex;
flex-wrap: wrap;
}
.scanIcon {
width: 40rpx;
height: 40rpx;
} }
.index-header-img .img{
.scanText { display: block;
font-size: 20rpx; border: 1rpx solid #E3E3E3;
font-family: PingFang SC; border-radius: 50%;
font-weight: 800;
color: #111111;
line-height: 20rpx;
}
.activeContent {
width: 100%;
height: 300rpx;
border-radius: 20rpx;
margin: 40rpx 0 60rpx 0;
overflow: hidden; overflow: hidden;
box-sizing: border-box;
padding: 0 30rpx;
} }
.index-header-img{
.swiperList { width: 60rpx;
position: relative; height: 60rpx;
width: 100%; border-radius: 50%;
height: 300rpx;
background-size: cover;
background-repeat: no-repeat;
background-position: center;
background-clip: border-box;
box-sizing: border-box;
overflow: hidden; overflow: hidden;
color: #fff;
border-radius: 20rpx;
}
.swiper_Time {
position: absolute;
top: 20rpx;
right: 40rpx;
font-size: 26rpx;
}
.swiper_Name {
position: absolute;
bottom: 20rpx;
left: 30rpx;
font-size: 26rpx;
}
.swiper {
height: 100%;
position: relative;
border-radius: 20rpx;
}
.swiper /deep/ .wx-swiper-dot {
width: 10rpx;
height: 10rpx;
margin-right: 0;
}
.wordBox {
box-sizing: border-box;
/* height: 390rpx; */
background-color: #EBEBEB;
padding: 60rpx 30rpx;
margin-bottom: 20rpx;
}
.wordTitle {
font-size: 28rpx;
font-weight: bold;
color: #111111;
margin-bottom: 45rpx;
}
.wordItem {
width: 200rpx;
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.wordItemTitle {
width: 100%;
font-size: 22rpx;
font-weight: 500;
color: #666666;
text-align: center;
margin-bottom: 10rpx;
}
.wordItemText {
font-size: 78rpx;
line-height: 60rpx;
font-weight: 800;
font-style: italic;
color: #111111;
white-space: nowrap;
}
.wordItemTextUnit {
font-size: 22rpx;
font-weight: 400;
font-style: normal;
margin-left: 10rpx;
}
.wordDuration {
margin: 50rpx 0 15rpx;
font-size: 22rpx;
font-weight: 500;
color: #999999;
text-align: center;
}
.wordBtn {
width: 130rpx;
height: 50rpx;
text-align: center; text-align: center;
line-height: 50rpx; margin-right: 20rpx;
background-color: #4C50E7; background: #FFFFFF;
border-radius: 25rpx; padding: 4rpx;
margin: 10rpx auto;
font-size: 22rpx;
font-family: PingFang SC;
font-weight: bold;
color: #FEFEFF;
}
.courseBox {
width: 690rpx;
margin: 0 auto;
height: 350rpx;
background: linear-gradient(0deg, #FFFFFF, #4C50E7);
box-shadow: 2rpx 4rpx 40rpx 0rpx rgba(212, 212, 212, 0.6);
border-radius: 24rpx;
box-sizing: border-box;
padding: 10rpx;
position: relative;
margin-bottom: 80rpx;
}
.courseInnerBox {
width: 100%;
height: 100%;
background-color: #FFFFFF;
border-radius: 24rpx;
}
.courseTitle {
box-sizing: border-box;
padding: 10rpx 20rpx 10rpx 10rpx;
background: linear-gradient(0deg, #6C70EB, #505FEB);
position: absolute;
top: 10rpx;
left: 10rpx;
border-bottom-right-radius: 30rpx;
font-size: 28rpx;
font-weight: 500;
color: #FFFFFF;
}
.courseInnerBox .top {
display: flex;
justify-content: flex-end;
align-items: center;
height: 60rpx;
margin-bottom: 50rpx;
}
.courseIcon {
width: 30rpx;
height: 30rpx;
}
.courseDateStr {
font-size: 22rpx;
font-weight: 500;
color: #111111;
}
.courseIcon2 {
width: 235rpx;
height: 225rpx;
} }
.indexpage {
.courseNameBox { min-height: 100vh;
width: 410rpx;
box-sizing: border-box;
padding: 0 25rpx;
}
.className {
font-size: 22rpx;
font-weight: 500;
color: #666666;
margin-bottom: 20rpx;
}
.courseName {
width: 355rrpx;
height: 75rpx;
line-height: 73rpx;
background-color: #F5F5F5; background-color: #F5F5F5;
border-radius: 35rpx;
font-size: 42rpx;
font-weight: bold;
color: #111111;
padding: 0 10rpx;
box-sizing: border-box; box-sizing: border-box;
} }
.index-header-box{
.learningGarden {
box-sizing: border-box;
padding: 0 30rpx;
}
.learningGardenSbutitle {
font-size: 28rpx;
font-weight: 500;
color: #666666;
margin-bottom: 30rpx;
}
.learningGardenTitle {
font-size: 46rpx;
font-weight: 800;
color: #111111;
margin-bottom: 50rpx;
display: flex; display: flex;
justify-content: space-between; flex-direction: row;
align-items: center; align-items: center;
padding:29rpx 42rpx ;
} }
.navbarSticky {
.gardenCon { display: sticky;
width: 680rpx;
height: 455rpx;
border-radius: 24rpx;
margin-bottom: 60rpx;
overflow: hidden;
position: relative;
}
.gardenTextBox {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 180rpx;
background: linear-gradient(0deg, #FBD140);
box-sizing: border-box;
padding: 80rpx 40rpx 0;
overflow: hidden;
}
.gardenTitle {
font-size: 28rpx;
font-weight: bold;
color: #FFFFFF;
white-space: nowrap;
}
.gardenDigest {
font-size: 20rpx;
font-weight: 500;
color: #FFFFFF;
margin-top: 15rpx;
white-space: nowrap;
}
.starbucks {
display: block;
width: 700rpx;
height: auto;
box-sizing: border-box;
overflow: hidden;
border-radius: 20rpx;
margin: 60rpx auto;
}
.diaocha-box{
position: absolute;
left: 0;
right: 0;
top: 0; top: 0;
bottom: 0; z-index: 9;
background-color: rgba(0,0,0,.3);
padding:0 10vw;
display: flex;
align-items: center;
z-index: 1000;
}
.diaocha-box image{
width:80vw;
}
.no-scroll{
overflow: hidden !important;
height: 100vh !important;
} }
</style> </style>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</view> </view>
<view class="login-bottom"> <view class="login-bottom">
<view class="login-bottom-text" @click="back">返回</view> <view class="login-bottom-text" @click="back">返回</view>
<view class="login-bottom-text">忘记密码</view> <!-- <view class="login-bottom-text">忘记密码</view> -->
</view> </view>
</view> </view>
</view> </view>
...@@ -65,15 +65,12 @@ ...@@ -65,15 +65,12 @@
let msg = reactive({ let msg = reactive({
Account: "", Account: "",
Password: "", Password: "",
// openId:"",
// uniunId:"",
}); });
let data = reactive({ let data = reactive({
phoneNum: "", phoneNum: "",
openid: "", openid: "",
code: "", code: "",
show: false, show: false,
showVisitor:false,
}); });
let methods = { let methods = {
...@@ -94,8 +91,6 @@ ...@@ -94,8 +91,6 @@
}); });
clearTimeout(); clearTimeout();
}, },
async login() { async login() {
if (msg.Account == "" || !msg.Account) { if (msg.Account == "" || !msg.Account) {
Toast.fail("请输入账号"); Toast.fail("请输入账号");
...@@ -119,102 +114,6 @@ ...@@ -119,102 +114,6 @@
} }
}) })
}, },
login2() {
uni.login({
provider: 'weixin',
success: async (loginRes) => {
let code = loginRes.code
data.code = code
}
});
},
//获取手机号
getphonenumber(e) {
if (e.detail.encryptedData && e.detail.iv) {
let encryptedData = e.detail.encryptedData;
let iv = e.detail.iv;
that.parsePhoneNum(encryptedData, iv, data.code)
} else {
Toast.fail("授权失败,请重新授权")
}
},
//解密手机号
async parsePhoneNum(encryptedData, iv, code) {
let res = await parsePhone({
encryptedData,
iv,
code
})
if (res && res.Data.phoneNumber) {
data.phoneNum = res.Data.phoneNumber
data.openid = res.Data.openid
that.phoneNumLogin()
} else {
Toast.fail("授权失败,请重新授权")
}
},
//手机号授权登录
async phoneNumLogin() {
let res = await phoneLogin({
Account: data.phoneNum,
OpenId: data.openid
})
if (res) {
res.Data.Account = data.phoneNum;
uni.setStorageSync("userInfo", res.Data);
Toast.success("登录成功");
setTimeout(() => {
let data = uni.getStorageSync("userInfo");
if (data) {
that.jumpPage();
}
}, 1000);
}
},
async login3() { //游客登录
data.show = false
let temporarydh = uni.getStorageSync("temporarydh")
if (temporarydh) {
let msg = {
Account: temporarydh.Account,
OpenId: temporarydh.OpenId,
unionid: temporarydh.unionid,
WeChatName: temporarydh.WeChatName,
WeChatPhoto: temporarydh.WeChatPhoto,
IsVisitor: 1,
}
let res = await phoneLogin(msg)
if (res) {
res.Data.Account = data.phoneNum;
uni.setStorageSync("userInfo", res.Data);
Toast.success("登录成功");
setTimeout(() => {
let data = uni.getStorageSync("userInfo");
if (data) {
that.jumpPage();
}
}, 1000);
}
} else {
uni.showToast({
icon: "none",
title:"未授权电话,请先点击授权按钮",
duration:2000,
})
// setTimeout(()=>{
// uni.reLaunch({
// url: '/pages/index/index' //没有授权登录
// });
// },1500)
}
},
againdata() {
uni.reLaunch({
url: '/pages/index/index'
});
},
}; };
onMounted(() => {}); onMounted(() => {});
let that = methods; let that = methods;
...@@ -225,8 +124,7 @@ ...@@ -225,8 +124,7 @@
}; };
}, },
onLoad() { onLoad() {
//审核用
this.showVisitor=new Date().getTime()> new Date('2022-03-16').getTime()
} }
}; };
</script> </script>
...@@ -234,7 +132,6 @@ ...@@ -234,7 +132,6 @@
<style scoped> <style scoped>
.login-Welcome-title{ .login-Welcome-title{
font-size: 50rpx; font-size: 50rpx;
font-family: PingFang SC;
color: #FFFFFF; color: #FFFFFF;
margin-bottom: 33rpx; margin-bottom: 33rpx;
font-weight: 300; font-weight: 300;
...@@ -259,8 +156,9 @@ ...@@ -259,8 +156,9 @@
top: -261rpx; top: -261rpx;
} }
.login-bottom .login-bottom-text:first-child{ .login-bottom .login-bottom-text:first-child{
border-right: 1rpx solid #E1E1E1; /* border-right: 1rpx solid #E1E1E1;
padding: 0 110rpx 0 0; padding: 0 110rpx 0 0; */
padding: 0 110rpx;
} }
.login-bottom-text{ .login-bottom-text{
padding: 0 0 0 110rpx; padding: 0 0 0 110rpx;
...@@ -322,7 +220,6 @@ ...@@ -322,7 +220,6 @@
margin-bottom: 110rpx; margin-bottom: 110rpx;
background-color: #C91727; background-color: #C91727;
font-size: 30rpx; font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #FFFFFF; color: #FFFFFF;
text-align: center; text-align: center;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view class="login-background"></view> <view class="login-background"></view>
<view class="login-content"> <view class="login-content">
<view class="login-image"> <view class="login-image">
<van-image width="398rpx" height="398rpx" fit="cover" class="yuqi" <van-image width="398rpx" height="398rpx" fit="cover"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653448851000_616.png" /> src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653448851000_616.png" />
</view> </view>
<view class="btnBox" @click="login"> <view class="btnBox" @click="login">
...@@ -84,7 +84,6 @@ ...@@ -84,7 +84,6 @@
margin-bottom: 53rpx; margin-bottom: 53rpx;
background-color: #C91727; background-color: #C91727;
font-size: 30rpx; font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #FFFFFF; color: #FFFFFF;
text-align: center; text-align: center;
......
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