灵枢金能积存金操作指南
不积跬步,无以至千里

积存金操作指南

AI 深度分析黄金行情走势,综合宏观多维度因素,为您的积存金投资提供专业的个性化操作建议

--元/克 --
最高
--
最低
--
昨收
--
更新中..
💎 COMEX白银
--
--
🛢️ COMEX原油
--
--
💱 美元/人民币
--
--
🏛️ 上金所Au99.99
--
--
📊盈亏测算
持仓信息
成本 / 资金
元/克
当前市价(自动填入)
元/克
投资心态
登录灵枢金能
积存金操作指南 · 不积跬步无以至千里
还没有账号?立即注册
+s.usdPrice.toFixed(2);$('m-si-ch').textContent=(u?'▲':'▼')+' '+Math.abs(s.changePercent).toFixed(2)+'%';$('m-si-ch').style.color=u?'#4ade80':'#f87171';} if(m.oil){var o=m.oil,u=o.changePercent>=0;$('m-cl').textContent='{ fetch(A+'/news').then(function(r){return r.json()}).then(function(j){ if(j.code===0&&j.data&&j.data.length>0){ var tn={fed:'美联储',war:'地缘',oil:'原油',gold:'黄金',auto:'综合'},h=''; j.data.slice(0,8).forEach(function(n){h+='
'+(tn[n.tag]||'综合')+''+esc(n.title)+'
'+esc(n.source||'')+(n.time?' · '+esc(n.time):'')+'
'}); $('news-list').innerHTML=h; }else{$('news-list').innerHTML='
暂无资讯
'} }).catch(function(e){$('news-list').innerHTML='
加载失败
'}); } function calc(){ if(!U){showLogin();return} var w=parseFloat($('c-w').value)||0,c=parseFloat($('c-cp').value)||0,p=parseFloat($('c-cur').value)||0,loss=parseFloat($('c-loss').value)||0,fund=parseFloat($('c-fund').value)||0,bf=parseFloat($('c-buyfee').value)||0.15,sf=parseFloat($('c-sellfee').value)||0.40; if(w<=0||c<=0||p<=0){$('c-res').style.display='none';return} $('c-res').style.display='block'; var buyFee=w*c*bf/100,totalCost=w*c+buyFee,v=w*p,netSell=v*(1-sf/100),pnl=netSell-totalCost,pct=totalCost>0?(netSell-totalCost)/totalCost*100:0,bePrice=c*(1+bf/100)/(1-sf/100),dist=bePrice-p,needPct=bePrice/c*100-100; $('r-amt').textContent=w+' 克';$('r-cost').textContent='¥'+totalCost.toFixed(2);$('r-val').textContent='¥'+v.toFixed(2);$('r-be').textContent=bePrice.toFixed(2)+' 元/克';$('r-dist').textContent=(dist>=0?'+':'')+dist.toFixed(2)+' 元/克';$('r-need').textContent=(needPct>=0?'+':'')+needPct.toFixed(2)+'%'; var pe=$('r-pnl');pe.textContent=(pnl>=0?'+':'')+'¥'+pnl.toFixed(2);pe.className='res-val '+(pnl>=0?'profit':'loss'); var pc=$('r-pct');pc.textContent=(pct>=0?'+':'')+pct.toFixed(2)+'%';pc.className='res-val '+(pct>=0?'profit':'loss'); var riskPct=Math.abs(pct),riskLabel,riskClass; if(riskPct<2){riskLabel='低风险';riskClass='safe'}else if(riskPct<5){riskLabel='中低风险';riskClass='low'}else if(riskPct<10){riskLabel='中等风险';riskClass='mid'}else if(riskPct<20){riskLabel='高风险';riskClass='high'}else{riskLabel='极高风险';riskClass='extreme'} $('r-risk').textContent=riskLabel;$('r-risk').className='res-val '+(riskClass==='safe'||riskClass==='low'?'profit':riskClass==='mid'?'warn':'loss'); $('r-riskbar').className='risk-fill '+riskClass; $('r-buyfee').textContent='¥'+buyFee.toFixed(2);$('r-net').textContent='¥'+netSell.toFixed(2); if(fund>0&&p>0){var ag=fund*(1-bf/100)/p,nc=(totalCost+fund)/(w+ag);$('r-avg').textContent=nc.toFixed(2)+' 元/克(+'+ag.toFixed(2)+'克)'}else{$('r-avg').textContent='--'} $('al-r2').textContent=(bePrice*1.05).toFixed(2);$('al-r1').textContent=(bePrice*1.02).toFixed(2);$('al-be').textContent=bePrice.toFixed(2);$('al-cur').textContent=p.toFixed(2);$('al-s1').textContent=(bePrice*0.98).toFixed(2);$('al-s2').textContent=(bePrice*0.95).toFixed(2);$('al-stop').textContent=(bePrice*0.92).toFixed(2); $('ac-stop').textContent=(bePrice*0.92).toFixed(2);$('ac-r1').textContent=(bePrice*1.02).toFixed(2); updatePoolCard();$('ac-r2').textContent=(bePrice*1.05).toFixed(2); } function showLogin(){if(!U)$('login-mo').classList.add('on')} function closeLogin(){$('login-mo').classList.remove('on');$('l-err').textContent='';$('r-err').textContent=''} function togForm(){$('f-login').style.display=$('f-login').style.display==='none'?'block':'none';$('f-reg').style.display=$('f-reg').style.display==='none'?'block':'none'} function closeAnalysis(){$('analysis-mo').classList.remove('on')} function api(path,body,method){var h={'Content-Type':'application/json'};var t=localStorage.getItem('lsjn_token');if(t)h['Authorization']='Bearer '+t;return fetch(A+path,{method:method||(body?'POST':'GET'),headers:h,body:body?JSON.stringify(body):undefined}).then(function(r){return r.json()})} function doLogin(){var ph=$('l-ph').value.trim(),pw=$('l-pw').value;if(!ph||!pw)return;api('/auth/login',{phone:ph,password:pw}).then(function(d){if(d.code===0){saveAuth(d.data);closeLogin()}else $('l-err').textContent=d.message}).catch(function(){$('l-err').textContent='网络错误'})} function doReg(){var ph=$('r-ph').value.trim(),pw=$('r-pw').value,pw2=$('r-pw2').value;if(!ph||!pw){$('r-err').textContent='请填写完整信息';return}if(pw!==pw2){$('r-err').textContent='两次密码不一致';return}if(pw.length<6){$('r-err').textContent='密码至少6位';return}api('/auth/register',{phone:ph,password:pw}).then(function(d){if(d.code===0){saveAuth(d.data);closeLogin()}else $('r-err').textContent=d.message}).catch(function(){$('r-err').textContent='注册失败'})} function switchMetal(m){ $('cur-metal').value=m; var tg=$('tab-gold'),ts=$('tab-silver'),unit=$('g-unit'),curUnit=$('c-cur-unit'),curInput=$('c-cur'),curLabel=$('cur-price-label'); if(m==='gold'){ tg.className='metal-tab active-gold';ts.className='metal-tab';unit.textContent='元/克';curUnit.textContent='元/克'; curInput.placeholder='当前金价';curLabel.textContent='当前金价(自动填入)'; var gd=window._gd;if(gd){$('g-p').textContent=gd.price.toFixed(2);var up=gd.change>=0;var ce=$('g-ch');ce.className='tkr-ch '+(up?'up':'dn');ce.textContent=(up?'▲':'▼')+' '+Math.abs(gd.change).toFixed(2)+' ('+(up?'+':'')+gd.changePercent.toFixed(2)+'%)';$('g-h').textContent=gd.high.toFixed(2);$('g-l').textContent=gd.low.toFixed(2);$('g-c').textContent=gd.prevClose.toFixed(2);$('c-cur').value=gd.price.toFixed(2)} }else{ if(!window._sd){alert('银价数据加载中,请稍后再试');return} tg.className='metal-tab';ts.className='metal-tab active-silver';unit.textContent='元/克';curUnit.textContent='元/克'; curInput.placeholder='当前银价';curInput.value=window._sd.price.toFixed(2);curLabel.textContent='当前银价(自动填入)'; var sd=window._sd;$('g-p').textContent=sd.price.toFixed(2);var up2=sd.change>=0;var ce2=$('g-ch');ce2.className='tkr-ch '+(up2?'up':'dn');ce2.textContent=(up2?'▲':'▼')+' '+Math.abs(sd.change).toFixed(2)+' ('+(up2?'+':'')+sd.changePercent.toFixed(2)+'%)';$('g-h').textContent=sd.high.toFixed(2);$('g-l').textContent=sd.low.toFixed(2);$('g-c').textContent=sd.prevClose.toFixed(2);$('c-cur').value=sd.price.toFixed(2) } }; function calcOrLogin(){if(!U){showLogin();return}calc()} function updatePoolCard(){ var w=parseFloat($('c-w').value)||0,c=parseFloat($('c-cp').value)||0,p=parseFloat($('c-cur').value)||0,fund=parseFloat($('c-fund').value)||0,bf=parseFloat($('c-buyfee').value)||0.15; if(w<=0||c<=0||p<=0){$('pool-card').style.display='none';return} var totalCost=w*c*(1+bf/100),totalValue=w*p,pnl=totalValue-totalCost,pct=totalCost>0?(pnl/totalCost*100):0; var allIn=totalCost+fund; $('pool-grams').textContent=w.toFixed(2)+'克'; $('pool-cost').textContent='¥'+totalCost.toFixed(2); $('pool-value').textContent='¥'+totalValue.toFixed(2); var pnlEl=$('pool-pnl'); pnlEl.textContent=(pnl>=0?'+':'')+pnl.toFixed(2); pnlEl.className='pool-value '+(pnl>=0?'up':'down'); $('pool-pct').textContent='('+pct.toFixed(2)+'%)'; $('pool-card').style.display=''; } function addPosition(){ var w=parseFloat($('c-w').value)||0,c=parseFloat($('c-cp').value)||0; if(w<=0||c<=0){alert('请先填写持仓克数和成本价');return} updatePoolCard(); var pool=JSON.parse(localStorage.getItem('lsjn_pools')||'[]'); pool.push({grams:w,cost:c,date:new Date().toLocaleDateString('zh-CN')}); localStorage.setItem('lsjn_pools',JSON.stringify(pool)); alert('已保存到持仓池'); }; function saveAuth(d){localStorage.setItem('lsjn_token',d.token);localStorage.setItem('lsjn_user',JSON.stringify(d.user));U=d.user;renderUA();if(window.initAnalysisModule)window.initAnalysisModule()} function doLogout(){localStorage.removeItem('lsjn_token');localStorage.removeItem('lsjn_user');U=null;renderUA();if(window.initAnalysisModule)window.initAnalysisModule()} function whoami(){api('/auth/me').then(function(d){if(d.code===0){U=d.data;localStorage.setItem('lsjn_user',JSON.stringify(d.data));renderUA()}else localStorage.removeItem('lsjn_token')}).catch(function(){})} function renderUA(){var a=$('u-area');if(!U){a.innerHTML='登录 / 注册';return}var tm={free:'体验',monthly:'包月',yearly:'VIP'};a.innerHTML='
'+((U.nickname||'?')[0])+'
'+(U.nickname||'用户')+'
'+(tm[U.tier]||'')+'会员
退出
'} setTimeout(function(){var cb=document.querySelector('button[onclick="calc()"]');if(cb)cb.style.display='';},500); +o.usdPrice.toFixed(2);$('m-cl-ch').textContent=(u?'▲':'▼')+' '+Math.abs(o.changePercent).toFixed(2)+'%';$('m-cl-ch').style.color=u?'#4ade80':'#f87171';} if(m.usdCny){$('m-usd').textContent=m.usdCny.price.toFixed(4);$('m-usd-ch').textContent='实时汇率';} if(m.au9999){var a=m.au9999,c=a.prevClose>0?((a.price-a.prevClose)/a.prevClose*100):0,u=c>=0;$('m-au').textContent='¥'+a.price.toFixed(2);$('m-au-ch').textContent=(u?'▲':'▼')+' '+Math.abs(c).toFixed(2)+'%';$('m-au-ch').style.color=u?'#4ade80':'#f87171';} } function loadNews(){ fetch(A+'/news').then(function(r){return r.json()}).then(function(j){ if(j.code===0&&j.data&&j.data.length>0){ var tn={fed:'美联储',war:'地缘',oil:'原油',gold:'黄金',auto:'综合'},h=''; j.data.slice(0,8).forEach(function(n){h+='
'+(tn[n.tag]||'综合')+''+esc(n.title)+'
'+esc(n.source||'')+(n.time?' · '+esc(n.time):'')+'
'}); $('news-list').innerHTML=h; }else{$('news-list').innerHTML='
暂无资讯
'} }).catch(function(e){$('news-list').innerHTML='
加载失败
'}); } function calc(){ if(!U){showLogin();return} var w=parseFloat($('c-w').value)||0,c=parseFloat($('c-cp').value)||0,p=parseFloat($('c-cur').value)||0,loss=parseFloat($('c-loss').value)||0,fund=parseFloat($('c-fund').value)||0,bf=parseFloat($('c-buyfee').value)||0.15,sf=parseFloat($('c-sellfee').value)||0.40; if(w<=0||c<=0||p<=0){$('c-res').style.display='none';return} $('c-res').style.display='block'; var buyFee=w*c*bf/100,totalCost=w*c+buyFee,v=w*p,netSell=v*(1-sf/100),pnl=netSell-totalCost,pct=totalCost>0?(netSell-totalCost)/totalCost*100:0,bePrice=c*(1+bf/100)/(1-sf/100),dist=bePrice-p,needPct=bePrice/c*100-100; $('r-amt').textContent=w+' 克';$('r-cost').textContent='¥'+totalCost.toFixed(2);$('r-val').textContent='¥'+v.toFixed(2);$('r-be').textContent=bePrice.toFixed(2)+' 元/克';$('r-dist').textContent=(dist>=0?'+':'')+dist.toFixed(2)+' 元/克';$('r-need').textContent=(needPct>=0?'+':'')+needPct.toFixed(2)+'%'; var pe=$('r-pnl');pe.textContent=(pnl>=0?'+':'')+'¥'+pnl.toFixed(2);pe.className='res-val '+(pnl>=0?'profit':'loss'); var pc=$('r-pct');pc.textContent=(pct>=0?'+':'')+pct.toFixed(2)+'%';pc.className='res-val '+(pct>=0?'profit':'loss'); var riskPct=Math.abs(pct),riskLabel,riskClass; if(riskPct<2){riskLabel='低风险';riskClass='safe'}else if(riskPct<5){riskLabel='中低风险';riskClass='low'}else if(riskPct<10){riskLabel='中等风险';riskClass='mid'}else if(riskPct<20){riskLabel='高风险';riskClass='high'}else{riskLabel='极高风险';riskClass='extreme'} $('r-risk').textContent=riskLabel;$('r-risk').className='res-val '+(riskClass==='safe'||riskClass==='low'?'profit':riskClass==='mid'?'warn':'loss'); $('r-riskbar').className='risk-fill '+riskClass; $('r-buyfee').textContent='¥'+buyFee.toFixed(2);$('r-net').textContent='¥'+netSell.toFixed(2); if(fund>0&&p>0){var ag=fund*(1-bf/100)/p,nc=(totalCost+fund)/(w+ag);$('r-avg').textContent=nc.toFixed(2)+' 元/克(+'+ag.toFixed(2)+'克)'}else{$('r-avg').textContent='--'} $('al-r2').textContent=(bePrice*1.05).toFixed(2);$('al-r1').textContent=(bePrice*1.02).toFixed(2);$('al-be').textContent=bePrice.toFixed(2);$('al-cur').textContent=p.toFixed(2);$('al-s1').textContent=(bePrice*0.98).toFixed(2);$('al-s2').textContent=(bePrice*0.95).toFixed(2);$('al-stop').textContent=(bePrice*0.92).toFixed(2); $('ac-stop').textContent=(bePrice*0.92).toFixed(2);$('ac-r1').textContent=(bePrice*1.02).toFixed(2); updatePoolCard();$('ac-r2').textContent=(bePrice*1.05).toFixed(2); } function showLogin(){if(!U)$('login-mo').classList.add('on')} function closeLogin(){$('login-mo').classList.remove('on');$('l-err').textContent='';$('r-err').textContent=''} function togForm(){$('f-login').style.display=$('f-login').style.display==='none'?'block':'none';$('f-reg').style.display=$('f-reg').style.display==='none'?'block':'none'} function closeAnalysis(){$('analysis-mo').classList.remove('on')} function api(path,body,method){var h={'Content-Type':'application/json'};var t=localStorage.getItem('lsjn_token');if(t)h['Authorization']='Bearer '+t;return fetch(A+path,{method:method||(body?'POST':'GET'),headers:h,body:body?JSON.stringify(body):undefined}).then(function(r){return r.json()})} function doLogin(){var ph=$('l-ph').value.trim(),pw=$('l-pw').value;if(!ph||!pw)return;api('/auth/login',{phone:ph,password:pw}).then(function(d){if(d.code===0){saveAuth(d.data);closeLogin()}else $('l-err').textContent=d.message}).catch(function(){$('l-err').textContent='网络错误'})} function doReg(){var ph=$('r-ph').value.trim(),pw=$('r-pw').value,pw2=$('r-pw2').value;if(!ph||!pw){$('r-err').textContent='请填写完整信息';return}if(pw!==pw2){$('r-err').textContent='两次密码不一致';return}if(pw.length<6){$('r-err').textContent='密码至少6位';return}api('/auth/register',{phone:ph,password:pw}).then(function(d){if(d.code===0){saveAuth(d.data);closeLogin()}else $('r-err').textContent=d.message}).catch(function(){$('r-err').textContent='注册失败'})} function switchMetal(m){ $('cur-metal').value=m; var tg=$('tab-gold'),ts=$('tab-silver'),unit=$('g-unit'),curUnit=$('c-cur-unit'),curInput=$('c-cur'),curLabel=$('cur-price-label'); if(m==='gold'){ tg.className='metal-tab active-gold';ts.className='metal-tab';unit.textContent='元/克';curUnit.textContent='元/克'; curInput.placeholder='当前金价';curLabel.textContent='当前金价(自动填入)'; var gd=window._gd;if(gd){$('g-p').textContent=gd.price.toFixed(2);var up=gd.change>=0;var ce=$('g-ch');ce.className='tkr-ch '+(up?'up':'dn');ce.textContent=(up?'▲':'▼')+' '+Math.abs(gd.change).toFixed(2)+' ('+(up?'+':'')+gd.changePercent.toFixed(2)+'%)';$('g-h').textContent=gd.high.toFixed(2);$('g-l').textContent=gd.low.toFixed(2);$('g-c').textContent=gd.prevClose.toFixed(2);$('c-cur').value=gd.price.toFixed(2)} }else{ if(!window._sd){alert('银价数据加载中,请稍后再试');return} tg.className='metal-tab';ts.className='metal-tab active-silver';unit.textContent='元/克';curUnit.textContent='元/克'; curInput.placeholder='当前银价';curInput.value=window._sd.price.toFixed(2);curLabel.textContent='当前银价(自动填入)'; var sd=window._sd;$('g-p').textContent=sd.price.toFixed(2);var up2=sd.change>=0;var ce2=$('g-ch');ce2.className='tkr-ch '+(up2?'up':'dn');ce2.textContent=(up2?'▲':'▼')+' '+Math.abs(sd.change).toFixed(2)+' ('+(up2?'+':'')+sd.changePercent.toFixed(2)+'%)';$('g-h').textContent=sd.high.toFixed(2);$('g-l').textContent=sd.low.toFixed(2);$('g-c').textContent=sd.prevClose.toFixed(2);$('c-cur').value=sd.price.toFixed(2) } }; function calcOrLogin(){if(!U){showLogin();return}calc()} function updatePoolCard(){ var w=parseFloat($('c-w').value)||0,c=parseFloat($('c-cp').value)||0,p=parseFloat($('c-cur').value)||0,fund=parseFloat($('c-fund').value)||0,bf=parseFloat($('c-buyfee').value)||0.15; if(w<=0||c<=0||p<=0){$('pool-card').style.display='none';return} var totalCost=w*c*(1+bf/100),totalValue=w*p,pnl=totalValue-totalCost,pct=totalCost>0?(pnl/totalCost*100):0; var allIn=totalCost+fund; $('pool-grams').textContent=w.toFixed(2)+'克'; $('pool-cost').textContent='¥'+totalCost.toFixed(2); $('pool-value').textContent='¥'+totalValue.toFixed(2); var pnlEl=$('pool-pnl'); pnlEl.textContent=(pnl>=0?'+':'')+pnl.toFixed(2); pnlEl.className='pool-value '+(pnl>=0?'up':'down'); $('pool-pct').textContent='('+pct.toFixed(2)+'%)'; $('pool-card').style.display=''; } function addPosition(){ var w=parseFloat($('c-w').value)||0,c=parseFloat($('c-cp').value)||0; if(w<=0||c<=0){alert('请先填写持仓克数和成本价');return} updatePoolCard(); var pool=JSON.parse(localStorage.getItem('lsjn_pools')||'[]'); pool.push({grams:w,cost:c,date:new Date().toLocaleDateString('zh-CN')}); localStorage.setItem('lsjn_pools',JSON.stringify(pool)); alert('已保存到持仓池'); }; function saveAuth(d){localStorage.setItem('lsjn_token',d.token);localStorage.setItem('lsjn_user',JSON.stringify(d.user));U=d.user;renderUA();if(window.initAnalysisModule)window.initAnalysisModule()} function doLogout(){localStorage.removeItem('lsjn_token');localStorage.removeItem('lsjn_user');U=null;renderUA();if(window.initAnalysisModule)window.initAnalysisModule()} function whoami(){api('/auth/me').then(function(d){if(d.code===0){U=d.data;localStorage.setItem('lsjn_user',JSON.stringify(d.data));renderUA()}else localStorage.removeItem('lsjn_token')}).catch(function(){})} function renderUA(){var a=$('u-area');if(!U){a.innerHTML='登录 / 注册';return}var tm={free:'体验',monthly:'包月',yearly:'VIP'};a.innerHTML='
'+((U.nickname||'?')[0])+'
'+(U.nickname||'用户')+'
'+(tm[U.tier]||'')+'会员
退出
'} setTimeout(function(){var cb=document.querySelector('button[onclick="calc()"]');if(cb)cb.style.display='';},500);