im.vue 92 KB

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