mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
修改文字
This commit is contained in:
parent
21bbae095b
commit
130f877c53
@ -54,7 +54,7 @@ class Index extends Controller
|
|||||||
/**
|
/**
|
||||||
* 修改用户资料
|
* 修改用户资料
|
||||||
* @login true
|
* @login true
|
||||||
* @param integer $id 会员ID
|
* @param integer $id 用户ID
|
||||||
* @throws \think\db\exception\DataNotFoundException
|
* @throws \think\db\exception\DataNotFoundException
|
||||||
* @throws \think\db\exception\DbException
|
* @throws \think\db\exception\DbException
|
||||||
* @throws \think\db\exception\ModelNotFoundException
|
* @throws \think\db\exception\ModelNotFoundException
|
||||||
|
@ -37,8 +37,8 @@ class News extends Controller
|
|||||||
$this->app->db->name('DataNewsItem')->where(['code' => $code])->update([
|
$this->app->db->name('DataNewsItem')->where(['code' => $code])->update([
|
||||||
'num_read' => $this->app->db->raw('`num_read`+1'),
|
'num_read' => $this->app->db->raw('`num_read`+1'),
|
||||||
]);
|
]);
|
||||||
if (($mid = input('uid', 0)) > 0) {
|
if (($uid = input('uid', 0)) > 0) {
|
||||||
$data = ['uid' => $mid, 'code' => $code, 'type' => 3, 'status' => 2];
|
$data = ['uid' => $uid, 'code' => $code, 'type' => 3, 'status' => 2];
|
||||||
$this->app->db->name('DataNewsXCollect')->where($data)->delete();
|
$this->app->db->name('DataNewsXCollect')->where($data)->delete();
|
||||||
$this->app->db->name('DataNewsXCollect')->insert($data);
|
$this->app->db->name('DataNewsXCollect')->insert($data);
|
||||||
}
|
}
|
||||||
|
@ -331,7 +331,7 @@ abstract class PaymentService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建支付订单
|
* 创建支付订单
|
||||||
* @param string $openid 会员OPENID
|
* @param string $openid 用户OPENID
|
||||||
* @param string $orderNo 交易订单单号
|
* @param string $orderNo 交易订单单号
|
||||||
* @param string $paymentAmount 交易订单金额(元)
|
* @param string $paymentAmount 交易订单金额(元)
|
||||||
* @param string $paymentTitle 交易订单名称
|
* @param string $paymentTitle 交易订单名称
|
||||||
|
@ -118,7 +118,7 @@ class PrizeService extends Service
|
|||||||
$this->app->db->name($this->table)->insert(array_merge($map, [
|
$this->app->db->name($this->table)->insert(array_merge($map, [
|
||||||
'uid' => $this->fromer['id'], 'name' => $name, 'amount' => $amount, 'order_amount' => $this->order['amount_total'],
|
'uid' => $this->fromer['id'], 'name' => $name, 'amount' => $amount, 'order_amount' => $this->order['amount_total'],
|
||||||
]));
|
]));
|
||||||
// 更新会员奖利金额
|
// 更新用户奖利金额
|
||||||
UserService::instance()->syncLevel($this->fromer['id']);
|
UserService::instance()->syncLevel($this->fromer['id']);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -150,7 +150,7 @@ class PrizeService extends Service
|
|||||||
$this->app->db->name($this->table)->insert(array_merge($map, [
|
$this->app->db->name($this->table)->insert(array_merge($map, [
|
||||||
'uid' => $this->fromer['id'], 'name' => $name, 'amount' => $amount, 'order_amount' => $this->order['amount_total'],
|
'uid' => $this->fromer['id'], 'name' => $name, 'amount' => $amount, 'order_amount' => $this->order['amount_total'],
|
||||||
]));
|
]));
|
||||||
// 更新会员奖利金额
|
// 更新用户奖利金额
|
||||||
UserService::instance()->syncLevel($this->fromer['id']);
|
UserService::instance()->syncLevel($this->fromer['id']);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -175,7 +175,7 @@ class PrizeService extends Service
|
|||||||
$this->app->db->name($this->table)->insert(array_merge($map, [
|
$this->app->db->name($this->table)->insert(array_merge($map, [
|
||||||
'uid' => $this->fromer['id'], 'name' => $name, 'amount' => $amount, 'order_amount' => $this->order['amount_total'],
|
'uid' => $this->fromer['id'], 'name' => $name, 'amount' => $amount, 'order_amount' => $this->order['amount_total'],
|
||||||
]));
|
]));
|
||||||
// 更新会员奖利金额
|
// 更新用户奖利金额
|
||||||
UserService::instance()->syncLevel($this->fromer['id']);
|
UserService::instance()->syncLevel($this->fromer['id']);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -210,8 +210,8 @@ class UserService extends Service
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 同步计算会员级别
|
* 同步计算用户级别
|
||||||
* @param integer $uid 指定会员uid
|
* @param integer $uid 指定用户uid
|
||||||
* @param boolean $parent 同步计算上级
|
* @param boolean $parent 同步计算上级
|
||||||
* @return boolean
|
* @return boolean
|
||||||
* @throws \think\db\exception\DataNotFoundException
|
* @throws \think\db\exception\DataNotFoundException
|
||||||
@ -228,7 +228,7 @@ class UserService extends Service
|
|||||||
$teamsIndirect = $this->app->db->name('DataUser')->where(['pid2' => $uid])->count();
|
$teamsIndirect = $this->app->db->name('DataUser')->where(['pid2' => $uid])->count();
|
||||||
$teamsUsers = $this->app->db->name('DataUser')->whereLike('path', "%-{$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');
|
$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) {
|
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;
|
$l1 = empty($item['goods_vip_status']) || $user['vip_auth'] > 0;
|
||||||
$l2 = empty($item['teams_users_status']) || $item['teams_users_number'] <= $teamsUsers;
|
$l2 = empty($item['teams_users_status']) || $item['teams_users_number'] <= $teamsUsers;
|
||||||
|
@ -59,7 +59,7 @@ class AlipayPaymentService extends PaymentService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建订单支付参数
|
* 创建订单支付参数
|
||||||
* @param string $openid 会员OPENID
|
* @param string $openid 用户OPENID
|
||||||
* @param string $orderNo 交易订单单号
|
* @param string $orderNo 交易订单单号
|
||||||
* @param string $paymentAmount 交易订单金额(元)
|
* @param string $paymentAmount 交易订单金额(元)
|
||||||
* @param string $paymentTitle 交易订单名称
|
* @param string $paymentTitle 交易订单名称
|
||||||
|
@ -35,7 +35,7 @@ class EmptyPaymentService extends PaymentService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建支付订单
|
* 创建支付订单
|
||||||
* @param string $openid 会员OPENID
|
* @param string $openid 用户OPENID
|
||||||
* @param string $orderNo 交易订单单号
|
* @param string $orderNo 交易订单单号
|
||||||
* @param string $paymentAmount 交易订单金额(元)
|
* @param string $paymentAmount 交易订单金额(元)
|
||||||
* @param string $paymentTitle 交易订单名称
|
* @param string $paymentTitle 交易订单名称
|
||||||
|
@ -57,7 +57,7 @@ class JoinPaymentService extends PaymentService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建订单支付参数
|
* 创建订单支付参数
|
||||||
* @param string $openid 会员OPENID
|
* @param string $openid 用户OPENID
|
||||||
* @param string $orderNo 交易订单单号
|
* @param string $orderNo 交易订单单号
|
||||||
* @param string $paymentAmount 交易订单金额(元)
|
* @param string $paymentAmount 交易订单金额(元)
|
||||||
* @param string $paymentTitle 交易订单名称
|
* @param string $paymentTitle 交易订单名称
|
||||||
|
@ -35,7 +35,7 @@ class WechatPaymentService extends PaymentService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建微信支付订单
|
* 创建微信支付订单
|
||||||
* @param string $openid 会员OPENID
|
* @param string $openid 用户OPENID
|
||||||
* @param string $orderNo 交易订单单号
|
* @param string $orderNo 交易订单单号
|
||||||
* @param string $paymentAmount 交易订单金额(元)
|
* @param string $paymentAmount 交易订单金额(元)
|
||||||
* @param string $paymentTitle 交易订单名称
|
* @param string $paymentTitle 交易订单名称
|
||||||
|
@ -94,7 +94,7 @@
|
|||||||
<fieldset>
|
<fieldset>
|
||||||
<legend><span class="layui-badge think-bg-violet">入会礼包配置</span></legend>
|
<legend><span class="layui-badge think-bg-violet">入会礼包配置</span></legend>
|
||||||
<div class="layui-form-item">
|
<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)}
|
{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">
|
<input type="radio" name="vip_entry" value="{$k}" title="{$v}" checked lay-filter="vip_entry">
|
||||||
{else}
|
{else}
|
||||||
@ -105,7 +105,7 @@
|
|||||||
|
|
||||||
{notempty name='levels'}
|
{notempty name='levels'}
|
||||||
<fieldset>
|
<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">
|
<label class="layui-form-item">
|
||||||
<select name="vip_upgrade" class="layui-select" lay-filter="vip_upgrade">
|
<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}
|
{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>
|
<option value="{$level.number|default=0}">[ {$level.number|default='0'} ] {$level.name|default=''}</option>
|
||||||
{/if}{/foreach}
|
{/if}{/foreach}
|
||||||
</select>
|
</select>
|
||||||
<span class="help-block">购买此商品会员可直接升级至此等级!</span>
|
<span class="help-block">购买此商品用户可直接升级至此等级!</span>
|
||||||
</label>
|
</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{/notempty}
|
{/notempty}
|
||||||
|
|
||||||
{notempty name='discounts'}
|
{notempty name='discounts'}
|
||||||
<fieldset>
|
<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">
|
<label class="layui-form-item">
|
||||||
<select name="discount_id" class="layui-select" lay-search>
|
<select name="discount_id" class="layui-select" lay-search>
|
||||||
<option value="0"> -- 不设置 --</option>
|
<option value="0"> -- 不设置 --</option>
|
||||||
@ -131,7 +131,7 @@
|
|||||||
<option value="{$discount.id|default=0}">{$discount.name|default='0'}</option>
|
<option value="{$discount.id|default=0}">{$discount.name|default='0'}</option>
|
||||||
{/if}{/foreach}
|
{/if}{/foreach}
|
||||||
</select>
|
</select>
|
||||||
<span class="help-block">会员级别达到规则可享有折扣!</span>
|
<span class="help-block">用户级别达到规则可享有折扣!</span>
|
||||||
</label>
|
</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{/notempty}
|
{/notempty}
|
||||||
@ -148,7 +148,8 @@
|
|||||||
<option value="{$level.number|default=0}">[ {$level.number|default='0'} ] {$level.name|default=''}</option>
|
<option value="{$level.number|default=0}">[ {$level.number|default='0'} ] {$level.name|default=''}</option>
|
||||||
{/if}{/foreach}
|
{/if}{/foreach}
|
||||||
</select>
|
</select>
|
||||||
<span class="help-block">限制低于此等级的会员不能购买!</span>
|
<span class="help-block">
|
||||||
|
限制此等级及低于此等级的用户不能购买!</span>
|
||||||
</label>
|
</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{/notempty}
|
{/notempty}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<table class="layui-table think-level-box" lay-skin="line">
|
<table class="layui-table think-level-box" lay-skin="line">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="text-left">会员级别</th>
|
<th class="text-left">用户级别</th>
|
||||||
<th class="text-right" style="width:150px">原价比例 ( 0% - 100% )</th>
|
<th class="text-right" style="width:150px">原价比例 ( 0% - 100% )</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user