# paypard-kr **Repository Path**: qianyou/paypard-kr ## Basic Information - **Project Name**: paypard-kr - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-02-26 - **Last Updated**: 2025-03-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # web版儲值页 ### 开发环境配置 1. 设置本地host: ``` 127.0.0.1 loc.test-chargehub-front.gaming.com ``` 2. 开启 **--disable-web-security** 解决登入跨域问题 Windows,创建个chrome新快捷方式,加上参数 ``` --disable-web-security --user-data-dir="C:\chrome_dev" ``` Mac,工程目录里加个 dev.sh ``` #!/bin/bash open -n -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --ignore-certificate-errors --user-data-dir="设置为自己需要的目录" --disable-web-security "https://loc.test-chargehub-front.gaming.com:17173" npm start ``` 3. 本地支持HTTPS,用mkcert生成证书,配置到vue.config.js 4. nvm切到指定环境 node v16.x 5. npm start 启动本地服务器 6. PC访问:https://loc.test-chargehub-front.gaming.com:17173/ 7. 移动访问:https://loc.test-chargehub-front.gaming.com:17173/index-m.html ### 发布测试环境 1. 访问:https://test-payment.haikyu-flyhigh.kr/ 2. 登录授权帐号以及游戏账号找测试要 3. 为了便于测试,代码是发布到1ycdn.com 发布到测试环境: ``` npm run build-test kick test ``` ### 发布到线上 将文件打包成zip通过ftp上传. zip内目录对应cdn根目录 1. npm run build 2. 打包zip zip包内路径: 项目名称/环境 其中项目名称为.env文件中配置的EYPAY_BASEPATH 环境即build后dist里对应的文件夹(如test, production),完整复制到zip包内 3. 将zip上传到ftp根目录(ftp权限找昭宏申请) 4. 可以创建 ftp.sh,每次发布自动zip并备份到bak目录(便于快速回滚) ``` #!/bin/bash cd ./dist rm -rf paypardkr mkdir paypardkr cp -r ./production ./paypardkr zip -r paypardkr.zip ./paypardkr -x "*.DS_Store" curl -T ./paypardkr.zip ftp://chargehubcdn.gaming.com:密码@xx.xx.xx.xx:2121/ && { cd .. # 读取 .env 文件中的 EYPAY_VERSION 变量的值 EYPAY_VERSION=$(grep '^EYPAY_VERSION=' .env | cut -d '=' -f2 | tr -d '"') # 创建目录 mkdir -p "bak/$EYPAY_VERSION" # 复制文件 cp -f -r ./dist/paypardkr.zip ./bak/$EYPAY_VERSION } ``` 线上cdn地址示例: https://chargehubcdn.gaming.com/paypardkr/production/bootstrap.js https://chargehubcdn.gaming.com/paypardkr/production/0.1.0.0032/main.js ## 目录说明 | 目录/文件 | 说明 | 备注 | | ------ | ---- | -------- | | bak | 生产环境打包后的ZIP存放目录 | 用于本地快速回滚用 | | dist | 生产环境打包后目录 || | src | 工程代码 || | static | 公共的基础文件 || | .env | 配置版本号、打包后的工程目录名 || | index.html | 仅本地开发PC页 |正式的页面是放在JAVA工程里| | index-m.html | 仅本地开发移动页 |正式的页面是放在JAVA工程里| | vue.config.js | 开发配置文件 || | src/main.js | 入口文件 | | | src/App.vue | PC页 || | src/App-m.vue | 移动页 || | src/bootstrap.js | 入口文件加载器 | 只负责加载main.js | | src/constants.js | 常量 |包括数数埋点名称| | src/routerPlugin.js | 路由 |暂未用| | src/state.js | 全局状态管理 || | src/service.js | 处理数据请求 || | src/auth.js | 登录相关逻辑 || | src/funs | 业务逻辑代码 || | src/i18n | 语言包 || ## mock ### 编译参数 EYPAY_DEPLOY_TO_DEV 设置为true,发布到测试环境时,会使用dev接口(一般不需要,只有测试需要使用dev环境时才这样做) ### 登入 测试环境 https://test-i.qaminq.com key=A西游配置(坚果+第三方) key=B排少配置(仅第三方) game=1678096471052(游戏appkey) proiect=chargehub (来源) aes秘钥 chargehub=2Fuby5VgM7Xmafbm 正式 https://i.gaming.com key=A西游配置(坚果+第三方) key=B排少配置(仅第三方) game=1678096471052(游戏appkey) project=chargehub (来源) aes秘钥 chargehub=AQJMxJehSeKc5Sxc # 每次发布后预热URL(目前是给系统组同学预热) https://chargehubcdn.gaming.com/paypardkr/production/bootstrap.js https://chargehubcdn.gaming.com/paypardkr/production/bootstrap.js.map https://chargehubcdn.gaming.com/paypardkr/production/config.js https://chargehubcdn.gaming.com/paypardkr/production/config.js.map https://chargehubcdn.gaming.com/paypardkr/production/0.1.5.004/main.js https://chargehubcdn.gaming.com/paypardkr/production/0.1.5.004/main.js.map https://chargehubcdn.gaming.com/paypardkr/production/0.1.5.004/img/bg-fail.png https://chargehubcdn.gaming.com/paypardkr/production/0.1.5.004/img/bg-success.png https://chargehubcdn.gaming.com/paypardkr/production/0.1.5.004/img/bg-top.jpg https://chargehubcdn.gaming.com/paypardkr/production/0.1.5.004/img/btn-pay.png https://chargehubcdn.gaming.com/paypardkr/production/0.1.5.004/img/ico-card.png https://chargehubcdn.gaming.com/paypardkr/production/0.1.5.004/img/ico-gash-tw.png https://chargehubcdn.gaming.com/paypardkr/production/0.1.5.004/img/ico-gash.png https://chargehubcdn.gaming.com/paypardkr/production/0.1.5.004/img/img-145x145.jpg https://chargehubcdn.gaming.com/paypardkr/production/0.1.5.004/img/item-bd-active.jpg https://chargehubcdn.gaming.com/paypardkr/production/0.1.5.004/img/logo-cy.png https://chargehubcdn.gaming.com/paypardkr/production/0.1.5.004/img/logo.png https://chargehubcdn.gaming.com/paypardkr/production/0.1.5.004/img/m-btn-pay.png https://chargehubcdn.gaming.com/paypardkr/production/0.1.5.004/img/m-logo.png https://chargehubcdn.gaming.com/paypardkr/production/0.1.5.004/img/m-top.jpg https://chargehubcdn.gaming.com/paypardkr/production/0.1.5.004/img/mark-type-fp.png https://chargehubcdn.gaming.com/paypardkr/production/0.1.5.004/img/pay-e.png https://chargehubcdn.gaming.com/paypardkr/production/0.1.5.004/img/pay-toss.png https://chargehubcdn.gaming.com/slimemolds/production/js/bootstrap.js https://chargehubcdn.gaming.com/frontend/lib/css/reset-2.2.css https://chargehubcdn.gaming.com/slimemolds/production/js/config.js https://chargehubcdn.gaming.com/slimemolds/production/js/0.3.6/dsm.js