detail.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. <template>
  2. <view class="safe-area-inset-bottom">
  3. <my-bar title="活动详情" :transparent="transparent">
  4. <view slot="content" class="publish">
  5. <image :src="detail.pic" style="height: 380rpx;width: 100%;"></image>
  6. </view>
  7. </my-bar>
  8. <view class="clock">
  9. </view>
  10. <view class="content">
  11. <text class="title">{{detail.title}}</text>
  12. <view class="data" style="margin-top: 30rpx;">
  13. <u-icon name="clock" color="#EF9944"></u-icon>
  14. <text class="margin-left-10">{{detail.beginTime | date('mm/dd hh:MM:ss')}} 至 {{detail.endTime | date('mm/dd hh:MM:ss')}}</text>
  15. </view>
  16. <!-- <view class="data">
  17. <u-icon name="map"></u-icon>
  18. <text class="margin-left-10">仅限全天河区内报名</text>
  19. </view> -->
  20. <view class="data flex">
  21. <view class="flex">
  22. <u-icon name="grid" color="#EF9944"></u-icon>
  23. <text class="margin-left-10">{{detail.labelNames}}</text>
  24. </view>
  25. <view class="flex margin-left-50">
  26. <u-icon name="bag" color="#EF9944"></u-icon>
  27. <text class="margin-left-10">活动供应价{{detail.supplyPrice}}%</text>
  28. </view>
  29. </view>
  30. <view class="data">
  31. <u-icon name="home-fill" color="#EF9944"></u-icon>
  32. <text class="margin-left-10">联营积分全场通用</text>
  33. </view>
  34. </view>
  35. <view class="intro">
  36. <view class="flex">
  37. <u-icon name="coupon" color="#EF9944"></u-icon>
  38. <text class="margin-left-10">商场活动补贴</text>
  39. </view>
  40. <view class="desc" style="display: flex;border-bottom: 1rpx solid #DDDDDD;align-items: center;">
  41. <u-input disabled v-model="appendSupplyPrice" placeholder="请输入折扣" style="width: 90%;" />
  42. <text class="padding-left-20">%</text>
  43. </view>
  44. </view>
  45. <view class="intro">
  46. <view class="flex">
  47. <u-icon name="bookmark" color="#EF9944"></u-icon>
  48. <text class="margin-left-10">活动介绍</text>
  49. </view>
  50. <view class="desc">
  51. {{detail.detail}}
  52. </view>
  53. </view>
  54. <view class="attend" v-if="!$isEmpty(detail.activityJoinRecords)">
  55. <view class="margin-bottom-20">
  56. <u-icon name="calendar-fill" color="#EF9944"></u-icon>
  57. <text class="margin-left-10">已参加</text>
  58. </view>
  59. <view class="flex">
  60. <view class="flex " style="width: 90%;">
  61. <view class="data" v-for="(item,index) in detail.activityJoinRecords" :key="index">
  62. <view class="item">
  63. <image :src="item.joinPic" mode=""></image>
  64. <view>
  65. <text>{{name | ellipsis}}</text>
  66. <text>{{item.finalSupplyPrice}}折</text>
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. <view v-if="detail.activityJoinRecords.length>3" class="center" style="width: 10%;margin-right: 15rpx;">
  72. <u-icon name="more-circle" size="80" color="#ababab"></u-icon>
  73. </view>
  74. </view>
  75. </view>
  76. <block v-if="detail.auditStatus==0">
  77. <view class="" style="height: 90rpx;"></view>
  78. <view :style="{paddingBottom:safeAreaBottom}" class="footer-fixed padding-20 bg-white flex justify-end margin-right-30" style="box-sizing: border-box;z-index: 999;border-top: 1rpx solid #f1f1f1;">
  79. <view @click="pass" class="cu-btn df btn-bg-color round margin-right-20" style="padding-left: 46rpx;padding-right: 46rpx;">
  80. 通过
  81. </view>
  82. <view @click="opinionShow=true" class="cu-btn df btn-line-color round " style="padding-left: 46rpx;padding-right: 46rpx;">
  83. 拒绝
  84. </view>
  85. </view>
  86. </block>
  87. <block v-else>
  88. <view class="" style="height: 90rpx;"></view>
  89. <view :style="{paddingBottom:safeAreaBottom}" class="footer-fixed center">
  90. <view class="cu-btn df btn-bg-color round " style="width: 90%;height: 80rpx;">
  91. <text v-if="detail.auditStatus==1">审核已通过</text>
  92. <text v-if="detail.auditStatus==2">审核未通过</text>
  93. <text v-if="detail.auditStatus==2">活动已停用</text>
  94. <text v-if="detail.auditStatus==4">已提交,待平台审核</text>
  95. </view>
  96. </view>
  97. </block>
  98. <u-modal :show-cancel-button="true" confirm-color="#FF9447" @confirm="opinionConfirm" title="审核意见" :mask-close-able="true"
  99. v-model="opinionShow">
  100. <view class="slot-content" style="margin: 20rpx;">
  101. <u-form label-width="150" ref="uForm">
  102. <u-form-item :border-bottom="false">
  103. <u-input height="150" placeholder="请输入审核意见(选填)" v-model="auditAdvice" />
  104. </u-form-item>
  105. </u-form>
  106. </view>
  107. </u-modal>
  108. </view>
  109. </template>
  110. <script>
  111. import myBar from "@/components/my-bar.vue"
  112. export default {
  113. components: {
  114. myBar
  115. },
  116. onPageScroll(obj) {
  117. this.transparent = obj.scrollTop * 0.006;
  118. },
  119. filters: {
  120. // 名称超出显示省略号
  121. ellipsis(value) {
  122. if (!value) return '';
  123. if (value.length > 4) {
  124. return value.slice(0, 3) + '...'
  125. }
  126. return value
  127. }
  128. },
  129. data() {
  130. return {
  131. id: '',
  132. transparent: '',
  133. name: '星巴克',
  134. detail: {},
  135. appendSupplyPrice: 100,
  136. opinionShow:false,
  137. auditAdvice:''
  138. }
  139. },
  140. onLoad(options) {
  141. this.id = options.id
  142. if (!this.id) {
  143. this.$u.toast('系统错误')
  144. return
  145. }
  146. this.fetchDetail()
  147. },
  148. methods: {
  149. fetchDetail() {
  150. this.$api.activity.detail({
  151. id: this.id
  152. }).then(res => {
  153. this.detail = res.data
  154. })
  155. },
  156. opinionConfirm(){
  157. let item = this.$u.deepClone(this.detail)
  158. item.auditStatus = this.$global.activityStatus.refuse
  159. this.$api.activity.submit(item).then(res => {
  160. if (res.success == true) {
  161. this.$u.toast(res.msg)
  162. this.fetchDetail()
  163. }
  164. })
  165. },
  166. pass(){
  167. this.$dialog.showModal('确定通过并提交到平台进行审核?').then(()=>{
  168. let item=this.$u.deepClone(this.detail)
  169. item.auditStatus=this.$global.activityStatus.wait_admin_audit
  170. this.$api.activity.submit(item).then(res=>{
  171. if (res.success == true) {
  172. this.$u.toast(res.msg)
  173. this.$util.waitReload()
  174. this.fetchDetail()
  175. }
  176. })
  177. })
  178. }
  179. }
  180. }
  181. </script>
  182. <style lang="scss" scoped>
  183. .publish {
  184. overflow: hidden;
  185. border-radius: 10rpx;
  186. height: 380rpx;
  187. position: absolute;
  188. bottom: 20rpx;
  189. left: 0;
  190. right: 0;
  191. width: 92%;
  192. margin: 0 auto -120rpx;
  193. border-radius: 10rpx;
  194. box-shadow: 0rpx 16rpx 8rpx -8rpx #a8a8a8;
  195. display: flex;
  196. justify-content: center;
  197. align-items: center;
  198. flex-direction: column;
  199. text {
  200. font-size: 26rpx;
  201. color: #797979;
  202. }
  203. }
  204. .clock {
  205. background-color: #FFFFFF;
  206. height: 120rpx;
  207. padding-bottom: 20rpx;
  208. display: flex;
  209. flex-direction: column;
  210. justify-content: flex-end;
  211. align-items: center;
  212. .tips {
  213. margin-top: 10rpx;
  214. font-size: 24rpx;
  215. color: #FF9447;
  216. }
  217. }
  218. .content {
  219. padding: 15rpx 30rpx;
  220. background-color: #FFFFFF;
  221. .title {
  222. line-height: 50rpx;
  223. font-weight: 800;
  224. font-size: 32rpx;
  225. }
  226. .data {
  227. margin: 20rpx 0;
  228. color: #787878;
  229. }
  230. }
  231. .intro {
  232. margin-top: 15rpx;
  233. padding: 15rpx 30rpx;
  234. background-color: #FFFFFF;
  235. .desc {
  236. color: #9a9a9a;
  237. margin-top: 20rpx;
  238. line-height: 46rpx;
  239. font-size: 28rpx;
  240. }
  241. }
  242. .attend {
  243. margin-top: 15rpx;
  244. padding: 15rpx 0 15rpx 30rpx;
  245. background-color: #FFFFFF;
  246. .data {
  247. margin: 10rpx 20rpx 10rpx 0;
  248. $width: 80rpx;
  249. .item {
  250. width: 190rpx;
  251. height: $width;
  252. background-color: #eeeeee;
  253. border-radius: 50rpx;
  254. display: flex;
  255. image {
  256. width: $width;
  257. height: $width;
  258. }
  259. view {
  260. padding-left: 10rpx;
  261. display: flex;
  262. flex-direction: column;
  263. justify-content: center;
  264. font-size: 22rpx;
  265. text:first-child {
  266. font-weight: 800;
  267. margin-bottom: 4rpx;
  268. }
  269. }
  270. }
  271. }
  272. }
  273. </style>