广告分红样式

2021-09-11 15:46:03 阅读:2 编辑
  <view class="sign" wx:if="{{false}}">
      <view wx:if="{{app_type != 'app'}}" class="sign-content">
        <view class="sign-day" wx:for="{{sign}}" wx:for-index="index" wx:key="sign">
          <view class="sign-gold {{item.checked2 ? 'sign-ing' : ''}}">
            <view class="{{item.checked? 'gold' : 'golds'}}"></view>
          </view>
          <view>{{item.score}}</view>
        </view>
      </view>
      <view wx:if="{{app_type == 'app'}}" class="app-score">
        <block wx:for="{{sign}}" wx:for-index="index" wx:key="sign">
          <view class="app-socre-item">
            <view class="app-socre-item-div {{item.checked ? 'active' : ''}}">
            </view>
            <view class="app-socre-item-text">{{item.score}}</view>
          </view>
          <view wx:if="{{index <  sign.length - 1}}" class="app-socre-item-line  {{item.checked2 ? 'active' : ''}}"></view>
        </block>
      </view>
    </view>

.sign-content {
  display: flex;
  flex-direction: row;
  padding: 34rpx 0;
}

.sign-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 137rpx;
}

.sign-gold,.app-sign-gold {
  position: relative;
  width: 71rpx;
  height: 64rpx;
  padding-left: 10rpx;
}

.sign-gold,.app-sign-golds {
  width: 16rpx;
  height: 16rpx;
}

.sign-line-icon {
  width: 34rpx;
  height: 64rpx;
}
.sign-gold image,.app-sign-gold image{
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.sign-gold::after {
  content: '';
  position: absolute;
  z-index: 1;
  top: 8rpx;
  right: -116rpx;
  width: 116rpx;
  height: 3rpx;
  background: #d4d4d4;
}

.sign-gold .gold{
  width: 16rpx;
  height: 16rpx;
  background-color: var(--maincolor,#FAAD14);

  border-radius: 50%;
}
.sign-gold .golds{
  width: 16rpx;
  height: 16rpx;
  background-color: #BBBBBB;
  border-radius: 50%;
}
.app-sign-gold-gold{
  width: 16rpx;
  height: 16rpx;
  background-color: var(--maincolor,#FAAD14);

  border-radius: 50%;
}
.app-sign-gold-golds{
  width: 16rpx;
  height: 16rpx;
  background-color: #BBBBBB;
  border-radius: 50%;
}
.sign-ing::before {
  content: '';
  position: absolute;
  z-index: 2;
  top: 7rpx;
  right: -116rpx;
  width: 116rpx;
  height: 4rpx;
  background-color: var(--maincolor,#FAAD14);
}
.sign-gold.sign-ing:nth-last-of-type(1){
  width: 0;
  height: 0;
  background: red;
}
.sign .sign-day:nth-last-of-type(1) .sign-gold::before,
.sign .sign-day:nth-last-of-type(1) .sign-gold::after {
  width: 0;
  height: 0;
  background: red;
}

.sign-day>view:nth-child(2) {
  height: 40rpx;
  line-height: 40rpx;
  font-size: 24rpx;
  color: #6b6b6b;
}

.sign-day>view:nth-child(3) {
  font-size: 18rpx;
  color: #ffbd49;
}
.app-sign-content{width: 650rpx;}
.app-sign-day{
  flex:1
}
public function getRuleList(){
        $userid = intval(input('request.userid'));
        $user=User::get($userid);

        $res = [];
        $res[] = ["checked"=>false,"checked2"=>false,"score"=>0];
        $systemadrule_model = new Systemadrule();
        $systemadrule = $systemadrule_model->order("start","asc")->select();
        $index = 0;
        $current_index = -1;
        $user_level_id = $this->getUserLevelId($userid);

        foreach ($systemadrule as $item){
            if($user_level_id > $item->id){
                $res[] = ["checked"=>true,"checked2"=>true,"score"=>$item->start];
            }
            else if($user_level_id == $item->id){
                $current_index = $index;
                $res[] = ["checked"=>true,"checked2"=>true,"score"=>$item->start];
            }else{
                $res[] = ["checked"=>false,"checked2"=>false,"score"=>$item->start];
            }
            $index = $index + 1;
        }
        if($current_index > -1){
            $res[0]["checked"] = true;
            $res[0]["checked2"] = true;
        }
        $res[$current_index + 1]["checked2"] = false;
        success_json($res);

    }