taskList.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <template>
  2. <view class="content">
  3. <view class="task-list" v-for="(item,index) in 4" :key="index">
  4. <view class="task-l">
  5. <u-image width="80rpx" height="80rpx" :src="`/static/taskIcon${index+1}.png`"></u-image>
  6. <view class="task-l-info">
  7. <view class="task-l-title">新用户登录</view>
  8. <view class="task-l-desc">赚<text>1</text>次抽奖 <u-image width="22rpx" height="22rpx" src="/static/zpIcon.png"></u-image></view>
  9. </view>
  10. </view>
  11. <view class="task-r">
  12. <u-button size="medium" v-if="index==0" :custom-style="{padding:'6px 10px',width:'100%',background:'#989898',color:'#ffffff'}">已完成</u-button>
  13. <u-button size="medium" v-else-if="index==1" open-type="share" :custom-style="{padding:'6px 10px',width:'100%',background:'#02c9b2',color:'#ffffff'}">立即分享</u-button>
  14. <u-button size="medium" v-else @click="showYdao" :custom-style="{padding:'6px 10px',width:'100%',background:'#02c9b2',color:'#ffffff'}">立即前往</u-button>
  15. </view>
  16. </view>
  17. <u-popup v-model="showYd" mode="center" close-icon-color="#ffffff" closeable :border-radius="30" width="500rpx" height="550rpx">
  18. <view class="lottery-content">
  19. <view class="lottery-title">
  20. <image src="/static/tdsm.jpg"></image>
  21. </view>
  22. <view @click="toViewZn" class="lottery-confrim-btn">
  23. 查看使用指南
  24. </view>
  25. </view>
  26. </u-popup>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. data() {
  32. return {
  33. showYd: false
  34. }
  35. },
  36. methods: {
  37. showYdao(){
  38. this.showYd = true
  39. },
  40. toViewZn(){
  41. uni.redirectTo({
  42. url: '/pages/userCenter/zhinan'
  43. })
  44. }
  45. },
  46. onShareAppMessage() {
  47. return {
  48. title: '[乐色管家]年末活动来袭,幸福大转盘, 精彩好礼等你来抽!',
  49. path: '/pagesA/luckDraw/luckDraw',
  50. imageUrl:'/static/zp1.png'
  51. }
  52. },
  53. onShareTimeline() {
  54. return {
  55. title: '[乐色管家]年末活动来袭,幸福大转盘, 精彩好礼等你来抽!',
  56. imageUrl:'/static/zp1.png'
  57. }
  58. }
  59. }
  60. </script>
  61. <style lang="less">
  62. .content{
  63. width: 100%;
  64. padding: 0;
  65. // 弹框提示
  66. .lottery-content{
  67. display: flex;
  68. justify-content: center;
  69. height: 100%;
  70. position: relative;
  71. background: url(../../static/lottery_winbg1.png) no-repeat center top;
  72. background-size: 100% auto;
  73. .lottery-confrim-btn{
  74. width: 100%;
  75. display: flex;
  76. justify-content: center;
  77. position: absolute;
  78. bottom: 0;
  79. left: 0;
  80. color: #21d5c0;
  81. font-size: 32rpx;
  82. border-top: 1px solid #eee;
  83. padding: 30rpx 0;
  84. }
  85. .lottery-title{
  86. padding: 100rpx 50rpx;
  87. display: flex;
  88. text-align: center;
  89. image{
  90. width: 450rpx;
  91. height: 320rpx;
  92. }
  93. }
  94. }
  95. }
  96. .task-list{
  97. display: flex;
  98. align-items: center;
  99. padding: 20rpx 40rpx;
  100. border-bottom: 1px solid #eee;
  101. background-color: #FFFFFF;
  102. .task-l{
  103. width: 80%;
  104. display: flex;
  105. align-items: center;
  106. .task-l-info{
  107. flex-grow: 1;
  108. padding: 0 15rpx;
  109. .task-l-title{
  110. font-weight: bold;
  111. }
  112. .task-l-desc{
  113. display: flex;
  114. align-items: center;
  115. font-size: 24rpx;
  116. color: #666;
  117. margin-top: 5rpx;
  118. }
  119. }
  120. }
  121. .task-r{
  122. width: 20%;
  123. }
  124. }
  125. </style>