fix
13404089107
8 天以前 2e90f57e7d28d6a949247ef39b487d3e75b56683
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<template>
  <view class="content">
    <view class="header">
      <image class="header-background-image" src="/static/icon/task/background_task_header.png" mode="widthFix"></image>
      <view class="header-text">
        <view class="header-text-1">完成任务</view>
        <view class="header-text-2">领取<text>饮水币</text>奖励</view>
      </view>
    </view>
    <view class="container">
      <view class="card">
        <view class="cell-item">
          <image class="cell-item-image" src="/static/icon/task/icon_task_logo.png" mode="widthFix"></image>
          <view class="cell-item-info">
            <view class="cell-item-info-title">注册</view>
            <view class="cell-item-gold">
              <image class="icon" src="/static/icon/task/icon_gold.png" mode="widthFix"></image>
              <view class="text">+{{list[0].gold}}</view>
            </view>
          </view>
          <block>
            <button class="button handle-button disabled" disabled>已完成</button>
          </block>
        </view>
        <view class="cell-item">
          <image class="cell-item-image" src="/static/icon/task/icon_task_logo.png" mode="widthFix"></image>
          <view class="cell-item-info">
            <view class="cell-item-info-title">完善资料</view>
            <view class="cell-item-gold">
              <image class="icon" src="/static/icon/task/icon_gold.png" mode="widthFix"></image>
              <view class="text">+{{list[1].gold}}</view>
            </view>
          </view>
          <block>
            <button class="button handle-button" v-if="list[1].state == 1" @click="$navTo('/pages/user/index/setting')">去完成</button>
            <button class="button handle-button disabled" disabled v-if="list[1].state == 2">已完成</button>
          </block>
        </view>
        <view class="cell-item">
          <image class="cell-item-image" src="/static/icon/task/icon_task_logo.png" mode="widthFix"></image>
          <view class="cell-item-info">
            <view class="cell-item-info-title">邀请好友</view>
            <view class="cell-item-gold">
              <image class="icon" src="/static/icon/task/icon_gold.png" mode="widthFix"></image>
              <view class="text">+{{list[9].gold}}</view>
            </view>
          </view>
          <block>
            <!-- <button class="button handle-button disabled" disabled v-if="userInfo.inviteNumber >= 10">已完成</button> -->
            <view class="button-text">已完成<text>{{userInfo.inviteNumber}}个</text></view>
          </block>
        </view>
      </view>
    </view>
  </view>
</template>
 
<script>
  export default {
    data() {
      return {
        list:[],
        userInfo:{}
      };
    },
    onLoad() {
      this.init()
    },
    methods:{
      init(){
        this.$apis.user.getTaskList().then(res=>{
          this.list = res.data
        })
        this.$apis.user.getUserInfo().then(res=>{
          this.userInfo = res.data
        })
      }
    }
  }
</script>
 
<style lang="scss">
.content{
  .header{
    position: relative;
    .header-background-image{
      width: 750rpx;
    }
    .header-text{
      position: absolute;
      top: 103rpx;
      left: 28rpx;
      .header-text-1{
        font-family: AliHYAiHei, AliHYAiHei;
        font-size: 69rpx;
        color: #FFFFFF;
        line-height: 92rpx;
        text-shadow: 0px 4px 8px rgba(255,39,41,0.29);
      }
      .header-text-2{
        font-family: PingFangSC, PingFang SC;
        font-size: 35rpx;
        color: #FFFFFF;
        line-height: 48rpx;
        letter-spacing: 6px;
        text{
          color: #FFDD00;
          font-size: 35rpx;
          line-height: 48rpx;
        }
      }
    }
  }
  .container{
    padding: 0 26rpx 0 28rpx;
    margin-top: -90rpx;
    position: relative;
    z-index: 2;
    .card{
      background-color: #FFFFFF;
      border-radius: 19rpx;
      padding: 14rpx 30rpx;
      box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0,0,0,.4);
      .cell-item{
        display: flex;
        align-items: center;
        margin: 18rpx 0 26rpx;
        .cell-item-image{
          width: 80rpx;
        }
        .cell-item-info{
          flex: 1;
          padding-left: 15rpx;
          .cell-item-info-title{
            font-weight:700;
            font-size: 31rpx;
            color: #000000;
            line-height: 42rpx;
          }
          .cell-item-gold{
            display: flex;
            align-items: center;
            margin-top: 4rpx;
            .icon{
              width: 27rpx;
            }
            .text{
              font-size: 23rpx;
              color: rgba(0,0,0,.6);
              line-height: 23rpx;
            }
          }
        }
        .handle-button{
          width: 136rpx;
          height: 54rpx;
          background: #FF2729;
          border-radius: 27rpx;
          font-family: PingFang-SC, PingFang-SC;
          font-size: 27rpx;
          color: #FFFFFF;
          line-height: 38rpx;
          &.disabled{
            background-color: rgba(0,0,0,.2);
          }
        }
        .button-text{
          font-size: 23rpx;
          color: rgba(0,0,0,.6);
          line-height: 33rpx;
          text{
            font-weight: bold;
          }
        }
      }
    }
  }
}
</style>