index.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <template>
  2. <view class="actdetail-ward">
  3. <view class="actdetail-ward-tbg">
  4. <view class="actdetail-ward-top">
  5. <view class="info fl_b">
  6. <view class="title">{{ detailInfo.name }}</view>
  7. <view class="act-status" v-if="detailInfo.status == 1">进行中</view>
  8. <view class="act-status grey" v-else>已结束</view>
  9. </view>
  10. <view class="time"
  11. >{{ detailInfo.startTime | formate("yyyy-mm-dd hh:mm") }} 到
  12. {{ detailInfo.endTime | formate("yyyy-mm-dd hh:mm") }}</view
  13. >
  14. </view>
  15. </view>
  16. <view
  17. class="actdetail-ward-main"
  18. :style="{ 'padding-bottom': detailInfo.status == 1 ? '168rpx' : '24rpx' }"
  19. >
  20. <view class="actdetail-ward-goods detail-box">
  21. <view class="title">商品及佣金</view>
  22. <view class="goods-list">
  23. <view
  24. class="goods-list-item"
  25. v-for="item in detailInfo.goodsList"
  26. :key="item.id"
  27. >
  28. <view class="fl lebel">
  29. <view>商品名称:</view>
  30. <view>{{ item.goodsName }}</view>
  31. </view>
  32. <view class="fl lebel">
  33. <view>商品价格:</view>
  34. <view>{{ item.goodsPrice }}元</view>
  35. </view>
  36. <view class="fl lebel">
  37. <view>分佣方式:</view>
  38. <view>{{ ["百分比", "固定金额"][item.profitType - 1] }}</view>
  39. </view>
  40. <view class="fl lebel">
  41. <view>数值:</view>
  42. <view
  43. >{{ item.profitMax }}{{ item.profitType == 1 ? "%" : "" }}</view
  44. >
  45. </view>
  46. <view class="fl lebel">
  47. <view>一级佣金:</view>
  48. <view>{{ item.profitOne }}</view>
  49. </view>
  50. <view class="fl lebel">
  51. <view>二级佣金:</view>
  52. <view>{{ item.profitTwo }}</view>
  53. </view>
  54. <view class="fl lebel">
  55. <view>三级级佣金:</view>
  56. <view>{{ item.profitThree }}</view>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. <view class="actdetail-ward-bom detail-box">
  62. <view class="title">活动详情</view>
  63. <view class="fl_b time u-border-bottom">
  64. <text>佣金冻结期</text>
  65. <text>{{ detailInfo.freezingPeriod }}天</text>
  66. </view>
  67. <view class="desc">
  68. <view class="desc-title">描述</view>
  69. <text>{{ detailInfo.remark }}</text>
  70. </view>
  71. </view>
  72. </view>
  73. <view class="actdetail-btn" v-if="detailInfo.status == 1">
  74. <u-button
  75. class="c_btn"
  76. text="生成专属海报"
  77. @click="getLinkCode"
  78. ></u-button>
  79. </view>
  80. </view>
  81. </template>
  82. <script>
  83. import { getActDetail, getLinkCode } from "@/utils/act";
  84. export default {
  85. name: "SaasManagerIndex",
  86. data() {
  87. return {
  88. detailInfo: {},
  89. };
  90. },
  91. onLoad(options) {
  92. this.getActDetail(options.id);
  93. },
  94. methods: {
  95. getActDetail(id) {
  96. getActDetail(id).then((res) => {
  97. this.detailInfo = res;
  98. });
  99. },
  100. getLinkCode() {
  101. let { distributionId } = this.detailInfo;
  102. getLinkCode({ distributionId }).then(({ linkCode, shareCode }) => {
  103. uni.navigateTo({
  104. url:
  105. "/pages/bill/index?distributionId=" +
  106. distributionId +
  107. "&linkCode=" +
  108. linkCode +
  109. "&shareCode=" +
  110. shareCode,
  111. });
  112. });
  113. },
  114. },
  115. };
  116. </script>
  117. <style lang="scss" scoped>
  118. page {
  119. background-color: #f6f7fb;
  120. }
  121. .actdetail-ward {
  122. .actdetail-ward-tbg {
  123. width: 100%;
  124. height: 429rpx;
  125. top: 80rpx;
  126. background: linear-gradient(180deg, #3f8dfd 49%, rgba(0, 105, 255, 0) 100%);
  127. padding: 44rpx 24rpx 0;
  128. box-sizing: border-box;
  129. .actdetail-ward-top {
  130. .info {
  131. align-items: flex-start;
  132. .title {
  133. width: 80%;
  134. font-weight: bold;
  135. color: #ffffff;
  136. font-size: 36rpx;
  137. line-height: 50rpx;
  138. }
  139. .act-status {
  140. background: #44ca7d;
  141. padding: 6rpx 12rpx;
  142. border-radius: 20rpx 20rpx 0 20rpx;
  143. font-weight: bold;
  144. color: #ffffff;
  145. font-size: 24rpx;
  146. }
  147. .grey {
  148. background: #c0cad9;
  149. }
  150. }
  151. .time {
  152. color: #ffffff;
  153. font-size: 28rpx;
  154. margin-top: 16rpx;
  155. opacity: 0.8;
  156. }
  157. }
  158. }
  159. .actdetail-ward-main {
  160. padding: 24rpx 24rpx 24rpx;
  161. position: absolute;
  162. top: 180rpx;
  163. width: 100%;
  164. box-sizing: border-box;
  165. .actdetail-ward-goods {
  166. margin-bottom: 24rpx;
  167. .goods-list {
  168. .goods-list-item {
  169. background: #fafafa;
  170. border-radius: 8rpx;
  171. padding: 32rpx 32rpx 0;
  172. color: #7e7d83;
  173. font-size: 26rpx;
  174. margin-bottom: 24rpx;
  175. .lebel {
  176. align-items: flex-start;
  177. view {
  178. margin-bottom: 20rpx;
  179. &:nth-of-type(1) {
  180. width: 170rpx;
  181. }
  182. &:nth-of-type(2) {
  183. flex: 1;
  184. line-height: 40rpx;
  185. }
  186. }
  187. }
  188. }
  189. }
  190. }
  191. .actdetail-ward-bom {
  192. .time {
  193. color: #484848;
  194. font-size: 32rpx;
  195. padding-bottom: 32rpx;
  196. }
  197. }
  198. .detail-box {
  199. background: #ffffff;
  200. border-radius: 16rpx;
  201. padding: 32rpx 24rpx 1rpx;
  202. .title {
  203. font-weight: bold;
  204. color: #24263d;
  205. font-size: 32rpx;
  206. margin-bottom: 32rpx;
  207. }
  208. .desc {
  209. padding-bottom: 40rpx;
  210. .desc-title {
  211. padding: 32rpx 0 24rpx;
  212. }
  213. text {
  214. color: #484848;
  215. font-size: 28rpx;
  216. opacity: 0.7;
  217. }
  218. }
  219. }
  220. }
  221. .actdetail-btn {
  222. width: 100%;
  223. background: #ffffff;
  224. height: 144rpx;
  225. padding: 24rpx;
  226. position: fixed;
  227. bottom: 0;
  228. box-sizing: border-box;
  229. }
  230. }
  231. </style>