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

275 lines
8.2 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">
<link rel="stylesheet" href="./css/bind_sales_template.css">
</head>
<body style="background: url('./images/share_sales_img_1.png') #03253e no-repeat; background-size: 100% auto;">
<div class="container pt15" id="app" v-show="!isLoading" style="display: none">
<!-- url中的代理信息 -->
<div class="sales-info color-theme" v-if="hasParentSales">
<img :src="salesInfo.avatar" alt="avatar" class="avatar">
<p>&emsp;称:{{salesInfo.name}}</p>
<p>代理ID{{salesInfo.salesid}}</p>
<button class="btn btn-confirm" style="background-image: url('./images/share_sales_btn_1.png');"
@click="bindSales"></button>
</div>
<!-- url中的代理信息 -->
<!-- 如果已经绑定代理,显示该绑定的代理信息 -->
<section class="sales-info color-theme" v-if="parentInfo.parentid || parentInfo.salesid">
<h4 style="color:yellow">你已绑定代理,代理信息如下</h4>
<div>
<img :src="parentInfo.avatar" alt="avatar" class="avatar">
<p>&emsp;称:{{parentInfo.name || parentInfo.nickname}}</p>
<p>代理ID{{parentInfo.parentid || parentInfo.salesid}}</p>
</div>
</section>
<!-- 如果已经绑定代理,显示该绑定的代理信息 -->
<!-- 代理活动介绍 -->
<div class="center">
<img src="./images/share_sales_title_1.png" class="title-img">
</div>
<!-- /代理活动介绍 -->
<!-- 自定义内容-->
<div class="content color-theme" v-html="agentInfo.share_text"></div>
<!-- 详情联系客服 -->
<div class="center">
<img src="./images/share_sales_title_2.png" class="title-img">
</div>
<ul class="kefu flex-full nav">
<li class="clearfix">
<img src="./images/share_sales_h1.png" alt="" class="pull-left">
<div class="pull-right">
<p class="color-theme">微信号:</p>
<p class="color-theme-yellow">{{agentInfo.channelwechat}}</p>
</div>
</li>
<!--<li>
<img src="./images/share_sales_h3.png" alt="" class="pull-left">
<div class="pull-right">
<p class="color-theme">微信号:</p>
<p class="color-theme-yellow">qwertrty</p>
</div>
</li>-->
</ul>
<!-- /详情联系客服 -->
<!-- 游戏下载列表-->
<div class="sales-info color-theme" v-for="(v,i) in info.list" style="padding-top: 20px;">
<img :src="v.image" alt="avatar" class="avatar" style="border: none;">
<h4>{{ v.name }}</h4>
<p>{{ v.memo }}</p>
<button class="btn btn-confirm" style="background-image: url('./images/share_sales_btn_2.png');"
@click="download(i, v.ios_marketid)"></button>
</div>
<!-- 游戏下载列表-->
<div class="game-notice color-theme-2">
<span>抵制不良游戏</span><span>拒绝盗版游戏</span><span>注意自我保护</span><span>谨防受骗上当</span><br>
<span>适度游戏益脑</span><span>沉迷游戏伤身</span><span>合理安排时间</span><span>享受健康生活</span><br>
</div>
<!-- 下载提示-->
<div class="panel-img" v-show="isShow" @click="isShow = false">
<template v-if="isIOS">
<img :src="pics[0]" v-show="!isIOSImgShow" class="full-screen">
<img :src="pics[1]" v-show="isIOSImgShow" class="full-screen">
</template>
<template v-else><img :src="pics[2]" class="full-screen"></template>
</div>
<!-- /下载提示-->
</div>
<script src="./libs/jquery.min.js"></script>
<script src="./libs/bootstrap/bootstrap.min.js"></script>
<script src="./libs/vue.min.js"></script>
<script src="./libs/layer_mobile/layer.js"></script>
<script src="./js/function.js?__HTML_VERSION__=18"></script>
<script>
new Vue(
{
el: "#app",
data: {
isIOS: false,
isShow: false,
isIOSImgShow: false,
info: {},
pics: [
'./images/ios.png',
'./images/ios2.png',
'./images/and.png'
],
isLoading: true,
isWeiXin: false,
params: {},
agentInfo: {},
wxInfo: {}, // 用户的微信信息
userInfo: {}, // 用户本身的信息
salesInfo: {}, // url中salesid的用户信息
parentInfo: {} // 实际绑定的代理信息
},
computed: {
hasParentSales: function () {
if (!this.parentInfo.salesid && this.salesInfo.salesid)
return true;
return false;
}
},
methods: {
download: function (i, marketid) {
console.log(i, marketid);
// 是否是微信端
if (this.isWeiXin) {
// 是否显示帮助图片
this.isShow = true;
if (this.isIOS) {
if (marketid === '2')
this.isIOSImgShow = true;
else
this.isIOSImgShow = false;
}
} else {
// 是否显示帮助图片
this.isShow = false;
// 下载地址
var url = '';
if (this.isIOS)
url = this.info.list[i].ios_down;
else
url = this.info.list[i].android_down;
window.location.href = url;
}
},
bindSales: function () {
if (this.params.sale) {
var that = this;
$.confirm(function () {
$.apiv2(
'agent.agent.bindRecommend',
{
agentid: that.params.agentid,
channelid: that.params.channelid,
openid: that.wxInfo.openid,
unionid: that.wxInfo.unionid,
salesid: that.params.sale
},
function (res) {
that.parentInfo = res;
$.alert('绑定成功');
},
function (code, info) {
if (parseInt(code) === 5) {
layer.open(
{
content: '你还不是代理,请先注册成为代理。',
btn: ['确定', '取消'],
yes: function (i) {
var target_url;
if (that.agentInfo.html_applysales && parseInt(that.agentInfo.html_applysales) === 2)
target_url = './become_sales_free.html?agentid=' + that.params.agentid + '&channelid=' + that.params.channelid + '&__HTML_VERSION__=3';
else
target_url = './become_sales.html?agentid=' + that.params.agentid + '&channelid=' + that.params.channelid + '&__HTML_VERSION__=3';
window.location.href = target_url;
},
no: function () { layer.closeAll() }
}
);
} else
$.alert(info);
},
true
)
})
}
}
},
created: function () {
//sessionStorage.clear();
try {
this.isIOS = $.whichSystem();
this.isWeiXin = $.isWeiXin();
var p = $.getQueryObj();
if (!p.agentid) throw '没有传入agentid';
if (!p.channelid) throw '没有传入channelid';
if (!p.sale) throw '没有传入salesid';
if (this.isWeiXin) {
this.params = p;
var that = this;
$.getAgentInfo(function (agentInfo) {
that.agentInfo = agentInfo;
$.getWxInfo(function (wxInfo) {
that.wxInfo = wxInfo;
$.getUserInfoFirst(function (userInfo) {
that.userInfo = userInfo;
// 我绑定的上级代理信息
$.api(
'agent.agent.myRecommend',
{
agentid: that.params.agentid,
channelid: that.params.channelid,
openid: wxInfo.openid,
unionid: wxInfo.unionid,
salesid: that.userInfo.salesid,
type: 0
},
function (parentInfo) {
that.parentInfo = parentInfo;
if (!parentInfo.parentid) {
// 查询对应的代理信息
$.api(
'agent.agent.recommend',
{
agentid: that.params.agentid,
channelid: that.params.channelid,
salesid: that.params.sale
},
function (res) {
that.salesInfo = res;
that.isLoading = false;
}
)
} else
that.isLoading = false;
}
);
// 获取有下载列表
$.api(
"agent.game.downList",
{agentid: p.agentid, channelid: p.channelid},
function (res) {
that.info = res;
}
)
})
})
})
} else {
window.location.href = './index.html?agentid=' + p.agentid + '&channelid=' + p.channelid;
}
} catch (e) {
$.alert(e);
}
}
})
</script>
</body>
</html>