Files
youlegames/codes/agent/game/dlweb/api/web2/components/sales-info-a.js
2026-03-15 01:27:05 +08:00

55 lines
2.0 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
var salesInfo = {
template: '<section><header class="header header-pos-fix"><div onclick="history.back(-1)"><img src="img/fahui.png" class="img"> <span class="text_wen">返回</span></div></header><div style="width:100%;height:45px;display:block"></div><section class="buju"><div class="left"><a :href="personCenter" style="display:inline-flex"><img :src="wxInfo.headimgurl" class="header_img" alt="avatar"></a></div><div class="count"><p>昵&emsp;称:{{wxInfo.nickname}}</p><p>玩家ID<span>{{salesInfo.player_id}}</span></p><p>账&emsp;号:<span>{{salesInfo.salesid}}</span></p><p>可赠送房卡数:<span>{{assets.roomcard}}</span></p><p v-if="false">{{lang.starName}}数:<span>{{assets.bean}}</span></p></div><div class="right"><a :href="indexUrl"><img :src="agentInfo.agentlogo" class="logo"></a></div><span class="dfs">{{loginType}}</span></section></section>',
data: function () {
return {
params: {},
lang: {},
salesInfo: {},
wxInfo: {},
agentInfo: {},
assets: {}
}
},
computed: {
loginType: function() {
var type = this.salesInfo.logintype;
if(type == 1)
return '账号登录';
else if(type == 0)
return '微信登录';
else if(type == 2)
return '手机号登录';
else
return ''
},
personCenter: function () { return 'javascript:;'; },
indexUrl: function () { return 'javascript:;'; }
},
created: function () {
this.params = $.getQueryObj();
this.lang = lang[this.params.agentid] ? lang[this.params.agentid] : lang.default;
var that = this;
$.getAgentInfo(function (agentInfo) {
that.agentInfo = agentInfo;
$.getWxInfo(function (wxInfo) {
that.wxInfo = wxInfo;
$.getUserInfo(function (res) {
that.salesInfo = res;
$.api(
'agent.user.getUserInfo',
{
idx: res.idx
},
function (assets) {
that.assets = assets;
}, 1
);
})
})
})
}
}