|
@@ -4,15 +4,38 @@
|
|
|
<image class="bg" src="../../static/img/userBg.png"></image>
|
|
<image class="bg" src="../../static/img/userBg.png"></image>
|
|
|
<view class="title">我的</view>
|
|
<view class="title">我的</view>
|
|
|
<view class="user flex">
|
|
<view class="user flex">
|
|
|
- <view class="toux"><image :src="userInfo.avatar" mode=""></image></view>
|
|
|
|
|
|
|
+ <view class="toux"><image :src="userInfo.avatar || '/static/error/missing-face.png'" mode=""></image></view>
|
|
|
<view class="font">
|
|
<view class="font">
|
|
|
- <view class="name">{{ userInfo.nickname }}</view>
|
|
|
|
|
- <view class="banzhuren">顾问:李丹 12012502360</view>
|
|
|
|
|
|
|
+ <view class="name">{{ userInfo.real_name || '游客' }}</view>
|
|
|
|
|
+ <view class="banzhuren">顾问:{{ guwen || 'null' }}</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="navBar flex">
|
|
|
|
|
- <view class="left" @click="nav('/pages/course/course')">
|
|
|
|
|
|
|
+ <view class="navBar ">
|
|
|
|
|
+ <image class="navBg" src="../../static/img/user.png"></image>
|
|
|
|
|
+ <view class="navBox flex">
|
|
|
|
|
+ <view class="main">
|
|
|
|
|
+ <view class="font">已上课时</view>
|
|
|
|
|
+ <view class="num">{{ achieve }}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="xian"></view>
|
|
|
|
|
+ <view class="main">
|
|
|
|
|
+ <view class="font">总课时</view>
|
|
|
|
|
+ <view class="num">{{ all }}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="xian"></view>
|
|
|
|
|
+ <view class="main">
|
|
|
|
|
+ <view class="font">赠送课时</view>
|
|
|
|
|
+ <view class="num">{{ gift }}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="xian"></view>
|
|
|
|
|
+ <view class="main">
|
|
|
|
|
+ <view class="font">请假课时</view>
|
|
|
|
|
+ <view class="num">{{ leave }}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- <view class="left" @click="nav('/pages/leave/leaveClass')">
|
|
|
<image src="../../static/img/userLeft.png"></image>
|
|
<image src="../../static/img/userLeft.png"></image>
|
|
|
<view class="centent">
|
|
<view class="centent">
|
|
|
<view class="title">待上课程</view>
|
|
<view class="title">待上课程</view>
|
|
@@ -27,80 +50,87 @@
|
|
|
<view class="text">总完成数</view>
|
|
<view class="text">总完成数</view>
|
|
|
<view class="number">{{wan}}<text>个</text></view>
|
|
<view class="number">{{wan}}<text>个</text></view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
|
+ </view> -->
|
|
|
</view>
|
|
</view>
|
|
|
<view class="system">
|
|
<view class="system">
|
|
|
<view class="item flex" @click="nav('/pages/user/userInfo')">
|
|
<view class="item flex" @click="nav('/pages/user/userInfo')">
|
|
|
<image class="img" src="../../static/img/aboutMy.png"></image>
|
|
<image class="img" src="../../static/img/aboutMy.png"></image>
|
|
|
<view class="item-text">我的资料</view>
|
|
<view class="item-text">我的资料</view>
|
|
|
- <image class="return" src="../../static/img/return.png" ></image>
|
|
|
|
|
|
|
+ <image class="return" src="../../static/img/return.png"></image>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="item flex">
|
|
|
|
|
|
|
+ <view class="item flex" @click="nav('/pages/user/about')">
|
|
|
<image class="img" src="../../static/img/userAbout.png"></image>
|
|
<image class="img" src="../../static/img/userAbout.png"></image>
|
|
|
<view class="item-text">关于我们</view>
|
|
<view class="item-text">关于我们</view>
|
|
|
- <image class="return" src="../../static/img/return.png" ></image>
|
|
|
|
|
|
|
+ <image class="return" src="../../static/img/return.png"></image>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="item flex">
|
|
|
|
|
|
|
+ <view class="item flex" @click="nav('/pages/public/set')">
|
|
|
<image class="img" src="../../static/img/aboutSet.png"></image>
|
|
<image class="img" src="../../static/img/aboutSet.png"></image>
|
|
|
<view class="item-text">设置</view>
|
|
<view class="item-text">设置</view>
|
|
|
- <image class="return" src="../../static/img/return.png" ></image>
|
|
|
|
|
|
|
+ <image class="return" src="../../static/img/return.png"></image>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { getCourse } from '@/api/course.js'
|
|
|
|
|
|
|
+import { getCourse } from '@/api/course.js';
|
|
|
import { mapState, mapMutations } from 'vuex';
|
|
import { mapState, mapMutations } from 'vuex';
|
|
|
import { saveUrl, interceptor } from '@/utils/loginUtils.js';
|
|
import { saveUrl, interceptor } from '@/utils/loginUtils.js';
|
|
|
-import { getUserInfo,} from '@/api/user.js';
|
|
|
|
|
|
|
+import { getUserInfo, my } from '@/api/user.js';
|
|
|
|
|
+import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
|
|
export default {
|
|
export default {
|
|
|
|
|
+ components: {
|
|
|
|
|
+ uniLoadMore
|
|
|
|
|
+ },
|
|
|
computed: {
|
|
computed: {
|
|
|
...mapState(['hasLogin', 'userInfo', 'baseURL', 'urlFile'])
|
|
...mapState(['hasLogin', 'userInfo', 'baseURL', 'urlFile'])
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- dai: '0',//待上课程
|
|
|
|
|
- wan: '0',//完成课程
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ all: '200', //总课时
|
|
|
|
|
+ achieve: '208', //完成课时
|
|
|
|
|
+ leave: '20', //请假课时
|
|
|
|
|
+ gift: '20', //赠送课时
|
|
|
|
|
+ guwen: ''
|
|
|
|
|
+ };
|
|
|
},
|
|
},
|
|
|
onShow() {
|
|
onShow() {
|
|
|
|
|
+ console.log(this.hasLogin);
|
|
|
// 判断是否已经登录
|
|
// 判断是否已经登录
|
|
|
if (this.hasLogin) {
|
|
if (this.hasLogin) {
|
|
|
- console.log(this.userInfo)
|
|
|
|
|
|
|
+ console.log(this.userInfo);
|
|
|
this.loadBaseData();
|
|
this.loadBaseData();
|
|
|
- }else{
|
|
|
|
|
- uni.showModal({
|
|
|
|
|
- title: '登录',
|
|
|
|
|
- content: '您未登录,是否马上登陆?',
|
|
|
|
|
- success: e => {
|
|
|
|
|
- console.log(e)
|
|
|
|
|
- if (e.confirm) {
|
|
|
|
|
- console.log("1111")
|
|
|
|
|
- interceptor();
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- fail: e => {
|
|
|
|
|
- console.log(e);
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: '登录',
|
|
|
|
|
+ content: '您未登录,是否马上登陆?',
|
|
|
|
|
+ success: e => {
|
|
|
|
|
+ console.log(e);
|
|
|
|
|
+ if (e.confirm) {
|
|
|
|
|
+ console.log('1111');
|
|
|
|
|
+ interceptor();
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ fail: e => {
|
|
|
|
|
+ console.log(e);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- ...mapMutations( ['setUserInfo', 'setOrderInfo']),
|
|
|
|
|
|
|
+ ...mapMutations(['setUserInfo']),
|
|
|
loadBaseData() {
|
|
loadBaseData() {
|
|
|
getUserInfo({})
|
|
getUserInfo({})
|
|
|
.then(({ data }) => {
|
|
.then(({ data }) => {
|
|
|
-
|
|
|
|
|
- if (data.store_switch == '1') {
|
|
|
|
|
- this.showBox = true;
|
|
|
|
|
- }
|
|
|
|
|
this.setUserInfo(data);
|
|
this.setUserInfo(data);
|
|
|
})
|
|
})
|
|
|
.catch(e => {
|
|
.catch(e => {
|
|
|
console.log(e);
|
|
console.log(e);
|
|
|
});
|
|
});
|
|
|
|
|
+ my({}).then(({ data }) => {
|
|
|
|
|
+ this.guwen = data.adviser;
|
|
|
|
|
+ });
|
|
|
getCourse({})
|
|
getCourse({})
|
|
|
.then(e => {
|
|
.then(e => {
|
|
|
this.dai = e.data.count;
|
|
this.dai = e.data.count;
|
|
@@ -109,15 +139,15 @@ export default {
|
|
|
console.log(e);
|
|
console.log(e);
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- navT(){
|
|
|
|
|
|
|
+ navT() {
|
|
|
if (!this.hasLogin) {
|
|
if (!this.hasLogin) {
|
|
|
uni.showModal({
|
|
uni.showModal({
|
|
|
title: '登录',
|
|
title: '登录',
|
|
|
content: '您未登录,是否马上登陆?',
|
|
content: '您未登录,是否马上登陆?',
|
|
|
success: e => {
|
|
success: e => {
|
|
|
- console.log(e)
|
|
|
|
|
|
|
+ console.log(e);
|
|
|
if (e.confirm) {
|
|
if (e.confirm) {
|
|
|
- console.log("1111")
|
|
|
|
|
|
|
+ console.log('1111');
|
|
|
interceptor();
|
|
interceptor();
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -126,13 +156,13 @@ export default {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
return;
|
|
return;
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
uni.switchTab({
|
|
uni.switchTab({
|
|
|
url: '/pages/index/index'
|
|
url: '/pages/index/index'
|
|
|
- })
|
|
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- nav(url){
|
|
|
|
|
|
|
+ nav(url) {
|
|
|
if (!this.hasLogin) {
|
|
if (!this.hasLogin) {
|
|
|
uni.showModal({
|
|
uni.showModal({
|
|
|
title: '登录',
|
|
title: '登录',
|
|
@@ -147,14 +177,14 @@ export default {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
return;
|
|
return;
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
url: url
|
|
url: url
|
|
|
- })
|
|
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
|
|
+};
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
<style lang="scss">
|
|
@@ -164,7 +194,7 @@ page,
|
|
|
height: 100%;
|
|
height: 100%;
|
|
|
background-color: #f8f8f8;
|
|
background-color: #f8f8f8;
|
|
|
}
|
|
}
|
|
|
-.top{
|
|
|
|
|
|
|
+.top {
|
|
|
position: relative;
|
|
position: relative;
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
height: 474rpx;
|
|
height: 474rpx;
|
|
@@ -189,7 +219,7 @@ page,
|
|
|
.toux {
|
|
.toux {
|
|
|
width: 136rpx;
|
|
width: 136rpx;
|
|
|
height: 136rpx;
|
|
height: 136rpx;
|
|
|
- background: #FFFFFF;
|
|
|
|
|
|
|
+ background: #ffffff;
|
|
|
border-radius: 50%;
|
|
border-radius: 50%;
|
|
|
image {
|
|
image {
|
|
|
width: 136rpx;
|
|
width: 136rpx;
|
|
@@ -210,35 +240,78 @@ page,
|
|
|
margin-top: 14rpx;
|
|
margin-top: 14rpx;
|
|
|
font-size: 26rpx;
|
|
font-size: 26rpx;
|
|
|
font-weight: 500;
|
|
font-weight: 500;
|
|
|
- color: #8E8E8E;
|
|
|
|
|
|
|
+ color: #8e8e8e;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-.navBar{
|
|
|
|
|
|
|
+.navBar {
|
|
|
margin-top: -100rpx;
|
|
margin-top: -100rpx;
|
|
|
padding: 18rpx;
|
|
padding: 18rpx;
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
- .left {
|
|
|
|
|
- position: relative;
|
|
|
|
|
- width: 50%;
|
|
|
|
|
- height: 250rpx;
|
|
|
|
|
- image {
|
|
|
|
|
-
|
|
|
|
|
- height: 100%;
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+ height: 250rpx;
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ .navBg {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top: 0;
|
|
|
|
|
+ left: 0;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 100%;
|
|
|
}
|
|
}
|
|
|
- .right {
|
|
|
|
|
|
|
+ .navBox {
|
|
|
position: relative;
|
|
position: relative;
|
|
|
- width: 50%;
|
|
|
|
|
- height: 250rpx;
|
|
|
|
|
- image {
|
|
|
|
|
- height: 100%;
|
|
|
|
|
- width: 100%;
|
|
|
|
|
|
|
+ z-index: 3;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ justify-content: flex-start;
|
|
|
|
|
+ .main {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ padding: 50rpx 30rpx;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ .font {
|
|
|
|
|
+ margin: 0 auto;
|
|
|
|
|
+ font-size: 26rpx;
|
|
|
|
|
+ font-family: PingFang SC;
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+ color: #ffffff;
|
|
|
|
|
+ }
|
|
|
|
|
+ .num {
|
|
|
|
|
+ margin: 0 auto;
|
|
|
|
|
+ margin-top: 24rpx;
|
|
|
|
|
+ font-size: 40rpx;
|
|
|
|
|
+ font-family: PingFang SC;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ color: #ffffff;
|
|
|
|
|
+ text-shadow: 0px 2rpx 24rpx rgba(28, 199, 199, 0.4);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .xian {
|
|
|
|
|
+ width: 2rpx;
|
|
|
|
|
+ height: 80rpx;
|
|
|
|
|
+ background: #ffffff;
|
|
|
|
|
+ // opacity: 0.12;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ // .left {
|
|
|
|
|
+ // position: relative;
|
|
|
|
|
+ // width: 50%;
|
|
|
|
|
+ // height: 250rpx;
|
|
|
|
|
+ // image {
|
|
|
|
|
+
|
|
|
|
|
+ // height: 100%;
|
|
|
|
|
+ // width: 100%;
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
|
|
+ // }
|
|
|
|
|
+ // .right {
|
|
|
|
|
+ // position: relative;
|
|
|
|
|
+ // width: 50%;
|
|
|
|
|
+ // height: 250rpx;
|
|
|
|
|
+ // image {
|
|
|
|
|
+ // height: 100%;
|
|
|
|
|
+ // width: 100%;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
}
|
|
}
|
|
|
.centent {
|
|
.centent {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
@@ -255,12 +328,12 @@ page,
|
|
|
margin-top: 10rpx;
|
|
margin-top: 10rpx;
|
|
|
font-size: 24rpx;
|
|
font-size: 24rpx;
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
- color: #8E8E8E;
|
|
|
|
|
|
|
+ color: #8e8e8e;
|
|
|
}
|
|
}
|
|
|
.number {
|
|
.number {
|
|
|
font-size: 44rpx;
|
|
font-size: 44rpx;
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
- color: #1CC7C7;
|
|
|
|
|
|
|
+ color: #1cc7c7;
|
|
|
text-shadow: 0px 2px 24px rgba(28, 199, 199, 0.4);
|
|
text-shadow: 0px 2px 24px rgba(28, 199, 199, 0.4);
|
|
|
margin-top: 20rpx;
|
|
margin-top: 20rpx;
|
|
|
text {
|
|
text {
|
|
@@ -272,7 +345,7 @@ page,
|
|
|
width: 90%;
|
|
width: 90%;
|
|
|
margin: 0 auto;
|
|
margin: 0 auto;
|
|
|
padding-top: 10rpx;
|
|
padding-top: 10rpx;
|
|
|
- background: #FFFFFF;
|
|
|
|
|
|
|
+ background: #ffffff;
|
|
|
box-shadow: 0px 2rpx 24rpx 0rpx rgba(0, 0, 0, 0.06);
|
|
box-shadow: 0px 2rpx 24rpx 0rpx rgba(0, 0, 0, 0.06);
|
|
|
border-radius: 20rpx;
|
|
border-radius: 20rpx;
|
|
|
.item {
|
|
.item {
|
|
@@ -281,7 +354,6 @@ page,
|
|
|
.img {
|
|
.img {
|
|
|
height: 36rpx;
|
|
height: 36rpx;
|
|
|
width: 36rpx;
|
|
width: 36rpx;
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
.item-text {
|
|
.item-text {
|
|
|
width: 85%;
|
|
width: 85%;
|