当前位置: 首页 > news >正文

党建网站建设存在问题百度竞价排名查询

党建网站建设存在问题,百度竞价排名查询,国内互联网前十名的公司,整形医院网站建设推广fastadmin 封装框架 实现功能:AXN隐私号绑定、解绑; 场景:为店铺手机号开通虚拟号,用户联系店铺展示虚拟号码; 官方开放文档地址:https://help.aliyun.com/document_detail/59655.html?spma2c4g.111742…

fastadmin 封装框架

实现功能:AXN隐私号绑定、解绑;

场景:为店铺手机号开通虚拟号,用户联系店铺展示虚拟号码;

官方开放文档地址:https://help.aliyun.com/document_detail/59655.html?spm=a2c4g.11174283.6.661.b8365d50CKM5Ma

效果如下:

参考官网开放文档,下载SDK;解压得到 aliyun-dypls-php-sdk 文件夹;

将解压的文件夹内的 api_sdk 文件夹与 api_demo 文件夹内的 PlsDemo.php,拷贝到项目 vendor 目录下,笔者这里是放在了yinsi文件夹

随后打开 PlsDemo.php文件,修改 getAcsClient 方法内对应的 AccessKeyId、AccessKeySecret

还是PlsDemo.php文件,修改绑定时的号码池

还是PlsDemo.php文件,修改解绑时的号码池

最后在用户列表控制器内,添加以下代码:


/*** 编辑*/public function edit($ids = null){$row = $this->model->get($ids);if (!$row) {$this->error(__('No Results were found'));}$adminIds = $this->getDataLimitAdminIds();if (is_array($adminIds)) {if (!in_array($row[$this->dataLimitField], $adminIds)) {$this->error(__('You have no permission'));}}if ($this->request->isPost()) {$params = $this->request->post("row/a");if ($params) {
//        print_r($params);exit;//开通虚拟号if ($params['privacydata'] == '2'){vendor("yinsi.PlsDemo");$response = \PlsDemo::bindAxn($params['mobile']) ;if ($response->Code == 'OK'){$params['privacy_tel'] = $response->SecretBindDTO->SecretNo;$params['subsid'] = $response->SecretBindDTO->SubsId;}else{$this->error($response->Message);}}else{vendor("yinsi.PlsDemo");$response = \PlsDemo::unbindSubscription($params['subsid'],$params['privacy_tel']) ;if ($response->Code == 'OK'){$params['privacy_tel'] = '';$params['subsid'] = '';}};$params = $this->preExcludeFields($params);$result = false;Db::startTrans();try {//是否采用模型验证if ($this->modelValidate) {$name = str_replace("\\model\\", "\\validate\\", get_class($this->model));$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.edit' : $name) : $this->modelValidate;$row->validateFailException(true)->validate($validate);}$result = $row->allowField(true)->save($params);Db::commit();} catch (ValidateException $e) {Db::rollback();$this->error($e->getMessage());} catch (PDOException $e) {Db::rollback();$this->error($e->getMessage());} catch (Exception $e) {Db::rollback();$this->error($e->getMessage());}if ($result !== false) {$this->success();} else {$this->error(__('No rows were updated'));}}$this->error(__('Parameter %s can not be empty', ''));}$this->view->assign("row", $row);return $this->view->fetch();}

与原始的修改方法区别如下接口描述:

不需要后台管理的笔友,用以下代码:

简单的通过接口绑定、解绑虚拟号。 

//隐私号码绑定public function yinsi(){$type = $this->request->request('type');//1绑定2解绑$mobile = $this->request->request('mobile');//需要绑定的手机号vendor("yinsi.PlsDemo");$response = \PlsDemo::bindAxn($mobile) ;print_r($response);exit;//打印接口返回参数}//隐私号码解绑public function Unbundling(){$subsid = $this->request->request('subsid');//绑定接口中返回的subsId;$secretNo = $this->request->request('secretNo');//绑定接口中返回的secretNo;vendor("yinsi.PlsDemo");$response = \PlsDemo::unbindSubscription($subsid,$secretNo) ;print_r($response);exit;//打印接口返回参数}

 

http://www.hkea.cn/news/221505/

相关文章:

  • 企业网站排名提升软件优化南宁seo优化
  • 创意合肥网站建设杭州seo公司排名
  • 网站专题页是什么中国十大关键词
  • 五月天做网站网络策划与营销
  • 高校网站如何建设论文谷歌官网下载
  • 做网站内容软件个人网站怎么做
  • 收废铁的做网站有优点吗海南百度推广开户
  • wordpress 二维码插件下载信阳搜索引擎优化
  • 个人网站二级域名做淘宝客企业推广策略
  • 厦门做网站seo的seo服务公司招聘
  • 安徽池州做企业网站百度搜索官方网站
  • 芜湖商城网站建设青岛百度快速优化排名
  • 我找伟宏篷布我做的事ko家的网站seoul怎么读
  • 即墨做网站优书网首页
  • 网站建设实践报告3000字放单平台
  • 中华人民共和国城乡住房建设厅网站seo技术外包
  • 网站做销售是斤么工作东莞网站营销推广
  • 做网站现在还行吗宁德市疫情
  • 响应式网站首页百度搜索资源
  • 工人找工作哪个网站好福州百度seo
  • 台湾做甜品的网站谷歌seo关键词排名优化
  • 织梦网站导入链接怎么做谷歌广告投放
  • 沈阳网站哪家公司做的好镇江关键字优化品牌
  • 台州本地做网站的做引流推广的平台600
  • 网站的导航用css怎么做网站外链查询
  • 青岛模版网站建设关键词优化按天计费
  • 高端网站建设服务器seo服务哪家好
  • 服装网站建设分析网站浏览器
  • 建站城企业邮箱怎么开通注册
  • html做动态网站cms