瀏覽代碼

0721-0158-h001

Zory 2 周之前
父節點
當前提交
d096686b13

+ 0 - 91
src/components/cache-image/cache-image.vue

@@ -1,91 +0,0 @@
-<template>
-	<el-image class="img" :src="img_url" :style="mstyle" mode="aspectFill"></el-image>
-</template>
-
-<script>
-export default {
-	name: 'cache-image',
-	props: {
-		src: {
-			type: String,
-			default: ''
-		},
-		mstyle: {
-			type: String,
-			default: ''
-		},
-		ext: {
-			type: String,
-			default: 'gif'
-		}
-	},
-	data() {
-		return {
-			img_url: ''
-		};
-	},
-	watch: {
-		src: {
-			handler: async function (n) {
-				if (!n) return;
-				let isCache = await this.isCache(this.filename);
-				if (isCache) {
-					this.img_url = this.filename;
-				} else {
-					this.img_url = n;
-					this.createDownload();
-				}
-			},
-			immediate: true
-		}
-	},
-	computed: {
-		filename() {
-			let filename = `_doc/IM_emoji_pack/${this.src.replace(/\./g, '_').replace(/\//g, '_')}.${this.ext}`;
-			return filename;
-		}
-	},
-	methods: {
-		// 判断是否已经缓存
-		isCache(filePath) {
-			return new Promise((r) => {
-				uni.getFileInfo({
-					filePath,
-					success: (res) => {
-						if (res.errMsg === 'getFileInfo:ok') {
-							return r(true);
-						}
-						return r(false);
-					},
-					fail: (e) => {
-						return r(false);
-					}
-				});
-			});
-		},
-		// 下载存储
-		createDownload() {
-			let dtask = plus.downloader.createDownload(
-				this.src,
-				{
-					filename: this.filename
-				},
-				//
-				(download, status) => {
-					if (status == 200) {
-						let image = download.options.filename; //设置的名字
-						// this.image = download.filename; //实际生成的名字
-						// 将本地URL路径转换成平台绝对路径
-						this.img_url = plus.io.convertLocalFileSystemURL(image);
-					} else {
-						this.img_url = src;
-					}
-				}
-			);
-			dtask.start();
-			// 下载进度
-			// dtask.addEventListener('statechanged', function (task, status) {});
-		}
-	}
-};
-</script>

+ 0 - 276
src/components/chat/index.vue

@@ -1,276 +0,0 @@
-<template>
-	<div>
-		<!-- 群公告 -->
-		<div class="text_26 icon_ group_notice" v-if="item.type === 'group_notice'">
-			管理员设置了新的
-			<text style="color: #fe6702; margin: 0 10px">群公告</text>
-			请及时查看
-		</div>
-		<div class="text_26 icon_ group_notice" v-else-if="item.type === 'update_group_name'">
-			管理员修改了群名称为:"
-			<text style="color: #fe6702; margin: 0 10px">{{ item.payload.name }}</text>
-			"
-		</div>
-		<div class="flex_r item" :class="{ item_: isMy }" v-else>
-			<div class="item-img">
-				<!-- <div class="item-img-pendant">
-					<image class="img" :src="item.senderData.avatar_pendant" mode="aspectFill"></image>
-				</div> -->
-				<div class="z_index2 item-img-url">
-					<el-image class="img" style="width: 56px;height: 56px;" :src="item.senderData.avatar" fit="aspectFill"></el-image>
-				</div>
-			</div>
-			<div style="width: 22px"></div>
-			<div class="item-content" :class="{ item_content: !isMy, item_content2: !item.senderData.name }">
-				<div class="text_24 color__ item-name" v-if="item.senderData.name">{{ item.senderData.name }}</div>
-				<div class="flex_r fa_c item-content-box" :class="{ row_reverse: isMy }">
-					<div class="flex_r fa_c item-content-box-box" :class="'A' + item.timestamp" @longpress.stop="longpress">
-						<div v-if="isMy">
-							<div class="loading" v-if="item.status === 'new' || item.status === 'sending'">
-								<m-loading-icon iconColor="#989898"></m-loading-icon>
-							</div>
-							<div class="loading" v-if="item.status === 'error'">
-								<el-image
-									class="img"
-									src="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTUxMiAzN2MyNjIuMzEgMCA0NzUgMjEyLjY5IDQ3NSA0NzVTNzc0LjMxIDk4NyA1MTIgOTg3IDM3IDc3NC4zMSAzNyA1MTIgMjQ5LjY5IDM3IDUxMiAzN3ptMCA2NjEuMDhjLTI5LjI4IDAtNTMuMDEgMjMuNzMtNTMuMDEgNTMuMDEgMCAyOS4yOCAyMy43MyA1My4wMSA1My4wMSA1My4wMSAyOS4yOCAwIDUzLjAxLTIzLjczIDUzLjAxLTUzLjAxIDAtMjkuMjgtMjMuNzMtNTMuMDEtNTMuMDEtNTMuMDF6bTAtNDc4LjE4Yy0zNy40MyAwLTY3Ljg2IDMwLjQzLTY3Ljg2IDY3Ljk2bDI1LjQ1IDMxOS43OC41OSA2LjEyYzMuMzkgMTkuOTggMjAuODEgMzUuMjMgNDEuODIgMzUuMjMgMjMuMTEgMCA0MS43Ny0xOC40NSA0Mi40MS00MS4zNWwyNS40NS0zMTkuNzgtLjQtNy40MWMtMy42OS0zNC4wNS0zMi41My02MC41NS02Ny40Ni02MC41NXoiIGZpbGw9IiNmNDM0MmYiIGRhdGEtc3BtLWFuY2hvci1pZD0iYTMxM3guc2VhcmNoX2luZGV4LjAuaTkuNjJlMTNhODF0ejVJRE4iIGNsYXNzPSJzZWxlY3RlZCIvPjwvc3ZnPg=="
-									fit="aspectFill"
-								></el-image>
-							</div>
-						</div>
-						<div v-if="item.type === 'text' || item.type === 'text_quote'">
-							<m-text :isMy="isMy" :value="item" @click="onClick"></m-text>
-						</div>
-						<div v-else-if="item.type === 'image' || item.type === 'image_transmit'" @click="onClick">
-							<m-image :isMy="isMy" :value="item" @imgLoad="imgLoad"></m-image>
-						</div>
-						<div v-else-if="item.type === 'video'" @click="onClick">
-							<m-video :isMy="isMy" :value="item"></m-video>
-						</div>
-						<div v-else-if="item.type === 'order'" @click="onClick">
-							<m-order :isMy="isMy" :value="item"></m-order>
-						</div>
-						<div v-else-if="item.type === 'address'" @click="onClick">
-							<m-address :isMy="isMy" :value="item"></m-address>
-						</div>
-						<div v-else-if="item.type === 'pay'" @click="onClick">
-							<m-price :isMy="isMy" :value="item"></m-price>
-						</div>
-						<div v-else-if="item.type === 'audio'">
-							<m-audio :isMy="isMy" :value="item" @click="onClick"></m-audio>
-						</div>
-						<!-- 红包 -->
-						<div v-else-if="item.type === 'red_envelope'">
-							<m-red-packet :isMy="isMy" :myid="myid" :value="item" @onClick="onClick"></m-red-packet>
-						</div>
-						<!-- 表情包 -->
-						<div v-else-if="item.type === 'emoji_pack'" @tap.stop="onClick">
-							<m-emoji-img :isMy="isMy" :value="item"></m-emoji-img>
-						</div>
-						<!-- 位置 -->
-						<div v-else-if="item.type === 'map'">
-							<m-map :isMy="isMy" :value="item" @click="onClick"></m-map>
-						</div>
-						<!-- 文章 -->
-						<div v-else-if="item.type === 'article'">
-							<m-article :isMy="isMy" :value="item" @click="onClick"></m-article>
-						</div>
-						<!-- 商家分享 -->
-						<div v-else-if="item.type === 'share_SBCF'">
-							<m-share-sbcf :isMy="isMy" :value="item" @click="onClick"></m-share-sbcf>
-						</div>
-						<div v-else-if="item.type === 'share_mall'">
-							<m-share-mall :isMy="isMy" :value="item" @click="onClick"></m-share-mall>
-						</div>
-						<div v-else-if="item.type === 'functional_module'">
-							<m-functional-module :isMy="isMy" :value="item" @click="onClick"></m-functional-module>
-						</div>
-
-						<div class="flex1"></div>
-					</div>
-				</div>
-			</div>
-		</div>
-	</div>
-</template>
-
-<script>
-import { to, vibrateShort } from '@/util/index.js';
-import mText from './m-text.vue';
-import mImage from './m-image.vue';
-import mVideo from './m-video.vue';
-import mAudio from './m-audio.vue';
-import mRedPacket from './m-redPacket.vue';
-import mMap from './m-map.vue';
-import mEmojiImg from './m-emoji-img.vue';
-import mArticle from './m-article.vue';
-import mShareSbcf from './m-share-sbcf.vue';
-import mShareMall from './m-share-mall.vue';
-import mOrder from './m-order.vue';
-import mPrice from './m-price.vue';
-import mAddress from './m-address.vue';
-
-import mFunctionalModule from './m-functional-module.vue';
-
-let isLongpress = false;
-let isLongpressAvatar = false;
-export default {
-	components: {
-		mText,
-		mImage,
-		mVideo,
-		mAudio,
-		mRedPacket,
-		mMap,
-		mEmojiImg,
-		mArticle,
-		mShareSbcf,
-		mShareMall,
-		mFunctionalModule,
-		mOrder,
-		mPrice,
-		mAddress
-	},
-	props: {
-		myid: {
-			type: [String, Number],
-			default: null
-		},
-		isMy: {
-			type: [Boolean, Number],
-			default: false
-		},
-		item: {
-			type: Object,
-			default: {}
-		},
-		index: {
-			type: Number,
-			default: 0
-		}
-	},
-	data() {
-		return {
-			userInforData: {}
-		};
-	},
-	created() {},
-	methods: {
-		imgLoad(e){
-			this.$emit('imgLoad', e);
-		},
-		onClick() {
-			if (isLongpress) return (isLongpress = false);
-			if (this.item.status === 'error') return;
-			this.$emit('onClick', this.item, this.index);
-		},
-		// @某人
-		longpressAvatar() {
-			isLongpressAvatar = true;
-			this.$emit('mention', this.item, this.index);
-		},
-		onItem() {
-			if (isLongpressAvatar) return (isLongpressAvatar = false);
-			console.log(this.item);
-			to('/pagesGoEasy/group_member_infor/index', { member_id: this.item.senderId, group_id: this.item.groupId });
-		},
-
-		// 长按
-		longpress(e) {
-			isLongpress = true;
-			vibrateShort();
-			console.log(this.item);
-			this.$nextTick(() => {
-				// let div = uni.createSelectorQuery().select(`.A${this.item.timestamp}`);
-				// div.boundingClientRect((data) => {
-				// 	this.$emit('onLongpress', this.item, data);
-				// }).exec();
-
-				const query = uni.createSelectorQuery().in(this);
-				query
-					.select(`.A${this.item.timestamp}`)
-					.boundingClientRect((data) => {
-						this.$emit('onLongpress', this.item, data);
-					})
-					.exec();
-			});
-		}
-	}
-};
-</script>
-
-<style scoped lang="scss">
-.group_notice {
-	width: 100%;
-	height: 80px;
-	color: #a3a3a3;
-}
-.row_reverse {
-	flex-direction: row-reverse !important;
-}
-.item {
-	box-sizing: border-box;
-	padding-bottom: 20px;
-	position: relative;
-	z-index: 0;
-	width: calc(100% - 50px);
-	margin: 0 auto;
-	.item-name {
-		margin-bottom: 4px;
-	}
-}
-.item_ {
-	flex-direction: row-reverse !important;
-	.item-name {
-		position: relative;
-		top: 0px;
-		right: 0;
-		text-align: right;
-		// display: none;
-	}
-}
-.flex_r {
-    display: flex;
-    flex-direction: row;
-}
-.item-img {
-	position: relative;
-	width: 56px;
-	height: 56px;
-	.item-img-pendant {
-		position: absolute;
-		z-index: 3;
-		top: -2px;
-		left: -2px;
-		right: -2px;
-		bottom: -2px;
-	}
-	.item-img-url {
-		width: 56px;
-		height: 56px;
-		overflow: hidden;
-		border-radius: 6px;
-		background-color: #fff;
-	}
-}
-.item-content {
-	width: calc(100% - 164px);
-	.item-content-box {
-		position: relative;
-		.item-content-box-box {
-		}
-		.loading {
-			width: 40px;
-			height: 40px;
-			margin: 0 10px;
-		}
-	}
-}
-.item_content {
-	position: relative;
-	top: -10px;
-}
-.item_content2 {
-	position: relative;
-	top: 0px !important;
-}
-</style>

+ 0 - 46
src/components/chat/m-address.vue

