activityDetail.vue 3.6 KB

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