删除console.log
This commit is contained in:
parent
08ba48e55d
commit
85d279d98a
|
@ -66,7 +66,7 @@ export const thumbsUp = async (id, times, callback, isZone) => {
|
|||
moment_id: id,
|
||||
times: times == 1 ? -1 : 1,
|
||||
};
|
||||
console.log("body", body);
|
||||
// console.log("body", body);
|
||||
|
||||
const data = await requireAPI("POST", `/api/${
|
||||
isZone ? "zone_moment" : "moment"
|
||||
|
@ -89,7 +89,7 @@ export const thumbsUp = async (id, times, callback, isZone) => {
|
|||
};
|
||||
//点赞和取消点赞功能
|
||||
export const zoneThumbsUp = async (id, times = 1, callback) => {
|
||||
console.log("times", times);
|
||||
// console.log("times", times);
|
||||
try {
|
||||
const body = {
|
||||
moment_id: id,
|
||||
|
@ -236,7 +236,7 @@ export const createOrder = async (type = "alipay_h5") => {
|
|||
|
||||
//点击获取验证码
|
||||
export const handleVerification = async (mobilePhone="",regionCode) => {
|
||||
console.log("mobilePhone",mobilePhone.toString())
|
||||
// console.log("mobilePhone",mobilePhone.toString())
|
||||
//手机号校验
|
||||
if (!mobilePhone.toString().match(/^1[3456789]\d{9}$/)) {
|
||||
Toast.show({
|
||||
|
|
|
@ -31,7 +31,7 @@ export default function IncomeQuerry() {
|
|||
const weekIncom = data.data.week_dashboard?data.data.week_dashboard.reduce((total, item) => {
|
||||
return total + item.income;
|
||||
}, 0):0;
|
||||
console.log({ ...data.data, weekIncom })
|
||||
// console.log({ ...data.data, weekIncom })
|
||||
data && setData({ ...data.data, weekIncom });
|
||||
} catch (error) {}
|
||||
};
|
||||
|
|
|
@ -388,7 +388,7 @@ function Login({ handleLogin }) {
|
|||
const LoginBtn = ({ loginInfo, setLoginInfo, type, handleSubmit }) => {
|
||||
const router = useRouter();
|
||||
useEffect(() => {
|
||||
console.log("loginInfo", loginInfo);
|
||||
// console.log("loginInfo", loginInfo);
|
||||
}, []);
|
||||
return (
|
||||
<div className="mt-16">
|
||||
|
|
|
@ -37,7 +37,7 @@ export default function DeleteAccount() {
|
|||
const handleDeleteAccount = async () => {
|
||||
try {
|
||||
const _data = await requireAPI("POST", "/api/account/cancel");
|
||||
console.log("requireAPI",_data)
|
||||
// console.log("requireAPI",_data)
|
||||
if (_data.ret === -1) {
|
||||
Toast.show({
|
||||
icon: "fail",
|
||||
|
|
|
@ -165,7 +165,7 @@ export default function EditPassword() {
|
|||
{/* 内容 */}
|
||||
<div className="pt-32 px-4">
|
||||
<p className="text-3xl text-white font-medium">
|
||||
{console.log(mobilePhone, "cccc")}
|
||||
{/* {console.log(mobilePhone, "cccc")} */}
|
||||
{searchParams.get("is_enabled") == "0"
|
||||
? "设置密码"
|
||||
: mobilePhone
|
||||
|
@ -182,7 +182,7 @@ export default function EditPassword() {
|
|||
type="number"
|
||||
maxLength={11}
|
||||
onChange={(value) => {
|
||||
console.log("value", value);
|
||||
// console.log("value", value);
|
||||
setMobilePhone(value);
|
||||
}}
|
||||
value={mobilePhone}
|
||||
|
|
|
@ -29,7 +29,7 @@ export default function Feedback() {
|
|||
setIsSubmitting(true);
|
||||
// const media = await multiUpload(assets);
|
||||
const media = await multiUploadImage(assets);
|
||||
console.log("media",media)
|
||||
// console.log("media",media)
|
||||
const account = await get("account");
|
||||
try {
|
||||
const data = await requireAPI("POST", `/api/feedback/create`, {
|
||||
|
|
|
@ -104,7 +104,7 @@ export default function Wallet() {
|
|||
// uri: process.env.EXPO_PUBLIC_WEB_URL + "/pay",
|
||||
// })
|
||||
{
|
||||
console.log("base,base", base);
|
||||
// console.log("base,base", base);
|
||||
router.push(
|
||||
`/webView/${encodeURIComponent(
|
||||
`/pay?base=${encodeURIComponent(JSON.stringify(base))}`
|
||||
|
|
|
@ -67,7 +67,7 @@ export default function PersonSpace() {
|
|||
})),
|
||||
];
|
||||
|
||||
console.log("photosArr", photosArr);
|
||||
// console.log("photosArr", photosArr);
|
||||
setTopPhotos(photosArr);
|
||||
setLoading(false);
|
||||
} catch (error) {
|
||||
|
@ -103,7 +103,7 @@ export default function PersonSpace() {
|
|||
};
|
||||
//保存内容到剪贴板
|
||||
const copy = (_data) => {
|
||||
console.log("_data", _data);
|
||||
// console.log("_data", _data);
|
||||
clipboard(_data);
|
||||
Toast.show({
|
||||
icon: "success",
|
||||
|
|
|
@ -28,7 +28,7 @@ export default function Search() {
|
|||
return /^\d+$/.test(str);
|
||||
};
|
||||
const getResult = async (value) => {
|
||||
console.log("searchValue", value);
|
||||
// console.log("searchValue", value);
|
||||
const isSearchInt = isNumeric(value);
|
||||
let api = "";
|
||||
let querryParams = "";
|
||||
|
|
|
@ -26,7 +26,7 @@ export default function ShareSpace({ data }) {
|
|||
}, []);
|
||||
//保存内容到剪贴板
|
||||
const copy = (_data) => {
|
||||
console.log("_data",_data)
|
||||
// console.log("_data",_data)
|
||||
clipboard(_data);
|
||||
Toast.show({
|
||||
icon: "success",
|
||||
|
@ -45,7 +45,7 @@ export default function ShareSpace({ data }) {
|
|||
//复制邀请链接
|
||||
const copyShareUrl = () => {
|
||||
const shareCode = `${webUrl}/zone/${streamerInfo?.streamer_ext?.user_id}`;
|
||||
console.log("shareCode", shareCode);
|
||||
// console.log("shareCode", shareCode);
|
||||
copy(shareCode);
|
||||
};
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ export default function PersonSpace() {
|
|||
default:
|
||||
break;
|
||||
}
|
||||
console.log("body",body)
|
||||
// console.log("body",body)
|
||||
const data = await requireAPI("POST", "/api/zone_moment/list_by_zid", {
|
||||
body,
|
||||
});
|
||||
|
@ -322,10 +322,10 @@ export default function PersonSpace() {
|
|||
<li
|
||||
className="flex flex-col items-center mr-6"
|
||||
onClick={() => {
|
||||
console.log(
|
||||
"streamerInfo?.is_superfanship_unlocked === 1",
|
||||
streamerInfo?.is_superfanship_unlocked === 1
|
||||
);
|
||||
// console.log(
|
||||
// "streamerInfo?.is_superfanship_unlocked === 1",
|
||||
// streamerInfo?.is_superfanship_unlocked === 1
|
||||
// );
|
||||
streamerInfo?.is_superfanship_unlocked === 1
|
||||
? setCurrentKey("chaofen")
|
||||
: router.push(
|
||||
|
|
|
@ -35,7 +35,7 @@ export default function PersonSpaceIntroduce() {
|
|||
if (res?.visitor_role != 4) {
|
||||
router.replace("/space/" + mid);
|
||||
}
|
||||
console.log("mid", mid, res);
|
||||
// console.log("mid", mid, res);
|
||||
});
|
||||
}, []);
|
||||
const showPhotos = (photos, index) => {
|
||||
|
|
|
@ -20,7 +20,7 @@ export default function Setting() {
|
|||
const currentData = searchParams.get("data");
|
||||
if (currentData) {
|
||||
let data = await JSON.parse(decodeURIComponent(searchParams.get("data")));
|
||||
console.log("data",data)
|
||||
// console.log("data",data)
|
||||
await getSpaceData(Number(data.mid)).then((res) => {
|
||||
setStreamerInfo({ ...data,refund_enable:res?.refund_enable });
|
||||
});
|
||||
|
|
|
@ -28,14 +28,14 @@ export default function AddWeChat({
|
|||
const [remarks, setRemarks] = useState("");
|
||||
const router = useRouter();
|
||||
useEffect(() => {
|
||||
console.log("avatar", avatar);
|
||||
// console.log("avatar", avatar);
|
||||
if (!streamerMid) return;
|
||||
getStreamerDetailInfo(streamerMid).then((res) => {
|
||||
setStreamerDetailData(res);
|
||||
});
|
||||
}, [streamerData]);
|
||||
useEffect(() => {
|
||||
console.log("avatar", avatar);
|
||||
// console.log("avatar", avatar);
|
||||
if (!streamerDetailData || !streamerDetailData?.is_unlock_wechat) return;
|
||||
requireAPI("POST", "/api/vas/query_wechat", {
|
||||
body: {
|
||||
|
@ -72,7 +72,7 @@ export default function AddWeChat({
|
|||
return;
|
||||
}
|
||||
if (userResponse?.data.account?.gold_num >= price) {
|
||||
console.log("余额足够");
|
||||
// console.log("余额足够");
|
||||
if (type) {
|
||||
if (!userWechat) {
|
||||
Toast.show({
|
||||
|
@ -142,22 +142,22 @@ export default function AddWeChat({
|
|||
//用户未解锁微信情况:先支付,再提交用户微信和备注
|
||||
if (streamerDetailData.is_unlock_wechat === 1) {
|
||||
//用户已解锁微信情况:直接提交用户微信和备注
|
||||
console.log(
|
||||
"ccccc",
|
||||
streamerDetailData,
|
||||
streamerData.wechat_order_id
|
||||
);
|
||||
// console.log(
|
||||
// "ccccc",
|
||||
// streamerDetailData,
|
||||
// streamerData.wechat_order_id
|
||||
// );
|
||||
await submitWechat(streamerDetailData.wechat_order_id);
|
||||
setStreamerDetailData({
|
||||
...streamerDetailData,
|
||||
wechat_order_status: 3,
|
||||
});
|
||||
} else {
|
||||
console.log(
|
||||
"xxxx",
|
||||
streamerDetailData,
|
||||
streamerData.wechat_order_id
|
||||
);
|
||||
// console.log(
|
||||
// "xxxx",
|
||||
// streamerDetailData,
|
||||
// streamerData.wechat_order_id
|
||||
// );
|
||||
const order_id = await payCoin();
|
||||
if (!order_id) return;
|
||||
|
||||
|
@ -293,7 +293,7 @@ export default function AddWeChat({
|
|||
<div className="text-white text-sm border border-[#2c2b2f] rounded-xl p-2 my-1 w-full">
|
||||
<Input
|
||||
placeholder="填写您的微信,以便Ta主动联系您"
|
||||
style={{ "--font-size": "small" }}
|
||||
style={{"--font-size": "16px"}}
|
||||
onChange={(value) => setUserWechat(value)}
|
||||
value={userWechat}
|
||||
/>
|
||||
|
@ -304,7 +304,7 @@ export default function AddWeChat({
|
|||
<div className="text-white border border-[#2c2b2f] rounded-xl p-2 my-1 w-full">
|
||||
<TextArea
|
||||
placeholder="如添加好友需填写验证信息,请将相应答案填写在此处"
|
||||
style={{ "--font-size": "small" }}
|
||||
style={{"--font-size": "16px"}}
|
||||
onChange={(value) => setRemarks(value)}
|
||||
value={remarks}
|
||||
/>
|
||||
|
|
|
@ -35,7 +35,7 @@ export default function Photos({
|
|||
let arr = [...imgArr, ...videoArr];
|
||||
let newPhotos = [...arr];
|
||||
if (mediaAmount && !isUnlocked) {
|
||||
console.log("newPhotos", newPhotos);
|
||||
// console.log("newPhotos", newPhotos);
|
||||
newPhotos = Array(mediaAmount)
|
||||
.fill(null)
|
||||
.map((item, index) => {
|
||||
|
|
|
@ -60,7 +60,7 @@ export default function PostItem({
|
|||
);
|
||||
});
|
||||
// console.log("matches", matches);
|
||||
console.log("text", text);
|
||||
// console.log("text", text);
|
||||
}
|
||||
|
||||
// 返回找到的链接数组
|
||||
|
|
|
@ -24,7 +24,7 @@ export default function UploadImgs({assets, getImgs }) {
|
|||
} else if (file.type.indexOf("video/") != -1) {
|
||||
const videoD = document.getElementById("videoD");
|
||||
const videoC = document.getElementById("videoC");
|
||||
console.log("videoC", videoC);
|
||||
// console.log("videoC", videoC);
|
||||
const ctx = videoC?.getContext("2d");
|
||||
// 设置Canvas的宽度和高度与视频一致
|
||||
videoC.width = videoD.videoWidth;
|
||||
|
@ -35,11 +35,11 @@ export default function UploadImgs({assets, getImgs }) {
|
|||
const frameImageUrl = videoC.toDataURL();
|
||||
|
||||
// 输出图片URL
|
||||
console.log(frameImageUrl);
|
||||
console.log("ddddd", file, {
|
||||
type: "video",
|
||||
src: frameImageUrl,
|
||||
});
|
||||
// console.log(frameImageUrl);
|
||||
// console.log("ddddd", file, {
|
||||
// type: "video",
|
||||
// src: frameImageUrl,
|
||||
// });
|
||||
// const video = await uploadVideo(file);
|
||||
// getImgs((old) => [...old, video.id]);
|
||||
// setFileList((old) => [...old, video]);
|
||||
|
@ -54,7 +54,7 @@ export default function UploadImgs({assets, getImgs }) {
|
|||
setLoading(false);
|
||||
};
|
||||
const handleRemoveItem = (index) => {
|
||||
console.log(index);
|
||||
// console.log(index);
|
||||
let newArr = [...fileList];
|
||||
newArr.splice(index, 1);
|
||||
setFileList(newArr);
|
||||
|
|
|
@ -8,15 +8,15 @@ export default function copy(text = "") {
|
|||
input.focus();
|
||||
input.select();
|
||||
try {
|
||||
let result = document.execCommand("copy");
|
||||
// let result = document.execCommand("copy");
|
||||
document.body.removeChild(input);
|
||||
if (!result || result === "unsuccessful") {
|
||||
console.log("复制失败");
|
||||
} else {
|
||||
console.log("复制成功");
|
||||
}
|
||||
// if (!result || result === "unsuccessful") {
|
||||
// // console.log("复制失败");
|
||||
// } else {
|
||||
// // console.log("复制成功");
|
||||
// }
|
||||
} catch (e) {
|
||||
document.body.removeChild(input);
|
||||
console.log("当前浏览器不支持复制功能,请检查更新或更换其他浏览器操作");
|
||||
// console.log("当前浏览器不支持复制功能,请检查更新或更换其他浏览器操作");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ export function cryptoPassword(password) {
|
|||
|
||||
function calcEncryptedPassword(password) {
|
||||
if (!password || password.length <= 7) {
|
||||
console.log("Invalid input");
|
||||
// console.log("Invalid input");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ export function generateSignature(body) {
|
|||
|
||||
function calcSignature(s) {
|
||||
if (!s || s.length <= 20) {
|
||||
console.log("Invalid input");
|
||||
// console.log("Invalid input");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ export default function customFetch(method, url, options = {}, mid) {
|
|||
newBody.mid = mid;
|
||||
}
|
||||
const body = JSON.stringify({ ...base, ...newBody });
|
||||
console.log("newBody", body,url);
|
||||
// console.log("newBody", body,url);
|
||||
|
||||
// 合并选项
|
||||
const mergedOptions = { ...defaultOptions, body };
|
||||
|
|
|
@ -19,7 +19,7 @@ export function debounce(fn, delay) {
|
|||
if (timer) {
|
||||
clearTimeout(timer);
|
||||
// return;
|
||||
console.log(timer);
|
||||
// console.log(timer);
|
||||
}
|
||||
//重新设置新的延时器
|
||||
timer = setTimeout(() => {
|
||||
|
|
|
@ -127,7 +127,7 @@ async function getFailId() {
|
|||
//上传单张图片
|
||||
export async function uploadImage(asset) {
|
||||
const auth = await getAuth(1);
|
||||
console.log("auth", auth);
|
||||
// console.log("auth", auth);
|
||||
try {
|
||||
const formData = new FormData();
|
||||
formData.append("name", auth.filename);
|
||||
|
@ -137,12 +137,12 @@ export async function uploadImage(asset) {
|
|||
formData.append("signature", auth.signature);
|
||||
formData.append("key", auth.directory + "/" + auth.filename);
|
||||
formData.append("file", asset);
|
||||
console.log("formData", ...formData);
|
||||
// console.log("formData", ...formData);
|
||||
const uploadResponse = await fetch(auth.host, {
|
||||
method: "POST",
|
||||
body: formData,
|
||||
});
|
||||
console.log("uploadResponse", uploadResponse);
|
||||
// console.log("uploadResponse", uploadResponse);
|
||||
if (uploadResponse.status === 200) {
|
||||
// console.log(asset);
|
||||
// debugger
|
||||
|
@ -181,7 +181,7 @@ export async function uploadImage(asset) {
|
|||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.log("Error occurred while getting or uploading data:", error);
|
||||
// console.log("Error occurred while getting or uploading data:", error);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -215,7 +215,7 @@ export async function uploadVideo(asset) {
|
|||
method: "POST",
|
||||
body: formData,
|
||||
});
|
||||
console.log("uploadResponse", uploadResponse);
|
||||
// console.log("uploadResponse", uploadResponse);
|
||||
if (uploadResponse.status === 200) {
|
||||
const md5 = uploadResponse.headers.map.etag.substring(
|
||||
1,
|
||||
|
@ -262,7 +262,7 @@ export async function uploadVideo(asset) {
|
|||
return failId?.video_id_for_upload_fail;
|
||||
}
|
||||
} catch (error) {
|
||||
console.log("Error occurred while getting or uploading data:", error);
|
||||
// console.log("Error occurred while getting or uploading data:", error);
|
||||
Toast.show({
|
||||
type: "error",
|
||||
text1: "上传视频失败",
|
||||
|
@ -275,7 +275,7 @@ export async function uploadVideo(asset) {
|
|||
|
||||
//上传多个图片
|
||||
export async function multiUploadImage(assets) {
|
||||
console.log("assets", assets);
|
||||
// console.log("assets", assets);
|
||||
let ids = { image_ids: [], video_ids: [] };
|
||||
await Promise.all(
|
||||
assets.map(async (asset) => {
|
||||
|
|
Loading…
Reference in New Issue