增加聊天功能

This commit is contained in:
2025-12-04 17:14:47 +08:00
parent ca829d7f00
commit 6f1185be3a
25 changed files with 2504 additions and 2 deletions

View File

@@ -157,6 +157,7 @@ import { APIusershopInfodetail, APIshopUserInfo } from '@/common/api/member.js';
import { APImemberPointsmyPoints, APImemberPointscalcUsablePoints } from '@/common/api/shop/index.js';
import { useCartsStore } from '@/stores/carts.js';
import { useWebSocket } from '@/stores/carts-websocket.js';
import * as chatApi from "@/http/php/chat";
function pwdClose() {
ispws.value = false;
@@ -977,10 +978,18 @@ const navTitle = computed(() => {
});
//支付成功后的处理
function paySucessCallback() {
async function paySucessCallback() {
console.log('paySucessCallback');
cartsSocket.closeSocket();
showDrainage.value = true;
const groupinfo=await chatApi.groupShopinfo({shop_id:cartStore.shopInfo.id})
if(groupinfo&&groupinfo[0]){
console.log('groupinfo',groupinfo[0].id);
chatApi.groupJoin({
group_id:groupinfo[0].id
})
}
}
//私域引流配置

View File

@@ -281,6 +281,11 @@ const myFunList = ref([
type: "fenxiao",
icon: "/static/icon/fenxiao.svg",
},
{
name: "商家推送",
type: "msg",
icon: "/static/icon/msg.png",
},
// {
// name: "我的订单",
// type: "my_order",
@@ -383,6 +388,9 @@ const clickTo = (item, index) => {
}
let shopId = null;
switch (item.type) {
case "msg":
uni.navigateTo({ url: "/pageChat/index" });
break;
case "my_order":
uni.pro.switchTab("order/index");
break;