添加网站文件

This commit is contained in:
2025-12-22 13:59:40 +08:00
commit 117aaf83d1
19468 changed files with 2111999 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
namespace app\admin\model;
use think\Model;
class AdPosition extends Model
{
protected $name = 'ad_position';
}

View File

@@ -0,0 +1,24 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
namespace app\admin\model;
use think\Model;
class Article extends Model {
}

View File

@@ -0,0 +1,24 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
namespace app\admin\model;
use think\Model;
class ArticleCategory extends Model {
}

View File

@@ -0,0 +1,176 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
namespace app\admin\model;
use think\Db;
use think\Model;
class Coupon extends Model{
protected $autoWriteTimestamp = true;
protected $updateTime = 'update_time';
protected $createTime = 'create_time';
//开始发放时间
public function setSendTimeStartAttr($value,$data){
if($value){
return strtotime($value);
}
return $value;
}
//结束发放时间
public function setSendTimeEndAttr($value,$data){
if($value){
return strtotime($value);
}
return $value;
}
//修改使用时间
public function setUseTimeStartAttr($value,$data){
if($value){
return strtotime($value);
}
return $value;
}
//修改结束时间
public function setUseTimeEndAttr($value,$data){
if($value){
return strtotime($value);
}
return $value;
}
//优惠券面额
public function getMoneyAttr($value,$data){
if($value){
return '¥'.$value;
}
return $value;
}
//使用场景
public function getSceneTypeAttr($value,$data){
switch ($value){
case 1:
return '全场通用券';
default:
return '';
}
}
//使用门槛
public function getConditionTypeAttr($value,$data){
if($value == 1){
return '无门槛';
}
if($value == 2){
return '订单满'.$data['condition_money'].'元可用';
}
}
//
public function getUseTimeStartAttr($value,$data){
if($value){
return date('Y-m-d H:i:s',$value);
}
return $value;
}
public function getUseTimeEndAttr($value,$data){
if($value){
return date('Y-m-d H:i:s',$value);
}
return $value;
}
//用券时间
public function getSendTimeAttr($value,$data){
return date('Y-m-d H:i:s',$data['send_time_start']).'至' .date('Y-m-d H:i:s',$data['send_time_end']);
}
//用券时间
public function getUseTimeTypeAttr($value,$data){
if($value == 1){
return date('Y-m-d H:i:s',$data['use_time_start']).'至' .date('Y-m-d H:i:s',$data['use_time_end']);
}
if($value == 2){
return '领取当天起'.$data['use_time'].'天内可用';
}
if($value == 3){
return '领取次日起'.$data['use_time'].'天内可用';
}
}
//领取方式
public function getGetTypeAttr($value,$data){
switch ($value){
case 1:
return '直接领取';
case 2:
return '平台赠送';
case 3:
return '活动赠送';
default:
return '';
}
}
// //优惠券状态
// public function getStatusAttr($value,$data){
// $status = '已关闭';
// if($value == 1){
// $status = '进行中';
// }
// return $status;
// }
public function getStatusDescAttr($value,$data){
$status = '已关闭';
if($data['status'] == 1){
$status = '进行中';
}
return $status;
}
//发放总量
public function getSendTotalTypeAttr($value,$data){
if($value == 1){
return '不限制数量';
}
if($value == 2){
return '订单满'.$data['condition_money'].'元可用';
}
}
public function getGetNumTypeAttr($value,$data){
if($value == 1){
return '不限制领取次数';
}
if($value == 2){
return '限制领取'.$data['use_time'].'次';
}
if($value == 3){
return '每天限制领取'.$data['use_time'].'次';
}
}
//已发放
public static function getSentTotalAttr($value,$data){
$send_total = Db::name('coupon_list')->where(['coupon_id'=>$data['id']])->count();
$tips = '已发放:'.$send_total.'<br>';
if($data['send_total_type'] == 1){
$tips .= '待发放:不限量'.'<br>'.'发放总量:不限量';
}else{
$residue = $data['send_total'] - $send_total;
$residue = $residue >=0 ? $residue : 0;
$tips .= '待发放:'.$residue.'张'.'<br>'.'发放总量:'.$data['send_total'];
}
return $tips;
}
}

View File

@@ -0,0 +1,32 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
namespace app\admin\model;
use think\Model;
/**
* 分销会员申请
* Class DistributionMemberApply
* @package app\common\model
*/
class DistributionMemberApply extends Model
{
protected $name = 'distribution_member_apply';
}

