Merge pull request 'feature/kefu_web' (#29) from feature/kefu_web into master

Reviewed-on: http://8.136.139.249:3000/wmtx/sdk/pulls/29
master
廖金灵 3 years ago
commit 504fb1a4f6

@ -371,10 +371,33 @@ class ArticleController extends HomeController {
}
public function cancellation() {
$this->getDocument('注销协议');
}
public function cancelContent() {
$this->getDocument('账户注销步骤内容');
}
public function otherDirectory() {
$this->getDocument('第三方SDK目录');
}
public function userInfoForm() {
$this->getDocument('个人信息收集清单');
}
// 1安2苹果
public function privacyIndex() {
$type = I("get.type",1);
$list = [
"《服务协议》"=>U('agreement'),
"《隐私政策》"=>U('privacy'),
"《第三方SDK目录》"=>U('otherDirectory')
];
$this->assign('type',$type);
$this->assign('list',$list);
$this->display();
}
private function getDocument($title)
{

@ -44,8 +44,16 @@ class HomeController extends Controller {
$_SESSION['media']="media.php";
$serverhost=$_SERVER['HTTP_HOST'];
if(strpos(strtolower($_SERVER['REQUEST_URI']),'index/download') === FALSE && strpos(strtolower($_SERVER['REQUEST_URI']),'index/qrcode/url') === FALSE && strpos(strtolower($_SERVER['REQUEST_URI']),'article/agreement') === FALSE ) {
if(is_mobile_request()){
$flag = true;
if(strtolower(CONTROLLER_NAME) == "article"){
$nochange = ['agreement','privacy','cancellation','otherdirectory','cancelcontent','privacyindex','userinfoform'];
if(in_array(strtolower(ACTION_NAME),$nochange)){
$flag = false;
}
}
if(strpos(strtolower($_SERVER['REQUEST_URI']),'index/download') === FALSE && strpos(strtolower($_SERVER['REQUEST_URI']),'index/qrcode/url') === FALSE ) {
if(is_mobile_request() && $flag){
$http = 'http';
if(is_https()){
$http = 'https';

@ -0,0 +1,62 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<script src="__JS__/resize.js" type=""></script>
<title>隐私指引</title>
</head>
<style>
a {
color:#02A7F0;
text-decoration:none;
}
.title{
text-align: center;
font-size: .38rem;
}
h2,p{
color: #333;
font-weight: 400;
}
p{
font-size: .32rem;
line-height: 20px;
}
</style>
<body style="padding: 0 15px;">
<div class="page__bd">
<article class="weui-article">
<h2 class="title">服务协议与隐私政策指引</h2>
<section>
<p>
请您务必仔细阅读并充分理解
<foreach name="list" item="vo" >
<a class="jump" data-url="{$vo}" href="javascript:">{$key}</a>
<if condition="$key eq '《服务协议》' ">
</if>
</foreach>
来帮助您了解我们在收集、使用、存储和共享您个人信息的情况以及您享有的相关权利。如您同意,请点击“同意并继续”开始接受我们的服务
</p>
</section>
</article>
</div>
</body>
<script src="__JS__/jquery.min.js"></script>
<script>
var type = '{$type}';
$(".jump").on("click",function(){
var url = $(this).data('url');
console.log(url);
if (type == 1) {
window.txyxsdk.openUrl(url);
} else {
window.webkit.messageHandlers.openUrl.postMessage(url);
}
})
</script>
</html>

@ -62,6 +62,20 @@
<h1 class="user-single-title">第三方SDK目录</h1>
</div>
</div>
<elseif condition="ACTION_NAME eq cancelContent" />
<div class="user-single-head">
<div class="user-single-h">
<a href="{:U('Index/index')}" target="_blank" title="" class="user-single-logo"><img src="{:get_cover(C('PC_SET_LOGO'),'path')}" width="105" height="36" /></a>
<h1 class="user-single-title">账户注销步骤内容</h1>
</div>
</div>
<elseif condition="ACTION_NAME eq userInfoForm" />
<div class="user-single-head">
<div class="user-single-h">
<a href="{:U('Index/index')}" target="_blank" title="" class="user-single-logo"><img src="{:get_cover(C('PC_SET_LOGO'),'path')}" width="105" height="36" /></a>
<h1 class="user-single-title">个人信息收集清单</h1>
</div>
</div>
<elseif condition="ACTION_NAME eq supervise" />
<div class="user-single-head">
<div class="user-single-h">

@ -131,7 +131,7 @@ class AppleController extends BaseController{
// $this->other_price($request);
if(get_zfb_type()==0 || $request['api_ver'] != 2){ // 支付宝官方
if(get_zfb_type()==0 || $request['api_ver'] < 2){ //
if(C('alipay.way')==1/* || ($request['is_create_ordernumer']==1 && C('alipay.way')==0) */){ /* wap */
$game_set_data = get_game_set_info($request['game_id']);

@ -55,7 +55,7 @@ class BaseController extends RestController
|| in_array($a, $this->noToken)
|| in_array($c.".".$a, $this->noToken))) {
if (isset($data['api_ver']) && $data['api_ver'] == 2) {
if (isset($data['api_ver']) && $data['api_ver'] >= 2) {
$this->userToken = self::apiverify($data['user_id'], $data['game_id'], $data['user_token']);
}
}
@ -98,7 +98,7 @@ class BaseController extends RestController
}
if (I('request.api_ver') == 2) {
if (I('request.api_ver') >= 2) {
if (!(in_array($c, $this->noNeedToken) || in_array($a, $this->noNeedToken) || in_array($c.".".$a, $this->noNeedToken))) {
$user = self::webH5Verify();
$this->userId = $user['userId'];

@ -137,7 +137,7 @@ class ExchangeController extends BaseController{
]);
$payPage = "pay_way_v1";
if (isset($request['api_ver']) && $request['api_ver'] == 2) {
if (isset($request['api_ver']) && $request['api_ver'] >= 2) {
$payPage = "pay_way";
// 用户
$userToken = $request['user_token'];

@ -54,7 +54,9 @@ class GameController extends BaseController{
$kefuQQ = '';
if ($game['kefu_qq_type'] == 2)
$kefuQQ = $game['kefu_qq'];
// if (isset($data['api_ver']) && $data['api_ver'] >= 3)
// $kefuQQ = "https://wpa1.qq.com/WQoPWu26?_type=wpa&qidian=true";
//
$contact_cs[$k]['act'] = $kefuQQ;
$contact_cs[$k]['ios_url'] = $kefuQQ;
@ -80,12 +82,14 @@ class GameController extends BaseController{
$gap = "&";
}
if($contact_cs[$k]['name'] == 'support') {
$contact_cs[$k]['act'] = "mqq://im/chat?chat_type=wpa&uin=" . $contact_cs[$k]['act'] . "&version=1&src_type=web";
$contact_cs[$k]['ios_url'] = "mqq://im/chat?chat_type=wpa&uin=" . $contact_cs[$k]['ios_url'] . "&version=1&src_type=web&action=openurl";
$contact_cs[$k]['act'] = "mqqwpa://im/chat?chat_type=wpa&uin=" . $contact_cs[$k]['act'] . "&version=1&src_type=web";
$contact_cs[$k]['ios_url'] = "mqqwpa://im/chat?chat_type=wpa&uin=" . $contact_cs[$k]['ios_url'] . "&version=1&src_type=web&action=openurl";
// $contact_cs[$k]['act'] = $contact_cs[$k]['act'];
// $contact_cs[$k]['ios_url'] = $contact_cs[$k]['act']."{$gap}action=openurl";
if ($data['game_id'] == 227 || $data['game_id'] == 228) { // 仗剑八方
$contact_cs[$k]['act'] = "mqq://im/chat?chat_type=wpa&uin=496722145&version=1&src_type=web";
$contact_cs[$k]['ios_url'] = "mqq://im/chat?chat_type=wpa&uin=496722145&version=1&src_type=web&action=openurl";
$contact_cs[$k]['act'] = "mqqwpa://im/chat?chat_type=wpa&uin=496722145&version=1&src_type=web";
$contact_cs[$k]['ios_url'] = "mqqwpa://im/chat?chat_type=wpa&uin=496722145&version=1&src_type=web&action=openurl";
}
} else {
@ -177,7 +181,7 @@ class GameController extends BaseController{
*/
public function get_suspend(){
$data = json_decode(base64_decode(file_get_contents("php://input")), true);
if (!isset($data['api_ver']) || $data['api_ver'] != 2) {
if (!isset($data['api_ver'])) {
$this->get_suspend_1();
return ;
}
@ -238,7 +242,6 @@ class GameController extends BaseController{
continue;
}
}
// var_dump($isUSIP);
//判断是否开启苹果内购beta包美国ip且是否在白名单当中
if (isset($data['app_type']) && $data['app_type'] == 2 && $isUSIP && !$isWhite) {
if ($v['name'] == 'gift' || $v['name'] == 'suppersign') {
@ -258,7 +261,7 @@ class GameController extends BaseController{
//测试账号苹果审核
$menus[$k]['icon'] = (substr($v['icon'], 0, 7) == "http://" || substr($v['icon'], 0, 8) == "https://" ) ? $v['icon'] :
C('ADMIN_DOMAIN') . $v['icon'];
// die;
if($v['type'] != 3){ //
if (substr($menus[$k]['url'], 0, 7) == "http://" || substr($menus[$k]['url'], 0, 8) == "https://") {
$menus[$k]['url'] = $menus[$k]['url'] . '/user_token/' . $user['user_token']."/game_id/".$data['game_id'].'/sdk_version/'.$data['sdk_version'].'/api_ver/2';
@ -352,7 +355,7 @@ class GameController extends BaseController{
unset($personalMenu[$k]);
}elseif($data['sdk_version'] != 1 && $v['name'] == 'suppersign'){
// $personalMenu[$k]['url'] = C('H5_DOMAIN') . $v['url'] . 'user_token/' . $user['user_token'];
$personalMenu[$k]['ios_url'] = $$v['ios_url'] . '/user_token/' . $user['user_token'] . '/user_id/' . $data['user_id'] . '/game_id/' . $data['game_id'] . '.html?action=openurl';
$personalMenu[$k]['ios_url'] = $v['ios_url'] . '/user_token/' . $user['user_token'] . '/user_id/' . $data['user_id'] . '/game_id/' . $data['game_id'] . '.html?action=openurl';
}elseif($v['name'] == 'balance'){
$str = urlencode("余额");
$personalMenu[$k]['ios_url'] = C('H5_DOMAIN') . $v['ios_url'] . '/user_token/' . $user['user_token']."/game_id/".$data['game_id'].'/sdk_version/'.$data['sdk_version'].'/api_ver/2' . '?action=pay&nav_title=' . $str;

@ -1315,8 +1315,8 @@ class PayH5Controller extends BaseController{
}
}
$url = 'http://' . $_SERVER ['HTTP_HOST'] . "/sdk.php/Spend/pay_success3/orderno/".$request['pay_order_number'].'/game_id/'.$request['game_id'];
$url = (is_https() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . "/sdk.php/Spend/pay_success3/orderno/".$request['pay_order_number'].'/game_id/'.$request['game_id'];
redirect($url);
}

@ -1822,7 +1822,7 @@ class UserController extends BaseController
$model = M("user", "tab_");
$data = array(); //type为0需要验证user_token
if($user['type'] == 0) {
if ($user['api_ver'] == 2) {
if ($user['api_ver'] >= 2) {
self::apiverify($user['user_id'], $user['game_id'], $user['user_token']);
}
}
@ -3729,6 +3729,51 @@ class UserController extends BaseController
$this->new_set_message(1087, $re['message'], $re['code']);
}
}
// 注销账号申请
public function close_account() {
$request = json_decode(base64_decode(file_get_contents("php://input")), true);
$gameId = $request['game_id'];
$userId = $request['user_id'];
$idcard = $request['idcard'];
$phone = $request['phone'];
if (!$gameId || !$userId || !$idcard || !$phone) {
$this->new_set_message(1001, "数据不能为空");
}
$user = M('user', 'tab_')->where([
'id' => $userId,
'idcard' => $idcard
])->find();
if (!$user) {
$this->new_set_message(1001, "身份证号码不匹配");
}
$closeAccountLog = M('close_account_log', 'tab_')->where([
'user_id' => $userId
])->find();
if (!$closeAccountLog || $closeAccountLog['status'] == 2) {
M('close_account_log', 'tab_')->add([
'user_id' => $userId,
'account' => $user['account'],
'game_id' => $gameId,
'create_time' => time(),
'status' => 0,
'admin_id' => 0,
'update_time' => 0,
'remark' => '',
'phone' => $phone
]);
M('user', 'tab_')->where([
'id' => $userId
])->save([
'lock_status' => 0,
'lock_remark' => '申请注销'
]);
$this->new_set_message(200, "申请成功");
}
$this->new_set_message(1001, "审核中...");
}
}

@ -70,15 +70,16 @@ border: 1px solid #999;
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
try{
if(isAndroid){
window.mengchuang.getPayResult('succeed');
window.txyxsdk.getPayResult('succeed');
}else{
window.webkit.messageHandlers.exchangeResult.postMessage(1);
}
}catch(err){
/* setTimeout(function () {
window.location.href= "/mobile.php?s=/User/index.html";
},1000) */
if(isAndroid){
window.mengchuang.getPayResult('succeed');
}else{
window.webkit.messageHandlers.exchangeResult.postMessage(1);
}
}
</script>

@ -0,0 +1,39 @@
!function (window) {
/* 设计图文档宽度 */
var docWidth = 750;
var doc = window.document,
docEl = doc.documentElement,
resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize';
var recalc = (function refreshRem () {
var clientWidth = docEl.getBoundingClientRect().width;
if(clientWidth >1023){
docEl.style.fontSize = Math.max(Math.min(20 * (clientWidth / 2048), 38.5),25) * 5 + 'px';
}else if(clientWidth > 750){
docEl.style.fontSize = Math.max(Math.min(20 * (clientWidth / 1536), 29.5),20) * 5 + 'px';
}else{
/* 8.55小于320px不再缩小11.2大于420px不再放大 17.2 大于667不再放大*/
docEl.style.fontSize = Math.max(Math.min(20 * (clientWidth / docWidth), 17.2), 8.55) * 5 + 'px';
}
return refreshRem;
})();
/* 添加倍屏标识安卓为1 */
docEl.setAttribute('data-dpr', window.navigator.appVersion.match(/iphone/gi) ? window.devicePixelRatio : 1);
if (/iP(hone|od|ad)/.test(window.navigator.userAgent)) {
/* 添加IOS标识 */
doc.documentElement.classList.add('ios');
/* IOS8以上给html添加hairline样式以便特殊处理 */
if (parseInt(window.navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/)[1], 10) >= 8)
doc.documentElement.classList.add('hairline');
}
if (!doc.addEventListener) return;
window.addEventListener(resizeEvt, recalc, false);
doc.addEventListener('DOMContentLoaded', recalc, false);
}(window);
Loading…
Cancel
Save