# 黄金价格查询
# 阿里云地址
https://market.aliyun.com/products/57000002/cmapi011166.html
# 使用方法
# 数据准备
export default {
data(){
return {
shfutures:{
"status": "0",
"msg": "ok",
"result": [
{
"type": "AU1511",
"typename": "黄金1511",
"price": "237.25",
"changequantity": "1.951",
"buyprice": "233.25",
"buyamount": "0",
"sellprice": "244.6",
"sellamount": "0",
"tradeamount": "20",
"openingprice": "236.049",
"lastclosingprice": "235.299",
"maxprice": "237.25",
"minprice": "236.049",
"holdamount": "16",
"increaseamount": "0"
},
{
"type": "AU1512",
"typename": "黄金1512",
"price": "238.7",
"changequantity": "-0.949",
"buyprice": "238.7",
"buyamount": "5",
"sellprice": "238.75",
"sellamount": "100",
"tradeamount": "210274",
"openingprice": "241.5",
"lastclosingprice": "239.649",
"maxprice": "241.5",
"minprice": "237.799",
"holdamount": "188302",
"increaseamount": "-6086"
}
]
},
bank://...
hkgold://..
//... 其他数据
}
}
}
# html代码
<h3>上海期货交易所价格查询</h3>
<!-- type默认值是shfutures -->
<aps-ali-011166 :data="shfutures" />
<h3>银行账户黄金价格查询</h3>
<aps-ali-011166 :data="bank" type="bank" />
<h3>香港金银业贸易场价格查询</h3>
<aps-ali-011166 :data="hkgold" type="hkgold" />
<h3>货币贵金属价格查询</h3>
<aps-ali-011166 :data="currency" :height="200" type="currency" />
<h3>伦敦金银价格查询</h3>
<aps-ali-011166 :data="london" type="london" />
<h3>上海黄金交易所价格查询</h3>
<aps-ali-011166 :data="shgold" type="shgold" />
# 最终呈现
# 上海期货交易所价格查询
# 银行账户黄金价格查询
# 香港金银业贸易场价格查询
# 货币贵金属价格查询
提示
该数据设置了表格的高度,数据多的时候,会显示竖向滚动条
# 伦敦金银价格查询
# 上海黄金交易所价格查询
# 参数列表
参数 | 是否必填 | 默认值 | 说明 |
---|---|---|---|
type | false | shfutures | 数据类型 |
height | false | 无 | Table 的高度,默认为自动高度。如果 height 为 number 类型,单位 px;如果 height 为 string 类型,则这个高度会设置为 Table 的 style.height 的值,Table 的高度会受控于外部样式。 |
← 全国热门带正文新闻查询 长途汽车查询 →