im.vue 88 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160
  1. <template>
  2. <view>
  3. <!-- 顶部操作 -->
  4. <view class="topSe flex justify-center" v-if="userType==1">
  5. <view class="topSe-box flex align-center justify-around">
  6. <view class="topSe-box-item flex flex-wrap justify-center" @click="currentPhone()">
  7. <image src="../../static/im/mobilePhone.png" style="width: 40rpx;height: 40rpx;" mode=""></image>
  8. <view class="" style="color: #999999;">
  9. 换电话
  10. </view>
  11. </view>
  12. <view class="topSe-box-item flex flex-wrap justify-center" @click="currentWchat()">
  13. <image src="../../static/im/weiChat.png" style="width: 40rpx;height: 40rpx;" mode=""></image>
  14. <view class="" style="color: #999999;">
  15. 换微信
  16. </view>
  17. </view>
  18. <view class="topSe-box-item flex flex-wrap justify-center" @click="sendResumes()">
  19. <image src="../../static/im/orderInfo.png" style="width: 40rpx;height: 40rpx;" mode=""></image>
  20. <view class="" style="color: #999999;">
  21. 发简历
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. <view class="topSe flex justify-center" v-else>
  27. <view class="topSe-box flex align-center justify-around">
  28. <view class="topSe-box-item flex flex-wrap justify-center" @click="currentPhone()">
  29. <image src="../../static/im/mobilePhone.png" style="width: 40rpx;height: 40rpx;" mode=""></image>
  30. <view class="" style="color: #999999;">
  31. 换电话
  32. </view>
  33. </view>
  34. <view class="topSe-box-item flex flex-wrap justify-center" @click="currentWchat()">
  35. <image src="../../static/im/weiChat.png" style="width: 40rpx;height: 40rpx;" mode=""></image>
  36. <view class="" style="color: #999999;">
  37. 换微信
  38. </view>
  39. </view>
  40. <view class="topSe-box-item flex flex-wrap justify-center" @click="giveSendResumes()">
  41. <image src="../../static/im/orderInfo.png" style="width: 40rpx;height: 40rpx;" mode=""></image>
  42. <view class="" style="color: #999999;">
  43. 求简历
  44. </view>
  45. </view>
  46. <view class="topSe-box-item flex flex-wrap justify-center" @click="mianshiF()">
  47. <image src="../../static/im/mianshi.png" style="width: 40rpx;height: 40rpx;" mode=""></image>
  48. <view class="" style="color: #999999;">
  49. 约面试
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. <scroll-view scroll-y="true" @touchstart="hideDrawer" @scroll="scroll" :scroll-top="scrollTop"
  55. style="height: calc(100vh - 200rpx);width: 100%;padding: 20rpx 0;">
  56. <!-- 温馨提示 -->
  57. <view class="xuanfu">
  58. <view class="xuanfu-box flex">
  59. <view class="" style="margin-right: 10rpx;">
  60. <!-- <image style="width: 30rpx;height: 30rpx;"
  61. src="https://zhaopin.xianmaxiong.com/file/uploadPath/2022/09/07/85e0d70ba1d9a78463b36bf7f92f6dca.png"
  62. mode=""></image> -->
  63. </view>
  64. <view class="">
  65. {{messages}}
  66. </view>
  67. </view>
  68. </view>
  69. <!-- 岗位简介 -->
  70. <view class="jobs flex justify-center" v-if="JSON.stringify(postPushInfo)!='{}'">
  71. <view class="jobs-box">
  72. <view class="gwList-box-item flex justify-center" @click="gotoInfo(postPushInfo.postPushId)">
  73. <view class="gwList-box-item-box">
  74. <view class="gwList-box-item-box-title flex justify-between align-center">
  75. <text>{{postPushInfo.stationName}}</text>
  76. <text>{{postPushInfo.salaryRange}}</text>
  77. </view>
  78. <view class="gwList-box-item-box-label flex align-center flex-wrap">
  79. <text
  80. style="color: #666666;font-size: 26rpx;padding: 10rpx 25rpx 10rpx 25rpx;background-color: #F6F6F6;border-radius: 8rpx;margin-right: 20rpx;margin-bottom: 20rpx;">
  81. {{postPushInfo.education}}
  82. </text>
  83. <text
  84. style="color: #666666;font-size: 26rpx;padding: 10rpx 25rpx 10rpx 25rpx;background-color: #F6F6F6;border-radius: 8rpx;margin-right: 20rpx;margin-bottom: 20rpx;">
  85. {{postPushInfo.experience}}
  86. </text>
  87. <text
  88. style="color: #666666;font-size: 26rpx;padding: 10rpx 25rpx 10rpx 25rpx;background-color: #F6F6F6;border-radius: 8rpx;margin-right: 20rpx;margin-bottom: 20rpx;"
  89. v-for="(ite,ind) in postPushInfo.positionWelfare" :key="ind">{{ite}}</text>
  90. </view>
  91. <view class="gwList-box-item-box-name flex justify-between align-center">
  92. <text>{{postPushInfo.company?postPushInfo.company.companyName:''}}</text>
  93. <text
  94. v-if="postPushInfo.company">{{postPushInfo.company?postPushInfo.company.companyPeople:'0人'}}</text>
  95. </view>
  96. <view class="gwList-box-item-box-line"></view>
  97. <view class="gwList-box-item-box-info flex justify-between align-center">
  98. <view class="gwList-box-item-box-info-l flex align-center">
  99. <image
  100. :src="postPushInfo.company?postPushInfo.company.companyLogo:'../../static/logo.png'"
  101. style="width: 58rpx;height: 58rpx;border-radius: 50%;margin-right: 20rpx;"
  102. mode=""></image>
  103. <view class="people" v-if="postPushInfo.company">
  104. {{postPushInfo.company.companyLegalPerson?postPushInfo.company.companyLegalPerson:'未知'}}
  105. </view>·创始人
  106. </view>
  107. <view class="gwList-box-item-box-info-r flex justify-end">
  108. {{postPushInfo.county}} {{postPushInfo.address}}
  109. </view>
  110. </view>
  111. </view>
  112. </view>
  113. </view>
  114. </view>
  115. <!-- 简历简介 -->
  116. <view class="jobs flex justify-center" v-if="JSON.stringify(resumesInfo)!='{}'">
  117. <view class="jobs-box">
  118. <view class="qyList-box-item flex justify-center"
  119. @click="goNav('/pages/index/game/orderDet?resumesId='+resumesInfo.resumesId)">
  120. <view class="qyList-box-item-box">
  121. <view class="qyList-box-item-info flex justify-between align-center">
  122. <view class="qyList-box-item-info-l">
  123. <view class="" style="color: #212121;font-size: 38rpx;font-weight: 800;">
  124. {{resumesInfo.resumesName}}
  125. </view>
  126. <view class="flex align-center flex-wrap"
  127. style="color: #999999;font-size: 26rpx;margin-top: 10rpx;">
  128. <text>{{resumesInfo.resumesAge}}岁</text>
  129. <text style="margin-left: 20rpx;margin-right: 20rpx;">|</text>
  130. <text>{{resumesInfo.resumesWorkExperience}}</text>
  131. <text style="margin-left: 20rpx;margin-right: 20rpx;">|</text>
  132. <text>{{resumesInfo.school}}</text>
  133. <text style="margin-left: 20rpx;margin-right: 20rpx;">|</text>
  134. <text>期望{{resumesInfo.resumesCompensation}}</text>
  135. </view>
  136. </view>
  137. <view class="qyList-box-item-info-r">
  138. <image :src="resumesInfo.avatar?resumesInfo.avatar:'../../static/logo.png'"
  139. style="width: 95rpx;height: 95rpx;border-radius: 50%;" mode=""></image>
  140. </view>
  141. </view>
  142. <view class="qyList-box-item-job flex align-center">
  143. <u-icon name="heart-fill" color="#00B88F" size="30" style="margin-right: 16rpx;">
  144. </u-icon>
  145. 期望岗位:{{resumesInfo.resumesPost}}
  146. </view>
  147. <view class="qyList-box-item-job flex align-center"
  148. v-if="resumesInfo.resumesCompanyList[0]">
  149. <image src="../../static/images/qi.png"
  150. style="width: 30rpx;height: 32rpx;margin-right: 16rpx;" mode=""></image>
  151. {{resumesInfo.resumesCompanyList[0]?resumesInfo.resumesCompanyList[0].resumesTitle:''}}
  152. /
  153. {{resumesInfo.resumesCompanyList[0]?resumesInfo.resumesCompanyList[0].resumesPost:''}}
  154. </view>
  155. <view class="qyList-box-item-job flex align-center" v-else>
  156. <image src="../../static/images/qi.png"
  157. style="width: 30rpx;height: 32rpx;margin-right: 16rpx;" mode=""></image>
  158. 暂无
  159. </view>
  160. <view class="qyList-box-item-rem" v-if="resumesInfo.resumesDetails">
  161. 优势:{{resumesInfo.resumesDetails}}
  162. </view>
  163. </view>
  164. </view>
  165. </view>
  166. </view>
  167. <view style="display: flex;flex-direction: column;" v-for="(item,index) in ListItem" :id=" 'id-'+index">
  168. <view style="margin-top: 15rpx;width: 100%;text-align: center;font-size: 26rpx;color: #999999;"
  169. v-if="item.createTime">
  170. {{item.createTime}}
  171. </view>
  172. <view v-if="item.userId && userId != item.userId" style="width: 83%;margin-right: 15%;">
  173. <view class="chat-listitem" style="float: left;margin-left: 10rpx;">
  174. <view>
  175. <image @tap="goGuanZhu(item)" :src="item.avatar ? item.avatar : '/static/logo.png'"
  176. class="chat-listitem-image"></image>
  177. </view>
  178. <view v-if="item.content && item.messageType === 1" @longpress="copy(item.content)"
  179. class="chat-listitem-text"
  180. style="margin-left: 20rpx;color: #000000;background-color: #ffffff;">{{item.content}}</view>
  181. <view v-if="item.messageType === 20" @tap="sendCallVideo(2)"
  182. class="chat-listitem-text flex align-center"
  183. style="margin-left: 20rpx;color: #000000;background-color: #ffffff;">
  184. 视频通话
  185. <image src="../../static/im/historyVideo_black.png"
  186. style="width: 50rpx;height: 50rpx;margin-left: 20rpx;" mode=""></image>
  187. </view>
  188. <view v-if="item.messageType === 21" @tap="sendCallVideo(1)"
  189. class="chat-listitem-text flex align-center"
  190. style="margin-left: 20rpx;color: #000000;background-color: #ffffff;">
  191. 语音通话
  192. <image src="../../static/im/historyAudio_black.png"
  193. style="width: 50rpx;height: 50rpx;margin-left: 20rpx;" mode=""></image>
  194. </view>
  195. <!-- 互换手机号 -->
  196. <view v-if="item.content && item.messageType === 5 && item.content=='手机号请求'"
  197. @longpress="copy(item.content)" class="chat-listitem-text"
  198. style="padding-bottom: 20rpx;;padding-top: 20rpx;margin-left: 20rpx;color: #000000;background-color: #ffffff;border: 1rpx solid #c6fee7;background: linear-gradient(to bottom, #D9FEED, #ffffff);">
  199. <view class="flex align-center">
  200. <image src="../../static/im/mobilePhone.png"
  201. style="width: 60rpx;height: 60rpx;margin-right: 10rpx;" mode=""></image>
  202. 我想跟你交换手机号,是否同意?
  203. </view>
  204. <view class="flex justify-between" style="margin-top: 30rpx;font-size: 24rpx;">
  205. <view @click.stop="refuseFun(item.chatContentId)"
  206. class="flex justify-center align-center"
  207. style="width: 40%;height: 50rpx;background-color: #F5F5F5;border-radius: 12rpx;">
  208. 拒绝
  209. </view>
  210. <view @click.stop="tongyi(item.messageType,item.chatContentId)"
  211. class="flex justify-center align-center"
  212. style="width: 40%;height: 50rpx;background-color: #D9FEED;border-radius: 12rpx;">
  213. 同意
  214. </view>
  215. </view>
  216. </view>
  217. <view v-if="item.content && item.messageType === 5 && item.content!='手机号请求'"
  218. class="chat-listitem-text"
  219. style="margin-left: 20rpx;color: #000000;background-color: #ffffff;">
  220. 已同意交换手机号
  221. </view>
  222. <view v-if="item.content && item.messageType === 7"
  223. @longpress="copyss(item.content,item.userType,'phone')" class="chat-listitem-text"
  224. style="margin-left: 20rpx;color: #000000;background-color: #ffffff;">
  225. <view class="" v-if="item.userType==1">
  226. 我的手机号为:{{JSON.parse(item.content).userPhone}}
  227. </view>
  228. <view class="" v-else>
  229. 我的手机号为:{{JSON.parse(item.content).companyPhone}}
  230. </view>
  231. </view>
  232. <!-- 互换微信号 -->
  233. <view v-if="item.content && item.messageType === 6 && item.content=='微信号请求'"
  234. @longpress="copy(item.content)" class="chat-listitem-text"
  235. style="padding-bottom: 20rpx;;padding-top: 20rpx;margin-left: 20rpx;color: #000000;background-color: #ffffff;border: 1rpx solid #c6fee7;background: linear-gradient(to bottom, #D9FEED, #ffffff);">
  236. <view class="flex align-center">
  237. <image src="../../static/im/weiChat.png"
  238. style="width: 60rpx;height: 60rpx;margin-right: 10rpx;" mode=""></image>
  239. 我想跟你交换微信号,是否同意?
  240. </view>
  241. <view class="flex justify-between" style="margin-top: 30rpx;font-size: 24rpx;">
  242. <view @click.stop="refuseFun(item.chatContentId)"
  243. class="flex justify-center align-center"
  244. style="width: 40%;height: 50rpx;background-color: #F5F5F5;border-radius: 12rpx;">
  245. 拒绝
  246. </view>
  247. <view @click.stop="tongyi(item.messageType,item.chatContentId)"
  248. class="flex justify-center align-center"
  249. style="width: 40%;height: 50rpx;background-color: #D9FEED;border-radius: 12rpx;">
  250. 同意
  251. </view>
  252. </view>
  253. </view>
  254. <view v-if="item.content && item.messageType === 6 && item.content!='微信号请求'"
  255. class="chat-listitem-text"
  256. style="margin-left: 20rpx;color: #000000;background-color: #ffffff;">
  257. 已同意交换微信号
  258. </view>
  259. <view v-if="item.content && item.messageType === 8"
  260. @longpress="copyss(item.content,item.userType,'wx')" class="chat-listitem-text"
  261. style="margin-left: 20rpx;color: #000000;background-color: #ffffff;">
  262. <view class="" v-if="item.userType==1">
  263. 我的微信号为:{{JSON.parse(item.content).userWx}}
  264. </view>
  265. <view class="" v-else>
  266. 我的微信号为:{{JSON.parse(item.content).companyWx}}
  267. </view>
  268. </view>
  269. <view v-if="item.content && item.messageType === 9 && item.content=='简历请求'"
  270. @longpress="copy(item.content)" class="chat-listitem-text"
  271. style="padding-bottom: 20rpx;;padding-top: 20rpx;margin-left: 20rpx;color: #000000;background-color: #ffffff;border: 1rpx solid #c6fee7;background: linear-gradient(to bottom, #D9FEED, #ffffff);">
  272. <view class="flex align-center">
  273. <image src="../../static/im/orderInfo.png"
  274. style="width: 60rpx;height: 60rpx;margin-right: 10rpx;" mode=""></image>
  275. 我想要你的一份简历,是否同意?
  276. </view>
  277. <view class="flex justify-between" style="margin-top: 30rpx;font-size: 24rpx;">
  278. <view @click.stop="refuseFun(item.chatContentId)"
  279. class="flex justify-center align-center"
  280. style="width: 40%;height: 50rpx;background-color: #F5F5F5;border-radius: 12rpx;">
  281. 拒绝
  282. </view>
  283. <view @click.stop="resumesTy()" class="flex justify-center align-center"
  284. style="width: 40%;height: 50rpx;background-color: #D9FEED;border-radius: 12rpx;">
  285. 同意
  286. </view>
  287. </view>
  288. </view>
  289. <view v-if="item.content && item.messageType === 9 && item.content!='简历请求'"
  290. @longpress="copy(item.content)" class="chat-listitem-text"
  291. style="padding-bottom: 20rpx;;padding-top: 20rpx;margin-left: 20rpx;color: #000000;background-color: #ffffff;border: 1rpx solid #c6fee7;background: linear-gradient(to bottom, #D9FEED, #ffffff);">
  292. <view class="flex align-center">
  293. <image src="../../static/im/orderInfo.png"
  294. style="width: 60rpx;height: 60rpx;margin-right: 10rpx;" mode=""></image>
  295. {{item.content}}
  296. </view>
  297. </view>
  298. <view v-if="item.content && item.messageType === 10" class="chat-listitem-text"
  299. style="margin-left: 20rpx;color: #000000;background-color: #ffffff;">
  300. {{item.content}}
  301. </view>
  302. <view v-if="item.content && item.messageType === 12" class="chat-listitem-text"
  303. style="margin-left: 20rpx;color: #000000;background-color: #ffffff;">
  304. {{item.content}}已拒绝
  305. </view>
  306. <image @tap="viewImg(item.content)" v-if="item.content && item.messageType === 2"
  307. :src="item.content" style="height: 200rpx;width: 200rpx;margin-left: 20rpx;"></image>
  308. <image class="chat-listitem-text" @tap="viewImg(item.content)"
  309. v-if="item.content && item.messageType === 4"
  310. :src="'https://zp.118zp.com/emoji/' +item.content"
  311. style="height: 80rpx;width: 80rpx;margin-left: 20rpx;"></image>
  312. <view v-if="item.content && item.messageType === 3" class="chat-listitem-text bubble voice"
  313. :class="playMsgid == index?'play':''"
  314. style="margin-left: 20rpx;display: flex;align-items: center;"
  315. @tap="playVoice(item.content,index)">
  316. <image v-if="playMsgid != index" src="../../static/im/laba.png"
  317. style="width: 35upx;height: 40upx;margin-right: 10rpx;"></image>
  318. <image v-if="playMsgid == index" src="../../static/im/labagif.gif"
  319. style="width: 35upx;height: 40upx;margin-right: 10rpx;"></image>
  320. <view class="length">{{item.width ? item.width : 0}}</view>
  321. </view>
  322. <view class="chat-listitem-text "
  323. style="margin-left: 20rpx;color: #000000;background-color: #ffffff;"
  324. v-if="item.content && item.messageType === 18"
  325. @click="openMapss(item.content.latitude,item.content.longitude,item.content.address)">
  326. <view class="padding-sm flex">
  327. <!-- #ifdef APP -->
  328. <u-icon name="map-fill" color="#ffffff" size="28" style="margin-right: 10rpx;"></u-icon>
  329. <!-- #endif -->
  330. {{item.content.address}}
  331. </view>
  332. <!-- #ifndef APP -->
  333. <map style="width: 100%; height: 120px;" scale="14" :latitude="item.content.latitude"
  334. :longitude="item.content.longitude"
  335. @tap="openMapss(item.content.latitude,item.content.longitude,item.content.address)"
  336. :markers="item.markers">
  337. </map>
  338. <!-- #endif -->
  339. </view>
  340. </view>
  341. </view>
  342. <!-- ++++++++++++++++++++++++++ -->
  343. <view v-if="item.userId && userId == item.userId" style="width: 83%;margin-left: 15%;">
  344. <view class="chat-listitem" style="float: right;">
  345. <view v-if="item.content && item.messageType === 1" @longpress="caozuoActive(item,1)"
  346. class="chat-listitem-text textColor" style="margin-right: 20rpx;">{{item.content}}</view>
  347. <view v-if="item.messageType === 20" @tap="sendCallVideo(2)"
  348. class="chat-listitem-text textColor flex align-center" style="margin-right: 20rpx;">
  349. 视频通话
  350. <image src="../../static/im/historyVideo_white.png"
  351. style="width: 50rpx;height: 50rpx;margin-left: 20rpx;" mode=""></image>
  352. </view>
  353. <view v-if="item.messageType === 21" @tap="sendCallVideo(1)"
  354. class="chat-listitem-text textColor flex align-center" style="margin-right: 20rpx;">
  355. 语音通话
  356. <image src="../../static/im/historyAudio_white.png"
  357. style="width: 50rpx;height: 50rpx;margin-left: 20rpx;" mode=""></image>
  358. </view>
  359. <view v-if="item.content && item.messageType === 5" class="chat-listitem-text textColor"
  360. style="margin-right: 20rpx;">
  361. 交换手机号请求已发送,等待对方同意
  362. </view>
  363. <view v-if="item.content && item.messageType === 7"
  364. @longpress="copyss(item.content,item.userType,'phone')" class="chat-listitem-text textColor"
  365. style="margin-right: 20rpx;">
  366. <view class="" v-if="item.userType==1">
  367. 我的手机号为:{{JSON.parse(item.content).userPhone}}
  368. </view>
  369. <view class="" v-else>
  370. 我的手机号为:{{JSON.parse(item.content).companyPhone}}
  371. </view>
  372. </view>
  373. <view v-if="item.content && item.messageType === 6" class="chat-listitem-text textColor"
  374. style="margin-right: 20rpx;">
  375. 交换微信号请求已发送,等待对方同意
  376. </view>
  377. <view v-if="item.content && item.messageType === 8"
  378. @longpress="copyss(item.content,item.userType,'wx')" class="chat-listitem-text textColor"
  379. style="margin-right: 20rpx;">
  380. <view class="" v-if="item.userType==1">
  381. 我的微信号为:{{JSON.parse(item.content).userWx}}
  382. </view>
  383. <view class="" v-else>
  384. 我的微信号为:{{JSON.parse(item.content).companyWx}}
  385. </view>
  386. </view>
  387. <view v-if="item.content && item.messageType === 9" class="chat-listitem-text textColor"
  388. style="margin-right: 20rpx;">
  389. 简历请求已发送,等待对方同意
  390. </view>
  391. <view v-if="item.content && item.messageType === 10" class="chat-listitem-text textColor"
  392. style="margin-right: 20rpx;">
  393. {{item.content}}
  394. </view>
  395. <view v-if="item.content && item.messageType === 12" class="chat-listitem-text textColor"
  396. style="margin-right: 20rpx;">
  397. {{item.content}}已拒绝
  398. </view>
  399. <view class="chat-listitem-text textColor" style="margin-right: 20rpx;"
  400. v-if="item.content && item.messageType === 18"
  401. @click="openMapss(item.content.latitude,item.content.longitude,item.content.address)">
  402. <view class="padding-sm flex">
  403. <!-- #ifdef APP -->
  404. <u-icon name="map-fill" color="#ffffff" size="28" style="margin-right: 10rpx;"></u-icon>
  405. <!-- #endif -->
  406. {{item.content.address}}
  407. </view>
  408. <!-- #ifndef APP -->
  409. <map style="width:520upx; height: 120px;" scale="14" :latitude="item.content.latitude"
  410. :longitude="item.content.longitude"
  411. @tap="openMapss(item.content.latitude,item.content.longitude,item.content.address)"
  412. :markers='item.markers'>
  413. </map>
  414. <!-- #endif -->
  415. </view>
  416. <!-- <view v-if="item.content && item.messageType === 1" @longpress="copy(item.content)"
  417. class="chat-listitem-text" style="margin-right: 20rpx;">{{item.content}}</view> -->
  418. <image @longpress="caozuoActive(item)" @tap="viewImg(item.content)"
  419. v-if="item.content && item.messageType === 2" :src="item.content"
  420. style="height: 200rpx;width: 200rpx;margin-right: 20rpx;"></image>
  421. <image class="chat-listitem-text textColor" @longpress="caozuoActive(item)"
  422. @tap="viewImg(item.content)" v-if="item.content && item.messageType === 4"
  423. :src="'https://zp.118zp.com/emoji/' +item.content"
  424. style="height: 80rpx;width: 80rpx;margin-right: 20rpx;">
  425. </image>
  426. <view v-if="item.content && item.messageType === 3"
  427. class="chat-listitem-text bubble voice textColor" :class="playMsgid == index?'play':''"
  428. style="margin-right: 20rpx;display: flex;align-items: center;"
  429. @longpress="caozuoActive(item)" @tap="playVoice(item.content,index)">
  430. <view class="length">{{item.width ? item.width : 0}}</view>
  431. <image v-if="playMsgid != index" src="../../static/im/labaleft.png"
  432. style="width: 35upx;height: 40upx;margin-left: 10rpx;"></image>
  433. <image v-if="playMsgid == index" src="../../static/im/labaleft.png"
  434. style="width: 35upx;height: 40upx;margin-left: 10rpx;"></image>
  435. </view>
  436. <view>
  437. <image :src="imageUrl" class="chat-listitem-image"></image>
  438. </view>
  439. </view>
  440. </view>
  441. </view>
  442. <!-- </view> -->
  443. </scroll-view>
  444. <!-- 底部聊天输入框 -->
  445. <!-- <view class="input-box">
  446. <view style="display: flex;margin-top: 15rpx;width: 100%;">
  447. <image src="https://renwu.xiansqx.com/img/20210817/024ca47bc591460daf76762a8e98283f.png" @click="chooseImage(['album'])" style="width: 60rpx;height: 60rpx;margin-top: 8rpx;"></image>
  448. <input confirm-type="send" @confirm='setChatSave(1)' type="text" v-model="content"
  449. style="width: 68%;height: 70rpx;background: #FFFFFF;margin: 4rpx 10rpx 0;border-radius: 10rpx;padding-left: 10rpx;" />
  450. <view class="save" @tap='setChatSave(1)'>发送</view>
  451. </view>
  452. </view> -->
  453. <!-- 长按操作菜单 -->
  454. <u-action-sheet :list="activelist" @click="activeclick" v-model="showActive" :tips="tips"></u-action-sheet>
  455. <!-- 抽屉栏 -->
  456. <view class="popup-layer" :class="popupLayerClass" @touchmove.stop.prevent="discard">
  457. <!-- 表情 -->
  458. <swiper class="emoji-swiper" indicator-active-color="#cccccc" :class="{hidden:hideEmoji}"
  459. indicator-dots="true" duration="150">
  460. <swiper-item v-for="(page1,pid) in emojiList" :key="pid">
  461. <view v-for="(em,eid) in page1" :key="eid" @tap="setChatSave(4,em.url)">
  462. <!-- <image src="../../static/emoji/100.gif" mode="widthFix"></image> -->
  463. <image mode="widthFix" :src="'https://zp.118zp.com/emoji/'+em.url"></image>
  464. </view>
  465. </swiper-item>
  466. </swiper>
  467. <!-- 更多功能 相册-拍照-红包 -->
  468. <view class="more-layer" :class="{hidden:hideMore}">
  469. <view class="list" style="color: #000000;">
  470. <!-- 上传图片 -->
  471. <view style="margin-bottom: 20rpx;">
  472. <view class="box" @click="chooseImage(['album'])">
  473. <view class="icon tupian2"></view>
  474. </view>
  475. <view style="width: 100%;text-align: center;">上传图片</view>
  476. </view>
  477. <!-- #ifdef H5 || APP -->
  478. <!-- 语音 -->
  479. <view style="margin-bottom: 20rpx;">
  480. <view class="box" @tap="sendCallVideo(1)">
  481. <image src="../../static/images/voice/audioCall.png" mode=""
  482. style="width: 76rpx;height: 76rpx;">
  483. </image>
  484. </view>
  485. <view style="width: 100%;text-align: center;">语音</view>
  486. </view>
  487. <!-- 视频 -->
  488. <view style="margin-bottom: 20rpx;">
  489. <view class="box" @tap="sendCallVideo(2)">
  490. <image src="../../static/images/voice/videoCall.png" mode=""
  491. style="width: 76rpx;height: 76rpx;">
  492. </image>
  493. </view>
  494. <view style="width: 100%;text-align: center;">视频</view>
  495. </view>
  496. <!-- #endif -->
  497. <!-- 常用语 -->
  498. <view style="margin-bottom: 20rpx;">
  499. <view class="box" @tap="showChangYongSelect">
  500. <view class="icon jianpan"></view>
  501. </view>
  502. <view style="width: 100%;text-align: center;">常用语句</view>
  503. </view>
  504. <!-- 添加常用语或自动回复内容 -->
  505. <view style="margin-bottom: 20rpx;">
  506. <view class="box" @tap="goAdd">
  507. <view class="icon add"></view>
  508. </view>
  509. <view style="width: 100%;text-align: center;">添加语句</view>
  510. </view>
  511. <view style="margin-bottom: 20rpx;">
  512. <view class="box" @tap="goMapss">
  513. <image src="../../static/images/weizhi.png" mode="" style="width: 76rpx;height: 76rpx;">
  514. </image>
  515. </view>
  516. <view style="width: 100%;text-align: center;">发送位置</view>
  517. </view>
  518. <view>
  519. <view class="box" @tap="goHistory">
  520. <view class="icon chehui"></view>
  521. </view>
  522. <view style="width: 100%;text-align: center;">聊天记录</view>
  523. </view>
  524. </view>
  525. </view>
  526. </view>
  527. <!-- 底部输入栏 -->
  528. <view class="input-box" :class="popupLayerClass" @touchmove.stop.prevent="discard">
  529. <!-- H5下不能录音,输入栏布局改动一下 -->
  530. <!-- #ifndef H5 -->
  531. <view class="voice">
  532. <view class="icon" :class="isVoice?'jianpan':'yuyin'" @tap="switchVoice"></view>
  533. </view>
  534. <!-- #endif -->
  535. <!-- #ifdef H5 -->
  536. <view class="more" @tap="showMore">
  537. <view class="icon add"></view>
  538. </view>
  539. <!-- #endif -->
  540. <view class="textbox">
  541. <view class="voice-mode" :class="[isVoice?'':'hidden',recording?'recording':'']"
  542. @touchstart="voiceBegin" @touchmove.stop.prevent="voiceIng" @touchend="voiceEnd"
  543. @touchcancel="voiceCancel">{{voiceTis}}</view>
  544. <view class="text-mode" :class="isVoice?'hidden':''">
  545. <view class="box">
  546. <input style="color: #000000;" auto-height="true" @confirm='setChatSave(1)' v-model="content"
  547. @focus="textareaFocus" />
  548. </view>
  549. <view class="em" @tap="chooseEmoji">
  550. <view class="icon biaoqing"></view>
  551. </view>
  552. </view>
  553. </view>
  554. <!-- #ifndef H5 -->
  555. <view class="more" @tap="showMore">
  556. <view class="icon add"></view>
  557. </view>
  558. <!-- #endif -->
  559. <view class="send" :class="isVoice?'hidden':''" @tap='setChatSave(1)'>
  560. <view class="btn">发送</view>
  561. </view>
  562. </view>
  563. <!-- 录音UI效果 -->
  564. <view class="record" :class="recording?'':'hidden'">
  565. <view class="ing" :class="willStop?'hidden':''">
  566. <view class="icon luyin2"></view>
  567. </view>
  568. <view class="cancel" :class="willStop?'':'hidden'">
  569. <view class="icon chehui"></view>
  570. </view>
  571. <view class="tis" :class="willStop?'change':''">{{recordTis}}</view>
  572. </view>
  573. <u-select v-model="showChangYong" title="常用词语" mode="single-column" :list="changYongList" @confirm="selConfirm">
  574. </u-select>
  575. <u-action-sheet :list="list" @click="click" v-model="show"></u-action-sheet>
  576. <u-popup v-model="mianshiShow" mode="bottom" z-index="998" :mask-close-able="false" border-radius="14"
  577. @close="cleanMs" :closeable="true">
  578. <view class="mianshiTitle">面试邀请</view>
  579. <view class="mianshiTime flex justify-center">
  580. <view class="mianshiTime-box flex justify-between align-center">
  581. <view class="">
  582. 面试时间
  583. </view>
  584. <view class="flex align-center mianshiTime-box-ti">
  585. <u-input disabled v-model="miamshi.interviewDateTime" @click="msTime=true" type="text"
  586. placeholder="请选择面试时间" />
  587. <u-icon name="arrow-right" style="margin-left: 10rpx;" color="#00B88F" size="28"
  588. @click="msTime=true"></u-icon>
  589. </view>
  590. </view>
  591. </view>
  592. <view class="mianshiTime flex justify-center">
  593. <view class="mianshiTime-box flex justify-between align-center">
  594. <view class="">
  595. 面试地址
  596. </view>
  597. <view class="flex align-center mianshiTime-box-ti">
  598. <u-input disabled @click="goMap()" v-model="miamshi.detailedAddress" type="text"
  599. placeholder="请选择面试地址" />
  600. <u-icon name="arrow-right" style="margin-left: 10rpx;" @click="goMap()" color="#00B88F"
  601. size="28"></u-icon>
  602. </view>
  603. </view>
  604. </view>
  605. <view class="mianshiTime flex justify-center">
  606. <view class="mianshiTime-box" style="border: none;">
  607. <view class="">
  608. 备注
  609. </view>
  610. <view class="flex align-center mianshiTime-box-ti">
  611. <u-input v-model="miamshi.remarks" type="textarea" input-align="left"
  612. style="padding: 10rpx;background-color: #F2F2F7;height: 200rpx;overflow: hidden;border-radius: 14rpx;width: 100%;"
  613. :auto-height="false" />
  614. </view>
  615. </view>
  616. </view>
  617. <view class="btnm flex justify-center">
  618. <view class="btn-box flex justify-around align-center">
  619. <view class="btn-close btnItem" @click="mianshiShow = false">
  620. 取消
  621. </view>
  622. <view class="btn-sub btnItem" @click="submitMs()">
  623. 确认
  624. </view>
  625. </view>
  626. </view>
  627. </u-popup>
  628. <u-toast ref="uToast" />
  629. <u-picker v-model="msTime" mode="time" :params="params" @confirm="mianshiConfirm" confirm-color="#00B88F">
  630. </u-picker>
  631. <!-- 面试邀请弹窗 -->
  632. <u-popup v-model="msshow" mode="center" z-index="998" border-radius="24" :mask-close-able="false" width="80%">
  633. <view class="mssTitle">
  634. 面试邀请
  635. </view>
  636. <view class="avatorm flex justify-center">
  637. <view class="avatorm-box flex justify-center">
  638. <block v-if="records.userEntity && records.userEntity.userAvatar">
  639. <image :src="records.userEntity.userAvatar"
  640. style="width: 100rpx;height: 100rpx;border-radius: 50%;" mode="">
  641. </image>
  642. </block>
  643. <block v-else>
  644. <image src="../../static/logo.png" style="width: 100rpx;height: 100rpx;border-radius: 50%;"
  645. mode="">
  646. </image>
  647. </block>
  648. <block v-if="records.company && records.company.companyLogo">
  649. <image :src="records.company.companyLogo"
  650. style="width: 100rpx;height: 100rpx;border-radius: 50%;" mode="">
  651. </image>
  652. </block>
  653. <block v-else>
  654. <image src="../../static/logo.png" style="width: 100rpx;height: 100rpx;border-radius: 50%;"
  655. mode="">
  656. </image>
  657. </block>
  658. </view>
  659. </view>
  660. <view class="avatorm flex justify-center">
  661. <view class="avatorm-box">
  662. <view class="avatorm-box-item flex">
  663. <view class="avatorm-box-item-t">
  664. 面试岗位:
  665. </view>
  666. <view class="avatorm-box-item-r">
  667. {{records.postPush?records.postPush.stationName:'未知'}}
  668. </view>
  669. </view>
  670. <view class="avatorm-box-item flex" v-if="records">
  671. <view class="avatorm-box-item-t">
  672. 面试时间:
  673. </view>
  674. <view class="avatorm-box-item-r">
  675. {{records.interviewDateTime}}
  676. </view>
  677. </view>
  678. <view class="avatorm-box-item flex" @click="goMapDap(records)">
  679. <view class="avatorm-box-item-t">
  680. 面试地点:
  681. </view>
  682. <view class="avatorm-box-item-r">
  683. {{records.detailedAddress}}
  684. <u-icon name="map-fill" color="#00B88F" size="28"></u-icon>
  685. </view>
  686. </view>
  687. <view class="avatorm-box-item flex">
  688. <view class="avatorm-box-item-t">
  689. 面试备注:
  690. </view>
  691. <view class="avatorm-box-item-r">
  692. {{records.remarks?records.remarks:'暂无'}}
  693. </view>
  694. </view>
  695. </view>
  696. </view>
  697. <view class="avatorm flex justify-center" v-if="records.company">
  698. <view class="avatorm-box flex justify-center">
  699. 来自{{records.company.companyName}}的面试邀请,是否接受?
  700. </view>
  701. </view>
  702. <view class="btnm flex justify-center" style="margin-bottom: 30rpx;">
  703. <view class="btn-box flex justify-around align-center">
  704. <view class="btn-close btnItem" @click="setJuJue(records)">
  705. 拒绝
  706. </view>
  707. <view class="btn-sub btnItem" @click="setJuJues(records)">
  708. 接受
  709. </view>
  710. </view>
  711. </view>
  712. </u-popup>
  713. </view>
  714. </template>
  715. <script>
  716. const RECONNECT_INTERVAL = 3000; // 延迟3秒后进行重连
  717. const HEARTBEAT_INTERVAL = 20000; // 每20秒发送一次心跳消息
  718. import configdata from '../../common/config.js';
  719. export default {
  720. data() {
  721. return {
  722. msshow: false,
  723. params: {
  724. year: false,
  725. month: true,
  726. day: true,
  727. hour: true,
  728. minute: true,
  729. second: false
  730. },
  731. msTime: false,
  732. miamshi: {
  733. interviewDateTime: '', //面试时间
  734. companyId: '', //公司id
  735. remarks: '', //面试备注
  736. userId: '', //面试者id
  737. postPushId: '', //岗位id
  738. province: '', //省
  739. city: '', //市
  740. county: '', //区
  741. lng: '', //经度
  742. lat: '', //纬度
  743. detailedAddress: '', //详细地址
  744. },
  745. tips: {
  746. text: '操作',
  747. color: 'black',
  748. fontSize: 28
  749. },
  750. activelist: [],
  751. showActive: false,
  752. list: [{
  753. text: '查看简历',
  754. color: 'black',
  755. fontSize: 28
  756. }, {
  757. text: '查看企业',
  758. color: 'black',
  759. fontSize: 28
  760. }],
  761. show: false,
  762. recordLength: 0,
  763. initPoint: {
  764. identifier: 0,
  765. Y: 0
  766. },
  767. showChangYong: false,
  768. changYongList: [],
  769. //播放语音相关参数
  770. AUDIO: uni.createInnerAudioContext(),
  771. playMsgid: null,
  772. VoiceTimer: null,
  773. //文字消息
  774. textMsg: '',
  775. //消息列表
  776. isHistoryLoading: false,
  777. scrollAnimation: false,
  778. scrollTop: 0,
  779. scrollToView: '',
  780. msgList: [],
  781. msgImgList: [],
  782. myuid: 0,
  783. //录音相关参数
  784. // #ifndef H5
  785. //H5不能录音
  786. RECORDER: uni.getRecorderManager(),
  787. // #endif
  788. isVoice: false,
  789. voiceTis: '按住 说话',
  790. recordTis: "手指上滑 取消发送",
  791. recording: false,
  792. willStop: false,
  793. initPoint: {
  794. identifier: 0,
  795. Y: 0
  796. },
  797. recordTimer: null,
  798. recordLength: 0,
  799. //播放语音相关参数
  800. AUDIO: uni.createInnerAudioContext(),
  801. playMsgid: null,
  802. VoiceTimer: null,
  803. // 抽屉参数
  804. popupLayerClass: '',
  805. // more参数
  806. hideMore: true,
  807. //表情定义
  808. hideEmoji: true,
  809. emojiList: [
  810. [{
  811. "url": "100.gif",
  812. alt: "[微笑]"
  813. }, {
  814. "url": "101.gif",
  815. alt: "[伤心]"
  816. }, {
  817. "url": "102.gif",
  818. alt: "[美女]"
  819. }, {
  820. "url": "103.gif",
  821. alt: "[发呆]"
  822. }, {
  823. "url": "104.gif",
  824. alt: "[墨镜]"
  825. }, {
  826. "url": "105.gif",
  827. alt: "[哭]"
  828. }, {
  829. "url": "106.gif",
  830. alt: "[羞]"
  831. }, {
  832. "url": "107.gif",
  833. alt: "[哑]"
  834. }, {
  835. "url": "108.gif",
  836. alt: "[睡]"
  837. }, {
  838. "url": "109.gif",
  839. alt: "[哭]"
  840. }, {
  841. "url": "110.gif",
  842. alt: "[囧]"
  843. }, {
  844. "url": "111.gif",
  845. alt: "[怒]"
  846. }, {
  847. "url": "112.gif",
  848. alt: "[调皮]"
  849. }, {
  850. "url": "113.gif",
  851. alt: "[笑]"
  852. }, {
  853. "url": "114.gif",
  854. alt: "[惊讶]"
  855. }, {
  856. "url": "115.gif",
  857. alt: "[难过]"
  858. }, {
  859. "url": "116.gif",
  860. alt: "[酷]"
  861. }, {
  862. "url": "117.gif",
  863. alt: "[汗]"
  864. }, {
  865. "url": "118.gif",
  866. alt: "[抓狂]"
  867. }, {
  868. "url": "119.gif",
  869. alt: "[吐]"
  870. }, {
  871. "url": "120.gif",
  872. alt: "[笑]"
  873. }, {
  874. "url": "121.gif",
  875. alt: "[快乐]"
  876. }, {
  877. "url": "122.gif",
  878. alt: "[奇]"
  879. }, {
  880. "url": "123.gif",
  881. alt: "[傲]"
  882. }],
  883. [{
  884. "url": "124.gif",
  885. alt: "[饿]"
  886. }, {
  887. "url": "125.gif",
  888. alt: "[累]"
  889. }, {
  890. "url": "126.gif",
  891. alt: "[吓]"
  892. }, {
  893. "url": "127.gif",
  894. alt: "[汗]"
  895. }, {
  896. "url": "128.gif",
  897. alt: "[高兴]"
  898. }, {
  899. "url": "129.gif",
  900. alt: "[闲]"
  901. }, {
  902. "url": "130.gif",
  903. alt: "[努力]"
  904. }, {
  905. "url": "131.gif",
  906. alt: "[骂]"
  907. }, {
  908. "url": "132.gif",
  909. alt: "[疑问]"
  910. }, {
  911. "url": "133.gif",
  912. alt: "[秘密]"
  913. }, {
  914. "url": "134.gif",
  915. alt: "[乱]"
  916. }, {
  917. "url": "135.gif",
  918. alt: "[疯]"
  919. }, {
  920. "url": "136.gif",
  921. alt: "[哀]"
  922. }, {
  923. "url": "137.gif",
  924. alt: "[鬼]"
  925. }, {
  926. "url": "138.gif",
  927. alt: "[打击]"
  928. }, {
  929. "url": "139.gif",
  930. alt: "[bye]"
  931. }, {
  932. "url": "140.gif",
  933. alt: "[汗]"
  934. }, {
  935. "url": "141.gif",
  936. alt: "[抠]"
  937. }, {
  938. "url": "142.gif",
  939. alt: "[鼓掌]"
  940. }, {
  941. "url": "143.gif",
  942. alt: "[糟糕]"
  943. }, {
  944. "url": "144.gif",
  945. alt: "[恶搞]"
  946. }, {
  947. "url": "145.gif",
  948. alt: "[什么]"
  949. }, {
  950. "url": "146.gif",
  951. alt: "[什么]"
  952. }, {
  953. "url": "147.gif",
  954. alt: "[累]"
  955. }],
  956. [{
  957. "url": "148.gif",
  958. alt: "[看]"
  959. }, {
  960. "url": "149.gif",
  961. alt: "[难过]"
  962. }, {
  963. "url": "150.gif",
  964. alt: "[难过]"
  965. }, {
  966. "url": "151.gif",
  967. alt: "[坏]"
  968. }, {
  969. "url": "152.gif",
  970. alt: "[亲]"
  971. }, {
  972. "url": "153.gif",
  973. alt: "[吓]"
  974. }, {
  975. "url": "154.gif",
  976. alt: "[可怜]"
  977. }, {
  978. "url": "155.gif",
  979. alt: "[刀]"
  980. }, {
  981. "url": "156.gif",
  982. alt: "[水果]"
  983. }, {
  984. "url": "157.gif",
  985. alt: "[酒]"
  986. }, {
  987. "url": "158.gif",
  988. alt: "[篮球]"
  989. }, {
  990. "url": "159.gif",
  991. alt: "[乒乓]"
  992. }, {
  993. "url": "160.gif",
  994. alt: "[咖啡]"
  995. }, {
  996. "url": "161.gif",
  997. alt: "[美食]"
  998. }, {
  999. "url": "162.gif",
  1000. alt: "[动物]"
  1001. }, {
  1002. "url": "163.gif",
  1003. alt: "[鲜花]"
  1004. }, {
  1005. "url": "164.gif",
  1006. alt: "[枯]"
  1007. }, {
  1008. "url": "165.gif",
  1009. alt: "[唇]"
  1010. }, {
  1011. "url": "166.gif",
  1012. alt: "[爱]"
  1013. }, {
  1014. "url": "167.gif",
  1015. alt: "[分手]"
  1016. }, {
  1017. "url": "168.gif",
  1018. alt: "[生日]"
  1019. }, {
  1020. "url": "169.gif",
  1021. alt: "[电]"
  1022. }, {
  1023. "url": "170.gif",
  1024. alt: "[炸弹]"
  1025. }, {
  1026. "url": "171.gif",
  1027. alt: "[刀子]"
  1028. }],
  1029. [{
  1030. "url": "172.gif",
  1031. alt: "[足球]"
  1032. }, {
  1033. "url": "173.gif",
  1034. alt: "[瓢虫]"
  1035. }, {
  1036. "url": "174.gif",
  1037. alt: "[翔]"
  1038. }, {
  1039. "url": "175.gif",
  1040. alt: "[月亮]"
  1041. }, {
  1042. "url": "176.gif",
  1043. alt: "[太阳]"
  1044. }, {
  1045. "url": "177.gif",
  1046. alt: "[礼物]"
  1047. }, {
  1048. "url": "178.gif",
  1049. alt: "[抱抱]"
  1050. }, {
  1051. "url": "179.gif",
  1052. alt: "[拇指]"
  1053. }, {
  1054. "url": "180.gif",
  1055. alt: "[贬低]"
  1056. }, {
  1057. "url": "181.gif",
  1058. alt: "[握手]"
  1059. }, {
  1060. "url": "182.gif",
  1061. alt: "[剪刀手]"
  1062. }, {
  1063. "url": "183.gif",
  1064. alt: "[抱拳]"
  1065. }, {
  1066. "url": "184.gif",
  1067. alt: "[勾引]"
  1068. }, {
  1069. "url": "185.gif",
  1070. alt: "[拳头]"
  1071. }, {
  1072. "url": "186.gif",
  1073. alt: "[小拇指]"
  1074. }, {
  1075. "url": "187.gif",
  1076. alt: "[拇指八]"
  1077. }, {
  1078. "url": "188.gif",
  1079. alt: "[食指]"
  1080. }, {
  1081. "url": "189.gif",
  1082. alt: "[ok]"
  1083. }, {
  1084. "url": "190.gif",
  1085. alt: "[情侣]"
  1086. }, {
  1087. "url": "191.gif",
  1088. alt: "[爱心]"
  1089. }, {
  1090. "url": "192.gif",
  1091. alt: "[蹦哒]"
  1092. }, {
  1093. "url": "193.gif",
  1094. alt: "[颤抖]"
  1095. }, {
  1096. "url": "194.gif",
  1097. alt: "[怄气]"
  1098. }, {
  1099. "url": "195.gif",
  1100. alt: "[跳舞]"
  1101. }],
  1102. [{
  1103. "url": "196.gif",
  1104. alt: "[发呆]"
  1105. }, {
  1106. "url": "197.gif",
  1107. alt: "[背着]"
  1108. }, {
  1109. "url": "198.gif",
  1110. alt: "[伸手]"
  1111. }, {
  1112. "url": "199.gif",
  1113. alt: "[耍帅]"
  1114. }, {
  1115. "url": "200.png",
  1116. alt: "[微笑]"
  1117. }, {
  1118. "url": "201.png",
  1119. alt: "[生病]"
  1120. }, {
  1121. "url": "202.png",
  1122. alt: "[哭泣]"
  1123. }, {
  1124. "url": "203.png",
  1125. alt: "[吐舌]"
  1126. }, {
  1127. "url": "204.png",
  1128. alt: "[迷糊]"
  1129. }, {
  1130. "url": "205.png",
  1131. alt: "[瞪眼]"
  1132. }, {
  1133. "url": "206.png",
  1134. alt: "[恐怖]"
  1135. }, {
  1136. "url": "207.png",
  1137. alt: "[忧愁]"
  1138. }, {
  1139. "url": "208.png",
  1140. alt: "[眨眉]"
  1141. }, {
  1142. "url": "209.png",
  1143. alt: "[闭眼]"
  1144. }, {
  1145. "url": "210.png",
  1146. alt: "[鄙视]"
  1147. }, {
  1148. "url": "211.png",
  1149. alt: "[阴暗]"
  1150. }, {
  1151. "url": "212.png",
  1152. alt: "[小鬼]"
  1153. }, {
  1154. "url": "213.png",
  1155. alt: "[礼物]"
  1156. }, {
  1157. "url": "214.png",
  1158. alt: "[拜佛]"
  1159. }, {
  1160. "url": "215.png",
  1161. alt: "[力量]"
  1162. }, {
  1163. "url": "216.png",
  1164. alt: "[金钱]"
  1165. }, {
  1166. "url": "217.png",
  1167. alt: "[蛋糕]"
  1168. }, {
  1169. "url": "218.png",
  1170. alt: "[彩带]"
  1171. }, {
  1172. "url": "219.png",
  1173. alt: "[礼物]"
  1174. }, ]
  1175. ],
  1176. msg: false,
  1177. type4: [],
  1178. listRight: {
  1179. chat: {
  1180. userHead: ""
  1181. },
  1182. content: "",
  1183. messageType: 1,
  1184. type: 1
  1185. },
  1186. content: '',
  1187. chatId: '',
  1188. type: 1,
  1189. ListItem: [],
  1190. index: 0,
  1191. page: 1,
  1192. size: 100,
  1193. byUserId: 0,
  1194. imageUrl: '/static/logo.png',
  1195. chatConversationId: 0,
  1196. userId: 0,
  1197. byNickName: '',
  1198. countDown: '',
  1199. messages: '',
  1200. scrollInto: '',
  1201. tUserId: '', //对方id
  1202. companyId: '', //对方企业的id
  1203. activeInfo: {},
  1204. userType: '',
  1205. postPushId: '', //岗位id
  1206. resumesId: '', //简历id
  1207. postPushInfo: {}, //岗位信息
  1208. resumesInfo: {}, //简历信息
  1209. isSendPhone: false, //是否交换手机号
  1210. isSendWx: false, //是否交换微信
  1211. mianshiShow: false, //约面试弹窗
  1212. records: {}, //面试邀请信息
  1213. recordsInter: '',
  1214. mapsValue: '',
  1215. showModal: true,
  1216. arr: [],
  1217. old: {
  1218. scrollTop: 0 //记录旧的scrollTop值
  1219. },
  1220. isOpen: false, //scoket是否正在链接
  1221. socketTimer: null, //心跳定时器
  1222. isVip: false, //是否是会员
  1223. isVideo: false, //是否打视频
  1224. };
  1225. },
  1226. onUnload() {
  1227. uni.closeSocket()
  1228. uni.hideLoading()
  1229. clearInterval(this.recordsInter)
  1230. this.recordsInter = null
  1231. clearInterval(this.socketTimer)
  1232. this.socketTimer = null
  1233. },
  1234. onLoad(d) {
  1235. console.log(d, 'zzzzzzzzz')
  1236. if (d.postPushId) {
  1237. this.postPushId = d.postPushId
  1238. }
  1239. if (d.resumesId) {
  1240. this.resumesId = d.resumesId
  1241. }
  1242. this.userType = uni.getStorageSync('userType')
  1243. if (this.userType == 1) {
  1244. this.postPushId = d.postPushId
  1245. //获取岗位信息
  1246. this.getPostPushInfo(this.postPushId)
  1247. this.getInterviewList()
  1248. } else {
  1249. this.resumesId = d.resumesId
  1250. //获取简历信息
  1251. this.getResumesInfo(this.resumesId)
  1252. }
  1253. this.userId = this.$queue.getData('userId');
  1254. this.getMessage();
  1255. this.connect();
  1256. this.byNickName = d.byNickName;
  1257. this.byUserId = d.byUserId;
  1258. if (d.chatConversationId) {
  1259. this.chatConversationId = d.chatConversationId;
  1260. this.getTimeOrListItem1();
  1261. } else {
  1262. this.insertChat();
  1263. }
  1264. let image_url = this.$queue.getData('avatar');
  1265. if (image_url && image_url !== 'undefined') {
  1266. this.imageUrl = image_url;
  1267. } else {
  1268. this.imageUrl = '/static/logo.png';
  1269. }
  1270. // this.emojiList.forEach(d =>{
  1271. // d.forEach(e =>{
  1272. // console.log('/static/emoji/' + e.url)
  1273. // });
  1274. // });
  1275. //语音自然播放结束
  1276. this.AUDIO.onEnded((res) => {
  1277. this.playMsgid = null;
  1278. });
  1279. // #ifndef H5
  1280. //录音开始事件
  1281. this.RECORDER.onStart((e) => {
  1282. this.recordBegin(e);
  1283. })
  1284. //录音结束事件
  1285. this.RECORDER.onStop((e) => {
  1286. this.recordEnd(e);
  1287. })
  1288. // #endif
  1289. },
  1290. onShow() {
  1291. if (this.chatConversationId) {
  1292. this.getTimeOrListItem1();
  1293. }
  1294. // #ifdef MP-WEIXIN
  1295. this.$Request.getT('/app/common/type/342').then(res => { //面试通知
  1296. if (res.code == 0) {
  1297. if (res.data && res.data.value) {
  1298. this.arr.push(res.data.value)
  1299. }
  1300. }
  1301. })
  1302. if (this.showModal) {
  1303. this.openMsg()
  1304. }
  1305. // #endif
  1306. this.userType = uni.getStorageSync('userType')
  1307. this.getChangYong();
  1308. // if (this.isOpen) {
  1309. // this.connect();
  1310. // }
  1311. if (this.userType == 1) {
  1312. //获取用户是否有该岗位待接受的面试邀请
  1313. this.recordsInter = setInterval(() => {
  1314. this.getInterviewList()
  1315. }, 5000)
  1316. }
  1317. this.getUserInfo()
  1318. },
  1319. onBackPress() {
  1320. this.AUDIO.stop();
  1321. this.playMsgid = null;
  1322. },
  1323. onHide() {
  1324. // this.AUDIO.stop();
  1325. // this.playMsgid = null;
  1326. // uni.closeSocket()
  1327. // clearInterval(this.recordsInter)
  1328. // this.recordsInter = null
  1329. },
  1330. methods: {
  1331. getUserInfo() {
  1332. this.$Request.get("/app/user/selectUserById").then(res => {
  1333. if (res.code == 0) {
  1334. if (this.userType == 1) { //用户
  1335. if (res.data.isUserVip == 1) { //判断用户是否是vip
  1336. this.isVip = true
  1337. } else {
  1338. this.isVip = false
  1339. }
  1340. } else { //企业
  1341. if (res.data.isCompanyVip == 1) { //判断企业用户是否是vip
  1342. this.isVip = true
  1343. } else {
  1344. this.isVip = false
  1345. }
  1346. }
  1347. }
  1348. })
  1349. },
  1350. /**
  1351. * @param {Object} type 1:语音 2视频
  1352. */
  1353. sendCallVideo(type) {
  1354. if (!this.isVip) {
  1355. uni.showModal({
  1356. title: '提示',
  1357. content: type == 1 ? '语音为会员专属功能,请开通会员!' : '视频为会员专属功能,请开通会员!',
  1358. confirmText: '开通会员',
  1359. cancelText: '取消',
  1360. confirmColor: '#00B88F',
  1361. complete(ret) {
  1362. if (ret.confirm) {
  1363. uni.navigateTo({
  1364. url: '/my/vip/index'
  1365. })
  1366. }
  1367. }
  1368. })
  1369. return
  1370. }
  1371. if (this.isVideo) {
  1372. return
  1373. }
  1374. this.isVideo = true
  1375. let data = {
  1376. focusedUserId: this.byUserId, //对方的userId
  1377. messageType: type == 1 ? 21 : 20,
  1378. userId: uni.getStorageSync('userId'), //我的userId
  1379. userType: this.userType, //1:用户 2:企业,
  1380. postPushId: this.postPushId,
  1381. resumesId: this.resumesId
  1382. }
  1383. let that = this
  1384. this.$Request.postJson('/app/chat/insertChatConversationByChatVideo', data).then(res => {
  1385. if (res.code == 0) {
  1386. //isRol 1:发起人 2:收到人
  1387. console.log(res)
  1388. uni.navigateTo({
  1389. url: '/my/videoVoice/videoVoice?byUserId=' + this.byUserId +
  1390. '&chatContentId=' + res.data.chatContentId +
  1391. '&isRol=1&messageType=' + data.messageType + '&chatConversationId=' + res
  1392. .data
  1393. .chatConversationId + '&userType=' + data.userType + '&postPushId=' + data
  1394. .postPushId + '&resumesId=' + data.resumesId,
  1395. success() {
  1396. uni.setStorageSync('isDial', true)
  1397. uni.setStorageSync('videoStatus', 1)
  1398. that.isVideo = false
  1399. }
  1400. })
  1401. } else {
  1402. that.isVideo = false
  1403. uni.showToast({
  1404. title: res.msg,
  1405. icon: 'none'
  1406. })
  1407. }
  1408. })
  1409. },
  1410. scroll(e) {
  1411. this.old.scrollTop = e.detail.scrollTop
  1412. },
  1413. // 开启订阅消息
  1414. openMsg() {
  1415. console.log('订阅消息')
  1416. var that = this
  1417. uni.getSetting({
  1418. withSubscriptions: true, //是否获取用户订阅消息的订阅状态,默认false不返回
  1419. success(ret) {
  1420. console.log(ret.subscriptionsSetting, '------------------')
  1421. // if (ret.subscriptionsSetting.itemSettings && Object.keys(ret.subscriptionsSetting.itemSettings).length == 2) {
  1422. if (ret.subscriptionsSetting.itemSettings) {
  1423. uni.setStorageSync('sendMsg', true)
  1424. uni.openSetting({ // 打开设置页
  1425. success(rea) {
  1426. console.log(rea.authSetting)
  1427. }
  1428. });
  1429. } else { // 用户没有点击“总是保持以上,不再询问”则每次都会调起订阅消息
  1430. console.log(99999)
  1431. uni.setStorageSync('sendMsg', false)
  1432. uni.showModal({
  1433. title: '提示',
  1434. content: '为了更好的体验,请绑定消息推送',
  1435. confirmText: '确定',
  1436. cancelText: '取消',
  1437. confirmColor: '#00B88F',
  1438. success: function(res) {
  1439. if (res.confirm) {
  1440. console.log(that.arr)
  1441. wx.requestSubscribeMessage({
  1442. tmplIds: that.arr,
  1443. success(re) {
  1444. console.log(JSON.stringify(re),
  1445. '++++++++++++++')
  1446. var datas = JSON.stringify(re);
  1447. if (datas.indexOf("accept") != -1) {
  1448. console.log(re)
  1449. uni.setStorageSync('sendMsg', true)
  1450. }
  1451. },
  1452. fail: (res) => {
  1453. console.log(res)
  1454. }
  1455. })
  1456. uni.setStorageSync('sendMsg', true)
  1457. console.log('确认')
  1458. that.showModal = false
  1459. } else if (res.cancel) {
  1460. console.log('取消')
  1461. uni.setStorageSync('sendMsg', false)
  1462. that.showModal = true
  1463. }
  1464. }
  1465. })
  1466. }
  1467. }
  1468. })
  1469. },
  1470. /**
  1471. * @param {Object} info 内容
  1472. * @param {Object} userType 用户类型
  1473. * @param {Object} type 参数类型
  1474. */
  1475. copyss(info, userType, type) {
  1476. let content = ''
  1477. switch (type) {
  1478. //复制手机号
  1479. case 'phone':
  1480. if (userType == 1) {
  1481. content = JSON.parse(info).companyPhone
  1482. } else {
  1483. content = JSON.parse(info).userPhone
  1484. }
  1485. break;
  1486. //复制微信号
  1487. case 'wx':
  1488. if (userType == 1) {
  1489. content = JSON.parse(info).companyWx
  1490. } else {
  1491. content = JSON.parse(info).userWx
  1492. }
  1493. break;
  1494. default:
  1495. break;
  1496. }
  1497. this.copy(content)
  1498. },
  1499. openMapss(latitude, longitude, name) {
  1500. uni.openLocation({
  1501. latitude: latitude - 0, //要去的纬度-地址
  1502. longitude: longitude - 0, //要去的经度-地址
  1503. name: name, //地址名称
  1504. address: name, //详细地址名称
  1505. success: function() {
  1506. console.log('导航成功');
  1507. },
  1508. fail: function(error) {
  1509. console.log(error)
  1510. }
  1511. });
  1512. },
  1513. goMapss() {
  1514. let that = this
  1515. uni.chooseLocation({
  1516. success: function(res) {
  1517. console.log('位置名称:' + res.name);
  1518. console.log('详细地址:' + res.address);
  1519. console.log('纬度:' + res.latitude);
  1520. console.log('经度:' + res.longitude);
  1521. let mapsValue = JSON.stringify(res);
  1522. that.setChatSave(18, mapsValue)
  1523. // console.log(typeof(res))
  1524. // return
  1525. that.showMore();
  1526. }
  1527. });
  1528. },
  1529. //接受邀请
  1530. setJuJues(item) {
  1531. // #ifdef MP-WEIXIN
  1532. if (uni.getStorageSync('sendMsg')) {
  1533. // console.log('授权+1')
  1534. wx.requestSubscribeMessage({
  1535. tmplIds: this.arr,
  1536. success(re) {
  1537. // console.log(JSON.stringify(re), 111111111111)
  1538. var datas = JSON.stringify(re);
  1539. if (datas.indexOf("accept") != -1) {
  1540. // console.log(re)
  1541. }
  1542. },
  1543. fail: (res) => {
  1544. // console.log(res)
  1545. }
  1546. })
  1547. }
  1548. // #endif
  1549. let that = this
  1550. uni.showModal({
  1551. title: '提示',
  1552. content: '确定接受来自' + item.company.companyName + '的面试邀请吗?',
  1553. confirmColor: '#00B88F',
  1554. complete(ret) {
  1555. if (ret.confirm) {
  1556. let data = {
  1557. recordId: item.recordId,
  1558. type: 1
  1559. }
  1560. that.$Request.getT("/app/interviewRecord/userUpdateInter", data).then(res => {
  1561. if (res.code == 0) {
  1562. uni.showToast({
  1563. // title: '已接受来自' + item.company.companyName + '的面试邀请'
  1564. title: '已接受面试邀请'
  1565. })
  1566. that.msshow = false
  1567. } else {
  1568. uni.showToast({
  1569. title: res.msg,
  1570. icon: 'none'
  1571. })
  1572. }
  1573. })
  1574. }
  1575. }
  1576. })
  1577. },
  1578. //去导航
  1579. goMapDap(info) {
  1580. uni.openLocation({
  1581. latitude: info.lat,
  1582. longitude: info.lng,
  1583. address: info.detailedAddress,
  1584. name: info.detailedAddress,
  1585. complete(ret) {
  1586. }
  1587. })
  1588. },
  1589. //拒绝邀请
  1590. setJuJue(item) {
  1591. let that = this
  1592. uni.showModal({
  1593. title: '提示',
  1594. content: '确定拒绝来自' + item.company.companyName + '的面试邀请吗?',
  1595. confirmColor: '#00B88F',
  1596. complete(ret) {
  1597. if (ret.confirm) {
  1598. let data = {
  1599. recordId: item.recordId,
  1600. type: 2
  1601. }
  1602. that.$Request.getT("/app/interviewRecord/userUpdateInter", data).then(res => {
  1603. if (res.code == 0) {
  1604. uni.showToast({
  1605. title: '已拒绝来自' + item.company.companyName + '的面试邀请'
  1606. })
  1607. that.msshow = false
  1608. } else {
  1609. uni.showToast({
  1610. title: res.msg,
  1611. icon: 'none'
  1612. })
  1613. }
  1614. })
  1615. }
  1616. }
  1617. })
  1618. },
  1619. //获取用户是否有面试记录
  1620. getInterviewList() {
  1621. let data = {
  1622. userId: uni.getStorageSync('userId'),
  1623. status: 1,
  1624. postPushId: this.postPushId
  1625. }
  1626. this.$Request.getT("/app/interviewRecord/interviewList", data).then(res => {
  1627. if (res.code == 0) {
  1628. if ((res.data.records).length > 0) {
  1629. this.records = res.data.records[0]
  1630. this.msshow = true
  1631. } else {
  1632. this.msshow = false
  1633. }
  1634. } else {
  1635. uni.showToast({
  1636. title: res.msg,
  1637. icon: 'none'
  1638. })
  1639. this.msshow = false
  1640. }
  1641. })
  1642. },
  1643. submitMs() {
  1644. if (!this.miamshi.interviewDateTime) {
  1645. this.$refs.uToast.show({
  1646. title: '请选择面试时间',
  1647. type: 'default',
  1648. position: 'bottom'
  1649. })
  1650. return
  1651. }
  1652. if (!this.miamshi.detailedAddress) {
  1653. this.$refs.uToast.show({
  1654. title: '请选择面试地点',
  1655. type: 'default',
  1656. position: 'bottom'
  1657. })
  1658. return
  1659. }
  1660. let that = this
  1661. uni.showModal({
  1662. title: '提示',
  1663. content: '确定发起面试邀请吗?',
  1664. confirmColor: '#00B88F',
  1665. complete(ret) {
  1666. if (ret.confirm) {
  1667. let data = {
  1668. interviewDateTime: that.miamshi.interviewDateTime + ':00',
  1669. companyId: uni.getStorageSync('companyId'),
  1670. remarks: that.miamshi.remarks,
  1671. userId: that.byUserId, //求职者id
  1672. postPushId: that.postPushId,
  1673. province: that.miamshi.province,
  1674. city: that.miamshi.city,
  1675. county: that.miamshi.county,
  1676. lng: that.miamshi.lng,
  1677. lat: that.miamshi.lat,
  1678. detailedAddress: that.miamshi.detailedAddress
  1679. }
  1680. that.$Request.postJson("/app/interviewRecord/saveInterview", data).then(res => {
  1681. if (res.code == 0) {
  1682. uni.showToast({
  1683. title: '面试邀请已发送'
  1684. })
  1685. that.mianshiShow = false
  1686. } else {
  1687. that.mianshiShow = false
  1688. uni.showToast({
  1689. title: res.msg,
  1690. icon: 'none'
  1691. })
  1692. }
  1693. })
  1694. }
  1695. }
  1696. })
  1697. },
  1698. //关闭弹窗的时候清空表单的值
  1699. cleanMs() {
  1700. this.miamshi = {
  1701. interviewDateTime: '', //面试时间
  1702. companyId: '', //公司id
  1703. remarks: '', //面试备注
  1704. userId: '', //面试者id
  1705. postPushId: '', //岗位id
  1706. province: '', //省
  1707. city: '', //市
  1708. county: '', //区
  1709. lng: '', //经度
  1710. lat: '', //纬度
  1711. detailedAddress: '', //详细地址
  1712. }
  1713. },
  1714. // 点击调起地图选择位置
  1715. goMap() {
  1716. let that = this
  1717. uni.chooseLocation({
  1718. success: function(res) {
  1719. let arrress = res.address
  1720. let reg = /.+?(省|市|自治区|自治州|县|区)/g;
  1721. let adds = arrress.match(reg)
  1722. console.log(adds)
  1723. that.miamshi.province = adds[0]
  1724. that.miamshi.city = adds[1]
  1725. that.miamshi.county = adds[2]
  1726. that.miamshi.detailedAddress = res.address + '' + res.name
  1727. that.miamshi.lat = res.latitude
  1728. that.miamshi.lng = res.longitude
  1729. }
  1730. });
  1731. },
  1732. //选择面试时间
  1733. mianshiConfirm(e) {
  1734. //获取当前时间的年份
  1735. let date = new Date()
  1736. let year = date.getFullYear()
  1737. this.miamshi.interviewDateTime = year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute
  1738. },
  1739. mianshiF() {
  1740. // #ifdef MP-WEIXIN
  1741. if (uni.getStorageSync('sendMsg')) {
  1742. // console.log('授权+1')
  1743. wx.requestSubscribeMessage({
  1744. tmplIds: this.arr,
  1745. success(re) {
  1746. // console.log(JSON.stringify(re), 111111111111)
  1747. var datas = JSON.stringify(re);
  1748. if (datas.indexOf("accept") != -1) {
  1749. // console.log(re)
  1750. }
  1751. },
  1752. fail: (res) => {
  1753. // console.log(res)
  1754. }
  1755. })
  1756. }
  1757. // #endif
  1758. let data = {
  1759. userId: this.byUserId,
  1760. postPushId: this.postPushId
  1761. }
  1762. this.$Request.getT("/app/interviewRecord/isSendView", data).then(res => {
  1763. if (res.code == 0) {
  1764. if (res.data) {
  1765. this.mianshiShow = true
  1766. } else {
  1767. uni.showToast({
  1768. title: '已发送过面试邀请',
  1769. icon: 'none'
  1770. })
  1771. this.mianshiShow = false
  1772. }
  1773. } else {
  1774. this.mianshiShow = false
  1775. uni.showToast({
  1776. title: res.msg,
  1777. icon: 'none'
  1778. })
  1779. }
  1780. })
  1781. },
  1782. //请求拒绝
  1783. refuseFun(id) {
  1784. let that = this
  1785. uni.showModal({
  1786. title: '提示',
  1787. content: '确定拒绝吗?',
  1788. confirmColor: '#00B88F',
  1789. complete(ret) {
  1790. if (ret.confirm) {
  1791. let data = {
  1792. chatContentId: id
  1793. }
  1794. that.$Request.getT("/app/chat/refuseReqs", data).then(res => {
  1795. if (res.code == 0) {
  1796. uni.showToast({
  1797. title: '已拒绝'
  1798. })
  1799. that.setChatSave(24)
  1800. that.getTimeOrListItem1()
  1801. that.getStatusInfo()
  1802. } else {
  1803. uni.showToast({
  1804. title: res.msg,
  1805. icon: 'none'
  1806. })
  1807. }
  1808. })
  1809. }
  1810. }
  1811. })
  1812. },
  1813. // 同意简历请求并发送简历
  1814. sendResumesSave() {
  1815. let that = this
  1816. let data = {
  1817. to: this.byUserId, //接收人的userId
  1818. postPushId: this.postPushId, //岗位id
  1819. }
  1820. this.$Request.postT("/app/resumes/sendResumes", data).then(res => {
  1821. if (res.code == 0) {
  1822. uni.showToast({
  1823. title: '简历已发送',
  1824. })
  1825. that.setChatSave(24)
  1826. that.getTimeOrListItem1()
  1827. that.getStatusInfo()
  1828. } else {
  1829. uni.showToast({
  1830. title: res.msg,
  1831. icon: 'none'
  1832. })
  1833. }
  1834. })
  1835. },
  1836. resumesTy() {
  1837. let that = this
  1838. uni.showModal({
  1839. title: '提示',
  1840. content: '确定发送简历给对方?',
  1841. confirmColor: '#00B88F',
  1842. complete(ret) {
  1843. if (ret.confirm) {
  1844. that.sendResumesSave()
  1845. }
  1846. }
  1847. })
  1848. },
  1849. //求简历
  1850. giveSendResumes() {
  1851. let that = this
  1852. uni.showModal({
  1853. title: '提示',
  1854. content: '是否将简历请求发送给对方?,对方同意后将会收到对方的简历',
  1855. confirmColor: '#00B88F',
  1856. complete(ret) {
  1857. if (ret.confirm) {
  1858. that.setChatSave(9)
  1859. }
  1860. }
  1861. })
  1862. },
  1863. //发简历
  1864. sendResumes() {
  1865. let that = this
  1866. uni.showModal({
  1867. title: '提示',
  1868. content: '是否将简历发送给对方?',
  1869. confirmColor: '#00B88F',
  1870. complete(ret) {
  1871. if (ret.confirm) {
  1872. that.sendResumesSave()
  1873. }
  1874. }
  1875. })
  1876. },
  1877. //获取交换状态
  1878. getStatusInfo() {
  1879. let data = {
  1880. chatConversationId: this.chatConversationId
  1881. }
  1882. this.$Request.getT("/app/chat/getConversationInfo", data).then(res => {
  1883. if (res.code == 0) {
  1884. if (res.data.isSendWx) {
  1885. this.isSendWx = true
  1886. } else {
  1887. this.isSendWx = false
  1888. }
  1889. if (res.data.isSendPhone) {
  1890. this.isSendPhone = true
  1891. } else {
  1892. this.isSendPhone = false
  1893. }
  1894. }
  1895. })
  1896. },
  1897. //交换微信号弹窗
  1898. currentWchat() {
  1899. let that = this
  1900. if (!uni.getStorageSync('weChatNum')) {
  1901. uni.showModal({
  1902. title: '提示',
  1903. content: '请先再个人信息页面完善微信号后操作',
  1904. confirmColor: '#00B88F',
  1905. confirmText: '去完善',
  1906. complete(re) {
  1907. if (re.confirm) {
  1908. uni.navigateTo({
  1909. url: '/pages/my/userinfo'
  1910. })
  1911. }
  1912. }
  1913. })
  1914. return
  1915. }
  1916. if (this.isSendWx == false) {
  1917. uni.showModal({
  1918. title: '确定与对方交换微信吗?',
  1919. content: '确定后,微信交换请求将发送给对方,对方同意后将会看到彼此的微信号',
  1920. confirmColor: '#00B88F',
  1921. complete(ret) {
  1922. if (ret.confirm) {
  1923. that.setChatSave(6)
  1924. }
  1925. }
  1926. })
  1927. } else {
  1928. uni.showToast({
  1929. title: '已交换过微信号,请查看聊天记录',
  1930. icon: 'none'
  1931. })
  1932. }
  1933. },
  1934. //同意交换手机号/微信
  1935. tongyi(messageType, chatContentId) {
  1936. if (messageType == 6 && !uni.getStorageSync('weChatNum')) {
  1937. uni.showModal({
  1938. title: '提示',
  1939. content: '请先再个人信息页面完善微信号后操作',
  1940. confirmColor: '#00B88F',
  1941. confirmText: '去完善',
  1942. complete(re) {
  1943. if (re.confirm) {
  1944. uni.navigateTo({
  1945. url: '/pages/my/userinfo'
  1946. })
  1947. }
  1948. }
  1949. })
  1950. return
  1951. }
  1952. let that = this
  1953. uni.showModal({
  1954. title: '提示',
  1955. content: messageType == 5 ? '同意后将交换手机号,是否同意?' : '同意后将交换微信号,是否同意?',
  1956. confirmColor: '#00B88F',
  1957. complete(ret) {
  1958. if (ret.confirm) {
  1959. let data = {
  1960. messageType: messageType,
  1961. chatContentId: chatContentId
  1962. }
  1963. that.$Request.postT("/app/chat/sendPhoneOrWx", data).then(res => {
  1964. if (res.code == 0) {
  1965. that.setChatSave(24)
  1966. that.getTimeOrListItem1()
  1967. that.getStatusInfo()
  1968. }
  1969. })
  1970. }
  1971. }
  1972. })
  1973. },
  1974. //交换手机号弹窗
  1975. currentPhone() {
  1976. let that = this
  1977. if (this.isSendPhone == false) {
  1978. uni.showModal({
  1979. title: '确定与对方交换电话吗?',
  1980. content: '确定后,电话交换请求将发送给对方,对方同意后将会看到彼此的手机号',
  1981. confirmColor: '#00B88F',
  1982. complete(ret) {
  1983. if (ret.confirm) {
  1984. that.setChatSave(5)
  1985. }
  1986. }
  1987. })
  1988. } else {
  1989. uni.showToast({
  1990. title: '已交换过手机号,请查看聊天记录',
  1991. icon: 'none'
  1992. })
  1993. }
  1994. },
  1995. goNav(url) {
  1996. uni.navigateTo({
  1997. url: url
  1998. })
  1999. },
  2000. //获取简历数据
  2001. getResumesInfo(id) {
  2002. this.$Request.getT("/app/resumes/selectResumesByResumesId", {
  2003. userId: uni.getStorageSync('userId'),
  2004. resumesId: id,
  2005. companyId: uni.getStorageSync('companyId')
  2006. }).then(res => {
  2007. if (res.code == 0) {
  2008. let title = res.data.resumesName
  2009. uni.setNavigationBarTitle({
  2010. title: title
  2011. })
  2012. this.resumesInfo = res.data
  2013. // this.postPushInfo.positionWelfare = this.postPushInfo.positionWelfare.split(',')
  2014. }
  2015. })
  2016. },
  2017. gotoInfo(id) {
  2018. uni.navigateTo({
  2019. url: '/pages/index/game/order?postPushId=' + id
  2020. })
  2021. },
  2022. //获取岗位数据
  2023. getPostPushInfo(id) {
  2024. this.$Request.getT("/app/postPush/selectPostPushDetails", {
  2025. userId: uni.getStorageSync('userId'),
  2026. postPushId: id
  2027. }).then(res => {
  2028. if (res.code == 0) {
  2029. let title = res.data.company.companyName
  2030. uni.setNavigationBarTitle({
  2031. title: title
  2032. })
  2033. this.postPushInfo = res.data
  2034. this.postPushInfo.positionWelfare = this.postPushInfo.positionWelfare.split(',')
  2035. }
  2036. })
  2037. },
  2038. caozuoActive(item, type) {
  2039. if (type == 1) {
  2040. this.activelist = [{
  2041. text: '复制',
  2042. color: 'black',
  2043. fontSize: 24
  2044. }, {
  2045. text: '撤回',
  2046. color: 'black',
  2047. fontSize: 24
  2048. }]
  2049. } else {
  2050. this.activelist = [{
  2051. text: '撤回',
  2052. color: 'black',
  2053. fontSize: 24
  2054. }]
  2055. }
  2056. this.activeInfo = item
  2057. this.showActive = true
  2058. },
  2059. activeclick(index) {
  2060. if (this.activelist[index].text == '复制') { // 复制
  2061. this.copy(this.activeInfo.content)
  2062. } else { //撤回
  2063. let t2 = this.activeInfo.createTimes; //格式不正确需要转换
  2064. let aftert2 = new Date(t2.replace(/-/g, "/")); //转换
  2065. let data = new Date(); //获取当前时间
  2066. let times = data.getTime() - aftert2.getTime(); //时间差的毫秒数
  2067. //计算分钟数
  2068. let minu = parseInt(times / (1000 * 60))
  2069. if (minu > 5) {
  2070. uni.showToast({
  2071. title: '超过五分钟无法撤回',
  2072. icon: 'none'
  2073. })
  2074. } else {
  2075. let that = this
  2076. uni.showModal({
  2077. title: '提示',
  2078. content: '确定要撤回吗?',
  2079. confirmColor: '#00B88F',
  2080. complete(ret) {
  2081. if (ret.confirm) {
  2082. that.$Request.postT('/app/chat/deleteChatContentById', {
  2083. chatContentId: that.activeInfo.chatContentId
  2084. })
  2085. .then(res => {
  2086. if (res.code == 0) {
  2087. uni.showToast({
  2088. title: '已撤回',
  2089. icon: 'none'
  2090. })
  2091. that.getTimeOrListItem1();
  2092. }
  2093. });
  2094. }
  2095. }
  2096. })
  2097. }
  2098. }
  2099. },
  2100. //跳转
  2101. click(index) {
  2102. console.log(index)
  2103. switch (index) {
  2104. case 0: //简历
  2105. uni.navigateTo({
  2106. url: '/pages/index/game/orderDet?userId=' + this.tUserId
  2107. })
  2108. break;
  2109. case 1: //企业
  2110. uni.navigateTo({
  2111. url: '/my/enterpriseInfo/enterpriseInfo?companyId=' + this.companyId + '&type=yes'
  2112. })
  2113. break;
  2114. default:
  2115. break;
  2116. }
  2117. },
  2118. //消息公告
  2119. getMessage() {
  2120. this.$Request.getT('/app/common/type/311')
  2121. .then(res => {
  2122. if (res.code == 0) {
  2123. this.messages = res.data.value
  2124. }
  2125. });
  2126. },
  2127. showChangYongSelect() {
  2128. this.showMore();
  2129. this.showChangYong = !this.showChangYong;
  2130. },
  2131. selConfirm(e) {
  2132. // this.form.game = e[0].label
  2133. // this.form.gameId = e[0].value
  2134. this.content = e[0].label;
  2135. this.setChatSave(1);
  2136. },
  2137. getChangYong() {
  2138. this.$Request.getT('/app/message/selectMessageByUserId?page=1&limit=100&state=20')
  2139. .then(res => {
  2140. if (res.code == 0) {
  2141. this.changYongList = [];
  2142. res.data.list.forEach(d => {
  2143. let data = {
  2144. label: d.content,
  2145. value: d.id
  2146. }
  2147. this.changYongList.push(data);
  2148. });
  2149. }
  2150. });
  2151. },
  2152. goGuanZhu(item) {
  2153. this.hideDrawer();
  2154. this.tUserId = item.userId
  2155. this.$Request.get('/app/user/selectUserByIds', {
  2156. 'userId': item.userId
  2157. }).then(res => {
  2158. if (res.code == 0) {
  2159. if (res.data.userType == 1 || res.data.userType == null) { //个人
  2160. uni.navigateTo({
  2161. url: '/pages/index/game/orderDet?userId=' + item.userId
  2162. })
  2163. } else {
  2164. this.$Request.get('/app/resumes/selectResumesByUserIds', {
  2165. 'userId': item.userId
  2166. }).then(ret => {
  2167. if (ret.code == 0) {
  2168. if (ret.data && JSON.stringify(ret.data) != '{}') { //有简历则选择
  2169. this.$Request.get('/app/company/selectCompanyByUserIds', {
  2170. userId: item.userId
  2171. }).then(ree => {
  2172. if (ree.code == 0) {
  2173. this.companyId = ree.data.companyId
  2174. }
  2175. });
  2176. this.show = true
  2177. } else { //没有简历直接跳转企业详情
  2178. this.$Request.get('/app/company/selectCompanyByUserIds', {
  2179. userId: item.userId
  2180. }).then(ree => {
  2181. if (ree.code == 0) {
  2182. uni.navigateTo({
  2183. url: '/my/enterpriseInfo/enterpriseInfo?companyId=' +
  2184. ree.data.companyId + '&type=yes'
  2185. })
  2186. }
  2187. });
  2188. }
  2189. }
  2190. });
  2191. }
  2192. }
  2193. });
  2194. //去关注页面
  2195. },
  2196. //添加常用语/自动回复
  2197. goAdd() {
  2198. this.showMore();
  2199. uni.navigateTo({
  2200. url: '/pages/msg/addmsg'
  2201. });
  2202. },
  2203. goHistory() {
  2204. this.showMore();
  2205. uni.navigateTo({
  2206. url: '/pages/msg/chathistory?chatConversationId=' + this.chatConversationId
  2207. });
  2208. },
  2209. insertChat() {
  2210. let userId = this.$queue.getData('userId');
  2211. let data = {
  2212. focusedUserId: this.byUserId,
  2213. userId: userId
  2214. }
  2215. this.$Request.postJson('/appChat/insertChatConversation', data).then(res => {
  2216. if (res.code == 0 && res.data) {
  2217. this.chatConversationId = res.data.chatConversationId;
  2218. this.getTimeOrListItem1();
  2219. }
  2220. });
  2221. },
  2222. //更多功能(点击+弹出)
  2223. showMore() {
  2224. this.isVoice = false;
  2225. this.hideEmoji = true;
  2226. if (this.hideMore) {
  2227. this.hideMore = false;
  2228. this.openDrawer();
  2229. } else {
  2230. this.hideDrawer();
  2231. }
  2232. },
  2233. // 打开抽屉
  2234. openDrawer() {
  2235. this.popupLayerClass = 'showLayer';
  2236. },
  2237. // 隐藏抽屉
  2238. hideDrawer() {
  2239. this.popupLayerClass = '';
  2240. setTimeout(() => {
  2241. this.hideMore = true;
  2242. this.hideEmoji = true;
  2243. }, 150);
  2244. },
  2245. // 选择表情
  2246. chooseEmoji() {
  2247. this.hideMore = true;
  2248. if (this.hideEmoji) {
  2249. this.hideEmoji = false;
  2250. this.openDrawer();
  2251. } else {
  2252. this.hideDrawer();
  2253. }
  2254. },
  2255. //添加表情
  2256. addEmoji(em) {
  2257. this.textMsg += em.alt;
  2258. },
  2259. //获取焦点,如果不是选表情ing,则关闭抽屉
  2260. textareaFocus() {
  2261. if (this.popupLayerClass == 'showLayer' && this.hideMore == false) {
  2262. this.hideDrawer();
  2263. }
  2264. },
  2265. //替换表情符号为图片
  2266. replaceEmoji(str) {
  2267. let replacedStr = str.replace(/\[([^(\]|\[)]*)\]/g, (item, index) => {
  2268. console.log("item: " + item);
  2269. for (let i = 0; i < this.emojiList.length; i++) {
  2270. let row = this.emojiList[i];
  2271. for (let j = 0; j < row.length; j++) {
  2272. let EM = row[j];
  2273. if (EM.alt == item) {
  2274. //在线表情路径,图文混排必须使用网络路径,请上传一份表情到你的服务器后再替换此路径
  2275. //比如你上传服务器后,你的100.gif路径为https://www.xxx.com/emoji/100.gif 则替换onlinePath填写为https://www.xxx.com/emoji/
  2276. let onlinePath = 'https://s2.ax1x.com/2019/04/12/'
  2277. let imgstr = '<img src="' + onlinePath + this.onlineEmoji[EM.url] + '">';
  2278. console.log("imgstr: " + imgstr);
  2279. return imgstr;
  2280. }
  2281. }
  2282. }
  2283. });
  2284. return '<div style="display: flex;align-items: center;word-wrap:break-word;">' + replacedStr + '</div>';
  2285. },
  2286. // 播放语音
  2287. playVoice(msg, index) {
  2288. console.log(msg)
  2289. this.playMsgid = index;
  2290. this.AUDIO.src = msg;
  2291. this.$nextTick(function() {
  2292. this.AUDIO.play();
  2293. });
  2294. },
  2295. // 录音开始
  2296. voiceBegin(e) {
  2297. if (e.touches.length > 1) {
  2298. return;
  2299. }
  2300. this.initPoint.Y = e.touches[0].clientY;
  2301. this.initPoint.identifier = e.touches[0].identifier;
  2302. this.RECORDER.start({
  2303. format: "mp3"
  2304. }); //录音开始,
  2305. },
  2306. //录音开始UI效果
  2307. recordBegin(e) {
  2308. this.recording = true;
  2309. this.voiceTis = '松开 结束';
  2310. this.recordLength = 0;
  2311. this.recordTimer = setInterval(() => {
  2312. this.recordLength++;
  2313. }, 1000)
  2314. },
  2315. // 录音被打断
  2316. voiceCancel() {
  2317. this.recording = false;
  2318. this.voiceTis = '按住 说话';
  2319. this.recordTis = '手指上滑 取消发送'
  2320. this.willStop = true; //不发送录音
  2321. this.RECORDER.stop(); //录音结束
  2322. },
  2323. // 录音中(判断是否触发上滑取消发送)
  2324. voiceIng(e) {
  2325. if (!this.recording) {
  2326. return;
  2327. }
  2328. let touche = e.touches[0];
  2329. //上滑一个导航栏的高度触发上滑取消发送
  2330. if (this.initPoint.Y - touche.clientY >= uni.upx2px(100)) {
  2331. this.willStop = true;
  2332. this.recordTis = '松开手指 取消发送'
  2333. } else {
  2334. this.willStop = false;
  2335. this.recordTis = '手指上滑 取消发送'
  2336. }
  2337. },
  2338. // 结束录音
  2339. voiceEnd(e) {
  2340. if (!this.recording) {
  2341. return;
  2342. }
  2343. this.recording = false;
  2344. this.voiceTis = '按住 说话';
  2345. this.recordTis = '手指上滑 取消发送'
  2346. this.RECORDER.stop(); //录音结束
  2347. },
  2348. //录音结束(回调文件)
  2349. recordEnd(e) {
  2350. clearInterval(this.recordTimer);
  2351. if (!this.willStop) {
  2352. this.$queue.showLoading('发送中...')
  2353. console.log("e: " + JSON.stringify(e));
  2354. let msg = {
  2355. length: 0,
  2356. url: e.tempFilePath
  2357. }
  2358. let min = parseInt(this.recordLength / 60);
  2359. let sec = this.recordLength % 60;
  2360. min = min < 10 ? '0' + min : min;
  2361. sec = sec < 10 ? '0' + sec : sec;
  2362. msg.length = min + ':' + sec;
  2363. console.log('msg.length___:' + msg.length)
  2364. uni.uploadFile({ // 上传接口
  2365. url: this.config("APIHOST1") + '/alioss/upload', //真实的接口地址
  2366. filePath: e.tempFilePath,
  2367. name: 'file',
  2368. success: (uploadFileRes) => {
  2369. uni.hideLoading();
  2370. this.content = JSON.parse(uploadFileRes.data).data;
  2371. console.log("语音:" + this.content)
  2372. this.setChatSave(3, msg.length);
  2373. uni.hideLoading();
  2374. }
  2375. });
  2376. } else {
  2377. console.log('取消发送录音');
  2378. }
  2379. this.willStop = false;
  2380. },
  2381. // 切换语音/文字输入
  2382. switchVoice() {
  2383. this.hideDrawer();
  2384. this.isVoice = this.isVoice ? false : true;
  2385. },
  2386. copy(content) {
  2387. uni.showModal({
  2388. title: '温馨提示',
  2389. content: '确认要复制此文字吗?',
  2390. showCancel: true,
  2391. cancelText: '取消',
  2392. confirmText: '确认',
  2393. confirmColor: '#00B88F',
  2394. success: res => {
  2395. if (res.confirm) {
  2396. uni.setClipboardData({
  2397. data: content,
  2398. success: r => {
  2399. this.$queue.showToast('复制成功');
  2400. }
  2401. });
  2402. }
  2403. }
  2404. });
  2405. },
  2406. h5Copy(content) {
  2407. if (!document.queryCommandSupported('copy')) {
  2408. // 不支持
  2409. return false
  2410. }
  2411. let textarea = document.createElement("textarea")
  2412. textarea.value = content
  2413. textarea.readOnly = "readOnly"
  2414. document.body.appendChild(textarea)
  2415. textarea.select() // 选择对象
  2416. textarea.setSelectionRange(0, content.length) //核心
  2417. let result = document.execCommand("copy") // 执行浏览器复制命令
  2418. textarea.remove()
  2419. return result
  2420. },
  2421. getDateDiff(data) {
  2422. // 传进来的data必须是日期格式,不能是时间戳
  2423. //var str = data;
  2424. //将字符串转换成时间格式
  2425. var timePublish = new Date(data);
  2426. var timeNow = new Date();
  2427. var minute = 1000 * 60;
  2428. var hour = minute * 60;
  2429. var day = hour * 24;
  2430. var month = day * 30;
  2431. var result = "2";
  2432. var diffValue = timeNow - timePublish;
  2433. var diffMonth = diffValue / month;
  2434. var diffWeek = diffValue / (7 * day);
  2435. var diffDay = diffValue / day;
  2436. var diffHour = diffValue / hour;
  2437. var diffMinute = diffValue / minute;
  2438. if (diffMonth > 3) {
  2439. result = timePublish.getFullYear() + "-";
  2440. result += timePublish.getMonth() + "-";
  2441. result += timePublish.getDate();
  2442. } else if (diffMonth > 1) { //月
  2443. result = data.substring(0, 10);
  2444. } else if (diffWeek > 1) { //周
  2445. result = data.substring(0, 10);
  2446. } else if (diffDay > 1) { //天
  2447. result = data.substring(0, 10);
  2448. } else if (diffHour > 1) { //小时
  2449. result = parseInt(diffHour) + "小时前";
  2450. } else if (diffMinute > 1) { //分钟
  2451. result = parseInt(diffMinute) + "分钟前";
  2452. } else {
  2453. result = "刚刚";
  2454. }
  2455. return result;
  2456. },
  2457. // 发送心跳包
  2458. startHeartbeat() {
  2459. // HeartBeat 这里是和后端约定好的值,我们发送给后端,后端再把这个值返给我们
  2460. // 目的就是让后端知道我们一直在
  2461. const heartbeatMsg = 'HeartBeat';
  2462. const sendHeartbeat = () => {
  2463. if (this.isOpen) {
  2464. console.log('发送HeartBeat')
  2465. uni.sendSocketMessage({
  2466. data: heartbeatMsg,
  2467. }).catch(error => {
  2468. console.log('发送心跳消息失败:', error);
  2469. //发送消息失败则进行重新链接
  2470. this.connect()
  2471. });
  2472. }
  2473. };
  2474. this.socketTimer = setInterval(sendHeartbeat, HEARTBEAT_INTERVAL);
  2475. },
  2476. // 开始重连
  2477. reconnect() {
  2478. if (!this.isOpen) {
  2479. clearTimeout(this.socketTimer);
  2480. this.socketTimer = setTimeout(() => {
  2481. console.log('开始重连...');
  2482. this.connect();
  2483. }, RECONNECT_INTERVAL);
  2484. }
  2485. },
  2486. connect() {
  2487. // #ifdef MP-WEIXIN
  2488. if (uni.getStorageSync('sendMsg')) {
  2489. // console.log('授权+1')
  2490. wx.requestSubscribeMessage({
  2491. tmplIds: this.arr,
  2492. success(re) {
  2493. // console.log(JSON.stringify(re), 111111111111)
  2494. var datas = JSON.stringify(re);
  2495. if (datas.indexOf("accept") != -1) {
  2496. // console.log(re)
  2497. }
  2498. },
  2499. fail: (res) => {
  2500. // console.log(res)
  2501. }
  2502. })
  2503. }
  2504. // #endif
  2505. let that = this
  2506. let userId = this.$queue.getData('userId');
  2507. uni.showLoading({
  2508. title: '连接中...'
  2509. })
  2510. uni.connectSocket({
  2511. // url: 'wss://h5.youxb.icu/wss/sqx_fast/chatSocket/' + userId,
  2512. // url: this.config("WSHOST1") + userId,
  2513. url: configdata.WSHOST1 + '' + userId,
  2514. // url: 'wss://zp.xianmaxiong.com/wss/chatSocket/' + userId,
  2515. // url: 'ws://192.168.0.128:7152/sqx_fast/chatSocket/' + userId,
  2516. data() {
  2517. return {
  2518. msg: 'Hello'
  2519. }
  2520. },
  2521. header: {
  2522. 'content-type': 'application/json'
  2523. },
  2524. method: 'GET',
  2525. success(res) {
  2526. // 这里是接口调用成功的回调,不是连接成功的回调,请注意
  2527. },
  2528. fail(err) {
  2529. // 这里是接口调用失败的回调,不是连接失败的回调,请注意
  2530. }
  2531. })
  2532. uni.onSocketOpen((res) => {
  2533. uni.hideLoading()
  2534. that.isOpen = true;
  2535. that.startHeartbeat()
  2536. if (that.mapsValue) {
  2537. that.setChatSave(18, that.mapsValue)
  2538. }
  2539. })
  2540. uni.onSocketError((err) => {
  2541. uni.hideLoading()
  2542. //如果连接异常那么把状态设置为false
  2543. that.isOpen = false;
  2544. //并尝试进行重连
  2545. that.reconnect();
  2546. })
  2547. uni.onSocketMessage((res) => {
  2548. if (res.data == 'HeartBeat') { //如果是心跳回推则不进行处理
  2549. return
  2550. }
  2551. this.getTimeOrListItem1();
  2552. console.log('onMessage', res)
  2553. })
  2554. uni.onSocketClose((res) => {
  2555. uni.hideLoading()
  2556. that.isOpen = false;
  2557. //链接关闭的时候也尝试进行重连
  2558. // that.reconnect();
  2559. })
  2560. },
  2561. close() {
  2562. uni.closeSocket()
  2563. },
  2564. getTimeOrListItem1() {
  2565. let userId = this.$queue.getData('userId')
  2566. this.$Request.getT('/app/chat/selectChatContent?page=' + this.page + '&limit=' + this.size +
  2567. '&chatConversationId=' + this.chatConversationId + '&userId=' + userId).then(
  2568. res => {
  2569. // this.ListItem = [];
  2570. if (res.data) {
  2571. var time = '';
  2572. res.data.list.forEach(d => {
  2573. d.createTimes = d.createTime;
  2574. d.createTime = this.getDateDiff(d.createTime);
  2575. if (d.createTime === time) {
  2576. d.createTime = '';
  2577. } else {
  2578. time = d.createTime;
  2579. }
  2580. if (d.type === 4) {
  2581. let data = d.content.split(',');
  2582. d.content = data;
  2583. }
  2584. if (d.type === 3) {
  2585. let data = d.content.split(',');
  2586. d.content = data;
  2587. }
  2588. if (d.messageType === 18) {
  2589. d.content = JSON.parse(d.content);
  2590. d.markers = [{
  2591. id: 1,
  2592. latitude: d.content.latitude,
  2593. longitude: d.content.longitude,
  2594. width: 20,
  2595. height: 20,
  2596. iconPath: '../../static/images/mapMarker.png',
  2597. callout: {
  2598. content: d.content.name,
  2599. color: '#000', //文字颜色
  2600. fontSize: 10, //文本大小
  2601. padding: 10, //附近留白
  2602. borderRadius: 24, //边框圆角
  2603. bgColor: '#FFFFFF', //背景颜色
  2604. display: 'ALWAYS', //常显
  2605. }
  2606. }]
  2607. }
  2608. // this.ListItem.push(d);
  2609. });
  2610. this.ListItem = res.data.list
  2611. this.ListItem.reverse();
  2612. this.scrollTop = this.old.scrollTop
  2613. this.$nextTick(() => {
  2614. this.scrollTop = 99999
  2615. })
  2616. this.getStatusInfo()
  2617. }
  2618. uni.hideLoading();
  2619. });
  2620. },
  2621. setChatSave(type, url) {
  2622. //type:1文字 2图片
  2623. if (type === 1 && this.content == '') {
  2624. this.$queue.showToast('请输入聊天内容');
  2625. return;
  2626. }
  2627. if (type != 3 && type != 2 && this.$queue.getChatSearchKeys(this.content)) {
  2628. uni.showToast({
  2629. title: "输入内容带有非法关键字请重新输入",
  2630. mask: false,
  2631. duration: 1500,
  2632. icon: "none"
  2633. });
  2634. return;
  2635. }
  2636. // if (type === 1 && this.$queue.getChatSearchKeys(this.content) != -1) {
  2637. // uni.showToast({
  2638. // title: "输入内容带有非法关键字请重新输入",
  2639. // mask: false,
  2640. // duration: 1500,
  2641. // icon: "none"
  2642. // });
  2643. // return;
  2644. // }
  2645. let userId = this.$queue.getData('userId');
  2646. if (type === 4) {
  2647. this.content = url;
  2648. }
  2649. if (type === 18) { //定位
  2650. this.content = url;
  2651. }
  2652. let data = {};
  2653. if (type == 3) {
  2654. data = {
  2655. userId: this.byUserId,
  2656. content: this.content,
  2657. width: url,
  2658. messageType: type,
  2659. chatConversationId: this.chatConversationId
  2660. }
  2661. } else if (type == 5) { //交换手机号
  2662. data = {
  2663. userId: this.byUserId,
  2664. content: '手机号请求',
  2665. messageType: type,
  2666. chatConversationId: this.chatConversationId
  2667. }
  2668. } else if (type == 6) { //交换微信号
  2669. data = {
  2670. userId: this.byUserId,
  2671. content: '微信号请求',
  2672. messageType: type,
  2673. chatConversationId: this.chatConversationId
  2674. }
  2675. } else if (type == 9) { //简历请求
  2676. data = {
  2677. userId: this.byUserId,
  2678. content: '简历请求',
  2679. messageType: type,
  2680. chatConversationId: this.chatConversationId
  2681. }
  2682. } else if (type == 24) {
  2683. data = {
  2684. userId: this.byUserId,
  2685. content: '刷新',
  2686. messageType: type,
  2687. chatConversationId: this.chatConversationId
  2688. }
  2689. } else {
  2690. data = {
  2691. userId: this.byUserId,
  2692. content: this.content,
  2693. messageType: type,
  2694. chatConversationId: this.chatConversationId
  2695. }
  2696. }
  2697. data = JSON.stringify(data);
  2698. let that = this;
  2699. uni.sendSocketMessage({
  2700. data: data,
  2701. success(res) {
  2702. that.mapsValue = ''
  2703. let image_url = that.$queue.getData('image_url');
  2704. if (!image_url) {
  2705. image_url = '/static/logo.png';
  2706. }
  2707. let datas = {
  2708. chat: {
  2709. userHead: image_url
  2710. },
  2711. content: that.content,
  2712. type: type,
  2713. sendType: 1
  2714. }
  2715. that.ListItem.push(datas);
  2716. setTimeout(() => {
  2717. that.getTimeOrListItem1();
  2718. that.content = '';
  2719. }, 50);
  2720. console.log(that.content);
  2721. },
  2722. fail(err) {
  2723. console.log(err);
  2724. }
  2725. })
  2726. },
  2727. //发送图片
  2728. chooseImage(sourceType) {
  2729. let that = this
  2730. uni.chooseImage({
  2731. count: 1,
  2732. sourceType: ['album'],
  2733. success: res => {
  2734. for (let i = 0; i < res.tempFilePaths.length; i++) {
  2735. this.$queue.showLoading("上传中...");
  2736. uni.uploadFile({ // 上传接口
  2737. url: this.config("APIHOST1") + '/alioss/upload', //真实的接口地址
  2738. filePath: res.tempFilePaths[i],
  2739. name: 'file',
  2740. success: (uploadFileRes) => {
  2741. let content = JSON.parse(uploadFileRes.data).data;
  2742. // this.setChatSave(2);
  2743. uni.hideLoading();
  2744. let data = {
  2745. userId: that.byUserId,
  2746. content: content,
  2747. messageType: 2,
  2748. chatConversationId: that.chatConversationId
  2749. }
  2750. data = JSON.stringify(data);
  2751. uni.sendSocketMessage({
  2752. data: data,
  2753. success(res) {
  2754. let image_url = that.$queue.getData(
  2755. 'image_url');
  2756. if (!image_url) {
  2757. image_url = '/static/logo.png';
  2758. }
  2759. let datas = {
  2760. chat: {
  2761. userHead: image_url
  2762. },
  2763. content: content,
  2764. type: 2,
  2765. sendType: 1
  2766. }
  2767. that.ListItem.push(datas);
  2768. setTimeout(() => {
  2769. that.getTimeOrListItem1();
  2770. }, 50);
  2771. },
  2772. fail(err) {
  2773. console.log(err);
  2774. }
  2775. })
  2776. }
  2777. });
  2778. }
  2779. }
  2780. })
  2781. },
  2782. config: function(name) {
  2783. var info = null;
  2784. if (name) {
  2785. var name2 = name.split("."); //字符分割
  2786. if (name2.length > 1) {
  2787. info = configdata[name2[0]][name2[1]] || null;
  2788. } else {
  2789. info = configdata[name] || null;
  2790. }
  2791. if (info == null) {
  2792. let web_config = cache.get("web_config");
  2793. if (web_config) {
  2794. if (name2.length > 1) {
  2795. info = web_config[name2[0]][name2[1]] || null;
  2796. } else {
  2797. info = web_config[name] || null;
  2798. }
  2799. }
  2800. }
  2801. }
  2802. return info;
  2803. },
  2804. //查看大图
  2805. viewImg(item) {
  2806. let imgsArray = [];
  2807. imgsArray[0] = item;
  2808. uni.previewImage({
  2809. current: 0,
  2810. urls: imgsArray
  2811. });
  2812. },
  2813. },
  2814. };
  2815. </script>
  2816. <style lang="scss">
  2817. @import "../msg/css/style.scss";
  2818. .avatorm {
  2819. width: 100%;
  2820. // height: 100rpx;
  2821. margin-top: 20rpx;
  2822. color: #000;
  2823. .avatorm-box {
  2824. width: 90%;
  2825. height: 100%;
  2826. .avatorm-box-item {
  2827. margin-bottom: 10rpx;
  2828. .avatorm-box-item-t {
  2829. width: 30%;
  2830. }
  2831. .avatorm-box-item-r {
  2832. width: 70%;
  2833. }
  2834. }
  2835. }
  2836. }
  2837. .mssTitle {
  2838. width: 100%;
  2839. margin-top: 30rpx;
  2840. text-align: center;
  2841. font-size: 30rpx;
  2842. color: #000;
  2843. font-weight: bold;
  2844. }
  2845. .btnm {
  2846. width: 100%;
  2847. margin-top: 20rpx;
  2848. height: 80rpx;
  2849. margin-bottom: 100rpx;
  2850. .btn-box {
  2851. width: 686rpx;
  2852. height: 100%;
  2853. .btnItem {
  2854. display: flex;
  2855. align-items: center;
  2856. justify-content: center;
  2857. width: 200rpx;
  2858. height: 100%;
  2859. border-radius: 14rpx;
  2860. }
  2861. .btn-close {
  2862. color: #00B88F;
  2863. border: 1rpx solid #00B88F;
  2864. }
  2865. .btn-sub {
  2866. color: #FFFFFF;
  2867. background-color: #00B88F;
  2868. }
  2869. }
  2870. }
  2871. .mianshiTime {
  2872. width: 100%;
  2873. margin-top: 20rpx;
  2874. .mianshiTime-box {
  2875. padding-bottom: 20rpx;
  2876. width: 686rpx;
  2877. height: 100%;
  2878. color: #000000;
  2879. border-bottom: 1rpx solid #F2F2F7;
  2880. .mianshiTime-box-ti {
  2881. height: 100%;
  2882. margin-top: 20rpx;
  2883. }
  2884. }
  2885. }
  2886. .mianshiTitle {
  2887. width: 100%;
  2888. margin-top: 30rpx;
  2889. font-size: 30rpx;
  2890. text-align: center;
  2891. font-weight: bold;
  2892. color: #000000;
  2893. }
  2894. .qyList-box-item {
  2895. width: 100%;
  2896. // height: 400rpx;
  2897. padding-bottom: 40rpx;
  2898. background-color: #ffffff;
  2899. border-radius: 24rpx;
  2900. margin-bottom: 20rpx;
  2901. .qyList-box-item-box {
  2902. width: 626rpx;
  2903. height: 100%;
  2904. }
  2905. .qyList-box-item-info {
  2906. margin-top: 40rpx;
  2907. }
  2908. .qyList-box-item-job {
  2909. color: #121212;
  2910. font-size: 28rpx;
  2911. font-weight: 500;
  2912. margin-top: 20rpx;
  2913. }
  2914. .qyList-box-item-rem {
  2915. color: #999999;
  2916. font-size: 26rpx;
  2917. margin-top: 20rpx;
  2918. }
  2919. }
  2920. .topSe {
  2921. width: 100%;
  2922. height: 100rpx;
  2923. background-color: #FFFFFF;
  2924. .topSe-box {
  2925. width: 686rpx;
  2926. height: 100%;
  2927. .topSe-box-item {
  2928. font-size: 24rpx;
  2929. width: 80rpx;
  2930. }
  2931. }
  2932. }
  2933. .jobs {
  2934. width: 100%;
  2935. margin-top: 20rpx;
  2936. .jobs-box {
  2937. width: 95%;
  2938. }
  2939. }
  2940. .gwList-box-item {
  2941. width: 100%;
  2942. // height: 329rpx;
  2943. background-color: #ffffff;
  2944. border-radius: 24rpx;
  2945. margin-bottom: 20rpx;
  2946. padding-bottom: 20rpx;
  2947. }
  2948. .gwList-box-item-box {
  2949. width: 623rpx;
  2950. height: 100%;
  2951. .gwList-box-item-box-title {
  2952. margin-top: 30rpx;
  2953. text:nth-of-type(1) {
  2954. color: #1F1F1F;
  2955. font-size: 38rpx;
  2956. font-weight: 800;
  2957. }
  2958. text:nth-of-type(2) {
  2959. color: #00B88F;
  2960. font-size: 38rpx;
  2961. font-weight: bold;
  2962. }
  2963. }
  2964. .gwList-box-item-box-label {
  2965. margin-top: 30rpx;
  2966. }
  2967. .gwList-box-item-box-name {
  2968. margin-top: 24rpx;
  2969. color: #999999;
  2970. font-size: 28rpx;
  2971. font-weight: 500;
  2972. }
  2973. .gwList-box-item-box-line {
  2974. width: 100%;
  2975. border: 1rpx solid #E6E6E6;
  2976. margin-top: 30rpx;
  2977. margin-bottom: 20rpx;
  2978. }
  2979. .gwList-box-item-box-info {
  2980. font-size: 26rpx;
  2981. .gwList-box-item-box-info-l {
  2982. color: #1A1A1A;
  2983. .people {
  2984. max-width: 110rpx;
  2985. overflow: hidden; //超出的文本隐藏
  2986. text-overflow: ellipsis; //溢出用省略号显示
  2987. white-space: nowrap; // 默认不换行;
  2988. }
  2989. }
  2990. .gwList-box-item-box-info-r {
  2991. color: #999999;
  2992. width: 50%;
  2993. overflow: hidden; //超出的文本隐藏
  2994. text-overflow: ellipsis; //溢出用省略号显示
  2995. white-space: nowrap; // 默认不换行;
  2996. }
  2997. }
  2998. }
  2999. .xuanfu {
  3000. width: 100%;
  3001. display: flex;
  3002. justify-content: center;
  3003. align-items: center;
  3004. color: #00B88F;
  3005. .xuanfu-box {
  3006. width: 95%;
  3007. background-color: #FFFFFF;
  3008. border-radius: 10rpx;
  3009. padding: 20rpx 15rpx 20rpx 20rpx;
  3010. letter-spacing: 5rpx;
  3011. font-size: 26rpx;
  3012. }
  3013. }
  3014. page {
  3015. background: #F5F5F5;
  3016. color: #FFFFFF;
  3017. }
  3018. .chat-listitem {
  3019. display: flex;
  3020. margin-top: 20rpx;
  3021. padding: 10rpx;
  3022. }
  3023. .textColor {
  3024. color: #FFFFFF;
  3025. background: #00B88F;
  3026. }
  3027. .chat-listitem-text {
  3028. // color: #FFFFFF;
  3029. margin-top: 6rpx;
  3030. width: fit-content;
  3031. padding: 15rpx;
  3032. font-size: 30rpx;
  3033. height: max-content;
  3034. word-wrap: break-word;
  3035. word-break: break-all;
  3036. border-radius: 10rpx;
  3037. }
  3038. .chat-listitem-image-type4 {
  3039. color: #000000;
  3040. background: #FFFFFF;
  3041. width: fit-content;
  3042. font-size: 30rpx;
  3043. height: max-content;
  3044. word-wrap: break-word;
  3045. word-break: break-all;
  3046. border-top-left-radius: 20rpx;
  3047. border-top-right-radius: 20rpx;
  3048. }
  3049. .chat-listitem-image {
  3050. margin-top: 5rpx;
  3051. width: 75rpx;
  3052. height: 75rpx;
  3053. border-radius: 5rpx;
  3054. }
  3055. .save {
  3056. width: 130rpx;
  3057. text-align: center;
  3058. border-radius: 10rpx;
  3059. height: 70rpx;
  3060. background: #FFFFFF;
  3061. margin: 5rpx 10rpx 0;
  3062. line-height: 70rpx;
  3063. }
  3064. </style>