Beispiel #1
0
 public function needgoods()
 {
     $userInfo = userAuth::getUserInfo();
     $userId = userAuth::id();
     $rows = "*";
     try {
         $userMdlAddr = app::get('sysspfb')->model('supplyInfo');
         $goosList = $userMdlAddr->getList($rows, array('user_id' => $userId));
         $count = $userMdlAddr->count(array('user_id' => $userId));
         $params["user_id"] = $userId;
         $sellertype = app::get('topc')->rpcCall('seller.get.sellertype', $params, 'buyer');
         $shopInfo = app::get('topc')->rpcCall('shop.get.shopInfo', $params, 'buyer');
         //$gongying=$shopInfo["gongying_count"];
     } catch (Exception $e) {
         $msg = $e->getMessage();
         return $this->splash('error', null, $msg);
     } catch (\LogicException $e) {
         $msg = $e->getMessage();
         return $this->splash('error', null, $msg);
     }
     $pagedata['goosList'] = $goosList;
     $pagedata['goodCounts'] = $count;
     $pagedata['shopInfo'] = $shopInfo;
     $pagedata['sellertype'] = $sellertype;
     $pagedata['action'] = 'topc_ctl_member_supplyman@needgoods';
     $this->action_view = "supplyman/needgoods.html";
     return $this->output($pagedata);
 }
Beispiel #2
0
 public function publishInfo()
 {
     $userInfo = userAuth::getUserInfo();
     $userId = userAuth::id();
     $rows = "*";
     try {
         $userMdlAddr = app::get('sysinfo')->model('article');
         $infoList = $userMdlAddr->getList($rows, array('user_id' => $userId));
         $count = $userMdlAddr->count(array('user_id' => $userId));
         $userName = app::get('sysuser')->model('account');
         $infoName = $userName->getList(login_account, array('user_id' => $userId));
         $params["user_id"] = $userInfo["userId"];
         $shopInfo = app::get('topc')->rpcCall('shop.get.shopInfo', $params, 'buyer');
         $pagedata["shopInfo"] = $shopInfo;
     } catch (Exception $e) {
         $msg = $e->getMessage();
         return $this->splash('error', null, $msg);
     } catch (\LogicException $e) {
         $msg = $e->getMessage();
         return $this->splash('error', null, $msg);
     }
     $pagedata['infoName'] = $infoName[0]['login_account'];
     $pagedata['infoList'] = $infoList;
     $pagedata['infoCounts'] = $count;
     $pagedata['action'] = 'topc_ctl_member_info@publishInfo';
     $this->action_view = "info/publishInfo.html";
     return $this->output($pagedata);
 }
Beispiel #3
0
 public function index()
 {
     $userInfo = userAuth::getUserInfo();
     $params["user_id"] = $userInfo["userId"];
     $shopInfo = app::get('topc')->rpcCall('shop.get.shopInfo', $params, 'buyer');
     $pagedata["shopInfo"] = $shopInfo;
     $pagedata['action'] = 'topc_ctl_member_configCenter@index';
     $this->action_view = "configCenter/configCenter.html";
     return $this->output($pagedata);
 }
Beispiel #4
0
 public function save()
 {
     $userInfo = userAuth::getUserInfo();
     $params["user_id"] = $userInfo["userId"];
     $shopInfo = app::get('topc')->rpcCall('shop.get.shopInfo', $params, 'buyer');
     $catid = $_POST["parentcat"];
     $newcat = $_POST["lv3cat"];
     $secsortcat = app::get("syscategory")->model('cat')->getRow("*", array("parent_id" => $catid, "cat_name" => "其他"));
     if ($secsortcat) {
         try {
             if ($this->check_cat($catid, $newcat, $shopInfo, $secsortcat)) {
                 $this->saveconfig($catid, $newcat, $shopInfo, $secsortcat);
             } else {
                 $url = url::action("topc_ctl_member_configcat@index");
                 return $this->splash('error', $url, app::get('topc')->_('您已经提交,请勿重复操作'));
             }
         } catch (Exception $e) {
             $msg = $e->getMessage();
             return $this->splash('error', null, $msg);
         }
     } else {
         $secodcat = array("parent_id" => $catid, "cat_name" => "其他", "cat_path" => "," . $catid . ",", "level" => "2", "is_leaf" => true, "disabled" => false, "order_sort" => 999, "modified_time" => time(), "belong" => $shopInfo["shop_id"]);
         app::get("syscategory")->model('cat')->save($secodcat);
         $secsortcat = app::get("syscategory")->model('cat')->getRow("*", array("parent_id" => $catid, "cat_name" => "其他"));
         try {
             if ($this->check_cat($catid, $newcat, $shopInfo, $secsortcat)) {
                 $this->saveconfig($catid, $newcat, $shopInfo, $secsortcat);
             } else {
                 $url = url::action("topc_ctl_member_configcat@index");
                 return $this->splash('error', $url, app::get('topc')->_('您已经提交,请勿重复操作'));
             }
         } catch (Exception $e) {
             $msg = $e->getMessage();
             return $this->splash('error', null, $msg);
         }
     }
     $url = url::action("topc_ctl_member_configcat@index");
     return $this->splash('success', $url, app::get('topc')->_('保存成功'));
 }
