问题描述
所以我用html创建了一个图像,并尝试赋予它v-bind:src属性。
这是代码行:
<img class="summonericon" ref="summonerIcon" v-bind:src="summonerRequests.profileIcon">
summonerRequests.profileIcon是我使用Coldfusion函数保存的变量:
<cffunction name="getSummonerByName" access="remote" returntype="string" returnformat="JSON">
<cfargument name="summonerName" required="true" type="string">
<cfargument name="region" required="true" type="string">
<cfset requesturl = "https://" & lCase(region) & "1.api.riotgames.com/lol/summoner/v4/summoners/by-name/" & summonerName & "?api_key=" & api_key>
<cfhttp
method="get"
url="#requesturl#" result="SummonerDTOJson">
<cfhttpparam name="content-type" value="application/json" type="header">
<cfhttpparam name="accept" value="application/json" type="header">
</cfhttp>
<cfset summonerDTO=deserializeJSON(SummonerDTOJson.filecontent)>
<cfset client.profileIcon
="https://raw.communitydragon.org/pbe/plugins/rcp-be-lol-game-data/global/default/v1/profile-icons/" & summonerDTO.profileIconId & ".jpg">
<cfreturn serializeJSON(summonerDTO)>
</cffunction>
尽管图片网址存在,但我无法通过它设置图片来源。 我真的需要帮助,谢谢您的帮助。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)