修复空间管理数据错位的bug;延长登陆cookie有效期

This commit is contained in:
yezian 2024-11-14 16:59:33 +08:00
parent 2af197f2af
commit c97a8cbca5
2 changed files with 154 additions and 150 deletions

View File

@ -739,6 +739,7 @@ const StreamerSpaceContent = () => {
scroll={{ y: window.innerHeight - 300 }} scroll={{ y: window.innerHeight - 300 }}
/> />
{/* 编辑空间模态框是否显示 */} {/* 编辑空间模态框是否显示 */}
{isModalOpen && (
<Modal footer={null} open={isModalOpen} onCancel={handleCancel}> <Modal footer={null} open={isModalOpen} onCancel={handleCancel}>
<Form <Form
name="change" name="change"
@ -794,7 +795,9 @@ const StreamerSpaceContent = () => {
<Form.Item <Form.Item
name="ironfanship_price" name="ironfanship_price"
label="铁粉价格(元)" label="铁粉价格(元)"
initialValue={defaultValues?.paymentSettings?.ironfanship_price} initialValue={
defaultValues?.paymentSettings?.ironfanship_price
}
rules={[ rules={[
{ {
required: true, required: true,
@ -889,6 +892,7 @@ const StreamerSpaceContent = () => {
</div> </div>
</Form> </Form>
</Modal> </Modal>
)}
{/* 添加代运营Modal是否可见 */} {/* 添加代运营Modal是否可见 */}
{isAddAgencyModalOpen && ( {isAddAgencyModalOpen && (
<Modal <Modal

View File

@ -31,8 +31,8 @@ export async function checkAuth() {
export function signIn(data) { export function signIn(data) {
const cookies = new Cookies(); const cookies = new Cookies();
cookies.set("token", data.data.token); cookies.set("token", data.data.token, { maxAge: 315576000 });
cookies.set("account", data.data.account); cookies.set("account", data.data.account, { maxAge: 315576000 });
window.location.reload(); window.location.reload();
} }