日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

CRMEB开发文档及目录结构

發(fā)布時(shí)間:2024/9/19 编程问答 34 豆豆
生活随笔 收集整理的這篇文章主要介紹了 CRMEB开发文档及目录结构 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

CRMEB 開發(fā)文檔及目錄結(jié)構(gòu) 官網(wǎng)

CRMEB v2.6開源地址:http://link.crmeb.net/u/lingting
完整幫助文檔:http://help.crmeb.net

QQ群:116279623

目錄結(jié)構(gòu)

初始的目錄結(jié)構(gòu)如下:

www WEB部署目錄(或者子目錄) ├─application 應(yīng)用目錄 │ ├─common 公共模塊目錄(可以更改) │ ├─admin 后臺(tái)目錄 │ │ ├─controller 控制器目錄 │ │ │ ├─agent 代理商 │ │ │ ├─article 文章內(nèi)容管理 │ │ │ ├─distributor 分銷 │ │ │ ├─finance 財(cái)務(wù)管理 │ │ │ ├─order 訂單管理 │ │ │ ├─record 數(shù)據(jù)統(tǒng)計(jì) │ │ │ ├─routine 小程序后臺(tái)管理 │ │ │ ├─server 程序升級(jí)服務(wù)端管理 │ │ │ ├─setting 系統(tǒng)設(shè)置 │ │ │ ├─store 商城目錄 │ │ │ ├─system 系統(tǒng)維護(hù) │ │ │ ├─ump 營銷管理 │ │ │ ├─user 用戶目錄 │ │ │ ├─wechat 微信管理目錄 │ │ │ ├─widget 公共調(diào)用 │ │ │ ├─merchant 商戶目錄 │ │ │ ├─AuthController.php 后臺(tái)基類 │ │ │ ├─Common.php 后臺(tái)公共方法類 │ │ │ ├─Login.php 登錄 │ │ │ ├─Index.php 后臺(tái)首頁 │ │ │ └─AuthController.php 后臺(tái)基類 │ │ ├─model 模型目錄 │ │ ├─view 視圖目錄 │ │ │ ├─index 首頁目錄 │ │ │ ├─login 登錄目錄 │ │ │ └─public 公共目錄 │ │ ├─common.php 后臺(tái)公共函數(shù) │ │ └─config.php 模塊配置文件 │ │ │ ├─wap 手機(jī)端目錄 │ │ ├─controller 控制器目錄 │ │ │ └─AuthController.php wap基類 │ │ ├─model 模型目錄 │ │ │ ├─merchant 后臺(tái)目錄 │ │ │ ├─store 商城目錄 │ │ │ └─user 用戶目錄 │ │ ├─view 視圖目錄 │ │ │ ├─index 首頁目錄 │ │ │ ├─login 登錄目錄 │ │ │ ├─public 公共目錄 │ │ │ ├─store 商城目錄 │ │ │ ├─merchant 商戶目錄 │ │ │ ├─article 文章目錄 │ │ │ ├─my 用戶目錄 │ │ │ └─service 客服目錄 │ │ ├─common.php wap公共函數(shù) │ │ └─config.php 模塊配置文件 │ │ │ ├─command.php 命令行工具配置文件 │ ├─common.php 公共函數(shù)文件 │ ├─config.php 公共配置文件 │ ├─route.php 路由配置文件 │ ├─tags.php 應(yīng)用行為擴(kuò)展定義文件 │ ├─version.php 版本文件 │ └─database.php 數(shù)據(jù)庫配置文件 │ ├─public 公共目錄 │ ├─static 全局靜態(tài)文件目錄 │ │ ├─plug 第三方插件前后臺(tái)公用 │ │ ├─css css前后臺(tái)公用 │ │ └─js js前后臺(tái)公用 │ ├─system 后臺(tái)靜態(tài)文件目錄 │ │ ├─plug 第三方插件后臺(tái) │ │ ├─js 后臺(tái) │ │ ├─css 后臺(tái) │ │ ├─images 后臺(tái) │ │ ├─frame 后臺(tái)框架 │ │ ├─module 后臺(tái)功能模塊 │ │ ├─plug 后臺(tái)第三方插件 │ │ └─util 后臺(tái)自定義常用工具 │ ├─wap 前臺(tái)靜態(tài)文件目錄 │ │ ├──first 模版1 │ ├─install 程序安裝文件目錄 │ ├─uploads 上傳文件目錄 │ ├─router.php 路由文件 │ ├─index.php 程序入口文件 │ ├─mysql.php 數(shù)據(jù)字典工具 │ ├─.htaccess apache 環(huán)境偽靜態(tài)文件 │ ├─nginx.conf nginx 環(huán)境偽靜態(tài)文件 │ └─web.config iis 環(huán)境偽靜態(tài)文件 │ ├─thinkphp 框架系統(tǒng)目錄 │ ├─lang 語言文件目錄 │ ├─library 框架類庫目錄 │ │ ├─think Think類庫包目錄 │ │ └─traits 系統(tǒng)Trait目錄 │ │ │ ├─tpl 系統(tǒng)模板目錄 │ ├─base.php 基礎(chǔ)定義文件 │ ├─console.php 控制臺(tái)入口文件 │ ├─convention.php 框架慣例配置文件 │ ├─helper.php 助手函數(shù)文件 │ ├─phpunit.xml phpunit配置文件 │ └─start.php 框架入口文件 │ ├─extend 擴(kuò)展類庫目錄 │ ├─api 公共api目錄 │ ├─basic 基礎(chǔ)繼承類目錄 │ ├─behavior 全局行為目錄 │ │ ├─system 后臺(tái)行為 │ │ ├─wechat 微信行為 │ │ ├─merchant 商戶行為 │ │ └─wap wap端行為 │ ├─service 全局服務(wù)目錄 │ └─traits 公共特性目錄 │ ├─vendor composer擴(kuò)展類庫目錄 │ ├─xaboy 后臺(tái)快速創(chuàng)建表單類 │ ├─tp5er 數(shù)據(jù)庫備份類 │ ├─phpoffice 表格操作類 │ ├─overtrue 微信接口類 │ └─traits 公共特性目錄 │ ├─runtime 應(yīng)用的運(yùn)行時(shí)目錄(可寫,可定制) ├─vendor 第三方類庫目錄(Composer依賴庫) ├─index.php 入口文件 ├─composer.json composer 定義文件 ├─LICENSE.txt 授權(quán)說明文件 ├─README.md README 文件 ├─think 命令行入口文件 │ ├─index.php 入口文件 │ ├─router.php 快速測(cè)試文件 │ └─.htaccess 用于apache的重寫

