lizhen_gitee hai 1 ano
pai
achega
20ce536935

+ 3 - 1
application/api/controller/Index.php

@@ -387,7 +387,9 @@ class Index extends Api
 
 
 
-
+    public function water(){
+        echo $this->water_icon();
+    }
 
 
 

+ 15 - 0
application/common/controller/Api.php

@@ -526,4 +526,19 @@ class Api
         return false;
     }
 
+    //水印链接
+    public function water_icon($imgurl = '',$username = '张三'){
+        $imgurl = 'https://oss.tken.vip/uploads/20231017/a7a5665bcdd3a35f3af9736febd20fa5.jpg';
+        //
+        if(empty($imgurl)){
+            return '';
+        }
+
+        $shuiyin_img = 'kodo://tken'.config('site.shuiyin') ?: 'kodo://tken/logo.png';
+        $username    = $username ?: 'Tken';
+        $param_str = '?watermark/3/image/'.base64_encode($shuiyin_img).'/dissolve/50/ws/0.1/wst/0/text/'.base64_encode('@'.$username).'/fontsize/300/dissolve/80/gravity/SouthWest/dx/20/dy/20/fill/'.base64_encode('#FFFFFF');
+
+        return $imgurl.$param_str;
+    }
+
 }

+ 2 - 1
application/extra/site.php

@@ -54,7 +54,7 @@ return array (
   'introsite_introrule' => '1、所有用户可以参加邀请好友活动。111
 2、通过自己分享的活动页面地址下载注册成功,即发放注册奖励,邀请新用户达100人,奖励额外增加20%。',
   'kefu_user_ids' => '436',
-  'user_auth_switch' => '1',
+  'user_auth_switch' => '0',
   'min_withdrawal_money' => '1',
   'max_withdrawal_money' => '10000',
   'withdrawal_plat_bili' => '6',
@@ -80,4 +80,5 @@ return array (
   'iso_versioncode' => '1',
   'ios_pay_sandbox' => '0',
   'pipei_oneday_vipuser_times' => '-1',
+  'shuiyin' => '/uploads/20231027/Foqf9QK8lp8c4QsIHtZWvRavKWqz.png',
 );