@@ -1,46 +0,0 @@
-<template>
-	<div>
-		<div class="m-order">
-			<div class="order-img"><el-image style="width: 60px;height: 60px;" :src="value.payload.address.img" fit="fit"></el-image></div>
-			<div class="order-info">
-				<div class="title">{{value.payload.address.name}}</div>
-				<div class="desc">{{value.payload.address.order}}</div>
-			</div>
-			<div class="status danger" v-if="value.payload.address.status==0">待补充</div>
-			<div class="status success" v-if="value.payload.address.status==1">已补充</div>
-		</div>
-	</div>
-</template>
-
-
-<script>
-export default {
-	props: {
-		isMy: {
-			type: [Boolean, Number],
-			default: false
-		},
-		value: {
-			type: Object,
-			default: {}
-		}
-	},
-	data() {
-		return {};
-	},
-}
-</script>
-
-<style>
-.m-order{background-color: #fff;border-radius: 5px;display: flex;font-size: 28upx;position: relative;}
-.m-order .order-img image{width: 60px;height: 60px;}
-.m-order .order-info {padding: 15upx;}
-.m-order .order-info .title{font-size: 14px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}
-.m-order .order-info .price{font-size: 14px;color: #f00;}
-.m-order .status{position: absolute;right: 0;bottom: 0;border-radius: 5px 0 5px 0;background-color: #909399;font-size: 12px;color: #fff;padding: 5px;}
-.m-order .status.info{background-color: #909399;}
-.m-order .status.primary{background-color: #409eff;}
-.m-order .status.success{background-color: #67c23a;}
-.m-order .status.danger{background-color: #f56c6c;}
-.m-order .status.warn{background-color: #e6a23c;}
-</style>

+ 0 - 144
src/components/chat/m-article.vue

@@ -1,144 +0,0 @@
-<template>
-	<div class="flex_c row">
-		<div class="flex_r text-box" :class="{ text_box: isMy }" @tap.stop="onClick">
-			<div class="text" :class="isMy ? 'text_r' : 'text_l'">
-				<div class="flex_c_c article">
-					<div class="text_32 ellipsis_2 article-title">{{ value.payload.title }}</div>
-					<div class="flex_r text_26 color__ article-box">
-						<div class="flex1 article-box-text">
-							{{ value.payload.short_title }}
-						</div>
-						<div class="article-box-img">
-							<el-image class="img" :src="value.payload.share_image" fit="aspectFill"></el-image>
-						</div>
-					</div>
-
-					<div class="m-line">
-						<m-line color="#f0f0f0" length="100%" :hairline="true"></m-line>
-					</div>
-
-					<div class="flex_r fa_c article-b">
-						<div class="article-b-icon"></div>
-						<div class="text_20 color__ article-b-text">xxxx</div>
-					</div>
-				</div>
-			</div>
-		</div>
-	</div>
-</template>
-
-<script>
-export default {
-	props: {
-		isMy: {
-			type: [Boolean, Number],
-			default: false
-		},
-		value: {
-			type: Object,
-			default: {}
-		}
-	},
-	data() {
-		return {};
-	},
-	computed: {},
-	methods: {
-		onClick() {
-			this.$emit('onClick');
-		}
-	}
-};
-</script>
-
-<style scoped lang="scss">
-.row {
-}
-.row_ {
-	flex-direction: row-reverse;
-}
-.text_box {
-	flex-direction: row-reverse;
-}
-.text {
-	position: relative;
-	z-index: 99;
-	box-sizing: border-box;
-}
-
-.text_r {
-	position: relative;
-}
-.text_l {
-	position: relative;
-}
-
-.text_r::after {
-	position: absolute;
-	z-index: -1;
-	content: '';
-	top: 26rpx;
-	right: -8rpx;
-	width: 18rpx;
-	height: 18rpx;
-	border-radius: 2px;
-	transform: rotate(45deg);
-	background-color: #fff;
-}
-.text_l::after {
-	position: absolute;
-	z-index: -1;
-	content: '';
-	top: 26rpx;
-	left: -8rpx;
-	width: 18rpx;
-	height: 18rpx;
-	border-radius: 2px;
-	transform: rotate(45deg);
-	background-color: #fff;
-}
-
-.article {
-	box-sizing: border-box;
-	padding: 14rpx 20rpx 4rpx 20rpx;
-	width: 490rpx;
-	border-radius: 10rpx;
-	overflow: hidden;
-	background-color: #fff;
-	border: 0.5px solid #fff;
-	.article-title {
-		box-sizing: border-box;
-		width: 100%;
-		margin-bottom: 10rpx;
-	}
-	.article-box {
-		width: 100%;
-		.article-box-text {
-		}
-		.article-box-img {
-			width: 110rpx;
-			height: 110rpx;
-			background-color: #f1f1f1;
-		}
-	}
-	.m-line {
-		width: 100%;
-		height: 1px;
-		margin-top: 20rpx;
-	}
-	.article-b {
-		width: 100%;
-		margin-top: 4rpx;
-		.article-b-icon {
-			width: 26rpx;
-			height: 26rpx;
-			background-color: #f1f1f1;
-			border-radius: 50%;
-			overflow: hidden;
-			margin-right: 10rpx;
-		}
-		.article-b-text {
-		}
-	}
-}
-</style>

+ 0 - 166
src/components/chat/m-audio.vue

@@ -1,166 +0,0 @@
-<template>
-	<div class="flex_c">
-		<div class="flex_r" :class="{ text_box: isMy }">
-			<div class="text-box" @tap.stop="onClick">
-				<div
-					class="text_30 flex_r fa_c text"
-					:class="isMy ? 'text_r' : 'text_l'"
-					:style="{ width: setWidth }"
-					:hover-class="isMy ? 'hover_classr' : 'hover_classl'"
-					:hover-stay-time="60"
-				>
-					<div class="text-icon" v-if="value.pause !== 3">
-						<el-image
-							class="img"
-							src="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTY3NC44MDYgNzcuMTI2YTQ2LjAwOCA0Ni4wMDggMCAwIDAtNjYuMTc2IDAgNDYuMDA4IDQ2LjAwOCAwIDAgMCAwIDYzLjAyNSA1MjAuNTg4IDUyMC41ODggMCAwIDEgMCA3MzUuNTA0IDQ3LjI2OSA0Ny4yNjkgMCAwIDAgMCA2Ni44MDcgNDcuMjY5IDQ3LjI2OSAwIDAgMCA2Ni44MDcgMCA2MTQuNDk2IDYxNC40OTYgMCAwIDAtLjYzLTg2NS4zMzZ6Ii8+PHBhdGggZD0iTTQ2Ny40NTMgMjQyLjg4MmE0Ny4yNjkgNDcuMjY5IDAgMCAwLTYzLjAyNSAwIDQ2LjYzOSA0Ni42MzkgMCAwIDAgMCA2My4wMjYgMjk5LjM3IDI5OS4zNyAwIDAgMSAwIDQyMi4yNjggNDcuMjY5IDQ3LjI2OSAwIDAgMCAwIDYzLjAyNiA0Ni42MzkgNDYuNjM5IDAgMCAwIDYzLjAyNSAwIDM5My45MDggMzkzLjkwOCAwIDAgMCAwLTU0OC4zMnptLTI3Ny4zMSAyMTQuOTE2YTc4LjE1MSA3OC4xNTEgMCAwIDAgMCAxMTAuOTI1IDc4Ljc4MiA3OC43ODIgMCAxIDAgMC0xMTAuOTI1eiIvPjwvc3ZnPg=="
-							mode="aspectFill"
-						></el-image>
-					</div>
-					<div class="text-icon" v-if="value.pause == 3">
-						<el-image class="img" style="transform: scale(1.35)" mode="aspectFill"></el-image>
-					</div>
-					<div class="text-duration">{{ Math.ceil(value.payload.duration) || 1 }}''</div>
-				</div>
-			</div>
-		</div>
-	</div>
-</template>
-<script>
-export default {
-	components: {},
-	props: {
-		isMy: {
-			type: [Boolean, Number],
-			default: false
-		},
-		value: {
-			type: Object,
-			default: {}
-		}
-	},
-	data() {
-		return {};
-	},
-	computed: {
-		setWidth() {
-			let width = 0;
-			const duration = Math.ceil(this.value.payload.duration);
-			// 基础长度
-			let basis = duration - 10;
-			if (basis >= 0) {
-				width = 10 * 8 + 60;
-				width = width + basis * 2;
-			} else {
-				width = duration * 8 + 60;
-			}
-			return `${width}px`;
-		}
-	},
-	methods: {
-		onClick() {
-			this.$emit('onClick');
-		}
-	}
-};
-</script>
-
-<style scoped lang="scss">
-.row_ {
-	flex-direction: row-reverse;
-}
-.text_box {
-	flex-direction: row-reverse;
-}
-.text-box {
-	border-radius: 8rpx;
-}
-
-.text {
-	position: relative;
-	z-index: 99;
-	box-sizing: border-box;
-	padding: 18rpx 16rpx;
-	border-radius: 8rpx;
-	word-break: break-all;
-	vertical-align: center;
-	.text-icon {
-		width: 32rpx;
-		height: 32rpx;
-		margin: 0 4rpx;
-	}
-	.text-duration {
-		margin: 0 8rpx;
-	}
-}
-
-.text_r {
-	position: relative;
-	z-index: 2;
-	background-color: #95ec6a;
-	flex-direction: row-reverse;
-	.text-icon {
-		transform: rotate(180deg);
-	}
-}
-.text_l {
-	position: relative;
-	z-index: 2;
-	background-color: #fff;
-}
-
-.text_r::after {
-	position: absolute;
-	z-index: -1;
-	content: '';
-	top: 28rpx;
-	right: -8rpx;
-	width: 18rpx;
-	height: 18rpx;
-	border-radius: 2px;
-	transform: rotate(45deg);
-	background-color: #95ec6a;
-}
-.text_l::after {
-	position: absolute;
-	z-index: -1;
-	content: '';
-	top: 28rpx;
-	left: -8rpx;
-	width: 18rpx;
-	height: 18rpx;
-	border-radius: 2px;
-	transform: rotate(45deg);
-	background-color: #fff;
-}
-.hover_classr {
-	background-color: #89d961;
-}
-.hover_classl {
-	background-color: #e2e2e2;
-}
-
-.hover_classr::after {
-	position: absolute;
-	z-index: -1;
-	content: '';
-	top: 28rpx;
-	right: -8rpx;
-	width: 18rpx;
-	height: 18rpx;
-	border-radius: 2px;
-	transform: rotate(45deg);
-	background-color: #89d961;
-}
-.hover_classl::after {
-	position: absolute;
-	z-index: -1;
-	content: '';
-	top: 28rpx;
-	left: -8rpx;
-	width: 18rpx;
-	height: 18rpx;
-	border-radius: 2px;
-	transform: rotate(45deg);
-	background-color: #e2e2e2;
-}
-</style>

+ 0 - 44
src/components/chat/m-emoji-img.vue

@@ -1,44 +0,0 @@
-<template>
-	<div class="flex_r m-image">
-		<!-- #ifdef H5 || MP -->
-		<el-image class="img" :src="value.payload.url" mode="aspectFill"></el-image>
-		<!-- #endif -->
-		<!-- #ifdef APP -->
-		<cacheImage :src="value.payload.url" :ext="value.payload.ext" mstyle="{width: 250px;height: 250px;}"></cacheImage>
-		<!-- #endif -->
-	</div>
-</template>
-<script>
-import cacheImage from '../cache-image/cache-image.vue';
-export default {
-	components: {
-		cacheImage
-	},
-	props: {
-		isMy: {
-			type: [Boolean, Number],
-			default: false
-		},
-		value: {
-			type: Object,
-			default: {}
-		}
-	},
-	data() {
-		return {};
-	},
-	computed: {},
-	methods: {}
-};
-</script>
-
-<style scoped lang="scss">
-.m-image {
-	border-radius: 2px;
-	overflow: hidden;
-	.img {
-		width: 250px;
-		height: 250px;
-	}
-}
-</style>

+ 0 - 143
src/components/chat/m-functional-module.vue

@@ -1,143 +0,0 @@
-<template>
-	<div class="flex_c row">
-		<div class="flex_r text-box" :class="{ text_box: isMy }" @tap.stop="onClick">
-			<div class="text" :class="isMy ? 'text_r' : 'text_l'">
-				<div class="flex_c_c article">
-					<div class="flex_r fa_c article-info">
-						<div class="article-img">
-							<image class="img" :src="value.payload.image" mode="aspectFill"></image>
-						</div>
-						<div class="flex1">
-							<div class="text_32 article-title">{{ value.payload.title }}</div>
-							<div class="text_26 color__ article-title">{{ value.payload.text }}</div>
-						</div>
-					</div>
-
-					<div class="m-line">
-						<m-line color="#f0f0f0" length="100%" :hairline="true"></m-line>
-					</div>
-					<div class="flex_r fa_c article-b">
-						<!-- <div class="article-b-icon"></div> -->
-						<div class="text_20 color__ article-b-text">功能分享</div>
-					</div>
-				</div>
-			</div>
-		</div>
-	</div>
-</template>
-
-<script>
-export default {
-	props: {
-		isMy: {
-			type: [Boolean, Number],
-			default: false
-		},
-		value: {
-			type: Object,
-			default: {}
-		}
-	},
-	data() {
-		return {};
-	},
-	computed: {},
-	methods: {
-		onClick() {
-			this.$emit('onClick');
-		}
-	}
-};
-</script>
-
-<style scoped lang="scss">
-.row {
-}
-.row_ {
-	flex-direction: row-reverse;
-}
-.text_box {
-	flex-direction: row-reverse;
-}
-.text {
-	position: relative;
-	z-index: 99;
-	box-sizing: border-box;
-}
-
-.text_r {
-	position: relative;
-}
-.text_l {
-	position: relative;
-}
-
-.text_r::after {
-	position: absolute;
-	z-index: -1;
-	content: '';
-	top: 26rpx;
-	right: -8rpx;
-	width: 18rpx;
-	height: 18rpx;
-	border-radius: 2px;
-	transform: rotate(45deg);
-	background-color: #fff;
-}
-.text_l::after {
-	position: absolute;
-	z-index: -1;
-	content: '';
-	top: 26rpx;
-	left: -8rpx;
-	width: 18rpx;
-	height: 18rpx;
-	border-radius: 2px;
-	transform: rotate(45deg);
-	background-color: #fff;
-}
-
-.article {
-	box-sizing: border-box;
-	padding: 14rpx 20rpx 4rpx 20rpx;
-	width: 490rpx;
-	border-radius: 10rpx;
-	overflow: hidden;
-	background-color: #fff;
-	border: 0.5px solid #fff;
-	.article-info {
-		width: 100%;
-		.article-img {
-			width: 100rpx;
-			height: 100rpx;
-			margin-right: 20rpx;
-			border-radius: 10rpx;
-			overflow: hidden;
-		}
-		.article-title {
-			box-sizing: border-box;
-			margin-bottom: 14rpx;
-		}
-	}
-
-	.m-line {
-		width: 100%;
-		height: 1px;
-		margin-top: 20rpx;
-	}
-	.article-b {
-		width: 100%;
-		margin-top: 4rpx;
-		.article-b-icon {
-			width: 26rpx;
-			height: 26rpx;
-			background-color: #f1f1f1;
-			border-radius: 50%;
-			overflow: hidden;
-			margin-right: 10rpx;
-		}
-		.article-b-text {
-		}
-	}
-}
-</style>

+ 0 - 68
src/components/chat/m-image.vue

@@ -1,68 +0,0 @@
-<template>
-	<div class="flex_r m-image" :style="{ height: getImageHeight(value.payload) + 'px' }">
-		<!-- <image class="img" :src="value.payload.thumbnail || value.payload.url" mode="widthFix"></image> -->
-		<el-image class="img" :src="value.payload.url" fit="fit" @load="imgLoad"></el-image>
-		<!-- {{value.payload.thumbnail}} -->
-	</div>
-</template>
-<script>
-export default {
-	props: {
-		isMy: {
-			type: [Boolean, Number],
-			default: false
-		},
-		value: {
-			type: Object,
-			default: {}
-		}
-	},
-	data() {
-		return {};
-	},
-	computed: {},
-	methods: {
-		/**
-		 * 核心就是设置高度,产生明确占位
-		 *
-		 * 小  (宽度和高度都小于预设尺寸)
-		 *    设高=原始高度
-		 * 宽 (宽度>高度)
-		 *    高度= 根据宽度等比缩放
-		 * 窄  (宽度<高度)或方(宽度=高度)
-		 *    设高=MAX height
-		 *
-		 * @param width,height
-		 * @returns number
-		 */
-		getImageHeight(payload) {
-			const { width, height } = payload;
-			const IMAGE_MAX_WIDTH = 130;
-			const IMAGE_MAX_HEIGHT = 94;
-			if (width < IMAGE_MAX_WIDTH && height < IMAGE_MAX_HEIGHT) {
-				return height * 3;
-			} else if (width > height) {
-				return (IMAGE_MAX_WIDTH / width) * height * 3;
-			} else if (width === height || width < height) {
-				return IMAGE_MAX_HEIGHT * 3;
-			}
-		},
-		
-		
-		imgLoad(e){
-			this.$emit('imgLoad',e)
-		}
-	}
-};
-</script>
-
-<style scoped lang="scss">
-.m-image {
-	border-radius: 10px;
-	overflow: hidden;
-	.img {
-		min-height: 100px;
-		background-color: #fff;
-	}
-}
-</style>

+ 0 - 139
src/components/chat/m-map.vue

@@ -1,139 +0,0 @@
-<template>
-	<div class="flex_c row">
-		<div class="flex_r text-box" :class="{ text_box: isMy }" @tap.stop="onClick">
-			<div class="text" :class="isMy ? 'text_r' : 'text_l'">
-				<div class="flex_c_c nowrap_ map">
-					<div class="nowrap_ text_32 map-title">
-						{{ value.payload.title }}
-					</div>
-					<div class="nowrap_ text_22 map-text">
-						{{ value.payload.address }}
-					</div>
-					<div class="flex1 map-img">
-						<div class="str"></div>
-						<image class="z_index2 img" :src="value.payload.image" mode="aspectFill"></image>
-					</div>
-				</div>
-			</div>
-		</div>
-	</div>
-</template>
-
-<script>
-export default {
-	props: {
-		isMy: {
-			type: [Boolean, Number],
-			default: false
-		},
-		value: {
-			type: Object,
-			default: {}
-		}
-	},
-	data() {
-		return {};
-	},
-	computed: {},
-	methods: {
-		onClick() {
-			this.$emit('onClick')
-		}
-	}
-};
-</script>
-
-<style scoped lang="scss">
-.row {
-}
-.row_ {
-	flex-direction: row-reverse;
-}
-.text_box {
-	flex-direction: row-reverse;
-}
-.text {
-	position: relative;
-	z-index: 99;
-	box-sizing: border-box;
-}
-
-.text_r {
-	position: relative;
-}
-.text_l {
-	position: relative;
-}
-
-.text_r::after {
-	position: absolute;
-	z-index: -1;
-	content: '';
-	top: 26rpx;
-	right: -8rpx;
-	width: 18rpx;
-	height: 18rpx;
-	border-radius: 2px;
-	transform: rotate(45deg);
-	background-color: #fff;
-}
-.text_l::after {
-	position: absolute;
-	z-index: -1;
-	content: '';
-	top: 26rpx;
-	left: -8rpx;
-	width: 18rpx;
-	height: 18rpx;
-	border-radius: 2px;
-	transform: rotate(45deg);
-	background-color: #fff;
-}
-
-.map {
-	width: 490rpx;
-	height: 300rpx;
-	border-radius: 10rpx;
-	overflow: hidden;
-	background-color: #fff;
-	border: 0.5px solid #fff;
-	.map-title {
-		box-sizing: border-box;
-		width: 100%;
-		padding: 14rpx 20rpx 4rpx 20rpx;
-	}
-	.map-text {
-		box-sizing: border-box;
-		width: 100%;
-		color: #afafaf;
-		padding: 0rpx 20rpx 6rpx 20rpx;
-	}
-	.map-img {
-		position: relative;
-		width: 100%;
-		.str {
-			box-sizing: border-box;
-			position: absolute;
-			z-index: 3;
-			top: calc(50% - 60rpx);
-			left: calc(50% - 25rpx);
-			width: 50rpx;
-			height: 50rpx;
-			border: 12rpx solid #07be5b;
-			border-radius: 50%;
-			background-color: #fff;
-		}
-		.str::before {
-			position: absolute;
-			z-index: 0;
-			content: '';
-			bottom: -40rpx;
-			left: 12rpx;
-			width: 6rpx;
-			height: 40rpx;
-			border-radius: 3rpx;
-			background-color: #07be5b;
-		}
-	}
-}
-</style>

+ 0 - 50
src/components/chat/m-order.vue

@@ -1,50 +0,0 @@
-<template>
-	<div>
-		<div class="m-order">
-			<div class="order-img"><el-image style="width: 60px;height: 60px;" :src="value.payload.order.img" fit="fit"></el-image></div>
-			<div class="order-info">
-				<div class="title">{{value.payload.order.name}}</div>
-				<div class="price">¥{{value.payload.order.price}}</div>
-			</div>
-			<div class="status info" v-if="value.payload.order.status=='0'">未支付</div>
-			<div class="status primary" v-if="value.payload.order.status=='1'">待使用</div>
-			<div class="status success" v-if="value.payload.order.status=='2'">已完成</div>
-			<div class="status danger" v-if="value.payload.order.status=='3'">已退款</div>
-			<div class="status warn" v-if="value.payload.order.status=='4'">退款中</div>
-			<div class="status warn" v-if="value.payload.order.status=='5'">已关闭</div>
-		</div>
-	</div>
-</template>
-
-
-<script>
-export default {
-	props: {
-		isMy: {
-			type: [Boolean, Number],
-			default: false
-		},
-		value: {
-			type: Object,
-			default: {}
-		}
-	},
-	data() {
-		return {};
-	},
-}
-</script>
-
-<style>
-.m-order{background-color: #fff;border-radius: 5px;display: flex;font-size: 14px;position: relative;min-width: 400px;}
-.m-order .order-img image{width: 60px;height: 60px;}
-.m-order .order-info {padding: 10px;}
-.m-order .order-info .title{font-size: 14px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}
-.m-order .order-info .price{font-size: 14px;color: #f00;}
-.m-order .status{position: absolute;right: 0;bottom: 0;border-radius: 5px 0 5px 0;background-color: #909399;font-size: 12px;color: #fff;padding: 5px;}
-.m-order .status.info{background-color: #909399;}
-.m-order .status.primary{background-color: #409eff;}
-.m-order .status.success{background-color: #67c23a;}
-.m-order .status.danger{background-color: #f56c6c;}
-.m-order .status.warn{background-color: #e6a23c;}
-</style>

+ 0 - 46
src/components/chat/m-price.vue

@@ -1,46 +0,0 @@
-<template>
-	<div>
-		<div class="m-order">
-			<div class="order-img"><el-image style="width: 60px;height: 60px;" :src="value.payload.pay.img" fit="fit"></el-image></div>
-			<div class="order-info">
-				<div class="title">{{value.payload.pay.name}}</div>
-				<div class="price">¥{{value.payload.pay.price}}</div>
-			</div>
-			<div class="status danger" v-if="value.payload.pay.status==0">待支付</div>
-			<div class="status success" v-if="value.payload.pay.status==1">已支付</div>
-		</div>
-	</div>
-</template>
-
-
-<script>
-export default {
-	props: {
-		isMy: {
-			type: [Boolean, Number],
-			default: false
-		},
-		value: {
-			type: Object,
-			default: {}
-		}
-	},
-	data() {
-		return {};
-	},
-}
-</script>
-
-<style>
-.m-order{background-color: #fff;border-radius: 5px;display: flex;font-size: 28upx;position: relative;}
-.m-order .order-img image{width: 60px;height: 60px;}
-.m-order .order-info {padding: 15upx;}
-.m-order .order-info .title{font-size: 14px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}
-.m-order .order-info .price{font-size: 14px;color: #f00;}
-.m-order .status{position: absolute;right: 0;bottom: 0;border-radius: 5px 0 5px 0;background-color: #909399;font-size: 12px;color: #fff;padding: 5px;}
-.m-order .status.info{background-color: #909399;}
-.m-order .status.primary{background-color: #409eff;}
-.m-order .status.success{background-color: #67c23a;}
-.m-order .status.danger{background-color: #f56c6c;}
-.m-order .status.warn{background-color: #e6a23c;}
-</style>

+ 0 - 243
src/components/chat/m-redPacket.vue

@@ -1,243 +0,0 @@
-<template>
-	<div class="flex_r flex_c text-box">
-		<div>
-			<div class="text_30 size_white text" :class="[{ text_: item.had_draw || item.isClick }, { text_r: isMy }, { text_l: !isMy }]" @tap.stop="onClick">
-				<!-- <div class="red_packet_bg_mini">
-					<image class="img" :src="item.payload.red_packet_bg_mini" mode="aspectFill"></image>
-				</div> -->
-				<div class="flex_r z_index2 redPacket-row">
-					<div class="redPacket-icon">
-						<!-- 开启 -->
-						<image
-							class="img"
-							src="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTkxNS4wNzkgNTcwLjIwN3YtNDQ4LjdjMC0xMC4yMTQtNS41NTItMTkuNzUzLTE0LjU1Mi0yNC41NUE4MjUuMzk3IDgyNS4zOTcgMCAwIDAgNTExLjQzNC4wMDFhODI1LjI5IDgyNS4yOSAwIDAgMC0zODkuMDY2IDk2Ljk1NiAyNy43ODMgMjcuNzgzIDAgMCAwLTE0LjU3OCAyNC41NXY0NDguN2MwIDE0Ljg3NCAxMi4wNDUgMjYuOTIgMjYuOTIgMjYuOTJoNzUzLjQ0OGEyNi45MiAyNi45MiAwIDAgMCAyNi45Mi0yNi45MiIgZmlsbD0iI2ZmZjNlNyIgZGF0YS1zcG0tYW5jaG9yLWlkPSJhMzEzeC5zZWFyY2hfaW5kZXguMC5pNS41ZmM4M2E4MVJVTGFkOSIvPjxwYXRoIGQ9Ik0xMDcuNzkgMzQ3LjYyMXY2NDguMDNjMCAxNC44NzUgMTIuMDQ1IDI2Ljk0OCAyNi45MiAyNi45NDhoNzUzLjQ0OGEyNi45MiAyNi45MiAwIDAgMCAyNi45Mi0yNi45NDh2LTY0OC4wM2E4MjUuMzE3IDgyNS4zMTcgMCAwIDEtNDAzLjY0NCAxMDQuOTA2QTgyNS4zMTcgODI1LjMxNyAwIDAgMSAxMDcuNzkgMzQ3LjYyMSIgZmlsbD0iI2VmN2I2NCIgZGF0YS1zcG0tYW5jaG9yLWlkPSJhMzEzeC5zZWFyY2hfaW5kZXguMC5pNi41ZmM4M2E4MVJVTGFkOSIvPjxwYXRoIGQ9Ik0zNzUuNjQ2IDYxMC41NzRhMTM0LjUyMSAxMzQuNTIxIDAgMSAwIDI2OS4xMjQgMCAxMzQuNTQ4IDEzNC41NDggMCAwIDAtMjY5LjA5NyAwIiBmaWxsPSIjZjJkMzljIiBkYXRhLXNwbS1hbmNob3ItaWQ9ImEzMTN4LnNlYXJjaF9pbmRleC4wLmk5LjVmYzgzYTgxUlVMYWQ5Ii8+PHBhdGggZD0iTTU2Ni4yOTkgNjEzLjg4OHYtMjEuODgxaC0zNC44NDNsMzEuMjMyLTMxLjU4Mi0yMC41MzQtMTguODEtMzIuMDEzIDI5LjIxMS0zMi4wNjgtMjkuMjEtMjAuNTA3IDE4Ljc1NSAzMS4yNiAzMS42MDloLTM0LjY4MnYyMS44MjdoNDAuMDQ0djE0LjU3OWgtNDAuMDQ0djI5LjE4NGg0MC4wNDR2MjEuOTM1aDIzLjk4M3YtMjkuMTg0aDQ4LjA3NFY2MjguNDRoLTQ4LjA0N3YtMTQuNTUyeiIgZmlsbD0iI2ViYjM3NyIgZGF0YS1zcG0tYW5jaG9yLWlkPSJhMzEzeC5zZWFyY2hfaW5kZXguMC5pMTEuNWZjODNhODFSVUxhZDkiIGNsYXNzPSJzZWxlY3RlZCIvPjwvc3ZnPg=="
-							mode="aspectFill"
-							v-if="item.had_draw || item.isClick"
-						></image>
-
-						<!-- 未开启 -->
-						<image
-							class="img"
-							src="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTg3OC41OTIgMTAyNEgxNDUuNDA4Yy0yNC4wNjQgMC00My41Mi0xOS40NTYtNDMuNTItNDMuNTJWNDMuNTJjMC0yNC4wNjQgMTkuNDU2LTQzLjUyIDQzLjUyLTQzLjUyaDczMy4xODRjMjQuMDY0IDAgNDMuNTIgMTkuNDU2IDQzLjUyIDQzLjUydjkzNi40NDhjMCAyNC41NzYtMTkuNDU2IDQ0LjAzMi00My41MiA0NC4wMzJ6IiBmaWxsPSIjREY0OTQ5Ii8+PHBhdGggZD0iTTg3OC41OTIgMEgxNDUuNDA4Yy0yNC4wNjQgMC00NC4wMzIgMTkuNDU2LTQ0LjAzMiA0My41MnYzNzMuMjQ4QzIxMC45NDQgNDUzLjEyIDMzNS44NzIgNDczLjYgNDY4Ljk5MiA0NzMuNmMxNjguOTYgMCAzMjUuNjMyLTMzLjI4IDQ1My4xMi05MC4xMTJWNDMuNTJjMC0yNC4wNjQtMTkuNDU2LTQzLjUyLTQzLjUyLTQzLjUyeiIgZmlsbD0iI0ZCNTM1MiIvPjxwYXRoIGQ9Ik0zNzUuMjk2IDQ4OS45ODRjMCA3NS4yNjQgNjEuNDQgMTM2LjcwNCAxMzYuNzA0IDEzNi43MDRzMTM2LjcwNC02MS40NCAxMzYuNzA0LTEzNi43MDRTNTg3LjI2NCAzNTMuMjggNTEyIDM1My4yOHMtMTM2LjcwNCA2MS40NC0xMzYuNzA0IDEzNi43MDR6IiBmaWxsPSIjRkNDRTNFIi8+PHBhdGggZD0iTTU2MS42NjQgNDgzLjg0aDMuMDcydi0uNTEyYzQuMDk2LTEuNTM2IDcuMTY4LTUuMTIgNy4xNjgtOS43MjggMC01LjYzMi00LjYwOC0xMC4yNC0xMC4yNC0xMC4yNEg1MjIuMjR2LS41MTJsNDEuNDcyLTQwLjQ0OCAyLjA0OC0yLjA0OGMxLjAyNC0xLjUzNiAxLjUzNi0zLjA3MiAxLjUzNi00LjYwOCAwLTIuNTYtLjUxMi01LjEyLTIuNTYtNy42OC0zLjU4NC00LjA5Ni0xMC4yNC00LjYwOC0xNC4zMzYtLjUxMmwtMzcuODg4IDM3LjM3Ni0zOS45MzYtMzguOTEyYy00LjA5Ni0zLjU4NC0xMC43NTItMy4wNzItMTQuMzM2IDEuMDI0LTMuMDcyIDMuNTg0LTMuNTg0IDguMTkyLTEuMDI0IDEyLjI4OHYuNTEybDQ1LjA1NiA0NC4wMzJ2MS4wMjRoLTQyLjQ5NnYuNTEyYy00LjA5NiAxLjUzNi03LjE2OCA1LjEyLTcuMTY4IDkuNzI4czMuMDcyIDguMTkyIDcuMTY4IDkuNzI4di41MTJoNDEuOTg0djMxLjIzMmgtNDMuMDA4di41MTJjLTQuMDk2IDEuNTM2LTcuMTY4IDUuMTItNy4xNjggOS43MjhzMy4wNzIgOC4xOTIgNy4xNjggOS43Mjh2LjUxMmg0My4wMDh2MzQuMzA0aC41MTJjMS41MzYgNC4wOTYgNS4xMiA3LjE2OCA5LjcyOCA3LjE2OHM4LjE5Mi0zLjA3MiA5LjcyOC03LjE2OGguNTEydi0zNC4zMDRoNDIuNDk2di0uNTEyYzQuMDk2LTEuNTM2IDcuMTY4LTUuMTIgNy4xNjgtOS43MjggMC01LjYzMi00LjYwOC0xMC4yNC0xMC4yNC0xMC4yNEg1MjIuMjR2LTMxLjIzMmwzOS40MjQtMS41MzZ6IiBmaWxsPSIjRDg4NjE5Ii8+PC9zdmc+"
-							mode="aspectFill"
-							v-else
-						></image>
-					</div>
-					<div class="flex1 flex_c fj_a z_index2 nowrap_ redPacket-title">
-						<div class="nowrap_ text_34 bold_">{{ item.payload.remark }}</div>
-						<div class="text_24" style="margin-top: 6rpx" v-if="item.had_draw && item.payload.type !== 'exclusive'">已领取</div>
-
-						<div class="text_24" style="margin-top: 6rpx" v-if="item.payload.type === 'exclusive'">
-							{{ item.payload.exclusive.name || item.payload.exclusive.realname }}
-							{{ item.had_draw ? '已领取' : '的专属红包' }}
-						</div>
-					</div>
-				</div>
-				<div class="m-line">
-					<m-line color="rgba(255, 255, 255, 0.4)" width="100%" margin="20rpx auto 6rpx auto" :hairline="true"></m-line>
-				</div>
-				<div class="text_24 redPacket-text">{{ item.payload.account_type_text }}</div>
-			</div>
-		</div>
-
-		<!-- 你的专属红包 -->
-		<div class="text_22 color__ flex_r fa_c exclusive" v-if="item.payload.type === 'exclusive' && item.payload.exclusive.member_id === myid">
-			这是你的专属红包
-			<div class="label-icon">
-				<image
-					class="img"
-					src="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTAgMGgxMDI0djEwMjRIMHoiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNOTg1LjYgMzUyYzAtNDAuMzItMzItNzIuMzItNzEuMDQtNzIuMzItMzkuNjggMC03MS4wNCAzMi42NC03MS4wNCA3Mi4zMiAwIDE1LjM2IDQuNDggMjkuNDQgMTIuOCA0MS42LTQzLjUyIDc0LjI0LTc0Ljg4IDE3NC43Mi0xMzUuNjggMTc0LjcyLTkuNiAwLTE5LjItLjY0LTI4LjE2LTIuNTYtOTYtMTcuMjgtMTQ3LjItMjUzLjQ0LTE1Mi4zMi0yODYuNzIgMjMuMDQtMTIuMTYgMzkuNjgtMzcuMTIgMzkuNjgtNjUuOTIgMC00MC4zMi0zMi03Mi4zMi03MS4wNC03Mi4zMmE3Mi41MTIgNzIuNTEyIDAgMCAwLTI0Ljk2IDE0MC4xNmMtNS4xMiAzNy4xMi01My43NiAyNzYuNDgtMTQ3LjIgMjg5LjkyLTcuNjggMS4yOC0xNS4zNiAxLjkyLTIzLjY4IDEuOTItNjAuMTYgMC0xMDIuNC0xMDQuOTYtMTM3LjYtMTc0LjcyIDMuODQtOC4zMiA1Ljc2LTE3LjkyIDUuNzYtMjguMTYgMC00MC4zMi0zMi03Mi4zMi03MS4wNC03Mi4zMi0xOS4yIDAtMzYuNDggNy42OC00OS4yOCAyMC40OC0xNC4wOCAxMy40NC0yMi40IDMyLTIyLjQgNTEuODQgMCA0MC4zMiAzMiA3Mi4zMiA3MS4wNCA3Mi4zMiAxMjQuMTYgMzEwLjQgMTg1LjYgNDY1LjkyIDE4NS42IDQ2NS45MlM0MDEuOTIgOTYwIDUxMS4zNiA5NjBzMjE3LjYtNTEuODQgMjE3LjYtNTEuODQgNjQuNjQtMTYxLjI4IDE5My4yOC00ODQuNDhjMzUuMi0zLjg0IDYzLjM2LTM0LjU2IDYzLjM2LTcxLjY4eiIgZmlsbD0iI0ZCRDMwRiIvPjxwYXRoIGQ9Ik0yOTQuNCA5MDQuMzJjMCAyOS40NCAxMDYuODggNTkuNTIgMjE1LjA0IDU5LjUyUzcyOS42IDkzNC40IDcyOS42IDkwNC4zMmMwLTI5LjQ0LTExMi42NC01OS41Mi0yMjAuMTYtNTkuNTJTMjk0LjQgODc0LjI0IDI5NC40IDkwNC4zMnoiIGZpbGw9IiNGRkE3MDYiLz48L3N2Zz4="
-					mode="aspectFill"
-				></image>
-			</div>
-		</div>
-		<div class="icon_ redPacket" v-if="item.had_draw">
-			<div class="redPacket-icon">
-				<image
-					class="img"
-					src="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTg3OC41OTIgMTAyNEgxNDUuNDA4Yy0yNC4wNjQgMC00My41Mi0xOS40NTYtNDMuNTItNDMuNTJWNDMuNTJjMC0yNC4wNjQgMTkuNDU2LTQzLjUyIDQzLjUyLTQzLjUyaDczMy4xODRjMjQuMDY0IDAgNDMuNTIgMTkuNDU2IDQzLjUyIDQzLjUydjkzNi40NDhjMCAyNC41NzYtMTkuNDU2IDQ0LjAzMi00My41MiA0NC4wMzJ6IiBmaWxsPSIjREY0OTQ5Ii8+PHBhdGggZD0iTTg3OC41OTIgMEgxNDUuNDA4Yy0yNC4wNjQgMC00NC4wMzIgMTkuNDU2LTQ0LjAzMiA0My41MnYzNzMuMjQ4QzIxMC45NDQgNDUzLjEyIDMzNS44NzIgNDczLjYgNDY4Ljk5MiA0NzMuNmMxNjguOTYgMCAzMjUuNjMyLTMzLjI4IDQ1My4xMi05MC4xMTJWNDMuNTJjMC0yNC4wNjQtMTkuNDU2LTQzLjUyLTQzLjUyLTQzLjUyeiIgZmlsbD0iI0ZCNTM1MiIvPjxwYXRoIGQ9Ik0zNzUuMjk2IDQ4OS45ODRjMCA3NS4yNjQgNjEuNDQgMTM2LjcwNCAxMzYuNzA0IDEzNi43MDRzMTM2LjcwNC02MS40NCAxMzYuNzA0LTEzNi43MDRTNTg3LjI2NCAzNTMuMjggNTEyIDM1My4yOHMtMTM2LjcwNCA2MS40NC0xMzYuNzA0IDEzNi43MDR6IiBmaWxsPSIjRkNDRTNFIi8+PHBhdGggZD0iTTU2MS42NjQgNDgzLjg0aDMuMDcydi0uNTEyYzQuMDk2LTEuNTM2IDcuMTY4LTUuMTIgNy4xNjgtOS43MjggMC01LjYzMi00LjYwOC0xMC4yNC0xMC4yNC0xMC4yNEg1MjIuMjR2LS41MTJsNDEuNDcyLTQwLjQ0OCAyLjA0OC0yLjA0OGMxLjAyNC0xLjUzNiAxLjUzNi0zLjA3MiAxLjUzNi00LjYwOCAwLTIuNTYtLjUxMi01LjEyLTIuNTYtNy42OC0zLjU4NC00LjA5Ni0xMC4yNC00LjYwOC0xNC4zMzYtLjUxMmwtMzcuODg4IDM3LjM3Ni0zOS45MzYtMzguOTEyYy00LjA5Ni0zLjU4NC0xMC43NTItMy4wNzItMTQuMzM2IDEuMDI0LTMuMDcyIDMuNTg0LTMuNTg0IDguMTkyLTEuMDI0IDEyLjI4OHYuNTEybDQ1LjA1NiA0NC4wMzJ2MS4wMjRoLTQyLjQ5NnYuNTEyYy00LjA5NiAxLjUzNi03LjE2OCA1LjEyLTcuMTY4IDkuNzI4czMuMDcyIDguMTkyIDcuMTY4IDkuNzI4di41MTJoNDEuOTg0djMxLjIzMmgtNDMuMDA4di41MTJjLTQuMDk2IDEuNTM2LTcuMTY4IDUuMTItNy4xNjggOS43MjhzMy4wNzIgOC4xOTIgNy4xNjggOS43Mjh2LjUxMmg0My4wMDh2MzQuMzA0aC41MTJjMS41MzYgNC4wOTYgNS4xMiA3LjE2OCA5LjcyOCA3LjE2OHM4LjE5Mi0zLjA3MiA5LjcyOC03LjE2OGguNTEydi0zNC4zMDRoNDIuNDk2di0uNTEyYzQuMDk2LTEuNTM2IDcuMTY4LTUuMTIgNy4xNjgtOS43MjggMC01LjYzMi00LjYwOC0xMC4yNC0xMC4yNC0xMC4yNEg1MjIuMjR2LTMxLjIzMmwzOS40MjQtMS41MzZ6IiBmaWxsPSIjRDg4NjE5Ii8+PC9zdmc+"
-					mode="heightFix"
-				></image>
-			</div>
-			<div class="text_24 color__" v-if="item.senderData.name">你领取了{{ item.senderData.name }}的红包</div>
-			<div class="text_24 color__" v-else>你领取了红包</div>
-		</div>
-	</div>
-</template>
-
-<script>
-import { show } from '@/util/index.js';
-export default {
-	props: {
-		myid: {
-			type: [String, Number],
-			default: null
-		},
-		isMy: {
-			type: [Boolean, Number],
-			default: false
-		},
-		value: {
-			type: Object,
-			default: {}
-		}
-	},
-	created() {
-		// console.log(this.value);
-		// this.infr();
-	},
-	data() {
-		return {
-			item: {},
-			pageObj: {}
-		};
-	},
-	watch: {
-		value: {
-			handler: function (newV) {
-				this.item = newV;
-				// this.infr();
-			},
-			immediate: true
-		}
-	},
-	methods: {
-		onClick() {
-			this.$emit('onClick');
-		},
-		async infr() {
-			const res = await this.API_red_div(this.value.payload.message_id);
-			if (res) {
-				const data = res.data.data;
-				this.item.had_draw = data.had_draw;
-			}
-		},
-		API_red_div(message_id) {
-			return new Promise((res) => {
-				http.get(
-					'Group/red_div',
-					{
-						message_id
-					},
-					true,
-					(r) => {
-						if (r.data.code == 0) return res(r);
-						return res(false);
-					}
-				);
-			});
-		}
-	}
-};
-</script>
-
-<style scoped lang="scss">
-.text {
-	position: relative;
-	z-index: 99;
-	box-sizing: border-box;
-	width: 490rpx;
-	min-height: 180rpx;
-	padding: 22rpx 30rpx 0 30rpx;
-	border-radius: 10rpx;
-	background-color: #fa9e3b;
-	.red_packet_bg_mini {
-		position: absolute;
-		top: 0;
-		left: 0;
-		right: 0;
-		bottom: 0;
-		z-index: 0;
-		overflow: hidden;
-		opacity: 0.2;
-		border-radius: 10rpx;
-	}
-
-	.redPacket-row {
-		width: 100%;
-		min-height: 94rpx;
-		.redPacket-icon {
-			width: 76rpx;
-			height: 88rpx;
-			border-radius: 10rpx;
-			overflow: hidden;
-			margin-right: 26rpx;
-		}
-		.redPacket-title {
-		}
-	}
-	.m-line {
-	}
-	.redPacket-text {
-		width: 100%;
-		min-height: 30rpx;
-		padding: 4rpx 0 6rpx 0;
-		font-weight: 300;
-	}
-}
-
-.text_r {
-	position: relative;
-}
-.text_l {
-	position: relative;
-}
-
-.text_r::after {
-	position: absolute;
-	z-index: -1;
-	content: '';
-	top: 26rpx;
-	right: -8rpx;
-	width: 18rpx;
-	height: 18rpx;
-	border-radius: 2px;
-	transform: rotate(45deg);
-	background-color: #fa9e3b;
-}
-.text_l::after {
-	position: absolute;
-	z-index: -1;
-	content: '';
-	top: 26rpx;
-	left: -8rpx;
-	width: 18rpx;
-	height: 18rpx;
-	border-radius: 2px;
-	transform: rotate(45deg);
-	background-color: #fa9e3b;
-}
-.text_ {
-	background-color: #fde2c4;
-}
-
-.text_::after {
-	background-color: #fde2c4;
-}
-
-.text-box {
-}
-
-.exclusive {
-	width: 100%;
-	flex-direction: row-reverse;
-	margin-top: 2rpx;
-	.label-icon {
-		width: 34rpx;
-		height: 34rpx;
-		margin-right: 10rpx;
-	}
-}
-
-.redPacket {
-	width: 100%;
-	height: 80rpx;
-
-	.redPacket-icon {
-		height: 34rpx;
-		border-radius: 4px;
-		margin: 0 12rpx 0 0;
-		overflow: hidden;
-	}
-}
-</style>

+ 0 - 159
src/components/chat/m-share-mall.vue

@@ -1,159 +0,0 @@
-<template>
-	<div class="flex_c row">
-		<div class="flex_r text-box" :class="{ text_box: isMy }" @tap.stop="onClick">
-			<div class="text" :class="isMy ? 'text_r' : 'text_l'">
-				<div class="flex_c_c article">
-					<div class="flex_r fa_c article-infr">
-						<div class="article-infr-img">
-							<image class="img" :src="value.payload.share_image" mode="aspectFill"></image>
-						</div>
-						<div class="text_22 color__ article-infr-text">
-							{{ value.payload.title }}
-						</div>
-					</div>
-					<div class="text_30 nowrap_ article-title">
-						{{ value.payload.short_title }}
-					</div>
-					<div class="article-img">
-						<image class="img" :src="value.payload.share_image" mode="aspectFill"></image>
-					</div>
-					<div class="m-line">
-						<m-line color="#f0f0f0" length="100%" :hairline="true"></m-line>
-					</div>
-					<div class="flex_r fa_c article-b">
-						<div class="article-b-icon"></div>
-						<div class="text_20 color__ article-b-text">xxxx</div>
-					</div>
-				</div>
-			</div>
-		</div>
-	</div>
-</template>
-
-<script>
-export default {
-	props: {
-		isMy: {
-			type: [Boolean, Number],
-			default: false
-		},
-		value: {
-			type: Object,
-			default: {}
-		}
-	},
-	data() {
-		return {};
-	},
-	computed: {},
-	methods: {
-		onClick() {
-			this.$emit('onClick');
-		}
-	}
-};
-</script>
-
-<style scoped lang="scss">
-.row {
-}
-.row_ {
-	flex-direction: row-reverse;
-}
-.text_box {
-	flex-direction: row-reverse;
-}
-.text {
-	position: relative;
-	z-index: 99;
-	box-sizing: border-box;
-}
-
-.text_r {
-	position: relative;
-}
-.text_l {
-	position: relative;
-}
-
-.text_r::after {
-	position: absolute;
-	z-index: -1;
-	content: '';
-	top: 26rpx;
-	right: -8rpx;
-	width: 18rpx;
-	height: 18rpx;
-	border-radius: 2px;
-	transform: rotate(45deg);
-	background-color: #fff;
-}
-.text_l::after {
-	position: absolute;
-	z-index: -1;
-	content: '';
-	top: 26rpx;
-	left: -8rpx;
-	width: 18rpx;
-	height: 18rpx;
-	border-radius: 2px;
-	transform: rotate(45deg);
-	background-color: #fff;
-}
-
-.article {
-	box-sizing: border-box;
-	padding: 14rpx 20rpx 4rpx 20rpx;
-	width: 490rpx;
-	border-radius: 10rpx;
-	overflow: hidden;
-	background-color: #fff;
-	border: 0.5px solid #fff;
-
-	.article-infr {
-		width: 100%;
-		height: 46rpx;
-		margin-bottom: 10rpx;
-		.article-infr-img {
-			width: 40rpx;
-			height: 40rpx;
-			margin-right: 10rpx;
-			border-radius: 50%;
-			overflow: hidden;
-			background-color: #f1f1f1;
-		}
-		.article-infr-text {
-		}
-	}
-
-	.article-title {
-		box-sizing: border-box;
-		width: 100%;
-		margin-bottom: 14rpx;
-	}
-	.article-img {
-		width: 450rpx;
-		height: 350rpx;
-		background-color: #f1f1f1;
-	}
-	.m-line {
-		width: 100%;
-		height: 1px;
-		margin-top: 20rpx;
-	}
-	.article-b {
-		width: 100%;
-		margin-top: 4rpx;
-		.article-b-icon {
-			width: 26rpx;
-			height: 26rpx;
-			background-color: #f1f1f1;
-			border-radius: 50%;
-			overflow: hidden;
-			margin-right: 10rpx;
-		}
-		.article-b-text {
-		}
-	}
-}
-</style>

+ 0 - 159
src/components/chat/m-share-sbcf.vue

@@ -1,159 +0,0 @@
-<template>
-	<div class="flex_c row">
-		<div class="flex_r text-box" :class="{ text_box: isMy }" @tap.stop="onClick">
-			<div class="text" :class="isMy ? 'text_r' : 'text_l'">
-				<div class="flex_c_c article">
-					<div class="flex_r fa_c article-infr">
-						<div class="article-infr-img">
-							<image class="img" :src="value.payload.share_image" mode="aspectFill"></image>
-						</div>
-						<div class="text_22 color__ article-infr-text">
-							{{ value.payload.title }}
-						</div>
-					</div>
-					<div class="text_30 nowrap_ article-title">
-						{{ value.payload.short_title }}
-					</div>
-					<div class="article-img">
-						<image class="img" :src="value.payload.share_image" mode="aspectFill"></image>
-					</div>
-					<div class="m-line">
-						<m-line color="#f0f0f0" length="100%" :hairline="true"></m-line>
-					</div>
-					<div class="flex_r fa_c article-b">
-						<div class="article-b-icon"></div>
-						<div class="text_20 color__ article-b-text">联盟商家</div>
-					</div>
-				</div>
-			</div>
-		</div>
-	</div>
-</template>
-
-<script>
-export default {
-	props: {
-		isMy: {
-			type: [Boolean, Number],
-			default: false
-		},
-		value: {
-			type: Object,
-			default: {}
-		}
-	},
-	data() {
-		return {};
-	},
-	computed: {},
-	methods: {
-		onClick() {
-			this.$emit('onClick');
-		}
-	}
-};
-</script>
-
-<style scoped lang="scss">
-.row {
-}
-.row_ {
-	flex-direction: row-reverse;
-}
-.text_box {
-	flex-direction: row-reverse;
-}
-.text {
-	position: relative;
-	z-index: 99;
-	box-sizing: border-box;
-}
-
-.text_r {
-	position: relative;
-}
-.text_l {
-	position: relative;
-}
-
-.text_r::after {
-	position: absolute;
-	z-index: -1;
-	content: '';
-	top: 26rpx;
-	right: -8rpx;
-	width: 18rpx;
-	height: 18rpx;
-	border-radius: 2px;
-	transform: rotate(45deg);
-	background-color: #fff;
-}
-.text_l::after {
-	position: absolute;
-	z-index: -1;
-	content: '';
-	top: 26rpx;
-	left: -8rpx;
-	width: 18rpx;
-	height: 18rpx;
-	border-radius: 2px;
-	transform: rotate(45deg);
-	background-color: #fff;
-}
-
-.article {
-	box-sizing: border-box;
-	padding: 14rpx 20rpx 4rpx 20rpx;
-	width: 490rpx;
-	border-radius: 10rpx;
-	overflow: hidden;
-	background-color: #fff;
-	border: 0.5px solid #fff;
-
-	.article-infr {
-		width: 100%;
-		height: 46rpx;
-		margin-bottom: 10rpx;
-		.article-infr-img {
-			width: 40rpx;
-			height: 40rpx;
-			margin-right: 10rpx;
-			border-radius: 50%;
-			overflow: hidden;
-			background-color: #f1f1f1;
-		}
-		.article-infr-text {
-		}
-	}
-
-	.article-title {
-		box-sizing: border-box;
-		width: 100%;
-		margin-bottom: 14rpx;
-	}
-	.article-img {
-		width: 450rpx;
-		height: 450rpx;
-		background-color: #f1f1f1;
-	}
-	.m-line {
-		width: 100%;
-		height: 1px;
-		margin-top: 20rpx;
-	}
-	.article-b {
-		width: 100%;
-		margin-top: 4rpx;
-		.article-b-icon {
-			width: 26rpx;
-			height: 26rpx;
-			background-color: #f1f1f1;
-			border-radius: 50%;
-			overflow: hidden;
-			margin-right: 10rpx;
-		}
-		.article-b-text {
-		}
-	}
-}
-</style>

+ 0 - 164
src/components/chat/m-text.vue

@@ -1,164 +0,0 @@
-<template>
-	<div class="flex_c row">
-		<div class="flex_r text-box" :class="{ text_box: isMy }" @tap.stop="onClick">
-			<div
-				class="text_32 text"
-				:class="isMy ? 'text_r' : 'text_l'"
-				:hover-class="isMy ? 'hover_classr' : 'hover_classl'"
-				:hover-stay-time="60"
-				:style="{ whiteSpace: 'pre-wrap' }"
-				v-html="renderTextMessage"
-			></div>
-		</div>
-		<div class="text_26 flex_r" :class="{ row_: isMy }" v-if="value.type === 'text_quote'">
-			<div v-if="value.payload.quoteSource.type === 'image' || value.payload.quoteSource.type === 'image_transmit'">
-				<m-image :value="value.payload.quoteSource"></m-image>
-			</div>
-			<div class="" v-else-if="value.payload.quoteSource.type === 'audio' || value.payload.quoteSource.type === 'audio_quote'">
-				<m-audio :value="value.payload.quoteSource"></m-audio>
-			</div>
-			<div class="" v-else-if="value.payload.quoteSource.type === 'text' || value.payload.quoteSource.type === 'text_quote'">
-				<m-text :value="value.payload.quoteSource"></m-text>
-			</div>
-			<div class="" v-else>
-				<m-other :value="value.payload.quoteSource"></m-other>
-			</div>
-		</div>
-	</div>
-</template>
-
-<script>
-import mText from './quoteType/m-text.vue';
-import mImage from './quoteType/m-image.vue';
-import mAudio from './quoteType/m-audio.vue';
-import mOther from './quoteType/m-other.vue';
-
-import { EmojiDecoder, emojiMap } from '@/util/EmojiDecoder.js';
-const emojiUrl = 'https://imgcache.qq.com/open/qcloud/tim/assets/emoji/';
-const decoder = new EmojiDecoder(emojiUrl, emojiMap);
-export default {
-	components: {
-		mText,
-		mImage,
-		mAudio,
-		mOther
-	},
-	props: {
-		isMy: {
-			type: [Boolean, Number],
-			default: false
-		},
-		value: {
-			type: Object,
-			default: {}
-		}
-	},
-	data() {
-		return {};
-	},
-	computed: {
-		//渲染文本消息,如果包含表情,替换为图片
-		//todo:本不需要该方法,可以在标签里完成,但小程序有兼容性问题,被迫这样实现
-		renderTextMessage() {
-			const { text = '' } = this.value.payload;
-			if (!text) return '<span>' + '[未知内容]' + '</span>';
-			return '<span>' + decoder.decode(text) + '</span>';
-		}
-	},
-	methods: {
-		onClick() {
-			this.$emit('onClick');
-		}
-	}
-};
-</script>
-
-<style scoped lang="scss">
-.row {
-}
-.row_ {
-	flex-direction: row-reverse;
-}
-.text_box {
-	flex-direction: row-reverse;
-}
-.text {
-	position: relative;
-	z-index: 99;
-	box-sizing: border-box;
-	padding: 16px 26px;
-	border-radius: 8px;
-	background-color: #fff;
-	word-break: break-all;
-	vertical-align: center;
-	font-size: 14px;
-	span{
-		font-size: 14px;
-	}
-}
-
-.text_r {
-	position: relative;
-	background-color: #95ec6a;
-}
-.text_l {
-	position: relative;
-}
-
-.text_r::after {
-	position: absolute;
-	z-index: -1;
-	content: '';
-	top: 26px;
-	right: -8px;
-	width: 18px;
-	height: 18px;
-	border-radius: 2px;
-	transform: rotate(45deg);
-	background-color: #95ec6a;
-}
-.text_l::after {
-	position: absolute;
-	z-index: -1;
-	content: '';
-	top: 26px;
-	left: -8px;
-	width: 18px;
-	height: 18px;
-	border-radius: 2px;
-	transform: rotate(45deg);
-	background-color: #fff;
-}
-
-.hover_classr {
-	background-color: #89d961;
-}
-.hover_classl {
-	background-color: #e2e2e2;
-}
-
-.hover_classr::after {
-	position: absolute;
-	z-index: -1;
-	content: '';
-	top: 26px;
-	right: -8px;
-	width: 18px;
-	height: 18px;
-	border-radius: 2px;
-	transform: rotate(45deg);
-	background-color: #89d961;
-}
-.hover_classl::after {
-	position: absolute;
-	z-index: -1;
-	content: '';
-	top: 26px;
-	left: -8px;
-	width: 18px;
-	height: 18px;
-	border-radius: 2px;
-	transform: rotate(45deg);
-	background-color: #e2e2e2;
-}
-</style>

+ 0 - 93
src/components/chat/m-video.vue

@@ -1,93 +0,0 @@
-<template>
-	<div class="flex_r m-video">
-		<!-- heightFix -->
-		<image class="z_index2" :style="getImageHeight" :src="value.payload.thumbnail.url" mode="aspectFill"></image>
-		<div class="m-video-icon">
-			<el-image
-				class="img"
-				src="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBkYXRhLXNwbS1hbmNob3ItaWQ9ImEzMTN4LnNlYXJjaF9pbmRleC4wLmk1LjU1YjUzYTgxcDB1a0U0IiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTUxNi42NTUgOS4zMUMyMzcuMzgyIDkuMzEgMTAuODYgMjM1LjgzIDEwLjg2IDUxNS4xMDJzMjI2LjUyIDUwNS43OTQgNTA1Ljc5NCA1MDUuNzk0IDUwNS43OTMtMjI2LjUyMSA1MDUuNzkzLTUwNS43OTRjMC0yNzcuNzIxLTIyNi41Mi01MDUuNzk0LTUwNS43OTMtNTA1Ljc5NHptMCA5ODIuMTA4Yy0yNjIuMjA3IDAtNDc0Ljc2NC0yMTIuNTU3LTQ3NC43NjQtNDc0Ljc2MyAwLTI2Mi4yMDcgMjEyLjU1Ny00NzQuNzY0IDQ3NC43NjQtNDc0Ljc2NCAyNjIuMjA2IDAgNDc0Ljc2MyAyMTIuNTU3IDQ3NC43NjMgNDc0Ljc2NCAwIDI2Mi4yMDYtMjEyLjU1NyA0NzQuNzYzLTQ3NC43NjMgNDc0Ljc2M3oiIGRhdGEtc3BtLWFuY2hvci1pZD0iYTMxM3guc2VhcmNoX2luZGV4LjAuaTcuNTViNTNhODFwMHVrRTQiIGNsYXNzPSJzZWxlY3RlZCIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik03MDUuOTQgNDc0Ljc2NEw0NzAuMTEgMzI1LjgxOGMtMjEuNzIyLTEzLjk2My01MS4yLTcuNzU3LTYzLjYxMyAxMy45NjQtNC42NTUgNy43NTctNy43NTggMTUuNTE1LTcuNzU4IDI0LjgyNHYyOTcuODkxYzAgMjYuMzc2IDIwLjE3IDQ2LjU0NSA0Ni41NDYgNDYuNTQ1IDkuMzA5IDAgMTcuMDY3LTMuMTAzIDI0LjgyNC03Ljc1N2wyMzcuMzgyLTE0OC45NDZjMjEuNzIxLTEzLjk2MyAyNy45MjctNDEuODkgMTMuOTY0LTYzLjYxMi00LjY1NS00LjY1NC05LjMxLTkuMzA5LTE1LjUxNi0xMy45NjN6IiBkYXRhLXNwbS1hbmNob3ItaWQ9ImEzMTN4LnNlYXJjaF9pbmRleC4wLmk2LjU1YjUzYTgxcDB1a0U0IiBjbGFzcz0ic2VsZWN0ZWQiIGZpbGw9IiNmZmYiLz48L3N2Zz4="
-				mode="aspectFill"
-			></el-image>
-		</div>
-		<div class="size_white text_22 m-video-time">{{ getTimes }}</div>
-	</div>
-</template>
-<script>
-export default {
-	props: {
-		isMy: {
-			type: [Boolean, Number],
-			default: false
-		},
-		value: {
-			type: Object,
-			default: {}
-		}
-	},
-	data() {
-		return {};
-	},
-	computed: {
-		getImageHeight() {
-			let { width, height } = this.value.payload.thumbnail;
-			if (width < 300) {
-				width = width * 1.1;
-				height = height * 1.1;
-				if (width < 200) {
-					width = width * 1.2;
-					height = height * 1.2;
-					if (width < 150) {
-						width = width * 1.3;
-						height = height * 1.3;
-					}
-				}
-			}
-			if (width >= 360) {
-				width = width * 0.9;
-				height = height * 0.9;
-			}
-			return {
-				width: `${width}rpx`,
-				height: `${height}rpx`
-			};
-		},
-		getTimes() {
-			const t = this.value.payload.video.duration;
-			let h = parseInt((t / 60 / 60) % 24);
-			let m = parseInt((t / 60) % 60);
-			let s = parseInt(t % 60);
-			h = h < 10 ? '0' + h : h;
-			m = m < 10 ? '0' + m : m;
-			s = s < 10 ? '0' + s : s;
-			if (h === '00') return `${m}:${s}`;
-			return `${h}:${m}:${s}`;
-		}
-	},
-	methods: {}
-};
-</script>
-
-<style scoped lang="scss">
-.m-video {
-	position: relative;
-	border-radius: 10rpx;
-	overflow: hidden;
-	background-color: #fff;
-	.m-video-icon {
-		position: absolute;
-		z-index: 3;
-		width: 90rpx;
-		height: 90rpx;
-		top: calc(50% - 45rpx);
-		left: calc(50% - 45rpx);
-		border-radius: 50%;
-		background-color: rgba(000, 000, 000, 0.2);
-	}
-	.m-video-time {
-		position: absolute;
-		z-index: 3;
-		bottom: 10rpx;
-		right: 10rpx;
-	}
-}
-</style>

+ 0 - 42
src/components/chat/quoteType/m-audio.vue

@@ -1,42 +0,0 @@
-<template>
-	<div class="quote-box">
-		<div class="quote-name">
-			{{ value.senderData.name }}:
-			<div>[语音]{{ Math.ceil(value.payload.duration) || 1 }}''</div>
-		</div>
-	</div>
-</template>
-<script>
-export default {
-	props: {
-		isMy: {
-			type: [Boolean, Number],
-			default: false
-		},
-		value: {
-			type: Object,
-			default: {}
-		}
-	},
-	data() {
-		return {};
-	},
-	computed: {},
-	methods: {}
-};
-</script>
-
-<style scoped lang="scss">
-.quote-box {
-	box-sizing: border-box;
-	padding: 12rpx 16rpx;
-	border-radius: 10rpx;
-	margin-top: 6rpx;
-	background-color: #e1e1e1;
-	color: #6b6b6b;
-}
-.quote-name {
-}
-.quote-content {
-}
-</style>

+ 0 - 54
src/components/chat/quoteType/m-image.vue

@@ -1,54 +0,0 @@
-<template>
-	<div class="quote-box">
-		<div class="flex_r quote-name">
-			<div class="">{{ value.senderData.name }}:</div>
-			<div class="flex_r m-image" @tap.stop="openimg(value.payload.url)">
-				<el-image class="img" :src="value.payload.thumbnail || value.payload.url" fit="aspectFill"></el-image>
-			</div>
-		</div>
-	</div>
-</template>
-<script>
-import { openimg } from '@/util/index.js';
-export default {
-	props: {
-		value: {
-			type: Object,
-			default: {}
-		}
-	},
-	data() {
-		return {};
-	},
-	computed: {},
-	methods: {
-		openimg
-	}
-};
-</script>
-
-<style scoped lang="scss">
-.quote-box {
-	box-sizing: border-box;
-	padding: 12px 16px;
-	border-radius: 10px;
-	margin-top: 6px;
-	background-color: #e1e1e1;
-	color: #6b6b6b;
-}
-.quote-name {
-}
-.quote-content {
-}
-.m-image {
-	border-radius: 10px;
-	overflow: hidden;
-	.img {
-		width: 80px;
-		height: 80px;
-		border-radius: 6px;
-		overflow: hidden;
-		background-color: #fff;
-	}
-}
-</style>

+ 0 - 75
src/components/chat/quoteType/m-other.vue

@@ -1,75 +0,0 @@
-<template>
-	<div class="quote-box">
-		<div class="quote-name">
-			{{ value.senderData.name }}:
-			<div>{{ renderTextMessage }}</div>
-		</div>
-	</div>
-</template>
-
-<script>
-import { EmojiDecoder, emojiMap } from '@/util/EmojiDecoder.js';
-const emojiUrl = 'https://imgcache.qq.com/open/qcloud/tim/assets/emoji/';
-const decoder = new EmojiDecoder(emojiUrl, emojiMap);
-export default {
-	props: {
-		isMy: {
-			type: [Boolean, Number],
-			default: false
-		},
-		value: {
-			type: Object,
-			default: {}
-		}
-	},
-	data() {
-		return {};
-	},
-	created() {},
-	computed: {
-		renderTextMessage() {
-			const { type = '' } = this.value;
-			const typeText = {
-				video: `[视频]${this.getTimes()}`,
-				red_envelope: '[蝌蚪红包]',
-				map: `[位置]${this.value.payload?.title}`,
-				emoji_pack: `[表情包]`,
-				article: '[文章分享]',
-				share_SBCF: '[商家分享]',
-				share_mall: '[商品分享]',
-				functional_module: '[功能分享]'
-			};
-			return typeText[type];
-		}
-	},
-	methods: {
-		getTimes() {
-			if (this.value.type !== 'video') return;
-			const t = this.value.payload.video.duration;
-			let h = parseInt((t / 60 / 60) % 24);
-			let m = parseInt((t / 60) % 60);
-			let s = parseInt(t % 60);
-			h = h < 10 ? '0' + h : h;
-			m = m < 10 ? '0' + m : m;
-			s = s < 10 ? '0' + s : s;
-			if (h === '00') return `${m}:${s}`;
-			return `${h}:${m}:${s}`;
-		}
-	}
-};
-</script>
-
-<style scoped lang="scss">
-.quote-box {
-	box-sizing: border-box;
-	padding: 12rpx 16rpx;
-	border-radius: 10rpx;
-	margin-top: 6rpx;
-	background-color: #e1e1e1;
-	color: #6b6b6b;
-}
-.quote-name {
-}
-.quote-content {
-}
-</style>

+ 0 - 58
src/components/chat/quoteType/m-text.vue

@@ -1,58 +0,0 @@
-<template>
-	<div class="quote-box">
-		<div class="quote-name">
-			<div>
-				{{ value.senderData.name }}:
-				<div v-html="renderTextMessage"></div>
-			</div>
-		</div>
-	</div>
-</template>
-
-<script>
-import { EmojiDecoder, emojiMap } from '@/util/EmojiDecoder.js';
-const emojiUrl = 'https://imgcache.qq.com/open/qcloud/tim/assets/emoji/';
-const decoder = new EmojiDecoder(emojiUrl, emojiMap);
-export default {
-	props: {
-		isMy: {
-			type: [Boolean, Number],
-			default: false
-		},
-		value: {
-			type: Object,
-			default: {}
-		}
-	},
-	data() {
-		return {};
-	},
-	created() {},
-	computed: {
-		//渲染文本消息,如果包含表情,替换为图片
-		//todo:本不需要该方法,可以在标签里完成,但小程序有兼容性问题,被迫这样实现
-		renderTextMessage() {
-			let { text = '' } = this.value.payload;
-			text = text.replace(/\n/g, '');
-			if (!text) return '<span>' + '[未知内容]' + '</span>';
-			return '<span>' + decoder.decode(text) + '</span>';
-		}
-	},
-	methods: {}
-};
-</script>
-
-<style scoped lang="scss">
-.quote-box {
-	box-sizing: border-box;
-	padding: 12rpx 16rpx;
-	border-radius: 10rpx;
-	margin-top: 6rpx;
-	background-color: #e1e1e1;
-	color: #6b6b6b;
-}
-.quote-name {
-}
-.quote-content {
-}
-</style>

+ 0 - 1001
src/components/imFloat/im.vue

@@ -1,1001 +0,0 @@
-<template>
-    <div class="global-im">
-        <!-- 悬浮按钮与角标 -->
-        <div class="im-trigger" :class="{ active: visible }" @click="toggleChat">
-            <el-icon :size="18"><el-icon-chat-round /></el-icon>
-            <div class="unreadCount">
-                <el-badge :value="unreadCount" :hidden="unreadCount === 0" :max="99">
-                    <i class="el-icon-chat-dot-round" style="font-size: 24px"></i>
-                </el-badge>
-            </div>
-        </div>
-    </div>
-    <el-drawer v-model="visible" title="在线客服" size="100%" destroy-on-close :close-on-click-modal="false" :with-header="false">
-        <el-container class="flex-column">
-            <div class="drawer-detail-main">
-                <div class="drawer-detail-header">
-                    <div class="drawer-detail-header-body">
-                        <div class="drawer-detail-header-left">在线客服</div>
-                        <div class="drawer-detail-header-left">
-                            <el-button type="default" icon="el-icon-close" @click="hideWindow">隐藏窗口</el-button>
-                        </div>
-                    </div>
-                </div>
-            </div>
-            <el-main class="nopadding">
-                <el-container>
-                    <el-aside width="300px" v-loading="loadMsg">
-                      <div class="chat-contact">
-                        <div :class="checkChat==index?'contact-item active':'contact-item'" v-for="(item,index) in chatContact" :key="index" @click="checkChatItem(index)">
-                          <div class="img"><el-image :src="item.avatar" fit="contain" style="width: 40px; height: 40px"></el-image></div>
-                          <div class="kefu-store">
-                            <div class="name">{{item.user.nickname}} <span v-if="item.last.num > 0">{{item.last.num}}</span></div>
-                            <div class="desc" v-if="item.last.type=='text'">{{item.last.content}}</div>
-                            <div class="desc" v-if="item.last.type=='order'">[订单消息]</div>
-                            <div class="desc" v-if="item.last.type=='image'">[图片消息]</div>
-                            <div class="desc" v-if="item.last.type=='video'">[视频消息]</div>
-                            <div class="desc" v-if="item.last.type=='pay'">[支付消息]</div>
-                            <div class="desc" v-if="item.last.type=='address'">[收集地址]</div>
-                          </div>
-                          <div class="time">
-                            {{item.last.create_at}}
-                          </div>
-                        </div>
-                      </div>
-                    </el-aside>
-                    <el-container v-if="chatItem">
-                        <el-header><div class="msg-title">与{{ chatItem.user.nickname }}的对话</div></el-header>
-                        <el-main class="nopadding" ref="main">
-                            <div class="chat-container" v-if="chatItem">
-                                <div class="loading-text" v-if="msgLoad">努力加载中...</div>
-                                <div class="message-list" ref="messageListRef" @scroll="handleScroll">
-                                    <template v-for="(item, index) in history.messages">
-                                    <div class="z_index2" style="transform: rotate(-180deg)" :key="item.messageId" v-if="!item.isHide">
-                                        <div class="icon_ text_26 color__ time">
-                                            {{ renderMessageDate(item, index) }}
-                                        </div>
-                                        <div :key="item.messageIds" v-if="!item.recalled">
-                                            <item :isMy="isSelf(item.senderId)" :myid="myid" :item="item" @onClick="onItem"
-                                                @onLongpress="onLongpress" @mention="mention"></item>
-                                        </div>
-                                        <div class="icon_ text_26 recalled" v-else>
-                                            <div class="">
-                                                <span v-if="isSelf(item.senderId)">你</span>
-                                                <span v-else>{{ item.senderData.name }}</span>
-                                                撤回了一条消息
-                                            </div>
-                                            <div class="recalled-edit" v-if="item.type === 'text' && isSelf(item.senderId)"
-                                                @click="recalledEdit(item)">重新编辑</div>
-                                        </div>
-                                    </div>
-                                    </template>
-                                </div>
-                                <div class="input-area">
-                                    <div class="quick-group">
-                                        <div class="emoji-item">
-                                            <el-popover placement="top" :width="400" trigger="click">
-                                                <template #reference>
-                                                    <div class="item-btn">
-                                                        <el-image style="width:25px;height:25px;" src="https://jymini.oss-cn-guangzhou.aliyuncs.com/pc/face.svg"></el-image>
-                                                        <div class="name">表情</div>
-                                                    </div>
-                                                </template>
-                                                <div class="swiper-item-box">
-                                                    <div class="flex_r swiper-item-box-l" v-for="(im, ix) in emojiList" :key="ix">
-                                                        <div
-                                                            class="icon_ emoji-item"
-                                                            v-for="(item, index) in im"
-                                                            :key="index"
-                                                            :style="{ opacity: ix === opacityGroup && (index == 5 || index == 6 || index == 7) ? opacity : 1 }"
-                                                        >
-                                                            <el-image class="img" :src="emojiUrl + item.image" @click="chooseEmoji(item.text)"></el-image>
-                                                        </div>
-                                                    </div>
-                                                </div>
-                                            </el-popover>
-                                        </div>
-                                        <div class="emoji-item">
-                                            <el-popover placement="top" :width="174">
-                                                <template #reference>
-                                                    <div class="item-btn">
-                                                        <el-image style="width:25px;height:25px;" src="https://jymini.oss-cn-guangzhou.aliyuncs.com/pc/more.svg"></el-image>
-                                                        <div class="name">图片</div>
-                                                    </div>
-                                                </template>
-                                                <sc-upload v-model="uploadImg" :on-success="uploadSuccess"></sc-upload>
-                                            </el-popover>
-                                        </div>
-                                        <div class="emoji-item" @click="showQuick">
-                                            <div class="item-btn">
-                                                <el-image style="width:25px;height:25px;" src="https://jymini.oss-cn-guangzhou.aliyuncs.com/pc/quick.svg"></el-image>
-                                                <div class="name">快捷回复</div>
-                                            </div>
-                                        </div>
-                                        <div class="emoji-item">
-                                            <el-popover placement="top" :width="300" trigger="click">
-                                                <template #reference>
-                                                    <div class="item-btn">
-                                                        <el-image style="width:26px;height:26px;" src="https://jymini.oss-cn-guangzhou.aliyuncs.com/pc/money.svg"></el-image>
-                                                        <div class="name">补差价</div>
-                                                    </div>
-                                                </template>
-                                                <el-form :model="priceForm" :rules="rules" ref="priceForm" label-position="top">
-                                                    <el-form-item label="名称" prop="name" class="label-item">
-                                                        <el-input v-model="priceForm.name" placeholder="请输入" clearable />
-                                                        <div class="el-form-item-msg"></div>
-                                                    </el-form-item>
-                                                    <el-form-item label="差价金额" prop="price" class="label-item">
-                                                        <el-input v-model="priceForm.price" placeholder="请输入" clearable>
-                                                            <template #append>元</template>
-                                                        </el-input>
-                                                        <div class="el-form-item-msg"></div>
-                                                    </el-form-item>
-                                                    <el-form-item>
-                                                        <el-button type="primary" :loading="isSaveing" @click="submitPrice()">确定发送</el-button>
-                                                    </el-form-item>
-                                                </el-form>
-                                            </el-popover>
-                                        </div>
-                                    </div>
-                                    <el-input
-                                        type="textarea"
-                                        :rows="3"
-                                        v-model="inputMessage"
-                                        placeholder="请输入消息..."
-                                        @keyup.enter.native="handleKeyCode"
-                                        @keydown.native="handleKeyCode"
-                                    ></el-input>
-                                    <div class="send-btn-group">
-                                        <div class="send-btn-right">
-                                            <el-button type="primary" @click="sendMessage">发送</el-button>
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
-                        </el-main>
-                    </el-container>
-                    <el-container v-else>
-                        <div class="empty-data">
-                            请选择左侧的聊天列表
-                        </div>
-                    </el-container>
-                    <el-aside width="400px" v-if="chatItem">
-                        <el-container>
-                            <el-header>
-                                <div class="msg-title">用户信息</div>
-                            </el-header>
-                            <el-main class="nopadding">
-                                <el-card shadow="never" class="border-none">
-                                    <el-descriptions :column="1" border>
-                                        <el-descriptions-item label="昵称">{{ chatItem.user.nickname }}</el-descriptions-item>
-                                        <el-descriptions-item label="OpenId">
-                                            <el-tooltip effect="dark" placement="top-start" :content="chatItem.user.openid">
-                                                查看
-                                            </el-tooltip>
-                                        </el-descriptions-item>
-                                        <el-descriptions-item label="手机号码">{{chatItem.user.mobile}}</el-descriptions-item>
-                                        <el-descriptions-item label="注册时间">{{chatItem.user.create_at}}</el-descriptions-item>
-                                    </el-descriptions>
-                                </el-card>
-                                <el-card shadow="never" class="border-none" v-loading="orderLoad">
-                                    <template #header>
-                                        <div class="msg-title">订单列表</div>
-                                    </template>
-                                    <div class="order-list-chat" v-if="orderList.length > 0">
-                                        <div class="m-order-s" v-for="(item,index) in orderList" :key="index">
-                                            <div class="order-img"><el-image style="width: 60px;height: 60px;" :src="item.img" fit="fit"></el-image></div>
-                                            <div class="order-info">
-                                                <div class="title">{{item.product.product_name}}</div>
-                                                <div class="desc">{{item.order_sn}}</div>
-                                                <div class="price">{{this.$TOOL.money(item.price)}}</div>
-                                            </div>
-                                            <div class="order-status-btn">
-                                                <div class="status primary cus" @click="sendAddress(item)">收集地址</div>
-                                                <div class="status info cus" @click="sendOrder(item)">发送</div>
-                                                <div class="status info" v-if="item.status=='0'">未支付</div>
-                                                <div class="status primary" v-if="item.status=='1'">待使用</div>
-                                                <div class="status success" v-if="item.status=='2'">已完成</div>
-                                                <div class="status danger" v-if="item.status=='3'">已退款</div>
-                                                <div class="status warn" v-if="item.status=='4'">退款中</div>
-                                            </div>
-                                        </div>
-                                        <div class="order-page">
-                                            <el-pagination :default-page-size="orderSize" small layout="prev, pager, next" @size-change="orderPageChange" @current-change="orderPageChange" :total="orderTotal" :hide-on-single-page="true" />
-                                        </div>
-                                    </div>
-                                    <div class="order-list-chat" v-else>
-                                        <el-empty description="没有订单" />
-                                    </div>
-                                </el-card>
-                            </el-main>
-                        </el-container>
-                    </el-aside>
-                </el-container>
-            </el-main>
-        </el-container>
-    </el-drawer>
-    <orderDetail ref="orderDetail" @success="orderSuccess"></orderDetail>
-</template>
-
-<script>
-import {
-	mapState
-} from 'vuex';
-import { Push } from "@/utils/push";
-import { emojiMap } from "@/utils/emoji";
-import item from '@/components/chat/index';
-var pushObj = null;
-let height2 = null;
-const emojiUrl = 'https://imgcache.qq.com/open/qcloud/tim/assets/emoji/';
-import {
-	formatDate,
-	to as tofn
-} from '@/util/index.js';
-import orderDetail from '@/components/imFloat/order';
-let imageList = [];
-export default {
-    name: 'GlobalIM',
-    components:{
-        item,
-        orderDetail
-    },
-    props: {
-        user: { type: Object, default: () => {} }
-    },
-    data() {
-        return {
-            rules:{
-                name: [
-                    {required: true, message: '请输入'}
-                ],
-                price: [
-                    {required: true, message: '请输入'}
-                ],
-            },
-            priceForm:{
-                name:"补差价"
-            },
-            uploadImg:"",
-            loadMsg:false,
-            history: {
-				messages: [],
-				allLoaded: false
-			},
-            msgLoad:false,
-            orderList:[],
-            orderLoad:false,
-            orderTotal:0,
-            orderPage:1,
-            emojiUrl,
-            loading:false,
-            visible: false,           // 聊天窗口可见性
-            unreadCount: 0,          // 未读消息数量
-            inputMessage: '',        // 输入的消息
-            timer: null,             // 定时器
-            messages: [],
-            // wsAuth:"https://tran.jsshuita.cn/plugin/webman/push/auth",
-            // wsUrl: 'wss://tran.jsshuita.cn/ws',
-            wsAuth:"http://127.0.0.1:9981/plugin/webman/push/auth",
-            wsUrl: 'ws://127.0.0.1:3131',
-            page:1,
-            size:10,
-            msgPage:1,
-            msgSize:20,
-            orderSize:10,
-            chatContact:[],
-            checkChat:null,
-            chatItem:null,
-            emojiList:[],
-			sendId:null,
-			myid: this.user.userId,
-            userId:null,
-            isSaveing:false
-        }
-    },
-    watch: {
-        chatItem(val){
-            if (val) {
-                this.$nextTick(() => {
-                    this.$refs.messageListRef?.addEventListener('scroll', this.handleScroll)
-                })
-            }
-        }
-    },
-	computed: mapState({
-		//显示时间
-		renderMessageDate() {
-			return (message, index) => {
-				if (message.timestamp - this.history.messages[index + 1]?.timestamp > 3 * 60 * 1000) {
-					return formatDate(message.timestamp, 'timestamp');
-				}
-				return '';
-			};
-		},
-		// 是否本人isMy
-		isSelf() {
-			return (senderId) => {
-				const {
-					member_id = this.myid
-				} = {"member_id":this.myid};
-				return senderId === `${member_id}`;
-			};
-		}
-	}),
-    mounted() {
-        // console.log("pushObj")
-        this.initEmoji()
-        this.initPush();
-        // this.simulateNewMessage()
-    },
-    beforeDestroy() {
-        // if (this.timer) {
-        //     clearInterval(this.timer)
-        // }
-        this.$refs.messageListRef.removeEventListener('scroll', this.handleScroll)
-    },
-    methods: {
-        orderSuccess(type,data){
-            console.log(data)
-            switch(type) {
-                case "address":
-                    this.sendAddress(data)
-                    break;
-            }
-        },
-        async submitPrice(){
-            var { priceForm,message } = this;
-            var validate = await this.$refs.priceForm.validate().catch(()=>{});
-            if(!validate){ return false }
-            this.isSaveing = true;
-            priceForm.type = "pay";
-            priceForm.groupId = this.chatItem.poi_id
-            priceForm.openid = this.chatItem.openid
-            var resp = await this.$API.chat.price.post(priceForm);
-            this.isSaveing = false;
-            if (resp.code == 0) {
-                return $message.error(resp.msg)
-            }
-            this.sendMessageData({
-                payload: {
-                    pay: resp.data,
-                },
-                type: 'pay'
-            });
-            this.uploadImg = "";
-        },
-        orderPageChange(e){
-            this.orderPage = e;
-            this.getOrderList()
-        },
-        hideWindow(){
-            this.chatItem = null;
-            this.msgPage = 1;
-            this.unreadCount = 0;
-            this.checkChat = null;
-            this.orderList = [];
-            this.orderPage = 1;
-            this.visible = false;
-        },
-        handleScroll(e){
-            const { scrollTop, clientHeight, scrollHeight } = e.target
-            const isBottom = scrollTop + clientHeight >= scrollHeight - 5   // 5px 缓冲区
-            const isTop = scrollTop <= 5
-            console.log("滚动",this.history.allLoaded)
-            if (isBottom && !this.history.allLoaded) {
-                console.log('到达底部')
-                // 加载更多等操作
-                this.getMsgMore()
-            }
-            if (isTop && this.history.allLoaded) {
-                // console.log('到达顶部')
-            }
-        },
-        playAudio(){
-            const audio = new Audio('/img/msn.mp3');
-            audio.play().catch(error => {
-                console.error("播放音频时出错:", error);
-            });
-        },
-        onLongpress(){},
-        onItem(data){
-            switch(data.type)
-            {
-                case "order":
-                    this.$nextTick(() => {
-                        this.$refs.orderDetail.open("add").setData(data.payload.order)
-                    })
-                    break;
-                case "address":
-                    this.$nextTick(() => {
-                        this.$refs.orderDetail.open("add").setData(data.payload.address)
-                    })
-                    break;
-            }
-        },
-        chooseEmoji(data){
-            this.inputMessage += data;
-        },
-        initEmoji() {
-			let newList = [];
-			let i = 1;
-			for (let key in emojiMap) {
-				let obj = {};
-				obj['index'] = i;
-				obj['text'] = key;
-				obj['image'] = emojiMap[key];
-				i++;
-				newList.push(obj);
-			}
-			var list = [];
-			let A = newList.filter((item, index) => {
-				return (index + 1) % 8 === 0;
-			});
-			A.unshift({ index: 0 });
-			A.push({ index: newList.length });
-			this.emojiList = A.map((item, index) => {
-				return newList.slice(A[index].index, A[index + 1]?.index || newList.length);
-			});
-			// this.scroll({ detail: { scrollTop: 10 } });
-		},
-        /**
-         * 发送订单消息
-         * @param data 
-         */
-        async sendOrder(data){
-            var orderData = {"img":data.img,"name":data.product.product_name,"goods_id":data.life_goods_id,"order":data.out_order_no,"price":this.$TOOL.disMoney(data.pay_money),"status":data.status};
-            var resp = await this.sendMessageApi("order",orderData);
-            if (!resp) {
-                return ;
-            }
-            this.sendMessageData({
-                payload: {
-                    order: orderData
-                },
-                type: 'order'
-            });
-        },
-        /**
-         * 收集地址消息
-         * @param data 
-         */
-        async sendAddress(data){
-            var orderData = {"img":data.img,"name":"完善会员资料","order":data.out_order_no,"status":0};
-            var resp = await this.sendMessageApi("address",orderData);
-            if (!resp) {
-                return ;
-            }
-            this.sendMessageData({
-                payload: {
-                    address: orderData
-                },
-                type: 'address'
-            });
-        },
-        async sendMessage(){
-            if (!this.inputMessage) return ;
-            var resp = await this.sendMessageApi("text",this.inputMessage);
-            if (!resp) {
-                this.inputMessage = "";
-                return ;
-            }
-            this.sendMessageData({
-                payload: {
-                    text: this.inputMessage
-                },
-                type: 'text'
-            });
-            this.inputMessage = ""
-        },
-        sendMessageData({payload,type}){
-			const message = {
-				groupId: this.chatItem.poi_id,
-				senderData: {
-                    avatar:this.chatItem.avatar
-                },
-				senderId: this.myid,
-				messageId: Date.now(),
-				payload: payload,
-				timestamp: Date.now(),
-				type: type,
-				recalled: false,
-				status: 'success',
-				isHide: 0
-			};
-			this.pushList(message);
-        },
-        handleKeyCode(event){
-            if (event.keyCode == 13) {
-                if (!event.ctrlKey) {
-                    this.sendMessage()
-                    event.preventDefault();
-                } else {
-                    this.inputMessage += "\n";
-                }
-            } else {
-                return ;
-            }
-        },
-        checkChatItem(index){
-            this.checkChat = index;
-            this.chatItem = this.chatContact[index]
-            this.chatContact[index].last.num = 0;
-            this.msgPage = 1;
-            this.history.messages = []
-            this.history.allLoaded = false
-            this.orderList = [];
-            this.orderPage = 1;
-            this.getMsgData();
-            this.getOrderList();
-        },
-        initPush(){
-            var _this = this;
-            if (!this.pushObj) {
-                this.pushObj = new Push({
-                    "url":this.wsUrl,
-                    "app_key":"265c33b73d5c04f918978577df2c48d2",
-                    "auth":this.wsAuth
-                });
-            }
-            var user_channel = this.pushObj.subscribe('service-' + this.myid);
-            user_channel.on('message', function (data) {
-                _this.playAudio()
-                _this.unreadCount ++;
-                if (_this.chatItem && _this.chatItem.openid == data.openid) { // 当前窗口实时推送
-                    _this.formatMsg(data);
-                }
-                // 给消息标红并更新最后一条消息
-                var msgData = _this.chatContact;
-                for (var i=0; i <= msgData.length;i ++) {
-                    var item = msgData[i];
-                    if (item && item.openid == data.openid) {
-                        item.last.type = data.type;
-                        item.last.num ++;
-                        item.last.content = data.content;
-                        item.last.create_at = data.create_at
-                    }
-                }
-            })
-        },
-        formatMsg(item){
-			var payload = {};
-			if (item.type == 'text') {
-				payload.text = item.content
-			}
-			if (item.type == 'order') {
-				var order = JSON.parse(item.content)
-				payload.order = order
-			}
-			if (item.type == 'pay') {
-				var order = JSON.parse(item.content)
-				payload.pay = order
-			}
-			if (item.type == 'address') {
-				var order = JSON.parse(item.content)
-				payload.address = order
-			}
-			if (item.type == 'image') {
-				payload = {
-					contentType: 'image/png',
-					name: 'uni-image.png',
-					size: 82942,
-					url: item.content,
-					width: 2732,
-					height: 2732,
-					thumbnail: item.content
-				};
-			}
-			const message = {
-				groupId: item.poi_id,
-				senderData: {
-					avatar:item.avatar,
-					name:item.source==2?item.nick.truename:item.user.nickname
-				},
-				senderId: (item.source==1?item.openid:item.service_id),
-				messageId: item.msgId,
-				payload: payload,
-				timestamp: item.time,
-				type: item.type,
-				recalled: false,
-				status: 'success',
-				isHide: 0
-			};
-			this.pushList(message);
-		},
-        async pushList(message) {
-			this.initMessageItem(message);
-			this.history.messages.unshift(message);
-            console.log(this.history.messages)
-			// 是否触发文字动效果
-			if (message.type === 'text' || message.type === 'text_quote') {
-				this.onSetText(message.payload.text);
-			}
-			// 缓存照片地址,
-			if (message.type === 'image' || message.type === 'image_transmit') {
-				imageList.push(message.payload.url);
-			}
-		},
-		// 组装item
-		initMessageItem(message, index) {
-			message['isHide'] = 0;
-			if (index === 0 && (message.type === 'text' || message.type === 'text_quote')) {
-				this.onSetText(message.payload.text);
-			}
-		},
-		// 文本触发效果相关========
-		onSetText(text) {},
-        // 切换聊天窗口
-        async toggleChat() {
-            this.visible = !this.visible
-            this.loadMsg = true;
-            this.chatContact = [];
-            if (this.visible) {
-                // 打开窗口时清除未读角标
-                this.unreadCount = 0
-            }
-            var resp = await this.$API.chat.list.get({page:this.page,pageSize:this.size})
-            this.loadMsg = false;
-            if (resp.code == 0) {
-              return this.$message.error(resp.msg)
-            }
-            this.chatContact = this.chatContact.concat(resp.data.rows)
-            // this.chatItem = this.chatContact[0]
-            // this.userId = this.chatItem.openid;
-            // this.getMsgData();
-        },
-        /**
-         * 加载更多
-         */
-        async getMsgMore(){
-            this.history.allLoaded = true;
-            this.msgLoad = true;
-            var resp = await this.$API.chat.msg.get({"page":this.msgPage,"size":this.msgSize,"openid":this.chatItem.openid})
-            this.msgLoad = false;
-            if (resp.data.rows.length > 0) {
-                this.msgPage ++;
-                var msgData = []
-				var list = resp.data.rows
-                // 同步混入数据
-                list.forEach((item, ix) => {
-                    var payload = {};
-                    if (item.type == 'text') {
-                        payload.text = item.content
-                    }
-                    if (item.type == 'order') {
-                        var order = JSON.parse(item.content)
-                        payload.order = order
-                    }
-                    if (item.type == 'pay') {
-                        var order = JSON.parse(item.content)
-                        payload.pay = order
-                    }
-                    if (item.type == 'address') {
-                        var order = JSON.parse(item.content)
-                        payload.address = order
-                    }
-                    if (item.type == 'image') {
-                        payload = {
-                            contentType: 'image/png',
-                            name: 'uni-image.png',
-                            size: 82942,
-                            url: item.content,
-                            width: 2732,
-                            height: 2732,
-                            thumbnail: item.content
-                        };
-                    }
-                    const message = {
-                        groupId: item.poi_id,
-                        senderData: {
-                            avatar:item.avatar
-                        },
-                        senderId: (item.source==1?item.openid:item.service_id),
-                        messageId: item.msgId,
-                        payload: payload,
-                        timestamp: item.time,
-                        type: item.type,
-                        recalled: false,
-                        status: 'success',
-                        isHide: 0
-                    };
-                    msgData[ix] = message
-                });
-                this.history.messages = [...this.history.messages, ...msgData];
-                this.history.allLoaded = false;
-            } else {
-                this.history.allLoaded = true;
-            }
-        },
-        /**
-         * 首次加载
-         */
-        async getMsgData(){
-            var resp = await this.$API.chat.msg.get({"page":this.msgPage,"size":this.msgSize,"openid":this.chatItem.openid})
-            if (resp.data.rows.length > 0) {
-                var msgData = resp.data.rows
-                msgData.forEach((item,index)=>{
-                    this.formatMsg(item);
-                })
-                this.msgPage ++;
-            }
-        },
-        async uploadSuccess(data){
-            var resp = await this.sendMessageApi("image",data.data.src);
-            if (!resp) {
-                return ;
-            }
-            this.sendMessageData({
-                payload: {
-                    contentType: 'image/png',
-                    name: data.data.fileName,
-                    size: 0,
-                    url: data.data.src,
-                    width: 2732,
-                    height: 2732,
-                    thumbnail: data.data.src
-                },
-                type: 'image'
-            });
-            this.uploadImg = "";
-        },
-        async sendMessageApi(type,content){
-            this.chatContact[this.checkChat].last.num = 0;
-            var resp = await this.$API.chat.send.post({type:type,content: content,groupId: this.chatItem.poi_id,openid:this.chatItem.openid})
-            if (resp.code == 0) return false;
-            this.chatContact[this.checkChat].last.type = type;
-            this.chatContact[this.checkChat].last.content = content;
-            this.chatContact[this.checkChat].last.create_at = resp.data.time;
-            return true;
-        },
-        async getOrderList(){
-            this.orderLoad = true;
-            var resp = await this.$API.order.list.get({"page":this.orderPage,"pageSize":this.orderSize,"openid":this.chatItem.openid});
-            this.orderLoad = false;
-            if (resp.code == 0) {
-                return ;
-            }
-            this.orderList = resp.data.rows;
-            this.orderTotal = resp.data.total;
-        }
-    }
-}
-</script>
-
-<style scoped lang="scss">
-@import '@/style/index.scss';
-.border-none{border: 0;}
-.msg-title{font-size: 18px;font-weight: bold;}
-.loading-text{background-color: #f8f8f8;text-align: center;font-size: 12px;}
-.m-order-s{background-color: #f8f8f8;border-radius: 5px;display: flex;font-size: 14px;position: relative;margin-bottom: 10px;}
-.m-order-s .order-img image{width: 60px;height: 60px;}
-.m-order-s .order-info {padding: 10px;}
-.m-order-s .order-info .title{font-size: 14px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}
-.m-order-s .order-info .desc{font-size: 12px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;color: #999;}
-.m-order-s .order-info .price{font-size: 14px;color: #f00;}
-.m-order-s .order-status-btn{position: absolute;right: 0;bottom: 0;display: flex;align-items: center;gap: 5px;}
-.m-order-s .status{border-radius: 5px 0 5px 0;background-color: #909399;font-size: 12px;color: #fff;padding: 5px;}
-.m-order-s .status.cus{cursor: pointer;}
-.m-order-s .status.info{background-color: #909399;}
-.m-order-s .status.primary{background-color: #409eff;}
-.m-order-s .status.success{background-color: #67c23a;}
-.m-order-s .status.danger{background-color: #f56c6c;}
-.m-order-s .status.warn{background-color: #e6a23c;}
-
-.hideStr{overflow: hidden;width: 80%;}
-.contact-item{display: flex;align-items: center;background-color: #fff;padding: 10px;border-bottom: 1px solid #f8f8f8;cursor: pointer;}
-.contact-item.active{background-color: #f8f8f8;}
-.contact-item .kefu-store{margin-left: 10px;}
-.contact-item .kefu-store .name{font-size: 14px;color: #333;display: flex;align-items: center;}
-.contact-item .kefu-store .name span{background-color: #f00;color: #fff;width: 20px;height: 20px;display: flex;align-items: center;justify-content: center;border-radius: 20px;font-size: 12px;margin-left: 10px;}
-.contact-item .kefu-store .desc{font-size: 12px;color: #666;margin-top: 5px;}
-.contact-item .time{margin-left: auto;margin-right: 0;font-size: 12px;color: #666;}
-.send-btn-group{margin-top: 10px;display: flex;align-items: center;justify-content: space-between;}
-.send-btn-group .send-emoji{display: flex;align-items: center;gap: 15px;cursor: pointer;}
-.quick-group{display: flex;align-items: center;gap: 10px;padding: 15px 0;}
-.quick-group .item-btn{background-color: #f8f8f8;padding: 5px;border-radius: 3px;display: flex;align-items: center;gap: 5px;cursor: pointer;}
-.z_index2{position: relative;z-index: 2;}
-.empty-data{display: flex;width: 100%;text-align: center;justify-content: center;font-size: 18px;background-color: #f8f8f8;align-items: center;}
-.swiper-item-box {
-    position: relative;
-    z-index: 1;
-    box-sizing: border-box;
-    width: 100%;
-    height: 100%;
-    max-height: 300px;
-    overflow: auto;
-    flex-wrap: wrap;
-    align-items: flex-start;
-
-    .swiper-item-box-l {
-        // width: calc(62.5vw);
-        width: calc(100%);
-        flex-wrap: wrap;
-        align-items: flex-start;
-    }
-    .swiper-item-box-r {
-        width: calc(37.5%);
-        flex-wrap: wrap;
-        align-items: flex-start;
-    }
-
-    .emoji-item {
-        width: calc(12.5%);
-        height: calc(12.5%);
-        flex-shrink: 0;
-        transition: all 0.1s;
-        padding: 10px 0;
-        
-        .img {
-            width: 55%;
-            height: 55%;
-            cursor: pointer;
-        }
-        &:hover {
-            background-color: #f8f8f8;
-        }
-    }
-}
-.flex_r {
-    display: flex;
-    flex-direction: row;
-}
-.swiper-item-box-b {
-    width: calc(38%);
-    position: absolute;
-    z-index: 99;
-    right: 0rpx;
-    bottom: 0px;
-    padding: 0 0 40rpx 0;
-    // background-color: #000;
-    background-image: linear-gradient(to top, #ececec, #ececec, #ececec, #ececec, #ececec, rgba(0, 0, 0, 0));
-}
-.swiper-item-box-delete {
-    width: 116rpx;
-    height: calc(12.5%);
-    border-radius: 10rpx;
-    margin-right: 20rpx;
-    background-color: #fff;
-    .img {
-        width: 45%;
-        height: 45%;
-        margin-right: 4rpx;
-    }
-}
-.swiper-item-box-button {
-    width: 116rpx;
-    height: calc(12.5vw);
-    border-radius: 10rpx;
-    margin-right: 10rpx;
-    background-color: #05c160;
-}
-.page {
-	position: fixed;
-	z-index: 1;
-	top: 0;
-	left: 0;
-	bottom: 0;
-	right: 0;
-	background-color: #ededed;
-}
-.scroll-Y {
-	width: 100%;
-	height: 0;
-	transition: all 0.2s;
-	transform: rotate(180deg);
-	background-color: #ededed;
-	::-webkit-scrollbar {
-		display: none;
-	}
-}
-.scroll-view-str {
-	width: 100%;
-}
-
-.message-list .time {
-	width: 100%;
-	color: #a3a3a3;
-	line-height: 50px;
-}
-
-.message-list .recalled {
-	width: 100%;
-	height: 50rpx;
-	margin: 20rpx 0;
-	color: #a3a3a3;
-
-	.recalled-edit {
-		color: #5a6693;
-		margin-left: 14rpx;
-	}
-}
-@keyframes simple-blink {
-  0%, 100% { opacity: 1; }
-  50% { opacity: 0; }
-}
-.global-im {
-    .unreadCount{
-        position: fixed;
-        right: 42px;
-        bottom: 162px;
-        animation: simple-blink 2s ease-in-out infinite;
-    }
-  .im-trigger {
-    position: fixed;
-    right: 24px;
-    bottom: 124px;
-    width: 48px;
-    height: 48px;
-    background: #409eff;
-    border-radius: 50%;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    cursor: pointer;
-    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.1);
-    z-index: 2000;
-    transition: all 0.3s;
-    color: white;
-    &:hover {
-      background: #66b1ff;
-    }
-    &.active {
-      background: #909399;
-    }
-  }
-}
-.chat-container {
-  display: flex;
-  flex-direction: column;
-  height: 100%;
-  .message-list {
-    flex: 1;
-    overflow-y: auto;
-    background-color: #f8f8f8;
-    transition: all 0.2s;
-    transform: rotate(180deg);
-    .message-item {
-      display: flex;
-      margin-bottom: 16px;
-      &.self {
-        flex-direction: row-reverse;
-        .content {
-          margin-right: 12px;
-          align-items: flex-end;
-          .text {
-            background: #95ec69;
-          }
-        }
-      }
-      &.other {
-        .content {
-          margin-left: 12px;
-        }
-      }
-      .content {
-        display: flex;
-        flex-direction: column;
-        max-width: 70%;
-        .name {
-          font-size: 12px;
-          color: #999;
-          margin-bottom: 4px;
-        }
-        .text {
-          padding: 8px 12px;
-          background: #f0f0f0;
-          border-radius: 12px;
-          word-break: break-all;
-        }
-        .time {
-          font-size: 10px;
-          color: #ccc;
-          margin-top: 4px;
-        }
-      }
-    }
-  }
-  .input-area {
-    padding: 0 16px 16px 16px;
-    border-top: 1px solid #eee;
-  }
-}
-</style>

+ 0 - 1251
src/components/imFloat/imFloat.vue

@@ -1,1251 +0,0 @@
-<template>
-    <div class="global-im">
-        <!-- 悬浮按钮与角标 -->
-        <div class="im-trigger" :class="{ active: visible }" @click="toggleChat">
-            <el-icon :size="18"><el-icon-chat-round /></el-icon>
-            <div class="unreadCount">
-                <el-badge :value="unreadCount" :hidden="unreadCount === 0" :max="99">
-                    <i class="el-icon-chat-dot-round" style="font-size: 24px"></i>
-                </el-badge>
-            </div>
-        </div>
-    </div>
-    <el-drawer v-model="visible" title="在线客服" size="100%" destroy-on-close :close-on-click-modal="false" :with-header="false">
-        <el-container class="flex-column">
-            <div class="drawer-detail-main">
-                <div class="drawer-detail-header">
-                    <div class="drawer-detail-header-body">
-                        <div class="drawer-detail-header-left">在线客服</div>
-                        <div class="drawer-detail-header-left">
-                            <el-button type="default" icon="el-icon-close" round @click="hideWindow"></el-button>
-                        </div>
-                    </div>
-                </div>
-            </div>
-            <el-main class="nopadding">
-                <el-container>
-                    <el-aside width="300px" v-loading="loadMsg">
-                        <el-container class="flex-column">
-                            <!-- <div class="aside-tabs bg">
-                                <div :class="orderData.tab=='user'?'aside-tab-items active':'aside-tab-items'" @click="handleClick('user')">当前咨询</div>
-                                <div :class="orderData.tab=='order'?'aside-tab-items active':'aside-tab-items'" @click="handleClick('order')">历史咨询</div>
-                            </div> -->
-                            <el-main class="nopadding">
-                                <div class="chat-contact">
-                                    <div :class="checkChat==index?'contact-item active':'contact-item'" v-for="(item,index) in chatContact" :key="index" @click="checkChatItem(index)">
-                                            <div class="img">
-                                                <el-image :src="item.user.avatar" fit="contain" style="width: 40px; height: 40px"></el-image>
-                                                <span class="last-num" v-if="item.last.num > 0">{{item.last.num}}</span>
-                                            </div>
-                                            <div class="kefu-store">
-                                            <div class="name">{{item.user.nickname}}</div>
-                                            <div class="desc" v-if="item.last.type=='text'">{{item.last.content}}</div>
-                                            <div class="desc" v-if="item.last.type=='order'">[订单消息]</div>
-                                            <div class="desc" v-if="item.last.type=='image'">[图片消息]</div>
-                                            <div class="desc" v-if="item.last.type=='video'">[视频消息]</div>
-                                            <div class="desc" v-if="item.last.type=='pay'">[支付消息]</div>
-                                            <div class="desc" v-if="item.last.type=='address'">[收集地址]</div>
-                                        </div>
-                                        <div class="time">
-                                            {{item.last.create_at}}
-                                        </div>
-                                    </div>
-                                </div>
-                            </el-main>
-                        </el-container>
-                    </el-aside>
-                    <el-container v-if="chatItem">
-                        <el-header><div class="msg-title">与{{ chatItem.user.nickname }}的对话</div></el-header>
-                        <el-main class="nopadding" ref="main">
-                            <div class="chat-container" v-if="chatItem">
-                                <div class="loading-text" v-if="msgLoad">努力加载中...</div>
-                                <div class="message-list" ref="messageListRef" @scroll="handleScroll">
-                                    <template v-for="(item, index) in history.messages">
-                                    <div class="z_index2" style="transform: rotate(-180deg)" :key="item.messageId" v-if="!item.isHide">
-                                        <div class="icon_ text_26 color__ time">
-                                            {{ renderMessageDate(item, index) }}
-                                        </div>
-                                        <div :key="item.messageIds" v-if="!item.recalled">
-                                            <item :isMy="isSelf(item.senderId)" :myid="myid" :item="item" @onClick="onItem"
-                                                @onLongpress="onLongpress" @mention="mention"></item>
-                                        </div>
-                                        <div class="icon_ text_26 recalled" v-else>
-                                            <div class="">
-                                                <span v-if="isSelf(item.senderId)">你</span>
-                                                <span v-else>{{ item.senderData.name }}</span>
-                                                撤回了一条消息
-                                            </div>
-                                            <div class="recalled-edit" v-if="item.type === 'text' && isSelf(item.senderId)"
-                                                @click="recalledEdit(item)">重新编辑</div>
-                                        </div>
-                                    </div>
-                                    </template>
-                                </div>
-                                <div class="input-area">
-                                    <div class="quick-group">
-                                        <div class="emoji-item">
-                                            <el-popover placement="top" :width="400" trigger="click">
-                                                <template #reference>
-                                                    <div class="item-btn">
-                                                        <el-image style="width:25px;height:25px;" src="https://jymini.oss-cn-guangzhou.aliyuncs.com/pc/face.svg"></el-image>
-                                                        <div class="name">表情</div>
-                                                    </div>
-                                                </template>
-                                                <div class="swiper-item-box">
-                                                    <div class="flex_r swiper-item-box-l" v-for="(im, ix) in emojiList" :key="ix">
-                                                        <div
-                                                            class="icon_ emoji-item"
-                                                            v-for="(item, index) in im"
-                                                            :key="index"
-                                                            :style="{ opacity: ix === opacityGroup && (index == 5 || index == 6 || index == 7) ? opacity : 1 }"
-                                                        >
-                                                            <el-image class="img" :src="emojiUrl + item.image" @click="chooseEmoji(item.text)"></el-image>
-                                                        </div>
-                                                    </div>
-                                                </div>
-                                            </el-popover>
-                                        </div>
-                                        <div class="emoji-item">
-                                            <el-popover placement="top" :width="174">
-                                                <template #reference>
-                                                    <div class="item-btn">
-                                                        <el-image style="width:25px;height:25px;" src="https://jymini.oss-cn-guangzhou.aliyuncs.com/pc/more.svg"></el-image>
-                                                        <div class="name">图片</div>
-                                                    </div>
-                                                </template>
-                                                <sc-upload v-model="uploadImg" :on-success="uploadSuccess"></sc-upload>
-                                            </el-popover>
-                                        </div>
-                                        <div class="emoji-item" @click="showQuick">
-                                            <el-popover placement="top" :width="400" trigger="click" @show="getQuick">
-                                                <template #reference>
-                                                    <div class="item-btn">
-                                                        <el-image style="width:25px;height:25px;" src="https://jymini.oss-cn-guangzhou.aliyuncs.com/pc/quick.svg"></el-image>
-                                                        <div class="name">快捷回复</div>
-                                                    </div>
-                                                </template>
-                                                <div class="quick-table">
-                                                    <div class="quick-search">
-                                                        <div class="search-input">
-                                                            <el-input placeholder="搜索一下..." style="width: 100%;" />
-                                                            <el-button>搜索</el-button>
-                                                        </div>
-                                                        <div class="search-btn-txt"><el-button type="primary" @click="addQuick">添加</el-button></div>
-                                                    </div>
-                                                    <div class="quick-table-body">
-                                                        <el-table :data="quickData.list" style="width: 100%" height="300" border>
-                                                            <el-table-column prop="content" label="内容"></el-table-column>
-                                                            <el-table-column prop="content" label="操作" width="80">
-                                                                <template #default="scope">
-                                                                    <el-button size="small" @click="sendQuick(scope.row.content)">发送</el-button>
-                                                                </template>
-                                                            </el-table-column>
-                                                        </el-table>
-                                                    </div>
-                                                    <div class="quick-page">
-                                                        <el-pagination
-                                                            small
-                                                            background
-                                                            layout="prev, pager, next"
-                                                            :total="quickData.total"
-                                                            @size-change="quickPageChange" @current-change="quickPageChange"
-                                                        />
-                                                    </div>
-                                                </div>
-                                            </el-popover>
-                                        </div>
-                                    </div>
-                                    <el-input
-                                        type="textarea"
-                                        :rows="3"
-                                        v-model="inputMessage"
-                                        placeholder="请输入消息..."
-                                        @keyup.enter.native="handleKeyCode"
-                                        @keydown.native="handleKeyCode"
-                                    ></el-input>
-                                    <div class="send-btn-group">
-                                        <div class="send-btn-right">
-                                            <el-button type="primary" @click="sendMessage">发送</el-button>
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
-                        </el-main>
-                    </el-container>
-                    <el-container v-else>
-                        <div class="empty-data">
-                            请选择左侧的聊天列表
-                        </div>
-                    </el-container>
-                    <el-aside width="400px" v-if="chatItem">
-                        <el-container class="flex-column">
-                            <div class="aside-tabs">
-                                <div :class="orderData.tab=='user'?'aside-tab-items active':'aside-tab-items'" @click="handleClick('user')">用户信息</div>
-                                <div :class="orderData.tab=='order'?'aside-tab-items active':'aside-tab-items'" @click="handleClick('order')">团购订单</div>
-                                <div :class="orderData.tab=='price'?'aside-tab-items active':'aside-tab-items'" @click="handleClick('price')">差价订单</div>
-                            </div>
-                            <el-main class="nopadding">
-                                <template v-if="orderData.tab == 'user'">
-                                    <div class="order-info-user">
-                                        <div class="info-item">
-                                            <div class="name">昵称</div>
-                                            <div class="right">{{ chatItem.user.nickname }} </div>
-                                        </div>
-                                        <div class="info-item">
-                                            <div class="name">OpenId</div>
-                                            <div class="right">{{ chatItem.user.openid }} </div>
-                                        </div>
-                                        <div class="info-item">
-                                            <div class="name">手机号码</div>
-                                            <div class="right">{{ chatItem.user.mobile }} </div>
-                                        </div>
-                                        <div class="info-item">
-                                            <div class="name">注册时间</div>
-                                            <div class="right">{{ chatItem.user.create_at }} </div>
-                                        </div>
-                                    </div>
-                                    <div class="order-info-user" v-if="msgOrder">
-                                        <div class="title">咨询订单</div>
-                                        <div class="m-order-s" style="margin-top: 15px;">
-                                            <div class="m-order-item">
-                                                <div class="order-img"><el-image style="width: 80px;height: 80px;" :src="msgOrder.img" fit="fit"></el-image></div>
-                                                <div class="order-info">
-                                                    <div class="title" style="padding: 0;">{{msgOrder.product.product_name}}</div>
-                                                    <div class="desc" v-if="msgOrder.sku_name">规格:{{msgOrder.sku_name}}</div>
-                                                    <div class="desc">{{msgOrder.order_sn}}</div>
-                                                    <div class="price">
-                                                        {{$TOOL.money(msgOrder.price)}}
-                                                        <text v-if="msgOrder.custom_price > 0">差价:{{$TOOL.money(msgOrder.custom_price)}}</text>
-                                                    </div>
-                                                </div>
-                                                <div class="order-status-btn">
-                                                    <div class="status info" v-if="msgOrder.status=='0'">未支付</div>
-                                                    <div class="status primary" v-if="msgOrder.status=='1'">待使用</div>
-                                                    <div class="status success" v-if="msgOrder.status=='2'">已完成</div>
-                                                    <div class="status danger" v-if="msgOrder.status=='3'">已退款</div>
-                                                    <div class="status warn" v-if="msgOrder.status=='4'">退款中</div>
-                                                    <div class="status warn" v-if="msgOrder.status=='5'">已关闭</div>
-                                                    <div class="status success" v-if="msgOrder.product.product_type==11 && msgOrder.custom_price > 0 && msgOrder.custom_status ==1">差价已付</div>
-                                                    <div class="status danger" v-if="msgOrder.product.product_type==11 && msgOrder.custom_price > 0 && msgOrder.custom_status ==0">差价未付</div>
-                                                </div>
-                                            </div>
-                                            <div class="order-btn-group">
-                                                <div class="status info cus" @click="viewOrder(msgOrder)">查看详情</div>
-                                                <div class="status primary cus" @click="sendAddress(msgOrder)">收集地址</div>
-                                                <!-- <div class="status warn cus" v-if="msgOrder.product.product_type==11 && msgOrder.custom_price > 0 && msgOrder.custom_status ==0" @click="submitPrice(msgOrder)">补差价</div> -->
-                                                <!-- <div class="status danger cus" v-if="msgOrder.product.product_type==11 && msgOrder.custom_price > 0 && msgOrder.custom_status ==0" @click="submitPrice(msgOrder)">改差价</div> -->
-                                                <div class="status danger cus" @click="sendOrder(msgOrder)">发送订单</div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                </template>
-                                <template v-if="orderData.tab == 'price'">
-                                    <el-container>
-                                        <el-header>
-                                            <div class="order-search-input">
-                                                <el-input v-model="priceData.order" placeholder="搜索订单编号..." style="width: 100%;" />
-                                                <el-button @click="searchPrice">搜索</el-button>
-                                            </div>
-                                        </el-header>
-                                        <el-main>
-                                        </el-main>
-                                        <el-footer style="text-align: right;">
-                                            <div class="order-page">
-                                                <el-pagination small background :default-page-size="priceData.size" layout="prev, pager, next" @size-change="orderPageChange" @current-change="orderPageChange" :total="priceData.total" />
-                                            </div>
-                                        </el-footer>
-                                    </el-container>
-                                </template>
-                                <template v-if="orderData.tab == 'order'">
-                                    <el-container v-loading="orderData.loading">
-                                        <el-header>
-                                            <div class="order-search-input">
-                                                <el-input v-model="orderData.order" placeholder="搜索订单编号..." style="width: 100%;" />
-                                                <el-button @click="searchOrder">搜索</el-button>
-                                            </div>
-                                        </el-header>
-                                        <el-main>
-                                            <div class="order-list-chat" v-if="orderData.list.length > 0">
-                                                <div class="m-order-s" v-for="(item,index) in orderData.list" :key="index">
-                                                    <div class="m-order-item">
-                                                        <div class="order-img"><el-image style="width: 80px;height: 80px;" :src="item.img" fit="fit"></el-image></div>
-                                                        <div class="order-info">
-                                                            <div class="title">{{item.product.product_name}}</div>
-                                                            <div class="desc" v-if="item.sku_name">规格:{{item.sku_name}}</div>
-                                                            <div class="desc">{{item.order_sn}}</div>
-                                                            <div class="price">
-                                                                {{$TOOL.money(item.price)}}
-                                                                <text v-if="item.custom_price > 0">差价:{{$TOOL.money(item.custom_price)}}</text>
-                                                            </div>
-                                                        </div>
-                                                        <div class="order-status-btn">
-                                                            <div class="status info" v-if="item.status=='0'">未支付</div>
-                                                            <div class="status primary" v-if="item.status=='1'">待使用</div>
-                                                            <div class="status success" v-if="item.status=='2'">已完成</div>
-                                                            <div class="status danger" v-if="item.status=='3'">已退款</div>
-                                                            <div class="status warn" v-if="item.status=='4'">退款中</div>
-                                                            <div class="status warn" v-if="item.status=='5'">已关闭</div>
-                                                            <div class="status success" v-if="item.product.product_type==11 && item.custom_price > 0 && item.custom_status ==1">差价已付</div>
-                                                            <div class="status danger" v-if="item.product.product_type==11 && item.custom_price > 0 && item.custom_status ==0">差价未付</div>
-                                                        </div>
-                                                    </div>
-                                                    <div class="order-btn-group">
-                                                        <div class="status info cus" @click="viewOrder(item)">查看详情</div>
-                                                        <div class="status primary cus" @click="sendAddress(item)">收集地址</div>
-                                                        <!-- <div class="status warn cus" v-if="item.product.product_type==11 && item.custom_price > 0 && item.custom_status ==0" @click="submitPrice(item)">补差价</div>
-                                                        <div class="status danger cus" v-if="item.product.product_type==11 && item.custom_price > 0 && item.custom_status ==0" @click="submitPrice(item)">改差价</div> -->
-                                                        <div class="status danger cus" @click="sendOrder(item)">发送订单</div>
-                                                    </div>
-                                                </div>
-                                            </div>
-                                            <div class="order-list-chat" v-else>
-                                                <el-empty description="没有订单" />
-                                            </div>
-                                        </el-main>
-                                        <el-footer style="text-align: right;">
-                                            <div class="order-page">
-                                                <el-pagination small background :default-page-size="orderData.size" layout="prev, pager, next" @size-change="orderPageChange" @current-change="orderPageChange" :total="orderData.total" />
-                                            </div>
-                                        </el-footer>
-                                    </el-container>
-                                </template>
-                            </el-main>
-                        </el-container>
-                    </el-aside>
-                </el-container>
-            </el-main>
-        </el-container>
-    </el-drawer>
-    <orderDetail ref="orderDetail" @success="orderSuccess"></orderDetail>
-    <quickTxt ref="quickTxt" @success="orderSuccess"></quickTxt>
-</template>
-
-<script>
-import {
-	mapState
-} from 'vuex';
-import { Push } from "@/utils/push";
-import { emojiMap } from "@/utils/emoji";
-import item from '@/components/chat/index';
-var pushObj = null;
-let height2 = null;
-const emojiUrl = 'https://imgcache.qq.com/open/qcloud/tim/assets/emoji/';
-import {
-	formatDate,
-	to as tofn
-} from '@/util/index.js';
-import orderDetail from '@/components/imFloat/order';
-import quickTxt from '@/components/imFloat/quickTxt';
-let imageList = [];
-export default {
-    name: 'GlobalIM',
-    components:{
-        item,
-        orderDetail,
-        quickTxt
-    },
-    props: {
-        user: { type: Object, default: () => {} }
-    },
-    data() {
-        return {
-            activeName:"user",
-            rules:{
-                name: [
-                    {required: true, message: '请输入'}
-                ],
-                price: [
-                    {required: true, message: '请输入'}
-                ],
-            },
-            priceForm:{
-                name:"补差价"
-            },
-            uploadImg:"",
-            loadMsg:false,
-            history: {
-				messages: [],
-				allLoaded: false
-			},
-            msgLoad:false,
-            emojiUrl,
-            loading:false,
-            visible: false,           // 聊天窗口可见性
-            unreadCount: 0,          // 未读消息数量
-            inputMessage: '',        // 输入的消息
-            timer: null,             // 定时器
-            messages: [],
-            wsAuth:"https://tran.jsshuita.cn/plugin/webman/push/auth",
-            wsUrl: 'wss://tran.jsshuita.cn/ws',
-            // wsAuth:"http://127.0.0.1:9981/plugin/webman/push/auth",
-            // wsUrl: 'ws://127.0.0.1:3131',
-            page:1,
-            size:10,
-            msgPage:1,
-            msgSize:20,
-            orderSize:10,
-            chatContact:[],
-            checkChat:null,
-            chatItem:null,
-            emojiList:[],
-			sendId:null,
-			myid: this.user.userId,
-            userId:null,
-            isSaveing:false,
-            quickData:{
-                page:1,
-                size:10,
-                list:[],
-                popState:false,
-                total:0
-            },
-            msgOrder:null, // 咨询订单
-            orderData:{
-                page:1,
-                size:10,
-                list:[],
-                loading:false,
-                total:0,
-                tab:"user",
-                order:""
-            },
-            priceData:{
-                page:1,
-                size:10,
-                list:[],
-                loading:false,
-                total:0,
-                order:""
-            }
-        }
-    },
-    watch: {
-        chatItem(val){
-            if (val) {
-                this.$nextTick(() => {
-                    this.$refs.messageListRef?.addEventListener('scroll', this.handleScroll)
-                })
-            }
-        }
-    },
-	computed: mapState({
-		//显示时间
-		renderMessageDate() {
-			return (message, index) => {
-				if (message.timestamp - this.history.messages[index + 1]?.timestamp > 3 * 60 * 1000) {
-					return formatDate(message.timestamp, 'timestamp');
-				}
-				return '';
-			};
-		},
-		// 是否本人isMy
-		isSelf() {
-			return (senderId) => {
-				const {
-					member_id = this.myid
-				} = {"member_id":this.myid};
-				return senderId === `${member_id}`;
-			};
-		}
-	}),
-    mounted() {
-        // console.log("pushObj")
-        this.initEmoji()
-        this.initPush();
-        // this.simulateNewMessage()
-    },
-    beforeDestroy() {
-        // if (this.timer) {
-        //     clearInterval(this.timer)
-        // }
-        this.$refs.messageListRef.removeEventListener('scroll', this.handleScroll)
-    },
-    methods: {
-        handleClick(event){
-            this.orderData.tab = event;
-            switch (event) {
-                case "user":
-                    break;
-                case "order":
-                    this.orderData.page = 1;
-                    this.orderData.list = [];
-                    this.getOrderList();
-                    break;
-                case "price":
-                    this.priceData.page = 1;
-                    this.priceData.list = [];
-                    this.getOrderPrice();
-                    break;
-            }
-        },
-        searchOrder(){
-            this.orderData.page = 1;
-            this.orderData.list = [];
-            this.getOrderList();
-        },
-        searchPrice(){
-            this.priceData.page = 1;
-            this.priceData.list = [];
-            this.getOrderPrice();
-        },
-        getOrderPrice(){
-
-        },
-        viewOrder(data){
-            data.order = data.out_order_no;
-            this.$refs.orderDetail.open("add").setData(data)
-        },
-        quickPageChange(e){
-            this.quickData.page = e;
-            this.getQuick()
-        },
-        async getQuick(){
-            var resp = await this.$API.merQuick.list.get({"page":this.quickData.page,"pageSize":this.quickData.size});
-            if (resp.code == 0) {
-                return this.$message.error(resp.msg)
-            }
-            this.quickData.total = resp.data.total;
-            this.quickData.list = resp.data.rows;
-        },
-        addQuick(){
-            this.$nextTick(() => {
-                this.$refs.quickTxt.open("add")
-            })
-        },
-        sendQuick(text){
-            this.inputMessage = text;
-            this.sendMessage()
-        },
-        orderSuccess(type,data){
-            switch(type) {
-                case "address":
-                    this.sendAddress(data)
-                    break;
-            }
-        },
-        async submitPrice(data){
-            var { priceForm,$message } = this;
-            if (data.custom_status == 1) return $message.error("该订单差价已完成支付")
-            // var validate = await this.$refs.priceForm.validate().catch(()=>{});
-            // if(!validate){ return false }
-            this.isSaveing = true;
-            priceForm.name = "订单差额补款";
-            priceForm.price = parseInt(data.custom_price) / 100;
-            priceForm.type = "pay";
-            priceForm.groupId = this.chatItem.poi_id
-            priceForm.openid = this.chatItem.openid
-            var resp = await this.$API.chat.price.post(priceForm);
-            this.isSaveing = false;
-            if (resp.code == 0) {
-                return $message.error(resp.msg)
-            }
-            this.sendMessageData({
-                payload: {
-                    pay: resp.data,
-                },
-                type: 'pay'
-            });
-            this.uploadImg = "";
-        },
-        orderPageChange(e){
-            this.orderData.page = e;
-            this.getOrderList()
-        },
-        hideWindow(){
-            this.chatItem = null;
-            this.msgPage = 1;
-            this.unreadCount = 0;
-            this.checkChat = null;
-            this.visible = false;
-        },
-        handleScroll(e){
-            const { scrollTop, clientHeight, scrollHeight } = e.target
-            const isBottom = scrollTop + clientHeight >= scrollHeight - 5   // 5px 缓冲区
-            const isTop = scrollTop <= 5
-            // console.log("滚动",this.history.allLoaded)
-            if (isBottom && !this.history.allLoaded) {
-                console.log('到达底部')
-                // 加载更多等操作
-                this.getMsgMore()
-            }
-            if (isTop && this.history.allLoaded) {
-                // console.log('到达顶部')
-            }
-        },
-        playAudio(){
-            const audio = new Audio('/img/msn.mp3');
-            audio.play().catch(error => {
-                console.error("播放音频时出错:", error);
-            });
-        },
-        onLongpress(){},
-        onItem(data){
-            switch(data.type)
-            {
-                case "order":
-                    this.$nextTick(() => {
-                        this.$refs.orderDetail.open("add").setData(data.payload.order)
-                    })
-                    break;
-                case "address":
-                    this.$nextTick(() => {
-                        this.$refs.orderDetail.open("add").setData(data.payload.address)
-                    })
-                    break;
-            }
-        },
-        chooseEmoji(data){
-            this.inputMessage += data;
-        },
-        initEmoji() {
-			let newList = [];
-			let i = 1;
-			for (let key in emojiMap) {
-				let obj = {};
-				obj['index'] = i;
-				obj['text'] = key;
-				obj['image'] = emojiMap[key];
-				i++;
-				newList.push(obj);
-			}
-			var list = [];
-			let A = newList.filter((item, index) => {
-				return (index + 1) % 8 === 0;
-			});
-			A.unshift({ index: 0 });
-			A.push({ index: newList.length });
-			this.emojiList = A.map((item, index) => {
-				return newList.slice(A[index].index, A[index + 1]?.index || newList.length);
-			});
-			// this.scroll({ detail: { scrollTop: 10 } });
-		},
-        /**
-         * 发送订单消息
-         * @param data 
-         */
-        async sendOrder(data){
-            var orderData = {"img":data.img,"name":data.product.product_name,"goods_id":data.life_goods_id,"order":data.out_order_no,"price":this.$TOOL.disMoney(data.pay_money),"status":data.status};
-            var resp = await this.sendMessageApi("order",orderData);
-            if (!resp) {
-                return ;
-            }
-            this.sendMessageData({
-                payload: {
-                    order: orderData
-                },
-                type: 'order'
-            });
-        },
-        /**
-         * 收集地址消息
-         * @param data 
-         */
-        async sendAddress(data){
-            var orderData = {"img":data.img,"name":"完善会员信息","order":data.out_order_no,"status":0};
-            var resp = await this.sendMessageApi("address",orderData);
-            if (!resp) {
-                return ;
-            }
-            this.sendMessageData({
-                payload: {
-                    address: orderData
-                },
-                type: 'address'
-            });
-        },
-        async sendMessage(){
-            if (!this.inputMessage) return ;
-            var resp = await this.sendMessageApi("text",this.inputMessage);
-            if (!resp) {
-                this.inputMessage = "";
-                return ;
-            }
-            this.sendMessageData({
-                payload: {
-                    text: this.inputMessage
-                },
-                type: 'text'
-            });
-            this.inputMessage = ""
-        },
-        sendMessageData({payload,type}){
-			const message = {
-				groupId: this.chatItem.poi_id,
-				senderData: {
-                    avatar:this.chatItem.avatar
-                },
-				senderId: this.myid,
-				messageId: Date.now(),
-				payload: payload,
-				timestamp: Date.now(),
-				type: type,
-				recalled: false,
-				status: 'success',
-				isHide: 0
-			};
-			this.pushList(message);
-        },
-        handleKeyCode(event){
-            if (event.keyCode == 13) {
-                if (!event.ctrlKey) {
-                    this.sendMessage()
-                    event.preventDefault();
-                } else {
-                    this.inputMessage += "\n";
-                }
-            } else {
-                return ;
-            }
-        },
-        checkChatItem(index){
-            this.checkChat = index;
-            this.chatItem = this.chatContact[index]
-            this.chatContact[index].last.num = 0;
-            this.msgPage = 1;
-            this.history.messages = []
-            this.history.allLoaded = false
-            this.orderData.list = [];
-            this.orderData.page = 1;
-            this.orderData.tab = "user";
-            this.getMsgData();
-            this.getMsgOrder();
-            this.getOrderList();
-        },
-        async getMsgOrder(){
-            var resp = await this.$API.chat.msgOrder.get({"msgId":this.chatItem.id})
-            if (resp.code == 0) return ;
-            this.msgOrder = resp.data.order;
-        },
-        initPush(){
-            var _this = this;
-            if (!this.pushObj) {
-                this.pushObj = new Push({
-                    "url":this.wsUrl,
-                    "app_key":"265c33b73d5c04f918978577df2c48d2",
-                    "auth":this.wsAuth
-                });
-            }
-            var user_channel = this.pushObj.subscribe('service-' + this.myid);
-            user_channel.on('message', function (data) {
-                _this.playAudio()
-                _this.unreadCount ++;
-                _this.sortItemData(data.item)
-                if (_this.chatItem && _this.chatItem.openid == data.openid) { // 当前窗口实时推送
-                    _this.formatMsg(data);
-                }
-                // 给消息标红并更新最后一条消息
-                var msgData = _this.chatContact;
-                for (var i=0; i <= msgData.length;i ++) {
-                    var item = msgData[i];
-                    if (item && item.openid == data.openid) {
-                        item.last.type = data.type;
-                        item.last.content = data.content;
-                        item.last.create_at = data.create_at
-                        item.last.last_at = data.last_at
-                        // item.last.num ++;
-                    }
-                }
-            })
-        },
-        truncateByBytes(str, maxBytes) {
-            let count = 0;
-            let result = '';
-            for (const char of str) {
-                // 中文、全角符号算 2 字节,其他算 1 字节
-                const byteLen = char.match(/[^\x00-\xff]/) ? 2 : 1;
-                if (count + byteLen > maxBytes) break;
-                result += char;
-                count += byteLen;
-            }
-            return result + (count < str.length ? '...' : '');
-        },
-        sortItemData(data){
-            const existIdx = this.chatContact.findIndex(item => item.id === data.id);
-            if (existIdx !== -1) { // 若已存在,按更新处理
-                this.handleNewMessage(data);
-                return;
-            }
-            // 新增数据到最顶部
-            this.chatContact.unshift(data);
-        },
-        handleNewMessage(updateData) {
-            const idx = this.chatContact.findIndex(item => item.id === updateData.id);
-            this.chatContact.splice(idx, 1, updateData);
-            this.sortSessions();
-        },
-        sortSessions() {
-            this.chatContact.sort((a, b) => {
-                const timeA = a.last_at && a.last_at !== '-' ? new Date(a.last_at).getTime() : 0;
-                const timeB = b.last_at && b.last_at !== '-' ? new Date(b.last_at).getTime() : 0;
-                return timeB - timeA;
-            });
-        },
-        sortBooks() {
-            this.chatContact.sort((a, b) => b.last_at - a.last_at)
-        },
-        formatMsg(item){
-			var payload = {};
-			if (item.type == 'text') {
-				payload.text = item.content
-			}
-			if (item.type == 'order') {
-				var order = JSON.parse(item.content)
-				payload.order = order
-			}
-			if (item.type == 'pay') {
-				var order = JSON.parse(item.content)
-				payload.pay = order
-			}
-			if (item.type == 'address') {
-				var order = JSON.parse(item.content)
-				payload.address = order
-			}
-			if (item.type == 'image') {
-				payload = {
-					contentType: 'image/png',
-					name: 'uni-image.png',
-					size: 82942,
-					url: item.content,
-					width: 2732,
-					height: 2732,
-					thumbnail: item.content
-				};
-			}
-			const message = {
-				groupId: item.poi_id,
-				senderData: {
-					avatar:item.source==2?item.avatar:item.user.avatar,
-					name:item.source==2?item.nick.truename:item.user.nickname
-				},
-				senderId: (item.source==1?item.openid:item.service_id),
-				messageId: item.msgId,
-				payload: payload,
-				timestamp: item.time,
-				type: item.type,
-				recalled: false,
-				status: 'success',
-				isHide: 0
-			};
-			this.pushList(message);
-		},
-        async pushList(message) {
-			this.initMessageItem(message);
-			this.history.messages.unshift(message);
-			// 是否触发文字动效果
-			if (message.type === 'text' || message.type === 'text_quote') {
-				this.onSetText(message.payload.text);
-			}
-			// 缓存照片地址,
-			if (message.type === 'image' || message.type === 'image_transmit') {
-				imageList.push(message.payload.url);
-			}
-		},
-		// 组装item
-		initMessageItem(message, index) {
-			message['isHide'] = 0;
-			if (index === 0 && (message.type === 'text' || message.type === 'text_quote')) {
-				this.onSetText(message.payload.text);
-			}
-		},
-		// 文本触发效果相关========
-		onSetText(text) {},
-        // 切换聊天窗口
-        async toggleChat() {
-            this.visible = !this.visible
-            if (this.visible) {
-                // 打开窗口时清除未读角标
-                this.unreadCount = 0
-            }
-            if (this.chatContact.length == 0) {
-                this.loadMsg = true;
-                var resp = await this.$API.chat.list.get({page:this.page,pageSize:this.size})
-                this.loadMsg = false;
-                if (resp.code == 0) {
-                    return this.$message.error(resp.msg)
-                }
-                this.chatContact = this.chatContact.concat(resp.data.rows)
-            }
-            // this.chatItem = this.chatContact[0]
-            // this.userId = this.chatItem.openid;
-            // this.getMsgData();
-        },
-        /**
-         * 加载更多
-         */
-        async getMsgMore(){
-            this.history.allLoaded = true;
-            this.msgLoad = true;
-            var resp = await this.$API.chat.msg.get({"page":this.msgPage,"size":this.msgSize,"openid":this.chatItem.openid})
-            this.msgLoad = false;
-            if (resp.data.rows.length > 0) {
-                this.msgPage ++;
-                var msgData = []
-				var list = resp.data.rows
-                // 同步混入数据
-                list.forEach((item, ix) => {
-                    var payload = {};
-                    if (item.type == 'text') {
-                        payload.text = item.content
-                    }
-                    if (item.type == 'order') {
-                        var order = JSON.parse(item.content)
-                        payload.order = order
-                    }
-                    if (item.type == 'pay') {
-                        var order = JSON.parse(item.content)
-                        payload.pay = order
-                    }
-                    if (item.type == 'address') {
-                        var order = JSON.parse(item.content)
-                        payload.address = order
-                    }
-                    if (item.type == 'image') {
-                        payload = {
-                            contentType: 'image/png',
-                            name: 'uni-image.png',
-                            size: 82942,
-                            url: item.content,
-                            width: 2732,
-                            height: 2732,
-                            thumbnail: item.content
-                        };
-                    }
-                    const message = {
-                        groupId: item.poi_id,
-                        senderData: {
-                            avatar:item.avatar
-                        },
-                        senderId: (item.source==1?item.openid:item.service_id),
-                        messageId: item.msgId,
-                        payload: payload,
-                        timestamp: item.time,
-                        type: item.type,
-                        recalled: false,
-                        status: 'success',
-                        isHide: 0
-                    };
-                    msgData[ix] = message
-                });
-                this.history.messages = [...this.history.messages, ...msgData];
-                this.history.allLoaded = false;
-            } else {
-                this.history.allLoaded = true;
-            }
-        },
-        /**
-         * 首次加载
-         */
-        async getMsgData(){
-            var resp = await this.$API.chat.msg.get({"page":this.msgPage,"size":this.msgSize,"openid":this.chatItem.openid})
-            if (resp.data.rows.length > 0) {
-                var msgData = resp.data.rows
-                msgData.forEach((item,index)=>{
-                    this.formatMsg(item);
-                })
-                this.msgPage ++;
-            }
-        },
-        async uploadSuccess(data){
-            var resp = await this.sendMessageApi("image",data.data.src);
-            if (!resp) {
-                return ;
-            }
-            this.sendMessageData({
-                payload: {
-                    contentType: 'image/png',
-                    name: data.data.fileName,
-                    size: 0,
-                    url: data.data.src,
-                    width: 2732,
-                    height: 2732,
-                    thumbnail: data.data.src
-                },
-                type: 'image'
-            });
-            this.uploadImg = "";
-        },
-        async sendMessageApi(type,content){
-            this.chatContact[this.checkChat].last.num = 0;
-            var resp = await this.$API.chat.send.post({type:type,content: content,groupId: this.chatItem.poi_id,openid:this.chatItem.openid})
-            if (resp.code == 0) return false;
-            this.chatContact[this.checkChat].last.type = type;
-            this.chatContact[this.checkChat].last.content = (type=='text'?this.truncateByBytes(content,18):content);
-            this.chatContact[this.checkChat].last.create_at = resp.data.time;
-            return true;
-        },
-        async getOrderList(){
-            this.orderData.loading = true;
-            var resp = await this.$API.order.list.get({"page":this.orderData.page,"pageSize":this.orderData.size,"order":this.orderData.order,"openid":this.chatItem.openid});
-            this.orderData.loading = false;
-            if (resp.code == 0) {
-                return ;
-            }
-            this.orderData.list = resp.data.rows;
-            this.orderData.total = resp.data.total;
-        }
-    }
-}
-</script>
-
-<style scoped lang="scss">
-@import '@/style/index.scss';
-
-.order-info-user{background-color: #fff;padding: 10px;margin-top: 10px;}
-.order-info-user .title{font-size: 16px;color: #333;font-weight: bold;padding-bottom: 10px;border-bottom: 1px solid #f8f8f8;}
-.order-info-user .info-item{height: 40px;line-height: 40px;font-size: 12px;display: flex;align-items: center;border-bottom: 1px solid #f8f8f8;}
-.order-info-user .info-item .right{color: #666;margin-left: auto;margin-right: 0;}
-.order-info-user .info-item .right text{border: 1px solid #ccc;color: #333;font-size: 12px;padding: 0 15upx;margin-left: 10px;border-radius: 5px;}
-
-.aside-tabs{display: flex;height: 65px;align-items: center;gap: 10px;border-bottom: 1px solid var(--el-border-color-light);padding: 13px 15px;}
-.aside-tabs .aside-tab-items{font-size: 14px;cursor: pointer;padding: 0 20px;}
-.aside-tabs .aside-tab-items.active{color: var(--el-color-primary);}
-.quick-search{display: flex;align-items: center;justify-content: space-between;gap: 10px;}
-.quick-search .search-input{flex: 1;display: flex;align-items: center;gap: 5px;}
-.quick-search .search-btn-txt{font-size: 14px;color: #409eff;cursor: pointer;}
-.quick-table .quick-table-body{margin: 10px 0;}
-.border-none{border: 0;}
-.msg-title{font-size: 18px;font-weight: bold;}
-.loading-text{background-color: #f8f8f8;text-align: center;font-size: 12px;}
-.order-list-chat{height: 100%;flex-direction: column;flex: 1;display: flex;}
-.m-order-s{background-color: #fff;border-radius: 5px;margin-bottom: 10px;border: 1px solid #f8f8f8;}
-.m-order-s .m-order-item{display: flex;font-size: 14px;position: relative;background-color: #f8f8f8;}
-.m-order-s .order-btn-group{display: flex;align-items: center;padding: 10px;gap: 10px;}
-.order-search-input{display: flex;align-items: center;gap: 10px;flex: 1;}
-.m-order-s .order-img{display: flex;}
-.m-order-s .order-img image{width: 80px;height: 80px;}
-.m-order-s .order-info {padding: 5px 10px 10px;flex: 1;}
-.m-order-s .order-info .title{font-size: 14px;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;}
-.m-order-s .order-info .desc{font-size: 12px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;color: #999;}
-.m-order-s .order-info .price{font-size: 14px;color: #f00;}
-.m-order-s .order-status-btn{position: absolute;right: 0;bottom: 0;display: flex;align-items: center;gap: 5px;}
-.m-order-s .status{border-radius: 5px 0 5px 0;background-color: #909399;font-size: 12px;color: #fff;padding: 5px;}
-.m-order-s .status.cus{cursor: pointer;}
-.m-order-s .status.info{background-color: #909399;}
-.m-order-s .status.primary{background-color: #409eff;}
-.m-order-s .status.success{background-color: #67c23a;}
-.m-order-s .status.danger{background-color: #f56c6c;}
-.m-order-s .status.warn{background-color: #e6a23c;}
-
-.hideStr{overflow: hidden;width: 80%;}
-.contact-item{display: flex;align-items: center;background-color: #fff;padding: 10px;border-bottom: 1px solid #f8f8f8;cursor: pointer;}
-.contact-item.active{background-color: #f8f8f8;}
-.contact-item .img{position: relative;border: 1px solid #f8f8f8;border-radius: 5px;display: flex;align-items: center;justify-content: center;}
-.contact-item span.last-num{background-color: #f00;color: #fff;width: 20px;height: 20px;display: flex;align-items: center;justify-content: center;border-radius: 20px;font-size: 12px;margin-left: 10px;position: absolute;right: 0;top: 0;}
-
-.contact-item .kefu-store{margin-left: 10px;}
-.contact-item .kefu-store .name{font-size: 14px;color: #333;display: flex;align-items: center;}
-
-
-.contact-item .kefu-store .desc{font-size: 12px;color: #666;margin-top: 5px;}
-.contact-item .time{margin-left: auto;margin-right: 0;font-size: 12px;color: #666;}
-.send-btn-group{margin-top: 10px;display: flex;align-items: center;justify-content: space-between;}
-.send-btn-group .send-emoji{display: flex;align-items: center;gap: 15px;cursor: pointer;}
-.quick-group{display: flex;align-items: center;gap: 10px;padding: 15px 0;}
-.quick-group .item-btn{background-color: #f8f8f8;padding: 5px;border-radius: 3px;display: flex;align-items: center;gap: 5px;cursor: pointer;}
-.z_index2{position: relative;z-index: 2;}
-.empty-data{display: flex;width: 100%;text-align: center;justify-content: center;font-size: 18px;background-color: #f8f8f8;align-items: center;}
-.swiper-item-box {
-    position: relative;
-    z-index: 1;
-    box-sizing: border-box;
-    width: 100%;
-    height: 100%;
-    max-height: 300px;
-    overflow: auto;
-    flex-wrap: wrap;
-    align-items: flex-start;
-
-    .swiper-item-box-l {
-        // width: calc(62.5vw);
-        width: calc(100%);
-        flex-wrap: wrap;
-        align-items: flex-start;
-    }
-    .swiper-item-box-r {
-        width: calc(37.5%);
-        flex-wrap: wrap;
-        align-items: flex-start;
-    }
-
-    .emoji-item {
-        width: calc(12.5%);
-        height: calc(12.5%);
-        flex-shrink: 0;
-        transition: all 0.1s;
-        padding: 10px 0;
-        
-        .img {
-            width: 55%;
-            height: 55%;
-            cursor: pointer;
-        }
-        &:hover {
-            background-color: #f8f8f8;
-        }
-    }
-}
-.flex_r {
-    display: flex;
-    flex-direction: row;
-}
-.swiper-item-box-b {
-    width: calc(38%);
-    position: absolute;
-    z-index: 99;
-    right: 0rpx;
-    bottom: 0px;
-    padding: 0 0 40rpx 0;
-    // background-color: #000;
-    background-image: linear-gradient(to top, #ececec, #ececec, #ececec, #ececec, #ececec, rgba(0, 0, 0, 0));
-}
-.swiper-item-box-delete {
-    width: 116rpx;
-    height: calc(12.5%);
-    border-radius: 10rpx;
-    margin-right: 20rpx;
-    background-color: #fff;
-    .img {
-        width: 45%;
-        height: 45%;
-        margin-right: 4rpx;
-    }
-}
-.swiper-item-box-button {
-    width: 116rpx;
-    height: calc(12.5vw);
-    border-radius: 10rpx;
-    margin-right: 10rpx;
-    background-color: #05c160;
-}
-.page {
-	position: fixed;
-	z-index: 1;
-	top: 0;
-	left: 0;
-	bottom: 0;
-	right: 0;
-	background-color: #ededed;
-}
-.scroll-Y {
-	width: 100%;
-	height: 0;
-	transition: all 0.2s;
-	transform: rotate(180deg);
-	background-color: #ededed;
-	::-webkit-scrollbar {
-		display: none;
-	}
-}
-.scroll-view-str {
-	width: 100%;
-}
-
-.message-list .time {
-	width: 100%;
-	color: #a3a3a3;
-	line-height: 50px;
-}
-
-.message-list .recalled {
-	width: 100%;
-	height: 50rpx;
-	margin: 20rpx 0;
-	color: #a3a3a3;
-
-	.recalled-edit {
-		color: #5a6693;
-		margin-left: 14rpx;
-	}
-}
-@keyframes simple-blink {
-  0%, 100% { opacity: 1; }
-  50% { opacity: 0; }
-}
-.global-im {
-    .unreadCount{
-        position: fixed;
-        right: 42px;
-        bottom: 162px;
-        animation: simple-blink 2s ease-in-out infinite;
-    }
-  .im-trigger {
-    position: fixed;
-    right: 24px;
-    bottom: 124px;
-    width: 48px;
-    height: 48px;
-    background: #409eff;
-    border-radius: 50%;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    cursor: pointer;
-    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.1);
-    z-index: 2000;
-    transition: all 0.3s;
-    color: white;
-    &:hover {
-      background: #66b1ff;
-    }
-    &.active {
-      background: #909399;
-    }
-  }
-}
-.chat-container {
-  display: flex;
-  flex-direction: column;
-  height: 100%;
-  .message-list {
-    flex: 1;
-    overflow-y: auto;
-    background-color: #f8f8f8;
-    transition: all 0.2s;
-    transform: rotate(180deg);
-    .message-item {
-      display: flex;
-      margin-bottom: 16px;
-      &.self {
-        flex-direction: row-reverse;
-        .content {
-          margin-right: 12px;
-          align-items: flex-end;
-          .text {
-            background: #95ec69;
-          }
-        }
-      }
-      &.other {
-        .content {
-          margin-left: 12px;
-        }
-      }
-      .content {
-        display: flex;
-        flex-direction: column;
-        max-width: 70%;
-        .name {
-          font-size: 12px;
-          color: #999;
-          margin-bottom: 4px;
-        }
-        .text {
-          padding: 8px 12px;
-          background: #f0f0f0;
-          border-radius: 12px;
-          word-break: break-all;
-        }
-        .time {
-          font-size: 10px;
-          color: #ccc;
-          margin-top: 4px;
-        }
-      }
-    }
-  }
-  .input-area {
-    padding: 0 16px 16px 16px;
-    border-top: 1px solid #eee;
-  }
-}
-</style>

+ 0 - 3
src/components/imFloat/index.vue

@@ -1,3 +0,0 @@
-<template>
-
-</template>

+ 0 - 218
src/components/imFloat/order.vue

@@ -1,218 +0,0 @@
-<template>
-    <el-drawer v-model="visible" title="在线客服" size="500px" destroy-on-close :with-header="false">
-        <el-container class="flex-column">
-            <div class="drawer-detail-main">
-                <div class="drawer-detail-header">
-                    <div class="drawer-detail-header-body">
-                        <div class="drawer-detail-header-left">{{titleMap[mode]}}</div>
-                        <div class="drawer-detail-header-left">
-                            <el-button type="default" icon="el-icon-close" @click="visible=false"></el-button>
-                        </div>
-                    </div>
-                </div>
-            </div>
-            <el-main class="nopadding" v-loading="loading">
-                <div class="order-detail" v-if="orderData">
-                    <div class="order-status">
-                        <div class="status-name" v-if="orderData.status == 0 && orderTime">
-                            待支付
-                            <template v-if="orderTime.min>0&&orderTime.sec>=0">
-                                ,剩余时间
-                                
-                            </template>
-                            <template v-else>,已超时</template>
-                        </div>
-                        <div class="status-name" v-if="orderData.status == 1">待使用</div>
-                        <div class="status-name success" v-if="orderData.status == 2">已完成</div>
-                        <div class="status-name" v-if="orderData.status == 3">已退款</div>
-                        <div class="status-name" v-if="orderData.status == 4">退款中</div>
-                        <div class="status-name" v-if="orderData.status == 5">已关闭</div>
-                        
-                        <div class="status-desc" v-if="orderData.status == 0">超过30分钟未支付,订单将自动取消</div>
-                        <div class="status-desc" v-if="orderData.status == 1">待使用</div>
-                        <div class="status-desc success" v-if="orderData.status == 2">服务已完成,欢迎您再次使用</div>
-                        <div class="status-desc" v-if="orderData.status == 3">{{ $TOOL.money(orderData.pay_money) }} 已原路退回</div>
-                        <div class="status-desc" v-if="orderData.status == 4">已申请退款,钱款预计1-3个自然日到账</div>
-                        <div class="status-desc" v-if="orderData.status == 5">订单已取消或已关闭</div>
-                        
-                    </div>
-                    <div class="order-goods">
-                        <div class="goods-img"><img :src="orderData.img" /></div>
-                        <div class="goods-info">
-                            <div class="name">{{ orderData.product.product_name }}</div>
-                            <div class="desc">
-                                <div class="time" v-if="orderData.end_at">有效期至:{{ orderData.end_at }} </div>
-                                <div class="num">x {{ orderData.number }}</div>
-                            </div>
-                            <div class="total">合计:{{ $TOOL.money(orderData.price) }}</div>
-                        </div>
-                    </div>
-                    <div class="order-info">
-                        <div class="title">下单用户</div>
-                        <div class="info-item">
-                            <div class="name">昵称</div>
-                            <div class="right">{{ orderData.user.nickname }} </div>
-                        </div>
-                        <div class="info-item">
-                            <div class="name">OpenId</div>
-                            <div class="right">{{ orderData.user.openid }} </div>
-                        </div>
-                        <div class="info-item">
-                            <div class="name">手机号码</div>
-                            <div class="right">{{ orderData.user.mobile }} </div>
-                        </div>
-                        <div class="info-item">
-                            <div class="name">注册时间</div>
-                            <div class="right">{{ orderData.user.create_at }} </div>
-                        </div>
-                    </div>
-                    <div class="order-info">
-                        <div class="title">订单信息</div>
-                        <div class="info-item">
-                            <div class="name">来客订单号</div>
-                            <div class="right">{{ orderData.order_sn }} </div>
-                        </div>
-                        <div class="info-item">
-                            <div class="name">留资号码</div>
-                            <div class="right">{{ orderData.mobile?orderData.mobile:'-' }}</div>
-                        </div>
-                        <div class="info-item">
-                            <div class="name">订单编号</div>
-                            <div class="right">{{ orderData.out_order_no }}</div>
-                        </div>
-                        <div class="info-item">
-                            <div class="name">下单时间</div>
-                            <div class="right">{{ orderData.create_at }}</div>
-                        </div>
-                        <div class="info-item" v-if="orderData.status == 4">
-                            <div class="name">退款时间</div>
-                            <div class="right">{{ orderData.refund_at }}</div>
-                        </div>
-                    </div>
-                    <div class="order-info" v-if="orderData.address">
-                        <div class="title">收货地址<span v-copy="orderData.address.nickname+','+orderData.address.mobile+','+orderData.address.city_text+orderData.address.address">一键复制</span></div>
-                        <div class="info-item">
-                            <div class="name">收件人</div>
-                            <div class="right">{{ orderData.address.nickname }} </div>
-                        </div>
-                        <div class="info-item">
-                            <div class="name">联系电话</div>
-                            <div class="right">{{ orderData.address.mobile }}</div>
-                        </div>
-                        <div class="info-item">
-                            <div class="name">收货地区</div>
-                            <div class="right">{{ orderData.address.city_text }}</div>
-                        </div>
-                        <div class="info-item">
-                            <div class="name">详细地址</div>
-                            <div class="right">{{ orderData.address.address }}</div>
-                        </div>
-                    </div>
-                    <div class="order-info" v-else>
-                        <div class="title">收货地址</div>
-                        <div class="empty-data-item" v-if="mode == 'add'">
-                            <el-button @click="sendAddress">收集地址</el-button>
-                            <div class="el-form-item-msg">收集地址将发送消息给用户,由用户填写完成后即完成核销</div>
-                        </div>
-                    </div>
-                    <div class="order-info" v-if="orderData.express">
-                    </div>
-                    <div class="order-info" v-else>
-                        <div class="title">快递信息</div>
-                        <div class="empty-data-item" v-if="mode == 'add'">
-                            <el-button>一键呼叫快递</el-button>
-                            <div class="el-form-item-msg">必须先收集完地址后方可进行呼叫快递,确保地址正确</div>
-                        </div>
-                    </div>
-
-                </div>
-            </el-main>
-        </el-container>
-    </el-drawer>
-</template>
-
-<script>
-export default {
-    data(){
-        return {
-            loading: false,
-            isSaveing: false,
-            isDoneing:false,
-            mode:"add",
-            titleMap:{
-                add:"订单详情",
-                edit:"订单详情"
-            },
-            visible:false,
-            orderData:null,
-			orderTime:null
-        }
-    },
-    methods: {
-        open(mode = 'add'){
-            this.mode = mode;
-            this.visible = true;
-            return this
-        },
-        //表单注入数据
-        setData(data){
-            this.formData = JSON.parse(JSON.stringify(data));
-            this.getOrderDetail()
-        },
-        doneOrder(){
-            this.$confirm(`手动核销订单后,该订单不支持线上退款,如需退款请线下沟通后进行`, '提示', {
-                type: 'warning'
-            }).then(async ()=>{
-                this.isDoneing = true;
-                var resp = await this.$API.merOrder.done.post({"id":this.orderData.order_sn});
-                this.isDoneing = false;
-                if (resp.code == 0) {
-                    return this.$message.error(resp.msg);
-                }
-                this.$message.success(resp.msg);
-                this.visible = false;
-                this.$emit("success");
-            }).catch(()=>{})
-        },
-        async getOrderDetail(){
-            this.loading = true;
-            var resp = await this.$API.merOrder.detail.get({"order":this.formData.order});
-            this.loading = false;
-            if (resp.code == 0) {
-                this.$message.error(resp.msg);
-                this.visible = false;
-                return ;
-            }
-            this.orderData = resp.data;
-            this.orderTime = resp.data.end_time
-        },
-        sendAddress(){
-            this.$emit("success",'address',this.orderData);
-        }
-    }
-}
-</script>
-
-<style>
-.border-none{border: 0;}
-.order-detail{padding: 10px;}
-.order-detail .order-goods{display: flex;align-items: flex-start;background-color: #fff;border-bottom: 1px solid #f8f8f8;}
-.order-detail .order-goods .goods-img{width: 80px;overflow: hidden;}
-.order-detail .order-goods img{width: 80px;border-radius: 5px;}
-.order-detail .goods-info{margin-left: 10px;font-size: 12px;flex: 1;padding: 10px 0;}
-.order-detail .goods-info .name{font-size: 16px;color: #333;}
-.order-detail .goods-info .desc{font-size: 12px;color: #999;display: flex;align-items: center;justify-content: space-between;margin: 10px 0;}
-.order-detail .goods-info .total{font-size: 16px;color: #333;text-align: right;font-weight: bold;}
-.order-detail .order-info{background-color: #fff;padding: 10px;margin-top: 10px;}
-.order-detail .order-info .title{font-size: 16px;color: #333;font-weight: bold;padding-bottom: 10px;border-bottom: 1px solid #f8f8f8;display: flex;align-items: center;justify-content: space-between;}
-.order-detail .order-info .title span{font-size: 12px;color: #333;font-weight: normal;border: 1px solid #ededed;padding: 5px 10px;cursor: pointer;}
-
-.order-detail .order-info .info-item{height: 40px;line-height: 40px;font-size: 12px;display: flex;align-items: center;border-bottom: 1px solid #f8f8f8;}
-.order-detail .order-info .info-item .right{color: #666;margin-left: auto;margin-right: 0;}
-.order-detail .order-info .info-item .right text{border: 1px solid #ccc;color: #333;font-size: 12px;padding: 0 15upx;margin-left: 10px;border-radius: 5px;}
-.empty-data-item{margin-top: 10px;}
-
-.order-detail .order-status{padding: 20px 10px;text-align: center;background-color: #f8f8f8;margin-bottom: 10px;}
-.order-detail .order-status .status-name{text-align: center;font-size: 16px;color: #333;font-weight: bold;display: flex;align-items: center;justify-content: center;}
-.order-detail .order-status .status-desc{font-size: 12px;color: #666;margin-top: 10px;}
-</style>

+ 0 - 69
src/components/imFloat/quickTxt.vue

@@ -1,69 +0,0 @@
-<template>
-    <el-dialog :title="titleMap[mode]" v-model="visible" :width="500" destroy-on-close @closed="$emit('closed')">
-        <el-form ref="dialogForm" :model="formData" :rules="rules" label-width="100px" label-position="top">
-            <el-form-item label="回复内容" prop="content">
-                <el-input type="textarea" rows="10" v-model="formData.content" clearable placeholder="请输入"></el-input>
-                <div class="el-form-item-msg"></div>
-            </el-form-item>
-        </el-form>
-		<template #footer>
-            <el-button @click="visible=false" size="large">取 消</el-button>
-            <el-button v-if="mode!='show'" size="large" type="primary" :loading="isSaveing" @click="submit()">保 存</el-button>
-		</template>
-    </el-dialog>
-    
-</template>
-
-<script>
-export default {
-    data(){
-        return {
-            loading: false,
-            isSaveing: false,
-            mode:"add",
-            titleMap:{
-                add:"新增个人快捷回复",
-                edit:"编辑个人快捷回复"
-            },
-            visible:false,
-            formData:{},
-            rules:{
-                content: [
-                    {required: true, message: '请输入'}
-                ]
-            }
-        }
-    },
-    methods:{
-        open(mode = 'add'){
-            this.mode = mode;
-            this.visible = true;
-            return this
-        },
-        //表单注入数据
-        setData(data){
-            this.formData = JSON.parse(JSON.stringify(data));
-        },
-        async submit(){
-            var validate = await this.$refs.dialogForm.validate().catch(()=>{});
-            if(!validate){ return false }
-            this.isSaveing = true;
-            let submitData = JSON.parse(JSON.stringify(this.formData));
-            var resp = await this.$API.merQuick.save.post(submitData);
-            this.isSaveing = false;
-            if (resp.code == 0) {
-                return this.$message.error(resp.msg);
-            }
-            this.$message.success(resp.msg);
-            this.visible = false;
-            this.formData = {};
-            this.submitState = false;
-            this.$emit("success");
-        }
-    }
-}
-</script>
-
-<style>
-.text-center{text-align: center;}
-</style>

+ 1 - 1
src/layout/components/userbar.vue

@@ -41,7 +41,7 @@
 <script>
 import search from './search.vue'
 import tasks from './tasks.vue'
-import passwd from "@/views/manage/components/password"
+import passwd from "@/views/login/password"
 
 export default {
 	components: {

+ 1 - 6
src/layout/index.vue

@@ -208,9 +208,6 @@
 	</el-drawer>
 
 	<auto-exit></auto-exit>
-	<div v-if="userInfo.type==3">
-		<imFloat :user="userInfo"></imFloat>
-	</div>
 </template>
 
 <script>
@@ -222,7 +219,6 @@ import userbar from './components/userbar.vue';
 import setting from './components/setting.vue';
 import iframeView from './components/iframeView.vue';
 import autoExit from './other/autoExit.js';
-import imFloat from '@/components/imFloat/imFloat';
 export default {
 	name: 'index',
 	components: {
@@ -233,8 +229,7 @@ export default {
 		userbar,
 		setting,
 		iframeView,
-		autoExit,
-		imFloat
+		autoExit
 	},
 	data() {
 		return {

+ 96 - 0
src/views/login/password.vue

@@ -0,0 +1,96 @@
+<template>
+    <el-dialog :title="titleMap[mode]" v-model="visible" :width="500" destroy-on-close @closed="$emit('closed')">
+        <el-form :model="formData" :rules="rules" :disabled="mode=='show'" ref="dialogForm" label-position="top" label-width="120px">
+            <el-form-item label="登录账号">
+				<el-input v-model="formData.username" disabled></el-input>
+			</el-form-item>
+            <el-form-item label="账号昵称">
+				<el-input v-model="formData.truename" disabled></el-input>
+			</el-form-item>
+            <el-form-item label="新密码" prop="password">
+                <el-input type="password" v-model="formData.password" clearable show-password></el-input>
+            </el-form-item>
+            <el-form-item label="确认新密码" prop="password2">
+                <el-input type="password" v-model="formData.password2" clearable show-password></el-input>
+            </el-form-item>
+        </el-form>
+		<template #footer>
+			<el-button @click="visible=false" >取 消</el-button>
+			<el-button v-if="mode!='show'" type="primary" :loading="isSaveing" @click="submit()">保 存</el-button>
+		</template>
+    </el-dialog>
+</template>
+
+<script>
+import scPasswordStrength from '@/components/scPasswordStrength'
+export default{
+    components: {
+        scPasswordStrength
+    },
+    data(){
+        return {
+            loading: false,
+            mode:"edit",
+            titleMap:{
+                edit:"修改密码"
+            },
+            visible: false,
+            isSaveing: false,
+            formData:{},
+            rules:{
+                password: [
+                    {required: true, message: '请输入登录密码'}
+                ],
+                password2: [
+                    {required: true, message: '请再次输入密码'},
+                    {validator: (rule, value, callback) => {
+                        if (value !== this.formData.password) {
+                            callback(new Error('两次输入密码不一致!'));
+                        }else{
+                            callback();
+                        }
+                    }}
+                ],
+            }
+        }
+    },
+    methods:{
+        open(mode = 'edit'){
+            this.mode = mode;
+            this.visible = true;
+            return this
+        },
+        //表单注入数据
+        setData(data){
+            data.password = "";
+            data.password2 = "";
+            this.formData = data;
+        },
+        submit(){
+            this.isSaveing = true;
+            this.$refs.dialogForm.validate(async (valid) => {
+                if (valid) {
+                    let password = this.$TOOL.crypto.MD5(this.formData.password);
+                    var result = await this.$API.user.pwd.post({password:password,id:this.formData.username});
+                    if(result.code !== 1){
+                        this.$message.warning(result.msg)
+                        this.isSaveing = false;
+                        return false;
+                    }
+                    this.$message.success(result.msg)
+                    this.isSaveing = false;
+                    this.visible = false;
+                    this.formData = {};
+                }else{
+                    this.isSaveing = false;
+                    return false;
+                }
+            });
+        }
+    }
+}
+</script>
+
+<style lang="less" scoped>
+
+</style>