注释部分代码
This commit is contained in:
parent
062e7a6f4a
commit
01da5d8f4d
|
@ -31,28 +31,28 @@ export default function EditSpacePost() {
|
||||||
blurCover: true,
|
blurCover: true,
|
||||||
});
|
});
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
useEffect(() => {
|
// useEffect(() => {
|
||||||
const dataStr = searchParams.get("data");
|
// const dataStr = searchParams.get("data");
|
||||||
const data = JSON.parse(decodeURIComponent(dataStr));
|
// const data = JSON.parse(decodeURIComponent(dataStr));
|
||||||
setData(data);
|
// setData(data);
|
||||||
const publicData = {
|
// const publicData = {
|
||||||
price: data?.price ? data?.price / 100 : 0,
|
// price: data?.price ? data?.price / 100 : 0,
|
||||||
imageVisibleRange: data?.media_visible_range,
|
// imageVisibleRange: data?.media_visible_range,
|
||||||
isCreatingPaidText: data?.is_creating_paid_text,
|
// isCreatingPaidText: data?.is_creating_paid_text,
|
||||||
isFreeForIronfan: data?.is_ironfan_visible,
|
// isFreeForIronfan: data?.is_ironfan_visible,
|
||||||
blurCover: data?.is_blurring_cover == 1,
|
// blurCover: data?.is_blurring_cover == 1,
|
||||||
};
|
// };
|
||||||
// const imgs = getExistImgs(data);
|
// // const imgs = getExistImgs(data);
|
||||||
setFormData({
|
// setFormData({
|
||||||
content: data?.paid_text
|
// content: data?.paid_text
|
||||||
? data?.text.slice(0, data?.text.length - data?.paid_text.length)
|
// ? data?.text.slice(0, data?.text.length - data?.paid_text.length)
|
||||||
: data?.text,
|
// : data?.text,
|
||||||
paidText: data?.paid_text,
|
// paidText: data?.paid_text,
|
||||||
imageAssets: [],
|
// imageAssets: [],
|
||||||
...publicData,
|
// ...publicData,
|
||||||
});
|
// });
|
||||||
setPriceEditData(publicData);
|
// setPriceEditData(publicData);
|
||||||
}, []);
|
// }, []);
|
||||||
//发布内容
|
//发布内容
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
if (formData.content == "") {
|
if (formData.content == "") {
|
||||||
|
|
|
@ -29,7 +29,6 @@ export default function WithAuth(WrappedComponent) {
|
||||||
console.log("hasToken-----------", hasToken);
|
console.log("hasToken-----------", hasToken);
|
||||||
const currentIsLogin = await checkAuth();
|
const currentIsLogin = await checkAuth();
|
||||||
console.log("currentIsLogin-----------", currentIsLogin);
|
console.log("currentIsLogin-----------", currentIsLogin);
|
||||||
debugger;
|
|
||||||
if (!currentIsLogin) {
|
if (!currentIsLogin) {
|
||||||
Toast.show({
|
Toast.show({
|
||||||
icon: "fail",
|
icon: "fail",
|
||||||
|
|
Loading…
Reference in New Issue