chat.vue 61 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889
  1. <template>
  2. <div class="broadcast-details" :style="'height:'+windowH+'px'">
  3. <view class="hd-wrapper" :class="active === true ? 'on' : ''" :style="viewColor" @click="stoppress">
  4. <view class="store-wrapper" v-if="storeInfo">
  5. <view class="left">
  6. <image :src="storeInfo.mer_avatar" mode=""></image>
  7. <view class="txt">{{storeInfo.mer_name}}</view>
  8. </view>
  9. <view class="acea-row store-opeation">
  10. <navigator v-if="hide_mer_status != 1 && storeInfo.mer_id" :url="'/pages/store/home/index?id='+storeInfo.mer_id" class="link" open-type="redirect">进店</navigator>
  11. <text v-if="storeInfo.service_phone" class="iconfont icon-dadianhua01" @click="goCustomer"></text>
  12. </view>
  13. </view>
  14. <scroll-view scroll-y="true" style="height: 100%;overflow: hidden;" :scroll-top="scrollTop" scroll-with-animation="true"
  15. @scrolltoupper="bindScroll">
  16. <div class="chat" ref="chat">
  17. <Loading :loaded="status" :loading="loading"></Loading>
  18. <view v-if="storeInfo" style="height: 100rpx;"></view>
  19. <!-- 客服聊天列表 -->
  20. <block v-for="(items,index) in history" v-if="userId != 0" :key="index">
  21. <div class="create_time">{{items.time}}</div>
  22. <block v-for="(item,j) in items.children" :key="item.service_log_id">
  23. <!-- 左边 -->
  24. <div class="item acea-row row-top" v-if="item.send_type == 0">
  25. <div v-if="item.msn_type !== 100" class="pictrue" @click="userDetail(item.user.uid)">
  26. <image :src="(item.user&&item.user.avatar) || '/static/images/f.png'" mode=""></image>
  27. </div>
  28. <view v-if="item.msn_type === 100" class="recall-msg">对方撤回了一条消息</view>
  29. <div class="text">
  30. <div class="acea-row">
  31. <!--退款订单链接-->
  32. <navigator v-if="item.msn_type === 6 && item.refundOrder && item.refundOrder.refund_order_id" open-type="navigate" :url="'/pages/order_details/index?order_id='+item.refundOrder.order_id">
  33. <div class="broadcast-details_num">
  34. <span>退款单号:{{ item.refundOrder.refund_order_sn }}</span>
  35. </div>
  36. <div class="conter acea-row row-middle">
  37. <div class="broadcast-details_order noPad" v-for="(val, inx) in item.refundOrder.refundProduct" :key="item.service_log_id">
  38. <div class="broadcast-details_box noPad" v-if="inx == 0">
  39. <div class="broadcast_details_img">
  40. <image :src="val.product.cart_info.product.image" />
  41. <div class="broadcast_details_model">
  42. {{item.refundOrder.refund_num}}件商品
  43. </div>
  44. </div>
  45. <div class="broadcast_details_picBox noPad">
  46. <div class="broadcast_details_tit">{{val.product.cart_info.product.store_name}}</div>
  47. <div class="broadcast_details_pic">
  48. ¥{{ item.refundOrder.refund_price }}
  49. </div>
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. </navigator>
  55. <!--订单链接-->
  56. <div v-if="item.msn_type === 5 && item.orderInfo && item.orderInfo.order_id">
  57. <div class="broadcast-details_num acea-row row-middle">
  58. <span>订单号:{{ item.orderInfo.order_sn }}</span>
  59. <!-- #ifdef H5 -->
  60. <button class="copy copy-data" :data-clipboard-text="item.orderInfo.order_sn">复制</button>
  61. <!-- #endif -->
  62. <!-- #ifndef H5 -->
  63. <button class="copy" @tap.stop="copyText(item.orderInfo.order_sn)">复制</button>
  64. <!-- #endif -->
  65. </div>
  66. <navigator :url="'/pages/admin/orderDetail/index?id='+item.orderInfo.order_id+'&mer_id='+item.orderInfo.mer_id" open-type="navigate" class="conter acea-row row-middle">
  67. <div class="broadcast-details_order noPad" v-for="(val, inx) in item.orderInfo.orderProduct" :key="val.id">
  68. <div class="broadcast-details_box noPad" v-if="inx == 0">
  69. <div class="broadcast_details_img">
  70. <image :src="val.cart_info.product.image" />
  71. <div class="broadcast_details_model">
  72. {{item.orderInfo.total_num}}件商品
  73. </div>
  74. </div>
  75. <div class="broadcast_details_picBox noPad">
  76. <div class="broadcast_details_tit">{{val.cart_info.product.store_name}}</div>
  77. <div class="broadcast_details_pic">
  78. ¥{{ item.orderInfo.pay_price }}
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. </navigator>
  84. </div>
  85. <!--商品链接-->
  86. <div class="conter acea-row row-middle" v-if="item.msn_type === 4 && item.product">
  87. <div class=" noPad">
  88. <navigator class="acea-row row-column-around noPad" v-if="item.product.product_id" :url="`/pages/goods_details/index?id=${item.product.product_id}`" open-type="navigate">
  89. <div class="broadcast_details_img_no">
  90. <image :src="item.product.image" />
  91. </div>
  92. <div class="broadcast_details_picBox_no noPad">
  93. <div class="broadcast_details_pic">
  94. ¥{{ item.product.price }}
  95. </div>
  96. <div class="broadcast_details_tit_no line1">{{item.product.store_name}}</div>
  97. </div>
  98. </navigator>
  99. </div>
  100. </div>
  101. <!--预售商品链接-->
  102. <div class="conter acea-row row-middle" v-if="item.msn_type === 7 && item.presell && item.presell.product">
  103. <div class=" noPad">
  104. <navigator class="acea-row row-column-around noPad" v-if="item.presell.product_presell_id" :url="`/pages/activity/presell_details/index?id=${item.presell.product_presell_id}`" open-type="navigate">
  105. <div class="broadcast_details_img_no">
  106. <image :src="item.presell.product.image" />
  107. </div>
  108. <div class="broadcast_details_picBox_no noPad">
  109. <div class="broadcast_details_pic">
  110. ¥{{ item.presell.price }}
  111. </div>
  112. <div class="broadcast_details_tit_no line1">{{item.presell.store_name}}</div>
  113. </div>
  114. </navigator>
  115. </div>
  116. </div>
  117. <!--拼团商品链接-->
  118. <div class="conter acea-row row-middle" v-if="item.msn_type === 8 && item.productGroup && item.productGroup.product">
  119. <div class=" noPad">
  120. <navigator class="acea-row row-column-around noPad" v-if="item.productGroup.product_group_id" :url="`/pages/activity/combination_details/index?id=${item.productGroup.product_group_id}`" open-type="navigate">
  121. <div class="broadcast_details_img_no">
  122. <image :src="item.productGroup.product.image" />
  123. </div>
  124. <div class="broadcast_details_picBox_no noPad">
  125. <div class="broadcast_details_pic">
  126. ¥{{ item.productGroup.product.price }}
  127. </div>
  128. <div class="broadcast_details_tit_no line1">{{item.productGroup.product.store_name}}</div>
  129. </div>
  130. </navigator>
  131. </div>
  132. </div>
  133. <div class="conter acea-row row-middle" v-if="item.msn_type === 3">
  134. <image :src="item.msn" @click="clickImg(item.msn)" mode="heightFix" />
  135. </div>
  136. <div class="conter acea-row row-middle" v-if="item.msn_type === 2">
  137. <i class="em" :class="item.msn" :style="'background-image:url('+ httpUrl +')'"></i>
  138. </div>
  139. <div class="conter acea-row row-middle" v-if="item.msn_type === 1">
  140. {{item.msn}}
  141. </div>
  142. </div>
  143. </div>
  144. </div>
  145. <!-- 右边 -->
  146. <div class="item acea-row row-top row-right" v-else @longpress="longTime(items,index,item,j)">
  147. <div class="text textR">
  148. <!-- <div class="name">{{ item.user.nickname }}</div> -->
  149. <div class="acea-row ">
  150. <!--退款订单链接-->
  151. <navigator v-if="item.msn_type === 6 && item.refundOrder.refund_order_id" open-type="navigate">
  152. <div class="broadcast-details_num acea-row row-middle">
  153. <text>订单号:{{ item.refundOrder.refund_order_sn }}</text>
  154. <!-- #ifdef H5 -->
  155. <button class="copy copy-data" :data-clipboard-text="item.refundOrder.refund_order_sn">复制</button>
  156. <!-- #endif -->
  157. <!-- #ifndef H5 -->
  158. <button class="copy" @tap.stop="copyText(item.refundOrder.refund_order_sn)">复制</button>
  159. <!-- #endif -->
  160. </div>
  161. <div class="conter acea-row row-middle">
  162. <div class="broadcast-details_order noPad" v-for="(val, inx) in item.refundOrder.refundProduct" :key="val.id">
  163. <div class="broadcast-details_box noPad" v-if="inx == 0">
  164. <div class="broadcast_details_img">
  165. <image :src="val.product.cart_info.product.image" />
  166. <div class="broadcast_details_model">
  167. {{item.refundOrder.refund_num}}件商品
  168. </div>
  169. </div>
  170. <div class="broadcast_details_picBox noPad">
  171. <div class="broadcast_details_tit">{{val.product.cart_info.product.store_name}}</div>
  172. <div class="broadcast_details_pic">
  173. ¥{{ item.refundOrder.refund_price }}
  174. </div>
  175. </div>
  176. </div>
  177. </div>
  178. </div>
  179. </navigator>
  180. <!--订单链接-->
  181. <div v-if="item.msn_type === 5 && item.orderInfo && item.orderInfo.order_id">
  182. <div class="broadcast-details_num acea-row row-middle">
  183. <text>订单号:{{ item.orderInfo.order_sn }}</text>
  184. <!-- #ifdef H5 -->
  185. <button class="copy copy-data" :data-clipboard-text="item.orderInfo.order_sn">复制</button>
  186. <!-- #endif -->
  187. <!-- #ifndef H5 -->
  188. <button class="copy" @tap.stop="copyText(item.orderInfo.order_sn)">复制</button>
  189. <!-- #endif -->
  190. </div>
  191. <navigator :url="'/pages/admin/orderDetail/index?id='+item.orderInfo.order_id+'&mer_id='+item.orderInfo.mer_id" open-type="navigate" class="conter acea-row row-middle">
  192. <div class="broadcast-details_order noPad" v-for="(val, inx) in item.orderInfo.orderProduct" :key="val.id">
  193. <div class="broadcast-details_box noPad" v-if="inx == 0">
  194. <div class="broadcast_details_img">
  195. <image :src="val.cart_info.product.image" />
  196. <div class="broadcast_details_model">
  197. {{item.orderInfo.total_num}}件商品
  198. </div>
  199. </div>
  200. <div class="broadcast_details_picBox noPad">
  201. <div class="broadcast_details_tit">{{val.cart_info.product.store_name}}</div>
  202. <div class="broadcast_details_pic">
  203. ¥{{ item.orderInfo.pay_price }}
  204. </div>
  205. </div>
  206. </div>
  207. </div>
  208. </navigator>
  209. </div>
  210. <!--商品链接-->
  211. <div class="conter acea-row row-middle" v-if="item.msn_type === 4 && item.product">
  212. <div class=" acea-row row-column-around noPad">
  213. <navigator class="acea-row row-column-around noPad" v-if="item.product.product_id" :url="`/pages/goods_details/index?id=${item.product.product_id}`">
  214. <div class="broadcast_details_img_no">
  215. <image :src="item.product.image" />
  216. </div>
  217. <div class="broadcast_details_picBox_no noPad">
  218. <div class="broadcast_details_pic">
  219. ¥{{ item.product.price }}
  220. </div>
  221. <div class="broadcast_details_tit_no line1">{{item.product.store_name}}</div>
  222. </div>
  223. </navigator>
  224. </div>
  225. </div>
  226. <!--预售商品链接-->
  227. <div class="conter acea-row row-middle" v-if="item.msn_type === 7 && item.presell && item.presell.product">
  228. <div class=" acea-row row-column-around noPad">
  229. <navigator class="acea-row row-column-around noPad" v-if="item.presell.product_presell_id" :url="`/pages/activity/presell_details/index?id=${item.presell.product_presell_id}`" open-type="navigate">
  230. <div class="broadcast_details_img_no">
  231. <image :src="item.presell.product.image" />
  232. </div>
  233. <div class="broadcast_details_picBox_no noPad">
  234. <div class="broadcast_details_pic">
  235. ¥{{ item.presell.price }}
  236. </div>
  237. <div class="broadcast_details_tit_no line1">{{item.presell.store_name}}</div>
  238. </div>
  239. </navigator>
  240. </div>
  241. </div>
  242. <!--拼团商品链接-->
  243. <div class="conter acea-row row-middle" v-if="item.msn_type === 8 && item.productGroup && item.productGroup.product">
  244. <div class=" acea-row row-column-around noPad">
  245. <navigator class="acea-row row-column-around noPad" v-if="item.productGroup.product_group_id" :url="`/pages/activity/combination_details/index?id=${item.productGroup.product_group_id}`" open-type="navigate">
  246. <div class="broadcast_details_img_no">
  247. <image :src="item.productGroup.product.image" />
  248. </div>
  249. <div class="broadcast_details_picBox_no noPad">
  250. <div class="broadcast_details_pic">
  251. ¥{{ item.productGroup.product.price }}
  252. </div>
  253. <div class="broadcast_details_tit_no line1">{{item.productGroup.product.store_name}}</div>
  254. </div>
  255. </navigator>
  256. </div>
  257. </div>
  258. <div class="conter acea-row row-middle" v-if="item.msn_type === 3">
  259. <image :src="item.msn" @click="clickImg(item.msn)" mode="heightFix" />
  260. </div>
  261. <div class="conter acea-row row-middle" v-if="item.msn_type === 2">
  262. <i class="em" :class="item.msn" :style="'background-image:url('+ httpUrl +')'"></i>
  263. </div>
  264. <div class="conter acea-row row-middle" v-if="item.msn_type === 1">
  265. {{item.msn}}
  266. </div>
  267. <view class="recall" :class="'recall'+index+j" v-if="item.longpress && press && (item.msn_type === 1 || (new Date().getTime()/1000 - item.send_time) <= 120)">
  268. <view class="recall-item" v-if="item.msn_type === 1">
  269. <!-- #ifdef H5 -->
  270. <view class="copy copy-data" :data-clipboard-text="item.msn">
  271. <text class="iconfont icon-fuzhi"></text>
  272. 复制
  273. </view>
  274. <!-- #endif -->
  275. <!-- #ifndef H5 -->
  276. <view class="copy copy-data" @tap.stop="copyText(item.msn)">
  277. <text class="iconfont icon-fuzhi"></text>
  278. 复制
  279. </view>
  280. <!-- #endif -->
  281. </view>
  282. <view v-if="(new Date().getTime()/1000 - item.send_time) <= 120" class="recall-item" @click.stop="reverstMsg(item)"><view class="iconfont icon-chehui"></view>撤回</view>
  283. </view>
  284. </div>
  285. </div>
  286. <div v-if="item.msn_type != 100" class="pictrue">
  287. <image :src="(item.service&&item.service.avatar) || '/static/images/f.png'" />
  288. </div>
  289. <view v-if="item.msn_type === 100" class="recall-msg">你撤回了一条消息</view>
  290. </div>
  291. </block>
  292. </block>
  293. <!-- 客户聊天列表 -->
  294. <block v-for="(items,index) in history" v-if="userId == 0" :key="items.time">
  295. <div class="create_time">{{items.time}}</div>
  296. <block v-for="(item,j) in items.children" :key="item.service_log_id">
  297. <!-- 左边 -->
  298. <div class="item acea-row row-top" v-if="item.send_type == 1">
  299. <div v-if="item.msn_type !== 100" class="pictrue">
  300. <image :src="(item.service&&item.service.avatar) || '/static/images/f.png'" mode=""></image>
  301. </div>
  302. <view v-if="item.msn_type === 100" class="recall-msg">对方撤回了一条消息</view>
  303. <div class="text">
  304. <!-- <div class="name">{{ item.service.nickname }}</div> -->
  305. <div class="acea-row">
  306. <!--退款订单链接-->
  307. <navigator v-if="item.msn_type === 6 && item.refundOrder.refund_order_id" open-type="navigate" :url="'/pages/order_details/index?order_id='+item.refundOrder.order_id">
  308. <div class="broadcast-details_num">
  309. <text>退款单号:{{ item.refundOrder.refund_order_sn }}</text>
  310. </div>
  311. <div class="conter acea-row row-middle">
  312. <!-- :key="item.service_log_id" -->
  313. <div class="broadcast-details_order noPad" v-for="(val, inx) in item.refundOrder.refundProduct">
  314. <div class="broadcast-details_box noPad" v-if="inx == 0">
  315. <div class="broadcast_details_img">
  316. <image :src="val.product.cart_info.product.image" />
  317. <div class="broadcast_details_model">
  318. {{item.refundOrder.refund_num}}件商品
  319. </div>
  320. </div>
  321. <div class="broadcast_details_picBox noPad">
  322. <div class="broadcast_details_tit">{{val.product.cart_info.product.store_name}}</div>
  323. <div class="broadcast_details_pic">
  324. ¥{{ val.product.cart_info.productAttr.price }}
  325. </div>
  326. </div>
  327. </div>
  328. </div>
  329. </div>
  330. </navigator>
  331. <!--订单链接-->
  332. <div v-if="item.msn_type === 5 && item.orderInfo && item.orderInfo.order_id">
  333. <div class="broadcast-details_num acea-row row-middle">
  334. <text>订单号:{{ item.orderInfo.order_sn }}</text>
  335. <!-- #ifdef H5 -->
  336. <button class="copy copy-data" :data-clipboard-text="item.orderInfo.order_sn">复制</button>
  337. <!-- #endif -->
  338. <!-- #ifndef H5 -->
  339. <button class="copy" @tap.stop="copyText(item.orderInfo.order_sn)">复制</button>
  340. <!-- #endif -->
  341. </div>
  342. <navigator :url="'/pages/order_details/index?order_id='+item.orderInfo.order_id" open-type="navigate" class="conter acea-row row-middle">
  343. <!-- :key="item.service_log_id" -->
  344. <div class="broadcast-details_order noPad" v-for="(val, inx) in item.orderInfo.orderProduct">
  345. <div class="broadcast-details_box noPad" v-if="inx == 0">
  346. <div class="broadcast_details_img">
  347. <image :src="val.cart_info.product.image" />
  348. <div class="broadcast_details_model">
  349. {{item.orderInfo.total_num}}件商品
  350. </div>
  351. </div>
  352. <div class="broadcast_details_picBox noPad">
  353. <div class="broadcast_details_tit">{{val.cart_info.product.store_name}}</div>
  354. <div class="broadcast_details_pic">
  355. ¥{{ item.orderInfo.pay_price }}
  356. </div>
  357. </div>
  358. </div>
  359. </div>
  360. </navigator>
  361. </div>
  362. <!--商品链接-->
  363. <div class="conter acea-row row-middle" v-if="item.msn_type === 4 && item.product">
  364. <div class=" noPad">
  365. <navigator class="acea-row row-column-around noPad" v-if="item.product.product_id" :url="`/pages/goods_details/index?id=${item.product.product_id}`" open-type="navigate">
  366. <div class="broadcast_details_img_no">
  367. <image :src="item.product.image" />
  368. </div>
  369. <div class="broadcast_details_picBox_no noPad">
  370. <div class="broadcast_details_pic">
  371. ¥{{ item.product.price }}
  372. </div>
  373. <div class="broadcast_details_tit_no line1">{{item.product.store_name}}</div>
  374. </div>
  375. </navigator>
  376. </div>
  377. </div>
  378. <!--预售商品链接-->
  379. <div class="conter acea-row row-middle" v-if="item.msn_type === 7 && item.presell && item.presell.product">
  380. <div class=" noPad">
  381. <navigator class="acea-row row-column-around noPad" v-if="item.presell.product_presell_id" :url="`/pages/activity/presell_details/index?id=${item.presell.product_presell_id}`" open-type="navigate">
  382. <div class="broadcast_details_img_no">
  383. <image :src="item.presell.product.image" />
  384. </div>
  385. <div class="broadcast_details_picBox_no noPad">
  386. <div class="broadcast_details_pic">
  387. ¥{{ item.presell.price }}
  388. </div>
  389. <div class="broadcast_details_tit_no line1">{{item.presell.store_name}}</div>
  390. </div>
  391. </navigator>
  392. </div>
  393. </div>
  394. <!--拼团商品链接-->
  395. <div class="conter acea-row row-middle" v-if="item.msn_type === 8 && item.productGroup && item.productGroup.product">
  396. <div class="noPad">
  397. <navigator class="acea-row row-column-around noPad" v-if="item.productGroup.product_group_id" :url="`/pages/activity/combination_details/index?id=${item.productGroup.product_group_id}`" open-type="navigate">
  398. <div class="broadcast_details_img_no">
  399. <image :src="item.productGroup.product.image" />
  400. </div>
  401. <div class="broadcast_details_picBox_no noPad">
  402. <div class="broadcast_details_pic">
  403. ¥{{ item.productGroup.product.price }}
  404. </div>
  405. <div class="broadcast_details_tit_no line1">{{item.productGroup.product.store_name}}</div>
  406. </div>
  407. </navigator>
  408. </div>
  409. </div>
  410. <div class="conter acea-row row-middle" v-if="item.msn_type === 3">
  411. <image :src="item.msn" @click="clickImg(item.msn)" mode="heightFix" />
  412. </div>
  413. <div class="conter acea-row row-middle" v-if="item.msn_type === 2">
  414. <i class="em" :class="item.msn" :style="'background-image:url('+ httpUrl +')'"></i>
  415. </div>
  416. <div class="conter acea-row row-middle" v-if="item.msn_type === 1">
  417. {{item.msn}}
  418. </div>
  419. </div>
  420. </div>
  421. </div>
  422. <!-- 右边 -->
  423. <div class="item acea-row row-top row-right" v-else>
  424. <div class="text textR">
  425. <!-- <div class="name">{{ item.user.nickname }}</div> -->
  426. <div class="acea-row" @longpress="longTime(items,index,item,j)">
  427. <!--退款订单链接-->
  428. <navigator v-if="item.msn_type === 6 && item.refundOrder.refund_order_id" open-type="navigate" :url="'/pages/order_details/index?order_id='+item.refundOrder.order_id">
  429. <div class="broadcast-details_num">
  430. <text>退款单号:{{ item.refundOrder.refund_order_sn }}</text>
  431. </div>
  432. <div class="conter acea-row row-middle">
  433. <!-- :key="item.service_log_id" -->
  434. <div class="broadcast-details_order noPad" v-for="(val, inx) in item.refundOrder.refundProduct">
  435. <div class="broadcast-details_box noPad" v-if="inx == 0">
  436. <div class="broadcast_details_img">
  437. <image :src="val.product.cart_info.product.image" />
  438. <div class="broadcast_details_model">
  439. {{item.refundOrder.refund_num}}件商品
  440. </div>
  441. </div>
  442. <div class="broadcast_details_picBox noPad">
  443. <div class="broadcast_details_tit">{{val.product.cart_info.product.store_name}}</div>
  444. <div class="broadcast_details_pic">
  445. 共{{item.refundOrder.refund_num}}件商品,
  446. 合计 ¥{{ item.refundOrder.refund_price }}
  447. </div>
  448. </div>
  449. </div>
  450. </div>
  451. </div>
  452. </navigator>
  453. <!--订单链接-->
  454. <div v-if="item.msn_type === 5 && item.orderInfo && item.orderInfo.order_id">
  455. <div class="broadcast-details_num acea-row row-middle">
  456. <text>订单号:{{ item.orderInfo.order_sn }}</text>
  457. <!-- #ifdef H5 -->
  458. <button class="copy copy-data" :data-clipboard-text="item.orderInfo.order_sn">复制</button>
  459. <!-- #endif -->
  460. <!-- #ifndef H5 -->
  461. <button class="copy" @tap.stop="copyText(item.orderInfo.order_sn)">复制</button>
  462. <!-- #endif -->
  463. </div>
  464. <navigator :url="'/pages/order_details/index?order_id='+item.orderInfo.order_id" open-type="navigate" class="conter acea-row row-middle">
  465. <div class="broadcast-details_order noPad" v-for="(val, inx) in item.orderInfo.orderProduct">
  466. <div class="broadcast-details_box noPad" v-if="inx == 0">
  467. <div class="broadcast_details_img">
  468. <image :src="val.cart_info.product.image" />
  469. <div class="broadcast_details_model">
  470. {{item.orderInfo.total_num}}件商品
  471. </div>
  472. </div>
  473. <div class="broadcast_details_picBox noPad">
  474. <div class="broadcast_details_tit">{{val.cart_info.product.store_name}}</div>
  475. <div class="broadcast_details_pic">
  476. ¥{{ item.orderInfo.pay_price }}
  477. </div>
  478. </div>
  479. </div>
  480. </div>
  481. </navigator>
  482. </div>
  483. <!--商品链接-->
  484. <div class="conter acea-row row-middle" v-if="item.msn_type === 4 && item.product">
  485. <div class="acea-row row-column-around noPad">
  486. <navigator class="acea-row row-column-around noPad" v-if="item.product.product_id" :url="`/pages/goods_details/index?id=${item.product.product_id}`" open-type="navigate">
  487. <div class="broadcast_details_img_no">
  488. <image :src="item.product.image" />
  489. </div>
  490. <div class="broadcast_details_picBox_no noPad">
  491. <div class="broadcast_details_pic">
  492. ¥{{ item.product.price }}
  493. </div>
  494. <div class="broadcast_details_tit_no line1">{{item.product.store_name}}</div>
  495. </div>
  496. </navigator>
  497. </div>
  498. </div>
  499. <!--预售商品链接-->
  500. <div class="conter acea-row row-middle" v-if="item.msn_type === 7 && item.presell && item.presell.product">
  501. <div class="acea-row row-column-around noPad">
  502. <navigator class="acea-row row-column-around noPad" v-if="item.presell.product_presell_id" :url="`/pages/activity/presell_details/index?id=${item.presell.product_presell_id}`" open-type="navigate">
  503. <div class="broadcast_details_img_no">
  504. <image :src="item.presell.product.image" />
  505. </div>
  506. <div class="broadcast_details_picBox_no noPad">
  507. <div class="broadcast_details_pic">
  508. ¥{{ item.presell.price }}
  509. </div>
  510. <div class="broadcast_details_tit_no line1">{{item.presell.store_name}}</div>
  511. </div>
  512. </navigator>
  513. </div>
  514. </div>
  515. <!--拼团商品链接-->
  516. <div class="conter acea-row row-middle" v-if="item.msn_type === 8 && item.productGroup && item.productGroup.product">
  517. <div class="acea-row row-column-around noPad">
  518. <navigator class="acea-row row-column-around noPad" v-if="item.productGroup.product_group_id" :url="`/pages/activity/combination_details/index?id=${item.productGroup.product_group_id}`" open-type="navigate">
  519. <div class="broadcast_details_img_no">
  520. <image :src="item.productGroup.product.image" />
  521. </div>
  522. <div class="broadcast_details_picBox_no noPad">
  523. <div class="broadcast_details_pic">
  524. ¥{{ item.productGroup.product.price }}
  525. </div>
  526. <div class="broadcast_details_tit_no line1">{{item.productGroup.product.store_name}}</div>
  527. </div>
  528. </navigator>
  529. </div>
  530. </div>
  531. <div class="conter acea-row row-middle" v-if="item.msn_type === 3">
  532. <image :src="item.msn" @click="clickImg(item.msn)" mode="heightFix" />
  533. </div>
  534. <div class="conter acea-row row-middle" v-if="item.msn_type === 2">
  535. <i class="em" :class="item.msn" :style="'background-image:url('+ httpUrl +')'"></i>
  536. </div>
  537. <div class="conter acea-row row-middle" v-if="item.msn_type === 1">
  538. {{ item.msn }}
  539. </div>
  540. <view class="recall" :class="'recall'+index+j" v-if="item.longpress && press && (item.msn_type === 1 || (new Date().getTime()/1000 - item.send_time) <= 120)">
  541. <view class="recall-item" v-if="item.msn_type === 1">
  542. <!-- #ifdef H5 -->
  543. <view class="copy copy-data" :data-clipboard-text="item.msn">
  544. <text class="iconfont icon-fuzhi"></text>
  545. 复制
  546. </view>
  547. <!-- #endif -->
  548. <!-- #ifndef H5 -->
  549. <view class="copy copy-data" @tap.stop="copyText(item.msn)">
  550. <text class="iconfont icon-fuzhi"></text>
  551. 复制
  552. </view>
  553. <!-- #endif -->
  554. </view>
  555. <view v-if="(new Date().getTime()/1000 - item.send_time) <= 120" class="recall-item" @click.stop="reverstMsg(item)"><view class="iconfont icon-chehui"></view>撤回</view>
  556. </view>
  557. </div>
  558. </div>
  559. <div v-if="item.msn_type !== 100" class="pictrue">
  560. <image :src="(item.user&&item.user.avatar) || '/static/images/f.png'"/>
  561. </div>
  562. <view v-if="item.msn_type === 100" class="recall-msg">你撤回了一条消息</view>
  563. </div>
  564. </block>
  565. </block>
  566. <view class="footer_box" v-if="productId || orderId || refund_order_id"></view>
  567. <div class="broadcast-details_order footer_count">
  568. <!-- 商品信息 -->
  569. <div class="broadcast-details_box" v-if="productId && productInfo.product_id">
  570. <text class="iconfont icon-guanbi" @click.stop="productId = ''"></text>
  571. <div class="broadcast_details_img">
  572. <image v-if="!presellId" :src="productInfo.image" />
  573. <image v-else :src="productInfo.product.image" />
  574. </div>
  575. <div class="broadcast_details_picBox">
  576. <div class="broadcast_details_tit">{{productInfo.store_name}}</div>
  577. <div class="acea-row row-between product_price">
  578. <div class="broadcast_details_pic p-color">
  579. ¥{{ productInfo.price}}
  580. </div>
  581. <div class="broadcast_details_btn product_btn" @click="sendProduct">发送商品</div>
  582. </div>
  583. </div>
  584. </div>
  585. <!-- 订单信息 -->
  586. <div class="broadcast_box" v-if="orderId && orderInfo.order_id">
  587. <text class="iconfont icon-guanbi" @click.stop="orderId = ''"></text>
  588. <div class="broadcast-details_num broadcast_num acea-row row-between-wrapper">
  589. <text>订单号:{{ orderInfo.order_sn }}</text>
  590. <!-- <span class="line1">{{ orderInfo.pay_time }}</span> -->
  591. </div>
  592. <div class="broadcast-details_box">
  593. <div class="broadcast_details_img">
  594. <image :src="cartInfo.cart_info.product.image" />
  595. </div>
  596. <div class="broadcast_details_picBox">
  597. <div class="broadcast_details_tit">
  598. {{ cartInfo.cart_info.product.store_name }}
  599. </div>
  600. <div>
  601. <div class="broadcast_details_pic">
  602. 共{{ orderInfo.total_num }}件商品,合计 <text class="p-color">¥{{ orderInfo.pay_price }}</text>
  603. </div>
  604. <div class="broadcast_details_btn" @click="sendOrder">
  605. 发送订单
  606. </div>
  607. </div>
  608. </div>
  609. </div>
  610. </div>
  611. <!-- 退款订单 -->
  612. <div class="broadcast_box" v-if="refund_order_id && refundDetail.refund_order_id">
  613. <text class="iconfont icon-guanbi" @click.stop="refund_order_id = ''"></text>
  614. <div class="broadcast-details_num broadcast_num">
  615. <text>退款单号:{{ refundDetail.refund_order_sn }}</text>
  616. </div>
  617. <div class="broadcast-details_box">
  618. <div class="broadcast_details_img">
  619. <image :src="refundDetail.refundProduct[0].product.cart_info.product.image" />
  620. </div>
  621. <div class="broadcast_details_picBox">
  622. <div class="broadcast_details_tit">
  623. {{ refundDetail.refundProduct[0].product.cart_info.product.store_name }}
  624. </div>
  625. <div>
  626. <div class="broadcast_details_pic">
  627. 共{{ refundDetail.refund_num }}件商品,
  628. 合计 <text class="p-color">¥{{ refundDetail.refund_price}}</text>
  629. </div>
  630. <div class="broadcast_details_btn refund_btn" @click="sendRefundOrder">
  631. 发送退款单
  632. </div>
  633. </div>
  634. </div>
  635. </div>
  636. </div>
  637. </div>
  638. </div>
  639. <div :style=" active === true ? 'height:' + footerConH + 'rem;' : 'height:' + footerH + 'rem;'"></div>
  640. </scroll-view>
  641. </view>
  642. <view style="height: 100rpx;"></view>
  643. <div class="footerCon" :class="active === true ? 'on' : ''" ref="footerCon">
  644. <form>
  645. <div class="footer acea-row row-between row-bottom" ref="footer">
  646. <text @click="uploadImg" class="iconfont icon-tupian2"></text>
  647. <text @click="emoticon" class="iconfont icon-biaoqing2"></text>
  648. <div class="voice acea-row row-center-wrapper" v-if="voice" @touchstart.prevent="start" @touchmove.prevent="move"
  649. @touchend.prevent="end">
  650. {{ speak }}
  651. </div>
  652. <view class="input_count">
  653. <input type="text" placeholder-class='placeholder' placeholder="输入内容" class="input" ref="input" v-show="!voice" @input="bindInput" @keyup="keyup"
  654. @focus="focus" cursor-spacing="20" v-model="textCon">
  655. <div class="send iconfont icon-fasong" :style="'color:'+iconColor" @click="sendTest"></div>
  656. </view>
  657. </div>
  658. </form>
  659. <div class="banner slider-banner">
  660. <swiper class="swiper-wrapper" :autoplay="autoplay" :circular="circular" :interval="interval" :duration="duration"
  661. v-if="emojiGroup.length > 0">
  662. <block v-for="(emojiList, index) in emojiGroup" :key="index">
  663. <swiper-item>
  664. <i class="em" :class="emoji" :style="'background-image:url('+ httpUrl +')'" v-for="emoji in emojiList" :key="emoji" @click="addEmoji(emoji)"></i>
  665. </swiper-item>
  666. </block>
  667. </swiper>
  668. </div>
  669. </div>
  670. <div class="recording" v-if="recording">
  671. <image src="/static/images/recording.png" />
  672. </div>
  673. </div>
  674. </template>
  675. <script>
  676. // +----------------------------------------------------------------------
  677. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  678. // +----------------------------------------------------------------------
  679. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  680. // +----------------------------------------------------------------------
  681. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  682. // +----------------------------------------------------------------------
  683. // | Author: CRMEB Team <admin@crmeb.com>
  684. // +----------------------------------------------------------------------
  685. import emojiList from "@/utils/emoji";
  686. import Socket from "@/libs/chat";
  687. // #ifdef H5
  688. import ClipboardJS from "@/plugin/clipboard/clipboard.js";
  689. // #endif
  690. import { getChatRecord, getMerHistory, chatReverstApi, hasServiceApi } from "@/api/user";
  691. import { getProductDetail, getPresellProductDetail, getStoreDetail } from "@/api/store";
  692. import { getCombinationDetail } from "@/api/activity";
  693. import { getOrderDetail, refundDetail } from "@/api/order";
  694. import Loading from "@/components/Loading";
  695. import { TOKENNAME, HTTP_REQUEST_URL } from '@/config/app.js';
  696. import { toLogin } from '@/libs/login.js';
  697. import { configMap } from "@/utils";
  698. import { mapGetters } from "vuex";
  699. const chunk = function(arr, num) {
  700. num = num * 1 || 1;
  701. var ret = [];
  702. arr.forEach(function(item, i) {
  703. if (i % num === 0) {
  704. ret.push([]);
  705. }
  706. ret[ret.length - 1].push(item);
  707. });
  708. return ret;
  709. };
  710. const NAME = "CustomerService";
  711. const PATH = 'pages/chat/customer_list/chat'
  712. const app = getApp();
  713. export default {
  714. name: NAME,
  715. components: {
  716. Loading,
  717. },
  718. props: {
  719. couponList: {
  720. type: Array,
  721. default: () => []
  722. }
  723. },
  724. computed: configMap(['hide_mer_status'],mapGetters(['isLogin', 'viewColor', 'uid'])),
  725. data: function() {
  726. return {
  727. url: `${HTTP_REQUEST_URL}/api/upload/image`,
  728. headers: {
  729. "Authori-zation": "Bearer " + this.$store.state.app.token
  730. },
  731. emojiGroup: chunk(emojiList, 21),
  732. active: false,
  733. voice: false,
  734. speak: "按住 说话",
  735. recording: false,
  736. swiperOption: {
  737. pagination: {
  738. el: ".swiper-pagination",
  739. clickable: true
  740. },
  741. speed: 1000,
  742. observer: true,
  743. observeParents: true
  744. },
  745. percent: 0,
  746. footerConH: 0,
  747. footerH: 1.08,
  748. socket: null,
  749. toUid: 0,
  750. page: 1,
  751. limit: 30,
  752. loading: false,
  753. loaded: false,
  754. history: [],
  755. sendColor: false,
  756. sendtxt: "",
  757. productId: 0,
  758. presellId: 0,
  759. combinationId: 0,
  760. productInfo: {},
  761. orderId: "",
  762. orderInfo: {},
  763. cartInfo: {},
  764. autoplay: false,
  765. circular: true,
  766. interval: 3000,
  767. duration: 500,
  768. upload_max: 2, //图片大小
  769. //上传的图片地址
  770. uploadImages: [],
  771. //展示的图片地址
  772. uploads: [],
  773. // 超出限制数组
  774. exceeded_list: [],
  775. windowH: 0,
  776. isBQ: false,
  777. scrollTop: 0, //滚动距离
  778. textCon: '', //文字
  779. iconColor: '#CCCCCC',
  780. mer_id: 0, //商铺id
  781. refund_order_id: 0, //退款订单id
  782. refundDetail: '', //退款订单详情
  783. userId: 0, //客服----用户id
  784. pageType: 0, //页面区分
  785. status: false, //砍价列表是否获取完成 false 未完成 true 完成
  786. storeInfo: '',
  787. isBack: false,
  788. httpUrl: '',
  789. press: false,
  790. index: 0,
  791. j: 0
  792. };
  793. },
  794. watch: {
  795. textCon: function(nval, oVal) {
  796. if (nval == "") {
  797. this.iconColor = '#CCCCCC'
  798. } else {
  799. this.iconColor = '#86C956'
  800. }
  801. }
  802. },
  803. beforeDestroy() {
  804. uni.$off(["socket_open", "reply", "chat", "send_chat", "socket_error", "socket_close"])
  805. },
  806. onUnload() {
  807. this.wsEnd();
  808. },
  809. onLoad(option) {
  810. let self = this
  811. this.toUid = option.uid || 0;
  812. this.productId = parseInt(option.productId) || 0;
  813. this.presellId = parseInt(option.presellId) || 0;
  814. this.combinationId = parseInt(option.combinationId) || 0;
  815. this.orderId = option.order_id || ""
  816. this.mer_id = option.mer_id || 0
  817. this.refund_order_id = option.refund_order_id || 0
  818. this.userId = option.userId || 0
  819. uni.getSystemInfo({
  820. success: function(res) {
  821. self.windowH = res.windowHeight
  822. }
  823. })
  824. // #ifdef H5
  825. this.$nextTick(function() {
  826. var clipboard = new ClipboardJS('.copy-data');
  827. clipboard.on('success', function(e) {
  828. self.$util.Tips({
  829. title:'复制成功'
  830. })
  831. self.press = false;
  832. });
  833. clipboard.on('error', function(e) {
  834. self.$util.Tips({
  835. title:'复制失败'
  836. })
  837. });
  838. });
  839. // #endif
  840. },
  841. onReady() {
  842. this.httpUrl = `${HTTP_REQUEST_URL}/static/look.png`;
  843. },
  844. mounted: function() {
  845. let that = this
  846. if (that.isLogin) {
  847. if (that.userId == 0) {
  848. // 用户
  849. that.getHistory();
  850. that.getproductInfo();
  851. that.getOrderInfo();
  852. that.getRefundDetail();
  853. that.getStoreDetail();
  854. } else {
  855. // 客服
  856. that.getMerHistory();
  857. }
  858. uni.$on("socket_open", () => {
  859. if (that.userId == 0) {
  860. that.socket.send({
  861. data: {
  862. mer_id: that.mer_id
  863. },
  864. type: "chat_start"
  865. });
  866. } else {
  867. that.socket.send({
  868. data: {
  869. uid: that.userId,
  870. mer_id: that.mer_id
  871. },
  872. type: "service_chat_start"
  873. });
  874. }
  875. });
  876. uni.$on(["reply", "chat", "send_chat"], data => {
  877. data.longpress = false
  878. if(that.history.length>0 && that.history[that.history.length-1]['children'].length > 0){
  879. let index = that.history[that.history.length-1]['children'].length-1
  880. let item = that.history[that.history.length-1]['children'][index]
  881. if(data.send_time - item.send_time > 300){
  882. that.history.push({time: data.create_time,children:[data]})
  883. }else{
  884. that.history[that.history.length-1]['children'].push(data);
  885. }
  886. }else{
  887. that.history.push({time: data.create_time,children:[data]})
  888. }
  889. that.deleteMsg(data);
  890. that.height();
  891. });
  892. uni.$on("socket_error", () => {
  893. if (!that.isBack) {
  894. let self = this
  895. uni.showModal({
  896. title: '提示',
  897. content: '连接失败,是否重新连接',
  898. success: function(res) {
  899. if (res.confirm) {
  900. self.wsStart()
  901. } else if (res.cancel) {
  902. uni.navigateBack();
  903. }
  904. }
  905. });
  906. }
  907. });
  908. uni.$on("err_tip", data => {
  909. if (!this.isBack) {
  910. uni.showModal({
  911. title: '提示',
  912. content: data,
  913. success: function(res) {
  914. if (res.confirm) {
  915. console.log('用户点击确定');
  916. } else if (res.cancel) {
  917. console.log('用户点击取消');
  918. }
  919. }
  920. });
  921. }
  922. });
  923. uni.$on("socket_close", () => {
  924. if (!this.isBack) {
  925. let curRoute = this.$mp.page.route;
  926. let self = this
  927. uni.showModal({
  928. title: '提示',
  929. content: '连接断开,是否重新连接',
  930. success: function(res) {
  931. if (res.confirm) {
  932. self.wsStart()
  933. } else if (res.cancel) {
  934. uni.navigateBack();
  935. }
  936. }
  937. });
  938. }
  939. })
  940. that.hasService();
  941. that.wsStart();
  942. } else {
  943. toLogin()
  944. }
  945. },
  946. methods: {
  947. userDetail(uid){
  948. this.wsEnd()
  949. uni.redirectTo({
  950. url: `/pages/chat/customer_info/index?uid=${uid}&mer_id=${this.mer_id}`
  951. })
  952. },
  953. /*判断店铺是否有在线客服*/
  954. hasService(){
  955. hasServiceApi(this.mer_id).then(res => {
  956. this.height();
  957. if (this.userId == 0) {
  958. // 用户
  959. this.getHistory();
  960. } else {
  961. // 客服
  962. this.getMerHistory();
  963. }
  964. }).catch(err => {
  965. return this.$util.Tips({
  966. title: err
  967. }, {
  968. tab: 3,
  969. url: 1
  970. });
  971. });
  972. },
  973. // 联系客服拨打电话
  974. goCustomer(){
  975. uni.makePhoneCall({
  976. // 手机号
  977. phoneNumber: this.storeInfo.service_phone,
  978. // 成功回调
  979. success: (res) => {},
  980. // 失败回调
  981. fail: (res) => {}
  982. });
  983. },
  984. // 获取店铺详情
  985. getStoreDetail() {
  986. getStoreDetail(this.mer_id).then(res => {
  987. this.storeInfo = res.data
  988. })
  989. },
  990. // ws连接
  991. wsStart() {
  992. this.socket = new Socket();
  993. this.height();
  994. },
  995. // ws关闭
  996. wsEnd() {
  997. let that = this;
  998. if (that.userId == 0) {
  999. that.socket.send({
  1000. data: {
  1001. mer_id: that.mer_id
  1002. },
  1003. type: "chat_end"
  1004. });
  1005. } else {
  1006. that.socket.send({
  1007. data: {
  1008. uid: that.userId,
  1009. mer_id: that.mer_id
  1010. },
  1011. type: "service_chat_end"
  1012. });
  1013. }
  1014. that.isBack = true
  1015. that.socket && that.socket.onClose();
  1016. },
  1017. // 删除数组中已撤回的消息
  1018. deleteMsg(data){
  1019. let that = this;
  1020. that.history.forEach(function(item, index) {
  1021. item.children.forEach(function(itx, i) {
  1022. if(data.msn_type == 100 && data.msn == itx.service_log_id){
  1023. item.children.splice(i,1)
  1024. }
  1025. });
  1026. });
  1027. },
  1028. // 退款订单
  1029. getRefundDetail() {
  1030. if (this.refund_order_id) {
  1031. refundDetail(this.refund_order_id).then(res => {
  1032. this.refundDetail = res.data
  1033. })
  1034. }
  1035. },
  1036. uploadImg() {
  1037. let self = this
  1038. self.$util.uploadImageOne('upload/image', function(res) {
  1039. if(res.status == 200){
  1040. self.sendMsg(res.data.path, 3)
  1041. }
  1042. });
  1043. },
  1044. /*长按事件*/
  1045. longTime(items,index,item,j){
  1046. item.longpress = true
  1047. this.history[this.index]['children'][this.j]['longpress'] = false
  1048. this.press = true
  1049. this.index = index;
  1050. this.j = j
  1051. this.history[this.index]['children'][this.j]['longpress'] = true
  1052. },
  1053. stoppress() {
  1054. this.press = false
  1055. },
  1056. reverstMsg(item) {
  1057. this.sendMsg(item.service_log_id,100)
  1058. setTimeout(function(){
  1059. item.longpress = false;
  1060. },300)
  1061. },
  1062. getOrderInfo() {
  1063. if (!this.orderId) return;
  1064. getOrderDetail(this.orderId).then(res => {
  1065. this.orderInfo = res.data;
  1066. if (this.orderInfo.orderProduct.length) {
  1067. this.cartInfo = this.orderInfo.orderProduct[0];
  1068. }
  1069. });
  1070. },
  1071. getproductInfo() {
  1072. let that = this;
  1073. if (!that.productId && !that.presellId && !that.combinationId) return;
  1074. if(that.presellId || that.combinationId){
  1075. if(that.presellId){
  1076. getPresellProductDetail(that.presellId).then(res => {
  1077. that.productInfo = res.data;
  1078. });
  1079. }else if(that.combinationId){
  1080. getCombinationDetail(that.combinationId).then(res => {
  1081. that.productInfo = res.data.product;
  1082. });
  1083. }
  1084. }else{
  1085. getProductDetail(that.productId).then(res => {
  1086. that.productInfo = res.data;
  1087. });
  1088. }
  1089. },
  1090. scroll() {
  1091. if (window.scrollY < 300 && !this.loaded && !this.loading)
  1092. this.getHistory();
  1093. },
  1094. imageuploaded(res) {
  1095. if (res.status !== 200)
  1096. return this.$util.Tips({
  1097. title: res.message || "上传图片失败"
  1098. });
  1099. this.sendMsg(res.data.url, 3);
  1100. },
  1101. // 用户聊天记录
  1102. getHistory() {
  1103. if (this.loading || this.loaded) return;
  1104. this.loading = true;
  1105. getChatRecord(this.mer_id, {
  1106. page: this.page,
  1107. limit: this.limit
  1108. }).then(({data}) => {
  1109. let arr = this.getChatTime(data.list)
  1110. let newArr = []
  1111. for(var j in arr){
  1112. let key = j
  1113. let item = {}
  1114. item.time = key;
  1115. arr[j].forEach(function(itm, i) {
  1116. itm.longpress = false
  1117. });
  1118. item.children = arr[j]
  1119. newArr.push(item)
  1120. }
  1121. this.history = newArr.concat(this.history);
  1122. if (this.page === 1) {
  1123. this.$nextTick(function() {
  1124. this.height();
  1125. });
  1126. }
  1127. this.page++;
  1128. this.loading = false;
  1129. this.loaded = data.length < this.limit;
  1130. })
  1131. .catch(err => {
  1132. this.$util.Tips({
  1133. title: err.message || "加载失败"
  1134. });
  1135. });
  1136. },
  1137. // 处理聊天时间
  1138. getChatTime(list){
  1139. let arr = {}
  1140. let currentTime = ''
  1141. for(var i=0; i<list.length;i++){
  1142. if(i == 0){
  1143. let time = list[i]['create_time']
  1144. arr[time] = [list[i]]
  1145. currentTime = time
  1146. }else{
  1147. if((list[i]['send_time'] - list[i-1]['send_time']) <= 300 ){
  1148. arr[currentTime].push(list[i])
  1149. }else{
  1150. let time = list[i]['create_time']
  1151. currentTime = time
  1152. if(arr[time]){
  1153. arr[currentTime].push(list[i])
  1154. }else{
  1155. arr[time] = [list[i]]
  1156. }
  1157. }
  1158. }
  1159. }
  1160. return arr;
  1161. },
  1162. // 客服聊天记录
  1163. getMerHistory() {
  1164. if (this.loading || this.loaded) return;
  1165. this.loading = true;
  1166. const last_id = this.history.length ? this.history[0].service_log_id : '';
  1167. getMerHistory(this.userId, this.mer_id, {
  1168. page: this.page,
  1169. limit: this.limit,
  1170. last_id
  1171. })
  1172. .then(({
  1173. data
  1174. }) => {
  1175. let arr = this.getChatTime(data.list)
  1176. let newArr = []
  1177. for(var j in arr){
  1178. let key = j
  1179. let item = {}
  1180. item.time = key;
  1181. arr[j].forEach(function(itm, i) {
  1182. itm.longpress = false
  1183. });
  1184. item.children = arr[j]
  1185. newArr.push(item)
  1186. }
  1187. this.history = newArr.concat(this.history);
  1188. if (this.page === 1) {
  1189. this.$nextTick(function() {
  1190. this.height();
  1191. });
  1192. }
  1193. this.page++;
  1194. this.loading = false;
  1195. this.loaded = data.length < this.limit;
  1196. })
  1197. .catch(err => {
  1198. this.$util.Tips({
  1199. title: err.message || "加载失败"
  1200. });
  1201. });
  1202. },
  1203. focus: function() {
  1204. this.active = false;
  1205. },
  1206. keyup: function() {
  1207. if (this.$refs.input.value.length > 0) {
  1208. this.sendColor = true;
  1209. } else {
  1210. this.sendColor = false;
  1211. }
  1212. },
  1213. addEmoji(name) {
  1214. this.sendMsg(name, 2);
  1215. },
  1216. // 聊天表情转换
  1217. replace_em(str) {
  1218. str = str.replace(/\[em-([\s\S]*)\]/g, "<span class='em em-$1' style='background-image:url(" + this
  1219. .httpUrl + ")'></span>");
  1220. return str;
  1221. },
  1222. clickImg(url){
  1223. wx.previewImage({
  1224. urls: [url],
  1225. current: "",
  1226. success: function(res){},
  1227. fail: function(res){},
  1228. complate: function(res){}
  1229. })
  1230. },
  1231. sendMsg(msn, type) {
  1232. let self = this;
  1233. if (this.userId == 0) {
  1234. this.height();
  1235. this.socket.send({
  1236. data: {
  1237. msn,
  1238. msn_type: type,
  1239. // to_uid: this.toUid,
  1240. mer_id: self.mer_id
  1241. },
  1242. type: "send_chat",
  1243. })
  1244. } else {
  1245. this.height();
  1246. this.socket.send({
  1247. data: {
  1248. msn,
  1249. msn_type: type,
  1250. // to_uid: this.toUid,
  1251. uid: self.userId,
  1252. mer_id: self.mer_id
  1253. },
  1254. type: "service_chat",
  1255. })
  1256. }
  1257. },
  1258. sendTest() {
  1259. this.sendMsg(this.textCon, 1);
  1260. this.textCon = ''
  1261. this.height();
  1262. },
  1263. sendProduct() {
  1264. if(this.presellId || this.combinationId){
  1265. if(this.presellId){
  1266. this.sendMsg(this.presellId, 7);
  1267. this.presellId = 0;
  1268. }else if(this.combinationId){
  1269. this.sendMsg(this.combinationId, 8);
  1270. this.combinationId = 0;
  1271. }
  1272. }else{
  1273. this.sendMsg(this.productId, 4);
  1274. this.productId = 0;
  1275. }
  1276. this.productInfo = {};
  1277. },
  1278. sendOrder() {
  1279. this.sendMsg(this.orderId, 5);
  1280. this.orderId = 0;
  1281. this.orderInfo = {};
  1282. },
  1283. sendRefundOrder() {
  1284. this.sendMsg(this.refund_order_id, 6);
  1285. this.refund_order_id = 0;
  1286. this.refundDetail = {};
  1287. },
  1288. bindInput: function(e) {
  1289. if (e.detail.value) {
  1290. this.sendColor = true
  1291. } else {
  1292. this.sendColor = false
  1293. }
  1294. this.height();
  1295. },
  1296. start() {
  1297. var that = this;
  1298. this.longClick = 0;
  1299. this.timeOutEvent = setTimeout(function() {
  1300. that.longClick = 1;
  1301. }, 500);
  1302. that.speak = "松开 结束";
  1303. that.recording = true;
  1304. },
  1305. move() {
  1306. clearTimeout(this.timeOutEvent);
  1307. this.timeOutEvent = 0;
  1308. },
  1309. end() {
  1310. clearTimeout(this.timeOutEvent);
  1311. if (this.timeOutEvent !== 0 && this.longClick === 0) {
  1312. //点击
  1313. //此处为点击事件----在此处添加跳转详情页
  1314. }
  1315. this.speak = "按住 说话";
  1316. this.recording = false;
  1317. return false;
  1318. },
  1319. voiceBnt: function() {
  1320. this.active = false;
  1321. if (this.voice === true) {
  1322. this.voice = false;
  1323. this.$nextTick(function() {
  1324. this.$refs.input.focus();
  1325. });
  1326. } else {
  1327. this.voice = true;
  1328. }
  1329. this.percent = 0;
  1330. this.footerConH = 0;
  1331. this.footerH = 0;
  1332. this.$nextTick(function() {
  1333. this.height();
  1334. });
  1335. },
  1336. emoticon: function() {
  1337. this.voice = false;
  1338. if (this.active === true) {
  1339. this.active = false;
  1340. this.isBQ = false
  1341. } else {
  1342. this.active = true;
  1343. this.isBQ = true
  1344. }
  1345. this.height();
  1346. },
  1347. height() {
  1348. let self = this
  1349. var scrollTop = 0
  1350. let info = uni.createSelectorQuery().select(".chat");
  1351. setTimeout(res => {
  1352. (!this.isBack) && info.boundingClientRect(function(data) { //data - 各种参数
  1353. scrollTop = data.height
  1354. if (self.active) {
  1355. self.scrollTop = parseInt(scrollTop) + 500
  1356. } else {
  1357. self.scrollTop = parseInt(scrollTop) + 100
  1358. }
  1359. }).exec()
  1360. }, 1000)
  1361. },
  1362. // 滚动到头部
  1363. bindScroll() {
  1364. if (this.userId == 0) {
  1365. this.getHistory();
  1366. this.getproductInfo();
  1367. this.getOrderInfo();
  1368. this.getRefundDetail();
  1369. this.getStoreDetail();
  1370. } else {
  1371. this.getMerHistory();
  1372. }
  1373. },
  1374. //#ifndef H5
  1375. copyText:function(text){
  1376. uni.setClipboardData({ data: text});
  1377. },
  1378. // #endif
  1379. }
  1380. };
  1381. </script>
  1382. <style lang="scss" scoped>
  1383. page {
  1384. width: 100%;
  1385. height: 100%;
  1386. }
  1387. // @import url("@/plugin/emoji-awesome/css/google.min.css");
  1388. @import "@/plugin/emoji-awesome/css/tuoluojiang.css";
  1389. .noPad {
  1390. padding: 0 !important;
  1391. margin-bottom: 0 !important;
  1392. height: auto !important;
  1393. }
  1394. .broadcast-details_num {
  1395. width: 100%;
  1396. height: 72rpx;
  1397. line-height: 72rpx;
  1398. color: #666666;
  1399. font-size: 26rpx;
  1400. display: flex;
  1401. justify-content: space-between;
  1402. background: #fff;
  1403. border-bottom: 1px solid #F5F5F5;
  1404. padding: 0 24rpx;
  1405. border-radius: 10rpx 10rpx 0 0;
  1406. .line1{
  1407. max-width: 203rpx;
  1408. }
  1409. }
  1410. uni-swiper-item{
  1411. background: #fff;
  1412. }
  1413. .footer_count{
  1414. margin-top: 20rpx;
  1415. width: 710rpx;
  1416. position: fixed;
  1417. bottom: 120rpx;
  1418. bottom: calc(120rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  1419. bottom: calc(120rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  1420. left: 20rpx;
  1421. .broadcast-details_box,.broadcast_box{
  1422. margin-bottom: 0;
  1423. position: relative;
  1424. }
  1425. .icon-guanbi{
  1426. font-size: 20rpx;
  1427. color: #C4C4C4;
  1428. position: absolute;
  1429. right: 20rpx;
  1430. top: 20rpx;
  1431. }
  1432. }
  1433. .broadcast-details_order {
  1434. // padding: 15rpx;
  1435. }
  1436. .copy {
  1437. color: var(--view-theme);
  1438. margin-left: 24rpx;
  1439. font-size: 22rpx;
  1440. opacity: .5;
  1441. }
  1442. .broadcast-details_box {
  1443. padding: 20rpx;
  1444. display: flex;
  1445. background: #fff;
  1446. border-radius: 0 0 10rpx 10rpx;
  1447. margin-bottom: 24rpx;
  1448. }
  1449. .broadcast_details_model {
  1450. width: 100%;
  1451. height: 43rpx;
  1452. background: rgba(0, 0, 0, 0.5);
  1453. border-radius: 0 0 16rpx 16rpx;
  1454. position: absolute;
  1455. z-index: 0;
  1456. bottom: 0;
  1457. font-size: 22rpx;
  1458. color: #fff;
  1459. text-align: center;
  1460. line-height: 43rpx;
  1461. }
  1462. .broadcast_details_img {
  1463. width: 160rpx;
  1464. height: 160rpx;
  1465. border-radius: 10px;
  1466. overflow: hidden;
  1467. position: relative;
  1468. }
  1469. .broadcast_details_img uni-image,.broadcast_details_img image{
  1470. width: 160rpx;
  1471. height: 160rpx;
  1472. }
  1473. .broadcast_details_img_no {
  1474. width: 456rpx;
  1475. height: 456rpx;
  1476. border-radius: 10px 10px 0px 0px;
  1477. overflow: hidden;
  1478. margin-bottom: 10rpx;
  1479. }
  1480. .broadcast_details_picBox_no {
  1481. width: 100%;
  1482. }
  1483. .broadcast_details_img_no uni-image, .broadcast_details_img_no img{
  1484. width: 100%;
  1485. height: 100%;
  1486. }
  1487. .broadcast_details_tit {
  1488. font-size: 30rpx;
  1489. color: #282828;
  1490. // height: 30rpx;
  1491. max-width: 400rpx;
  1492. overflow: hidden;
  1493. text-overflow: ellipsis;
  1494. display: -webkit-box;
  1495. -webkit-line-clamp: 1;
  1496. -webkit-box-orient: vertical;
  1497. text-align: left !important;
  1498. }
  1499. .product_price{
  1500. margin-top: 66rpx;
  1501. }
  1502. .broadcast_details_tit_no {
  1503. font-size: 28rpx;
  1504. color: #333333;
  1505. font-weight: 800;
  1506. text-align: left;
  1507. margin-top: 5rpx;
  1508. max-width: 420rpx;
  1509. }
  1510. .broadcast_details_picBox {
  1511. width: 75%;
  1512. margin-left: 24rpx;
  1513. }
  1514. .broadcast_details_pic {
  1515. margin-top: 15rpx;
  1516. font-size: 24rpx;
  1517. color: #999999;
  1518. text-align: left;
  1519. }
  1520. .broadcast_details_pic_num {
  1521. text-decoration: line-through;
  1522. font-size: 28rpx;
  1523. color: rgba(0, 0, 0, 0.5);
  1524. margin-left: 0.1rem;
  1525. }
  1526. .broadcast_details_btn {
  1527. width: 130rpx;
  1528. height: 50rpx;
  1529. background: var(--view-theme);
  1530. opacity: 1;
  1531. border-radius: 125rpx;
  1532. color: #fff;
  1533. font-size: 24rpx;
  1534. text-align: center;
  1535. line-height: 50rpx;
  1536. margin-top: 16px;
  1537. float: right;
  1538. &.product_btn{
  1539. margin-top: 0;
  1540. float: none;
  1541. }
  1542. &.refund_btn{
  1543. width: 150rpx;
  1544. }
  1545. }
  1546. .p-color {
  1547. color: var(--view-priceColor);
  1548. }
  1549. .broadcast-details .chat {
  1550. padding: 1rpx 23rpx 0 23rpx;
  1551. margin-bottom: 3rpx;
  1552. }
  1553. .broadcast-details .chat .item {
  1554. margin-top: 37rpx;
  1555. }
  1556. .broadcast-details .create_time {
  1557. dislay: block;
  1558. width: 100%;
  1559. text-align: center;
  1560. color: #999999;
  1561. font-size: 22rpx;
  1562. margin: 30rpx 0;
  1563. }
  1564. .broadcast-details .chat .item .pictrue {
  1565. width: 80rpx;
  1566. height: 80rpx;
  1567. margin-top: 10rpx;
  1568. }
  1569. .broadcast-details .chat .item .pictrue image {
  1570. width: 100%;
  1571. height: 100%;
  1572. border-radius: 50%;
  1573. }
  1574. .broadcast-details .chat .item .text {
  1575. margin-left: 20rpx;
  1576. }
  1577. .broadcast-details .chat .item .text.textR {
  1578. text-align: right;
  1579. margin: 0 20rpx 0 0;
  1580. position: relative;
  1581. .recall{
  1582. position: absolute;
  1583. width: 220rpx;
  1584. height: 114rpx;
  1585. border-radius: 6rpx;
  1586. background: #4C4C4C;
  1587. color: #fff;
  1588. top: -140rpx;
  1589. right: 0;
  1590. display: flex;
  1591. align-items: center;
  1592. justify-content: center;
  1593. z-index: 200;
  1594. &.recall00{
  1595. top: auto;
  1596. bottom: -130rpx;
  1597. &::after{
  1598. border-top-color: transparent;
  1599. border-bottom-color: rgba(0,0,0,.6);
  1600. bottom: auto;
  1601. top: -26rpx;
  1602. }
  1603. }
  1604. &::after{
  1605. content: "";
  1606. display: block;
  1607. border: 14rpx solid transparent;
  1608. border-top-color: rgba(0,0,0,.6);
  1609. position: absolute;
  1610. bottom: -26rpx;
  1611. right: 30rpx;
  1612. }
  1613. .recall-item{
  1614. text-align: center;
  1615. margin: 0 30rpx;
  1616. font-size: 24rpx;
  1617. .copy-data{
  1618. color: #fff;
  1619. margin-left: 0;
  1620. opacity: 1;
  1621. }
  1622. .iconfont{
  1623. display: block;
  1624. font-size: 32rpx;
  1625. margin-bottom: 8rpx;
  1626. }
  1627. }
  1628. }
  1629. }
  1630. .broadcast-details .chat .item .text .name {
  1631. font-size: 24rpx;
  1632. color: #999;
  1633. }
  1634. .broadcast-details .chat .item .text .name .return {
  1635. color: #509efb;
  1636. margin-left: 17rpx;
  1637. }
  1638. .broadcast-details .chat .item .text.textR .name .return {
  1639. margin: 0 0.17rem 0 0;
  1640. }
  1641. .broadcast-details .chat .item .text .conter {
  1642. background-color: #fff;
  1643. border-radius: 8rpx;
  1644. padding: 16rpx 20rpx;
  1645. font-size: 30rpx;
  1646. color: #333;
  1647. position: relative;
  1648. max-width: 600rpx;
  1649. margin-top: 2rpx;
  1650. word-break: break-all;
  1651. text-align: left;
  1652. .em{
  1653. margin: 0;
  1654. }
  1655. }
  1656. .recall-msg {
  1657. display: block;
  1658. width: 100%;
  1659. text-align: center;
  1660. color: #999;
  1661. font-size: 24rpx;
  1662. margin: 10rpx 0;
  1663. }
  1664. .broadcast-details .chat .item .text .spot {
  1665. width: 15rpx;
  1666. height: 15rpx;
  1667. background-color: #c00000;
  1668. border-radius: 50%;
  1669. margin-left: 20rpx;
  1670. }
  1671. .broadcast-details .chat .item .text .conter:before {
  1672. position: absolute;
  1673. content: "";
  1674. width: 0;
  1675. height: 0;
  1676. border-bottom: 9rpx solid transparent;
  1677. border-right: 14rpx solid #fff;
  1678. border-top: 9rpx solid transparent;
  1679. left: -14rpx;
  1680. top: 25rpx;
  1681. }
  1682. .broadcast-details .chat .item .text.textR .conter:before {
  1683. left: unset;
  1684. right: -14rpx;
  1685. transform: rotateY(180deg);
  1686. }
  1687. .broadcast-details .chat .item .text .conter img {
  1688. /* #ifdef H5 */
  1689. width: 100%;
  1690. /* #endif */
  1691. display: block;
  1692. }
  1693. .broadcast-details .chat .item .text .conter .signal {
  1694. width: 48rpx;
  1695. height: 48rpx;
  1696. }
  1697. .broadcast-details .chat .item .text .conter .signal.signalR {
  1698. transform: rotate(180deg);
  1699. -ms-transform: rotate(180deg);
  1700. -webkit-transform: rotate(180deg);
  1701. }
  1702. .broadcast-details .footerCon {
  1703. height: 100rpx;
  1704. width: 100%;
  1705. transition: all 0.005s cubic-bezier(0.25, 0.5, 0.5, 0.9);
  1706. background-color: #fff;
  1707. position: fixed;
  1708. bottom: 0;
  1709. height: calc(100rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  1710. height: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  1711. left: 0;
  1712. }
  1713. .broadcast-details .footerCon .banner {
  1714. background: #fff;
  1715. margin-top: calc(0rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  1716. margin-top: calc(0rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  1717. }
  1718. .broadcast-details .footerCon.on {
  1719. position: relative;
  1720. top: -300rpx;
  1721. transform: translate3d(0, 0, 0) !important;
  1722. .banner{
  1723. margin-top: 0;
  1724. }
  1725. }
  1726. .broadcast-details .footerCon .banner .swiper-slide {
  1727. flex-wrap: wrap;
  1728. -webkit-flex-wrap: wrap;
  1729. background-color: #fff;
  1730. padding-bottom: 50rpx;
  1731. border-top: 1px solid #f5f5f5;
  1732. }
  1733. .broadcast-details .footerCon .banner .swiper-slide .emoji-outer,
  1734. .swiper-slide .em {
  1735. display: block;
  1736. width: 50rpx;
  1737. height: 50rpx;
  1738. margin: 40rpx 0 0 50rpx;
  1739. }
  1740. .broadcast-details .footerCon .banner .swiper-container-horizontal>.swiper-pagination-bullets {
  1741. bottom: 10rpx;
  1742. }
  1743. .broadcast-details .footerCon .slider-banner .swiper-pagination-bullet-active {
  1744. background-color: #999;
  1745. }
  1746. .broadcast-details .recording {
  1747. width: 300rpx;
  1748. height: 300rpx;
  1749. position: fixed;
  1750. top: 40%;
  1751. left: 50%;
  1752. margin-left: -150rpx;
  1753. }
  1754. .broadcast-details .recording img {
  1755. width: 100%;
  1756. height: 100%;
  1757. }
  1758. .broadcast-details .footer {
  1759. // width: 100%;
  1760. background-color: #fff;
  1761. padding: 17rpx 26rpx;
  1762. align-items: center;
  1763. }
  1764. .footer_box{
  1765. margin-top: 260rpx;
  1766. }
  1767. .broadcast-details .footer image {
  1768. width: 61rpx;
  1769. height: 60rpx;
  1770. display: block;
  1771. }
  1772. .broadcast-details .footer .icon-biaoqing2,.broadcast-details .footer .icon-tupian2 {
  1773. font-size: 60rpx;
  1774. display: block;
  1775. }
  1776. .broadcast-details .footer .voice {
  1777. width: 440rpx;
  1778. border-radius: 10rpx;
  1779. background-color: #e5e5e5;
  1780. /* padding: 17rpx 30rpx; */
  1781. height: 60rpx;
  1782. padding-left: 20rpx;
  1783. }
  1784. .broadcast-details .footer .input_count{
  1785. margin-left: 20rpx;
  1786. width: 544rpx;
  1787. box-sizing: border-box;
  1788. border-radius: 38rpx;
  1789. background-color: #F6F6F6;
  1790. padding: 0 80rpx 0 30rpx;
  1791. height: 76rpx;
  1792. position: relative;
  1793. }
  1794. .broadcast-details .footer .placeholder{
  1795. color: #999999;
  1796. font-size: 26rpx;
  1797. }
  1798. .broadcast-details .footer .input{
  1799. max-height: 150rpx;
  1800. overflow-y: auto;
  1801. overflow-x: hidden;
  1802. color: #999999;
  1803. height: 76rpx;
  1804. font-size: 26rpx;
  1805. }
  1806. .broadcast-details .footer .send {
  1807. font-size: 48rpx;
  1808. color: #cccccc;
  1809. position: absolute;
  1810. right: 15rpx;
  1811. top: 15rpx;
  1812. }
  1813. .em {
  1814. display: inline-block;
  1815. width: 50rpx;
  1816. height: 50rpx;
  1817. margin: 40rpx 0 0 50rpx;
  1818. }
  1819. .emoji-outer {
  1820. position: absolute;
  1821. right: 70rpx;
  1822. /* bottom: 12rpx; */
  1823. width: 50rpx;
  1824. height: 50rpx;
  1825. margin: 40rpx 0 0 50rpx;
  1826. }
  1827. .broadcast-details {
  1828. display: flex;
  1829. flex-direction: column;
  1830. width: 100%;
  1831. overflow: hidden;
  1832. .hd-wrapper {
  1833. flex: 1;
  1834. display: flex;
  1835. flex-direction: column;
  1836. overflow: hidden;
  1837. &.on {
  1838. padding-bottom: 300rpx;
  1839. }
  1840. }
  1841. }
  1842. .store-wrapper {
  1843. display: flex;
  1844. align-items: center;
  1845. justify-content: space-between;
  1846. padding: 15rpx 20rpx;
  1847. background-color: #fff;
  1848. width: 100%;
  1849. position: fixed;
  1850. top: 0;
  1851. left: 0;
  1852. z-index: 100;
  1853. image {
  1854. width: 60rpx;
  1855. height: 60rpx;
  1856. margin-right: 10rpx;
  1857. }
  1858. .left {
  1859. display: flex;
  1860. align-items: center;
  1861. }
  1862. .link {
  1863. width: 80rpx;
  1864. height: 40rpx;
  1865. line-height: 38rpx;
  1866. border: 1px solid var(--view-theme);
  1867. border-radius: 20px;
  1868. font-size: 24rpx;
  1869. color: var(--view-theme);
  1870. text-align: center;
  1871. }
  1872. .store-opeation{
  1873. align-items: center;
  1874. .icon-dadianhua01{
  1875. color: var(--view-theme);
  1876. margin-left: 28rpx;
  1877. font-size: 34rpx;
  1878. }
  1879. }
  1880. }
  1881. </style>