Commit a36cbab3 authored by zhengke's avatar zhengke

1

parent 6612f1f4
...@@ -49,8 +49,8 @@ ...@@ -49,8 +49,8 @@
} }
</style> </style>
<template> <template>
<view class="mycollection" :style="{'height':contentHeight}" v-if="!loading"> <view class="mycollection" :style="{'height':contentHeight}" >
<template> <template v-if="!loading">
<u-empty v-if="goodslist.length==0" text="没有任何收藏课程哦~" mode="favor"></u-empty> <u-empty v-if="goodslist.length==0" text="没有任何收藏课程哦~" mode="favor"></u-empty>
<view v-if="goodslist.length>0" style=" <view v-if="goodslist.length>0" style="
height: calc(100vh - 50px); height: calc(100vh - 50px);
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
pageTitle: '课程收藏', pageTitle: '课程收藏',
loading: true, loading: true,
contentHeight: 0, contentHeight: 0,
showAuth: false, showAuth: true,
mainColor: '', mainColor: '',
msg: { msg: {
pageIndex: 1, pageIndex: 1,
...@@ -113,6 +113,7 @@ ...@@ -113,6 +113,7 @@
nomore: "没有更多了", nomore: "没有更多了",
}, },
windowWidth:0, windowWidth:0,
u:{}
} }
}, },
components: { components: {
...@@ -141,6 +142,7 @@ ...@@ -141,6 +142,7 @@
}, },
onLoad() { onLoad() {
this.u = uni.getStorageSync("mall_UserInfo"); this.u = uni.getStorageSync("mall_UserInfo");
console.log(!this.u,'UserInfo');
if (!this.u) { if (!this.u) {
this.u = { this.u = {
nickName: "未登录", nickName: "未登录",
......
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
</view> </view>
</view> </view>
</u-popup> </u-popup>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth='gbAuth'></auth>
</view> </view>
</template> </template>
<script> <script>
...@@ -224,6 +224,7 @@ ...@@ -224,6 +224,7 @@
}, },
payBtn:false, payBtn:false,
payExit:false, payExit:false,
showAuth:false
}; };
}, },
created() { created() {
...@@ -247,12 +248,30 @@ ...@@ -247,12 +248,30 @@
}, 1000); }, 1000);
}, },
onLoad(option) { onLoad(option) {
this.current = option.status || 0;
this.getHeadList();
this.payInfo.OpenId=uni.getStorageSync('mall_UserInfo').OpenId;
this.u = uni.getStorageSync("mall_UserInfo"); this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else {
this.current = option.status || 0;
this.payInfo.OpenId=uni.getStorageSync('mall_UserInfo').OpenId;
this.getHeadList();
this.getContent();
}
}, },
methods: { methods: {
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
// this.showAuth=false;
this.getContent();
},
//关闭登录窗口
gbAuth() {
uni.navigateBack()
},
getHeadHeight() { getHeadHeight() {
let that = this; let that = this;
const query = uni.createSelectorQuery().in(this); const query = uni.createSelectorQuery().in(this);
......
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