增加聊天功能
This commit is contained in:
@@ -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
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//私域引流配置
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user