forked from buxia97/RuleApi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapiResult.php
More file actions
44 lines (39 loc) · 1 KB
/
apiResult.php
File metadata and controls
44 lines (39 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
error_reporting(0);
$version = "1.0.0 beta";
$versionIntro = "规则之树手机客户端";
$versionUrl = "";
$versionCode = 10;
//广告定义,预留了3个,可以参考我的格式自己添加,格式为“图片地址|链接”
//是否开启广告(改为1则显示广告,0不显示)
$isAds = 1;
$ad1 = "https://www.ruletree.club/app/app-ads1.jpg|https://curl.qcloud.com/IvR7A1sk";
$ad2 = "https://www.ruletree.club/app/app-ads2.jpg|https://v.douyin.com/NLVaeau/";
$ad3 = "https://www.ruletree.club/app/app-ads1.jpg|https://curl.qcloud.com/IvR7A1sk";
if(isset($_GET['update'])){
$result=array(
'version'=>$version,
'versionIntro'=>$versionIntro,
'versionUrl'=>$versionUrl,
'versionCode'=>$versionCode
);
//输出json
echo json_encode($result);
}
if(isset($_GET['getAds'])){
if($isAds==1){
$result=array(
"isAds"=>$isAds,
'ad1'=>$ad1,
'ad2'=>$ad2,
'ad3'=>$ad3,
);
}else{
$result=array(
"isAds"=>$isAds,
);
}
//输出json
echo json_encode($result);
}
?>