本地开发
This commit is contained in:
@@ -21,7 +21,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {
|
||||
getUrlParam
|
||||
} from "../../common/utils"
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -54,7 +56,49 @@
|
||||
return this.$store.state.friendApply;
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(options) {
|
||||
console.log("首页获取到url参数")
|
||||
console.log(options)
|
||||
console.log(location.href)
|
||||
if (options.imUserSign) {
|
||||
uni.showLoading({
|
||||
title: "加载中...",
|
||||
mask: true
|
||||
});
|
||||
/*
|
||||
uni.setStorageSync("imUserSign",getUrlParam("imUserSign"))
|
||||
uni.setStorageSync("im_imUserSign",getUrlParam("imUserSign"))
|
||||
uni.setStorageSync("userId",getUrlParam("uid"))
|
||||
uni.setStorageSync("hd_userid",getUrlParam("uid"))
|
||||
uni.setStorageSync("hd_token",getUrlParam("token"))
|
||||
uni.setStorageSync("token",getUrlParam("token"))
|
||||
*/
|
||||
uni.setStorageSync("imUserSign", options.imUserSign)
|
||||
uni.setStorageSync("im_imUserSign", options.imUserSign)
|
||||
uni.setStorageSync("userId", options.uid)
|
||||
uni.setStorageSync("hd_userid", options.uid)
|
||||
uni.setStorageSync("hd_token", options.token)
|
||||
uni.setStorageSync("token", options.token)
|
||||
|
||||
const timer = setInterval(() => {
|
||||
if (uni.getStorageSync("initReady") == 1) {
|
||||
console.log("==========进入首页 initReady为1,开始跳转")
|
||||
clearInterval(timer)
|
||||
uni.hideLoading();
|
||||
uni.navigateTo({
|
||||
url: '../chatWindow/index?userId=' + options.tuid + '&windowType=' + options
|
||||
.windowType
|
||||
});
|
||||
}
|
||||
}, 500)
|
||||
}
|
||||
|
||||
|
||||
// uni.setStorageSync("token",hd_token)
|
||||
// uni.setStorageSync("userId",hd_userId)
|
||||
|
||||
|
||||
|
||||
this.clickToSubmitSure = this.$fc.debounce(
|
||||
e => {
|
||||
uni.navigateTo({
|
||||
@@ -65,10 +109,10 @@
|
||||
true
|
||||
);
|
||||
},
|
||||
filters:{
|
||||
contentFilter(value){
|
||||
filters: {
|
||||
contentFilter(value) {
|
||||
console.warn(value)
|
||||
return "KKKKK"+value
|
||||
return "KKKKK" + value
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -141,14 +185,14 @@
|
||||
toplist.push(obj[k]);
|
||||
}
|
||||
if (obj[k]['userId'] && obj[k]['top'] == 'N') {
|
||||
try{
|
||||
var _data=JSON.parse(obj[k].content)
|
||||
if(_data.type=="IMAGE"){
|
||||
obj[k].content="【图片】"
|
||||
}else{
|
||||
try {
|
||||
var _data = JSON.parse(obj[k].content)
|
||||
if (_data.type == "IMAGE") {
|
||||
obj[k].content = "【图片】"
|
||||
} else {
|
||||
console.error(_data)
|
||||
}
|
||||
}catch(e){
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
NOTtoplist.push(obj[k]);
|
||||
@@ -173,7 +217,7 @@
|
||||
this.$store.dispatch('tabBarpull');
|
||||
},
|
||||
mounted() {
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
longpressItem(e, i, v) {
|
||||
@@ -219,4 +263,4 @@
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user