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

@@ -14,9 +14,9 @@ vueVersion = 3;
// You can get userSig from TencentCloud chat console for Testing TUIKit.
// Deploy production environment please get it from your server.
// View https://cloud.tencent.com/document/product/269/32688
uni.$SDKAppID = 0; // Your SDKAppID
uni.$userID = ''; // Your userID
uni.$userSig = ''; // Your userSig
uni.$SDKAppID = 1600086550; // Your SDKAppID
uni.$userID = '123'; // Your userID
uni.$userSig = 'eJyrVgrxCdYrSy1SslIy0jNQ0gHzM1NS80oy0zLBwoZGxlDh4pTsxIKCzBQlK0MzAwMDCzNTUwOITGpFQWZRKlDc1NTUCCgFES3JzAWJmZuYGxpbALVATclMB5qaUmwRlpvkHBmcHWps7hScoe3sm6PtmRxZXOWZkZYbWGKYXlVo6ByUUlqRbqtUCwBTujBs'; // Your userSig
export default {
onLaunch: function () {

View File

@@ -47,7 +47,6 @@ let tabList = reactive([
{
iconPath: "../../static/Forum.png",
selectedIconPath: "../../static/Forumclick.png",
// text: '消息',
text: "论坛",
pagePath: "",
middleClass: "",
@@ -63,14 +62,13 @@ let tabList = reactive([
iconPath: "../../static/Message.png",
selectedIconPath: "../../static/Messageclick.png",
text: "消息",
// text: '社区',
pagePath: "../../pages/Message/Message",
pagePath: "../../pages/index/index",
},
{
iconPath: "../../static/Mine.png",
selectedIconPath: "../../static/Mineclick.png",
text: "我的",
pagePath: "",
pagePath: "../../pages/Mine/Mine",
middleClass: "",
},
]);

View File

@@ -1,22 +1,28 @@
{
"pages": [
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "uni-app"
}
},
{
"path": "pages/Home/Home",
"style": {
"navigationBarTitleText": "首页"
}
},
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "uni-app"
}
},
{
"path": "pages/Message/Message",
"style": {
"navigationBarTitleText": "消息"
}
},
{
"path": "pages/Mine/Mine",
"style": {
"navigationBarTitleText": "我的"
}
}
],
"subPackages": [
@@ -79,6 +85,12 @@
"style": {
"navigationBarTitleText": "聊天记录"
}
},
{
"path": "components/TUIConversation/conversation-list/index",
"style": {
"navigationBarTitleText": "列表"
}
}
]
}
@@ -108,7 +120,12 @@
{
"pagePath": "pages/Message/Message",
"text": "消息"
},
{
"pagePath": "pages/Mine/Mine",
"text": "我的"
}
]
}
}

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>

View File

@@ -0,0 +1 @@
{"version":3,"file":"index2.js","sources":["../../HBuilderX/plugins/uniapp-cli-vite/uniPage:/VFVJS2l0XGNvbXBvbmVudHNcVFVJQ29udmVyc2F0aW9uXGNvbnZlcnNhdGlvbi1saXN0XGluZGV4LnZ1ZQ"],"sourcesContent":["import MiniProgramPage from 'D:/项目/tk-mini-program/TUIKit/components/TUIConversation/conversation-list/index.vue'\nwx.createPage(MiniProgramPage)"],"names":["MiniProgramPage"],"mappings":";;AACA,GAAG,WAAWA,MAAe,eAAA;"}

View File