賬號(hào)密碼

  • 前臺(tái)
    • 賬號(hào): crmeb
    • 密碼: 123456
  • 后臺(tái)
    • 賬號(hào): admin
    • 密碼: crmeb.com

微信配置

  • 授權(quán)接口 :
    • /wap/wechat/serve
  • 支付api接口 :
    • /wap/my/
    • /wap/my/order/uni/
    • /wap/store/confirm_order/cartId/
  • 模板消息
    • IT科技 | 互聯(lián)網(wǎng)|電子商務(wù)
    • IT科技 | IT軟件與服務(wù)

模板變量

  • {__ADMIN_PATH} => /public/system/
  • {__FRAME_PATH} => /public/system/frame/
  • {__PLUG_PATH} => /public/static/plug/
  • {__MODULE_PATH} => /public/system/module/
  • {__STATIC_PATH} => /public/static/
  • {__PUBLIC_PATH} => /public/
  • {__WAP_PATH} => /public/wap/

公共方法

  • \service\CacheService 系統(tǒng)緩存類
// 設(shè)置系統(tǒng)緩存set($key, $value) // 獲取系統(tǒng)緩存get($key, $default) // 刪除指定系統(tǒng)緩存rm($key) // 清空所有系統(tǒng)緩存clear()
  • \service\ExportService 導(dǎo)出csv表格類
// 導(dǎo)出CsvexportCsv($list 數(shù)據(jù), $fliename 文件名, $header 表格頭部, $br 換行分隔符)
  • \service\GroupDataService 組合數(shù)據(jù)類
// 獲得組合數(shù)據(jù)信息+組合數(shù)據(jù)列表getGroupData($configName,$limit) // 獲得組合數(shù)據(jù)列表getData($configName,$limit)
  • \service\HookService 行為擴(kuò)展類
// 資源監(jiān)聽 自動(dòng)注冊(cè)前置行為操作 + 行為操作resultListen($tag, $params, $extra = null, $once = false,$behavior = null 自動(dòng)注冊(cè)類) // 監(jiān)聽后置行為操作afterListen($tag, $params, $extra = null, $once = false, $behavior = null 自動(dòng)注冊(cè)類) // 監(jiān)聽前置行為操作beforeListen($tag,$params,$extra = null, $once = false, $behavior = null) // 監(jiān)聽行為操作listen($tag, $params, $extra = null, $once = false, $behavior = null) // 添加前置行為addBefore($tag, $behavior, $first = false) // 添加后置行為addAfter($tag, $behavior, $first = false) // 添加行為add($tag, $behavior, $first = false)
  • \service\HttpService Request請(qǐng)求類
