患者端
commit
60ad84a505
|
@ -0,0 +1,14 @@
|
|||
# 对所有文件有效 //[*js]只对js文件有效
|
||||
[*]
|
||||
#设置编码格式
|
||||
charset = utf-8
|
||||
#缩进类型 可选space和tab
|
||||
indent_style = space
|
||||
#缩进数量可选整数值2 or 4,或者tab
|
||||
indent_size = 2
|
||||
#换行符的格式
|
||||
end_of_line = lf
|
||||
# 是否在文件的最后插入一个空行 可选true和false
|
||||
insert_final_newline = true
|
||||
# 是否删除行尾的空格 可选择true和false
|
||||
trim_trailing_whitespace = true
|
|
@ -0,0 +1,2 @@
|
|||
src/*.js
|
||||
*.js
|
|
@ -0,0 +1,34 @@
|
|||
module.exports = {
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es2021": true
|
||||
},
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:react/recommended"
|
||||
],
|
||||
"overrides": [{
|
||||
"env": {
|
||||
"node": true
|
||||
},
|
||||
"files": [
|
||||
".eslintrc.{js,cjs}"
|
||||
],
|
||||
"parserOptions": {
|
||||
"sourceType": "script"
|
||||
}
|
||||
}],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": "latest",
|
||||
"sourceType": "module"
|
||||
},
|
||||
"plugins": [
|
||||
"@typescript-eslint",
|
||||
"react"
|
||||
],
|
||||
"rules": {
|
||||
"react/no-unknown-property": 'off'
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
### 该问题是怎么引起的?
|
||||
|
||||
|
||||
|
||||
### 重现步骤
|
||||
|
||||
|
||||
|
||||
### 报错信息
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
### 一、内容说明(相关的Issue)
|
||||
|
||||
|
||||
|
||||
### 二、建议测试周期和提测地址
|
||||
建议测试完成时间:xxxx.xx.xx
|
||||
投产上线时间:xxxx.xx.xx
|
||||
提测地址:CI环境/压测环境
|
||||
测试账号:
|
||||
|
||||
### 三、变更内容
|
||||
* 3.1 关联PR列表
|
||||
|
||||
* 3.2 数据库和部署说明
|
||||
1. 常规更新
|
||||
2. 重启unicorn
|
||||
3. 重启sidekiq
|
||||
4. 迁移任务:是否有迁移任务,没有写 "无"
|
||||
5. rake脚本:`bundle exec xxx RAILS_ENV = production`;没有写 "无"
|
||||
|
||||
* 3.4 其他技术优化内容(做了什么,变更了什么)
|
||||
- 重构了 xxxx 代码
|
||||
- xxxx 算法优化
|
||||
|
||||
|
||||
* 3.5 废弃通知(什么字段、方法弃用?)
|
||||
|
||||
|
||||
|
||||
* 3.6 后向不兼容变更(是否有无法向后兼容的变更?)
|
||||
|
||||
|
||||
|
||||
### 四、研发自测点(自测哪些?冒烟用例全部自测?)
|
||||
自测测试结论:
|
||||
|
||||
|
||||
### 五、测试关注点(需要提醒QA重点关注的、可能会忽略的地方)
|
||||
检查点:
|
||||
|
||||
| 需求名称 | 是否影响xx公共模块 | 是否需要xx功能 | 需求升级是否依赖其他子产品 |
|
||||
|------|------------|----------|---------------|
|
||||
| xxx | 否 | 需要 | 不需要 |
|
||||
| | | | |
|
||||
|
||||
接口测试:
|
||||
|
||||
性能测试:
|
||||
|
||||
并发测试:
|
||||
|
||||
其他:
|
||||
|
|
@ -0,0 +1,116 @@
|
|||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
lerna-debug.log*
|
||||
|
||||
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
*.lcov
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# Bower dependency directory (https://bower.io/)
|
||||
bower_components
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# Snowpack dependency directory (https://snowpack.dev/)
|
||||
web_modules/
|
||||
|
||||
# TypeScript cache
|
||||
*.tsbuildinfo
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Microbundle cache
|
||||
.rpt2_cache/
|
||||
.rts2_cache_cjs/
|
||||
.rts2_cache_es/
|
||||
.rts2_cache_umd/
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
.env.test
|
||||
|
||||
# parcel-bundler cache (https://parceljs.org/)
|
||||
.cache
|
||||
.parcel-cache
|
||||
|
||||
# Next.js build output
|
||||
.next
|
||||
out
|
||||
|
||||
# Nuxt.js build / generate output
|
||||
.nuxt
|
||||
dist
|
||||
|
||||
# Gatsby files
|
||||
.cache/
|
||||
# Comment in the public line in if your project uses Gatsby and not Next.js
|
||||
# https://nextjs.org/blog/next-9-1#public-directory-support
|
||||
# public
|
||||
|
||||
# vuepress build output
|
||||
.vuepress/dist
|
||||
|
||||
# Serverless directories
|
||||
.serverless/
|
||||
|
||||
# FuseBox cache
|
||||
.fusebox/
|
||||
|
||||
# DynamoDB Local files
|
||||
.dynamodb/
|
||||
|
||||
# TernJS port file
|
||||
.tern-port
|
||||
|
||||
# Stores VSCode versions used for testing VSCode extensions
|
||||
.vscode-test
|
||||
|
||||
# yarn v2
|
||||
.yarn/cache
|
||||
.yarn/unplugged
|
||||
.yarn/build-state.yml
|
||||
.yarn/install-state.gz
|
||||
.pnp.*
|
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
npm run commitlint
|
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
npm run eslint
|
|
@ -0,0 +1,8 @@
|
|||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" defaultCharsetForPropertiesFiles="UTF-8">
|
||||
<file url="PROJECT" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,6 @@
|
|||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/dimensional-health.iml" filepath="$PROJECT_DIR$/.idea/dimensional-health.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,6 @@
|
|||
# list file to not track by the local-history extension. comment line starts with a '#' character
|
||||
# each line describe a regular expression pattern (search for 'Javascript regex')
|
||||
# it will relate to the workspace directory root. for example:
|
||||
# '.*\.txt' ignores any file with 'txt' extension
|
||||
# '/test/.*' ignores all the files under the 'test' directory
|
||||
# '.*/test/.*' ignores all the files under any 'test' directory (even under sub-folders)
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"sourceFile": "src/App.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 1,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689298706393,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689298732919,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,8 +1,7 @@\n import React from \"react\";\r\n import Router from \"./router\";\r\n import { StartPage } from \"./components\";\r\n-import { NavBar } from \"react-vant\";\r\n import \"./App.css\";\r\n function App() {\r\n return (\r\n <>\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689298706393,
|
||||
"name": "Commit-0",
|
||||
"content": "import React from \"react\";\r\nimport Router from \"./router\";\r\nimport { StartPage } from \"./components\";\r\nimport { NavBar } from 'react-vant';\r\nimport \"./App.css\";\r\nfunction App() {\r\n return (\r\n <>\r\n <StartPage></StartPage>\r\n <Router></Router>\r\n </>\r\n );\r\n}\r\n\r\nexport default App;\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/api/index.ts",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689679850033,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689682269336,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -36,8 +36,20 @@\n export function putHttp() {\r\n return;\r\n }\r\n \r\n+export function putHttpJSON(url: string, data = {}, headers = {}) {\r\n+ return;request({\r\n+ url,\r\n+ method: \"post\",\r\n+ data: data,\r\n+ headers: {\r\n+ ...headers,\r\n+ \"Content-Type\": \"application/json;charset=utf-8\",\r\n+ },\r\n+ });\r\n+}\r\n+\r\n export function deleteHttp(url: string, params = {}, headers = {}) {\r\n return request({\r\n url,\r\n method: \"delete\",\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689682287718,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -39,9 +39,9 @@\n \r\n export function putHttpJSON(url: string, data = {}, headers = {}) {\r\n return request({\r\n url,\r\n- method: \"post\",\r\n+ method: \"put\",\r\n data: data,\r\n headers: {\r\n ...headers,\r\n \"Content-Type\": \"application/json;charset=utf-8\",\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689679850033,
|
||||
"name": "Commit-0",
|
||||
"content": "import request from \"../service/request\";\r\n\r\nexport function getHttp(url: string, params = {}, headers = {}) {\r\n return request({\r\n url,\r\n method: 'get',\r\n params: params,\r\n headers: headers\r\n })\r\n}\r\n\r\nexport function postHttp(url: string, data = {}, headers = {}) {\r\n return request({\r\n url,\r\n method: 'post',\r\n data: data,\r\n headers: {\r\n ...headers,\r\n \"Content-Type\": \"application/x-www-form-urlencoded\"\r\n }\r\n })\r\n}\r\n\r\nexport function postHttpJSON(url: string, data = {}, headers = {}) {\r\n return request({\r\n url,\r\n method: 'post',\r\n data: data,\r\n headers: {\r\n ...headers,\r\n \"Content-Type\": \"application/json;charset=utf-8\"\r\n }\r\n })\r\n}\r\n\r\n\r\nexport function putHttp() {\r\n return \r\n}\r\n\r\nexport function deleteHttp(url: string, params = {}, headers = {}) {\r\n return request({\r\n url,\r\n method: 'delete',\r\n params: params,\r\n headers: headers\r\n })\r\n}\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"sourceFile": "src/api/my/index.ts",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 3,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689678485589,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689678568928,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,6 +1,20 @@\n import { getHttp } from \"..\";\r\n \r\n+// 我的档案(添加-编辑) 档案数据类型\r\n+interface myProFileRawState {\r\n+ diseaseBefore: string;\r\n+ diseaseMain: string;\r\n+ diseaseNow: string;\r\n+ archivesId: number;\r\n+ picture: string;\r\n+ treatmentEndTime: number;\r\n+ treatmentHospitalRecent: string;\r\n+ treatmentProcess: string;\r\n+ treatmentStartTime: number;\r\n+ userId: number;\r\n+ }\r\n+\r\n // 定义获取用户自己档案的函数\r\n export const getProFile = (userId: number, sessionId: string) =>\r\n getHttp(\r\n \"/health/user/verify/v1/findUserArchives\",\r\n@@ -9,4 +23,27 @@\n userId,\r\n sessionId,\r\n }\r\n );\r\n+\r\n+// 定义添加用户档案的函数\r\n+const addProFile = (\r\n+ myProFile: myProFileRawState,\r\n+ userId: number,\r\n+ sessionId: string\r\n+ ) =>\r\n+ postHttpJSON(\r\n+ \"/health/user/verify/v1/addUserArchives\",\r\n+ {\r\n+ diseaseMain: myProFile.diseaseMain,\r\n+ diseaseNow: myProFile.diseaseNow,\r\n+ diseaseBefore: myProFile.diseaseBefore,\r\n+ treatmentHospitalRecent: myProFile.treatmentHospitalRecent,\r\n+ treatmentProcess: myProFile.treatmentProcess,\r\n+ treatmentStartTime: \"2018-12-10\",\r\n+ treatmentEndTime: \"2018-12-15\",\r\n+ },\r\n+ {\r\n+ userId,\r\n+ sessionId,\r\n+ }\r\n+ );\n\\ No newline at end of file\n"
|
||||
},
|
||||
{
|
||||
"date": 1689678620183,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,5 +1,5 @@\n-import { getHttp } from \"..\";\r\n+import { getHttp, postHttpJSON } from \"..\";\r\n \r\n // 我的档案(添加-编辑) 档案数据类型\r\n interface myProFileRawState {\r\n diseaseBefore: string;\r\n@@ -25,9 +25,9 @@\n }\r\n );\r\n \r\n // 定义添加用户档案的函数\r\n-const addProFile = (\r\n+export const addProFile = (\r\n myProFile: myProFileRawState,\r\n userId: number,\r\n sessionId: string\r\n ) =>\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689679720027,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -46,4 +46,10 @@\n userId,\r\n sessionId,\r\n }\r\n );\r\n+\r\n+// 定义删除用户档案的函数\r\n+export const deleteProFile = (\r\n+ archivesId:number,userId: number,\r\n+ sessionId: string\r\n+)\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689678485589,
|
||||
"name": "Commit-0",
|
||||
"content": "import { getHttp } from \"..\";\r\n\r\n// 定义获取用户自己档案的函数\r\nexport const getProFile = (userId: number, sessionId: string) =>\r\n getHttp(\r\n \"/health/user/verify/v1/findUserArchives\",\r\n {},\r\n {\r\n userId,\r\n sessionId,\r\n }\r\n );"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/components/consultationCell/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689247753779,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689248258766,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,13 +1,22 @@\n import React from \"react\";\r\n import style from \"./style.module.scss\";\r\n+import nextIcon from \"../../assets/images/icon/common resource/hdpi/my_icon_next_n.png\";\r\n \r\n interface PropsType {\r\n consultationText: string;\r\n consultationIcon: string;\r\n }\r\n \r\n-export const ConsultationCell: React.FC<PropsType> = (props) => {\r\n- return <div></div>;\r\n+export const ConsultationCell: React.FC<PropsType> = ({consultationIcon,consultationText}) => {\r\n+ return <div className={style.consultation_cell}> \r\n+ <div className={style.consultation}>\r\n+ <img src={style.consultationIcon} alt=\"\" className={style.consultationIcon} />\r\n+ <span className={style.consultationText}>{consultationText}</span>\r\n+ </div>\r\n+ <div className=\"next\">\r\n+ <img src={nextIcon} alt=\"\" className={style.nextIcon} />\r\n+ </div>\r\n+ </div>;\r\n };\r\n \r\n export default ConsultationCell;\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689248603560,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -6,26 +6,17 @@\n consultationText: string;\r\n consultationIcon: string;\r\n }\r\n \r\n-export const ConsultationCell: React.FC<PropsType> = ({\r\n- consultationIcon,\r\n- consultationText,\r\n-}) => {\r\n- return (\r\n- <div className={style.consultation_cell}>\r\n- <div className={style.consultation}>\r\n- <img\r\n- src={style.consultationIcon}\r\n- alt=\"\"\r\n- className={style.consultationIcon}\r\n- />\r\n- <span className={style.consultationText}>{consultationText}</span>\r\n- </div>\r\n- <div className=\"next\">\r\n- <img src={nextIcon} alt=\"\" className={style.nextIcon} />\r\n- </div>\r\n- </div>\r\n- );\r\n+export const ConsultationCell: React.FC<PropsType> = ({consultationIcon,consultationText}) => {\r\n+ return <div className={style.consultation_cell}> \r\n+ <div className={style.consultation}>\r\n+ <img src={consultationIcon} alt=\"\" className={style.consultationIcon} />\r\n+ <span className={style.consultationText}>{consultationText}</span>\r\n+ </div>\r\n+ <div className=\"next\">\r\n+ <img src={nextIcon} alt=\"\" className={style.nextIcon} />\r\n+ </div>\r\n+ </div>;\r\n };\r\n \r\n export default ConsultationCell;\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689247753778,
|
||||
"name": "Commit-0",
|
||||
"content": "import React from 'react'\r\nimport style from './style.module.scss'\r\n\r\ninterface PropsType {\r\n consultationText:string,\r\n consultationIcon:string\r\n}\r\n\r\nexport const ConsultationCell:React.FC<PropsType> = (props) => {\r\n return (\r\n <div>\r\n\r\n </div>\r\n )\r\n}\r\n\r\n\r\nexport default ConsultationCell"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"sourceFile": "src/components/consultationCell/style.module.scss",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 1,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689248193467,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689248232911,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,18 +1,18 @@\n-.currentConsultation_cell {\r\n+.consultation_cell {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n margin-bottom: 10px;\r\n- .currentConsultation {\r\n+ .consultation {\r\n display: flex;\r\n align-items: center;\r\n- .currentImg {\r\n+ .consultationIcon {\r\n width: 40px;\r\n height: 40px;\r\n margin-right: 20px;\r\n }\r\n- .currentText {\r\n+ .consultationText {\r\n font-size: 14px;\r\n color: #333;\r\n font-weight: bold;\r\n }\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689248193467,
|
||||
"name": "Commit-0",
|
||||
"content": "\r\n .currentConsultation_cell {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n margin-bottom: 10px;\r\n .currentConsultation {\r\n display: flex;\r\n align-items: center;\r\n .currentImg {\r\n width: 40px;\r\n height: 40px;\r\n margin-right: 20px;\r\n }\r\n .currentText {\r\n font-size: 14px;\r\n color: #333;\r\n font-weight: bold;\r\n }\r\n }\r\n .next {\r\n .nextIcon {\r\n width: 24px;\r\n height: 24px;\r\n }\r\n }\r\n }\r\n .historyConsultation_cell {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n .historyConsultation {\r\n display: flex;\r\n align-items: center;\r\n .historyImg {\r\n width: 40px;\r\n height: 40px;\r\n margin-right: 20px;\r\n }\r\n .historyText {\r\n font-size: 14px;\r\n color: #333;\r\n font-weight: bold;\r\n }\r\n }\r\n .next {\r\n .nextIcon {\r\n width: 24px;\r\n height: 24px;\r\n }\r\n }\r\n }\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/components/emptyPage/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689296686500,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689299199953,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,7 +1,14 @@\n import React from \"react\";\r\n \r\n export const EmptyPage = (props) => {\r\n- return <div>index</div>;\r\n+ return <div>\r\n+ <NavBar\r\n+ title=\"我的档案\"\r\n+ onClickLeft={() => {\r\n+ navigate(\"../index\");\r\n+ }}\r\n+ />\r\n+ </div>;\r\n };\r\n \r\n export default EmptyPage;\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689299252934,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,11 +1,15 @@\n+import { title } from \"process\";\r\n import React from \"react\";\r\n+import { useNavigate } from \"react-router-dom\";\r\n+import { NavBar } from \"react-vant\";\r\n \r\n export const EmptyPage = (props) => {\r\n+ const navigate = useNavigate()\r\n return (\r\n <div>\r\n <NavBar\r\n- title=\"我的档案\"\r\n+ title={title}\r\n onClickLeft={() => {\r\n navigate(\"../index\");\r\n }}\r\n />\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689296686500,
|
||||
"name": "Commit-0",
|
||||
"content": "import React from 'react'\r\n\r\n\r\nexport const EmptyPage = (props) => {\r\n return (\r\n <div>index</div>\r\n )\r\n}\r\n\r\n\r\nexport default EmptyPage"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"sourceFile": "src/components/emptyPage/style.module.scss",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 3,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689296582562,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689301474942,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -0,0 +1,3 @@\n+.navbar{\r\n+ margin-bottom: 10px;\r\n+}\n\\ No newline at end of file\n"
|
||||
},
|
||||
{
|
||||
"date": 1689301682561,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,3 +1,12 @@\n .navbar {\r\n margin-bottom: 10px;\r\n }\r\n+\r\n+.content {\r\n+ text-align: center;.emptyImg{\r\n+ width: 126px;\r\n+ height: 135px;\r\n+ margin-bottom: 30px;\r\n+}\r\n+}\r\n+\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689301815663,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -3,8 +3,9 @@\n }\r\n \r\n .content {\r\n text-align: center;\r\n+ background-color: #fff;\r\n .emptyImg {\r\n width: 126px;\r\n height: 135px;\r\n margin-bottom: 30px;\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689296582562,
|
||||
"name": "Commit-0",
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/components/ideaItem/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689694142029,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689694807634,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,7 +1,23 @@\n import React from \"react\";\r\n \r\n export const IdeaItem = (props) => {\r\n- return <div>index</div>;\r\n+ return <div>\r\n+ <EmptyPage\r\n+ path=\"/my\"\r\n+ title=\"被采纳建议\"\r\n+ desc=\"您暂时还没有建议被采纳!\"\r\n+ ></EmptyPage>\r\n+ <div className={style.myIdeas}>\r\n+ <div className=\"navbar\">\r\n+ <MyNavBar\r\n+ title=\"被采纳建议\"\r\n+ leftArrow\r\n+ style={{ backgroundColor: \"#fff\",borderTop:\"\" }}\r\n+ ></MyNavBar>\r\n+ </div>\r\n+\r\n+ </div>\r\n+ </div>;\r\n };\r\n \r\n export default IdeaItem;\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689694833383,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,5 +1,7 @@\n import React from \"react\";\r\n+import { EmptyPage, MyNavBar } from \"../../components\";\r\n+import style from './style.module.scss'\r\n \r\n export const IdeaItem = (props) => {\r\n return (\r\n <div>\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689694142029,
|
||||
"name": "Commit-0",
|
||||
"content": "import React from 'react'\r\n\r\nexport const IdeaItem = (props) => {\r\n return (\r\n <div>index</div>\r\n )\r\n}\r\n\r\nexport default IdeaItem"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/components/ideaItem/style.module.scss",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689694736688,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689695063790,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,5 +0,0 @@\n-.myIdeas {\r\n- width: 100vw;\r\n- height: 100vh;\r\n- background-color: #fff;\r\n-}\r\n\\ No newline at end of file\n"
|
||||
},
|
||||
{
|
||||
"date": 1689737279212,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -0,0 +1,4 @@\n+.idea_item {\r\n+ box-sizing: border-box;\r\n+ border-top: 4px solid #ddd;\r\n+}\n\\ No newline at end of file\n"
|
||||
}
|
||||
],
|
||||
"date": 1689694736688,
|
||||
"name": "Commit-0",
|
||||
"content": ".myIdeas {\r\n width: 100vw;\r\n height: 100vh;\r\n background-color: #fff;\r\n}"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/components/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689248304445,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689249712733,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,4 +1,5 @@\n export * from \"./startPage\";\r\n export * from \"./myHeader\";\r\n export * from \"./navTitle\";\r\n export * from \"./consultationCell\";\r\n+export * from './menuItem'\n\\ No newline at end of file\n"
|
||||
},
|
||||
{
|
||||
"date": 1689294595355,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,9 +1,9 @@\n export * from \"./startPage\";\r\n export * from \"./myHeader\";\r\n export * from \"./navTitle\";\r\n-<<<<<<< HEAD\r\n+// 我的——首页\r\n export * from \"./consultationCell\";\r\n export * from \"./menuItem\";\r\n-=======\r\n+\r\n export * from \"./myNavBar\";\r\n->>>>>>> 10ff91101c8d03b8e198930b3e155d3fdb23b1c5\r\n+\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689248304445,
|
||||
"name": "Commit-0",
|
||||
"content": "export * from './startPage'\r\nexport * from './myHeader'\r\nexport * from './navTitle'\r\nexport * from './consultationCell'"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/components/menuItem/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689249306493,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689249523909,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,7 +1,15 @@\n import React from \"react\";\r\n \r\n+interface propsType {\r\n+ menuUrl: string;\r\n+ menuText: string;\r\n+}\r\n+\r\n export const MenuItem: React.FC = (props) => {\r\n- return <div></div>;\r\n+ return <div className={style.menu_item}>\r\n+ <img src={menuUrl} alt=\"\" className={style.item_img} />\r\n+ <div className={style.item_title}>{menuText}</div>\r\n+</div>\r\n };\r\n \r\n export default MenuItem;\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689249571449,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,12 +1,13 @@\n import React from \"react\";\r\n+import style from './style.module.scss'\r\n \r\n interface propsType {\r\n menuUrl: string;\r\n menuText: string;\r\n }\r\n \r\n-export const MenuItem: React.FC = (props) => {\r\n+export const MenuItem: React.FC<propsType> = ({menuUrl,menuText}) => {\r\n return (\r\n <div className={style.menu_item}>\r\n <img src={menuUrl} alt=\"\" className={style.item_img} />\r\n <div className={style.item_title}>{menuText}</div>\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689249306493,
|
||||
"name": "Commit-0",
|
||||
"content": "import React from 'react'\r\n\r\nexport const MenuItem:React.FC = (props) => {\r\n return (\r\n <div></div>\r\n )\r\n}\r\n\r\n\r\nexport default MenuItem"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"sourceFile": "src/components/menuItem/style.module.scss",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 1,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689249385504,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689554725187,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -3,10 +3,9 @@\n height: 55px;\r\n text-align: center;\r\n margin-bottom: 40px;\r\n .item_img {\r\n- width: 30px;\r\n- height: 30px;\r\n+ max-width: 30px;\r\n margin-bottom: 10px;\r\n }\r\n .item_title {\r\n font-size: 12px;\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689249385504,
|
||||
"name": "Commit-0",
|
||||
"content": ".menu_item {\r\n width: 80px;\r\n height: 55px;\r\n text-align: center;\r\n margin-bottom: 40px;\r\n .item_img {\r\n width: 30px;\r\n height: 30px;\r\n margin-bottom: 10px;\r\n }\r\n .item_title {\r\n font-size: 12px;\r\n color: #333;\r\n }\r\n }"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/components/myHeader/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1690965181971,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1690965244475,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -10,12 +10,9 @@\n title?: JSX.Element | React.ReactElement | React.ReactNode;\r\n showSearch?: boolean;\r\n }\r\n \r\n-export const MyHeader: React.FC<PropsType> = ({\r\n- title,\r\n- showSearch = true,\r\n-}) => {\r\n+export const MyHeader: React.FC<PropsType> = ({ title, showSearch = true }) => {\r\n const navigate = useNavigate();\r\n return (\r\n <div className={style[\"header\"]}>\r\n <div className={style[\"left\"]}>\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1690965291340,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -10,9 +10,9 @@\n title?: JSX.Element | React.ReactElement | React.ReactNode;\r\n showSearch?: boolean;\r\n }\r\n \r\n-export const MyHeader: React.FC<PropsType> = ({ title, showSearch = true }) => {\r\n+export const MyHeader: React.FC<PropsType> = ({ title, showSearch = false }) => {\r\n const navigate = useNavigate();\r\n return (\r\n <div className={style[\"header\"]}>\r\n <div className={style[\"left\"]}>\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1690965181971,
|
||||
"name": "Commit-0",
|
||||
"content": "import React from \"react\";\r\nimport style from \"./style.module.scss\";\r\nimport url1 from \"../../assets/images/icon/common resource/hdpi/common_nav_message_white_n.png\";\r\nimport url2 from \"../../assets/images/icon/common resource/hdpi/common_nav_message_white_s.png\";\r\nimport url3 from \"../../assets/images/icon/common resource/hdpi/common_nav_message_black_n.png\";\r\nimport url4 from \"../../assets/images/icon/common resource/hdpi/common_nav_message_black_s.png\";\r\n\r\nimport { useNavigate } from \"react-router-dom\";\r\ninterface PropsType {\r\n title?: JSX.Element | React.ReactElement | React.ReactNode;\r\n showSearch?: boolean;\r\n}\r\n\r\nexport const MyHeader: React.FC<PropsType> = ({\r\n title,\r\n showSearch = true,\r\n}) => {\r\n const navigate = useNavigate();\r\n return (\r\n <div className={style[\"header\"]}>\r\n <div className={style[\"left\"]}>\r\n <img src={url3} alt=\"\" />\r\n </div>\r\n <div className={style[\"con\"]}>\r\n {showSearch ? (\r\n <input\r\n type=\"text\"\r\n placeholder=\"病证、药品名称、医生姓名\"\r\n className={style[\"input\"]}\r\n onFocus={() => navigate(\"/home/search\")}\r\n />\r\n ) : (\r\n title\r\n )}\r\n </div>\r\n <div className={style[\"right\"]}>\r\n <img src={url4} alt=\"\" />\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport default MyHeader;\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/components/myMack/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1690273887701,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1690273922667,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -6,8 +6,11 @@\n onCancel: () => void;\r\n }\r\n \r\n export const MyMack: React.FC<PropsType> = ({ onCancel }) => {\r\n+ const handleUpload =() => {\r\n+ console.log('上传图片')\r\n+ }\r\n return (\r\n <div>\r\n {\r\n <div className={style.mask}>\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1690274072195,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,13 +1,14 @@\n-import React, { useState } from \"react\";\r\n+import React, { useRef, useState } from \"react\";\r\n import style from \"./style.module.scss\";\r\n \r\n interface PropsType {\r\n // 取消\r\n onCancel: () => void;\r\n }\r\n \r\n export const MyMack: React.FC<PropsType> = ({ onCancel }) => {\r\n+ const fileInputRef = useRef(null)\r\n const handleUpload = () => {\r\n console.log(\"上传图片\");\r\n };\r\n return (\r\n@@ -25,9 +26,9 @@\n <div className={style.cancel} onClick={() => onCancel()}>\r\n 取消\r\n </div>\r\n </div>\r\n- <input type=\"file\" />\r\n+ <input type=\"file\" ref={fileInputRef}/>\r\n </div>\r\n }\r\n </div>\r\n );\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1690273887701,
|
||||
"name": "Commit-0",
|
||||
"content": "import React, { useState } from \"react\";\r\nimport style from \"./style.module.scss\";\r\n\r\ninterface PropsType {\r\n // 取消\r\n onCancel: () => void\r\n}\r\n\r\nexport const MyMack: React.FC<PropsType> = ({\r\n onCancel\r\n}) => {\r\n\r\n return (\r\n <div>\r\n {\r\n <div className={style.mask}>\r\n <div className={style.footer_box}>\r\n <div className={style.picture}>\r\n <div>拍照</div>\r\n <input type=\"file\" style={{ display: \"none\" }} id=\"getFile\" />\r\n <div id=\"getButtonFile\" onClick={() => handleUpload()}>从手机相册选择</div>\r\n </div>\r\n <div className={style.cancel} onClick={() => onCancel()}>取消</div>\r\n </div>\r\n <input type=\"file\"/>\r\n </div>\r\n }\r\n </div>\r\n );\r\n};\r\n\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"sourceFile": "src/components/myNavBar/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 0,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689337559685,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
}
|
||||
],
|
||||
"date": 1689337559685,
|
||||
"name": "Commit-0",
|
||||
"content": "import React, { ReactNode } from \"react\";\r\nimport { Sticky } from \"react-vant\";\r\nimport style from \"./style.module.scss\";\r\n\r\nimport iconWhite from \"../../assets/images/icon/common resource/hdpi/common_icon_back_white_n.png\";\r\nimport iconBlack from \"../../assets/images/icon/common resource/hdpi/common_icon_back_black_n.png\";\r\n\r\ninterface PropsType {\r\n title: string;\r\n leftArrow?: boolean; //是否展示左箭头 默认true\r\n theme?: string; //主题 black|white 对应黑白 默认黑\r\n onClickLeft?: () => void;\r\n rightText?: ReactNode;\r\n}\r\n\r\nexport const MyNavBar: React.FC<PropsType> = ({\r\n title,\r\n leftArrow = true,\r\n theme = \"black\",\r\n onClickLeft,\r\n rightText,\r\n}) => {\r\n return (\r\n <Sticky>\r\n <div\r\n className={style.myNavBar}\r\n style={{ color: theme === \"black\" ? \"#333\" : \"#fff\" }}\r\n >\r\n <div\r\n className={style[\"nav-left\"]}\r\n onClick={() => onClickLeft && onClickLeft()}\r\n >\r\n {leftArrow ? (\r\n <img\r\n className={style.leftArrow}\r\n src={theme === \"black\" ? iconBlack : iconWhite}\r\n alt=\"\"\r\n />\r\n ) : null}\r\n </div>\r\n <div className={style[\"nav-center\"]}>{title}</div>\r\n <div className={style[\"nav-right\"]}>{rightText}</div>\r\n </div>\r\n </Sticky>\r\n );\r\n};\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"sourceFile": "src/components/myNavBar/style.module.scss",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 0,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689386220804,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
}
|
||||
],
|
||||
"date": 1689386220804,
|
||||
"name": "Commit-0",
|
||||
"content": ".myNavBar {\r\n display: flex;\r\n display: flex;\r\n justify-content: space-between;\r\n height: 74px;\r\n line-height: 40px;\r\n align-items: center;\r\n padding: 0 20px;\r\n box-sizing: border-box;\r\n // background-color: #fff;\r\n\r\n .nav-left {\r\n .leftArrow {\r\n display: block;\r\n width: 16px;\r\n height: 16px;\r\n }\r\n }\r\n\r\n .nav-center {\r\n font-size: 16px;\r\n }\r\n}"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/components/myPatientCircleItem/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689779783436,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689779846298,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,9 +1,9 @@\n import React from \"react\";\r\n \r\n interface propsType {}\r\n \r\n-export const MyPatientCircle: React.FC = () => {\r\n+export const MyPatientCircleItem: React.FC = () => {\r\n return <div>myPatientCircle</div>;\r\n };\r\n \r\n-export default MyPatientCircle;\r\n+export default MyPatientCircleItem;\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689780143870,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,7 +1,15 @@\n import React from \"react\";\r\n \r\n-interface propsType {}\r\n+interface propsType {\r\n+ sickCircleId:number,\r\n+title:string,\r\n+detail:\tstring,\r\n+amount:number,\r\n+collectionNum:number,\r\n+commentNum:number,\r\n+releaseTime:number,\r\n+}\r\n \r\n export const MyPatientCircleItem: React.FC = () => {\r\n return <div>myPatientCircle</div>;\r\n };\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689779783436,
|
||||
"name": "Commit-0",
|
||||
"content": "import React from 'react'\r\n\r\ninterface propsType {\r\n \r\n}\r\n\r\nexport const MyPatientCircle:React.FC = () => {\r\n return (\r\n <div>myPatientCircle</div>\r\n )\r\n}\r\n\r\nexport default MyPatientCircle"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/components/myPatientCircleItem/style.module.scss",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689817062878,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689817078605,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -4,8 +4,9 @@\n .dateTime {\r\n }\r\n \r\n .mySickCircle {\r\n+ height: 100px;\r\n border: 1px solid #f2f2f2;\r\n border-radius: 4px;\r\n }\r\n }\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689817142418,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -5,8 +5,8 @@\n }\r\n \r\n .mySickCircle {\r\n height: 100px;\r\n- border: 1px solid #f2f2f2;\r\n+ border: 1px solid #000;\r\n border-radius: 4px;\r\n }\r\n }\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689817062878,
|
||||
"name": "Commit-0",
|
||||
"content": ".myPatientCircle {\r\n background-color: #fff;\r\n\r\n .dateTime {\r\n\r\n }\r\n\r\n .mySickCircle {\r\n border: 1px solid #f2f2f2;\r\n border: 4px;\r\n }\r\n}"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/components/mySickCircleCommentItem/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689841861799,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689841887205,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,7 +1,8 @@\n import React from \"react\";\r\n+import style from './style.module.scss'\r\n \r\n-export const MySickCircleCommentItem = (props) => {\r\n+export const MySickCircleCommentItem:React.FC = (props) => {\r\n return <div>index</div>;\r\n };\r\n \r\n export default MySickCircleCommentItem;\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689842584485,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,8 +1,17 @@\n import React from \"react\";\r\n import style from \"./style.module.scss\";\r\n \r\n-export const MySickCircleCommentItem: React.FC = (props) => {\r\n- return <div>index</div>;\r\n+interface PropsType {\r\n+\r\n+}\r\n+\r\n+export const MySickCircleCommentItem: React.FC = () => {\r\n+ return <div className={style.mySickCircleCommentItem}>\r\n+<div className=\"commentUserInfo\">\r\n+ <div className=\"headerPic\"></div>\r\n+ <div className=\"nickName\"></div>\r\n+</div>\r\n+ </div>;\r\n };\r\n \r\n export default MySickCircleCommentItem;\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689841861799,
|
||||
"name": "Commit-0",
|
||||
"content": "import React from 'react'\r\nimport { connect } from 'react-redux'\r\n\r\nexport const MySickCircleCommentItem = (props) => {\r\n return (\r\n <div>index</div>\r\n )\r\n}\r\n\r\nexport default MySickCircleCommentItem"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/components/mySickCircleCommentItem/style.module.scss",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689842517748,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689842817543,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,4 +1,16 @@\n .mySickCircleCommentItem {\r\n box-sizing: border-box;\r\n padding: 10px 20px 10px 20px;\r\n+\r\n+ .commentUserInfo {\r\n+ \r\n+.headerPic {\r\n+ min-width: 40px;\r\n+ margin-right: 10px;\r\n+ margin-bottom: 14px;\r\n+ }\r\n+ }\r\n+\r\n+ \r\n+\r\n }\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689842845565,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -7,6 +7,11 @@\n min-width: 40px;\r\n margin-right: 10px;\r\n margin-bottom: 14px;\r\n }\r\n+\r\n+ .nickName {\r\n+ font-size: 14px;\r\n+ color: var(--base-color);\r\n+ }\r\n }\r\n }\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689842517748,
|
||||
"name": "Commit-0",
|
||||
"content": ".mySickCircleCommentItem{\r\n box-sizing: border-box;\r\n padding: 10px 20px 10px 20px;\r\n}"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"sourceFile": "src/components/navTitle/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 0,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689249029363,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
}
|
||||
],
|
||||
"date": 1689249029363,
|
||||
"name": "Commit-0",
|
||||
"content": "import React from 'react'\r\nimport style from './style.module.scss'\r\ninterface PropsType {\r\n title: string\r\n}\r\nexport const NavTitle: React.FC<PropsType> = ({ title }) => {\r\n return (\r\n <div className={style['nav-title']}>\r\n <div className={style['left']}></div>\r\n <div>\r\n <span className={style['title']}>{title}</span>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\n\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/components/proFileInput/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689391837273,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689391845634,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,7 +1,7 @@\n import React from \"react\";\r\n \r\n-export const ProFileInput = (props) => {\r\n+export const ProFileInput:React.FC = (props) => {\r\n return <div>index</div>;\r\n };\r\n \r\n export default ProFileInput;\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689478113184,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,7 +1,11 @@\n import React from \"react\";\r\n+import style from './style.module.scss'\r\n \r\n export const ProFileInput: React.FC = (props) => {\r\n- return <div>index</div>;\r\n+ return <div className={style.proFile_input_wrapper}>\r\n+<label htmlFor=\"style.proFile_input\">[主要症状]</label>\r\n+<input type=\"text\" id=\"style.proFile_input\"/>\r\n+ </div>;\r\n };\r\n \r\n export default ProFileInput;\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689391837273,
|
||||
"name": "Commit-0",
|
||||
"content": "import React from 'react'\r\n\r\nexport const ProFileInput = (props) => {\r\n return (\r\n <div>index</div>\r\n )\r\n}\r\n\r\nexport default ProFileInput"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/components/proFileInput/style.module.scss",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689478608251,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689478679666,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,8 +1,9 @@\n .proFile_input_wrapper {\r\n margin: 0 35px;\r\n \r\n .proFile_label {\r\n+ display: block;\r\n margin-top: 20px;\r\n color: #3087ea;\r\n font-size: 12px;\r\n }\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689478703077,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -2,9 +2,10 @@\n margin: 0 35px;\r\n \r\n .proFile_label {\r\n display: block;\r\n- margin-top: 20px;\r\n+ box-sizing: border-box;\r\n+ padding-top: 20px;\r\n color: #3087ea;\r\n font-size: 12px;\r\n }\r\n }\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689478608251,
|
||||
"name": "Commit-0",
|
||||
"content": ".proFile_input_wrapper{\r\n margin: 0 35px;\r\n\r\n .proFile_label{\r\n margin-top: 20px;\r\n color: #3087ea;\r\n font-size: 12px;\r\n }\r\n}"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/components/proFilePicker/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689481660646,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689481957699,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,11 +1,13 @@\n import React from \"react\";\r\n+import style from './style.module.scss'\r\n \r\n interface PropsType {\r\n tooltip: string;\r\n }\r\n \r\n export const ProFilePicker: React.FC<PropsType> = ({ tooltip }) => {\r\n- return <div>index</div>;\r\n+ return <div className={style.proFile_picker_wrapper}>\r\n+ </div>;\r\n };\r\n \r\n export default ProFilePicker;\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689482045630,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -5,8 +5,10 @@\n tooltip: string;\r\n }\r\n \r\n export const ProFilePicker: React.FC<PropsType> = ({ tooltip }) => {\r\n- return <div className={style.proFile_picker_wrapper}></div>;\r\n+ return <div className={style.proFile_picker_wrapper}>\r\n+ <input type=\"text\" className={style.proFile_picker}/>\r\n+ </div>;\r\n };\r\n \r\n export default ProFilePicker;\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689481660646,
|
||||
"name": "Commit-0",
|
||||
"content": "import React from 'react'\r\n\r\ninterface PropsType {\r\ntooltip:string\r\n}\r\n\r\nexport const ProFilePicker:React.FC<PropsType> = ({tooltip}) => {\r\n return (\r\n <div>index</div>\r\n )\r\n}\r\n\r\n\r\nexport default ProFilePicker"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"sourceFile": "src/components/proFilePicker/style.module.scss",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 5,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689481945123,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689481957066,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,5 +1,5 @@\n .proFile_picker_wrapper {\r\n- margin: 0 35px;\r\n- width: 320px;\r\n- border-bottom: 1px solid #f2f2f2;\r\n-}\n\\ No newline at end of file\n+ margin: 0 35px;\r\n+ width: 320px;\r\n+ border-bottom: 1px solid #f2f2f2;\r\n+}\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689482043915,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,5 +1,9 @@\n .proFile_picker_wrapper {\r\n margin: 0 35px;\r\n width: 320px;\r\n border-bottom: 1px solid #f2f2f2;\r\n+\r\n+ .proFile_picker {\r\n+ border: 0;\r\n+ }\r\n }\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689482089036,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -4,6 +4,11 @@\n border-bottom: 1px solid #f2f2f2;\r\n \r\n .proFile_picker {\r\n border: 0;\r\n+\r\n+ &::-webkit-input-placeholder {\r\n+ color: #999;\r\n+ font-size: 12px;\r\n+ }\r\n }\r\n }\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689483795468,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -4,8 +4,11 @@\n border-bottom: 1px solid #f2f2f2;\r\n \r\n .proFile_picker {\r\n border: 0;\r\n+ margin-top: 10px;\r\n+ box-sizing: border-box;\r\n+ padding-bottom: 10px;\r\n \r\n &::-webkit-input-placeholder {\r\n color: #999;\r\n font-size: 12px;\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689483899665,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -4,14 +4,15 @@\n border-bottom: 1px solid #f2f2f2;\r\n \r\n .proFile_picker {\r\n border: 0;\r\n- margin-top: 10px;\r\n+ margin-top: 12px;\r\n box-sizing: border-box;\r\n- padding-bottom: 10px;\r\n+ height: 36px;\r\n+ padding-bottom: 12px;\r\n \r\n &::-webkit-input-placeholder {\r\n- color: #999;\r\n+ color: #333;\r\n font-size: 12px;\r\n }\r\n }\r\n }\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689481945122,
|
||||
"name": "Commit-0",
|
||||
"content": ".proFile_picker_wrapper {\r\n margin: 0 35px;\r\n width: 320px;\r\n border-bottom: 1px solid #f2f2f2;\r\n}"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/components/startPage/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689314496486,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1690965355233,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -10,9 +10,9 @@\n import style from \"./style.module.css\";\r\n const banners = [startUrl, url1, url2, url3, url4, url5];\r\n \r\n export const StartPage: React.FC = () => {\r\n- const [show, { setFalse }] = useBoolean(true);\r\n+ const [show, { setFalse }] = useBoolean(false);\r\n \r\n return (\r\n <Swiper\r\n style={{ zIndex: 999 }}\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1690965421846,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -10,9 +10,9 @@\n import style from \"./style.module.css\";\r\n const banners = [startUrl, url1, url2, url3, url4, url5];\r\n \r\n export const StartPage: React.FC = () => {\r\n- const [show, { setFalse }] = useBoolean(false);\r\n+ const [show, { setFalse }] = useBoolean(true);\r\n \r\n return (\r\n <Swiper\r\n style={{ zIndex: 999 }}\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689314496486,
|
||||
"name": "Commit-0",
|
||||
"content": "import React, { useState } from \"react\";\r\nimport { Button, Swiper } from \"react-vant\";\r\nimport { useBoolean } from 'ahooks'\r\nimport startUrl from \"./images/启动页.png\";\r\nimport url1 from \"./images/引导页1.png\";\r\nimport url2 from \"./images/引导页 2.png\";\r\nimport url3 from \"./images/引导页 3.png\";\r\nimport url4 from \"./images/引导页 4.png\";\r\nimport url5 from \"./images/引导页5.png\";\r\nimport style from \"./style.module.css\";\r\nconst banners = [startUrl, url1, url2, url3, url4, url5];\r\n\r\nexport const StartPage: React.FC = () => {\r\n const [show, { setFalse }] = useBoolean(false)\r\n \r\n return (\r\n <Swiper\r\n style={{ zIndex: 999 }}\r\n initialSwipe={0}\r\n rubberband={false}\r\n loop={false}\r\n className={show ? style[\"swiper\"] : `${style[\"swiper\"]} ${style[\"none\"]}`}\r\n >\r\n {banners.map((v, i) => {\r\n return (\r\n <Swiper.Item key={i}>\r\n <img src={v} className={style[\"img\"]} onClick={() => i === banners.length - 1 && setFalse()}/>\r\n </Swiper.Item>\r\n );\r\n })}\r\n </Swiper>\r\n );\r\n};\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/components/userVideoBuyItem/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689925913456,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689926387971,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -5,8 +5,22 @@\n item: string;\r\n }\r\n \r\n export const UserVideoBuyItem: React.FC = () => {\r\n- return <div>index</div>;\r\n+ return <div className={style.userVideoBuyItem}>\r\n+ <div className={style.video}>\r\n+ <video controls width=\"100%\">\r\n+ <source src=\"/media/cc0-videos/flower.webm\" type=\"video/webm\">\r\n+\r\n+ <source src=\"/media/cc0-videos/flower.mp4\" type=\"video/mp4\">\r\n+\r\n+ Download the\r\n+ <a href=\"/media/cc0-videos/flower.webm\">WEBM</a>\r\n+ or\r\n+ <a href=\"/media/cc0-videos/flower.mp4\">MP4</a>\r\n+ video.\r\n+</video>\r\n+ </div>\r\n+ </div>;\r\n };\r\n \r\n export default UserVideoBuyItem;\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689926459981,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -8,11 +8,11 @@\n export const UserVideoBuyItem: React.FC = () => {\r\n return <div className={style.userVideoBuyItem}>\r\n <div className={style.video}>\r\n <video controls width=\"100%\">\r\n- <source src=\"/media/cc0-videos/flower.webm\" type=\"video/webm\">\r\n+ <source src=\"/media/cc0-videos/flower.webm\" type=\"video/webm\" />\r\n \r\n- <source src=\"/media/cc0-videos/flower.mp4\" type=\"video/mp4\">\r\n+ <source src=\"/media/cc0-videos/flower.mp4\" type=\"video/mp4\" />\r\n \r\n Download the\r\n <a href=\"/media/cc0-videos/flower.webm\">WEBM</a>\r\n or\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689925913456,
|
||||
"name": "Commit-0",
|
||||
"content": "import React from 'react'\r\nimport style from './style.module.scss'\r\n\r\ninterface PropsType {\r\n item: string\r\n}\r\n\r\nexport const UserVideoBuyItem:React.FC = () => {\r\n return (\r\n <div>index</div>\r\n )\r\n}\r\n\r\nexport default UserVideoBuyItem"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/components/userVideoBuyItem/style.module.scss",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689926307016,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689932501006,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,4 +1,9 @@\n .userVideoBuyItem {\r\n width: 360px;\r\n height: 168px;\r\n+\r\n+ .video {\r\n+ width: 100%;\r\n+ height: 100%;\r\n+ }\r\n }\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689932530044,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,9 +1,13 @@\n .userVideoBuyItem {\r\n width: 360px;\r\n height: 168px;\r\n \r\n- .video {\r\n+ .video_wrapper {\r\n+ .video {\r\n width: 100%;\r\n height: 100%;\r\n }\r\n+ }\r\n+\r\n+ \r\n }\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689926307016,
|
||||
"name": "Commit-0",
|
||||
"content": ".userVideoBuyItem {\r\n width: 360px;\r\n height: 168px;\r\n}"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/custom.d.ts",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689930199526,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689931006930,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,4 +1,4 @@\n-declare module \"*.mp4\" {\r\n+declare module \"*.webm\" {\r\n const src: string;\r\n export default src;\r\n }\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689940582566,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,4 +1,9 @@\n declare module \"*.webm\" {\r\n const src: string;\r\n export default src;\r\n }\r\n+\r\n+declare module \"*.mp4\" {\r\n+ const src: string;\r\n+ export default src;\r\n+}\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689930199526,
|
||||
"name": "Commit-0",
|
||||
"content": "declare module '*.mp4' {\r\n const src: string;\r\n export default src;\r\n }"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"sourceFile": "src/index.css",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 0,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689745199720,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
}
|
||||
],
|
||||
"date": 1689745199720,
|
||||
"name": "Commit-0",
|
||||
"content": "* {\r\n margin: 0;\r\n padding: 0;\r\n box-sizing: border-box;\r\n}\r\n\r\n:root {\r\n --primary-color: #3087ea;\r\n --base-color: #333;\r\n --base-bgColor: #f2f2f2;\r\n}"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"sourceFile": "src/react-app-env.d.ts",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 0,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689932460702,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
}
|
||||
],
|
||||
"date": 1689932460702,
|
||||
"name": "Commit-0",
|
||||
"content": "/// <reference types=\"node\" />\r\n/// <reference types=\"react\" />\r\n/// <reference types=\"react-dom\" />\r\n\r\ndeclare namespace NodeJS {\r\n interface ProcessEnv {\r\n readonly NODE_ENV: 'development' | 'production' | 'test';\r\n readonly PUBLIC_URL: string;\r\n }\r\n}\r\n\r\ndeclare module '*.avif' {\r\n const src: string;\r\n export default src;\r\n}\r\n\r\ndeclare module '*.bmp' {\r\n const src: string;\r\n export default src;\r\n}\r\n\r\ndeclare module '*.gif' {\r\n const src: string;\r\n export default src;\r\n}\r\n\r\ndeclare module '*.jpg' {\r\n const src: string;\r\n export default src;\r\n}\r\n\r\ndeclare module '*.jpeg' {\r\n const src: string;\r\n export default src;\r\n}\r\n\r\ndeclare module '*.png' {\r\n const src: string;\r\n export default src;\r\n}\r\n\r\ndeclare module '*.webp' {\r\n const src: string;\r\n export default src;\r\n}\r\n\r\ndeclare module '*.svg' {\r\n import * as React from 'react';\r\n\r\n export const ReactComponent: React.FunctionComponent<React.SVGProps<\r\n SVGSVGElement\r\n > & { title?: string }>;\r\n\r\n const src: string;\r\n export default src;\r\n}\r\n\r\ndeclare module '*.module.css' {\r\n const classes: { readonly [key: string]: string };\r\n export default classes;\r\n}\r\n\r\ndeclare module '*.module.scss' {\r\n const classes: { readonly [key: string]: string };\r\n export default classes;\r\n}\r\n\r\ndeclare module '*.module.sass' {\r\n const classes: { readonly [key: string]: string };\r\n export default classes;\r\n}\r\n\r\n\r\n"
|
||||
}
|
||||
]
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/service/request.ts",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689668214624,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689668354408,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,7 +1,7 @@\n import axios, { AxiosRequestConfig } from \"axios\";\r\n import { BASE_URL } from \"./config\";\r\n-import { Notify, Toast } from \"react-vant\";\r\n+import { Notify, Toast } from 'react-vant'\r\n import { MyResponseType } from \"../types\";\r\n import { store } from \"../store\";\r\n \r\n const service = axios.create({\r\n@@ -11,34 +11,32 @@\n \r\n // http request 拦截器\r\n service.interceptors.request.use(\r\n (config) => {\r\n- const state = store.getState();\r\n+ const state = store.getState()\r\n // 发送网络请求时, 在界面的中间位置显示Loading的组件,使用ant-design插件,这里不再赘述\r\n Toast.loading({\r\n- message: \"加载中...\",\r\n- });\r\n+ message: '加载中...'\r\n+ })\r\n //请求公共参数携带的信息\r\n // config.headers.ak = localStorage.getItem('ak') || \"\";\r\n- config.headers.sessionId = state.user.userInfo.sessionId;\r\n- config.headers.userId = state.user.userInfo.userId;\r\n- config.headers[\"Content-Type\"] =\r\n- state.user.userInfo[\"Content-Type\"] ||\r\n- \"application/x-www-form-urlencoded\";\r\n+ config.headers.sessionId = state.user.userInfo.sessionId\r\n+ config.headers.userId = state.user.userInfo.userId\r\n+ config.headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\r\n \r\n return config;\r\n },\r\n (err) => {\r\n- Toast.clear();\r\n+ Toast.clear()\r\n //...关闭加载loading的组件,显示消息提示弹窗\r\n return Promise.reject(err);\r\n }\r\n );\r\n \r\n // http response 拦截器\r\n service.interceptors.response.use(\r\n (res) => {\r\n- Toast.clear();\r\n+ Toast.clear()\r\n const { status, message } = res.data;\r\n switch (status) {\r\n case \"9999\":\r\n console.log(\"登录状态失效,请重新登录\");\r\n@@ -47,9 +45,9 @@\n console.log(\"服务端错误\");\r\n break;\r\n case \"8001\":\r\n console.log(\"用户业务错误\");\r\n- Notify.show({ type: \"danger\", message });\r\n+ Notify.show({ type: 'danger', message })\r\n break;\r\n case \"8002\":\r\n console.log(\"医生业务错误\");\r\n break;\r\n@@ -59,9 +57,9 @@\n }\r\n return res;\r\n },\r\n (err) => {\r\n- Toast.clear();\r\n+ Toast.clear()\r\n if (err && err.response) {\r\n switch (err.response.status) {\r\n case 400:\r\n console.log(\"请求错误\");\r\n@@ -79,8 +77,9 @@\n return Promise.reject(err);\r\n }\r\n );\r\n \r\n+\r\n const request = async <T = any>(\r\n config: AxiosRequestConfig\r\n ): Promise<MyResponseType<T>> => {\r\n try {\r\n@@ -89,9 +88,9 @@\n } catch (err: any) {\r\n const message = err.message || \"请求失败\";\r\n console.error(message); // 失败消息提示\r\n return {\r\n- status: \"4000\",\r\n+ status: '4000',\r\n message,\r\n result: null as any,\r\n };\r\n }\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689671007729,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -20,9 +20,9 @@\n //请求公共参数携带的信息\r\n // config.headers.ak = localStorage.getItem('ak') || \"\";\r\n config.headers.sessionId = state.user.userInfo.sessionId;\r\n config.headers.userId = state.user.userInfo.userId;\r\n- // config.headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\r\n+ config.headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\r\n \r\n return config;\r\n },\r\n (err) => {\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689668214624,
|
||||
"name": "Commit-0",
|
||||
"content": "import axios, { AxiosRequestConfig } from \"axios\";\r\nimport { BASE_URL } from \"./config\";\r\nimport { Notify, Toast } from 'react-vant'\r\nimport { MyResponseType } from \"../types\";\r\nimport { store } from \"../store\";\r\n\r\nconst service = axios.create({\r\n baseURL: BASE_URL,\r\n // timeout: TIMEOUT,\r\n});\r\n\r\n// http request 拦截器\r\nservice.interceptors.request.use(\r\n (config) => {\r\n const state = store.getState()\r\n // 发送网络请求时, 在界面的中间位置显示Loading的组件,使用ant-design插件,这里不再赘述\r\n Toast.loading({\r\n message: '加载中...'\r\n })\r\n //请求公共参数携带的信息\r\n // config.headers.ak = localStorage.getItem('ak') || \"\";\r\n config.headers.sessionId = state.user.userInfo.sessionId\r\n config.headers.userId = state.user.userInfo.userId\r\n config.headers[\"Content-Type\"] = state.user.userInfo['Content-Type'] ||\"application/x-www-form-urlencoded\";\r\n\r\n return config;\r\n },\r\n (err) => {\r\n Toast.clear()\r\n //...关闭加载loading的组件,显示消息提示弹窗\r\n return Promise.reject(err);\r\n }\r\n);\r\n\r\n// http response 拦截器\r\nservice.interceptors.response.use(\r\n (res) => {\r\n Toast.clear()\r\n const { status, message } = res.data;\r\n switch (status) {\r\n case \"9999\":\r\n console.log(\"登录状态失效,请重新登录\");\r\n break;\r\n case \"9001\":\r\n console.log(\"服务端错误\");\r\n break;\r\n case \"8001\":\r\n console.log(\"用户业务错误\");\r\n Notify.show({ type: 'danger', message })\r\n break;\r\n case \"8002\":\r\n console.log(\"医生业务错误\");\r\n break;\r\n case \"8003\":\r\n console.log(\"公共业务错误\");\r\n break;\r\n }\r\n return res;\r\n },\r\n (err) => {\r\n Toast.clear()\r\n if (err && err.response) {\r\n switch (err.response.status) {\r\n case 400:\r\n console.log(\"请求错误\");\r\n break;\r\n case 401:\r\n console.log(\"未授权访问\");\r\n break;\r\n case 404:\r\n console.log(\"资源找不到\");\r\n break;\r\n default:\r\n console.log(\"其他错误信息\");\r\n }\r\n }\r\n return Promise.reject(err);\r\n }\r\n);\r\n\r\n\r\nconst request = async <T = any>(\r\n config: AxiosRequestConfig\r\n): Promise<MyResponseType<T>> => {\r\n try {\r\n const resp = await service.request<MyResponseType<T>>(config);\r\n return resp.data;\r\n } catch (err: any) {\r\n const message = err.message || \"请求失败\";\r\n console.error(message); // 失败消息提示\r\n return {\r\n status: '4000',\r\n message,\r\n result: null as any,\r\n };\r\n }\r\n};\r\n\r\nexport default request;\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"sourceFile": "src/store/user/userSlice.ts",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 4,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1690198867920,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1690337106040,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -60,9 +60,9 @@\n // 请求\r\n return await postHttp(\"health/user/v1/register\", data);\r\n }\r\n );\r\n-const userInfo = {\r\n+export const userInfo = {\r\n // 年龄\r\n age: -1,\r\n // 邮箱\r\n email: \"\",\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1690424044413,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,9 +1,9 @@\n import { createSlice, createAsyncThunk, PayloadAction } from \"@reduxjs/toolkit\";\r\n // RSA 加密插件\r\n import { JSEncrypt } from \"jsencrypt\";\r\n import { getHttp, postHttp } from \"../../api\";\r\n-import { Notify } from 'react-vant'\r\n+import { Notify } from \"react-vant\";\r\n // 公钥\r\n export const publicKey = `MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCuQd3gESx7VdIyRYUWjmjg61VIgUK6F45hClmqUMZ7xNiT5rlLM6e78osMvBF/yP7cVm7pK+NMCDWoVS1/AETpxJYqUlIC77ZAU8/MnP96IupnJL87vqhPcpdv7+VqLM38ls++yuD/F/HSoOQTv/leJh+dgE/4EYAJjOWFAbYfXwIDAQAB`;\r\n \r\n // 加密方法\r\n@@ -13,9 +13,9 @@\n // 设置公钥\r\n encryptor.setPublicKey(publicKey); // publicKey为公钥\r\n // 加密数据\r\n return encryptor.encrypt(data); //data就是需要加密的密码\r\n-}\r\n+};\r\n \r\n interface LoginRawState {\r\n email: string;\r\n pwd: string;\r\n@@ -32,13 +32,13 @@\n \"health/user/v1/login\",\r\n data\r\n );\r\n if (status === \"0000\") {\r\n- Notify.show({ type: 'primary', message })\r\n- return result\r\n+ Notify.show({ type: \"primary\", message });\r\n+ return result;\r\n } else {\r\n- Notify.show({ type: 'danger', message })\r\n- return Promise.reject(message)\r\n+ Notify.show({ type: \"danger\", message });\r\n+ return Promise.reject(message);\r\n }\r\n }\r\n );\r\n \r\n@@ -89,24 +89,26 @@\n // 不清楚\r\n whetherBingWeChat: -1,\r\n // 不清楚\r\n faceFlag: -1,\r\n-}\r\n+};\r\n \r\n interface GetUserInfoState {\r\n- userId: string\r\n- sessionId: string\r\n+ userId: string;\r\n+ sessionId: string;\r\n }\r\n // 获取用户信息\r\n export const getUserInfo = createAsyncThunk(\r\n- 'user/userinfo',\r\n+ \"user/userinfo\",\r\n async (params: GetUserInfoState) => {\r\n- const resp = await getHttp('/health/user/verify/v1/getUserInfoById', params);\r\n- if(resp.status === '0000')\r\n- return resp.result \r\n- else return Promise.reject()\r\n+ const resp = await getHttp(\r\n+ \"/health/user/verify/v1/getUserInfoById\",\r\n+ params\r\n+ );\r\n+ if (resp.status === \"0000\") return resp.result;\r\n+ else return Promise.reject();\r\n }\r\n-)\r\n+);\r\n \r\n // 切片\r\n const userSlice = createSlice({\r\n name: \"userSlice\",\r\n@@ -116,25 +118,32 @@\n // 登录态\r\n isLogin: false,\r\n // 首页搜索记录\r\n searchList: [] as string[],\r\n+ // 病友圈搜索历史记录\r\n+ patientCircleSearchList:[] as string[],\r\n },\r\n reducers: {\r\n addSearchList(state, action: PayloadAction<string>) {\r\n state.searchList = Array.from(\r\n new Set([action.payload, ...state.searchList])\r\n );\r\n },\r\n+ addpatientCircleSearchList(state, action: PayloadAction<string>) {\r\n+ state.patientCircleSearchList = Array.from(\r\n+ new Set([action.payload, ...state.patientCircleSearchList])\r\n+ );\r\n+ },\r\n removeSearchList(state, action: PayloadAction<string>) {\r\n- state.searchList = state.searchList.filter(v => v !== action.payload)\r\n+ state.searchList = state.searchList.filter((v) => v !== action.payload);\r\n },\r\n clearSearchList(state) {\r\n- state.searchList = []\r\n+ state.searchList = [];\r\n },\r\n userQuit(state) {\r\n- state.isLogin = false\r\n+ state.isLogin = false;\r\n state.userInfo = userInfo;\r\n- }\r\n+ },\r\n },\r\n extraReducers: {\r\n [login.fulfilled.type](state, action) {\r\n state.isLogin = true;\r\n@@ -142,14 +151,16 @@\n },\r\n [getUserInfo.fulfilled.type](state, action) {\r\n state.userInfo = {\r\n ...state.userInfo,\r\n- ...action.payload\r\n- }\r\n- }\r\n+ ...action.payload,\r\n+ };\r\n+ },\r\n },\r\n });\r\n \r\n // 抛出reduce\r\n export default userSlice.reducer;\r\n \r\n-export const { addSearchList, removeSearchList, clearSearchList } = userSlice.actions\r\n+\r\n+export const { addSearchList, removeSearchList, clearSearchList ,addpatientCircleSearchList,userQuit} = userSlice.actions\r\n+\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1690424632821,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -60,8 +60,39 @@\n // 请求\r\n return await postHttp(\"health/user/v1/register\", data);\r\n }\r\n );\r\n+\r\n+interface UserInfoRawState {\r\n+ // 年龄\r\n+ age: number,\r\n+ // 邮箱\r\n+ email: string,\r\n+ // 头部图片\r\n+ headPic: string,\r\n+ // 身高\r\n+ height: number,\r\n+ // 用户id\r\n+ userId: number,\r\n+ // 邀请码\r\n+ invitationCode: string,\r\n+ // 激光码\r\n+ jiGuangPwd: string,\r\n+ // 昵称\r\n+ nickName: string,\r\n+ // 会话id\r\n+ sessionId: string,\r\n+ // 性别\r\n+ sex: number,\r\n+ // 用户名\r\n+ userName: string,\r\n+ // 体重\r\n+ weight: number,\r\n+ // 不清楚\r\n+ whetherBingWeChat: number,\r\n+ // 不清楚\r\n+ faceFlag: number,\r\n+}\r\n export const userInfo = {\r\n // 年龄\r\n age: -1,\r\n // 邮箱\r\n@@ -138,9 +169,9 @@\n },\r\n clearSearchList(state) {\r\n state.searchList = [];\r\n },\r\n- userQuit(state) {\r\n+ userQuit(state,userInfo) {\r\n state.isLogin = false;\r\n state.userInfo = userInfo;\r\n },\r\n },\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1690424716318,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -60,39 +60,8 @@\n // 请求\r\n return await postHttp(\"health/user/v1/register\", data);\r\n }\r\n );\r\n-\r\n-interface UserInfoRawState {\r\n- // 年龄\r\n- age: number;\r\n- // 邮箱\r\n- email: string;\r\n- // 头部图片\r\n- headPic: string;\r\n- // 身高\r\n- height: number;\r\n- // 用户id\r\n- userId: number;\r\n- // 邀请码\r\n- invitationCode: string;\r\n- // 激光码\r\n- jiGuangPwd: string;\r\n- // 昵称\r\n- nickName: string;\r\n- // 会话id\r\n- sessionId: string;\r\n- // 性别\r\n- sex: number;\r\n- // 用户名\r\n- userName: string;\r\n- // 体重\r\n- weight: number;\r\n- // 不清楚\r\n- whetherBingWeChat: number;\r\n- // 不清楚\r\n- faceFlag: number;\r\n-}\r\n export const userInfo = {\r\n // 年龄\r\n age: -1,\r\n // 邮箱\r\n@@ -169,9 +138,9 @@\n },\r\n clearSearchList(state) {\r\n state.searchList = [];\r\n },\r\n- userQuit(state, userInfo) {\r\n+ userQuit(state) {\r\n state.isLogin = false;\r\n state.userInfo = userInfo;\r\n },\r\n },\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1690198867920,
|
||||
"name": "Commit-0",
|
||||
"content": "import { createSlice, createAsyncThunk, PayloadAction } from \"@reduxjs/toolkit\";\r\n// RSA 加密插件\r\nimport { JSEncrypt } from \"jsencrypt\";\r\nimport { getHttp, postHttp } from \"../../api\";\r\nimport { Notify } from 'react-vant'\r\n// 公钥\r\nexport const publicKey = `MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCuQd3gESx7VdIyRYUWjmjg61VIgUK6F45hClmqUMZ7xNiT5rlLM6e78osMvBF/yP7cVm7pK+NMCDWoVS1/AETpxJYqUlIC77ZAU8/MnP96IupnJL87vqhPcpdv7+VqLM38ls++yuD/F/HSoOQTv/leJh+dgE/4EYAJjOWFAbYfXwIDAQAB`;\r\n\r\n// 加密方法\r\nexport const encryptedData = (publicKey, data) => {\r\n // 新建JSEncrypt对象\r\n const encryptor = new JSEncrypt();\r\n // 设置公钥\r\n encryptor.setPublicKey(publicKey); // publicKey为公钥\r\n // 加密数据\r\n return encryptor.encrypt(data); //data就是需要加密的密码\r\n}\r\n\r\ninterface LoginRawState {\r\n email: string;\r\n pwd: string;\r\n}\r\n\r\n// 登录 action\r\nexport const login = createAsyncThunk(\r\n \"user/login\",\r\n async (data: LoginRawState) => {\r\n // 密码加密 rsa\r\n data.pwd = encryptedData(publicKey, data.pwd) as string;\r\n // 请求\r\n const { status, result, message } = await postHttp(\r\n \"health/user/v1/login\",\r\n data\r\n );\r\n if (status === \"0000\") {\r\n Notify.show({ type: 'primary', message })\r\n return result\r\n } else {\r\n Notify.show({ type: 'danger', message })\r\n return Promise.reject(message)\r\n }\r\n }\r\n);\r\n\r\ninterface RegistRawState {\r\n email: string;\r\n code: string;\r\n pwd1: string;\r\n pwd2: string;\r\n invitationCode?: string;\r\n}\r\n\r\n// 注册 actions\r\nexport const regist = createAsyncThunk(\r\n \"user/regist\",\r\n async (data: RegistRawState) => {\r\n // 密码加密 rsa\r\n data.pwd1 = encryptedData(publicKey, data.pwd1) as string;\r\n data.pwd2 = data.pwd1;\r\n // 请求\r\n return await postHttp(\"health/user/v1/register\", data);\r\n }\r\n);\r\nconst userInfo = {\r\n // 年龄\r\n age: -1,\r\n // 邮箱\r\n email: \"\",\r\n // 头部图片\r\n headPic: \"\",\r\n // 身高\r\n height: -1,\r\n // 用户id\r\n userId: -1,\r\n // 邀请码\r\n invitationCode: \"-1\",\r\n // 激光码\r\n jiGuangPwd: \"\",\r\n // 昵称\r\n nickName: \"\",\r\n // 会话id\r\n sessionId: \"\",\r\n // 性别\r\n sex: -1,\r\n // 用户名\r\n userName: \"\",\r\n // 体重\r\n weight: -1,\r\n // 不清楚\r\n whetherBingWeChat: -1,\r\n // 不清楚\r\n faceFlag: -1,\r\n}\r\n\r\ninterface GetUserInfoState {\r\n userId: string\r\n sessionId: string\r\n}\r\n// 获取用户信息\r\nexport const getUserInfo = createAsyncThunk(\r\n 'user/userinfo',\r\n async (params: GetUserInfoState) => {\r\n const resp = await getHttp('/health/user/verify/v1/getUserInfoById', params);\r\n if(resp.status === '0000')\r\n return resp.result \r\n else return Promise.reject()\r\n }\r\n)\r\n\r\n// 切片\r\nconst userSlice = createSlice({\r\n name: \"userSlice\",\r\n initialState: {\r\n // 用户信息\r\n userInfo: userInfo,\r\n // 登录态\r\n isLogin: false,\r\n // 首页搜索记录\r\n searchList: [] as string[],\r\n },\r\n reducers: {\r\n addSearchList(state, action: PayloadAction<string>) {\r\n state.searchList = Array.from(\r\n new Set([action.payload, ...state.searchList])\r\n );\r\n },\r\n removeSearchList(state, action: PayloadAction<string>) {\r\n state.searchList = state.searchList.filter(v => v !== action.payload)\r\n },\r\n clearSearchList(state) {\r\n state.searchList = []\r\n },\r\n userQuit(state) {\r\n state.isLogin = false\r\n state.userInfo = userInfo;\r\n }\r\n },\r\n extraReducers: {\r\n [login.fulfilled.type](state, action) {\r\n state.isLogin = true;\r\n state.userInfo = action.payload;\r\n },\r\n [getUserInfo.fulfilled.type](state, action) {\r\n state.userInfo = {\r\n ...state.userInfo,\r\n ...action.payload\r\n }\r\n }\r\n },\r\n});\r\n\r\n// 抛出reduce\r\nexport default userSlice.reducer;\r\n\r\nexport const { addSearchList, removeSearchList, clearSearchList } = userSlice.actions\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/views/consultation/consultationServer/chat/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1691659973891,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1691661489797,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -3,8 +3,10 @@\n import { useSelector, useDispatch } from \"react-redux\";\r\n import { useAppSelector } from \"../../../../store/hooks\";\r\n import { useSetState, useRequest } from \"ahooks\";\r\n import style from \"./style.module.scss\";\r\n+import { MyNavBar } from \"../../../../components\";\r\n+import { useParams } from \"react-router-dom\";\r\n \r\n interface CurrentInquiryRecordHeader {\r\n userId: number;\r\n sessionId: string;\r\n@@ -19,10 +21,10 @@\n sessionId: sessionId,\r\n });\r\n console.log(inquiryParams);\r\n \r\n- const { doctorId } = useSelector((state: any) => state.doctor);\r\n- console.log(doctorId);\r\n+ const {doctorId,recordId} = useParams()\r\n+ console.log(doctorId,recordId)\r\n \r\n const putConsult = () =>\r\n putHttp(\r\n `/health/user/inquiry/verify/v1/consultDoctor?doctorId=${doctorId}`,\r\n@@ -33,8 +35,12 @@\n });\r\n useEffect(() => {\r\n putConsult();\r\n }, [inquiryParams]);\r\n- return <div className={style.chat}></div>;\r\n+ return <div className={style.chat}>\r\n+ <div className=\"navbar\">\r\n+ <MyNavBar title={}></MyNavBar>\r\n+ </div>\r\n+ </div>;\r\n };\r\n \r\n export default Index;\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1691661495014,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -38,9 +38,9 @@\n }, [inquiryParams]);\r\n return (\r\n <div className={style.chat}>\r\n <div className=\"navbar\">\r\n- <MyNavBar title={}></MyNavBar>\r\n+ {/* <MyNavBar title={}></MyNavBar> */}\r\n </div>\r\n </div>\r\n );\r\n };\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1691659973891,
|
||||
"name": "Commit-0",
|
||||
"content": "import React, { useEffect, useState } from \"react\";\r\nimport { getHttp, putHttp } from \"../../../../api\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { useAppSelector } from \"../../../../store/hooks\";\r\nimport { useSetState, useRequest } from \"ahooks\";\r\nimport style from './style.module.scss'\r\n\r\ninterface CurrentInquiryRecordHeader {\r\n userId: number;\r\n sessionId: string;\r\n}\r\nconst Index: React.FC = () => {\r\n //咨询医生\r\n const userId = useAppSelector((state) => state.user.userInfo.userId);\r\n const sessionId = useAppSelector((state) => state.user.userInfo.sessionId);\r\n const [inquiryParams, setInquiryParams] =\r\n useSetState<CurrentInquiryRecordHeader>({\r\n userId: userId,\r\n sessionId: sessionId,\r\n });\r\n console.log(inquiryParams);\r\n\r\n const { doctorId } = useSelector((state: any) => state.doctor);\r\n console.log(doctorId);\r\n\r\n const putConsult = () =>\r\n putHttp(\r\n `/health/user/inquiry/verify/v1/consultDoctor?doctorId=${doctorId}`,\r\n {},\r\n inquiryParams\r\n ).then((res)=>{\r\n console.log(res);\r\n\r\n });\r\n useEffect(() => {\r\n putConsult();\r\n }, [inquiryParams]);\r\n return <div className={style.chat}></div>;\r\n};\r\n\r\nexport default Index;\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/views/consultation/consultationServer/chat/style.module.scss",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1691665398110,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1691665472594,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -5,5 +5,9 @@\n .content {\r\n flex: 1;\r\n height: 100%;\r\n }\r\n+\r\n+ .footer {\r\n+ height: 48px;\r\n+ }\r\n }\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1691665486899,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -4,8 +4,10 @@\n \r\n .content {\r\n flex: 1;\r\n height: 100%;\r\n+ margin-top: 10px;\r\n+ background-color: #fff;\r\n }\r\n \r\n .footer {\r\n height: 48px;\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1691665398110,
|
||||
"name": "Commit-0",
|
||||
"content": ".chat {\r\n display: flex;\r\n flex-direction: column;\r\n\r\n .content {\r\n flex: 1;\r\n height: 100%;\r\n }\r\n}\r\n\r\n"
|
||||
}
|
||||
]
|
||||
}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/views/consultation/myConsultation/comment/style.module.scss",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689389948296,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689389963944,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -14,10 +14,10 @@\n .rate {\r\n div {\r\n display: flex;\r\n align-items: center;\r\n- justify-content: start;\r\n- // margin-bottom: 3px;\r\n+ justify-content: flex-start;\r\n+ margin-bottom: 3px;\r\n p {\r\n margin: 0 20px;\r\n }\r\n }\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689389976243,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -14,9 +14,9 @@\n .rate {\r\n div {\r\n display: flex;\r\n align-items: center;\r\n- justify-content: flex-start;\r\n+ justify-content: start;\r\n margin-bottom: 3px;\r\n p {\r\n margin: 0 20px;\r\n }\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689389948296,
|
||||
"name": "Commit-0",
|
||||
"content": ".container{\r\n width: 100vw;\r\n height: 35vh;\r\n background-color: #fff;\r\n border-bottom: 3px solid #ededed;\r\n color: #000;\r\n}\r\n.containers{\r\n width: 100vw;\r\n height: 17vh;\r\n background-color: #fff;\r\n border-bottom: 3px solid #ededed;\r\n color: #000;\r\n .rate{\r\n div{\r\n display: flex;\r\n align-items: center;\r\n justify-content: start;\r\n // margin-bottom: 3px;\r\n p{\r\n margin: 0 20px;\r\n }\r\n }\r\n }\r\n}\r\n.footer{\r\n width: 100vw;\r\n height: 41vh;\r\n background-color: #fff;\r\n .btn{\r\n width: 100%;\r\n height: 30px;\r\n display: flex;\r\n justify-content: space-around;\r\n padding-top: 190px;\r\n .btn1{\r\n width: 65px;\r\n height: 35px;\r\n border-radius: 7px;\r\n -webkit-border-radius: 7px;\r\n -moz-border-radius: 7px;\r\n -ms-border-radius: 7px;\r\n -o-border-radius: 7px;\r\n border: none;\r\n background-color: rgb(135, 135, 135);\r\n color: #fff;\r\n}\r\n .btn2{\r\n width: 65px;\r\n height: 35px;\r\n border-radius: 7px;\r\n -webkit-border-radius: 7px;\r\n -moz-border-radius: 7px;\r\n -ms-border-radius: 7px;\r\n -o-border-radius: 7px;\r\n border: none;\r\n background-color: rgb(38, 112, 229);\r\n color: #fff;\r\n}\r\n }\r\n}\r\n.navtitle {\r\n display: flex;\r\n height: 42px;\r\n overflow: hidden;\r\n align-items: center;\r\n margin-bottom: 2px;\r\n background-color: white;\r\n .left {\r\n margin-left: 12px;\r\n width: 4px;\r\n background-color: #3087ea;\r\n height: 22px;\r\n }\r\n\r\n .title {\r\n margin-left: 10px;\r\n font-weight: bold;\r\n }\r\n}\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/views/consultation/myConsultation/current/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1691661417242,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1691661892985,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -91,9 +91,9 @@\n className={style.btn1}\r\n size=\"small\"\r\n onClick={() =>\r\n navigate(\r\n- `/consultation/chat?doctorId=${consultationInfo.doctorId}&recordId=${consultationInfo.recordId}`\r\n+ `/consultation/chat?recordId=${consultationInfo.recordId}`\r\n )\r\n }\r\n >\r\n 继续问诊\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1691664142441,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -55,9 +55,9 @@\n \r\n const Endaninterview = () => {\r\n const recordId = consultationInfo.recordId;\r\n putHttp(\r\n- `/health/user/inquiry/verify/v1/endInquiry?recordId=${recordId}`,\r\n+ `/health/user/inquiry/verify/v1/endInquiry`,\r\n inquiryParams\r\n );\r\n \r\n navigate(\"/my\");\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1691661417242,
|
||||
"name": "Commit-0",
|
||||
"content": "import React, { useEffect } from \"react\";\r\nimport { useSetState, useRequest } from \"ahooks\";\r\nimport { Card, Button, Empty } from \"react-vant\";\r\nimport { useNavigate } from \"react-router-dom\";\r\nimport LeftArrow from \"../LeftArraw\";\r\nimport style from \"./style.module.scss\";\r\nimport { getHttp, putHttp } from \"../../../../api\";\r\nimport { useAppSelector } from \"../../../../store/hooks\";\r\n\r\n// 定义请求接口参数的类型\r\ninterface CurrentInquiryRecordHeader {\r\n userId: number;\r\n sessionId: string;\r\n}\r\n\r\n// 定义请求接口返回数据的类型\r\ninterface CurrentInquiryRecordResult {\r\n recordId?: number;\r\n doctorId?: number;\r\n imagePic?: string;\r\n doctorName: string;\r\n department: string;\r\n jobTitle: string;\r\n evaluateStatus?: number;\r\n userName?: string;\r\n jiGuangPwd?: string;\r\n inquiryTime: string;\r\n}\r\n\r\nconst Index: React.FC = () => {\r\n const userId = useAppSelector((state) => state.user.userInfo.userId);\r\n const sessionId = useAppSelector((state) => state.user.userInfo.sessionId);\r\n const [consultationInfo, setConsultationInfo] =\r\n useSetState<CurrentInquiryRecordResult>({} as CurrentInquiryRecordResult);\r\n\r\n // 定义当前问诊记录的请求参数,并使用useSetState hook初始化为默认值\r\n const [inquiryParams, setInquiryParams] =\r\n useSetState<CurrentInquiryRecordHeader>({\r\n userId: userId,\r\n sessionId: sessionId,\r\n });\r\n\r\n // 定义获取当前问诊记录的函数\r\n const getCurrentInquiryRecord = () =>\r\n getHttp(\r\n \"/health/user/inquiry/verify/v1/findCurrentInquiryRecord\",\r\n inquiryParams\r\n ).then((res) => {\r\n setConsultationInfo(res.result);\r\n });\r\n console.log(consultationInfo);\r\n\r\n // 使用useNavigate hook获取导航函数,用于跳转页面\r\n const navigate = useNavigate();\r\n\r\n const Endaninterview = () => {\r\n const recordId = consultationInfo.recordId;\r\n putHttp(\r\n `/health/user/inquiry/verify/v1/endInquiry?recordId=${recordId}`,\r\n inquiryParams\r\n );\r\n\r\n navigate(\"/my\");\r\n };\r\n\r\n // 使用useEffect hook在组件渲染后发起请求,获取当前问诊记录的数据\r\n useEffect(() => {\r\n getCurrentInquiryRecord();\r\n }, [inquiryParams]);\r\n\r\n // 渲染组件\r\n return consultationInfo && Object.keys(consultationInfo).length > 0 ? (\r\n <div>\r\n <LeftArrow title=\"当前问诊\" />\r\n\r\n <div className={style[\"demo-image\"]}>\r\n <img\r\n width=\"230\"\r\n height=\"250\"\r\n src={consultationInfo.imagePic}\r\n className={style.rvimage}\r\n />\r\n <Card className={style.card} border>\r\n <h4>{consultationInfo.doctorName}</h4>\r\n <p>{consultationInfo.jobTitle}</p>\r\n <p>{consultationInfo.department}</p>\r\n <p>问诊时间:{consultationInfo.inquiryTime}</p>\r\n </Card>\r\n <div className={style.btn}>\r\n <Button\r\n className={style.btn1}\r\n size=\"small\"\r\n onClick={() => navigate(`/consultation/chat?doctorId=${consultationInfo.doctorId}&recordId=${consultationInfo.recordId}`)}\r\n >\r\n 继续问诊\r\n </Button>\r\n <Button\r\n className={style.btn2}\r\n size=\"small\"\r\n onClick={() => Endaninterview()}\r\n >\r\n 结束问诊\r\n </Button>\r\n </div>\r\n </div>\r\n </div>\r\n ) : (\r\n <div>\r\n <LeftArrow title=\"当前问诊\" />\r\n\r\n <Empty description=\"暂无问诊\">\r\n <Button\r\n style={{ width: 160 }}\r\n round\r\n type=\"primary\"\r\n onClick={() => navigate(\"/my\")}\r\n >\r\n 返回\r\n </Button>\r\n </Empty>\r\n </div>\r\n );\r\n};\r\n\r\nexport default Index;\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/views/my/adoptIdea/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689693967034,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689694031670,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -3,9 +3,9 @@\n \r\n const Index: React.FC = () => {\r\n return (\r\n <div className=\"myIdeas\">\r\n- <EmptyPage></EmptyPage>\r\n+ <EmptyPage path=\"/my\" title=\"被采纳建议\" desc=\"您暂时还没有建议被采纳!\"></EmptyPage>\r\n </div>\r\n );\r\n };\r\n \r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689694544417,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,15 +1,20 @@\n import React from \"react\";\r\n-import { EmptyPage } from \"../../../components\";\r\n+import { EmptyPage,MyNavBar } from \"../../../components\";\r\n \r\n const Index: React.FC = () => {\r\n return (\r\n- <div className=\"myIdeas\">\r\n+ <div>\r\n <EmptyPage\r\n path=\"/my\"\r\n title=\"被采纳建议\"\r\n desc=\"您暂时还没有建议被采纳!\"\r\n ></EmptyPage>\r\n+ <div className=\"myIdeas\">\r\n+<div className=\"navbar\">\r\n+ <MyNavBar title=\"被采纳建议\" leftArrow></MyNavBar>\r\n+</div>\r\n+ </div>\r\n </div>\r\n );\r\n };\r\n \r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689693967034,
|
||||
"name": "Commit-0",
|
||||
"content": "import React from \"react\";\r\nimport { EmptyPage } from \"../../../components\";\r\n\r\nconst Index: React.FC = () => {\r\n return <div className=\"myIdeas\">\r\n<EmptyPage></EmptyPage>\r\n </div>;\r\n};\r\n\r\nexport default Index;\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"sourceFile": "src/views/my/adoptIdea/style.module.scss",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 0,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689695065436,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
}
|
||||
],
|
||||
"date": 1689695065436,
|
||||
"name": "Commit-0",
|
||||
"content": ".myIdeas {\r\n width: 100vw;\r\n height: 100vh;\r\n background-color: #fff;\r\n }\r\n "
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"sourceFile": "src/views/my/attention/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 1,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1690161338212,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1690161346921,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,5 +1,5 @@\n-import React, { useState, useEffect } from \"react\";\r\n+import React, { useState } from \"react\";\r\n import { MyNavBar } from \"../../../components\";\r\n import style from \"./style.module.scss\";\r\n import { useNavigate } from \"react-router-dom\";\r\n import FollowItem, { FollowType } from \"../../../components/followItem\";\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1690161338212,
|
||||
"name": "Commit-0",
|
||||
"content": "import React, { useState, useEffect } from \"react\";\r\nimport { MyNavBar } from \"../../../components\";\r\nimport style from \"./style.module.scss\";\r\nimport { useNavigate } from \"react-router-dom\";\r\nimport FollowItem, { FollowType } from \"../../../components/followItem\"\r\nimport { EmptyPage } from \"../../../components\"\r\n\r\nconst Index: React.FC = () => {\r\n const navigate = useNavigate()\r\n const [followData, setFollowData] = useState<FollowType[]>([\r\n {\r\n url: 'string',\r\n name: 'string',\r\n physician: 'string',\r\n hospital: \"string\",\r\n comment: \"string\",\r\n serve: \"string\"\r\n },\r\n {\r\n url: 'string',\r\n name: 'string',\r\n physician: 'string',\r\n hospital: \"string\",\r\n comment: \"string\",\r\n serve: \"string\"\r\n }\r\n ])\r\n\r\n\r\n return <div>\r\n {\r\n followData.length === 0 ?\r\n <EmptyPage title=\"我的关注\" desc=\"您还没有关注哦\" path=\"/my\"></EmptyPage> :\r\n <><MyNavBar title={\"我的关注\"} style={{ backgroundColor: \"#fff\", height: \"46px\" }} onClickLeft={() => {\r\n navigate('/my');\r\n }}></MyNavBar><div className={style.followBox}>\r\n {/* 关注医师组件 */}\r\n {\r\n followData && followData.map((item, ind) => {\r\n return <FollowItem url={item.url}\r\n name={item.name}\r\n physician={item.physician}\r\n hospital={item.hospital}\r\n comment={item.comment}\r\n serve={item.serve}\r\n key={ind}\r\n ></FollowItem>\r\n })\r\n }\r\n\r\n </div></>\r\n }\r\n </div>;\r\n};\r\n\r\nexport default Index;\r\n"
|
||||
}
|
||||
]
|
||||
}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"sourceFile": "src/views/my/forgetPassword1/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 5,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689337513446,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689337558924,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,10 +1,17 @@\n import React from \"react\";\r\n import { MyNavBar } from \"../../../components\";\r\n \r\n const Index: React.FC = () => {\r\n- return <div>\r\n- <MyNavBar title=\"忘记密码\" leftArrow theme=\"white\" onClickLeft={() => console.log(1)}></MyNavBar>\r\n- </div>;\r\n+ return (\r\n+ <div>\r\n+ <MyNavBar\r\n+ title=\"忘记密码\"\r\n+ leftArrow\r\n+ theme=\"white\"\r\n+ onClickLeft={() => console.log(1)}\r\n+ ></MyNavBar>\r\n+ </div>\r\n+ );\r\n };\r\n \r\n export default Index;\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689337743354,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,10 +1,11 @@\n import React from \"react\";\r\n import { MyNavBar } from \"../../../components\";\r\n+import style from './style.module.scss'\r\n \r\n const Index: React.FC = () => {\r\n return (\r\n- <div>\r\n+ <div className={style.forgetPassword}>\r\n <MyNavBar\r\n title=\"忘记密码\"\r\n leftArrow\r\n theme=\"white\"\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689337954281,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -4,14 +4,17 @@\n \r\n const Index: React.FC = () => {\r\n return (\r\n <div className={style.forgetPassword}>\r\n- <MyNavBar\r\n+ <div className=\"navbar\">\r\n+ <MyNavBar\r\n title=\"忘记密码\"\r\n leftArrow\r\n theme=\"white\"\r\n onClickLeft={() => console.log(1)}\r\n ></MyNavBar>\r\n+ </div>\r\n+ \r\n </div>\r\n );\r\n };\r\n \r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689338071005,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -12,8 +12,11 @@\n theme=\"white\"\r\n onClickLeft={() => console.log(1)}\r\n ></MyNavBar>\r\n </div>\r\n+ <div className={style.content}>\r\n+\r\n+ </div>\r\n </div>\r\n );\r\n };\r\n \r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689338332381,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -13,8 +13,10 @@\n onClickLeft={() => console.log(1)}\r\n ></MyNavBar>\r\n </div>\r\n <div className={style.content}></div>\r\n+ <div className=\"shadow_01\"></div>\r\n+ <div className=\"shadow_01\"></div>\r\n </div>\r\n );\r\n };\r\n \r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689337513446,
|
||||
"name": "Commit-0",
|
||||
"content": "import React from \"react\";\r\nimport { MyNavBar } from \"../../../components\";\r\n\r\nconst Index: React.FC = () => {\r\n return <div>\r\n <MyNavBar title=\"忘记密码\" leftArrow theme=\"white\" onClickLeft={() => console.log(1)}></MyNavBar>\r\n </div>;\r\n};\r\n\r\nexport default Index;\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/views/my/forgetPassword1/style.module.scss",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689337682089,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689337726985,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,4 +1,6 @@\n .forgetPassword {\r\n width: 100vw;\r\n height: 100vh;\r\n+ background: url(../../../assets//images/image/hdpi/login_bg.png);\r\n+ background-size: 100%;\r\n }\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689338049709,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -2,5 +2,15 @@\n width: 100vw;\r\n height: 100vh;\r\n background: url(../../../assets//images/image/hdpi/login_bg.png);\r\n background-size: 100%;\r\n+ position: relative;\r\n+\r\n+ .content {\r\n+ width: 280px;\r\n+ height: 124px;\r\n+ border-radius: 3px;\r\n+ background-color: #fff;\r\n+ position: absolute;\r\n+ top: 170px;\r\n+ }\r\n }\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689337682089,
|
||||
"name": "Commit-0",
|
||||
"content": ".forgetPassword {\r\n width: 100vw;\r\n height: 100vh;\r\n}"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/views/my/forgetPassword2/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689343041114,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689343162567,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,9 +1,55 @@\n import React from \"react\";\r\n+import { MyNavBar } from \"../../../components\";\r\n+import style from './style.module.scss'\r\n import { useNavigate } from \"react-router-dom\";\r\n \r\n const Index: React.FC = () => {\r\n const navigate = useNavigate();\r\n- return <div></div>;\r\n+ return (\r\n+ <div className={style.forgetPassword}>\r\n+ <div className=\"navbar\">\r\n+ <MyNavBar\r\n+ title=\"忘记密码\"\r\n+ leftArrow\r\n+ theme=\"white\"\r\n+ onClickLeft={() => console.log(1)}\r\n+ ></MyNavBar>\r\n+ </div>\r\n+ <form className={style.content}>\r\n+ <div className={style.formItem_email}>\r\n+ <input\r\n+ type=\"text\"\r\n+ className={style.emailInp}\r\n+ placeholder=\"请输入邮箱\"\r\n+ name=\"email\"\r\n+ onChange={(e) => {\r\n+ console.log(e);\r\n+ }}\r\n+ />\r\n+ <button className={style.btn_code}>获取验证码</button>\r\n+ </div>\r\n+ <div className={style.formItem_code}>\r\n+ <input\r\n+ type=\"text\"\r\n+ className={style.codeInp}\r\n+ placeholder=\"请输入验证码\"\r\n+ name=\"code\"\r\n+ onChange={(e) => {\r\n+ console.log(e);\r\n+ }}\r\n+ />\r\n+ </div>\r\n+ </form>\r\n+ <div className={style.shadow_one}></div>\r\n+ <div className={style.shadow_two}></div>\r\n+ <button\r\n+ className={style.btn_next}\r\n+ onClick={() => navigate(\"/my/forget/password2\")}\r\n+ >\r\n+ 下一步\r\n+ </button>\r\n+ </div>\r\n+ );\r\n };\r\n \r\n export default Index;\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689343302420,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -8,38 +8,24 @@\n return (\r\n <div className={style.forgetPassword}>\r\n <div className=\"navbar\">\r\n <MyNavBar\r\n- title=\"忘记密码\"\r\n+ title=\"设置新密码\"\r\n leftArrow\r\n theme=\"white\"\r\n onClickLeft={() => console.log(1)}\r\n ></MyNavBar>\r\n </div>\r\n <form className={style.content}>\r\n- <div className={style.formItem_email}>\r\n+ <div className={style.formItem_password}>\r\n <input\r\n type=\"text\"\r\n- className={style.emailInp}\r\n- placeholder=\"请输入邮箱\"\r\n- name=\"email\"\r\n- onChange={(e) => {\r\n- console.log(e);\r\n- }}\r\n+ className={style.pwdInp}\r\n+ placeholder=\"请输入密码\"\r\n+ name=\"pwd\"\r\n />\r\n- <button className={style.btn_code}>获取验证码</button>\r\n+ {/* <img src={hideIcon} alt=\"\" className={style.hideIcon} /> */}\r\n </div>\r\n- <div className={style.formItem_code}>\r\n- <input\r\n- type=\"text\"\r\n- className={style.codeInp}\r\n- placeholder=\"请输入验证码\"\r\n- name=\"code\"\r\n- onChange={(e) => {\r\n- console.log(e);\r\n- }}\r\n- />\r\n- </div>\r\n </form>\r\n <div className={style.shadow_one}></div>\r\n <div className={style.shadow_two}></div>\r\n <button\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689343041114,
|
||||
"name": "Commit-0",
|
||||
"content": "import React from \"react\";\r\nimport { useNavigate } from \"react-router-dom\";\r\n\r\nconst Index: React.FC = () => {\r\n const navigate = useNavigate()\r\n return <div>\r\n\r\n </div>;\r\n};\r\n\r\nexport default Index;\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/views/my/forgetPassword2/style.module.scss",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689343173214,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689343229376,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -6,9 +6,9 @@\n position: relative;\r\n \r\n .content {\r\n width: 280px;\r\n- height: 124px;\r\n+ height: 123px;\r\n border-radius: 3px;\r\n background-color: #fff;\r\n position: absolute;\r\n top: 170px;\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689343428028,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -15,59 +15,30 @@\n z-index: 3;\r\n left: 50%;\r\n transform: translateX(-50%);\r\n \r\n- .formItem_email {\r\n- box-sizing: border-box;\r\n- padding-bottom: 10px;\r\n- width: 230px;\r\n- height: 20px;\r\n- margin: 30px 0 0px 30px;\r\n- display: flex;\r\n- align-items: center;\r\n- border-bottom: 1px solid #f2f2f2;\r\n+ .formItem_password {\r\n+ width: 220px;\r\n+ height: 35px;\r\n+ margin: 25px 0 36px 30px;\r\n+ display: flex;\r\n+ align-items: center;\r\n+ border-bottom: 1px solid #f2f2f2;\r\n \r\n- .emailInp {\r\n- border: 0;\r\n- height: 20px;\r\n- &::-webkit-input-placeholder {\r\n- color: #999;\r\n- font-size: 14px;\r\n+ .pwdInp {\r\n+ border: 0;\r\n+ height: 24px;\r\n+ &::-webkit-input-placeholder {\r\n+ color: #999;\r\n+ font-size: 14px;\r\n+ }\r\n }\r\n- }\r\n-\r\n- .btn_code {\r\n- width: 120%;\r\n- height: 25px;\r\n- background-color: #3087ea;\r\n- text-align: center;\r\n- color: #fff;\r\n- border-radius: 4px;\r\n- border: 0;\r\n- font-size: 12px;\r\n- transform: scale(0.83);\r\n- }\r\n- }\r\n-\r\n- .formItem_code {\r\n- box-sizing: border-box;\r\n- padding-bottom: 10px;\r\n- width: 220px;\r\n- height: 25px;\r\n- margin: 26px 0 20px 30px;\r\n- display: flex;\r\n- align-items: center;\r\n- border-bottom: 1px solid #f2f2f2;\r\n-\r\n- .codeInp {\r\n- border: 0;\r\n- height: 20px;\r\n- &::-webkit-input-placeholder {\r\n- color: #999;\r\n- font-size: 14px;\r\n+ \r\n+ .hideIcon {\r\n+ width: 16px;\r\n+ height: 16px;\r\n }\r\n }\r\n- }\r\n }\r\n \r\n .shadow_one {\r\n width: 260px;\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689343173214,
|
||||
"name": "Commit-0",
|
||||
"content": ".forgetPassword {\r\n width: 100vw;\r\n height: 100vh;\r\n background: url(../../../assets//images/image/hdpi/login_bg.png);\r\n background-size: 100%;\r\n position: relative;\r\n \r\n .content {\r\n width: 280px;\r\n height: 124px;\r\n border-radius: 3px;\r\n background-color: #fff;\r\n position: absolute;\r\n top: 170px;\r\n z-index: 3;\r\n left: 50%;\r\n transform: translateX(-50%);\r\n \r\n .formItem_email {\r\n box-sizing: border-box;\r\n padding-bottom: 10px;\r\n width: 230px;\r\n height: 20px;\r\n margin: 30px 0 0px 30px;\r\n display: flex;\r\n align-items: center;\r\n border-bottom: 1px solid #f2f2f2;\r\n \r\n .emailInp {\r\n border: 0;\r\n height: 20px;\r\n &::-webkit-input-placeholder {\r\n color: #999;\r\n font-size: 14px;\r\n }\r\n }\r\n \r\n .btn_code {\r\n width: 120%;\r\n height: 25px;\r\n background-color: #3087ea;\r\n text-align: center;\r\n color: #fff;\r\n border-radius: 4px;\r\n border: 0;\r\n font-size: 12px;\r\n transform: scale(0.83);\r\n }\r\n }\r\n \r\n .formItem_code {\r\n box-sizing: border-box;\r\n padding-bottom: 10px;\r\n width: 220px;\r\n height: 25px;\r\n margin: 26px 0 20px 30px;\r\n display: flex;\r\n align-items: center;\r\n border-bottom: 1px solid #f2f2f2;\r\n \r\n .codeInp {\r\n border: 0;\r\n height: 20px;\r\n &::-webkit-input-placeholder {\r\n color: #999;\r\n font-size: 14px;\r\n }\r\n }\r\n }\r\n }\r\n \r\n .shadow_one {\r\n width: 260px;\r\n height: 124px;\r\n border-radius: 3px;\r\n background-color: rgba($color: #fff, $alpha: 0.6);\r\n position: absolute;\r\n top: 176px;\r\n z-index: 2;\r\n left: 50%;\r\n transform: translateX(-50%);\r\n }\r\n \r\n .shadow_two {\r\n width: 240px;\r\n height: 124px;\r\n border-radius: 3px;\r\n background-color: rgba($color: #fff, $alpha: 0.3);\r\n position: absolute;\r\n top: 182px;\r\n z-index: 1;\r\n left: 50%;\r\n transform: translateX(-50%);\r\n }\r\n \r\n .btn_next {\r\n width: 280px;\r\n height: 40px;\r\n border-radius: 4px;\r\n background-color: #fff;\r\n color: #3087ea;\r\n text-align: center;\r\n line-height: 40px;\r\n border: 0;\r\n font-size: 14px;\r\n position: absolute;\r\n bottom: 63px;\r\n left: 50%;\r\n transform: translateX(-50%);\r\n }\r\n }\r\n "
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"sourceFile": "src/views/my/index/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 3,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689228335114,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689228656461,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,7 +1,8 @@\n import React from \"react\";\r\n+import style from './style.module.scss'\r\n \r\n const Index: React.FC = () => {\r\n- return <div></div>;\r\n+ return <div className={style.my}></div>;\r\n };\r\n \r\n export default Index;\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689229867264,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,8 +1,10 @@\n import React from \"react\";\r\n import style from \"./style.module.scss\";\r\n \r\n const Index: React.FC = () => {\r\n- return <div className={style.my}></div>;\r\n+ return <div className={style.my}>\r\n+ 111\r\n+ </div>;\r\n };\r\n \r\n export default Index;\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689230798731,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,8 +1,10 @@\n import React from \"react\";\r\n import style from \"./style.module.scss\";\r\n \r\n const Index: React.FC = () => {\r\n- return <div className={style.my}>111</div>;\r\n+ return <div className={style.my}>\r\n+<div className=\"top\"></div>\r\n+ </div>;\r\n };\r\n \r\n export default Index;\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689228335114,
|
||||
"name": "Commit-0",
|
||||
"content": "import React from \"react\";\r\n\r\nconst Index: React.FC = () => {\r\n return <div></div>;\r\n};\r\n\r\nexport default Index;\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"sourceFile": "src/views/my/index/style.module.scss",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 4,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689229470967,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689229501204,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,3 +1,3 @@\n-.my{\r\n- background: url('/src/assets/images/image/hdpi/my_background.png') no-repeat;\r\n+.my {\r\n+ background: url(\"/src/assets/images/image/hdpi/my_background.png\") no-repeat;\r\n }\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689229603809,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,3 +1,3 @@\n .my {\r\n- background: url(\"/src/assets/images/image/hdpi/my_background.png\") no-repeat;\r\n+ background: url(\"../../../assets/images//image/hdpi/my_background.png\") no-repeat;\r\n }\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689229621653,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,4 +1,4 @@\n .my {\r\n- background: url(\"../../../assets/images//image/hdpi/my_background.png\")\r\n+ background: url(\"../../../assets/images/image/hdpi/my_background.png\")\r\n no-repeat;\r\n }\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689229938477,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,4 +1,6 @@\n .my {\r\n+ width: 100vw;\r\n+ height: 100vh;\r\n background: url(\"../../../assets/images/image/hdpi/my_background.png\")\r\n no-repeat;\r\n }\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689229470967,
|
||||
"name": "Commit-0",
|
||||
"content": ".my{\r\n background: url('/src/assets/images/image/hdpi/my_background.png') no-repeat;\r\n}\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/views/my/login/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689314994481,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689315032906,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -2,9 +2,11 @@\n \r\n const Index: React.FC = () => {\r\n const [email, setEmail] = useState<string>(\"\");\r\n const [pwd, setPwd] = useState<string>(\"\");\r\n- const onSubmit = () => {};\r\n+ const onSubmit = (e) => {\r\n+ console.log(e)\r\n+ };\r\n return (\r\n <div>\r\n <form action=\"submit\" method=\"post\">\r\n <input type=\"text\" name=\"email\" value={email} />\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689315072119,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -8,10 +8,15 @@\n };\r\n return (\r\n <div>\r\n <form action=\"submit\" method=\"post\">\r\n- <input type=\"text\" name=\"email\" value={email} />\r\n- <input type=\"password\" name=\"pwd\" value={pwd} />\r\n+ <div className=\"email\">\r\n+ <input type=\"text\" name=\"email\" value={email} />\r\n+ </div>\r\n+ <div className=\"password\">\r\n+ <input type=\"password\" name=\"pwd\" value={pwd} />\r\n+ </div>\r\n+ \r\n <button onClick={onSubmit}>登录</button>\r\n </form>\r\n </div>\r\n );\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689314994481,
|
||||
"name": "Commit-0",
|
||||
"content": "import React, { useState } from \"react\";\r\n\r\nconst Index: React.FC = () => {\r\n const [email,setEmail] = useState<string>('')\r\n const [pwd,setPwd] = useState<string>('')\r\n const onSubmit = () => {\r\n\r\n }\r\n return <div>\r\n <form action=\"submit\" method=\"post\">\r\n <input type=\"text\" name=\"email\" value={email}/>\r\n <input type=\"password\" name=\"pwd\" value={pwd}/>\r\n <button onClick={onSubmit}>登录</button>\r\n </form>\r\n \r\n </div>;\r\n};\r\n\r\nexport default Index;\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/views/my/login/style.module.scss",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689319149304,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689319165185,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,3 +1,5 @@\n .login {\r\n+ width: 100vw;\r\n+ height: 100vh;\r\n background: url(../../../assets/images/image/hdpi/login_bg.png) no-repeat;\r\n }\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689319195079,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,5 +1,6 @@\n .login {\r\n width: 100vw;\r\n height: 100vh;\r\n background: url(../../../assets/images/image/hdpi/login_bg.png) no-repeat;\r\n+ background-size: 100%;\r\n }\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689319149304,
|
||||
"name": "Commit-0",
|
||||
"content": ".login {\r\n background: url(../../../assets/images/image/hdpi/login_bg.png) no-repeat;\r\n}"
|
||||
}
|
||||
]
|
||||
}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/views/my/myPatientCircle/commentList/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689833385574,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689833435381,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -3,9 +3,9 @@\n \r\n const Index: React.FC = () => {\r\n return (\r\n <div>\r\n- <EmptyPage path=\"/my/patient/circle\"></EmptyPage>\r\n+ <EmptyPage path=\"/my/patient/circle\" title=\"评论列表\" desc=\"暂无评论啊!\"></EmptyPage>\r\n </div>\r\n );\r\n };\r\n \r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689833901413,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,8 +1,17 @@\n import React from \"react\";\r\n import { EmptyPage } from \"../../../../components\";\r\n+import { getMySickCircleCommentList } from \"../../../../api/my\";\r\n+import { useRequest } from \"ahooks\";\r\n+import { useAppSelector } from \"../../../../store/hooks\";\r\n \r\n const Index: React.FC = () => {\r\n+ const userId = useAppSelector((state) => state.user.userInfo.userId);\r\n+ const sessionId = useAppSelector((state) => state.user.userInfo.sessionId);\r\n+ const {data: mySickCircleCommentList=[]} = useRequest(async () => {\r\n+ const resp = await getMySickCircleCommentList(1,1,3,userId,sessionId)\r\n+ console.log('resp',resp)\r\n+ })\r\n return (\r\n <div>\r\n <EmptyPage\r\n path=\"/my/patient/circle\"\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689833385574,
|
||||
"name": "Commit-0",
|
||||
"content": "import React from \"react\";\r\nimport { EmptyPage } from \"../../../../components\";\r\n\r\nconst Index: React.FC = () => {\r\n return <div>\r\n <EmptyPage path=\"/my/patient/circle\"></EmptyPage>\r\n </div>;\r\n};\r\n\r\nexport default Index;\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/views/my/myPatientCircle/commentList/style.module.scss",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689842299551,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689842332832,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,3 +1,5 @@\n .mySickCircleCommentList {\r\n- margin-top: 10px;\r\n+ width: 100vw;\r\n+ height: 100vh;\r\n+ background-color: #f2f2f2;\r\n }\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689842403471,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,5 +1,4 @@\n .mySickCircleCommentList {\r\n width: 100vw;\r\n height: 100vh;\r\n- background-color: #f2f2f2;\r\n }\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689842299551,
|
||||
"name": "Commit-0",
|
||||
"content": ".mySickCircleCommentList{\r\n margin-top: 10px;\r\n}"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/views/my/myPatientCircle/index/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689779124590,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689779425086,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,15 +1,17 @@\n import React from \"react\";\r\n import { EmptyPage } from \"../../../../components\";\r\n+import style from './style.module.scss'\r\n \r\n const Index: React.FC = () => {\r\n return (\r\n- <div>\r\n+ <div className={style.myPatientCircle}>\r\n <EmptyPage\r\n path=\"/my\"\r\n title=\"我的病友圈\"\r\n desc=\"您还没有发布过病友圈!\"\r\n ></EmptyPage>\r\n+ <button className={style.btn_publish}>去发布</button>\r\n </div>\r\n );\r\n };\r\n \r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689779563481,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,17 +1,19 @@\n import React from \"react\";\r\n import { EmptyPage } from \"../../../../components\";\r\n import style from \"./style.module.scss\";\r\n+import { useNavigate } from \"react-router-dom\";\r\n \r\n const Index: React.FC = () => {\r\n+ const navigate = useNavigate()\r\n return (\r\n <div className={style.myPatientCircle}>\r\n <EmptyPage\r\n path=\"/my\"\r\n title=\"我的病友圈\"\r\n desc=\"您还没有发布过病友圈!\"\r\n ></EmptyPage>\r\n- <button className={style.btn_publish}>去发布</button>\r\n+ <button className={style.btn_publish} onClick={() => na}>去发布</button>\r\n </div>\r\n );\r\n };\r\n \r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689779124590,
|
||||
"name": "Commit-0",
|
||||
"content": "import React from \"react\";\r\nimport { EmptyPage } from \"../../../../components\";\r\n\r\nconst Index: React.FC = () => {\r\n return <div>\r\n<EmptyPage path=\"/my\" title=\"我的病友圈\" desc=\"您还没有发布过病友圈!\"></EmptyPage>\r\n </div>;\r\n};\r\n\r\nexport default Index;\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"sourceFile": "src/views/my/myPatientCircle/index/style.module.scss",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 3,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689779281662,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689779411911,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -0,0 +1,12 @@\n+.myPatientCircle{\r\n+ position: relative;\r\n+\r\n+ .btn_publish{\r\n+ width: 300px;\r\n+ height: 36px;\r\n+ font-size: 14px;\r\n+ color: #fff;\r\n+ border-radius: 4px;\r\n+ background-color: var(--primary--color);\r\n+ }\r\n+}\n\\ No newline at end of file\n"
|
||||
},
|
||||
{
|
||||
"date": 1689779431978,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -7,6 +7,8 @@\n font-size: 14px;\r\n color: #fff;\r\n border-radius: 4px;\r\n background-color: var(--primary--color);\r\n+ text-align: center;\r\n+ line-height: 36px;\r\n }\r\n }\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689779480547,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -6,9 +6,9 @@\n height: 36px;\r\n font-size: 14px;\r\n color: #fff;\r\n border-radius: 4px;\r\n- background-color: var(--primary--color);\r\n+ background-color: var(--primary-color);\r\n text-align: center;\r\n line-height: 36px;\r\n }\r\n }\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689779281662,
|
||||
"name": "Commit-0",
|
||||
"content": ""
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/views/my/payVideo/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689778951449,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689925370989,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,15 +1,25 @@\n import React from \"react\";\r\n import { EmptyPage } from \"../../../components\";\r\n+import style from './style.module.scss'\r\n+import { useRequest } from \"ahooks\";\r\n+import { getUserVideoBuyList } from \"../../../api/my\";\r\n+import { useAppSelector } from \"../../../store/hooks\";\r\n \r\n const Index: React.FC = () => {\r\n+ const userId = useAppSelector(state => state.user.userInfo.userId)\r\n+ const sessionId = useAppSelector(state => state.user.userInfo.sessionId)\r\n+ const {data:userVideoBuyList = []} = useRequest(async () => {\r\n+let resp = await getUserVideoBuyList(1,3,userId,sessionId)\r\n+ })\r\n return (\r\n <div>\r\n <EmptyPage\r\n path=\"/my\"\r\n title=\"购买的视频\"\r\n desc=\"您还没有购买过视频!\"\r\n ></EmptyPage>\r\n+\r\n </div>\r\n );\r\n };\r\n \r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689925388258,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -9,8 +9,9 @@\n const userId = useAppSelector((state) => state.user.userInfo.userId);\r\n const sessionId = useAppSelector((state) => state.user.userInfo.sessionId);\r\n const { data: userVideoBuyList = [] } = useRequest(async () => {\r\n let resp = await getUserVideoBuyList(1, 3, userId, sessionId);\r\n+ console.log('resp',resp)\r\n });\r\n return (\r\n <div>\r\n <EmptyPage\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689778951449,
|
||||
"name": "Commit-0",
|
||||
"content": "import React from \"react\";\r\nimport { EmptyPage } from \"../../../components\";\r\n\r\nconst Index: React.FC = () => {\r\n return <div>\r\n <EmptyPage path=\"/my\" title=\"购买的视频\" desc=\"您还没有购买过视频!\"></EmptyPage>\r\n </div>;\r\n};\r\n\r\nexport default Index;\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/views/my/proFile/addModifyProfile/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689390660383,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689390703915,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -4,9 +4,9 @@\n const Index: React.FC = () => {\r\n return (\r\n <div>\r\n <div className=\"navbar\">\r\n- <MyNavBar></MyNavBar>\r\n+ <MyNavBar title=\"我的档案\"></MyNavBar>\r\n </div>\r\n </div>\r\n );\r\n };\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689390742426,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -4,9 +4,9 @@\n const Index: React.FC = () => {\r\n return (\r\n <div>\r\n <div className=\"navbar\">\r\n- <MyNavBar title=\"我的档案\"></MyNavBar>\r\n+ <MyNavBar title=\"我的档案\" style={{backgroundColor: '#fff'}}></MyNavBar>\r\n </div>\r\n </div>\r\n );\r\n };\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689390660383,
|
||||
"name": "Commit-0",
|
||||
"content": "import React from \"react\";\r\nimport { MyNavBar } from \"../../../../components\";\r\n\r\nconst Index: React.FC = () => {\r\n return <div>\r\n<div className=\"navbar\">\r\n <MyNavBar></MyNavBar>\r\n</div>\r\n </div>;\r\n};\r\n\r\nexport default Index;\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/views/my/proFile/addModifyProfile/style.module.scss",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689391110981,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689391130134,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,4 +1,8 @@\n .operateProFile {\r\n width: 100vw;\r\n height: 100vh;\r\n+\r\n+ .content {\r\n+ margin-top: 10px;\r\n+ }\r\n }\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689391135720,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -3,6 +3,7 @@\n height: 100vh;\r\n \r\n .content {\r\n margin-top: 10px;\r\n+ background-color: #fff;\r\n }\r\n }\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689391110981,
|
||||
"name": "Commit-0",
|
||||
"content": ".operateProFile{\r\n width: 100vw;\r\n height: 100vh;\r\n}"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/views/my/proFile/index/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689298735701,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689298825620,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,8 +1,26 @@\n import React from \"react\";\r\n import { NavBar } from \"react-vant\";\r\n \r\n const Index: React.FC = () => {\r\n- return <div></div>;\r\n+ return <div>\r\n+ \r\n+ export default () => {\r\n+ return (\r\n+ <div>\r\n+ <NavBar\r\n+ title='标题'\r\n+ leftText='返回'\r\n+ onClickLeft={() => Toast('返回')}\r\n+ rightText={<Search fontSize={20} />}\r\n+ onClickRight={() => Toast('按钮')}\r\n+ />\r\n+ </div>\r\n+ \r\n+ )\r\n+ }\r\n+ \r\n+\r\n+ </div>;\r\n };\r\n \r\n export default Index;\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689298985039,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -2,25 +2,13 @@\n import { NavBar } from \"react-vant\";\r\n \r\n const Index: React.FC = () => {\r\n return <div>\r\n- \r\n- export default () => {\r\n- return (\r\n- <div>\r\n- <NavBar\r\n- title='标题'\r\n- leftText='返回'\r\n- onClickLeft={() => Toast('返回')}\r\n- rightText={<Search fontSize={20} />}\r\n- onClickRight={() => Toast('按钮')}\r\n- />\r\n- </div>\r\n- \r\n- )\r\n- }\r\n- \r\n-\r\n+ <NavBar\r\n+ title='我的档案'\r\n+ onClickLeft={() => {}}\r\n+ onClickRight={() => {}}\r\n+ />\r\n </div>;\r\n };\r\n \r\n export default Index;\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689298735701,
|
||||
"name": "Commit-0",
|
||||
"content": "import React from \"react\";\r\nimport { NavBar } from \"react-vant\";\r\n\r\nconst Index: React.FC = () => {\r\n return <div>\r\n \r\n </div>;\r\n};\r\n\r\nexport default Index;\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/views/my/proFile/index/style.module.scss",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689302394405,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689302401436,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,2 +1,2 @@\n-.btn-add {\r\n+.btn_add {\r\n }\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689302477927,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,2 +1,8 @@\n .btn_add {\r\n+ width: 300px;\r\n+ height: 35px;\r\n+ text-align: center;\r\n+ line-height: 35px;\r\n+ background-color: #3087ea;\r\n+ border-radius: 8px;\r\n }\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689302394405,
|
||||
"name": "Commit-0",
|
||||
"content": ".btn-add{\r\n \r\n}"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/views/my/register/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689316163366,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689316269087,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,5 +1,5 @@\n-import React from \"react\";\r\n+import React ,{useState}from \"react\";\r\n \r\n const Index: React.FC = () => {\r\n const [email, setEmail] = useState<string>(\"\");\r\n const [code, setCode] = useState<string>(\"\");\r\n@@ -8,9 +8,9 @@\n console.log(e);\r\n };\r\n return (\r\n <div>\r\n- <form action=\"health/user/v1/login\" method=\"post\">\r\n+ {/* <form action=\"health/user/v1/login\" method=\"post\">\r\n <div className=\"email\">\r\n <label htmlFor=\"email\">email:</label>\r\n <input\r\n type=\"text\"\r\n@@ -19,8 +19,18 @@\n id=\"email\"\r\n onChange={(e) => setEmail(e.target.value)}\r\n />\r\n </div>\r\n+ <div className=\"code\">\r\n+ <label htmlFor=\"pwd\">密码:</label>\r\n+ <input\r\n+ type=\"password\"\r\n+ name=\"pwd\"\r\n+ value={pwd}\r\n+ id=\"pwd\"\r\n+ onChange={(e) => setPwd(e.target.value)}\r\n+ />\r\n+ </div>\r\n <div className=\"password\">\r\n <label htmlFor=\"pwd\">密码:</label>\r\n <input\r\n type=\"password\"\r\n@@ -30,9 +40,9 @@\n onChange={(e) => setPwd(e.target.value)}\r\n />\r\n </div>\r\n <button onClick={() => onSubmit}>登录</button>\r\n- </form>\r\n+ </form> */}\r\n </div>\r\n );\r\n };\r\n \r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689318191190,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -8,41 +8,9 @@\n console.log(e);\r\n };\r\n return (\r\n <div>\r\n- {/* <form action=\"health/user/v1/login\" method=\"post\">\r\n- <div className=\"email\">\r\n- <label htmlFor=\"email\">email:</label>\r\n- <input\r\n- type=\"text\"\r\n- name=\"email\"\r\n- value={email}\r\n- id=\"email\"\r\n- onChange={(e) => setEmail(e.target.value)}\r\n- />\r\n- </div>\r\n- <div className=\"code\">\r\n- <label htmlFor=\"pwd\">密码:</label>\r\n- <input\r\n- type=\"password\"\r\n- name=\"pwd\"\r\n- value={pwd}\r\n- id=\"pwd\"\r\n- onChange={(e) => setPwd(e.target.value)}\r\n- />\r\n- </div>\r\n- <div className=\"password\">\r\n- <label htmlFor=\"pwd\">密码:</label>\r\n- <input\r\n- type=\"password\"\r\n- name=\"pwd\"\r\n- value={pwd}\r\n- id=\"pwd\"\r\n- onChange={(e) => setPwd(e.target.value)}\r\n- />\r\n- </div>\r\n- <button onClick={() => onSubmit}>登录</button>\r\n- </form> */}\r\n+ \r\n </div>\r\n );\r\n };\r\n \r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689316163366,
|
||||
"name": "Commit-0",
|
||||
"content": "import React from \"react\";\r\n\r\nconst Index: React.FC = () => {\r\n const [email, setEmail] = useState<string>(\"\");\r\n const [code, setCode] = useState<string>(\"\");\r\n const [pwd, setPwd] = useState<string>(\"\");\r\n const onSubmit = (e) => {\r\n console.log(e)\r\n }\r\n return <div>\r\n <form action=\"health/user/v1/login\" method=\"post\">\r\n <div className=\"email\">\r\n <label htmlFor=\"email\">email:</label>\r\n <input\r\n type=\"text\"\r\n name=\"email\"\r\n value={email}\r\n id=\"email\"\r\n onChange={(e) => setEmail(e.target.value)}\r\n />\r\n </div>\r\n <div className=\"password\">\r\n <label htmlFor=\"pwd\">密码:</label>\r\n <input\r\n type=\"password\"\r\n name=\"pwd\"\r\n value={pwd}\r\n id=\"pwd\"\r\n onChange={(e) => setPwd(e.target.value)}\r\n />\r\n </div>\r\n <button onClick={() => onSubmit}>登录</button>\r\n </form>\r\n </div>;\r\n};\r\n\r\nexport default Index;\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/views/my/register/style.module.scss",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689344567215,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689344658551,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -106,32 +106,9 @@\n position: absolute;\r\n top: 182px;\r\n }\r\n \r\n- .btn_link {\r\n- width: 240px;\r\n- display: flex;\r\n- justify-content: space-between;\r\n- align-items: center;\r\n \r\n- .forgetPwd {\r\n- color: #fff;\r\n- font-size: 12px;\r\n- transform: scale(0.83);\r\n- }\r\n-\r\n- .registerNow_wrapper {\r\n- color: #fff;\r\n- font-size: 12px;\r\n- transform: scale(0.83);\r\n-\r\n- &.registerNow {\r\n- color: #fff;\r\n- font-size: 12px;\r\n- }\r\n- }\r\n- }\r\n-\r\n .bottom {\r\n position: absolute;\r\n bottom: 30px;\r\n \r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689344683441,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -106,43 +106,5 @@\n position: absolute;\r\n top: 182px;\r\n }\r\n \r\n- .bottom {\r\n- position: absolute;\r\n- bottom: 30px;\r\n-\r\n- .otherLogin {\r\n- display: flex;\r\n- align-items: center;\r\n-\r\n- .stroke_left {\r\n- display: inline-block;\r\n- width: 54px;\r\n- height: 1px;\r\n- background-color: #fff;\r\n- margin-left: 86px;\r\n- margin-right: 6px;\r\n- }\r\n-\r\n- .stroke_right {\r\n- display: inline-block;\r\n- width: 54px;\r\n- height: 1px;\r\n- background-color: #fff;\r\n- margin-right: 86px;\r\n- margin-left: 6px;\r\n- }\r\n-\r\n- .text {\r\n- color: #fff;\r\n- font-size: 12px;\r\n- }\r\n- }\r\n-\r\n- .weixinIcon {\r\n- margin-top: 10px;\r\n- width: 24px;\r\n- height: 24px;\r\n- }\r\n- }\r\n }\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689344567215,
|
||||
"name": "Commit-0",
|
||||
"content": ".login {\r\n width: 100vw;\r\n height: 100vh;\r\n background: url(../../../assets/images/image/hdpi/login_bg.png) no-repeat;\r\n background-size: 100%;\r\n text-align: center;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n position: relative;\r\n \r\n .hand {\r\n margin-top: 46px;\r\n width: 64px;\r\n height: 64px;\r\n margin-bottom: 60px;\r\n }\r\n \r\n .content {\r\n width: 280px;\r\n height: 218px;\r\n background-color: #fff;\r\n border-radius: 3px;\r\n margin-bottom: 22px;\r\n position: relative;\r\n z-index: 1;\r\n \r\n .formItem_email {\r\n width: 220px;\r\n height: 35px;\r\n margin: 30px 0 10px 30px;\r\n display: flex;\r\n align-items: center;\r\n border-bottom: 1px solid #f2f2f2;\r\n \r\n .emailIcon {\r\n width: 24px;\r\n height: 24px;\r\n margin-right: 14px;\r\n }\r\n \r\n .emailInp {\r\n border: 0;\r\n height: 24px;\r\n &::-webkit-input-placeholder {\r\n color: #999;\r\n font-size: 14px;\r\n }\r\n }\r\n }\r\n \r\n .formItem_password {\r\n width: 220px;\r\n height: 35px;\r\n margin: 25px 0 36px 30px;\r\n display: flex;\r\n align-items: center;\r\n border-bottom: 1px solid #f2f2f2;\r\n \r\n .lockIcon {\r\n width: 24px;\r\n height: 24px;\r\n margin-right: 14px;\r\n }\r\n \r\n .pwdInp {\r\n border: 0;\r\n height: 24px;\r\n &::-webkit-input-placeholder {\r\n color: #999;\r\n font-size: 14px;\r\n }\r\n }\r\n \r\n .hideIcon {\r\n width: 16px;\r\n height: 16px;\r\n }\r\n }\r\n \r\n .btn_login {\r\n width: 230px;\r\n height: 36px;\r\n border-radius: 4px;\r\n background-color: #3087ea;\r\n font-size: 14px;\r\n color: #fff;\r\n border: 0;\r\n }\r\n }\r\n \r\n .shadow_one {\r\n width: 260px;\r\n height: 218px;\r\n border-radius: 3px;\r\n background-color: rgba($color: #fff, $alpha: 0.6);\r\n position: absolute;\r\n top: 176px;\r\n }\r\n \r\n .shadow_two {\r\n width: 240px;\r\n height: 218px;\r\n border-radius: 3px;\r\n background-color: rgba($color: #fff, $alpha: 0.3);\r\n position: absolute;\r\n top: 182px;\r\n }\r\n \r\n .btn_link {\r\n width: 240px;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n \r\n .forgetPwd {\r\n color: #fff;\r\n font-size: 12px;\r\n transform: scale(0.83);\r\n }\r\n \r\n .registerNow_wrapper {\r\n color: #fff;\r\n font-size: 12px;\r\n transform: scale(0.83);\r\n \r\n &.registerNow {\r\n color: #fff;\r\n font-size: 12px;\r\n }\r\n }\r\n }\r\n \r\n .bottom {\r\n position: absolute;\r\n bottom: 30px;\r\n \r\n .otherLogin {\r\n display: flex;\r\n align-items: center;\r\n \r\n .stroke_left {\r\n display: inline-block;\r\n width: 54px;\r\n height: 1px;\r\n background-color: #fff;\r\n margin-left: 86px;\r\n margin-right: 6px;\r\n }\r\n \r\n .stroke_right {\r\n display: inline-block;\r\n width: 54px;\r\n height: 1px;\r\n background-color: #fff;\r\n margin-right: 86px;\r\n margin-left: 6px;\r\n }\r\n \r\n .text {\r\n color: #fff;\r\n font-size: 12px;\r\n }\r\n }\r\n \r\n .weixinIcon {\r\n margin-top: 10px;\r\n width: 24px;\r\n height: 24px;\r\n }\r\n }\r\n }\r\n "
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"sourceFile": "src/views/set/bindBankCard/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 0,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1690275573158,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
}
|
||||
],
|
||||
"date": 1690275573158,
|
||||
"name": "Commit-0",
|
||||
"content": "import React, { useState } from \"react\";\r\nimport { MyMack, MyNavBar } from \"../../../components\";\r\nimport { useNavigate } from \"react-router-dom\";\r\nimport style from './style.module.scss'\r\nimport myIconCamera from \"../../../assets/images/icon/common resource/hdpi/my_icon_camera_n.png\"\r\nimport commonIconClose from \"../../../assets/images/icon/common resource/hdpi/common_icon_close_n.png\"\r\nimport bankCardFront from \"../../../assets/images/image/hdpi/bank_card_front.png\"\r\n\r\nconst Index: React.FC = () => {\r\n\r\n const navigate = useNavigate()\r\n\r\n const [isFlag, setIsFlag] = useState(false)\r\n\r\n return <div className={style.bindBankCard}>\r\n <MyNavBar title=\"绑定银行卡\" onClickLeft={() => navigate('/set/person/infomation')} style={{ backgroundColor: \"#fff\" }}></MyNavBar>\r\n <div className={style.bindBankCard_container}>\r\n <div className={style.figure_box}>\r\n <img src={bankCardFront} alt=\"\" className={style.backgroundUrl} />\r\n <div className={style.uploadBankCard}>\r\n <img src={myIconCamera} alt=\"\" onClick={() => setIsFlag(true)} />\r\n <div>点击拍摄/上传银行卡正面</div>\r\n </div>\r\n <img src={commonIconClose} alt=\"\" className={style.closeIcon} />\r\n </div>\r\n <button className={style.btn} onClick={() => navigate('/set/bind/bank/card/confirm')}>下一步</button>\r\n </div>\r\n {/* 蒙层 */}\r\n {\r\n isFlag && <MyMack onCancel={() => setIsFlag(false)} onConfirm={() => setIsFlag(false)}></MyMack>\r\n }\r\n </div>;\r\n};\r\n\r\nexport default Index;\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/views/set/changePassword/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1690424913167,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1690424921342,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,5 +1,5 @@\n-import React, { useState } from \"react\";\r\n+import React from \"react\";\r\n import style from \"./style.module.scss\";\r\n import { Button, Input, Form } from \"react-vant\";\r\n import { MyNavBar } from \"../../../components\";\r\n import { useNavigate } from \"react-router-dom\";\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1690425035997,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -12,9 +12,9 @@\n const navigate = useNavigate();\r\n const userId = useAppSelector((state) => state.user.userInfo.userId);\r\n const sessionId = useAppSelector((state) => state.user.userInfo.sessionId);\r\n const [form] = Form.useForm();\r\n- const state = useAppSelector((state) => console.log(\"state\", state));\r\n+ const state = useAppSelector((state) => state.user as any);\r\n \r\n const onFinish = async ({\r\n myPassword,\r\n setNewPassword,\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1690424913167,
|
||||
"name": "Commit-0",
|
||||
"content": "import React, { useState } from \"react\";\r\nimport style from \"./style.module.scss\"\r\nimport { Button, Input, Form } from 'react-vant';\r\nimport { MyNavBar } from \"../../../components\";\r\nimport { useNavigate } from \"react-router-dom\";\r\nimport { encryptedData, publicKey } from \"../../../store/user/userSlice\";\r\nimport { Notify } from \"react-vant\";\r\nimport { putChangePassword } from \"../../../api/my\";\r\nimport { useAppDispatch, useAppSelector } from \"../../../store/hooks\";\r\nimport { userQuit } from \"../../../store/user/userSlice\";\r\nconst Index: React.FC = () => {\r\n\r\n const navigate = useNavigate()\r\n const userId = useAppSelector((state) => state.user.userInfo.userId);\r\n const sessionId = useAppSelector((state) => state.user.userInfo.sessionId);\r\n const [form] = Form.useForm()\r\n const state=useAppSelector(state=>console.log('state',state)) \r\n \r\n \r\n const onFinish = async ({ myPassword, setNewPassword, verifyNewPassword }) => {\r\n const dispatch = useAppDispatch()\r\n if (myPassword && setNewPassword && verifyNewPassword) {\r\n if (setNewPassword === verifyNewPassword) {\r\n const encryptPwd = encryptedData(publicKey, setNewPassword) as string\r\n const oldPwd = encryptedData(publicKey, myPassword) as string\r\n const {message} = await putChangePassword(userId, sessionId, oldPwd, encryptPwd)\r\n \r\n if(message===\"修改成功\"){\r\n dispatch(userQuit(state))\r\n navigate(\"/login\")\r\n }\r\n } else {\r\n Notify.show({ type: \"danger\", message: \"两次密码不一致\" });\r\n }\r\n } else {\r\n Notify.show({ type: \"danger\", message: \"输入框不能为空\" });\r\n }\r\n }\r\n\r\n\r\n return (\r\n <div className={style.changePassword}>\r\n <MyNavBar title=\"修改密码\" onClickLeft={() => navigate(\"/set\")} style={{ backgroundColor: \"#fff\" }}></MyNavBar>\r\n\r\n <Form\r\n className={style.form}\r\n form={form}\r\n onFinish={onFinish}\r\n footer={\r\n <Button round nativeType='submit' type='primary' block>\r\n 提交\r\n </Button>\r\n }\r\n >\r\n <Form.Item\r\n name='myPassword'\r\n label='我的密码'\r\n >\r\n <Input placeholder=\"请输入原密码\" align=\"right\" type=\"password\" />\r\n </Form.Item>\r\n <Form.Item\r\n name='setNewPassword'\r\n label='设置新密码'\r\n >\r\n <Input placeholder=\"请输入新密码\" align=\"right\" type=\"password\" />\r\n </Form.Item>\r\n <Form.Item\r\n name='verifyNewPassword'\r\n label='确认新密码'\r\n >\r\n <Input placeholder=\"请再次输入密码\" align=\"right\" type=\"password\" />\r\n </Form.Item>\r\n </Form>\r\n </div>\r\n );\r\n};\r\n\r\nexport default Index;\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/views/set/chooseGender/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1690976743783,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1690976857077,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -4,16 +4,16 @@\n import { useNavigate } from \"react-router-dom\";\r\n import boy from \"../../../assets/images/image/hdpi/boy.png\";\r\n import girl from \"../../../assets/images/image/hdpi/girl.png\";\r\n import selected from \"../../../assets/images/image/hdpi/selected.png\";\r\n-import { useAppSelector } from \"../../../store/hooks\";\r\n+import { useAppDispatch, useAppSelector } from \"../../../store/hooks\";\r\n import { updateUserSex } from \"../../../api/my\";\r\n import { Toast } from \"react-vant\";\r\n import { getUserInfo } from \"../../../store/user/userSlice\";\r\n \r\n const Index: React.FC = () => {\r\n const navigate = useNavigate();\r\n-\r\n+ const dispatch = useAppDispatch()\r\n const sex = useAppSelector((state) => state.user.userInfo.sex);\r\n const userId = useAppSelector((state) => state.user.userInfo.userId);\r\n const sessionId = useAppSelector((state) => state.user.userInfo.sessionId);\r\n \r\n@@ -21,11 +21,11 @@\n \r\n const onUpdate = async () => {\r\n const resp = await updateUserSex(sexInd, userId, sessionId);\r\n const { message, status } = resp;\r\n- const res = await getUserInfo();\r\n- console.log(\"res\", res);\r\n+ \r\n if (status === \"0000\") {\r\n+ dispatch(getUserInfo({ userId: userId.toString(), sessionId }))\r\n Toast.success(message);\r\n navigate(\"/set/person/infomation\");\r\n }\r\n };\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1690977015906,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,5 +1,5 @@\n-import React, { useEffect, useState } from \"react\";\r\n+import React, { useState } from \"react\";\r\n import style from \"./style.module.scss\";\r\n import { MyNavBar } from \"../../../components\";\r\n import { useNavigate } from \"react-router-dom\";\r\n import boy from \"../../../assets/images/image/hdpi/boy.png\";\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1690976743783,
|
||||
"name": "Commit-0",
|
||||
"content": "import React, { useEffect, useState } from \"react\";\r\nimport style from './style.module.scss'\r\nimport { MyNavBar } from \"../../../components\";\r\nimport { useNavigate } from \"react-router-dom\";\r\nimport boy from '../../../assets/images/image/hdpi/boy.png'\r\nimport girl from '../../../assets/images/image/hdpi/girl.png'\r\nimport selected from '../../../assets/images/image/hdpi/selected.png'\r\nimport { useAppSelector } from \"../../../store/hooks\";\r\nimport { updateUserSex } from \"../../../api/my\";\r\nimport { Toast } from \"react-vant\";\r\nimport { getUserInfo } from \"../../../store/user/userSlice\";\r\n\r\nconst Index: React.FC = () => {\r\n\r\n const navigate = useNavigate()\r\n \r\n const sex = useAppSelector((state) => state.user.userInfo.sex)\r\n const userId = useAppSelector((state) => state.user.userInfo.userId)\r\n const sessionId = useAppSelector((state) => state.user.userInfo.sessionId)\r\n\r\n const [sexInd, setSexInd] = useState(sex)\r\n\r\n const onUpdate = async () => {\r\n const resp = await updateUserSex(sexInd, userId, sessionId)\r\n const { message, status } = resp\r\n const res = await getUserInfo()\r\n console.log('res',res)\r\n if (status === '0000') {\r\n Toast.success(message)\r\n navigate('/set/person/infomation')\r\n }\r\n }\r\n\r\n return <div className={style.chooseGender}>\r\n <MyNavBar\r\n title=\"选择性别\"\r\n rightText={\r\n <button\r\n className={style.btn}\r\n onClick={() => onUpdate()}\r\n >完成</button>}\r\n style={{ backgroundColor: \"#fff\" }}\r\n onClickLeft={() => navigate('/set/person/infomation')}\r\n ></MyNavBar>\r\n <div className={style.chooseGender_box}>\r\n <div className={style.boy_box}>\r\n <div className={style.selectedSex_box} onClick={() => setSexInd(1)}>\r\n <img src={boy} alt=\"\" className={style.selectedSex} />\r\n {\r\n sexInd === 1 && <img src={selected} alt=\"\" className={style.activeIcon} />\r\n }\r\n </div>\r\n <div className={style.boy_text}>男</div>\r\n </div>\r\n <div className={style.girl_box}>\r\n <div className={style.selectedSex_box} onClick={() => setSexInd(2)}>\r\n <img src={girl} alt=\"\" className={style.selectedSex} />\r\n {\r\n sexInd === 2 && <img src={selected} alt=\"\" className={style.activeIcon} />\r\n }\r\n </div>\r\n <div className={style.girl_text}>女</div>\r\n </div>\r\n </div>\r\n </div>;\r\n};\r\n\r\nexport default Index;\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/views/set/index/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1690337200683,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1690423930855,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,32 +1,17 @@\n import React from \"react\";\r\n import style from \"./style.module.scss\";\r\n import { MyNavBar } from \"../../../components\";\r\n-<<<<<<< HEAD\r\n import myIconNext from \"../../../assets/images/icon/common resource/hdpi/my_icon_next_n.png\";\r\n-=======\r\n-import myIconNext from \"../../../assets/images/icon/common resource/hdpi/my_icon_next_n.png\"\r\n->>>>>>> 8b076d7e38f830a5ac77ca5d6d1bc6bcd2f83048\r\n import { useNavigate } from \"react-router-dom\";\r\n import { useAppSelector } from \"../../../store/hooks\";\r\n import { useRequest } from \"ahooks\";\r\n import { getUserInfoById } from \"../../../api/my\";\r\n \r\n const Index: React.FC = () => {\r\n-<<<<<<< HEAD\r\n const navigate = useNavigate();\r\n const userInfo = useAppSelector((state) => {\r\n return state.user.userInfo;\r\n-=======\r\n-\r\n- const navigate = useNavigate()\r\n- const userId = useAppSelector((state) => state.user.userInfo.userId)\r\n- const sessionId = useAppSelector((state) => state.user.userInfo.sessionId)\r\n-\r\n- const { data: userInfo = [] } = useRequest(async () => {\r\n- const resp = await getUserInfoById(userId, sessionId);\r\n- return resp.result;\r\n->>>>>>> 8b076d7e38f830a5ac77ca5d6d1bc6bcd2f83048\r\n });\r\n \r\n return (\r\n <div className={style.setPage}>\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1690423953909,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -3,10 +3,8 @@\n import { MyNavBar } from \"../../../components\";\r\n import myIconNext from \"../../../assets/images/icon/common resource/hdpi/my_icon_next_n.png\";\r\n import { useNavigate } from \"react-router-dom\";\r\n import { useAppSelector } from \"../../../store/hooks\";\r\n-import { useRequest } from \"ahooks\";\r\n-import { getUserInfoById } from \"../../../api/my\";\r\n \r\n const Index: React.FC = () => {\r\n const navigate = useNavigate();\r\n const userInfo = useAppSelector((state) => {\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1690337200683,
|
||||
"name": "Commit-0",
|
||||
"content": "import React from \"react\";\r\nimport style from './style.module.scss'\r\nimport { MyNavBar } from \"../../../components\";\r\nimport myIconNext from \"../../../assets/images/icon/common resource/hdpi/my_icon_next_n.png\"\r\nimport { useNavigate } from \"react-router-dom\";\r\nimport { useAppSelector } from \"../../../store/hooks\";\r\n\r\nconst Index: React.FC = () => {\r\n\r\n const navigate = useNavigate()\r\n const userInfo = useAppSelector((state) => {\r\n return state.user.userInfo;\r\n });\r\n\r\n\r\n return <div className={style.setPage}>\r\n <MyNavBar\r\n title=\"设置\"\r\n style={{ backgroundColor: \"#fff\" }}\r\n onClickLeft={() => navigate(\"/my\")}\r\n ></MyNavBar>\r\n {/* 设置内容 */}\r\n <div className={style.setMain}>\r\n {/* 个人信息 */}\r\n <div className={style.userInformation} onClick={() => navigate(\"/set/person/infomation\")}>\r\n <div className={style.userAvatar}>\r\n {/* 用户头像 */}\r\n <img src={userInfo.headPic} alt=\"\" />\r\n {/* 用户名称 */}\r\n <div>{userInfo.nickName}</div>\r\n </div>\r\n <img src={myIconNext} alt=\"\" />\r\n </div>\r\n {/* 修改密码 */}\r\n <div className={style.editPassword} onClick={() => navigate(\"/set/change/password\")}>\r\n <div>修改密码</div>\r\n <img src={myIconNext} alt=\"\" />\r\n </div>\r\n\r\n <div className={style.cache_screen_versions}>\r\n {/* 清除缓存 */}\r\n <div className={style.clearCache}>\r\n <div>清除缓存</div>\r\n <div className={style.cache_box}>\r\n <div>10M</div>\r\n <img src={myIconNext} alt=\"\" />\r\n </div>\r\n </div>\r\n {/* 屏幕亮度 */}\r\n <div className={style.screenBrightness} onClick={() => navigate(\"/set/screen/brightness\")}>\r\n <div>屏幕亮度</div>\r\n <img src={myIconNext} alt=\"\" />\r\n </div>\r\n {/* 版本检测 */}\r\n <div className={style.versionsDetection} onClick={() => navigate(\"/set/version/detection\")}>\r\n <div>版本检测</div>\r\n <img src={myIconNext} alt=\"\" />\r\n </div>\r\n </div>\r\n\r\n <div className={style.helpCenter_aboutUs}>\r\n {/* 帮助中心 */}\r\n <div className={style.helpCenter}>\r\n <div>帮助中心</div>\r\n <img src={myIconNext} alt=\"\" />\r\n </div>\r\n {/* 关于我们 */}\r\n <div className={style.aboutUs}>\r\n <div>关于我们</div>\r\n <img src={myIconNext} alt=\"\" />\r\n </div>\r\n </div>\r\n\r\n {/* 邀请好友 */}\r\n <div className={style.inviteFriends} onClick={() => navigate(\"/set/invite/friends\")}>\r\n <div>邀请好友</div>\r\n <img src={myIconNext} alt=\"\" />\r\n </div>\r\n {/* 退出登录 */}\r\n <div className={style.logOut} onClick={() => navigate(\"/home\")}>退出登录</div>\r\n\r\n {/* 底部空白*/}\r\n <div className={style.footer}></div>\r\n </div>\r\n </div>;\r\n};\r\n\r\nexport default Index;\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/views/set/inviteFriends/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689853794232,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689853839706,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,7 +1,8 @@\n import React from \"react\";\r\n import { MyNavBar } from \"../../../components\";\r\n import { useNavigate } from \"react-router-dom\";\r\n+import style from './style.module.scss'\r\n \r\n const Index: React.FC = () => {\r\n const navigate = useNavigate();\r\n return (\r\n@@ -12,8 +13,9 @@\n leftArrow\r\n onClickLeft={() => navigate(\"/set\")}\r\n ></MyNavBar>\r\n </div>\r\n+ <div className={style.content}></div>\r\n </div>\r\n );\r\n };\r\n \r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689854030071,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -5,9 +5,9 @@\n \r\n const Index: React.FC = () => {\r\n const navigate = useNavigate();\r\n return (\r\n- <div>\r\n+ <div className={style.wrapper}>\r\n <div className=\"navbar\">\r\n <MyNavBar\r\n title=\"邀请好友\"\r\n leftArrow\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689853794232,
|
||||
"name": "Commit-0",
|
||||
"content": "import React from \"react\";\r\nimport { MyNavBar } from \"../../../components\";\r\nimport { useNavigate } from \"react-router-dom\";\r\n\r\nconst Index: React.FC = () => {\r\n const navigate = useNavigate()\r\n return <div>\r\n <div className=\"navbar\">\r\n <MyNavBar title=\"邀请好友\" leftArrow onClickLeft={() => navigate('/set')}></MyNavBar>\r\n </div>\r\n </div>;\r\n};\r\n\r\nexport default Index;\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/views/set/inviteFriends/style.module.scss",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689853933250,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1689853993667,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,5 +1,9 @@\n-.content {\r\n+.wrapper {\r\n+ .content {\r\n background: url(\"../../../assets/images/image/hdpi/invitation_bg.png\")\r\n no-repeat;\r\n background-size: 100%;\r\n }\r\n+\r\n+}\r\n+\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1689854007842,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,5 +1,7 @@\n .wrapper {\r\n+ display: flex;\r\n+ flex-direction: column;\r\n .content {\r\n background: url(\"../../../assets/images/image/hdpi/invitation_bg.png\")\r\n no-repeat;\r\n background-size: 100%;\r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689853933250,
|
||||
"name": "Commit-0",
|
||||
"content": ".content {\r\n background: url('../../../assets/images/image/hdpi/invitation_bg.png') no-repeat;\r\n background-size: 100%;\r\n}"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"sourceFile": "src/views/set/personInfomation/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 2,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689314238675,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
},
|
||||
{
|
||||
"date": 1690273957810,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -34,10 +34,8 @@\n <div className={style.avatar}>\r\n <div>头像</div>\r\n <img src={userInfo.headPic} alt=\"\" onClick={() => {\r\n setIsFlag(true)\r\n- console.log(isFlag)\r\n-\r\n }} />\r\n </div>\r\n {/* 昵称 */}\r\n <div className={style.nickname} onClick={() => navigate('/set/nickname')}>\r\n"
|
||||
},
|
||||
{
|
||||
"date": 1690275484175,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -150,9 +150,9 @@\n {/* 底部空白 */}\r\n <div className={style.footer}></div>\r\n </div>\r\n {/* 蒙层 */}\r\n- {isFlag && <MyMack onCancel={() => setIsFlag(false)}></MyMack>}\r\n+ {isFlag && <MyMack onCancel={() => setIsFlag(false)} onConfirm={() => setIsFlag(false)}></MyMack>}\r\n </div>\r\n );\r\n };\r\n \r\n"
|
||||
}
|
||||
],
|
||||
"date": 1689314238675,
|
||||
"name": "Commit-0",
|
||||
"content": "import React from \"react\";\r\n\r\nconst Index: React.FC = () => {\r\n return <div>个人信息页面</div>;\r\n};\r\n\r\nexport default Index;\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"sourceFile": "src/views/set/realNameAuthentication/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 0,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1690275564255,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
}
|
||||
],
|
||||
"date": 1690275564255,
|
||||
"name": "Commit-0",
|
||||
"content": "import React, { useState } from \"react\";\r\nimport { MyMack, MyNavBar } from \"../../../components\";\r\nimport style from \"./style.module.scss\"\r\nimport idCardFront from \"../../../assets/images/image/hdpi/id_card_front.png\"\r\nimport idCardBack from \"../../../assets/images/image/hdpi/id_card_back.png\"\r\nimport myIconCamera from \"../../../assets/images/icon/common resource/hdpi/my_icon_camera_n.png\"\r\nimport commonIconClose from \"../../../assets/images/icon/common resource/hdpi/common_icon_close_n.png\"\r\nimport { useNavigate } from \"react-router-dom\";\r\n\r\nconst Index: React.FC = () => {\r\n\r\n const navigate = useNavigate()\r\n\r\n const [isFlag, setIsFlag] = useState(false)\r\n\r\n return <div className={style.realNameAuthentication}>\r\n <MyNavBar title=\"实名认证\" style={{ backgroundColor: \"#fff\" }} onClickLeft={() => navigate(\"/set/person/infomation\")}></MyNavBar>\r\n <div className={style.realNameAuthentication_container}>\r\n <div>\r\n <div className={style.figure_box}>\r\n <img src={idCardFront} alt=\"\" className={style.backgroundUrl} />\r\n <div className={style.uploadFigure}>\r\n <img src={myIconCamera} alt=\"\" onClick={() => setIsFlag(true)} />\r\n <div>点击拍摄/上传人像面</div>\r\n </div>\r\n <img src={commonIconClose} alt=\"\" className={style.closeIcon} />\r\n </div>\r\n <div className={style.emblem_box}>\r\n <img src={idCardBack} alt=\"\" className={style.backgroundUrl} />\r\n <div className={style.uploadEmblem}>\r\n <img src={myIconCamera} alt=\"\" onClick={() => setIsFlag(true)} />\r\n <div>点击拍摄/上传国徽面</div>\r\n </div>\r\n <img src={commonIconClose} alt=\"\" className={style.closeIcon} />\r\n </div>\r\n </div>\r\n <button className={style.btn} onClick={() => navigate('/set/view/authentication/information')}>下一步</button>\r\n {/* 蒙层 */}\r\n {\r\n isFlag && <MyMack onCancel={() => setIsFlag(false)} onConfirm={() => setIsFlag(false)}></MyMack>\r\n }\r\n </div>\r\n </div>;\r\n};\r\n\r\nexport default Index;\r\n"
|
||||
}
|
||||
]
|
||||
}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"sourceFile": "src/views/wallet/myWallet/index.tsx",
|
||||
"activeCommit": 0,
|
||||
"commits": [
|
||||
{
|
||||
"activePatchIndex": 0,
|
||||
"patches": [
|
||||
{
|
||||
"date": 1689780598208,
|
||||
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
||||
}
|
||||
],
|
||||
"date": 1689780598208,
|
||||
"name": "Commit-0",
|
||||
"content": "import React, { useRef } from \"react\";\r\nimport { useRequest } from \"ahooks\";\r\nimport style from \"./style.module.scss\";\r\nimport { getConsumptionFormatText } from \"../../../utils/formatType\";\r\nimport { MyNavBar } from \"../../../components\";\r\nimport { useNavigate } from \"react-router-dom\";\r\nimport { dateFormat } from \"../../../utils/formatTime\";\r\nimport { getRecordList, getUserWallet } from \"../../../api/wallet\";\r\n\r\ninterface RecordListState {\r\n direction: number;\r\n type: number;\r\n changeNum: number;\r\n remark: string;\r\n createTime: number;\r\n}\r\n\r\nconst Index: React.FC = () => {\r\n const navigate = useNavigate();\r\n\r\n // 钱包请求hooks\r\n const { data: walletData = 0 } = useRequest<number, []>(async () => {\r\n const resp = await getUserWallet();\r\n return resp.result;\r\n });\r\n\r\n // 查询用户消费记录接口参数\r\n const recordParams = useRef({\r\n page: 1,\r\n count: 10,\r\n });\r\n // 用户消费记录请求hooks\r\n const { data: RecordData = [] } = useRequest<RecordListState[], []>(\r\n async () => {\r\n const resp = await getRecordList(recordParams.current);\r\n return resp.result;\r\n }\r\n );\r\n\r\n return (\r\n <div className={style.wallet}>\r\n {/* 顶部钱包-余额-操作 */}\r\n <div className={style.myWallet}>\r\n {/* 导航栏 */}\r\n <MyNavBar\r\n title=\"我的钱包\"\r\n theme=\"white\"\r\n style={{ background: \"rgba(0,0,0,0)\" }}\r\n onClickLeft={() => {\r\n console.log(1);\r\n }}\r\n ></MyNavBar>\r\n {/* 钱包 */}\r\n <div className={style[\"myWallet-wrapper\"]}>\r\n <div className={style[\"myWallet-content\"]}>\r\n {/* 余额 H币 */}\r\n <b className={style[\"myWallet-remain\"]}>\r\n {walletData}\r\n {/* 1500 */}\r\n </b>\r\n <p className={style.units}>H币</p>\r\n </div>\r\n </div>\r\n {/* 提现规则 */}\r\n <div className={style.rule}>满2000H币可提现</div>\r\n\r\n {/* 操作按钮 */}\r\n <div className={style[\"opera-btns\"]}>\r\n <button\r\n onClick={() => {\r\n navigate(\"/wallet/withdrawal\");\r\n }}\r\n >\r\n 提现\r\n </button>\r\n <button\r\n onClick={() => {\r\n navigate(\"/wallet/recharge\");\r\n }}\r\n >\r\n 充值\r\n </button>\r\n </div>\r\n </div>\r\n\r\n {/* 底部-消费记录 */}\r\n <div className={style.consumption}>\r\n <div className={style.recordList}>\r\n <ul>\r\n {RecordData.map((item) => {\r\n return (\r\n <li key={item.createTime}>\r\n <div className={style[\"recordList-left\"]}>\r\n <b>{getConsumptionFormatText(item.type)}</b>\r\n <span>{dateFormat(item.createTime, \"yyyy.MM.dd\")}</span>\r\n </div>\r\n <div className={style[\"recordList-right\"]}>\r\n <b\r\n style={{\r\n color: item.direction === 1 ? \"#d92109\" : \"#3087ea\",\r\n }}\r\n >\r\n {item.direction === 1 ? \"+\" : \"\"}\r\n {item.changeNum}\r\n H币\r\n </b>\r\n </div>\r\n </li>\r\n );\r\n })}\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport default Index;\r\n"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
# s_wangzhan_project
|
||||
|
||||
#### 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/)
|
|
@ -0,0 +1,7 @@
|
|||
# 技术栈
|
||||
- react
|
||||
- react-router-dom
|
||||
- redux-toolkit
|
||||
- axios + mock
|
||||
- react-vant
|
||||
- hooks + typescript
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = {
|
||||
extends: ['@commitlint/config-conventional']
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const paths = require('./paths');
|
||||
|
||||
// Make sure that including paths.js after env.js will read .env variables.
|
||||
delete require.cache[require.resolve('./paths')];
|
||||
|
||||
const NODE_ENV = process.env.NODE_ENV;
|
||||
if (!NODE_ENV) {
|
||||
throw new Error(
|
||||
'The NODE_ENV environment variable is required but was not specified.'
|
||||
);
|
||||
}
|
||||
|
||||
// https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use
|
||||
const dotenvFiles = [
|
||||
`${paths.dotenv}.${NODE_ENV}.local`,
|
||||
// Don't include `.env.local` for `test` environment
|
||||
// since normally you expect tests to produce the same
|
||||
// results for everyone
|
||||
NODE_ENV !== 'test' && `${paths.dotenv}.local`,
|
||||
`${paths.dotenv}.${NODE_ENV}`,
|
||||
paths.dotenv,
|
||||
].filter(Boolean);
|
||||
|
||||
// Load environment variables from .env* files. Suppress warnings using silent
|
||||
// if this file is missing. dotenv will never modify any environment variables
|
||||
// that have already been set. Variable expansion is supported in .env files.
|
||||
// https://github.com/motdotla/dotenv
|
||||
// https://github.com/motdotla/dotenv-expand
|
||||
dotenvFiles.forEach(dotenvFile => {
|
||||
if (fs.existsSync(dotenvFile)) {
|
||||
require('dotenv-expand')(
|
||||
require('dotenv').config({
|
||||
path: dotenvFile,
|
||||
})
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
// We support resolving modules according to `NODE_PATH`.
|
||||
// This lets you use absolute paths in imports inside large monorepos:
|
||||
// https://github.com/facebook/create-react-app/issues/253.
|
||||
// It works similar to `NODE_PATH` in Node itself:
|
||||
// https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders
|
||||
// Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored.
|
||||
// Otherwise, we risk importing Node.js core modules into an app instead of webpack shims.
|
||||
// https://github.com/facebook/create-react-app/issues/1023#issuecomment-265344421
|
||||
// We also resolve them to make sure all tools using them work consistently.
|
||||
const appDirectory = fs.realpathSync(process.cwd());
|
||||
process.env.NODE_PATH = (process.env.NODE_PATH || '')
|
||||
.split(path.delimiter)
|
||||
.filter(folder => folder && !path.isAbsolute(folder))
|
||||
.map(folder => path.resolve(appDirectory, folder))
|
||||
.join(path.delimiter);
|
||||
|
||||
// Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be
|
||||
// injected into the application via DefinePlugin in webpack configuration.
|
||||
const REACT_APP = /^REACT_APP_/i;
|
||||
|
||||
function getClientEnvironment(publicUrl) {
|
||||
const raw = Object.keys(process.env)
|
||||
.filter(key => REACT_APP.test(key))
|
||||
.reduce(
|
||||
(env, key) => {
|
||||
env[key] = process.env[key];
|
||||
return env;
|
||||
},
|
||||
{
|
||||
// Useful for determining whether we’re running in production mode.
|
||||
// Most importantly, it switches React into the correct mode.
|
||||
NODE_ENV: process.env.NODE_ENV || 'development',
|
||||
// Useful for resolving the correct path to static assets in `public`.
|
||||
// For example, <img src={process.env.PUBLIC_URL + '/img/logo.png'} />.
|
||||
// This should only be used as an escape hatch. Normally you would put
|
||||
// images into the `src` and `import` them in code to get their paths.
|
||||
PUBLIC_URL: publicUrl,
|
||||
// We support configuring the sockjs pathname during development.
|
||||
// These settings let a developer run multiple simultaneous projects.
|
||||
// They are used as the connection `hostname`, `pathname` and `port`
|
||||
// in webpackHotDevClient. They are used as the `sockHost`, `sockPath`
|
||||
// and `sockPort` options in webpack-dev-server.
|
||||
WDS_SOCKET_HOST: process.env.WDS_SOCKET_HOST,
|
||||
WDS_SOCKET_PATH: process.env.WDS_SOCKET_PATH,
|
||||
WDS_SOCKET_PORT: process.env.WDS_SOCKET_PORT,
|
||||
// Whether or not react-refresh is enabled.
|
||||
// It is defined here so it is available in the webpackHotDevClient.
|
||||
FAST_REFRESH: process.env.FAST_REFRESH !== 'false',
|
||||
}
|
||||
);
|
||||
// Stringify all values so we can feed into webpack DefinePlugin
|
||||
const stringified = {
|
||||
'process.env': Object.keys(raw).reduce((env, key) => {
|
||||
env[key] = JSON.stringify(raw[key]);
|
||||
return env;
|
||||
}, {}),
|
||||
};
|
||||
|
||||
return { raw, stringified };
|
||||
}
|
||||
|
||||
module.exports = getClientEnvironment;
|
|
@ -0,0 +1,66 @@
|
|||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const crypto = require('crypto');
|
||||
const chalk = require('react-dev-utils/chalk');
|
||||
const paths = require('./paths');
|
||||
|
||||
// Ensure the certificate and key provided are valid and if not
|
||||
// throw an easy to debug error
|
||||
function validateKeyAndCerts({ cert, key, keyFile, crtFile }) {
|
||||
let encrypted;
|
||||
try {
|
||||
// publicEncrypt will throw an error with an invalid cert
|
||||
encrypted = crypto.publicEncrypt(cert, Buffer.from('test'));
|
||||
} catch (err) {
|
||||
throw new Error(
|
||||
`The certificate "${chalk.yellow(crtFile)}" is invalid.\n${err.message}`
|
||||
);
|
||||
}
|
||||
|
||||
try {
|
||||
// privateDecrypt will throw an error with an invalid key
|
||||
crypto.privateDecrypt(key, encrypted);
|
||||
} catch (err) {
|
||||
throw new Error(
|
||||
`The certificate key "${chalk.yellow(keyFile)}" is invalid.\n${
|
||||
err.message
|
||||
}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Read file and throw an error if it doesn't exist
|
||||
function readEnvFile(file, type) {
|
||||
if (!fs.existsSync(file)) {
|
||||
throw new Error(
|
||||
`You specified ${chalk.cyan(
|
||||
type
|
||||
)} in your env, but the file "${chalk.yellow(file)}" can't be found.`
|
||||
);
|
||||
}
|
||||
return fs.readFileSync(file);
|
||||
}
|
||||
|
||||
// Get the https config
|
||||
// Return cert files if provided in env, otherwise just true or false
|
||||
function getHttpsConfig() {
|
||||
const { SSL_CRT_FILE, SSL_KEY_FILE, HTTPS } = process.env;
|
||||
const isHttps = HTTPS === 'true';
|
||||
|
||||
if (isHttps && SSL_CRT_FILE && SSL_KEY_FILE) {
|
||||
const crtFile = path.resolve(paths.appPath, SSL_CRT_FILE);
|
||||
const keyFile = path.resolve(paths.appPath, SSL_KEY_FILE);
|
||||
const config = {
|
||||
cert: readEnvFile(crtFile, 'SSL_CRT_FILE'),
|
||||
key: readEnvFile(keyFile, 'SSL_KEY_FILE'),
|
||||
};
|
||||
|
||||
validateKeyAndCerts({ ...config, keyFile, crtFile });
|
||||
return config;
|
||||
}
|
||||
return isHttps;
|
||||
}
|
||||
|
||||
module.exports = getHttpsConfig;
|
|
@ -0,0 +1,29 @@
|
|||
'use strict';
|
||||
|
||||
const babelJest = require('babel-jest').default;
|
||||
|
||||
const hasJsxRuntime = (() => {
|
||||
if (process.env.DISABLE_NEW_JSX_TRANSFORM === 'true') {
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
require.resolve('react/jsx-runtime');
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
})();
|
||||
|
||||
module.exports = babelJest.createTransformer({
|
||||
presets: [
|
||||
[
|
||||
require.resolve('babel-preset-react-app'),
|
||||
{
|
||||
runtime: hasJsxRuntime ? 'automatic' : 'classic',
|
||||
},
|
||||
],
|
||||
],
|
||||
babelrc: false,
|
||||
configFile: false,
|
||||
});
|
|
@ -0,0 +1,14 @@
|
|||
'use strict';
|
||||
|
||||
// This is a custom Jest transformer turning style imports into empty objects.
|
||||
// http://facebook.github.io/jest/docs/en/webpack.html
|
||||
|
||||
module.exports = {
|
||||
process() {
|
||||
return 'module.exports = {};';
|
||||
},
|
||||
getCacheKey() {
|
||||
// The output is always the same.
|
||||
return 'cssTransform';
|
||||
},
|
||||
};
|
|
@ -0,0 +1,40 @@
|
|||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
const camelcase = require('camelcase');
|
||||
|
||||
// This is a custom Jest transformer turning file imports into filenames.
|
||||
// http://facebook.github.io/jest/docs/en/webpack.html
|
||||
|
||||
module.exports = {
|
||||
process(src, filename) {
|
||||
const assetFilename = JSON.stringify(path.basename(filename));
|
||||
|
||||
if (filename.match(/\.svg$/)) {
|
||||
// Based on how SVGR generates a component name:
|
||||
// https://github.com/smooth-code/svgr/blob/01b194cf967347d43d4cbe6b434404731b87cf27/packages/core/src/state.js#L6
|
||||
const pascalCaseFilename = camelcase(path.parse(filename).name, {
|
||||
pascalCase: true,
|
||||
});
|
||||
const componentName = `Svg${pascalCaseFilename}`;
|
||||
return `const React = require('react');
|
||||
module.exports = {
|
||||
__esModule: true,
|
||||
default: ${assetFilename},
|
||||
ReactComponent: React.forwardRef(function ${componentName}(props, ref) {
|
||||
return {
|
||||
$$typeof: Symbol.for('react.element'),
|
||||
type: 'svg',
|
||||
ref: ref,
|
||||
key: null,
|
||||
props: Object.assign({}, props, {
|
||||
children: ${assetFilename}
|
||||
})
|
||||
};
|
||||
}),
|
||||
};`;
|
||||
}
|
||||
|
||||
return `module.exports = ${assetFilename};`;
|
||||
},
|
||||
};
|
|
@ -0,0 +1,134 @@
|
|||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const paths = require('./paths');
|
||||
const chalk = require('react-dev-utils/chalk');
|
||||
const resolve = require('resolve');
|
||||
|
||||
/**
|
||||
* Get additional module paths based on the baseUrl of a compilerOptions object.
|
||||
*
|
||||
* @param {Object} options
|
||||
*/
|
||||
function getAdditionalModulePaths(options = {}) {
|
||||
const baseUrl = options.baseUrl;
|
||||
|
||||
if (!baseUrl) {
|
||||
return '';
|
||||
}
|
||||
|
||||
const baseUrlResolved = path.resolve(paths.appPath, baseUrl);
|
||||
|
||||
// We don't need to do anything if `baseUrl` is set to `node_modules`. This is
|
||||
// the default behavior.
|
||||
if (path.relative(paths.appNodeModules, baseUrlResolved) === '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Allow the user set the `baseUrl` to `appSrc`.
|
||||
if (path.relative(paths.appSrc, baseUrlResolved) === '') {
|
||||
return [paths.appSrc];
|
||||
}
|
||||
|
||||
// If the path is equal to the root directory we ignore it here.
|
||||
// We don't want to allow importing from the root directly as source files are
|
||||
// not transpiled outside of `src`. We do allow importing them with the
|
||||
// absolute path (e.g. `src/Components/Button.js`) but we set that up with
|
||||
// an alias.
|
||||
if (path.relative(paths.appPath, baseUrlResolved) === '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Otherwise, throw an error.
|
||||
throw new Error(
|
||||
chalk.red.bold(
|
||||
"Your project's `baseUrl` can only be set to `src` or `node_modules`." +
|
||||
' Create React App does not support other values at this time.'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get webpack aliases based on the baseUrl of a compilerOptions object.
|
||||
*
|
||||
* @param {*} options
|
||||
*/
|
||||
function getWebpackAliases(options = {}) {
|
||||
const baseUrl = options.baseUrl;
|
||||
|
||||
if (!baseUrl) {
|
||||
return {};
|
||||
}
|
||||
|
||||
const baseUrlResolved = path.resolve(paths.appPath, baseUrl);
|
||||
|
||||
if (path.relative(paths.appPath, baseUrlResolved) === '') {
|
||||
return {
|
||||
src: paths.appSrc,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get jest aliases based on the baseUrl of a compilerOptions object.
|
||||
*
|
||||
* @param {*} options
|
||||
*/
|
||||
function getJestAliases(options = {}) {
|
||||
const baseUrl = options.baseUrl;
|
||||
|
||||
if (!baseUrl) {
|
||||
return {};
|
||||
}
|
||||
|
||||
const baseUrlResolved = path.resolve(paths.appPath, baseUrl);
|
||||
|
||||
if (path.relative(paths.appPath, baseUrlResolved) === '') {
|
||||
return {
|
||||
'^src/(.*)$': '<rootDir>/src/$1',
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function getModules() {
|
||||
// Check if TypeScript is setup
|
||||
const hasTsConfig = fs.existsSync(paths.appTsConfig);
|
||||
const hasJsConfig = fs.existsSync(paths.appJsConfig);
|
||||
|
||||
if (hasTsConfig && hasJsConfig) {
|
||||
throw new Error(
|
||||
'You have both a tsconfig.json and a jsconfig.json. If you are using TypeScript please remove your jsconfig.json file.'
|
||||
);
|
||||
}
|
||||
|
||||
let config;
|
||||
|
||||
// If there's a tsconfig.json we assume it's a
|
||||
// TypeScript project and set up the config
|
||||
// based on tsconfig.json
|
||||
if (hasTsConfig) {
|
||||
const ts = require(resolve.sync('typescript', {
|
||||
basedir: paths.appNodeModules,
|
||||
}));
|
||||
config = ts.readConfigFile(paths.appTsConfig, ts.sys.readFile).config;
|
||||
// Otherwise we'll check if there is jsconfig.json
|
||||
// for non TS projects.
|
||||
} else if (hasJsConfig) {
|
||||
config = require(paths.appJsConfig);
|
||||
}
|
||||
|
||||
config = config || {};
|
||||
const options = config.compilerOptions || {};
|
||||
|
||||
const additionalModulePaths = getAdditionalModulePaths(options);
|
||||
|
||||
return {
|
||||
additionalModulePaths: additionalModulePaths,
|
||||
webpackAliases: getWebpackAliases(options),
|
||||
jestAliases: getJestAliases(options),
|
||||
hasTsConfig,
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = getModules();
|
|
@ -0,0 +1,77 @@
|
|||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const getPublicUrlOrPath = require('react-dev-utils/getPublicUrlOrPath');
|
||||
|
||||
// Make sure any symlinks in the project folder are resolved:
|
||||
// https://github.com/facebook/create-react-app/issues/637
|
||||
const appDirectory = fs.realpathSync(process.cwd());
|
||||
const resolveApp = relativePath => path.resolve(appDirectory, relativePath);
|
||||
|
||||
// We use `PUBLIC_URL` environment variable or "homepage" field to infer
|
||||
// "public path" at which the app is served.
|
||||
// webpack needs to know it to put the right <script> hrefs into HTML even in
|
||||
// single-page apps that may serve index.html for nested URLs like /todos/42.
|
||||
// We can't use a relative path in HTML because we don't want to load something
|
||||
// like /todos/42/static/js/bundle.7289d.js. We have to know the root.
|
||||
const publicUrlOrPath = getPublicUrlOrPath(
|
||||
process.env.NODE_ENV === 'development',
|
||||
require(resolveApp('package.json')).homepage,
|
||||
process.env.PUBLIC_URL
|
||||
);
|
||||
|
||||
const buildPath = process.env.BUILD_PATH || 'build';
|
||||
|
||||
const moduleFileExtensions = [
|
||||
'web.mjs',
|
||||
'mjs',
|
||||
'web.js',
|
||||
'js',
|
||||
'web.ts',
|
||||
'ts',
|
||||
'web.tsx',
|
||||
'tsx',
|
||||
'json',
|
||||
'web.jsx',
|
||||
'jsx',
|
||||
];
|
||||
|
||||
// Resolve file paths in the same order as webpack
|
||||
const resolveModule = (resolveFn, filePath) => {
|
||||
const extension = moduleFileExtensions.find(extension =>
|
||||
fs.existsSync(resolveFn(`${filePath}.${extension}`))
|
||||
);
|
||||
|
||||
if (extension) {
|
||||
return resolveFn(`${filePath}.${extension}`);
|
||||
}
|
||||
|
||||
return resolveFn(`${filePath}.js`);
|
||||
};
|
||||
|
||||
// config after eject: we're in ./config/
|
||||
module.exports = {
|
||||
dotenv: resolveApp('.env'),
|
||||
appPath: resolveApp('.'),
|
||||
appBuild: resolveApp(buildPath),
|
||||
appPublic: resolveApp('public'),
|
||||
appHtml: resolveApp('public/index.html'),
|
||||
appIndexJs: resolveModule(resolveApp, 'src/index'),
|
||||
appPackageJson: resolveApp('package.json'),
|
||||
appSrc: resolveApp('src'),
|
||||
appTsConfig: resolveApp('tsconfig.json'),
|
||||
appJsConfig: resolveApp('jsconfig.json'),
|
||||
yarnLockFile: resolveApp('yarn.lock'),
|
||||
testsSetup: resolveModule(resolveApp, 'src/setupTests'),
|
||||
proxySetup: resolveApp('src/setupProxy.js'),
|
||||
appNodeModules: resolveApp('node_modules'),
|
||||
appWebpackCache: resolveApp('node_modules/.cache'),
|
||||
appTsBuildInfoFile: resolveApp('node_modules/.cache/tsconfig.tsbuildinfo'),
|
||||
swSrc: resolveModule(resolveApp, 'src/service-worker'),
|
||||
publicUrlOrPath,
|
||||
};
|
||||
|
||||
|
||||
|
||||
module.exports.moduleFileExtensions = moduleFileExtensions;
|
|
@ -0,0 +1,798 @@
|
|||
'use strict';
|
||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const resolve = require('resolve');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
|
||||
const InlineChunkHtmlPlugin = require('react-dev-utils/InlineChunkHtmlPlugin');
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
|
||||
const {
|
||||
WebpackManifestPlugin
|
||||
} = require('webpack-manifest-plugin');
|
||||
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
|
||||
const WorkboxWebpackPlugin = require('workbox-webpack-plugin');
|
||||
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
|
||||
const getCSSModuleLocalIdent = require('react-dev-utils/getCSSModuleLocalIdent');
|
||||
const ESLintPlugin = require('eslint-webpack-plugin');
|
||||
const paths = require('./paths');
|
||||
const modules = require('./modules');
|
||||
const getClientEnvironment = require('./env');
|
||||
const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin');
|
||||
const ForkTsCheckerWebpackPlugin =
|
||||
process.env.TSC_COMPILE_ON_ERROR === 'true' ?
|
||||
require('react-dev-utils/ForkTsCheckerWarningWebpackPlugin') :
|
||||
require('react-dev-utils/ForkTsCheckerWebpackPlugin');
|
||||
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
|
||||
|
||||
const createEnvironmentHash = require('./webpack/persistentCache/createEnvironmentHash');
|
||||
const pxtorem = require('postcss-pxtorem')
|
||||
// Source maps are resource heavy and can cause out of memory issue for large source files.
|
||||
const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false';
|
||||
|
||||
const reactRefreshRuntimeEntry = require.resolve('react-refresh/runtime');
|
||||
const reactRefreshWebpackPluginRuntimeEntry = require.resolve(
|
||||
'@pmmmwh/react-refresh-webpack-plugin'
|
||||
);
|
||||
const babelRuntimeEntry = require.resolve('babel-preset-react-app');
|
||||
const babelRuntimeEntryHelpers = require.resolve(
|
||||
'@babel/runtime/helpers/esm/assertThisInitialized', {
|
||||
paths: [babelRuntimeEntry]
|
||||
}
|
||||
);
|
||||
const babelRuntimeRegenerator = require.resolve('@babel/runtime/regenerator', {
|
||||
paths: [babelRuntimeEntry],
|
||||
});
|
||||
|
||||
// Some apps do not need the benefits of saving a web request, so not inlining the chunk
|
||||
// makes for a smoother build process.
|
||||
const shouldInlineRuntimeChunk = process.env.INLINE_RUNTIME_CHUNK !== 'false';
|
||||
|
||||
const emitErrorsAsWarnings = process.env.ESLINT_NO_DEV_ERRORS === 'true';
|
||||
const disableESLintPlugin = process.env.DISABLE_ESLINT_PLUGIN === 'true';
|
||||
|
||||
const imageInlineSizeLimit = parseInt(
|
||||
process.env.IMAGE_INLINE_SIZE_LIMIT || '10000'
|
||||
);
|
||||
|
||||
// Check if TypeScript is setup
|
||||
const useTypeScript = fs.existsSync(paths.appTsConfig);
|
||||
|
||||
// Check if Tailwind config exists
|
||||
const useTailwind = fs.existsSync(
|
||||
path.join(paths.appPath, 'tailwind.config.js')
|
||||
);
|
||||
|
||||
// Get the path to the uncompiled service worker (if it exists).
|
||||
const swSrc = paths.swSrc;
|
||||
|
||||
// style files regexes
|
||||
const cssRegex = /\.css$/;
|
||||
const cssModuleRegex = /\.module\.css$/;
|
||||
const sassRegex = /\.(scss|sass)$/;
|
||||
const sassModuleRegex = /\.module\.(scss|sass)$/;
|
||||
|
||||
const hasJsxRuntime = (() => {
|
||||
if (process.env.DISABLE_NEW_JSX_TRANSFORM === 'true') {
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
require.resolve('react/jsx-runtime');
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
})();
|
||||
|
||||
// This is the production and development configuration.
|
||||
// It is focused on developer experience, fast rebuilds, and a minimal bundle.
|
||||
module.exports = function (webpackEnv) {
|
||||
const isEnvDevelopment = webpackEnv === 'development';
|
||||
const isEnvProduction = webpackEnv === 'production';
|
||||
|
||||
// Variable used for enabling profiling in Production
|
||||
// passed into alias object. Uses a flag if passed into the build command
|
||||
const isEnvProductionProfile =
|
||||
isEnvProduction && process.argv.includes('--profile');
|
||||
|
||||
// We will provide `paths.publicUrlOrPath` to our app
|
||||
// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.
|
||||
// Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz.
|
||||
// Get environment variables to inject into our app.
|
||||
const env = getClientEnvironment(paths.publicUrlOrPath.slice(0, -1));
|
||||
|
||||
const shouldUseReactRefresh = env.raw.FAST_REFRESH;
|
||||
|
||||
// common function to get style loaders
|
||||
const getStyleLoaders = (cssOptions, preProcessor) => {
|
||||
const loaders = [
|
||||
isEnvDevelopment && require.resolve('style-loader'),
|
||||
isEnvProduction && {
|
||||
loader: MiniCssExtractPlugin.loader,
|
||||
// css is located in `static/css`, use '../../' to locate index.html folder
|
||||
// in production `paths.publicUrlOrPath` can be a relative path
|
||||
options: paths.publicUrlOrPath.startsWith('.') ? {
|
||||
publicPath: '../../'
|
||||
} : {},
|
||||
},
|
||||
{
|
||||
loader: require.resolve('css-loader'),
|
||||
options: cssOptions,
|
||||
},
|
||||
{
|
||||
// Options for PostCSS as we reference these options twice
|
||||
// Adds vendor prefixing based on your specified browser support in
|
||||
// package.json
|
||||
loader: require.resolve('postcss-loader'),
|
||||
options: {
|
||||
postcssOptions: {
|
||||
// Necessary for external CSS imports to work
|
||||
// https://github.com/facebook/create-react-app/issues/2677
|
||||
ident: 'postcss',
|
||||
config: false,
|
||||
plugins: !useTailwind ? [
|
||||
'postcss-flexbugs-fixes',
|
||||
[
|
||||
'postcss-preset-env',
|
||||
{
|
||||
autoprefixer: {
|
||||
flexbox: 'no-2009',
|
||||
},
|
||||
stage: 3,
|
||||
},
|
||||
],
|
||||
// Adds PostCSS Normalize as the reset css with default options,
|
||||
// so that it honors browserslist config in package.json
|
||||
// which in turn let's users customize the target behavior as per their needs.
|
||||
'postcss-normalize',
|
||||
pxtorem({
|
||||
rootValue: 37.5,
|
||||
propWhiteList: [],
|
||||
minPixelValue: 2,
|
||||
exclude: /node_modules/i
|
||||
})
|
||||
] : [
|
||||
'tailwindcss',
|
||||
'postcss-flexbugs-fixes',
|
||||
[
|
||||
'postcss-preset-env',
|
||||
{
|
||||
autoprefixer: {
|
||||
flexbox: 'no-2009',
|
||||
},
|
||||
stage: 3,
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
sourceMap: isEnvProduction ? shouldUseSourceMap : isEnvDevelopment,
|
||||
},
|
||||
},
|
||||
].filter(Boolean);
|
||||
if (preProcessor) {
|
||||
loaders.push({
|
||||
loader: require.resolve('resolve-url-loader'),
|
||||
options: {
|
||||
sourceMap: isEnvProduction ? shouldUseSourceMap : isEnvDevelopment,
|
||||
root: paths.appSrc,
|
||||
},
|
||||
}, {
|
||||
loader: require.resolve(preProcessor),
|
||||
options: {
|
||||
sourceMap: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
return loaders;
|
||||
};
|
||||
|
||||
return {
|
||||
target: ['browserslist'],
|
||||
// Webpack noise constrained to errors and warnings
|
||||
stats: 'errors-warnings',
|
||||
mode: isEnvProduction ? 'production' : isEnvDevelopment && 'development',
|
||||
// Stop compilation early in production
|
||||
bail: isEnvProduction,
|
||||
devtool: isEnvProduction ?
|
||||
shouldUseSourceMap ?
|
||||
'source-map' :
|
||||
false : isEnvDevelopment && 'cheap-module-source-map',
|
||||
// These are the "entry points" to our application.
|
||||
// This means they will be the "root" imports that are included in JS bundle.
|
||||
entry: paths.appIndexJs,
|
||||
output: {
|
||||
// The build folder.
|
||||
path: paths.appBuild,
|
||||
// Add /* filename */ comments to generated require()s in the output.
|
||||
pathinfo: isEnvDevelopment,
|
||||
// There will be one main bundle, and one file per asynchronous chunk.
|
||||
// In development, it does not produce real files.
|
||||
filename: isEnvProduction ?
|
||||
'static/js/[name].[contenthash:8].js' : isEnvDevelopment && 'static/js/bundle.js',
|
||||
// There are also additional JS chunk files if you use code splitting.
|
||||
chunkFilename: isEnvProduction ?
|
||||
'static/js/[name].[contenthash:8].chunk.js' : isEnvDevelopment && 'static/js/[name].chunk.js',
|
||||
assetModuleFilename: 'static/media/[name].[hash][ext]',
|
||||
// webpack uses `publicPath` to determine where the app is being served from.
|
||||
// It requires a trailing slash, or the file assets will get an incorrect path.
|
||||
// We inferred the "public path" (such as / or /my-project) from homepage.
|
||||
publicPath: paths.publicUrlOrPath,
|
||||
// Point sourcemap entries to original disk location (format as URL on Windows)
|
||||
devtoolModuleFilenameTemplate: isEnvProduction ?
|
||||
info =>
|
||||
path
|
||||
.relative(paths.appSrc, info.absoluteResourcePath)
|
||||
.replace(/\\/g, '/') : isEnvDevelopment &&
|
||||
(info => path.resolve(info.absoluteResourcePath).replace(/\\/g, '/')),
|
||||
},
|
||||
cache: {
|
||||
// 开启 只酒话缓存
|
||||
type: 'filesystem',
|
||||
version: createEnvironmentHash(env.raw),
|
||||
cacheDirectory: paths.appWebpackCache,
|
||||
store: 'pack',
|
||||
buildDependencies: {
|
||||
defaultWebpack: ['webpack/lib/'],
|
||||
config: [__filename],
|
||||
tsconfig: [paths.appTsConfig, paths.appJsConfig].filter(f =>
|
||||
fs.existsSync(f)
|
||||
),
|
||||
},
|
||||
},
|
||||
infrastructureLogging: {
|
||||
level: 'none',
|
||||
},
|
||||
optimization: {
|
||||
// 生产环境开启压缩
|
||||
minimize: isEnvProduction,
|
||||
minimizer: [
|
||||
// This is only used in production mode
|
||||
new TerserPlugin({
|
||||
terserOptions: {
|
||||
parse: {
|
||||
// We want terser to parse ecma 8 code. However, we don't want it
|
||||
// to apply any minification steps that turns valid ecma 5 code
|
||||
// into invalid ecma 5 code. This is why the 'compress' and 'output'
|
||||
// sections only apply transformations that are ecma 5 safe
|
||||
// https://github.com/facebook/create-react-app/pull/4234
|
||||
ecma: 8,
|
||||
},
|
||||
compress: {
|
||||
ecma: 5,
|
||||
warnings: false,
|
||||
// Disabled because of an issue with Uglify breaking seemingly valid code:
|
||||
// https://github.com/facebook/create-react-app/issues/2376
|
||||
// Pending further investigation:
|
||||
// https://github.com/mishoo/UglifyJS2/issues/2011
|
||||
comparisons: false,
|
||||
// Disabled because of an issue with Terser breaking valid code:
|
||||
// https://github.com/facebook/create-react-app/issues/5250
|
||||
// Pending further investigation:
|
||||
// https://github.com/terser-js/terser/issues/120
|
||||
inline: 2,
|
||||
},
|
||||
mangle: {
|
||||
safari10: true,
|
||||
},
|
||||
// Added for profiling in devtools
|
||||
keep_classnames: isEnvProductionProfile,
|
||||
keep_fnames: isEnvProductionProfile,
|
||||
output: {
|
||||
ecma: 5,
|
||||
comments: false,
|
||||
// Turned on because emoji and regex is not minified properly using default
|
||||
// https://github.com/facebook/create-react-app/issues/2488
|
||||
ascii_only: true,
|
||||
},
|
||||
},
|
||||
// 开启压缩并行
|
||||
parallel: 5
|
||||
}),
|
||||
// This is only used in production mode
|
||||
new CssMinimizerPlugin(),
|
||||
],
|
||||
// 启动树摇
|
||||
usedExports: isEnvProduction
|
||||
// 引入优化
|
||||
// splitChunks: {
|
||||
// chunks: "all", // 对所有模块都进行分割
|
||||
// cacheGroups: {
|
||||
// default: {
|
||||
// // 其他没有写的配置会使用上面的默认值
|
||||
// minSize: 0, // 我们定义的文件体积太小了,所以要改打包的最小文件体积
|
||||
// minChunks: 2,
|
||||
// priority: -20,
|
||||
// reuseExistingChunk: true,
|
||||
// },
|
||||
// },
|
||||
// }
|
||||
},
|
||||
resolve: {
|
||||
// This allows you to set a fallback for where webpack should look for modules.
|
||||
// We placed these paths second because we want `node_modules` to "win"
|
||||
// if there are any conflicts. This matches Node resolution mechanism.
|
||||
// https://github.com/facebook/create-react-app/issues/253
|
||||
modules: ['node_modules', paths.appNodeModules].concat(
|
||||
modules.additionalModulePaths || []
|
||||
),
|
||||
// These are the reasonable defaults supported by the Node ecosystem.
|
||||
// We also include JSX as a common component filename extension to support
|
||||
// some tools, although we do not recommend using it, see:
|
||||
// https://github.com/facebook/create-react-app/issues/290
|
||||
// `web` extension prefixes have been added for better support
|
||||
// for React Native Web.
|
||||
extensions: paths.moduleFileExtensions
|
||||
.map(ext => `.${ext}`)
|
||||
.filter(ext => useTypeScript || !ext.includes('ts')),
|
||||
alias: {
|
||||
// Support React Native Web
|
||||
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
|
||||
'react-native': 'react-native-web',
|
||||
// Allows for better profiling with ReactDevTools
|
||||
...(isEnvProductionProfile && {
|
||||
'react-dom$': 'react-dom/profiling',
|
||||
'scheduler/tracing': 'scheduler/tracing-profiling',
|
||||
}),
|
||||
...(modules.webpackAliases || {}),
|
||||
// react: path.join(
|
||||
// __dirname,
|
||||
// process.env.NODE_ENV === "production"
|
||||
// ? "../node_modules/react/cjs/react.production.min.js"
|
||||
// : "../node_modules/react/cjs/react.development.js"
|
||||
// ),
|
||||
},
|
||||
plugins: [
|
||||
// Prevents users from importing files from outside of src/ (or node_modules/).
|
||||
// This often causes confusion because we only process files within src/ with babel.
|
||||
// To fix this, we prevent you from importing files out of src/ -- if you'd like to,
|
||||
// please link the files into your node_modules/ and let module-resolution kick in.
|
||||
// Make sure your source files are compiled, as they will not be processed in any way.
|
||||
new ModuleScopePlugin(paths.appSrc, [
|
||||
paths.appPackageJson,
|
||||
reactRefreshRuntimeEntry,
|
||||
reactRefreshWebpackPluginRuntimeEntry,
|
||||
babelRuntimeEntry,
|
||||
babelRuntimeEntryHelpers,
|
||||
babelRuntimeRegenerator,
|
||||
]),
|
||||
],
|
||||
},
|
||||
module: {
|
||||
strictExportPresence: true,
|
||||
rules: [
|
||||
// Handle node_modules packages that contain sourcemaps
|
||||
shouldUseSourceMap && {
|
||||
enforce: 'pre',
|
||||
exclude: /@babel(?:\/|\\{1,2})runtime/,
|
||||
test: /\.(js|mjs|jsx|ts|tsx|css)$/,
|
||||
loader: require.resolve('source-map-loader'),
|
||||
},
|
||||
{
|
||||
// "oneOf" will traverse all following loaders until one will
|
||||
// match the requirements. When no loader matches it will fall
|
||||
// back to the "file" loader at the end of the loader list.
|
||||
oneOf: [
|
||||
// TODO: Merge this config once `image/avif` is in the mime-db
|
||||
// https://github.com/jshttp/mime-db
|
||||
{
|
||||
test: [/\.avif$/],
|
||||
type: 'asset',
|
||||
mimetype: 'image/avif',
|
||||
parser: {
|
||||
dataUrlCondition: {
|
||||
maxSize: imageInlineSizeLimit,
|
||||
},
|
||||
},
|
||||
},
|
||||
// "url" loader works like "file" loader except that it embeds assets
|
||||
// smaller than specified limit in bytes as data URLs to avoid requests.
|
||||
// A missing `test` is equivalent to a match.
|
||||
{
|
||||
test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
|
||||
type: 'asset',
|
||||
parser: {
|
||||
dataUrlCondition: {
|
||||
maxSize: imageInlineSizeLimit,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.svg$/,
|
||||
use: [{
|
||||
loader: require.resolve('@svgr/webpack'),
|
||||
options: {
|
||||
prettier: false,
|
||||
svgo: false,
|
||||
svgoConfig: {
|
||||
plugins: [{
|
||||
removeViewBox: false
|
||||
}],
|
||||
},
|
||||
titleProp: true,
|
||||
ref: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: require.resolve('file-loader'),
|
||||
options: {
|
||||
name: 'static/media/[name].[hash].[ext]',
|
||||
},
|
||||
},
|
||||
],
|
||||
issuer: {
|
||||
and: [/\.(ts|tsx|js|jsx|md|mdx)$/],
|
||||
},
|
||||
},
|
||||
// Process application JS with Babel.
|
||||
// The preset includes JSX, Flow, TypeScript, and some ESnext features.
|
||||
{
|
||||
test: /\.(js|mjs|jsx|ts|tsx)$/,
|
||||
// 减少筛选的目录, 打包源代码
|
||||
include: paths.appSrc,
|
||||
loader: require.resolve('babel-loader'),
|
||||
options: {
|
||||
customize: require.resolve(
|
||||
'babel-preset-react-app/webpack-overrides'
|
||||
),
|
||||
presets: [
|
||||
[
|
||||
require.resolve('babel-preset-react-app'),
|
||||
{
|
||||
runtime: hasJsxRuntime ? 'automatic' : 'classic',
|
||||
},
|
||||
],
|
||||
],
|
||||
|
||||
plugins: [
|
||||
isEnvDevelopment &&
|
||||
shouldUseReactRefresh &&
|
||||
require.resolve('react-refresh/babel'),
|
||||
].filter(Boolean),
|
||||
// This is a feature of `babel-loader` for webpack (not Babel itself).
|
||||
// It enables caching results in ./node_modules/.cache/babel-loader/
|
||||
// directory for faster rebuilds.
|
||||
cacheDirectory: true,
|
||||
// See #6846 for context on why cacheCompression is disabled
|
||||
cacheCompression: false,
|
||||
compact: isEnvProduction,
|
||||
},
|
||||
},
|
||||
// Process any JS outside of the app with Babel.
|
||||
// Unlike the application JS, we only compile the standard ES features.
|
||||
{
|
||||
test: /\.(js|mjs)$/,
|
||||
exclude: /@babel(?:\/|\\{1,2})runtime/,
|
||||
loader: require.resolve('babel-loader'),
|
||||
options: {
|
||||
babelrc: false,
|
||||
configFile: false,
|
||||
compact: false,
|
||||
presets: [
|
||||
[
|
||||
require.resolve('babel-preset-react-app/dependencies'),
|
||||
{
|
||||
helpers: true
|
||||
},
|
||||
],
|
||||
],
|
||||
cacheDirectory: true,
|
||||
// See #6846 for context on why cacheCompression is disabled
|
||||
cacheCompression: false,
|
||||
|
||||
// Babel sourcemaps are needed for debugging into node_modules
|
||||
// code. Without the options below, debuggers like VSCode
|
||||
// show incorrect code and set breakpoints on the wrong lines.
|
||||
sourceMaps: shouldUseSourceMap,
|
||||
inputSourceMap: shouldUseSourceMap,
|
||||
},
|
||||
},
|
||||
// "postcss" loader applies autoprefixer to our CSS.
|
||||
// "css" loader resolves paths in CSS and adds assets as dependencies.
|
||||
// "style" loader turns CSS into JS modules that inject <style> tags.
|
||||
// In production, we use MiniCSSExtractPlugin to extract that CSS
|
||||
// to a file, but in development "style" loader enables hot editing
|
||||
// of CSS.
|
||||
// By default we support CSS Modules with the extension .module.css
|
||||
{
|
||||
test: cssRegex,
|
||||
exclude: cssModuleRegex,
|
||||
use: getStyleLoaders({
|
||||
importLoaders: 1,
|
||||
sourceMap: isEnvProduction ?
|
||||
shouldUseSourceMap : isEnvDevelopment,
|
||||
modules: {
|
||||
mode: 'icss',
|
||||
},
|
||||
}),
|
||||
// Don't consider CSS imports dead code even if the
|
||||
// containing package claims to have no side effects.
|
||||
// Remove this when webpack adds a warning or an error for this.
|
||||
// See https://github.com/webpack/webpack/issues/6571
|
||||
sideEffects: true,
|
||||
},
|
||||
// Adds support for CSS Modules (https://github.com/css-modules/css-modules)
|
||||
// using the extension .module.css
|
||||
{
|
||||
test: cssModuleRegex,
|
||||
use: getStyleLoaders({
|
||||
importLoaders: 1,
|
||||
sourceMap: isEnvProduction ?
|
||||
shouldUseSourceMap : isEnvDevelopment,
|
||||
modules: {
|
||||
mode: 'local',
|
||||
getLocalIdent: getCSSModuleLocalIdent,
|
||||
},
|
||||
}),
|
||||
},
|
||||
// Opt-in support for SASS (using .scss or .sass extensions).
|
||||
// By default we support SASS Modules with the
|
||||
// extensions .module.scss or .module.sass
|
||||
{
|
||||
test: sassRegex,
|
||||
exclude: sassModuleRegex,
|
||||
use: getStyleLoaders({
|
||||
importLoaders: 3,
|
||||
sourceMap: isEnvProduction ?
|
||||
shouldUseSourceMap : isEnvDevelopment,
|
||||
modules: {
|
||||
mode: 'icss',
|
||||
},
|
||||
},
|
||||
'sass-loader'
|
||||
),
|
||||
// Don't consider CSS imports dead code even if the
|
||||
// containing package claims to have no side effects.
|
||||
// Remove this when webpack adds a warning or an error for this.
|
||||
// See https://github.com/webpack/webpack/issues/6571
|
||||
sideEffects: true,
|
||||
},
|
||||
// Adds support for CSS Modules, but using SASS
|
||||
// using the extension .module.scss or .module.sass
|
||||
{
|
||||
test: sassModuleRegex,
|
||||
use: getStyleLoaders({
|
||||
importLoaders: 3,
|
||||
sourceMap: isEnvProduction ?
|
||||
shouldUseSourceMap : isEnvDevelopment,
|
||||
modules: {
|
||||
mode: 'local',
|
||||
getLocalIdent: getCSSModuleLocalIdent,
|
||||
},
|
||||
},
|
||||
'sass-loader'
|
||||
),
|
||||
},
|
||||
// "file" loader makes sure those assets get served by WebpackDevServer.
|
||||
// When you `import` an asset, you get its (virtual) filename.
|
||||
// In production, they would get copied to the `build` folder.
|
||||
// This loader doesn't use a "test" so it will catch all modules
|
||||
// that fall through the other loaders.
|
||||
{
|
||||
// Exclude `js` files to keep "css" loader working as it injects
|
||||
// its runtime that would otherwise be processed through "file" loader.
|
||||
// Also exclude `html` and `json` extensions so they get processed
|
||||
// by webpacks internal loaders.
|
||||
exclude: [/^$/, /\.(js|mjs|jsx|ts|tsx)$/, /\.html$/, /\.json$/],
|
||||
type: 'asset/resource',
|
||||
},
|
||||
// ** STOP ** Are you adding a new loader?
|
||||
// Make sure to add the new loader(s) before the "file" loader.
|
||||
],
|
||||
},
|
||||
].filter(Boolean),
|
||||
// 直接使用, 不需要二次打包,
|
||||
// noParse: /react/,
|
||||
},
|
||||
plugins: [
|
||||
isEnvProduction && new BundleAnalyzerPlugin(),
|
||||
// Generates an `index.html` file with the <script> injected.
|
||||
new HtmlWebpackPlugin(
|
||||
Object.assign({}, {
|
||||
inject: true,
|
||||
template: paths.appHtml,
|
||||
},
|
||||
isEnvProduction ? {
|
||||
minify: {
|
||||
removeComments: true,
|
||||
collapseWhitespace: true,
|
||||
removeRedundantAttributes: true,
|
||||
useShortDoctype: true,
|
||||
removeEmptyAttributes: true,
|
||||
removeStyleLinkTypeAttributes: true,
|
||||
keepClosingSlash: true,
|
||||
minifyJS: true,
|
||||
minifyCSS: true,
|
||||
minifyURLs: true,
|
||||
},
|
||||
} :
|
||||
undefined
|
||||
)
|
||||
),
|
||||
// Inlines the webpack runtime script. This script is too small to warrant
|
||||
// a network request.
|
||||
// https://github.com/facebook/create-react-app/issues/5358
|
||||
isEnvProduction &&
|
||||
shouldInlineRuntimeChunk &&
|
||||
new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/runtime-.+[.]js/]),
|
||||
// Makes some environment variables available in index.html.
|
||||
// The public URL is available as %PUBLIC_URL% in index.html, e.g.:
|
||||
// <link rel="icon" href="%PUBLIC_URL%/favicon.ico">
|
||||
// It will be an empty string unless you specify "homepage"
|
||||
// in `package.json`, in which case it will be the pathname of that URL.
|
||||
new InterpolateHtmlPlugin(HtmlWebpackPlugin, env.raw),
|
||||
// This gives some necessary context to module not found errors, such as
|
||||
// the requesting resource.
|
||||
new ModuleNotFoundPlugin(paths.appPath),
|
||||
// Makes some environment variables available to the JS code, for example:
|
||||
// if (process.env.NODE_ENV === 'production') { ... }. See `./env.js`.
|
||||
// It is absolutely essential that NODE_ENV is set to production
|
||||
// during a production build.
|
||||
// Otherwise React will be compiled in the very slow development mode.
|
||||
new webpack.DefinePlugin(env.stringified),
|
||||
// Experimental hot reloading for React .
|
||||
// https://github.com/facebook/react/tree/main/packages/react-refresh
|
||||
isEnvDevelopment &&
|
||||
shouldUseReactRefresh &&
|
||||
new ReactRefreshWebpackPlugin({
|
||||
overlay: false,
|
||||
}),
|
||||
// Watcher doesn't work well if you mistype casing in a path so we use
|
||||
// a plugin that prints an error when you attempt to do this.
|
||||
// See https://github.com/facebook/create-react-app/issues/240
|
||||
isEnvDevelopment && new CaseSensitivePathsPlugin(),
|
||||
isEnvProduction &&
|
||||
new MiniCssExtractPlugin({
|
||||
// Options similar to the same options in webpackOptions.output
|
||||
// both options are optional
|
||||
// 产物内容 Hash 值,仅当产物内容发生变化时才会产生新的 contenthash
|
||||
filename: 'static/css/[name].[contenthash:8].css',
|
||||
chunkFilename: 'static/css/[name].[contenthash:8].chunk.css',
|
||||
}),
|
||||
// Generate an asset manifest file with the following content:
|
||||
// - "files" key: Mapping of all asset filenames to their corresponding
|
||||
// output file so that tools can pick it up without having to parse
|
||||
// `index.html`
|
||||
// - "entrypoints" key: Array of files which are included in `index.html`,
|
||||
// can be used to reconstruct the HTML if necessary
|
||||
new WebpackManifestPlugin({
|
||||
fileName: 'asset-manifest.json',
|
||||
publicPath: paths.publicUrlOrPath,
|
||||
generate: (seed, files, entrypoints) => {
|
||||
const manifestFiles = files.reduce((manifest, file) => {
|
||||
manifest[file.name] = file.path;
|
||||
return manifest;
|
||||
}, seed);
|
||||
const entrypointFiles = entrypoints.main.filter(
|
||||
fileName => !fileName.endsWith('.map')
|
||||
);
|
||||
|
||||
return {
|
||||
files: manifestFiles,
|
||||
entrypoints: entrypointFiles,
|
||||
};
|
||||
},
|
||||
}),
|
||||
// Moment.js is an extremely popular library that bundles large locale files
|
||||
// by default due to how webpack interprets its code. This is a practical
|
||||
// solution that requires the user to opt into importing specific locales.
|
||||
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
|
||||
// You can remove this if you don't use Moment.js:
|
||||
new webpack.IgnorePlugin({
|
||||
resourceRegExp: /^\.\/locale$/,
|
||||
contextRegExp: /moment$/,
|
||||
}),
|
||||
// Generate a service worker script that will precache, and keep up to date,
|
||||
// the HTML & assets that are part of the webpack build.
|
||||
isEnvProduction &&
|
||||
fs.existsSync(swSrc) &&
|
||||
new WorkboxWebpackPlugin.InjectManifest({
|
||||
swSrc,
|
||||
dontCacheBustURLsMatching: /\.[0-9a-f]{8}\./,
|
||||
exclude: [/\.map$/, /asset-manifest\.json$/, /LICENSE/],
|
||||
// Bump up the default maximum size (2mb) that's precached,
|
||||
// to make lazy-loading failure scenarios less likely.
|
||||
// See https://github.com/cra-template/pwa/issues/13#issuecomment-722667270
|
||||
maximumFileSizeToCacheInBytes: 5 * 1024 * 1024,
|
||||
}),
|
||||
// TypeScript type checking
|
||||
useTypeScript &&
|
||||
new ForkTsCheckerWebpackPlugin({
|
||||
async: isEnvDevelopment,
|
||||
typescript: {
|
||||
typescriptPath: resolve.sync('typescript', {
|
||||
basedir: paths.appNodeModules,
|
||||
}),
|
||||
configOverwrite: {
|
||||
compilerOptions: {
|
||||
sourceMap: isEnvProduction ?
|
||||
shouldUseSourceMap : isEnvDevelopment,
|
||||
skipLibCheck: true,
|
||||
inlineSourceMap: false,
|
||||
declarationMap: false,
|
||||
noEmit: true,
|
||||
incremental: true,
|
||||
tsBuildInfoFile: paths.appTsBuildInfoFile,
|
||||
},
|
||||
},
|
||||
context: paths.appPath,
|
||||
diagnosticOptions: {
|
||||
syntactic: true,
|
||||
},
|
||||
mode: 'write-references',
|
||||
// profile: true,
|
||||
},
|
||||
issue: {
|
||||
// This one is specifically to match during CI tests,
|
||||
// as micromatch doesn't match
|
||||
// '../cra-template-typescript/template/src/App.tsx'
|
||||
// otherwise.
|
||||
include: [{
|
||||
file: '../**/src/**/*.{ts,tsx}'
|
||||
},
|
||||
{
|
||||
file: '**/src/**/*.{ts,tsx}'
|
||||
},
|
||||
],
|
||||
exclude: [{
|
||||
file: '**/src/**/__tests__/**'
|
||||
},
|
||||
{
|
||||
file: '**/src/**/?(*.){spec|test}.*'
|
||||
},
|
||||
{
|
||||
file: '**/src/setupProxy.*'
|
||||
},
|
||||
{
|
||||
file: '**/src/setupTests.*'
|
||||
},
|
||||
],
|
||||
},
|
||||
logger: {
|
||||
infrastructure: 'silent',
|
||||
},
|
||||
}),
|
||||
!disableESLintPlugin &&
|
||||
new ESLintPlugin({
|
||||
// Plugin options
|
||||
extensions: ['ts', 'tsx', 'js', 'mjs', 'jsx'],
|
||||
formatter: require.resolve('react-dev-utils/eslintFormatter'),
|
||||
eslintPath: require.resolve('eslint'),
|
||||
failOnError: !(isEnvDevelopment && emitErrorsAsWarnings),
|
||||
context: paths.appSrc,
|
||||
cache: true,
|
||||
cacheLocation: path.resolve(
|
||||
paths.appNodeModules,
|
||||
'.cache/.eslintcache'
|
||||
),
|
||||
// ESLint class options
|
||||
cwd: paths.appPath,
|
||||
resolvePluginsRelativeTo: __dirname,
|
||||
baseConfig: {
|
||||
extends: [require.resolve('eslint-config-react-app/base')],
|
||||
rules: {
|
||||
...(!hasJsxRuntime && {
|
||||
'react/react-in-jsx-scope': 'error',
|
||||
}),
|
||||
},
|
||||
},
|
||||
}),
|
||||
].filter(Boolean),
|
||||
// Turn off performance processing because we utilize
|
||||
// our own hints via the FileSizeReporter
|
||||
performance: false,
|
||||
// 优化
|
||||
// 试想一个场景,你的项目中有一个入口(entry)文件及若干按路由划分的异步模块,Webpack 启动后会立即将这些入口与异步模块全部一次性构建好 —— 即使页面启动后实际上只是访问了其中一两个异步模块, 这些花在异步模块构建的时间着实是一种浪费!
|
||||
|
||||
// 效果与 Vite 相似,能够极大提升冷启速度。
|
||||
// experiments: {
|
||||
// lazyCompilation: isEnvDevelopment,
|
||||
// },
|
||||
watchOptions: {
|
||||
ignored: /node_modules/
|
||||
}
|
||||
};
|
||||
};
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue