311 lines
11 KiB
HTML
311 lines
11 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<title>玩家索要房卡</title>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
|
||
<meta http-equiv="X-UA-Compatible" content="IE=8">
|
||
<meta http-equiv="Cache" content="no-cache">
|
||
<meta http-equiv="Pragma" content="no-cache">
|
||
<meta http-equiv="Cache-Control" content="no-cache">
|
||
<meta http-equiv="Expires" content="0">
|
||
<link rel="stylesheet" href="./libs/bootstrap/bootstrap.min.css?__HTML_VERSION__=3">
|
||
<link rel="stylesheet" href="css/style.css?__HTML_VERSION__=6">
|
||
</head>
|
||
<body class="bg_hui">
|
||
<div class="count_full" id="app" v-show="!isLoading" style="display: none">
|
||
|
||
<section class="buju">
|
||
<div class="left">
|
||
<img :src="salesInfo.avatar" class="header_img">
|
||
</div>
|
||
<div class="count">
|
||
<p>昵 称:{{salesInfo.nickname}}</p>
|
||
<p>用户ID:<span v-text="salesInfo.salesid"></span></p>
|
||
<p>微信号:<span v-text="salesInfo.wechat"></span></p>
|
||
</div>
|
||
<div class="right">
|
||
<a :href="'manage_login.html'+searchParams"><img :src="agentInfo.agentlogo" class="logo"></a>
|
||
</div>
|
||
</section>
|
||
|
||
<section class="buju">
|
||
|
||
<div class="bs-example bs-example-tabs">
|
||
<div class="nav-h" id="vuenum">
|
||
<div class="nav-h-x">
|
||
<div class="nav-h-x-a">
|
||
<ul id="myTabs" class="nav nav-tabs" role="tablist">
|
||
<li :class="{'active':selType=='syfk'}" @click="selType='syfk'">
|
||
<a href="javascript:;">索要房卡</a>
|
||
</li>
|
||
<li v-if="lang.openRequestStar" :class="{'active':selType=='requestStar'}" @click="selType='requestStar'">
|
||
<a href="javascript:;">索要{{lang.starName}}</a>
|
||
</li>
|
||
<li :class="{'active':selType=='profile'}" @click="selType='profile'">
|
||
<a href="javascript:;">索卡记录</a>
|
||
</li>
|
||
<li v-if="lang.openRequestStar" :class="{'active':selType=='RequestStarRecord'}" @click="selType='RequestStarRecord'">
|
||
<a href="javascript:;">索{{lang.singStarName}}记录</a>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="myTabContent" class="tab-content">
|
||
<div role="tabpanel" class="tab-pane fade" :class="{'active':selType=='syfk','in':selType=='syfk'}" id="syfk">
|
||
<div class="suoyaofk text-center mt_bt zjgouka">
|
||
<a v-for="item in items" :class="{'btn':true, 'faka':true, 'btn-fangka':item.sel,'btn-default':!item.sel}"
|
||
@click="setRoomcard(item)"><span v-text="item.num"></span>张F卡</a>
|
||
|
||
<div class="text-center">
|
||
<a href="javascript:;" class="btn btn-suoka margin-top20 closes" @click="askForRoomcard()" style="width: 50%;">索要房卡</a>
|
||
<p v-if="lang.payWeChat"><small class="chengse">{{lang.payWeChat}}</small></p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div v-if="lang.openRequestStar" role="tabpanel" class="tab-pane fade" :class="{'active':selType=='requestStar','in':selType=='requestStar'}">
|
||
<div class="suoyaofk text-center mt_bt zjgouka">
|
||
<a v-for="item in starList" :class="{'btn':true, 'faka':true, 'btn-fangka':item.sel,'btn-default':!item.sel}"
|
||
@click="setStar(item)"><span v-text="item.desc"></span>个{{lang.starName}}</a>
|
||
|
||
<div class="text-center">
|
||
<a href="javascript:;" class="btn btn-suoka margin-top20 closes" @click="askForStar()" style="width: 50%;">索要{{lang.starName}}</a>
|
||
<p v-if="lang.payWeChat"><small class="chengse">{{lang.payWeChat}}</small></p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div role="tabpanel" class="tab-pane fade" :class="{'active':selType=='profile','in':selType=='profile'}">
|
||
<div class="gk_lsjir mt_bt">
|
||
<table class="gk_table">
|
||
<tbody>
|
||
<tr v-for="item in askList">
|
||
<td><span v-text="item.amount"></span>张</td>
|
||
|
||
<td v-if="item.state == 0">等待发卡</td>
|
||
<td v-else>索卡成功</td>
|
||
|
||
<td v-text="item.asktime.substr(5,11)"></td>
|
||
</tr>
|
||
</tbody>
|
||
<tfoot>
|
||
<tr>
|
||
<td colspan="3" class="text-center" v-if="!askList[0]">暂无记录</td>
|
||
</tr>
|
||
</tfoot>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
|
||
<div v-if="lang.openRequestStar" class="tab-pane fade" :class="{'active':selType=='RequestStarRecord','in':selType=='RequestStarRecord'}">
|
||
<div class="gk_lsjir mt_bt">
|
||
<table class="gk_table">
|
||
<tbody>
|
||
<tr v-for="item in askStarList">
|
||
<td><span v-text="item.amount"></span>个</td>
|
||
|
||
<td v-if="item.state == 0">等待发放</td>
|
||
<td v-else>索取成功</td>
|
||
|
||
<td v-text="item.asktime.substr(5,11)"></td>
|
||
</tr>
|
||
</tbody>
|
||
<tfoot>
|
||
<tr>
|
||
<td colspan="3" class="text-center" v-if="!askList[0]">暂无记录</td>
|
||
</tr>
|
||
</tfoot>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
|
||
<script src="./libs/jquery.min.js?__HTML_VERSION__=3"></script>
|
||
<script src="./libs/vue.min.js?__HTML_VERSION__=3"></script>
|
||
<script src="./libs/layer_mobile/layer.js?__HTML_VERSION__=3"></script>
|
||
<script src="./lang/lang.js?__HTML_VERSION__=14"></script>
|
||
<script src="./js/function.js?__HTML_VERSION__=18"></script>
|
||
<script>
|
||
var vm = new Vue(
|
||
{
|
||
el: "#app",
|
||
data: {
|
||
isLoading: true,
|
||
lang: {},
|
||
agentInfo: {},
|
||
salesInfo: {},
|
||
urlParam: {},
|
||
askRoomcard: 1,
|
||
askStar: 1000,
|
||
items: [
|
||
{sel: true, num: 1},
|
||
{sel: false, num: 10},
|
||
{sel: false, num: 20},
|
||
{sel: false, num: 50},
|
||
{sel: false, num: 100},
|
||
{sel: false, num: 200}
|
||
],
|
||
starList: [
|
||
{sel: true, num: 1000, desc: '一千'},
|
||
{sel: false, num: 10000, desc: '一万'},
|
||
{sel: false, num: 50000, desc: '五万'},
|
||
{sel: false, num: 100000, desc: '十万'},
|
||
{sel: false, num: 500000, desc: '五十万'},
|
||
{sel: false, num: 1000000, desc: '一百万'}
|
||
],
|
||
askList: {},
|
||
askStarList: {},
|
||
selType: 'syfk'
|
||
},
|
||
computed: {
|
||
searchParams: function () {
|
||
return '?agentid='+this.urlParam.agentid+'&channelid='+this.urlParam.channelid;
|
||
}
|
||
},
|
||
methods: {
|
||
setRoomcard: function (item) {
|
||
this.askRoomcard = item.num;
|
||
|
||
this.items.forEach(function (item) {
|
||
Vue.set(item, 'sel', false);
|
||
});
|
||
Vue.set(item, 'sel', true);
|
||
},
|
||
setStar: function (item) {
|
||
this.askStar = item.num;
|
||
|
||
this.starList.forEach(function (item) {
|
||
Vue.set(item, 'sel', false);
|
||
});
|
||
Vue.set(item, 'sel', true);
|
||
},
|
||
askForRoomcard: function () {
|
||
try {
|
||
if (this.askRoomcard <= 0) throw '索要数量错误';
|
||
|
||
if (!$.isRightId(this.urlParam.playerid)) throw '玩家id不正确';
|
||
|
||
var that = this;
|
||
$.confirm(function () {
|
||
$.api(
|
||
"agent.demand.newOrder",
|
||
{
|
||
agentid: that.urlParam.agentid,
|
||
channelid: that.urlParam.channelid,
|
||
billtype: 0,
|
||
askid: that.urlParam.playerid,
|
||
amount: that.askRoomcard
|
||
},
|
||
function (res) {
|
||
$.alert("索要成功!");
|
||
}, true
|
||
);
|
||
})
|
||
} catch(e) {
|
||
$.alert(e);
|
||
}
|
||
},
|
||
askForStar: function () {
|
||
try {
|
||
if (this.askStar <= 0) throw '索要数量错误';
|
||
|
||
if (!$.isRightId(this.urlParam.playerid)) throw '玩家id不正确';
|
||
|
||
var that = this;
|
||
$.confirm(function () {
|
||
$.api(
|
||
"agent.demand.newOrder",
|
||
{
|
||
agentid: that.urlParam.agentid,
|
||
channelid: that.urlParam.channelid,
|
||
billtype: 2,
|
||
askid: that.urlParam.playerid,
|
||
amount: that.askStar
|
||
},
|
||
function (res) {
|
||
$.alert("索要成功!");
|
||
}, true
|
||
);
|
||
})
|
||
} catch(e) {
|
||
$.alert(e);
|
||
}
|
||
},
|
||
askListData: function () {
|
||
if (this.urlParam.playerid == undefined || this.urlParam.playerid == null || this.urlParam.playerid == '') {
|
||
$.alert("玩家id不能为空!");
|
||
return;
|
||
}
|
||
|
||
$.api(
|
||
'agent.demand.orderList',
|
||
{agentid: this.urlParam.agentid, billtype: 0, askid: this.urlParam.playerid},
|
||
function (res) {
|
||
this.askList = res.list;
|
||
}.bind(this)
|
||
);
|
||
|
||
},
|
||
askStarListData: function () {
|
||
if (this.urlParam.playerid == undefined || this.urlParam.playerid == null || this.urlParam.playerid == '') {
|
||
$.alert("玩家id不能为空!");
|
||
return;
|
||
}
|
||
|
||
$.api(
|
||
'agent.demand.orderList',
|
||
{agentid: this.urlParam.agentid, billtype: 2, askid: this.urlParam.playerid},
|
||
function (res) {
|
||
this.askStarList = res.list;
|
||
}.bind(this)
|
||
);
|
||
|
||
}
|
||
},
|
||
created: function () {
|
||
try {
|
||
this.urlParam = $.getQueryObj();
|
||
|
||
if (!this.urlParam.agentid) throw 'agentid,不能为空';
|
||
if (!this.urlParam.channelid) throw 'channelid,不能为空';
|
||
if (!this.urlParam.playerid) throw '玩家id不能为空';
|
||
this.lang = lang[this.urlParam.agentid] ? lang[this.urlParam.agentid] : lang.default;
|
||
|
||
var that = this;
|
||
$.getAgentInfo(function (agentInfo) {
|
||
that.agentInfo = agentInfo;
|
||
//if(parseInt(agentInfo.agentmode) !== 2) throw '该渠道暂不支持索卡';
|
||
|
||
$.api(
|
||
'agent.demand.salesInfo',
|
||
{agentid: that.urlParam.agentid, channelid: that.urlParam.channelid, playerid: that.urlParam.playerid},
|
||
function (res) {
|
||
that.salesInfo = res;
|
||
|
||
that.askListData();
|
||
if(that.lang.openRequestStar)
|
||
that.askStarListData();
|
||
|
||
that.isLoading = false;
|
||
|
||
}
|
||
);
|
||
})
|
||
|
||
} catch (e) {
|
||
$.alert(e);
|
||
}
|
||
|
||
|
||
}
|
||
});
|
||
|
||
</script>
|
||
</body>
|
||
</html> |