# tdt_selling-admin **Repository Path**: ff_ghost/tdt_selling-admin ## Basic Information - **Project Name**: tdt_selling-admin - **Description**: 111111111111111111111 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-12-15 - **Last Updated**: 2025-02-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #### 介绍 #### 软件架构 1. 使用MYSQL数据库 2. 使用redis缓存 3. PHP5.6 #### 安装教程 1. 修改数据库配置文件,将sites/app/config/mysql.php.bak 重命名 sites/app/config/mysql.php ``` array( 'host' => "127.0.0.1", 'remotehost' => "114.116.53.61", 'port' => "3306", 'user' => "nongchanpin", 'pass' => "M75j4KjXw328tNs3", 'dbname' => "nongchanpin", 'tablepre' => 'pre_', ), 'test:default' => array( 'host' => "127.0.0.1", 'port' => "3306", 'user' => "nongchanpin", 'pass' => "M75j4KjXw328tNs3", 'dbname' => "nongchanpin", 'tablepre' => 'pre_', ), 'drupal' => array( 'database' => 'nongchanpin', 'username' => 'nongchanpin', 'password' => 'M75j4KjXw328tNs3', 'host' => '127.0.0.1', 'port' => '3306', 'driver' => 'mysql', 'prefix' => 'dpl_', ), 'test:drupal' => array( 'database' => 'nongchanpin', 'username' => 'nongchanpin', 'password' => 'M75j4KjXw328tNs3', 'host' => '127.0.0.1', 'port' => '3306', 'driver' => 'mysql', 'prefix' => 'dpl_', ), ); ``` 2. 修改REDIS配置文件,将sites/app/config/redis.php.bak 重命名 sites/app/config/redis.php ``` array( 'host' => '127.0.0.1', 'port' => 6379, 'timeout' => 0.0, 'password' => '', ), ); ``` 3. 修改路径配置文件,将.user.ini.bak 重命名 .user.ini,将ncp.jixuantiant.com修改为项目存储路径 ``` open_basedir=/www/wwwroot/ncp.jixuantiant.com/:/tmp/ ``` 4. 修改图片路径 bootstrap/functions.inc 中 ncp.jixuantiant.com 修改成配置的域名 ``` define('PLUM_IMG_HOST_PATH','ncp.jixuantiant.com'); //图片加速域名 ```` 5. 微信配置 ``` ``` 6. 分享配置 sites/app/helper/SharePoster.php ,中 yxscpt.jixuantiant.com 修改成配置的域名,文件存放目录 upload/depot/gaus0xcyuh,小程序码 二维码路面 public/build/ > 示例 > https://yearcard.jixuantiant.com/wxapp/shareposter/seckillShare?id=505030&mid=97&sid=14110&childAppid=&appType=1&suid=gaus0xcyuh&acType=21&%27 ``` const DOMAIN = "https://yxscpt.jixuantiant.com"; ``` ``` /www/wwwroot/yearcard/sites/app/plugin/phantomjs/bin/phantomjs /www/wwwroot/yearcard/public/wxapp/phantomjs/phantomjs.js 'https://shangmao.sunmall.net.cn/wxapp/shareposter/seckillShare?id=505023&mid=97&sid=14110&childAppid=&appType=1&suid=gaus0xcyuh&acType=21&' /www/wwwroot/yearcard/upload/depot/gaus0xcyuh/20220630/5CE2A0D9-952B-7470-EE92B12B1A51.png ``` #### 使用说明 1. 开启错误提示[error/500.html]内容替换成 500.tpl 2. 微信配置,进入后台,首页右边【店铺设置】里面进行配置 3. 小程序是否开启白名单,如果开启需要添加服务器IP #### 二开目录说明 ``` sites app config wxmenu xcx-21.php -- 后台菜单配置 rewrite.php --路由配置,必须 controller applet --前端目录,二开前端将在里面创建信息CTRL xxxxController.php wxapp --后台目录,二开后台将在里面创建信息CTRL xxxxController.php ShareposterController.php 微信分享类 view template wxapp ----后台页面,创建与CTRL对应的目录 storage log --输出日志 error-production.log init.log -- 获取用户的openid 日志 output.log -- 默认日志 warn-production.log wxpay.log model --存放model ctrl 名称 xxxx.php class 命名规则 {app}_{model}_{ctrl}_{文件名} 示例:App_Model_Yearcard_MysqlYearcardConstStorage ``` #### 已有功能介绍 1. 导入功能 2. 导出功能 3. 模板打印 4. 配置介绍 1. 小程序首页 2. 个人中心 #### 其他 1. 开启500错误显示 ``` ini_set("display_errors","On"); error_reporting(E_ALL); ``` 2. php7.4中{} 问题 PHP7.4不再能够使用花括号来访问数组或者字符串的偏移.需要将{}修改成[] 就可以解决问题 3. 分享失败原因 3.1 服务器访问地址失败 3.2 目前权限 3.3 微信token过期 表:pre_applet_cfg 过期时间:ac_expires_in 3.4 没有修改访问地址配置 3.5 文件执行权限 /www/wwwroot/yearcard/sites/app/plugin/phantomjs/bin/phantomjs 设置权限 755 用户组 www 3.5 安装字体:在centos中执行:yum install bitmap-fonts bitmap-fonts-cjk / 在ubuntu中执行:sudo apt-get install xfonts-wqy 4. 伪静态 ``` if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?q=$1 last; } ``` 5. 默认账号 ``` ``` 6. 目录权限 sites/app/storage 777,upload 777, 7. suid 修改 8. 登录账号 pre_manager #### 任务 workerman #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request ### 发布后一键调整脚本 ``` ```