Commit 7e3b1ece authored by 黄媛媛's avatar 黄媛媛

修改一些登录问题

parent 952b3cdb
......@@ -92,6 +92,7 @@ export default {
return {
pageTitle: "我的优惠券",
showAuth:false,
U:{},
list: [
{ name: "未使用" },
{ name: "已使用" },
......
......@@ -63,13 +63,16 @@
<u-loading mode="flower" size="48">></u-loading>
<Text style="color: #fff; margin-top: 10rpx;">加载中...</Text>
</view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'gbAuth'></auth>
</view>
</template>
<script>
import auth from "../../../components/auth/index.vue";
export default {
components: {
auth
},
data() {
return {
pageTitle: "领券中心",
......@@ -77,6 +80,8 @@ export default {
contentHeight: 0,
g: [],
loading: false,
showAuth:false,
U:{},
msg:{
pageIndex: 1,
pageSize:10,
......@@ -111,9 +116,18 @@ export default {
},
onLoad: function (option) {
//option为object类型,会序列化上个页面传递的参数
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else{
this.loading = true;
this.init();
}
this.loading = true;
this.init();
},
methods: {
......@@ -183,7 +197,16 @@ export default {
});
}
}
},
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
this.showAuth=false;
this.init();
},
//关闭登录窗口
gbAuth(){
uni.navigateBack()
},
},
};
</script>
......
......@@ -242,7 +242,7 @@ export default {
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
this.showAuth = false;
this.getOrderStatus();
this.init();
},
goback(){
uni.navigateBack()
......
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