Initial commit
51
.gitignore
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
######################################################################
|
||||
# Build Tools
|
||||
|
||||
.gradle
|
||||
/build/
|
||||
!gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
|
||||
######################################################################
|
||||
# IDE
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### JRebel ###
|
||||
rebel.xml
|
||||
|
||||
### NetBeans ###
|
||||
nbproject/private/
|
||||
build/*
|
||||
nbbuild/
|
||||
dist/
|
||||
nbdist/
|
||||
.nb-gradle/
|
||||
|
||||
######################################################################
|
||||
# Others
|
||||
*.log
|
||||
*.xml.versionsBackup
|
||||
*.swp
|
||||
|
||||
!*/build/*.java
|
||||
!*/build/*.html
|
||||
!*/build/*.xml
|
||||
|
||||
**/.vscode/
|
||||
**/__pycache__/
|
||||
**/uv.lock
|
||||
12
bin/clean.bat
Normal file
@@ -0,0 +1,12 @@
|
||||
@echo off
|
||||
echo.
|
||||
echo [信息] 清理工程target生成路径。
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ..
|
||||
call mvn clean
|
||||
|
||||
pause
|
||||
12
bin/package.bat
Normal file
@@ -0,0 +1,12 @@
|
||||
@echo off
|
||||
echo.
|
||||
echo [信息] 打包Web工程,生成war/jar包文件。
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ..
|
||||
call mvn clean package -Dmaven.test.skip=true
|
||||
|
||||
pause
|
||||
14
bin/run.bat
Normal file
@@ -0,0 +1,14 @@
|
||||
@echo off
|
||||
echo.
|
||||
echo [信息] 使用Jar命令运行Web工程。
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../ruoyi-admin/target
|
||||
|
||||
set JAVA_OPTS=-Xms256m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -jar %JAVA_OPTS% ruoyi-admin.jar --server.port=8081
|
||||
|
||||
cd bin
|
||||
pause
|
||||
177
doc/业务数据表整理.md
Normal file
@@ -0,0 +1,177 @@
|
||||
区分动态数据表和静态数据表,动态数据表是网站运行过程中用户产生的数据记录,重置网站时,可以清理掉。
|
||||
静态数据表是网站功能需要的基础数据,不能清理掉,清理掉会让网站不能运行。
|
||||
|
||||
# 系统表
|
||||
gen_table
|
||||
gen_table_column
|
||||
qrtz_blob_triggers
|
||||
qrtz_calendars
|
||||
qrtz_cron_triggers
|
||||
qrtz_fired_triggers
|
||||
qrtz_job_details
|
||||
qrtz_locks
|
||||
qrtz_paused_trigger_grps
|
||||
qrtz_scheduler_state
|
||||
qrtz_simple_triggers
|
||||
qrtz_simprop_triggers
|
||||
qrtz_triggers
|
||||
sys_config
|
||||
sys_dept
|
||||
sys_dict_data
|
||||
sys_dict_type
|
||||
sys_job
|
||||
sys_job_log
|
||||
sys_logininfor
|
||||
sys_menu
|
||||
sys_notice
|
||||
sys_oper_log
|
||||
sys_post
|
||||
sys_role
|
||||
sys_role_dept
|
||||
sys_role_menu
|
||||
sys_user
|
||||
sys_user_post
|
||||
sys_user_role
|
||||
|
||||
|
||||
# 开箱游戏
|
||||
tt_box 开箱游戏共用的箱子数据, boxType字段用来区分是哪种开箱游戏的
|
||||
tt_box_ornaments 箱子中的饰品数据,主要是开出概率。
|
||||
tt_box_records 动态数据表,开箱记录。箱子id-饰品id-开出人-拥有人
|
||||
tt_box_third_explosive_user 开箱三级爆率用户,拥有特殊的开箱奖池
|
||||
tt_box_type 开箱
|
||||
tt_ornament 饰品元信息,所有开箱游戏共享相同的饰品信息,如名字,价格等
|
||||
tt_ornaments_level
|
||||
tt_comp_record 箱子的补偿奖池记录?
|
||||
|
||||
# 百变竞技
|
||||
tt_robot_fight_group
|
||||
tt_robot_fight_group_box
|
||||
tt_fight 动态数据表
|
||||
tt_fight_ranking_reward 对战排行榜奖励
|
||||
tt_fight_result 动态数据表
|
||||
tt_fight_round 动态数据表
|
||||
tt_fight_user 动态数据表
|
||||
|
||||
# 指数盲盒
|
||||
tt_exponent
|
||||
tt_exponent_user
|
||||
tt_exponent_user_box
|
||||
|
||||
# roll房
|
||||
tt_roll
|
||||
tt_roll_jackpot
|
||||
tt_roll_jackpot_ornaments
|
||||
tt_roll_user
|
||||
tt_roll_user_prize
|
||||
tt_time_roll
|
||||
tt_time_roll_user
|
||||
|
||||
# 极速永痕
|
||||
game_sugar_record 动态数据表
|
||||
game_sugar_spin
|
||||
game_sugar_spin_free
|
||||
game_sugar_spin_super
|
||||
game_sugar_step_info
|
||||
game_sugar_step_info_free
|
||||
game_sugar_step_info_super
|
||||
game_sugar_user 动态数据表
|
||||
game_sugar_win 动态数据表
|
||||
|
||||
# 疯狂转盘
|
||||
game_wheel_round 动态数据表
|
||||
game_wheel_round_bet 动态数据表
|
||||
game_wheel_user 动态数据表
|
||||
|
||||
# 充值支付系统 包含CDK
|
||||
tt_order 动态数据表。用户购买的充值订单
|
||||
tt_recharge_card 充值卡密
|
||||
tt_recharge_config
|
||||
tt_recharge_prod
|
||||
tt_recharge_ranking_reward 对战排行榜奖励
|
||||
tt_recharge_record
|
||||
tianxin_order 无用
|
||||
|
||||
# 提货与转增
|
||||
tt_box_transfer_record 动态数据表。 转增记录
|
||||
|
||||
# 发货记录
|
||||
tt_delivery_record 动态数据表
|
||||
|
||||
# 公告 ApiAnnouncementController
|
||||
tt_announcement
|
||||
tt_announcement_read
|
||||
|
||||
# 签到记录
|
||||
tt_attendance_record
|
||||
|
||||
# 首页大屏广告banner
|
||||
tt_advertisement
|
||||
|
||||
# 网站设置 -- 更偏向于网页功能
|
||||
tt_banner 和tt_advertisement功能一模一样
|
||||
tt_content 文章
|
||||
tt_content_type 文章
|
||||
|
||||
# 推广
|
||||
tt_commission_record 动态数据表,推广佣金记录 无用
|
||||
tt_promotion_level 动态数据表
|
||||
tt_promotion_record 动态数据表
|
||||
tt_promotion_update 动态数据表
|
||||
|
||||
# 后台操作向用户消息
|
||||
tt_message
|
||||
tt_message_send
|
||||
|
||||
# 系统异步向用户推送结果通知
|
||||
tt_notice 前端的消息通知是这个
|
||||
|
||||
## 福利红包
|
||||
与CDK相比福利红包不记录到充值流水。
|
||||
|
||||
tt_red_pack 动态数据表,红包模板
|
||||
tt_red_packet 动态数据表,红包数据
|
||||
tt_red_packet_record 动态数据表,红包领取记录
|
||||
|
||||
# 任务中心
|
||||
tt_task_center
|
||||
tt_task_center_user
|
||||
|
||||
# 黄金装备
|
||||
tt_upgrade_fail_ornaments
|
||||
tt_upgrade_ornaments
|
||||
tt_upgrade_record
|
||||
|
||||
# 用户系统
|
||||
tt_user 动态数据表。删除数据需谨慎
|
||||
tt_user_avatar 用户头像表
|
||||
tt_user_blend_ercash 动态数据表。流水日志
|
||||
|
||||
tt_user_amount_records 淘汰。被tt_user_blend_ercash替换了
|
||||
tt_user_credits_records 淘汰。被tt_user_blend_ercash替换了
|
||||
|
||||
# vip系统
|
||||
tt_vip_level 用户VIP等级配置
|
||||
|
||||
# 福利系统
|
||||
tt_welfare
|
||||
tt_welfare_monthly_recharges
|
||||
tt_welfare_record
|
||||
tt_welfare_vip_level
|
||||
|
||||
# 奖金
|
||||
tt_bonus 福利元信息
|
||||
tt_bonus_receive_record 福利领取记录
|
||||
|
||||
# 首充赠送
|
||||
tt_first_recharge
|
||||
|
||||
# 无用
|
||||
tt_replacement_record 汰换记录
|
||||
tt_ornament_yy yy市场的饰品信息
|
||||
tt_ornament_zbt zbt市场的饰品信息
|
||||
tt_box_open_chance 开箱机会,可以干掉
|
||||
tt_user_box_open_chance
|
||||
tt_user_label
|
||||
tt_game_mould 未知
|
||||
tt_game_mould_box 未知
|
||||
0
doc/修复图片地址错误.md
Normal file
12
doc/开发标准/多环境配置文件.md
Normal file
@@ -0,0 +1,12 @@
|
||||
application.yml 是项目的通用配置文件
|
||||
application-{profile}.yml 是项目不同环境的配置文件,如果与application.yml配置内容重复,则以application-{profile}.yml配置为准
|
||||
|
||||
当前有三个环境的配置文件:
|
||||
- application-dev.yml 开发环境配置。本地测试用
|
||||
- application-test.yml 测试环境配置。服务器上测试环境用
|
||||
- application-pro.yml 生产环境配置
|
||||
|
||||
|
||||
application.yml中默认启用的是application-dev.yml。可以通过环境变量进行修改。
|
||||
|
||||
在IDEA中,编辑启动配置,添加环境变量`SPRING_PROFILES_ACTIVE=test`, 即可启用application-test.yml配置。以此类推
|
||||
3
doc/开发标准/安全.md
Normal file
@@ -0,0 +1,3 @@
|
||||
任何被用户使用的接口,都是用POST方法,并使用加密传输。
|
||||
|
||||
这里的用户包括游戏用户,也包括主播用户。
|
||||
70
doc/开发标准/时间.md
Normal file
@@ -0,0 +1,70 @@
|
||||
JDK与时间相关的包和API:
|
||||
|
||||
# 包
|
||||
|
||||
包 | 引入 | 描述
|
||||
-------|------|-------------
|
||||
java.time | 1.8+ | 推荐使用
|
||||
java.util | 旧版 | 不推荐
|
||||
java.text | 旧版 | 日期字符串格式化相关,不推荐使用
|
||||
java.sql | 1.1 | 数据库相关,业务不推荐使用
|
||||
java.time.chrono| 1.8 | 可选,能不用就不用。支持非 ISO 历法系统
|
||||
|
||||
# java.time包中的类
|
||||
| 类/接口 | 用途 |
|
||||
| ------------------- | --------------------- |
|
||||
| `LocalDate` | 日期(年-月-日) |
|
||||
| `LocalTime` | 时间(时:分:秒.纳秒) |
|
||||
| `LocalDateTime` | 日期+时间 |
|
||||
| `ZonedDateTime` | 带时区的日期时间 |
|
||||
| `Instant` | 时间戳(从1970-01-01的秒/毫秒) |
|
||||
| `Duration` | 时间间隔(基于秒和纳秒) |
|
||||
| `Period` | 日期间隔(基于年月日) |
|
||||
| `DateTimeFormatter` | 日期时间格式化 |
|
||||
LocalDate,LocalTime,LocalDateTime都是指表示一个时间数字,没有时区概念。比如LocalTime表示8:20,并不能表示出具体的时间,需要结合时区才能知道是哪里的8:20。
|
||||
|
||||
|
||||
java.time.format
|
||||
DateTimeFormatter 及其相关类
|
||||
用于格式化与解析日期时间
|
||||
java.time.temporal
|
||||
时间访问和调整的底层接口
|
||||
包含 Temporal, TemporalField, TemporalUnit 等
|
||||
|
||||
java.time.zone
|
||||
时区相关类
|
||||
ZoneId, ZoneOffset, ZoneRules 等
|
||||
|
||||
# java.util包中的类
|
||||
| 类 | 说明 |
|
||||
| ---------- |-------------------|
|
||||
| `Date` | 传统日期类(已不推荐),不带时区 |
|
||||
| `Calendar` | 日历计算(已不推荐),默认系统时区 |
|
||||
| `TimeZone` | 时区信息 |
|
||||
|
||||
# java.text包中的类
|
||||
SimpleDateFormat - 旧版日期格式化(线程不安全)
|
||||
|
||||
# java.sql
|
||||
这些也都没有时区概念,只表示时间值
|
||||
| 类 | 用途 |
|
||||
| ----------- | ------- |
|
||||
| `Date` | SQL 日期 |
|
||||
| `Time` | SQL 时间 |
|
||||
| `Timestamp` | SQL 时间戳 |
|
||||
|
||||
# 最佳实践
|
||||
|
||||
关于时区:
|
||||
1. 系统内部应该只用java.time下的LocalDate,LocalTime,LocalDateTime这些不带时区的概念。
|
||||
2. 只有与外部交互时,才应该转成带时区的概念。 比如把前端请求的日期转成LocalDateTime,返回给前端的时间应该转成前端对应时区的时间。或者请求外部依赖时,需要传递时间,应该确定好时区的概念。
|
||||
3. 定时任务的时间设置应该带上时区,否则将会按照系统所在时区执行,切换服务器时,时区会变,定时任务的执行时间也会变。
|
||||
作为中国开发者,应该都用东八区时间。`@Scheduled(cron = "2 15 0 * * ?", zone = "Asia/Shanghai")`
|
||||
4. 服务器的时区都设置成东八区时间
|
||||
|
||||
查看时区:`timedatectl`
|
||||
列出可支持的时区:`timedatectl list-timezones | grep Shanghai`
|
||||
设置时区:`sudo timedatectl set-timezone Asia/Shanghai`
|
||||
|
||||
关于存储时间的格式:
|
||||
1. 系统中只允许使用LocalDateTime,或者Long时间戳存储时间。优先用LocalDateTime,既拥有时间戳的所有信息,也有丰富的API操作时间。
|
||||
19
doc/开发标准/标准.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# controller 请求参数
|
||||
使用一个自定义的Request类来接收参数。
|
||||
|
||||
# controller 返回的类型
|
||||
现状:目前返回的类型有R,AjaxResult,PageDataInfo等
|
||||
标准:统一返回R<具体类型>类型。
|
||||
|
||||
# mapper
|
||||
mapper继承Mybatis-Plus的BaseMapper。
|
||||
```java
|
||||
@Mapper
|
||||
public interface AdminGameSugarUserMapper extends BaseMapper<GameSugarUser> {
|
||||
}
|
||||
```
|
||||
|
||||
单表查询时,使用mybatis-plus的Lambda查询方式。
|
||||
|
||||
要执行复杂的查询逻辑时,用Lambda查询不好实现,或者很复杂时,可以使用@Select注解,在mapper类中写sql实现。
|
||||
|
||||
3
doc/开箱玩法/Roll房/Roll房.md
Normal file
@@ -0,0 +1,3 @@
|
||||
1.查询roll房的基本信息,是否存在,是否开奖,是否有参与者
|
||||
2.查看是否有系统指定用户获取饰品,调用rollSurplusOrnaments()方法,传入全部参与用户和饰品,将该饰品指定给需要指定的用户,扣除该饰品并返回剩下的饰品,并且将指定用户过滤出
|
||||
3.获取没有指定获取饰品的用户,再将这些没指定的用户打乱顺序,再去遍历有库存饰品,按顺序给随机用户,每人一件,保存结果,更新roll房状态
|
||||
8
doc/开箱玩法/极速永恒/极速永恒.md
Normal file
@@ -0,0 +1,8 @@
|
||||
1.先效验传入的下注金额是否正确,再去给每个用户申请一把锁,根据用户id去redis中读取游戏缓存数据,缓存为空,扣费并且更新用户累计的投注,在去更新用户的总投注额,再去查找今天0点的统计记录,不存在则创建,否则将今日统计表中下注金额累计,再将redis中的全局奖励池累加
|
||||
再去初始化缓存数据,再去通过selectGame()方法去挑选一局游戏
|
||||
1.1selectGame()方法,首先去查询用户的历史数据(历史投钱数,游戏多少次),查询不到就去初始化一条全新数据,再去redis中读取游戏的配置信息,在去读取配置表(有rtp=0.8),再从redis中拿到全局的奖励池(所有玩家总投注,所有玩家总获奖),再将StrategyContext对象组装
|
||||
再去执行三个策略,分别是:普通旋转,免费旋转,超级旋转,三个旋转只是查询条件不同,最后封装GameSpin对象返回
|
||||
2.处理免费旋转,再去更新缓存,再去检测并且去累加S出现的次数,再去累加倍数到累计赢取额,然后写回缓存保存更新
|
||||
3.判断游戏是否结束,去计算最终的奖励,总得分(score) × 单注(bet) = 本局实际奖励金额,若计算结果≤0,强制设为0.01保底,再将赢取的金额加到玩家账号
|
||||
4.本局游戏结束之后,将该用户的redis缓存为空,去更新用户累计的输赢金额,再去更新统计表和Redis的全局奖励池
|
||||
5.构建完整数据并且返回
|
||||
10
doc/开箱玩法/疯狂转盘/疯狂转盘.md
Normal file
@@ -0,0 +1,10 @@
|
||||
1.开奖算法:决定转盘停在哪个格子
|
||||
1.1 无人下注的话,过滤特殊效果S,从剩下的格子里面随机选择一个
|
||||
1.2 有人下注的话,需要去计算每个格子的纯利润,需要去遍历每个格子符号,去获取每个格子的位置,将特殊符号S过滤,去计算需要赔付多少钱payoutIf()方法,计算出赔付金额,
|
||||
通过本局的总注额减去赔付金额就能计算出净利润,再将格子下标和净利润加入列表
|
||||
1.2.1payoutIf()方法,根据下注的符号,去计算需要赔付多少钱,赔付金额是 = 总下注额*赔率
|
||||
1.3 判断是否触发特殊效果S,生成一个0到1的随机数,如果小于特殊效果S的概率,则触发特殊效果S,然后再去随机选择一种特殊效果,记录特殊效果名
|
||||
1.3.1 如果是系统赢,随机找一个非s的下标,将下标和:S0组装表示为系统赢,直接返回
|
||||
1.3.2 免费旋转,默认是1次,随机找一个非s的下标,将下标和:S1组装表示为免费旋转1次,可以旋转3次
|
||||
1.4 普通开奖,计算出净利润大于0的格子的集合,再从盈利的格子随机选一个,如果没有净利润大于0的格子就去选亏得最少的格子,将结果加入
|
||||
|
||||
10
doc/开箱玩法/百变竞技/百变竞技.md
Normal file
@@ -0,0 +1,10 @@
|
||||
1.创建对战房间,先效验创建房间参数,0是欧皇,1是非酋,几人对战,配置宝箱的信息以及费用,回合数是1-15次,验证余额是否足够,初始化座位,
|
||||
再去构建对战对象,再去扣减房主的报名费,房主自动入第一个座,再去保存对战人员的信息,创建房间成功通过异步WebSocket广播通知大厅有新房间
|
||||
2.玩家加入对战房间,先获取锁,防止并发加入,再去效验对战信息joinFightCheck()方法,方法首先查询未对战信息,
|
||||
再去查询是否报名,再去检查余额是否足够,再去寻找空位入座,检查是否重复加入,更新对战座位信息,扣除加入人员报名费,保存参与记录,异步WebSocket广播用户加入房间
|
||||
3.fightBegin开始游戏方法,获取锁防止重复开始,检查游戏是否开始,执行多回合的抽奖newComputerFight()方法,再去计算胜负computerWinner()方法,该方法包含对战模式,座位信息,抽奖结果,
|
||||
去分配奖品,如果是多个赢家,失败者的奖品价值平分,赢家的奖品归自己,失败者的奖品累计,去平分失败者的总价值,如果是单个玩家或全员平局,单个赢家,将失败者奖品分给赢家,全员平局的话就轮流分配,
|
||||
最后再去批量保存开箱记录,更新对战状态为进行中,在异步WebSocket广播,构建开箱结果,广播给房间用户和大厅
|
||||
3.1.newComputerFight()方法,获取宝箱配置,获取所有玩家的id,设置回合计数器,外层遍历每一个宝箱,内层记录宝箱开启的次数,执行一回合的抽奖roundLottery()方法,将对局结果addAll全部加入宝箱记录集合中,回合数累加,再去更新宝箱历史开箱统计,在补充对战的id
|
||||
3.1.1.roundLottery()方法,遍历当前回合所有的玩家,再去使用经典开箱方法singleLottery(),获取饰品详情,再去构建开箱的记录
|
||||
3.2 computerWinner()方法,有两个模式,欧皇模式(总价值最高者胜)和非酋模式(总价值最低者胜),欧皇模式去累加该玩家获得的所有的饰品价值,比较是否为最高或者平局,非酋模式是否为最低或者平局
|
||||
12
doc/开箱玩法/经典开箱/经典开箱饰品分配.md
Normal file
@@ -0,0 +1,12 @@
|
||||
1.根据用户类型确定使用哪个奖池,普通奖池,补偿奖池,三级爆率奖池,
|
||||
在再根据宝箱id和用户类型获取锁,防止同一个宝箱同一个用户类型的并发抽奖,持续10秒,重试三次
|
||||
2.获取三个奖池对象,判断三个奖池是否为空,如果为空,就初始化创建空奖池
|
||||
3.查询用户是否拥有三级爆率,如果不为空,说明有三级爆率
|
||||
4.根据是否有三级爆率权限,选择使用哪个奖池,checkPool() 方法首先查看当前prizePool对象是否有数据,
|
||||
是直接返回,否则去redis中查看是否有数据,有则将数据加入prizePool对象中,
|
||||
否则去数据库中查询,并加入prizePool对象中,有三级爆率就使用thirdExplosivePrizePool,否则使用prizePool
|
||||
5.补偿机制,先查询用户的补偿记录是否有值,如果是补偿箱并且没有补偿记录,创建空的补偿记录,如果有补偿记录,查看是否到达补偿阈值,
|
||||
如果是补偿箱并且补偿值>=阈值,将切换到补偿奖池,并将补偿值清楚,将补偿记录删除
|
||||
6.执行抽奖的算法doLottery()方法,箱子里面包含饰品及其数量,获取饰品总数量,并且随机五次并记录最后一次的值,
|
||||
然后循环每个饰品的位置,如果这个位置的值和记录的最后一次的值相同,拿到当前饰品的id,
|
||||
如果循环多次没有拿到,就取饰品的第一个(按序给),库存减一
|
||||
6
doc/数据库变更.md
Normal file
@@ -0,0 +1,6 @@
|
||||
添加机器人爆率
|
||||
|
||||
ALTER TABLE `tt_box_ornaments` ADD COLUMN `robot_odds` int DEFAULT '0' COMMENT '机器人数量' AFTER `anchor_odds`;
|
||||
|
||||
ALTER TABLE game_sugar_record
|
||||
ADD COLUMN multiplier decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '倍率';
|
||||
6
doc/数据库备份.md
Normal file
@@ -0,0 +1,6 @@
|
||||
mysqldump -ufire -piTSJSPPZM3LSGAPC fire --no-tablespaces game_sugar_spin > game_sugar_spin.sql
|
||||
|
||||
mysqldump -ufire -piTSJSPPZM3LSGAPC fire --no-tablespaces game_sugar_step_info > game_sugar_step_info.sql
|
||||
|
||||
|
||||
mysql -u fire -piTSJSPPZM3LSGAPC fire < game_sugar_spin.sql
|
||||
BIN
doc/新手环境搭建文档/img.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
29
doc/新手环境搭建文档/环境搭建文档.md
Normal file
@@ -0,0 +1,29 @@
|
||||
1.本地安装jdk21
|
||||
配置jdk环境变量,idea官网下载版本2024.3.3 破解版 ——》 https://docs.qq.com/doc/DWkdRQVZRV0RoZHdh
|
||||
2.本地安装maven3.6.1
|
||||
配置settings.xml文件
|
||||
1). 复制<localRepository>标签,粘贴到注释的外面(55行)左右
|
||||
<localRepository>D:\software\apache-maven-3.6.1\local_repo</localRepository> //自己的maven安装路径
|
||||
2). 打开settings.xml文件,定位到160行左右
|
||||
2). 在<mirrors>标签下为其添加子标签<mirror>,内容如下:
|
||||
<mirror>
|
||||
<id>alimaven</id>
|
||||
<name>aliyun maven</name>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
|
||||
<mirrorOf>central</mirrorOf>
|
||||
</mirror>
|
||||
3).配置Maven环境变量,MVN -V 查看是否配置成功
|
||||
3.安装docker for windows
|
||||
1).配置教程 https://developer.aliyun.com/article/1604556
|
||||
2).国内镜像加速  图片所示 加速器链接 "https://docker.1ms.run"
|
||||
4.下载git 拉取代码
|
||||
1).创建文件夹存放项目,git init初始化,使用git clone http://39.107.124.211:13000/cocos/ruoyi.git 拉取代码
|
||||
2).账号密码是 cocos02 cocos02@163.com
|
||||
3).在ruoyi项目docker目录下cmd,使用命令docker compose up -d启动mysql,redis,rabbitmq
|
||||
4).导入sql文件
|
||||
5.安装vs code
|
||||
1).安装node.js 版本 node v22.22.0 npm版本 10.9.4 安装教程——》https://blog.csdn.net/Natsuago/article/details/145567734
|
||||
2).npm run dev
|
||||
|
||||
|
||||
|
||||
57
doc/清理数据.md
Normal file
@@ -0,0 +1,57 @@
|
||||
"game_sugar_record",
|
||||
"game_sugar_user",
|
||||
"game_wheel_round_bet",
|
||||
"game_wheel_user",
|
||||
"tt_announcement_read",
|
||||
"tt_attendance_record",
|
||||
"tt_bonus_receive_record",
|
||||
"tt_box_records",
|
||||
"tt_commission_record",
|
||||
"tt_delivery_record",
|
||||
"tt_exponent_user",
|
||||
"tt_exponent_user_box",
|
||||
"tt_fight",
|
||||
"tt_fight_user",
|
||||
"tt_notice",
|
||||
"tt_order",
|
||||
"tt_promotion_record",
|
||||
"tt_recharge_record",
|
||||
"tt_red_packet",
|
||||
"tt_red_packet_record",
|
||||
"tt_roll",
|
||||
"tt_roll_user",
|
||||
"tt_task_center_user",
|
||||
"tt_time_roll_user",
|
||||
"tt_upgrade_record",
|
||||
"tt_user_blend_ercash",
|
||||
"tt_welfare_record",
|
||||
"tt_recharge_record",
|
||||
"game_sugar_win",
|
||||
"game_wheel_round",
|
||||
"tt_recharge_card",
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
```python
|
||||
tables = [
|
||||
"tt_box",
|
||||
"tt_box_open_chance",
|
||||
"tt_box_ornaments",
|
||||
"tt_box_records",
|
||||
"tt_ornament",
|
||||
"tt_upgrade_fail_ornaments",
|
||||
"tt_upgrade_ornaments",
|
||||
"tt_upgrade_record",
|
||||
"tt_roll",
|
||||
"tt_roll_jackpot",
|
||||
"tt_roll_jackpot_ornaments",
|
||||
"tt_roll_user_prize"
|
||||
]
|
||||
|
||||
for table in tables:
|
||||
print(f"""CREATE TABLE {table}_new LIKE {table};
|
||||
RENAME TABLE {table} TO {table}_old, {table}_new TO {table};""")
|
||||
|
||||
```
|
||||
23
doc/网站迁移.md
Normal file
@@ -0,0 +1,23 @@
|
||||
服务器时区设置sudo timedatectl set-timezone Asia/Shanghai
|
||||
数据库时区设置:
|
||||
查看时区:SHOW GLOBAL VARIABLES LIKE '%time_zone%';
|
||||
SET GLOBAL time_zone = '+08:00';
|
||||
|
||||
同步的文件资源:
|
||||
图片
|
||||
数据库文件
|
||||
|
||||
|
||||
安装依赖:
|
||||
docker/nginx/mysql/redis/git
|
||||
jdk21/maven3.6.3
|
||||
|
||||
需要启动的服务
|
||||
docker rabbitmq coder-doc
|
||||
ruoyi
|
||||
nginx admin zhubo
|
||||
|
||||
|
||||
|
||||
需要加白的服务:
|
||||
支付/发货
|
||||
9
docker/Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
||||
# 基于官方 MySQL 8.0.24 镜像
|
||||
FROM mysql:8.0.24
|
||||
|
||||
# 设置环境变量,防止警告
|
||||
ENV MYSQL_ROOT_PASSWORD=123456
|
||||
|
||||
# 将本地的 C9_fire.sql 文件复制到容器内的 /docker-entrypoint-initdb.d/ 目录下
|
||||
# MySQL 官方镜像会自动检测并执行该目录下的 .sql 文件
|
||||
# COPY C9_fire.sql /docker-entrypoint-initdb.d/C9_fire.sql
|
||||
9
docker/docker-cn/Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
||||
# 基于官方 MySQL 8.0.24 镜像
|
||||
FROM m.daocloud.io/docker.io/mysql:8.0.24
|
||||
|
||||
# 设置环境变量,防止警告
|
||||
ENV MYSQL_ROOT_PASSWORD=123456
|
||||
|
||||
# 将本地的 C9_fire.sql 文件复制到容器内的 /docker-entrypoint-initdb.d/ 目录下
|
||||
# MySQL 官方镜像会自动检测并执行该目录下的 .sql 文件
|
||||
# COPY C9_fire.sql /docker-entrypoint-initdb.d/C9_fire.sql
|
||||
62
docker/docker-cn/docker-compose.yml
Normal file
@@ -0,0 +1,62 @@
|
||||
services:
|
||||
# MySQL 8.0.24 服务
|
||||
mysql:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: mysql_db
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: 123456 # 设置 root 密码
|
||||
MYSQL_DATABASE: fire # 可选:自动创建名为 c9_fire 的数据库
|
||||
MYSQL_USER: fire # 可选:创建新用户
|
||||
MYSQL_PASSWORD: iTSJSPPZM3LSGAPC # 可选:新用户密码
|
||||
ports:
|
||||
- "3306:3306"
|
||||
volumes:
|
||||
- mysql_data:/var/lib/mysql # 挂载数据卷以持久化数据
|
||||
networks:
|
||||
- app_network
|
||||
|
||||
# Redis 服务
|
||||
redis:
|
||||
image: m.daocloud.io/docker.io/redis:latest
|
||||
container_name: redis_cache
|
||||
restart: unless-stopped
|
||||
command: redis-server --requirepass FireSkins@99999
|
||||
ports:
|
||||
- "6379:6379"
|
||||
networks:
|
||||
- app_network
|
||||
|
||||
# RabbitMQ 3.9 服务
|
||||
rabbitmq:
|
||||
image: m.daocloud.io/docker.io/rabbitmq:3.9-management
|
||||
container_name: rabbitmq_server
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
RABBITMQ_DEFAULT_USER: skins # 设置管理界面用户名
|
||||
RABBITMQ_DEFAULT_PASS: mk # 设置管理界面密码
|
||||
ports:
|
||||
- "5672:5672" # 应用连接端口
|
||||
- "15672:15672" # 管理界面 Web 端口
|
||||
command: >
|
||||
bash -c "rabbitmq-server &
|
||||
sleep 20 &&
|
||||
rabbitmqctl add_vhost /skins &&
|
||||
rabbitmqctl set_permissions -p /skins skins '.*' '.*' '.*' &&
|
||||
rabbitmqadmin --vhost=/skins --username=skins --password=mk declare queue name=notice_queue durable=true &&
|
||||
rabbitmqadmin --vhost=/skins --username=skins --password=mk declare queue name=dlk_queue durable=true &&
|
||||
rabbitmqadmin --vhost=/skins --username=skins --password=mk declare queue name=delivery_queue durable=true &&
|
||||
wait"
|
||||
networks:
|
||||
- app_network
|
||||
|
||||
# 定义数据卷
|
||||
volumes:
|
||||
mysql_data:
|
||||
|
||||
# 定义网络
|
||||
networks:
|
||||
app_network:
|
||||
driver: bridge
|
||||
63
docker/docker-compose.yml
Normal file
@@ -0,0 +1,63 @@
|
||||
services:
|
||||
# MySQL 8.0.24 服务
|
||||
mysql:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: mysql_db
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
MYSQL_ROOT_PASSWORD: 123456 # 设置 root 密码
|
||||
MYSQL_DATABASE: fire # 可选:自动创建名为 c9_fire 的数据库
|
||||
MYSQL_USER: fire # 可选:创建新用户
|
||||
MYSQL_PASSWORD: iTSJSPPZM3LSGAPC # 可选:新用户密码
|
||||
ports:
|
||||
- "3306:3306"
|
||||
volumes:
|
||||
- mysql_data:/var/lib/mysql # 挂载数据卷以持久化数据
|
||||
networks:
|
||||
- app_network
|
||||
|
||||
# Redis 服务
|
||||
redis:
|
||||
image: redis:latest
|
||||
container_name: redis_cache
|
||||
restart: unless-stopped
|
||||
command: redis-server --requirepass FireSkins@99999
|
||||
ports:
|
||||
- "6379:6379"
|
||||
networks:
|
||||
- app_network
|
||||
|
||||
# RabbitMQ 3.9 服务
|
||||
rabbitmq:
|
||||
image: rabbitmq:3.9-management
|
||||
container_name: rabbitmq_server
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
RABBITMQ_DEFAULT_USER: skins # 设置管理界面用户名
|
||||
RABBITMQ_DEFAULT_PASS: mk # 设置管理界面密码
|
||||
ports:
|
||||
- "5672:5672" # 应用连接端口
|
||||
- "15672:15672" # 管理界面 Web 端口
|
||||
command: >
|
||||
bash -c "rabbitmq-server &
|
||||
sleep 20 &&
|
||||
rabbitmqctl add_vhost /skins &&
|
||||
rabbitmqctl set_permissions -p /skins skins '.*' '.*' '.*' &&
|
||||
rabbitmqadmin --vhost=/skins --username=skins --password=mk declare queue name=notice_queue durable=true &&
|
||||
rabbitmqadmin --vhost=/skins --username=skins --password=mk declare queue name=dlk_queue durable=true &&
|
||||
rabbitmqadmin --vhost=/skins --username=skins --password=mk declare queue name=delivery_queue durable=true &&
|
||||
wait"
|
||||
networks:
|
||||
- app_network
|
||||
|
||||
# 定义数据卷
|
||||
volumes:
|
||||
mysql_data:
|
||||
|
||||
# 定义网络
|
||||
networks:
|
||||
app_network:
|
||||
driver: bridge
|
||||
9
docker/readme.md
Normal file
@@ -0,0 +1,9 @@
|
||||
重新创建某个容器
|
||||
docker compose up -d --build --force-recreate rabbitmq
|
||||
|
||||
docker compose up -d
|
||||
docker compose stop
|
||||
docker compose rm
|
||||
|
||||
# 大陆环境
|
||||
进入docker-cn目录,执行上面的命令
|
||||
1
odcs2.com/.env
Normal file
@@ -0,0 +1 @@
|
||||
VUE_APP_BASE_URL='http://154.12.94.229:8080/'
|
||||
23
odcs2.com/.gitignore
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
36
odcs2.com/README.en.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# demo
|
||||
|
||||
#### Description
|
||||
{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}
|
||||
|
||||
#### Software Architecture
|
||||
Software architecture description
|
||||
|
||||
#### Installation
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Instructions
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Contribution
|
||||
|
||||
1. Fork the repository
|
||||
2. Create Feat_xxx branch
|
||||
3. Commit your code
|
||||
4. Create Pull Request
|
||||
|
||||
|
||||
#### Gitee Feature
|
||||
|
||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
||||
39
odcs2.com/README.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# demo
|
||||
|
||||
#### 介绍
|
||||
{**以下是 Gitee 平台说明,您可以替换此简介**
|
||||
Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台
|
||||
无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)}
|
||||
|
||||
#### 软件架构
|
||||
软件架构说明
|
||||
|
||||
|
||||
#### 安装教程
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 使用说明
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 参与贡献
|
||||
|
||||
1. Fork 本仓库
|
||||
2. 新建 Feat_xxx 分支
|
||||
3. 提交代码
|
||||
4. 新建 Pull Request
|
||||
|
||||
|
||||
#### 特技
|
||||
|
||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
||||
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
|
||||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
|
||||
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
|
||||
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
||||
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
||||
12
odcs2.com/babel.config.js
Normal file
@@ -0,0 +1,12 @@
|
||||
const plugins = []
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
plugins.push(['transform-remove-console', { 'exclude': ['error', 'warn'] }])
|
||||
console.log('plugins',plugins);
|
||||
}
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
],
|
||||
plugins: [...plugins]
|
||||
}
|
||||
19
odcs2.com/jsconfig.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "esnext",
|
||||
"baseUrl": "./",
|
||||
"moduleResolution": "node",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
]
|
||||
},
|
||||
"lib": [
|
||||
"esnext",
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"scripthost"
|
||||
]
|
||||
}
|
||||
}
|
||||
18972
odcs2.com/package-lock.json
generated
Normal file
71
odcs2.com/package.json
Normal file
@@ -0,0 +1,71 @@
|
||||
{
|
||||
"name": "f2cs2",
|
||||
"description": "欢迎访问f2cs2,高爆开箱网,饰品交易站",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.22.9",
|
||||
"@babel/preset-env": "^7.22.9",
|
||||
"animate.css": "^4.1.1",
|
||||
"axios": "^1.4.0",
|
||||
"core-js": "^3.6.5",
|
||||
"element-ui": "^2.15.13",
|
||||
"iscroll": "^5.2.0",
|
||||
"js-cookie": "^3.0.5",
|
||||
"qrcodejs2": "^0.0.2",
|
||||
"sass-loader": "^8.0.2",
|
||||
"socket.io": "^4.7.4",
|
||||
"swiper": "^4.5.1",
|
||||
"video.js": "^8.10.0",
|
||||
"vue": "^2.6.11",
|
||||
"vue-agile": "^2.0.0",
|
||||
"vue-count-to": "^1.0.13",
|
||||
"vue-cropper": "^0.6.4",
|
||||
"vue-router": "^3.2.0",
|
||||
"vue-seamless-scroll": "^1.1.23",
|
||||
"vuex": "^3.4.0",
|
||||
"vuex-persistedstate": "^4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "~4.5.19",
|
||||
"@vue/cli-plugin-eslint": "~4.5.19",
|
||||
"@vue/cli-plugin-router": "~4.5.19",
|
||||
"@vue/cli-plugin-vuex": "~4.5.19",
|
||||
"@vue/cli-service": "~4.5.19",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-plugin-transform-remove-console": "^6.9.4",
|
||||
"eslint": "^6.7.2",
|
||||
"eslint-plugin-vue": "^6.2.2",
|
||||
"qrcode": "^1.5.3",
|
||||
"sass": "^1.99.0",
|
||||
"vue-template-compiler": "^2.6.11"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
"env": {
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"plugin:vue/essential",
|
||||
"eslint:recommended"
|
||||
],
|
||||
"parserOptions": {
|
||||
"parser": "babel-eslint"
|
||||
},
|
||||
"rules": {
|
||||
"vue/no-unused-components": "off",
|
||||
"no-unused-vars": "off",
|
||||
"no-debugger": "off"
|
||||
}
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not dead"
|
||||
]
|
||||
}
|
||||
BIN
odcs2.com/public/1.jpg
Normal file
|
After Width: | Height: | Size: 162 KiB |
BIN
odcs2.com/public/123.png
Normal file
|
After Width: | Height: | Size: 221 KiB |
BIN
odcs2.com/public/2.mp3
Normal file
BIN
odcs2.com/public/Group 1.png
Normal file
|
After Width: | Height: | Size: 184 KiB |
BIN
odcs2.com/public/Group 16.png
Normal file
|
After Width: | Height: | Size: 264 KiB |
BIN
odcs2.com/public/Group 5.png
Normal file
|
After Width: | Height: | Size: 219 KiB |
BIN
odcs2.com/public/Group 6.png
Normal file
|
After Width: | Height: | Size: 221 KiB |
BIN
odcs2.com/public/and.png
Normal file
|
After Width: | Height: | Size: 8.1 KiB |
BIN
odcs2.com/public/apple.png
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
8
odcs2.com/public/config.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"customerServiceAddress":{
|
||||
"url":"http://kefu.odcs2.com/chat/pc",
|
||||
"noCanClose":1,
|
||||
"kefu_id":1,
|
||||
"token":"d6fdece3a8e12c5605457bab3ad67afd"
|
||||
}
|
||||
}
|
||||
BIN
odcs2.com/public/fail.png
Normal file
|
After Width: | Height: | Size: 9.2 KiB |
BIN
odcs2.com/public/fail_2.png
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
odcs2.com/public/favicon.ico
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
odcs2.com/public/hongbao.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
38
odcs2.com/public/index.html
Normal file
@@ -0,0 +1,38 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width,initial-scale=1.0,maximum-scale=1.0, user-scalable=no"
|
||||
/>
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
|
||||
<title></title>
|
||||
<style>
|
||||
body,
|
||||
html {
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
/* height: 100vh; */
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
/* @media (min-width: 525px) {
|
||||
width: 525px;
|
||||
} */
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong
|
||||
>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work
|
||||
properly without JavaScript enabled. Please enable it to
|
||||
continue.</strong
|
||||
>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
||||
BIN
odcs2.com/public/pk全套音_01.mp3
Normal file
BIN
odcs2.com/public/win.png
Normal file
|
After Width: | Height: | Size: 185 KiB |
BIN
odcs2.com/public/you.jpg
Normal file
|
After Width: | Height: | Size: 217 KiB |
BIN
odcs2.com/public/zuo.jpg
Normal file
|
After Width: | Height: | Size: 168 KiB |
BIN
odcs2.com/public/点击音_02.mp3
Normal file
BIN
odcs2.com/public/胜利音效_01.mp3
Normal file
334
odcs2.com/src/App.vue
Normal file
@@ -0,0 +1,334 @@
|
||||
<template>
|
||||
<div id="app" class="app">
|
||||
<div class="content">
|
||||
<headerTop id="headerTop"></headerTop>
|
||||
<!-- animate__animated animate__fadeInLeft -->
|
||||
<router-view class="appview" v-if="!$route.meta.iskeep"></router-view>
|
||||
<keep-alive>
|
||||
<router-view class="appview" v-if="$route.meta.iskeep"></router-view>
|
||||
</keep-alive>
|
||||
<!-- <login v-if="show" class="App_login"></login> -->
|
||||
<!-- <WipeSidebar :slider="slider" class="cesildera"></WipeSidebar> -->
|
||||
<!-- <slider v-if="slider" class="App_slider"></slider> -->
|
||||
<illustrate v-if="isillustrate" class></illustrate>
|
||||
|
||||
<bottomUser id="bottomUser"></bottomUser>
|
||||
<!-- 广告 -->
|
||||
<advert :img="advertisementImg" v-if="advertStatus"></advert>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script></script>
|
||||
<script>
|
||||
import login from "@/views/Home/common/login.vue";
|
||||
import advert from "@/views/Home/common/advert.vue";
|
||||
// import slider from "@/components/sliderUser.vue";
|
||||
import { getToken } from "@/api/cookie";
|
||||
|
||||
import headerTop from "@/components/headerTop.vue";
|
||||
import bottomUser from "@/components/bottomUser.vue";
|
||||
// import WipeSidebar from "@/components/WipeSidebar.vue";
|
||||
import { getAdvertisement } from "@/api/index";
|
||||
import store from "@/vuex/store";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
he: 0,
|
||||
// width: window.innerWidth
|
||||
show: false,
|
||||
slider: false,
|
||||
isillustrate: false,
|
||||
w: document.documentElement.clientWidth,
|
||||
screenWidth: document.body.clientWidth, // 屏幕宽度
|
||||
// 广告图片
|
||||
advertisementImg: "",
|
||||
// 广告状态
|
||||
advertStatus: false,
|
||||
|
||||
};
|
||||
},
|
||||
components: {
|
||||
login,
|
||||
headerTop,
|
||||
// slider,
|
||||
bottomUser,
|
||||
// WipeSidebar,
|
||||
advert,
|
||||
},
|
||||
mounted() {
|
||||
const that = this;
|
||||
|
||||
that.getAdvertisementImg();
|
||||
window.onresize = () => {
|
||||
return (() => {
|
||||
window.screenWidth = document.body.clientWidth;
|
||||
that.screenWidth = window.screenWidth;
|
||||
})();
|
||||
};
|
||||
this.$nextTick(() => {
|
||||
console.log("播放音乐");
|
||||
this.$store.commit("playAudio");
|
||||
});
|
||||
console.log("window.history.state", window.history.state);
|
||||
if (window.history.state && window.history.state.title) {
|
||||
if (this.$store.state.LOGIN_IS_SHOW) {
|
||||
return;
|
||||
} else {
|
||||
window.history.back();
|
||||
}
|
||||
}
|
||||
let aa = document.getElementById("headerTop").offsetHeight;
|
||||
let bb = document.getElementById("bottomUser").offsetHeight;
|
||||
this.he = aa + bb;
|
||||
|
||||
this.getToken();
|
||||
|
||||
this.$bus.$on("close", (data) => {
|
||||
this.show = data;
|
||||
// console.log("关闭登录");
|
||||
if (!data) {
|
||||
// 检查是否有足够的历史记录,避免退出网站
|
||||
if (window.history.length > 2) {
|
||||
this.$router.back();
|
||||
} else {
|
||||
// 如果没有足够的历史记录,跳转到首页
|
||||
this.$router.push('/');
|
||||
}
|
||||
}
|
||||
});
|
||||
this.$bus.$on("is_illustrate", (data) => {
|
||||
this.isillustrate = data;
|
||||
});
|
||||
this.$bus.$on("sliderbtn", (data) => {
|
||||
this.slider = data;
|
||||
});
|
||||
// 关闭广告
|
||||
this.$bus.$on("closeAdvert", (data) => {
|
||||
this.advertStatus = data;
|
||||
this.$store.commit("ADVERT_IS_SHOW", false);
|
||||
console.log('ADVERT_IS_SHOW',this.$store.state.ADVERT_IS_SHOW)
|
||||
});
|
||||
// 关闭广告,打开注册
|
||||
this.$bus.$on("goLogin", (data) => {
|
||||
this.advertStatus = false;
|
||||
this.goLogin(data);
|
||||
});
|
||||
// 退出登录之后打开广告
|
||||
this.$bus.$on("openAdvert", (data) => {
|
||||
this.advertStatus = true;
|
||||
this.$store.commit("ADVERT_IS_SHOW", true);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getAdvertisementImg() {
|
||||
getAdvertisement().then((res) => {
|
||||
console.log("广告图片", res.data);
|
||||
if(res.data.code == 200){
|
||||
this.advertisementImg = res.data.data.picture;
|
||||
}else{
|
||||
console.error(res.data.msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
getToken() {
|
||||
if (getToken()) {
|
||||
this.show = false;
|
||||
this.$store.commit("LOGIN_IS_SHOW", false);
|
||||
this.$store.commit("ADVERT_IS_SHOW", false);
|
||||
this.$bus.$emit("islogin", this.show);
|
||||
} else {
|
||||
this.$router.push("/login");
|
||||
this.show = false;
|
||||
}
|
||||
},
|
||||
goLogin(type) {
|
||||
setTimeout(() => {
|
||||
this.$router.push({ name: "login", params: { type: type } });
|
||||
this.show = true;
|
||||
this.$bus.$emit("islogin", this.show);
|
||||
this.$store.commit("LOGIN_IS_SHOW", true);
|
||||
}, 500);
|
||||
},
|
||||
// 获取广告图片
|
||||
getAdvert() {
|
||||
// this.$api.getAdvert().then((res) => {
|
||||
// if (res.code == 200) {
|
||||
// this.$store.commit("ADVERT", res.data);
|
||||
// }
|
||||
// });
|
||||
},
|
||||
},
|
||||
watch: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
#bottomUser {
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
height: 92px;
|
||||
font-family: Alimama ShuHeiTi, serif;
|
||||
background: url("./assets/bottom-bg.png") no-repeat 50% / 100% 100%;
|
||||
z-index: 99;
|
||||
@media (max-width: 550px) {
|
||||
position: fixed !important;
|
||||
bottom: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.App_slider {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 30%;
|
||||
animation: slider 0.3s linear;
|
||||
}
|
||||
@keyframes slider {
|
||||
0% {
|
||||
right: -72px;
|
||||
}
|
||||
75% {
|
||||
right: 18px;
|
||||
}
|
||||
100% {
|
||||
right: 15px;
|
||||
}
|
||||
}
|
||||
.App_login {
|
||||
animation: mymove 0.3s linear;
|
||||
}
|
||||
@keyframes mymove {
|
||||
0% {
|
||||
top: -10px;
|
||||
opacity: 0.7;
|
||||
}
|
||||
100% {
|
||||
top: 0;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
.cesildera {
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
bottom: 200px;
|
||||
}
|
||||
.appview {
|
||||
overflow-y: scroll;
|
||||
position: relative;
|
||||
height: calc(100vh - 8rem);
|
||||
padding-bottom: 4rem !important;
|
||||
// padding-bottom: 200px;
|
||||
}
|
||||
@media (max-width: 550px) {
|
||||
.appview {
|
||||
|
||||
// height: 80vh;
|
||||
}
|
||||
}
|
||||
.appview::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
.appview::-webkit-scrollbar-track {
|
||||
background-color: #f1f1f1;
|
||||
opacity: 0.2;
|
||||
}
|
||||
.appview::-webkit-scrollbar-thumb {
|
||||
background-color: #888;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.appview::-webkit-scrollbar-thumb:hover {
|
||||
background-color: #555;
|
||||
}
|
||||
.content {
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
color: #fff;
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
position: relative;
|
||||
font-size: 1rem;
|
||||
max-width: 430px;
|
||||
}
|
||||
.content::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: url("./assets/home.png") no-repeat center center;
|
||||
background-size: cover;
|
||||
opacity: 0.9; /* 设置背景图片的透明度 */
|
||||
z-index: 0; /* 确保背景图片在文字后面 */
|
||||
}
|
||||
.homeBg::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: url("./assets/home.png") no-repeat top center;
|
||||
background-size: cover;
|
||||
// opacity: 0.8; /* 设置背景图片的透明度 */
|
||||
}
|
||||
.content::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.53); /* 黑色蒙版,透明度为 0.6 */
|
||||
z-index: -1; /* 确保蒙版在背景图片之上,文字之下 */
|
||||
}
|
||||
.zuo {
|
||||
background: url("../public/1.jpg") no-repeat right center;
|
||||
background-size: cover;
|
||||
}
|
||||
.you {
|
||||
background: url("../public/you.jpg") no-repeat left center;
|
||||
background-size: cover;
|
||||
}
|
||||
#app {
|
||||
// font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||
font-family: "Microsoft Yahei";
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
position: relative;
|
||||
font-size: 1rem;
|
||||
-moz-user-select: -moz-none;
|
||||
-moz-user-select: none;
|
||||
-o-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
background: url('./assets/home.gif') no-repeat center center;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
* {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
box-sizing: border-box;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
img {
|
||||
vertical-align: middle;
|
||||
}
|
||||
svg {
|
||||
display: block;
|
||||
margin: auto;
|
||||
}
|
||||
</style>
|
||||
9
odcs2.com/src/api/basurl.js
Normal file
@@ -0,0 +1,9 @@
|
||||
// const DEV_BASE_URL = 'ws://localhost:8082'
|
||||
// const DEV_BASE_URL = "ws://123.60.170.219:8082";
|
||||
|
||||
|
||||
//const DEV_BASE_URL = "ws://1.92.85.51:8080";
|
||||
const DEV_BASE_URL = "ws://127.0.0.1:8081";
|
||||
export default {
|
||||
BASE_API: DEV_BASE_URL,
|
||||
};
|
||||
13
odcs2.com/src/api/cookie.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import Cookies from 'js-cookie'
|
||||
const TokenKey = 'token'
|
||||
export function getToken() {
|
||||
return Cookies.get(TokenKey)
|
||||
}
|
||||
|
||||
export function setToken(token) {
|
||||
return Cookies.set(TokenKey, token)
|
||||
}
|
||||
|
||||
export function removeToken() {
|
||||
return Cookies.remove(TokenKey)
|
||||
}
|
||||
975
odcs2.com/src/api/index.js
Normal file
@@ -0,0 +1,975 @@
|
||||
import axios from "axios";
|
||||
import { getToken, removeToken } from "./cookie";
|
||||
// import { Loading } from 'element-ui';
|
||||
import { Message } from "element-ui";
|
||||
import store from "@/vuex/store";
|
||||
import Vue from "vue";
|
||||
let vue = new Vue();
|
||||
// import Vue from 'vue'
|
||||
// import App from '../App.vue'
|
||||
// import router from '@/router'
|
||||
// var vm = new Vue({
|
||||
// router,
|
||||
// render: h => h(App)
|
||||
// }).$mount('#app')
|
||||
|
||||
const reqAxios = axios.create({
|
||||
// baseURL: "http://192.168.1.3:8081",
|
||||
// baseURL: "http://192.168.1.3:8080",
|
||||
// baseURL: "http://123.60.170.219:8082",
|
||||
// baseURL: "http://localhost:8082",
|
||||
//baseURL: "http://192.168.1.39:8082",
|
||||
|
||||
|
||||
//baseURL:'http://1.92.85.51:8080',
|
||||
// baseURL:'http://3.92.67.237:8080',
|
||||
baseURL:'http://127.0.0.1:8081/',
|
||||
|
||||
// baseURL: "http://beecsgo.com/prod-api/",
|
||||
// baseURL: "http://www.f2cs2.com/prod-api/",
|
||||
// baseURL: 'http://127.0.0.1/prod-api',
|
||||
// baseURL: "http://101.200.132.56/prod-api/",
|
||||
|
||||
timeout: 60000, // 请求超时时间 这里的意思是当请求时间超过5秒还未取得结果时 提示用户请求超时
|
||||
});
|
||||
// 拦截请求(拦截器)
|
||||
const timer = new Map();
|
||||
reqAxios.interceptors.request.use(
|
||||
function (request) {
|
||||
if (request.url !== "/api/luckyUpgrade/getUpgradeRecord") {
|
||||
vue.$toast("加载中");
|
||||
}
|
||||
// 处理请求公共数据,如添加请求头令牌...
|
||||
let token = getToken();
|
||||
//请求头设置
|
||||
request.headers = {
|
||||
"content-type": "application/json;",
|
||||
userType: "user",
|
||||
Authorization: token,
|
||||
};
|
||||
// // console.log('request',request);
|
||||
if (request.url == "/api/luckyUpgrade/upgrade") {
|
||||
return throttle(request, 3500);
|
||||
}
|
||||
if (
|
||||
request.url == "/api/luckyUpgrade/getUpgradeRecord" ||
|
||||
request.url == "/api/roll/getRollList" ||
|
||||
request.url == "/api/userAmountRecords/blendErcashRank" ||
|
||||
request.url == "/api/boxRecords/historyByCondition" ||
|
||||
request.url == "/api/userAmountRecords/deliveryRecords" ||
|
||||
request.url == "/api/userAmountRecords/userAccountDetail" ||
|
||||
request.url == "/api/userPackSack/getPackSack"||
|
||||
request.url == "/api/roll/getRollPlayers"
|
||||
) {
|
||||
return request;
|
||||
}
|
||||
return throttle(request, 500);
|
||||
// return request;
|
||||
},
|
||||
function (error) {
|
||||
console.log("requesterror", error);
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
function throttle(request, time) {
|
||||
// console.log(request);
|
||||
let lastTime = timer.get(request.url);
|
||||
let nowTime = new Date().getTime();
|
||||
if (request.method == "get") {
|
||||
return request;
|
||||
} else {
|
||||
if (lastTime && nowTime - lastTime < time) {
|
||||
console.log("overRequest", request);
|
||||
return Promise.reject("请勿频繁操作");
|
||||
// return false
|
||||
} else {
|
||||
timer.set(request.url, nowTime);
|
||||
return request;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//响应拦截器
|
||||
reqAxios.interceptors.response.use(
|
||||
(res) => {
|
||||
// console.log('response',res)
|
||||
vue.$hide();
|
||||
if (res.data.code == 401) {
|
||||
Message({
|
||||
message: "登录已过期,请重新登陆",
|
||||
type: "warning",
|
||||
customClass: "log_warning",
|
||||
});
|
||||
removeToken();
|
||||
store.commit("LOGIN_IS_SHOW", true);
|
||||
store.commit("ADVERT_IS_SHOW", true);
|
||||
return;
|
||||
} else if (res.status == 200) {
|
||||
return res;
|
||||
} else if (res.data.code == 200) {
|
||||
return res;
|
||||
} else {
|
||||
Message({
|
||||
message: res.data.msg,
|
||||
type: "warning",
|
||||
customClass: "log_warning",
|
||||
});
|
||||
return res;
|
||||
}
|
||||
},
|
||||
(err) => {
|
||||
console.log("err", err);
|
||||
if (err == "请勿频繁操作") {
|
||||
Message({
|
||||
message: "您的操作太频繁,请1秒后再试",
|
||||
type: "warning",
|
||||
customClass: "log_warning",
|
||||
});
|
||||
}
|
||||
if (err.response.status == 500) {
|
||||
Message({
|
||||
message: err.response.data.message,
|
||||
type: "warning",
|
||||
customClass: "log_warning",
|
||||
});
|
||||
}
|
||||
if (err.response.status == 401) {
|
||||
removeToken();
|
||||
store.commit("LOGIN_IS_SHOW", true);
|
||||
store.commit("ADVERT_IS_SHOW", true);
|
||||
Message({
|
||||
message: "登录过期,请重新登陆",
|
||||
type: "warning",
|
||||
customClass: "log_warning",
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
//登录
|
||||
export const getLogin = (data) => {
|
||||
return reqAxios.post("/api/login", data);
|
||||
};
|
||||
//退出登录
|
||||
export const logOut = () => {
|
||||
return reqAxios.post("/api/logout");
|
||||
};
|
||||
//注册
|
||||
export const getRegister = (data) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: "/api/register",
|
||||
data,
|
||||
});
|
||||
};
|
||||
|
||||
// 实名认证
|
||||
export const realNameAuthentication = (data) => {
|
||||
return reqAxios({
|
||||
url: `/api/user/realNameAuthentication`,
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
};
|
||||
|
||||
//获取下级人数
|
||||
export const getUserSubusser = () => {
|
||||
return reqAxios({
|
||||
url: "/api/user/rechargeCount",
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
export const getUserSubRechange = () => {
|
||||
return reqAxios({
|
||||
url: "/api/user/getOrdersAmounts",
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
|
||||
// 判断是否充值
|
||||
export const IsRecharge = () => {
|
||||
return reqAxios.get("/api/user/getUserIsRecharge");
|
||||
};
|
||||
|
||||
// 刷新用户金币
|
||||
export const updateUserData = () => {
|
||||
return reqAxios.post("/api/user/updateUserData");
|
||||
};
|
||||
|
||||
// 获取用户信息
|
||||
export const getUserInfo = () => {
|
||||
return reqAxios.get("/api/getInfo");
|
||||
};
|
||||
|
||||
//roll房列表
|
||||
export const getRollList = (data) => {
|
||||
/* return reqAxios.get("/api/roll/getRollList",data); */
|
||||
return reqAxios({
|
||||
url: `/api/roll/getRollList`,
|
||||
method: "get",
|
||||
params: data,
|
||||
});
|
||||
};
|
||||
//获取roll房信息
|
||||
export const getRollDetial = (rollId) => {
|
||||
return reqAxios({
|
||||
url: `/api/roll/getRollDetails/${rollId}`,
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
|
||||
//加入roll房
|
||||
export const joinRoll = (rollId, rollPassword = "") => {
|
||||
return reqAxios({
|
||||
url: `/api/roll/joinRoll`,
|
||||
method: "post",
|
||||
data: {
|
||||
rollId,
|
||||
rollPassword,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
// 获取用户参与Roll房
|
||||
// export const getMyPartRollList = (data) => {
|
||||
// return reqAxios({
|
||||
// url: `/api/roll/getRollList`,
|
||||
// method: "get",
|
||||
// params: data,
|
||||
// });
|
||||
// };
|
||||
|
||||
// 个人明细
|
||||
export const getUserLogList = (data) => {
|
||||
return reqAxios({
|
||||
url: `/api/userAmountRecords/userAccountDetail`,
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
};
|
||||
//可充值钱数
|
||||
export const getRechargelist = (data) => {
|
||||
return reqAxios({
|
||||
url: `/api/recharge/list`,
|
||||
method: "get",
|
||||
params: data,
|
||||
});
|
||||
};
|
||||
//充值记录
|
||||
export const orderList = () => {
|
||||
return reqAxios({
|
||||
url: `/admin/order/list`,
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
//
|
||||
export const jiuJiaPay = (data) => {
|
||||
return reqAxios({
|
||||
url: `/api/jiuJiaPay/createPay`,
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
};
|
||||
//
|
||||
export const kamiPay = (data) => {
|
||||
return reqAxios({
|
||||
url: `/api/recharge/cardPay`,
|
||||
method: "post",
|
||||
params: data,
|
||||
});
|
||||
};
|
||||
|
||||
// 签到
|
||||
export const attendance = () => {
|
||||
return reqAxios({
|
||||
url: `/api/attendanceRecord/attendance`,
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
// 七日签到
|
||||
export const attendance7day = () => {
|
||||
return reqAxios({
|
||||
url: `/api/attendanceRecord/sevenAttendance`,
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
|
||||
//当日排行榜
|
||||
export const creditsRank = (data) => {
|
||||
return reqAxios({
|
||||
url: `api/userCreditsRecords/creditsRank/2/1/5`,
|
||||
method: "get",
|
||||
params: data,
|
||||
});
|
||||
};
|
||||
// 获取下级流水列表
|
||||
export const getUserxList = () => {
|
||||
return reqAxios({
|
||||
url: `/api/user/getLsjlList`,
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
|
||||
// 推广
|
||||
export const userCreditsRecords = (page, size) => {
|
||||
return reqAxios({
|
||||
url: `api/userAmountRecords/pWelfareRecords/${page}/${size}`,
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
|
||||
//站内信-获取站内信列表
|
||||
|
||||
export const getMessageList = (data) => {
|
||||
return reqAxios({
|
||||
url: `/api/message/getMessageList`,
|
||||
method: "get",
|
||||
params: data,
|
||||
});
|
||||
};
|
||||
|
||||
//任务列表
|
||||
export const gettaskList = () => {
|
||||
return reqAxios({
|
||||
url: `/api/ttTask/taskOfme`,
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
//领取任务
|
||||
export const claimTasks = (tid) => {
|
||||
return reqAxios({
|
||||
url: `/api/ttTask/getAward/${tid}`,
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
|
||||
// 头像列表
|
||||
export const getavatar = () => {
|
||||
return reqAxios({
|
||||
url: "/api/userAvatar/list",
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
//站内信-查看内容
|
||||
|
||||
export const getMessageView = (data) => {
|
||||
return reqAxios({
|
||||
url: `/api/message/view?id=${data}`,
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
//站内信-批量操作
|
||||
export const getMessageOperation = (data) => {
|
||||
return reqAxios({
|
||||
url: `/api/message/batchOperation?ids=${data.ids}&status=${data.status}`,
|
||||
method: "post",
|
||||
// data: data,
|
||||
});
|
||||
};
|
||||
|
||||
//首页顶部轮播
|
||||
export const getWeapon = (options) => {
|
||||
return reqAxios({
|
||||
url: `/api/boxRecords/historyByCondition`,
|
||||
method: "POST",
|
||||
data: options,
|
||||
});
|
||||
};
|
||||
|
||||
//首页中间轮播
|
||||
export const getHomeBanner = (options) => {
|
||||
return reqAxios.get("/api/websiteSetup/getBannerList", options);
|
||||
};
|
||||
//获取广告
|
||||
export const getAdvertisement = () => {
|
||||
return reqAxios.get("/api/advertisement/1");
|
||||
};
|
||||
|
||||
//开箱 根据宝箱ID获取宝箱数据
|
||||
|
||||
//开箱 历史掉落
|
||||
export const getBoxhistory = (options) => {
|
||||
return reqAxios({
|
||||
url: `/api/boxRecords/historyByCondition`,
|
||||
method: "POST",
|
||||
data: options,
|
||||
});
|
||||
};
|
||||
|
||||
//开箱接口
|
||||
export const openBox = (options) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: `/api/bindbox/openBox`,
|
||||
params: options,
|
||||
});
|
||||
};
|
||||
|
||||
//开箱,武器分解 // 背包分解
|
||||
export const decompose = (options) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: `/api/userPackSack/decompose`,
|
||||
data: options,
|
||||
});
|
||||
};
|
||||
// 分解记录
|
||||
|
||||
export const userdecompseList = (data) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: `/api/userPackSack/decomposeLog`,
|
||||
data,
|
||||
});
|
||||
};
|
||||
|
||||
// 提取饰品
|
||||
export const delivery = (options) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: `/api/userPackSack/delivery`,
|
||||
data: options,
|
||||
});
|
||||
};
|
||||
|
||||
// 转赠饰品
|
||||
export const transfer = (options) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: `/api/userPackSack/transfer`,
|
||||
data: options,
|
||||
});
|
||||
};
|
||||
|
||||
//全部对战,查询所有对战列表
|
||||
export const getFightList = () => {
|
||||
return reqAxios({
|
||||
url: "/api/fight/getFightList",
|
||||
method: "get",
|
||||
data: {
|
||||
page: 1,
|
||||
size: 10,
|
||||
statusList: [1, 0],
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
//创建对战
|
||||
export const createFight = (data) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: "/api/fight/createFight",
|
||||
data,
|
||||
});
|
||||
};
|
||||
//玩家准备
|
||||
/* /api/fight/seatrReady */
|
||||
export const ApiSeatReady = (fightId) => {
|
||||
return reqAxios({
|
||||
url: `/api/fight/seatrReady?fightId=${fightId}`,
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
//房主开始游戏
|
||||
export const Playthegame = (fightId) => {
|
||||
return reqAxios({
|
||||
url: `/api/fight/fightBegin?fightId=${fightId}`,
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
//游戏结束
|
||||
/* /api/fight/fightEnd */
|
||||
export const Gameover = (fightId) => {
|
||||
return reqAxios({
|
||||
method: "get",
|
||||
url: `/api/fight/fightEnd?fightId=${fightId}`,
|
||||
});
|
||||
};
|
||||
|
||||
//保存对战回合
|
||||
export const saveFightBoutData = (data) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: "/api/fight/saveFightBoutData",
|
||||
data: data,
|
||||
});
|
||||
};
|
||||
//获取对战回合
|
||||
export const getFightBoutNum = (fightId) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: `/api/fight/getFightBoutNum/${fightId}`,
|
||||
});
|
||||
};
|
||||
//获取对战数据
|
||||
export const getFightData = (fightId) => {
|
||||
return reqAxios({
|
||||
url: `/api/fight/getFightData/${fightId}`,
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
//获取对战结果
|
||||
export const getFightResult = (fightId) => {
|
||||
return reqAxios({
|
||||
url: `/api/fight/getFightResult/${fightId}`,
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
//查询对战宝箱列表
|
||||
export const getFightBoxList = (data) => {
|
||||
return reqAxios({
|
||||
url: `/api/fight/getFightBoxList`,
|
||||
method: "get",
|
||||
params: data,
|
||||
});
|
||||
};
|
||||
//加入对战的验证
|
||||
export const joinFightverify = (fightId) => {
|
||||
return reqAxios({
|
||||
url: `/api/fight/joinFightRoom`,
|
||||
method: "post",
|
||||
params: fightId,
|
||||
});
|
||||
};
|
||||
|
||||
//加入对战
|
||||
export const joinFight = (data) => {
|
||||
return reqAxios({
|
||||
url: `/api/fight/joinFight`,
|
||||
method: "post",
|
||||
params: data,
|
||||
});
|
||||
};
|
||||
//对战宝箱饰品
|
||||
export const boxOrnament = (id) => {
|
||||
return reqAxios.get(
|
||||
`/api/fightAgainstBData/getFightAgainstBoxOrnamentsById?bid=${id}`
|
||||
);
|
||||
};
|
||||
|
||||
//我的对战
|
||||
export const getMyPartFightList = (data) => {
|
||||
return reqAxios({
|
||||
url: `/api/fight/getMyPartFightList`,
|
||||
method: "get",
|
||||
params: data,
|
||||
});
|
||||
};
|
||||
|
||||
//获取每一回合的对战结果
|
||||
export const getpkrealdetial = (data) => {
|
||||
return reqAxios({
|
||||
url: "/api/fight/getFightRecord",
|
||||
method: "get",
|
||||
params: data,
|
||||
});
|
||||
};
|
||||
|
||||
//追梦 获取饰品列表
|
||||
|
||||
export const deramlist = (data) => {
|
||||
return reqAxios({
|
||||
method: "get",
|
||||
url: `/api/luckyUpgrade/getOrnamentsList`,
|
||||
params: data,
|
||||
});
|
||||
};
|
||||
|
||||
//追梦
|
||||
export const deramrecord = (data) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: `/api/luckyUpgrade/getUpgradeRecord`,
|
||||
data,
|
||||
});
|
||||
};
|
||||
|
||||
//追梦
|
||||
export const deramupgrade = (data) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: `/api/luckyUpgrade/upgrade`,
|
||||
data: data,
|
||||
});
|
||||
};
|
||||
|
||||
//用户签到post
|
||||
export const getUserSign = (data) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: `/api/user/userSigin`,
|
||||
data,
|
||||
});
|
||||
};
|
||||
|
||||
//用户签到查询
|
||||
export const getUserSigndata = (data) => {
|
||||
return reqAxios.get(`/api/user/userSigninData?signDate=${data}`);
|
||||
};
|
||||
|
||||
//发送验证码 1注册 2登录 3修改手机号 4忘记密码
|
||||
export const getcode = (data) => {
|
||||
return reqAxios.post(`/api/sms/getVerifyCode`, data);
|
||||
// return reqAxios.post(`/sms/getVerifyCode?phonenumber=${data.phonenumber}&type=${data.type}`)
|
||||
};
|
||||
|
||||
//修改密码
|
||||
export const changePass = (data) => {
|
||||
return reqAxios.post("/api/user/forgetPassword", data);
|
||||
};
|
||||
|
||||
//充值查询
|
||||
export const getUserchong = () => {
|
||||
return reqAxios.get(`/api/ttCoinItem/getCoinItemList`);
|
||||
};
|
||||
|
||||
export const Recgargezfb = (data) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: `/api/jiujiaOrder/createOrder`,
|
||||
data,
|
||||
});
|
||||
};
|
||||
export const Recgargewx = (data) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: `/api/tianxinOrder/createOrder`,
|
||||
data,
|
||||
});
|
||||
};
|
||||
|
||||
//商城列表
|
||||
export const shoplist = (options) => {
|
||||
return reqAxios({
|
||||
method: "get",
|
||||
url: `/api/shopping/list`,
|
||||
params: options,
|
||||
});
|
||||
};
|
||||
//商城查询条件
|
||||
export const shopcondition = (value) => {
|
||||
return reqAxios({
|
||||
url: `/api/shopping/getShoppingQuery?value=` + value,
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
|
||||
// 商城物品兑换
|
||||
export const shopconvert = (options) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: `/api/shopping/exchange`,
|
||||
params: options,
|
||||
});
|
||||
};
|
||||
// 背包
|
||||
export const getPackSack = (data) => {
|
||||
return reqAxios({
|
||||
url: `/api/userPackSack/getPackSack`,
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
};
|
||||
|
||||
// 汰换
|
||||
export const updateReplacement = (data) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: `/api/skinsservice/replacementRecord/synthesizeItems`,
|
||||
data,
|
||||
});
|
||||
};
|
||||
// 收支明细
|
||||
export const getdetail = (pageSize = 15, pageNum = 1) => {
|
||||
return reqAxios.get(
|
||||
`/api/user/getBeanChangeRecords?pageSize=${pageSize}&pageNum=${pageNum}`
|
||||
);
|
||||
};
|
||||
|
||||
// 绑定交易链接
|
||||
export const giveMoneyAPI = (options) => {
|
||||
return reqAxios.post(`/api/user/bindSteamLink?steamLink=${options}`);
|
||||
};
|
||||
// 更新用户信息
|
||||
export const updateUserDetails = (data) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: "/api/user/updateUserDetails",
|
||||
data,
|
||||
});
|
||||
};
|
||||
// 更新用户头像信息
|
||||
export const updataavatar = (data) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: "/api/user/profilePictureUpload",
|
||||
data: data,
|
||||
});
|
||||
};
|
||||
// 绑定推广链接
|
||||
export const giveUserAPI = (options) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: `/api/user/bindInvitationCode?invitationCode=${options}`,
|
||||
});
|
||||
};
|
||||
|
||||
// 提货账单
|
||||
export const getExtractBillAPI = (data) => {
|
||||
return reqAxios.get(
|
||||
`/api/user/getDeliveryRecordList?status=${data}&pageSize=1000&pageNum=1`
|
||||
);
|
||||
};
|
||||
|
||||
//文章
|
||||
export const getArticle = (type) => {
|
||||
return reqAxios.get(`/api/websiteSetup/getContentByType/?alias=${type} `);
|
||||
};
|
||||
//查询宝箱分类
|
||||
export const boxesType = () => {
|
||||
return reqAxios.get("/api/bindbox/getBoxList");
|
||||
};
|
||||
|
||||
///api/battleRoyale/joinRoom
|
||||
export const getbigkillroom = (rankId, roomid, copies) => {
|
||||
return reqAxios.get(
|
||||
`/api/battleRoyale/joinRoom?rankId=${rankId}&roomId=${roomid}&copies=${copies}`
|
||||
);
|
||||
};
|
||||
export const getbigkilHistroy = (rankId) => {
|
||||
return reqAxios.get(`/api/battleRoyale/getHistoricalRecord?rankId=${rankId}`);
|
||||
};
|
||||
|
||||
//卡密 /prod-api/api/ttCoinItem/checkKM/{key}
|
||||
export const getkami = (id) => {
|
||||
return reqAxios.post(`/api/ttCoinItem/checkKM/${id}`);
|
||||
};
|
||||
|
||||
// 查询用户金币 /api/user/getUserRealTimeBean
|
||||
|
||||
export const getuserbean = () => {
|
||||
return reqAxios.get(`/api/user/getUserRealTimeBean`);
|
||||
};
|
||||
|
||||
// type 1 昨天 2 今天
|
||||
|
||||
export const getdiaoluo = () => {
|
||||
return reqAxios.get(`/api/user/propRankOfDay/${1}/1`);
|
||||
};
|
||||
|
||||
// /api/user/propRankOfDay
|
||||
|
||||
////api/websocket/skins
|
||||
//协议
|
||||
|
||||
export const getagreement = (id) => {
|
||||
return reqAxios.get(`/admin/content/${id}`);
|
||||
};
|
||||
//宝箱详情
|
||||
export const simpleBoxDetail = (boxId) => {
|
||||
// return reqAxios.get(`/api/fight/simpleBoxDetail/boxId=${boxId}`);
|
||||
return reqAxios({
|
||||
method: "get",
|
||||
url: "/api/fight/simpleBoxDetail",
|
||||
params: { boxId },
|
||||
// data:{boxId}
|
||||
});
|
||||
};
|
||||
//观战获取房间数据
|
||||
export const audience = (id) => {
|
||||
return reqAxios.get(`/api/fight/audience?fightId=${id}`);
|
||||
};
|
||||
//极速竞技退出房间/api/fight/fightRoomExit
|
||||
export const fightRoomExit = (data) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: "/api/fight/fightRoomExit",
|
||||
params: data,
|
||||
});
|
||||
};
|
||||
//我参与的
|
||||
export const fightOnMyOwn = (data) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: "/api/fight/fightOnMyOwn",
|
||||
data,
|
||||
});
|
||||
};
|
||||
//支付接口
|
||||
export const ApiAddTrans = (data) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: "/api/zyZFB/ApiAddTrans",
|
||||
params: data,
|
||||
});
|
||||
};
|
||||
//国富汇通
|
||||
export const ApiAdddgfht = (data) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: "/api/gfht/pay",
|
||||
data,
|
||||
});
|
||||
};
|
||||
|
||||
//排行榜
|
||||
export const blendErcashRank = (data) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: "/api/userAmountRecords/blendErcashRank",
|
||||
data,
|
||||
});
|
||||
};
|
||||
//获取团队信息
|
||||
export const teamUsers = (data) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: "/api/userAmountRecords/teamUsers",
|
||||
data,
|
||||
});
|
||||
};
|
||||
export const changePW = (data) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: "/api/user/changePW",
|
||||
data,
|
||||
});
|
||||
};
|
||||
//获取个人提货记录
|
||||
export const deliveryRecords = (data) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: "/api/userAmountRecords/deliveryRecords",
|
||||
data,
|
||||
});
|
||||
};
|
||||
//获取个人充值明细
|
||||
export const rechargeRecords = (data) => {
|
||||
return reqAxios({
|
||||
method: "get",
|
||||
url: "/api/order/list",
|
||||
params: data,
|
||||
});
|
||||
};
|
||||
//历史详情
|
||||
export const fightDetail = (data) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: "/api/fight/fightDetail",
|
||||
data,
|
||||
});
|
||||
};
|
||||
//roll房参与人员
|
||||
export const getRollPlayers = (data) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: "/api/roll/getRollPlayers",
|
||||
data,
|
||||
});
|
||||
};
|
||||
//roll房开奖详情
|
||||
export const getRollOpenPrize = (data) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: "/api/roll/getRollOpenPrize",
|
||||
data,
|
||||
});
|
||||
};
|
||||
//roll房奖池
|
||||
export const getRollPrizePool = (data) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: "/api/roll/getRollPrizePool",
|
||||
data,
|
||||
});
|
||||
};
|
||||
export const earlierHistory = (data) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: "/api/fight/earlierHistory",
|
||||
data,
|
||||
});
|
||||
};
|
||||
export const endRoll = (data) => {
|
||||
return reqAxios({
|
||||
method: "get",
|
||||
url: `/api/roll/endRoll/${data}`,
|
||||
});
|
||||
};
|
||||
export const packSackGlobalData = () => {
|
||||
return reqAxios({
|
||||
method: "get",
|
||||
url: `/api/userPackSack/packSackGlobalData`,
|
||||
});
|
||||
};
|
||||
|
||||
export const bindBoss = (data) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: `/api/user/bindBoss`,
|
||||
data,
|
||||
});
|
||||
};
|
||||
export const receiveRedPacket = (data) => {
|
||||
return reqAxios({
|
||||
method: "get",
|
||||
url: `/api/bonus/receiveRedPacket/${data}`,
|
||||
});
|
||||
};
|
||||
export const mayi = (data) => {
|
||||
return reqAxios({
|
||||
method: "post",
|
||||
url: `/api/mayi/ApiAddTrans`,
|
||||
data,
|
||||
});
|
||||
};
|
||||
export const getBoxList = (data) => {
|
||||
return reqAxios({
|
||||
method: "get",
|
||||
url: `/api/bindbox/getBoxList`,
|
||||
params:data,
|
||||
});
|
||||
};
|
||||
export const getBoxTypeList = (data) => {
|
||||
return reqAxios({
|
||||
method: "get",
|
||||
url: `/api/box/getBoxTypeList/${data.page}/${data.size}`,
|
||||
});
|
||||
};
|
||||
/* /api/bindbox/{boxId} */
|
||||
export const getDetail = (boxId) => {
|
||||
return reqAxios({
|
||||
method: "get",
|
||||
url: `/api/bindbox/${boxId}`,
|
||||
});
|
||||
};
|
||||
//vip等级
|
||||
export const welfareList = () => {
|
||||
return reqAxios({
|
||||
method: "get",
|
||||
url: `/api/welfare/getWelfareList`,
|
||||
});
|
||||
}
|
||||
///api/userAmountRecords/rechargeRanking 获取充值排行榜
|
||||
export const rechargeRanking = () => {
|
||||
return reqAxios({
|
||||
method: "get",
|
||||
url: `/api/userAmountRecords/rechargeRanking `,
|
||||
});
|
||||
}
|
||||
///api/userAmountRecords/rechargeRankingRewardsIntroduction
|
||||
export const rechargeRankingRewardsIntroduction = () => {
|
||||
return reqAxios({
|
||||
method: "get",
|
||||
url: `/api/userAmountRecords/rechargeRankingRewardsIntroduction`,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// /api/user/vipLevelIntroduction
|
||||
export const getviplist = () => {
|
||||
return reqAxios({
|
||||
method: "get",
|
||||
url: `/api/user/vipLevelIntroduction`,
|
||||
});
|
||||
}
|
||||
37
odcs2.com/src/api/scoket.js
Normal file
@@ -0,0 +1,37 @@
|
||||
// websocket.js
|
||||
|
||||
const WebSocketPlugin = {
|
||||
install(Vue, options) {
|
||||
|
||||
|
||||
const socket = new WebSocket(options.url);
|
||||
|
||||
Vue.prototype.$socket = socket;
|
||||
|
||||
socket.addEventListener('open', () => {
|
||||
console.log('WebSocket连接成功');
|
||||
});
|
||||
|
||||
socket.addEventListener('message', (event) => {
|
||||
console.log('Received message:', event.data);
|
||||
Vue.prototype.$emit('websocket-message', event.data);
|
||||
});
|
||||
|
||||
socket.addEventListener('close', (event) => {
|
||||
console.log('WebSocket连接关闭', event);
|
||||
Vue.prototype.$emit('websocket-close', event);
|
||||
});
|
||||
|
||||
socket.addEventListener('error', (error) => {
|
||||
console.error('WebSocket连接错误', error);
|
||||
Vue.prototype.$emit('websocket-error', error);
|
||||
});
|
||||
socket.close();
|
||||
this.$sockets.onclose = () => {
|
||||
console.log('WebSocket 连接已关闭');
|
||||
};
|
||||
|
||||
},
|
||||
};
|
||||
|
||||
export default WebSocketPlugin;
|
||||
BIN
odcs2.com/src/assets.zip
Normal file
BIN
odcs2.com/src/assets/01.mp3
Normal file
BIN
odcs2.com/src/assets/02.mp3
Normal file
BIN
odcs2.com/src/assets/1.mp3
Normal file
BIN
odcs2.com/src/assets/1.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
odcs2.com/src/assets/2.mp3
Normal file
BIN
odcs2.com/src/assets/3.mp3
Normal file
BIN
odcs2.com/src/assets/Ranking.png
Normal file
|
After Width: | Height: | Size: 125 KiB |
BIN
odcs2.com/src/assets/aaa.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
odcs2.com/src/assets/add.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
odcs2.com/src/assets/add2.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
odcs2.com/src/assets/beibao.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
odcs2.com/src/assets/beibao_sel2.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
odcs2.com/src/assets/bg-ByBHE7gk.png
Normal file
|
After Width: | Height: | Size: 499 KiB |
BIN
odcs2.com/src/assets/bottom-active.png
Normal file
|
After Width: | Height: | Size: 953 B |
BIN
odcs2.com/src/assets/bottom-bg.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
odcs2.com/src/assets/bottom/active-bg.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
odcs2.com/src/assets/bottom/beibao.png
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
odcs2.com/src/assets/bottom/chongzhi.png
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
odcs2.com/src/assets/bottom/shangcheng.png
Normal file
|
After Width: | Height: | Size: 153 KiB |
BIN
odcs2.com/src/assets/bottom/shouye.png
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
odcs2.com/src/assets/bottom/wode.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
odcs2.com/src/assets/box_moeny_bg.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
odcs2.com/src/assets/box_open.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
odcs2.com/src/assets/btn_bg.png
Normal file
|
After Width: | Height: | Size: 9.2 KiB |
BIN
odcs2.com/src/assets/bushiyingjia.png
Normal file
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 91 KiB |
BIN
odcs2.com/src/assets/createRoom.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
odcs2.com/src/assets/dengdai.png
Normal file
|
After Width: | Height: | Size: 76 KiB |
BIN
odcs2.com/src/assets/dream-bg.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
odcs2.com/src/assets/dream-btn-bg-active.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
odcs2.com/src/assets/dream-btn-bg.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
odcs2.com/src/assets/dream.mp4
Normal file
BIN
odcs2.com/src/assets/font/YouSheBiaoTiHei-2.ttf
Normal file
539
odcs2.com/src/assets/font/demo.css
Normal file
@@ -0,0 +1,539 @@
|
||||
/* Logo 字体 */
|
||||
@font-face {
|
||||
font-family: "iconfont logo";
|
||||
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
|
||||
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
|
||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
|
||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
|
||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
|
||||
}
|
||||
|
||||
.logo {
|
||||
font-family: "iconfont logo";
|
||||
font-size: 160px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
/* tabs */
|
||||
.nav-tabs {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.nav-tabs .nav-more {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
#tabs {
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
#tabs li {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
border-bottom: 2px solid transparent;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
margin-bottom: -1px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
|
||||
#tabs .active {
|
||||
border-bottom-color: #f00;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.tab-container .content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* 页面布局 */
|
||||
.main {
|
||||
padding: 30px 100px;
|
||||
width: 960px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.main .logo {
|
||||
color: #333;
|
||||
text-align: left;
|
||||
margin-bottom: 30px;
|
||||
line-height: 1;
|
||||
height: 110px;
|
||||
margin-top: -50px;
|
||||
overflow: hidden;
|
||||
*zoom: 1;
|
||||
}
|
||||
|
||||
.main .logo a {
|
||||
font-size: 160px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.helps {
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.helps pre {
|
||||
padding: 20px;
|
||||
margin: 10px 0;
|
||||
border: solid 1px #e7e1cd;
|
||||
background-color: #fffdef;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.icon_lists {
|
||||
width: 100% !important;
|
||||
overflow: hidden;
|
||||
*zoom: 1;
|
||||
}
|
||||
|
||||
.icon_lists li {
|
||||
width: 100px;
|
||||
margin-bottom: 10px;
|
||||
margin-right: 20px;
|
||||
text-align: center;
|
||||
list-style: none !important;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.icon_lists li .code-name {
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.icon_lists .icon {
|
||||
display: block;
|
||||
height: 100px;
|
||||
line-height: 100px;
|
||||
font-size: 42px;
|
||||
margin: 10px auto;
|
||||
color: #333;
|
||||
-webkit-transition: font-size 0.25s linear, width 0.25s linear;
|
||||
-moz-transition: font-size 0.25s linear, width 0.25s linear;
|
||||
transition: font-size 0.25s linear, width 0.25s linear;
|
||||
}
|
||||
|
||||
.icon_lists .icon:hover {
|
||||
font-size: 100px;
|
||||
}
|
||||
|
||||
.icon_lists .svg-icon {
|
||||
/* 通过设置 font-size 来改变图标大小 */
|
||||
width: 1em;
|
||||
/* 图标和文字相邻时,垂直对齐 */
|
||||
vertical-align: -0.15em;
|
||||
/* 通过设置 color 来改变 SVG 的颜色/fill */
|
||||
fill: currentColor;
|
||||
/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
|
||||
normalize.css 中也包含这行 */
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.icon_lists li .name,
|
||||
.icon_lists li .code-name {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* markdown 样式 */
|
||||
.markdown {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.markdown img {
|
||||
vertical-align: middle;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.markdown h1 {
|
||||
color: #404040;
|
||||
font-weight: 500;
|
||||
line-height: 40px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.markdown h2,
|
||||
.markdown h3,
|
||||
.markdown h4,
|
||||
.markdown h5,
|
||||
.markdown h6 {
|
||||
color: #404040;
|
||||
margin: 1.6em 0 0.6em 0;
|
||||
font-weight: 500;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.markdown h1 {
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.markdown h2 {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.markdown h3 {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.markdown h4 {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.markdown h5 {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.markdown h6 {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.markdown hr {
|
||||
height: 1px;
|
||||
border: 0;
|
||||
background: #e9e9e9;
|
||||
margin: 16px 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.markdown p {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.markdown>p,
|
||||
.markdown>blockquote,
|
||||
.markdown>.highlight,
|
||||
.markdown>ol,
|
||||
.markdown>ul {
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.markdown ul>li {
|
||||
list-style: circle;
|
||||
}
|
||||
|
||||
.markdown>ul li,
|
||||
.markdown blockquote ul>li {
|
||||
margin-left: 20px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.markdown>ul li p,
|
||||
.markdown>ol li p {
|
||||
margin: 0.6em 0;
|
||||
}
|
||||
|
||||
.markdown ol>li {
|
||||
list-style: decimal;
|
||||
}
|
||||
|
||||
.markdown>ol li,
|
||||
.markdown blockquote ol>li {
|
||||
margin-left: 20px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.markdown code {
|
||||
margin: 0 3px;
|
||||
padding: 0 5px;
|
||||
background: #eee;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.markdown strong,
|
||||
.markdown b {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown>table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0px;
|
||||
empty-cells: show;
|
||||
border: 1px solid #e9e9e9;
|
||||
width: 95%;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.markdown>table th {
|
||||
white-space: nowrap;
|
||||
color: #333;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown>table th,
|
||||
.markdown>table td {
|
||||
border: 1px solid #e9e9e9;
|
||||
padding: 8px 16px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.markdown>table th {
|
||||
background: #F7F7F7;
|
||||
}
|
||||
|
||||
.markdown blockquote {
|
||||
font-size: 90%;
|
||||
color: #999;
|
||||
border-left: 4px solid #e9e9e9;
|
||||
padding-left: 0.8em;
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.markdown blockquote p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.markdown .anchor {
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.markdown .waiting {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.markdown h1:hover .anchor,
|
||||
.markdown h2:hover .anchor,
|
||||
.markdown h3:hover .anchor,
|
||||
.markdown h4:hover .anchor,
|
||||
.markdown h5:hover .anchor,
|
||||
.markdown h6:hover .anchor {
|
||||
opacity: 1;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.markdown>br,
|
||||
.markdown>p>br {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
background: white;
|
||||
padding: 0.5em;
|
||||
color: #333333;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-meta {
|
||||
color: #969896;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-strong,
|
||||
.hljs-emphasis,
|
||||
.hljs-quote {
|
||||
color: #df5000;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-type {
|
||||
color: #a71d5d;
|
||||
}
|
||||
|
||||
.hljs-literal,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-attribute {
|
||||
color: #0086b3;
|
||||
}
|
||||
|
||||
.hljs-section,
|
||||
.hljs-name {
|
||||
color: #63a35c;
|
||||
}
|
||||
|
||||
.hljs-tag {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-attr,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo {
|
||||
color: #795da3;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
color: #55a532;
|
||||
background-color: #eaffea;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
color: #bd2c00;
|
||||
background-color: #ffecec;
|
||||
}
|
||||
|
||||
.hljs-link {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* 代码高亮 */
|
||||
/* PrismJS 1.15.0
|
||||
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
|
||||
/**
|
||||
* prism.js default theme for JavaScript, CSS and HTML
|
||||
* Based on dabblet (http://dabblet.com)
|
||||
* @author Lea Verou
|
||||
*/
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: black;
|
||||
background: none;
|
||||
text-shadow: 0 1px white;
|
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection,
|
||||
pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection,
|
||||
code[class*="language-"] ::-moz-selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection,
|
||||
pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection,
|
||||
code[class*="language-"] ::selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
@media print {
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
text-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:not(pre)>code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #f5f2f0;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre)>code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: slategray;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.boolean,
|
||||
.token.number,
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.deleted {
|
||||
color: #905;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
color: #690;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
color: #9a6e3a;
|
||||
background: hsla(0, 0%, 100%, .5);
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.keyword {
|
||||
color: #07a;
|
||||
}
|
||||
|
||||
.token.function,
|
||||
.token.class-name {
|
||||
color: #DD4A68;
|
||||
}
|
||||
|
||||
.token.regex,
|
||||
.token.important,
|
||||
.token.variable {
|
||||
color: #e90;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
306
odcs2.com/src/assets/font/demo_index.html
Normal file
@@ -0,0 +1,306 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>iconfont Demo</title>
|
||||
<link rel="shortcut icon" href="//img.alicdn.com/imgextra/i4/O1CN01Z5paLz1O0zuCC7osS_!!6000000001644-55-tps-83-82.svg" type="image/x-icon"/>
|
||||
<link rel="icon" type="image/svg+xml" href="//img.alicdn.com/imgextra/i4/O1CN01Z5paLz1O0zuCC7osS_!!6000000001644-55-tps-83-82.svg"/>
|
||||
<link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css">
|
||||
<link rel="stylesheet" href="demo.css">
|
||||
<link rel="stylesheet" href="iconfont.css">
|
||||
<script src="iconfont.js"></script>
|
||||
<!-- jQuery -->
|
||||
<script src="https://a1.alicdn.com/oss/uploads/2018/12/26/7bfddb60-08e8-11e9-9b04-53e73bb6408b.js"></script>
|
||||
<!-- 代码高亮 -->
|
||||
<script src="https://a1.alicdn.com/oss/uploads/2018/12/26/a3f714d0-08e6-11e9-8a15-ebf944d7534c.js"></script>
|
||||
<style>
|
||||
.main .logo {
|
||||
margin-top: 0;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.main .logo a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.main .logo .sub-title {
|
||||
margin-left: 0.5em;
|
||||
font-size: 22px;
|
||||
color: #fff;
|
||||
background: linear-gradient(-45deg, #3967FF, #B500FE);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="main">
|
||||
<h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" target="_blank">
|
||||
<img width="200" src="https://img.alicdn.com/imgextra/i3/O1CN01Mn65HV1FfSEzR6DKv_!!6000000000514-55-tps-228-59.svg">
|
||||
|
||||
<span class="sub-title">彩色字体</span>
|
||||
|
||||
</a></h1>
|
||||
<div class="nav-tabs">
|
||||
<ul id="tabs" class="dib-box">
|
||||
<li class="dib active"><span>Unicode</span></li>
|
||||
<li class="dib"><span>Font class</span></li>
|
||||
<li class="dib"><span>Symbol</span></li>
|
||||
</ul>
|
||||
|
||||
<a href="https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=4325432" target="_blank" class="nav-more">查看项目</a>
|
||||
|
||||
</div>
|
||||
<div class="tab-container">
|
||||
<div class="content unicode" style="display: block;">
|
||||
<ul class="icon_lists dib-box">
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">小丑</div>
|
||||
<div class="code-name">&#xe656;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">皇冠</div>
|
||||
<div class="code-name">&#xe607;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">皇冠</div>
|
||||
<div class="code-name">&#xe676;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">背景音乐-调皮</div>
|
||||
<div class="code-name">&#xe626;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">皇冠</div>
|
||||
<div class="code-name">&#xe654;</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<div class="article markdown">
|
||||
<h2 id="unicode-">Unicode 引用</h2>
|
||||
<hr>
|
||||
|
||||
<p>Unicode 是字体在网页端最原始的应用方式,特点是:</p>
|
||||
<ul>
|
||||
<li>支持按字体的方式去动态调整图标大小,颜色等等。</li>
|
||||
<li>默认情况下不支持多色,直接添加多色图标会自动去色。</li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<p>注意:新版 iconfont 支持两种方式引用多色图标:SVG symbol 引用方式和彩色字体图标模式。(使用彩色字体图标需要在「编辑项目」中开启「彩色」选项后并重新生成。)</p>
|
||||
</blockquote>
|
||||
<p>Unicode 使用步骤如下:</p>
|
||||
<h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</code></h3>
|
||||
<pre><code class="language-css"
|
||||
>@font-face {
|
||||
font-family: 'iconfont';
|
||||
src:
|
||||
url('iconfont.woff2?t=1699606514058') format('woff2'),
|
||||
url('iconfont.woff?t=1699606514058') format('woff'),
|
||||
url('iconfont.ttf?t=1699606514058') format('truetype');
|
||||
}
|
||||
</code></pre>
|
||||
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
|
||||
<pre><code class="language-css"
|
||||
>.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
</code></pre>
|
||||
<h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3>
|
||||
<pre>
|
||||
<code class="language-html"
|
||||
><span class="iconfont">&#x33;</span>
|
||||
</code></pre>
|
||||
<blockquote>
|
||||
<p>"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
|
||||
</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content font-class">
|
||||
<ul class="icon_lists dib-box">
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-xiaochou"></span>
|
||||
<div class="name">
|
||||
小丑
|
||||
</div>
|
||||
<div class="code-name">.icon-xiaochou
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-huangguan"></span>
|
||||
<div class="name">
|
||||
皇冠
|
||||
</div>
|
||||
<div class="code-name">.icon-huangguan
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-huangguan1"></span>
|
||||
<div class="name">
|
||||
皇冠
|
||||
</div>
|
||||
<div class="code-name">.icon-huangguan1
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-beijingyinle-tiaopi"></span>
|
||||
<div class="name">
|
||||
背景音乐-调皮
|
||||
</div>
|
||||
<div class="code-name">.icon-beijingyinle-tiaopi
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-huangguan2"></span>
|
||||
<div class="name">
|
||||
皇冠
|
||||
</div>
|
||||
<div class="code-name">.icon-huangguan2
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<div class="article markdown">
|
||||
<h2 id="font-class-">font-class 引用</h2>
|
||||
<hr>
|
||||
|
||||
<p>font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。</p>
|
||||
<p>与 Unicode 使用方式相比,具有如下特点:</p>
|
||||
<ul>
|
||||
<li>相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。</li>
|
||||
<li>因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。</li>
|
||||
</ul>
|
||||
<p>使用步骤如下:</p>
|
||||
<h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3>
|
||||
<pre><code class="language-html"><link rel="stylesheet" href="./iconfont.css">
|
||||
</code></pre>
|
||||
<h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3>
|
||||
<pre><code class="language-html"><span class="iconfont icon-xxx"></span>
|
||||
</code></pre>
|
||||
<blockquote>
|
||||
<p>"
|
||||
iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
|
||||
</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content symbol">
|
||||
<ul class="icon_lists dib-box">
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-xiaochou"></use>
|
||||
</svg>
|
||||
<div class="name">小丑</div>
|
||||
<div class="code-name">#icon-xiaochou</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-huangguan"></use>
|
||||
</svg>
|
||||
<div class="name">皇冠</div>
|
||||
<div class="code-name">#icon-huangguan</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-huangguan1"></use>
|
||||
</svg>
|
||||
<div class="name">皇冠</div>
|
||||
<div class="code-name">#icon-huangguan1</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-beijingyinle-tiaopi"></use>
|
||||
</svg>
|
||||
<div class="name">背景音乐-调皮</div>
|
||||
<div class="code-name">#icon-beijingyinle-tiaopi</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-huangguan2"></use>
|
||||
</svg>
|
||||
<div class="name">皇冠</div>
|
||||
<div class="code-name">#icon-huangguan2</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<div class="article markdown">
|
||||
<h2 id="symbol-">Symbol 引用</h2>
|
||||
<hr>
|
||||
|
||||
<p>这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
|
||||
这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:</p>
|
||||
<ul>
|
||||
<li>支持多色图标了,不再受单色限制。</li>
|
||||
<li>通过一些技巧,支持像字体那样,通过 <code>font-size</code>, <code>color</code> 来调整样式。</li>
|
||||
<li>兼容性较差,支持 IE9+,及现代浏览器。</li>
|
||||
<li>浏览器渲染 SVG 的性能一般,还不如 png。</li>
|
||||
</ul>
|
||||
<p>使用步骤如下:</p>
|
||||
<h3 id="-symbol-">第一步:引入项目下面生成的 symbol 代码:</h3>
|
||||
<pre><code class="language-html"><script src="./iconfont.js"></script>
|
||||
</code></pre>
|
||||
<h3 id="-css-">第二步:加入通用 CSS 代码(引入一次就行):</h3>
|
||||
<pre><code class="language-html"><style>
|
||||
.icon {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
vertical-align: -0.15em;
|
||||
fill: currentColor;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
</code></pre>
|
||||
<h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3>
|
||||
<pre><code class="language-html"><svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-xxx"></use>
|
||||
</svg>
|
||||
</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('.tab-container .content:first').show()
|
||||
|
||||
$('#tabs li').click(function (e) {
|
||||
var tabContent = $('.tab-container .content')
|
||||
var index = $(this).index()
|
||||
|
||||
if ($(this).hasClass('active')) {
|
||||
return
|
||||
} else {
|
||||
$('#tabs li').removeClass('active')
|
||||
$(this).addClass('active')
|
||||
|
||||
tabContent.hide().eq(index).fadeIn()
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
37
odcs2.com/src/assets/font/iconfont.css
Normal file
@@ -0,0 +1,37 @@
|
||||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 4325432 */
|
||||
/* Color fonts */
|
||||
src:
|
||||
url('iconfont.woff2?t=1699606514058') format('woff2'),
|
||||
url('iconfont.woff?t=1699606514058') format('woff'),
|
||||
url('iconfont.ttf?t=1699606514058') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-xiaochou:before {
|
||||
content: "\e656";
|
||||
}
|
||||
|
||||
.icon-huangguan:before {
|
||||
content: "\e607";
|
||||
}
|
||||
|
||||
.icon-huangguan1:before {
|
||||
content: "\e676";
|
||||
}
|
||||
|
||||
.icon-beijingyinle-tiaopi:before {
|
||||
content: "\e626";
|
||||
}
|
||||
|
||||
.icon-huangguan2:before {
|
||||
content: "\e654";
|
||||
}
|
||||
|
||||