diff --git a/app/globals.css b/app/globals.css
index 1cdcab7..52db484 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -96,7 +96,7 @@ textarea {
.custom-tabs .adm-tabs-tab-line {
background: none;
- background-image: url("https://filecdn01.tiefen.fun/web_app_public/icons/tabindicator.png");
+ background-image: url("https://filecdntx01.tiefen.fun/web_app_public/icons/tabindicator.png");
height: 34px;
background-position: -2px -18px;
background-size: cover;
@@ -179,6 +179,7 @@ textarea {
.adm-list-body,
.adm-list-item {
+ padding: 0 !important;
border: none !important;
background: none !important;
}
@@ -194,7 +195,7 @@ textarea {
.tabPinkLine::after {
content: "";
position: absolute;
- background-image: url("https://filecdn01.tiefen.fun/web_app_public/icons/tabindicator.png");
+ background-image: url("https://filecdntx01.tiefen.fun/web_app_public/icons/tabindicator.png");
height: 34px;
background-position: -2px -18px;
background-size: cover;
@@ -207,7 +208,7 @@ textarea {
.titlePinkLine::after {
content: "";
position: absolute;
- background-image: url("https://filecdn01.tiefen.fun/web_app_public/icons/pinkline.png");
+ background-image: url("https://filecdntx01.tiefen.fun/web_app_public/icons/pinkline.png");
height: 12px;
width: inherit;
min-width: 42px;
@@ -304,6 +305,7 @@ textarea {
.adm-list-item-content {
padding: 0;
+ border: none!important;
}
.customize-body img {
max-height: 90vh;
@@ -390,3 +392,11 @@ textarea {
}
}
}
+
+.adm-slider-track{
+ background-color: #ff669e40 !important;
+}
+.adm-slider-thumb{
+ background-color: #ff669e !important;
+ transform: scale(0.5);
+}
\ No newline at end of file
diff --git a/app/index.css b/app/index.css
index bdcfdb0..8dd2526 100644
--- a/app/index.css
+++ b/app/index.css
@@ -16,7 +16,7 @@
.custom-tabs .adm-tabs-tab-line {
background: none;
- background-image: url("https://filecdn01.tiefen.fun/web_app_public/icons/tabindicator.png");
+ background-image: url("https://filecdntx01.tiefen.fun/web_app_public/icons/tabindicator.png");
height: 34px;
background-position: -2px -18px;
background-size: cover;
@@ -30,11 +30,11 @@
.adm-list-body-inner {
/* margin-top: 8px; */
}
-.adm-image-viewer-indicator{
+.adm-image-viewer-indicator {
color: #fff;
}
-.imagesBtnsControllers{
+.imagesBtnsControllers {
position: fixed;
top: 50%;
width: 100%;
@@ -44,19 +44,20 @@
z-index: 10001;
pointer-events: none;
}
-.imagesBtnsControllerLeft,.imagesBtnsControllerRight{
+.imagesBtnsControllerLeft,
+.imagesBtnsControllerRight {
width: 42px;
height: 42px;
border-radius: 53px;
- background-color: #0000001A;
+ background-color: #0000001a;
background-size: contain;
background-repeat: no-repeat;
pointer-events: all;
}
-.imagesBtnsControllerLeft{
+.imagesBtnsControllerLeft {
background-image: url("/icons/left.png");
opacity: 0.5;
}
-.imagesBtnsControllerRight{
+.imagesBtnsControllerRight {
background-image: url("/icons/right.png");
-}
\ No newline at end of file
+}
diff --git a/app/login/index.module.scss b/app/login/index.module.scss
index 5bc1412..60954a9 100644
--- a/app/login/index.module.scss
+++ b/app/login/index.module.scss
@@ -15,7 +15,7 @@
}
.customTabs>div>div:last-child>div:first-child::after{
content: "";
- background-image: url("https://filecdn01.tiefen.fun/web_app_public/icons/tabindicator.png");
+ background-image: url("https://filecdntx01.tiefen.fun/web_app_public/icons/tabindicator.png");
height: 44px;
background-size: cover;
background-repeat: no-repeat;
diff --git a/app/my/page.js b/app/my/page.js
index 184aa5e..7e742a3 100644
--- a/app/my/page.js
+++ b/app/my/page.js
@@ -3,10 +3,12 @@
import React, { useEffect, useState } from "react";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faAngleRight } from "@fortawesome/free-solid-svg-icons";
-import { Avatar, Image, Toast, Space } from "antd-mobile";
+import { Avatar, Toast, Space } from "antd-mobile";
import { useRouter } from "next/navigation";
import { get } from "@/utils/storeInfo";
import requireAPI from "@/utils/requireAPI";
+import OwnIcon from "@/components/OwnIcon";
+import OwnImage from "@/components/OwnImage";
const My = () => {
const [userInfo, setUserInfo] = useState({});
const router = useRouter();
@@ -87,35 +89,35 @@ const My = () => {
url: !zoneLength
? `my/createProfile`
: `space/${account.data.account.mid}`,
- iconUrl: `icons/32DP/space.png`,
+ iconUrl: `/icons/32DP/space.png`,
title: !zoneLength ? "开通空间" : "我的空间",
subTitle:
account.data.account.role == 3 ? "创作者功能" : "完善资料后解锁",
},
{
url: `streamerPosts/${account.data.account.mid}`,
- iconUrl: "icons/32DP/myposts.png",
+ iconUrl: "/icons/32DP/myposts.png",
title: "广场动态",
subTitle:
account.data.account.role == 3 ? "创作者功能" : "完善资料后解锁",
},
{
url: `my/wechatWaitingToAdd`,
- iconUrl: "icons/32DP/wechat.png",
+ iconUrl: "/icons/32DP/wechat.png",
title: "待添加微信",
subTitle:
account.data.account.role == 3 ? "创作者功能" : "完善资料后解锁",
},
{
url: `my/editprofile`,
- iconUrl: "icons/32DP/editprofile.png",
+ iconUrl: "/icons/32DP/editprofile.png",
title: "编辑资料",
subTitle:
account.data.account.role == 3 ? "创作者功能" : "完善资料后解锁",
},
{
url: `my/refund/refundList`,
- iconUrl: "icons/32DP/wallet.png",
+ iconUrl: "/icons/32DP/wallet.png",
title: "退款审核",
subTitle:
account.data.account.role == 3 ? "创作者功能" : "完善资料后解锁",
@@ -126,7 +128,7 @@ const My = () => {
currentOld = [
{
url: `my/streamerVerification/completeStreamerInformation`,
- iconUrl: "icons/32DP/editprofile.png",
+ iconUrl: "/icons/32DP/editprofile.png",
title: "完善资料",
subTitle: "完善后解锁全部功能",
status:
@@ -148,27 +150,27 @@ const My = () => {
let currentOld = [
{
url: `my/wallet`,
- iconUrl: "icons/32DP/wallet.png",
+ iconUrl: "/icons/32DP/wallet.png",
title: "我的钱包",
},
{
url: `my/unlockedWechat`,
- iconUrl: "icons/32DP/wechat.png",
+ iconUrl: "/icons/32DP/wechat.png",
title: "已解锁微信",
},
{
url: `my/streamerVerification/joinEntrance`,
- iconUrl: "icons/32DP/join.png",
+ iconUrl: "/icons/32DP/join.png",
title: "申请入驻",
},
{
url: `/messageDetail`,
- iconUrl: "icons/32DP/contact.png",
+ iconUrl: "/icons/32DP/contact.png",
title: "联系客服",
},
{
url: `/my/addToHome`,
- iconUrl: "icons/32DP/toScreen.png",
+ iconUrl: "/icons/32DP/toScreen.png",
title: "添加到主屏幕",
},
];
@@ -229,12 +231,9 @@ const My = () => {
}}
>
@@ -281,26 +280,20 @@ const My = () => {
router.push("my/editUserProfile/selectUserProfileItem")
}
>
-
router.push("my/setting")}
>
-
@@ -310,12 +303,15 @@ const My = () => {
onClick={() => router.push("profile/" + userInfo.mid)}
>
-
+
+
+
{
{userInfo.name}
{userInfo?.is_a_member === 1 && (
-
+
)}
-
{userInfo.user_id}
@@ -363,12 +347,15 @@ const My = () => {
) : (
-
+
+
+
{
{userInfo.name}
{userInfo?.is_a_member === 1 && (
-
+
)}
-
{userInfo.user_id}
diff --git a/app/my/refund/refundList/index.module.scss b/app/my/refund/refundList/index.module.scss
index 58e081a..b12519c 100644
--- a/app/my/refund/refundList/index.module.scss
+++ b/app/my/refund/refundList/index.module.scss
@@ -15,7 +15,7 @@
}
.customTabs>div>div:last-child>div:first-child::after{
content: "";
- background-image: url("https://filecdn01.tiefen.fun/web_app_public/icons/tabindicator.png");
+ background-image: url("https://filecdntx01.tiefen.fun/web_app_public/icons/tabindicator.png");
height: 44px;
background-size: cover;
background-repeat: no-repeat;
diff --git a/app/my/streamerVerification/completeStreamerInformation/page.jsx b/app/my/streamerVerification/completeStreamerInformation/page.jsx
index e3c0a2c..3a00ad3 100644
--- a/app/my/streamerVerification/completeStreamerInformation/page.jsx
+++ b/app/my/streamerVerification/completeStreamerInformation/page.jsx
@@ -21,6 +21,8 @@ import {
Image,
Mask,
SpinLoading,
+ Form,
+ Input,
} from "antd-mobile";
import { useRouter } from "next/navigation";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
@@ -90,27 +92,17 @@ const provinces = [
export default function CompleteStreamerInformation() {
const router = useRouter();
const ref = useRef(null);
+ const [form] = Form.useForm();
const [hadSubmited, setHadSubmited] = useState(false);
const [frameImageUrl, setFrameImageUrl] = useState(null);
const [isWaitingReview, setIsWaitingReview] = useState(false);
+ const [showWechatInput, setShowWechatInput] = useState(false);
const [formData, setFormData] = useState({
- wechatPrice: 0,
- gender: [""],
- age: [""],
- height: [""],
- weight: [""],
- constellation: [""],
- province: [""],
- tags: [],
- info: "",
- autoResponse: "",
- wechat: "",
- wechatAddWay: 1,
- fans: 0,
imageAssets: [],
displayImage: [],
displayVideo: [],
});
+
const [spacePriceAble, setSpacePriceAble] = useState(false);
// const [wechatAddWay, setWechatAddWay] = useState("0");
const [data, setData] = useState({});
@@ -155,8 +147,8 @@ export default function CompleteStreamerInformation() {
cover,
shorts,
} = data?.streamer;
- setFormData((old) => ({
- ...old,
+
+ const newFormData = {
fans,
wechatPrice: wechat_coin_price / 10,
gender: [`${gender}`],
@@ -185,7 +177,9 @@ export default function CompleteStreamerInformation() {
url: shorts?.videos[0]?.cover_urls[0],
},
],
- }));
+ };
+ setShowWechatInput(wechat_lock_type);
+ form.setFieldsValue(newFormData);
}
}, [data]);
useEffect(() => {
@@ -308,42 +302,10 @@ export default function CompleteStreamerInformation() {
setIsSubmitting(false);
}
};
- const handSubmit = async (values) => {
+ const handleSubmit = async (values) => {
const account = await get("account");
- const {
- fans,
- gender,
- wechatAddWay,
- wechatPrice,
- info,
- age,
- height,
- weight,
- constellation,
- province,
- autoResponse,
- tags,
- wechat,
- imageAssets,
- displayImage,
- displayVideo,
- } = values;
- if (
- !fans ||
- !gender ||
- // !wechatAddWay ||
- !wechatPrice ||
- !info ||
- !age ||
- !height ||
- !weight ||
- !constellation ||
- !province ||
- !autoResponse ||
- tags.length === 0 ||
- displayImage.length === 0 ||
- displayVideo.length === 0
- ) {
+ const { imageAssets, displayImage, displayVideo } = formData;
+ if (displayImage.length === 0 || displayVideo.length === 0) {
Toast.show({
icon: "fail",
content: "请完善信息后提交",
@@ -351,31 +313,6 @@ export default function CompleteStreamerInformation() {
});
return;
}
- if (isNaN(fans) || fans < 1) {
- Toast.show({
- icon: "fail",
- content: "请输入有效的全网粉丝量(大于等于1的整数)",
- position: "top",
- });
- return;
- }
- const price = parseInt(wechatPrice, 10);
- if (isNaN(price) || price < 1) {
- Toast.show({
- icon: "fail",
- content: "请输入有效的微信价格(大于等于1的整数)",
- position: "top",
- });
- return;
- }
- if (wechatAddWay === 0 && wechat.trim() == "") {
- Toast.show({
- icon: "fail",
- content: "请填写微信号",
- position: "top",
- });
- return;
- }
//相册不得低于2张
if (imageAssets.length < 2) {
Toast.show({
@@ -424,6 +361,21 @@ export default function CompleteStreamerInformation() {
setIsSubmitting(false);
return;
}
+ const {
+ gender,
+ wechat,
+ info,
+ age,
+ tags,
+ height,
+ weight,
+ constellation,
+ province,
+ wechatAddWay,
+ fans,
+ wechatPrice,
+ autoResponse,
+ } = values;
//上传表单
const body = {
mid: account?.mid,
@@ -583,6 +535,7 @@ export default function CompleteStreamerInformation() {
);
}
+ const messageEle = (message) =>
{message}
;
return (
{/* 头部标题 */}
@@ -633,13 +586,38 @@ export default function CompleteStreamerInformation() {
{data?.name}
-
-
-
-
- 性别
- *
-
+
性别}
+ layout="horizontal"
+ trigger="onConfirm"
+ rules={[
+ {
+ required: true,
+ message: messageEle("请选择性别"),
+ // validator: (rule, value) => {
+ // if (value.length === 0) {
+ // return Promise.reject(messageEle("请选择性别"));
+ // }
+ // },
+ },
+ ]}
+ >
{
- setFormData((old) => ({ ...old, gender: v }));
- }}
>
{(items, { open }) => {
return (
@@ -660,9 +634,11 @@ export default function CompleteStreamerInformation() {
justify="center"
onClick={open}
>
- {items.every((item) => item === null)
- ? "未选择"
- : items.map((item) => item?.label ?? "未选择").join("")}
+
+ {items.every((item) => item === null)
+ ? "未选择"
+ : items.map((item) => item?.label ?? "未选择").join("")}
+
-
-
-
-
-
- 年龄(岁)
- *
-
-
{
- setFormData((old) => ({ ...old, age: v }));
- }}
- >
+
+ 年龄(岁)}
+ layout="horizontal"
+ rules={[
+ {
+ required: true,
+ message: messageEle("请选择年龄"),
+ },
+ ]}
+ >
+
{(items, { open }) => {
return (
- {items.every((item) => item === null)
- ? "未选择"
- : items.map((item) => item?.label ?? "未选择").join("")}
+
+ {items.every((item) => item === null)
+ ? "未选择"
+ : items.map((item) => item?.label ?? "未选择").join("")}
+
-
-
-
-
-
- 身高(cm)
- *
-
-
{
- setFormData((old) => ({ ...old, height: v }));
- }}
- >
+
+ 身高(cm)}
+ layout="horizontal"
+ rules={[
+ {
+ required: true,
+ message: messageEle("请选择身高"),
+ },
+ ]}
+ >
+
{(items, { open }) => {
return (
- {items.every((item) => item === null)
- ? "未选择"
- : items.map((item) => item?.label ?? "未选择").join("")}
+
+ {items.every((item) => item === null)
+ ? "未选择"
+ : items.map((item) => item?.label ?? "未选择").join("")}
+
-
-
-
-
-
- 体重(kg)
- *
-
-
{
- setFormData((old) => ({ ...old, weight: v }));
- }}
- >
+
+ 体重(kg)}
+ layout="horizontal"
+ rules={[
+ {
+ required: true,
+ message: messageEle("请选择体重"),
+ },
+ ]}
+ >
+
{(items, { open }) => {
return (
- {items.every((item) => item === null)
- ? "未选择"
- : items.map((item) => item?.label ?? "未选择").join("")}
+
+ {items.every((item) => item === null)
+ ? "未选择"
+ : items.map((item) => item?.label ?? "未选择").join("")}
+
-
-
-
-
-
- 星座
- *
-
-
{
- setFormData((old) => ({ ...old, constellation: v }));
- }}
- >
+
+ 星座}
+ layout="horizontal"
+ rules={[
+ {
+ required: true,
+ message: messageEle("请选择星座"),
+ },
+ ]}
+ >
+
{(items, { open }) => {
return (
- {items.every((item) => item === null)
- ? "未选择"
- : items.map((item) => item?.label ?? "未选择").join("")}
+
+ {items.every((item) => item === null)
+ ? "未选择"
+ : items.map((item) => item?.label ?? "未选择").join("")}
+
-
-
-
-
-
- 所在地
- *
-
-
{
- setFormData((old) => ({ ...old, province: v }));
- }}
- >
+
+ 所在地}
+ layout="horizontal"
+ rules={[
+ {
+ required: true,
+ message: messageEle("请选择所在地"),
+ },
+ ]}
+ >
+
{(items, { open }) => {
return (
- {items.every((item) => item === null)
- ? "未选择"
- : items.map((item) => item?.label ?? "未选择").join("")}
+
+ {items.every((item) => item === null)
+ ? "未选择"
+ : items.map((item) => item?.label ?? "未选择").join("")}
+
-
-
-
-
-
+
+
添加标签}
+ layout="vertical"
+ rules={[
+ {
+ required: true,
+ message: messageEle("请添加标签"),
+ },
+ ]}
+ >
{
- if (arr.length >= 4) {
- Toast.show({
- content: "最多只能选择3个标签",
- position: "top",
- });
- return;
- }
- setFormData((old) => ({ ...old, tags: arr }));
- }}
+ // onChange={(arr, extend) => {
+ // if (arr.length >= 4) {
+ // Toast.show({
+ // content: "最多只能选择3个标签",
+ // position: "top",
+ // });
+ // return;
+ // }
+ // setFormData((old) => ({ ...old, tags: arr }));
+ // }}
showCheckMark={false}
- value={formData.tags}
style={{
"--border-radius": "100px",
"--border": "solid #ffffff80 1px",
@@ -889,23 +881,21 @@ export default function CompleteStreamerInformation() {
"--checked-color": "none",
}}
/>
-
-
-
-
-
-
- setFormData((old) => ({ ...old, wechatAddWay: value }))
- }
- >
+
+ 添加微信方式}
+ layout="vertical"
+ // trigger="onConfirm"
+ rules={[
+ {
+ required: true,
+ message: messageEle("请添加微信方式"),
+ },
+ ]}
+ >
+
{superSingles.map((item) => (
@@ -914,245 +904,255 @@ export default function CompleteStreamerInformation() {
))}
- {formData.wechatAddWay == 0 && (
-
-
-
- setFormData((old) => ({ ...old, wechat: value }))
- }
- />
-
-
- )}
-
-
-
-
-
+
+
+
微信帐号}
+ layout="vertical"
+ name="wechat"
+ rules={[
+ {
+ required: true,
+ message: messageEle("请填写正确的微信"),
+ pattern: /^[a-zA-Z0-9_-]+$/,
+ },
+ ]}
+ >
+
+
+ 全网粉丝量(万)}
+ rules={[
+ {
+ required: true,
+ message: messageEle(
+ "请输入有效的全网粉丝量(大于等于1的整数)"
+ ),
+ // pattern: /^[1-9]+(\.[0-9]{1,2})?$/,
+ pattern: /^[1-9]\d*$/,
+ },
+ ]}
+ >
{
- setFormData((old) => ({ ...old, fans: value }));
- }}
+ inputClassName="mt-2 px-4 py-3 h-12 rounded-[0.8rem] bg-[#FFFFFF1a] flex justify-between items-center"
/>
-
-
-
-
-
-
-
¥
-
- setFormData((old) => ({ ...old, wechatPrice: value }))
- }
- />
+
+ 加微信价格(元)}
+ rules={[
+ {
+ required: true,
+ message: messageEle("请输入有效的微信价格(大于等于1的整数)"),
+ pattern: /^[1-9]\d*$/,
+ },
+ ]}
+ >
+
+
+ ¥
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
- -
-
- *
- 封面图
-
-
-
- handleUploadImage(e, 1)}
- />
-
-
-
- -
-
- *
- 展示视频
-
-
+
-
- handleUploadImage(e, 2)}
- />
-
-
-
- -
-
+
+
+ -
+
+ *
+ 展示视频
+
+
-
-
-
+
+ handleUploadImage(e, 2)}
+ />
+
+
+
+ -
+
+
+ *
+ 相册
+
+
pickDisPlayImage()}
+ >
+
+ 请上传2~9张照片
+
+
+
+
+ {
+ setFormData((old) => ({ ...old, imageAssets: imgs }));
+ }}
+ />
+
+
+
+
+
+
+
+
+
diff --git a/app/my/streamerVerification/joinEntrance/page.jsx b/app/my/streamerVerification/joinEntrance/page.jsx
index 5468e85..400b240 100644
--- a/app/my/streamerVerification/joinEntrance/page.jsx
+++ b/app/my/streamerVerification/joinEntrance/page.jsx
@@ -78,14 +78,12 @@ export default function JoinEntrance() {
{/* 内容 */}
-
+
(streamerState?.basic_status === 2 ||
streamerState?.basic_status === 4) &&
- (streamerState?.details_status === 2 ||
- streamerState?.details_status === 4) &&
router.push("joinStreamer")
}
>
@@ -93,10 +91,10 @@ export default function JoinEntrance() {
src={
process.env.NEXT_PUBLIC_WEB_ASSETS_URL +
`/images/${
- streamerState?.basic_status === 1 &&
- streamerState?.details_status === 1
- ? "streamerJoined"
- : "streamerJoin"
+ streamerState?.basic_status === 2 ||
+ streamerState?.basic_status === 4
+ ? "streamerJoin"
+ : "streamerJoined"
}.png`
}
placeholder=""
diff --git a/app/my/wechatWaitingToAdd/index.module.scss b/app/my/wechatWaitingToAdd/index.module.scss
index 58e081a..b12519c 100644
--- a/app/my/wechatWaitingToAdd/index.module.scss
+++ b/app/my/wechatWaitingToAdd/index.module.scss
@@ -15,7 +15,7 @@
}
.customTabs>div>div:last-child>div:first-child::after{
content: "";
- background-image: url("https://filecdn01.tiefen.fun/web_app_public/icons/tabindicator.png");
+ background-image: url("https://filecdntx01.tiefen.fun/web_app_public/icons/tabindicator.png");
height: 44px;
background-size: cover;
background-repeat: no-repeat;
diff --git a/app/noticeDetail/components/MessageList/index.jsx b/app/noticeDetail/components/MessageList/index.jsx
index eb71828..8314214 100644
--- a/app/noticeDetail/components/MessageList/index.jsx
+++ b/app/noticeDetail/components/MessageList/index.jsx
@@ -11,7 +11,8 @@ import requireAPI from "@/utils/requireAPI";
import { connect } from "react-redux";
import { changeNoticeCount } from "@/store/actions";
import { Image, Badge, Toast } from "antd-mobile";
-const MessageList = ({ mid, changeNoticeCount, refInstance }) => {
+import OwnImage from "@/components/OwnImage";
+const MessageList = ({ mid, changeNoticeCount, refInstance, noticeCount }) => {
const router = useRouter();
const [data, setData] = useState([]);
const [scollNotice, setScollNotice] = useState("");
@@ -66,6 +67,7 @@ const MessageList = ({ mid, changeNoticeCount, refInstance }) => {
});
return;
}
+ changeNoticeCount(0);
} catch (error) {
console.error(error);
}
@@ -79,7 +81,7 @@ const MessageList = ({ mid, changeNoticeCount, refInstance }) => {
getData();
getActiveNotice();
- }, []);
+ }, [noticeCount]);
const getData = async () => {
try {
const body = {
@@ -104,9 +106,6 @@ const MessageList = ({ mid, changeNoticeCount, refInstance }) => {
return;
}
const noticeObj = _data.data.result;
- changeNoticeCount(_data.data.total);
- // console.log("noticeObjNum", noticeObj);
-
setData(noticeObj);
setInfoItems((old) => {
const newInfoItems = [...old];
@@ -163,15 +162,13 @@ const MessageList = ({ mid, changeNoticeCount, refInstance }) => {
}
className="flex flex-row items-center py-4 mb-2 rounded-xl bg-[#ffffff1a] gap-3 px-4"
>
-
-
-
+
@@ -219,7 +216,7 @@ const MessageList = ({ mid, changeNoticeCount, refInstance }) => {
className="flex flex-row items-center py-4 mb-2 rounded-xl"
>
- {
);
};
-
+const mapStateToProps = ({ reducer }) => {
+ return {
+ noticeCount: reducer.noticeCount,
+ };
+};
const mapDispatchToProps = {
changeNoticeCount,
};
-const Component = connect(null, mapDispatchToProps)(MessageList);
+const Component = connect(mapStateToProps, mapDispatchToProps)(MessageList);
export default forwardRef((props, ref) => (
));
diff --git a/app/noticeDetail/components/NoticeItem/index.jsx b/app/noticeDetail/components/NoticeItem/index.jsx
index b88f0a3..5c96a48 100644
--- a/app/noticeDetail/components/NoticeItem/index.jsx
+++ b/app/noticeDetail/components/NoticeItem/index.jsx
@@ -29,7 +29,9 @@ export default function NoticeItem({ navigation, leftIcon, hasLink, data }) {
{data?.title}
-
{data?.message}
+
+ {data?.message}
+
{/* 链接跳转 */}
{!!data?.hyperlinks && (
div>div:last-child>div:first-child::after{
content: "";
- background-image: url("https://filecdn01.tiefen.fun/web_app_public/icons/tabindicator.png");
+ background-image: url("https://filecdntx01.tiefen.fun/web_app_public/icons/tabindicator.png");
height: 44px;
background-size: cover;
background-repeat: no-repeat;
diff --git a/components/AddToHome/index.jsx b/components/AddToHome/index.jsx
index f791cd4..10d31fe 100644
--- a/components/AddToHome/index.jsx
+++ b/components/AddToHome/index.jsx
@@ -24,7 +24,10 @@ export default function AddToHome() {
fit="cover"
className="rounded-md mr-3"
// src={process.env.NEXT_PUBLIC_WEB_ASSETS_URL+"/icons/nodata.png"}
- src={process.env.NEXT_PUBLIC_WEB_ASSETS_URL + "/images/icon.png"}
+ src={
+ process.env.NEXT_PUBLIC_WEB_ASSETS_URL +
+ "/images/icon_border.png"
+ }
placeholder=""
width={46}
height={46}
diff --git a/components/BottomNav/index.js b/components/BottomNav/index.js
index b91b7cb..602885c 100644
--- a/components/BottomNav/index.js
+++ b/components/BottomNav/index.js
@@ -9,7 +9,7 @@ import { changeNoticeCount, changeInviter } from "@/store/actions";
import { connect } from "react-redux";
import { get } from "@/utils/storeInfo";
import requireAPI from "@/utils/requireAPI";
-import { ErrorBoundary } from "react-error-boundary";
+import OwnIcon from "../OwnIcon";
function BottomNav({ changeNoticeCount, changeInviter, noticeCount }) {
const searchParams = useSearchParams();
const pathname = usePathname();
@@ -37,12 +37,12 @@ function BottomNav({ changeNoticeCount, changeInviter, noticeCount }) {
if (_data.ret === -1) {
return;
}
- changeNoticeCount(_data.data.total);
+ if (!noticeCount) changeNoticeCount(_data.data.total);
} catch (error) {}
};
getDtata();
return () => {};
- }, []);
+ }, [noticeCount]);
const setRouteActive = (value) => {
router.replace(value);
};
@@ -50,80 +50,36 @@ function BottomNav({ changeNoticeCount, changeInviter, noticeCount }) {
{
key: "/",
title: "广场",
- icon: (
-
-
-
- ),
- activeIcon: (
-
-
-
- ),
+ icon:
,
+ activeIcon:
,
},
{
key: "/space",
title: "空间",
- icon: (
-
-
-
- ),
- activeIcon: (
-
-
-
- ),
+ icon:
,
+ activeIcon:
,
},
{
key: "/noticeDetail",
title: "消息",
icon: (
-
-
+
+
{!!noticeCount && (
99 ? "+99" : noticeCount}
- className="absolute top-0 right-1"
+ className="absolute top-0 right-0 z-10"
/>
)}
),
activeIcon: (
-
-
+
+
{!!noticeCount && (
99 ? "+99" : noticeCount}
- className="absolute top-0 right-1"
+ className="absolute top-0 right-0 z-10"
/>
)}
@@ -132,22 +88,8 @@ function BottomNav({ changeNoticeCount, changeInviter, noticeCount }) {
{
key: "/my",
title: "我的",
- icon: (
-
-
-
- ),
- activeIcon: (
-
-
-
- ),
+ icon:
,
+ activeIcon:
,
},
];
const checkPath = () => {
diff --git a/components/OwnIcon/index.jsx b/components/OwnIcon/index.jsx
new file mode 100644
index 0000000..1790fb0
--- /dev/null
+++ b/components/OwnIcon/index.jsx
@@ -0,0 +1,34 @@
+import React from "react";
+import { Image } from "antd-mobile";
+export default function OwnIcon({
+ src,
+ width = "100%",
+ height = "100%",
+ className,
+ outClassName,
+ imageClassName,
+}) {
+ return (
+
+
+
+ }
+ placeholder={
+
+ }
+ />
+
+
+
+ );
+}
diff --git a/components/OwnImage/index.jsx b/components/OwnImage/index.jsx
new file mode 100644
index 0000000..7c222c5
--- /dev/null
+++ b/components/OwnImage/index.jsx
@@ -0,0 +1,33 @@
+import React from "react";
+import { Image } from "antd-mobile";
+export default function OwnImage({
+ src,
+ width = "100%",
+ height = "100%",
+ className,
+ roundedFull,
+ ...others
+}) {
+ return (
+
+
+
+ }
+ placeholder={
+
+ }
+ {...others}
+ />
+
+
+
+ );
+}
diff --git a/components/OwnInput/index.js b/components/OwnInput/index.js
index d8e5550..12a2bba 100644
--- a/components/OwnInput/index.js
+++ b/components/OwnInput/index.js
@@ -5,7 +5,6 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faClose } from "@fortawesome/free-solid-svg-icons";
// import styles from "./index.module.scss";
export default function OwnInput({
- value,
onChange,
type = "text",
name,
@@ -16,21 +15,22 @@ export default function OwnInput({
inputClassName = "",
id,
maxLength = 999,
+ ...other
}) {
return (
onChange(e.target?.value)}
- value={value}
+ onChange={(e) => onChange && onChange(e.target?.value)}
className={`w-full placeholder:text-[#FFFFFF80] text-[16px] focus:text-[16px] ${inputClassName}`}
/>
- {clearable && value != "" && (
+ {clearable && other?.value != "" && (
// import('@/components/ImagesMask'), { ssr: false }
// )
@@ -24,7 +26,6 @@ export default function Photos({
const [seeAllPhotos, setSeeAllPhotos] = useState(false);
const [currentPhotos, setCurrentPhotos] = useState([]);
const [photos, setPhotos] = useState([]);
- const [visible, setVisible] = useState(false);
const currentIndex = useRef();
const swiper = useRef(null);
const imagesMaskRef = useRef(null);
@@ -269,11 +270,11 @@ export default function Photos({
currentPhotos.length > 1 ? "h-[24vw]" : ""
}`}
>
-
- }
+ // placeholder={
+ //
+ // }
width={
currentPhotos.length > 1
? "24vw"
@@ -306,16 +307,11 @@ export default function Photos({
}
{item?.mp4 && (
-
- }
+
)}
diff --git a/components/PostItem/index.js b/components/PostItem/index.js
index 7e01aac..f316d1e 100644
--- a/components/PostItem/index.js
+++ b/components/PostItem/index.js
@@ -4,7 +4,9 @@ import React, { useEffect, useState, useMemo, useCallback } from "react";
import Photos from "../Photos";
import { useRouter } from "next/navigation";
import PaySpacePost from "../PaySpacePost";
-import { Image, Popover, Divider, Toast } from "antd-mobile";
+import { Popover, Toast } from "antd-mobile";
+import OwnImage from "../OwnImage";
+import OwnIcon from "../OwnIcon";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faAngleRight } from "@fortawesome/free-solid-svg-icons";
import { handleFollow, thumbsUp, handleBlock } from "@/api/public";
@@ -144,11 +146,7 @@ export default function PostItem({
return (
{type == "space" && data?.is_headed === 1 && (
-
+
)}
-
@@ -287,14 +284,11 @@ export default function PostItem({
>
{data.streamer_ext.is_active_within_a_week ? (
<>
-
{/* {data.streamer_ext.days_elapsed_since_the_last_zones_update < 7 &&
@@ -364,16 +358,14 @@ export default function PostItem({
thumbsUp(data.id, isThumbsUp, setIsThumbsUp, type == "space")
}
>
-
{
+ // const videoPlayer = document.getElementById("videoPlayer");
+ // if (videoPlayer) {
+ // return videoPlayer.currentTime;
+ // }
+ // return 0;
+ // })
+ useEffect(() => {
+ const videoPlayer = document.getElementById("videoPlayer");
+ if (videoPlayer) {
+ videoPlayer.addEventListener("ended", () => {
+ setVideoState((old) => ({ ...old, play: false }));
+ });
+ videoPlayer.addEventListener("timeupdate", () => {
+ console.log((videoPlayer.currentTime / videoPlayer.duration) * 100);
+ if (!isSliding.current)
+ setVideoState((old) => ({
+ ...old,
+ currentTimePercentage:
+ (videoPlayer.currentTime / videoPlayer.duration) * 100,
+ }));
+ });
+ }
+ }, []);
+ const toastValue = (value) => {
+ isSliding.current = true;
+ const videoPlayer = document.getElementById("videoPlayer");
+ if (!videoPlayer) return;
+ videoPlayer.pause();
+ const totalTime = videoPlayer.duration;
+ let timeSec = 0;
+ if (videoPlayer) {
+ timeSec = (totalTime * value) / 100;
+ }
+ const hour = Math.floor(timeSec / (60 * 60));
+ const minute = Math.floor((timeSec - hour * (60 * 60)) / 60);
+ const second = Math.floor(timeSec - hour * (60 * 60) - minute * 60);
+ Toast.show(
+ `${hour > 9 ? hour : "0" + hour}:${minute > 9 ? minute : "0" + minute}:${
+ second > 9 ? second : "0" + second
+ }`
+ );
+ videoPlayer.currentTime = timeSec;
+ setVideoState((old) => ({ ...old, currentTimePercentage: value }));
+ };
+ const handleStart = () => {
+ const videoPlayer = document.getElementById("videoPlayer");
+ if (!videoPlayer) return;
+ videoPlayer.play();
+ isSliding.current = false;
+ };
+ return (
+
+
+
+
}
+ style={{ "--fill-color": "#ff669e" }}
+ />
+
{
+ const videoPlayer = document.getElementById("videoPlayer");
+ if (videoState.play) {
+ setVideoState((old) => ({ ...old, play: false }));
+ videoPlayer.pause();
+ } else {
+ setVideoState((old) => ({ ...old, play: true }));
+ videoPlayer.play();
+ }
+ }}
+ />
+
+
+ );
+}
diff --git a/utils/tools/handleFuns.js b/utils/tools/handleFuns.js
index 9bae6a3..04c7177 100644
--- a/utils/tools/handleFuns.js
+++ b/utils/tools/handleFuns.js
@@ -3,7 +3,7 @@ import { faClose } from "@fortawesome/free-solid-svg-icons";
import { Dialog, Toast } from "antd-mobile";
import html2canvas from "html2canvas";
import { checkRole } from "../auth";
-import Player from "next-video/player";
+import VideoPlayer from "@/components/VideoPlayer";
// export const handleShowVideos = (video) => {
// Dialog.className = "videoMask";
// Dialog.show({
@@ -52,7 +52,7 @@ export const handleShowVideo = (video) => {
Dialog.className = "videoMask";
Dialog.show({
title: "",
- bodyStyle: { paddingTop: 0 },
+ bodyClassName: "!p-0",
content: (
{
onClick={() => Dialog.clear()}
>
-
-
Dialog.clear()}
- >
-
-
-
-
+
{/*
*/}
{/*
*/}
-
+
+
+
+
+ {/*