bug调整

This commit is contained in:
陈浩 2025-05-27 17:45:30 +08:00
parent de5e1be49f
commit 7b86bd334c
7 changed files with 181 additions and 147 deletions

View File

@ -9,7 +9,7 @@
/>
<div
:class="{
'control-reverse': message.flow === 'out'
'control-reverse': message.flow === 'out',
}"
>
<!-- message-bubble-container -->
@ -21,19 +21,23 @@
<Avatar
useSkeletonAnimation
:url="message.avatar || ''"
:style="{flex: '0 0 auto'}"
:style="{ flex: '0 0 auto' }"
/>
<main
class="message-body"
@click.stop
>
<main class="message-body" @click.stop>
<div
v-if="message.flow === 'in' && message.conversationType === 'GROUP'"
v-if="
message.flow === 'in' && message.conversationType === 'GROUP'
"
class="message-body-nick-name"
>
{{ props.content.showName }}
</div>
<div :class="['message-body-main', message.flow === 'out' && 'message-body-main-reverse']">
<div
:class="[
'message-body-main',
message.flow === 'out' && 'message-body-main-reverse',
]"
>
<div
:class="[
'blink',
@ -48,12 +52,16 @@
<div class="content-main">
<img
v-if="
(message.type === TYPES.MSG_IMAGE || message.type === TYPES.MSG_VIDEO) &&
message.hasRiskContent
(message.type === TYPES.MSG_IMAGE ||
message.type === TYPES.MSG_VIDEO) &&
message.hasRiskContent
"
:class="['message-risk-replace', !isPC && 'message-risk-replace-h5']"
:class="[
'message-risk-replace',
!isPC && 'message-risk-replace-h5',
]"
:src="riskImageReplaceUrl"
>
/>
<template v-else>
<slot />
</template>
@ -67,10 +75,7 @@
</div>
</div>
<!-- audio unplay mark -->
<div
v-if="isDisplayUnplayMark"
class="audio-unplay-mark"
/>
<div v-if="isDisplayUnplayMark" class="audio-unplay-mark" />
<!-- Fail Icon -->
<div
v-if="message.status === 'fail' || message.hasRiskContent"
@ -81,7 +86,10 @@
</div>
<!-- Loading Icon -->
<Icon
v-if="message.status === 'unSend' && needLoadingIconMessageType.includes(message.type)"
v-if="
message.status === 'unSend' &&
needLoadingIconMessageType.includes(message.type)
"
class="message-label loading-circle"
:file="loadingIcon"
:width="'15px'"
@ -89,6 +97,7 @@
/>
<!-- Read & Unread -->
<ReadStatus
v-if="message.conversationType !== 'GROUP'"
class="message-label align-self-bottom"
:message="shallowCopyMessage(message)"
@openReadUserPanel="openReadUserPanel"
@ -122,18 +131,21 @@
</template>
<script lang="ts" setup>
import { computed, toRefs } from '../../../../adapter-vue';
import TUIChatEngine, { TUITranslateService, IMessageModel } from '@tencentcloud/chat-uikit-engine';
import Icon from '../../../common/Icon.vue';
import ReadStatus from './read-status/index.vue';
import MessageQuote from './message-quote/index.vue';
import Avatar from '../../../common/Avatar/index.vue';
import MessageTranslate from './message-translate/index.vue';
import MessageConvert from './message-convert/index.vue';
import RadioSelect from '../../../common/RadioSelect/index.vue';
import loadingIcon from '../../../../assets/icon/loading.png';
import { shallowCopyMessage } from '../../utils/utils';
import { isPC } from '../../../../utils/env';
import { computed, toRefs } from "../../../../adapter-vue";
import TUIChatEngine, {
TUITranslateService,
IMessageModel,
} from "@tencentcloud/chat-uikit-engine";
import Icon from "../../../common/Icon.vue";
import ReadStatus from "./read-status/index.vue";
import MessageQuote from "./message-quote/index.vue";
import Avatar from "../../../common/Avatar/index.vue";
import MessageTranslate from "./message-translate/index.vue";
import MessageConvert from "./message-convert/index.vue";
import RadioSelect from "../../../common/RadioSelect/index.vue";
import loadingIcon from "../../../../assets/icon/loading.png";
import { shallowCopyMessage } from "../../utils/utils";
import { isPC } from "../../../../utils/env";
interface IProps {
messageItem: IMessageModel;
@ -146,12 +158,19 @@ interface IProps {
}
interface IEmits {
(e: 'resendMessage'): void;
(e: 'blinkMessage', messageID: string): void;
(e: 'setReadReceiptPanelVisible', visible: boolean, message?: IMessageModel): void;
(e: 'changeSelectMessageIDList', options: { type: 'add' | 'remove' | 'clearAll'; messageID: string }): void;
(e: "resendMessage"): void;
(e: "blinkMessage", messageID: string): void;
(
e: "setReadReceiptPanelVisible",
visible: boolean,
message?: IMessageModel
): void;
(
e: "changeSelectMessageIDList",
options: { type: "add" | "remove" | "clearAll"; messageID: string }
): void;
// Only for uni-app
(e: 'scrollTo', scrollHeight: number): void;
(e: "scrollTo", scrollHeight: number): void;
}
const emits = defineEmits<IEmits>();
@ -167,7 +186,8 @@ const props = withDefaults(defineProps<IProps>(), {
});
const TYPES = TUIChatEngine.TYPES;
const riskImageReplaceUrl = 'https://web.sdk.qcloud.com/component/TUIKit/assets/has_risk_default.png';
const riskImageReplaceUrl =
"https://web.sdk.qcloud.com/component/TUIKit/assets/has_risk_default.png";
const needLoadingIconMessageType = [
TYPES.MSG_LOCATION,
TYPES.MSG_TEXT,
@ -183,31 +203,37 @@ const isMultipleSelected = computed<boolean>(() => {
});
const isDisplayUnplayMark = computed<boolean>(() => {
return message.value.flow === 'in'
&& message.value.status === 'success'
&& message.value.type === TYPES.MSG_AUDIO
&& !props.isAudioPlayed;
return (
message.value.flow === "in" &&
message.value.status === "success" &&
message.value.type === TYPES.MSG_AUDIO &&
!props.isAudioPlayed
);
});
const containerClassNameList = computed(() => {
return [
'message-bubble',
isMultipleSelected.value ? 'multiple-selected' : '',
"message-bubble",
isMultipleSelected.value ? "multiple-selected" : "",
...props.classNameList,
];
});
const isNoPadding = computed(() => {
return [TYPES.MSG_IMAGE, TYPES.MSG_VIDEO, TYPES.MSG_MERGER].includes(message.value.type);
return [TYPES.MSG_IMAGE, TYPES.MSG_VIDEO, TYPES.MSG_MERGER].includes(
message.value.type
);
});
const riskContentText = computed<string>(() => {
let content = TUITranslateService.t('TUIChat.涉及敏感内容') + ', ';
if (message.value.flow === 'out') {
content += TUITranslateService.t('TUIChat.发送失败');
let content = TUITranslateService.t("TUIChat.涉及敏感内容") + ", ";
if (message.value.flow === "out") {
content += TUITranslateService.t("TUIChat.发送失败");
} else {
content += TUITranslateService.t(
message.value.type === TYPES.MSG_AUDIO ? 'TUIChat.无法收听' : 'TUIChat.无法查看',
message.value.type === TYPES.MSG_AUDIO
? "TUIChat.无法收听"
: "TUIChat.无法查看"
);
}
return content;
@ -221,28 +247,28 @@ const isBlink = computed(() => {
});
function toggleMultipleSelect(isSelected: boolean) {
emits('changeSelectMessageIDList', {
type: isSelected ? 'add' : 'remove',
emits("changeSelectMessageIDList", {
type: isSelected ? "add" : "remove",
messageID: message.value.ID,
});
}
function resendMessage() {
if (!message.value?.hasRiskContent) {
emits('resendMessage');
emits("resendMessage");
}
}
function blinkMessage(messageID: string) {
emits('blinkMessage', messageID);
emits("blinkMessage", messageID);
}
function scrollTo(scrollHeight: number) {
emits('scrollTo', scrollHeight);
emits("scrollTo", scrollHeight);
}
function openReadUserPanel() {
emits('setReadReceiptPanelVisible', true, message.value);
emits("setReadReceiptPanelVisible", true, message.value);
}
</script>
@ -376,96 +402,96 @@ function openReadUserPanel() {
margin-top: 5px;
border-top: 1px solid #e5c7c7;
padding-top: 5px;
}
}
.content-in {
background: #fbfbfb;
border-radius: 0 10px 10px;
}
.content-out {
background: #dceafd;
border-radius: 10px 0 10px 10px;
}
.content-no-padding {
padding: 0;
background: transparent;
border-radius: 10px;
overflow: hidden;
}
.content-no-padding.content-has-risk {
padding: 12px;
}
.content-has-risk {
background: rgba(250, 81, 81, 0.16);
}
.blink-shadow {
@keyframes shadow-blink {
50% {
box-shadow: rgba(255, 156, 25, 1) 0 0 10px 0;
}
}
box-shadow: rgba(255, 156, 25, 0) 0 0 10px 0;
animation: shadow-blink 1s linear 3;
}
.content-in {
background: #fbfbfb;
border-radius: 0 10px 10px;
}
.blink-content {
@keyframes reference-blink {
50% {
background-color: #ff9c19;
.content-out {
background: #dceafd;
border-radius: 10px 0 10px 10px;
}
.content-no-padding {
padding: 0;
background: transparent;
border-radius: 10px;
overflow: hidden;
}
.content-no-padding.content-has-risk {
padding: 12px;
}
.content-has-risk {
background: rgba(250, 81, 81, 0.16);
}
.blink-shadow {
@keyframes shadow-blink {
50% {
box-shadow: rgba(255, 156, 25, 1) 0 0 10px 0;
}
}
box-shadow: rgba(255, 156, 25, 0) 0 0 10px 0;
animation: shadow-blink 1s linear 3;
}
.blink-content {
@keyframes reference-blink {
50% {
background-color: #ff9c19;
}
}
animation: reference-blink 1s linear 3;
}
.message-label {
align-self: flex-end;
font-family: PingFangSC-Regular;
font-size: 12px;
color: #b6b8ba;
word-break: keep-all;
flex: 0 0 auto;
margin: 0 8px;
&.fail {
width: 15px;
height: 15px;
border-radius: 15px;
background: red;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
}
&.loading-circle {
opacity: 0;
animation: circle-loading 2s linear 1s infinite;
}
@keyframes circle-loading {
0% {
transform: rotate(0);
opacity: 1;
}
100% {
opacity: 1;
transform: rotate(360deg);
}
}
}
animation: reference-blink 1s linear 3;
}
.message-label {
align-self: flex-end;
font-family: PingFangSC-Regular;
font-size: 12px;
color: #b6b8ba;
word-break: keep-all;
flex: 0 0 auto;
margin: 0 8px;
&.fail {
width: 15px;
height: 15px;
border-radius: 15px;
background: red;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
}
&.loading-circle {
opacity: 0;
animation: circle-loading 2s linear 1s infinite;
}
@keyframes circle-loading {
0% {
transform: rotate(0);
opacity: 1;
}
100% {
opacity: 1;
transform: rotate(360deg);
}
}
}
.align-self-bottom {
align-self: flex-end;
.align-self-bottom {
align-self: flex-end;
}
}
}

View File

@ -48,7 +48,7 @@
<span
v-else
class="group-h5-list-item-content"
@click="edit(item.key)"
@click="edit(item.key,)"
>
<p class="content">{{ groupInfo.profile[item.key] }}</p>
<Icon :file="rightIcon" />
@ -133,7 +133,7 @@ import TUIChatEngine, {
TUIStore,
StoreName,
} from '@tencentcloud/chat-uikit-engine';
import { computed, reactive, watchEffect } from '../../../adapter-vue';
import { computed, reactive, watchEffect ,ref} from '../../../adapter-vue';
import documentLink from '../../../utils/documentLink';
import { isPC } from '../../../utils/env';
import Icon from '../../common/Icon.vue';
@ -149,7 +149,7 @@ import Server from '../server';
import { IUserProfile } from '../../../interface';
const TUIGroupServer = Server.getInstance();
const TUIConstants = TUIGroupServer.constants;
const sta=ref(1)
const groupInfo = reactive<any>({
profile: {
groupID: '',
@ -212,8 +212,6 @@ const submitDisabledStatus = computed(() => {
const selected = (type: any) => {
if (groupInfo.profile.type !== type) {
console.log(type,'====');
groupInfo.profile.type = type;
groupInfo.profile.avatar = findGroupIntroConfig(type).icon;
if (groupInfo.isEdit) {
@ -260,18 +258,26 @@ const submit = () => {
} else {
createGroup(profile);
}
sta.value=1
emit('con',1)
};
const closeCreated = () => {
emit('con',1)
if (groupInfo.isEdit) {
if(sta.value===1){
emit('con',1)
}else{
sta.value=1
if (groupInfo.isEdit) {
return groupInfo.isEdit = !groupInfo.isEdit;
}
handleCompleteCreate(null);
}
};
const edit = (label: string) => {
sta.value=0
groupInfo.isEdit = !groupInfo.isEdit;
groupInfo.groupConfig.key = label;
groupInfo.groupConfig.value = (groupInfo.profile as any)[label];

View File

@ -733,7 +733,7 @@
{
"path": "set/securityCenter/editPassword",
"style": {
"navigationBarTitleText": "修改密码",
"navigationBarTitleText": "修改手机号",
"app-plus": {
}

View File

@ -209,6 +209,7 @@ export default {
this.walletValue = res.data.result.walletValue;
this.autoCancel =
(res.data.result.autoCancel - new Date().getTime()) / 1000;
console.log(this.autoCancel,'倒计时分钟');
} else if (res.data.code == 32000) {
setTimeout(() => {
uni.redirectTo({

View File

@ -14,7 +14,7 @@
:options="LeftOptions" v-else v-for="(item, index) in goodList"
@click="clickGoodsSwiperAction(item, index)" :index="index" :key="index">
<view class="goods" @click="goGoodsDetail(item)">
<u-image width="131rpx" height="131rpx" :src="item.image" mode="aspectFit">
<u-image width="131rpx" height="131rpx" :src="imgfun(item.image)" mode="aspectFit">
<u-loading slot="loading"></u-loading>
</u-image>
<view class="goods-intro">
@ -39,7 +39,7 @@
<view class="store" @click="goStoreMainPage(item.id)">
<view class="intro">
<view class="store-logo">
<u-image width="102rpx" height="102rpx" :src="item.storeLogo" :alt="item.storeName"
<u-image width="102rpx" height="102rpx" :src="imgfun(item.storeLogo)" :alt="item.storeName"
mode="aspectFit">
<u-loading slot="loading"></u-loading>
</u-image>

View File

@ -8,7 +8,7 @@
width="140"
height="140"
shape="circle"
:src="userInfo.face || '/static/missing-face.png'"
:src="userInfo.face"
mode=""
></u-image>
<view class="user-name">
@ -229,6 +229,7 @@ export default {
},
onShow() {
this.userInfo = this.$options.filters.isLogin();
console.log(this.userInfo);
// #ifdef APP-PLUS
this.getCacheSize();
// #endif

View File

@ -13,7 +13,7 @@
:style="{ display: 'flex', flexDirection: 'column' }"
v-if="orderDetail.ste == '1'"
>
<view :style="{ width: '100%' }">
<view :style="{ width: '100%' }" v-if="orderDetail.payStatusValue!='待付款'">
<view class="order-info-view">
<view class="title">快递编号</view>
<view class="value">