...
|
...
|
@@ -389,7 +389,6 @@ |
|
|
},
|
|
|
onLoad(e) {
|
|
|
this.$request('/common/getConfig',{type:'8'}).then((res)=>{
|
|
|
console.log('微信登录按钮开关',res)
|
|
|
this.switchTab = res.data.switch
|
|
|
this.plat = plus.os.name.toLowerCase()
|
|
|
})
|
...
|
...
|
@@ -415,36 +414,6 @@ |
|
|
}
|
|
|
})
|
|
|
},
|
|
|
onShow() {
|
|
|
if(!this.isLogin || !this.isSDKReady){
|
|
|
let userID = this.userinfo.id.toString()
|
|
|
let userSig = this.userinfo.user_sign
|
|
|
let userInfo = {
|
|
|
user: this.userinfo.nickname,
|
|
|
userId:this.userinfo.id,
|
|
|
img:this.userinfo.avatar,
|
|
|
userSig:this.userinfo.user_sign
|
|
|
}
|
|
|
//登录腾讯IM及时通讯
|
|
|
let promise = this.tim.login({
|
|
|
userID: userID,
|
|
|
userSig: userSig
|
|
|
});
|
|
|
promise.then((res) => {
|
|
|
console.warn('腾讯云即时通讯登录成功', res);
|
|
|
|
|
|
//登录成功后 更新登录状态
|
|
|
this.$store.commit("toggleIsLogin", true);
|
|
|
//自己平台的用户基础信息
|
|
|
uni.setStorageSync('userInfo', JSON.stringify(userInfo))
|
|
|
//tim 返回的用户信息
|
|
|
uni.setStorageSync('userTIMInfo', JSON.stringify(res.data))
|
|
|
}).catch((err) => {
|
|
|
// 登录失败的相关信息
|
|
|
console.warn('腾讯云即时通讯登录报错', err);
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
getData(){
|
|
|
//获取用户信息
|
...
|
...
|
@@ -477,7 +446,6 @@ |
|
|
this.getStoryList()
|
|
|
},
|
|
|
scrolltolower(){
|
|
|
console.log('滚动到底部了')
|
|
|
if(this.current_page == this.last_page){
|
|
|
uni.showToast({
|
|
|
title:'无更多数据',
|
...
|
...
|
@@ -501,11 +469,16 @@ |
|
|
follow(){
|
|
|
this.$request('/user_follow_log/follow',{to_user_id:this.userInfo.id}).then((res)=>{
|
|
|
if(res.code == 1){
|
|
|
this.current_page = 1
|
|
|
this.last_page = 0
|
|
|
this.param.page = 1
|
|
|
this.list = []
|
|
|
this.getData()
|
|
|
this.$request('/user/userInfo',this.param).then((res)=>{
|
|
|
let starList = []
|
|
|
if(res.data.star > 0){
|
|
|
for(let i = 0; i < res.data.star; i++){
|
|
|
starList.push(i)
|
|
|
}
|
|
|
res.data.starList = starList
|
|
|
}
|
|
|
this.userInfo = res.data
|
|
|
})
|
|
|
uni.showToast({
|
|
|
title:res.msg+'成功'
|
|
|
})
|
...
|
...
|
@@ -621,7 +594,6 @@ |
|
|
},
|
|
|
phone(phone){
|
|
|
this.$request('/user/getMiddleNumber',{mobile:phone}).then((res)=>{
|
|
|
console.log('获取虚拟小号',res)
|
|
|
if(res.code == 1){
|
|
|
uni.makePhoneCall({
|
|
|
phoneNumber:res.data
|
...
|
...
|
|