diff --git a/pageA/login/login.vue b/pageA/login/login.vue index 0e0015f..29a3ef5 100644 --- a/pageA/login/login.vue +++ b/pageA/login/login.vue @@ -181,7 +181,6 @@ me.loginIn(res.data.token); //存储一个字符传值 // 缓存用户的信息 uni.setStorageSync('user_info',res.data); - if (res.data.member.has_labels) { uni.switchTab({ url: '/pages/index/index' diff --git a/pageB/sdetails/index.vue b/pageB/sdetails/index.vue index b75e7b0..697fe65 100644 --- a/pageB/sdetails/index.vue +++ b/pageB/sdetails/index.vue @@ -256,32 +256,41 @@ export default { }, methods: { customers(){ - function Friend(uuid, name, avatar,time = "", text = "",date = "") { - this.uuid = uuid; - this.name = name; - this.avatar = avatar; - this.online = false; - this.unReadMessage = 0; - this.text = text; - this.time = time; - this.date = date - } - console.log(123) - this.$u.api.getAtwillUserInfo({ - id:this.storeid - }).then((res)=>{ - console.log(res) - let user = new Friend(res.data.member_id,res.data.member_nickname,res.data.member_avatar) - this.$u.route({ - url:"/pageD/privateChat/privateChat", - params:{ - id:JSON.stringify(user) - } - + console.log(this.$store.state.hasLogin) + if(!this.$store.state.hasLogin){ + this.$refs.uToast.show({ + title: "请先登录", + type: 'warning' }) - }).catch((err)=>{ - console.log(err) - }) + }else{ + function Friend(uuid, name, avatar,time = "", text = "",date = "") { + this.uuid = uuid; + this.name = name; + this.avatar = avatar; + this.online = false; + this.unReadMessage = 0; + this.text = text; + this.time = time; + this.date = date + } + console.log(123) + this.$u.api.getAtwillUserInfo({ + id:this.storeid + }).then((res)=>{ + console.log(res) + let user = new Friend(res.data.member_id,res.data.member_nickname,res.data.member_avatar) + this.$u.route({ + url:"/pageD/privateChat/privateChat", + params:{ + id:JSON.stringify(user) + } + + }) + }).catch((err)=>{ + console.log(err) + }) + } + }, setSwiperList(list) { let img = []; diff --git a/pageD/attention/attention.vue b/pageD/attention/attention.vue index addab7d..f7dfe12 100644 --- a/pageD/attention/attention.vue +++ b/pageD/attention/attention.vue @@ -1,6 +1,6 @@