@@ -1 +1 @@
{"version":3,"file":"app.js","sources":["App.vue","main.js"],"sourcesContent":["<script lang=\"ts\">\r\nimport { TUILogin } from '@tencentcloud/tui-core';\r\n\r\n\r\n\r\n\r\n\r\nlet vueVersion = 2;\r\n\r\nvueVersion = 3;\r\n\r\n\r\n// Required information\r\n// You can get userSig from TencentCloud chat console for Testing TUIKit.\r\n// Deploy production environment please get it from your server.\r\n// View https://cloud.tencent.com/document/product/269/32688\r\nuni.$SDKAppID = 0; // Your SDKAppID\r\nuni.$userID = ''; // Your userID\r\nuni.$userSig = ''; // Your userSig\r\n\r\nexport default {\r\n onLaunch: function () {\r\n\t TUILogin.login({\r\n\t SDKAppID: uni.$SDKAppID,\r\n\t userID: uni.$userID, \r\n\t userSig: uni.$userSig, \r\n\t useUploadPlugin: true, // If you need to send rich media messages, please set to true.\r\n\t framework: `vue${vueVersion}` // framework used vue2 / vue3\r\n\t }).catch(() => {});\r\n }\r\n};\r\n</script>\r\n<style>\r\n/* common css for page */\r\nuni-page-body,html,body,page {\r\n width: 100% !important;\r\n height: 100% !important;\r\n overflow: hidden;\r\n}\r\n</style>","import App from './App'\r\n\r\n// #ifndef VUE3\r\nimport Vue from 'vue'\r\nimport './uni.promisify.adaptor'\r\nVue.config.productionTip = false\r\nApp.mpType = 'app'\r\nconst app = new Vue({\r\n ...App\r\n})\r\napp.$mount()\r\n// #endif\r\n\r\n// #ifdef VUE3\r\nimport { createSSRApp } from 'vue'\r\nexport function createApp() {\r\n const app = createSSRApp(App)\r\n return {\r\n app\r\n }\r\n}\r\n// #endif"],"names":["uni","TUILogin","createSSRApp","App"],"mappings":";;;;;;;;;;;;;;;AAOA,IAAI,aAAa;AAEjB,aAAa;AAObA,cAAAA,MAAI,YAAY;AAChBA,cAAAA,MAAI,UAAU;AACdA,cAAAA,MAAI,WAAW;AAEf,MAAe,YAAA;AAAA,EACb,UAAU,WAAY;AACtBC,kBAAAA,EAAS,MAAM;AAAA,MACb,UAAUD,cAAI,MAAA;AAAA,MACd,QAAQA,cAAI,MAAA;AAAA,MACZ,SAASA,cAAI,MAAA;AAAA,MACb,iBAAiB;AAAA;AAAA,MACjB,WAAW,MAAM,UAAU;AAAA;AAAA,IAAA,CAC5B,EAAE,MAAM,MAAM;AAAA,IAAA,CAAE;AAAA,EACjB;AACF;ACfO,SAAS,YAAY;AAC1B,QAAM,MAAME,cAAY,aAACC,SAAG;AAC5B,SAAO;AAAA,IACL;AAAA,EACD;AACH;;;"}
{"version":3,"file":"app.js","sources":["App.vue","main.js"],"sourcesContent":["<script lang=\"ts\">\r\nimport { TUILogin } from '@tencentcloud/tui-core';\r\n\r\n\r\n\r\n\r\n\r\nlet vueVersion = 2;\r\n\r\nvueVersion = 3;\r\n\r\n\r\n// Required information\r\n// You can get userSig from TencentCloud chat console for Testing TUIKit.\r\n// Deploy production environment please get it from your server.\r\n// View https://cloud.tencent.com/document/product/269/32688\r\nuni.$SDKAppID = 1600086550; // Your SDKAppID\r\nuni.$userID = '123'; // Your userID\r\nuni.$userSig = 'eJyrVgrxCdYrSy1SslIy0jNQ0gHzM1NS80oy0zLBwoZGxlDh4pTsxIKCzBQlK0MzAwMDCzNTUwOITGpFQWZRKlDc1NTUCCgFES3JzAWJmZuYGxpbALVATclMB5qaUmwRlpvkHBmcHWps7hScoe3sm6PtmRxZXOWZkZYbWGKYXlVo6ByUUlqRbqtUCwBTujBs'; // Your userSig\r\n\r\nexport default {\r\n onLaunch: function () {\r\n\t TUILogin.login({\r\n\t SDKAppID: uni.$SDKAppID,\r\n\t userID: uni.$userID, \r\n\t userSig: uni.$userSig, \r\n\t useUploadPlugin: true, // If you need to send rich media messages, please set to true.\r\n\t framework: `vue${vueVersion}` // framework used vue2 / vue3\r\n\t }).catch(() => {});\r\n }\r\n};\r\n</script>\r\n<style>\r\n/* common css for page */\r\nuni-page-body,html,body,page {\r\n width: 100% !important;\r\n height: 100% !important;\r\n overflow: hidden;\r\n}\r\n</style>","import App from './App'\r\n\r\n// #ifndef VUE3\r\nimport Vue from 'vue'\r\nimport './uni.promisify.adaptor'\r\nVue.config.productionTip = false\r\nApp.mpType = 'app'\r\nconst app = new Vue({\r\n ...App\r\n})\r\napp.$mount()\r\n// #endif\r\n\r\n// #ifdef VUE3\r\nimport { createSSRApp } from 'vue'\r\nexport function createApp() {\r\n const app = createSSRApp(App)\r\n return {\r\n app\r\n }\r\n}\r\n// #endif"],"names":["uni","TUILogin","createSSRApp","App"],"mappings":";;;;;;;;;;;;;;;;;AAOA,IAAI,aAAa;AAEjB,aAAa;AAObA,cAAAA,MAAI,YAAY;AAChBA,cAAAA,MAAI,UAAU;AACdA,cAAAA,MAAI,WAAW;AAEf,MAAe,YAAA;AAAA,EACb,UAAU,WAAY;AACtBC,kBAAAA,EAAS,MAAM;AAAA,MACb,UAAUD,cAAI,MAAA;AAAA,MACd,QAAQA,cAAI,MAAA;AAAA,MACZ,SAASA,cAAI,MAAA;AAAA,MACb,iBAAiB;AAAA;AAAA,MACjB,WAAW,MAAM,UAAU;AAAA;AAAA,IAAA,CAC5B,EAAE,MAAM,MAAM;AAAA,IAAA,CAAE;AAAA,EACjB;AACF;ACfO,SAAS,YAAY;AAC1B,QAAM,MAAME,cAAY,aAACC,SAAG;AAC5B,SAAO;AAAA,IACL;AAAA,EACD;AACH;;;"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
{"version":3,"file":"Home.js","sources":["pages/Home/Home.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvSG9tZS9Ib21lLnZ1ZQ"],"sourcesContent":["<template>\r\n <view class=\"page\">\r\n <image src=\"../../static/HomeBackground.png\" class=\"HomeBackground\"></image>\r\n </view>\r\n <view class=\"top-navigation-container\">\r\n <top-navigation></top-navigation>\r\n </view>\r\n <view class=\"Advertisement\">\r\n <advertisement></advertisement>\r\n </view>\r\n <view class=\"contentList\"> \r\n <contentList></contentList>\r\n </view>\r\n <view class=\"tabBar\">\r\n <tabBar></tabBar>\r\n </view>\r\n</template>\r\n\r\n<script>\r\nimport topNavigation from \"../../components/topNavigation/topNavigation\";\r\nimport Advertisement from \"../../components/Advertisement/Advertisement\";\r\nimport contentList from \"../../components/contentList/contentList\";\r\nimport tabBar from \"../../components/tabBar/tabBar\";\r\nexport default {\r\n data() {\r\n return {};\r\n },\r\n onLoad() {\r\n // 页面加载时执行\r\n },\r\n methods: {\r\n // 方法定义\r\n },\r\n components: {\r\n topNavigation,\r\n Advertisement,\r\n contentList,\r\n tabBar,\r\n },\r\n};\r\n</script>\r\n\r\n<style scoped>\r\n.page {\r\n position: relative;\r\n width: 750rpx;\r\n height: 1620rpx;\r\n}\r\n\r\n.HomeBackground {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 100%;\r\n z-index: -1;\r\n}\r\n.top-navigation-container {\r\n position: fixed;\r\n top: 160rpx;\r\n left: 0;\r\n width: 100%;\r\n height: 114.5rpx;\r\n}\r\n.Advertisement {\r\n position: fixed;\r\n top: 300rpx;\r\n left: 0;\r\n width: 100%;\r\n height: 100rpx;\r\n z-index: 100;\r\n}\r\n.contentList {\r\n position: fixed;\r\n top: 300rpx;\r\n left: 0;\r\n width: 100%;\r\n height: 1300rpx;\r\n}\r\n\r\n</style>\r\n","import MiniProgramPage from 'D:/项目/tk-mini-program/pages/Home/Home.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;;AAmBA,MAAO,gBAAe,MAAW;AACjC,MAAO,gBAAe,MAAW;AACjC,MAAO,cAAa,MAAW;AAC/B,eAAe,MAAW;AAC1B,MAAK,YAAU;AAAA,EACb,OAAO;AACL,WAAO;EACR;AAAA,EACD,SAAS;AAAA,EAER;AAAA,EACD,SAAS;AAAA;AAAA,EAER;AAAA,EACD,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACH;;;;;;;;;;;;;;;;;;;ACtCA,GAAG,WAAW,eAAe;"}
{"version":3,"file":"Home.js","sources":["pages/Home/Home.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvSG9tZS9Ib21lLnZ1ZQ"],"sourcesContent":["<template>\r\n <view class=\"page\">\r\n <image src=\"../../static/HomeBackground.png\" class=\"HomeBackground\"></image>\r\n </view>\r\n <view class=\"top-navigation-container\">\r\n <top-navigation></top-navigation>\r\n </view>\r\n <view class=\"Advertisement\">\r\n <advertisement></advertisement>\r\n </view>\r\n <view class=\"contentList\">\r\n <contentList></contentList>\r\n </view>\r\n <view class=\"tabBar\">\r\n <tabBar></tabBar>\r\n </view>\r\n</template>\r\n\r\n<script>\r\nimport topNavigation from \"../../components/topNavigation/topNavigation\";\r\nimport Advertisement from \"../../components/Advertisement/Advertisement\";\r\nimport contentList from \"../../components/contentList/contentList\";\r\nimport tabBar from \"../../components/tabBar/tabBar\";\r\nexport default {\r\n data() {\r\n return {};\r\n },\r\n onLoad() {\r\n this.requestSomething();\r\n },\r\n methods: {\r\n requestSomething() {\r\n wx.request({\r\n url: \"http://192.168.0.218:8086/user/login\", // 请求的 URL\r\n method: \"POST\", // 请求方式\r\n success: (res) => {\r\n console.log(\"请求成功\", res.data); // 处理成功的响应\r\n },\r\n fail: (err) => {\r\n console.error(\"请求失败\", err); // 处理失败的响应\r\n },\r\n });\r\n },\r\n },\r\n components: {\r\n topNavigation,\r\n Advertisement,\r\n contentList,\r\n tabBar,\r\n },\r\n};\r\n</script>\r\n\r\n<style scoped>\r\n.page {\r\n position: relative;\r\n width: 750rpx;\r\n height: 1620rpx;\r\n}\r\n\r\n.HomeBackground {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 100%;\r\n z-index: -1;\r\n}\r\n.top-navigation-container {\r\n position: fixed;\r\n top: 160rpx;\r\n left: 0;\r\n width: 100%;\r\n height: 114.5rpx;\r\n}\r\n.Advertisement {\r\n position: fixed;\r\n top: 300rpx;\r\n left: 0;\r\n width: 100%;\r\n height: 100rpx;\r\n z-index: 100;\r\n}\r\n.contentList {\r\n position: fixed;\r\n top: 300rpx;\r\n left: 0;\r\n width: 100%;\r\n height: 1300rpx;\r\n}\r\n</style>\r\n","import MiniProgramPage from 'D:/项目/tk-mini-program/pages/Home/Home.vue'\nwx.createPage(MiniProgramPage)"],"names":["wx","uni"],"mappings":";;;AAmBA,MAAO,gBAAe,MAAW;AACjC,MAAO,gBAAe,MAAW;AACjC,MAAO,cAAa,MAAW;AAC/B,eAAe,MAAW;AAC1B,MAAK,YAAU;AAAA,EACb,OAAO;AACL,WAAO;EACR;AAAA,EACD,SAAS;AACP,SAAK,iBAAgB;AAAA,EACtB;AAAA,EACD,SAAS;AAAA,IACP,mBAAmB;AACjBA,oBAAAA,KAAG,QAAQ;AAAA,QACT,KAAK;AAAA;AAAA,QACL,QAAQ;AAAA;AAAA,QACR,SAAS,CAAC,QAAQ;AAChBC,wBAAA,MAAA,MAAA,OAAA,6BAAY,QAAQ,IAAI,IAAI;AAAA,QAC7B;AAAA,QACD,MAAM,CAAC,QAAQ;AACbA,0EAAc,QAAQ,GAAG;AAAA,QAC1B;AAAA,MACH,CAAC;AAAA,IACF;AAAA,EACF;AAAA,EACD,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACH;;;;;;;;;;;;;;;;;;;ACjDA,GAAG,WAAW,eAAe;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"Mine.js","sources":["pages/Mine/Mine.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvTWluZS9NaW5lLnZ1ZQ"],"sourcesContent":["<template>\r\n <button @click=\"openChat\">OpenChat</button>\r\n </template>\r\n <script>\r\n export default {\r\n methods: {\r\n openChat() {\r\n // 1v1 chat: conversationID = `C2C${userID}`\r\n // group chat: conversationID = `GROUP${groupID}`\r\n const conversationID = 'C2Cqwe';\r\n uni.navigateTo({\r\n url: `/TUIKit/components/TUIChat/index?conversationID=${conversationID}`\r\n });\r\n }\r\n }\r\n }\r\n </script>","import MiniProgramPage from 'D:/项目/tk-mini-program/pages/Mine/Mine.vue'\nwx.createPage(MiniProgramPage)"],"names":["uni"],"mappings":";;AAII,MAAK,YAAU;AAAA,EACb,SAAS;AAAA,IACP,WAAW;AAGT,YAAM,iBAAiB;AACvBA,oBAAAA,MAAI,WAAW;AAAA,QACb,KAAK,mDAAmD,cAAc;AAAA,MACxE,CAAC;AAAA,IACH;AAAA,EACF;AACF;;;;;;;ACdJ,GAAG,WAAW,eAAe;"}

View File

@@ -1 +1 @@
{"version":3,"file":"index.js","sources":["pages/index/index.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvaW5kZXgvaW5kZXgudnVl"],"sourcesContent":["<template>\r\n\t<div>\r\n\t <button @click=\"openConversationList\">打开会话列表</button>\r\n\t <button @click=\"openContact\">打开联系人</button>\r\n\t</div>\r\n </template>\r\n <script>\r\n export default {\r\n\tmethods: {\r\n\t // 打开会话列表\r\n\t openConversationList() {\r\n\t\tuni.navigateTo({ url: '/TUIKit/components/TUIConversation/index' });\r\n\t },\r\n\t // 打开联系人\r\n\t openContact() {\r\n\t\tuni.navigateTo({ url: '/TUIKit/components/TUIContact/index' });\r\n\t },\r\n\t},\r\n };\r\n </script>","import MiniProgramPage from 'D:/项目/tk-mini-program/pages/index/index.vue'\nwx.createPage(MiniProgramPage)"],"names":["uni"],"mappings":";;AAOE,MAAK,YAAU;AAAA,EAChB,SAAS;AAAA;AAAA,IAEP,uBAAuB;AACxBA,oBAAAA,MAAI,WAAW,EAAE,KAAK,2CAA4C,CAAA;AAAA,IAChE;AAAA;AAAA,IAED,cAAc;AACfA,oBAAAA,MAAI,WAAW,EAAE,KAAK,sCAAuC,CAAA;AAAA,IAC3D;AAAA,EACF;;;;;;;;;AChBF,GAAG,WAAW,eAAe;"}
{"version":3,"file":"index.js","sources":["pages/index/index.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvaW5kZXgvaW5kZXgudnVl"],"sourcesContent":["<template></template>\r\n\r\n<script>\r\nexport default {\r\n data() {\r\n return {\r\n title: \"Hello\",\r\n };\r\n },\r\n onLoad() {\r\n this.openConversationList();\r\n },\r\n methods: {\r\n openConversationList() {\r\n uni.navigateTo({ url: \"/TUIKit/components/TUIConversation/index\" });\r\n },\r\n },\r\n};\r\n</script>\r\n\r\n<style scoped>\r\n/* 样式定义 */\r\n</style>\r\n","import MiniProgramPage from 'D:/项目/tk-mini-program/pages/index/index.vue'\nwx.createPage(MiniProgramPage)"],"names":["uni"],"mappings":";;AAGA,MAAK,YAAU;AAAA,EACb,OAAO;AACL,WAAO;AAAA,MACL,OAAO;AAAA;EAEV;AAAA,EACD,SAAS;AACR,SAAK,qBAAoB;AAAA,EACzB;AAAA,EACD,SAAS;AAAA,IACP,uBAAuB;AACrBA,oBAAAA,MAAI,WAAW,EAAE,KAAK,2CAA4C,CAAA;AAAA,IACnE;AAAA,EACF;AACH;;;;;AChBA,GAAG,WAAW,eAAe;"}

View File

@@ -1,216 +1,4 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
require("../../../adapter-vue.js");
const common_assets = require("../../../../common/assets.js");
const TUIKit_utils_env = require("../../../utils/env.js");
if (!Math) {
(ActionsMenu + Avatar + Icon)();
}
const Icon = () => "../../common/Icon.js";
const Avatar = () => "../../common/Avatar/index.js";
const ActionsMenu = () => "../actions-menu/index.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "index",
emits: ["handleSwitchConversation", "getPassingRef"],
setup(__props, { expose: __expose, emit: __emit }) {
const emits = __emit;
const currentConversation = common_vendor.ref();
const currentConversationID = common_vendor.ref();
const currentConversationDomRect = common_vendor.ref();
const isShowOverlay = common_vendor.ref(false);
const conversationList = common_vendor.ref([]);
const conversationListDomRef = common_vendor.ref();
const conversationListInnerDomRef = common_vendor.ref();
const actionsMenuPosition = common_vendor.ref({
top: 0,
left: void 0,
conversationHeight: void 0
});
const displayOnlineStatus = common_vendor.ref(false);
const userOnlineStatusMap = common_vendor.ref();
let lastestOpenActionsMenuTime = null;
common_vendor.onMounted(() => {
common_vendor.Jt.watch(common_vendor.o.CONV, {
currentConversationID: onCurrentConversationIDUpdated,
conversationList: onConversationListUpdated,
currentConversation: onCurrentConversationUpdated
});
common_vendor.Jt.watch(common_vendor.o.USER, {
displayOnlineStatus: onDisplayOnlineStatusUpdated,
userStatusList: onUserStatusListUpdated
});
if (!TUIKit_utils_env.isUniFrameWork && common_vendor.f$1 && !TUIKit_utils_env.isPC) {
addLongPressHandler();
}
});
common_vendor.onUnmounted(() => {
common_vendor.Jt.unwatch(common_vendor.o.CONV, {
currentConversationID: onCurrentConversationIDUpdated,
conversationList: onConversationListUpdated,
currentConversation: onCurrentConversationUpdated
});
common_vendor.Jt.unwatch(common_vendor.o.USER, {
displayOnlineStatus: onDisplayOnlineStatusUpdated,
userStatusList: onUserStatusListUpdated
});
});
const isShowUserOnlineStatus = (conversation) => {
return displayOnlineStatus.value && conversation.type === common_vendor.qt.TYPES.CONV_C2C;
};
const showConversationActionMenu = (event, conversation, index, isContextMenuEvent) => {
if (isContextMenuEvent) {
event.preventDefault();
if (TUIKit_utils_env.isUniFrameWork) {
return;
}
}
currentConversation.value = conversation;
lastestOpenActionsMenuTime = Date.now();
getActionsMenuPosition(event, index);
};
const closeConversationActionMenu = () => {
if (lastestOpenActionsMenuTime && Date.now() - lastestOpenActionsMenuTime > 300) {
currentConversation.value = void 0;
isShowOverlay.value = false;
}
};
const getActionsMenuPosition = (event, index) => {
var _a, _b;
if (TUIKit_utils_env.isUniFrameWork) {
if (typeof conversationListDomRef.value === "undefined") {
emits("getPassingRef", conversationListDomRef);
}
const query = (_a = common_vendor.i) == null ? void 0 : _a.createSelectorQuery().in(conversationListDomRef.value);
query.select(`#convlistitem-${index}`).boundingClientRect((data) => {
if (data) {
actionsMenuPosition.value = {
// The uni-page-head of uni-h5 is not considered a member of the viewport, so the height of the head is manually increased.
top: data.bottom + (TUIKit_utils_env.isH5 ? 44 : 0),
// @ts-expect-error in uniapp event has touches property
left: event.touches[0].pageX,
conversationHeight: data.height
};
isShowOverlay.value = true;
}
}).exec();
} else {
const rect = ((_b = event.currentTarget || event.target) == null ? void 0 : _b.getBoundingClientRect()) || {};
if (rect) {
actionsMenuPosition.value = {
top: rect.bottom,
left: TUIKit_utils_env.isPC ? event.clientX : void 0,
conversationHeight: rect.height
};
}
isShowOverlay.value = true;
}
};
const enterConversationChat = (conversationID) => {
emits("handleSwitchConversation", conversationID);
common_vendor.Xt.switchConversation(conversationID);
};
function addLongPressHandler() {
if (!conversationListInnerDomRef.value) {
return;
}
common_vendor.k({
element: conversationListInnerDomRef.value,
onLongPress: (event, target) => {
const index = Array.from(conversationListInnerDomRef.value.children).indexOf(target);
showConversationActionMenu(event, conversationList.value[index], index);
},
options: {
eventDelegation: {
subSelector: ".tui-conversation-content"
}
}
});
}
function onCurrentConversationUpdated(conversation) {
currentConversation.value = conversation;
}
function onConversationListUpdated(list) {
conversationList.value = list;
}
function onCurrentConversationIDUpdated(id) {
currentConversationID.value = id;
}
function onDisplayOnlineStatusUpdated(status) {
displayOnlineStatus.value = status;
}
function onUserStatusListUpdated(list) {
if (list.size !== 0) {
userOnlineStatusMap.value = [...list.entries()].reduce(
(obj, [key, value]) => {
obj[key] = value;
return obj;
},
{}
);
}
}
__expose({ closeChildren: closeConversationActionMenu });
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.unref(isShowOverlay)
}, common_vendor.unref(isShowOverlay) ? {
b: common_vendor.o$1(closeConversationActionMenu),
c: common_vendor.p({
selectedConversation: common_vendor.unref(currentConversation),
actionsMenuPosition: common_vendor.unref(actionsMenuPosition),
selectedConversationDomRect: common_vendor.unref(currentConversationDomRect)
})
} : {}, {
d: common_vendor.f(common_vendor.unref(conversationList), (conversation, index, i0) => {
return common_vendor.e({
a: "4ef42c1d-1-" + i0,
b: common_vendor.p({
useSkeletonAnimation: true,
url: conversation.getAvatar(),
size: "30px"
}),
c: common_vendor.unref(userOnlineStatusMap) && isShowUserOnlineStatus(conversation)
}, common_vendor.unref(userOnlineStatusMap) && isShowUserOnlineStatus(conversation) ? {
d: common_vendor.n(Object.keys(common_vendor.unref(userOnlineStatusMap)).length > 0 && Object.keys(common_vendor.unref(userOnlineStatusMap)).includes(conversation.userProfile.userID) && common_vendor.unref(userOnlineStatusMap)[conversation.userProfile.userID].statusType === 1 ? "online-status-online" : "online-status-offline")
} : {}, {
e: conversation.unreadCount > 0 && !conversation.isMuted
}, conversation.unreadCount > 0 && !conversation.isMuted ? {
f: common_vendor.t(conversation.unreadCount > 99 ? "99+" : conversation.unreadCount)
} : {}, {
g: conversation.unreadCount > 0 && conversation.isMuted
}, conversation.unreadCount > 0 && conversation.isMuted ? {} : {}, {
h: common_vendor.t(conversation.getShowName()),
i: conversation.draftText && conversation.conversationID !== common_vendor.unref(currentConversationID)
}, conversation.draftText && conversation.conversationID !== common_vendor.unref(currentConversationID) ? {
j: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUIChat.[草稿]"))
} : conversation.type === "GROUP" && conversation.groupAtInfoList && conversation.groupAtInfoList.length > 0 ? {
l: common_vendor.t(conversation.getGroupAtInfo())
} : {}, {
k: conversation.type === "GROUP" && conversation.groupAtInfoList && conversation.groupAtInfoList.length > 0,
m: common_vendor.t(conversation.getLastMessage("text")),
n: common_vendor.t(conversation.getLastMessage("time")),
o: conversation.isMuted
}, conversation.isMuted ? {
p: "4ef42c1d-2-" + i0,
q: common_vendor.p({
file: common_vendor.unref(common_assets.muteIcon)
})
} : {}, {
r: common_vendor.n(common_vendor.unref(currentConversationID) === conversation.conversationID && "tui-conversation-item-selected"),
s: common_vendor.n(conversation.isPinned && "tui-conversation-item-pinned"),
t: common_vendor.o$1(($event) => enterConversationChat(conversation.conversationID), index),
v: common_vendor.o$1(($event) => showConversationActionMenu($event, conversation, index), index),
w: common_vendor.o$1(($event) => showConversationActionMenu($event, conversation, index, true), index),
x: `convlistitem-${index}`,
y: index
});
}),
e: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isPC) && "isPC"),
f: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isMobile) && "tui-conversation-content-h5 disable-select")
});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-4ef42c1d"]]);
wx.createComponent(Component);
const index = require("../../../../index.js");
wx.createPage(index.MiniProgramPage);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIConversation/conversation-list/index.js.map

