33 Commits

Author SHA1 Message Date
hackrobot
b419c0f504 chore: 编译优化:2M限制 2024-03-22 17:45:53 +08:00
hackrobot
1a08981f1b feat: 我的页面-时间轴 2024-03-22 17:34:25 +08:00
hackrobot
07c9b2253c feat: 新增更新日志页面 2024-03-22 17:29:33 +08:00
hackrobot
d84e0f7e34 fix: z-index设置问题 2024-03-21 18:44:49 +08:00
hackrobot
231d07a6c2 feat: 首页图片文字 2024-03-21 09:58:14 +08:00
hackrobot
d85e8ce305 feat: 首页-自定义组件=>子组件拆分 2024-03-21 09:39:16 +08:00
hackrobot
9691761856 feat: 增加图书模块 2024-03-21 09:30:22 +08:00
hackrobot
a637369209 chore: 更新readme 2024-03-21 08:52:44 +08:00
hackrobot
ed11d780dd debug: 删除wxid=toast调试代码 2024-03-21 08:47:24 +08:00
hackrobot
c1e414bdd8 feat: 获取路由参数 2024-03-20 08:50:56 +08:00
hackrobot
cf671a6388 feat: 幕帘-二维码加好友 2024-03-20 00:20:55 +08:00
hackrobot
0335e02af9 feat:加入微信群 2024-03-19 23:47:36 +08:00
hackrobot
f2f8056544 feat: 优化代码 2024-03-19 21:27:20 +08:00
hackrobot
448db40b87 底部tabbar子组件 2024-03-19 21:21:18 +08:00
hackrobot
24f980c35b feat: 新建utils文件夹 2024-03-19 20:25:27 +08:00
hackrobot
672f788e26 feat: 新增列表 2024-03-19 20:07:31 +08:00
hackrobot
719d78d17c feat: 我的-页面header 2024-03-19 19:56:41 +08:00
hackrobot
0b4be1572d feat: 新增我的页面,以及tabbar跳转 2024-03-19 19:50:12 +08:00
hackrobot
f96694adb2 feat: 新建componments文件夹 2024-03-19 19:39:50 +08:00
hackrobot
f75a861cc1 style: 调整css布局/央视 2024-03-19 17:38:39 +08:00
hackrobot
8ed540c39b feat: 城市方块自动换行 2024-03-19 17:23:28 +08:00
hackrobot
73d3a3a166 faeat:fastapi本地网络请求调试 2024-03-19 16:58:21 +08:00
hackrobot
8b6683ee24 feat: 新增城市图片 2024-03-19 16:18:06 +08:00
hackrobot
a1e7951e02 chore: 修改appid 2024-03-19 15:39:29 +08:00
hackrobot
220ababca0 debug: 屏蔽分享海报 2024-03-19 14:53:46 +08:00
hackrobot
8eacec835c feat: 设置分享转发 2024-03-19 14:52:06 +08:00
hackrobot
0084774d48 feat: 单页面组件拆分 2024-03-19 14:31:04 +08:00
hackrobot
17271424ca feat: 设置tabbar 2024-03-19 14:28:06 +08:00
hackrobot
ac8dec875e feat: 设置alias别名@=>src, 以及城市图片展示 2024-03-19 14:20:55 +08:00
hackrobot
dfbbe38bfc feat: 首页header和城市列表 2024-03-19 13:54:16 +08:00
hackrobot
200ac7c3dd feat: 引入taro-ui组件库 2024-03-19 13:00:58 +08:00
hackrobot
b9913cadd9 feat安装项目依赖 2024-03-19 12:52:39 +08:00
hackrobot
b3cc0176a5 feat:设置appid 2024-03-19 12:46:00 +08:00
52 changed files with 49037 additions and 44 deletions

211
README.html Normal file
View 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>

View File

@@ -1,18 +1,24 @@
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',
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 +58,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

File diff suppressed because it is too large Load Diff

View File

@@ -42,45 +42,46 @@
"@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",
"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"
}
}

View File

@@ -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
"minified": false,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
}
},
"compileType": "miniprogram"
}
"compileType": "miniprogram",
"libVersion": "3.3.4",
"srcMiniprogramRoot": "dist/",
"packOptions": {
"ignore": [],
"include": []
},
"condition": {},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
}
}

View File

@@ -0,0 +1,7 @@
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "yidooplanet",
"setting": {
"compileHotReLoad": true
}
}

View File

