1、处理后登录弹窗的账号密码登录无法在微信小程序登录问题

This commit is contained in:
77 2024-11-11 17:34:11 +08:00
parent 5afc3affc8
commit 3f6d84a67b
6 changed files with 25 additions and 14 deletions

View File

@ -2,7 +2,6 @@
<!-- 聊天虚拟列表 --> <!-- 聊天虚拟列表 -->
<z-paging <z-paging
ref="pagingRef" ref="pagingRef"
v-model="messageList"
use-chat-record-mode use-chat-record-mode
use-virtual-list use-virtual-list
cell-height-mode="dynamic" cell-height-mode="dynamic"
@ -28,7 +27,6 @@
<MessageListItem <MessageListItem
:message="item" :message="item"
:message-index="index" :message-index="index"
:message-list="messageList"
></MessageListItem> ></MessageListItem>
</view> </view>
</template> </template>
@ -54,7 +52,6 @@ const props = defineProps({
default() {}, default() {},
}, },
}); });
const messageList = ref([]); //
const showNewMessageTip = ref(false); // const showNewMessageTip = ref(false); //
const backToTopStyle = reactive({ const backToTopStyle = reactive({
width: '100px', width: '100px',
@ -77,14 +74,17 @@ const props = defineProps({
queryParams.pageSize = pageSize; queryParams.pageSize = pageSize;
await getMessageList(); await getMessageList();
}; };
const msss = ref([]);
// //
const getMessageList = async () => { const getMessageList = async () => {
const { data } = await KeFuApi.getKefuMessagePage(queryParams); const { data } = await KeFuApi.getKefuMessagePage(queryParams);
if (isEmpty(data.list)) { if (isEmpty(data.list)) {
return; return;
} }
msss.value = data.list
pagingRef.value.completeByTotal(data.list, data.total); pagingRef.value.completeByTotal(data.list, data.total);
}; };
const emits = defineEmits(['cc']);
/** 刷新消息列表 */ /** 刷新消息列表 */
const refreshMessageList = (message = undefined) => { const refreshMessageList = (message = undefined) => {
if (queryParams.pageNo != 1 && message !== undefined) { if (queryParams.pageNo != 1 && message !== undefined) {
@ -94,6 +94,8 @@ const props = defineProps({
return; return;
} }
pagingRef.value.reload(); pagingRef.value.reload();
console.log("--data1---")
emits("cc", msss.value[msss.value.length-1].kefuName)
}; };
/** 滚动到最新消息 */ /** 滚动到最新消息 */
const onBackToTopClick = (event) => { const onBackToTopClick = (event) => {

View File

@ -141,7 +141,7 @@
} }
return false; return false;
}); });
import { kefuPath } from '@/sheep/config';
// //
function replaceEmoji(data) { function replaceEmoji(data) {
let newData = data; let newData = data;
@ -154,7 +154,7 @@
newData = newData.replace( newData = newData.replace(
item, item,
`<img class="chat-img" style="width: 24px;height: 24px;margin: 0 3px;" src="${sheep.$url.cdn( `<img class="chat-img" style="width: 24px;height: 24px;margin: 0 3px;" src="${sheep.$url.cdn(
'/static/img/chat/emoji/' + emojiFile, kefuPath + '/shangcheng/asserts/' + emojiFile,
)}"/>`, )}"/>`,
); );
}); });

View File

@ -20,7 +20,7 @@
v-for="item in emoji" v-for="item in emoji"
:key="item" :key="item"
class="emoji-img" class="emoji-img"
:src="sheep.$url.cdn(`/static/img/chat/emoji/${item.file}`)" :src="`${kefuPath}/shangcheng/asserts/${item.file}`"
@tap="onEmoji(item)" @tap="onEmoji(item)"
> >
</image> </image>
@ -37,7 +37,7 @@
> >
<image <image
class="icon" class="icon"
:src="sheep.$url.static('/static/img/shop/chat/image.png')" :src="sheep.$url.static('https://zysc.fjptzykj.com:3000/shangcheng/5f4b6964b144be9a309aa45560c2b82515f2b5557e4f44fcd1b9795b3cc28757.png')"
mode="aspectFill" mode="aspectFill"
></image> ></image>
</s-uploader> </s-uploader>
@ -46,7 +46,7 @@
<view class="goods" @tap="onShowSelect('goods')"> <view class="goods" @tap="onShowSelect('goods')">
<image <image
class="icon" class="icon"
:src="sheep.$url.static('/static/img/shop/chat/goods.png')" :src="sheep.$url.static('https://zysc.fjptzykj.com:3000/shangcheng/b18fdf64dbe03b39290a0a96d5b90ae1cc6f9d80da13c1c47eaacc47c2710a7c.png')"
mode="aspectFill" mode="aspectFill"
></image> ></image>
<view>商品</view> <view>商品</view>
@ -54,7 +54,7 @@
<view class="order" @tap="onShowSelect('order')"> <view class="order" @tap="onShowSelect('order')">
<image <image
class="icon" class="icon"
:src="sheep.$url.static('/static/img/shop/chat/order.png')" :src="sheep.$url.static('https://zysc.fjptzykj.com:3000/shangcheng/f6c484a459e843baeb729603ae221b6d3ab384b56c2d891ae53b0ee4205477a9.png')"
mode="aspectFill" mode="aspectFill"
></image> ></image>
<view>订单</view> <view>订单</view>
@ -71,7 +71,7 @@
*/ */
import { emojiPage } from '@/pages/chat/util/emoji'; import { emojiPage } from '@/pages/chat/util/emoji';
import sheep from '@/sheep'; import sheep from '@/sheep';
import { kefuPath } from '@/sheep/config';
const props = defineProps({ const props = defineProps({
// //
toolsMode: { toolsMode: {

View File

@ -1,13 +1,15 @@
<template> <template>
<!-- :title="!isReconnecting ? '连接客服成功' : '会话重连中'" -->
<!-- :title="kefuName" -->
<s-layout <s-layout
class="chat-wrap" class="chat-wrap"
:title="!isReconnecting ? '连接客服成功' : '会话重连中'" title="众悦商城客服"
navbar="inner" navbar="inner"
> >
<!-- 覆盖头部导航栏背景颜色 --> <!-- 覆盖头部导航栏背景颜色 -->
<div class="page-bg" :style="{ height: sys_navBar + 'px' }"></div> <div class="page-bg" :style="{ height: sys_navBar + 'px' }"></div>
<!-- 聊天区域 --> <!-- 聊天区域 -->
<MessageList ref="messageListRef" :hei="sys_navBar"> <MessageList ref="messageListRef" :hei="sys_navBar" @cc="ss">
<template #bottom> <template #bottom>
<message-input <message-input
v-model="chat.msg" v-model="chat.msg"
@ -55,9 +57,12 @@
import FileApi from '@/sheep/api/infra/file'; import FileApi from '@/sheep/api/infra/file';
import KeFuApi from '@/sheep/api/promotion/kefu'; import KeFuApi from '@/sheep/api/promotion/kefu';
import { useWebSocket } from '@/sheep/hooks/useWebSocket'; import { useWebSocket } from '@/sheep/hooks/useWebSocket';
const kefuName = ref('众悦商城客服');
const sys_navBar = sheep.$platform.navbar; const sys_navBar = sheep.$platform.navbar;
function ss(val){
console.log('ss进来了',val)
kefuName.value = val;
}
const chat = reactive({ const chat = reactive({
msg: '', msg: '',
scrollInto: '', scrollInto: '',

View File

@ -12,9 +12,11 @@ console.log(`[芋道商城 ${version}] http://doc.iocoder.cn`);
export const apiPath = import.meta.env.SHOPRO_API_PATH; export const apiPath = import.meta.env.SHOPRO_API_PATH;
export const staticUrl = import.meta.env.SHOPRO_STATIC_URL; export const staticUrl = import.meta.env.SHOPRO_STATIC_URL;
export const websocketPath = import.meta.env.SHOPRO_WEBSOCKET_PATH; export const websocketPath = import.meta.env.SHOPRO_WEBSOCKET_PATH;
export const kefuPath = import.meta.env.SHOPRO_KEFU_PATH;
export default { export default {
baseUrl, baseUrl,
apiPath, apiPath,
staticUrl, staticUrl,
websocketPath, websocketPath,
kefuPath
}; };

View File

@ -8,9 +8,11 @@ import AuthUtil from '@/sheep/api/member/auth';
// 打开授权弹框 // 打开授权弹框
export function showAuthModal(type = 'smsLogin') { export function showAuthModal(type = 'smsLogin') {
const modal = $store('modal'); const modal = $store('modal');
// #ifdef MP
modal.$patch((state) => { modal.$patch((state) => {
state.auth = ''; state.auth = '';
}); });
// #endif
if (modal.auth !== '') { if (modal.auth !== '') {
closeAuthModal(); closeAuthModal();
setTimeout(() => { setTimeout(() => {