View File

@@ -1,5 +1,5 @@
{
"component": true,
"navigationBarTitleText": "列表",
"usingComponents": {
"icon": "../../common/Icon",
"avatar": "../../common/Avatar/index",

View File

@@ -0,0 +1,4 @@
"use strict";
const index = require("../../../../index.js");
wx.createPage(index.MiniProgramPage);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIConversation/conversation-list/index2.js.map

View File

@@ -2,9 +2,10 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const common_vendor = require("./common/vendor.js");
if (!Math) {
"./pages/index/index.js";
"./pages/Home/Home.js";
"./pages/index/index.js";
"./pages/Message/Message.js";
"./pages/Mine/Mine.js";
"./TUIKit/components/TUIConversation/index.js";
"./TUIKit/components/TUIChat/index.js";
"./TUIKit/components/TUIChat/video-play.js";
@@ -12,12 +13,13 @@ if (!Math) {
"./TUIKit/components/TUIContact/index.js";
"./TUIKit/components/TUIGroup/index.js";
"./TUIKit/components/TUISearch/index2.js";
"./TUIKit/components/TUIConversation/conversation-list/index2.js";
}
let vueVersion = 2;
vueVersion = 3;
common_vendor.index.$SDKAppID = 0;
common_vendor.index.$userID = "";
common_vendor.index.$userSig = "";
common_vendor.index.$SDKAppID = 1600086550;
common_vendor.index.$userID = "123";
common_vendor.index.$userSig = "eJyrVgrxCdYrSy1SslIy0jNQ0gHzM1NS80oy0zLBwoZGxlDh4pTsxIKCzBQlK0MzAwMDCzNTUwOITGpFQWZRKlDc1NTUCCgFES3JzAWJmZuYGxpbALVATclMB5qaUmwRlpvkHBmcHWps7hScoe3sm6PtmRxZXOWZkZYbWGKYXlVo6ByUUlqRbqtUCwBTujBs";
const _sfc_main = {
onLaunch: function() {
common_vendor.A.login({

View File

@@ -1,8 +1,9 @@
{
"pages": [
"pages/index/index",
"pages/Home/Home",
"pages/Message/Message"
"pages/index/index",
"pages/Message/Message",
"pages/Mine/Mine"
],
"subPackages": [
{
@@ -14,7 +15,8 @@
"components/TUIChat/web-view",
"components/TUIContact/index",
"components/TUIGroup/index",
"components/TUISearch/index"
"components/TUISearch/index",
"components/TUIConversation/conversation-list/index"
]
}
],
@@ -36,6 +38,10 @@
{
"pagePath": "pages/Message/Message",
"text": "消息"
},
{
"pagePath": "pages/Mine/Mine",
"text": "我的"
}
]
},

View File

@@ -3,6 +3,7 @@ const _imports_0$2 = "/static/HomeBackground.png";
const createGroup = "/assets/start-group.6d6b5fbb.svg";
const C2C = "/assets/icon-c2c.d80299ab.svg";
const settingSVG = "/assets/setting.a15e5daf.svg";
const muteIcon = "/assets/mute.94c8513a.svg";
const _imports_0$1 = "/static/Searching.png";
const _imports_0 = "/static/logo.png";
const _imports_1 = "/static/female.png";
@@ -21,7 +22,6 @@ const addSVG = "/assets/add.ea3b9dc9.svg";
const backIcon = "/assets/back.e9626a2e.svg";
const editIcon = "/assets/edit.4601124c.svg";
const closeIcon = "/assets/icon-close.00e2ef94.svg";
const muteIcon = "/assets/mute.94c8513a.svg";
const playIcon = "/assets/video-play.58b451c9.png";
const audioIcon$1 = "/assets/msg-audio.ac2cd1c9.svg";
const files = "/assets/file-light.7beeea9d.svg";

View File

@@ -7770,7 +7770,7 @@ function isConsoleWritable() {
function initRuntimeSocketService() {
const hosts = "192.168.0.107,127.0.0.1";
const port = "8090";
const id = "mp-weixin_qYuC86";
const id = "mp-weixin_9hN2YW";
const lazy = typeof swan !== "undefined";
let restoreError = lazy ? () => {
} : initOnError();
@@ -29635,4 +29635,5 @@ exports.withDefaults = withDefaults;
exports.withDirectives = withDirectives;
exports.withModifiers = withModifiers;
exports.withScopeId = withScopeId;
exports.wx$1 = wx$1;
//# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map

View File

@@ -18,7 +18,6 @@ const _sfc_main = {
{
iconPath: "../../static/Forum.png",
selectedIconPath: "../../static/Forumclick.png",
// text: '消息',
text: "论坛",
pagePath: "",
middleClass: ""
@@ -34,14 +33,13 @@ const _sfc_main = {
iconPath: "../../static/Message.png",
selectedIconPath: "../../static/Messageclick.png",
text: "消息",
// text: '社区',
pagePath: "../../pages/Message/Message"
pagePath: "../../pages/index/index"
},
{
iconPath: "../../static/Mine.png",
selectedIconPath: "../../static/Mineclick.png",
text: "我的",
pagePath: "",
pagePath: "../../pages/Mine/Mine",
middleClass: ""
}
]);
@@ -50,9 +48,9 @@ const _sfc_main = {
});
common_vendor.index.getSystemInfo({
success: function(res) {
common_vendor.index.__f__("log", "at components/tabBar/tabBar.vue:85", "机型", res.deviceType);
common_vendor.index.__f__("log", "at components/tabBar/tabBar.vue:83", "机型", res.deviceType);
if (res.safeArea.top > 40) {
common_vendor.index.__f__("log", "at components/tabBar/tabBar.vue:87", "苹果的底部栏大小", res.safeArea.top);
common_vendor.index.__f__("log", "at components/tabBar/tabBar.vue:85", "苹果的底部栏大小", res.safeArea.top);
}
}
});

216
unpackage/dist/dev/mp-weixin/index.js vendored Normal file
View File

@@ -0,0 +1,216 @@
"use strict";
const common_vendor = require("./common/vendor.js");
require("./TUIKit/adapter-vue.js");
const common_assets = require("./common/assets.js");
const TUIKit_utils_env = require("./TUIKit/utils/env.js");
if (!Math) {
(ActionsMenu + Avatar + Icon)();
}
const Icon = () => "./TUIKit/components/common/Icon.js";
const Avatar = () => "./TUIKit/components/common/Avatar/index.js";
const ActionsMenu = () => "./TUIKit/components/TUIConversation/actions-menu/index.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "index",
emits: ["handleSwitchConversation", "getPassingRef"],
setup(__props, { expose: __expose, emit: __emit }) {
const emits = __emit;
const currentConversation = common_vendor.ref();
const currentConversationID = common_vendor.ref();
const currentConversationDomRect = common_vendor.ref();
const isShowOverlay = common_vendor.ref(false);
const conversationList = common_vendor.ref([]);
const conversationListDomRef = common_vendor.ref();
const conversationListInnerDomRef = common_vendor.ref();
const actionsMenuPosition = common_vendor.ref({
top: 0,
left: void 0,
conversationHeight: void 0
});
const displayOnlineStatus = common_vendor.ref(false);
const userOnlineStatusMap = common_vendor.ref();
let lastestOpenActionsMenuTime = null;
common_vendor.onMounted(() => {
common_vendor.Jt.watch(common_vendor.o.CONV, {
currentConversationID: onCurrentConversationIDUpdated,
conversationList: onConversationListUpdated,
currentConversation: onCurrentConversationUpdated
});
common_vendor.Jt.watch(common_vendor.o.USER, {
displayOnlineStatus: onDisplayOnlineStatusUpdated,
userStatusList: onUserStatusListUpdated
});
if (!TUIKit_utils_env.isUniFrameWork && common_vendor.f$1 && !TUIKit_utils_env.isPC) {
addLongPressHandler();
}
});
common_vendor.onUnmounted(() => {
common_vendor.Jt.unwatch(common_vendor.o.CONV, {
currentConversationID: onCurrentConversationIDUpdated,
conversationList: onConversationListUpdated,
currentConversation: onCurrentConversationUpdated
});
common_vendor.Jt.unwatch(common_vendor.o.USER, {
displayOnlineStatus: onDisplayOnlineStatusUpdated,
userStatusList: onUserStatusListUpdated
});
});
const isShowUserOnlineStatus = (conversation) => {
return displayOnlineStatus.value && conversation.type === common_vendor.qt.TYPES.CONV_C2C;
};
const showConversationActionMenu = (event, conversation, index, isContextMenuEvent) => {
if (isContextMenuEvent) {
event.preventDefault();
if (TUIKit_utils_env.isUniFrameWork) {
return;
}
}
currentConversation.value = conversation;
lastestOpenActionsMenuTime = Date.now();
getActionsMenuPosition(event, index);
};
const closeConversationActionMenu = () => {
if (lastestOpenActionsMenuTime && Date.now() - lastestOpenActionsMenuTime > 300) {
currentConversation.value = void 0;
isShowOverlay.value = false;
}
};
const getActionsMenuPosition = (event, index) => {
var _a, _b;
if (TUIKit_utils_env.isUniFrameWork) {
if (typeof conversationListDomRef.value === "undefined") {
emits("getPassingRef", conversationListDomRef);
}
const query = (_a = common_vendor.i) == null ? void 0 : _a.createSelectorQuery().in(conversationListDomRef.value);
query.select(`#convlistitem-${index}`).boundingClientRect((data) => {
if (data) {
actionsMenuPosition.value = {
// The uni-page-head of uni-h5 is not considered a member of the viewport, so the height of the head is manually increased.
top: data.bottom + (TUIKit_utils_env.isH5 ? 44 : 0),
// @ts-expect-error in uniapp event has touches property
left: event.touches[0].pageX,
conversationHeight: data.height
};
isShowOverlay.value = true;
}
}).exec();
} else {
const rect = ((_b = event.currentTarget || event.target) == null ? void 0 : _b.getBoundingClientRect()) || {};
if (rect) {
actionsMenuPosition.value = {
top: rect.bottom,
left: TUIKit_utils_env.isPC ? event.clientX : void 0,
conversationHeight: rect.height
};
}
isShowOverlay.value = true;
}
};
const enterConversationChat = (conversationID) => {
emits("handleSwitchConversation", conversationID);
common_vendor.Xt.switchConversation(conversationID);
};
function addLongPressHandler() {
if (!conversationListInnerDomRef.value) {
return;
}
common_vendor.k({
element: conversationListInnerDomRef.value,
onLongPress: (event, target) => {
const index = Array.from(conversationListInnerDomRef.value.children).indexOf(target);
showConversationActionMenu(event, conversationList.value[index], index);
},
options: {
eventDelegation: {
subSelector: ".tui-conversation-content"
}
}
});
}
function onCurrentConversationUpdated(conversation) {
currentConversation.value = conversation;
}
function onConversationListUpdated(list) {
conversationList.value = list;
}
function onCurrentConversationIDUpdated(id) {
currentConversationID.value = id;
}
function onDisplayOnlineStatusUpdated(status) {
displayOnlineStatus.value = status;
}
function onUserStatusListUpdated(list) {
if (list.size !== 0) {
userOnlineStatusMap.value = [...list.entries()].reduce(
(obj, [key, value]) => {
obj[key] = value;
return obj;
},
{}
);
}
}
__expose({ closeChildren: closeConversationActionMenu });
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.unref(isShowOverlay)
}, common_vendor.unref(isShowOverlay) ? {
b: common_vendor.o$1(closeConversationActionMenu),
c: common_vendor.p({
selectedConversation: common_vendor.unref(currentConversation),
actionsMenuPosition: common_vendor.unref(actionsMenuPosition),
selectedConversationDomRect: common_vendor.unref(currentConversationDomRect)
})
} : {}, {
d: common_vendor.f(common_vendor.unref(conversationList), (conversation, index, i0) => {
return common_vendor.e({
a: "4ef42c1d-1-" + i0,
b: common_vendor.p({
useSkeletonAnimation: true,
url: conversation.getAvatar(),
size: "30px"
}),
c: common_vendor.unref(userOnlineStatusMap) && isShowUserOnlineStatus(conversation)
}, common_vendor.unref(userOnlineStatusMap) && isShowUserOnlineStatus(conversation) ? {
d: common_vendor.n(Object.keys(common_vendor.unref(userOnlineStatusMap)).length > 0 && Object.keys(common_vendor.unref(userOnlineStatusMap)).includes(conversation.userProfile.userID) && common_vendor.unref(userOnlineStatusMap)[conversation.userProfile.userID].statusType === 1 ? "online-status-online" : "online-status-offline")
} : {}, {
e: conversation.unreadCount > 0 && !conversation.isMuted
}, conversation.unreadCount > 0 && !conversation.isMuted ? {
f: common_vendor.t(conversation.unreadCount > 99 ? "99+" : conversation.unreadCount)
} : {}, {
g: conversation.unreadCount > 0 && conversation.isMuted
}, conversation.unreadCount > 0 && conversation.isMuted ? {} : {}, {
h: common_vendor.t(conversation.getShowName()),
i: conversation.draftText && conversation.conversationID !== common_vendor.unref(currentConversationID)
}, conversation.draftText && conversation.conversationID !== common_vendor.unref(currentConversationID) ? {
j: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUIChat.[草稿]"))
} : conversation.type === "GROUP" && conversation.groupAtInfoList && conversation.groupAtInfoList.length > 0 ? {
l: common_vendor.t(conversation.getGroupAtInfo())
} : {}, {
k: conversation.type === "GROUP" && conversation.groupAtInfoList && conversation.groupAtInfoList.length > 0,
m: common_vendor.t(conversation.getLastMessage("text")),
n: common_vendor.t(conversation.getLastMessage("time")),
o: conversation.isMuted
}, conversation.isMuted ? {
p: "4ef42c1d-2-" + i0,
q: common_vendor.p({
file: common_vendor.unref(common_assets.muteIcon)
})
} : {}, {
r: common_vendor.n(common_vendor.unref(currentConversationID) === conversation.conversationID && "tui-conversation-item-selected"),
s: common_vendor.n(conversation.isPinned && "tui-conversation-item-pinned"),
t: common_vendor.o$1(($event) => enterConversationChat(conversation.conversationID), index),
v: common_vendor.o$1(($event) => showConversationActionMenu($event, conversation, index), index),
w: common_vendor.o$1(($event) => showConversationActionMenu($event, conversation, index, true), index),
x: `convlistitem-${index}`,
y: index
});
}),
e: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isPC) && "isPC"),
f: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isMobile) && "tui-conversation-content-h5 disable-select")
});
};
}
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-4ef42c1d"]]);
exports.MiniProgramPage = MiniProgramPage;
//# sourceMappingURL=../.sourcemap/mp-weixin/index.js.map

