352 lines
13 KiB
HTML
352 lines
13 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" type="text/css" href="css/style.css?__HTML_VERSION__=6">
|
||
</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="bs-example bs-example-tabs" data-example-id="togglable-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=='home'}" @click="selType='home'"><a href="javascript:;" id="home-tab">联系方式</a></li>
|
||
<li :class="{'active':selType=='profile'}" @click="selType='profile'" v-if="!lang.closePhoneFunc"><a href="javascript:;" id="profile-tab">绑定手机</a></li>
|
||
<li :class="{'active':selType=='nextwj'}" @click="selType='nextwj'"><a href="javascript:;" id="nextwj-tab">修改密码</a></li>
|
||
<li :class="{'active':selType=='zidaili'}" @click="selType='zidaili'" v-if="contactWay.wechat || contactWay.qq || contactWay.tel">
|
||
<a href="javascript:;" id="zidaili-tab">官方客服</a>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="myTabContent" class="tab-content">
|
||
<div class="tab-pane fade" :class="{'active':selType=='home','in':selType=='home'}" id="home">
|
||
<div class="suoyaofk mt_bt">
|
||
<div class="bm">
|
||
<p>微信号:<input type='text' id="wechatID" class='lianxi_input' v-bind:value="myInfo.wechat"
|
||
onkeyup="value=value.replace(/[^\w\.\/]/ig,'')"></p>
|
||
<!--<p>手机号:<input type='text' class='lianxi_input' placeholder="12345678978"></p>-->
|
||
<div class="text-center"><a href="javascript:;" @click="changeWechat()"
|
||
class="btn btn-blue margin-top20">修改</a></div>
|
||
</div>
|
||
</div>
|
||
</div><!--tabpanel-->
|
||
<div class="tab-pane fade" :class="{'active':selType=='profile','in':selType=='profile'}" id="profile">
|
||
<div class="suoyaofk mt_bt">
|
||
<div class="bm">
|
||
<p class="red" style="line-height: 1.5;height:auto;text-indent: 2em;">若该手机号码曾经绑定过其他玩家帐号,则会将原帐号中的游戏道具(包括F卡、星星等)转移到新绑定的玩家帐号!</p>
|
||
<div v-if="myInfo.is_bind == 1">
|
||
<p>手机号码:<input type='text' class='lianxi_input' v-bind:value="myInfo.tel" disabled></p>
|
||
<p>获取短信:<a class="btn btn-warning" id="getCodeOne" @click="getCheckCode(1)">获取验证码<span id="resendtime1"></span></a>
|
||
</p>
|
||
<p>验 证 码:<input type='text' class='lianxi_input' placeholder="输入验证码" id="text_code1"></p>
|
||
<div class="text-center margin-top20">
|
||
<a href="javascript:;" class="btn btn-danger mt-l" @click="unBind()">解绑</a>
|
||
</div>
|
||
</div>
|
||
<div v-else>
|
||
<p>手机号码:<input type='text' id="bind_phone" class='lianxi_input' v-bind:value="myInfo.tel"></p>
|
||
<p>获取短信:<a class="btn btn-warning" id="getCodeTwo" @click="getCheckCode(2)">获取验证码<span id="resendtime2"></span></a>
|
||
</p>
|
||
<p>验 证 码:<input type='text' class='lianxi_input' placeholder="输入验证码" id="text_code2"></p>
|
||
<div class="text-center margin-top20">
|
||
<a href="javascript:;" class="btn btn-blue mt-l" @click="bindPhone()">保存</a>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
</div><!--tabpanel-->
|
||
<div class="tab-pane fade" :class="{'active':selType=='nextwj','in':selType=='nextwj'}" id="nextwj">
|
||
<div class="suoyaofk mt_bt">
|
||
<div class="bm">
|
||
<p>旧密码:<input type='text' class='lianxi_input' v-bind:value="myInfo.ppp" disabled="disabled"></p>
|
||
<p>新密码:<input type='text' id="newppp" class='lianxi_input' value=""
|
||
onkeyup="value=value.replace(/[^\w\.\/]/ig,'')"></p>
|
||
<div class="text-center margin-top20">
|
||
<a href="javascript:;" class="btn btn-blue mt-l" @click="savePassword()">保存</a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="tab-pane fade" :class="{'active':selType=='zidaili','in':selType=='zidaili'}" id="zidaili">
|
||
|
||
<div class="gk_lsjir mt_bt">
|
||
<div class="quanxian bm">
|
||
<p v-if="contactWay.wechat">官方微信号:<span class="blue">{{contactWay.wechat}}</span></p>
|
||
<p v-if="contactWay.qq">官方QQ号:<span class="blue" v-html="contactWay.qq"></span></p>
|
||
<p v-if="contactWay.tel">官方电话:<span class="blue">{{contactWay.tel}}</span></p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<home-nav></home-nav>
|
||
</div>
|
||
|
||
</body>
|
||
<script src="./libs/jquery.min.js?__HTML_VERSION__=3"></script>
|
||
<script src="./libs/bootstrap/bootstrap.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="./components/home-nav.js?__HTML_VERSION__=12"></script>
|
||
<script src="./lang/lang.js?__HTML_VERSION__=14"></script>
|
||
<script src="./components/sales-info.js?__HTML_VERSION__=11"></script>
|
||
<script>
|
||
|
||
var vm = new Vue(
|
||
{
|
||
el: "#app",
|
||
data: {
|
||
isLoading: true,
|
||
myInfo: {},
|
||
lang: {},
|
||
urlParam: {},
|
||
contactWay: {},
|
||
selType: 'home'
|
||
},
|
||
components: {
|
||
'sales-info': salesInfo,
|
||
'home-nav': homeNav
|
||
},
|
||
methods: {
|
||
goHome: function () {
|
||
window.location.href = 'index.html?agentid=' + this.urlParam.agentid + '&channelid=' + this.urlParam.channelid+'&__HTML_VERSION__=3';
|
||
},
|
||
timeleft: function (way, timenum) {
|
||
timenum--;
|
||
if (timenum < 0) {
|
||
if (way === 1) {
|
||
//$("#resendtime1").html("(" + 60 + "S)");
|
||
$("#resendtime1").html("");
|
||
$("#getCodeOne").attr('disabled', false);
|
||
}
|
||
else if (way === 2) {
|
||
$("#resendtime2").html("");
|
||
$("#getCodeTwo").attr('disabled', false);
|
||
}
|
||
return;
|
||
}
|
||
if (way === 1) {
|
||
$("#resendtime1").html("(" + timenum + "S)");
|
||
setTimeout("vm.timeleft(1, " + timenum + ")", 1000);
|
||
}
|
||
else if (way === 2) {
|
||
$("#resendtime2").html("(" + timenum + "S)");
|
||
setTimeout("vm.timeleft(2, " + timenum + ")", 1000);
|
||
}
|
||
|
||
},
|
||
myCenter: function () {
|
||
window.location.href = 'my.html?' + 'agentid=' + this.urlParam.agentid + '&channelid=' + this.urlParam.channelid+'&__HTML_VERSION__=3';
|
||
},
|
||
changeWechat: function () {
|
||
var c_wechat = $("#wechatID").val();
|
||
if (c_wechat === this.myInfo.wechat) {
|
||
$.alert("不能与修改前的微信号相同");
|
||
return;
|
||
}
|
||
|
||
$.api(
|
||
"agent.agent.updateInfo",
|
||
{
|
||
agentid: this.urlParam.agentid,
|
||
openid: this.myInfo.openid,
|
||
unionid: this.myInfo.unionid,
|
||
wechat: c_wechat
|
||
},
|
||
function (res) {
|
||
this.myInfo.wechat = c_wechat;
|
||
$.alert("修改成功!");
|
||
}.bind(this), 1
|
||
);
|
||
|
||
},
|
||
unBind: function () {
|
||
var that = this;
|
||
var checkCode = $("#text_code1").val();
|
||
if (checkCode === undefined || checkCode === null || checkCode.length !== 6) {
|
||
$.alert("请输入正确的验证码");
|
||
return false;
|
||
}
|
||
|
||
if (!$.isMobile(that.myInfo.tel)) {
|
||
$.alert('没有正确获取到手机号码,无法解绑!');
|
||
return;
|
||
}
|
||
|
||
var param = {
|
||
agentid: this.urlParam.agentid,
|
||
channelid: this.urlParam.channelid,
|
||
salesid: this.myInfo.salesid,
|
||
phone: that.myInfo.tel,
|
||
msgcode: checkCode
|
||
};
|
||
|
||
$.api(
|
||
"sms.sms.bindPhone",
|
||
param,
|
||
function (res) {
|
||
this.myInfo.is_bind = 0;
|
||
this.myInfo.tel = '';
|
||
$.alert("解绑成功", function () {
|
||
window.location.reload();
|
||
});
|
||
}.bind(this), 1
|
||
);
|
||
|
||
},
|
||
bindPhone: function () {
|
||
var checkCode = $("#text_code2").val();
|
||
if (checkCode === undefined || checkCode === null || checkCode.length !== 6) {
|
||
$.alert("请输入正确的验证码");
|
||
return false;
|
||
}
|
||
|
||
var phone = $("#bind_phone").val();
|
||
if (!$.isMobile(phone)) {
|
||
$.alert('请输入有效的手机号码!');
|
||
return;
|
||
}
|
||
|
||
var param = {
|
||
agentid: this.urlParam.agentid,
|
||
channelid: this.urlParam.channelid,
|
||
salesid: this.myInfo.salesid,
|
||
phone: phone,
|
||
msgcode: checkCode
|
||
};
|
||
|
||
$.api(
|
||
"sms.sms.bindPhone",
|
||
param,
|
||
function (res) {
|
||
this.myInfo.is_bind = 1;
|
||
this.myInfo.tel = phone;
|
||
$.alert("绑定成功", function () {
|
||
window.location.reload();
|
||
});
|
||
}.bind(this), 1
|
||
);
|
||
},
|
||
getCheckCode: function (r) {
|
||
|
||
var sendPhone = '';
|
||
if (1 === r) {
|
||
if ($("#getCodeOne").attr('disabled') === 'disabled') {
|
||
return false;
|
||
}
|
||
|
||
sendPhone = this.myInfo.tel;
|
||
|
||
}
|
||
else if (2 === r) {
|
||
if ($("#getCodeTwo").attr('disabled') === 'disabled') {
|
||
return false;
|
||
}
|
||
|
||
sendPhone = $("#bind_phone").val();
|
||
|
||
if (!$.isMobile(sendPhone)) {
|
||
$.alert('请输入有效的手机号码!');
|
||
return;
|
||
}
|
||
|
||
}
|
||
else {
|
||
return false;
|
||
}
|
||
|
||
$.api(
|
||
"sms.sms.sendBindCode",
|
||
{
|
||
agentid: this.urlParam.agentid,
|
||
channelid: this.urlParam.channelid,
|
||
salesid: this.myInfo.salesid,
|
||
isbind: this.myInfo.is_bind,
|
||
phone: sendPhone
|
||
},
|
||
function (res) {
|
||
|
||
if (r === 1) {
|
||
this.timeleft(1, 60);
|
||
$("#getCodeOne").attr('disabled', 'disabled');
|
||
}
|
||
else if (r === 2) {
|
||
this.timeleft(2, 60);
|
||
$("#getCodeTwo").attr('disabled', 'disabled');
|
||
}
|
||
}.bind(this), 1
|
||
);
|
||
},
|
||
savePassword: function () {
|
||
var newPassword = $("#newppp").val();
|
||
if (newPassword === undefined || newPassword === null || newPassword.length < 6 || newPassword.length > 12) {
|
||
$.alert("密码为6-12位字母和数字");
|
||
return false;
|
||
}
|
||
|
||
$.api(
|
||
"agent.user.changePW",
|
||
{
|
||
agentid: this.urlParam.agentid, channelid: this.urlParam.channelid, unionid: this.myInfo.unionid,
|
||
pw: newPassword, oldpw: this.myInfo.ppp
|
||
},
|
||
function (res) {
|
||
this.myInfo.ppp = newPassword;
|
||
$("#newppp").val("");
|
||
$.alert("保存成功");
|
||
sessionStorage.removeItem('wxInfo');
|
||
sessionStorage.removeItem('password');
|
||
localStorage.clear();
|
||
window.location.href='manage_login.html?agentid='+this.urlParam.agentid+'&channelid='+this.urlParam.channelid+'&__HTML_VERSION__=3';
|
||
}.bind(this), 1
|
||
);
|
||
}
|
||
},
|
||
created: function () {
|
||
var that = this;
|
||
this.urlParam = $.getQueryObj();
|
||
this.lang = lang[that.urlParam.agentid] ? lang[that.urlParam.agentid] : lang.default;
|
||
|
||
$.getUserInfoNoCache(function (r) {
|
||
this.myInfo = r;
|
||
|
||
$.api(
|
||
"agent.agent.contactWay",
|
||
{agentid: this.urlParam.agentid, channelid: this.urlParam.channelid},
|
||
function (res) {
|
||
this.contactWay = res;
|
||
|
||
$.api(
|
||
"agent.user.getppp",
|
||
{agentid: this.urlParam.agentid, channelid: this.urlParam.channelid, salesid: this.myInfo.salesid},
|
||
function (res) {
|
||
this.myInfo.ppp = res.ppp;
|
||
this.isLoading = false;
|
||
}.bind(this)
|
||
)
|
||
}.bind(this)
|
||
);
|
||
}.bind(this));
|
||
}
|
||
});
|
||
</script>
|
||
</html> |