View File

@@ -0,0 +1,72 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
namespace app\admin\model;
use think\Model;
class Freight extends Model
{
protected $name = 'freight';
protected $autoWriteTimestamp = true;
//配送地区类型
const TYPE_ALL = 0;//全国
const TYPE_SPEC = 1;//指定地区
//能否设置全国模板
const ABLE_SET = 1;//能设置
const UNABLE_SET = 2;//不能设置
//计费方式
const CHARGE_WAY_WEIGHT = 1;//按重量计费
const CHARGE_WAY_VOLUME = 2; //体积计费
const CHARGE_WAY_PIECE = 3;//按件计费
public static function getChargeWay($type)
{
$data = [
self::CHARGE_WAY_WEIGHT => '按重量计费',
self::CHARGE_WAY_VOLUME => '按体积计费',
self::CHARGE_WAY_PIECE => '按件计费',
];
if ($type === true) {
return $data;
}
return $data[$type] ?? '未知';
}
public function getChargeWayTextAttr($value, $data)
{
return self::getChargeWay($data['charge_way']);
}
public function configs()
{
return $this->hasMany('freight_config', 'freight_id', 'id');
}
}

View File

@@ -0,0 +1,28 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
namespace app\admin\model;
use think\Model;
class FreightConfig extends Model
{
protected $name = 'freight_config';
}

View File

@@ -0,0 +1,31 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
namespace app\admin\model;
use think\Model;
class GoodsCategory extends Model{
/**
* 获取商品分类子类
* @return \think\model\relation\HasMany
*/
public function sons()
{
return $this->hasMany(self::class, 'pid','id')->where(['del'=>'0']);
}
}

View File

@@ -0,0 +1,24 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
namespace app\admin\model;
use think\Model;
class Help extends Model {
}

View File

@@ -0,0 +1,43 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
namespace app\admin\model;
use think\Model;
class HelpCategory extends Model
{
protected $name = 'help_category';
public function getCreateTimeAttr($value, $data)
{
if($value){
return date('Y-m-d H:i:s', $value);
}
return $value;
}
public function getIsShowTextAttr($value, $data)
{
if ($data['is_show'] == 1){
return '启用';
}
return '停用';
}
}

View File

@@ -0,0 +1,107 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
namespace app\admin\model;
use app\common\server\UrlServer;
use think\Db;
use think\Model;
class User extends Model
{
//头像
public function getAvatarAttr($value,$data){
// if($value){
// return UrlServer::getFileUrl($value);
// }
return $value;
}
//加入时间
public function getCreateTimeAttr($value,$data)
{
return date('Y-m-d H:i:s',$value);
}
//性别转换
public function getSexAttr($value,$data){
switch ($value){
case 1:
return '男';
case 2:
return '女';
default:
return '未知';
}
}
public function getBirthdayAttr($value,$data){
if($value){
return date('Y-m-d',$value);
}
return $value;
}
public function getUserMoneyAttr($value,$data){
return '¥'.$value;
}
public function getTotalOrderAmountAttr($value,$data){
return '¥'.$value;
}
//最后登录时间
public function getLoginTimeAttr($value,$data){
return date('Y-m-d H:i:s',$value);
}
public function getLevelNameAttr($value,$data){
$leve_name = '-';
if($data['level']){
$leve_name = Db::name('user_level')->where(['id'=>$data['level']])->value('name');
}
return $leve_name;
}
public function getGroupNameAttr($value,$data){
$user_group = '-';
if($data['group_id']){
$user_group = Db::name('user_group')->where(['del'=>0,'id'=>$data['group_id']])->value('name');
}
return $user_group;
}
//获取粉丝
public function getFansAttr($value, $data)
{
$fans = Db::name('user')->where('find_in_set(' . $data['id'] . ', ancestor_relation)')->count();
return $fans;
}
//分销订单
public function getDistributionOrderAttr($value, $data)
{
$info = Db::name('distribution_order_goods d')
->join('order_goods g', 'g.id = d.order_goods_id')
->join('order o', 'o.id = g.order_id')
->field('count(d.id) as num, sum(money) as money, sum(order_amount) as amount')
->where(['d.user_id' => $data['id'], 'd.status' => 2])
->find();
return $info;
}
}

View File

@@ -0,0 +1,26 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
namespace app\admin\model;
use think\Model;
class WithdrawApply extends Model
{
protected $name = 'withdraw_apply';
}