diff --git a/src/pages/index/components/ApproveCard.less b/src/pages/index/components/ApproveCard.less
deleted file mode 100644
index cd055cba7820c6a2c1bfbbe091a5bb131e5e2cb5..0000000000000000000000000000000000000000
--- a/src/pages/index/components/ApproveCard.less
+++ /dev/null
@@ -1,27 +0,0 @@
-.projectItemCard {
- height: 120px;
- background: #eaeef7;
- border-radius: 20px;
- margin-bottom: 30px;
- display: flex;
- align-items: center;
- padding: 0 36px;
- justify-content: space-between;
- cursor: pointer;
-}
-
-.projectItemCard-content {
- display: flex;
- gap: 24px;
- align-items: center;
-}
-
-.projectItemCard-content-icon {
- width: 50px;
- height: 50px;
-}
-
-.projectItemCard-right-icon {
- width: 80px;
- height: 80px;
-}
diff --git a/src/pages/index/components/ApproveCard.tsx b/src/pages/index/components/ApproveCard.tsx
deleted file mode 100644
index ea1ffc99ffdbf065586a25fd7728cf0cdf0219fd..0000000000000000000000000000000000000000
--- a/src/pages/index/components/ApproveCard.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-import { View, Image } from "@tarojs/components";
-import "./ApproveCard.less";
-import icon11 from "@/assets/icon/icon11.png";
-import { composeImgUrl } from "@/utils";
-
-interface PropsTypes {
- dataSource: {
- id: string;
- thingName: string;
- icon: string;
- };
- onclick(): void;
-}
-export default function (props: PropsTypes) {
- const { dataSource, onclick } = props;
-
- return (
-
-
-
- {dataSource.thingName}
-
-
-
- );
-}
diff --git a/src/pages/index/index.config.ts b/src/pages/index/index.config.ts
deleted file mode 100644
index bb3d03451b874be00599026f7e7890baeaa550f1..0000000000000000000000000000000000000000
--- a/src/pages/index/index.config.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export default definePageConfig({
- navigationBarTitleText: "市民之声",
-});
diff --git a/src/pages/index/index.less b/src/pages/index/index.less
deleted file mode 100644
index 8cfa8adbd92985211a1597b116528cd58f88bab7..0000000000000000000000000000000000000000
--- a/src/pages/index/index.less
+++ /dev/null
@@ -1,119 +0,0 @@
-.container {
- width: 100%;
- height: 100%;
-
- .scrollView {
- height: 100%;
- }
-
- .scroll_content {
- padding: 24px;
- box-sizing: border-box;
- }
- .subTitle {
- font-weight: 500;
- font-size: 33px;
- color: #999999;
- text-align: center;
- margin-top: 60px;
- margin-bottom: 32px;
- }
-
- .menu {
- display: flex;
- justify-content: space-between;
- }
-
- .menu-item-icon {
- width: 96px;
- height: 96px;
- }
-
- .menu-item {
- text-align: center;
- }
-
- .menu-item-text {
- font-weight: 500;
- font-size: 27px;
- color: #333333;
- }
-
- .kitchenWaste {
- background-image: url("../../assets//bg//bg4.png");
- background-size: 100% 100%;
- height: 130px;
- // width: 320px;
- padding: 36px;
- box-sizing: border-box;
- color: #fff;
- // margin: 0 auto;
- }
-
- .sspWrap {
- margin-top: 36px;
- color: #ffffff;
-
- .sspWrap_title {
- font-weight: 500;
- font-size: 33rpx;
- }
- }
-
- .bmWrap {
- margin-top: 36px;
- color: #ffffff;
- }
-
- .bmWrap-leftCard {
- background-image: url("../../assets/bg//bg8.png");
- background-size: 100% 100%;
- display: flex;
- height: 150px;
- align-items: center;
- justify-content: center;
- box-sizing: border-box;
- }
-
- .bmWrap-centerCard {
- background-image: url("../../assets/bg//bg10.png");
- background-size: 100% 100%;
- display: flex;
- height: 150px;
- align-items: center;
- justify-content: center;
- box-sizing: border-box;
- }
-
- .bmWrap-rightCard {
- background-image: url("../../assets/bg//bg9.png");
- background-size: 100% 100%;
- display: flex;
- height: 150px;
- align-items: center;
- justify-content: center;
- box-sizing: border-box;
- }
-
- .sspWrap-leftCard {
- height: 150px;
- background-image: url("../../assets/bg//bg7.png");
- background-size: 100% 100%;
- padding: 36px;
- box-sizing: border-box;
- }
-
- .sspWrap-rightCard {
- height: 150px;
- background-image: url("../../assets/bg//bg6.png");
- background-size: 100% 100%;
- padding: 36px;
- box-sizing: border-box;
- }
-
- .sspWrap_desc {
- font-weight: 500;
- font-size: 24px;
- color: #ffffff;
- }
-}
diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx
deleted file mode 100644
index 1e3b797083f59691c945033a7df142a0369f1d3d..0000000000000000000000000000000000000000
--- a/src/pages/index/index.tsx
+++ /dev/null
@@ -1,277 +0,0 @@
-import { View, Image, ScrollView } from "@tarojs/components";
-import Taro, { useDidShow, useLoad } from "@tarojs/taro";
-import "./index.less";
-import Login from "./Login";
-import useGlobalStore from "@/store";
-import icon5 from "@/assets/icon/icon5.png";
-import icon6 from "@/assets/icon/icon6.png";
-import icon7 from "@/assets/icon/icon7.png";
-import icon8 from "@/assets/icon/icon8.png";
-import { useEffect, useState } from "react";
-import services from "@/services";
-import ApproveCard from "./components/ApproveCard";
-import { Flex } from "@taroify/core";
-import PopupComp from "./components/PopupComp";
-import LiftFinger from "./components/LiftFinger";
-
-import TakePhoto from "./components/TakePhoto";
-import useReportStore, { DiscoverEntryDto } from "@/store/report";
-
-export default function Index() {
- const {
- updateUserInfo,
- isAuth,
- userInfo,
- queryMainBodyInfo,
- queryAuthenticationInfo,
- } = useGlobalStore();
- const { clearStore } = useReportStore();
- const [eventEntryModal, setEventEntryModal] = useState<{
- open: boolean;
- type?: DiscoverEntryDto;
- }>({
- open: false,
- }); //事件入口
- const [projectList, setProjectList] = useState<
- {
- id: string;
- thingName: string;
- icon: string;
- }[]
- >([]);
- /** 页面初始化 */
- const init = () => {
- updateUserInfo();
- services.approve.queryProjectList().then((res) => {
- if (res.code === 200) {
- setProjectList(res.data.list);
- }
- });
- queryAuthenticationInfo();
- };
-
- useDidShow(() => {
- init();
- });
-
- useEffect(() => {
- if (isAuth) {
- /** 获取用户主体信息 */
- queryMainBodyInfo(userInfo?.mobile);
- }
- }, [isAuth]);
-
- const menu = [
- {
- icon: icon5,
- name: "建议",
- },
- {
- icon: icon6,
- name: "咨询",
- },
- {
- icon: icon7,
- name: "投诉",
- },
- {
- icon: icon8,
- name: "举报",
- },
- ];
-
- const menuClick = ({ name }: (typeof menu)[number]) => {
- Taro.navigateTo({ url: "/pages/Feedback/Report/index?type=" + name });
- };
-
- const ApplyHandler = (id: string) => {
- if (!userInfo?.id) {
- Taro.showToast({
- title: "请先登录",
- icon: "none",
- });
- return;
- }
- if (!isAuth) {
- Taro.showToast({
- title: "请先前往个人中心进行认证",
- icon: "none",
- });
- return;
- }
- Taro.navigateTo({
- url: `/pages/Approve/ApplyDesc/index?id=${id}`,
- });
- };
-
- //打开事件入口
- const handleOPenEventEntry = (type: DiscoverEntryDto) => {
- if (!userInfo?.id) {
- Taro.showToast({
- title: "请先登录",
- icon: "none",
- });
- return;
- }
- clearStore(); //清除仓库数据
- setEventEntryModal({ open: true, type });
- };
-
- return (
-
-
-
-
- 共建美丽新都
-
- {menu.map((item) => {
- return (
-
-
- {item.name}
-
- );
- })}
-
-
- handleOPenEventEntry("take")}>
-
- 随手拍
- 这里是1句话
-
-
- handleOPenEventEntry("liftFinger")}
- >
-
- 举手之劳
- 这里是1句话
-
-
-
- {/* 随手拍 */}
- setEventEntryModal({ open: false })}
- preTitle="城市问题"
- borderTitle="随手拍"
- >
-
-
-
- {/* 举手之劳 */}
- setEventEntryModal({ open: false })}
- borderColor="#FFAF3D"
- >
-
-
-
- 便民服务查询
-
-
-
- {
- if (userInfo?.id) {
- Taro.navigateTo({
- url: "/pages/CommonProblem/index",
- });
- } else {
- Taro.showToast({
- title: "请先登录",
- icon: "none",
- });
- }
- }}
- >
- 常见咨询
-
-
-
- {
- if (userInfo?.id) {
- Taro.navigateTo({
- url: "/pages/ServiceLocation/TypeList/index",
- });
- } else {
- Taro.showToast({
- title: "请先登录",
- icon: "none",
- });
- }
- }}
- >
- 办事地点
-
-
-
-
- {
- if (userInfo?.id) {
- Taro.navigateTo({
- url: "/pages/Law/index",
- });
- } else {
- Taro.showToast({
- title: "请先登录",
- icon: "none",
- });
- }
- }}
- >
- 政策法规
-
-
-
-
- 垃圾分类专区
-
- {
- if (!userInfo?.id) {
- Taro.showToast({
- title: "请先登录",
- icon: "none",
- });
- return;
- }
- Taro.navigateTo({
- url: "/pages/kitchenWaste/index",
- });
- }}
- >
- 餐厨垃圾收运
-
-
- 行政许可备案
-
-
- {projectList?.map((item) => {
- return (
-
- );
- })}
-
-
-
-
- );
-}
diff --git a/src/pages/index/login/index.less b/src/pages/index/login/index.less
deleted file mode 100644
index af7f93a31b71fed7ae7a9fdd298acdd0dbd260be..0000000000000000000000000000000000000000
--- a/src/pages/index/login/index.less
+++ /dev/null
@@ -1,52 +0,0 @@
-.topView {
- height: 280px;
- background-image: url("../../../assets/bg/bg.png");
- background-size: 100% 100%;
- padding: 60px 38px 0;
- box-sizing: border-box;
-
- .title {
- font-weight: 800;
- font-size: 37px;
- color: #ffffff;
- }
-
- .loginBtn {
- padding: 0 24px;
- display: inline-block;
- height: 51px;
- background: #84b8ff;
- border-radius: 25px;
- color: #fff;
- margin-top: 60px;
- }
-}
-
-.login-content {
- padding: 36px;
- box-sizing: border-box;
-
- .login-title {
- font-size: 37px;
- margin-bottom: 24px;
- }
-}
-
-.avatar-wrapper {
- padding: 0;
- box-sizing: border-box;
- position: relative;
- left: 50%;
- transform: translateX(-50%);
-
- .avatar {
- width: 96px;
- height: 96px;
- border-radius: 12px;
- }
-}
-
-.storeIcon {
- width: 37px;
- height: 37px;
-}
diff --git a/src/pages/index/login/index.tsx b/src/pages/index/login/index.tsx
deleted file mode 100644
index 5f140daf0119fa792c0026520bdac01f3aa3320c..0000000000000000000000000000000000000000
--- a/src/pages/index/login/index.tsx
+++ /dev/null
@@ -1,187 +0,0 @@
-import { View, Image, Input } from "@tarojs/components";
-import "./index.less";
-import { Button, Popup, Field, Flex } from "@taroify/core";
-import { useState } from "react";
-import icon from "../../../assets/icon/icon.png";
-import Taro from "@tarojs/taro";
-import services from "@/services";
-import useGlobalStore from "@/store";
-import api from "@/services/core/api";
-const defaultAvatarUrl =
- "https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0";
-
-const Login = () => {
- const [open, setOpen] = useState(false);
- const [avatarUrl, setAvatarUrl] = useState();
- const { userInfo, updateUserInfo, queryAuthenticationInfo } =
- useGlobalStore();
-
- const [nickName, setNickname] = useState("");
- // console.log(userInfo);
- const getRealtimePhoneNumber = (e: any) => {
- services.login
- .login(e.detail.code)
- .then((res) => {
- Taro.setStorageSync("token", res.data.access_token);
-
- if (res.code === 200) {
- if (res.data.user_info.nickname !== null) {
- Taro.showToast({
- title: "登录成功",
- });
- updateUserInfo();
- queryAuthenticationInfo();
- } else {
- setOpen(true);
- }
- }
- })
- .catch((e) => {
- console.log(e);
- Taro.showToast({
- title: "登录失败",
- });
- });
- };
-
- const onChooseAvatar = (e) => {
- const { avatarUrl } = e.detail;
- setAvatarUrl(avatarUrl);
- };
-
- const onSetInfo = () => {
- if (!avatarUrl || avatarUrl?.length == 0) {
- Taro.showToast({
- title: "请上传头像",
- icon: "error",
- });
- return;
- }
- if (nickName.length === 0) {
- Taro.showToast({
- title: "请输入昵称",
- icon: "error",
- });
- return;
- }
-
- Taro.uploadFile({
- url: api.uploadUrl, //仅为示例,非真实的接口地址
- filePath: avatarUrl,
- name: "file",
- success(res) {
- if (res.statusCode === 200) {
- const data = JSON.parse(res.data);
- services.login
- .updateUserInfo({
- avatar: data.data,
- nickname: nickName,
- })
- .then(() => {
- setTimeout(() => {
- updateUserInfo();
-
- setOpen(false);
- }, 100);
- });
- }
- },
- });
- };
-
- const onclickAction = () => {
- Taro.navigateTo({
- url: "/pages/User/index",
- });
- };
- console.log(nickName);
-
- return (
-
-
- {userInfo ? (
-
- {userInfo?.nickname}
-
-
- ) : (
- "市民登录,商户认证"
- )}
-
-
- {userInfo ? (
-
- ) : (
-
- )}
-
-
- {
- setOpen(false);
- Taro.removeStorageSync("token");
- }}
- placement="bottom"
- style={{ height: "50%" }}
- >
-
- 填写基本信息
-
- 初次登陆,需要设置基本信息以完成注册
-
-
-
-
- {
- setNickname(e.detail.value);
- }}
- />
-
-
-
-
-
-
- );
-};
-
-export default Login;
diff --git a/src/pages/user/index.config.ts b/src/pages/user/index.config.ts
deleted file mode 100644
index 13187afb7869c5669ff52798a5dbbf934244371c..0000000000000000000000000000000000000000
--- a/src/pages/user/index.config.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export default definePageConfig({
- navigationStyle: "custom",
-});
diff --git a/src/pages/user/index.less b/src/pages/user/index.less
deleted file mode 100644
index aa4bed16729e85eeea6e8fbf67e62c4ca1cabb09..0000000000000000000000000000000000000000
--- a/src/pages/user/index.less
+++ /dev/null
@@ -1,179 +0,0 @@
-.container {
- width: 100%;
- height: 100%;
- position: relative;
-
- .decoration {
- width: 100%;
- height: 590px;
- position: absolute;
- top: 0;
- background-image: url("../../assets/bg/bg1.png");
- background-size: 100% 100%;
- z-index: -1;
- }
-
- .userInfo {
- display: flex;
- flex-direction: column;
- align-items: center;
-
- .userTitle {
- font-weight: 800;
- font-size: 44px;
- color: #333333;
- margin-top: 30px;
- }
-
- .storeIcon {
- width: 37px;
- height: 37px;
- }
-
- .authenticationBtn {
- width: 173px;
- height: 48px;
- background: #ffffff;
- border-radius: 24px;
- font-weight: 500;
- margin-top: 22px;
- font-size: 28px;
- color: #4599f7;
-
- &:active {
- opacity: 0.6;
- }
- }
- }
-
- .listWrap {
- margin: 28px;
-
- .scorePoint_img {
- width: 40px;
- height: 40px;
- }
-
- .scorePoint_text {
- font-weight: 500;
- font-size: 32px;
- color: #dd6e21;
- }
-
- .scorePoint_num {
- font-weight: 800;
- font-size: 44px;
- color: #a65300;
- }
-
- .scorePoint_unit {
- font-weight: 500;
- font-size: 27px;
- color: #dd6e21;
- }
-
- .actionGroup {
- background: #ffffff;
- border-radius: 20rpx;
- border: 1px solid #f1f1f1;
- margin-top: 28px;
- padding: 6px 30px;
- box-sizing: border-box;
- }
-
- .actionGroup_cell {
- display: flex;
- justify-content: space-between;
- padding: 24px 0;
- cursor: pointer;
- }
-
- .actionGroup_cell-icon {
- width: 30px;
- height: 30px;
- }
- .actionGroup_cell-left {
- display: flex;
- align-items: center;
- gap: 28px;
- }
- .actionGroup_cell-title {
- font-weight: 500;
- font-size: 31px;
- color: #333333;
- }
-
- .actionGroup_cell-rightIcon {
- width: 46px;
- height: 46px;
- }
-
- .actionGroup_cell-right {
- display: flex;
- align-items: center;
- gap: 16px;
- }
-
- .actionGroup_cell-extra {
- font-weight: 500;
- font-size: 27px;
- color: #a2a2a2;
- }
- }
-
- .scorePoint_view {
- height: 112px;
- background-image: url("../../assets/bg/bg5.png");
- background-size: 100% 100%;
- display: flex;
- align-items: center;
- padding: 0 24px;
- gap: 16px;
- }
-}
-
-.popup-content {
- width: 100%;
- height: 100%;
- padding: 40px;
- box-sizing: border-box;
- background-color: #f4f5f6;
- background-image: url("../../assets/bg//bg3.png");
- background-size: 100% 100%;
-}
-
-.popup-content_title {
- font-weight: 800;
- font-size: 44px;
- color: #2a2d31;
- margin-bottom: 24px;
-}
-
-.popup-content_itemIcon {
- width: 37px;
- height: 37px;
- margin-right: 30px;
-}
-
-.popup-content_itemCard {
- display: flex;
- height: 124px;
- background: #fff;
- // margin-top: 24px;
- border-radius: 13px;
- border: 1px solid #f1f1f1;
- align-items: center;
- padding: 0 44px;
- font-weight: 500;
- font-size: 33px;
- margin-bottom: 24px;
- color: #2a2d31;
-
- &:active {
- opacity: 0.6;
- }
-}
-
-.popup-content_scrollView {
- height: 800px;
-}
diff --git a/src/pages/user/index.tsx b/src/pages/user/index.tsx
deleted file mode 100644
index 9adf147cddd91fc4e23d777e6d86edb89311a7c1..0000000000000000000000000000000000000000
--- a/src/pages/user/index.tsx
+++ /dev/null
@@ -1,276 +0,0 @@
-import { View, Image, ScrollView } from "@tarojs/components";
-import "./index.less";
-import {
- Avatar,
- ConfigProvider,
- Flex,
- Navbar,
- Popup,
- Space,
-} from "@taroify/core";
-import Taro, { useDidShow, useLoad } from "@tarojs/taro";
-import { useMemo, useState } from "react";
-import icon from "../../assets/icon/icon.png";
-import icon1 from "../../assets/icon/icon1.png";
-import icon16 from "../../assets/icon/icon16.png";
-import icon20 from "../../assets/icon/icon20.png";
-import icon18 from "../../assets/icon/icon18.png";
-import icon21 from "../../assets/icon/icon21.png";
-import icon26 from "../../assets/icon/icon26.png";
-import icon17 from "../../assets/icon/icon17.png";
-import icon27 from "../../assets/icon/icon27.png";
-import icon28 from "../../assets/icon/icon28.png";
-import icon29 from "../../assets/icon/icon29.png";
-
-import useGlobalStore from "@/store";
-import services from "@/services";
-import { composeImgUrl } from "@/utils";
-
-export default function Index() {
- const [statusBarHeight, setStatusBarHeight] = useState(0);
- const [open, setOpen] = useState(false);
- const { userInfo } = useGlobalStore();
- const [authenticationTypesList, setAuthenticationTypesList] = useState<
- API.TypeOfLegalPerson[]
- >([]);
- const { isAuth, queryAuthenticationInfo } = useGlobalStore();
- const [reportStatistics, setReportStatistics] =
- useState();
- useDidShow(() => {
- queryAuthenticationInfo();
- services.report.getPersonalCenterStatistics().then((res) => {
- if (res.code === 200) {
- setReportStatistics(res.data);
- }
- });
- });
- const onClick = () => {
- Taro.navigateBack();
- };
-
- useLoad(() => {
- const systemInfo = Taro.getSystemInfoSync();
- setStatusBarHeight(systemInfo?.statusBarHeight ?? 0);
- });
- const onAuthentication = (data: API.TypeOfLegalPerson) => {
- Taro.navigateTo({
- url: `/pages/Authentication/index?name=${data.name}&id=${data.id}`,
- }).then(() => {
- setOpen(false);
- });
- };
-
- /** 打开法人认证弹窗 */
- const openAuthenticationSelect = () => {
- if (isAuth) {
- return;
- }
- services.login.queryAuthenticationTypes().then((res) => {
- if (res.code !== 200) {
- Taro.showToast({
- title: "无法获取法人类型",
- icon: "none",
- });
- return;
- }
- setAuthenticationTypesList(res.data);
- setOpen(true);
- });
- };
-
- const actionMenus = useMemo(() => {
- const findNum = (type: number) =>
- reportStatistics?.find((item) => Number(item.type) === type)
- ?.processingNum ?? 0;
- return [
- [
- {
- icon: icon20,
- extra: findNum(2) + "个",
- actionName: "建议记录",
- enable: true,
- onTap: () => {
- Taro.navigateTo({
- url: "/pages/Feedback/Record/index?type=建议",
- });
- },
- },
- {
- icon: icon18,
- actionName: "投诉记录",
- enable: true,
- extra: findNum(1) + "个",
- onTap: () => {
- Taro.navigateTo({
- url: "/pages/Feedback/Record/index?type=投诉",
- });
- },
- },
-
- {
- icon: icon26,
- actionName: "咨询记录",
- enable: true,
- extra: findNum(3) + "个",
- onTap: () => {
- Taro.navigateTo({
- url: "/pages/Feedback/Record/index?type=咨询",
- });
- },
- },
- {
- icon: icon17,
- actionName: "举报记录",
- enable: true,
- extra: findNum(4) + "个",
- onTap: () => {
- Taro.navigateTo({
- url: "/pages/Feedback/Record/index?type=举报",
- });
- },
- },
- ],
- [
- {
- icon: icon27,
- extra: "",
- actionName: "随手拍",
- onTap: () => {
- Taro.navigateTo({
- url: "/pages/Event/index?type=take",
- });
- },
- },
- {
- icon: icon28,
- actionName: "举手之劳",
- onTap: () => {
- Taro.navigateTo({
- url: "/pages/Event/index?type=liftFinger",
- });
- },
- },
- ],
- [
- {
- icon: icon29,
- actionName: "店招设置审批",
- enable: false,
- },
- ],
- ];
- }, [reportStatistics]);
-
- return (
-
-
-
-
-
- 返回
-
-
- setOpen(false)}
- open={open}
- style={{ height: "60%" }}
- placement="bottom"
- >
-
- 认证
-
- {authenticationTypesList.map((item) => {
- return (
-
-
-
- {item.name}
-
-
- );
- })}
-
-
-
-
-
- {userInfo?.nickname}
-
-
-
- {isAuth ? "已认证" : "去认证"}
-
-
-
-
-
-
- 我的积分
- 100
- 分
-
- {actionMenus.map((_) => {
- return (
-
- {_.map((child) => {
- return (
- {
- if (!child.enable) {
- Taro.showToast({
- title: "功能暂未开放",
- icon: "none",
- });
- }
- child.onTap && child.onTap();
- }}
- >
-
-
-
- {child.actionName}
-
-
-
- {child.extra && (
-
- {child.extra}
-
- )}
-
-
-
- );
- })}
-
- );
- })}
-
-
- );
-}