@@ -1,7 +1,7 @@
{
"miniprogramRoot": "./",
"projectname": "yidooplanet",
"appid": "testAppId",
"appid": "wxa55815dd741a540d",
"setting": {
"es6": false,
"minified": false

View File

@@ -1,11 +1,24 @@
export default defineAppConfig({
pages: [
'pages/index/index'
'pages/index/index',
'pages/my/index',
'pages/my/componments/Log/index',
],
permission: {
"scope.userLocation": {
desc: "你的位置信息将用于小程序位置接口的效果展示", // 高速公路行驶持续后台定位
},
},
requiredPrivateInfos: ["getLocation", "chooseLocation",'chooseAddress'],
window: {
backgroundTextStyle: 'light',
navigationBarBackgroundColor: '#fff',
navigationBarTitleText: 'WeChat',
navigationBarTextStyle: 'black'
},
// 设置后,空对象代表可以使用小程序原生组件
usingComponents: {
}
})

View File

@@ -1,6 +1,7 @@
import { useLaunch } from '@tarojs/taro'
import './app.scss'
import 'taro-ui/dist/style/index.scss' // 全局引入一次即可
function App({ children }) {

View File

@@ -0,0 +1 @@
@import "~taro-ui/dist/style/index.scss"; // 引入组件样式 - 方式二

View File

@@ -0,0 +1,3 @@
export default definePageConfig({
navigationBarTitleText: '导航栏'
})

View 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;

View File

View File

@@ -0,0 +1,83 @@
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 QRcodePng 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={QRcodePng}
// 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;

View 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;
}
}

View File

@@ -0,0 +1,35 @@
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: "camera" },
{ title: "我的", iconType: "user" }, //, text: "100", max: 99
]}
onClick={(current) => {
setActive(current);
if (current === 0) {
Taro.redirectTo({
url: "/pages/index/index",
});
} else {
Taro.redirectTo({
url: "/pages/my/index",
});
}
}}
current={active}
/>
</View>
);
};
export default TabbarCom;

View File

@@ -0,0 +1,11 @@
.tabbbarDiv {
width: 100%;
height: 140px;
// background-color: red;
}
.tabbbar {
position: fixed;
bottom: 0px;
width: 100%;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
src/images/book/dangan.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
src/images/book/fuye.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
src/images/book/hours.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

BIN
src/images/book/poquan.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
src/images/book/rework.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
src/images/city/beijing.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
src/images/city/wuhan.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
src/images/index/QRcode.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

BIN
src/images/meetup/a1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
src/images/meetup/a2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
src/images/meetup/a3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
src/images/meetup/a4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 KiB

BIN
src/images/meetup/a5.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
src/images/meetup/a6.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@@ -0,0 +1,70 @@
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);
return (
<View
className="JoinWechat"
onClick={() => {
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;

View 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;
}
}
}

View File

@@ -0,0 +1,59 @@
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">
<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;

View 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;
}
}
}

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: '首页'
navigationBarTitleText: '数字游民的星球'
})

View File

@@ -1,16 +1,238 @@
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 { useEffect, useState } from "react";
// import beijing from "../../images/city/beijing.jpg";
export default function Index() {
// 用户基本信息
const [userInfo, setuserInfo] = useState({
wxid: null,
openId: 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;
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,
});
// 打开分享图片弹窗,可以将图片发送给朋友、收藏或下载
// 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: <JoinWechat />,
},
{
cityName: "广州",
imagePath: guangzhou,
isCustom: false,
customCom: "test",
},
// {
// cityName: "上海",
// 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>
<AtTag
onClick={() => {
Taro.redirectTo({
url: "/pages/index/index?wxid=1111111",
});
}}
type="primary"
circle
>
{item}
</AtTag>
</View>
);
});
};
return (
<View className='index'>
<Text>Hello world!</Text>
<View className="index">
<View className="indexHome">
{/* 顶部 */}
<View className="indexHeader">
{/* 头像 */}
<AtAvatar circle image={touxiang}></AtAvatar>
{/* color="#F00" */}
<AtIcon value="chevron-down" size="30"></AtIcon>
</View>
{/* 省份标签 */}
<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>
)
);
}

View File

@@ -0,0 +1,97 @@
.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-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%;
}
}

View File

@@ -0,0 +1,3 @@
export default definePageConfig({
navigationBarTitleText: '更新日志'
})

View File

@@ -0,0 +1,43 @@
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年3月22日",
content: ["1.新增我的-更新日志页面", "2.修复bug"],
icon: "clock",
},
{ title: "2024年3月20日", content: ["1.立项小程序 ","2.上线第1版:静态首页+我的 页面"], icon: "clock" },
]}
></AtTimeline>
</View>
);
};
export default Log;

View File

@@ -0,0 +1,3 @@
.Log{
padding: 20px;
}

View File

@@ -0,0 +1,3 @@
export default definePageConfig({
navigationBarTitleText: '个人中心'
})

88
src/pages/my/index.jsx Normal file
View File

@@ -0,0 +1,88 @@
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);
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={touxiang}></AtAvatar>
<View>
<AtTag size="small">星球新居民</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"
/>
</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
View 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%;
}
}

0
src/utils/index.js Normal file
View File

16686
yarn.lock Normal file

File diff suppressed because it is too large Load Diff