117 lines
2.7 KiB
Vue
117 lines
2.7 KiB
Vue
<template>
|
|
<view class="page">
|
|
<image src="../../static/HomeBackground.png" class="HomeBackground"></image>
|
|
</view>
|
|
<view class="top-navigation-container">
|
|
<top-navigation></top-navigation>
|
|
</view>
|
|
<view class="Advertisement" @click="goAdvertisement">
|
|
<advertisement></advertisement>
|
|
</view>
|
|
<view class="contentList">
|
|
<contentList></contentList>
|
|
</view>
|
|
<view class="tabBar">
|
|
<tabBar></tabBar>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import topNavigation from "../../components/topNavigation/topNavigation";
|
|
import Advertisement from "../../components/Advertisement/Advertisement";
|
|
import contentList from "../../components/contentList/contentList";
|
|
import tabBar from "../../components/tabBar/tabBar";
|
|
import TUIlogin from "../../components/TUILogin.js";
|
|
import TencentCloudChat from "@tencentcloud/chat";
|
|
export default {
|
|
inject: ["$global"],
|
|
data() {
|
|
return {
|
|
info: {},
|
|
myuserSig: "",
|
|
chatInfo: {},
|
|
};
|
|
},
|
|
onLoad() {
|
|
uni.getStorage({
|
|
key: "userinfo",
|
|
success: (res) => {
|
|
this.info = res.data;
|
|
uni.getStorage({
|
|
key: "myuserSig",
|
|
success: (res) => {
|
|
this.myuserSig = res.data;
|
|
uni.getStorage({
|
|
key: "chatInfo",
|
|
success: (res) => {
|
|
this.chatInfo = res.data;
|
|
TUIlogin(this.chatInfo.appId, this.info.id, this.myuserSig.userSig);
|
|
// let options = {
|
|
// SDKAppID: this.chatInfo.appId,
|
|
// };
|
|
// console.log("`````````````````````````````````````````", this.chatInfo);
|
|
// let chat = TencentCloudChat.create(options);
|
|
// console.log("chat````````````````````````````````````````", this.chat);
|
|
// chat.login({ userID: String(this.info.id), userSig: this.myuserSig.userSig });
|
|
},
|
|
});
|
|
},
|
|
});
|
|
},
|
|
});
|
|
},
|
|
methods: {
|
|
goAdvertisement() {
|
|
// this.$global.lastPage = getCurrentPages().router;
|
|
uni.navigateTo({ url: "/pages/pkDetail/pkDetail" });
|
|
},
|
|
},
|
|
components: {
|
|
topNavigation,
|
|
Advertisement,
|
|
contentList,
|
|
tabBar,
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style scoped>
|
|
.page {
|
|
position: relative;
|
|
width: 750rpx;
|
|
height: 1620rpx;
|
|
}
|
|
|
|
.HomeBackground {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
z-index: -1;
|
|
}
|
|
.top-navigation-container {
|
|
position: fixed;
|
|
top: 160rpx;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 114.5rpx;
|
|
}
|
|
.Advertisement {
|
|
position: fixed;
|
|
top: 300rpx;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100rpx;
|
|
z-index: 100;
|
|
}
|
|
.contentList {
|
|
position: fixed;
|
|
top: 400rpx;
|
|
left: 0;
|
|
bottom: -30rpx;
|
|
width: 100%;
|
|
/* height: 1300rpx; */
|
|
}
|
|
</style>
|