Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

代码中小背景图的样式错误会导致当前页面作为一个image被加载,服务器将会收到2次页面的请求。 #48

Closed
wangxg2016 opened this issue Jun 10, 2016 · 1 comment

Comments

@wangxg2016
Copy link

            var l = '\n                <div class="aplayer-pic" ' + (this.music.pic ? 'style="background-image: url("' + encodeURI(this.music.pic) + '");"' : "") + '>\n                    <div class="aplayer-button aplayer-play">\n                        <i class="demo-icon aplayer-icon-play"></i>\n                    </div>\n                </div>\n                <div class="aplayer-info">\n                    <div class="aplayer-music">\n                        <span class="aplayer-title"></span>\n                        <span class="aplayer-author"></span>\n                    </div>\n                    <div class="aplayer-lrc">\n                        <div class="aplayer-lrc-contents" style="transform: translateY(0); -webkit-transform: translateY(0);"></div>\n                    </div>\n                    <div class="aplayer-controller">\n                        <div class="aplayer-bar-wrap">\n                            <div class="aplayer-bar">\n                                <div class="aplayer-loaded" style="width: 0"></div>\n                                <div class="aplayer-played" style="width: 0; background: ' + this.option.theme + ';">\n                                    <span class="aplayer-thumb" style="border: 1px solid ' + this.option.theme + ';"></span>\n                                </div>\n                            </div>\n                        </div>\n                        <div class="aplayer-time">\n                             - <span class="aplayer-ptime">00:00</span> / <span class="aplayer-dtime">00:00</span>\n                            <div class="aplayer-volume-wrap">\n                                <i class="demo-icon aplayer-icon-volume-down"></i>\n                                <div class="aplayer-volume-bar-wrap">\n                                    <div class="aplayer-volume-bar">\n                                        <div class="aplayer-volume" style="height: 80%; background: ' + this.option.theme + ';"></div>\n                                    </div>\n                                </div>\n                            </div>\n                            <i class="demo-icon aplayer-icon-loop' + (this.loop ? "" : " aplayer-noloop") + '"></i>' + (this.multiple ? '<i class="demo-icon aplayer-icon-menu"></i>' : "") + "\n                        </div>\n                    </div>\n                </div>";

这一句中的'style="background-image: url("' + encodeURI(this.music.pic) + '");"' 需改为'style="background-image: url(' + encodeURI(this.music.pic) + ');"' ,去掉前后两个",否则将导致页面将当前页作为一个image对象载入。

@DIYgod
Copy link
Owner

DIYgod commented Jun 13, 2016

Thanks. Fixed in c5776b2.

@DIYgod DIYgod closed this as completed Jun 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants