Commit ba84084d authored by Mac's avatar Mac

1

parent ca53f6d4
import request from '../utils/request.js'
/**
* 获取我的课程列表
* @param {JSON参数} data
*/
export function getMyStudyCourseList(data) {
return request({
url: '/AppletIndex/GetMyStudyCourseList',
method: 'post',
data
})
}
\ No newline at end of file
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
data.obj.Name = info.userInfo.nickName; data.obj.Name = info.userInfo.nickName;
data.obj.Photo = info.userInfo.avatarUrl; data.obj.Photo = info.userInfo.avatarUrl;
data.showPhone = true; //显示获取手机号码弹窗 data.showPhone = true; //显示获取手机号码弹窗
uni.hideTabBar()//手机授权弹窗出现 隐藏tabbar 不是层级过高
}, },
fail: () => { fail: () => {
...@@ -132,7 +133,7 @@ ...@@ -132,7 +133,7 @@
}) })
if (res && res.Data.phoneNumber) { if (res && res.Data.phoneNumber) {
data.obj.phoneNum = res.Data.phoneNumber data.obj.phoneNum = res.Data.phoneNumber
// data.obj.phoneNum = '19138490575' // data.obj.phoneNum = '19138490577'
data.obj.openid = res.Data.openid data.obj.openid = res.Data.openid
data.obj.unionid = res.Data.unionid data.obj.unionid = res.Data.unionid
that.phoneNumLogin() that.phoneNumLogin()
...@@ -170,10 +171,12 @@ ...@@ -170,10 +171,12 @@
uni.setStorageSync("userInfo", res.Data); uni.setStorageSync("userInfo", res.Data);
Toast.success("登录成功"); Toast.success("登录成功");
emit('success') emit('success')
data.showPhone = false data.showPhone = false
uni.showTabBar()
}else{ }else{
data.showLogin = true; //防止多次点击登录 data.showLogin = true; //防止多次点击登录
data.showPhone = false data.showPhone = false
uni.showTabBar()
uni.hideLoading(); uni.hideLoading();
if(res.Data.Error==-1){//如果没找到电话号码 就跳入登录 if(res.Data.Error==-1){//如果没找到电话号码 就跳入登录
......
<style scoped>
.curriculum-n{
justify-content: center;padding: 100rpx 30rpx 50rpx;
}
.row{
display: flex;align-items: center;
}
.curriculum-top-n{
width: 100%;
height: 350rpx;
border-radius: 12px;
background: linear-gradient(to bottom, #4C50E7, #FFFFFF);
padding: 5px;
}
.curriculum-top-nn{
width: 100%;
height: 100%;
background: #FFF;
border-radius: 12px;
position: relative;
}
.curriculum-top-pl{
width: 140rpx;
height: 30px;
font-size: 14px;
color: #FFF;
background: linear-gradient(to bottom, #5559e8, #6d70eb);
border-bottom-right-radius: 12px;
justify-content: center;
}
.curriculum-top-pl-ht{
width: 40px;
height: 13px;
background: #F5F5F5;
margin-left: 5px;
}
.lijigoumai{
width: 130rpx;
height: 50rpx;
border-radius: 26rpx;
justify-content: center;
background: #5559E8;
font-size: 11px;
color: #FFF;
margin-top: 13px;
}
.review{
height: 400rpx;
background: #EBEBEB;
padding: 18px;
}
.reviewcenter{
display: flex;
flex-direction: column;
align-items: center;
margin-top: 100rpx;
}
.lijigoumai2{
width: 130rpx;
height: 50rpx;
border-radius: 26rpx;
justify-content: center;
background: #FFFFFF;
font-size: 11px;
color: #4C50E7;
margin-top: 13px;
}
</style>
<template>
<view>
<view class="row curriculum-n" :style="{ 'margin-top': `${statusBarHeight}px` }">
<view class="curriculum-top-n" >
<view class="curriculum-top-nn">
<view class="row" style="justify-content: space-between;">
<view class="curriculum-top-pl row">当前课程</view>
<view class="row">
<view class="row">
<image style="width: 15px;height: 15px;" src='https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/studyindex_nz.png'></image>
<view class="curriculum-top-pl-ht" style="width: 90px;"></view>
</view>
<view class="row" style="margin: 0 10px 0 20px;">
<image style="width: 15px;height: 15px;" src='https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/studyindex_hb.png'></image>
<view class="curriculum-top-pl-ht" ></view>
</view>
</view>
</view>
<view class="row" style="justify-content: space-between;padding: 0 11px;margin-top: 15px;">
<view style="margin-left: 17px;">
<view style="font-size: 13px;font-family: PingFang SC;font-weight: bold;color: #111111;">暂无课程</view>
<view style="font-size: 10px;font-family: PingFang SC;font-weight: 400;color: #888888;margin-top: 10px;">购买课程后可回顾</view>
<view class="lijigoumai row">立即购课</view>
</view>
<view>
<image style="width: 234rpx;height: 226rpx;" mode="aspectFit" src='https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/studyindex_nan.png'></image>
</view>
</view>
</view>
</view>
</view>
<view class="review">
<view style="font-size: 14px;color: #111111;">课程顾问 <span style="font-size: 10px;color: #999999;">(最近7天课程)</span> </view>
<view class="reviewcenter" >
<view style="font-size: 13px;font-family: PingFang SC;font-weight: bold;color: #111111;">暂无课程</view>
<view style="font-size: 10px;font-family: PingFang SC;font-weight: 400;color: #888888;margin-top: 10px;">购买课程后可回顾</view>
<view class="lijigoumai2 row">了解课程</view>
</view>
</view>
<view style="margin-left: 18px;font-size: 14px;font-family: PingFang SC;font-weight: 400;color: #666666;margin-top: 30px;">
加油哦!
</view>
<view style="margin-left: 18px;font-size: 23px;font-family: PingFang SC;font-weight: 400;color: #111111;">
考试
</view>
<view class="review reviewcenter" style="height: 300rpx;margin-top: 0;align-items: center;justify-content: center;">
<view style="font-size: 13px;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
line-height: 35px;">暂无记录</view>
<view style="font-size: 10px;margin-top: 10px;
font-family: PingFang SC;
font-weight: 500;
color: #999999;">参与考试后可查看</view>
</view>
</view>
</template>
<script>
import {ref,reactive,toRefs,toRef,getCurrentInstance,watch,computed,onMounted,provide,} from "vue";
export default {
setup(props) {
let data = reactive({
statusBarHeight: 0,
})
let methods = {
}
onMounted(()=>{
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
})
let that = methods;
return {
...toRefs(data),
...methods,
};
}
}
</script>
<style scoped>
.studyindex{
width: 100%;
height: 100vh;
background: #F5F5F5;
}
.row{
display: flex;align-items: center;
}
.page-title {
font-size: 44rpx;
font-family: PingFang SC;
font-weight: bold;
color: #0f1b35;
}
.curriculum{
width: 100%;
}
</style>
<template>
<view class="studyindex">
<van-nav-bar :border="fasle" fixed :z-index="99">
<view slot="left" class="page-title" title="shouye">学习</view>
</van-nav-bar>
<view class="curriculum">
<template v-if="CourseList.length==0">
<indexNo></indexNo>
</template>
</view>
</view>
</template>
<script>
import indexNo from './components/indexNo.vue'
import {ref,reactive,toRefs,toRef,getCurrentInstance,watch,computed,onMounted,provide,} from "vue";
import {
getMyStudyCourseList,//课程列表
} from "../../api/study.js";
export default {
components: {
indexNo,
},
setup(props) {
let data = reactive({
CourseList:[],//课程列表
statusBarHeight: 0,
})
let methods = {
async getCourseList() {
let res = await getMyStudyCourseList({});
if (res.resultCode == 1) {
console.log(res)
data.CourseList = res.Data
}
},
}
onMounted(()=>{
that.getCourseList()//我的课程列表
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
})
let that = methods;
return {
...toRefs(data),
...methods,
};
}
}
</script>
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