修改文字

This commit is contained in:
邹景立 2021-02-23 16:50:22 +08:00
parent 21bbae095b
commit 130f877c53
11 changed files with 22 additions and 21 deletions

View File

@ -54,7 +54,7 @@ class Index extends Controller
/**
* 修改用户资料
* @login true
* @param integer $id 会员ID
* @param integer $id 用户ID
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException

View File

@ -37,8 +37,8 @@ class News extends Controller
$this->app->db->name('DataNewsItem')->where(['code' => $code])->update([
'num_read' => $this->app->db->raw('`num_read`+1'),
]);
if (($mid = input('uid', 0)) > 0) {
$data = ['uid' => $mid, 'code' => $code, 'type' => 3, 'status' => 2];
if (($uid = input('uid', 0)) > 0) {
$data = ['uid' => $uid, 'code' => $code, 'type' => 3, 'status' => 2];
$this->app->db->name('DataNewsXCollect')->where($data)->delete();
$this->app->db->name('DataNewsXCollect')->insert($data);
}

View File

@ -331,7 +331,7 @@ abstract class PaymentService
/**
* 创建支付订单
* @param string $openid 会员OPENID
* @param string $openid 用户OPENID
* @param string $orderNo 交易订单单号
* @param string $paymentAmount 交易订单金额(元)
* @param string $paymentTitle 交易订单名称

View File

@ -118,7 +118,7 @@ class PrizeService extends Service
$this->app->db->name($this->table)->insert(array_merge($map, [
'uid' => $this->fromer['id'], 'name' => $name, 'amount' => $amount, 'order_amount' => $this->order['amount_total'],
]));
// 更新会员奖利金额
// 更新用户奖利金额
UserService::instance()->syncLevel($this->fromer['id']);
}
return true;
@ -150,7 +150,7 @@ class PrizeService extends Service
$this->app->db->name($this->table)->insert(array_merge($map, [
'uid' => $this->fromer['id'], 'name' => $name, 'amount' => $amount, 'order_amount' => $this->order['amount_total'],
]));
// 更新会员奖利金额
// 更新用户奖利金额
UserService::instance()->syncLevel($this->fromer['id']);
}
return true;
@ -175,7 +175,7 @@ class PrizeService extends Service
$this->app->db->name($this->table)->insert(array_merge($map, [
'uid' => $this->fromer['id'], 'name' => $name, 'amount' => $amount, 'order_amount' => $this->order['amount_total'],
]));
// 更新会员奖利金额
// 更新用户奖利金额
UserService::instance()->syncLevel($this->fromer['id']);
}
return true;

View File

@ -210,8 +210,8 @@ class UserService extends Service
}
/**
* 同步计算会员级别
* @param integer $uid 指定会员uid
* 同步计算用户级别
* @param integer $uid 指定用户uid
* @param boolean $parent 同步计算上级
* @return boolean
* @throws \think\db\exception\DataNotFoundException
@ -228,7 +228,7 @@ class UserService extends Service
$teamsIndirect = $this->app->db->name('DataUser')->where(['pid2' => $uid])->count();
$teamsUsers = $this->app->db->name('DataUser')->whereLike('path', "%-{$uid}-%")->count();
$orderAmount = $this->app->db->name('ShopOrder')->where(['uid' => $uid])->whereIn('status', [3, 4, 5])->sum('amount_total');
// 计算会员级别
// 计算用户级别
foreach ($this->app->db->name('DataUserLevel')->where(['status' => 1])->order('number desc')->cursor() as $item) {
$l1 = empty($item['goods_vip_status']) || $user['vip_auth'] > 0;
$l2 = empty($item['teams_users_status']) || $item['teams_users_number'] <= $teamsUsers;

View File

@ -59,7 +59,7 @@ class AlipayPaymentService extends PaymentService
/**
* 创建订单支付参数
* @param string $openid 会员OPENID
* @param string $openid 用户OPENID
* @param string $orderNo 交易订单单号
* @param string $paymentAmount 交易订单金额(元)
* @param string $paymentTitle 交易订单名称

View File

@ -35,7 +35,7 @@ class EmptyPaymentService extends PaymentService
/**
* 创建支付订单
* @param string $openid 会员OPENID
* @param string $openid 用户OPENID
* @param string $orderNo 交易订单单号
* @param string $paymentAmount 交易订单金额(元)
* @param string $paymentTitle 交易订单名称

View File

@ -57,7 +57,7 @@ class JoinPaymentService extends PaymentService
/**
* 创建订单支付参数
* @param string $openid 会员OPENID
* @param string $openid 用户OPENID
* @param string $orderNo 交易订单单号
* @param string $paymentAmount 交易订单金额(元)
* @param string $paymentTitle 交易订单名称

View File

@ -35,7 +35,7 @@ class WechatPaymentService extends PaymentService
/**
* 创建微信支付订单
* @param string $openid 会员OPENID
* @param string $openid 用户OPENID
* @param string $orderNo 交易订单单号
* @param string $paymentAmount 交易订单金额(元)
* @param string $paymentTitle 交易订单名称

View File

@ -94,7 +94,7 @@
<fieldset>
<legend><span class="layui-badge think-bg-violet">入会礼包配置</span></legend>
<div class="layui-form-item">
{foreach ['非入会礼包,购买后不会影响等级','入会礼包,购买后升级会员级别'] as $k=>$v}
{foreach ['非入会礼包,购买后不会影响等级','入会礼包,购买后升级会员级别'] as $k=>$v}
{if (isset($vo.vip_entry) and $vo.vip_entry eq $k) or (empty($vo.vip_entry) and $k eq 0)}
<input type="radio" name="vip_entry" value="{$k}" title="{$v}" checked lay-filter="vip_entry">
{else}
@ -105,7 +105,7 @@
{notempty name='levels'}
<fieldset>
<legend><span class="layui-badge think-bg-violet">升级会员级别</span></legend>
<legend><span class="layui-badge think-bg-violet">升级用户级别</span></legend>
<label class="layui-form-item">
<select name="vip_upgrade" class="layui-select" lay-filter="vip_upgrade">
{foreach $levels as $level}{if isset($vo.vip_upgrade) and $vo.vip_upgrade eq $level.number}
@ -114,14 +114,14 @@
<option value="{$level.number|default=0}">[ {$level.number|default='0'} ] {$level.name|default=''}</option>
{/if}{/foreach}
</select>
<span class="help-block">购买此商品会员可直接升级至此等级!</span>
<span class="help-block">购买此商品用户可直接升级至此等级!</span>
</label>
</fieldset>
{/notempty}
{notempty name='discounts'}
<fieldset>
<legend><span class="layui-badge think-bg-violet">会员折扣方案</span></legend>
<legend><span class="layui-badge think-bg-violet">用户折扣方案</span></legend>
<label class="layui-form-item">
<select name="discount_id" class="layui-select" lay-search>
<option value="0"> -- 不设置 --</option>
@ -131,7 +131,7 @@
<option value="{$discount.id|default=0}">{$discount.name|default='0'}</option>
{/if}{/foreach}
</select>
<span class="help-block">会员级别达到规则可享有折扣!</span>
<span class="help-block">用户级别达到规则可享有折扣!</span>
</label>
</fieldset>
{/notempty}
@ -148,7 +148,8 @@
<option value="{$level.number|default=0}">[ {$level.number|default='0'} ] {$level.name|default=''}</option>
{/if}{/foreach}
</select>
<span class="help-block">限制低于此等级的会员不能购买!</span>
<span class="help-block">
限制此等级及低于此等级的用户不能购买!</span>
</label>
</fieldset>
{/notempty}

View File

@ -13,7 +13,7 @@
<table class="layui-table think-level-box" lay-skin="line">
<thead>
<tr>
<th class="text-left">会员级别</th>
<th class="text-left">用户级别</th>
<th class="text-right" style="width:150px">原价比例 ( 0% - 100% )</th>
</tr>
</thead>