// 發(fā)送get請(qǐng)求getRequest($url, $data = array(), $header = false, $timeout = 10)// 發(fā)送post請(qǐng)求postRequest($url, $data = array(), $header = false, $timeout = 10)// 發(fā)送請(qǐng)求request($url, $method = 'get', $data = array(), $header = false, $timeout = 15)// 獲取請(qǐng)求head頭getHeaderStr():String// 獲取請(qǐng)求head頭getHeader():Array
  • \service\JsonService Json輸出類
// 成功successful($msg = 'ok',$data=[])// 成功+狀態(tài)status($status,$msg,$result = [])// 失敗fail($msg,$data=[])
  • \service\QrcodeService 二維碼生成類
// 獲取一個(gè)臨時(shí)二維碼,不存在自動(dòng)生成getTemporaryQrcode($type,$id)// 獲取一個(gè)永久二維碼,不存在自動(dòng)生成getForeverQrcode($type,$id)// 查詢已有的二維碼getQrcode($id,$type = 'id')
  • \service\SystemConfigService 系統(tǒng)配置類
// 獲取一個(gè)系統(tǒng)配置,帶緩存config($key)// 獲取一個(gè)系統(tǒng)配置,不帶緩存get($key)// 獲取多個(gè)系統(tǒng)配置,不帶緩存more($keys = [])// 獲取所有系統(tǒng)配置,不帶緩存getAll()
  • \service\UploadService 文件上傳類
// 單圖上傳image($fileName, $path, $moveName = true, $autoValidate=true, $root=null, $rule='uniqid')// 文件上傳file($fileName, $path, $moveName = true, $autoValidate=[], $root=null, $rule='uniqid')// 圖片壓縮thumb($filePath, $ratio=8, $pre='s_')
  • \service\WechatService 微信服務(wù)類
    參考:https://www.easywechat.com/docs/3.x
// 獲取微信配置參數(shù)options()// 多客服消息轉(zhuǎn)發(fā)transfer($account = '')// 上傳永久素材接口materialService()// 上傳臨時(shí)素材接口materialTemporaryService()// 用戶接口userService()// 客服消息接口staffService()// 微信公眾號(hào)菜單接口menuService()// 微信二維碼生成接口qrcodeService()// 短鏈接生成接口urlService()// 用戶授權(quán)oauthService()// 模板消息接口noticeService()// 發(fā)送模板消息sendTemplate($openid,$templateId,array $data,$url = null,$defaultColor = null)// 支付接口paymentService()// 下載商戶流水downloadBill($day,$type = 'ALL')// 用戶標(biāo)簽服務(wù)userTagService()// 用戶分組服務(wù)userGroupService()// 獲得jsSdk支付參數(shù) jsPay($openid, $out_trade_no, $total_fee, $attach, $body, $detail='', $trade_type='JSAPI', $options = [])// 訂單退款payOrderRefund($orderNo, array $opt)// 支付成功回調(diào)handleNotify()// jssdk Config參數(shù)jsSdk($url = '')// 回復(fù)文本消息textMessage($content)// 回復(fù)圖片消息imageMessage($media_id)// 回復(fù)視頻消息videoMessage($media_id, $title = '', $description = '...', $thumb_media_id = null)// 回復(fù)聲音消息voiceMessage($media_id)// 回復(fù)圖文消息newsMessage($title, $description = '...', $url = '', $image = '')// 回復(fù)文章消息articleMessage($title, $thumb_media_id, $source_url, $content = '', $author = '', $digest = '', $show_cover_pic = 0, $need_open_comment = 0, $only_fans_can_comment = 1)// 回復(fù)素材消息materialMessage($type, $media_id)// 作為客服消息發(fā)送staffTo($to, $message)// 獲得用戶信息getUserInfo($openid)
  • \service\WechatTemplateService 微信模板消息類
// 發(fā)送模板消息sendTemplate($openid,$templateId,array $data,$url = null,$defaultColor = '')// 給管理員發(fā)送模板消息sendAdminNoticeTemplate(array $data,$url = null,$defaultColor = '')

基礎(chǔ)繼承類

  • \basic\ModelBasic Model基礎(chǔ)類
