打开文件
/simplewind/cmf/controller/HomeBaseController.php
添加函数
```
public function checkShangjiaLogin()
{
$userId = cmf_get_current_shangjia_id();
if (empty($userId)) {
if ($this->request->isAjax()) {
$this->error("您尚未登录", cmf_url("shangjia/Login/index"));
} else {
$this->redirect(cmf_url("shangjia/Login/index"));
}
}
}
```