index.vue 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137
  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. enterTime : '',//进入页面时间
  477. outTime : '',//页面卸载时间
  478. stayTime : 0//页面停留时间
  479. };
  480. },
  481. components:{ serviceContact },
  482. onLoad(options) {
  483. this.options = options
  484. this.cardId = options.cardId;
  485. if(options.shareId) req.setStorage('shareId',options.shareId)
  486. if (options.scene)
  487. this.scene = options.scene
  488. uni.showLoading({
  489. title:'加载中'
  490. })
  491. let page = getCurrentPages()
  492. let pages = page[page.length-2]
  493. if(pages){
  494. this.pageBack = false
  495. }else{
  496. this.pageBack = true
  497. }
  498. },
  499. async onShow() {
  500. // 用户进入时间
  501. this.enterTime = new Date();
  502. console.log('---用户进入时间---',this.enterTime);
  503. this.getConfig()
  504. if (this.scene) {
  505. this.cardId = this.scene.split('_')[0]
  506. if(this.scene.split('_')[1]){
  507. req.setStorage('shareId',this.scene.split('_')[1])
  508. }
  509. // await this.loadCodeParams();
  510. }
  511. await req.silenceLogin(this.options.userId ? this.options.userId : '', '')
  512. this.userInfo = req.getStorage('userInfo')
  513. this.getCardInfo();
  514. },
  515. onHide(){
  516. // 用户退出时间
  517. this.outTime = new Date();
  518. //停留时间(毫秒)
  519. this.stayTime = (this.outTime.getTime() - this.enterTime.getTime());
  520. console.log('---用户浏览---',Math.ceil(this.stayTime/1000))
  521. req.saveBehaviorNew(this.cardInfo.id,1,4,'','',this.options.userId,Math.ceil(this.stayTime/1000))
  522. },
  523. onUnload(){
  524. // 用户退出时间
  525. this.outTime = new Date();
  526. //停留时间(毫秒)
  527. this.stayTime = (this.outTime.getTime() - this.enterTime.getTime());
  528. console.log('---用户浏览总时长---',Math.ceil(this.stayTime/1000))
  529. req.saveBehaviorNew(this.cardInfo.id,1,4,'','',this.options.userId,Math.ceil(this.stayTime/1000))
  530. },
  531. onReachBottom() {
  532. this.form.page++;
  533. this.getOfficeList();
  534. },
  535. onShareAppMessage(res) {
  536. if (res.from == 'button') {
  537. let userInfo = req.getStorage('userInfo');
  538. this.userBehavior(6)
  539. req.saveBehaviorNew(this.cardInfo.id,1,6)
  540. return {
  541. title: this.cardInfo.realName,
  542. path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id + (this.cardInfo.jobNumber?('&shareId=' + this.cardInfo.jobNumber):''),
  543. imageUrl: this.cardInfo.avatar, // 分享图
  544. };
  545. }else{
  546. let userInfo = req.getStorage('userInfo');
  547. this.userBehavior(6)
  548. req.saveBehaviorNew(this.cardInfo.id,1,6)
  549. return {
  550. title: this.cardInfo.realName,
  551. path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id + (this.cardInfo.jobNumber?('&shareId=' + this.cardInfo.jobNumber):''),
  552. imageUrl: this.cardInfo.avatar, // 分享图
  553. };
  554. }
  555. },
  556. onShareTimeline(res) {
  557. if (res.from == 'button') {
  558. let userInfo = req.getStorage('userInfo');
  559. this.userBehavior(6)
  560. req.saveBehaviorNew(this.cardInfo.id,1,6)
  561. return {
  562. title: this.cardInfo.realName,
  563. path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id + (this.cardInfo.jobNumber?('&shareId=' + this.cardInfo.jobNumber):''),
  564. imageUrl: this.cardInfo.avatar, // 分享图
  565. };
  566. }else{
  567. let userInfo = req.getStorage('userInfo');
  568. this.userBehavior(6)
  569. req.saveBehaviorNew(this.cardInfo.id,1,6)
  570. return {
  571. title: this.cardInfo.realName,
  572. path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id + (this.cardInfo.jobNumber?('&shareId=' + this.cardInfo.jobNumber):''),
  573. imageUrl: this.cardInfo.avatar, // 分享图
  574. };
  575. }
  576. },
  577. methods: {
  578. toBack(){
  579. let page = getCurrentPages()
  580. let pages = page[page.length-2]
  581. if(pages){
  582. uni.navigateBack()
  583. }else{
  584. uni.switchTab({
  585. url:'/pages/index/index'
  586. })
  587. }
  588. },
  589. getConfig() {
  590. var _this = this;
  591. return new Promise((res, rej) => {
  592. req.g(
  593. '/api/other/config',
  594. data => {
  595. req.setStorage('configRes', JSON.stringify(data));
  596. this.config = data;
  597. res(data);
  598. },
  599. true
  600. );
  601. });
  602. },
  603. getImgList(url) {
  604. var list = [];
  605. if (url) {
  606. list = url.split(',');
  607. }
  608. return list;
  609. },
  610. jumpUrl(url) {
  611. uni.navigateTo({
  612. url: url
  613. });
  614. },
  615. getCardInfo() {
  616. var url = '';
  617. var dataP = {
  618. id:this.cardId
  619. };
  620. if (this.cardId) {
  621. url = '/api/visiting/card/info';
  622. dataP.id = this.cardId;
  623. } else {
  624. url = '/api/visiting/card/userInfo';
  625. dataP = {};
  626. }
  627. req.getRequest(url, dataP, data => {
  628. this.cardInfo = data;
  629. this.userId = this.cardInfo.userId
  630. if(this.pageList.length==0){
  631. this.getOfficeList();
  632. }
  633. console.log('isFirst')
  634. if (this.cardId && this.cardInfo.userId == req.getStorage('userInfo').id) {
  635. this.cardId = null
  636. this.getCardInfo()
  637. } else {
  638. if (this.cardInfo.userId == req.getStorage('userInfo').id) {
  639. } else {
  640. // 用户浏览
  641. if (this.isFirst) {
  642. this.userBehavior(4)
  643. }
  644. }
  645. this.isFirst = false
  646. uni.hideLoading()
  647. this.loading = false
  648. }
  649. this.getEvaluate()
  650. if(this.cardInfo.auditState!=1) {
  651. uni.hideShareMenu()
  652. }
  653. });
  654. },
  655. // 用户行为
  656. userBehavior(type) {
  657. var dataP = {};
  658. dataP.type =
  659. 23 //、产品 2、活动 3、未知 4、内容 5、课程 6、老师 7、素材 8、题目 9、资料领取 10、招聘职位 12、用户须知 13、素材 15、医院科室 16、海报 20、医生 21 新闻 23名片
  660. dataP.behavior = type; //1、关注 2、收藏 3、点赞 4、浏览 5、确认 6、分享
  661. dataP.bindId = this.cardInfo.id;
  662. req.postRequestLoding('/api/v3/behavior/save', dataP, data => {
  663. if (type == 3) {
  664. this.cardInfo.isThumbs = !this.cardInfo.isThumbs
  665. // 点赞行为统计
  666. if(this.cardInfo.isThumbs)
  667. req.saveBehaviorNew(this.cardInfo.id,1,3)
  668. //取消点赞 行为统计
  669. else req.saveBehaviorNew(this.cardInfo.id,1,11)
  670. }
  671. if (type == 1) {
  672. this.cardInfo.follow = !this.cardInfo.follow
  673. }
  674. });
  675. },
  676. // 存入名片夹
  677. saveToFolder() {
  678. let form = {
  679. visitingCardId: this.cardInfo.id,
  680. userId: req.getStorage('userInfo').id
  681. }
  682. req.postRequest('/api/v3/visiting/card/folder/saveOrUpdate', form, res => {
  683. req.msg('已存入名片夹')
  684. this.cardInfo.isSave = true
  685. })
  686. },
  687. // 存入通讯录
  688. saveToPhone() {
  689. console.log('saveToPhone')
  690. uni.addPhoneContact({
  691. nickName: this.cardInfo.realName,
  692. firstName: this.cardInfo.realName,
  693. mobilePhoneNumber: this.cardInfo.phone,
  694. success: (res) => {
  695. console.log(res)
  696. uni.showModal({
  697. title: '提示',
  698. content: '已存入通讯录,请前往手机通讯录查看',
  699. showCancel: false,
  700. })
  701. req.saveBehaviorNew(this.cardInfo.id,1,13)
  702. },
  703. fail: (err) => {
  704. console.log(err)
  705. req.msg('存入失败')
  706. }
  707. })
  708. },
  709. goPhone() {
  710. uni.makePhoneCall({
  711. phoneNumber: this.cardInfo.phone,
  712. success(res){
  713. req.saveBehaviorNew(this.cardInfo.id,1,17,this.cardInfo.phone)
  714. }
  715. }); // 传参带入号码即可
  716. },
  717. showCodePop(){
  718. this.isShowCodePop = true
  719. req.saveBehaviorNew(this.cardInfo.id,1,18,this.cardInfo.wechat?this.cardInfo.wechat:null)
  720. },
  721. copy(valueText, type) {
  722. let that = this
  723. uni.setClipboardData({
  724. data: valueText,
  725. success:(res)=> {
  726. if (type == 1) {
  727. that.isShowCodePop = false
  728. req.msg('微信号复制成功');
  729. } else if (type == 2) {
  730. req.msg('邮箱复制成功');
  731. }
  732. }
  733. });
  734. },
  735. getPlayInfo(videoId) {
  736. req.getRequest('/api/v3/vod/playInfo', {
  737. videoId: videoId
  738. }, data => {
  739. this.videoInfo = data
  740. })
  741. },
  742. createUploader() {
  743. let self = this;
  744. return new VODUpload({
  745. timeout: 60000,
  746. partSize: 1048576,
  747. parallel: 5,
  748. retryCount: 3,
  749. retryDuration: 2,
  750. region: this.regionId,
  751. userId: this.accountId,
  752. // 开始上传
  753. onUploadstarted: function(uploadInfo) {
  754. uni.showLoading({
  755. title: '视频上传中'
  756. })
  757. console.log('uploadInfo==', uploadInfo)
  758. if (!uploadInfo.videoId) {
  759. req.getRequest('/api/v3/vod/uploadAuth?fileName=' + self.fileName, {}, res => {
  760. var data = res;
  761. self.uploader.setUploadAuthAndAddress(uploadInfo, data.uploadAuth, data
  762. .uploadAddress, data.videoId)
  763. })
  764. self.isStart = true;
  765. } else {
  766. req.getRequest('/api/v3/vod/refreshUploadAuth?videoId=' + uploadInfo.videoId, {},
  767. res => {
  768. var data = res;
  769. self.uploader.setUploadAuthAndAddress(uploadInfo, data.uploadAuth, data
  770. .uploadAddress, data.videoId)
  771. })
  772. }
  773. },
  774. // 文件上传成功
  775. onUploadSucceed: function(uploadInfo) {
  776. // req.msg("视频上传成功");
  777. let dataP = {
  778. id: self.cardInfo.id,
  779. videoId: uploadInfo.videoId,
  780. videoInfo: JSON.stringify(uploadInfo)
  781. }
  782. req.postRequest('/api/v3/visiting/card/saveOrUpdate', dataP, res => {
  783. self.getPlayInfo(uploadInfo.videoId);
  784. setTimeout(() => {
  785. self.isStart = false;
  786. }, 1000);
  787. uni.hideLoading()
  788. })
  789. },
  790. // 文件上传失败
  791. onUploadFailed: function(uploadInfo, code, message) {
  792. req.msg("文件上传失败");
  793. },
  794. // 取消文件上传
  795. onUploadCanceled: function(uploadInfo, code, message) {
  796. req.msg("文件已暂停上传");
  797. },
  798. // 文件上传进度,单位:字节, 可以在这个函数中拿到上传进度并显示在页面上
  799. onUploadProgress: function(uploadInfo, totalSize, progress) {
  800. var progressPercent = Math.ceil(progress * 100);
  801. // self.$set(self.uploader, 'authProgress', progressPercent);
  802. },
  803. // 上传凭证超时
  804. onUploadTokenExpired: function(uploadInfo) {
  805. req.getRequest('/api/v3/vod/refreshUploadAuth?videoId=' + uploadInfo.videoId, {},
  806. res => {
  807. var data = res;
  808. self.uploader.resumeUploadWithAuth(data.uploadAuth)
  809. })
  810. }
  811. })
  812. },
  813. uploadVodChangeHandle: function(e) {
  814. let self = this;
  815. uni.chooseVideo({
  816. count: 1, //上传视频的个数
  817. mediaType: ['video'], //限制上传的类型为video
  818. sourceType: ['album', 'camera'], //视频选择来源
  819. maxDuration: 58, //拍摄限制时间
  820. camera: 'back', //采用后置摄像头
  821. success: function(res) {
  822. //获取临时存放的视频资源
  823. // let tempFilePath=res.tempFiles[0]
  824. console.log('视频文件==', res)
  825. var file = {
  826. url: res.tempFilePath,
  827. coverUrl: res.thumbTempFilePath
  828. };
  829. self.fileName = res.tempFilePath.substring(res.tempFilePath.lastIndexOf('/') + 1)
  830. // if (self.uploader) {
  831. // self.uploader.stopUpload();
  832. // self.authProgress = 0;
  833. // }
  834. var userData = '{"Vod":{}}';
  835. self.uploader = self.createUploader();
  836. self.uploader.addFile(file, null, null, null, userData);
  837. self.uploader.startUpload();
  838. },
  839. })
  840. },
  841. //预览图片
  842. previewImg(picUrls, index) {
  843. //预览合同图片
  844. var src = picUrls[index];
  845. let imgs = picUrls;
  846. uni.previewImage({
  847. current: src, // 当前显示图片的http链接
  848. urls: imgs
  849. });
  850. },
  851. cleanimages(index) {
  852. // 删除图片
  853. let arr = this.zhiPicUrls;
  854. arr.splice(index, 1);
  855. this.zhiPicUrls = arr;
  856. },
  857. /**
  858. * @param {Object} type 1图片 2、视频
  859. * @param {Object} url 资源地址
  860. */
  861. updateCard(type, url) {
  862. var dataP = {};
  863. dataP.id = this.cardInfo.id;
  864. if (type == 1) {
  865. dataP.pictures = url;
  866. } else if (type == 2) {
  867. dataP.video = url;
  868. } else if (type == 3) {
  869. dataP.imageMap = url;
  870. }
  871. req.postRequest(api.api_addressList_update, dataP, json => {
  872. if (type == 1) {
  873. this.cardInfo.pictures = url;
  874. } else if (type == 2) {
  875. this.cardInfo.video = url;
  876. } else if (type == 3) {
  877. this.cardInfo.imageMap = url;
  878. }
  879. });
  880. },
  881. monthDayDiff(date){
  882. return util.monthDayDiff(date)
  883. },
  884. // 获取评论
  885. getEvaluate(){
  886. req.getRequest('/api/evaluate/cardInfo',{bindId:this.cardInfo.id,type:2},res=>{
  887. this.evaluateInfo = res
  888. })
  889. },
  890. tabChange(type){
  891. if(type==this.tabType) return false
  892. this.tabType = type
  893. },
  894. getOfficeList() {
  895. let that = this;
  896. var pramData = this.form;
  897. // pramData.type = this.type;
  898. pramData.orderType = 2;
  899. pramData.userId = this.userId;
  900. if (!this.isLoad) return false;
  901. this.isLoad = false;
  902. req.getRequest('/api/v3/moments/page', pramData, data => {
  903. if(data.list&&data.list.length > 0){
  904. this.total = data.total
  905. data.list.map(it=>{
  906. if(it.qyPoll && it.qyPoll.isEnd){
  907. it.qyPoll.voteCount = that.sum(JSON.parse(it.qyPoll.optionJson))
  908. }
  909. if(it.url){
  910. let h = it.url.substring(it.url.lastIndexOf('.') + 1)
  911. if(h.indexOf('mp4')<0&&h.indexOf('MP4')<0){
  912. it.url = it.url.split(',');
  913. }else{
  914. it.isHaveVideo = true
  915. it.isControls = false
  916. it.isShowPlayBtn = true
  917. }
  918. }
  919. 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>'
  920. return it;
  921. })
  922. }
  923. if (data.list && data.list.length >= this.form.limit) {
  924. this.isLoad = true;
  925. }
  926. if (this.form.page > 1) {
  927. data.list = this.pageList.concat(data.list);
  928. }
  929. this.pageList = data.list;
  930. this.isShowView = true;
  931. });
  932. },
  933. sum(arr) {
  934. var s = 0;
  935. for (var i=arr.length-1; i>=0; i--) {
  936. if(arr[i].count){
  937. s += Number(arr[i].count);
  938. }
  939. }
  940. return s;
  941. },
  942. //提交点赞、取消点赞;收藏、取消收藏
  943. submitFabulous(type, id, index) {
  944. if (!req.isLogins(true)) {
  945. return;
  946. }
  947. var dataP = {};
  948. dataP.type = type; //1,观看 ,2点赞,3评论,4分享,5收藏
  949. dataP.momentsId = id;
  950. req.postRequestLoding('/api/v3/fabulous/save', dataP, data => {
  951. if (type == 2) {
  952. //动态点赞
  953. if (this.pageList[index].isPraise == 1) {
  954. //已赞
  955. this.pageList[index].isPraise = 0;
  956. this.pageList[index].count.fabulousCount--;
  957. req.saveBehaviorNew(id, this.pageList[index].pollId?10:11,11)
  958. } else {
  959. this.pageList[index].isPraise = 1;
  960. this.pageList[index].count.fabulousCount++;
  961. req.saveBehaviorNew(id, this.pageList[index].pollId?10:11,3)
  962. }
  963. }
  964. });
  965. },
  966. //提交投票
  967. submitPoll(item, pIndex, pollIndex) {
  968. if(item.qyPoll.isEnd) return false;
  969. var dataP = {};
  970. // dataP.id = item.id;
  971. dataP.pollId = item.qyPoll.id;
  972. var pollObjList = JSON.parse(item.qyPoll.optionJson);
  973. dataP.pollOptionCode = pollObjList[pollIndex].code;
  974. req.postRequest('/api/v3/poll/saveDetails', dataP, data => {
  975. req.msg('投票成功');
  976. //图片完之后要将该投票的对象返回,便于做渲染%
  977. this.pageList[pIndex].qyPoll = data;
  978. req.saveBehaviorNew(item.id,10,5)
  979. });
  980. },
  981. videoPlay(index){
  982. var that = this;
  983. var curIdx = index;
  984. this.pageList[index].isControls = true
  985. this.pageList[index].isShowPlayBtn = false
  986. // 有播放时先将prev暂停,再播放当前点击的current
  987. if (that.videoCurrent != null) {
  988. var videoContextPrev = uni.createVideoContext('myVideo' + that.videoCurrent)
  989. if (that.videoCurrent != curIdx) {
  990. this.pageList[that.videoCurrent].isControls = false
  991. this.pageList[that.videoCurrent].isShowPlayBtn = true
  992. videoContextPrev.stop()
  993. }
  994. that.videoCurrent = curIdx
  995. var videoContextCurrent = uni.createVideoContext('myVideo' + curIdx)
  996. videoContextCurrent.play()
  997. } else {
  998. // 没有播放时播放视频
  999. that.videoCurrent = curIdx
  1000. var videoContext = uni.createVideoContext('myVideo' + curIdx) // 对应的视频id
  1001. videoContext.play()
  1002. }
  1003. },
  1004. videoPause(index){
  1005. this.pageList[index].isControls = false
  1006. this.pageList[index].isShowPlayBtn = true
  1007. },
  1008. videoEnded(index){
  1009. this.pageList[index].isControls = false
  1010. this.pageList[index].isShowPlayBtn = true
  1011. },
  1012. jumpUrlDetail(item) {
  1013. this.jumpUrl('/office/detail/detail?contentId=' + item.id);
  1014. },
  1015. toUserHomePage(userId) {
  1016. this.jumpUrl('/topics/home/home?userId=' + userId);
  1017. },
  1018. bindSale(){
  1019. let userInfo = req.getStorage('userInfo');
  1020. console.log('updateInfo userInfo.avatar',userInfo.avatar)
  1021. if (!userInfo.avatar || !userInfo.nickName || userInfo.avatar.indexOf('thirdwx.qlogo') > -1 || userInfo.nickName.indexOf('用户') > -1) {
  1022. this.isShowUpdate = true
  1023. this.isUpdateInfo = true
  1024. return false
  1025. }
  1026. if(userInfo.avatar&&!userInfo.mobile){
  1027. this.isShowUpdate = true
  1028. this.isUpdateMobile = true
  1029. return false
  1030. }
  1031. uni.showModal({
  1032. title:'提示',
  1033. content:'是否绑定该顾问?',
  1034. success: (con) => {
  1035. if(con.confirm){
  1036. req.postRequest('/api/visiting/card/bindManageSaleNo',{manageSaleNo:this.cardInfo.jobNumber},res=>{
  1037. req.msg('已绑定专属顾问')
  1038. let userInfo = req.getStorage('userInfo')
  1039. userInfo.manageSaleNo = this.cardInfo.jobNumber
  1040. req.setStorage('userInfo',userInfo)
  1041. this.userInfo = req.getStorage('userInfo')
  1042. })
  1043. }
  1044. }
  1045. })
  1046. },
  1047. showUpdate(){
  1048. this.isShowUpdate = true;
  1049. this.isUpdateInfo = true;
  1050. },
  1051. closeUpdate(){
  1052. this.isShowUpdate = false
  1053. this.isUpdateInfo = false;
  1054. },
  1055. updateInfo(e){
  1056. setTimeout(()=>{
  1057. this.bindSale()
  1058. },500)
  1059. },
  1060. updateMobileInfo(e){
  1061. setTimeout(()=>{
  1062. this.bindSale()
  1063. },500)
  1064. },
  1065. },
  1066. mounted() {
  1067. const systemInfo = uni.getSystemInfoSync();
  1068. // px转换到rpx的比例
  1069. let pxToRpxScale = 750 / systemInfo.windowWidth;
  1070. let systems = {
  1071. ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
  1072. navigationHeight: 44 * pxToRpxScale // 导航栏的高度
  1073. };
  1074. systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
  1075. this.systems = systems;
  1076. },
  1077. onPageScroll: function(e) {
  1078. if (e.scrollTop > this.systems.barHeight) {
  1079. this.isTop = 1;
  1080. } else {
  1081. this.isTop = 0;
  1082. }
  1083. }
  1084. };
  1085. </script>
  1086. <style>
  1087. @import './index.css';
  1088. </style>