evoxwht il y a 2 ans
Parent
commit
463382a641

+ 8 - 12
crmeb/app/services/user/UserSignServices.php

@@ -139,21 +139,17 @@ class UserSignServices extends BaseServices
         if (!$user) {
             throw new ApiException(410032);
         }
-        if ($this->getIsSign($uid, 'today')) {
-            throw new ApiException(410293);
-        }
+//        if ($this->getIsSign($uid, 'today')) {
+//            throw new ApiException(410293);
+//        }
         $sign_num = 0;
-        $user_sign_num = $user['sign_num'];
         //检测昨天是否签到
-        if ($this->getIsSign($uid, 'yesterday')) {
-            if ($user->sign_num > (count($sign_list) - 1)) {
-                $user->sign_num = 0;
-            }
-        } else {
-            $user->sign_num = 0;
-        }
+//        if (!$this->getIsSign($uid, 'yesterday')) {
+//            $user->sign_num = 0;
+//        }
+
         foreach ($sign_list as $key => $item) {
-            if ($key == $user->sign_num) {
+            if ($key == $user->sign_num || ($user->sign_num > 6 && $key == 6)) {
                 $sign_num = $item['sign_num'];
                 break;
             }

+ 1 - 1
template/uni-app/pages/users/user_sgin/index.vue

@@ -27,7 +27,7 @@
 							{{(item.day==$t(`第七天`) || item.day==$t(`第7天`))?$t(`奖励`):$t(item.day)}}
 						</view>
 						<view class='venus'
-							:class="(index + 1 === signSystemList.length ? 'reward' : '') + ' ' +(sign_index >= index + 1 ? 'venusSelect' : '')">
+							:class="(index + 1 === signSystemList.length ? 'venusSelect' : '') + ' ' +(sign_index >= index + 1 ? 'venusSelect' : '')">
 						</view>
 						<view class='num' :class="sign_index >= index + 1 ? 'on' : ''">+{{item.sign_num}}</view>
 					</view>