方维分享系统,分享的用户得到商品的佣金

方维分享系统,分享的用户得到商品的佣金

其中有一步,是让用户分享的商品详情页是自己 二级域名

core/function/global.func.php

FU() 这样处理

//add by Q1006440989 如果此分享商品的uid开通了alimamapid,那site_url就是uid的二级域名
    if($args['sid'] && stripos($type,'note')!==false){
     $res = FDB::resultFirst('select uid from '.FDB::table('share').' where share_id = '.$args['sid']); 
     $res1 =  FDB::resultFirst('select alimama_pid from '.FDB::table('user').' where uid = '.$res); 
     if(!empty($res1)){
      $site_url = "http://".$res.".xxx.com/"; 
     }
    }else{
     $site_url = "http://www.xxx.com/";  
    }

这样用户分享的商品详情页链接就是用户自己uid的二级域名了,离分享的用户得到商品的佣金的实现也快了

原文地址:https://www.cnblogs.com/wangtongphp/p/3502260.html