specialistsDetail.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <template>
  2. <view>
  3. <!-- #ifdef H5-->
  4. <uni-nav-bar v-if="!$isWxBrowser()" :fixed="true" background-color="#FFE05C" :border="false" :statusBar="false"
  5. left-icon="left" title="累计交友圈专员详情" @clickLeft="back"/>
  6. <!-- #endif -->
  7. <view class="flex-row justify-center">
  8. <u-tabs :list="tabList" lineWidth="50" :scrollable="false" @click="clickTabs" :current="current"></u-tabs>
  9. </view>
  10. <swiper class="swiper" :style="{height:height}" :current="current" @change="swiperChange">
  11. <swiper-item>
  12. <view class="msg" :style="{height:height}">
  13. <view class="flex-row justify-between msgItem">
  14. <view>
  15. <text>头像</text>
  16. </view>
  17. <view>
  18. <image :src="expandUser.selfPhotoUrl || '/static/ud4.png'" class="profilePhoto"></image>
  19. </view>
  20. </view>
  21. <view class="flex-row justify-between msgItem">
  22. <view>
  23. <text>好友编号</text>
  24. </view>
  25. <view>
  26. <text>{{expandUser.id}}</text>
  27. </view>
  28. </view>
  29. <view class="flex-row justify-between msgItem">
  30. <view>
  31. <text>姓名</text>
  32. </view>
  33. <view>
  34. <text>{{expandUser.name}}</text>
  35. </view>
  36. </view>
  37. <view class="flex-row justify-between msgItem">
  38. <view>
  39. <text>电话号码</text>
  40. </view>
  41. <view>
  42. <text>{{expandUser.phone}}</text>
  43. </view>
  44. </view>
  45. <view class="flex-row justify-between msgItem">
  46. <view>
  47. <text>备注</text>
  48. </view>
  49. <view class="itemValue">
  50. <text>{{expandUser.remake}}</text>
  51. </view>
  52. </view>
  53. <view class="flex-row justify-between msgItem">
  54. <view>
  55. <text>备注地址</text>
  56. </view>
  57. <view class="itemValue">
  58. <text>{{expandUser.remarkAddress}}</text>
  59. </view>
  60. </view>
  61. <view class="flex-row justify-between msgItem">
  62. <view>
  63. <text>现场照片</text>
  64. </view>
  65. <view class="itemValue scenePhoto">
  66. <image :src="item.url" class="photo" v-for="(item,index) in scenePhotoArr" :key="index" @click="amplifier(item.url)"></image>
  67. </view>
  68. </view>
  69. </view>
  70. </swiper-item>
  71. <swiper-item>
  72. <mescroll-item ref="MescrollItem" :i="0" :index="0" :height="height" :expandUserId="expandUserId">
  73. </mescroll-item>
  74. </swiper-item>
  75. </swiper>
  76. <uni-popup ref="amplifierPopup" type="center">
  77. <view class="amplifierImg">
  78. <image mode="widthFix" :src="amplifierUrl"></image>
  79. </view>
  80. </uni-popup>
  81. <!--#ifdef H5-->
  82. <liu-drag-button v-if="$isWxBrowser()" @clickBtn="back">返回</liu-drag-button>
  83. <!--#endif-->
  84. </view>
  85. </template>
  86. <script>
  87. import MescrollItem from "./module/mescrollUni-item.vue";
  88. import {url} from "../../uni_modules/uv-ui-tools/libs/function/test";
  89. export default {
  90. components: {
  91. MescrollItem
  92. },
  93. data() {
  94. return {
  95. amplifierUrl:'',
  96. scenePhotoArr:[],
  97. expandUser: {},
  98. expandUserId: null,
  99. height: '',
  100. current: 0,
  101. tabList: [{
  102. name: '详情备注',
  103. }, {
  104. name: '交友记录',
  105. }]
  106. }
  107. },
  108. onLoad(e) {
  109. this.expandUserId = e.id
  110. let sysInfo = uni.getSystemInfoSync()
  111. this.height = sysInfo.windowHeight - 140 + 'px' //除标题栏栏外的屏幕可用高度
  112. this.expandUserDetail()
  113. },
  114. methods: {
  115. amplifier(url){
  116. this.amplifierUrl = url
  117. this.$refs.amplifierPopup.open()
  118. },
  119. expandUserDetail(){
  120. this.$api.service.expandUserDetail({
  121. expandUserId:this.expandUserId
  122. }).then(async res=>{
  123. this.expandUser = res.data.data
  124. if (this.expandUser.img){
  125. let oss = await this.$commonUtils.getImgUrlByOssId(this.expandUser.img)
  126. this.expandUser.selfPhotoUrl = oss[0].url
  127. }
  128. if (this.expandUser.scenePhoto){
  129. if (this.expandUser.scenePhoto){
  130. let arr = this.expandUser.scenePhoto.split(',')
  131. for (const imgId of arr) {
  132. let oss = await this.$commonUtils.getImgUrlByOssId(imgId)
  133. this.scenePhotoArr.push(oss[0])
  134. this.$set(this.scenePhotoArr)
  135. }
  136. }
  137. }
  138. this.$set(this.expandUser)
  139. console.log('人员详情',this.expandUser)
  140. })
  141. },
  142. swiperChange(e) {
  143. console.log(e)
  144. this.current = e.detail.current
  145. },
  146. clickTabs(e) {
  147. this.current = e.index
  148. },
  149. back() {
  150. let pages = getCurrentPages()
  151. if (pages.length > 1) {
  152. uni.navigateBack({
  153. delta: 1,
  154. fail: err => {
  155. console.log(err)
  156. }
  157. })
  158. } else {
  159. uni.switchTab({
  160. url: '/pages/index/index'
  161. });
  162. }
  163. },
  164. }
  165. }
  166. </script>
  167. <style lang="scss" scoped>
  168. @import './index.rpx.css';
  169. </style>