Syncstore.php
640 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
* 同步店铺
* @author tongdesheng
*
*/
class YHMSearch_Syncstore extends YHMSearch_Core {
private $_urlPath = 'syncstore';
/**
* 可接受的字段
* @var array
*/
private $_fields = array('store_id','nick_name','store_type','star','status');
/**
*
* @param array $params
*/
public function sync($params) {
$syncParams = array();
foreach($this->_fields as $field) {
if(isset($params[$field])) {
$syncParams[$field] = $params[$field];
}
}
$retData = $this->req($this->_urlPath, $syncParams);
if($retData['syncstore'] == 'success') {
return true;
}
return false;
}
}