Beispiel #5
0
 /**
  * 信任登陆用户名密码设置
  */
 public function savePwdSet()
 {
     $postData = input::get();
     $userId = userAuth::id();
     //会员信息
     $userInfo = userAuth::getUserInfo();
     $url = url::action("topc_ctl_member@pwdSet");
     if ($userInfo['login_type'] == 'trustlogin') {
         try {
             $this->__checkAccount($postData['username']);
             $data = array('new_pwd' => $postData['new_password'], 'confirm_pwd' => $postData['confirm_password'], 'old_pwd' => $postData['old_password'], 'uname' => $postData['username'], 'user_id' => $userId, 'type' => $userInfo['login_type'] == 'trustlogin' ? "reset" : "update");
             app::get('topc')->rpcCall('user.pwd.update', $data, 'buyer');
         } catch (\Exception $e) {
             $msg = $e->getMessage();
             return $this->splash('error', null, $msg, true);
         }
     } else {
         try {
             $this->__checkAccount($postData['username']);
             $data = array('user_name' => $postData['username'], 'user_id' => $userId);
             app::get('topc')->rpcCall('user.account.update', $data, 'buyer');
         } catch (\Exception $e) {
             $msg = $e->getMessage();
             return $this->splash('error', null, $msg, true);
         }
     }
     return $this->splash('success', $url, app::get('topc')->_('修改成功'), true);
 }
Beispiel #6
0
 public function enquireEdit()
 {
     $userInfo = userAuth::getUserInfo();
     $enquire_id = input::get("enquireId");
     $rows = "*";
     try {
         $userMdlAddr = app::get('sysspfb')->model('enquireinfo');
         $enquireList = $userMdlAddr->getList($rows, array('enquire_id' => $enquire_id));
     } catch (Exception $e) {
         $msg = $e->getMessage();
         return $this->splash('error', null, $msg);
     } catch (\LogicException $e) {
         $msg = $e->getMessage();
         return $this->splash('error', null, $msg);
     }
     $pagedata['enquireList'] = $enquireList[0];
     $pagedata['action'] = 'topc_ctl_member_enquireinfo@enquireEdit';
     $this->action_view = "enquire/enquireEdit.html";
     return $this->output($pagedata);
 }
