activityDetail.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. <template>
  2. <view>
  3. <u-navbar title="活动详情"></u-navbar>
  4. <view class="main" v-html="info.content">
  5. </view>
  6. <view class="bottom2" v-if="!userInfo" >
  7. <u-button type="info" @click="issueMethod()">未登录</u-button>
  8. </view>
  9. <view class="bottom2" v-else-if="info.status=='eaab19ae-893f-40e7-b730-85a13af00137'" >
  10. <u-button type="info">活动未开始</u-button>
  11. </view>
  12. <view class="bottom2" v-else-if="info.status=='77d93870-e1e1-4369-b2b6-629e8645e8d9'" >
  13. <u-button type="info">活动已过期</u-button>
  14. </view>
  15. <view class="bottom" v-else @click="gotoUrl('pages/mine/issue?id='+info.id)" >
  16. <button>发布作品</button>
  17. <!-- <u-button type="info">发布作品</u-button> -->
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. import * as API from '@/apis/pagejs/activity.js'
  23. export default {
  24. data() {
  25. return {
  26. userInfo:null,
  27. id:'',
  28. info:{},
  29. }
  30. },
  31. onLoad(op){
  32. this.userInfo=this.carhelp.getPersonInfo()
  33. console.log(this.userInfo)
  34. if(op.id){
  35. this.id=op.id
  36. this.getInfo()
  37. }
  38. },
  39. methods: {
  40. issueMethod(){
  41. uni.showModal({
  42. title:"提示",
  43. content:"未登录,登录后参与分享活动",
  44. confirmText:"前往登录",
  45. showCancel:true,
  46. success: function (res) {
  47. if(res.confirm){
  48. uni.navigateTo({
  49. url:'/pages/login/index'
  50. })
  51. }
  52. }
  53. })
  54. },
  55. getInfo(){
  56. uni.showLoading({
  57. title: "加载中",
  58. mask: true,
  59. })
  60. API.edit(this.id).then((res) => {
  61. uni.hideLoading();
  62. //this.list=response.data.data
  63. this.info=res.data;
  64. }).catch(error => {
  65. uni.showToast({
  66. title: error,
  67. icon: "none"
  68. })
  69. })
  70. },
  71. }
  72. }
  73. </script>
  74. <style lang="scss" scoped>
  75. page{
  76. padding-bottom: 100px;
  77. }
  78. .main{
  79. margin: 24rpx 32rpx 0 32rpx;
  80. // 活动介绍
  81. .introduction{
  82. margin-top: 24rpx;
  83. font-family: 'Regular';
  84. .title{
  85. color: rgba(16, 16, 16, 1);
  86. font-size: 18px;
  87. line-height: 26px;
  88. }
  89. .content{
  90. color: rgba(51, 51, 51, 1);
  91. line-height: 24px;
  92. margin-top: 16rpx;
  93. }
  94. }
  95. // 活动时间
  96. .date{
  97. font-family: 'Regular';
  98. margin-top: 32rpx;
  99. .title{
  100. color: rgba(16, 16, 16, 1);
  101. font-size: 18px;
  102. line-height: 26px;
  103. }
  104. .item{
  105. margin-top:16rpx;
  106. display: flex;
  107. color: rgba(51, 51, 51, 1);
  108. line-height: 20px;
  109. .item-title{
  110. margin-right: 24rpx;
  111. }
  112. .name{
  113. width: 100rpx;
  114. }
  115. }
  116. }
  117. }
  118. // 积分获取
  119. .integral{
  120. margin-top: 32rpx;
  121. .title{
  122. color: rgba(16, 16, 16, 1);
  123. font-size: 18px;
  124. line-height: 26px;
  125. font-family: 'Regular';
  126. }
  127. .integral-group{
  128. margin-top: 24rpx;
  129. background-color: #fff;
  130. .item{
  131. display: flex;
  132. justify-content: space-between;
  133. line-height: 44px;
  134. padding-left: 16rpx;
  135. color: rgba(51, 51, 51, 1);
  136. font-size: 16px;
  137. border-bottom: solid 1px #e6e6e6;
  138. font-size: 14rpx;
  139. .value{
  140. width: 170rpx;
  141. text-align: center;
  142. }
  143. }
  144. .item1{
  145. color: rgba(16, 16, 16, 1);
  146. font-size: 16px;
  147. }
  148. }
  149. }
  150. .bottom{
  151. padding: 16rpx 32rpx;
  152. background-color: #fff;
  153. position: fixed;
  154. bottom: 0;
  155. left: 0;
  156. right: 0;
  157. font-family: Arial;
  158. uni-button{
  159. border-radius: 8px;
  160. background-color: rgba(31, 74, 153, 1);
  161. color: rgba(255, 255, 255, 1);
  162. font-size: 16px;
  163. line-height: 40px;
  164. }
  165. }
  166. .bottom2{
  167. padding: 16rpx 32rpx;
  168. background-color: rgba(243, 244, 244, 1);
  169. position: fixed;
  170. bottom: 0;
  171. left: 0;
  172. right: 0;
  173. uni-button{
  174. border-radius: 8px;
  175. background-color: rgba(255, 255, 255, 1);
  176. color: #303133;
  177. font-size: 16px;
  178. line-height: 40px;
  179. }
  180. }
  181. </style>