diff --git a/src/components/CouponModal/HeadCouponModal.css b/src/components/CouponModal/HeadCouponModal.css index 9853211..2f6624d 100644 --- a/src/components/CouponModal/HeadCouponModal.css +++ b/src/components/CouponModal/HeadCouponModal.css @@ -95,11 +95,16 @@ font-weight: 500; font-size: 18px; color: #353535; - margin-top: 20px; + /* margin-top: 20px; */ margin-left: 19px; } - +.content-rule{ + font-size: 18px; + margin-right: 32px; + color: #1677FF; + cursor: pointer; +} .content-bot { display: flex; align-items: center; diff --git a/src/components/CouponModal/HeadCouponModal.tsx b/src/components/CouponModal/HeadCouponModal.tsx index 3383a7d..411b795 100644 --- a/src/components/CouponModal/HeadCouponModal.tsx +++ b/src/components/CouponModal/HeadCouponModal.tsx @@ -1,6 +1,8 @@ import { useEffect, useState } from 'react' import './HeadCouponModal.css' -import { get } from '../../util/AjaxUtils' +import { get, + // getCouponUrl + } from '../../util/AjaxUtils' import { Pagination, message, @@ -14,7 +16,7 @@ import useLogo from '../../static/coupon/useLogo.png' import overdueImg from '../../static/coupon/overdueImg.png' export default function HeadCouponModal(props: any) { const [messageApi, contextHolder] = message.useMessage(); - const [loading,setLoading] = useState(false) + const [loading, setLoading] = useState(false) const [title, setTitle] = useState('未使用') // 分页 const [page, setPage] = useState(1) @@ -88,6 +90,48 @@ export default function HeadCouponModal(props: any) {
+ {/*
+
+
+
+
+ + 100 +
+ +
+
+
+
+
+ 可购买平台内任意软著时使用 +
+
{ + // window.open('https://www.aimzhu.com/CouponRule.html') + + getCouponUrl() + }}> + 使用规则 +
+
+
+
+ 有效期:2008 至 2008 +
+ +
{ + props.closeModal() + }}> + 去使用 +
+
+
+ +
+ +
*/} {couponArray.map((item) => { return (
diff --git a/src/layout/head/Head.tsx b/src/layout/head/Head.tsx index 491e159..1039d87 100644 --- a/src/layout/head/Head.tsx +++ b/src/layout/head/Head.tsx @@ -5,7 +5,7 @@ import RechargeHead from '../../components/recharge/RechargeHead.tsx'; import { Dropdown, MenuProps, message, Modal, Space, Spin, Input } from "antd"; import { DownOutlined, UserOutlined, QuestionCircleOutlined, BellOutlined, KeyOutlined, LogoutOutlined, GiftOutlined, AccountBookOutlined, ContainerOutlined, MenuFoldOutlined, UsergroupAddOutlined } from "@ant-design/icons"; import { useContext, useEffect, useState } from "react"; -import { put, get, post } from "../../util/AjaxUtils.ts"; +import { put, get, post,getUseUrl } from "../../util/AjaxUtils.ts"; import { GlobalContext, GlobalDispatchContext, reloadUser } from "../../context/GlobalContext.ts"; import UserEdit from "../../components/user/UserEdit.tsx"; import PasswordChange from "../../components/password/PasswordChange.tsx"; @@ -443,8 +443,9 @@ export default function Head() {
{ - // window.open(`https://www.aimzhu.com/operator/route/agreementportal/view?agreementId=${DevUserId}&title=系统操作流程`) - window.open('https://www.aimzhu.com/operator/route/agreementportal/view?agreementId=c0c5683a-bef3-40c3-8395-900a362ea234&title=系统操作流程') + + // window.open('https://www.aimzhu.com/operator/route/agreementportal/view?agreementId=c0c5683a-bef3-40c3-8395-900a362ea234&title=系统操作流程') + getUseUrl() }}> diff --git a/src/route/index/Index.tsx b/src/route/index/Index.tsx index 5a7b9fb..dcd3297 100644 --- a/src/route/index/Index.tsx +++ b/src/route/index/Index.tsx @@ -532,6 +532,7 @@ export default function Index() { messageApi.success('领取成功') setTimeout(() => { setCoupon(false) + // getCoupon() }, 500) }, onFinally() { diff --git a/src/util/AjaxUtils.ts b/src/util/AjaxUtils.ts index 59039cd..f7241ed 100644 --- a/src/util/AjaxUtils.ts +++ b/src/util/AjaxUtils.ts @@ -40,7 +40,7 @@ axios.interceptors.request.use(config => { config.data = { unused: 0 } // 这个是关键点,解决get 请求添加不上content_type } config.headers['X-USER-ID'] = DevUserId; - config.headers['X-SOURCE'] = 'page'; + config.headers['X-SOURCE'] = 'page'; return config }); @@ -85,7 +85,7 @@ export function get(req: Req) { req.onSuccess(res); }).catch(error => { if (error.response) { - if(error.response.status === 401) { + if (error.response.status === 401) { window.location.href = axios.defaults.baseURL ? axios.defaults.baseURL : ''; return; } @@ -101,6 +101,26 @@ export function get(req: Req) { req.onFinally?.(); }) } +// 优惠券规则 +export function getCouponUrl() { + axios.get("https://www.aimzhu.com/operator/app/agreementportal/getrelease/89c4ca41-a44e-4ae2-bad3-6fa6536dd453") + .then((data:any) => { + window.open(`https://www.aimzhu.com/operator/route/agreementportal/view?agreementId=${data.data.agreementId}&title=${data.data.title}`) + }) + .catch(error => { + console.error("请求出错:", error); + }); +} +// 操作流程手册 +export function getUseUrl() { + axios.get("https://www.aimzhu.com/operator/app/agreementportal/getrelease/96263cb9-c651-419a-842d-d614e723b329") + .then((data:any) => { + window.open(`https://www.aimzhu.com/operator/route/agreementportal/view?agreementId=${data.data.agreementId}&title=${data.data.title}`) + }) + .catch(error => { + console.error("请求出错:", error); + }); +} export function post(req: Req) { req.onBefore?.();