application/api/model/v1/Poster.php
(开头部分) 12KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/**
* 易优CMS
* ============================================================================
* 版权所有 2016-2028 海南赞赞网络科技有限公司,并保留所有权利。
* 网站地址: http://www.eyoucms.com
* ----------------------------------------------------------------------------
* 如果商业用途务必到官方购买正版授权, 以免引起不必要的法律纠纷.
* ============================================================================
* Author: 陈风任 <491085389@qq.com>
* Date: 2022-03-10
*/
namespace app\api\model\v1;
use think\Db;
use think\Cache;
use Grafika\Color;
use Grafika\Grafika;
require_once './vendor/grafika/src/autoloader.php';
/**
* 微信小程序商品海报模型
*/
load_trait('controller/Jump');
class Poster extends Base
{
use \traits\controller\Jump;
//初始化
protected function initialize()
{
// 需要调用`Model`的`initialize`方法
parent::initialize();
$this->aid = 0;
$this->typeid = 0;
$this->channel = 1;
$this->Product = [];
$this->PostData = [];
$this->PosterPath = '';
$this->PosterImage = '';
$this->AppletsQrcode = [];
}
// 商品海报生成处理
public function GetCreateGoodsShareQrcodePoster($Post = [], $channel = 1)
{
// 商品ID
$this->aid = $Post['aid'];
// 商品栏目ID
$this->typeid = $Post['typeid'];
// 模型ID
$this->channel = $channel;
// 图片、海报保存目录
$this->PosterPath = UPLOAD_PATH . 'tmp/poster_' . $this->typeid . '_' . $this->aid . '/';
// 背景图片处理
if (1 == $this->channel) {
$this->PosterImage = './public/static/common/images/article-bg.png';
后面还有 263 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