/*** 獲得Db并緩存* @param $name* @param bool $update* @return mixed|\think\db\Query*/protected static function getDb($name, $update = false)/*** 設(shè)置錯(cuò)誤信息* @param string $errorMsg* @return bool*/protected static function setErrorInfo($errorMsg = self::DEFAULT_ERROR_MSG,$rollback = false)/*** 獲取錯(cuò)誤信息* @param string $defaultMsg* @return string*/public static function getErrorInfo($defaultMsg = self::DEFAULT_ERROR_MSG)/*** 開啟事務(wù)*/public static function beginTrans()/*** 提交事務(wù)*/public static function commitTrans()/*** 關(guān)閉事務(wù)*/public static function rollbackTrans()/*** 根據(jù)結(jié)果提交或者滾回事務(wù)* @param $res*/public static function checkTrans($res)
  • \basic\SystemBasic 后臺(tái)基礎(chǔ)類
/*** 操作失敗提示框* @param string $msg 提示信息* @param string $backUrl 跳轉(zhuǎn)地址* @param string $title 標(biāo)題* @param int $duration 持續(xù)時(shí)間* @return mixed*/protected function failedNotice($msg = '操作失敗', $backUrl = 0, $info = '', $duration = 3)/*** 失敗提示一直持續(xù)* @param $msg* @param int $backUrl* @param string $title* @return mixed*/protected function failedNoticeLast($msg = '操作失敗', $backUrl = 0, $info = '')/*** 操作成功提示框* @param string $msg 提示信息* @param string $backUrl 跳轉(zhuǎn)地址* @param string $title 標(biāo)題* @param int $duration 持續(xù)時(shí)間* @return mixed*/protected function successfulNotice($msg = '操作成功',$backUrl = 0,$info = '',$duration = 3)/*** 成功提示一直持續(xù)* @param $msg* @param int $backUrl* @param string $title* @return mixed*/protected function successfulNoticeLast($msg = '操作成功',$backUrl = 0,$info = '')/*** 錯(cuò)誤提醒頁面* @param string $msg* @param int $url*/protected function failed($msg = '哎呀…親…您訪問的頁面出現(xiàn)錯(cuò)誤', $url = 0)/*** 成功提醒頁面* @param string $msg* @param int $url*/protected function successful($msg, $url = 0)
  • \basic\WapBasic Wap端基礎(chǔ)類
/*** 操作失敗 彈窗提示 ajax請(qǐng)求時(shí)返回json數(shù)據(jù)* @param string $msg* @param int $url* @param string $title*/protected function failed($msg = '操作失敗', $url = 0, $title='錯(cuò)誤提示')/*** 操作成功 彈窗提示 ajax請(qǐng)求時(shí)返回json數(shù)據(jù)* @param $msg* @param int $url*/protected function successful($msg = '操作成功', $url = 0, $title='成功提醒')/*** 微信用戶自動(dòng)登陸 并返回openid* @return string $openid*/protected function oauth()

公共特性類

  • \traits\ModelTrait Model公共特性
/*** 添加一條數(shù)據(jù)* @param $data* @return object $model 數(shù)據(jù)對(duì)象*/public static function set($data)/*** 添加多條數(shù)據(jù)* @param $group* @param bool $replace* @return mixed*/public static function setAll($group, $replace = false)/*** 修改一條數(shù)據(jù)* @param $data* @param $id* @param $field* @return bool $type 返回成功失敗*/public static function edit($data,$id,$field = null)/*** 查詢一條數(shù)據(jù)是否存在* @param $map* @param string $field* @return bool 是否存在*/public static function be($map, $field = '')/*** 刪除一條數(shù)據(jù)* @param $id* @return bool $type 返回成功失敗*/public static function del($id)/*** 分頁* @param null $model 模型* @param null $eachFn 處理結(jié)果函數(shù)* @param array $params 分頁參數(shù)* @param int $limit 分頁數(shù)* @return array*/public static function page($model = null, $eachFn = null, $params = [], $limit = 20)/*** 高精度 加法* @param int|string $uid id* @param string $decField 相加的字段* @param float|int $dec 加的值* @param string $keyField id的字段* @param int $acc 精度* @return bool*/public static function bcInc($key, $incField, $inc, $keyField = null, $acc=2)/*** 高精度 減法* @param int|string $uid id* @param string $decField 相減的字段* @param float|int $dec 減的值* @param string $keyField id的字段* @param bool $minus 是否可以為負(fù)數(shù)* @param int $acc 精度* @return bool*/public static function bcDec($key, $decField, $dec, $keyField = null, $minus = false, $acc=2)

