customServiceDetails.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <template>
  2. <view class="customServiceDetails woldKeep">
  3. <u-navbar :back-text="i18n('Back')" :back-text-style="backStyle" :title-width="400"
  4. back-icon-color="#fff" title-color="#fff"
  5. :title="i18n('CustomizedServiceDetails')"
  6. :background="background">
  7. </u-navbar>
  8. <view class="brief-img">
  9. <image class="img" src="../../../static/img/cooperationNetwork/dwjj.png" mode=""></image>
  10. <text class="unitName">{{ enterprise.unitName }}</text>
  11. </view>
  12. <view class="brief-title">{{$t('common.UnitIntroduction')}}</view>
  13. <view class="brief-content">
  14. <rich-text :nodes="enterprise.unitIntrodution"></rich-text>
  15. </view>
  16. <view class="brief-title">{{$t('common.ServiceContent')}}</view>
  17. <view class="brief-cont">
  18. <rich-text style="margin-top: 40upx;width: 100%;" :nodes="serviceContent.appContentHtml"></rich-text>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. data() {
  25. return {
  26. background:{
  27. backgroundImage: 'linear-gradient(270deg, #4BC0E2 0%, #538BE7 100%)',
  28. },
  29. backStyle:{
  30. color:'#fff'
  31. },
  32. customServiceId: '',
  33. serviceContent: {},
  34. enterprise: {},
  35. customService: {},
  36. baseEntityId:'',
  37. }
  38. },
  39. onLoad: function(e) {
  40. uni.setNavigationBarTitle({
  41. title: this.$i18n.locale == 'zh'? '定制服务详情': 'Costomized service details'
  42. });
  43. this.customServiceId = e.key;
  44. },
  45. onShow() {
  46. this.initDataList();
  47. },
  48. methods: {
  49. i18n (data) {
  50. return this.$t('common.' + data);
  51. },
  52. async initDataList() {
  53. const res = await this.$myRequest({
  54. url: '/project/coopCustomServices/',
  55. data: {
  56. id: this.customServiceId
  57. }
  58. });
  59. // console.log(res);
  60. let data = res.data;
  61. if (data) {
  62. this.customService = data.coopCustomServices[0] || {};
  63. this.baseEntityId = this.customService.unitId;
  64. }
  65. const result = await this.$myRequest({
  66. url: '/project/baseUnitViews/getViewByEntityId',
  67. data: {
  68. baseEntityId: this.baseEntityId,
  69. language: this.$i18n.locale.toUpperCase()
  70. }
  71. });
  72. // console.log(result);
  73. if (result.data) {
  74. this.enterprise = result.data[0];
  75. // this.enterprise.setUpDate = formatDate(this.initData.setUpDate,'YYYY-MM-DD')
  76. };
  77. let params = {
  78. language: this.$i18n.locale.toUpperCase(),
  79. businessType: "custom_service",
  80. businessId: this.customService.id
  81. };
  82. const result2 = await this.$myRequest({
  83. url: '/cms/cmsInformationViews/getInformationList/',
  84. data: params
  85. });
  86. console.log(result2);
  87. if (result2.data) {
  88. this.serviceContent = result2.data.allDataList[0] || {};
  89. }
  90. }
  91. }
  92. }
  93. </script>
  94. <style lang="scss" scoped>
  95. .customServiceDetails {
  96. min-height: 100vh;
  97. background-color: #FFFFFF;
  98. padding: 20upx 30upx;
  99. .img {
  100. width: 100%;
  101. height: 300upx;
  102. }
  103. .brief-img {
  104. width: 100%;
  105. height: 300upx;
  106. position: relative;
  107. .unitName {
  108. width: 100%;
  109. position: absolute;
  110. top: 50%;
  111. left: 50%;
  112. transform: translate(-50%,-50%);
  113. font-size: 40upx;
  114. color: #FFFFFF;
  115. font-weight: bold;
  116. text-align: center;
  117. }
  118. }
  119. .brief-title {
  120. font-size: 34upx;
  121. color: #333333;
  122. font-weight: bold;
  123. margin-top: 20upx;
  124. text-align: center;
  125. }
  126. .brief-content {
  127. font-size: 30upx;
  128. color: #333333;
  129. text-indent: 2em;
  130. margin-top: 20upx;
  131. }
  132. .brief-cont {
  133. .brief-cont-title {
  134. font-size: 32upx;
  135. color: #333333;
  136. font-weight: bold;
  137. margin-top: 20upx;
  138. }
  139. }
  140. .propaganda {
  141. .prop-img {
  142. margin-top: 20upx;
  143. .img {
  144. height: 200upx;
  145. }
  146. }
  147. .prop-cont {
  148. font-size: 30upx;
  149. color: #333333;
  150. margin-top: 20upx;
  151. }
  152. }
  153. }
  154. .woldKeep /deep/ img,.woldKeep /deep/ p, {
  155. max-width: 680upx;
  156. }
  157. .woldKeep /deep/ p {
  158. max-width: 680upx;
  159. word-break: break-all;
  160. }
  161. </style>