本文整理汇总了PHP中request::postParam方法的典型用法代码示例。如果您正苦于以下问题:PHP request::postParam方法的具体用法?PHP request::postParam怎么用?PHP request::postParam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类request
的用法示例。
在下文中一共展示了request::postParam方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: insert
public function insert()
{
$address = request::postParam('mobileaddress');
$homeInfo = request::postParam('home');
$homeAddressId = implode(',', $address);
$nowTime = time();
//获取省市地区的名字,组合后保存到社区地址详情里。
$addressList = addressService::getCacheFileAddress();
$cityAddressStr = '';
foreach ($address as $aid) {
$cityAddressStr .= $addressList[$aid]['title'];
}
$homeData = array('title' => $homeInfo['title'], 'address_ids' => $homeAddressId, 'mobileaddress' => $cityAddressStr . $homeInfo['mobileaddress'], 'lng' => $homeInfo['lng'], 'lat' => $homeInfo['lat'], 'firstchar' => $homeInfo['firstchar'], 'image' => $homeInfo['image'], 'paddtime' => $nowTime);
$homeModel = homeService::getSelfModel(homeService::$modelName);
//判断是否添加了该社区。
$hasHomeInfo = homeService::getHomeInfoByTitle($homeData['title']);
if (!$hasHomeInfo) {
$homeId = $homeModel->insert($homeData);
//保存对应地址信息
homeAddressService::getSelfModel(homeAddressService::$modelName);
foreach ($address as $aid) {
$addressData = array('address_id' => $aid, 'home_id' => $homeId);
homeAddressService::$model->insert($addressData);
}
} else {
utils::pexit('已有该社区');
}
}
示例2: insert
public function insert()
{
$shopType = request::postParam('shoptype');
$backurl = request::postParam('backurl');
$shopType['paddtime'] = time();
$this->shopTypeObj->insert($shopType);
$this->tip("添加成功", base64_decode($backurl));
}
示例3: ajaxGetChildCategory
public function ajaxGetChildCategory()
{
$id = request::postParam('id');
$categoryList = $this->showCategoryModel->getChildCategoryByIdCache($id);
if ($categoryList) {
$data = array('code' => 200, 'list' => $categoryList, 'message' => '获取数据成功');
} else {
$data = array('code' => 201, 'list' => '', 'message' => '无数据信息');
}
utils::resposeJson($data);
}
示例4: deleteAll
public function deleteAll()
{
$ids = request::postParam('ids', '');
if ($ids) {
$idArr = explode(',', $ids);
foreach ($idArr as $id) {
$this->userObj->delete('id=?', array($id));
}
}
$resultData = array('code' => 200, 'message' => 'success');
echo json_encode($resultData);
}
示例5: loginIn
public function loginIn()
{
$user = request::postParam('user', '');
$password = request::postParam('password', '');
$adminUserModel = new adminUserModel();
$encryptPassword = $adminUserModel->createPassword($user, $password);
$paramWhere = array('field' => array('id', 'username', 'paddtime', 'pstatus', 'pupdatetime', 'groupid'), 'where' => 'username =? and password=? and pstatus=?', 'param' => array($user, $encryptPassword, 1), 'isRow' => true);
$userInfo = $adminUserModel->select($paramWhere);
if ($userInfo) {
utils::setSessionVal('user', $userInfo['id']);
$this->tip('登录成功,即将进入ERP后台系统', utils::getUrl('admin'));
} else {
$this->tip('登录失败,请确认用户名和密码是否正确', utils::getUrl('admin'));
}
}
示例6: check
public function check()
{
$nowTime = time();
$data = request::postParam('appuser');
$backurl = request::postParam('backurl');
$userExtData = array('truename' => $data['truename'], 'province_id' => $data['address'][0], 'city_id' => isset($data['address'][1]) ? $data['address'][1] : 0, 'towns_id' => isset($data['address'][2]) ? $data['address'][2] : 0, 'address' => $data['addressInfo']);
$userExtObj = new userExtModel();
$userExtObj->save($userExtData, 'user_id=?', array($data['userid']));
$userData = array('identity' => $data['identity']);
$userObj = new userModel();
$userObj->save($userData);
$applicatioinData = array('return_message' => $data['return_message'], 'ext' => $data['ext'], 'id' => $data['id'], 'checktime' => $nowTime);
if (isset($data['appliation_status'])) {
$applicatioinData['appliation_status'] = $data['appliation_status'];
}
$this->userApplicationObj->save($applicatioinData);
$this->tip('操作成功', base64_decode($backurl));
}
示例7: insert
public function insert()
{
$address = request::postParam('mobileaddress');
$backurl = request::postParam('backurl');
$address['paddtime'] = time();
$this->addressObj->insert($address);
$this->addressObj->clearAddressCache();
$this->tip("添加成功", base64_decode($backurl));
}
示例8: getParamSku
public function getParamSku()
{
//sku处理start
$skuData = request::postParam('sku');
$skuList = array();
$skuIdArr = [];
if ($skuData) {
if (isset($skuData['name0']) && !empty($skuData['name0'])) {
$hasSkuTwo = false;
if (isset($skuData['name1']) && $skuData['name1']) {
$hasSkuTwo = true;
}
$i = 0;
foreach ($skuData['name0'] as $skukey => $skuval) {
if (!isset($skuIdArr[$skuval])) {
$i++;
$skuIdArr[$skuval] = $i;
}
$skuStr = $skuData['title0'][$skukey] . '::' . $skuval;
$skuIdStr = '1:' . $skuIdArr[$skuval];
if ($hasSkuTwo) {
$titleValue = $skuData['name1'][$skukey];
$skuStr .= '||' . $skuData['title1'][$skukey] . '::' . $titleValue;
if (!isset($skuIdArr[$titleValue])) {
$i++;
$skuIdArr[$titleValue] = $i;
}
$skuIdStr .= '|2:' . $skuIdArr[$titleValue];
}
$skuList[$skukey]['title'] = $skuStr;
$skuList[$skukey]['title_id'] = $skuIdStr;
if (isset($skuData['id'][$skukey])) {
$skuList[$skukey]['id'] = $skuData['id'][$skukey];
}
$skuList[$skukey]['price'] = $skuData['price'][$skukey];
$skuList[$skukey]['status'] = $skuData['pstatus'][$skukey];
$skuList[$skukey]['image'] = $skuData['image'][$skukey];
}
}
}
return $skuList;
}
示例9: deleteAll
public function deleteAll()
{
$ids = request::postParam('ids', '');
if ($ids) {
$idArr = explode(',', $ids);
foreach ($idArr as $id) {
$this->adminMenuObj->deleteMenuById($id);
}
$this->adminMenuObj->clearMenuCache();
}
$resultData = array('code' => 200, 'message' => 'success');
echo json_encode($resultData);
}