12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031 |
- <template>
- <view class="chat-box" :style="colorStyle">
- <!-- #ifdef MP -->
- <view class="head-box">
- <view class="system-head" :style="{ height: sysHead }"></view>
- <view class="title-hd">
- <view class="iconfont icon-fanhui" @click="goBack"></view>
- <view>{{ titleName }}</view>
- </view>
- </view>
- <!-- #endif -->
- <view class="broadcast-details_order">
- <!-- 商品信息 -->
- <view class="broadcast-details_box" v-if="productId && productInfo.id">
- <view class="broadcast_details_img">
- <image class="goods-img" :src="productInfo.image" />
- </view>
- <view class="broadcast_details_picBox">
- <view class="broadcast_details_tit" v-text="productInfo.store_name"></view>
- <view class="bottom acea-row row-between">
- <view class="broadcast_details_pic">
- ¥{{ productInfo.price }}
- <text class="broadcast_details_pic_num"
- v-if="productInfo.ot_price">¥{{ productInfo.ot_price }}</text>
- </view>
- <view class="broadcast_details_btn" @click="sendProduct">发送客服</view>
- </view>
- </view>
- </view>
- <!-- 订单信息 -->
- <view class="broadcast_box" v-if="orderId && orderInfo.id">
- <view class="broadcast-details_num broadcast_num">
- <text>订单号:{{ orderInfo.order_id }}</text>
- <text>{{ orderInfo.add_time_y }} {{ orderInfo.add_time_h }}</text>
- </view>
- <view class="broadcast-details_box" v-if="orderInfo.cartInfo">
- <view class="broadcast_details_img">
- <image class="goods-img"
- :src="orderInfo.cartInfo[0].productInfo.attrInfo?orderInfo.cartInfo[0].productInfo.attrInfo.image:orderInfo.cartInfo[0].productInfo.image" />
- <view class="broadcast_details_model">
- {{ orderInfo.cartInfo ? orderInfo.cartInfo.length : 0 }}件商品
- </view>
- </view>
- <view class="broadcast_details_picBox">
- <view class="broadcast_details_tit">{{ orderInfo.cartInfo[0].productInfo.store_name }}</view>
- <view class="bottom acea-row row-between">
- <view class="broadcast_details_pic">
- ¥{{ orderInfo.cartInfo[0].productInfo.attrInfo?orderInfo.cartInfo[0].productInfo.attrInfo.price:orderInfo.cartInfo[0].productInfo.price }}
- <text class="broadcast_details_pic_num">¥{{ orderInfo.cartInfo[0].costPrice }}</text>
- </view>
- <view class="broadcast_details_btn" @click="sendOrder">发送客服</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="chat-scroll-box">
- <scroll-view scroll-y="true" style="height: 100%;" :scroll-top="scrollTop" @scrolltoupper="scrollToTop">
- <Loading :loaded="status" :loading="loading"></Loading>
- <view id="box" class="chat" ref="chat">
- <view v-for="(item, index) in records" :key="index" :id="`msg-${item.id}`" class="msgItem">
- <view class="day-box" v-if="item.show">{{item._add_time}}</view>
- <view class="chat-item" :class="{ 'right-box': item.uid == myUid }">
- <image class="avatar" :src="item.avatar" mode=""></image>
- <!-- 消息 -->
- <view class="msg-box" v-if="item.msn_type <= 2"><view v-html="item.msn"></view></view>
- <!-- 图片 -->
- <view class="img-box" v-if="item.msn_type == 3">
- <image :src="item.msn" mode="widthFix" @tap="previewImage(item.msn)"></image>
- </view>
- <!-- 商品 -->
- <view class="product-box" v-if="item.msn_type == 5" @click="goProduct(item)">
- <image v-if="Array.isArray(item.productInfo)" src="../static/product-off.png" mode="aspectFit" class="product-off"></image>
- <template v-else>
- <image
- :src="item.productInfo.cartInfo?item.productInfo.cartInfo.image:item.productInfo.image"
- mode="widthFix"></image>
- <view class="info">
- <view class="price">
- <text>¥</text>
- {{ item.productInfo.cartInfo?item.productInfo.cartInfo.price:item.productInfo.price }}
- </view>
- <view class="name line2">{{ item.productInfo.store_name }}</view>
- </view>
- </template>
- </view>
- <!-- 订单 -->
- <view class="order-box"
- v-if="(item.msn_type == 6 || item.msn_type == 7) && item.orderInfo.cartInfo"
- @click="goOrder(item)">
- <view class="title">订单号: {{ item.orderInfo.order_id }}</view>
- <view class="info">
- <image
- :src="item.orderInfo.cartInfo[0].productInfo.attrInfo?item.orderInfo.cartInfo[0].productInfo.attrInfo.image:item.orderInfo.cartInfo[0].productInfo.image">
- </image>
- <view class="product-info">
- <view class="name line2">{{ item.orderInfo.cartInfo[0].productInfo.store_name }}
- </view>
- <view class="price">
- ¥{{ item.orderInfo.cartInfo[0].productInfo.attrInfo?item.orderInfo.cartInfo[0].productInfo.attrInfo.price:item.orderInfo.cartInfo[0].productInfo.price }}
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </scroll-view>
- </view>
- <view class="footer-box">
- <view class="words" @click="uploadImg"><text class="iconfont icon-tupian2"></text></view>
- <view class="input-box">
- <input type="text" placeholder="请输入内容" v-model="con" confirm-type="send" @confirm="sendText" />
- <text class="iconfont icon-fasong" @click="sendText" :class="{ isSend: isSend }"></text>
- </view>
- <view class="emoji" @click="isSwiper = !isSwiper"><span class="iconfont icon-biaoqing2"></span></view>
- </view>
- <!-- 表情 -->
- <view class="banner slider-banner" v-if="isSwiper && httpUrl">
- <swiper class="swiper-wrapper" :autoplay="autoplay" :circular="circular" :interval="interval"
- :duration="duration" v-if="emojiGroup.length > 0">
- <block v-for="(emojiList, index) in emojiGroup" :key="index">
- <swiper-item><i class="em" :class="emoji" :style="'background-image:url('+ httpUrl +')'"
- v-for="emoji in emojiList" :key="emoji" @click="addEmoji(emoji)"></i></swiper-item>
- </block>
- </swiper>
- </view>
- <canvas canvas-id="canvas" v-if="canvasStatus"
- :style="{width: canvasWidth + 'px', height: canvasHeight + 'px',position: 'absolute',left:'-100000px',top:'-100000px'}"></canvas>
- </view>
- </template>
- <script>
- const app = getApp();
- import {
- HTTP_REQUEST_URL
- } from "@/config/app.js";
- import {
- getChatRecord
- } from '@/api/user';
- import {
- getProductDetail
- } from '@/api/store';
- import {
- getOrderDetail,
- getRefundOrderDetail
- } from '@/api/order';
- let statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
- const chunk = function(arr, num) {
- num = num * 1 || 1;
- var ret = [];
- arr.forEach(function(item, i) {
- if (i % num === 0) {
- ret.push([]);
- }
- ret[ret.length - 1].push(item);
- });
- return ret;
- };
- import emojiList from '@/utils/emoji';
- import Loading from '@/components/Loading';
- import colors from "@/mixins/color";
- export default {
- name: 'adminChat_index',
- data() {
- return {
- httpUrl: '',
- status: false,
- loading: false,
- sysHead: statusBarHeight,
- isTool: false,
- isSwiper: false,
- isWords: false,
- autoplay: false,
- circular: true,
- interval: 3000,
- duration: 500,
- emojiGroup: chunk(emojiList, 21),
- wordsList: [],
- con: '',
- toUid: 0,
- limit: 15,
- upperId: 0,
- chatList: [],
- kefuInfo: {},
- scrollTop: 0,
- active: true,
- isScroll: true,
- oldHeight: 0,
- myUid: 0,
- productId: 0,
- productInfo: {},
- orderId: 0,
- page: 1,
- orderInfo: {},
- uidTo: 0,
- titleName: '',
- chatStatus: false,
- userType: 0,
- canvasWidth: "",
- canvasHeight: "",
- canvasStatus: false,
- isReturen: 0
- };
- },
- mixins: [colors],
- components: {
- Loading
- },
- computed: {
- isSend() {
- if (this.con.length == 0) {
- return false;
- } else {
- return true;
- }
- },
- records() {
- return this.chatList.map((item, index) => {
- if (index) {
- if (item.add_time - this.chatList[index - 1].add_time >= 300) {
- item.show = true;
- } else {
- item.show = false;
- }
- } else {
- item.show = true;
- }
- return item;
- });
- }
- },
- onLoad(options) {
- this.isReturen = options.isReturen;
- this.myUid = this.$store.state.app.uid;
- this.toUid = options.to_uid
- this.productId = parseInt(options.productId) || 0;
- this.orderId = options.orderId || 0;
- this.userType = options.type
- this.getproductInfo();
- this.getOrderInfo();
- this.getChatList();
- },
- onUnload() {
- this.$socket.clearPing();
- app.globalData.isWsOpen = false;
- uni.$off()
- },
- onReady() {
- this.httpUrl = `${HTTP_REQUEST_URL}/statics/images/look.png`;
- // #ifdef H5
- let dom = document.querySelector(".chat-box");
- dom.style.height = window.innerHeight + 'px'
- // #endif
- // 监听客服转接
- uni.$on('to_transfer', data => {
- this.toUid = data.toUid;
- this.$socket.send({
- data: {
- id: this.toUid
- },
- type: 'to_chat'
- });
- this.chatList.forEach(el => {
- if (el.uid != this.myUid) {
- el.avatar = data.avatar
- }
- })
- });
- // 链接成功
- uni.$on('success', () => {
- app.globalData.isWsOpen = true;
- uni.hideLoading();
- this.$socket.send({
- data: {
- id: this.toUid
- },
- type: 'to_chat'
- });
- });
- // 消息接收
- uni.$on(['reply', 'chat'], data => {
- if (data.msn_type == 1) {
- data.msn = this.replace_em(data.msn);
- }
- data._add_time = data._add_time.substring(0, data._add_time.length - 3);
- this.chatList.push(data);
- this.$nextTick(() => {
- this.height();
- });
- });
- uni.$on('socket_error', () => {
- this.$util.Tips({
- title: '连接失败'
- });
- });
- uni.$on('err_tip', (e) => {
- this.$util.Tips({
- title: e.msg
- });
- });
- uni.$on('online', data => {
- if (data.online == 0) {
- uni.showModal({
- title: '提示',
- content: '客服已下线,是否需要反馈?',
- success: function(res) {
- if (res.confirm) {
- uni.redirectTo({
- url: '/pages/columnGoods/HotNewGoods/feedback'
- });
- } else if (res.cancel) {}
- }
- });
- }
- });
- this.$nextTick(() => {
- this.height();
- });
- },
- onShow(){
- uni.removeStorageSync('form_type_cart');
- },
- methods: {
- previewImage(n) {
- uni.previewImage({
- urls: [n]
- });
- },
- // 返回
- goBack() {
- uni.navigateBack({
- delta: 1,
- fail(){
- uni.switchTab({
- url: '/pages/index/index'
- })
- }
- });
- },
- // 商品信息
- getproductInfo() {
- let that = this;
- if (!this.productId) return;
- getProductDetail(this.productId).then(res => {
- that.productInfo = res.data.storeInfo;
- });
- },
- // 商品信息
- goProduct(item) {
- if (Array.isArray(item.productInfo)) {
- return;
- }
- uni.navigateTo({
- url: `/pages/goods_details/index?id=${item.msn}`
- });
- },
- // 订单详情
- goOrder(item) {
- if (this.userType) {
- if (item.msn_type == 7) {
- uni.navigateTo({
- url: `/pages/admin/orderDetail/index?id=${item.msn}&isReturen=1`
- });
- } else {
- uni.navigateTo({
- url: `/pages/admin/orderDetail/index?id=${item.msn}`
- });
- }
- } else {
- if (item.msn_type == 7) {
- uni.navigateTo({
- url: `/pages/goods/order_details/index?order_id=${item.msn}&isReturen=1`
- });
- } else {
- uni.navigateTo({
- url: `/pages/goods/order_details/index?order_id=${item.msn}`
- });
- }
- }
- },
- // 订单消息
- getOrderInfo() {
- if (!this.orderId) return;
- let obj = '';
- if (this.isReturen == 1) {
- obj = getRefundOrderDetail(this.orderId);
- } else {
- obj = getOrderDetail(this.orderId);
- }
- obj.then(res => {
- this.orderInfo = res.data;
- if (this.orderInfo.add_time_h) {
- this.orderInfo.add_time_h = this.orderInfo.add_time_h.substring(0, this.orderInfo
- .add_time_h.lastIndexOf(':'));
- }
- if (this.orderInfo.cartInfo.length) {
- this.cartInfo = this.orderInfo.cartInfo[0];
- }
- });
- },
- // 表情点击
- addEmoji(item) {
- let val = `[${item}]`;
- this.con += val;
- // let val = `[${item}]`;
- // let index = this.con.indexOf('[')
- // if(index !=-1){
- // let con = this.con.slice(0,index);
- // this.con = con + val;
- // }else{
- // this.con += val;
- // }
- },
- // 聊天表情转换
- replace_em(str) {
- str = str.replace(/\[em-([\s\S]*?)\]/g, "<span class='em em-$1' style='background-image:url(" + this
- .httpUrl + ")'></span>");
- return str;
- },
- // 获取聊天列表
- getChatList() {
- let self = this;
- getChatRecord({
- limit: this.limit,
- uidTo: this.uidTo,
- toUid: this.toUid
- })
- .then(res => {
- let selector = '';
- if (res.data.serviceList.length) {
- if (this.uidTo == 0) {
- selector = `#msg-${res.data.serviceList[res.data.serviceList.length - 1].id}`;
- } else {
- selector = `#msg-${this.chatList[0].id}`;
- }
- }
- let arr = [];
- var sH = 0;
- uni.hideLoading();
- uni.setNavigationBarTitle({
- title: res.data.nickname
- });
- this.titleName = res.data.nickname;
- this.toUid = res.data.uid;
- res.data.serviceList.forEach(el => {
- el._add_time = el._add_time.substring(0, el._add_time.length - 3);
- if (el.msn_type == 1 || el.msn_type == 2) {
- el.msn = this.replace_em(el.msn);
- }
- });
- this.loading = false;
- this.chatList = [...res.data.serviceList, ...this.chatList];
- if (!app.globalData.isWsOpen) {
- uni.showLoading({
- title: '客服连接中...',
- });
- this.$socket.startConnect();
- //5秒后还是没有连接自动关闭
- setTimeout(() => {
- uni.hideLoading();
- }, 5000);
- }
- this.$nextTick(() => {
- this.setPageScrollTo(selector);
- this.isScroll = res.data.serviceList.length >= this.limit;
- });
- })
- .catch(error => {
- uni.hideLoading();
- this.$util.Tips({
- title: error
- });
- this.loading = false;
- this.isScroll = false
- uni.redirectTo({
- url: '/pages/columnGoods/HotNewGoods/feedback'
- });
- });
- },
- // 设置页面滚动位置
- setPageScrollTo(selector) {
- try {
- if (this.chatList.length) {
- let view = uni
- .createSelectorQuery()
- .in(this)
- .select(selector);
- view.boundingClientRect(res => {
- this.scrollTop = parseFloat(res.top) - 60;
- }).exec();
- }
- } catch (e) {
- console.log(e);
- }
- },
- // 发送消息
- sendText() {
- if (!this.isSend || this.con.trim() === '') {
- return this.$util.Tips({
- title: '请输入内容'
- });
- }
- this.sendMsg(this.con, 1);
- this.con = '';
- },
- // ws发送
- sendMsg(msn, type) {
- this.$socket.send({
- data: {
- msn,
- type,
- to_uid: this.toUid
- },
- //#ifdef MP || APP-PLUS
- form_type: 2,
- //#endif
- //#ifdef H5
- form_type: this.$wechat.isWeixin() ? 1 : 3,
- //#endif
- type: 'chat'
- });
- },
- uploadImg() {
- let self = this;
- self.canvasStatus = true
- self.$util.uploadImageChange('upload/image', function(res) {
- if (res.status == 200) {
- self.sendMsg(res.data.url, 3);
- }
- }, (res) => {
- this.canvasStatus = false
- }, (res) => {
- this.canvasWidth = res.w
- this.canvasHeight = res.h
- });
- },
- // 发送商品
- sendProduct() {
- this.sendMsg(this.productId, 5);
- this.productId = 0;
- this.productInfo = {};
- },
- // 发送订单
- sendOrder() {
- let num = 0;
- if (this.isReturen == 1) {
- num = 7;
- } else {
- num = 6;
- }
- this.sendMsg(this.orderId, num);
- this.orderId = 0;
- this.orderInfo = {};
- },
- // 滚动到底部
- height() {
- let self = this;
- var scrollTop = 0;
- let info = uni.createSelectorQuery().select('.chat');
- setTimeout(res => {
- info.boundingClientRect(function(data) {
- //data - 各种参数
- scrollTop = data.height;
- if (self.active) {
- self.scrollTop = parseInt(scrollTop) + 500;
- } else {
- self.scrollTop = parseInt(scrollTop) + 100;
- }
- }).exec();
- }, 200);
- },
- // 滚动到顶部
- scrollToTop() {
- let self = this;
- if (this.isScroll) {
- this.loading = true;
- this.uidTo = this.chatList[0].id;
- this.isScroll = false;
- setTimeout(res => {
- this.getChatList();
- }, 800);
- }
- }
- }
- };
- </script>
- <style>
- /* #ifdef MP || APP-PLUS || H5 */
- page,
- uni-page-body,
- html,
- body {
- height: 100%;
- }
- /* #endif */
- </style>
- <style lang="scss">
- .chat-box {
- display: flex;
- flex-direction: column;
- height: 100%;
- background: #f0f1f2;
- /* #ifdef H5 */
- height: 100vh;
- /* #endif */
- .head-box {
- /* #ifdef H5 */
- height: 86rpx;
- /* #endif */
- background: linear-gradient(85deg, $kf-star 0%, $kf-end 100%);
- .title-hd {
- display: flex;
- align-items: center;
- justify-content: center;
- position: relative;
- height: 43px;
- padding: 0 30rpx;
- color: #fff;
- .icon-fanhui {
- position: absolute;
- left: 30rpx;
- top: 50%;
- transform: translateY(-50%);
- }
- .icon-gengduo2 {
- /* #ifdef MP */
- position: absolute;
- right: 210rpx;
- top: 50%;
- transform: translateY(-50%);
- /* #endif */
- }
- }
- }
- .scroll-box {
- flex: 1;
- }
- .footer-box {
- display: flex;
- align-items: center;
- padding: 0 30rpx;
- color: rgba(0, 0, 0, 0.8);
- background: #f7f7f7;
- height: 100rpx;
- // height: calc(100rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
- // height: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
- .words .icon-tupian2 {
- font-size: 50rpx;
- }
- .input-box {
- display: flex;
- align-items: center;
- flex: 1;
- height: 64rpx;
- padding-right: 5rpx;
- margin-left: 18rpx;
- background-color: #fff;
- border-radius: 32rpx;
- input {
- flex: 1;
- padding-left: 20rpx;
- height: 100%;
- font-size: 28rpx;
- font-weight: normal;
- }
- .icon-fasong {
- font-size: 50rpx;
- color: #ccc;
- font-weight: normal;
- margin-left: 30rpx;
- }
- .isSend {
- color: $kf-theme;
- }
- }
- .emoji .icon-biaoqing2 {
- margin-left: 18rpx;
- font-size: 50rpx;
- }
- .more .icon-gengduozhankai {
- margin-left: 18rpx;
- font-size: 50rpx;
- }
- }
- }
- .tool-wrapper {
- display: flex;
- justify-content: space-between;
- padding: 45rpx 60rpx;
- background: #fff;
- font-size: 24rpx;
- .tool-item {
- text-align: center;
- image {
- width: 104rpx;
- height: 104rpx;
- }
- }
- }
- .slider-banner {
- background: #fff;
- padding-bottom: 25rpx;
- }
- .words-mask {
- z-index: 50;
- position: fixed;
- left: 0;
- top: 0;
- right: 0;
- bottom: 0;
- background: rgba(0, 0, 0, 0.5);
- .content {
- position: absolute;
- left: 0;
- right: 0;
- top: 114rpx;
- bottom: 0;
- display: flex;
- flex-direction: column;
- padding: 0 30rpx;
- background: #fff;
- border-radius: 6rpx 6rpx 0px 0px;
- .title-box {
- position: relative;
- height: 125rpx;
- line-height: 125rpx;
- text-align: center;
- font-size: 32rpx;
- .icon-cha1 {
- position: absolute;
- right: 0;
- top: 50%;
- transform: translateY(-50%);
- }
- }
- .scroll-box {
- flex: 1;
- overflow: hidden;
- .msg-item {
- padding: 25rpx 0;
- border-bottom: 1px solid #eceff8;
- }
- }
- }
- }
- .chat-scroll-box {
- flex: 1;
- padding: 0 30rpx 0;
- overflow: hidden;
- .chat-item {
- display: flex;
- margin-bottom: 16rpx;
- padding-bottom: 20rpx;
- .avatar {
- width: 80rpx;
- height: 80rpx;
- border-radius: 50%;
- }
- .msg-box {
- display: flex;
- align-items: center;
- max-width: 452rpx;
- margin-left: 22rpx;
- padding: 10rpx 24rpx;
- background: #fff;
- border-radius: 14rpx;
- word-break: break-all;
- }
- .img-box {
- width: 270rpx;
- margin-left: 22rpx;
- image {
- width: 270rpx;
- }
- }
- .product-box {
- width: 452rpx;
- margin-left: 22rpx;
- background-color: #fff;
- border-radius: 14rpx;
- overflow: hidden;
- image {
- width: 452rpx;
- }
- .info {
- padding: 16rpx 26rpx;
- .price {
- font-size: 36rpx;
- color: var(--view-priceColor);
- text {
- font-size: 28rpx;
- }
- }
- }
- }
- .order-box {
- width: 452rpx;
- margin-left: 22rpx;
- background-color: #fff;
- border-radius: 14rpx;
- .title {
- padding: 15rpx 20rpx;
- font-size: 26rpx;
- color: #282828;
- border-bottom: 1px solid #eceff8;
- }
- .info {
- display: flex;
- padding: 20rpx;
- image {
- width: 124rpx;
- height: 124rpx;
- border-radius: 6rpx;
- }
- .product-info {
- flex: 1;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- margin-left: 16rpx;
- .name {
- font-size: 26rpx;
- }
- .price {
- font-size: 30rpx;
- color: var(--view-priceColor);
- }
- }
- }
- }
- &.right-box {
- flex-direction: row-reverse;
- .msg-box {
- margin-left: 0;
- margin-right: 22rpx;
- background-color: #9cec60;
- }
- .img-box {
- margin-left: 0;
- margin-right: 22rpx;
- }
- .product-box {
- margin-left: 0;
- margin-right: 22rpx;
- }
- .order-box {
- margin-left: 0;
- margin-right: 22rpx;
- }
- }
- .em {
- margin: 0;
- }
- }
- }
- .broadcast-details_box {
- display: flex;
- background: #fff;
- border-radius: 6px;
- padding: 24rpx;
- }
- .broadcast_details_img {
- width: 140rpx;
- height: 140rpx;
- border-radius: 8px;
- overflow: hidden;
- position: relative;
- }
- .broadcast_details_img .goods-img {
- width: 100%;
- height: 100%;
- }
- .broadcast_details_picBox {
- width: 75%;
- margin-left: 24rpx;
- .bottom {
- margin-top: 12rpx;
- }
- }
- .broadcast_details_tit {
- font-size: 28rpx;
- color: #333333;
- height: 76rpx;
- font-weight: 800;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- text-align: left !important;
- }
- .broadcast_details_pic {
- font-size: 36rpx;
- color: var(--view-priceColor);
- text-align: left;
- }
- .broadcast_details_pic_num {
- text-decoration: line-through;
- font-size: 28rpx;
- color: rgba(0, 0, 0, 0.5);
- margin-left: 0.1rem;
- }
- .broadcast_details_btn {
- width: 130rpx;
- height: 50rpx;
- background: var(--view-theme);
- opacity: 1;
- border-radius: 125rpx;
- color: #fff;
- font-size: 24rpx;
- text-align: center;
- line-height: 50rpx;
- }
- .broadcast-details_num {
- width: 100%;
- height: 80rpx;
- line-height: 80rpx;
- color: #000000;
- font-size: 26rpx;
- display: flex;
- justify-content: space-between;
- background: #fff;
- border-bottom: 1px dashed rgba(0, 0, 0, 0.2);
- padding: 0 24rpx;
- }
- .day-box {
- font-size: 24rpx;
- color: #999;
- text-align: center;
- margin-bottom: 36rpx;
- }
- .msgItem {
- &:first-child {
- .day-box {
- padding-top: 30rpx;
- }
- }
- }
- .product-off {
- display: block;
- width: 226rpx !important;
- margin: 0 auto;
- }
- </style>
- <style>
- .em {
- display: inline-block;
- width: 50rpx;
- height: 50rpx;
- margin: 40rpx 0 0 50rpx;
- /* background-size: 4100%!important;
- background-position: 2.5% 62.5%!important; */
- }
- .emoji-outer {
- position: absolute;
- right: 50rpx;
- bottom: 30rpx;
- width: 50rpx;
- height: 50rpx;
- }
- </style>
|