myadviceDetial.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. <template>
  2. <view class="myAdviceDetial">
  3. <view class="bg"></view>
  4. <!-- 页面头部 -->
  5. <u-navbar
  6. back-icon-color="#fff"
  7. :back-text="$t('common.Back')"
  8. :is-back="true"
  9. :background="{background:'#1777FE'}"
  10. :back-text-style="{color:'#fff'}"
  11. :border-bottom="true"
  12. title-color="#fff"
  13. :title="title"
  14. :custom-back="back"
  15. >
  16. <!-- <view slot="right" class="edit" @click="editMyAdvice">编辑</view> -->
  17. </u-navbar>
  18. <view class="ask">
  19. <view class="userimg"><image class="img" :src="defaultImg" mode="widthFix"></image></view>
  20. <view class="userinfo">
  21. <view class="label">{{detial.senderName}}</view>
  22. <view class="date">{{formatDate(detial.senderDate)}}</view>
  23. <!-- 列表 -->
  24. <view class="tabs">
  25. <view class="item" v-for="(item,index) in tabs" :key="index">
  26. <view class="userques">{{item.content}}</view>
  27. <view class="proName" @click="showDetial">
  28. <view class="text">{{item.columnCodeName}}</view>
  29. <view class="icon"><u-icon name="attach" :size="24"></u-icon></view>
  30. </view>
  31. <view class="ans" v-if="item.consultMessageInfo">
  32. <view style="font-size:30rpx;margin-bottom:10upx">{{$t('common.PlatformReply')}}:</view>
  33. <view style="font-size:30rpx;">{{item.consultMessageInfo.content}}</view>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </template>
  41. <script>
  42. import UNavbar from '@/components/uni-nav-bar/uni-nav-bar.vue'
  43. export default {
  44. name:'MyAdviceDetial',
  45. components:{
  46. UNavbar,
  47. },
  48. data(){
  49. return {
  50. title:'',
  51. keyword:'',
  52. detial:'',
  53. tabs:[],
  54. defaultImg:'../../../static/missing-face.png',
  55. }
  56. },
  57. computed:{
  58. askUserInfo(){
  59. return uni.getStorageSync('askUserInfo')
  60. }
  61. },
  62. onLoad(e){
  63. this.title= this.$i18n.locale == 'zh'? '咨询详情': 'My Application'
  64. },
  65. onShow(){
  66. this.detial=uni.getStorageSync('myAdviceDetial')
  67. this.tabs[0]=this.detial;
  68. },
  69. onUnload(e){
  70. //离开当前页面清存储
  71. uni.removeStorageSync('myAdviceDetial');
  72. },
  73. methods:{
  74. //路由后退一步
  75. back(){
  76. // #ifdef H5
  77. history.back()
  78. // #endif
  79. // #ifndef H5
  80. uni.navigateBack()
  81. // #endif
  82. },
  83. showDetial(){
  84. let url= '/pages/country/projectPresentation/projectPresentationDetails?id='+this.detial.columnCode
  85. if(this.detial.columnCode) uni.navigateTo({url})
  86. },
  87. },
  88. mounted(){
  89. }
  90. }
  91. </script>
  92. <style lang="scss" scoped>
  93. .myAdviceDetial{
  94. background:#fefefe;
  95. .bg{
  96. position:fixed;
  97. top:0;
  98. left:0;
  99. bottom:0;
  100. right:0;
  101. background:#fefefe;
  102. z-index:-1;
  103. }
  104. .edit{
  105. margin-right:30upx;
  106. color:#2af;
  107. }
  108. .ask{
  109. display:flex;
  110. align-items:flex-start;
  111. padding:5% 3%;
  112. border-bottom:1px solid #eee;
  113. .userimg{
  114. width:100upx;
  115. height:100upx;
  116. position:relative;
  117. border-radius:100%;
  118. background:#eee;
  119. margin-right:10upx;
  120. .img{
  121. display:block;
  122. width:100upx;
  123. height:100upx;
  124. }
  125. }
  126. .userinfo{
  127. flex:1;
  128. font-size:28upx;
  129. color:#666;
  130. .label{font-size:24upx;}
  131. .date{color:#aaa;margin:8upx 0}
  132. .tabs{
  133. width:100%;
  134. .item{
  135. width:100%;
  136. padding:1% 0;
  137. .userques{
  138. font-size:30upx;
  139. margin:0 0 10upx 0;
  140. color:#333;
  141. }
  142. .proName{
  143. height:50rpx;
  144. display:flex;
  145. align-items:center;
  146. color:#666;
  147. .text{
  148. font-size:22rpx;
  149. overflow:hidden;
  150. text-overflow:ellipsis;
  151. display:-webkit-box;
  152. -webkit-box-orient:vertical;
  153. -webkit-line-clamp:2;
  154. width:92%;
  155. }
  156. .icon{
  157. color:#fff;
  158. background-color:#1777FE;
  159. height:32upx;
  160. line-height:32upx;
  161. width:32upx;
  162. text-align:center;
  163. border-radius:50%;
  164. margin-left:10upx;
  165. }
  166. }
  167. .ans{
  168. background:#f0f6ff;
  169. padding:10rpx;
  170. margin-top:30rpx;
  171. position:relative;
  172. border-radius:10rpx;
  173. padding:16rpx;
  174. &:after{
  175. content:'';
  176. position:absolute;
  177. top:-55rpx;
  178. left:10%;
  179. width:0;
  180. height:0;
  181. border-top:30rpx solid transparent;
  182. border-bottom:30rpx solid #f0f6ff;
  183. border-left:20rpx solid transparent;
  184. border-right:20rpx solid transparent;
  185. }
  186. .openmsg{
  187. text-align:right;
  188. margin-right:10upx;
  189. margin-top:10upx;
  190. color:#333;
  191. font-size:28upx;
  192. }
  193. }
  194. }
  195. }
  196. .opt{
  197. width:100%;
  198. padding:0 10%;
  199. position:fixed;
  200. left:0;
  201. right:0;
  202. bottom:0;
  203. height:140upx;
  204. margin:0 auto;
  205. background:#fefefe;
  206. display:flex;
  207. align-items:center;
  208. justify-content:space-between;
  209. .clearList,.removeListItem{
  210. margin-top:52upx;
  211. width:50%;
  212. line-height:70upx;
  213. border:1px solid #eee;
  214. padding:0 40upx;
  215. border-radius:0 0 80upx 80upx;
  216. text-align:center;
  217. }
  218. }
  219. }
  220. }
  221. }
  222. </style>