本文整理汇总了PHP中url::action方法的典型用法代码示例。如果您正苦于以下问题:PHP url::action方法的具体用法?PHP url::action怎么用?PHP url::action使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类url
的用法示例。
在下文中一共展示了url::action方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sendback
public function sendback()
{
$postdata = input::get();
$postdata['user_id'] = userAuth::id();
if ($postdata['corp_code'] == "other" && !$postdata['logi_name']) {
return $this->splash('error', "", "其他物流公司不能为空", true);
}
if (!$postdata['logi_no']) {
return $this->splash('error', "", "运单号不可为空", true);
}
if (!$postdata['mobile']) {
return $this->splash('error', "", "收货人手机不可为空", true);
}
if (!$postdata['receiver_address']) {
return $this->splash('error', "", "收货地址不可为空", true);
}
try {
$result = app::get('topc')->rpcCall('aftersales.send.back', $postdata, 'buyer');
} catch (\LogicException $e) {
$msg = $e->getMessage();
return $this->splash('error', $url, $msg, true);
}
$url = url::action('topc_ctl_member_aftersales@aftersalesList');
$msg = '回寄物流信息提交成功';
return $this->splash('success', $url, $msg, true);
}
示例2: contentList
public function contentList()
{
$filter = input::get();
$pageSize = 20;
if (!$filter['pages']) {
$filter['pages'] = 1;
}
$params = array('node_id' => $filter['node_id'], 'page_no' => $pageSize * ($filter['pages'] - 1), 'page_size' => $pageSize, 'fields' => 'article_id,title,node_id,modified', 'platform' => 'wap');
$contentData = app::get('topm')->rpcCall('syscontent.content.get.list', $params);
$count = $contentData['articlecount'];
$contentList = $contentData['articleList'];
$nodeInfo = $contentData['nodeInfo'];
//处理翻页数据
$current = $filter['pages'] ? $filter['pages'] : 1;
$filter['pages'] = time();
if ($count > 0) {
$total = ceil($count / $pageSize);
}
$pagedata['pagers'] = array('link' => url::action('topm_ctl_content@contentList', $filter), 'current' => $current, 'total' => $total, 'token' => $filter['pages']);
$pagedata['contentList'] = $contentList;
$pagedata['count'] = $count;
$pagedata['nodeInfo'] = $nodeInfo;
$pagedata['title'] = "文章列表";
return $this->page('topm/content/contentlist.html', $pagedata);
}
示例3: __commonData
public function __commonData($filter)
{
//$filter = input::get();
$promotionInfo = app::get('topm')->rpcCall('promotion.promotion.get', array('promotion_id' => $filter['promotion_id']));
if ($promotionInfo['valid']) {
if (!$filter['pages']) {
$filter['pages'] = 1;
}
$pageSize = 20;
$params = array('page_no' => $pageSize * ($filter['pages'] - 1), 'page_size' => $pageSize, 'fields' => 'item_id,shop_id,title,image_default_id,price');
//获取促销商品列表
$promotionItem = $this->__promotionItemList($promotionInfo, $params);
$count = $promotionItem['total_found'];
$promotionItemList = $promotionItem['list'];
if (userAuth::check()) {
$pagedata['nologin'] = 1;
}
//处理翻页数据
$current = $filter['pages'] ? $filter['pages'] : 1;
$filter['pages'] = time();
if ($count > 0) {
$total = ceil($count / $pageSize);
}
$pagedata['pagers'] = array('link' => url::action('topm_ctl_promotion@getPromotionItem', $filter), 'current' => $current, 'total' => $total, 'token' => $filter['pages']);
$pagedata['promotionInfo'] = $promotionItem['promotionInfo'];
$pagedata['promotionItemList'] = $promotionItemList;
$pagedata['count'] = $count;
$pagedata['title'] = $promotionItem['promotionInfo']['promotion_tag'];
$pagedata['promotiontype'] = $promotionInfo['promotion_type'];
} else {
return abort(404);
}
return $pagedata;
}
示例4: detail
/**
* 结算明细
* @return
*/
public function detail()
{
$this->contentHeaderTitle = app::get('topshop')->_('企业结算明细');
$filter['shop_id'] = $this->shopId;
$postSend = input::get();
if ($postSend['timearea']) {
$pagedata['timearea'] = $postSend['timearea'];
$timeArray = explode('-', $postSend['timearea']);
$filter['settlement_time|than'] = strtotime($timeArray[0]);
$filter['settlement_time|lthan'] = strtotime($timeArray[1]);
} else {
$filter['settlement_time|than'] = time() - 3600 * 24 * 7;
$filter['settlement_time|lthan'] = time();
$pagedata['timearea'] = date('Y/m/d', time() - 3600 * 24 * 7) . '-' . date('Y/m/d', time());
}
if ($postSend['settlement_type']) {
$filter['settlement_type'] = $postSend['settlement_type'];
$pagedata['settlement_type'] = $postSend['settlement_type'];
}
//处理翻页数据
$pagedata['page'] = $page = $postSend['page'] ? $postSend['page'] : 1;
$pagedata['limits'] = $pageLimit = 10;
$objMdlSettleDetail = app::get('sysclearing')->model('settlement_detail');
$pagedata['settlement_detail_list'] = $objMdlSettleDetail->getList('*', $filter, ($page - 1) * $pageLimit, $pageLimit, 'settlement_time desc');
$count = $objMdlSettleDetail->count($filter);
$postSend['token'] = time();
if ($count > 0) {
$total = ceil($count / $pageLimit);
}
$pagedata['pagers'] = array('link' => url::action('topshop_ctl_clearing_settlement@detail', $postSend), 'current' => $page, 'total' => $total, 'token' => $postSend['token']);
return $this->page('topshop/clearing/settlement_detail.html', $pagedata);
}
示例5: column_edit
public function column_edit(&$colList, $list)
{
foreach ($list as $k => $row) {
$url = url::action('topc_ctl_item@index', array('item_id' => $row['item_id']));
$colList[$k] = "<a href='" . $url . "' target='_blank' >" . $row['title'] . "</a>";
}
}
示例6: saveInfo
/**
* 资讯保存
**/
public function saveInfo()
{
$userId = userAuth::id();
//$postData =utils::_filter_input(input::get());
$postData = input::get();
$postData['user_id'] = $userId;
$postData['modified'] = time();
$postData['pubtime'] = time();
$postData['ifpub'] = 0;
$postData["platform"] = 'pc';
$userName = app::get('sysuser')->model('account');
$infoName = $userName->getList(login_account, array('user_id' => $userId));
$postData['source'] = $infoName[0]['login_account'];
$postData["article_logo"] = $postData["article_logo"][0];
try {
$userMdlAddr = app::get('sysinfo')->model('article');
$userMdlAddr->save($postData);
} catch (Exception $e) {
$msg = $e->getMessage();
return $this->splash('error', null, $msg);
} catch (\LogicException $e) {
$msg = $e->getMessage();
return $this->splash('error', null, $msg);
}
$url = url::action('topc_ctl_member_info@publishInfo');
$msg = app::get('topc')->_('添加成功');
return $this->splash('success', $url, $msg);
}
示例7: ajaxCouponData
public function ajaxCouponData()
{
$filter = input::get();
if (!$filter['pages']) {
$filter['pages'] = 1;
}
$pageSize = 10;
$params = array('page_no' => $pageSize * ($filter['pages'] - 1), 'page_size' => $pageSize, 'fields' => '*', 'user_id' => userAuth::id());
$couponListData = app::get('topm')->rpcCall('user.coupon.list', $params, 'buyer');
$count = $couponListData['count'];
$couponList = $couponListData['coupons'];
//处理翻页数据
$current = $filter['pages'] ? $filter['pages'] : 1;
$filter['pages'] = time();
if ($count > 0) {
$total = ceil($count / $pageSize);
}
$pagedata['pagers'] = array('link' => url::action('topm_ctl_member_coupon@couponList', $filter), 'current' => $current, 'total' => $total, 'token' => $filter['pages']);
$pagedata['couponList'] = $couponList;
$pagedata['count'] = $count;
$pagedata['action'] = 'topm_ctl_member_coupon@couponList';
if (input::get('json')) {
$data['html'] = view::make('topm/member/coupon/list.html', $pagedata)->render();
$data['pagers'] = $pagedata['pagers'];
$data['success'] = true;
return response::json($data);
exit;
}
return view::make('topm/member/coupon/list.html', $pagedata);
}
示例8: getPromotionItem
public function getPromotionItem()
{
$filter = input::get();
$promotionInfo = app::get('topc')->rpcCall('promotion.promotion.get', array('promotion_id' => $filter['promotion_id']));
if ($promotionInfo['valid']) {
if (!$filter['pages']) {
$filter['pages'] = 1;
}
$pageSize = 20;
$params = array('page_no' => $pageSize * ($filter['pages'] - 1), 'page_size' => $pageSize, 'fields' => 'item_id,shop_id,title,image_default_id,price');
//获取促销商品列表
$promotionItem = $this->__promotionItemList($promotionInfo, $params);
//echo '<pre>';print_r($promotionItem);exit();
$count = $promotionItem['total_found'];
$promotionItemList = $promotionItem['list'];
//处理翻页数据
$current = $filter['pages'] ? $filter['pages'] : 1;
$filter['pages'] = time();
if ($count > 0) {
$total = ceil($count / $pageSize);
}
$pagedata['pagers'] = array('link' => url::action('topc_ctl_promotion@getPromotionItem', $filter), 'current' => $current, 'total' => $total, 'token' => $filter['pages']);
$pagedata['promotionItemList'] = $promotionItemList;
$pagedata['count'] = $count;
$pagedata['promotionInfo'] = $promotionItem['promotionInfo'];
$pagedata['promotiontype'] = $promotionInfo['promotion_type'];
} else {
return abort(404);
}
return $this->page("topc/promotion/promotion.html", $pagedata);
}
示例9: doCreateRate
public function doCreateRate()
{
$params['tid'] = input::get('tid');
$params['tally_score'] = input::get('tally_score');
$params['attitude_score'] = input::get('attitude_score');
$params['delivery_speed_score'] = input::get('delivery_speed_score');
$params['logistics_service_score'] = input::get('logistics_service_score');
$anony = input::get('anony');
foreach (input::get('rate_data') as $key => $row) {
$rateData[$key] = $row;
if ($row['rate_pic']) {
$rateData[$key]['rate_pic'] = implode(',', $row['rate_pic']);
}
$rateData[$key]['anony'] = $anony == 'true' ? 1 : 0;
}
$params['rate_data'] = json_encode($rateData);
try {
$result = app::get('topm')->rpcCall('rate.add', $params, 'buyer');
} catch (\LogicException $e) {
$result = false;
$msg = $e->getMessage();
}
if (!$result) {
return $this->splash('error', $url, $msg, true);
}
$url = url::action('topm_ctl_member_trade@index');
$msg = '评价提交成功';
return $this->splash('success', $url, $msg, true);
}
示例10: theme_widget_floor_index
/**
* ShopEx licence
*
* @copyright Copyright (c) 2005-2010 ShopEx Technologies Inc. (http://www.shopex.cn)
* @license http://ecos.shopex.cn/ ShopEx License
*/
function theme_widget_floor_index(&$setting)
{
if (!$setting['slider_type']) {
if ($setting['brand']) {
$data = app::get('desktop')->rpcCall('category.brand.get.list', ['brand_id' => implode(',', $setting['brand']), ['fields' => 'brand_id,brand_logo']]);
$i = 0;
$k = 1;
foreach ($data as $n => $row) {
$picData[$k][$n]['link'] = $row['brand_logo'];
//图片地址
$picData[$k][$n]['linkinfo'] = $row['brand_name'];
//图片描述
$picData[$k][$n]['linktarget'] = url::action('topc_ctl_list@index', ['search_keywords' => $row['brand_name']]);
//链接地址
$i++;
if ($i % 3 === 0) {
$k++;
}
}
$setting['picData'] = $picData;
}
} else {
foreach ((array) $setting['pic'] as $n => $row) {
$picData[][$n] = $row;
}
$setting['picData'] = $picData;
}
return $setting;
}
示例11: index
public function index()
{
//$shop_base = app::get('site')->router()->gen_url(array('app'=>'site', 'ctl'=>'sitemaps', 'act'=>'catalog', 'full'=>1));
$shop_base = url::action('site_ctl_sitemaps@catalog');
$pagedata['url'] = $shop_base;
return $this->page('site/admin/sitemaps/index.html', $pagedata);
}
示例12: index
public function index()
{
$pageSize = 20;
$filter = input::get();
$notice = app::get('sysshop')->getConf('shopnoticetype');
//echo '<pre>';print_r($notice);exit();
$pagedata['notice'] = $notice;
$pagedata['notice_type'] = $filter['notice_type'];
if (!$filter['pages']) {
$filter['pages'] = 1;
}
$params = array('shop_id' => $this->shopId, 'page_no' => $pageSize * ($filter['pages'] - 1), 'page_size' => $pageSize, 'fields' => 'notice_title,notice_type,createtime,notice_id,shop_id', 'notice_type' => $filter['notice_type']);
$noticeData = app::get('topshop')->rpcCall('shop.get.shopnoticelist', $params);
$count = $noticeData['noticecount'];
$noticeList = $noticeData['noticeList'];
//处理翻页数据
$current = $filter['pages'] ? $filter['pages'] : 1;
$filter['pages'] = time();
if ($count > 0) {
$total = ceil($count / $pageSize);
}
$pagedata['pagers'] = array('link' => url::action('topshop_ctl_shop_notice@index', $filter), 'current' => $current, 'use_app' => 'topshop', 'total' => $total, 'token' => $filter['pages']);
$pagedata['noticeList'] = $noticeList;
$pagedata['total'] = $count;
$this->contentHeaderTitle = app::get('topshop')->_('企业通知');
return $this->page('topshop/shop/notice.html', $pagedata);
}
示例13: index
public function index()
{
$filter = input::get();
$pageSize = 20;
if (!$filter['pages']) {
$filter['pages'] = 1;
}
$params = array('node_id' => $filter['node_id'], 'page_no' => $pageSize * ($filter['pages'] - 1), 'page_size' => $pageSize, 'fields' => 'article_id,title,node_id,modified', 'platform' => 'pc');
$contentData = app::get('topc')->rpcCall('syscontent.content.get.list', $params);
$count = $contentData['articlecount'];
$contentList = $contentData['articleList'];
$nodeInfo = $contentData['nodeInfo'];
//处理翻页数据
$current = $filter['pages'] ? $filter['pages'] : 1;
$filter['pages'] = time();
if ($count > 0) {
$total = ceil($count / $pageSize);
}
$pagedata['pagers'] = array('link' => url::action('topc_ctl_content@index', $filter), 'current' => $current, 'total' => $total, 'token' => $filter['pages']);
$pagedata['contentList'] = $contentList;
$pagedata['count'] = $count;
$pagedata['nodeInfo'] = $nodeInfo;
//获取文章节点树
$nodeList = $this->__getCommonInfo();
$pagedata['nodeList'] = $nodeList;
//echo '<pre>';print_r($pagedata);exit();
return $this->page('topc/content/content.html', $pagedata);
}
示例14: savetmpl
public function savetmpl()
{
$params = input::get();
$params['shop_id'] = $this->shopId;
$isExists = $this->isExists();
if ($isExists) {
$msg = "此模板名称已存在,请换一个重试";
return $this->splash("error", "", $msg, true);
}
if ($params['template_id']) {
try {
if ($params['fee_conf']) {
$params['fee_conf'] = json_encode($params['fee_conf']);
}
app::get('topshop')->rpcCall('logistics.dlytmpl.update', $params, 'seller');
} catch (Exception $e) {
$msg = $e->getMessage();
return $this->splash('error', '', $msg, true);
}
} else {
try {
if ($params['fee_conf']) {
$params['fee_conf'] = json_encode($params['fee_conf']);
}
app::get('topshop')->rpcCall('logistics.dlytmpl.add', $params, 'seller');
} catch (Exception $e) {
$msg = $e->getMessage();
return $this->splash('error', '', $msg, true);
}
}
$msg = app::get('topshop')->_('保存成功');
$url = url::action('topshop_ctl_shop_dlytmpl@index');
return $this->splash('success', $url, $msg, true);
}
示例15: function_menu
/**
* ShopEx licence
*
* @copyright Copyright (c) 2005-2010 ShopEx Technologies Inc. (http://www.shopex.cn)
* @license http://ecos.shopex.cn/ ShopEx License
*/
function function_menu()
{
$html = array();
$shopUrl = url::action('topc_ctl_default@index');
$shopWapUrl = url::action('topm_ctl_default@index');
$html[] = "<a href='{$shopUrl}' target='_blank'>浏览商城</a>";
$html[] = "<a href='{$shopWapUrl}' target='_blank'>手机商城</a>";
return $html;
}