diff --git a/h5/records/index.html b/h5/records/index.html
index 5475596..1708122 100644
--- a/h5/records/index.html
+++ b/h5/records/index.html
@@ -526,7 +526,7 @@ body.transitioning-tab { /* no animation */ }
-
+
上报更低价
-
+
@@ -1073,6 +1073,13 @@ function navigateStub(id) {
window.go = navigateStub;
window.goBack = function() { console.log('[nav stub] goBack'); };
+// 「上报记录」入口:App 内经原生桥跳上报记录页(REPORT_RECORDS);浏览器预览(无原生 navigate)走 mock。
+function goReports() {
+ if (window.SGBridge && SGBridge.navigate) { SGBridge.navigate('reportRecords'); }
+ else { go('reports'); }
+}
+window.goReports = goReports;
+
// ========== 筛选 tab ==========
function onFilterClick(tab) {
if (document.querySelector('.device').classList.contains('logged-out')) { onEmptyLogin(); return; }
@@ -1429,7 +1436,7 @@ function enterSelectMode() {
// 取消上报:深链(从「我的」进入)则返回「我的」,否则仅退出选择态停留在记录页
function cancelSelect() {
- if (cameFromProfile) { go('profile'); return; }
+ if (cameFromProfile) { goBackToProfile(); return; }
exitSelectMode();
}
@@ -1548,8 +1555,9 @@ document.querySelectorAll('.fb-key').forEach(function(key) {
if (v.indexOf('.') === -1) input.value = v + '.';
} else {
// 数字键
- if (v === '0' && k !== '.') input.value = k; // 替代前导 0
- else input.value = v + k;
+ var next = (v === '0') ? k : v + k; // 替代前导 0
+ var dot = next.indexOf('.');
+ if (!(dot >= 0 && next.length - dot - 1 > 2)) input.value = next; // 小数点后最多 2 位
}
refreshSubmitBtn();
});
@@ -1669,7 +1677,7 @@ async function submitFeedback() {
// 校验:上报价(元)必须 < 原最低价(bestPriceCents/100),否则拦下
var bestYuan = (selectedRecord.bestPriceCents != null) ? selectedRecord.bestPriceCents / 100 : null;
if (bestYuan != null && !(priceYuan < bestYuan)) {
- showToast('要比原价更低才能上报');
+ showToast('上报价需低于原最低价 ¥' + bestYuan.toFixed(2));
return;
}
@@ -1691,7 +1699,7 @@ async function submitFeedback() {
closeFeedbackSheet();
exitSelectMode();
resetSelectedFiles();
- setTimeout(function () { showToast('反馈已提交,等待审核'); }, 220);
+ setTimeout(function () { showToast('感谢您的反馈'); }, 220);
return;
}
@@ -1731,9 +1739,11 @@ async function submitFeedback() {
closeFeedbackSheet();
exitSelectMode();
resetSelectedFiles();
- setTimeout(function () { showToast('反馈已提交,等待审核'); }, 220);
+ setTimeout(function () { showToast('感谢您的反馈'); }, 220);
} else {
- showToast('提交失败(' + res.status + '),请稍后再试');
+ var detail = '';
+ try { var j = await res.json(); detail = (j && j.detail) ? j.detail : ''; } catch (e) {}
+ showToast(detail || ('提交失败(' + res.status + '),请稍后再试'));
}
} catch (e) {
showToast('网络异常,提交失败');