Files
youlegames/codes/agent/game/dlweb/api/web2/short_room.html
2026-03-15 01:27:05 +08:00

212 lines
7.4 KiB
HTML
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.
<!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="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" type="text/css" href="css/style.css?__HTML_VERSION__=6">
<link rel="stylesheet" href="./libs/bootstrap/bootstrap.min.css?__HTML_VERSION__=3">
<link rel="stylesheet" href="js/datetimepicker/bootstrap-datetimepicker.min.css?__HTML_VERSION__=3">
</head>
<body class="bg_hui">
<div class="count_full" id="app" v-show="!isLoading" style="display: none">
<sales-info></sales-info>
<section class="buju">
<div class="chongka" style="display: block;">
<div class="rowh he" v-show="!this.shortRoomInfo.short_str">
<p class="text-primary" style="text-indent: 2em; margin-bottom: 0;">输入房间数及收款码后点击保存会创建并显示VIP号</p>
</div>
<div class="rowh he" v-show="this.shortRoomInfo.short_str">
<span class="name">VIP号</span>
<input type="text" class="input" v-model="shortRoomInfo.short_str" readonly style="color:#838383">
</div>
<div class="rowh he">
<span class="name">房间数:</span>
<input type="number" placeholder="最多两桌好友同时" class="input" v-model="shortRoomInfo.max_room" readonly>
<p class="red">默认允许创建8个房间如果需要创建更多的房间请联系客服</p>
</div>
<div class="rowh he">
<span class="name">收款码:</span>
<input type="text" placeholder="游戏中可点击复制" class="input" v-model="shortRoomInfo.collection_code">
</div>
<div class="rowh he" style="height:auto">
<span class="name">说明一:</span>
<input type="text" class="input" placeholder="" v-model="shortRoomInfo.des_one">
</div>
<div class="rowh he" style="height: auto">
<span class="name">赛事名称:</span>
<input type="text" class="input" placeholder="我的赛事" v-model="shortRoomInfo.des_two">
</div>
<div class="rowh he" style="height: auto">
<span class="name">最低魅力值:</span>
<input type="number" class="input" v-model="shortRoomInfo.lower_limit">
</div>
<div class="rowh he" style="height: auto">
<span class="name" style="vertical-align: top;">公告:</span>
<textarea class="input" v-model="shortRoomInfo.announcement" placeholder="好友都能看见喲" style="width: 62%; resize: none; line-height: 1.2;"></textarea>
</div>
<div class="rowh text-center conkabtn" style="margin: 10px 0px 40px 0;height:90px">
<button id="setShortNum" class="btn btn-danger closes" style="margin-bottom: 20px;" @click="submitShortNum()">
保存
</button>
<button class="btn btn-info closes" style="margin-bottom: 20px;" @click="goAddWhiteList()">
去添加好友
</button>
</div>
</div>
</section>
<home-nav v-if="!urlParam.unionid"></home-nav>
</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="./js/function.js?__HTML_VERSION__=18"></script>
<script src="./lang/lang.js?__HTML_VERSION__=14"></script>
<script src="./components/sales-info.js?__HTML_VERSION__=11"></script>
<script src="./components/home-nav.js?__HTML_VERSION__=12"></script>
<script>
var vm = new Vue(
{
el: "#app",
data: {
isLoading: true,
myInfo: {},
urlParam: {},
queryInfo: {
queryID: '',
shortNum: '',
roomNum: '',
collectionCode: '',
desOne: '',
desTwo: '',
lower_limit: '',
announcement: ''
},
// 我的短号房信息
shortRoomInfo: {
collection_code: '',
des_one: '',
des_two: '',
lower_limit: '',
announcement: '',
max_room: '8',
player_id: '',
short_str: ''
}
},
components: {
'home-nav': homeNav,
'sales-info': salesInfo
},
methods: {
goAddWhiteList: function () {
var url = "white_list.html?agentid="+ this.urlParam.agentid + "&channelid="+ this.urlParam.channelid;
if(this.urlParam.unionid) {
url = url + "&unionid=" + this.urlParam.unionid;
}
if(this.urlParam.unionid)
url = url + "&playerid=" + this.urlParam.playerid;
window.location.href = url;
},
/**
* 查询我的短号房
*/
queryShortNum:function (flag) {
if(!this.myInfo.player_id) {
$.alert('未获取到你的玩家ID如果你是新玩家请先进入游戏');
return;
}
flag = flag || false;
var el = this;
$.api(
'agent.user.queryShortNum',
{
agentid: el.urlParam.agentid,
channelid: el.urlParam.channelid,
unionid: el.myInfo.unionid,
openid: el.myInfo.openid,
playerid: el.myInfo.player_id
},
function (res) {
if(res.short_str) {
res.max_room = 8;
el.shortRoomInfo = res;
}
}, flag
)
},
/**
* 设置短号,没有短号默认系统分配短号
*/
submitShortNum: function () {
var roomCount = parseInt(this.shortRoomInfo.max_room);
if (roomCount < 0 || roomCount > 8) {
$.alert("房间数超过范围0至8");
return;
}
if (this.shortRoomInfo.announcement.length && this.shortRoomInfo.announcement.length > 200) {
$.alert('公告的长度不能超过200个字');
return;
}
var that = this;
$.api(
'agent.agent.shortNum',
{
agentid: this.urlParam.agentid,
channelid: this.urlParam.channelid,
salesid: this.myInfo.salesid,
playerid: this.myInfo.player_id,
roomnum: roomCount,
collectioncode: this.shortRoomInfo.collection_code,
desone: this.shortRoomInfo.des_one,
destwo: this.shortRoomInfo.des_two,
lower_limit: this.shortRoomInfo.lower_limit,
announcement: this.shortRoomInfo.announcement,
shortnum: this.shortRoomInfo.short_str
},
function () {
$.alert("1.如果还未在游戏中创建房间请到游戏中:创建房间 -> VIP房间创建房间<br>2.如果已经创建房间本次规则30秒内生效", function () {
that.queryShortNum(1);
});
}.bind(this), 1
);
}
},
created: function () {
this.urlParam = $.getQueryObj();
this.lang = lang[this.urlParam.agentid] ? lang[this.urlParam.agentid] : lang.default;
var that = this;
$.getUserInfo(function (userInfo) {
that.myInfo = userInfo;
that.queryShortNum();
that.isLoading = false;
})
}
})
</script>
</body>
</html>