diff --git a/Application/Home/Controller/PromoteController.class.php b/Application/Home/Controller/PromoteController.class.php index fff5f82d7..b718673a8 100644 --- a/Application/Home/Controller/PromoteController.class.php +++ b/Application/Home/Controller/PromoteController.class.php @@ -240,26 +240,25 @@ class PromoteController extends BaseController private function caculateSpend($pay_time, $condition, $create = [], $type = 0) { - $map1['promote_id'] = $map['promote_id'] = array('egt', 0); + $map['promote_id'] = array('egt', 0); $spend = M('Spend', 'tab_'); - $map1['pay_status'] = $map['pay_status'] = 1; + $map['pay_status'] = 1; $today = total(1); $yesterday = total(5); $week = total(2); $mounth = total(3); - unset( $map['create_time']); + $this->getLoginPromote(); - $promote_id = get_pid(); - - $promoteId = M("promote", "tab_") - ->field("id") - ->where(array('chain' => ['like', '/'.$promote_id . '/%'],'id'=>$promote_id,'_logic'=>'or')) - ->select(); - $promoteId = implode(',',array_column($promoteId,'id')); + $promoteId = $this->loginPromote['id']; - $whereUser['promote_id'] = ['IN', $promoteId]; + $promoteIds = M("promote", "tab_") + ->where(array('chain' => ['like', $this->loginPromote['chain'] . $promoteId . '/%'])) + ->getField('id', true); + $promoteIds[] = $promoteId; + $map['promote_id'] = ['IN', $promoteIds]; if (in_array($type, [1, 2])) { + $whereUser['promote_id'] = $map['promote_id']; if ($type == 1) { $pay_time = total(1); $start = mktime(0, 0, 0, date('m'), date('d'), date('Y')); @@ -271,78 +270,49 @@ class PromoteController extends BaseController } $whereUser['register_time'] = ['between', array($start, $end - 1)]; $userId = M('user', 'tab_')->where($whereUser)->getField('id', true); - } - if ($userId) { - $map1['user_id'] = $map['user_id'] = ['IN', $userId]; - } else if (!$userId && $type != 0) { - return array('sum_mounth' => 0, 'sum_today' => 0); + if ($userId) { + $map['user_id'] = ['IN', $userId]; + } else if (!$userId && $type != 0) { + return array('sum_mounth' => 0, 'sum_today' => 0); + } } - //获取所有会长 - $promote_map = "`chain` = '%/{$promote_id}/%' OR id = {$promote_id}"; - - $promote = M("promote","tab_")->field("id,account")->where($promote_map)->select(); - $data =array(); - for ($i=0; $i < count($promote); $i++) { - # code... - $proid = M("promote","tab_")->field("id")->where("`chain` like '%/{$promote[$i]['id']}/%'")->select(); - $str = ''; - for($k=0; $kfield(' - floor(sum(IF(pay_time ' . $pay_time . ',pay_amount,0))*100) as count, - floor(sum(IF(pay_time ' . $today . ',pay_amount,0))*100) as today, + $data = $spend + ->field(' + floor(sum(IF(pay_time ' . $pay_time . ',pay_amount,0))*100) as sum_count, + floor(sum(IF(pay_time ' . $today . ',pay_amount,0))*100) as sum_today, floor(sum(IF(pay_time ' . $yesterday . ',pay_amount,0))*100) as yesterday, - floor(sum(IF(pay_time ' . $week . ',pay_amount,0))*100) as week, - floor(sum(IF(pay_time ' . $mounth . ',pay_amount,0))*100) as mounth') - ->where($map) - ->where("pay_time".$pay_time) - ->find(); - $dbdata['promote_account'] = $promote[$i]['account']; - } else { - $dbdata = $spend - ->field(' - floor(sum(IF(pay_time ' . $pay_time . ',pay_amount,0))*100) as count, - floor(sum(IF(pay_time ' . $today . ',pay_amount,0))*100) as today, + floor(sum(IF(pay_time ' . $week . ',pay_amount,0))*100) as sum_week, + floor(sum(IF(pay_time ' . $mounth . ',pay_amount,0))*100) as sum_mounth') + ->where($map) + ->where("pay_time".$pay_time) + ->find(); + } else { + $data = $spend + ->field(' + floor(sum(IF(pay_time ' . $pay_time . ',pay_amount,0))*100) as sum_count, + floor(sum(IF(pay_time ' . $today . ',pay_amount,0))*100) as sum_today, floor(sum(IF(pay_time ' . $yesterday . ',pay_amount,0))*100) as yesterday, - floor(sum(IF(pay_time ' . $week . ',pay_amount,0))*100) as week, - floor(sum(IF(pay_time ' . $mounth . ',pay_amount,0))*100) as mounth') - ->where($map) - ->where("pay_time".$pay_time) - ->find(); - $dbdata['promote_account'] = $promote[$i]['account']; - } - $data[] = $dbdata; - } - foreach ($data as $key => $value) { - $value['count'] ?: 0; - $value['today'] ?: 0; - $value['week'] ?: 0; - $value['mounth'] ?: 0; - static $i = 0; - $i++; - $data[$key]['rand'] = $i; - $data[$key]['count'] = $value['count'] / 100; - $data[$key]['today'] = $value['today'] / 100; - $data[$key]['yesterday'] = $value['yesterday'] / 100; - $data[$key]['week'] = $value['week'] / 100; - $data[$key]['mounth'] = $value['mounth'] / 100; - } - $total = $this->data_total($data); + floor(sum(IF(pay_time ' . $week . ',pay_amount,0))*100) as sum_week, + floor(sum(IF(pay_time ' . $mounth . ',pay_amount,0))*100) as sum_mounth') + ->where($map) + ->where("pay_time".$pay_time) + ->find(); + } + $data['sum_count'] = empty($data['sum_count']) ? 0 : bcdiv($data['sum_count'], 100 ,2); + $data['sum_today'] = empty($data['sum_today']) ? 0 : bcdiv($data['sum_today'], 100 ,2); + $data['yesterday'] = empty($data['yesterday']) ? 0 : bcdiv($data['yesterday'], 100 ,2); + $data['sum_week'] = empty($data['sum_week']) ? 0 : bcdiv($data['sum_week'], 100 ,2); + $data['sum_mounth'] = empty($data['sum_mounth']) ? 0 : bcdiv($data['sum_mounth'], 100 ,2); - return $total; + return $data; } public function data_total($data) diff --git a/Application/Mobile/Controller/UserController.class.php b/Application/Mobile/Controller/UserController.class.php index 24d491b82..dd57e2159 100644 --- a/Application/Mobile/Controller/UserController.class.php +++ b/Application/Mobile/Controller/UserController.class.php @@ -895,8 +895,6 @@ class UserController extends BaseController } else { $model = M('User', 'tab_')->where($map)->save(array('phone' => '')); } - - $this->suser->set_login_info('phone', $_REQUEST['phone']); if ($model !== false) { diff --git a/Application/Mobile/View/User/userpassword.html b/Application/Mobile/View/User/userpassword.html index 9de7f1e4b..7734949a2 100644 --- a/Application/Mobile/View/User/userpassword.html +++ b/Application/Mobile/View/User/userpassword.html @@ -4,47 +4,39 @@ - -
-
-
-
- -
修改密码 - -
-
- -
-
- -
原始密码
-
- -
- -
-
- -
新密码
-
- -
- -
-
- -
确认密码
-
- -
- -
保存修改
-
+ + +
+ +
修改密码 + +
+ +
-
+
+ + +
+
+ + +
+
提交
+ + + +
-
绑定手机解除绑定
-
- -
- - -
-
- -
手机号
+ + - - -
-
- -
手机号
+ + - -
- - - - - -
-
- -
验证码
+ + -
获取验证码
+
-
保存修改
- - - -
+
diff --git a/Public/Mobile/css/password.css b/Public/Mobile/css/password.css new file mode 100644 index 000000000..a5d5c480e --- /dev/null +++ b/Public/Mobile/css/password.css @@ -0,0 +1,95 @@ +.loginPhTwo{ + width: 100%; + font-family:PingFang SC; +} +.login-box{ + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +} +.login-input{ + margin-top: 0.6rem; + width: 5.5rem; + height: 0.8rem; + display: flex; + align-items: center; + justify-content: center; + background:rgba(245,245,245,1); + border-radius:0.4rem; +} +.login-input>img{ + width: 0.42rem; + height: 0.42rem; +} +.login-input>input{ + font-size: 0.28rem; + border: 0; + outline: 0; + height: 0.6rem; + width: 4rem; + margin-left: 0.16rem; + background-color: rgba(245,245,245,1); +} +.login-input>input::placeholder{ + color: #A9A9A9; +} +.login-code{ + margin-top: 0.6rem; + display: flex; + align-items: center; + justify-content: center; +} +.login-code>input{ + width: 3rem; + height: 0.8rem; + background-color: #F5F5F5; + border-radius: 0.4rem; + font-size: 0.28rem; + text-align: center; + border: 0; + outline: 0; +} +.login-code>input::placeholder{ + text-align: center; + color: #A9A9A9; +} +.login-code>div{ + width: 2.3rem; + height: 0.8rem; + background-color: #389AED; + font-size: 0.28rem; + color: #FFFFFF; + border-radius: 0.4rem; + margin-left: 0.2rem; + text-align: center; + line-height: 0.8rem; +} +.login-btn{ + margin-top: 0.6rem; + width: 5.5rem; + height: 0.8rem; + background-color: #389AED; + border-radius: 0.4rem; + font-size: 0.32rem; + color: #fff; + text-align: center; + line-height: 0.8rem; + outline: 0; + border: 0; + } + .forget-text{ + font-size: 0.24rem; + color: #292929; + margin-top: 0.3rem; + font-weight: 400; + text-align: center; + line-height: 0.4rem; + } + .forget-text a{ + color: #389AED; + font-size: 0.24rem; + font-weight: 400; + margin-left: 0.1rem; + cursor: pointer; + } \ No newline at end of file diff --git a/Public/Mobile/css/remove.css b/Public/Mobile/css/remove.css index 127d48c3d..15c1133b5 100644 --- a/Public/Mobile/css/remove.css +++ b/Public/Mobile/css/remove.css @@ -1,61 +1,95 @@ -.remove-info{ +.loginPhTwo{ width: 100%; + font-family:PingFang SC; } -.remove-input { - padding: 0.15rem 0.3rem; +.login-box{ display: flex; + flex-direction: column; align-items: center; - justify-content: space-between; - border-bottom: 1px solid #F5F5F5; - height: 0.78rem; - font-size: 0.28rem; + justify-content: center; } -.remove-inputBox { +.login-input{ + margin-top: 0.6rem; + width: 5.5rem; + height: 0.8rem; display: flex; align-items: center; - font-size:0.28rem; - font-family:PingFang SC; - font-weight:500; - color:rgba(41,41,41,1) + justify-content: center; + background:rgba(245,245,245,1); + border-radius:0.4rem; } -.remove-inputBox>img{ - width: 0.3rem; - height: 0.3rem; - margin-right: 0.23rem; +.login-input>img{ + width: 0.42rem; + height: 0.42rem; } -.remove-inputBox>input{ - width: 1.8rem; - height: 0.5rem; +.login-input>input{ + font-size: 0.28rem; border: 0; outline: 0; - padding: 0; + height: 0.6rem; + width: 4rem; + margin-left: 0.16rem; + background-color: rgba(245,245,245,1); +} +.login-input>input::placeholder{ + color: #A9A9A9; +} +.login-code{ + margin-top: 0.6rem; + display: flex; + align-items: center; + justify-content: center; +} +.login-code>input{ + width: 3rem; + height: 0.8rem; + background-color: #F5F5F5; + border-radius: 0.4rem; font-size: 0.28rem; - margin-left: 0.33rem; -} -.code{ - width:1.84rem; - height:0.6rem; - background:rgba(33,177,235,1); - border-radius:0.3rem; - font-size:0.28rem; - font-family:PingFang SC; - font-weight:400; - color:rgba(255,255,255,1); text-align: center; - line-height: 0.6rem; + border: 0; + outline: 0; +} +.login-code>input::placeholder{ + text-align: center; + color: #A9A9A9; } - -.save{ - width:5rem; - height:0.8rem; - background:rgba(33,177,235,1); - border-radius:0.4rem; - font-size:0.32rem; - font-family:PingFang SC; - font-weight:500; - color:rgba(255,255,255,1); +.login-code>div{ + width: 2.3rem; + height: 0.8rem; + background-color: #389AED; + font-size: 0.28rem; + color: #FFFFFF; + border-radius: 0.4rem; + margin-left: 0.2rem; + text-align: center; line-height: 0.8rem; +} +.login-btn{ + margin-top: 0.6rem; + width: 5.5rem; + height: 0.8rem; + background-color: #389AED; + border-radius: 0.4rem; + font-size: 0.32rem; + color: #fff; text-align: center; - margin: 0.3rem auto 0 auto; - margin-bottom: 10px; + line-height: 0.8rem; + outline: 0; + border: 0; +} +.forget-text{ + font-size: 0.24rem; + color: #292929; + margin-top: 0.3rem; + font-weight: 400; + text-align: center; + line-height: 0.4rem; +} +.forget-text a{ + color: #389AED; + font-size: 0.24rem; + font-weight: 400; + margin-left: 0.1rem; + cursor: pointer; } \ No newline at end of file