Compare commits
56 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f14fcdc0af | ||
|
|
d2c4fb676c | ||
|
|
8d677f376f | ||
|
|
b8e9e97199 | ||
|
|
0efe0d2c3c | ||
|
|
4e16b51e2c | ||
|
|
21c927b483 | ||
|
|
58e80feb8a | ||
|
|
a31346f404 | ||
|
|
6bc38e01b0 | ||
|
|
58f5b5f41a | ||
|
|
9850328c9d | ||
|
|
6af862ec45 | ||
|
|
c91df58c3a | ||
|
|
fda9f14423 | ||
|
|
03b386ca01 | ||
|
|
1f861dc3c5 | ||
|
|
0ef1698a22 | ||
|
|
36ab69bbf6 | ||
|
|
b173a694ee | ||
|
|
665d1f1ea9 | ||
|
|
f650251cae | ||
|
|
ad8bae3697 | ||
|
|
b419c0f504 | ||
|
|
1a08981f1b | ||
|
|
07c9b2253c | ||
|
|
d84e0f7e34 | ||
|
|
231d07a6c2 | ||
|
|
d85e8ce305 | ||
|
|
9691761856 | ||
|
|
a637369209 | ||
|
|
ed11d780dd | ||
|
|
c1e414bdd8 | ||
|
|
cf671a6388 | ||
|
|
0335e02af9 | ||
|
|
f2f8056544 | ||
|
|
448db40b87 | ||
|
|
24f980c35b | ||
|
|
672f788e26 | ||
|
|
719d78d17c | ||
|
|
0b4be1572d | ||
|
|
f96694adb2 | ||
|
|
f75a861cc1 | ||
|
|
8ed540c39b | ||
|
|
73d3a3a166 | ||
|
|
8b6683ee24 | ||
|
|
a1e7951e02 | ||
|
|
220ababca0 | ||
|
|
8eacec835c | ||
|
|
0084774d48 | ||
|
|
17271424ca | ||
|
|
ac8dec875e | ||
|
|
dfbbe38bfc | ||
|
|
200ac7c3dd | ||
|
|
b9913cadd9 | ||
|
|
b3cc0176a5 |
211
README.html
Normal file
@@ -0,0 +1,211 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>yidooplanet</title>
|
||||
<style>
|
||||
/* From extension vscode.github */
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
.vscode-dark img[src$=\#gh-light-mode-only],
|
||||
.vscode-light img[src$=\#gh-dark-mode-only],
|
||||
.vscode-high-contrast:not(.vscode-high-contrast-light) img[src$=\#gh-light-mode-only],
|
||||
.vscode-high-contrast-light img[src$=\#gh-dark-mode-only] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/markdown.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/highlight.css">
|
||||
<style>
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', system-ui, 'Ubuntu', 'Droid Sans', sans-serif;
|
||||
font-size: 14px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.task-list-item {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.task-list-item-checkbox {
|
||||
margin-left: -20px;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
:root {
|
||||
--color-note: #0969da;
|
||||
--color-tip: #1a7f37;
|
||||
--color-warning: #9a6700;
|
||||
--color-severe: #bc4c00;
|
||||
--color-caution: #d1242f;
|
||||
--color-important: #8250df;
|
||||
}
|
||||
|
||||
</style>
|
||||
<style>
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--color-note: #2f81f7;
|
||||
--color-tip: #3fb950;
|
||||
--color-warning: #d29922;
|
||||
--color-severe: #db6d28;
|
||||
--color-caution: #f85149;
|
||||
--color-important: #a371f7;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
<style>
|
||||
.markdown-alert {
|
||||
padding: 0.5rem 1rem;
|
||||
margin-bottom: 16px;
|
||||
color: inherit;
|
||||
border-left: .25em solid #888;
|
||||
}
|
||||
|
||||
.markdown-alert>:first-child {
|
||||
margin-top: 0
|
||||
}
|
||||
|
||||
.markdown-alert>:last-child {
|
||||
margin-bottom: 0
|
||||
}
|
||||
|
||||
.markdown-alert .markdown-alert-title {
|
||||
display: flex;
|
||||
font-weight: 500;
|
||||
align-items: center;
|
||||
line-height: 1
|
||||
}
|
||||
|
||||
.markdown-alert .markdown-alert-title .octicon {
|
||||
margin-right: 0.5rem;
|
||||
display: inline-block;
|
||||
overflow: visible !important;
|
||||
vertical-align: text-bottom;
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
.markdown-alert.markdown-alert-note {
|
||||
border-left-color: var(--color-note);
|
||||
}
|
||||
|
||||
.markdown-alert.markdown-alert-note .markdown-alert-title {
|
||||
color: var(--color-note);
|
||||
}
|
||||
|
||||
.markdown-alert.markdown-alert-important {
|
||||
border-left-color: var(--color-important);
|
||||
}
|
||||
|
||||
.markdown-alert.markdown-alert-important .markdown-alert-title {
|
||||
color: var(--color-important);
|
||||
}
|
||||
|
||||
.markdown-alert.markdown-alert-warning {
|
||||
border-left-color: var(--color-warning);
|
||||
}
|
||||
|
||||
.markdown-alert.markdown-alert-warning .markdown-alert-title {
|
||||
color: var(--color-warning);
|
||||
}
|
||||
|
||||
.markdown-alert.markdown-alert-tip {
|
||||
border-left-color: var(--color-tip);
|
||||
}
|
||||
|
||||
.markdown-alert.markdown-alert-tip .markdown-alert-title {
|
||||
color: var(--color-tip);
|
||||
}
|
||||
|
||||
.markdown-alert.markdown-alert-caution {
|
||||
border-left-color: var(--color-caution);
|
||||
}
|
||||
|
||||
.markdown-alert.markdown-alert-caution .markdown-alert-title {
|
||||
color: var(--color-caution);
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body class="vscode-body vscode-light">
|
||||
<h1 id="yidooplanet">yidooplanet</h1>
|
||||
<h2 id="getting-started">Getting started</h2>
|
||||
<p>To make it easy for you to get started with GitLab, here's a list of recommended next steps.</p>
|
||||
<p>Already a pro? Just edit this <a href="http://README.html">README.md</a> and make it your own. Want to make it easy? <a href="#editing-this-readme">Use the template at the bottom</a>!</p>
|
||||
<h2 id="add-your-files">Add your files</h2>
|
||||
<ul class="contains-task-list">
|
||||
<li class="task-list-item enabled"><input class="task-list-item-checkbox"type="checkbox"> <a href="https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file">Create</a> or <a href="https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file">upload</a> files</li>
|
||||
<li class="task-list-item enabled"><input class="task-list-item-checkbox"type="checkbox"> <a href="https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line">Add files using the command line</a> or push an existing Git repository with the following command:</li>
|
||||
</ul>
|
||||
<pre><code>cd existing_repo
|
||||
git remote add origin http://gitlab.yidooplanet.com/gitlab-instance-0a899031/yidooplanet.git
|
||||
git branch -M main
|
||||
git push -uf origin main
|
||||
</code></pre>
|
||||
<h2 id="integrate-with-your-tools">Integrate with your tools</h2>
|
||||
<ul class="contains-task-list">
|
||||
<li class="task-list-item enabled"><input class="task-list-item-checkbox"type="checkbox"> <a href="http://gitlab.yidooplanet.com/gitlab-instance-0a899031/yidooplanet/-/settings/integrations">Set up project integrations</a></li>
|
||||
</ul>
|
||||
<h2 id="collaborate-with-your-team">Collaborate with your team</h2>
|
||||
<ul class="contains-task-list">
|
||||
<li class="task-list-item enabled"><input class="task-list-item-checkbox"type="checkbox"> <a href="https://docs.gitlab.com/ee/user/project/members/">Invite team members and collaborators</a></li>
|
||||
<li class="task-list-item enabled"><input class="task-list-item-checkbox"type="checkbox"> <a href="https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html">Create a new merge request</a></li>
|
||||
<li class="task-list-item enabled"><input class="task-list-item-checkbox"type="checkbox"> <a href="https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically">Automatically close issues from merge requests</a></li>
|
||||
<li class="task-list-item enabled"><input class="task-list-item-checkbox"type="checkbox"> <a href="https://docs.gitlab.com/ee/user/project/merge_requests/approvals/">Enable merge request approvals</a></li>
|
||||
<li class="task-list-item enabled"><input class="task-list-item-checkbox"type="checkbox"> <a href="https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html">Automatically merge when pipeline succeeds</a></li>
|
||||
</ul>
|
||||
<h2 id="test-and-deploy">Test and Deploy</h2>
|
||||
<p>Use the built-in continuous integration in GitLab.</p>
|
||||
<ul class="contains-task-list">
|
||||
<li class="task-list-item enabled"><input class="task-list-item-checkbox"type="checkbox"> <a href="https://docs.gitlab.com/ee/ci/quick_start/index.html">Get started with GitLab CI/CD</a></li>
|
||||
<li class="task-list-item enabled"><input class="task-list-item-checkbox"type="checkbox"> <a href="https://docs.gitlab.com/ee/user/application_security/sast/">Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)</a></li>
|
||||
<li class="task-list-item enabled"><input class="task-list-item-checkbox"type="checkbox"> <a href="https://docs.gitlab.com/ee/topics/autodevops/requirements.html">Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy</a></li>
|
||||
<li class="task-list-item enabled"><input class="task-list-item-checkbox"type="checkbox"> <a href="https://docs.gitlab.com/ee/user/clusters/agent/">Use pull-based deployments for improved Kubernetes management</a></li>
|
||||
<li class="task-list-item enabled"><input class="task-list-item-checkbox"type="checkbox"> <a href="https://docs.gitlab.com/ee/ci/environments/protected_environments.html">Set up protected environments</a></li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h1 id="editing-this-readme">Editing this README</h1>
|
||||
<p>When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to <a href="https://www.makeareadme.com/">makeareadme.com</a> for this template.</p>
|
||||
<h2 id="suggestions-for-a-good-readme">Suggestions for a good README</h2>
|
||||
<p>Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.</p>
|
||||
<h2 id="name">Name</h2>
|
||||
<p>Choose a self-explaining name for your project.</p>
|
||||
<h2 id="description">Description</h2>
|
||||
<p>Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.</p>
|
||||
<h2 id="badges">Badges</h2>
|
||||
<p>On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.</p>
|
||||
<h2 id="visuals">Visuals</h2>
|
||||
<p>Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.</p>
|
||||
<h2 id="installation">Installation</h2>
|
||||
<p>Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.</p>
|
||||
<h2 id="usage">Usage</h2>
|
||||
<p>Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.</p>
|
||||
<h2 id="support">Support</h2>
|
||||
<p>Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.</p>
|
||||
<h2 id="roadmap">Roadmap</h2>
|
||||
<p>If you have ideas for releases in the future, it is a good idea to list them in the README.</p>
|
||||
<h2 id="contributing">Contributing</h2>
|
||||
<p>State if you are open to contributions and what your requirements are for accepting them.</p>
|
||||
<p>For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.</p>
|
||||
<p>You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.</p>
|
||||
<h2 id="authors-and-acknowledgment">Authors and acknowledgment</h2>
|
||||
<p>Show your appreciation to those who have contributed to the project.</p>
|
||||
<h2 id="license">License</h2>
|
||||
<p>For open source projects, say how it is licensed.</p>
|
||||
<h2 id="project-status">Project status</h2>
|
||||
<p>If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.</p>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,18 +1,25 @@
|
||||
import { defineConfig } from '@tarojs/cli'
|
||||
// import * as path from 'path'; //引入node的path模块
|
||||
|
||||
import devConfig from './dev'
|
||||
import prodConfig from './prod'
|
||||
const path = require('path'); //引入node的path模块
|
||||
|
||||
// https://taro-docs.jd.com/docs/next/config#defineconfig-辅助函数
|
||||
export default defineConfig(async (merge, { command, mode }) => {
|
||||
const baseConfig = {
|
||||
projectName: 'yidooplanet',
|
||||
embeddedAppIdList: ["wx8a5d6f9fad07544e","wx7bb576902363f4ff","wxe2039b83454e49ed"], //半屏拉起小程序 当当wx7bb576902363f4ff/腾讯云wxe2039b83454e49ed/微信读书 wx8a5d6f9fad07544e
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, '..', 'src')
|
||||
},
|
||||
date: '2024-3-19',
|
||||
designWidth: 750,
|
||||
deviceRatio: {
|
||||
640: 2.34 / 2,
|
||||
750: 1,
|
||||
375: 2,
|
||||
// 375: 2/1,
|
||||
828: 1.81 / 2
|
||||
},
|
||||
sourceRoot: 'src',
|
||||
@@ -52,7 +59,11 @@ export default defineConfig(async (merge, { command, mode }) => {
|
||||
generateScopedName: '[name]__[local]___[hash:base64:5]'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 优化分包
|
||||
optimizeMainPackage: {
|
||||
enable: true,
|
||||
},
|
||||
},
|
||||
h5: {
|
||||
publicPath: '/',
|
||||
|
||||
31167
package-lock.json
generated
Normal file
56
package.json
@@ -42,45 +42,47 @@
|
||||
"@babel/runtime": "^7.21.5",
|
||||
"@tarojs/components": "3.6.25",
|
||||
"@tarojs/helper": "3.6.25",
|
||||
"@tarojs/plugin-platform-weapp": "3.6.25",
|
||||
"@tarojs/plugin-framework-react": "3.6.25",
|
||||
"@tarojs/plugin-platform-alipay": "3.6.25",
|
||||
"@tarojs/plugin-platform-tt": "3.6.25",
|
||||
"@tarojs/plugin-platform-swan": "3.6.25",
|
||||
"@tarojs/plugin-platform-jd": "3.6.25",
|
||||
"@tarojs/plugin-platform-qq": "3.6.25",
|
||||
"@tarojs/plugin-platform-h5": "3.6.25",
|
||||
"@tarojs/plugin-platform-harmony-hybrid": "3.6.25",
|
||||
"@tarojs/plugin-platform-jd": "3.6.25",
|
||||
"@tarojs/plugin-platform-qq": "3.6.25",
|
||||
"@tarojs/plugin-platform-swan": "3.6.25",
|
||||
"@tarojs/plugin-platform-tt": "3.6.25",
|
||||
"@tarojs/plugin-platform-weapp": "3.6.25",
|
||||
"@tarojs/react": "3.6.25",
|
||||
"@tarojs/runtime": "3.6.25",
|
||||
"@tarojs/shared": "3.6.25",
|
||||
"@tarojs/taro": "3.6.25",
|
||||
"@tarojs/plugin-framework-react": "3.6.25",
|
||||
"@tarojs/react": "3.6.25",
|
||||
"lodash": "^4.17.21",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0",
|
||||
"react": "^18.0.0"
|
||||
"taro-ui": "^3.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.8.0",
|
||||
"@tarojs/cli": "3.6.25",
|
||||
"@types/webpack-env": "^1.13.6",
|
||||
"@tarojs/test-utils-react": "^0.1.1",
|
||||
"@types/react": "^18.0.0",
|
||||
"webpack": "5.78.0",
|
||||
"@tarojs/taro-loader": "3.6.25",
|
||||
"@tarojs/webpack5-runner": "3.6.25",
|
||||
"babel-preset-taro": "3.6.25",
|
||||
"eslint-config-taro": "3.6.25",
|
||||
"eslint": "^8.12.0",
|
||||
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.5",
|
||||
"react-refresh": "^0.11.0",
|
||||
"eslint-plugin-react": "^7.8.2",
|
||||
"eslint-plugin-import": "^2.12.0",
|
||||
"eslint-plugin-react-hooks": "^4.2.0",
|
||||
"stylelint": "^14.4.0",
|
||||
"postcss": "^8.4.18",
|
||||
"ts-node": "^10.9.1",
|
||||
"@types/node": "^18.15.11",
|
||||
"@tarojs/cli": "3.6.25",
|
||||
"@tarojs/taro-loader": "3.6.25",
|
||||
"@tarojs/test-utils-react": "^0.1.1",
|
||||
"@tarojs/webpack5-runner": "3.6.25",
|
||||
"@types/jest": "^29.3.1",
|
||||
"@types/node": "^18.15.11",
|
||||
"@types/react": "^18.0.0",
|
||||
"@types/webpack-env": "^1.13.6",
|
||||
"babel-preset-taro": "3.6.25",
|
||||
"eslint": "^8.12.0",
|
||||
"eslint-config-taro": "3.6.25",
|
||||
"eslint-plugin-import": "^2.12.0",
|
||||
"eslint-plugin-react": "^7.8.2",
|
||||
"eslint-plugin-react-hooks": "^4.2.0",
|
||||
"jest": "^29.3.1",
|
||||
"jest-environment-jsdom": "^29.5.0"
|
||||
"jest-environment-jsdom": "^29.5.0",
|
||||
"postcss": "^8.4.18",
|
||||
"react-refresh": "^0.11.0",
|
||||
"stylelint": "^14.4.0",
|
||||
"ts-node": "^10.9.1",
|
||||
"webpack": "5.78.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,31 @@
|
||||
{
|
||||
"miniprogramRoot": "./dist",
|
||||
"miniprogramRoot": "dist/",
|
||||
"projectname": "yidooplanet",
|
||||
"description": "yidooplanet",
|
||||
"appid": "touristappid",
|
||||
"appid": "wxa55815dd741a540d",
|
||||
"setting": {
|
||||
"urlCheck": true,
|
||||
"es6": false,
|
||||
"enhance": false,
|
||||
"compileHotReLoad": false,
|
||||
"postcss": false,
|
||||
"minified": false
|
||||
},
|
||||
"compileType": "miniprogram"
|
||||
"minified": false,
|
||||
"babelSetting": {
|
||||
"ignore": [],
|
||||
"disablePlugins": [],
|
||||
"outputPath": ""
|
||||
}
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "3.3.4",
|
||||
"srcMiniprogramRoot": "dist/",
|
||||
"packOptions": {
|
||||
"ignore": [],
|
||||
"include": []
|
||||
},
|
||||
"condition": {},
|
||||
"editorSetting": {
|
||||
"tabIndent": "insertSpaces",
|
||||
"tabSize": 2
|
||||
}
|
||||
}
|
||||
7
project.private.config.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||
"projectname": "yidooplanet",
|
||||
"setting": {
|
||||
"compileHotReLoad": true
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"miniprogramRoot": "./",
|
||||
"projectname": "yidooplanet",
|
||||
"appid": "testAppId",
|
||||
"appid": "wxa55815dd741a540d",
|
||||
"setting": {
|
||||
"es6": false,
|
||||
"minified": false
|
||||
|
||||
@@ -1,11 +1,27 @@
|
||||
export default defineAppConfig({
|
||||
pages: [
|
||||
'pages/index/index'
|
||||
'pages/index/index',
|
||||
'pages/index/componments/KeywordJoin/index',
|
||||
'pages/index/componments/NomadbookPage/index',
|
||||
|
||||
'pages/my/index',
|
||||
'pages/my/componments/Log/index',
|
||||
'pages/my/componments/Quesion/index',
|
||||
|
||||
],
|
||||
permission: {
|
||||
"scope.userLocation": {
|
||||
desc: "你的位置信息将用于小程序位置接口的效果展示", // 高速公路行驶持续后台定位
|
||||
},
|
||||
},
|
||||
requiredPrivateInfos: ["getLocation", "chooseLocation",'chooseAddress'],
|
||||
window: {
|
||||
backgroundTextStyle: 'light',
|
||||
navigationBarBackgroundColor: '#fff',
|
||||
navigationBarTitleText: 'WeChat',
|
||||
navigationBarTextStyle: 'black'
|
||||
},
|
||||
// 设置后,空对象代表可以使用小程序原生组件
|
||||
usingComponents: {
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
import { useLaunch } from '@tarojs/taro'
|
||||
import './app.scss'
|
||||
import 'taro-ui/dist/style/index.scss' // 全局引入一次即可
|
||||
|
||||
function App({ children }) {
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
@import "~taro-ui/dist/style/index.scss"; // 引入组件样式 - 方式二
|
||||
3
src/componments/Model/index.config.js
Normal file
@@ -0,0 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '导航栏'
|
||||
})
|
||||
28
src/componments/Model/index.jsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import { View, Text, Image, Button, Icon } from "@tarojs/components";
|
||||
import { useLoad } from "@tarojs/taro";
|
||||
import Taro from "@tarojs/taro";
|
||||
import {
|
||||
AtAvatar,
|
||||
AtTag,
|
||||
AtIcon,
|
||||
AtTabBar,
|
||||
AtButton,
|
||||
AtAccordion,
|
||||
AtList,
|
||||
AtListItem,
|
||||
} from "taro-ui";
|
||||
import "./index.scss";
|
||||
import beijing from "@/images/city/beijing.jpg";
|
||||
import guangzhou from "@/images/city/guangzhou.jpg";
|
||||
import shanghai from "@/images/city/shanghai.jpg";
|
||||
import shenzhen from "@/images/city/shenzhen.jpg";
|
||||
import touxiang from "@/images/index/touxiang.jpg";
|
||||
import TabbarCom from "@/componments/TabbarCom";
|
||||
import { useEffect, useState } from "react";
|
||||
const Model = () => {
|
||||
const [open, setopen] = useState(false);
|
||||
|
||||
return <View className="Model"></View>;
|
||||
};
|
||||
|
||||
export default Model;
|
||||
0
src/componments/Model/index.scss
Normal file
85
src/componments/QrCode/index.jsx
Normal file
@@ -0,0 +1,85 @@
|
||||
import { View, Text, Image, Button, Icon, Dialog } from "@tarojs/components";
|
||||
import { useLoad } from "@tarojs/taro";
|
||||
import Taro from "@tarojs/taro";
|
||||
import {
|
||||
AtAvatar,
|
||||
AtTag,
|
||||
AtIcon,
|
||||
AtTabBar,
|
||||
AtButton,
|
||||
AtAccordion,
|
||||
AtList,
|
||||
AtListItem,
|
||||
AtModal,
|
||||
AtModalHeader,
|
||||
AtModalContent,
|
||||
AtModalAction,
|
||||
AtCurtain,
|
||||
} from "taro-ui";
|
||||
import "./index.scss";
|
||||
import beijing from "@/images/city/beijing.jpg";
|
||||
import guangzhou from "@/images/city/guangzhou.jpg";
|
||||
import shanghai from "@/images/city/shanghai.jpg";
|
||||
import shenzhen from "@/images/city/shenzhen.jpg";
|
||||
import touxiang from "@/images/index/touxiang.jpg";
|
||||
import nomad from "@/images/index/nomad.png";
|
||||
import QRcode from "@/images/index/QRcode.png";
|
||||
|
||||
|
||||
import TabbarCom from "@/componments/TabbarCom";
|
||||
import { useEffect, useState } from "react";
|
||||
const QrCode = (props) => {
|
||||
console.log("props", props);
|
||||
const [isOpened, setisOpened] = useState(false);
|
||||
useEffect(() => {
|
||||
setisOpened(props.isOpened);
|
||||
}, [props.isOpened]);
|
||||
|
||||
const Qrcode = () => {
|
||||
return (
|
||||
<View className="wechatCode">
|
||||
<View>长按识别二维码</View>
|
||||
<Image
|
||||
style={{ width: "100px", height: "100px" }}
|
||||
showMenuByLongpress={true}
|
||||
src={QRcode}
|
||||
// src='cloud://citynew-0givkbre03955d8c.6369-citynew-0givkbre03955d8c-1253655588/images/touxiang/download-1.jpg'
|
||||
></Image>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
return (
|
||||
<View className="QrCode">
|
||||
{/* <AtModal
|
||||
isOpened={isOpened}
|
||||
title="长按识别二维码"
|
||||
cancelText="取消"
|
||||
confirmText="确认"
|
||||
onClose={() => {
|
||||
setisOpened(false);
|
||||
}}
|
||||
onCancel={() => {
|
||||
setisOpened(false);
|
||||
}}
|
||||
onConfirm={() => {
|
||||
setisOpened(false);
|
||||
}}
|
||||
content={Qrcode}
|
||||
/> */}
|
||||
|
||||
<AtCurtain
|
||||
isOpened={isOpened}
|
||||
closeBtnPosition="top-right"
|
||||
onClose={() => {
|
||||
setisOpened(false);
|
||||
// 设置父组件状态
|
||||
props.setisOpened(false);
|
||||
}}
|
||||
>
|
||||
<Qrcode />
|
||||
</AtCurtain>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default QrCode;
|
||||
13
src/componments/QrCode/index.scss
Normal file
@@ -0,0 +1,13 @@
|
||||
.QrCode{
|
||||
|
||||
.wechatCode{
|
||||
width: 600px;
|
||||
height: 600px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
// background-color: #fff;
|
||||
}
|
||||
|
||||
}
|
||||
41
src/componments/TabbarCom/index.jsx
Normal file
@@ -0,0 +1,41 @@
|
||||
import { View } from "@tarojs/components";
|
||||
import { AtAvatar, AtTag, AtIcon, AtTabBar, AtButton } from "taro-ui";
|
||||
import Taro from "@tarojs/taro";
|
||||
import react from "react";
|
||||
|
||||
const TabbarCom = (props) => {
|
||||
const [active, setActive] = react.useState(props?.active ?? 0);
|
||||
|
||||
return (
|
||||
<View className="tabbbar">
|
||||
<AtTabBar
|
||||
tabList={[
|
||||
{ title: "首页", iconType: "home" }, //, text: "new"
|
||||
// { title: "工具箱", iconType: "star" },
|
||||
{ title: "我的", iconType: "user" }, //, text: "100", max: 99
|
||||
]}
|
||||
onClick={(current) => {
|
||||
setActive(current);
|
||||
if (current === 0) {
|
||||
Taro.redirectTo({
|
||||
url: "/pages/index/index",
|
||||
});
|
||||
}
|
||||
// else if (current === 1) {
|
||||
// Taro.redirectTo({
|
||||
// url: "/pages/index/index",
|
||||
// });
|
||||
// }
|
||||
else {
|
||||
Taro.redirectTo({
|
||||
url: "/pages/my/index",
|
||||
});
|
||||
}
|
||||
}}
|
||||
current={active}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default TabbarCom;
|
||||
11
src/componments/TabbarCom/index.scss
Normal file
@@ -0,0 +1,11 @@
|
||||
.tabbbarDiv {
|
||||
width: 100%;
|
||||
height: 140px;
|
||||
// background-color: red;
|
||||
}
|
||||
|
||||
.tabbbar {
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
}
|
||||
BIN
src/images/book/chuangye.jpg
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
src/images/book/dangan.jpg
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
src/images/book/fuye.jpg
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
src/images/book/hours.jpg
Normal file
|
After Width: | Height: | Size: 8.9 KiB |
BIN
src/images/book/poquan.jpg
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
src/images/book/rework.jpg
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
src/images/city/beijing.jpg
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
src/images/city/guangzhou.jpg
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
src/images/city/hangzhou.jpg
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
BIN
src/images/city/shanghai.jpg
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
BIN
src/images/city/shenzhen.jpg
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
src/images/city/wuhan.jpg
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
src/images/index/QRcode.png
Normal file
|
After Width: | Height: | Size: 269 KiB |
BIN
src/images/index/nomad.png
Normal file
|
After Width: | Height: | Size: 82 KiB |
BIN
src/images/index/remotework.jpg
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
src/images/index/touxiang.jpg
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
src/images/meetup/a1.jpg
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
src/images/meetup/a2.jpg
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
src/images/meetup/a3.jpg
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
src/images/meetup/a4.png
Normal file
|
After Width: | Height: | Size: 244 KiB |
BIN
src/images/meetup/a5.jpg
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
src/images/meetup/a6.jpg
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
85
src/pages/index/componments/JoinWechat/index.jsx
Normal file
@@ -0,0 +1,85 @@
|
||||
import { View, Text, Image, Button, Icon } from "@tarojs/components";
|
||||
import { useLoad } from "@tarojs/taro";
|
||||
import Taro from "@tarojs/taro";
|
||||
import {
|
||||
AtAvatar,
|
||||
AtTag,
|
||||
AtIcon,
|
||||
AtTabBar,
|
||||
AtButton,
|
||||
AtAccordion,
|
||||
AtList,
|
||||
AtListItem,
|
||||
AtMessage,
|
||||
} from "taro-ui";
|
||||
import "./index.scss";
|
||||
import beijing from "@/images/city/beijing.jpg";
|
||||
import guangzhou from "@/images/city/guangzhou.jpg";
|
||||
import shanghai from "@/images/city/shanghai.jpg";
|
||||
import shenzhen from "@/images/city/shenzhen.jpg";
|
||||
import touxiang from "@/images/index/touxiang.jpg";
|
||||
import TabbarCom from "@/componments/TabbarCom";
|
||||
import QrCode from "@/componments/QrCode";
|
||||
|
||||
import a1 from "@/images/meetup/a1.jpg";
|
||||
import a2 from "@/images/meetup/a2.jpg";
|
||||
import a3 from "@/images/meetup/a3.jpg";
|
||||
import a4 from "@/images/meetup/a4.png";
|
||||
import a5 from "@/images/meetup/a5.jpg";
|
||||
import a6 from "@/images/meetup/a6.jpg";
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
const JoinWechat = () => {
|
||||
const [open, setopen] = useState(false);
|
||||
const [isOpened, setisOpened] = useState(false);
|
||||
// 用户基本信息
|
||||
const [localuserInfo, setlocaluserInfo] = useState(
|
||||
Taro.getStorageSync("userInfo")
|
||||
);
|
||||
return (
|
||||
<View
|
||||
className="JoinWechat"
|
||||
onClick={() => {
|
||||
// 判断群组内是否包含wxid
|
||||
// pass
|
||||
|
||||
// 判断目前是否辨识wxid
|
||||
if (localuserInfo?.wxid) {
|
||||
// 跳转答题页面=入群
|
||||
Taro.navigateTo({
|
||||
url: "/pages/index/componments/KeywordJoin/index",
|
||||
});
|
||||
} else {
|
||||
// 显示二维码-个人名片
|
||||
setisOpened(true);
|
||||
}
|
||||
}}
|
||||
>
|
||||
<View className="CustomHeader">🥂加入微信群-meetup</View>
|
||||
<View className="CustomAvatar">
|
||||
{[
|
||||
{ imagePath: a1 },
|
||||
{ imagePath: a2 },
|
||||
{ imagePath: a3 },
|
||||
{ imagePath: a4 },
|
||||
{ imagePath: a5 },
|
||||
{ imagePath: a6 },
|
||||
].map((item, index) => {
|
||||
return (
|
||||
<AtAvatar
|
||||
className="AtAvatar"
|
||||
circle
|
||||
image={item.imagePath}
|
||||
size="small"
|
||||
></AtAvatar>
|
||||
);
|
||||
})}
|
||||
</View>
|
||||
{/* <View>查看更多</View> */}
|
||||
<QrCode isOpened={isOpened} setisOpened={setisOpened} />
|
||||
<AtMessage />
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default JoinWechat;
|
||||
37
src/pages/index/componments/JoinWechat/index.scss
Normal file
@@ -0,0 +1,37 @@
|
||||
.JoinWechat {
|
||||
padding: 10px;
|
||||
font-size: 25px;
|
||||
width: 320px;
|
||||
height: 230px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
// justify-content: center;
|
||||
// background-color: #ffe7ba;
|
||||
border-radius: 20px;
|
||||
border: solid 1px #8c8c8c;
|
||||
.CustomHeader {
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
// background-color: yellow;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.CustomAvatar {
|
||||
width: 100%;
|
||||
// height: 60px;
|
||||
// background-color: green;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
.AtAvatar {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
3
src/pages/index/componments/KeywordJoin/index.config.js
Normal file
@@ -0,0 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '入群公告'
|
||||
})
|
||||
180
src/pages/index/componments/KeywordJoin/index.jsx
Normal file
@@ -0,0 +1,180 @@
|
||||
import { View, Text, Image, Button, Icon } from "@tarojs/components";
|
||||
import { useLoad } from "@tarojs/taro";
|
||||
import Taro from "@tarojs/taro";
|
||||
import {
|
||||
AtAvatar,
|
||||
AtTag,
|
||||
AtIcon,
|
||||
AtTabBar,
|
||||
AtButton,
|
||||
AtAccordion,
|
||||
AtList,
|
||||
AtListItem,
|
||||
AtSteps,
|
||||
AtForm,
|
||||
AtInput,
|
||||
AtToast,
|
||||
AtMessage,
|
||||
} from "taro-ui";
|
||||
import "./index.scss";
|
||||
import beijing from "@/images/city/beijing.jpg";
|
||||
import guangzhou from "@/images/city/guangzhou.jpg";
|
||||
import shanghai from "@/images/city/shanghai.jpg";
|
||||
import shenzhen from "@/images/city/shenzhen.jpg";
|
||||
import touxiang from "@/images/index/touxiang.jpg";
|
||||
import TabbarCom from "@/componments/TabbarCom";
|
||||
import { useEffect, useState } from "react";
|
||||
import { set } from "lodash";
|
||||
const KeywordJoin = () => {
|
||||
const [current, setcurrent] = useState(0);
|
||||
const [value, setvalue] = useState(null);
|
||||
const [disabled, setdisabled] = useState(false);
|
||||
const [btntext, setbtntext] = useState('立即加入');
|
||||
|
||||
|
||||
const [localuserInfo, setlocaluserInfo] = useState(
|
||||
Taro.getStorageSync("userInfo")
|
||||
);
|
||||
|
||||
// 获取用户标识符
|
||||
useEffect(() => {
|
||||
// 获取路由参数
|
||||
const params = Taro.getCurrentInstance().router.params;
|
||||
console.log("params", params);
|
||||
// const [wxid, openId] = params;
|
||||
|
||||
if (params.wxid) {
|
||||
setuserInfo({
|
||||
wxid: params?.wxid, //个人号wxid
|
||||
// openId: params?.openId, //小程序openid
|
||||
});
|
||||
// 本地存储
|
||||
|
||||
try {
|
||||
Taro.setStorageSync("wxid", params?.wxid ?? "");
|
||||
} catch (e) {}
|
||||
}
|
||||
}, []);
|
||||
|
||||
// useEffect(() => {
|
||||
// // 更新分享-minipro
|
||||
// Taro.updateShareMenu({
|
||||
// withShareTicket: true,
|
||||
// success() {},
|
||||
// });
|
||||
|
||||
// // 显示分享按钮-minipro
|
||||
// Taro.showShareMenu({
|
||||
// withShareTicket: true,
|
||||
// // showShareItems:true,
|
||||
// });
|
||||
|
||||
// }, []);
|
||||
|
||||
const handleClick = (text, type) => {
|
||||
Taro.atMessage({
|
||||
message: text,
|
||||
type: type,
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<View className="KeywordJoin">
|
||||
{/* 步骤栏 */}
|
||||
{/* <AtSteps
|
||||
items={[
|
||||
{
|
||||
title: "人群公告",
|
||||
// desc: "这里是额外的信息,最多两行",
|
||||
// status: "success",
|
||||
},
|
||||
{
|
||||
title: "声明",
|
||||
// desc: "这里是额外的信息,最多两行",
|
||||
},
|
||||
{
|
||||
title: "再次确认",
|
||||
// desc: "这里是额外的信息,最多两行",
|
||||
// status: "error",
|
||||
},
|
||||
]}
|
||||
current={current}
|
||||
onChange={(target) => {
|
||||
console.log("target", target);
|
||||
setcurrent(target);
|
||||
}}
|
||||
/> */}
|
||||
|
||||
<View className="at-article">
|
||||
{/* H1文章标题 */}
|
||||
<View className="at-article__h1">欢迎加入微信群</View>
|
||||
{/* <View className="at-article__info">
|
||||
2024-03-24 异度星球
|
||||
</View> */}
|
||||
|
||||
{/* 内容区域 */}
|
||||
<View className="at-article__content">
|
||||
<View className="at-article__section">
|
||||
<Image
|
||||
style={{
|
||||
width: "200px",
|
||||
height: "200px",
|
||||
background: " #fff",
|
||||
borderRadius: "10px",
|
||||
}}
|
||||
className="at-article__img"
|
||||
src={touxiang}
|
||||
mode="widthFix"
|
||||
/>
|
||||
{/* 二级标题 */}
|
||||
{/* <View className="at-article__h2">这是二级标题</View> */}
|
||||
{/* 三级标题 */}
|
||||
<View className="at-article__h3">群公告</View>
|
||||
{/* 文本段落 */}
|
||||
<View className="at-article__p">
|
||||
交流自由职业/副业,数字游民等话题
|
||||
</View>
|
||||
<View className="at-article__p">请不要打广告</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
<AtMessage />
|
||||
<AtButton
|
||||
type="primary"
|
||||
className="jsonWechatBtn"
|
||||
disabled={disabled}
|
||||
onClick={() => {
|
||||
// 通过hook加入微信群邀请
|
||||
//发起网络请求
|
||||
Taro.request({
|
||||
// url: "http://127.0.0.1:28369/joingroup",
|
||||
url: "https://kunpeng.hackrobot.cn/joingroup",
|
||||
data: {
|
||||
wxid: localuserInfo?.wxid ?? null, //debug eric 的wxid
|
||||
},
|
||||
success: function (resUser) {
|
||||
console.log("resUser--", resUser);
|
||||
console.log("加入微信群成功");
|
||||
if (resUser?.data?.success == "fail") {
|
||||
//已经在群聊中
|
||||
handleClick("已经在群聊中", "warning");
|
||||
setbtntext("已经在群聊中")
|
||||
|
||||
} else if (resUser?.data?.success == "ok") {
|
||||
// 发送群聊邀请
|
||||
handleClick("已发送群聊邀请", "warning");
|
||||
setbtntext("已发送群聊邀请")
|
||||
}
|
||||
setdisabled(true);
|
||||
|
||||
},
|
||||
});
|
||||
}}
|
||||
>
|
||||
{btntext}
|
||||
</AtButton>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default KeywordJoin;
|
||||
13
src/pages/index/componments/KeywordJoin/index.scss
Normal file
@@ -0,0 +1,13 @@
|
||||
.KeywordJoin{
|
||||
.tabbbarDiv {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
// background-color: red;
|
||||
}
|
||||
|
||||
.jsonWechatBtn{
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
66
src/pages/index/componments/Nomadbook/index.jsx
Normal file
@@ -0,0 +1,66 @@
|
||||
import { View, Text, Image, Button, Icon } from "@tarojs/components";
|
||||
import { useLoad } from "@tarojs/taro";
|
||||
import Taro from "@tarojs/taro";
|
||||
import {
|
||||
AtAvatar,
|
||||
AtTag,
|
||||
AtIcon,
|
||||
AtTabBar,
|
||||
AtButton,
|
||||
AtAccordion,
|
||||
AtList,
|
||||
AtListItem,
|
||||
} from "taro-ui";
|
||||
import "./index.scss";
|
||||
import rework from "@/images/book/rework.jpg";
|
||||
import dangan from "@/images/book/dangan.jpg";
|
||||
import fuye from "@/images/book/fuye.jpg";
|
||||
import poquan from "@/images/book/poquan.jpg";
|
||||
import chuangye from "@/images/book/chuangye.jpg";
|
||||
import hours from "@/images/book/hours.jpg";
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
const Nomadbook = () => {
|
||||
const [open, setopen] = useState(false);
|
||||
|
||||
return (
|
||||
<View
|
||||
className="Nomadbook"
|
||||
onClick={() => {
|
||||
Taro.navigateTo({
|
||||
url: "/pages/index/componments/NomadbookPage/index",
|
||||
});
|
||||
}}
|
||||
>
|
||||
<View className="book">
|
||||
{[
|
||||
{ imagePath: rework },
|
||||
{ imagePath: dangan },
|
||||
{ imagePath: fuye },
|
||||
{ imagePath: poquan },
|
||||
{ imagePath: chuangye },
|
||||
{ imagePath: hours },
|
||||
].map((item, index) => {
|
||||
return (
|
||||
<View className="bookItem">
|
||||
{" "}
|
||||
<Image
|
||||
style={{
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
background: " #fff",
|
||||
borderRadius: "10px",
|
||||
}}
|
||||
mode="scaleToFill"
|
||||
src={item.imagePath}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
})}
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default Nomadbook;
|
||||
33
src/pages/index/componments/Nomadbook/index.scss
Normal file
@@ -0,0 +1,33 @@
|
||||
.Nomadbook {
|
||||
padding: 10px;
|
||||
font-size: 25px;
|
||||
width: 320px;
|
||||
height: 230px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
// justify-content: center;
|
||||
// background-color: red;
|
||||
border-radius: 20px;
|
||||
border: solid 1px #8c8c8c;
|
||||
|
||||
.book{
|
||||
// width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
// background-color: aquamarine;
|
||||
padding: 10px;
|
||||
.bookItem {
|
||||
width: 95px;
|
||||
height: 95px;
|
||||
// background-color: yellow;
|
||||
margin-top: 10px;
|
||||
// margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '图书'
|
||||
})
|
||||
60
src/pages/index/componments/NomadbookPage/index.jsx
Normal file
@@ -0,0 +1,60 @@
|
||||
import { View, Text, Image, Button, Icon } from "@tarojs/components";
|
||||
import { useLoad } from "@tarojs/taro";
|
||||
import Taro from "@tarojs/taro";
|
||||
import {
|
||||
AtAvatar,
|
||||
AtTag,
|
||||
AtIcon,
|
||||
AtTabBar,
|
||||
AtButton,
|
||||
AtAccordion,
|
||||
AtList,
|
||||
AtListItem,
|
||||
} from "taro-ui";
|
||||
import "./index.scss";
|
||||
import rework from "@/images/book/rework.jpg";
|
||||
import dangan from "@/images/book/dangan.jpg";
|
||||
import fuye from "@/images/book/fuye.jpg";
|
||||
import poquan from "@/images/book/poquan.jpg";
|
||||
import chuangye from "@/images/book/chuangye.jpg";
|
||||
import hours from "@/images/book/hours.jpg";
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
const NomadbookPage = () => {
|
||||
const [open, setopen] = useState(false);
|
||||
|
||||
return (
|
||||
<View className="NomadbookPage">
|
||||
{/* <View>NomadbookPage</View> */}
|
||||
<View className="book">
|
||||
{[
|
||||
{ imagePath: rework },
|
||||
{ imagePath: dangan },
|
||||
{ imagePath: fuye },
|
||||
{ imagePath: poquan },
|
||||
{ imagePath: chuangye },
|
||||
{ imagePath: hours },
|
||||
].map((item, index) => {
|
||||
return (
|
||||
<View className="bookItem">
|
||||
{" "}
|
||||
<Image
|
||||
style={{
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
background: " #fff",
|
||||
borderRadius: "10px",
|
||||
}}
|
||||
mode="scaleToFill"
|
||||
src={item.imagePath}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
})}
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default NomadbookPage;
|
||||
35
src/pages/index/componments/NomadbookPage/index.scss
Normal file
@@ -0,0 +1,35 @@
|
||||
.NomadbookPage {
|
||||
padding: 10px;
|
||||
font-size: 25px;
|
||||
// width: 320px;
|
||||
// height: 230px;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
// justify-content: center;
|
||||
// background-color: red;
|
||||
border-radius: 20px;
|
||||
// border: solid 1px #8c8c8c;
|
||||
// background-color: yellow;
|
||||
|
||||
.book {
|
||||
// width: 100%;
|
||||
|
||||
// height: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
// background-color: aquamarine;
|
||||
padding: 10px;
|
||||
.bookItem {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
// background-color: yellow;
|
||||
margin-top: 20px;
|
||||
// margin-right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
3
src/pages/index/componments/RemoteJob/index.config.js
Normal file
@@ -0,0 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: 'RemoteJob'
|
||||
})
|
||||
60
src/pages/index/componments/RemoteJob/index.jsx
Normal file
@@ -0,0 +1,60 @@
|
||||
import { View, Text, Image, Button, Icon } from "@tarojs/components";
|
||||
import { useLoad } from "@tarojs/taro";
|
||||
import Taro from "@tarojs/taro";
|
||||
import {
|
||||
AtAvatar,
|
||||
AtTag,
|
||||
AtIcon,
|
||||
AtTabBar,
|
||||
AtButton,
|
||||
AtAccordion,
|
||||
AtList,
|
||||
AtListItem,
|
||||
AtDivider,
|
||||
} from "taro-ui";
|
||||
import "./index.scss";
|
||||
import beijing from "@/images/city/beijing.jpg";
|
||||
import guangzhou from "@/images/city/guangzhou.jpg";
|
||||
import shanghai from "@/images/city/shanghai.jpg";
|
||||
import shenzhen from "@/images/city/shenzhen.jpg";
|
||||
import touxiang from "@/images/index/touxiang.jpg";
|
||||
import TabbarCom from "@/componments/TabbarCom";
|
||||
import remotework from "@/images/index/remotework.jpg";
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
const RemoteJob = () => {
|
||||
const [open, setopen] = useState(false);
|
||||
|
||||
return (
|
||||
<View
|
||||
className="RemoteJob"
|
||||
style={
|
||||
{
|
||||
// backgroundImage: `url(${remotework})`,
|
||||
// backgroundRepeat:"no-repeat",
|
||||
// backgroundColor: "yellow",
|
||||
}
|
||||
}
|
||||
>
|
||||
<Image
|
||||
style={{
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
background: " #fff",
|
||||
borderRadius: "10px",
|
||||
}}
|
||||
mode="scaleToFill"
|
||||
src={remotework}
|
||||
/>
|
||||
<View className="ReContent"> <View>远程工作职位</View>
|
||||
<AtDivider content="" />
|
||||
<View>1. 设计师</View>
|
||||
<View>2. 开发工程师</View>
|
||||
<View>3. 社交媒体营销</View>
|
||||
<View>4. 电商运营</View></View>
|
||||
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default RemoteJob;
|
||||
27
src/pages/index/componments/RemoteJob/index.scss
Normal file
@@ -0,0 +1,27 @@
|
||||
.RemoteJob {
|
||||
// padding: 10px;
|
||||
|
||||
|
||||
position: relative;
|
||||
|
||||
Image {
|
||||
z-index: -1;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.ReContent {
|
||||
padding: 10px;
|
||||
font-size: 25px;
|
||||
width: 320px;
|
||||
height: 230px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
// align-items: center;
|
||||
// justify-content: center;
|
||||
// background-color: #eaff8f;
|
||||
color: #fff;
|
||||
font-weight: 400;
|
||||
border-radius: 20px;
|
||||
border: solid 1px #8c8c8c;
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '首页'
|
||||
navigationBarTitleText: '数字游民的星球'
|
||||
})
|
||||
|
||||
@@ -1,16 +1,299 @@
|
||||
import { View, Text } from '@tarojs/components'
|
||||
import { useLoad } from '@tarojs/taro'
|
||||
import './index.scss'
|
||||
import { View, Text, Image } from "@tarojs/components";
|
||||
import { useLoad } from "@tarojs/taro";
|
||||
import Taro from "@tarojs/taro";
|
||||
import {
|
||||
AtAvatar,
|
||||
AtTag,
|
||||
AtIcon,
|
||||
AtTabBar,
|
||||
AtButton,
|
||||
AtMessage,
|
||||
} from "taro-ui";
|
||||
import "./index.scss";
|
||||
import beijing from "@/images/city/beijing.jpg";
|
||||
import guangzhou from "@/images/city/guangzhou.jpg";
|
||||
import shanghai from "@/images/city/shanghai.jpg";
|
||||
import shenzhen from "@/images/city/shenzhen.jpg";
|
||||
import touxiang from "@/images/index/touxiang.jpg";
|
||||
import wuhan from "@/images/city/wuhan.jpg";
|
||||
import hangzhou from "@/images/city/hangzhou.jpg";
|
||||
|
||||
import a1 from "@/images/meetup/a1.jpg";
|
||||
import a2 from "@/images/meetup/a2.jpg";
|
||||
import a3 from "@/images/meetup/a3.jpg";
|
||||
import a4 from "@/images/meetup/a4.png";
|
||||
import a5 from "@/images/meetup/a5.jpg";
|
||||
import a6 from "@/images/meetup/a6.jpg";
|
||||
|
||||
import TabbarCom from "@/componments/TabbarCom";
|
||||
import QrCode from "@/componments/QrCode";
|
||||
import Nomadbook from "@/pages/index/componments/Nomadbook";
|
||||
import JoinWechat from "@/pages/index/componments/JoinWechat";
|
||||
import RemoteJob from "@/pages/index/componments/RemoteJob";
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
// import beijing from "../../images/city/beijing.jpg";
|
||||
|
||||
export default function Index() {
|
||||
// 用户基本信息
|
||||
const [localuserInfo, setlocaluserInfo] = useState(null);
|
||||
const [userInfo, setuserInfo] = useState({
|
||||
wxid: null,
|
||||
openId: null,
|
||||
bighead: null,
|
||||
city: null,
|
||||
country: null,
|
||||
generator: null,
|
||||
id: null,
|
||||
labels: null,
|
||||
nickname: null,
|
||||
province: null,
|
||||
remark: null,
|
||||
sex: null, //男
|
||||
smallhead: null,
|
||||
source: null,
|
||||
sourceStr: null,
|
||||
usertype: null,
|
||||
v1: null,
|
||||
wxaccount: null,
|
||||
});
|
||||
const [isOpened, setisOpened] = useState(false);
|
||||
|
||||
useLoad(() => {
|
||||
console.log('Page loaded.')
|
||||
})
|
||||
console.log("Page loaded.");
|
||||
});
|
||||
|
||||
// 获取用户标识符
|
||||
useEffect(() => {
|
||||
// 获取路由参数
|
||||
const params = Taro.getCurrentInstance().router.params;
|
||||
console.log("params", params);
|
||||
// const [wxid, openId] = params;
|
||||
|
||||
// debug
|
||||
// params.wxid = "wxid_4413224132412";
|
||||
if (params?.wxid) {
|
||||
setuserInfo({
|
||||
wxid: params?.wxid, //个人号wxid
|
||||
});
|
||||
try {
|
||||
// 本地存储
|
||||
Taro.setStorageSync("wxid", params?.wxid ?? "");
|
||||
Taro.login({
|
||||
success: function (res) {
|
||||
if (res.code) {
|
||||
//发起网络请求
|
||||
Taro.request({
|
||||
// url: "http://127.0.0.1:28369/login",
|
||||
url: "https://kunpeng.hackrobot.cn/login",
|
||||
data: {
|
||||
code: res.code,
|
||||
wxid: params?.wxid ?? null, //debug eric 的wxid
|
||||
},
|
||||
success: function (resUser) {
|
||||
console.log(resUser);
|
||||
console.log(resUser.data);
|
||||
setuserInfo({ ...resUser.data });
|
||||
// 本地存储
|
||||
Taro.setStorage({
|
||||
key: "userInfo",
|
||||
data: resUser.data,
|
||||
});
|
||||
},
|
||||
});
|
||||
} else {
|
||||
console.log("登录失败!" + res.errMsg);
|
||||
}
|
||||
},
|
||||
});
|
||||
} catch (e) {}
|
||||
} else {
|
||||
try {
|
||||
let getuserInfo = Taro.getStorageSync("userInfo");
|
||||
if (getuserInfo) {
|
||||
setuserInfo(getuserInfo);
|
||||
console.log("本地用户信息存在");
|
||||
} else {
|
||||
console.log("本地用户信息,不存在");
|
||||
}
|
||||
} catch (e) {
|
||||
console.log("error", e);
|
||||
}
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
// 更新分享-minipro
|
||||
Taro.updateShareMenu({
|
||||
withShareTicket: true,
|
||||
success() {},
|
||||
});
|
||||
|
||||
// 显示分享按钮-minipro
|
||||
Taro.showShareMenu({
|
||||
withShareTicket: true,
|
||||
// showShareItems:true,
|
||||
});
|
||||
|
||||
// 打开分享图片弹窗,可以将图片发送给朋友、收藏或下载
|
||||
// Taro.downloadFile({
|
||||
// url: "https://res.wx.qq.com/wxdoc/dist/assets/img/demo.ef5c5bef.jpg",
|
||||
// success: (res) => {
|
||||
// Taro.showShareImageMenu({
|
||||
// path: res.tempFilePath,
|
||||
// });
|
||||
// },
|
||||
// });
|
||||
}, []);
|
||||
|
||||
const HomeCardItem = () => {
|
||||
return [
|
||||
{
|
||||
cityName: "北京",
|
||||
imagePath: beijing,
|
||||
isCustom: false,
|
||||
customCom: "test",
|
||||
},
|
||||
// 双数插入
|
||||
|
||||
{
|
||||
cityName: "nomad书籍",
|
||||
imagePath: shanghai,
|
||||
isCustom: true,
|
||||
customCom: <Nomadbook />,
|
||||
},
|
||||
{
|
||||
cityName: "上海",
|
||||
imagePath: shanghai,
|
||||
isCustom: false,
|
||||
customCom: "test",
|
||||
},
|
||||
{
|
||||
cityName: "加入微信群",
|
||||
imagePath: shanghai,
|
||||
isCustom: true,
|
||||
customCom: <RemoteJob />,
|
||||
},
|
||||
{
|
||||
cityName: "广州",
|
||||
imagePath: guangzhou,
|
||||
isCustom: false,
|
||||
customCom: "test",
|
||||
},
|
||||
{
|
||||
cityName: "RemoteJob",
|
||||
imagePath: shanghai,
|
||||
isCustom: true,
|
||||
customCom: <JoinWechat />,
|
||||
},
|
||||
{
|
||||
cityName: "深圳",
|
||||
imagePath: shenzhen,
|
||||
isCustom: false,
|
||||
customCom: "test",
|
||||
},
|
||||
// {
|
||||
// cityName: "腾讯云推广",
|
||||
// imagePath: shanghai,
|
||||
// isCustom: true,
|
||||
// customCom: <JoinWechat />,
|
||||
// },
|
||||
{
|
||||
cityName: "武汉",
|
||||
imagePath: wuhan,
|
||||
isCustom: false,
|
||||
customCom: "test",
|
||||
},
|
||||
{
|
||||
cityName: "杭州",
|
||||
imagePath: hangzhou,
|
||||
isCustom: false,
|
||||
customCom: "test",
|
||||
},
|
||||
].map((item, index) => {
|
||||
return (
|
||||
// 设置自动换行
|
||||
<View
|
||||
style={{ marginRight: index % 2 != 1 ? "10px" : "0px" }}
|
||||
className="homeCardItem"
|
||||
>
|
||||
{!item.isCustom ? (
|
||||
<View className="homeCard">
|
||||
<View className="CityName"> {item.cityName}</View>
|
||||
{/* 城市封面图片 */}
|
||||
<Image
|
||||
style={{
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
background: " #fff",
|
||||
borderRadius: "10px",
|
||||
}}
|
||||
mode="scaleToFill"
|
||||
src={item.imagePath}
|
||||
/>
|
||||
</View>
|
||||
) : (
|
||||
item.customCom
|
||||
)}
|
||||
</View>
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
const ProvinceTag = () => {
|
||||
|
||||
return ["北京", "上海", "广东", "浙江", "湖北", "云南"].map(
|
||||
(item, index) => {
|
||||
return (
|
||||
<View className="Tags">
|
||||
<AtTag
|
||||
className="AtTag"
|
||||
onClick={() => {
|
||||
//pass
|
||||
}}
|
||||
type="primary"
|
||||
circle
|
||||
>
|
||||
{item}
|
||||
</AtTag>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<View className='index'>
|
||||
<Text>Hello world!</Text>
|
||||
<View className="index">
|
||||
<View className="indexHome">
|
||||
{/* 顶部 */}
|
||||
{/* {userInfo?.smallhead ? ( */}
|
||||
{true? (
|
||||
|
||||
<View className="indexHeader">
|
||||
{/* 头像 */}
|
||||
<AtAvatar circle image={userInfo?.smallhead ?? touxiang}></AtAvatar>
|
||||
{/* color="#F00" */}
|
||||
<AtIcon value="chevron-down" size="30"></AtIcon>
|
||||
</View>
|
||||
)
|
||||
) : null}
|
||||
|
||||
{/* 省份标签 */}
|
||||
<View className="provinceTag">
|
||||
<ProvinceTag />
|
||||
</View>
|
||||
|
||||
{/* 城市列表 */}
|
||||
<View className="homeCards">
|
||||
<HomeCardItem />
|
||||
</View>
|
||||
|
||||
<View className="tabbbarDiv"></View>
|
||||
</View>
|
||||
{/* 底部tabbar */}
|
||||
|
||||
<TabbarCom active={0} />
|
||||
<QrCode isOpened={isOpened} setisOpened={setisOpened} />
|
||||
<AtMessage />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
.index {
|
||||
.indexHome {
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
// background-color: aquamarine;
|
||||
.indexHeader {
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
// justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.provinceTag {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
// justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
flex-wrap: wrap;
|
||||
// background-color: red;
|
||||
.Tags {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
// background-color: yellow;
|
||||
.AtTag {
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.homeCards {
|
||||
display: flex;
|
||||
// flex-direction: column;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.Nomadbook {
|
||||
padding: 10px;
|
||||
font-size: 25px;
|
||||
width: 320px;
|
||||
height: 230px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
// justify-content: center;
|
||||
// background-color: red;
|
||||
border-radius: 20px;
|
||||
border: solid 1px #8c8c8c;
|
||||
}
|
||||
|
||||
.homeCardItem {
|
||||
margin-top: 10px;
|
||||
width: 340px;
|
||||
height: 250px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
// background-color: aqua;
|
||||
// justify-content: space-between;
|
||||
// align-items: center;
|
||||
.homeCard {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
// background-color: yellow;
|
||||
border-radius: 20px;
|
||||
// margin-left:20px;
|
||||
position: relative;
|
||||
|
||||
.CityName {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: absolute;
|
||||
color: #fff;
|
||||
font-size: 40px;
|
||||
// z-index: 99;
|
||||
}
|
||||
Image {
|
||||
// position: absolute;
|
||||
z-index: -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
.homeCardDiv {
|
||||
width: 30px;
|
||||
height: 100%;
|
||||
// background-color: blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tabbbarDiv {
|
||||
width: 100%;
|
||||
height: 140px;
|
||||
// background-color: red;
|
||||
}
|
||||
|
||||
.tabbbar {
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
3
src/pages/my/componments/Log/index.config.js
Normal file
@@ -0,0 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '更新日志'
|
||||
})
|
||||
53
src/pages/my/componments/Log/index.jsx
Normal file
@@ -0,0 +1,53 @@
|
||||
import { View, Text, Image, Button, Icon } from "@tarojs/components";
|
||||
import { useLoad } from "@tarojs/taro";
|
||||
import Taro from "@tarojs/taro";
|
||||
import {
|
||||
AtAvatar,
|
||||
AtTag,
|
||||
AtIcon,
|
||||
AtTabBar,
|
||||
AtButton,
|
||||
AtAccordion,
|
||||
AtList,
|
||||
AtListItem,
|
||||
AtTimeline,
|
||||
} from "taro-ui";
|
||||
import "./index.scss";
|
||||
import beijing from "@/images/city/beijing.jpg";
|
||||
import guangzhou from "@/images/city/guangzhou.jpg";
|
||||
import shanghai from "@/images/city/shanghai.jpg";
|
||||
import shenzhen from "@/images/city/shenzhen.jpg";
|
||||
import touxiang from "@/images/index/touxiang.jpg";
|
||||
import TabbarCom from "@/componments/TabbarCom";
|
||||
import { useEffect, useState } from "react";
|
||||
const Log = () => {
|
||||
const [open, setopen] = useState(false);
|
||||
|
||||
return (
|
||||
<View className="Log">
|
||||
<AtTimeline
|
||||
pending
|
||||
items={[
|
||||
{
|
||||
title: "2024年4月07日",
|
||||
content: ["1.新增图书列表页", "2.半屏小程序申请"],
|
||||
icon: "clock",
|
||||
},
|
||||
{
|
||||
title: "2024年3月24日",
|
||||
content: ["1.新增欢迎页", "2.默认用户头像显示"],
|
||||
icon: "clock",
|
||||
},
|
||||
{
|
||||
title: "2024年3月22日",
|
||||
content: ["1.新增我的-更新日志页面", "2.修复bug"],
|
||||
icon: "clock",
|
||||
},
|
||||
{ title: "2024年3月20日", content: ["1.立项小程序 ","2.上线第1版:静态首页+我的 页面"], icon: "clock" },
|
||||
]}
|
||||
></AtTimeline>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default Log;
|
||||
3
src/pages/my/componments/Log/index.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
.Log{
|
||||
padding: 20px;
|
||||
}
|
||||
3
src/pages/my/componments/Quesion/index.config.js
Normal file
@@ -0,0 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '常见问题'
|
||||
})
|
||||
64
src/pages/my/componments/Quesion/index.jsx
Normal file
@@ -0,0 +1,64 @@
|
||||
import { View, Text, Image, Button, Icon } from "@tarojs/components";
|
||||
import { useLoad } from "@tarojs/taro";
|
||||
import Taro from "@tarojs/taro";
|
||||
import {
|
||||
AtAvatar,
|
||||
AtTag,
|
||||
AtIcon,
|
||||
AtTabBar,
|
||||
AtButton,
|
||||
AtAccordion,
|
||||
AtList,
|
||||
AtListItem,
|
||||
} from "taro-ui";
|
||||
import "./index.scss";
|
||||
import beijing from "@/images/city/beijing.jpg";
|
||||
import guangzhou from "@/images/city/guangzhou.jpg";
|
||||
import shanghai from "@/images/city/shanghai.jpg";
|
||||
import shenzhen from "@/images/city/shenzhen.jpg";
|
||||
import touxiang from "@/images/index/touxiang.jpg";
|
||||
import TabbarCom from "@/componments/TabbarCom";
|
||||
import { useEffect, useState } from "react";
|
||||
import _ from 'lodash';
|
||||
|
||||
|
||||
const Quesion = () => {
|
||||
const [open, setopen] = useState(false);
|
||||
const [AccordionArr, setAccordionArr] = useState([
|
||||
{
|
||||
title: "常见问题一",
|
||||
answer: "这是文本段落。这是文本段落。",
|
||||
open: false,
|
||||
},
|
||||
{
|
||||
title: "常见问题二",
|
||||
answer: "这是文本段落2。这是文本段落2。",
|
||||
open: false,
|
||||
},
|
||||
]);
|
||||
|
||||
return (
|
||||
<View className="Quesion">
|
||||
{AccordionArr.map((item, index) => {
|
||||
return (
|
||||
<AtAccordion
|
||||
open={item?.open}
|
||||
onClick={() => {
|
||||
// setopen(!item?.open);
|
||||
AccordionArr[index].open = !AccordionArr[index].open;
|
||||
console.log("AccordionArr", AccordionArr);
|
||||
// 深拷贝
|
||||
let newAccordionArr = _.cloneDeep(AccordionArr)
|
||||
setAccordionArr((newAccordionArr) );
|
||||
}}
|
||||
title={item?.title}
|
||||
>
|
||||
<View className="at-article__p">{item?.answer}</View>
|
||||
</AtAccordion>
|
||||
);
|
||||
})}
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default Quesion;
|
||||
0
src/pages/my/componments/Quesion/index.scss
Normal file
3
src/pages/my/index.config.js
Normal file
@@ -0,0 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '个人中心'
|
||||
})
|
||||
109
src/pages/my/index.jsx
Normal file
@@ -0,0 +1,109 @@
|
||||
import { View, Text, Image, Button, Icon } from "@tarojs/components";
|
||||
import { useLoad } from "@tarojs/taro";
|
||||
import Taro from "@tarojs/taro";
|
||||
import {
|
||||
AtAvatar,
|
||||
AtTag,
|
||||
AtIcon,
|
||||
AtTabBar,
|
||||
AtButton,
|
||||
AtAccordion,
|
||||
AtList,
|
||||
AtListItem,
|
||||
} from "taro-ui";
|
||||
import "./index.scss";
|
||||
import beijing from "@/images/city/beijing.jpg";
|
||||
import guangzhou from "@/images/city/guangzhou.jpg";
|
||||
import shanghai from "@/images/city/shanghai.jpg";
|
||||
import shenzhen from "@/images/city/shenzhen.jpg";
|
||||
import touxiang from "@/images/index/touxiang.jpg";
|
||||
import TabbarCom from "@/componments/TabbarCom";
|
||||
import { useEffect, useState } from "react";
|
||||
const my = () => {
|
||||
const [open, setopen] = useState(false);
|
||||
const [localuserInfo, setlocaluserInfo] = useState(
|
||||
Taro.getStorageSync("userInfo")
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
// 获取路由参数
|
||||
const params = Taro.getCurrentInstance().router.params;
|
||||
console.log("params", params);
|
||||
}, []);
|
||||
|
||||
const handleClick = (value) => {
|
||||
setopen(true);
|
||||
};
|
||||
return (
|
||||
<View className="my">
|
||||
<View className="myContent">
|
||||
<View className="myHeader">
|
||||
{/* 头像 */}
|
||||
<AtAvatar
|
||||
circle
|
||||
image={localuserInfo?.smallhead ?? touxiang}
|
||||
></AtAvatar>
|
||||
<View>
|
||||
<AtTag size="small">
|
||||
{localuserInfo?.nickname ?? "星球新居民"}
|
||||
</AtTag>
|
||||
{/* <AtTag size="small">女</AtTag> */}
|
||||
</View>
|
||||
</View>
|
||||
|
||||
{/* 列表 */}
|
||||
<View className="mylist">
|
||||
{/* <AtListItem
|
||||
title="我参加的"
|
||||
arrow="right"
|
||||
thumb="https://img12.360buyimg.com/jdphoto/s72x72_jfs/t6160/14/2008729947/2754/7d512a86/595c3aeeNa89ddf71.png"
|
||||
/> */}
|
||||
<AtListItem
|
||||
title="更新日志"
|
||||
// note="描述信息"
|
||||
arrow="right"
|
||||
thumb="http://img10.360buyimg.com/jdphoto/s72x72_jfs/t5872/209/5240187906/2872/8fa98cd/595c3b2aN4155b931.png"
|
||||
onClick={() => {
|
||||
// 跳转到目的页面,打开新页面
|
||||
Taro.navigateTo({
|
||||
url: "/pages/my/componments/Log/index",
|
||||
});
|
||||
}}
|
||||
/>
|
||||
<AtListItem
|
||||
title="常见问题"
|
||||
// note="描述信息"
|
||||
// extraText="详细信息"
|
||||
arrow="right"
|
||||
thumb="http://img12.360buyimg.com/jdphoto/s72x72_jfs/t10660/330/203667368/1672/801735d7/59c85643N31e68303.png"
|
||||
onClick={() => {
|
||||
// 跳转到目的页面,打开新页面
|
||||
Taro.navigateTo({
|
||||
url: "/pages/my/componments/Quesion/index",
|
||||
});
|
||||
}}
|
||||
/>
|
||||
{/* <AtListItem
|
||||
title="联系客服"
|
||||
// note="描述信息"
|
||||
// extraText="详细信息"
|
||||
arrow="right"
|
||||
thumb="http://img12.360buyimg.com/jdphoto/s72x72_jfs/t10660/330/203667368/1672/801735d7/59c85643N31e68303.png"
|
||||
/> */}
|
||||
</View>
|
||||
|
||||
{/* 个人客服 */}
|
||||
{/* <View className="wechat">
|
||||
<Button open-type="contact" className="wecahtBtn">
|
||||
联系客服
|
||||
</Button>
|
||||
</View> */}
|
||||
</View>
|
||||
|
||||
{/* 底部tabbar */}
|
||||
<TabbarCom active={1} />
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default my;
|
||||
49
src/pages/my/index.scss
Normal file
@@ -0,0 +1,49 @@
|
||||
.my {
|
||||
.myContent {
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
.myHeader {
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #f4ffb8;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.mylist {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.wechat {
|
||||
padding-left: 35px;
|
||||
padding-right: 35px;
|
||||
// background-color: yellow;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
// justify-content: center;
|
||||
.wecahtBtn {
|
||||
width: 100%;
|
||||
// background-color: aqua;
|
||||
.van-button__text {
|
||||
position: relative;
|
||||
left: -245px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.tabbbarDiv {
|
||||
width: 100%;
|
||||
height: 140px;
|
||||
// background-color: red;
|
||||
}
|
||||
|
||||
.tabbbar {
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||