|
@@ -44,6 +44,89 @@ class My extends Core
|
|
|
return $this->data;
|
|
|
}
|
|
|
|
|
|
+ # 获取钱包记录表
|
|
|
+ public function getCash()
|
|
|
+ {
|
|
|
+ $this->data['config'] = Dever::db('main/sell_config')->find();
|
|
|
+ $this->data['user'] = $this->user;
|
|
|
+ $this->data['type'] = Dever::db('shop/user_money')->config['set']['type'];
|
|
|
+ $this->data['status'] = Dever::db('shop/user_money')->config['set']['status'];
|
|
|
+
|
|
|
+ $where['mid'] = $this->uid;
|
|
|
+ $type = Dever::input('type');
|
|
|
+ if ($type) {
|
|
|
+ $where['type'] = $type;
|
|
|
+ }
|
|
|
+ $day = Dever::input('day');
|
|
|
+ $this->data['list'] = Dever::db('shop/user_money')->getData($where);
|
|
|
+ if ($this->data['list']) {
|
|
|
+ foreach ($this->data['list'] as $k => $v) {
|
|
|
+ $this->data['list'][$k]['type_name'] = Dever::status($this->data['type'], $v['type']);
|
|
|
+ $this->data['list'][$k]['status_name'] = Dever::status($this->data['status'], $v['status']);
|
|
|
+ if ($v['type'] == 11) {
|
|
|
+ $tixian = Dever::db('bill/tixian')->find($v['type_id']);
|
|
|
+ if ($tixian && $tixian['status'] == 2) {
|
|
|
+ $this->data['list'][$k]['status_name'] .= '(已发放)';
|
|
|
+ } else {
|
|
|
+ $this->data['list'][$k]['status_name'] .= '(待发放)';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $this->data['list'][$k]['cdate'] = date('Y-m-d H:i', $v['cdate']);
|
|
|
+ if ($v['cash'] > 0) {
|
|
|
+ $this->data['list'][$k]['cash'] = '+' . $v['cash'];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return $this->data;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function getCashView()
|
|
|
+ {
|
|
|
+ $where['mid'] = $this->uid;
|
|
|
+ $where['id'] = Dever::input('id');
|
|
|
+ $this->data['info'] = Dever::db('shop/user_money')->find($where);
|
|
|
+
|
|
|
+ $config = Dever::db('shop/user_money')->config['set'];
|
|
|
+
|
|
|
+ if ($this->data['info']) {
|
|
|
+ $this->data['info']['type_name'] = Dever::status($config['type'], $this->data['info']['type']);
|
|
|
+ $this->data['info']['status_name'] = Dever::status($config['status'], $this->data['info']['status']);
|
|
|
+
|
|
|
+ $this->data['info']['cdate'] = date('Y-m-d H:i', $this->data['info']['cdate']);
|
|
|
+ if ($this->data['info']['cash'] > 0) {
|
|
|
+ $this->data['info']['cash'] = '+' . $this->data['info']['cash'];
|
|
|
+ }
|
|
|
+ if ($this->data['info']['type'] == 11) {
|
|
|
+ $tixian = Dever::db('bill/tixian')->find($this->data['info']['type_id']);
|
|
|
+ if ($tixian && $tixian['status'] == 2) {
|
|
|
+ $this->data['info']['status_name'] .= '(已发放)';
|
|
|
+ } else {
|
|
|
+ $this->data['info']['status_name'] .= '(待发放)';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return $this->data;
|
|
|
+ }
|
|
|
+
|
|
|
+ # 钱包充值
|
|
|
+ public function payCash()
|
|
|
+ {
|
|
|
+ $num = Dever::input('num');
|
|
|
+ if ($num <= 0) {
|
|
|
+ Dever::alert('请输入充值金额');
|
|
|
+ }
|
|
|
+
|
|
|
+ return Dever::load('shop/lib/money')->pay($this->uid, $num);
|
|
|
+ }
|
|
|
+
|
|
|
+ # 提现
|
|
|
+ public function tixian()
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
public function getBindInfo()
|
|
|
{
|
|
|
# 获取代理商绑定信息
|