application/admin/controller/Bind.php
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/**
* 易想会员管理营销系统
* =========================================================
* 天津市华易动力信息科技有限公司 , 保留所有权利。
* ----------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和使用。
* 任何企业和个人不允许对程序代码以任何形式任何目的再发布。
* =========================================================
* @author : hy_team
* @date : 2019-08-10
*/
namespace app\admin\controller;
use app\common\controller\Common;
use app\common\model\OncecardMember;
use app\common\model\BalanceMember;
class Bind extends Common
{
public function bindcard()
{
if (request()->isAjax()) {
$request = input('param.');
$entity = $request['entity'];
$id = $request['id'];
$type = $request['type'];
if (!is_numeric($id) || $id<0 || empty($id)) {
return '上传参数错误';
}
if (!is_numeric($entity) || $entity<0 || empty($entity)) {
return '上传参数错误';
}
// 检验是否唯一
$cnt = BalanceMember::where('entity_number',$entity)->count();
if ($cnt>0) {
return '该卡号已被绑定';
}
$cnt = OncecardMember::where('entity_number',$entity)->count();
if ($cnt>0) {
return '该卡号已被绑定';
}
if ($type == 1) {
$res = OncecardMember::where('id',$id)->update(['entity_number'=>$entity]);
}elseif ($type == 2) {
$res = BalanceMember::where('id',$id)->update(['entity_number'=>$entity]);
}
if ($res !== false) {
return true;
}else{
return '绑定失败';
}
}
}
public function remove()
{
$request = input('param.');
$id = $request['id'];
后面还有 27 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。