View File

@@ -10,9 +10,23 @@ const _sfc_main = {
return {};
},
onLoad() {
this.requestSomething();
},
methods: {
// 方法定义
requestSomething() {
common_vendor.wx$1.request({
url: "http://192.168.0.218:8086/user/login",
// 请求的 URL
method: "POST",
// 请求方式
success: (res) => {
common_vendor.index.__f__("log", "at pages/Home/Home.vue:37", "请求成功", res.data);
},
fail: (err) => {
common_vendor.index.__f__("error", "at pages/Home/Home.vue:40", "请求失败", err);
}
});
}
},
components: {
topNavigation,

View File

@@ -20,18 +20,17 @@
height: 114.5rpx;
}
.Advertisement.data-v-7ffebbf4 {
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.data-v-7ffebbf4 {
position: fixed;
top: 300rpx;
left: 0;
width: 100%;
height: 1300rpx;
position: fixed;
top: 300rpx;
left: 0;
width: 100%;
height: 1300rpx;
}

View File

@@ -0,0 +1,20 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
methods: {
openChat() {
const conversationID = "C2Cqwe";
common_vendor.index.navigateTo({
url: `/TUIKit/components/TUIChat/index?conversationID=${conversationID}`
});
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.o$1((...args) => $options.openChat && $options.openChat(...args))
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/Mine/Mine.js.map

View File

@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "我的",
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<button bindtap="{{a}}">OpenChat</button>

View File

View File

@@ -1,23 +1,23 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
data() {
return {
title: "Hello"
};
},
onLoad() {
this.openConversationList();
},
methods: {
// 打开会话列表
openConversationList() {
common_vendor.index.navigateTo({ url: "/TUIKit/components/TUIConversation/index" });
},
// 打开联系人
openContact() {
common_vendor.index.navigateTo({ url: "/TUIKit/components/TUIContact/index" });
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.o$1((...args) => $options.openConversationList && $options.openConversationList(...args)),
b: common_vendor.o$1((...args) => $options.openContact && $options.openContact(...args))
};
return {};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-1cf27b2a"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index.js.map

View File

@@ -1 +0,0 @@
<view><button bindtap="{{a}}">打开会话列表</button><button bindtap="{{b}}">打开联系人</button></view>

View File

@@ -0,0 +1,2 @@
/* 样式定义 */