消息
This commit is contained in:
@@ -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
17
pages/Mine/Mine.vue
Normal 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>
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user