45 lines
1.3 KiB
JavaScript
45 lines
1.3 KiB
JavaScript
var userInfo = {
|
|
/*template: `
|
|
<ul class="list-unstyled user-info">
|
|
<li><img :src="userInfo.headimgurl" alt="" class="avatar"></li>
|
|
<li><p class="nickname">{{userInfo.nickname}}</p></li>
|
|
<li>
|
|
<div>
|
|
<p><img :src="agentInfo.agentlogo" alt="" class="logo"></p>
|
|
<p><button class="btn btn-success" @click="goShortRoom">配置VIP</button></p>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
`,*/
|
|
template : '<ul class="list-unstyled user-info"><li><img :src="userInfo.headimgurl" alt="" class="avatar"></li><li><p class="nickname">{{userInfo.nickname}}</p></li><li><img :src="agentInfo.agentlogo" alt="" class="logo"></li></ul>',
|
|
data: function () {
|
|
return {
|
|
userInfo: {},
|
|
agentInfo: {}
|
|
}
|
|
},
|
|
methods: {
|
|
goShortRoom: function () {
|
|
var p = $.getQueryObj();
|
|
var url = "short_room.html?agentid="+p.agentid+"&channelid="+p.channelid;
|
|
|
|
if(p.unionid)
|
|
url = url + "&unionid=" + this.params.unionid;
|
|
|
|
if(p.unionid)
|
|
url = url + "&playerid=" + this.params.playerid;
|
|
|
|
window.location.href = url;
|
|
}
|
|
},
|
|
created: function () {
|
|
var that = this;
|
|
$.getAgentInfo(function (agentInfo) {
|
|
that.agentInfo = agentInfo;
|
|
$.getWxInfo(function (res) {
|
|
that.userInfo = res;
|
|
})
|
|
})
|
|
|
|
}
|
|
} |