Api接口

  • \Api\Express 快遞查詢
/*** 快遞查詢* @param string $number 單號(hào)* @param string $type 快遞公司編號(hào)* @return bool*/public static function query($number, $type = 'auto')/*** 獲得所有快遞公司信息* @return bool*/public static function type()

后臺(tái)全局Api $eb

// 查看圖片$eb.openImage(src)/*** 提示框 * @param type 'delete' 刪除提示 | 'error' 錯(cuò)誤提示 | 'success' 成功提示 |* @param param* @param code*/$eb.$swal(type,param,code)/*** 彈出框* @param type 'textarea' 多行輸入框輸入框* @param params* @param succFn*/$eb.$alert(type,params,succFn)/*** message* @param type 'success' | 'warning' | 'error' | 'loading' | 'default'* @param config* @returns {*}*/$eb.message(type,config)/*** notice* @param type 'success' | 'warning' | 'error' | 'default'* @param config* @returns {*}*/$eb.notice(type,config)// 關(guān)閉notice$eb.noticeClose(name)// 銷毀notice$eb.noticeDestroy(name)/*** modal* @param type 'success' | 'warning' | 'error' | 'confirm' | 'default'* @param config* @returns {*}*/$eb.modal(type,config)// 移除modal$eb.modalRemove/*** 加載條* @param type 'start' 開啟 | 'finish' 結(jié)束 | 'error' 錯(cuò)誤 | 'update' 更新到指定percent* @param percent* @returns {*}*/$eb.loading(type,percent)/*** 使用彈窗打開iframe頁面* @param title* @param src* @param opt* @returns index*/$eb.createModalFrame(title,src,opt)/*** 關(guān)閉iframe頁面* @param name | index*/$eb.closeModalFrame(name)/*** 全局layer*/$eb.layer/*** 全局axios*/$eb.axios

前端工具類

public/static/plug/helper.js 助手類

// 信息提示 提前引入 layer插件$h.pushMsg = function(msg,fn)// 同時(shí)只提示一次信息 提前引入 layer插件$h.pushMsgOnce = function(msg,fn)// 加載中 提前引入 layer插件$h.load = function()// 加載中 透明背景 提前引入 layer插件$h.loadFFF = function()// 關(guān)閉加載中$h.loadClear = function()// ajax文件上傳 提前引入 ajaxFileUpload插件$h.ajaxUploadFile = function (name,url,fnGroup)// 高精度除法$h.div = function(arg1,arg2)// 高精度乘法$h.Mul = function(arg1,arg2)// 高精度加法$h.Add = function(arg1,arg2)// 高精度減法$h.Sub = function(arg1,arg2)// cookie操作$h.cookie = function(key,val,time)// get參數(shù)獲取$h.getParmas = function getUrlParam(name)// tp5路由生成$h.U = function(opt = {c:'控制器',a:'方法',p:'路由參數(shù)',q:'get參數(shù)'});// 是否登陸中$h.isLogin = function()// 獲得未壓縮圖片url$h.unThumb = function (src)

public/static/plug/wxApi.js 微信api接口

public/static/plug/reg-verify.js 類型驗(yàn)證

// 是否網(wǎng)址isHref:function(test)// 是否為郵箱isEmail:function(test)// 是否為手機(jī)號(hào)isPhone:function(test)// 是否為郵編isPostCode:function(test)// 是否為空isEmpty:function(test)// 是否為ArrayisArray:function(test)// 是否為ObjectisObject:function(test)// 是否為UndefinedisUndefined:function(test)// 是否為NullisNull:function(test)// 去除左右空格trim:function(test)

public/wap/first/crmeb/module/store.js api請(qǐng)求

/*** 發(fā)送GET請(qǐng)求* @param url 地址* @param successCallback 成功回調(diào) JsonService::successfly* @param errorCallback 失敗回調(diào) JsonService::failed*/baseGet:function(url,successCallback,errorCallback)/*** 發(fā)送POST請(qǐng)求 使用* @param url 地址* @param data post參數(shù)* @param successCallback 成功回調(diào) JsonService::successfly* @param errorCallback 失敗回調(diào) JsonService::failed*/basePost:function(url,data,successCallback,errorCallback)

總結(jié)

以上是生活随笔為你收集整理的CRMEB开发文档及目录结构的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。