introduction.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <template>
  2. <view>
  3. <block v-if="detail.urlsType == 0">
  4. <view class="bg-img flex align-center" :style="[{backgroundImage:'url('+ detail.urls +')'}]" style="height: 450upx;"></view>
  5. </block>
  6. <block v-else>
  7. <view class="bg-img flex align-center" :style="[{backgroundImage:'url('+ detail.cover +')'}]" style="height: 450upx;"></view>
  8. </block>
  9. <view class="container" style="margin: -60upx 20upx 20upx 20upx;">
  10. <view class="text-center">
  11. <view class="cu-avatar avatar round" :style="[{backgroundImage:'url('+ detail.loginWebVO.avatar +')'}]"></view>
  12. <view class="padding-tb-xs" style="font-size: 38upx;font-family: PingFang SC;font-weight: 800;color: #222222;">{{detail.personName}}</view>
  13. <view class="flex justify-center align-center">
  14. <view class="padding-right-sm" style="font-size: 30upx;font-family: PingFang SC;font-weight: 800;color: #222222;">{{+detail.hotValue}}</view>
  15. <!-- <view class="tag">
  16. <image src="/static/crown.png" style="width: 22upx;height: 19upx;margin-right: 10upx;"></image>
  17. <view class="text-sm text-white">热力榜第1</view>
  18. </view> -->
  19. </view>
  20. </view>
  21. <view style="padding: 0 60upx;">
  22. <view>{{detail.introduce}}</view>
  23. </view>
  24. <view class="flex justify-around padding">
  25. <button class="theme-bg-color text-white round cu-btn" style="width: 200upx;height: 70upx;" @click="wxShare">转发好友</button>
  26. <button class="theme-bg-color text-white round cu-btn" style="width: 200upx;height: 70upx;" @click="pyqShare">生成海报</button>
  27. </view>
  28. </view>
  29. <view class="container margin-sm" v-if="!$u.test.isEmpty(boostList)">
  30. <block v-for="(item, index) in boostList" :key="index">
  31. <view class="flex align-center justify-between padding-lr-sm">
  32. <view class="flex align-center" style="width: 40%;">
  33. <view class="padding-sm">
  34. <u-avatar :src="item.avatar" size="82"></u-avatar>
  35. </view>
  36. <view class="name">{{item.nickName}}</view>
  37. </view>
  38. <view class="text-sm" style="color: #757575;">{{item.typeSub == 1 ? '打榜' : '打赏'}}</view>
  39. <view class="name padding-right flex justify-end" style="width: 180upx;">{{+item.totalHotValue}}热力值</view>
  40. </view>
  41. </block>
  42. </view>
  43. <view v-else>
  44. <u-empty margin-top="100" text="暂无数据" mode="list"></u-empty>
  45. </view>
  46. <view class="cu-modal" :class="wxShareShow ? 'show' : ''" style="z-index: 9999;">
  47. <view class="cu-dialog">
  48. <view style="height:150px;">
  49. <view style="color: #000000;font-size: 38upx;padding: 40upx;">1. 先点击右上角<text class="text-bold" style="font-size: 38upx;">"···"</text></view>
  50. <view style="color: #000000;font-size: 38upx;padding: 40upx;">2. 选择<text class="text-bold" style="font-size: 38upx;">"{{type}}"</text></view>
  51. </view>
  52. <view class="cu-bar text-green text-lg bg-white">
  53. <view class="action margin-0 flex-sub solid-left" @tap="wxShareShow = false">知道了</view>
  54. </view>
  55. </view>
  56. </view>
  57. <view style="height: 80rpx;" v-if="status">
  58. <u-divider bgColor="#f1f1f1;" height="80">到底了</u-divider>
  59. </view>
  60. </view>
  61. </template>
  62. <script>
  63. export default {
  64. data() {
  65. return {
  66. productId: '',
  67. detail: {},
  68. boostList: [],
  69. current: 1,
  70. size: 30,
  71. status: false,
  72. wxShareShow: false,
  73. type: '',
  74. }
  75. },
  76. onLoad(options) {
  77. let userId = uni.getStorageSync("userId");
  78. if (!this.$u.test.isEmpty(userId)) {
  79. let link = "https://yyzs.nanyue6688.com/vote-h5/index.html#/pages/activityList/activity/musicBoost?id=" + options.id;
  80. if (link.indexOf("?") != -1) {
  81. link = link + "&agenterId=" + userId
  82. } else {
  83. link = link + "?agenterId=" + userId
  84. }
  85. let obj = {
  86. link,
  87. title: "音乐先锋榜",
  88. desc: "广东音乐之声携手29家全国省级电台,带你寻找最棒的华语音乐",
  89. imgUrl: 'https://upload-file-data.obs.cn-south-1.myhuaweicloud.com/6fa364aee2d0441d8d01d150eeb63d73-logo.png',
  90. }
  91. this.$shareConfig(obj, this);
  92. }
  93. if (!this.$u.test.isEmpty(options.agenterId)) {
  94. uni.setStorageSync("agenterId", options.agenterId)
  95. }
  96. this.productId = options.id;
  97. this.getProductInfo();
  98. this.getHelpRecord();
  99. },
  100. onReachBottom() {
  101. if (this.boostList.length < this.current * this.size) {
  102. this.status = true;
  103. } else {
  104. this.current += 1;
  105. this.getHelpRecord();
  106. }
  107. },
  108. methods: {
  109. getHelpRecord() {
  110. this.$u.api.production.helpRecord({productId: this.productId, current: this.current, size: this.size}).then(res => {
  111. this.boostList = [...this.boostList,...res.records];
  112. })
  113. },
  114. getProductInfo() {
  115. this.$u.api.production.detail({id: this.productId}).then(res => {
  116. this.detail = res;
  117. })
  118. },
  119. wxShare() {
  120. this.wxShareShow = true;
  121. this.type = "发送给朋友";
  122. },
  123. pyqShare() {
  124. this.wxShareShow = true;
  125. this.type = "分享到朋友圈"
  126. }
  127. }
  128. }
  129. </script>
  130. <style>
  131. .container {
  132. background-color: #ffffff;
  133. border-radius: 30upx;
  134. box-shadow: 10upx 10upx 60upx #d0d0d0;
  135. }
  136. .avatar {
  137. width: 145upx;
  138. height: 145upx;
  139. margin-top: -60upx;
  140. }
  141. .tag {
  142. padding: 0 10upx;
  143. display: flex;
  144. align-items: center;
  145. justify-content: center;
  146. background: linear-gradient(90deg, #7355F4 0%, #573BE5 100%);
  147. margin-top: 8upx;
  148. border-radius: 30upx;
  149. }
  150. .name {
  151. font-size: 26upx;
  152. font-family: PingFang SC;
  153. font-weight: bold;
  154. color: #111111;
  155. }
  156. </style>