diff --git a/h5/KYC/index.html b/h5/KYC/index.html
index 3ab7dad..c28bc75 100644
--- a/h5/KYC/index.html
+++ b/h5/KYC/index.html
@@ -1,13 +1,29 @@
-
+
KYC
-
+
-
-
+
+
+ Contact number
+
+ Other description
+
+
+ 0/100
+
+ Passport/ID card
+
+
+
+
+
+
+
+
diff --git a/h5/KYC/kyc.js b/h5/KYC/kyc.js
new file mode 100644
index 0000000..bbbb3ae
--- /dev/null
+++ b/h5/KYC/kyc.js
@@ -0,0 +1,109 @@
+import { applyLang, bindHeader, connectToApp, get, post, safeJsonArray, t, toast } from "../bd-static/shared.js";
+
+let existing = false;
+let data = { id: "", contactNumber: "", category: "CARD", otherDescription: "", passportFrontUrl: "", passportBackUrl: "meaningless" };
+let images = [];
+let lastImg = localStorage.getItem("lastImgUrl") || "";
+
+bindHeader("kyc");
+applyLang();
+document.getElementById("contactNumber").placeholder = t("enter_contact_number");
+document.getElementById("otherDescription").placeholder = t("enter_other_description");
+document.getElementById("contactNumber").addEventListener("input", sync);
+document.getElementById("otherDescription").addEventListener("input", sync);
+document.getElementById("submitButton").addEventListener("click", submit);
+connectToApp().then(load);
+
+async function load() {
+ try {
+ const response = await get("/wallet/withdraw-info/list");
+ if ((response.body || []).length > 0) {
+ existing = true;
+ data = { ...response.body[0] };
+ images = safeJsonArray(data.passportFrontUrl);
+ }
+ render();
+ } catch (error) {
+ toast(error.response?.errorMsg || error.message);
+ }
+}
+
+function sync() {
+ data.contactNumber = document.getElementById("contactNumber").value.trim();
+ data.otherDescription = document.getElementById("otherDescription").value;
+ document.getElementById("wordCount").textContent = `${data.otherDescription.length}/100`;
+ document.getElementById("submitButton").disabled = !(data.contactNumber && images.length > 0 && data.contactNumber.length <= 50);
+}
+
+function render() {
+ document.getElementById("contactNumber").value = data.contactNumber || "";
+ document.getElementById("otherDescription").value = data.otherDescription || "";
+ const status = document.getElementById("statusLine");
+ status.innerHTML = existing ? `${t("current_status")} ${statusText(data.status)}` : "";
+ const list = document.getElementById("imageList");
+ list.innerHTML = "";
+ images.forEach((url, index) => {
+ const wrap = document.createElement("div");
+ wrap.style.position = "relative";
+ wrap.innerHTML = `
`;
+ wrap.querySelector("button").addEventListener("click", () => {
+ images.splice(index, 1);
+ render();
+ });
+ list.appendChild(wrap);
+ });
+ if (images.length < 3) {
+ const add = document.createElement("button");
+ add.type = "button";
+ add.className = "card";
+ add.style.cssText = "width:15vw;aspect-ratio:1/1;border-radius:5vw;font-size:2em;color:#32a96b";
+ add.textContent = "+";
+ add.addEventListener("click", pickImage);
+ list.appendChild(add);
+ }
+ sync();
+}
+
+function statusText(status) {
+ return { PASS: t("review_passed"), NOT_PASS: t("review_failed"), PENDING: t("awaiting_review") }[status] || status || "";
+}
+
+function pickImage() {
+ window.renderData = receiveImage;
+ window.getIosAccessOriginParam = receiveImage;
+ if (window.FlutterPageControl) {
+ window.FlutterPageControl.postMessage("uploadImgFile");
+ } else if (window.app && typeof window.app.getImagePath === "function") {
+ receiveImage(window.app.getImagePath());
+ } else {
+ toast("uploadImgFile");
+ }
+}
+
+function receiveImage(raw) {
+ try {
+ if (!raw || raw === "\"\"") return;
+ const parsed = JSON.parse(raw);
+ const path = parsed.path || parsed.url || parsed;
+ if (!path || path === lastImg) return;
+ lastImg = path;
+ localStorage.setItem("lastImgUrl", path);
+ images.push(path);
+ render();
+ } catch (error) {
+ toast(error.message);
+ }
+}
+
+async function submit() {
+ sync();
+ if (document.getElementById("submitButton").disabled) return;
+ data.passportFrontUrl = JSON.stringify(images);
+ try {
+ await post(existing ? "/wallet/withdraw-info/update" : "/wallet/withdraw-info/add", data);
+ toast(t("application_submitted"));
+ window.setTimeout(() => window.history.back(), 300);
+ } catch (error) {
+ toast(error.response?.errorMsg || error.message);
+ }
+}
diff --git a/h5/activity/week-star/index.html b/h5/activity/week-star/index.html
index 370aadf..29dc5f9 100644
--- a/h5/activity/week-star/index.html
+++ b/h5/activity/week-star/index.html
@@ -571,7 +571,7 @@
-
+
+
+
+