Commit a5ae9687 authored by Mac's avatar Mac

1

parent 6a8a2996
......@@ -2,7 +2,7 @@
"easycom": {
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
},
"pages": [{
"pages": [{"path":"pages/user-center/user-center"},{
"path": "pages/index/index",
"enablePullDownRefresh": true,
"style": {
......@@ -91,19 +91,19 @@
"path": "share"
}]
},
{
"root": "pages/user-center",
"pages": [{
"path": "integral-detail/integral-detail"
},
{
"path": "user-center",
"style": {
"navigationStyle": "custom"
}
}
]
},
// {
// "root": "pages/user-center",
// "pages": [{
// "path": "integral-detail/integral-detail"
// },
// {
// "path": "user-center",
// "style": {
// "navigationStyle": "custom"
// }
// }
// ]
// },
{
"root": "pages/mySupplier",
"pages": [{
......@@ -384,7 +384,10 @@
},{
"path":"personal/cardList"//学习卡中心
},{
"path":"mystudy/mystudy"
"path":"mystudy/mystudy",
"style": {
"navigationStyle": "custom"
}
}]
},
......
<template>
<scroll-view
:scroll-y="true"
@scroll="scrollHandler"
@scrolltoupper="scrollTopHandler"
style="height: 100vh;">
<view class="mystudy">
<view class="mystudy">
<view style="padding-top: 74px;">
<view
class="headStatus"
v-if="scrollTop > 50 "
:style="[
headStyle,
{
zIndex: scrollTop < 10 ? 'unset' : 2,
opacity: scrollTop < 10 ? '100' : scrollTop,
background:'#FFF'
},
]"
>
<view class="arrow" @click="goback">
<u-icon name="arrow-left" size="48" color="#000"></u-icon>
</view>
<view class="title" style="color: #000000;" v-if="scrollTop > 50">{{pageTitle}}</view>
<view style="width: 400rpx;">
<u-tabs :list="list" :is-scroll="false" :current="current" @change="change" :active-color='mc'></u-tabs>
</view>
<view class="arrow"></view>
</view>
<view class="goback" @click="goback" :style="{'padding-top':paddingHTop}">
<u-icon name="arrow-left" size="48" color="#121212"></u-icon>
</view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'gob'></auth>
</view>
</scroll-view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'goback'></auth>
</view>
</template>
<script>
import hParse from "@/components/u-parse/parse.vue";
import auth from "@/components/auth/index.vue";
export default {
......@@ -46,15 +32,19 @@
pricecolor:'',
secondary:'',
paddingHTop:0,
id:0,
teacher:{},
list: [{
name: '学习概况'
}, {
name: '课程缓存'
}],
windowWidth:0,
scrollTop:0,
headStyle:{},
pageTitle:'教师详情',
pageTitle:'我的学习',
UserId:0,
u:{},
showAuth:false,
current:0
}
},
components: {
......@@ -62,15 +52,7 @@
auth
},
onLoad(options) {
console.log(options,'options')
if(options && options.ID){
this.id = options.ID
if(uni.getStorageSync("mall_UserInfo")){
this.UserId = uni.getStorageSync("mall_UserInfo").UserId ? uni.getStorageSync("mall_UserInfo").UserId:0
}
}
},
created() {
this.mc = this.$uiConfig.mainColor;
......@@ -80,33 +62,50 @@
this.paddingHTop = this.nav +'px';
this.windowWidth = this.$utils.SystemInfo().windowWidth;
this.headStyle.paddingTop = this.nav +'px';
let currentPages = getCurrentPages();
let u = "/" + currentPages[currentPages.length - 1].route;
let pages = wx.getStorageSync("basedata")
? wx.getStorageSync("basedata").bar_title
: [];
pages.forEach((x) => {
if (x.value == u) {
this.pageTitle = x.new_name ? x.new_name : x.name;
}
});
uni.setNavigationBarTitle({
title: this.pageTitle,
});
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else{
// this.init();
}
},
methods:{
clickDescription(e) {
console.log(e);
},
goback(){
uni.navigateBack({})
},
clickHandler(item) {
uni.navigateTo({ url: "/pages/school/courseInfo?GoodsId=" + item.Id });
},
scrollHandler(e) {
this.scrollTop = e.detail.scrollTop;
},
scrollTopHandler() {
this.scrollTop = 0;
},
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
},
gob(){
this.showAuth = false;
},
change(val){
console.log(val)
this.current = val
}
}
......@@ -114,7 +113,12 @@
</script>
<style>
.mystudy .headStatus {
.mystudy {
width: 100%;
height: 100vh;
background: #FAF8F9;
}
.mystudy .headStatus {
overflow: hidden;
position: relative;
width: 140vw;
......@@ -128,18 +132,12 @@
flex-direction: row;
align-items: center;
justify-content: space-between;
background: #FFF;
}
.mystudy .arrow {
height: 24px;
margin: 5px 10px;
width: 24px;
}
.mystudy .goback{
margin-left: 8px;
position: fixed;
top: 0;
left: 0;
}
.mystudy .arrow {
height: 24px;
margin: 5px;
width: 24px;
}
</style>
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