application/common/service/RedeemCode.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/**
* 易想会员管理营销系统
* =========================================================
* 天津市华易动力信息科技有限公司 , 保留所有权利。
* ----------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和使用。
* 任何企业和个人不允许对程序代码以任何形式任何目的再发布。
* =========================================================
* @author : hy_team
* @date : 2019-08-10
*/
namespace app\common\service;
use app\common\service\BaseService;
use app\common\model\RedeemCode as RedeemCodeModel;
use app\common\model\RedeemCodeGroup;
use app\common\model\Members;
/**
* 兑换码
*/
class RedeemCode extends BaseService
{
/**
* [检查兑换码是否符合要求]
* @param [string] $code [兑换码]
* @param [float] $price [兑换码面值(可选)]
* @param [string] $whereVal [where限定条件]
* @return [返回 成功:兑换码面值 失败:错误信息]
*/
public function check_redeem_code($code = "", $price = "", $whereVal = ""){
if(!$code)return '请上传验证兑换码';
$where = [];
if (!empty($whereVal)) {
$where[] = $whereVal;
}
$time = time();
$where[] = array('code', '=', $code);
$where[] = array('add_time', '<', $time);
$where[] = array('expire_time', '>', $time);
$where[] = array('status', '=', 1);
$codeRow = RedeemCodeModel::where($where)->find();
if($codeRow['order_user'] == 2) return '兑换码已绑定待付款订单';
if($price){
if($price != $codeRow['price'])return '兑换码和兑换码面值不匹配';
}
if($codeRow){
return $codeRow['price'];
}else{
return '找不到匹配的兑换码';
}
后面还有 3 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。