Showing
1 changed file
with
20 additions
and
0 deletions
@@ -437,6 +437,26 @@ class Helpers | @@ -437,6 +437,26 @@ class Helpers | ||
437 | } | 437 | } |
438 | 438 | ||
439 | /** | 439 | /** |
440 | + * 根据url获取拼接之后的地址,用于用户清理缓存 | ||
441 | + * @param string $url url地址 | ||
442 | + * @param string $channel 频道,默认为woman | ||
443 | + * | ||
444 | + * @return string 处理之后的地址 | ||
445 | + */ | ||
446 | + public static function transUrl($url, $channel='woman') { | ||
447 | + | ||
448 | + $extra = ''; | ||
449 | + if(!empty($url) && stripos($url, '?') === false) { | ||
450 | + $extra = '?channel='.$channel; | ||
451 | + } | ||
452 | + if(!empty($url) && stripos($url, '?') !== false){ | ||
453 | + $extra = '&channel='.$channel; | ||
454 | + } | ||
455 | + return $url . $extra; | ||
456 | + } | ||
457 | + | ||
458 | + | ||
459 | + /** | ||
440 | * 各国手机号规则 | 460 | * 各国手机号规则 |
441 | */ | 461 | */ |
442 | private static function areaMobielVerify($mobile, $area = 86) | 462 | private static function areaMobielVerify($mobile, $area = 86) |
-
Please register or login to post a comment