This commit is contained in:
pengxiaolong
2025-05-13 22:16:09 +08:00
parent c006a8e63d
commit 5f8ff971d4
34 changed files with 411 additions and 309 deletions

View File

@@ -8,7 +8,7 @@
<view class="Advertisement">
<advertisement></advertisement>
</view>
<view class="contentList">
<view class="contentList">
<contentList></contentList>
</view>
<view class="tabBar">
@@ -26,10 +26,21 @@ export default {
return {};
},
onLoad() {
// 页面加载时执行
this.requestSomething();
},
methods: {
// 方法定义
requestSomething() {
wx.request({
url: "http://192.168.0.218:8086/user/login", // 请求的 URL
method: "POST", // 请求方式
success: (res) => {
console.log("请求成功", res.data); // 处理成功的响应
},
fail: (err) => {
console.error("请求失败", err); // 处理失败的响应
},
});
},
},
components: {
topNavigation,
@@ -63,19 +74,18 @@ export default {
height: 114.5rpx;
}
.Advertisement {
position: fixed;
top: 300rpx;
left: 0;
width: 100%;
height: 100rpx;
z-index: 100;
position: fixed;
top: 300rpx;
left: 0;
width: 100%;
height: 100rpx;
z-index: 100;
}
.contentList {
position: fixed;
top: 300rpx;
left: 0;
width: 100%;
height: 1300rpx;
position: fixed;
top: 300rpx;
left: 0;
width: 100%;
height: 1300rpx;
}
</style>

17
pages/Mine/Mine.vue Normal file
View File

@@ -0,0 +1,17 @@
<template>
<button @click="openChat">OpenChat</button>
</template>
<script>
export default {
methods: {
openChat() {
// 1v1 chat: conversationID = `C2C${userID}`
// group chat: conversationID = `GROUP${groupID}`
const conversationID = 'C2Cqwe';
uni.navigateTo({
url: `/TUIKit/components/TUIChat/index?conversationID=${conversationID}`
});
}
}
}
</script>

View File

@@ -1,20 +1,23 @@
<template>
<div>
<button @click="openConversationList">打开会话列表</button>
<button @click="openContact">打开联系人</button>
</div>
</template>
<script>
export default {
methods: {
// 打开会话列表
openConversationList() {
uni.navigateTo({ url: '/TUIKit/components/TUIConversation/index' });
},
// 打开联系人
openContact() {
uni.navigateTo({ url: '/TUIKit/components/TUIContact/index' });
},
},
};
</script>
<template></template>
<script>
export default {
data() {
return {
title: "Hello",
};
},
onLoad() {
this.openConversationList();
},
methods: {
openConversationList() {
uni.navigateTo({ url: "/TUIKit/components/TUIConversation/index" });
},
},
};
</script>
<style scoped>
/* 样式定义 */
</style>