index.vue 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115
  1. <template>
  2. <view style="padding-bottom: 30rpx;" v-if="!loading">
  3. <view class="top-fixed" :style="'height: '+ systems.barHeight + 'rpx;'">
  4. <view :class="'bgcolor' + (isTop == 1 ? ' opacity' : '')" :style="'height:' + systems.barHeight + 'rpx'">
  5. </view>
  6. <view class="top-fixed-c"
  7. :style="'height: '+ systems.navigationHeight + 'rpx;margin-top:' + systems.ktxStatusHeight + 'rpx;'">
  8. <navigator @click="toBack" hover-class="none" class="back ddflex"
  9. :style="'height: '+ systems.navigationHeight + 'rpx;'">
  10. <image v-if="!pageBack" src="/static/pages/images/back_black.png"></image>
  11. <image v-else src="/static/pages/images/back_home.png" style="width: 40rpx;height:40rpx"></image>
  12. </navigator>
  13. <view :class="'top-title tover' + (isTop == 1 ? ' top-black':'')"
  14. :style="'line-height: '+ systems.navigationHeight + 'rpx;'">名片</view>
  15. </view>
  16. </view>
  17. <view :style="'height: '+ systems.barHeight + 'rpx;'"></view>
  18. <view class="bg">
  19. <image src="/static/pages/images/userBg.png"></image>
  20. </view>
  21. <view class="infos">
  22. <view class="infos-border">
  23. <view class="photo">
  24. <block v-if="cardInfo.avatar">
  25. <image :src="cardInfo.avatar" mode="aspectFill" class="poster"></image>
  26. <view class="change-option ddflex">
  27. <view v-if="cardId" class="change" style="right: 140rpx;background-color:#27D699;"
  28. @click="userBehavior(3)">
  29. <image v-if="!cardInfo.isThumbs" style="width: 35rpx;height: 32rpx;"
  30. src="/card/static/images/dz1.png" mode="aspectFit"></image>
  31. <image v-else style="width: 35rpx;height:32rpx;" src="/card/static/images/dz1_h.png" mode="aspectFit">
  32. </image>
  33. <view class="change-option-text">点赞</view>
  34. <!-- 点赞 -->
  35. </view>
  36. <view v-if="cardId&&(userInfo.manageSaleNo!=cardInfo.jobNumber)" class="change" @click="jumpUrl('/card/cardFound/cardFound')">
  37. <image src="/card/static/images/change.png" style="width: 35rpx;height: 32rpx;" mode="aspectFit"></image>
  38. <view class="change-option-text">切换</view>
  39. <!-- 更换销售员-->
  40. </view>
  41. <view v-if="cardId&&(!userInfo.manageSaleNo)" style="background-color: #FF7229;" class="change" @click="bindSale()">
  42. <image style="width: 32rpx;height: 32rpx;" src="/card/static/images/bind.png" mode="aspectFit"></image>
  43. <view class="change-option-text">绑定</view>
  44. <!-- 绑定销售员-->
  45. </view>
  46. </view>
  47. </block>
  48. </view>
  49. <view class="info dflex">
  50. <view class="flex">
  51. <view class="name">
  52. {{ cardInfo.realName }}
  53. <text class="job" v-if="cardInfo.job">{{ cardInfo.jobName }}</text>
  54. <text class="job">入司{{cardInfo.inDate?monthDayDiff(cardInfo.inDate):'1年'}}</text>
  55. </view>
  56. <view class="company ddflex" style="margin-top: 20rpx;">
  57. <image src="/card/static/images/gs.png"></image>
  58. {{ cardInfo.companyName }}
  59. </view>
  60. <view class="company ddflex">
  61. <image src="/card/static/images/area.png"></image>
  62. 服务区域 {{ cardInfo.areaCodeName?cardInfo.areaCodeName:'湖南' }}
  63. </view>
  64. <view class="company">
  65. 执业证书:{{ cardInfo.professionalCertificateNo?cardInfo.professionalCertificateNo:'暂无'}}
  66. </view>
  67. <view class="ddflex" style="margin-top: 30rpx;">
  68. <view class="ddflex fflex" style="background: #F8F8F8;border-radius: 10rpx;padding: 20rpx;font-size: 26rpx;margin-right: 30rpx;">
  69. <image style="width: 32rpx;height: 32rpx;margin-right: 10rpx;" src="/card/static/images/phone.png"></image>
  70. {{cardInfo.phone?cardInfo.phone:'暂无手机号'}}
  71. </view>
  72. <view class="ddflex fflex" style="background: #F8F8F8;border-radius: 10rpx;padding: 20rpx;font-size: 26rpx;">
  73. <image style="width: 32rpx;height: 32rpx;margin-right: 10rpx;" src="/card/static/images/wx.png"></image>
  74. {{cardInfo.wechat?cardInfo.wechat:'暂无微信号'}}
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. </view>
  80. <view class="btns ddflex" v-if="cardId">
  81. <view class="share-ta ddflex fflex" :style="!(cardInfo.wechat||cardInfo.wechatCode||cardInfo.wechatCompanyCode)?'background: #999':'background: linear-gradient(80deg, #7EBFF1 0%, #458EEE 100%);'"
  82. @click="cardInfo.wechat||cardInfo.wechatCode||cardInfo.wechatCompanyCode?showCodePop():''">
  83. <image src="../../static/pages/images/wx.png"></image>微信联系</view>
  84. <view class="share-ta ddflex fflex" :style="!cardInfo.phone?'background: #999':'background: linear-gradient(84deg, #6FE5BC 0%, #27D699 100%);'"
  85. @click="cardInfo.phone?goPhone():''">
  86. <image src="/card/static/images/phone1.png"></image>电话联系</view>
  87. <view class="share-ta ddflex fflex" style="background: linear-gradient(80deg, #FF985A 0%, #FF5700 100%);"
  88. @click="cardInfo.auditState!=1?'':jumpUrl('/card/poster/poster?id='+cardInfo.id)">
  89. <image src="/card/static/images/fx.png"></image>分享名片</view>
  90. </view>
  91. <view class="save-text ddflex" v-if="cardId" @click="saveToPhone()">
  92. <image src="/card/static/images/save.png"></image>保存到通讯录
  93. </view>
  94. <view class="btns ddflex" v-if="!cardId" style="justify-content: center;">
  95. <view class="share-ta ddflex" style="background: linear-gradient(84deg, #6FE5BC 0%, #27D699 100%);width: 260rpx;margin-right: 30rpx;"
  96. @click="cardInfo.auditState!=1?'':jumpUrl('/card/poster/poster?id='+cardInfo.id)">
  97. <image src="/card/static/images/wdmp.png"></image>我的名片码</view>
  98. <button :open-type="cardInfo.auditState!=1?'':'share'" class="share-ta ddflex" style="background: linear-gradient(80deg, #FF985A 0%, #FF5700 100%);width: 260rpx !important;"
  99. >
  100. <image src="/card/static/images/fx.png"></image>发送名片</button>
  101. </view>
  102. <view class="extend-info">
  103. <view class="ddflex">
  104. <view class="extend-info-item fflex">
  105. <view class="extend-info-data">{{cardInfo.cntCust?cardInfo.cntCust:0}}</view>
  106. <view class="extend-info-label ddflex">
  107. <image src="../../static/pages/images/fw_hui.png"></image>
  108. <view>服务客户</view>
  109. </view>
  110. </view>
  111. <view class="extend-info-item fflex">
  112. <view class="extend-info-data">{{cardInfo.cntCntr?cardInfo.cntCntr:0}}</view>
  113. <view class="extend-info-label ddflex">
  114. <image src="/static/pages/images/cy_hui.png"></image>
  115. <view>保单件数</view>
  116. </view>
  117. </view>
  118. <view class="extend-info-item fflex">
  119. <view class="extend-info-data">{{cardInfo.thumbs?cardInfo.thumbs:0}}</view>
  120. <view class="extend-info-label ddflex">
  121. <image src="/static/pages/images/dz_hui.png"></image>
  122. <view>点赞量</view>
  123. </view>
  124. </view>
  125. </view>
  126. <view class="ddflex" style="margin-top: 20rpx;justify-content: flex-start;">
  127. <view class="extend-info-item fflex">
  128. <view class="extend-info-data">{{cardInfo.faceAmnt?cardInfo.faceAmnt:0}}</view>
  129. <view class="extend-info-label ddflex">
  130. <image style="width: 30rpx;height: 30rpx;" src="/static/pages/images/khbz.png"></image>
  131. <view>客户保障(万元)</view>
  132. </view>
  133. </view>
  134. <view class="extend-info-item fflex">
  135. <view class="extend-info-data">{{cardInfo.cpnstAmnt?cardInfo.cpnstAmnt:0}}</view>
  136. <view class="extend-info-label ddflex">
  137. <image style="width: 30rpx;height: 30rpx;" src="/static/pages/images/khlp.png"></image>
  138. <view>客户理赔(万元)</view>
  139. </view>
  140. </view>
  141. </view>
  142. </view>
  143. <view class="q-hud ddflex">
  144. <view class="q-hud-c ddflex">
  145. <view class="q-users ddflex">
  146. <image :src="item.avatar?item.avatar:'../../static/images/userimg.png'" mode="aspectFill" v-for="(item, index) in cardInfo.pageUser.list"
  147. v-if="index<3" :key="index"></image>
  148. </view>
  149. <view class="fflex">
  150. {{cardInfo.pageUser.total}}人看过
  151. </view>
  152. <!-- <image src="../static/images/q_rico.png" class="q-rico"></image> -->
  153. </view>
  154. <view class="q-hud-r ddflex">
  155. <view class="ddflex">
  156. <image style="width: 23rpx;height: 31rpx;margin-right: 10rpx;"
  157. src="/card/static/images/hot.png"></image>
  158. <text>{{cardInfo.share}}</text>
  159. </view>
  160. </view>
  161. </view>
  162. </view>
  163. <!-- 评分 -->
  164. <view class="pf-box">
  165. <view class="ddflex" style="justify-content: space-between;">
  166. <view class="pf-nav">客户评价</view>
  167. <view class="ddflex pf-more" @click="jumpUrl('/card/evaluateList/evaluateList?groupId='+cardInfo.id)" v-if="evaluateInfo.evaluateDTO">
  168. 全部评价
  169. <image style="width: 9rpx;height: 19rpx;margin-left: 10rpx;" src="/static/pages/images/more.png"></image>
  170. </view>
  171. </view>
  172. <view class="ddflex" style="justify-content: center;margin-top: 40rpx;">
  173. <view class="pf-number">
  174. {{evaluateInfo.info?evaluateInfo.info.avage:0}}<text style="font-size: 24rpx;color: #333333;font-weight: 400;margin-left: 10rpx;">分</text>
  175. </view>
  176. <uni-rate style="justify-content: center;margin-left: 30rpx;" class="ddflex" color="#999999" active-color="#FF4600" :readonly="true" size="18" allow-half :value="evaluateInfo.info.avage/2" />
  177. </view>
  178. <view class="pf-note">综合评分 {{evaluateInfo.info?evaluateInfo.info.total:0}}人评分</view>
  179. <view class="pf-data" v-if="evaluateInfo.evaluateDTO">
  180. <view class="pf-user ddflex">
  181. <view class="ddflex">
  182. <image class="pf-user-header" :src="evaluateInfo.evaluateDTO.avatar?evaluateInfo.evaluateDTO.avatar:'../../static/images/userimg.png'"></image>
  183. <view class="pf-user-name tover">{{evaluateInfo.evaluateDTO.name}}</view>
  184. <uni-rate style="justify-content: center;margin-left: 30rpx;" class="ddflex" color="#999999" active-color="#FF4600" :readonly="true" size="14" allow-half :value="evaluateInfo.evaluateDTO.serveScore/2" />
  185. <text style="font-size: 20rpx;color: #FF4600;">{{evaluateInfo.evaluateDTO.serveScore}}分</text>
  186. </view>
  187. <view class="pf-user-time">{{evaluateInfo.evaluateDTO.createDate}}</view>
  188. </view>
  189. <view class="pf-user-content">
  190. {{evaluateInfo.evaluateDTO.content}}
  191. </view>
  192. <view class="" style="margin-top: 20rpx;">
  193. <image :style="'width: 200rpx;height: 200rpx;margin-bottom: 10rpx;display: inline-block;'+((index+1)%3==0?'':'margin-right:10rpx')"
  194. v-for="item,index in evaluateInfo.evaluateDTO.evaluateImgUrls" :src="item" mode="aspectFit"
  195. @click="previewImg(evaluateInfo.evaluateDTO.evaluateImgUrls,index)"></image>
  196. </view>
  197. </view>
  198. <view class="pf-btn" v-if="cardId" @click="jumpUrl('/card/evaluate/evaluate?id='+cardInfo.id)">点击输入您的评价</view>
  199. </view>
  200. <view class="ddflex index-tab">
  201. <view :class="tabType==1?'index-tab-active':''" @click="tabChange(1)">个人主页</view>
  202. <view :class="tabType==2?'index-tab-active':''" @click="tabChange(2)">最新动态</view>
  203. </view>
  204. <block v-if="tabType==1">
  205. <!-- <view class="box brief" v-if="cardInfo.honorImg">
  206. <view class="tit ddflex">
  207. <view class="flex ddflex">
  208. <image src="/card/static/images/shry.png"></image>
  209. <view>所获荣誉</view>
  210. </view>
  211. </view>
  212. <view class="contacts" style="height: 300rpx;margin-top: 20rpx;">
  213. <scroll-view scroll-x="true" class="contact" style="height: 300rpx;">
  214. <view class=" ry-image" v-for="item,index in cardInfo.honorImg.split(',')" @click="previewImg(cardInfo.honorImg.split(','),index)">
  215. <image :src="item" mode="aspectFill"></image>
  216. </view>
  217. </scroll-view>
  218. </view>
  219. </view> -->
  220. <view class="box brief" v-if="cardInfo.styleImg">
  221. <view class="tit ddflex">
  222. <view class="flex ddflex">
  223. <image src="/card/static/images/grfc.png"></image>
  224. <view>个人风采</view>
  225. </view>
  226. </view>
  227. <view class="contacts" style="height: 300rpx;margin-top: 20rpx;">
  228. <scroll-view scroll-x="true" class="contact" style="height: 300rpx;">
  229. <view class=" ry-image" v-for="item,index in cardInfo.styleImg.split(',')" @click="previewImg(cardInfo.styleImg.split(','),index)">
  230. <image :src="item" mode="aspectFill"></image>
  231. </view>
  232. </scroll-view>
  233. </view>
  234. </view>
  235. <view class="box brief" v-if="cardInfo.honorText">
  236. <view class="tit ddflex">
  237. <view class="flex ddflex">
  238. <image src="/card/static/images/shry.png"></image>
  239. <view>所获荣誉</view>
  240. </view>
  241. <!-- <image v-if="!cardId" src="../static/images/bj_ico.png" class="edit" @tap="jumpUrl('/card/editDesc/editDesc?id=' + cardInfo.id)"></image> -->
  242. </view>
  243. <view class="bri"><rich-text :nodes="cardInfo.honorText ? cardInfo.honorText : ''"></rich-text></view>
  244. </view>
  245. <view class="box brief">
  246. <view class="tit ddflex">
  247. <view class="flex ddflex">
  248. <image src="/card/static/images/grjj.png"></image>
  249. <view>个人简介</view>
  250. </view>
  251. <!-- <image v-if="!cardId" src="../static/images/bj_ico.png" class="edit" @tap="jumpUrl('/card/editDesc/editDesc?id=' + cardInfo.id)"></image> -->
  252. </view>
  253. <view class="bri"><rich-text :nodes="cardInfo.brief ? cardInfo.brief : ''"></rich-text></view>
  254. </view>
  255. <view class="box brief">
  256. <view class="tit ddflex">
  257. <view class="flex ddflex">
  258. <image src="/card/static/images/gsjj.png"></image>
  259. <view>公司简介</view>
  260. </view>
  261. <!-- <image v-if="!cardId" src="../static/images/bj_ico.png" class="edit" @tap="jumpUrl('/card/editDesc/editDesc?id=' + cardInfo.id)"></image> -->
  262. </view>
  263. <view class="bri"><rich-text :nodes="config.CONFIG_ABOUT_COMPANY ? config.CONFIG_ABOUT_COMPANY : ''"></rich-text></view>
  264. </view>
  265. </block>
  266. <block v-if="tabType==2">
  267. <view class="list" v-if="pageList && pageList.length > 0">
  268. <view class="li" v-for="(item, index) in pageList" :key="index">
  269. <view class="user ddflex">
  270. <image :src="item.userDTO.avatar" mode="aspectFill" class="userimg" @click="toUserHomePage(item.userDTO.id)"></image>
  271. <view class="fflex">
  272. <view class="namea ddflex">
  273. <view class="name fflex ddflex" @click="toUserHomePage(item.userDTO.id)">
  274. {{ item.userDTO.nickName }}
  275. <image v-if="item.userDTO.levelGrade > 0" src="../../static/images/vip_tag.png" class="vip-tag"></image>
  276. </view>
  277. <view class="time">{{ item.time }}</view>
  278. </view>
  279. <view class="area" @click="toUserHomePage(item.userDTO.id)" v-if="item.userDTO.cityName">{{ item.userDTO.provinceName }} {{ item.userDTO.cityName }}</view>
  280. </view>
  281. </view>
  282. <!-- 分享的动态 -->
  283. <block v-if="item.source">
  284. <view class="link ddflex" @click="jumpUrlDetail(item)">
  285. <block v-if="item.url&&item.url.length>0"><image mode="aspectFill" v-if="idx == 0" v-for="(it, idx) in item.url" :src="it" :key="idx"></image></block>
  286. <view class="fflex tover"><rich-text :nodes="item.content"></rich-text></view>
  287. </view>
  288. </block>
  289. <!-- 非分享的动态 -->
  290. <block v-else>
  291. <view v-if="item.type == 2" class="des tovers" @click="jumpUrlDetail(item)">
  292. <view class="wen">提问</view>
  293. {{ removeHtml(item.content) }}
  294. </view>
  295. <view class="des" v-else @click="jumpUrlDetail(item)"><rich-text :nodes="item.content"></rich-text></view>
  296. <!-- //如果有投票,就不显示图片 -->
  297. <block v-if="!item.qyPoll">
  298. <view class="video" v-if="item.isHaveVideo && config.open_community_video == 1">
  299. <video :src="item.url" :show-center-play-btn="false" :controls="item.isControls" :autoplay="item.isControls" :id="'myVideo'+index" @pause="videoPause(index)" @ended="videoEnded(index)"></video>
  300. <view class="video-play ddflex" @click="videoPlay(index)" v-if="item.isShowPlayBtn"><image src="../../static/images/play.png"></image></view>
  301. </view>
  302. <view class="imgbox ddflex" @click="jumpUrlDetail(item)" v-if="!item.isHaveVideo"><!-- @click="previewImgss(item.url, idx)" -->
  303. <block v-if="item.url&&item.url.length>0">
  304. <image mode="aspectFill" v-for="(it, idx) in item.url" :src="it" :key="idx"></image>
  305. </block>
  306. </view>
  307. </block>
  308. <!-- 话题 -->
  309. <view class="ddflex" v-if="item.qyDialogu">
  310. <view class="topic ddflex" @click="jumpUrl('/topics/detail/detail?topicId=' + item.qyDialogu.id)">
  311. <image src="../../static/images/topic.png"></image>
  312. {{ item.qyDialogu.title }}
  313. </view>
  314. </view>
  315. <view class="loca ddflex" @click="jumpUrlPoi(item,'/office/poi/index')" v-if="item.poiName"><image :src="picUrlss+'office_images/loca.png'"></image><text v-if="item.poiDistance > 0">{{item.poiDistance ? item.poiDistance < 1000 ? item.poiDistance+'m' : (item.poiDistance/1000).toFixed(1)+'km' : ''}}</text>{{item.poiName}}</view>
  316. <!-- 投票 -->
  317. <view :class="'vote-box' + (item.qyPoll.isEnd ? ' ends' : '')" v-if="item.qyPoll">
  318. <view class="vote-tit">{{ item.qyPoll.title }}</view>
  319. <block v-if="item.qyPoll.isVote == 1">
  320. <view class="vote-list end" @click="jumpUrlDetail(item)">
  321. <view :class="'lis ddflex ' + (itpy.isVote == 1 ? 'active' : '')" v-for="(itpy, idex) in JSON.parse(item.qyPoll.optionJson)" :key="idex">
  322. <view class="percent" :style="'width:' + parseFloat(itpy.proportion) + '%;'"></view>
  323. <view class="fflex">{{ itpy.name }}</view>
  324. <view>{{ parseFloat(itpy.proportion) + '%' }}</view>
  325. </view>
  326. </view>
  327. </block>
  328. <block v-else>
  329. <view class="vote-list">
  330. <view class="lis" v-for="(itpy, idex) in JSON.parse(item.qyPoll.optionJson)" :key="idex" @click="submitPoll(item, index, idex)">
  331. {{ itpy.name }}
  332. </view>
  333. </view>
  334. </block>
  335. <view class="vote-can" v-if="item.qyPoll.isEnd"><text>{{item.qyPoll.voteCount}}人参与</text>投票已结束</view>
  336. </view>
  337. <block v-if="item.type==10||item.type==11">
  338. <view v-if="item.type==10" class="ddflex step-box" style="justify-content: space-between;" @click="jumpUrl('/exercise/record/record?userId=' + item.userId)">
  339. <view>
  340. <view class="step-date">{{item.wxRun.step}}</view>
  341. <view class="step-label">步数</view>
  342. </view>
  343. <view>
  344. <view class="step-date">{{item.wxRun.index}}</view>
  345. <view class="step-label" style="text-align: right;">名次</view>
  346. </view>
  347. </view>
  348. <view v-if="item.type==11" class="ddflex step-box" style="justify-content: space-between;" @click="jumpUrl('/match/activityDetail/activityDetail?id=' + item.matchContent.id)">
  349. <image class="step-pic" :src="item.matchContent.pic" mode="aspectFill"></image>
  350. <view class="fflex">
  351. <view class="step-title tovers">{{item.matchContent.title}}</view>
  352. <view class="ddflex" style="justify-content: space-between;margin-top: 10rpx;">
  353. <view class="step-price">{{item.matchContent.endTime}}</view>
  354. <view class="step-btn">查看</view>
  355. </view>
  356. </view>
  357. </view>
  358. </block>
  359. <view v-if="item.userGroupId" class="ddflex step-box" style="padding: 25rpx 21rpx;" @click="jumpUrl('/office/team/index?id=' + item.userGroupId)">
  360. <image style="width: 24rpx;height: 24rpx;margin-right: 13rpx;" src="../../static/images/link.png"></image>
  361. <view style="font-weight: 500;color: #999999;">Team:</view>
  362. <view>{{item.userGroupTitle}}</view>
  363. </view>
  364. <block v-else>
  365. <view class="product" v-if="item.products && item.products.length > 0">
  366. <view scroll-x="true" :class="'pro-view' + (item.products.length == 1 ? ' pro-view1' : '')">
  367. <view class="li" v-for="(it, idx) in item.products" :key="idx" @click="toProductDetail(it)">
  368. <view class="ddflex">
  369. <image :src="it.pic" mode="aspectFill" class="pro-pic"></image>
  370. <view class="fflex">
  371. <view class="title tovers">{{ it.title }}</view>
  372. <view class="opts ddflex">
  373. <view class="money">¥{{ it.salePrice }}</view>
  374. <view class="pro-btn">购买</view>
  375. </view>
  376. </view>
  377. </view>
  378. </view>
  379. </view>
  380. </view>
  381. </block>
  382. </block>
  383. <view class="opt ddflex" v-if="!item.source && type != 3">
  384. <view class="fflex" @click="jumpUrlDetail(item)">{{ item.count.browseCount }}次浏览</view>
  385. <view class="ddflex" @click="submitFabulous(2, item.id, index)">
  386. <image :src="'../../static/images/' + (item.isPraise == 1 ? 'like_h' : 'like') + '.png'"></image>
  387. {{ item.count.fabulousCount < 99 ? item.count.fabulousCount : '99+' }}
  388. </view>
  389. <view class="ddflex" @click="jumpUrlDetail(item)">
  390. <image src="../../static/images/comment.png"></image>
  391. {{ item.count.commentCount < 99 ? item.count.commentCount : '99+' }}
  392. </view>
  393. <!-- <button open-type="share" class="opt-share ddflex">
  394. <image src="../../static/images/share.png"></image>
  395. 分享
  396. </button> -->
  397. </view>
  398. </view>
  399. </view>
  400. <view class="nodata" v-else>
  401. <image :src="picUrlss + 'empty_jl.png'"></image>
  402. <text>{{ type == 1 ? '暂无动态' : type == 2 ? '暂无提问' : type == 3 ? '暂无日记' : '' }}</text>
  403. </view>
  404. </block>
  405. <view class="ceng2" v-if="isShowCodePop" @click="isShowCodePop = false" @touchmove.stop.prevent="moveHandle">
  406. </view>
  407. <view :class="'code-pop ' +(about.greyTheme==1?'grayTheme':'')" v-if="isShowCodePop">
  408. <view v-if="cardInfo.wechatCode||cardInfo.wechatCompanyCode" class="ddflex" style="justify-content: center;">
  409. <view class="code-content" v-if="cardInfo.wechatCode">
  410. <image :src="cardInfo.wechatCode?cardInfo.wechatCode:'/static/images/wxCode.jpg'" :style="cardInfo.wechatCompanyCode?'width: 200rpx;height: 200rpx;':''"
  411. show-menu-by-longpress="true"></image>
  412. <view style="text-align: center;font-size: 24rpx;color: #999;margin-bottom: 50rpx;">长按识别微信二维码</view>
  413. </view>
  414. <view class="code-content" v-if="cardInfo.wechatCompanyCode" :style="cardInfo.wechatCode?'margin-left:30rpx':''">
  415. <image :src="cardInfo.wechatCompanyCode?cardInfo.wechatCompanyCode:'/static/images/wxCode.jpg'" :style="cardInfo.wechatCode?'width: 200rpx;height: 200rpx;':''"
  416. show-menu-by-longpress="true"></image>
  417. <view style="text-align: center;font-size: 24rpx;color: #999;margin-bottom: 50rpx;">长按识别企微二维码</view>
  418. </view>
  419. </view>
  420. <view class="code-text" v-else>
  421. <view>微信号</view>
  422. <view>{{cardInfo.wechat}}</view>
  423. </view>
  424. <view class="code-btn" v-if="cardInfo.wechat" @click="copy(cardInfo.wechat,1)">
  425. 复制微信号
  426. </view>
  427. </view>
  428. <serviceContact :userId="cardInfo.userId" v-if="cardInfo.userId"></serviceContact>
  429. <!-- <to-userinfo v-if="isShowUpdate" @closeUpdate="()=>{isShowUpdate=false}"></to-userinfo> -->
  430. <update-userinfo :update-info="isUpdateInfo" :update-mobile="isUpdateMobile" :is-update="true" v-if="isShowUpdate" @closeUpdate="closeUpdate" @updateMobile="updateMobileInfo" @updateInfo="updateInfo"></update-userinfo>
  431. </view>
  432. </template>
  433. <script>
  434. const app = getApp();
  435. const req = require('../../utils/request.js');
  436. const api = require('../../utils/api.js');
  437. import VODUpload from '@/utils/aliyun-upload-sdk-1.0.1.min.js'
  438. import serviceContact from '@/components/service-contact/index.vue'
  439. import util from '../../utils/util.js';
  440. export default {
  441. data() {
  442. return {
  443. picUrlss: req.public.picUrls,
  444. systems: {},
  445. isTop: 0,
  446. options: {},
  447. scene: null,
  448. cardId: '',
  449. cardInfo: '',
  450. cardCount: '',
  451. zhiPicUrls: [],
  452. isFirst: true, //页面加载第一次调用
  453. uploader: '',
  454. isStart: false,
  455. videoInfo: '',
  456. fileName: '', //视频名称
  457. evaluateInfo:null,//评分
  458. tabType:1,
  459. loading:true,
  460. config: {},
  461. isLoad: true,
  462. form: {
  463. page: 1,
  464. limit: 10
  465. },
  466. pageList: [],
  467. userId: '',
  468. videoCurrent: null,
  469. videoContext: '',
  470. userInfo:'',
  471. isShowCodePop: false,
  472. pageBack:false,
  473. isShowUpdate: false, //是否显示更新信息弹窗
  474. isUpdateInfo: false, //更新用户信息
  475. isUpdateMobile: false, //绑定手机号
  476. };
  477. },
  478. components:{ serviceContact },
  479. onLoad(options) {
  480. this.options = options
  481. this.cardId = options.cardId;
  482. if(options.shareId) req.setStorage('shareId',options.shareId)
  483. if (options.scene)
  484. this.scene = options.scene
  485. uni.showLoading({
  486. title:'加载中'
  487. })
  488. let page = getCurrentPages()
  489. let pages = page[page.length-2]
  490. if(pages){
  491. this.pageBack = false
  492. }else{
  493. this.pageBack = true
  494. }
  495. },
  496. async onShow() {
  497. this.getConfig()
  498. if (this.scene) {
  499. this.cardId = this.scene.split('_')[0]
  500. if(this.scene.split('_')[1]){
  501. req.setStorage('shareId',this.scene.split('_')[1])
  502. }
  503. // await this.loadCodeParams();
  504. }
  505. await req.silenceLogin(this.options.userId ? this.options.userId : '', '')
  506. this.userInfo = req.getStorage('userInfo')
  507. this.getCardInfo();
  508. },
  509. onReachBottom() {
  510. this.form.page++;
  511. this.getOfficeList();
  512. },
  513. onShareAppMessage(res) {
  514. if (res.from == 'button') {
  515. let userInfo = req.getStorage('userInfo');
  516. this.userBehavior(6)
  517. req.saveBehaviorNew(this.cardInfo.id,1,6)
  518. return {
  519. title: this.cardInfo.realName,
  520. path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id + (this.cardInfo.jobNumber?('&shareId=' + this.cardInfo.jobNumber):''),
  521. imageUrl: this.cardInfo.avatar, // 分享图
  522. };
  523. }else{
  524. let userInfo = req.getStorage('userInfo');
  525. this.userBehavior(6)
  526. req.saveBehaviorNew(this.cardInfo.id,1,6)
  527. return {
  528. title: this.cardInfo.realName,
  529. path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id + (this.cardInfo.jobNumber?('&shareId=' + this.cardInfo.jobNumber):''),
  530. imageUrl: this.cardInfo.avatar, // 分享图
  531. };
  532. }
  533. },
  534. onShareTimeline(res) {
  535. if (res.from == 'button') {
  536. let userInfo = req.getStorage('userInfo');
  537. this.userBehavior(6)
  538. req.saveBehaviorNew(this.cardInfo.id,1,6)
  539. return {
  540. title: this.cardInfo.realName,
  541. path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id + (this.cardInfo.jobNumber?('&shareId=' + this.cardInfo.jobNumber):''),
  542. imageUrl: this.cardInfo.avatar, // 分享图
  543. };
  544. }else{
  545. let userInfo = req.getStorage('userInfo');
  546. this.userBehavior(6)
  547. req.saveBehaviorNew(this.cardInfo.id,1,6)
  548. return {
  549. title: this.cardInfo.realName,
  550. path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id + (this.cardInfo.jobNumber?('&shareId=' + this.cardInfo.jobNumber):''),
  551. imageUrl: this.cardInfo.avatar, // 分享图
  552. };
  553. }
  554. },
  555. methods: {
  556. toBack(){
  557. let page = getCurrentPages()
  558. let pages = page[page.length-2]
  559. if(pages){
  560. uni.navigateBack()
  561. }else{
  562. uni.switchTab({
  563. url:'/pages/index/index'
  564. })
  565. }
  566. },
  567. getConfig() {
  568. var _this = this;
  569. return new Promise((res, rej) => {
  570. req.g(
  571. '/api/other/config',
  572. data => {
  573. req.setStorage('configRes', JSON.stringify(data));
  574. this.config = data;
  575. res(data);
  576. },
  577. true
  578. );
  579. });
  580. },
  581. getImgList(url) {
  582. var list = [];
  583. if (url) {
  584. list = url.split(',');
  585. }
  586. return list;
  587. },
  588. jumpUrl(url) {
  589. uni.navigateTo({
  590. url: url
  591. });
  592. },
  593. getCardInfo() {
  594. var url = '';
  595. var dataP = {
  596. id:this.cardId
  597. };
  598. if (this.cardId) {
  599. url = '/api/visiting/card/info';
  600. dataP.id = this.cardId;
  601. } else {
  602. url = '/api/visiting/card/userInfo';
  603. dataP = {};
  604. }
  605. req.getRequest(url, dataP, data => {
  606. this.cardInfo = data;
  607. this.userId = this.cardInfo.userId
  608. if(this.pageList.length==0){
  609. this.getOfficeList();
  610. }
  611. console.log('isFirst')
  612. if (this.cardId && this.cardInfo.userId == req.getStorage('userInfo').id) {
  613. this.cardId = null
  614. this.getCardInfo()
  615. } else {
  616. if (this.cardInfo.userId == req.getStorage('userInfo').id) {
  617. } else {
  618. // 用户浏览
  619. if (this.isFirst) {
  620. this.userBehavior(4)
  621. req.saveBehaviorNew(this.cardInfo.id,1,4)
  622. }
  623. }
  624. this.isFirst = false
  625. uni.hideLoading()
  626. this.loading = false
  627. }
  628. this.getEvaluate()
  629. if(this.cardInfo.auditState!=1) {
  630. uni.hideShareMenu()
  631. }
  632. });
  633. },
  634. // 用户行为
  635. userBehavior(type) {
  636. var dataP = {};
  637. dataP.type =
  638. 23 //、产品 2、活动 3、未知 4、内容 5、课程 6、老师 7、素材 8、题目 9、资料领取 10、招聘职位 12、用户须知 13、素材 15、医院科室 16、海报 20、医生 21 新闻 23名片
  639. dataP.behavior = type; //1、关注 2、收藏 3、点赞 4、浏览 5、确认 6、分享
  640. dataP.bindId = this.cardInfo.id;
  641. req.postRequestLoding('/api/v3/behavior/save', dataP, data => {
  642. if (type == 3) {
  643. this.cardInfo.isThumbs = !this.cardInfo.isThumbs
  644. // 点赞行为统计
  645. if(this.cardInfo.isThumbs)
  646. req.saveBehaviorNew(this.cardInfo.id,1,3)
  647. //取消点赞 行为统计
  648. else req.saveBehaviorNew(this.cardInfo.id,1,11)
  649. }
  650. if (type == 1) {
  651. this.cardInfo.follow = !this.cardInfo.follow
  652. }
  653. });
  654. },
  655. // 存入名片夹
  656. saveToFolder() {
  657. let form = {
  658. visitingCardId: this.cardInfo.id,
  659. userId: req.getStorage('userInfo').id
  660. }
  661. req.postRequest('/api/v3/visiting/card/folder/saveOrUpdate', form, res => {
  662. req.msg('已存入名片夹')
  663. this.cardInfo.isSave = true
  664. })
  665. },
  666. // 存入通讯录
  667. saveToPhone() {
  668. console.log('saveToPhone')
  669. uni.addPhoneContact({
  670. nickName: this.cardInfo.realName,
  671. firstName: this.cardInfo.realName,
  672. mobilePhoneNumber: this.cardInfo.phone,
  673. success: (res) => {
  674. console.log(res)
  675. uni.showModal({
  676. title: '提示',
  677. content: '已存入通讯录,请前往手机通讯录查看',
  678. showCancel: false,
  679. })
  680. req.saveBehaviorNew(this.cardInfo.id,1,13)
  681. },
  682. fail: (err) => {
  683. console.log(err)
  684. req.msg('存入失败')
  685. }
  686. })
  687. },
  688. goPhone() {
  689. uni.makePhoneCall({
  690. phoneNumber: this.cardInfo.phone,
  691. success(res){
  692. req.saveBehaviorNew(this.cardInfo.id,1,17,this.cardInfo.phone)
  693. }
  694. }); // 传参带入号码即可
  695. },
  696. showCodePop(){
  697. this.isShowCodePop = true
  698. req.saveBehaviorNew(this.cardInfo.id,1,18,this.cardInfo.wechat?this.cardInfo.wechat:null)
  699. },
  700. copy(valueText, type) {
  701. let that = this
  702. uni.setClipboardData({
  703. data: valueText,
  704. success:(res)=> {
  705. if (type == 1) {
  706. that.isShowCodePop = false
  707. req.msg('微信号复制成功');
  708. } else if (type == 2) {
  709. req.msg('邮箱复制成功');
  710. }
  711. }
  712. });
  713. },
  714. getPlayInfo(videoId) {
  715. req.getRequest('/api/v3/vod/playInfo', {
  716. videoId: videoId
  717. }, data => {
  718. this.videoInfo = data
  719. })
  720. },
  721. createUploader() {
  722. let self = this;
  723. return new VODUpload({
  724. timeout: 60000,
  725. partSize: 1048576,
  726. parallel: 5,
  727. retryCount: 3,
  728. retryDuration: 2,
  729. region: this.regionId,
  730. userId: this.accountId,
  731. // 开始上传
  732. onUploadstarted: function(uploadInfo) {
  733. uni.showLoading({
  734. title: '视频上传中'
  735. })
  736. console.log('uploadInfo==', uploadInfo)
  737. if (!uploadInfo.videoId) {
  738. req.getRequest('/api/v3/vod/uploadAuth?fileName=' + self.fileName, {}, res => {
  739. var data = res;
  740. self.uploader.setUploadAuthAndAddress(uploadInfo, data.uploadAuth, data
  741. .uploadAddress, data.videoId)
  742. })
  743. self.isStart = true;
  744. } else {
  745. req.getRequest('/api/v3/vod/refreshUploadAuth?videoId=' + uploadInfo.videoId, {},
  746. res => {
  747. var data = res;
  748. self.uploader.setUploadAuthAndAddress(uploadInfo, data.uploadAuth, data
  749. .uploadAddress, data.videoId)
  750. })
  751. }
  752. },
  753. // 文件上传成功
  754. onUploadSucceed: function(uploadInfo) {
  755. // req.msg("视频上传成功");
  756. let dataP = {
  757. id: self.cardInfo.id,
  758. videoId: uploadInfo.videoId,
  759. videoInfo: JSON.stringify(uploadInfo)
  760. }
  761. req.postRequest('/api/v3/visiting/card/saveOrUpdate', dataP, res => {
  762. self.getPlayInfo(uploadInfo.videoId);
  763. setTimeout(() => {
  764. self.isStart = false;
  765. }, 1000);
  766. uni.hideLoading()
  767. })
  768. },
  769. // 文件上传失败
  770. onUploadFailed: function(uploadInfo, code, message) {
  771. req.msg("文件上传失败");
  772. },
  773. // 取消文件上传
  774. onUploadCanceled: function(uploadInfo, code, message) {
  775. req.msg("文件已暂停上传");
  776. },
  777. // 文件上传进度,单位:字节, 可以在这个函数中拿到上传进度并显示在页面上
  778. onUploadProgress: function(uploadInfo, totalSize, progress) {
  779. var progressPercent = Math.ceil(progress * 100);
  780. // self.$set(self.uploader, 'authProgress', progressPercent);
  781. },
  782. // 上传凭证超时
  783. onUploadTokenExpired: function(uploadInfo) {
  784. req.getRequest('/api/v3/vod/refreshUploadAuth?videoId=' + uploadInfo.videoId, {},
  785. res => {
  786. var data = res;
  787. self.uploader.resumeUploadWithAuth(data.uploadAuth)
  788. })
  789. }
  790. })
  791. },
  792. uploadVodChangeHandle: function(e) {
  793. let self = this;
  794. uni.chooseVideo({
  795. count: 1, //上传视频的个数
  796. mediaType: ['video'], //限制上传的类型为video
  797. sourceType: ['album', 'camera'], //视频选择来源
  798. maxDuration: 58, //拍摄限制时间
  799. camera: 'back', //采用后置摄像头
  800. success: function(res) {
  801. //获取临时存放的视频资源
  802. // let tempFilePath=res.tempFiles[0]
  803. console.log('视频文件==', res)
  804. var file = {
  805. url: res.tempFilePath,
  806. coverUrl: res.thumbTempFilePath
  807. };
  808. self.fileName = res.tempFilePath.substring(res.tempFilePath.lastIndexOf('/') + 1)
  809. // if (self.uploader) {
  810. // self.uploader.stopUpload();
  811. // self.authProgress = 0;
  812. // }
  813. var userData = '{"Vod":{}}';
  814. self.uploader = self.createUploader();
  815. self.uploader.addFile(file, null, null, null, userData);
  816. self.uploader.startUpload();
  817. },
  818. })
  819. },
  820. //预览图片
  821. previewImg(picUrls, index) {
  822. //预览合同图片
  823. var src = picUrls[index];
  824. let imgs = picUrls;
  825. uni.previewImage({
  826. current: src, // 当前显示图片的http链接
  827. urls: imgs
  828. });
  829. },
  830. cleanimages(index) {
  831. // 删除图片
  832. let arr = this.zhiPicUrls;
  833. arr.splice(index, 1);
  834. this.zhiPicUrls = arr;
  835. },
  836. /**
  837. * @param {Object} type 1图片 2、视频
  838. * @param {Object} url 资源地址
  839. */
  840. updateCard(type, url) {
  841. var dataP = {};
  842. dataP.id = this.cardInfo.id;
  843. if (type == 1) {
  844. dataP.pictures = url;
  845. } else if (type == 2) {
  846. dataP.video = url;
  847. } else if (type == 3) {
  848. dataP.imageMap = url;
  849. }
  850. req.postRequest(api.api_addressList_update, dataP, json => {
  851. if (type == 1) {
  852. this.cardInfo.pictures = url;
  853. } else if (type == 2) {
  854. this.cardInfo.video = url;
  855. } else if (type == 3) {
  856. this.cardInfo.imageMap = url;
  857. }
  858. });
  859. },
  860. monthDayDiff(date){
  861. return util.monthDayDiff(date)
  862. },
  863. // 获取评论
  864. getEvaluate(){
  865. req.getRequest('/api/evaluate/cardInfo',{bindId:this.cardInfo.id,type:2},res=>{
  866. this.evaluateInfo = res
  867. })
  868. },
  869. tabChange(type){
  870. if(type==this.tabType) return false
  871. this.tabType = type
  872. },
  873. getOfficeList() {
  874. let that = this;
  875. var pramData = this.form;
  876. // pramData.type = this.type;
  877. pramData.orderType = 2;
  878. pramData.userId = this.userId;
  879. if (!this.isLoad) return false;
  880. this.isLoad = false;
  881. req.getRequest('/api/v3/moments/page', pramData, data => {
  882. if(data.list&&data.list.length > 0){
  883. this.total = data.total
  884. data.list.map(it=>{
  885. if(it.qyPoll && it.qyPoll.isEnd){
  886. it.qyPoll.voteCount = that.sum(JSON.parse(it.qyPoll.optionJson))
  887. }
  888. if(it.url){
  889. let h = it.url.substring(it.url.lastIndexOf('.') + 1)
  890. if(h.indexOf('mp4')<0&&h.indexOf('MP4')<0){
  891. it.url = it.url.split(',');
  892. }else{
  893. it.isHaveVideo = true
  894. it.isControls = false
  895. it.isShowPlayBtn = true
  896. }
  897. }
  898. it.content = '<div style="overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 5;-webkit-box-orient: vertical;word-break: break-all;">' + it.content + '</div>'
  899. return it;
  900. })
  901. }
  902. if (data.list && data.list.length >= this.form.limit) {
  903. this.isLoad = true;
  904. }
  905. if (this.form.page > 1) {
  906. data.list = this.pageList.concat(data.list);
  907. }
  908. this.pageList = data.list;
  909. this.isShowView = true;
  910. });
  911. },
  912. sum(arr) {
  913. var s = 0;
  914. for (var i=arr.length-1; i>=0; i--) {
  915. if(arr[i].count){
  916. s += Number(arr[i].count);
  917. }
  918. }
  919. return s;
  920. },
  921. //提交点赞、取消点赞;收藏、取消收藏
  922. submitFabulous(type, id, index) {
  923. if (!req.isLogins(true)) {
  924. return;
  925. }
  926. var dataP = {};
  927. dataP.type = type; //1,观看 ,2点赞,3评论,4分享,5收藏
  928. dataP.momentsId = id;
  929. req.postRequestLoding('/api/v3/fabulous/save', dataP, data => {
  930. if (type == 2) {
  931. //动态点赞
  932. if (this.pageList[index].isPraise == 1) {
  933. //已赞
  934. this.pageList[index].isPraise = 0;
  935. this.pageList[index].count.fabulousCount--;
  936. req.saveBehaviorNew(id, this.pageList[index].pollId?10:11,11)
  937. } else {
  938. this.pageList[index].isPraise = 1;
  939. this.pageList[index].count.fabulousCount++;
  940. req.saveBehaviorNew(id, this.pageList[index].pollId?10:11,3)
  941. }
  942. }
  943. });
  944. },
  945. //提交投票
  946. submitPoll(item, pIndex, pollIndex) {
  947. if(item.qyPoll.isEnd) return false;
  948. var dataP = {};
  949. // dataP.id = item.id;
  950. dataP.pollId = item.qyPoll.id;
  951. var pollObjList = JSON.parse(item.qyPoll.optionJson);
  952. dataP.pollOptionCode = pollObjList[pollIndex].code;
  953. req.postRequest('/api/v3/poll/saveDetails', dataP, data => {
  954. req.msg('投票成功');
  955. //图片完之后要将该投票的对象返回,便于做渲染%
  956. this.pageList[pIndex].qyPoll = data;
  957. req.saveBehaviorNew(item.id,10,5)
  958. });
  959. },
  960. videoPlay(index){
  961. var that = this;
  962. var curIdx = index;
  963. this.pageList[index].isControls = true
  964. this.pageList[index].isShowPlayBtn = false
  965. // 有播放时先将prev暂停,再播放当前点击的current
  966. if (that.videoCurrent != null) {
  967. var videoContextPrev = uni.createVideoContext('myVideo' + that.videoCurrent)
  968. if (that.videoCurrent != curIdx) {
  969. this.pageList[that.videoCurrent].isControls = false
  970. this.pageList[that.videoCurrent].isShowPlayBtn = true
  971. videoContextPrev.stop()
  972. }
  973. that.videoCurrent = curIdx
  974. var videoContextCurrent = uni.createVideoContext('myVideo' + curIdx)
  975. videoContextCurrent.play()
  976. } else {
  977. // 没有播放时播放视频
  978. that.videoCurrent = curIdx
  979. var videoContext = uni.createVideoContext('myVideo' + curIdx) // 对应的视频id
  980. videoContext.play()
  981. }
  982. },
  983. videoPause(index){
  984. this.pageList[index].isControls = false
  985. this.pageList[index].isShowPlayBtn = true
  986. },
  987. videoEnded(index){
  988. this.pageList[index].isControls = false
  989. this.pageList[index].isShowPlayBtn = true
  990. },
  991. jumpUrlDetail(item) {
  992. this.jumpUrl('/office/detail/detail?contentId=' + item.id);
  993. },
  994. toUserHomePage(userId) {
  995. this.jumpUrl('/topics/home/home?userId=' + userId);
  996. },
  997. bindSale(){
  998. let userInfo = req.getStorage('userInfo');
  999. console.log('updateInfo userInfo.avatar',userInfo.avatar)
  1000. if (!userInfo.avatar || userInfo.nickName == '微信用户') {
  1001. this.isShowUpdate = true
  1002. this.isUpdateInfo = true
  1003. return false
  1004. }
  1005. if(userInfo.avatar&&!userInfo.mobile){
  1006. this.isShowUpdate = true
  1007. this.isUpdateMobile = true
  1008. return false
  1009. }
  1010. uni.showModal({
  1011. title:'提示',
  1012. content:'是否绑定该顾问?',
  1013. success: (con) => {
  1014. if(con.confirm){
  1015. req.postRequest('/api/visiting/card/bindManageSaleNo',{manageSaleNo:this.cardInfo.jobNumber},res=>{
  1016. req.msg('已绑定专属顾问')
  1017. let userInfo = req.getStorage('userInfo')
  1018. userInfo.manageSaleNo = this.cardInfo.jobNumber
  1019. req.setStorage('userInfo',userInfo)
  1020. this.userInfo = req.getStorage('userInfo')
  1021. })
  1022. }
  1023. }
  1024. })
  1025. },
  1026. showUpdate(){
  1027. this.isShowUpdate = true;
  1028. this.isUpdateInfo = true;
  1029. },
  1030. closeUpdate(){
  1031. this.isShowUpdate = false
  1032. this.isUpdateInfo = false;
  1033. },
  1034. updateInfo(e){
  1035. setTimeout(()=>{
  1036. this.bindSale()
  1037. },500)
  1038. },
  1039. updateMobileInfo(e){
  1040. setTimeout(()=>{
  1041. this.bindSale()
  1042. },500)
  1043. },
  1044. },
  1045. mounted() {
  1046. const systemInfo = uni.getSystemInfoSync();
  1047. // px转换到rpx的比例
  1048. let pxToRpxScale = 750 / systemInfo.windowWidth;
  1049. let systems = {
  1050. ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
  1051. navigationHeight: 44 * pxToRpxScale // 导航栏的高度
  1052. };
  1053. systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
  1054. this.systems = systems;
  1055. },
  1056. onPageScroll: function(e) {
  1057. if (e.scrollTop > this.systems.barHeight) {
  1058. this.isTop = 1;
  1059. } else {
  1060. this.isTop = 0;
  1061. }
  1062. }
  1063. };
  1064. </script>
  1065. <style>
  1066. @import './index.css';
  1067. </style>