| 1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace app\common\model;
- use think\Model;
- class Contact extends Model
- {
- /**
- * 读取联系我们信息
- *
- * @param string $name 系统设置信息名称
- * @return array 数组格式的返回结果
- */
- public function getContact()
- {
- $result = db('contact')->select();
- if (is_array($result) and is_array($result[0])) {
- return $result[0];
- }
- return false;
- }
- /**
- * 修改联系我们信息
- */
- public function updateContact( $update)
- {
- return db('contact')->where('id','1')->update($update);
- }
- }
- ?>
|