1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- /**
- * Created by PhpStorm.
- * User: Bear
- * Date: 2018/12/22
- * Time: 下午6:27
- */
- namespace app\main\constants;
- use think\Config;
- class BookConstants
- {
- const BOOK_STATE_ON_SALE = '1';//上架
- const BOOK_STATE_OFF_SALE = '0';//下架
- const BOOK_STATE_IN_STORAGE = '-1';//入库
- const BOOK_IS_FINISH_YES = '1';//完本
- const BOOK_IS_FINISH_NO = '0';//连载
- const BOOK_CANSEE_YES = '1';//可见
- const BOOK_CANSEE_NO = '0';//不可见
- const BOOK_BILLING_MODEL_BOOK = 2; //按本收费
- const BOOK_BILLING_MODEL_CHAPTER = 1; //按章收费
- #region 书架
- const SHELF_INSERT_TYPE_RECOMMEND = 1;//用户注册,系统推荐书籍加入书架
- const SHELF_INSERT_TYPE_AUTO = 2;//阅读到第10章自动加入书架。
- const SHELF_INSERT_TYPE_MANUAL = 3;//用户手动加入书架。
- #endregion
- #region 推荐标签
- const BOOK_TAGS_PRE = 'BTP:';
- #endregion 推荐标签
- #分流链接的key
- const VIP_REFERRAL_KEY = 'RSI:';
- public static $chapter_price = [
- 0 => 0, 35 => 35, 40 => 40, 45 => 45, 50 => 50, 60 => 60, 70 => 70, 80 => 80, 90 => 90, 100 => 100,
- ];
- public static $chapter_charge_start = [
- 0, 15, 16, 17, 18, 19, 20,
- ];
- public static function getBookChapterDir()
- {
- $path = Config::get('site.chapter_path');
- if (empty($path)) {
- $path = 'cppartner';
- }
- return $path;
- }
- }
|