diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php
index 44f628fe..422fdee2 100755
--- a/application/default/controllers/DataController.php
+++ b/application/default/controllers/DataController.php
@@ -668,6 +668,9 @@ class DataController extends Zend_Controller_Action
$fund = new Fund($this->db);
$this->view->fund = $fund->fetch($uuid);
+ //判断特殊数据服务
+ $this->view->dataService= $this->checkDataService($uuid);
+
//自动跳转
$sql="select s.* from datasource d left join source s on d.sourceid=s.id where d.uuid=?";
$row=$this->db->fetchRow($this->db->quoteInto($sql,$uuid));
@@ -677,7 +680,48 @@ class DataController extends Zend_Controller_Action
{
$this->_helper->viewRenderer($row->code.'/view',null,true);
}
- } //viewAction
+ } //viewAction
+
+ //检查特殊数据服务是否存在
+ private function checkDataService($uuid)
+ {
+ $order = new \order\mount\OrderOperate();
+ $service = $order->getDataService($uuid);
+
+ if(empty($service))
+ {
+ return NULL;
+ }else{
+ if($order->checkOrderHas($uuid))
+ {
+ return NULL;
+ }else{
+ return $service;
+ }
+ }
+ }//checkDataService
+
+ //特殊数据服务
+ public function dataserviceAction()
+ {
+ $uuid = $this->_getParam('uuid');
+
+ if(empty($uuid))
+ {
+ $this->jsonexit(array("error"=>"参数错误"));
+ }
+
+ $dataservice = new \data\DataService();
+ $info = $dataservice->get($uuid);
+
+ //暂时只有wsn
+ $data = array(
+ "type"=>"wsn", //服务类型
+ "info"=>$info, //信息 dataservice 表中的字段
+ "callback"=>"" //成功后的js回调函数
+ );
+
+ }
/*
getversionAction() 获取数据版本
diff --git a/application/default/views/scripts/data/view.phtml b/application/default/views/scripts/data/view.phtml
index 17f010d0..755772e4 100755
--- a/application/default/views/scripts/data/view.phtml
+++ b/application/default/views/scripts/data/view.phtml
@@ -336,9 +336,13 @@ endforeach;
在线下载
-
- 放入数据篮
-
+ dataService)) { ?>
+
+
+
+
+ 放入数据篮
+
收藏此数据
diff --git a/application/default/views/scripts/heihe/view.phtml b/application/default/views/scripts/heihe/view.phtml
index 20f54780..b8d819e7 100755
--- a/application/default/views/scripts/heihe/view.phtml
+++ b/application/default/views/scripts/heihe/view.phtml
@@ -11,6 +11,9 @@
$this->headLink()->appendStylesheet('/css/water.css');
$this->theme->AppendPlus($this,'google_map_v3');
$this->theme->AppendPlus($this,'colorbox');
+ if(!empty($this->dataService)) {
+ $this->theme->AppendModel($this,"dataservice");
+ }
?>
= $this->render('breadcrumbs.phtml') ?>