= (params: T, options?: any) => Promise;
+
+interface UseRequestListProps {
+ action: Request
;
+ immediate?: boolean;
+ onOk?: () => void | boolean;
+ initFilterParams?: Partial
;
+ showMsg?: boolean;
+ options?: AxiosRequestConfig;
+ loop?: boolean;
+ interval?: number;
+ onLoop?: (data: any) => boolean;
+};
+
+
+function useRequestList
({
+ action,
+ immediate = true,
+ onOk,
+ initFilterParams,
+ showMsg = false,
+ options = {},
+ loop = false,
+ interval = 2000,
+ onLoop
+}: UseRequestListProps
) {
+ const [loading, updateLoading] = useState(false);
+ const filterParamsRef = useRef(initFilterParams);
+ const [data, updateData] = useState();
+
+ const timer = useRef(null);
+
+ const abortLoop = () => {
+ if (timer.current) {
+ clearInterval(timer.current);
+ timer.current = null;
+ }
+ };
+
+ const getDataTask = async (params: P, loading = true) => {
+ try {
+ loading && updateLoading(true);
+ const filterParams = filterParamsRef.current;
+ const queryParams = { ...filterParams, ...params };
+ const res = await action(queryParams, options);
+ filterParamsRef.current = queryParams;
+ updateData(res);
+ if (loop && onLoop?.(res)) {
+ timer.current = setTimeout(() => {
+ getDataTask(queryParams, loading);
+ }, interval);
+ }
+ else {
+ loading && updateLoading(false);
+ onOk?.();
+ return res;
+ }
+ }
+ catch (err) {
+ abortLoop();
+ showMsg && Toast.show({
+ icon: 'error',
+ content: `${err}`
+ });
+ }
+ finally {
+ loading && !loop && updateLoading(false);
+ }
+ };
+
+ useEffect(() => {
+ return abortLoop;
+ }, []);
+
+ useEffect(() => {
+ if (!immediate) {
+ return;
+ }
+ getDataTask({} as P);
+ }, []);
+
+ return {
+ getDataTask,
+ loading,
+ data,
+ filterParams: filterParamsRef.current,
+ abortLoop
+ };
+}
+
+export default useRequestList;
diff --git a/src/hooks/useRequestSubmit/index.ts b/src/hooks/useRequestSubmit/index.ts
new file mode 100644
index 0000000..6c7adac
--- /dev/null
+++ b/src/hooks/useRequestSubmit/index.ts
@@ -0,0 +1,50 @@
+/*
+ * @Author: WIN-J7OL7MK489U\EDY 13478707150@163.com
+ * @Date: 2023-06-28 16:45:43
+ * @LastEditors: BJ-HPC3\13478 13478707150@163.com
+ * @LastEditTime: 2025-02-21 17:15:40
+ * @FilePath: \jsure_zdbg_web_react\src\hooks\useRequest\index.ts
+ * @Description: 通用请求
+ */
+
+import { useState } from 'react';
+
+import type { Request } from '@/request/utils';
+
+interface UseRequestListProps {
+ action?: Request
;
+ onOk?: () => void;
+};
+
+function useRequestSubmit
({
+ action,
+ onOk,
+}: UseRequestListProps
) {
+ const [loading, updateLoading] = useState(false);
+ const [data, updateData] = useState(null);
+
+ const actionTask = async (params: P, loading = true) => {
+ try {
+ loading && updateLoading(true);
+ const res = await action(params);
+ updateData(res);
+ onOk?.();
+ return res;
+ }
+ catch (err) {
+ console.log('[request submit err]: ', err);
+ return Promise.reject(err);
+ }
+ finally {
+ loading && updateLoading(false);
+ }
+ };
+
+ return {
+ actionTask,
+ loading,
+ data
+ };
+}
+
+export default useRequestSubmit;
\ No newline at end of file
diff --git a/src/index.html b/src/index.html
new file mode 100644
index 0000000..5d49b24
--- /dev/null
+++ b/src/index.html
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+ jf_20250608
+
+
+
+
+
+
diff --git a/src/pages/dataset/components/DataList/index.jsx b/src/pages/dataset/components/DataList/index.jsx
new file mode 100644
index 0000000..ed59316
--- /dev/null
+++ b/src/pages/dataset/components/DataList/index.jsx
@@ -0,0 +1,111 @@
+import React, { useEffect, useState } from 'react';
+import { PullToRefresh, List, Empty, Button, Modal, Toast } from 'antd-mobile';
+import { View, Text, ScrollView } from '@tarojs/components';
+import { getOrderListLoopAction, orderConfirmAction } from '../../../../request/actions';
+import { OrderStatusEnum } from '../../constants';
+import Taro, { useDidShow } from '@tarojs/taro';
+
+import styles from './index.module.less';
+
+const fetchDataRecursively = async (times, params, datasource) => {
+ if (times <= 0 || (datasource && datasource?.length < 10)) {
+ return [];
+ }
+ const lastOrderId = datasource?.[datasource?.length - 1]?.orderId;
+ const result = await getOrderListLoopAction({ ...params, lastOrderId });
+ const nextResults = await fetchDataRecursively(times - 1, params, result?.dataList);
+ return [...result?.dataList, ...nextResults];
+};
+
+const DataList = ({ orderStatus }) => {
+ const [data, setData] = useState([]);
+
+ const initData = async () => {
+ const dataSource = await fetchDataRecursively(1, { orderStatus });
+ setData(dataSource);
+ };
+
+
+ const handleScrollToLower = async () => {
+ const lastLogId = data?.[data?.length - 1]?.orderId;
+ const result = await getOrderListLoopAction({ lastLogId });
+ const newDataSource = result?.dataList;
+ setData([...data, ...newDataSource]);
+ };
+
+ const handleJump = item => {
+ // 去支付
+ if (orderStatus === OrderStatusEnum.waittingForPay.value) {
+ Taro.navigateTo({
+ url: `/pages/payconfirm/index?orderId=${item.orderId}`
+ });
+ }
+ // 确认订单
+ if (orderStatus === OrderStatusEnum.waittingForConfirm.value) {
+ // Modal.confirm({
+ // title: '是否确认收款?',
+ // onConfirm: async () => {
+ // try {
+ // const orderId = item.orderId;
+ // await orderConfirmAction({ orderId });
+ // initData();
+ // Toast.show({
+ // icon: 'success',
+ // content: '已成功确认收款信息'
+ // });
+ // }
+ // catch (err) {
+ // console.log('err: ', err);
+ // }
+ // }
+ // })
+ Taro.navigateTo({
+ url: `/pages/feeconfirm/index?orderId=${item.orderId}`
+ });
+ }
+ };
+
+ useDidShow(initData);
+
+ useEffect(() => {
+ initData();
+ }, [orderStatus]);
+
+ return (
+
+ {data.length > 0 ? (
+
+
+ {data.map((item, index) => (
+ handleJump(item)} arrowIcon={false}>
+
+ 订单编号: {item.orderId}
+ 订单日期: {item.orderDate || '-'}
+
+
+ 订单金额: {item.orderPrice}
+
+ {orderStatus !== OrderStatusEnum.done.value && (
+
+ )}
+
+ ))}
+
+
+ ) : (
+
+ )}
+
+ )
+};
+
+export default DataList;
diff --git a/src/pages/dataset/components/DataList/index.module.less b/src/pages/dataset/components/DataList/index.module.less
new file mode 100644
index 0000000..14f71c0
--- /dev/null
+++ b/src/pages/dataset/components/DataList/index.module.less
@@ -0,0 +1,12 @@
+.row {
+ display: flex;
+ justify-content: space-between;
+ font-size: 28px;
+ line-height: 2;
+}
+.btn {
+ width: 100%;
+}
+.list {
+ height: calc(100vh - 92px - 120px);
+}
diff --git a/src/pages/dataset/constants.js b/src/pages/dataset/constants.js
new file mode 100644
index 0000000..a1fbd3b
--- /dev/null
+++ b/src/pages/dataset/constants.js
@@ -0,0 +1,15 @@
+
+export const OrderStatusEnum = {
+ waittingForPay: {
+ label: '待付款',
+ value: '0'
+ },
+ waittingForConfirm: {
+ label: '待确认',
+ value: '1'
+ },
+ done: {
+ label: '已完成',
+ value: '9'
+ }
+};
diff --git a/src/pages/dataset/index.config.js b/src/pages/dataset/index.config.js
new file mode 100644
index 0000000..fd10fbe
--- /dev/null
+++ b/src/pages/dataset/index.config.js
@@ -0,0 +1,4 @@
+export default definePageConfig({
+ navigationBarTitleText: '数据优化',
+ usingComponents: {},
+})
diff --git a/src/pages/dataset/index.jsx b/src/pages/dataset/index.jsx
new file mode 100644
index 0000000..4399d7f
--- /dev/null
+++ b/src/pages/dataset/index.jsx
@@ -0,0 +1,25 @@
+import { View } from '@tarojs/components';
+import { Tabs } from 'antd-mobile';
+
+import DataList from './components/DataList';
+import { OrderStatusEnum } from './constants';
+
+import styles from './index.module.less';
+
+export default function Dataset() {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+ )
+}
diff --git a/src/pages/dataset/index.module.less b/src/pages/dataset/index.module.less
new file mode 100644
index 0000000..797ad4d
--- /dev/null
+++ b/src/pages/dataset/index.module.less
@@ -0,0 +1,16 @@
+.container {
+ position: relative;
+
+ .tabs {
+ height: 82px;
+ position: sticky;
+ top: 0;
+ z-index: 9;
+ background-color: #fff;
+ }
+ :global {
+ .adm-list-body {
+ border-top: unset;
+ }
+ }
+}
diff --git a/src/pages/feeconfirm/components/Alipay/index.jsx b/src/pages/feeconfirm/components/Alipay/index.jsx
new file mode 100644
index 0000000..1fc9aa1
--- /dev/null
+++ b/src/pages/feeconfirm/components/Alipay/index.jsx
@@ -0,0 +1,42 @@
+import { View } from '@tarojs/components';
+import { Form } from 'antd-mobile';
+import FormLabel from '/components/FormLabel';
+import FormImage from '/components/FormImage';
+
+import styles from './index.module.less';
+
+export default function Alipay({ namePrefix }) {
+
+ return (
+
+
+
+
+
+
+
+ {/*
+
+ */}
+ {/*
+
+ */}
+
+ )
+}
diff --git a/src/pages/feeconfirm/components/Alipay/index.module.less b/src/pages/feeconfirm/components/Alipay/index.module.less
new file mode 100644
index 0000000..11be4b3
--- /dev/null
+++ b/src/pages/feeconfirm/components/Alipay/index.module.less
@@ -0,0 +1,3 @@
+.container {
+
+}
diff --git a/src/pages/feeconfirm/components/BankPay/index.jsx b/src/pages/feeconfirm/components/BankPay/index.jsx
new file mode 100644
index 0000000..2941289
--- /dev/null
+++ b/src/pages/feeconfirm/components/BankPay/index.jsx
@@ -0,0 +1,41 @@
+import { View } from '@tarojs/components';
+import { Form } from 'antd-mobile';
+import FormLabel from '/components/FormLabel';
+
+import styles from './index.module.less';
+
+export default function BankPay({ namePrefix }) {
+
+ return (
+
+
+
+
+
+
+
+
+
+
+ {/*
+
+ */}
+
+ )
+}
diff --git a/src/pages/feeconfirm/components/BankPay/index.module.less b/src/pages/feeconfirm/components/BankPay/index.module.less
new file mode 100644
index 0000000..4851408
--- /dev/null
+++ b/src/pages/feeconfirm/components/BankPay/index.module.less
@@ -0,0 +1,2 @@
+.container {
+}
diff --git a/src/pages/feeconfirm/components/FormBar/index.jsx b/src/pages/feeconfirm/components/FormBar/index.jsx
new file mode 100644
index 0000000..d8a9251
--- /dev/null
+++ b/src/pages/feeconfirm/components/FormBar/index.jsx
@@ -0,0 +1,179 @@
+import { View } from '@tarojs/components';
+import { Button, CapsuleTabs, Form, Modal, Toast } from 'antd-mobile';
+
+import FormImage from '/components/FormImage';
+import FormLabel from '/components/FormLabel';
+import React, { useEffect, useMemo, useState } from 'react';
+import { getOrderInfoAction } from '/request/actions';
+import { getUrlParam } from '/utils';
+import Taro from '@tarojs/taro';
+
+// import Alipay from '../Alipay';
+// import Wxpay from '../Wxpay';
+// import BankPay from '../BankPay';
+
+// import aliSrc from '/assets/icons/ali.svg';
+// import wxSrc from '/assets/icons/wx.svg';
+// import bankSrc from '/assets/icons/bank.svg';
+import { orderConfirmAction } from '../../../../request/actions';
+
+import styles from './index.module.less';
+
+// const TabItem = ({ src, text }) => (
+//
+//
+// {text}
+//
+// );
+
+export default function FormBar() {
+ const [form] = Form.useForm();
+ // const [showFee, updateShowFee] = useState(false);
+
+ useEffect(() => {
+ getOrderInfoAction({
+ orderId: getUrlParam('orderId')
+ }).then(res => {
+ const orderShopInfo = res.orderShopInfo || {};
+ const feeShopInfo = res.feeShopInfo || {};
+ const _orderShopInfo = Object.keys(orderShopInfo).reduce((res, key) => {
+ return {
+ ...res,
+ [`pay-${key}`]: orderShopInfo[key]
+ }
+ }, {});
+ const _feeShopInfo = Object.keys(orderShopInfo).reduce((res, key) => {
+ return {
+ ...res,
+ [`fee-${key}`]: feeShopInfo[key]
+ }
+ }, {});
+ form.setFieldsValue({
+ ...res,
+ ..._orderShopInfo,
+ ..._feeShopInfo
+ });
+
+ // updateShowFee(res.feePrice || res.feeImage || res.feeShopInfo)
+ });
+ }, []);
+
+ const handleSubmit = () => {
+ Modal.confirm({
+ title: '是否确认收款?',
+ onConfirm: async () => {
+ try {
+ const orderId = getUrlParam('orderId');
+ await orderConfirmAction({ orderId });
+ Toast.show({
+ icon: 'success',
+ content: '已成功确认收款信息'
+ });
+ Taro.navigateTo({
+ url: '/pages/dataset/index'
+ });
+ }
+ catch (err) {
+ console.log('err: ', err);
+ }
+ }
+ })
+ };
+
+ // const way = Form.useWatch('way', form);
+ // const feeway = Form.useWatch('feeway', form);
+
+ // const detailRenderer = useMemo(() => {
+ // return {
+ // alipay: ,
+ // wx: ,
+ // bank:
+ // }[way];
+ // }, [way]);
+
+ // const feeDetailRenderer = useMemo(() => {
+ // return {
+ // alipay: ,
+ // wx: ,
+ // bank:
+ // }[feeway];
+ // }, [feeway]);
+
+ const payImage = Form.useWatch('payImage', form);
+ const feeImage = Form.useWatch('feeImage', form);
+
+ return (
+
+
+
+
+
+
+
+
+ `¥${val || 0}`} />
+
+
+ `¥${val || 0}`} />
+
+
+
+
+
+
+
+
+
+
+ {/*
+
+ } key='alipay' />
+ } key='wx' />
+ } key='bank' />
+
+
+ {detailRenderer}
+ {showFee && (
+
+
+ 服务费收款信息
+
+
+ `¥${val || 0}`} />
+
+
+
+
+
+
+ } key='alipay' />
+ } key='wx' />
+ } key='bank' />
+
+
+ {feeDetailRenderer}
+
+ )} */}
+
+
+
+ )
+}
diff --git a/src/pages/feeconfirm/components/FormBar/index.module.less b/src/pages/feeconfirm/components/FormBar/index.module.less
new file mode 100644
index 0000000..6348817
--- /dev/null
+++ b/src/pages/feeconfirm/components/FormBar/index.module.less
@@ -0,0 +1,71 @@
+.container {
+ background-color: #fff;
+ border-radius: 18px;
+ padding: 32px 32px 48px 32px;
+
+ .tabitem {
+ font-size: 24px;
+ display: flex;
+ align-items: center;
+
+ img {
+ width: 28px;
+ margin-right: 8px;
+ }
+ }
+
+ .btn {
+ width: 100%;
+ margin-top: 24px;
+ }
+
+ .title {
+ font-size: 28px;
+ font-weight: 600;
+ margin: 24px 0;
+ }
+
+ .margin {
+ margin-top: 32px;
+ }
+
+ .submit {
+ width: 100%;
+ margin-top: 72px;
+ }
+
+ :global {
+ .adm-capsule-tabs-header {
+ padding: 0;
+ }
+
+ .adm-list-item-content-prefix {
+ width: 168px;
+ }
+
+ .adm-capsule-tabs-tab {
+ padding: 8px;
+ border-radius: 6px;
+ border: 1px solid transparent;
+ transition: all .2s ease-in-out;
+ }
+
+ .adm-capsule-tabs-tab-active {
+ color: var(--color-primary);
+ background-color: #f0f9ff;
+ border-color: var(--color-primary);
+ }
+
+ .adm-list-body {
+ border-top: unset;
+ }
+
+ .adm-list-item {
+ padding-left: 0;
+ }
+
+ .adm-list-item-content {
+ border-top: unset;
+ }
+ }
+}
diff --git a/src/pages/feeconfirm/components/Wxpay/index.jsx b/src/pages/feeconfirm/components/Wxpay/index.jsx
new file mode 100644
index 0000000..5edc347
--- /dev/null
+++ b/src/pages/feeconfirm/components/Wxpay/index.jsx
@@ -0,0 +1,42 @@
+import { View } from '@tarojs/components';
+import { Form } from 'antd-mobile';
+import FormLabel from '/components/FormLabel';
+import FormImage from '/components/FormImage';
+
+import styles from './index.module.less';
+
+export default function Wxpay({ namePrefix }) {
+
+ return (
+
+
+
+
+
+
+
+ {/*
+
+ */}
+ {/*
+
+ */}
+
+ )
+}
diff --git a/src/pages/feeconfirm/components/Wxpay/index.module.less b/src/pages/feeconfirm/components/Wxpay/index.module.less
new file mode 100644
index 0000000..4851408
--- /dev/null
+++ b/src/pages/feeconfirm/components/Wxpay/index.module.less
@@ -0,0 +1,2 @@
+.container {
+}
diff --git a/src/pages/feeconfirm/index.config.js b/src/pages/feeconfirm/index.config.js
new file mode 100644
index 0000000..c71227b
--- /dev/null
+++ b/src/pages/feeconfirm/index.config.js
@@ -0,0 +1,4 @@
+export default definePageConfig({
+ navigationBarTitleText: '确认收款',
+ usingComponents: {},
+})
diff --git a/src/pages/feeconfirm/index.jsx b/src/pages/feeconfirm/index.jsx
new file mode 100644
index 0000000..39976bd
--- /dev/null
+++ b/src/pages/feeconfirm/index.jsx
@@ -0,0 +1,25 @@
+import { View } from '@tarojs/components';
+import Taro from '@tarojs/taro';
+
+import FormBar from './components/FormBar';
+import { NavBar } from 'antd-mobile';
+
+import styles from './index.module.less';
+
+export default function ShopInfo() {
+
+ const handleBack = () => {
+ Taro.navigateTo({
+ url: '/pages/dataset/index'
+ });
+ };
+
+ return (
+
+ 确认收款
+
+
+
+
+ )
+}
diff --git a/src/pages/feeconfirm/index.module.less b/src/pages/feeconfirm/index.module.less
new file mode 100644
index 0000000..e32d392
--- /dev/null
+++ b/src/pages/feeconfirm/index.module.less
@@ -0,0 +1,10 @@
+.container {
+ background: linear-gradient(180deg, #d7ebfa, #f5f5f5 30vh);
+ height: 100%;
+ overflow-y: auto;
+
+ .wrapper {
+ box-sizing: border-box;
+ padding: 42px;
+ }
+}
diff --git a/src/pages/feedback/index.config.js b/src/pages/feedback/index.config.js
new file mode 100644
index 0000000..7e2e45e
--- /dev/null
+++ b/src/pages/feedback/index.config.js
@@ -0,0 +1,4 @@
+export default definePageConfig({
+ navigationBarTitleText: '反馈',
+ usingComponents: {},
+})
diff --git a/src/pages/feedback/index.jsx b/src/pages/feedback/index.jsx
new file mode 100644
index 0000000..e4cc23c
--- /dev/null
+++ b/src/pages/feedback/index.jsx
@@ -0,0 +1,45 @@
+import { View } from '@tarojs/components';
+import Taro from '@tarojs/taro';
+
+import { Button, Form, NavBar, TextArea } from 'antd-mobile';
+import { feedbackAction } from '../../request/actions';
+
+import styles from './index.module.less';
+
+export default function Feedback() {
+ const [form] = Form.useForm();
+
+ const handleBack = () => {
+ Taro.navigateTo({
+ url: '/pages/mine/index'
+ });
+ };
+
+ const handleVery = async () => {
+ try {
+ const values = await form.validateFields();
+ console.log('values: ', values);
+ await feedbackAction(values);
+ handleBack();
+ }
+ catch (err) {
+ console.log('err: ', err);
+ }
+ };
+
+ return (
+
+
+ 反馈
+
+
+
+
+
+
+
+ );
+}
diff --git a/src/pages/feedback/index.module.less b/src/pages/feedback/index.module.less
new file mode 100644
index 0000000..3532238
--- /dev/null
+++ b/src/pages/feedback/index.module.less
@@ -0,0 +1,28 @@
+.container {
+ background: linear-gradient(180deg, #d7ebfa, #f5f5f5 30vh);
+ height: 100%;
+
+ .form {
+ background-color: #fff;
+ border-radius: 18px;
+ padding: 32px 32px 48px 32px;
+ width: 620px;
+ margin: 0 auto;
+ margin-top: 72px;
+
+ :global {
+ .adm-list-body {
+ border-top: unset;
+ }
+
+ .adm-list-item {
+ padding-left: 0;
+ }
+ }
+ .submit {
+ width: 100%;
+ margin-top: 72px;
+ }
+ }
+
+}
diff --git a/src/pages/forget/components/FormBar/index.jsx b/src/pages/forget/components/FormBar/index.jsx
new file mode 100644
index 0000000..b17782b
--- /dev/null
+++ b/src/pages/forget/components/FormBar/index.jsx
@@ -0,0 +1,93 @@
+import { View } from '@tarojs/components';
+import { Button, Form, Input, Toast } from 'antd-mobile';
+import { useState } from 'react';
+import Taro from '@tarojs/taro';
+import { editPasswordAction } from '../../../../request/actions';
+
+import styles from './index.module.less';
+
+export default function FormBar() {
+ const [form] = Form.useForm();
+
+ const [countdown, setCountdown] = useState(60);
+ const [isCounting, setIsCounting] = useState(false);
+
+ const sendVerificationCode = () => {
+ if (isCounting) {
+ return;
+ }
+ setIsCounting(true);
+ // Simulate sending verification code
+ console.log('Sending verification code...');
+ const interval = setInterval(() => {
+ setCountdown(prev => {
+ if (prev <= 1) {
+ clearInterval(interval);
+ setIsCounting(false);
+ return 60; // Reset countdown
+ }
+ return prev - 1;
+ });
+ }, 1000);
+ };
+
+
+ const handleReset = async () => {
+ try {
+ const values = await form.validateFields();
+ await editPasswordAction(values);
+ Toast.show({
+ icon: 'success',
+ content: '密码修改成功'
+ });
+ Taro.navigateBack();
+ }
+ catch (err) {
+ console.log('err: ', err);
+ }
+ };
+
+ return (
+
+
+
+
+
+
+
+ {/*
+ {isCounting ? `(${countdown}秒后重新获取)` : '发送验证码'}
+
+ }
+ >
+
+ */}
+
+
+
+ )
+}
diff --git a/src/pages/forget/components/FormBar/index.module.less b/src/pages/forget/components/FormBar/index.module.less
new file mode 100644
index 0000000..c7b087b
--- /dev/null
+++ b/src/pages/forget/components/FormBar/index.module.less
@@ -0,0 +1,46 @@
+.container {
+ background-color: #fff;
+ border-radius: 18px;
+ margin-top: 72px;
+ padding: 32px;
+
+ .form {
+ :global {
+ .adm-list-body {
+ border-top: unset;
+ }
+
+ .adm-list-item {
+ padding-left: 0;
+ }
+ }
+
+ .extra {
+ color: #007AFF;
+ position: relative;
+ font-size: 24px;
+ top: 24px;
+ }
+ }
+
+ .bar {
+ display: flex;
+ justify-content: center;
+ padding: 24px 72px;
+
+ .btn {
+ font-size: 24px;
+ flex: 1;
+ text-align: center;
+
+ &:first-child {
+ border-right: 1px solid #eee;
+ }
+ }
+ }
+
+ .submit {
+ width: 100%;
+ margin-top: 72px;
+ }
+}
diff --git a/src/pages/forget/components/HeaderBar/index.jsx b/src/pages/forget/components/HeaderBar/index.jsx
new file mode 100644
index 0000000..6390aa9
--- /dev/null
+++ b/src/pages/forget/components/HeaderBar/index.jsx
@@ -0,0 +1,33 @@
+import { View } from '@tarojs/components';
+import { useLoad } from '@tarojs/taro';
+import logoSrc from '/assets/icons/logo.png';
+
+import styles from './index.module.less';
+
+export default function HeaderBar() {
+
+ useLoad(() => {
+ console.log('Page loaded.')
+ });
+
+ return (
+
+
+
+ Hi Weaith
+
+
+ 欢迎您来到融易诚
+
+
+
+
+
+
+ 融易诚
+
+
+
+
+ )
+}
diff --git a/src/pages/forget/components/HeaderBar/index.module.less b/src/pages/forget/components/HeaderBar/index.module.less
new file mode 100644
index 0000000..abdedb7
--- /dev/null
+++ b/src/pages/forget/components/HeaderBar/index.module.less
@@ -0,0 +1,42 @@
+.container {
+ .row {
+ .title {
+ font-weight: normal;
+ overflow-wrap: normal;
+ font-size: 42px;
+ color: rgb(48, 49, 51);
+ }
+
+ .subtitle {
+ font-weight: normal;
+ overflow-wrap: normal;
+ font-size: 32px;
+ color: rgb(48, 49, 51);
+ }
+ }
+
+ .row2 {
+ display: flex;
+ justify-content: flex-end;
+
+ .item {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ margin-right: 42px;
+
+ .title {
+ font-weight: normal;
+ overflow-wrap: normal;
+ font-size: 32px;
+ color: rgb(48, 49, 51);
+ text-align: center;
+ }
+ .logo {
+ width: 120px;
+ }
+ }
+
+
+ }
+}
diff --git a/src/pages/forget/index.config.js b/src/pages/forget/index.config.js
new file mode 100644
index 0000000..750c366
--- /dev/null
+++ b/src/pages/forget/index.config.js
@@ -0,0 +1,4 @@
+export default definePageConfig({
+ navigationBarTitleText: '忘记密码',
+ usingComponents: {},
+})
diff --git a/src/pages/forget/index.jsx b/src/pages/forget/index.jsx
new file mode 100644
index 0000000..80bca61
--- /dev/null
+++ b/src/pages/forget/index.jsx
@@ -0,0 +1,34 @@
+import { View } from '@tarojs/components';
+import Taro, { useLoad } from '@tarojs/taro';
+
+import HeaderBar from './components/HeaderBar';
+import FormBar from './components/FormBar';
+import { NavBar } from 'antd-mobile';
+
+import styles from './index.module.less';
+
+export default function Forget() {
+ const query = Taro.getCurrentInstance()?.router?.params;
+
+ useLoad(() => {
+ console.log('Page loaded.')
+ });
+
+ const handleBack = () => {
+ Taro.navigateBack();
+ };
+
+ return (
+
+ {query?.hasBack && (
+
+ 忘记密码
+
+ )}
+
+
+
+
+
+ );
+}
diff --git a/src/pages/forget/index.module.less b/src/pages/forget/index.module.less
new file mode 100644
index 0000000..ff81668
--- /dev/null
+++ b/src/pages/forget/index.module.less
@@ -0,0 +1,51 @@
+.container {
+ background: linear-gradient(180deg, #d7ebfa, #f5f5f5 30vh);
+ height: 100%;
+}
+
+.wrapper {
+ box-sizing: border-box;
+ padding: 120px 42px;
+
+ .row {
+ .title {
+ font-weight: normal;
+ overflow-wrap: normal;
+ font-size: 42px;
+ color: rgb(48, 49, 51);
+ }
+
+ .subtitle {
+ font-weight: normal;
+ overflow-wrap: normal;
+ font-size: 32px;
+ color: rgb(48, 49, 51);
+ }
+ }
+
+ .row2 {
+ display: flex;
+ justify-content: flex-end;
+
+ .item {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ margin-right: 42px;
+
+ .title {
+ font-weight: normal;
+ overflow-wrap: normal;
+ font-size: 32px;
+ color: rgb(48, 49, 51);
+ text-align: center;
+ }
+
+ .logo {
+ width: 120px;
+ }
+ }
+
+
+ }
+}
diff --git a/src/pages/funds/components/Balance/Alipay/index.jsx b/src/pages/funds/components/Balance/Alipay/index.jsx
new file mode 100644
index 0000000..296aefc
--- /dev/null
+++ b/src/pages/funds/components/Balance/Alipay/index.jsx
@@ -0,0 +1,40 @@
+import { View } from '@tarojs/components';
+import { Form } from 'antd-mobile';
+import FormLabel from '/components/FormLabel';
+import FormImage from '/components/FormImage';
+
+import styles from './index.module.less';
+
+export default function Alipay() {
+
+ return (
+
+
+
+
+
+
+
+
+
+
+ {/*
+
+ */}
+
+ )
+}
diff --git a/src/pages/funds/components/Balance/Alipay/index.module.less b/src/pages/funds/components/Balance/Alipay/index.module.less
new file mode 100644
index 0000000..11be4b3
--- /dev/null
+++ b/src/pages/funds/components/Balance/Alipay/index.module.less
@@ -0,0 +1,3 @@
+.container {
+
+}
diff --git a/src/pages/funds/components/Balance/BankPay/index.jsx b/src/pages/funds/components/Balance/BankPay/index.jsx
new file mode 100644
index 0000000..e9118eb
--- /dev/null
+++ b/src/pages/funds/components/Balance/BankPay/index.jsx
@@ -0,0 +1,38 @@
+import { View } from '@tarojs/components';
+import { Form } from 'antd-mobile';
+import FormLabel from '/components/FormLabel';
+
+import styles from './index.module.less';
+
+export default function BankPay() {
+
+ return (
+
+
+
+
+
+
+
+
+
+
+ {/*
+
+ */}
+
+ )
+}
diff --git a/src/pages/funds/components/Balance/BankPay/index.module.less b/src/pages/funds/components/Balance/BankPay/index.module.less
new file mode 100644
index 0000000..4851408
--- /dev/null
+++ b/src/pages/funds/components/Balance/BankPay/index.module.less
@@ -0,0 +1,2 @@
+.container {
+}
diff --git a/src/pages/funds/components/Balance/Wxpay/index.jsx b/src/pages/funds/components/Balance/Wxpay/index.jsx
new file mode 100644
index 0000000..a0d2a5c
--- /dev/null
+++ b/src/pages/funds/components/Balance/Wxpay/index.jsx
@@ -0,0 +1,39 @@
+import { View } from '@tarojs/components';
+import { Form } from 'antd-mobile';
+import FormLabel from '/components/FormLabel';
+import FormImage from '/components/FormImage';
+
+import styles from './index.module.less';
+
+export default function Wxpay() {
+
+ return (
+
+
+
+
+
+
+
+
+
+
+ {/*
+
+ */}
+
+ )
+}
diff --git a/src/pages/funds/components/Balance/Wxpay/index.module.less b/src/pages/funds/components/Balance/Wxpay/index.module.less
new file mode 100644
index 0000000..4851408
--- /dev/null
+++ b/src/pages/funds/components/Balance/Wxpay/index.module.less
@@ -0,0 +1,2 @@
+.container {
+}
diff --git a/src/pages/funds/components/Balance/index.jsx b/src/pages/funds/components/Balance/index.jsx
new file mode 100644
index 0000000..ced2f39
--- /dev/null
+++ b/src/pages/funds/components/Balance/index.jsx
@@ -0,0 +1,123 @@
+import { useState } from 'react';
+import cls from 'classnames';
+import { View } from '@tarojs/components';
+import { Button, Form, Input, Popup, Toast } from 'antd-mobile';
+
+// import Alipay from './Alipay';
+// import Wxpay from './Wxpay';
+// import BankPay from './BankPay';
+
+// import aliSrc from '/assets/icons/ali.svg';
+// import wxSrc from '/assets/icons/wx.svg';
+// import bankSrc from '/assets/icons/bank.svg';
+
+import FormLabel from '/components/FormLabel';
+
+import { getShopInfoAction, userWithdrawalAction } from '../../../../request/actions';
+import styles from './index.module.less';
+
+// const TabItem = ({ src, text }) => (
+//
+//
+// {text}
+//
+// );
+
+const Balance = ({ balanceData, className, onAfterClose }) => {
+ const prefix = cls(styles.container, className);
+ const [visible, setVisible] = useState(false);
+ const [form] = Form.useForm();
+
+ const onShow = () => {
+ setVisible(true);
+ // 商铺收款信息
+ getShopInfoAction().then(res => {
+ form.setFieldsValue(res);
+ });
+ };
+
+ const onClose = () => {
+ setVisible(false);
+ onAfterClose();
+ setTimeout(() => {
+ form.resetFields();
+ }, 200);
+ };
+
+ const handleWithdrawal = async () => {
+ try {
+ const values = await form.validateFields();
+ const cash = values.cash;
+ await userWithdrawalAction({ cash });
+ Toast.show({
+ content: '您已提现成功'
+ });
+ onClose();
+ }
+ catch (err) {
+ console.log('err: ', err);
+ }
+ };
+
+ // const way = Form.useWatch('way', form);
+
+ // const detailRenderer = useMemo(() => {
+ // return {
+ // alipay: ,
+ // wx: ,
+ // bank:
+ // }[way];
+ // }, [way]);
+
+ const balance = balanceData?.balance || '0.00';
+
+ return (
+
+ 账户余额
+ ¥{balance}
+
+
+
+
+
+ {/*
+
+ } key='alipay' />
+ } key='wx' />
+ } key='bank' />
+
+
+ {detailRenderer} */}
+
+
+
+
+ )
+};
+
+export default Balance;
diff --git a/src/pages/funds/components/Balance/index.module.less b/src/pages/funds/components/Balance/index.module.less
new file mode 100644
index 0000000..32c0f44
--- /dev/null
+++ b/src/pages/funds/components/Balance/index.module.less
@@ -0,0 +1,98 @@
+.container {
+ background-color: #fff;
+ border-radius: 18px;
+ padding: 32px;
+
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+
+ .title {
+ font-size: 28px;
+ font-weight: 600;
+ margin-bottom: 24px;
+ }
+
+ .subtitle {
+ font-size: 42px;
+ font-weight: 600;
+ margin-bottom: 24px;
+ color: var(--color-primary);
+ }
+
+ .btn {
+ width: 380px;
+ }
+}
+
+.popup-wrapper {
+ height: 480px;
+}
+
+.balance {
+ display: flex;
+ justify-content: center;
+ margin: 48px 0 24px;
+}
+
+.popup {
+ padding: 24px;
+
+ .tabitem {
+ font-size: 24px;
+ display: flex;
+ align-items: center;
+
+ img {
+ width: 28px;
+ margin-right: 8px;
+ }
+ }
+
+ .btn {
+ width: 100%;
+ margin-top: 24px;
+ }
+
+ :global {
+ .adm-capsule-tabs-header {
+ padding: 0;
+ }
+
+ .adm-capsule-tabs-tab {
+ padding: 8px 20px;
+ border-radius: 6px;
+ border: 1px solid transparent;
+ transition: all .2s ease-in-out;
+ }
+
+ .adm-capsule-tabs-tab-active {
+ color: var(--color-primary);
+ background-color: #f0f9ff;
+ border-color: var(--color-primary);
+ }
+
+ .adm-list-item {
+ padding: 32px 0;
+ }
+
+ .adm-form-item-label {
+ font-size: 28px;
+ position: relative;
+ top: 12px;
+ }
+ .adm-input-element {
+ font-size: 42px;
+ }
+ }
+}
+
+
+:global {
+ .adm-list-default .adm-list-body {
+ border-top: unset;
+ }
+ .adm-list-item-content {
+ border-top: unset;
+ }
+}
diff --git a/src/pages/funds/components/DataList/index.jsx b/src/pages/funds/components/DataList/index.jsx
new file mode 100644
index 0000000..c2af300
--- /dev/null
+++ b/src/pages/funds/components/DataList/index.jsx
@@ -0,0 +1,38 @@
+import React from 'react';
+import { List, Empty, Tag } from 'antd-mobile';
+import { Text, View } from '@tarojs/components';
+import cls from 'classnames';
+
+import styles from './index.module.less';
+
+const DataList = ({ dataSource = [], className }) => {
+ const prefix = cls(styles.container, className);
+
+ return (
+
+ 交易记录
+ {dataSource.length > 0 ? (
+
+ {dataSource.map((item, index) => (
+
+
+
+ {item.isIn ? '入账' : '出账'}
+ {item.cash}
+
+ {item.remark}
+
+
+ ))}
+
+ ) : (
+
+ )}
+
+ )
+};
+
+export default DataList;
diff --git a/src/pages/funds/components/DataList/index.module.less b/src/pages/funds/components/DataList/index.module.less
new file mode 100644
index 0000000..a8fcf45
--- /dev/null
+++ b/src/pages/funds/components/DataList/index.module.less
@@ -0,0 +1,44 @@
+.container {
+ background-color: #fff;
+ border-radius: 18px;
+ padding: 32px;
+ margin-top: 24px;
+
+ .title {
+ font-size: 28px;
+ font-weight: 600;
+ margin-bottom: 24px;
+ }
+
+ .row {
+ width: 100%;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+
+ .left {
+ display: flex;
+ align-items: center;
+ font-size: 24px;
+
+ .status {
+ margin-right: 12px;
+ }
+ }
+
+ .tag {
+ font-size: 24px;
+ }
+
+ &:not(:last-child) {
+ border-bottom: 1px solid #eee;
+ }
+ }
+
+ :global {
+ .adm-list-default .adm-list-body {
+ border: unset;
+ }
+ }
+
+}
diff --git a/src/pages/funds/index.config.js b/src/pages/funds/index.config.js
new file mode 100644
index 0000000..d899944
--- /dev/null
+++ b/src/pages/funds/index.config.js
@@ -0,0 +1,4 @@
+export default definePageConfig({
+ navigationBarTitleText: '资产管理',
+ usingComponents: {},
+})
diff --git a/src/pages/funds/index.jsx b/src/pages/funds/index.jsx
new file mode 100644
index 0000000..efad2ab
--- /dev/null
+++ b/src/pages/funds/index.jsx
@@ -0,0 +1,77 @@
+import { useState } from 'react';
+import { View, ScrollView } from '@tarojs/components';
+import Taro, { useLoad } from '@tarojs/taro';
+import { NavBar, PullToRefresh } from 'antd-mobile';
+
+import DataList from './components/DataList';
+import Balance from './components/Balance';
+import { myBalanceAction, userWalletLogListLoopAction } from '../../request/actions';
+import useRequestList from '../../hooks/useRequestList';
+
+import styles from './index.module.less';
+
+const fetchDataRecursively = async (times, datasource) => {
+ if (times <= 0 || (datasource && datasource?.length < 10)) {
+ return [];
+ }
+ const lastLogId = datasource?.[datasource?.length - 1]?.logId;
+ const result = await userWalletLogListLoopAction({ lastLogId });
+ const nextResults = await fetchDataRecursively(times - 1, result?.dataList);
+ return [...result?.dataList, ...nextResults];
+};
+
+export default function Funds() {
+ const [data, setData] = useState([]);
+
+ // 银行卡余额
+ const { data: balanceData, getDataTask: getBananceData } = useRequestList({
+ immediate: false,
+ showMsg: false,
+ action: myBalanceAction
+ });
+
+ const handleInitData = async () => {
+ getBananceData();
+ const dataSource = await fetchDataRecursively(2);
+ setData(dataSource);
+ };
+
+ useLoad(() => {
+ handleInitData();
+ });
+
+ const handleBack = () => {
+ Taro.navigateTo({
+ url: '/pages/mine/index'
+ });
+ };
+
+ const handleScrollToLower = async () => {
+ const lastLogId = data?.[data?.length - 1]?.logId;
+ const result = await userWalletLogListLoopAction({ lastLogId });
+ const newDataSource = result?.dataList;
+ setData([...data, ...newDataSource]);
+ };
+
+ return (
+
+
+ 资金管理
+
+
+
+
+
+
+
+
+
+
+ )
+}
diff --git a/src/pages/funds/index.module.less b/src/pages/funds/index.module.less
new file mode 100644
index 0000000..2478387
--- /dev/null
+++ b/src/pages/funds/index.module.less
@@ -0,0 +1,11 @@
+.container {
+ background: linear-gradient(180deg, #d7ebfa, #f5f5f5 30vh);
+ height: 100%;
+
+ .wrapper {
+ box-sizing: border-box;
+ padding: 42px;
+ height: calc(100vh - 82px);
+ }
+
+}
diff --git a/src/pages/index/components/Banner/index.jsx b/src/pages/index/components/Banner/index.jsx
new file mode 100644
index 0000000..627cd4c
--- /dev/null
+++ b/src/pages/index/components/Banner/index.jsx
@@ -0,0 +1,29 @@
+
+import { View, Swiper, SwiperItem, Image } from '@tarojs/components';
+
+import styles from './index.module.less';
+
+export default function Banner({
+ swiperList = []
+}) {
+ if (swiperList.length === 0) {
+ return
+ }
+
+ return (
+
+ {swiperList.map((bannerSrc, index) => (
+
+
+
+ ))}
+
+ )
+}
diff --git a/src/pages/index/components/Banner/index.module.less b/src/pages/index/components/Banner/index.module.less
new file mode 100644
index 0000000..e9078d3
--- /dev/null
+++ b/src/pages/index/components/Banner/index.module.less
@@ -0,0 +1,5 @@
+
+.container {
+ margin-top: 36px;
+ height: 328px;
+}
diff --git a/src/pages/index/components/Header/index.jsx b/src/pages/index/components/Header/index.jsx
new file mode 100644
index 0000000..bdecda2
--- /dev/null
+++ b/src/pages/index/components/Header/index.jsx
@@ -0,0 +1,33 @@
+import { View } from '@tarojs/components';
+import { NoticeBar } from 'antd-mobile';
+import Taro from '@tarojs/taro';
+
+import logoSrc from '/assets/icons/logo.png';
+
+import styles from './index.module.less';
+
+export default function Header({
+ noticeTitle
+}) {
+
+ return (
+
+
+
+
+ 融易诚
+
+
+ {noticeTitle && (
+ Taro.navigateTo({ url: '/pages/notice/index' })}
+ />
+ )}
+
+ );
+}
diff --git a/src/pages/index/components/Header/index.module.less b/src/pages/index/components/Header/index.module.less
new file mode 100644
index 0000000..9be5b45
--- /dev/null
+++ b/src/pages/index/components/Header/index.module.less
@@ -0,0 +1,20 @@
+.header {
+ display: flex;
+ justify-content: space-between;
+
+ .left {
+ display: flex;
+ align-items: center;
+
+ .logo {
+ width: 68px;
+ margin-right: 12px;
+ }
+
+ .title {
+ font-size: 28px;
+ font-weight: 500;
+ color: #333;
+ }
+ }
+}
diff --git a/src/pages/index/components/MyShop/index.jsx b/src/pages/index/components/MyShop/index.jsx
new file mode 100644
index 0000000..1641e23
--- /dev/null
+++ b/src/pages/index/components/MyShop/index.jsx
@@ -0,0 +1,53 @@
+
+import { ExclamationCircleFill } from 'antd-mobile-icons'
+import { View } from '@tarojs/components';
+import { Button } from 'antd-mobile';
+import Taro from '@tarojs/taro';
+import logoSrc from '/assets/icons/logo.png';
+
+import styles from './index.module.less';
+
+const MyShop = () => {
+
+ const handleVery = () => {
+ Taro.navigateTo({
+ url: '/pages/shopinfo/index'
+ });
+ };
+
+ return (
+
+
+
+
+ 我的小店
+
+
+
+
+ 完成考试 帮您开启成功之路
+
+
+
+
+
+ 店铺认证
+ 请完成店铺认证以开启完整功能
+
+
+
+
+
+
+ );
+};
+
+export default MyShop;
diff --git a/src/pages/index/components/MyShop/index.module.less b/src/pages/index/components/MyShop/index.module.less
new file mode 100644
index 0000000..27c32f0
--- /dev/null
+++ b/src/pages/index/components/MyShop/index.module.less
@@ -0,0 +1,70 @@
+.container {
+ background: linear-gradient(180deg, #1677ff, #fff 30vh);
+ padding: 24px;
+ border-radius: 12px;
+ margin-top: 32px;
+
+ .title {
+ display: flex;
+ align-items: center;
+
+ .logo {
+ width: 98px;
+ margin-right: 12px;
+ }
+
+ .title {
+ font-size: 28px;
+ font-weight: 500;
+ color: #fff;
+ }
+ }
+
+ .card {
+ padding: 18px 24px;
+ border-radius: 12px;
+ background-color: #fff;
+ margin-top: 18px;
+
+ .title {
+ font-size: 28px;
+ font-weight: 500;
+ color: #333;
+ }
+
+ .info {
+ margin-top: 18px;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+
+ .left {
+ display: flex;
+ align-items: center;
+
+ .icon {
+ color: rgb(255, 0, 0);
+ font-size: 42px;
+ margin-right: 18px;
+ }
+
+ .title {
+ font-size: 24px;
+ color: #333;
+ font-weight: bolder;
+ }
+ .subtitle {
+ font-size: 22px;
+ color: #999;
+ margin-top: 4px;
+ }
+ }
+
+ .btn {
+ font-size: 24px;
+ padding: 0px 18px;
+ height: 48px;
+ }
+ }
+ }
+}
diff --git a/src/pages/index/components/TodoList/index.jsx b/src/pages/index/components/TodoList/index.jsx
new file mode 100644
index 0000000..c585414
--- /dev/null
+++ b/src/pages/index/components/TodoList/index.jsx
@@ -0,0 +1,30 @@
+
+import { View, Text } from '@tarojs/components';
+import { List } from 'antd-mobile';
+import { FileOutline } from 'antd-mobile-icons';
+
+import styles from './index.module.less';
+
+const TodoList = () => {
+
+ return (
+
+
+ 今日任务
+
+
+ } onClick={() => { }}>
+ 1、完成店铺认证
+
+ } onClick={() => { }}>
+ 2、完成信用优化
+
+ } onClick={() => { }}>
+ 3、完成店铺认证
+
+
+
+ );
+};
+
+export default TodoList;
diff --git a/src/pages/index/components/TodoList/index.module.less b/src/pages/index/components/TodoList/index.module.less
new file mode 100644
index 0000000..fd269b5
--- /dev/null
+++ b/src/pages/index/components/TodoList/index.module.less
@@ -0,0 +1,30 @@
+.container {
+ padding: 24px;
+ border-radius: 12px;
+ background-color: #fff;
+ margin-top: 24px;
+
+ .title {
+ .text {
+ font-size: 28px;
+ font-weight: 500;
+ color: #333;
+ padding: 12px 0;
+ border-bottom: 4px solid #007AFF;
+ }
+ }
+
+ .list {
+ margin-top: 18px;
+
+ >* {
+ font-size: 28px !important;
+ }
+
+ :global {
+ .adm-list-item {
+ // padding-left: unset;
+ }
+ }
+ }
+}
diff --git a/src/pages/index/components/Toolbar/index.jsx b/src/pages/index/components/Toolbar/index.jsx
new file mode 100644
index 0000000..f9e6156
--- /dev/null
+++ b/src/pages/index/components/Toolbar/index.jsx
@@ -0,0 +1,30 @@
+
+import { ExclamationCircleFill } from 'antd-mobile-icons'
+import { View, Text } from '@tarojs/components';
+import styles from './index.module.less';
+import { Button } from 'antd-mobile';
+
+import { AddCircleOutline, TeamFill, RedoOutline } from 'antd-mobile-icons';
+import Taro from '@tarojs/taro';
+
+const Toolbar = () => {
+
+ return (
+
+ Taro.navigateTo({ url: '/pages/dataset/index' })}>
+
+ 数据优化
+
+ Taro.navigateTo({ url: '/pages/team/index' })}>
+
+ 团队矩阵
+
+ Taro.navigateTo({ url: '/pages/invite/index' })}>
+
+ 邀请商户
+
+
+ );
+};
+
+export default Toolbar;
diff --git a/src/pages/index/components/Toolbar/index.module.less b/src/pages/index/components/Toolbar/index.module.less
new file mode 100644
index 0000000..a530442
--- /dev/null
+++ b/src/pages/index/components/Toolbar/index.module.less
@@ -0,0 +1,29 @@
+.container {
+ padding: 8px 24px;
+ border-radius: 12px;
+ background-color: #fff;
+ margin-top: 24px;
+
+ display: flex;
+ justify-content: space-around;
+
+ .card {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ padding: 12px;
+
+ transition: all .2s ease-in-out;
+
+ &:active {
+ background-color: #fafafa;
+ border-radius: 12px;
+ }
+
+ .icon {
+ font-size: 48px;
+ margin-bottom: 12px;
+ }
+ }
+}
diff --git a/src/pages/index/index.config.js b/src/pages/index/index.config.js
new file mode 100644
index 0000000..5bbe240
--- /dev/null
+++ b/src/pages/index/index.config.js
@@ -0,0 +1,4 @@
+export default definePageConfig({
+ navigationBarTitleText: '首页',
+ usingComponents: {},
+})
diff --git a/src/pages/index/index.jsx b/src/pages/index/index.jsx
new file mode 100644
index 0000000..71dc8ea
--- /dev/null
+++ b/src/pages/index/index.jsx
@@ -0,0 +1,58 @@
+import { View } from '@tarojs/components';
+import Header from './components/Header';
+import Banner from './components/Banner';
+import MyShop from './components/MyShop';
+import Toolbar from './components/Toolbar';
+import Taro from '@tarojs/taro';
+
+import TodoList from './components/TodoList';
+import useRequestList from '../../hooks/useRequestList';
+import { getIndexPageAction } from '../../request/actions';
+import { useEffect } from 'react';
+import { Modal } from 'antd-mobile';
+
+import styles from './index.module.less';
+
+export default function Index() {
+ const { data } = useRequestList({
+ action: getIndexPageAction
+ });
+
+ useEffect(() => {
+ if (!data) {
+ return;
+ }
+ if (data?.systemMessage && data?.systemMessage?.messageId !== localStorage.getItem('messageId')) {
+ let handler = null;
+ handler = Modal.show({
+ title: '有新的站内新,点击查看详情',
+ showCloseButton: false,
+ actions: [
+ {
+ key: 'view',
+ text: '查看站内信',
+ },
+ ],
+ onAction: action => {
+ if (action.key === 'view') {
+ Taro.navigateTo({
+ url: '/pages/sitemessage/index'
+ });
+ localStorage.setItem('messageId', data.systemMessage?.messageId);
+ handler.close();
+ }
+ }
+ });
+ }
+ }, [data]);
+
+ return (
+
+
+
+
+
+
+
+ )
+}
diff --git a/src/pages/index/index.module.less b/src/pages/index/index.module.less
new file mode 100644
index 0000000..2d29361
--- /dev/null
+++ b/src/pages/index/index.module.less
@@ -0,0 +1,7 @@
+
+.container {
+ background: linear-gradient(180deg, #d7ebfa, #f5f5f5 30vh);
+ height: 100%;
+ box-sizing: border-box;
+ padding: 24px 24px;
+}
diff --git a/src/pages/invite/components/FormBar/index.jsx b/src/pages/invite/components/FormBar/index.jsx
new file mode 100644
index 0000000..617ad9b
--- /dev/null
+++ b/src/pages/invite/components/FormBar/index.jsx
@@ -0,0 +1,88 @@
+import { View } from '@tarojs/components';
+import { Button, Divider, Form } from 'antd-mobile';
+
+import { useEffect, useRef } from 'react';
+import { QRCodeCanvas } from 'qrcode.react';
+import { CopyToClipboard } from 'react-copy-to-clipboard';
+import { useLocalStorageState } from 'ahooks';
+
+import styles from './index.module.less';
+
+const FormUser = ({ value }) => (
+
+
+ 1
+
+
+ {value}
+
+
+);
+
+const FormCopyText = ({ value }) => (
+
+ {value}
+ 复制
+
+);
+
+const QRCode = ({ value }) => {
+ const ref = useRef();
+
+ const handleDownload = () => {
+ const canvas = ref.current;
+ if (canvas) {
+ const imageURL = canvas.toDataURL('image/png'); // 转换为图片数据
+ const link = document.createElement('a');
+ link.href = imageURL;
+ link.download = '邀请码.png';
+ link.click();
+ }
+ };
+
+ return (
+
+
+
+
+ );
+};
+
+export default function FormBar() {
+ const [form] = Form.useForm();
+ const [storage] = useLocalStorageState('userInfo');
+
+ useEffect(() => {
+ const origin = window.location.origin;
+ const invite_code = storage?.shareCode;
+ const invite_url = `${origin}/#/pages/register/index?shareCode=${invite_code}`;
+ form.setFieldsValue({
+ user_info: storage?.telephone,
+ qrcode: invite_url,
+ invite_code,
+ invite_url
+ });
+ }, []);
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ )
+}
diff --git a/src/pages/invite/components/FormBar/index.module.less b/src/pages/invite/components/FormBar/index.module.less
new file mode 100644
index 0000000..8bcbb76
--- /dev/null
+++ b/src/pages/invite/components/FormBar/index.module.less
@@ -0,0 +1,80 @@
+.container {
+ background-color: #fff;
+ border-radius: 18px;
+ margin-top: 72px;
+ padding: 32px 32px 48px 32px;
+
+ .form {
+ :global {
+ .adm-list-body {
+ border-top: unset;
+ }
+
+ .adm-list-item {
+ padding-left: 0;
+ }
+
+ .adm-list-item-content {
+ border: unset;
+ }
+ }
+
+ .user {
+ display: flex;
+ align-items: center;
+
+ .logo {
+ width: 72px;
+ height: 72px;
+ border-radius: 50%;
+ background-color: pink;
+ font-size: 42px;
+ color: #fff;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ margin-right: 18px;
+ }
+
+ .phone {
+ font-weight: 700;
+ font-size: 32px;
+ margin-bottom: 4px;
+ }
+ }
+
+ .qrcode {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+
+ .btn {
+ width: 100%;
+ margin-top: 24px;
+ }
+ }
+
+ .copy {
+ display: flex;
+ background-color: #f8f8f8;
+ padding: 12px;
+ border-radius: 2px;
+ font-size: 24px;
+
+ .text {
+ flex: 1;
+ word-break: break-all;
+ margin-right: 24px;
+ }
+
+ a {
+ flex-basis: 72px;
+ }
+ }
+ }
+
+ .submit {
+ width: 100%;
+ margin-top: 72px;
+ }
+}
diff --git a/src/pages/invite/index.config.js b/src/pages/invite/index.config.js
new file mode 100644
index 0000000..6ce7f9d
--- /dev/null
+++ b/src/pages/invite/index.config.js
@@ -0,0 +1,4 @@
+export default definePageConfig({
+ navigationBarTitleText: '店铺信息',
+ usingComponents: {},
+})
diff --git a/src/pages/invite/index.jsx b/src/pages/invite/index.jsx
new file mode 100644
index 0000000..212b94f
--- /dev/null
+++ b/src/pages/invite/index.jsx
@@ -0,0 +1,31 @@
+import { View } from '@tarojs/components';
+import Taro, { useLoad } from '@tarojs/taro';
+
+import FormBar from './components/FormBar';
+import { NavBar } from 'antd-mobile';
+
+import styles from './index.module.less';
+
+export default function Invite() {
+
+ useLoad(() => {
+ console.log('Page loaded.')
+ });
+
+ const handleBack = () => {
+ Taro.navigateTo({
+ url: '/pages/index/index'
+ });
+ };
+
+ return (
+
+
+ 邀请商户
+
+
+
+
+
+ );
+}
diff --git a/src/pages/invite/index.module.less b/src/pages/invite/index.module.less
new file mode 100644
index 0000000..bfc14af
--- /dev/null
+++ b/src/pages/invite/index.module.less
@@ -0,0 +1,9 @@
+.container {
+ background: linear-gradient(180deg, #d7ebfa, #f5f5f5 30vh);
+ height: 100%;
+
+ .wrapper {
+ box-sizing: border-box;
+ padding: 42px;
+ }
+}
diff --git a/src/pages/login/components/FormBar/index.jsx b/src/pages/login/components/FormBar/index.jsx
new file mode 100644
index 0000000..7651ed8
--- /dev/null
+++ b/src/pages/login/components/FormBar/index.jsx
@@ -0,0 +1,41 @@
+import { View } from '@tarojs/components';
+import { Button, Form, Input } from 'antd-mobile';
+import Taro from '@tarojs/taro';
+import { loginAction } from '../../../../request/actions';
+import { useLocalStorageState } from 'ahooks';
+
+import styles from './index.module.less';
+
+export default function FormBar() {
+ const [form] = Form.useForm();
+ const [, updateStorage] = useLocalStorageState('userInfo', {defaultValue: null});
+
+ const handleLogin = async () => {
+ try {
+ const values = await form.validateFields();
+ const data = await loginAction(values);
+ updateStorage(data);
+ Taro.navigateTo({ url: '/pages/index/index' });
+ }
+ catch (err) {
+ console.log('err: ', err);
+ }
+ };
+
+ return (
+
+
+
+
+
+
+
+
+
+
+ Taro.navigateTo({ url: '/pages/register/index' })}>注册
+
+
+ )
+}
diff --git a/src/pages/login/components/FormBar/index.module.less b/src/pages/login/components/FormBar/index.module.less
new file mode 100644
index 0000000..2b43d03
--- /dev/null
+++ b/src/pages/login/components/FormBar/index.module.less
@@ -0,0 +1,38 @@
+.container {
+ background-color: #fff;
+ border-radius: 18px;
+ margin-top: 72px;
+ padding: 32px 32px 0 32px;
+
+ .form {
+ :global {
+ .adm-list-body {
+ border-top: unset;
+ }
+ .adm-list-item {
+ padding-left: 0;
+ }
+ }
+ }
+
+ .bar {
+ display: flex;
+ justify-content: space-around;
+ padding: 24px 72px;
+
+ .btn {
+ font-size: 24px;
+ flex: 1;
+ text-align: center;
+
+ &:first-child {
+ border-right: 1px solid #eee;
+ }
+ }
+ }
+
+ .submit {
+ width: 100%;
+ margin-top: 72px;
+ }
+}
diff --git a/src/pages/login/components/HeaderBar/index.jsx b/src/pages/login/components/HeaderBar/index.jsx
new file mode 100644
index 0000000..43bab13
--- /dev/null
+++ b/src/pages/login/components/HeaderBar/index.jsx
@@ -0,0 +1,34 @@
+import { View } from '@tarojs/components';
+import { useLoad } from '@tarojs/taro';
+
+import logoSrc from '/assets/icons/logo.png';
+
+import styles from './index.module.less';
+
+export default function HeaderBar() {
+
+ useLoad(() => {
+ console.log('Page loaded.')
+ });
+
+ return (
+
+
+
+ Hi Weaith
+
+
+ 欢迎您来到融易诚
+
+
+
+
+
+
+ 融易诚
+
+
+
+
+ )
+}
diff --git a/src/pages/login/components/HeaderBar/index.module.less b/src/pages/login/components/HeaderBar/index.module.less
new file mode 100644
index 0000000..abdedb7
--- /dev/null
+++ b/src/pages/login/components/HeaderBar/index.module.less
@@ -0,0 +1,42 @@
+.container {
+ .row {
+ .title {
+ font-weight: normal;
+ overflow-wrap: normal;
+ font-size: 42px;
+ color: rgb(48, 49, 51);
+ }
+
+ .subtitle {
+ font-weight: normal;
+ overflow-wrap: normal;
+ font-size: 32px;
+ color: rgb(48, 49, 51);
+ }
+ }
+
+ .row2 {
+ display: flex;
+ justify-content: flex-end;
+
+ .item {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ margin-right: 42px;
+
+ .title {
+ font-weight: normal;
+ overflow-wrap: normal;
+ font-size: 32px;
+ color: rgb(48, 49, 51);
+ text-align: center;
+ }
+ .logo {
+ width: 120px;
+ }
+ }
+
+
+ }
+}
diff --git a/src/pages/login/index.config.js b/src/pages/login/index.config.js
new file mode 100644
index 0000000..86e32a5
--- /dev/null
+++ b/src/pages/login/index.config.js
@@ -0,0 +1,4 @@
+export default definePageConfig({
+ navigationBarTitleText: '登录',
+ usingComponents: {},
+})
diff --git a/src/pages/login/index.jsx b/src/pages/login/index.jsx
new file mode 100644
index 0000000..56cad78
--- /dev/null
+++ b/src/pages/login/index.jsx
@@ -0,0 +1,21 @@
+import { View } from '@tarojs/components';
+import { useLoad } from '@tarojs/taro';
+
+import HeaderBar from './components/HeaderBar';
+import FormBar from './components/FormBar';
+
+import styles from './index.module.less';
+
+export default function Login() {
+
+ useLoad(() => {
+ console.log('Page loaded.')
+ });
+
+ return (
+
+
+
+
+ )
+}
diff --git a/src/pages/login/index.module.less b/src/pages/login/index.module.less
new file mode 100644
index 0000000..d23b6f6
--- /dev/null
+++ b/src/pages/login/index.module.less
@@ -0,0 +1,47 @@
+.container {
+ background: linear-gradient(180deg, #d7ebfa, #f5f5f5 30vh);
+ height: 100%;
+ box-sizing: border-box;
+ padding: 120px 42px;
+
+ .row {
+ .title {
+ font-weight: normal;
+ overflow-wrap: normal;
+ font-size: 42px;
+ color: rgb(48, 49, 51);
+ }
+
+ .subtitle {
+ font-weight: normal;
+ overflow-wrap: normal;
+ font-size: 32px;
+ color: rgb(48, 49, 51);
+ }
+ }
+
+ .row2 {
+ display: flex;
+ justify-content: flex-end;
+
+ .item {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ margin-right: 42px;
+
+ .title {
+ font-weight: normal;
+ overflow-wrap: normal;
+ font-size: 32px;
+ color: rgb(48, 49, 51);
+ text-align: center;
+ }
+ .logo {
+ width: 120px;
+ }
+ }
+
+
+ }
+}
diff --git a/src/pages/mine/components/DataPanel/index.jsx b/src/pages/mine/components/DataPanel/index.jsx
new file mode 100644
index 0000000..dc93260
--- /dev/null
+++ b/src/pages/mine/components/DataPanel/index.jsx
@@ -0,0 +1,49 @@
+import { View } from '@tarojs/components';
+import { AddCircleOutline, RightOutline } from 'antd-mobile-icons';
+import Taro from '@tarojs/taro';
+
+import styles from './index.module.less';
+
+export default function DataPanel({ in: _in, out, fee }) {
+
+ return (
+
+ Taro.switchTab({ url: '/pages/dataset/index' })}>
+
+
+ 数据优化
+
+
+ 查看订单
+
+
+
+
+
+
+ 收单
+
+
+ ¥ {_in || 0}
+
+
+
+
+ 出单
+
+
+ ¥ {out || 0}
+
+
+
+
+ 数据优化费
+
+
+ ¥ {fee || 0}
+
+
+
+
+ )
+}
diff --git a/src/pages/mine/components/DataPanel/index.module.less b/src/pages/mine/components/DataPanel/index.module.less
new file mode 100644
index 0000000..ffe4fd7
--- /dev/null
+++ b/src/pages/mine/components/DataPanel/index.module.less
@@ -0,0 +1,57 @@
+.container {
+ background-color: #fff;
+ border-radius: 18px;
+ margin-top: 52px;
+
+ .header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 24px 32px;
+ border-bottom: 1px solid #f5f5f5;
+
+ .left {
+ display: flex;
+ align-items: center;
+ font-size: 32px;
+ color: #333;
+
+ .icon {
+ margin-right: 12px;
+ font-size: 42px;
+ }
+ }
+
+ .right {
+ display: flex;
+ align-items: center;
+ font-size: 24px;
+ color: #999;
+
+ .icon {
+ margin-left: 12px;
+ }
+ }
+ }
+
+ .content {
+ display: flex;
+ justify-content: space-around;
+ padding: 24px 32px;
+
+ .card {
+ .title {
+ font-size: 32px;
+ text-align: center;
+ color: #999;
+ margin-bottom: 12px;
+ }
+
+ .subtitle {
+ font-size: 32px;
+ text-align: center;
+ color: #333;
+ }
+ }
+ }
+}
diff --git a/src/pages/mine/components/HeaderBar/index.jsx b/src/pages/mine/components/HeaderBar/index.jsx
new file mode 100644
index 0000000..cc9efe1
--- /dev/null
+++ b/src/pages/mine/components/HeaderBar/index.jsx
@@ -0,0 +1,24 @@
+import { View } from '@tarojs/components';
+import { RightOutline } from 'antd-mobile-icons';
+import Taro from '@tarojs/taro';
+
+import kefuSrc from '/assets/icons/kefu.svg';
+import settingSrc from '/assets/icons/setting.svg';
+
+import styles from './index.module.less';
+
+export default function HeaderBar() {
+
+ return (
+
+ Taro.navigateTo({ url: '/pages/safe/index' })}>
+ 用户保护中心
+
+
+
+
Taro.navigateTo({ url: '/pages/feedback/index' })} />
+ {/*
*/}
+
+
+ )
+}
diff --git a/src/pages/mine/components/HeaderBar/index.module.less b/src/pages/mine/components/HeaderBar/index.module.less
new file mode 100644
index 0000000..0d7cc26
--- /dev/null
+++ b/src/pages/mine/components/HeaderBar/index.module.less
@@ -0,0 +1,22 @@
+.container {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 0 24px;
+
+ .left {
+ display: flex;
+ align-items: center;
+ font-size: 28px;
+ color: #6a6a6a;
+ }
+
+ .right {
+ display: flex;
+
+ img {
+ width: 42px;
+ margin-left: 18px;
+ }
+ }
+}
diff --git a/src/pages/mine/components/TodoList/index.jsx b/src/pages/mine/components/TodoList/index.jsx
new file mode 100644
index 0000000..62915d9
--- /dev/null
+++ b/src/pages/mine/components/TodoList/index.jsx
@@ -0,0 +1,40 @@
+
+import Taro from '@tarojs/taro';
+import { View } from '@tarojs/components';
+import { List } from 'antd-mobile';
+import { PayCircleOutline, TeamOutline, EditSOutline, ScanningOutline, GiftOutline } from 'antd-mobile-icons';
+
+import styles from './index.module.less';
+
+const TodoList = () => {
+
+ return (
+
+
+ } onClick={() => Taro.navigateTo({ url: '/pages/funds/index' })}>
+ 资产管理
+
+ } onClick={() => Taro.navigateTo({ url: '/pages/team/index' })}>
+ 团队矩阵
+
+ } onClick={() => Taro.navigateTo({ url: '/pages/viplevelup/index' })}>
+ 会员升级
+
+ } onClick={() => Taro.navigateTo({ url: '/pages/shopinfo/index' })}>
+ 编辑店铺
+
+ } onClick={() => Taro.navigateTo({ url: '/pages/paymentmethod/index' })}>
+ 支付方式
+
+ } onClick={() => Taro.navigateTo({ url: '/pages/myfeedback/index' })}>
+ 我的反馈
+
+ } onClick={() => Taro.navigateTo({ url: '/pages/sitemessage/index' })}>
+ 站内信
+
+
+
+ );
+};
+
+export default TodoList;
diff --git a/src/pages/mine/components/TodoList/index.module.less b/src/pages/mine/components/TodoList/index.module.less
new file mode 100644
index 0000000..10e0f85
--- /dev/null
+++ b/src/pages/mine/components/TodoList/index.module.less
@@ -0,0 +1,34 @@
+.container {
+ padding: 12px 24px 32px 24px;
+ border-radius: 12px;
+ background-color: #fff;
+ margin-top: 32px;
+
+ .title {
+ .text {
+ font-size: 28px;
+ font-weight: 500;
+ color: #333;
+ padding: 12px 0;
+ border-bottom: 4px solid #007AFF;
+ }
+ }
+
+ .list {
+ margin-top: 18px;
+
+ >* {
+ font-size: 32px !important;
+ }
+
+ .icon {
+ font-size: 32px;
+ }
+
+ :global {
+ .adm-list-body {
+ border: unset !important;
+ }
+ }
+ }
+}
diff --git a/src/pages/mine/components/UserBar/index.jsx b/src/pages/mine/components/UserBar/index.jsx
new file mode 100644
index 0000000..dc1e50e
--- /dev/null
+++ b/src/pages/mine/components/UserBar/index.jsx
@@ -0,0 +1,43 @@
+import { View } from '@tarojs/components';
+import { RightOutline } from 'antd-mobile-icons';
+import { Space, Tag } from 'antd-mobile';
+
+import styles from './index.module.less';
+import Taro from '@tarojs/taro';
+
+export default function UserBar({ level, nickName, telephone, userId }) {
+
+ return (
+
+
+
+ {nickName && nickName.charAt(0)}
+
+
+
+ {nickName}
+ {level === '注册会员' && (
+ {level}
+ )}
+
+
+
+ {telephone}
+
+
+ {userId}
+
+
+
+
+ {
+ Taro.navigateTo({
+ url: '/pages/invite/index'
+ });
+ }}
+ />
+
+ )
+}
diff --git a/src/pages/mine/components/UserBar/index.module.less b/src/pages/mine/components/UserBar/index.module.less
new file mode 100644
index 0000000..16619d3
--- /dev/null
+++ b/src/pages/mine/components/UserBar/index.module.less
@@ -0,0 +1,59 @@
+.container {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-top: 32px;
+ padding: 0 24px;
+
+ .left {
+ display: flex;
+ align-items: center;
+
+ .logo {
+ width: 98px;
+ height: 98px;
+ border-radius: 10px;
+ background-color: pink;
+ font-size: 42px;
+ color: #fff;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ margin-right: 18px;
+ }
+
+ .info {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: flex-start;
+
+ .title {
+ font-weight: 700;
+ font-size: 32px;
+ margin-bottom: 4px;
+ }
+
+ .tag {
+ margin-left: 12px;
+ position: relative;
+ top: -2px;
+ font-size: 20px;
+ }
+
+ .subtitle {
+ font-size: 24px;
+ background-color: #cde1fd;
+ border-radius: 24px;
+ color: #3a3a3a;
+ display: block;
+ padding: 4px 12px;
+ }
+ }
+ }
+
+ .icon {
+ color: rgb(96, 98, 102);
+ font-size: 32px;
+ }
+}
diff --git a/src/pages/mine/index.config.js b/src/pages/mine/index.config.js
new file mode 100644
index 0000000..a914d80
--- /dev/null
+++ b/src/pages/mine/index.config.js
@@ -0,0 +1,4 @@
+export default definePageConfig({
+ navigationBarTitleText: '我的',
+ usingComponents: {},
+})
diff --git a/src/pages/mine/index.jsx b/src/pages/mine/index.jsx
new file mode 100644
index 0000000..017f953
--- /dev/null
+++ b/src/pages/mine/index.jsx
@@ -0,0 +1,63 @@
+import { View } from '@tarojs/components';
+import Taro from '@tarojs/taro';
+import HeaderBar from './components/HeaderBar';
+import UserBar from './components/UserBar';
+import DataPanel from './components/DataPanel';
+import TodoList from './components/TodoList';
+import { Button, Modal } from 'antd-mobile';
+
+import useRequestList from '../../hooks/useRequestList';
+import { userCenterAction } from '../../request/actions';
+import { useEffect } from 'react';
+
+import styles from './index.module.less';
+
+export default function Mine() {
+ const { data } = useRequestList({
+ action: userCenterAction
+ });
+
+ const handleLogout = () => {
+ localStorage.clear();
+ Taro.navigateTo({ url: '/pages/login/index' })
+ };
+
+ useEffect(() => {
+ if (!data) {
+ return;
+ }
+ if (data?.systemMessage && data?.systemMessage?.messageId !== localStorage.getItem('messageId')) {
+ let handler = null;
+ handler = Modal.show({
+ title: '有新的站内新,点击查看详情',
+ showCloseButton: false,
+ actions: [
+ {
+ key: 'view',
+ text: '查看站内信',
+ },
+ ],
+ onAction: action => {
+ console.log('action: ', action);
+ if (action.key === 'view') {
+ handler.close();
+ Taro.navigateTo({
+ url: '/pages/sitemessage/index'
+ });
+ localStorage.setItem('messageId', data.systemMessage?.messageId);
+ }
+ }
+ });
+ }
+ }, [data]);
+
+ return (
+
+
+
+
+
+
+
+ )
+}
diff --git a/src/pages/mine/index.module.less b/src/pages/mine/index.module.less
new file mode 100644
index 0000000..fb0455c
--- /dev/null
+++ b/src/pages/mine/index.module.less
@@ -0,0 +1,11 @@
+.container {
+ background: linear-gradient(180deg, #d7ebfa, #f5f5f5 30vh);
+ height: 100%;
+ box-sizing: border-box;
+ padding: 24px 24px;
+
+ .btn {
+ width: 100%;
+ margin-top: 32px;
+ }
+}
diff --git a/src/pages/myfeedback/index.config.js b/src/pages/myfeedback/index.config.js
new file mode 100644
index 0000000..3fbd457
--- /dev/null
+++ b/src/pages/myfeedback/index.config.js
@@ -0,0 +1,4 @@
+export default definePageConfig({
+ navigationBarTitleText: '系统反馈',
+ usingComponents: {},
+})
diff --git a/src/pages/myfeedback/index.jsx b/src/pages/myfeedback/index.jsx
new file mode 100644
index 0000000..8dfb1bf
--- /dev/null
+++ b/src/pages/myfeedback/index.jsx
@@ -0,0 +1,57 @@
+import { View } from '@tarojs/components';
+import Taro, { useLoad } from '@tarojs/taro';
+
+import { Empty, List, NavBar, PullToRefresh, Tag } from 'antd-mobile';
+import useRequestList from '/hooks/useRequestList';
+import { feedbackListAction } from '../../request/actions';
+
+import styles from './index.module.less';
+
+export default function MyFeedback() {
+ const { data, getDataTask } = useRequestList({
+ action: feedbackListAction
+ });
+
+ useLoad(() => {
+ console.log('Page loaded.')
+ });
+
+ const handleBack = () => {
+ Taro.navigateTo({
+ url: '/pages/mine/index'
+ });
+ };
+
+ return (
+
+
+ 系统反馈
+
+ {
+ getDataTask();
+ }}
+ >
+
+ {data?.dataList?.length > 0 ? (
+
+ {data?.dataList?.map((item, index) => (
+
+
+ {item.contents}
+
+ {item.createTime}
+
+ ))}
+
+ ) : (
+
+ )}
+
+
+
+ );
+}
diff --git a/src/pages/myfeedback/index.module.less b/src/pages/myfeedback/index.module.less
new file mode 100644
index 0000000..c0eb62c
--- /dev/null
+++ b/src/pages/myfeedback/index.module.less
@@ -0,0 +1,16 @@
+.container {
+ background: linear-gradient(180deg, #d7ebfa, #f5f5f5 30vh);
+ height: 100%;
+
+ .wrapper {
+ box-sizing: border-box;
+ padding: 42px;
+
+ .content {
+ word-break: break-all;
+ line-height: 42px;
+ font-size: 28px;
+ margin-top: 12px;
+ }
+ }
+}
diff --git a/src/pages/notice-detail/components/Content/index.jsx b/src/pages/notice-detail/components/Content/index.jsx
new file mode 100644
index 0000000..9e81dda
--- /dev/null
+++ b/src/pages/notice-detail/components/Content/index.jsx
@@ -0,0 +1,48 @@
+import { View } from '@tarojs/components';
+import { BellOutline } from 'antd-mobile-icons';
+import useRequestList from '../../../../hooks/useRequestList';
+import { noticeAction } from '../../../../request/actions';
+import { useEffect } from 'react';
+
+import styles from './index.module.less';
+import { getUrlParam } from '../../../../utils';
+
+const Content = () => {
+ const { data, getDataTask } = useRequestList({
+ immediate: false,
+ action: noticeAction
+ });
+
+ useEffect(() => {
+ const noticeId = getUrlParam('noticeId');
+ if (noticeId) {
+ getDataTask({
+ noticeId
+ });
+ }
+ }, []);
+
+ return (
+
+
+
+
+ {data?.title}
+
+
+
+ {data?.createTime}
+
+
+ {data?.author}
+
+
+
+
+
+
+
+ )
+};
+
+export default Content;
diff --git a/src/pages/notice-detail/components/Content/index.module.less b/src/pages/notice-detail/components/Content/index.module.less
new file mode 100644
index 0000000..0bb839c
--- /dev/null
+++ b/src/pages/notice-detail/components/Content/index.module.less
@@ -0,0 +1,46 @@
+.container {}
+
+.card {
+ margin: 24px;
+ border-radius: 12px;
+ padding: 24px;
+
+ .top {
+ font-size: 28px;
+ font-weight: bolder;
+ line-height: 1.5;
+ margin-bottom: 12px;
+
+ .icon {
+ color: var(--color-primary);
+ margin-right: 12px;
+ }
+ }
+
+ .extra {
+ display: flex;
+ justify-content: space-between;
+ margin-bottom: 24px;
+
+ .datetime {
+ color: #999;
+ font-size: 24px;
+ }
+
+ .tag {
+ color: var(--color-primary);
+ font-size: 24px;
+ background-color: rgba(41, 121, 255, .1);
+ padding: 2px 12px;
+ border-radius: 4px;
+ }
+ }
+
+ .center {
+ font-size: 24px;
+ line-height: 42px;
+ color: #666;
+ margin-bottom: 24px;
+ }
+
+}
diff --git a/src/pages/notice-detail/index.config.js b/src/pages/notice-detail/index.config.js
new file mode 100644
index 0000000..82a98ed
--- /dev/null
+++ b/src/pages/notice-detail/index.config.js
@@ -0,0 +1,4 @@
+export default definePageConfig({
+ navigationBarTitleText: '详情',
+ usingComponents: {},
+})
diff --git a/src/pages/notice-detail/index.jsx b/src/pages/notice-detail/index.jsx
new file mode 100644
index 0000000..5aaafc2
--- /dev/null
+++ b/src/pages/notice-detail/index.jsx
@@ -0,0 +1,27 @@
+import { View } from '@tarojs/components';
+import Taro, { useLoad } from '@tarojs/taro';
+
+import { NavBar } from 'antd-mobile';
+import Content from './components/Content';
+
+import styles from './index.module.less';
+
+export default function NoticeDetail() {
+
+ useLoad(() => {
+ console.log('Page loaded.');
+ });
+
+ const handleBack = () => {
+ Taro.navigateBack();
+ };
+
+ return (
+
+
+ 详情
+
+
+
+ )
+}
diff --git a/src/pages/notice-detail/index.module.less b/src/pages/notice-detail/index.module.less
new file mode 100644
index 0000000..87563f3
--- /dev/null
+++ b/src/pages/notice-detail/index.module.less
@@ -0,0 +1,17 @@
+.container {
+ position: relative;
+ background: linear-gradient(180deg, #d7ebfa, #f5f5f5 30vh);
+ height: 100%;
+
+ .list {
+ height: calc(100vh - 82px - 120px);
+ background-color: transparent;
+
+ :global {
+ .adm-list-body {
+ border-top: unset;
+ background-color: transparent;
+ }
+ }
+ }
+}
diff --git a/src/pages/notice/components/DataList/index.jsx b/src/pages/notice/components/DataList/index.jsx
new file mode 100644
index 0000000..4ec7b68
--- /dev/null
+++ b/src/pages/notice/components/DataList/index.jsx
@@ -0,0 +1,60 @@
+import { PullToRefresh, Empty } from 'antd-mobile';
+import { View } from '@tarojs/components';
+import { BellOutline } from 'antd-mobile-icons';
+
+import useRequestList from '../../../../hooks/useRequestList';
+import { noticeListAction } from '../../../../request/actions';
+import Taro from '@tarojs/taro';
+
+import styles from './index.module.less';
+
+const renderItem = item => (
+ Taro.navigateTo({url: `/pages/notice-detail/index?noticeId=${item.noticeId}`})}>
+
+
+ {item.title}
+
+
+ {item.contents}
+
+
+
+ {item.createTime}
+
+
+ {item.author}
+
+
+
+);
+
+const DataList = ({ className }) => {
+ const { data, getDataTask } = useRequestList({
+ action: noticeListAction
+ });
+
+ const dataSource = data?.dataList;
+
+ return (
+ {
+ await getDataTask();
+ }}
+ >
+
+ {dataSource?.length > 0 ? (
+
+ {dataSource?.map(renderItem)}
+
+ ) : (
+
+ )}
+
+
+ )
+};
+
+export default DataList;
diff --git a/src/pages/notice/components/DataList/index.module.less b/src/pages/notice/components/DataList/index.module.less
new file mode 100644
index 0000000..ad694cb
--- /dev/null
+++ b/src/pages/notice/components/DataList/index.module.less
@@ -0,0 +1,43 @@
+.card {
+ background-color: #fff;
+ margin: 24px;
+ border-radius: 12px;
+ padding: 24px;
+
+ .top {
+ font-size: 28px;
+ font-weight: bolder;
+ line-height: 1.5;
+ margin-bottom: 12px;
+
+ .icon {
+ color: var(--color-primary);
+ margin-right: 12px;
+ }
+ }
+
+ .center {
+ font-size: 24px;
+ line-height: 42px;
+ color: #666;
+ margin-bottom: 24px;
+ }
+
+ .footer {
+ display: flex;
+ justify-content: space-between;
+
+ .datetime {
+ color: #999;
+ font-size: 24px;
+ }
+
+ .tag {
+ color: var(--color-primary);
+ font-size: 24px;
+ background-color: rgba(41, 121, 255, .1);
+ padding: 2px 12px;
+ border-radius: 4px;
+ }
+ }
+}
diff --git a/src/pages/notice/index.config.js b/src/pages/notice/index.config.js
new file mode 100644
index 0000000..1b0e98b
--- /dev/null
+++ b/src/pages/notice/index.config.js
@@ -0,0 +1,4 @@
+export default definePageConfig({
+ navigationBarTitleText: '公告通知',
+ usingComponents: {},
+})
diff --git a/src/pages/notice/index.jsx b/src/pages/notice/index.jsx
new file mode 100644
index 0000000..cd97752
--- /dev/null
+++ b/src/pages/notice/index.jsx
@@ -0,0 +1,27 @@
+import { View } from '@tarojs/components';
+import Taro, { useLoad } from '@tarojs/taro';
+
+import DataList from './components/DataList';
+
+import styles from './index.module.less';
+import { NavBar } from 'antd-mobile';
+
+export default function Notice() {
+
+ useLoad(() => {
+ console.log('Page loaded.');
+ });
+
+ const handleBack = () => {
+ Taro.navigateBack();
+ };
+
+ return (
+
+
+ 公告通知
+
+
+
+ )
+}
diff --git a/src/pages/notice/index.module.less b/src/pages/notice/index.module.less
new file mode 100644
index 0000000..87563f3
--- /dev/null
+++ b/src/pages/notice/index.module.less
@@ -0,0 +1,17 @@
+.container {
+ position: relative;
+ background: linear-gradient(180deg, #d7ebfa, #f5f5f5 30vh);
+ height: 100%;
+
+ .list {
+ height: calc(100vh - 82px - 120px);
+ background-color: transparent;
+
+ :global {
+ .adm-list-body {
+ border-top: unset;
+ background-color: transparent;
+ }
+ }
+ }
+}
diff --git a/src/pages/payconfirm/components/Alipay/index.jsx b/src/pages/payconfirm/components/Alipay/index.jsx
new file mode 100644
index 0000000..155cb24
--- /dev/null
+++ b/src/pages/payconfirm/components/Alipay/index.jsx
@@ -0,0 +1,42 @@
+import { View } from '@tarojs/components';
+import { Form } from 'antd-mobile';
+import FormLabel from '/components/FormLabel';
+import FormImage from '/components/FormImage';
+
+import styles from './index.module.less';
+
+export default function Alipay({ namePrefix }) {
+
+ return (
+
+
+
+
+
+
+
+
+
+
+ {/*
+
+ */}
+
+ )
+}
diff --git a/src/pages/payconfirm/components/Alipay/index.module.less b/src/pages/payconfirm/components/Alipay/index.module.less
new file mode 100644
index 0000000..11be4b3
--- /dev/null
+++ b/src/pages/payconfirm/components/Alipay/index.module.less
@@ -0,0 +1,3 @@
+.container {
+
+}
diff --git a/src/pages/payconfirm/components/BankPay/index.jsx b/src/pages/payconfirm/components/BankPay/index.jsx
new file mode 100644
index 0000000..2941289
--- /dev/null
+++ b/src/pages/payconfirm/components/BankPay/index.jsx
@@ -0,0 +1,41 @@
+import { View } from '@tarojs/components';
+import { Form } from 'antd-mobile';
+import FormLabel from '/components/FormLabel';
+
+import styles from './index.module.less';
+
+export default function BankPay({ namePrefix }) {
+
+ return (
+
+
+
+
+
+
+
+
+
+
+ {/*
+
+ */}
+
+ )
+}
diff --git a/src/pages/payconfirm/components/BankPay/index.module.less b/src/pages/payconfirm/components/BankPay/index.module.less
new file mode 100644
index 0000000..4851408
--- /dev/null
+++ b/src/pages/payconfirm/components/BankPay/index.module.less
@@ -0,0 +1,2 @@
+.container {
+}
diff --git a/src/pages/payconfirm/components/FormBar/index.jsx b/src/pages/payconfirm/components/FormBar/index.jsx
new file mode 100644
index 0000000..c5b614b
--- /dev/null
+++ b/src/pages/payconfirm/components/FormBar/index.jsx
@@ -0,0 +1,180 @@
+
+import React from 'react';
+import { View } from '@tarojs/components';
+import { Button, Form, Modal, Toast, CapsuleTabs } from 'antd-mobile';
+
+import FormImage from '/components/FormImage';
+import FormLabel from '/components/FormLabel';
+import { useEffect } from 'react';
+import { getOrderInfoAction } from '/request/actions';
+import { getUrlParam } from '/utils';
+import Taro from '@tarojs/taro';
+
+import Alipay from '../Alipay';
+import Wxpay from '../Wxpay';
+import BankPay from '../BankPay';
+
+import aliSrc from '/assets/icons/ali.svg';
+import wxSrc from '/assets/icons/wx.svg';
+import bankSrc from '/assets/icons/bank.svg';
+import { orderPayAction } from '/request/actions';
+
+import styles from './index.module.less';
+
+const TabItem = ({ src, text }) => (
+
+
+ {text}
+
+);
+
+export default function FormBar() {
+ const [form] = Form.useForm();
+
+ useEffect(() => {
+ getOrderInfoAction({
+ orderId: getUrlParam('orderId')
+ }).then(res => {
+ const orderShopInfo = res.orderShopInfo;
+ const feeShopInfo = res.feeShopInfo;
+ const _orderShopInfo = Object.keys(orderShopInfo).reduce((res, key) => {
+ return {
+ ...res,
+ [`pay-${key}`]: orderShopInfo[key]
+ }
+ }, {});
+ const _feeShopInfo = Object.keys(orderShopInfo).reduce((res, key) => {
+ return {
+ ...res,
+ [`fee-${key}`]: feeShopInfo[key]
+ }
+ }, {});
+ console.log('aa: ', {
+ ...res,
+ ..._orderShopInfo,
+ ..._feeShopInfo
+ });
+ form.setFieldsValue({
+ ...res,
+ ..._orderShopInfo,
+ ..._feeShopInfo
+ });
+ });
+ }, []);
+
+ const handleSubmit = async () => {
+ try {
+ const values = await form.validateFields();
+ Modal.confirm({
+ title: '是否确认支付?',
+ onConfirm: async () => {
+ const orderId = getUrlParam('orderId');
+ await orderPayAction({
+ orderId,
+ payImage: values.payImage,
+ feeImage: values.feeImage
+ });
+ Toast.show({
+ icon: 'success',
+ content: '支付成功'
+ });
+ Taro.navigateTo({
+ url: '/pages/dataset/index'
+ });
+ }
+ });
+ }
+ catch (err) {
+ console.log('err: ', err);
+ }
+ };
+
+ const way = Form.useWatch('way', form);
+ const feeway = Form.useWatch('feeway', form);
+
+ const detailRenderer = React.useMemo(() => {
+ return {
+ alipay: ,
+ wx: ,
+ bank:
+ }[way];
+ }, [way]);
+
+ const feeDetailRenderer = React.useMemo(() => {
+ return {
+ alipay: ,
+ wx: ,
+ bank:
+ }[feeway];
+ }, [feeway]);
+
+ return (
+
+
+
+
+
+
+
+
+ `¥${val || 0}`} />
+
+
+
+ } key='alipay' />
+ } key='wx' />
+ } key='bank' />
+
+
+ {detailRenderer}
+
+
+
+
+ 服务费信息
+
+
+ `¥${val || 0}`} />
+
+
+
+ } key='alipay' />
+ } key='wx' />
+ } key='bank' />
+
+
+ {feeDetailRenderer}
+
+
+
+
+
+
+ )
+}
diff --git a/src/pages/payconfirm/components/FormBar/index.module.less b/src/pages/payconfirm/components/FormBar/index.module.less
new file mode 100644
index 0000000..b445d34
--- /dev/null
+++ b/src/pages/payconfirm/components/FormBar/index.module.less
@@ -0,0 +1,71 @@
+.container {
+ background-color: #fff;
+ border-radius: 18px;
+ padding: 32px 32px 48px 32px;
+
+ .tabitem {
+ font-size: 24px;
+ display: flex;
+ align-items: center;
+
+ img {
+ width: 28px;
+ margin-right: 8px;
+ }
+ }
+
+ .btn {
+ width: 100%;
+ margin-top: 24px;
+ }
+
+ .title {
+ font-size: 28px;
+ font-weight: 600;
+ margin: 24px 0;
+ }
+
+ .margin {
+ margin-top: 32px;
+ }
+
+ .submit {
+ width: 100%;
+ margin-top: 72px;
+ }
+
+ :global {
+ .adm-capsule-tabs-header {
+ padding: 0;
+ }
+
+ .adm-list-item-content-prefix {
+ width: 158px;
+ }
+
+ .adm-capsule-tabs-tab {
+ padding: 8px;
+ border-radius: 6px;
+ border: 1px solid transparent;
+ transition: all .2s ease-in-out;
+ }
+
+ .adm-capsule-tabs-tab-active {
+ color: var(--color-primary);
+ background-color: #f0f9ff;
+ border-color: var(--color-primary);
+ }
+
+ .adm-list-body {
+ border-top: unset;
+ }
+
+ .adm-list-item {
+ padding-left: 0;
+ }
+
+ .adm-list-item-content {
+ border-top: unset;
+ }
+ }
+}
diff --git a/src/pages/payconfirm/components/Wxpay/index.jsx b/src/pages/payconfirm/components/Wxpay/index.jsx
new file mode 100644
index 0000000..c5d4f11
--- /dev/null
+++ b/src/pages/payconfirm/components/Wxpay/index.jsx
@@ -0,0 +1,42 @@
+import { View } from '@tarojs/components';
+import { Form } from 'antd-mobile';
+import FormLabel from '/components/FormLabel';
+import FormImage from '/components/FormImage';
+
+import styles from './index.module.less';
+
+export default function Wxpay({ namePrefix }) {
+
+ return (
+
+
+
+
+
+
+
+
+
+
+ {/*
+
+ */}
+
+ )
+}
diff --git a/src/pages/payconfirm/components/Wxpay/index.module.less b/src/pages/payconfirm/components/Wxpay/index.module.less
new file mode 100644
index 0000000..4851408
--- /dev/null
+++ b/src/pages/payconfirm/components/Wxpay/index.module.less
@@ -0,0 +1,2 @@
+.container {
+}
diff --git a/src/pages/payconfirm/index.config.js b/src/pages/payconfirm/index.config.js
new file mode 100644
index 0000000..1419ba4
--- /dev/null
+++ b/src/pages/payconfirm/index.config.js
@@ -0,0 +1,4 @@
+export default definePageConfig({
+ navigationBarTitleText: '确认支付',
+ usingComponents: {},
+})
diff --git a/src/pages/payconfirm/index.jsx b/src/pages/payconfirm/index.jsx
new file mode 100644
index 0000000..27091aa
--- /dev/null
+++ b/src/pages/payconfirm/index.jsx
@@ -0,0 +1,25 @@
+import { View } from '@tarojs/components';
+import Taro from '@tarojs/taro';
+
+import FormBar from './components/FormBar';
+import { NavBar } from 'antd-mobile';
+
+import styles from './index.module.less';
+
+export default function ShopInfo() {
+
+ const handleBack = () => {
+ Taro.navigateTo({
+ url: '/pages/dataset/index'
+ });
+ };
+
+ return (
+
+ 确认支付
+
+
+
+
+ )
+}
diff --git a/src/pages/payconfirm/index.module.less b/src/pages/payconfirm/index.module.less
new file mode 100644
index 0000000..e32d392
--- /dev/null
+++ b/src/pages/payconfirm/index.module.less
@@ -0,0 +1,10 @@
+.container {
+ background: linear-gradient(180deg, #d7ebfa, #f5f5f5 30vh);
+ height: 100%;
+ overflow-y: auto;
+
+ .wrapper {
+ box-sizing: border-box;
+ padding: 42px;
+ }
+}
diff --git a/src/pages/payforget/components/FormBar/index.jsx b/src/pages/payforget/components/FormBar/index.jsx
new file mode 100644
index 0000000..46af64b
--- /dev/null
+++ b/src/pages/payforget/components/FormBar/index.jsx
@@ -0,0 +1,93 @@
+import { View } from '@tarojs/components';
+import { Button, Form, Input, Toast } from 'antd-mobile';
+import { useState } from 'react';
+import Taro from '@tarojs/taro';
+
+import styles from './index.module.less';
+import { editPayPasswordAction } from '../../../../request/actions';
+
+export default function FormBar() {
+ const [form] = Form.useForm();
+
+ const [countdown, setCountdown] = useState(60);
+ const [isCounting, setIsCounting] = useState(false);
+
+ const sendVerificationCode = () => {
+ if (isCounting) {
+ return;
+ }
+ setIsCounting(true);
+ // Simulate sending verification code
+ console.log('Sending verification code...');
+ const interval = setInterval(() => {
+ setCountdown(prev => {
+ if (prev <= 1) {
+ clearInterval(interval);
+ setIsCounting(false);
+ return 60; // Reset countdown
+ }
+ return prev - 1;
+ });
+ }, 1000);
+ };
+
+
+ const handleLogin = async () => {
+ try {
+ const values = await form.validateFields();
+ await editPayPasswordAction(values);
+ Toast.show({
+ icon: 'success',
+ content: '密码修改成功'
+ });
+ Taro.navigateBack();
+ }
+ catch (err) {
+ console.log('err: ', err);
+ }
+ };
+
+ return (
+
+
+
+
+
+
+
+ {/*
+ {isCounting ? `(${countdown}秒后重新获取)` : '发送验证码'}
+
+ }
+ >
+
+ */}
+
+
+
+ )
+}
diff --git a/src/pages/payforget/components/FormBar/index.module.less b/src/pages/payforget/components/FormBar/index.module.less
new file mode 100644
index 0000000..c7b087b
--- /dev/null
+++ b/src/pages/payforget/components/FormBar/index.module.less
@@ -0,0 +1,46 @@
+.container {
+ background-color: #fff;
+ border-radius: 18px;
+ margin-top: 72px;
+ padding: 32px;
+
+ .form {
+ :global {
+ .adm-list-body {
+ border-top: unset;
+ }
+
+ .adm-list-item {
+ padding-left: 0;
+ }
+ }
+
+ .extra {
+ color: #007AFF;
+ position: relative;
+ font-size: 24px;
+ top: 24px;
+ }
+ }
+
+ .bar {
+ display: flex;
+ justify-content: center;
+ padding: 24px 72px;
+
+ .btn {
+ font-size: 24px;
+ flex: 1;
+ text-align: center;
+
+ &:first-child {
+ border-right: 1px solid #eee;
+ }
+ }
+ }
+
+ .submit {
+ width: 100%;
+ margin-top: 72px;
+ }
+}
diff --git a/src/pages/payforget/components/HeaderBar/index.jsx b/src/pages/payforget/components/HeaderBar/index.jsx
new file mode 100644
index 0000000..43bab13
--- /dev/null
+++ b/src/pages/payforget/components/HeaderBar/index.jsx
@@ -0,0 +1,34 @@
+import { View } from '@tarojs/components';
+import { useLoad } from '@tarojs/taro';
+
+import logoSrc from '/assets/icons/logo.png';
+
+import styles from './index.module.less';
+
+export default function HeaderBar() {
+
+ useLoad(() => {
+ console.log('Page loaded.')
+ });
+
+ return (
+
+
+
+ Hi Weaith
+
+
+ 欢迎您来到融易诚
+
+
+
+
+
+
+ 融易诚
+
+
+
+
+ )
+}
diff --git a/src/pages/payforget/components/HeaderBar/index.module.less b/src/pages/payforget/components/HeaderBar/index.module.less
new file mode 100644
index 0000000..abdedb7
--- /dev/null
+++ b/src/pages/payforget/components/HeaderBar/index.module.less
@@ -0,0 +1,42 @@
+.container {
+ .row {
+ .title {
+ font-weight: normal;
+ overflow-wrap: normal;
+ font-size: 42px;
+ color: rgb(48, 49, 51);
+ }
+
+ .subtitle {
+ font-weight: normal;
+ overflow-wrap: normal;
+ font-size: 32px;
+ color: rgb(48, 49, 51);
+ }
+ }
+
+ .row2 {
+ display: flex;
+ justify-content: flex-end;
+
+ .item {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ margin-right: 42px;
+
+ .title {
+ font-weight: normal;
+ overflow-wrap: normal;
+ font-size: 32px;
+ color: rgb(48, 49, 51);
+ text-align: center;
+ }
+ .logo {
+ width: 120px;
+ }
+ }
+
+
+ }
+}
diff --git a/src/pages/payforget/index.config.js b/src/pages/payforget/index.config.js
new file mode 100644
index 0000000..9ee3506
--- /dev/null
+++ b/src/pages/payforget/index.config.js
@@ -0,0 +1,4 @@
+export default definePageConfig({
+ navigationBarTitleText: '修改支付',
+ usingComponents: {},
+})
diff --git a/src/pages/payforget/index.jsx b/src/pages/payforget/index.jsx
new file mode 100644
index 0000000..70a1b1b
--- /dev/null
+++ b/src/pages/payforget/index.jsx
@@ -0,0 +1,34 @@
+import { View } from '@tarojs/components';
+import Taro, { useLoad } from '@tarojs/taro';
+
+import HeaderBar from './components/HeaderBar';
+import FormBar from './components/FormBar';
+import { NavBar } from 'antd-mobile';
+
+import styles from './index.module.less';
+
+export default function Payforget() {
+ const query = Taro.getCurrentInstance()?.router?.params;
+
+ useLoad(() => {
+ console.log('Page loaded.')
+ });
+
+ const handleBack = () => {
+ Taro.navigateBack();
+ };
+
+ return (
+
+ {query?.hasBack && (
+
+ 修改支付密码
+
+ )}
+
+
+
+
+
+ )
+}
diff --git a/src/pages/payforget/index.module.less b/src/pages/payforget/index.module.less
new file mode 100644
index 0000000..ff81668
--- /dev/null
+++ b/src/pages/payforget/index.module.less
@@ -0,0 +1,51 @@
+.container {
+ background: linear-gradient(180deg, #d7ebfa, #f5f5f5 30vh);
+ height: 100%;
+}
+
+.wrapper {
+ box-sizing: border-box;
+ padding: 120px 42px;
+
+ .row {
+ .title {
+ font-weight: normal;
+ overflow-wrap: normal;
+ font-size: 42px;
+ color: rgb(48, 49, 51);
+ }
+
+ .subtitle {
+ font-weight: normal;
+ overflow-wrap: normal;
+ font-size: 32px;
+ color: rgb(48, 49, 51);
+ }
+ }
+
+ .row2 {
+ display: flex;
+ justify-content: flex-end;
+
+ .item {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ margin-right: 42px;
+
+ .title {
+ font-weight: normal;
+ overflow-wrap: normal;
+ font-size: 32px;
+ color: rgb(48, 49, 51);
+ text-align: center;
+ }
+
+ .logo {
+ width: 120px;
+ }
+ }
+
+
+ }
+}
diff --git a/src/pages/paymentmethod/components/Alipay/index.jsx b/src/pages/paymentmethod/components/Alipay/index.jsx
new file mode 100644
index 0000000..14692ea
--- /dev/null
+++ b/src/pages/paymentmethod/components/Alipay/index.jsx
@@ -0,0 +1,38 @@
+import { View } from '@tarojs/components';
+import { Form, Input } from 'antd-mobile';
+import FormImage from '/components/FormImage';
+
+import styles from './index.module.less';
+
+export default function Alipay() {
+
+ return (
+
+ 支付宝收款信息
+
+
+
+
+
+
+
+
+
+
+ )
+}
diff --git a/src/pages/paymentmethod/components/Alipay/index.module.less b/src/pages/paymentmethod/components/Alipay/index.module.less
new file mode 100644
index 0000000..251c274
--- /dev/null
+++ b/src/pages/paymentmethod/components/Alipay/index.module.less
@@ -0,0 +1,7 @@
+.container {
+ .title {
+ font-size: 28px;
+ font-weight: 600;
+ margin: 24px 0;
+ }
+}
diff --git a/src/pages/paymentmethod/components/BankPay/index.jsx b/src/pages/paymentmethod/components/BankPay/index.jsx
new file mode 100644
index 0000000..dc2ee80
--- /dev/null
+++ b/src/pages/paymentmethod/components/BankPay/index.jsx
@@ -0,0 +1,38 @@
+import { View } from '@tarojs/components';
+import { Form, Input } from 'antd-mobile';
+
+import styles from './index.module.less';
+
+export default function BankPay() {
+
+ return (
+
+ 银行信息
+
+
+
+
+
+
+
+
+
+
+ )
+}
diff --git a/src/pages/paymentmethod/components/BankPay/index.module.less b/src/pages/paymentmethod/components/BankPay/index.module.less
new file mode 100644
index 0000000..251c274
--- /dev/null
+++ b/src/pages/paymentmethod/components/BankPay/index.module.less
@@ -0,0 +1,7 @@
+.container {
+ .title {
+ font-size: 28px;
+ font-weight: 600;
+ margin: 24px 0;
+ }
+}
diff --git a/src/pages/paymentmethod/components/Wxpay/index.jsx b/src/pages/paymentmethod/components/Wxpay/index.jsx
new file mode 100644
index 0000000..cb8dfc7
--- /dev/null
+++ b/src/pages/paymentmethod/components/Wxpay/index.jsx
@@ -0,0 +1,39 @@
+import { View } from '@tarojs/components';
+import { Form, Input } from 'antd-mobile';
+import FormImage from '/components/FormImage';
+
+import styles from './index.module.less';
+
+export default function Wxpay() {
+
+ return (
+
+ 微信收款信息
+
+
+
+
+
+
+
+
+
+
+ )
+}
diff --git a/src/pages/paymentmethod/components/Wxpay/index.module.less b/src/pages/paymentmethod/components/Wxpay/index.module.less
new file mode 100644
index 0000000..251c274
--- /dev/null
+++ b/src/pages/paymentmethod/components/Wxpay/index.module.less
@@ -0,0 +1,7 @@
+.container {
+ .title {
+ font-size: 28px;
+ font-weight: 600;
+ margin: 24px 0;
+ }
+}
diff --git a/src/pages/paymentmethod/index.config.js b/src/pages/paymentmethod/index.config.js
new file mode 100644
index 0000000..0653523
--- /dev/null
+++ b/src/pages/paymentmethod/index.config.js
@@ -0,0 +1,4 @@
+export default definePageConfig({
+ navigationBarTitleText: '支付方式',
+ usingComponents: {},
+})
diff --git a/src/pages/paymentmethod/index.jsx b/src/pages/paymentmethod/index.jsx
new file mode 100644
index 0000000..f49d600
--- /dev/null
+++ b/src/pages/paymentmethod/index.jsx
@@ -0,0 +1,68 @@
+import { View } from '@tarojs/components';
+import Taro, { useLoad } from '@tarojs/taro';
+
+import { Button, Form, NavBar } from 'antd-mobile';
+import Alipay from './components/Alipay';
+import Wxpay from './components/Wxpay';
+import BankPay from './components/BankPay';
+
+import styles from './index.module.less';
+import { useEffect } from 'react';
+import { getShopInfoAction, updateShopInfoAction } from '../../request/actions';
+
+export default function Payforget() {
+ const [form] = Form.useForm();
+
+ useEffect(() => {
+ getShopInfoAction().then(res => {
+ console.log('res: ', res);
+ form.setFieldsValue(res);
+ });
+ }, []);
+
+ const handleBack = () => {
+ Taro.navigateTo({
+ url: '/pages/mine/index'
+ });
+ };
+
+ const handleVery = async () => {
+ try {
+ const values = await form.validateFields();
+ console.log('values: ', values);
+ await updateShopInfoAction(values);
+ Taro.navigateTo({ url: '/pages/index/index' });
+ }
+ catch (err) {
+ console.log('err: ', err);
+ }
+ };
+
+ return (
+
+
+ 支付方式
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ )
+}
diff --git a/src/pages/paymentmethod/index.module.less b/src/pages/paymentmethod/index.module.less
new file mode 100644
index 0000000..66bdd00
--- /dev/null
+++ b/src/pages/paymentmethod/index.module.less
@@ -0,0 +1,27 @@
+.container {
+ background: linear-gradient(180deg, #d7ebfa, #f5f5f5 30vh);
+ height: 100%;
+ overflow-y: auto;
+
+ .wrapper {
+ box-sizing: border-box;
+ padding: 42px;
+ }
+
+ .form {
+ background-color: #fff;
+ border-radius: 18px;
+ padding: 32px 32px 48px 32px;
+
+ .btn {
+ width: 100%;
+ margin-top: 24px;
+ }
+ }
+
+ :global {
+ .adm-list-body {
+ border: unset !important;
+ }
+ }
+}
diff --git a/src/pages/register/components/FormBar/index.jsx b/src/pages/register/components/FormBar/index.jsx
new file mode 100644
index 0000000..6441ecf
--- /dev/null
+++ b/src/pages/register/components/FormBar/index.jsx
@@ -0,0 +1,113 @@
+import { View } from '@tarojs/components';
+import { Button, Form, Input } from 'antd-mobile';
+
+import Taro from '@tarojs/taro';
+
+import styles from './index.module.less';
+import { useState } from 'react';
+import { registerAction } from '../../../../request/actions';
+import { getUrlParam } from '../../../../utils';
+
+export default function FormBar() {
+ const [form] = Form.useForm();
+
+ const [countdown, setCountdown] = useState(60);
+ const [isCounting, setIsCounting] = useState(false);
+
+ const sendVerificationCode = () => {
+ if (isCounting) {
+ return;
+ }
+ setIsCounting(true);
+ // Simulate sending verification code
+ console.log('Sending verification code...');
+ const interval = setInterval(() => {
+ setCountdown(prev => {
+ if (prev <= 1) {
+ clearInterval(interval);
+ setIsCounting(false);
+ return 60; // Reset countdown
+ }
+ return prev - 1;
+ });
+ }, 1000);
+ };
+
+
+ const handleRegister = async () => {
+ try {
+ const values = await form.validateFields();
+ await registerAction(values);
+ Taro.navigateTo({
+ url: '/pages/login/index'
+ });
+ }
+ catch (err) {
+ console.log('err: ', err);
+ }
+ };
+
+ return (
+
+
+
+
+
+
+
+
+
+
+ {/*
+ {isCounting ? `(${countdown}秒后重新获取)` : '发送验证码'}
+
+ }
+ >
+
+ */}
+
+
+
+
+
+
+ Taro.navigateTo({ url: '/pages/login/index' })}>返回登录
+
+
+ )
+}
diff --git a/src/pages/register/components/FormBar/index.module.less b/src/pages/register/components/FormBar/index.module.less
new file mode 100644
index 0000000..2b43d03
--- /dev/null
+++ b/src/pages/register/components/FormBar/index.module.less
@@ -0,0 +1,38 @@
+.container {
+ background-color: #fff;
+ border-radius: 18px;
+ margin-top: 72px;
+ padding: 32px 32px 0 32px;
+
+ .form {
+ :global {
+ .adm-list-body {
+ border-top: unset;
+ }
+ .adm-list-item {
+ padding-left: 0;
+ }
+ }
+ }
+
+ .bar {
+ display: flex;
+ justify-content: space-around;
+ padding: 24px 72px;
+
+ .btn {
+ font-size: 24px;
+ flex: 1;
+ text-align: center;
+
+ &:first-child {
+ border-right: 1px solid #eee;
+ }
+ }
+ }
+
+ .submit {
+ width: 100%;
+ margin-top: 72px;
+ }
+}
diff --git a/src/pages/register/components/HeaderBar/index.jsx b/src/pages/register/components/HeaderBar/index.jsx
new file mode 100644
index 0000000..43bab13
--- /dev/null
+++ b/src/pages/register/components/HeaderBar/index.jsx
@@ -0,0 +1,34 @@
+import { View } from '@tarojs/components';
+import { useLoad } from '@tarojs/taro';
+
+import logoSrc from '/assets/icons/logo.png';
+
+import styles from './index.module.less';
+
+export default function HeaderBar() {
+
+ useLoad(() => {
+ console.log('Page loaded.')
+ });
+
+ return (
+
+
+
+ Hi Weaith
+
+
+ 欢迎您来到融易诚
+
+
+
+
+
+
+ 融易诚
+
+
+
+
+ )
+}
diff --git a/src/pages/register/components/HeaderBar/index.module.less b/src/pages/register/components/HeaderBar/index.module.less
new file mode 100644
index 0000000..abdedb7
--- /dev/null
+++ b/src/pages/register/components/HeaderBar/index.module.less
@@ -0,0 +1,42 @@
+.container {
+ .row {
+ .title {
+ font-weight: normal;
+ overflow-wrap: normal;
+ font-size: 42px;
+ color: rgb(48, 49, 51);
+ }
+
+ .subtitle {
+ font-weight: normal;
+ overflow-wrap: normal;
+ font-size: 32px;
+ color: rgb(48, 49, 51);
+ }
+ }
+
+ .row2 {
+ display: flex;
+ justify-content: flex-end;
+
+ .item {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ margin-right: 42px;
+
+ .title {
+ font-weight: normal;
+ overflow-wrap: normal;
+ font-size: 32px;
+ color: rgb(48, 49, 51);
+ text-align: center;
+ }
+ .logo {
+ width: 120px;
+ }
+ }
+
+
+ }
+}
diff --git a/src/pages/register/index.config.js b/src/pages/register/index.config.js
new file mode 100644
index 0000000..2fd3ddc
--- /dev/null
+++ b/src/pages/register/index.config.js
@@ -0,0 +1,4 @@
+export default definePageConfig({
+ navigationBarTitleText: '注册',
+ usingComponents: {},
+})
diff --git a/src/pages/register/index.jsx b/src/pages/register/index.jsx
new file mode 100644
index 0000000..73bb016
--- /dev/null
+++ b/src/pages/register/index.jsx
@@ -0,0 +1,16 @@
+import { View } from '@tarojs/components';
+
+import HeaderBar from './components/HeaderBar';
+import FormBar from './components/FormBar';
+
+import styles from './index.module.less';
+
+export default function Register() {
+
+ return (
+
+
+
+
+ )
+}
diff --git a/src/pages/register/index.module.less b/src/pages/register/index.module.less
new file mode 100644
index 0000000..d23b6f6
--- /dev/null
+++ b/src/pages/register/index.module.less
@@ -0,0 +1,47 @@
+.container {
+ background: linear-gradient(180deg, #d7ebfa, #f5f5f5 30vh);
+ height: 100%;
+ box-sizing: border-box;
+ padding: 120px 42px;
+
+ .row {
+ .title {
+ font-weight: normal;
+ overflow-wrap: normal;
+ font-size: 42px;
+ color: rgb(48, 49, 51);
+ }
+
+ .subtitle {
+ font-weight: normal;
+ overflow-wrap: normal;
+ font-size: 32px;
+ color: rgb(48, 49, 51);
+ }
+ }
+
+ .row2 {
+ display: flex;
+ justify-content: flex-end;
+
+ .item {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ margin-right: 42px;
+
+ .title {
+ font-weight: normal;
+ overflow-wrap: normal;
+ font-size: 32px;
+ color: rgb(48, 49, 51);
+ text-align: center;
+ }
+ .logo {
+ width: 120px;
+ }
+ }
+
+
+ }
+}
diff --git a/src/pages/safe/index.config.js b/src/pages/safe/index.config.js
new file mode 100644
index 0000000..3dbe05d
--- /dev/null
+++ b/src/pages/safe/index.config.js
@@ -0,0 +1,4 @@
+export default definePageConfig({
+ navigationBarTitleText: '安全中心',
+ usingComponents: {},
+})
diff --git a/src/pages/safe/index.jsx b/src/pages/safe/index.jsx
new file mode 100644
index 0000000..cf6a4d9
--- /dev/null
+++ b/src/pages/safe/index.jsx
@@ -0,0 +1,36 @@
+
+import { View } from '@tarojs/components';
+import { List, NavBar } from 'antd-mobile';
+import { LockOutline, PayCircleOutline } from 'antd-mobile-icons';
+import Taro from '@tarojs/taro';
+
+import styles from './index.module.less';
+
+const Safe = () => {
+
+ const handleBack = () => {
+ Taro.navigateBack();
+ };
+
+ return (
+
+
+ 安全中心
+
+
+
+
+ } onClick={() => Taro.navigateTo({ url: '/pages/forget/index?hasBack=1' })}>
+ 修改账号密码
+
+ } onClick={() => Taro.navigateTo({ url: '/pages/payforget/index?hasBack=1' })}>
+ 修改支付密码
+
+
+
+
+
+ );
+};
+
+export default Safe;
diff --git a/src/pages/safe/index.module.less b/src/pages/safe/index.module.less
new file mode 100644
index 0000000..578ab6d
--- /dev/null
+++ b/src/pages/safe/index.module.less
@@ -0,0 +1,30 @@
+.container {
+ background: linear-gradient(180deg, #d7ebfa, #f5f5f5 30vh);
+ height: 100%;
+
+ .wrapper {
+ box-sizing: border-box;
+ padding: 42px;
+ }
+ .content {
+ padding: 24px;
+ border-radius: 12px;
+ background-color: #fff;
+ margin-top: 24px;
+
+ .list {
+ margin-top: 18px;
+
+ >* {
+ font-size: 28px !important;
+ }
+
+ :global {
+ .adm-list-item {
+ // padding-left: unset;
+ }
+ }
+ }
+ }
+
+}
diff --git a/src/pages/shopinfo/components/FormBar/index.jsx b/src/pages/shopinfo/components/FormBar/index.jsx
new file mode 100644
index 0000000..2f7d760
--- /dev/null
+++ b/src/pages/shopinfo/components/FormBar/index.jsx
@@ -0,0 +1,84 @@
+import { View } from '@tarojs/components';
+import { Button, Form, Input } from 'antd-mobile';
+
+import FormImage from '/components/FormImage';
+import { useEffect } from 'react';
+import { getShopInfoAction, updateShopInfoAction } from '../../../../request/actions';
+import Taro from '@tarojs/taro';
+
+import styles from './index.module.less';
+
+export default function FormBar() {
+ const [form] = Form.useForm();
+
+ useEffect(() => {
+ getShopInfoAction().then(res => {
+ form.setFieldsValue(res);
+ });
+ }, []);
+
+ const handleVery = async () => {
+ try {
+ const values = await form.validateFields();
+ console.log('values: ', values);
+ await updateShopInfoAction(values);
+ Taro.navigateBack();
+ }
+ catch (err) {
+ console.log('err: ', err);
+ }
+ };
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ */}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ )
+}
diff --git a/src/pages/shopinfo/components/FormBar/index.module.less b/src/pages/shopinfo/components/FormBar/index.module.less
new file mode 100644
index 0000000..bc4b9d0
--- /dev/null
+++ b/src/pages/shopinfo/components/FormBar/index.module.less
@@ -0,0 +1,28 @@
+.container {
+ background-color: #fff;
+ border-radius: 18px;
+ padding: 32px 32px 48px 32px;
+
+ .form {
+ :global {
+ .adm-list-body {
+ border-top: unset;
+ }
+ .adm-list-item {
+ padding-left: 0;
+ }
+ .adm-list-item-content {
+ border-top: unset;
+ }
+ }
+ }
+
+ .margin {
+ margin-top: 32px;
+ }
+
+ .submit {
+ width: 100%;
+ margin-top: 72px;
+ }
+}
diff --git a/src/pages/shopinfo/index.config.js b/src/pages/shopinfo/index.config.js
new file mode 100644
index 0000000..6ce7f9d
--- /dev/null
+++ b/src/pages/shopinfo/index.config.js
@@ -0,0 +1,4 @@
+export default definePageConfig({
+ navigationBarTitleText: '店铺信息',
+ usingComponents: {},
+})
diff --git a/src/pages/shopinfo/index.jsx b/src/pages/shopinfo/index.jsx
new file mode 100644
index 0000000..afd94b1
--- /dev/null
+++ b/src/pages/shopinfo/index.jsx
@@ -0,0 +1,27 @@
+import { View } from '@tarojs/components';
+import Taro, { useLoad } from '@tarojs/taro';
+
+import FormBar from './components/FormBar';
+import { NavBar } from 'antd-mobile';
+
+import styles from './index.module.less';
+
+export default function ShopInfo() {
+
+ useLoad(() => {
+ console.log('Page loaded.')
+ });
+
+ const handleBack = () => {
+ Taro.navigateBack();
+ };
+
+ return (
+
+ 店铺信息
+
+
+
+
+ )
+}
diff --git a/src/pages/shopinfo/index.module.less b/src/pages/shopinfo/index.module.less
new file mode 100644
index 0000000..e32d392
--- /dev/null
+++ b/src/pages/shopinfo/index.module.less
@@ -0,0 +1,10 @@
+.container {
+ background: linear-gradient(180deg, #d7ebfa, #f5f5f5 30vh);
+ height: 100%;
+ overflow-y: auto;
+
+ .wrapper {
+ box-sizing: border-box;
+ padding: 42px;
+ }
+}
diff --git a/src/pages/sitemessage/index.config.js b/src/pages/sitemessage/index.config.js
new file mode 100644
index 0000000..c99a8d3
--- /dev/null
+++ b/src/pages/sitemessage/index.config.js
@@ -0,0 +1,4 @@
+export default definePageConfig({
+ navigationBarTitleText: '站内信',
+ usingComponents: {},
+})
diff --git a/src/pages/sitemessage/index.jsx b/src/pages/sitemessage/index.jsx
new file mode 100644
index 0000000..34c088b
--- /dev/null
+++ b/src/pages/sitemessage/index.jsx
@@ -0,0 +1,46 @@
+import { View } from '@tarojs/components';
+import Taro from '@tarojs/taro';
+
+import { Empty, NavBar, Tag } from 'antd-mobile';
+import { systemMessageAction } from '../../request/actions';
+import useRequestList from '/hooks/useRequestList';
+
+import styles from './index.module.less';
+
+export default function Feedback() {
+ const { data } = useRequestList({
+ action: systemMessageAction,
+ initFilterParams: {
+ messageId: localStorage.getItem('messageId')
+ }
+ });
+
+ const handleBack = () => {
+ Taro.navigateBack();
+ };
+
+ return (
+
+
+ 站内信
+
+ {data ? (
+
+ {data?.title}
+
+
+ {data?.createTime && (
+
+ {data?.createTime}
+
+ )}
+
+ ) : (
+
+ )}
+
+ );
+}
diff --git a/src/pages/sitemessage/index.module.less b/src/pages/sitemessage/index.module.less
new file mode 100644
index 0000000..1cf9194
--- /dev/null
+++ b/src/pages/sitemessage/index.module.less
@@ -0,0 +1,23 @@
+.container {
+ background: linear-gradient(180deg, #d7ebfa, #f5f5f5 30vh);
+ height: 100%;
+
+ .wrapper {
+ background-color: #fff;
+ border-radius: 18px;
+ padding: 32px;
+ width: 620px;
+ margin: 0 auto;
+ margin-top: 72px;
+ line-height: 2;
+
+ .title {
+ font-weight: normal;
+ overflow-wrap: normal;
+ font-size: 32px;
+ color: rgb(48, 49, 51);
+ }
+
+ }
+
+}
diff --git a/src/pages/team/components/TeamList/index.jsx b/src/pages/team/components/TeamList/index.jsx
new file mode 100644
index 0000000..c8a3246
--- /dev/null
+++ b/src/pages/team/components/TeamList/index.jsx
@@ -0,0 +1,83 @@
+import { View } from '@tarojs/components';
+import cls from 'classnames';
+import { List, Space, Tag } from 'antd-mobile';
+
+import useRequestList from '../../../../hooks/useRequestList';
+import { teamAction, teamMemberAction } from '../../../../request/actions';
+
+import styles from './index.module.less';
+
+export default function TeamList() {
+ // 团队矩阵
+ const { data } = useRequestList({
+ action: teamAction
+ });
+ // 团队成员
+ const { data: memberData } = useRequestList({
+ action: teamMemberAction
+ });
+
+ const renderEmpty = () => (
+
+ 暂无团队成员
+
+ );
+
+ const renderRow = ({ value1, text1, value2, text2, value3, text3 }) => (
+
+
+
+ {value1}
+
+
+ {text1}
+
+
+
+
+ {value2}
+
+
+ {text2}
+
+
+
+
+ {value3}
+
+
+ {text3}
+
+
+
+ );
+
+ return (
+
+ {renderRow({ value1: data?.teamTotal || 0, text1: '团队总人数', value2: data?.sharePerson || 0, text2: '直接推荐', value3: data?.activePerson || 0, text3: '活跃人员' })}
+ {renderRow({ value1: `¥${data?.teamPerson || 0}`, text1: '团队订单总额', value2: `¥${data?.completedOrder || 0}`, text2: '已完成订单总额', value3: `¥${data?.completedFee || 0}`, text3: '已完成服务费' })}
+ {renderRow({ value1: `¥${data?.pendingPay || 0}`, text1: '待付款', value2: `¥${data?.pendingConfirm || 0}`, text2: '待确认', value3: `¥${data?.pendingFee || 0}`, text3: '待付数据优化费' })}
+ {memberData?.memberList?.length > 0 ? (
+
+ {memberData?.memberList?.map(user => (
+
+
+
+
+ {user.nickName}
+
+ {user.userLevelText}
+
+
+ {user.userId}
+
+
+
+ ))}
+
+ ) : renderEmpty()}
+
+ )
+}
diff --git a/src/pages/team/components/TeamList/index.module.less b/src/pages/team/components/TeamList/index.module.less
new file mode 100644
index 0000000..a4e011c
--- /dev/null
+++ b/src/pages/team/components/TeamList/index.module.less
@@ -0,0 +1,52 @@
+.container {
+ margin-top: 72px;
+
+ .row {
+ display: flex;
+ justify-content: space-around;
+ padding: 32px;
+ border-radius: 16px;
+ border: 1px solid #eee;
+ background-color: #fff;
+
+ &:not(:first-child) {
+ margin-top: 32px;
+ }
+
+ &.empty {
+ .subtitle {
+ color: #999;
+ }
+ }
+
+ .card {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ flex: 1;
+
+ .title {
+ font-size: 32px;
+ font-weight: 600;
+ color: var(--color-primary);
+ }
+
+ .subtitle {
+ font-size: 24px;
+ margin-top: 12px;
+ color: #333;
+ }
+ }
+ }
+
+ .list {
+ margin-top: 32px;
+
+ .item {
+ font-size: 24px;
+ color: #333;
+ display: flex;
+ justify-content: space-between;
+ }
+ }
+}
diff --git a/src/pages/team/index.config.js b/src/pages/team/index.config.js
new file mode 100644
index 0000000..6ce7f9d
--- /dev/null
+++ b/src/pages/team/index.config.js
@@ -0,0 +1,4 @@
+export default definePageConfig({
+ navigationBarTitleText: '店铺信息',
+ usingComponents: {},
+})
diff --git a/src/pages/team/index.jsx b/src/pages/team/index.jsx
new file mode 100644
index 0000000..b374612
--- /dev/null
+++ b/src/pages/team/index.jsx
@@ -0,0 +1,29 @@
+import { View } from '@tarojs/components';
+import Taro, { useLoad } from '@tarojs/taro';
+
+import TeamList from './components/TeamList';
+import { NavBar } from 'antd-mobile';
+
+import styles from './index.module.less';
+
+export default function Team() {
+
+ useLoad(() => {
+ console.log('Page loaded.')
+ });
+
+ const handleBack = () => {
+ Taro.navigateBack();
+ };
+
+ return (
+
+
+ 团队矩阵
+
+
+
+
+
+ )
+}
diff --git a/src/pages/team/index.module.less b/src/pages/team/index.module.less
new file mode 100644
index 0000000..bfc14af
--- /dev/null
+++ b/src/pages/team/index.module.less
@@ -0,0 +1,9 @@
+.container {
+ background: linear-gradient(180deg, #d7ebfa, #f5f5f5 30vh);
+ height: 100%;
+
+ .wrapper {
+ box-sizing: border-box;
+ padding: 42px;
+ }
+}
diff --git a/src/pages/viplevelup/components/Alipay/index.jsx b/src/pages/viplevelup/components/Alipay/index.jsx
new file mode 100644
index 0000000..5310bfe
--- /dev/null
+++ b/src/pages/viplevelup/components/Alipay/index.jsx
@@ -0,0 +1,33 @@
+import { View } from '@tarojs/components';
+import { Form } from 'antd-mobile';
+import FormImage from '/components/FormImage';
+
+import styles from './index.module.less';
+import FormLabel from '../../../../components/FormLabel';
+
+export default function Alipay() {
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+ )
+}
diff --git a/src/pages/viplevelup/components/Alipay/index.module.less b/src/pages/viplevelup/components/Alipay/index.module.less
new file mode 100644
index 0000000..11be4b3
--- /dev/null
+++ b/src/pages/viplevelup/components/Alipay/index.module.less
@@ -0,0 +1,3 @@
+.container {
+
+}
diff --git a/src/pages/viplevelup/components/BankPay/index.jsx b/src/pages/viplevelup/components/BankPay/index.jsx
new file mode 100644
index 0000000..467ba76
--- /dev/null
+++ b/src/pages/viplevelup/components/BankPay/index.jsx
@@ -0,0 +1,32 @@
+import { View } from '@tarojs/components';
+import { Form } from 'antd-mobile';
+
+import styles from './index.module.less';
+import FormLabel from '../../../../components/FormLabel';
+
+export default function BankPay() {
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+ )
+}
diff --git a/src/pages/viplevelup/components/BankPay/index.module.less b/src/pages/viplevelup/components/BankPay/index.module.less
new file mode 100644
index 0000000..11be4b3
--- /dev/null
+++ b/src/pages/viplevelup/components/BankPay/index.module.less
@@ -0,0 +1,3 @@
+.container {
+
+}
diff --git a/src/pages/viplevelup/components/Wxpay/index.jsx b/src/pages/viplevelup/components/Wxpay/index.jsx
new file mode 100644
index 0000000..ff37225
--- /dev/null
+++ b/src/pages/viplevelup/components/Wxpay/index.jsx
@@ -0,0 +1,34 @@
+import { View } from '@tarojs/components';
+import { Form } from 'antd-mobile';
+import FormImage from '/components/FormImage';
+
+import styles from './index.module.less';
+import FormLabel from '../../../../components/FormLabel';
+
+export default function Wxpay() {
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+ )
+}
diff --git a/src/pages/viplevelup/components/Wxpay/index.module.less b/src/pages/viplevelup/components/Wxpay/index.module.less
new file mode 100644
index 0000000..11be4b3
--- /dev/null
+++ b/src/pages/viplevelup/components/Wxpay/index.module.less
@@ -0,0 +1,3 @@
+.container {
+
+}
diff --git a/src/pages/viplevelup/index.config.js b/src/pages/viplevelup/index.config.js
new file mode 100644
index 0000000..e84d3f2
--- /dev/null
+++ b/src/pages/viplevelup/index.config.js
@@ -0,0 +1,4 @@
+export default definePageConfig({
+ navigationBarTitleText: '会员升级',
+ usingComponents: {},
+})
diff --git a/src/pages/viplevelup/index.jsx b/src/pages/viplevelup/index.jsx
new file mode 100644
index 0000000..2b10161
--- /dev/null
+++ b/src/pages/viplevelup/index.jsx
@@ -0,0 +1,89 @@
+import { useEffect } from 'react';
+import { View } from '@tarojs/components';
+import Taro, { useLoad } from '@tarojs/taro';
+
+import { Button, Form, NavBar, Space } from 'antd-mobile';
+import Alipay from './components/Alipay';
+import Wxpay from './components/Wxpay';
+import BankPay from './components/BankPay';
+import { getPromoteOrderAction, promoteOrderPayAction } from '/request/actions';
+import FormLabel from '/components/FormLabel';
+import FormImage from '/components/FormImage';
+
+import styles from './index.module.less';
+
+export default function Payforget() {
+ const [form] = Form.useForm();
+
+ useLoad(() => {
+ console.log('Page loaded.')
+ });
+
+ const handleBack = () => {
+ Taro.navigateTo({ url: '/pages/mine/index' });
+ };
+
+ useEffect(() => {
+ getPromoteOrderAction().then(res => {
+ form.setFieldsValue({
+ ...res,
+ ...res?.orderShopInfo
+ });
+ });
+ }, []);
+
+ const handleVerfy = async () => {
+ try {
+ const values = await form.validateFields();
+ console.log('values: ', values);
+ await promoteOrderPayAction({
+ promoteOrderId: values.promoteOrderId,
+ payImage: values.payImage
+ });
+ Taro.navigateTo({ url: '/pages/mine/index' });
+ }
+ catch (err) {
+ console.log('err: ', err);
+ }
+ };
+
+ return (
+
+
+ 会员升级
+
+
+
+
+ 升级费用
+
+ `¥${value || '0.00'}`} />
+
+
+ 收款信息
+
+
+
+
+
+
+
+
+
+
+ )
+}
diff --git a/src/pages/viplevelup/index.module.less b/src/pages/viplevelup/index.module.less
new file mode 100644
index 0000000..031790e
--- /dev/null
+++ b/src/pages/viplevelup/index.module.less
@@ -0,0 +1,38 @@
+.container {
+ background: linear-gradient(180deg, #d7ebfa, #f5f5f5 30vh);
+ height: 100%;
+
+ .wrapper {
+ box-sizing: border-box;
+ padding: 42px;
+ }
+
+ .form {
+ background-color: #fff;
+ border-radius: 18px;
+ padding: 32px 32px 48px 32px;
+
+ .title {
+ font-size: 28px;
+ font-weight: 600;
+ margin: 24px 0;
+ padding-left: 16px;
+ }
+
+ .btn {
+ width: 100%;
+ margin-top: 24px;
+ }
+ }
+
+ :global {
+ .adm-list-body {
+ border: unset !important;
+ }
+
+ .adm-list-item {
+ line-height: unset;
+ padding-left: 16px;
+ }
+ }
+}
diff --git a/src/request/actions/index.js b/src/request/actions/index.js
new file mode 100644
index 0000000..8fb87e3
--- /dev/null
+++ b/src/request/actions/index.js
@@ -0,0 +1,204 @@
+import {
+ editPasswordApi,
+ editPayPasswordApi,
+ loginApi,
+ registerApi,
+ myBalanceApi,
+ teamApi,
+ teamMemberApi,
+ userCenterApi,
+ getIndexPageApi,
+ noticeListApi,
+ noticeApi,
+ uploadImage64Api,
+ updateShopInfoApi,
+ getShopInfoApi,
+ getPromoteOrderApi,
+ promoteOrderPayApi,
+ feedbackListApi,
+ feedbackApi,
+ systemMessageApi,
+ userWithdrawalApi,
+ userWalletLogListLoopApi,
+ getOrderListLoopApi,
+ getOrderInfoApi,
+ orderConfirmApi,
+ orderPayApi
+} from "../api";
+import service from "../service";
+
+
+/**
+ * @description 注册
+ * @param {*} params
+ * @returns
+ */
+export const registerAction = params => service.post(registerApi, params);
+
+/**
+ * @description 登录
+ * @param {*} params
+ * @returns
+ */
+export const loginAction = params => service.post(loginApi, params);
+
+/**
+ * @description 修改密码
+ * @param {*} params
+ * @returns
+ */
+export const editPasswordAction = params => service.post(editPasswordApi, params);
+
+/**
+ * @description 修改安全密码
+ * @param {*} params
+ * @returns
+ */
+export const editPayPasswordAction = params => service.post(editPayPasswordApi, params);
+
+/**
+ * @description 我的余额
+ * @param {*} params
+ * @returns
+ */
+export const myBalanceAction = params => service.get(myBalanceApi, { params });
+
+/**
+ * @description 团队矩阵
+ * @param {*} params
+ * @returns
+ */
+export const teamAction = params => service.get(teamApi, { params });
+
+/**
+ * @description 团队成员
+ * @param {*} params
+ * @returns
+ */
+export const teamMemberAction = params => service.get(teamMemberApi, { params });
+
+/**
+ * @description 个人中心
+ * @param {*} params
+ * @returns
+ */
+export const userCenterAction = params => service.get(userCenterApi, { params });
+
+/**
+ * @description 首页数据
+ * @param {*} params
+ * @returns
+ */
+export const getIndexPageAction = params => service.get(getIndexPageApi, { params });
+
+/**
+ * @description 系统公告列表
+ * @param {*} params
+ * @returns
+ */
+export const noticeListAction = params => service.get(noticeListApi, { params });
+
+/**
+ * @description 系统公告详情
+ * @param {*} params
+ * @returns
+ */
+export const noticeAction = params => service.get(noticeApi, { params });
+
+/**
+ * @description 上传图片
+ * @param {*} params
+ * @returns
+ */
+export const uploadImage64Action = params => service.post(uploadImage64Api, params);
+
+/**
+ * @description 申请/修改店铺认证
+ * @param {*} params
+ * @returns
+ */
+export const updateShopInfoAction = params => service.post(updateShopInfoApi, params);
+
+/**
+ * @description 获取店铺信息
+ * @param {*} params
+ * @returns
+ */
+export const getShopInfoAction = params => service.get(getShopInfoApi, { params });
+
+/**
+ * @description 获取会员升级信息
+ * @param {*} params
+ * @returns
+ */
+export const getPromoteOrderAction = params => service.get(getPromoteOrderApi, { params });
+
+/**
+ * @description 会员升级付款
+ * @param {*} params
+ * @returns
+ */
+export const promoteOrderPayAction = params => service.post(promoteOrderPayApi, params);
+
+/**
+ * @description 反馈列表
+ * @param {*} params
+ * @returns
+ */
+export const feedbackListAction = params => service.get(feedbackListApi, { params });
+
+/**
+ * @description 提交反馈
+ * @param {*} params
+ * @returns
+ */
+export const feedbackAction = params => service.post(feedbackApi, params);
+
+/**
+ * @description 站内信
+ * @param {*} params
+ * @returns
+ */
+export const systemMessageAction = params => service.get(systemMessageApi, { params });
+
+/**
+ * @description 提交提现
+ * @param {*} params
+ * @returns
+ */
+export const userWithdrawalAction = params => service.post(userWithdrawalApi, params);
+
+/**
+ * @description 交易记录
+ * @param {*} params
+ * @returns
+ */
+export const userWalletLogListLoopAction = params => service.get(userWalletLogListLoopApi, { params });
+
+/**
+ * @description 获取订单列表
+ * @param {*} params
+ * @returns
+ */
+export const getOrderListLoopAction = params => service.get(getOrderListLoopApi, { params });
+
+/**
+ * @description 获取订单信息
+ * @param {*} params
+ * @returns
+ */
+export const getOrderInfoAction = params => service.get(getOrderInfoApi, { params });
+
+/**
+ * @description 确认收款信息
+ * @param {*} params
+ * @returns
+ */
+export const orderConfirmAction = params => service.post(orderConfirmApi, params);
+
+/**
+ * @description 付款
+ * @param {*} params
+ * @returns
+ */
+export const orderPayAction = params => service.post(orderPayApi, params);
diff --git a/src/request/api/index.js b/src/request/api/index.js
new file mode 100644
index 0000000..d17a058
--- /dev/null
+++ b/src/request/api/index.js
@@ -0,0 +1,51 @@
+
+
+export const registerApi = '/Register';
+
+export const loginApi = '/Login';
+
+export const editPasswordApi = '/EditPassword';
+
+export const editPayPasswordApi = '/EditPayPassword';
+
+export const myBalanceApi = '/MyBalance';
+
+export const teamApi = '/Team';
+
+export const teamMemberApi = '/TeamMember';
+
+export const userCenterApi = '/UserCenter';
+
+export const getIndexPageApi = '/GetIndexPage';
+
+export const noticeListApi = '/NoticeList';
+
+export const noticeApi = '/Notice';
+
+export const uploadImage64Api = '/UploadImage64';
+
+export const updateShopInfoApi = '/UpdateShopInfo';
+
+export const getShopInfoApi = '/GetShopInfo';
+
+export const getPromoteOrderApi = '/GetPromoteOrder';
+
+export const promoteOrderPayApi = '/promoteOrderPay';
+
+export const feedbackListApi = '/FeedbackList';
+
+export const feedbackApi = '/Feedback';
+
+export const systemMessageApi = '/SystemMessage';
+
+export const userWithdrawalApi = '/UserWithdrawal';
+
+export const userWalletLogListLoopApi = '/UserWalletLogListLoop';
+
+export const getOrderListLoopApi = '/GetOrderListLoop';
+
+export const getOrderInfoApi = '/GetOrderInfo';
+
+export const orderConfirmApi = '/OrderConfirm';
+
+export const orderPayApi = '/OrderPay';
diff --git a/src/request/service.ts b/src/request/service.ts
new file mode 100644
index 0000000..f13c70f
--- /dev/null
+++ b/src/request/service.ts
@@ -0,0 +1,10 @@
+
+import { createService, isDev } from './utils';
+
+// 默认接口服务
+const service = createService({
+ baseURL: isDev ? '/api/Open' : '/api/Open'
+});
+
+export * from './utils';
+export default service;
diff --git a/src/request/utils.ts b/src/request/utils.ts
new file mode 100644
index 0000000..693fe9a
--- /dev/null
+++ b/src/request/utils.ts
@@ -0,0 +1,121 @@
+
+import axios from 'axios';
+import Taro from '@tarojs/taro';
+import { Toast } from 'antd-mobile';
+import md5 from 'md5';
+
+export const isDev = process.env.NODE_ENV === 'development';
+export const timeout = 1000 * 10;
+
+const redirectBlackList = [
+ '/pages/login/index',
+ '/pages/register/index',
+ '/pages/invite/index',
+ '/pages/payforget/index',
+ '/pages/forget/index'
+];
+
+const createHeaders = () => {
+ const userInfo = JSON.parse(localStorage.getItem('userInfo') || 'null');
+ const appid = "The-People's-Republic-of-China";
+ const userid = userInfo?.userId || 'guest';
+ const token = userInfo?.appToken || 'no-value';
+ const timestamp = `${+new Date()}`;
+ const sign = md5(`${userid}${token}${timestamp}`);
+
+ return {
+ appid,
+ userid,
+ token,
+ timestamp,
+ sign
+ };
+};
+
+/**
+ * @description: 请求服务创建工具函数
+ * @param {object} param1
+ * @return {*}
+ */
+export const createService = ({
+ baseURL,
+ headers = {},
+}: { baseURL?: string, headers?: any }) => {
+ const service = axios.create({
+ baseURL,
+ timeout
+ });
+ const handler: { current: any } = { current: null };
+
+ service.interceptors.request.use(
+ config => {
+ handler.current = Toast.show({
+ icon: 'loading'
+ });
+ return {
+ ...config,
+ headers: {
+ ...config.headers,
+ ...createHeaders(),
+ ...headers,
+ },
+ };
+ },
+ (error) => {
+ return Promise.reject(error);
+ }
+ );
+ service.interceptors.response.use(
+ (response: any) => {
+ const {
+ code,
+ data,
+ msg: message
+ } = response.data;
+ handler.current?.close();
+ const redirect = () => {
+ const inRedirectList = redirectBlackList.find((path) =>
+ window.location.pathname.startsWith(path)
+ );
+ if (!inRedirectList) {
+ localStorage.clear();
+ Taro.redirectTo({
+ url: '/pages/login/index'
+ });
+ }
+ };
+ switch (+code) {
+ // 鉴权校验失败
+ case 401:
+ redirect();
+ break;
+ // 鉴权校验失败
+ case 403:
+ redirect();
+ break;
+ case 1:
+ Toast.show({
+ content: message,
+ });
+ return Promise.reject(message);
+ case 0:
+ return data;
+ default:
+ Toast.show({
+ content: message,
+ });
+ return Promise.reject(message);
+ }
+ },
+ (error) => {
+ const { data } = error.response || {};
+ const msg = data?.msg;
+ const content = msg ?? `${error}`;
+ Toast.show({
+ content
+ });
+ return Promise.reject(content);
+ }
+ );
+ return service;
+};
diff --git a/src/utils/index.ts b/src/utils/index.ts
new file mode 100644
index 0000000..c76ed17
--- /dev/null
+++ b/src/utils/index.ts
@@ -0,0 +1,50 @@
+/**
+ * @description: 模拟请求函数
+ * @param {Function} func
+ * @param {number} delay
+ * @return {*}
+ */
+export function mockRequest(func: Function, delay: number): Promise {
+ return new Promise((resolve, reject) => {
+ try {
+ setTimeout(() => {
+ const res = func();
+ resolve(res);
+ }, delay);
+ }
+ catch (err) {
+ reject(err);
+ }
+ });
+}
+
+/**
+* @description: 获取url的search参数,兼容hash和history路由
+* @param {string} name
+* @return {string | null | Record}
+*/
+export const getUrlParam = (name?: string) => {
+ // 1. 先获取完整的 search 字符串,兼容 hash/history 路由
+ let search = '';
+ if (window.location.search) {
+ // history 路由
+ search = window.location.search;
+ }
+ else if (window.location.hash && window.location.hash.includes('?')) {
+ // hash 路由
+ search = window.location.hash.substring(window.location.hash.indexOf('?'));
+ }
+ // 2. 解析参数
+ const params = new URLSearchParams(search);
+ if (name) {
+ const value = params.get(name);
+ if (value === 'true') return true;
+ if (value === 'false') return false;
+ return value;
+ }
+ const result: Record = {};
+ params.forEach((value, key) => {
+ result[key] = value === 'true' ? true : value === 'false' ? false : value;
+ });
+ return result;
+};