跳转修改
This commit is contained in:
parent
324a9443e7
commit
0ee68cbf84
@ -95,11 +95,16 @@
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: #353535;
|
color: #353535;
|
||||||
margin-top: 20px;
|
/* margin-top: 20px; */
|
||||||
margin-left: 19px;
|
margin-left: 19px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.content-rule{
|
||||||
|
font-size: 18px;
|
||||||
|
margin-right: 32px;
|
||||||
|
color: #1677FF;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
.content-bot {
|
.content-bot {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import './HeadCouponModal.css'
|
import './HeadCouponModal.css'
|
||||||
import { get } from '../../util/AjaxUtils'
|
import { get,
|
||||||
|
// getCouponUrl
|
||||||
|
} from '../../util/AjaxUtils'
|
||||||
import {
|
import {
|
||||||
Pagination,
|
Pagination,
|
||||||
message,
|
message,
|
||||||
@ -14,7 +16,7 @@ import useLogo from '../../static/coupon/useLogo.png'
|
|||||||
import overdueImg from '../../static/coupon/overdueImg.png'
|
import overdueImg from '../../static/coupon/overdueImg.png'
|
||||||
export default function HeadCouponModal(props: any) {
|
export default function HeadCouponModal(props: any) {
|
||||||
const [messageApi, contextHolder] = message.useMessage();
|
const [messageApi, contextHolder] = message.useMessage();
|
||||||
const [loading,setLoading] = useState(false)
|
const [loading, setLoading] = useState(false)
|
||||||
const [title, setTitle] = useState('未使用')
|
const [title, setTitle] = useState('未使用')
|
||||||
// 分页
|
// 分页
|
||||||
const [page, setPage] = useState(1)
|
const [page, setPage] = useState(1)
|
||||||
@ -88,6 +90,48 @@ export default function HeadCouponModal(props: any) {
|
|||||||
<div className='headModal-bot'>
|
<div className='headModal-bot'>
|
||||||
<Spin tip="加载中,请稍后..." size="small" spinning={loading}>
|
<Spin tip="加载中,请稍后..." size="small" spinning={loading}>
|
||||||
<div style={{ display: title == '未使用' ? 'block' : 'none' }}>
|
<div style={{ display: title == '未使用' ? 'block' : 'none' }}>
|
||||||
|
{/* <div className='couponList' >
|
||||||
|
<div className='content'>
|
||||||
|
<div className='content-noUse-left'>
|
||||||
|
<div className='content-left-num'>
|
||||||
|
<div
|
||||||
|
style={{ marginTop: -10 }}
|
||||||
|
>
|
||||||
|
<span style={{ fontSize: 30 }}>¥</span>
|
||||||
|
<span style={{ fontSize: 60, fontWeight: 700 }}>100</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className='content-right'>
|
||||||
|
<div style={{ display: 'flex', marginTop: 20, justifyContent: 'space-between' }}>
|
||||||
|
<div className='content-text'>
|
||||||
|
可购买平台内任意软著时使用
|
||||||
|
</div>
|
||||||
|
<div className='content-rule' onClick={() => {
|
||||||
|
// window.open('https://www.aimzhu.com/CouponRule.html')
|
||||||
|
|
||||||
|
getCouponUrl()
|
||||||
|
}}>
|
||||||
|
使用规则
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className='content-bot'>
|
||||||
|
<div className='content-time'>
|
||||||
|
有效期:2008 至 2008
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className='content-button' onClick={() => {
|
||||||
|
props.closeModal()
|
||||||
|
}}>
|
||||||
|
去使用
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div> */}
|
||||||
{couponArray.map((item) => {
|
{couponArray.map((item) => {
|
||||||
return (
|
return (
|
||||||
<div className='couponList' key={item.couponId}>
|
<div className='couponList' key={item.couponId}>
|
||||||
|
@ -5,7 +5,7 @@ import RechargeHead from '../../components/recharge/RechargeHead.tsx';
|
|||||||
import { Dropdown, MenuProps, message, Modal, Space, Spin, Input } from "antd";
|
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 { DownOutlined, UserOutlined, QuestionCircleOutlined, BellOutlined, KeyOutlined, LogoutOutlined, GiftOutlined, AccountBookOutlined, ContainerOutlined, MenuFoldOutlined, UsergroupAddOutlined } from "@ant-design/icons";
|
||||||
import { useContext, useEffect, useState } from "react";
|
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 { GlobalContext, GlobalDispatchContext, reloadUser } from "../../context/GlobalContext.ts";
|
||||||
import UserEdit from "../../components/user/UserEdit.tsx";
|
import UserEdit from "../../components/user/UserEdit.tsx";
|
||||||
import PasswordChange from "../../components/password/PasswordChange.tsx";
|
import PasswordChange from "../../components/password/PasswordChange.tsx";
|
||||||
@ -443,8 +443,9 @@ export default function Head() {
|
|||||||
</div>
|
</div>
|
||||||
<div className='headLine'></div>
|
<div className='headLine'></div>
|
||||||
<div className='head-nav' title='系统操作流程' onClick={() => {
|
<div className='head-nav' title='系统操作流程' onClick={() => {
|
||||||
// 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()
|
||||||
|
|
||||||
}}>
|
}}>
|
||||||
<QuestionCircleOutlined />
|
<QuestionCircleOutlined />
|
||||||
|
@ -532,6 +532,7 @@ export default function Index() {
|
|||||||
messageApi.success('领取成功')
|
messageApi.success('领取成功')
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setCoupon(false)
|
setCoupon(false)
|
||||||
|
// getCoupon()
|
||||||
}, 500)
|
}, 500)
|
||||||
},
|
},
|
||||||
onFinally() {
|
onFinally() {
|
||||||
|
@ -40,7 +40,7 @@ axios.interceptors.request.use(config => {
|
|||||||
config.data = { unused: 0 } // 这个是关键点,解决get 请求添加不上content_type
|
config.data = { unused: 0 } // 这个是关键点,解决get 请求添加不上content_type
|
||||||
}
|
}
|
||||||
config.headers['X-USER-ID'] = DevUserId;
|
config.headers['X-USER-ID'] = DevUserId;
|
||||||
config.headers['X-SOURCE'] = 'page';
|
config.headers['X-SOURCE'] = 'page';
|
||||||
return config
|
return config
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ export function get<T>(req: Req<T>) {
|
|||||||
req.onSuccess(res);
|
req.onSuccess(res);
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
if (error.response) {
|
if (error.response) {
|
||||||
if(error.response.status === 401) {
|
if (error.response.status === 401) {
|
||||||
window.location.href = axios.defaults.baseURL ? axios.defaults.baseURL : '';
|
window.location.href = axios.defaults.baseURL ? axios.defaults.baseURL : '';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -101,6 +101,26 @@ export function get<T>(req: Req<T>) {
|
|||||||
req.onFinally?.();
|
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<T>(req: Req<T>) {
|
export function post<T>(req: Req<T>) {
|
||||||
req.onBefore?.();
|
req.onBefore?.();
|
||||||
|
Loading…
Reference in New Issue
Block a user