Commit 556c3514 authored by Mac's avatar Mac

2

parent 3cc424f6
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
pageTitle: '课程收藏', pageTitle: '课程收藏',
loading: true, loading: true,
contentHeight: 0, contentHeight: 0,
showAuth: true, showAuth: false,
mainColor: '', mainColor: '',
msg: { msg: {
pageIndex: 1, pageIndex: 1,
......
...@@ -54,11 +54,16 @@ ...@@ -54,11 +54,16 @@
<u-icon name="arrow-up" size="48" color="#333" /> <u-icon name="arrow-up" size="48" color="#333" />
</view> </view>
</view>--> </view>-->
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth='gbAuth'></auth>
</view> </view>
</template> </template>
<script> <script>
import auth from "@/components/auth/index.vue";
export default { export default {
components: {
auth
},
data() { data() {
return { return {
pageTitle: "课程评论", pageTitle: "课程评论",
...@@ -70,6 +75,7 @@ export default { ...@@ -70,6 +75,7 @@ export default {
loading: "努力加载中", loading: "努力加载中",
nomore: "没有更多评价课程了", nomore: "没有更多评价课程了",
}, },
showAuth:false,
status: "loadmore", status: "loadmore",
scrollTop: 0, scrollTop: 0,
old: { old: {
...@@ -93,7 +99,17 @@ export default { ...@@ -93,7 +99,17 @@ export default {
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.g = []; this.g = [];
console.log(this.g) console.log(this.g)
this.init(); this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else {
this.init();
}
}, },
mounted() { mounted() {
...@@ -114,6 +130,15 @@ export default { ...@@ -114,6 +130,15 @@ export default {
this.secondary = this.$uiConfig.secondary; this.secondary = this.$uiConfig.secondary;
}, },
methods: { methods: {
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
// this.showAuth=false;
this.init();
},
//关闭登录窗口
gbAuth() {
uni.navigateBack()
},
scroll(e) { scroll(e) {
this.old.scrollTop = e.detail.scrollTop; this.old.scrollTop = e.detail.scrollTop;
}, },
......
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