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

154 lines
5.1 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, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" href="./libs/bootstrap/bootstrap.min.css?__HTML_VERSION__=3">
<link rel="stylesheet" href="./libs/font-awesome.min.css?__HTML_VERSION__=3">
<link rel="stylesheet" href="./css/common.css?__HTML_VERSION__=7">
</head>
<body>
<div class="container" id="app">
<beta-header></beta-header>
<user-info></user-info>
<div class="form-horizontal pt8">
<div class="form-group">
<label for="wechat" class="col-xs-3 control-label">微信号</label>
<div class="col-xs-9">
<input id="wechat" class="form-control" type="text" placeholder="请输入微信号" v-model="wechat">
</div>
</div>
<div class="form-group">
<label for="tel" class="col-xs-3 control-label">手机号</label>
<div class="col-xs-9">
<input id="tel" class="form-control" type="number" placeholder="请输入手机号" v-model="tel">
</div>
</div>
<div class="form-group">
<label for="password" class="col-xs-3 control-label">密码</label>
<div class="col-xs-9">
<input id="password" class="form-control" type="password" placeholder="请输入密码" v-model="password">
</div>
</div>
<div class="form-group">
<label for="password2" class="col-xs-3 control-label">重复密码</label>
<div class="col-xs-9">
<input id="password2" class="form-control" type="password" placeholder="请再次输入密码" v-model="password2">
</div>
</div>
</div>
<button @click="becomeSales" class="btn btn-primary center-block w60">成为代理</button>
<dl class="dl-horizontal pt8">
<dt v-if="serverInfo.wechat">官方微信</dt>
<dd v-html="serverInfo.wechat"></dd>
<dt v-if="serverInfo.qq">官方QQ</dt>
<dd v-html="serverInfo.qq"></dd>
<dt v-if="serverInfo.tel">官方电话</dt>
<dd v-html="serverInfo.tel"></dd>
</dl>
<agent-nav></agent-nav>
</div>
<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="./js/function.js?__HTML_VERSION__=18"></script>
<script src="./components/agent-nav.js?__HTML_VERSION__=8"></script>
<script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
<script src="./components/user-info.js?__HTML_VERSION__=4"></script>
<script src="./libs/layer_mobile/layer.js?__HTML_VERSION__=3"></script>
<script src="./components/beta-header.js?__HTML_VERSION__=3"></script>
<script>
new Vue(
{
el: "#app",
components: {
'agent-nav': agentNav,
'user-info': userInfo,
'beta-header': betaHeader
},
data: {
isLoading: true,
params: {},
serverInfo: {},
userInfo: {},
wxInfo: {},
wechat: '',
password: '',
password2: '',
tel: ''
},
methods: {
changeProductInfo: function (v) {
this.checkedProductId = v.productid;
this.index = v.index;
this.money = v.money;
},
becomeSales: function () {
try {
var that = this;
if (!this.wechat) throw '请输入微信号';
if (!that.tel) throw '请输入手机号';
if (!$.isMobile(that.tel)) throw '请输入正确的手机号';
if (!this.password) throw '请输入密码';
if (!this.password2) throw '请再次输入密码';
if (this.password !== this.password2) throw '两次输入的密码不相同';
//if(!that.userInfo.salesid) throw '没有获取到用户id请联系管理员';
$.loading();
$.api(
'agent.agent.applySales',
{
agentid: that.params.agentid,
channelid: that.params.channelid,
openid: that.wxInfo.openid,
unionid: that.wxInfo.unionid,
salesid: that.userInfo.salesid,
tel: that.tel,
password: that.password,
password2: that.password2,
wechat: that.wechat,
type: 'wechat'
},
function (res) {
window.location.href = './manage_login.html?agentid=' + that.params.agentid + '&channelid=' + that.params.channelid+'&__HTML_VERSION__=3';
}, true
);
} catch (e) {
$.alert(e);
}
}
},
created: function () {
this.params = $.getQueryObj();
var that = this;
$.getWxInfo(function (wxInfo) {
that.wxInfo = wxInfo;
$.getUserInfoFirst(function (userInfo) {
that.userInfo = userInfo;
$.api(
'agent.agent.contactWay', {agentid: that.params.agentid},
function (res) {
that.serverInfo = res;
that.isLoading = false;
}
);
})
})
}
}
);
</script>
</body>
</html>