index.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <template>
  2. <view class="caseInfo_wrap">
  3. <template>
  4. <view class="caseInfo_content_wrap">
  5. <view class="caseInfo_title">
  6. <image src="/static/clueDetail/icon-caseInfo.png" mode=""></image>
  7. <text class="info_text">广告信息</text>
  8. </view>
  9. <view class="caseInfo_main_wrap">
  10. <view class="Info_item" v-for="(item,index) in caseInfoColumn" :key="item.prop">
  11. <text class="label">{{item.label}}</text>
  12. <view v-if="item.prop === 'advName'" class="advName_wrap">
  13. <view class="copy_btn" @click="handleCopy(clueAdInfo[item.prop])">复制</view>
  14. <text class="value">{{clueAdInfo[item.prop] ? clueAdInfo[item.prop] : '-'}}</text>
  15. </view>
  16. <text v-else-if="item.color" class="value highlight" :style="handleStyle(item.color)">
  17. {{clueAdInfo[item.prop]}}
  18. </text>
  19. <show-real-text v-else-if="item.dsProp" class="value" :real="clueAdInfo[item.prop]"
  20. :normal="clueAdInfo[item.dsProp]" :accessType="item.accessType" :key="item.prop + index">
  21. </show-real-text>
  22. <text v-else class="value">{{clueAdInfo[item.prop] ? clueAdInfo[item.prop] : '-'}}</text>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. </view>
  28. </template>
  29. <script>
  30. const caseInfoColumn = [{
  31. prop: 'advId',
  32. label: '广告主ID',
  33. },
  34. {
  35. prop: 'advName',
  36. label: '广告主名称',
  37. },
  38. {
  39. prop: 'promotionId',
  40. label: '广告ID',
  41. },
  42. {
  43. prop: 'promotionName',
  44. label: '广告名称',
  45. },
  46. {
  47. prop: 'originExternalUrl',
  48. label: '落地页链接',
  49. },
  50. {
  51. prop: 'titleId',
  52. label: '标题ID',
  53. },
  54. {
  55. prop: 'videoId',
  56. label: '视频ID',
  57. },
  58. {
  59. prop: 'imageId',
  60. label: '图片ID',
  61. },
  62. {
  63. prop: 'douyinId',
  64. label: '企业号ID',
  65. },
  66. {
  67. prop: 'douyinName',
  68. label: '企业号名称',
  69. },
  70. {
  71. prop: 'corporateToolName',
  72. label: '企业号工具',
  73. },
  74. {
  75. prop: 'clueDataSourceDetail',
  76. label: '线索渠道详情',
  77. },
  78. ]
  79. export default {
  80. props: {
  81. clueId: {
  82. required: true
  83. },
  84. },
  85. methods: {
  86. handleCopy(value) {
  87. uni.setClipboardData({
  88. data: value,
  89. success: function() {
  90. uni.$u.toast("复制成功");
  91. }
  92. });
  93. },
  94. async getData() {
  95. const {
  96. data
  97. } = await uni.$u.api.getClueAdInfoByClueId({
  98. clueId: this.clueId
  99. });
  100. this.clueAdInfo = data ? data : {};
  101. }
  102. },
  103. created() {
  104. this.getData();
  105. },
  106. data() {
  107. return {
  108. clueAdInfo: {},
  109. caseInfoColumn,
  110. }
  111. }
  112. }
  113. </script>
  114. <style lang="scss" scoped>
  115. .caseInfo_wrap {
  116. min-height: 400px;
  117. .caseInfo_title {
  118. display: flex;
  119. align-items: center;
  120. height: 80rpx;
  121. background: #f4f4f6;
  122. padding-left: 40rpx;
  123. image {
  124. width: 24rpx;
  125. height: 24rpx;
  126. margin-right: 10rpx;
  127. }
  128. .info_text {
  129. font-size: 24rpx;
  130. color: #202020;
  131. }
  132. .tabs_wrap {
  133. display: flex;
  134. .tab_item {
  135. margin-left: 30rpx;
  136. }
  137. }
  138. }
  139. .caseInfo_main_wrap {
  140. .caseCards_list_wrap {
  141. background: #ebf6ff;
  142. margin-bottom: 10rpx;
  143. margin-left: 10rpx;
  144. margin-right: 10rpx;
  145. }
  146. .Info_item {
  147. padding: 18rpx 40rpx;
  148. display: flex;
  149. justify-content: space-between;
  150. .label {
  151. color: #999999;
  152. font-size: 26rpx;
  153. width: 160rpx;
  154. }
  155. .value {
  156. font-size: 26rpx;
  157. color: #202020;
  158. border-radius: 100rpx;
  159. text-align: right;
  160. width: 500rpx;
  161. }
  162. .highlight {
  163. font-size: 22rpx;
  164. font-weight: 900;
  165. padding: 6rpx 20rpx;
  166. }
  167. }
  168. .advName_wrap{
  169. display: flex;
  170. align-items: center;
  171. .copy_btn {
  172. color: #4fa5fe;
  173. margin-right: 10px;
  174. }
  175. .value{
  176. width: auto;
  177. }
  178. }
  179. }
  180. }
  181. </style>