添加分享

This commit is contained in:
18796357645 2025-07-15 15:39:17 +08:00
parent 75c82ad59d
commit 34eda16251
2 changed files with 9 additions and 2 deletions

View File

@ -4,7 +4,7 @@
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationBarTitleText": "首页", "navigationBarTitleText": "首页",
"navigationStyle": "custom", // 使 "navigationStyle": "custom",
"enableShareAppMessage": true "enableShareAppMessage": true
} }
}, },

View File

@ -307,6 +307,13 @@ export default {
reconnectInterval: 5000 // 5 reconnectInterval: 5000 // 5
}; };
}, },
onShareAppMessage() {
return {
title: '欢迎是有Totustec',
path: '/pages/index/index',
imageUrl: 'https://online.totustec.com/upload/indexPage/logo.png'
}
},
onLoad () { onLoad () {
const systemInfo = wx.getSystemInfoSync(); const systemInfo = wx.getSystemInfoSync();
const { const {
@ -327,7 +334,7 @@ export default {
methods: { methods: {
// ---------------------- WebSocket ---------------------- // ---------------------- WebSocket ----------------------
connectWebSocket () { connectWebSocket () {
const wsUrl = 'ws://e7eb22d8.natappfree.cc/webSocket/vue'; const wsUrl = 'ws://online.totustec.com/webSocket/vue';
// WebSocket 使 uni-app // WebSocket 使 uni-app
this.socketTask = uni.connectSocket({ this.socketTask = uni.connectSocket({