增加群聊功能

This commit is contained in:
2025-12-04 09:14:26 +08:00
parent da321e3afc
commit 63ca14379e
27 changed files with 2537 additions and 14 deletions

View File

@@ -1,5 +1,9 @@
//服务器接口地址
const baseURL : string = 'https://newblockwlx.sxczgkj.cn/index.php/api/'
// const baseURL : string = 'https://newblockwlx.sxczgkj.cn/index.php/api/'
let baseURL : string = 'http://192.168.1.42:8787/api/'
// #ifdef H5
baseURL='/phpapi/api/'
// #endif
// 封装公共请求方法
function request(url : string, method : "GET" | "POST" | undefined, data : object | any, toast : boolean) {
let networkType = ''
@@ -26,7 +30,8 @@ function request(url : string, method : "GET" | "POST" | undefined, data : objec
header = {
'content-type': 'application/json',
'clinttype':uni.getStorageSync('clint_type'),
'bausertoken': uni.getStorageSync('phpuserinfo').token
'bausertoken': uni.getStorageSync('phpuserinfo').token||'',
'token': uni.getStorageSync('iToken').tokenValue||'',
};
uni.request({
url: baseURL + url,
@@ -66,6 +71,7 @@ function request(url : string, method : "GET" | "POST" | undefined, data : objec
}
},
fail(err) {
console.log(err)
uni.hideLoading()
//请求失败
uni.showToast({