add-api-freeze_expire_time

This commit is contained in:
lccsw
2022-07-25 15:12:07 +08:00
parent e81c74bbf1
commit 2ced43ccad
5 changed files with 28 additions and 13 deletions
+7 -5
View File
@@ -24,14 +24,15 @@
<table class="am-table am-table-bordered">
<thead>
<tr>
<th width="10%"><span>ID</span></th>
<th width="20%"><span>用户名称</span></th>
<th width="20%"><span>手机号码</span></th>
<th width="8%"><span>ID</span></th>
<th width="15%"><span>用户名称</span></th>
<th width="15%"><span>手机号码</span></th>
<th width="10%"><span>剩余积分</span></th>
<th width="10%"><span>冻结积分</span></th>
<th width="8%"><span>是否分销</span></th>
<th width="8%"><span>分销管理</span></th>
<th width=""><span>创建时间</span></th>
<th width="10%"><span>积分过期时间</span></th>
<th width="10%"><span>创建时间</span></th>
</tr>
</thead>
<tbody>
@@ -48,10 +49,11 @@
<td>
<input type="checkbox" class="mui-switch mui-switch-anim va-mid" true-value="1" false-value="0" <?=$v['manage']?'checked':''?> onchange="set_publish(this,<?=$v['id']?>,'manage')"/>
</td>
<td><?= $v['expire_time'] ? date('Y-m-d H:i',$v['expire_time']) : '' ?></td>
<td><?= date('Y-m-d H:i:s',$v['c_time']) ?></td>
</tr>
<tr>
<td colspan="8" class="align-r">
<td colspan="9" class="align-r">
<a class="am-btn am-btn-primary am-btn-xs" data-modal="/app/liche/member/add_items?uid=<?=$v['id']?>" data-title="兑换商品">
兑换商品
</a>
+14 -4
View File
@@ -59,13 +59,18 @@
<?if(is_img($info['loan_info']['notify_file_name'])){?>
<ul class="photopic-list ml30 clearfix">
<li>
<a target="_blank" class="pic" id="layer-photos-demo-101">
<img :src="info.loan_info.notify_file" @click="show_carimg(101)"/>
</a>
<div class="f12 tc"></div>
<!--
<a href="javascript:void(0);" class="pic" data-file="1" data-type="jpg,png,gif,png,jpeg"
data-uptype="qiniu" data-field="business_licence" data-mark="compalbum">
<input type="hidden" class="" name="business_licence" data-type="1" value="" onchange="upLoan(0,this)">
<img :src="info.loan_info.notify_file" />
</a>
<div class="tc f12">
</div>
<div class="tc f12"></div>
-->
</li>
</ul>
<?}else{?>
@@ -93,13 +98,18 @@
<?if(is_img($info['loan_info']['lend_file_name'])){?>
<ul class="photopic-list ml30 clearfix">
<li>
<a target="_blank" class="pic" id="layer-photos-demo-100">
<img :src="info.loan_info.notify_file" @click="show_carimg(100)"/>
</a>
<div class="f12 tc"></div>
<!--
<a href="javascript:void(0);" class="pic" data-file="1" data-type="jpg,png,gif,png,jpeg"
data-uptype="qiniu" data-field="business_licence" data-mark="compalbum">
<input type="hidden" class="" name="business_licence" data-type="1" value="" onchange="upLoan(1,this)">
<img :src="info.loan_info.lend_file" />
</a>
<div class="tc f12">
</div>
<div class="tc f12"></div>
-->
</li>
</ul>
<?}else{?>
+2 -1
View File
@@ -101,7 +101,8 @@ class User extends Wxapp{
'isdealer' => $this->session['dealer'],
'istop' => $istop,
'credits' => $user['credits']+$user['freeze_credits'],
'freeze_credits' => $user['freeze_credits']
'freeze_credits' => $user['freeze_credits'],
'expire_time' => $user['expire_time'] ? date('Y-m-d H:i',$user['expire_time']) : ''
);
return $data;
+3 -2
View File
@@ -38,12 +38,13 @@ class Credits_entity{
'id' => $uid
];
$credit_left = $row['credits']+$row['freeze_credits'];
if($credit>0){
if($credit>0){ //增加积分
$up_credit = [
"credits = credits+{$credit}" => null
];
$credit_left += $credit;
}else{
$up_credit['expire_time'] = time()+365*24*60*60;
}else{ //扣除积分
$credit_out = abs($credit);
$up_credit = [
"credits = credits-{$credit_out}" => null
+2 -1
View File
@@ -23,7 +23,8 @@ alter table lc_app_liche_users add up_uid int(10) not null default '0'
alter table lc_app_liche_users add manage tinyint(1) not null default 0 comment '是否分销管理' after dealer;
alter table lc_app_liche_users add deal_uid int(10) not null default 0 comment '审核分销uid' after dealer;
alter table lc_app_liche_users add credits int(10) unsigned not null default '0' COMMENT '当前可用积分' after nickname;
alter table lc_app_liche_users add freeze_credits int(10) unsigned not null default '0' COMMENT '冻结积分' after credits;
alter table lc_app_liche_users add freeze_credits int(10) unsigned not null default '0' COMMENT '冻结积分' after credits;
alter table lc_app_liche_users add expire_time int(10) unsigned not null default '0' COMMENT '积分过期时间' after freeze_credits
-- ----------------------------
-- Title:狸车小程序cms