Beispiel #7
0
 public function index()
 {
     $userInfo = userAuth::getUserInfo();
     $params["user_id"] = $userInfo["userId"];
     $shopInfo = app::get('topc')->rpcCall('shop.get.shopInfo', $params, 'buyer');
     if ($shopInfo == null) {
         $shopInfo["shop_id"] = 0;
     }
     if (!$shopInfo) {
         $pagedata["IsInfo"] = 1;
     } else {
         $pagedata["IsInfo"] = 0;
     }
     $sellerInfo = app::get("sysshop")->model("seller")->getRow("*", array("login_account" => $userInfo["login_account"]));
     $shoptype = app::get("sysshop")->model("shop_type")->getList("*", array("use_type" => 0, "shop_type" => 0, "status" => 1));
     $shophangye = app::get("sysshop")->model("shop_type")->getList("*", array("use_type" => 1, "shop_type" => 0, "status" => 1));
     $shopxingzhi = app::get("sysshop")->model("shop_type")->getList("*", array("use_type" => 2, "shop_type" => 0, "status" => 1));
     $shopchanping = app::get("sysshop")->model("shop_type")->getList("*", array("use_type" => 3, "shop_type" => 0, "status" => 1));
     $shopyuanyin = app::get("sysshop")->model("shop_type")->getList("*", array("use_type" => 4, "shop_type" => 0, "status" => 1));
     $shopguimo = app::get("sysshop")->model("shop_type")->getList("*", array("use_type" => 5, "shop_type" => 0, "status" => 1));
     $shopcat = app::get("syscategory")->model("cat")->getList("*", array("level" => 1));
     $shop_info = app::get("sysshop")->model("shop_info")->getRow("*", array("shop_id" => $shopInfo["shop_id"]));
     $product_name = app::get("sysshop")->model("shop_product")->getList("*", array("shop_id" => $shopInfo["shop_id"]));
     $shop_yuanyin = app::get("sysshop")->model("shop_yuanyin")->getList("*", array("shop_id" => $shopInfo["shop_id"]));
     $shop_rel_lv1cat = app::get("sysshop")->model("shop_rel_lv1cat")->getList("*", array("shop_id" => $shopInfo["shop_id"]));
     $shop_certificate = app::get("sysshop")->model("shop_certificate")->getList("*", array("shop_id" => $shopInfo["shop_id"]));
     $shop_manage = app::get("sysshop")->model("shop_manage")->getList("*", array("shop_id" => $shopInfo["shop_id"]));
     //会员账号信息
     $pagedata["userInfo"] = $userInfo;
     //企业信息
     $pagedata["shopInfo"] = $shopInfo;
     //shop表数据
     $shop_info["shop_hangye"] = trim($shop_info["shop_hangye"]);
     $pagedata["shop_info"] = $shop_info;
     //shop_info表数据
     if ($shop_info != null) {
         $pagedata["shop_info"]["establish_date"] = date('Y-m-d', $pagedata["shop_info"]["establish_date"]);
     }
     //公司位置
     // $pagedata["area"]=array($pagedata["shop_info"]["company_area"]);
     //企业账号信息
     $pagedata["sellerInfo"] = $sellerInfo;
     //企业类型信息
     $pagedata["shoptype"] = $shoptype;
     //判断shoptype是否为自定义
     $pagedata["shoptype_self"] = 1;
     foreach ($shoptype as $key => $value) {
         if ($value["name"] === $shopInfo["shop_type"]) {
             $pagedata["shoptype_self"] = 0;
             break;
         }
     }
     //规模
     $pagedata["shopguimo"] = $shopguimo;
     //行业信息
     foreach ($shophangye as $key => $value) {
         $shophangye[$key]["name"] = trim($value["name"]);
     }
     $pagedata["shophangye"] = $shophangye;
     //判断行业是否为自定义
     $pagedata["shophangye_self"] = 1;
     foreach ($shophangye as $key => $value) {
         if (trim($value["name"]) === trim($shop_info["shop_hangye"])) {
             $pagedata["shophangye_self"] = 0;
             break;
         }
     }
     //企业性质
     $pagedata["shopxingzhi"] = $shopxingzhi;
     //判断已保存的企业性质是数据库里的还是自定义的
     foreach ($shopxingzhi as $key => $value) {
         $pagedata["shopxingzhi_self"] = 1;
         if ($value["name"] === $shop_info["shop_xingzhi"]) {
             $pagedata["shopxingzhi_self"] = 0;
             break;
         }
     }
     //主要产品
     $pagedata["shopchanping"] = $shopchanping;
     $pagedata["product_name"] = $product_name;
     if (empty($product_name)) {
         $pagedata["ishas_shopchanping"] = 0;
     } else {
         $pagedata["ishas_shopchanping"] = 1;
     }
     //注册原因
     $pagedata["shopchanping"] = $shopchanping;
     //分类
     $pagedata["shopcat"] = $shopcat;
     //原因
     $pagedata["shopyuanyin"] = $shopyuanyin;
     $pagedata["shop_yuanyin"] = $shop_yuanyin;
     if (empty($shop_yuanyin)) {
         $pagedata["ishas_shopyuanyin"] = 0;
     } else {
         $pagedata["ishas_shopyuanyin"] = 1;
     }
     //处置能力
     $pagedata["shop_rel_lv1cat"] = $shop_rel_lv1cat;
     //处置能力证书
     $pagedata["shop_manage"] = $shop_manage;
     if (!empty($shop_manage)) {
         $pagedata["shop_manage_ishas"] = 1;
     } else {
         $pagedata["shop_manage_ishas"] = 0;
     }
     //资质证照
     $pagedata["shop_certificate"] = $shop_certificate;
     if (!empty($shop_certificate)) {
         $pagedata["shop_certificate_ishas"] = 1;
     } else {
         $pagedata["shop_certificate_ishas"] = 0;
     }
     $pagedata['action'] = 'topc_ctl_member_userdata@index';
     $this->action_view = "userdata/index.html";
     return $this->output($pagedata);
 }
Beispiel #8
0
 /**
  * @brief 验证第二步
  *
  * @return html
  */
 public function setUserInfoOne()
 {
     $this->setLayoutFlag('cart');
     $userInfo = userAuth::getUserInfo();
     $postdata = input::get();
     $pagedata['type'] = $postdata['type'];
     if ($postdata['type'] && ($postdata['type'] = "update" && !$userInfo['login_account'])) {
         $msg = app::get('topm')->_('您还没有设置用户名,请前往设置用户名!');
         return $this->splash('error', null, $msg);
     }
     $pagedata['userInfo'] = $userInfo;
     $pagedata['verifyType'] = $postdata['verifyType'];
     if ($postdata['verifyType'] == 'mobile') {
         $pagedata['title'] = "绑定手机号";
     }
     if ($postdata['verifyType'] == 'email') {
         $pagedata['title'] = "绑定邮箱";
     }
     return $this->page('topm/member/setinfoone.html', $pagedata);
 }