作者 王智

修改

... ... @@ -331,6 +331,14 @@ class Common extends Api
->where('invite_num', '>=', 3)->order('invite_num desc')->limit(50)->select();
$UserId = $this->is_token($this->request->header());
$me = Db::query("SELECT b.id,b.nickname,b.avatar,b.invite_num as Num,b.rownum FROM (SELECT t.*, @rownum := @rownum + 1 AS rownum FROM (SELECT @rownum := 0) r,(SELECT * FROM fa_user ORDER BY invite_num DESC) AS t) AS b WHERE b.id={$UserId};");
$this->success('ok', ['list'=>$db, 'me'=>$me[0]]);
$this->success('ok', ['list' => $db, 'me' => $me[0]]);
}
//city
public function BroCity()
{
$Info = Db::name('area')->where('pid', 0)->select();
$this->success('成功', $Info);
}
}
... ...
... ... @@ -72,7 +72,7 @@ class Order extends Api
//生成订单号
$OrderSn = $this->order_sn();
//计算订单总价
$Total = $this->Total($UserId, $params['total']);
$Total = $params['total'];
if ($params['tick_id'] != 0) {
//更改优惠券
Db::name('user_tick')->where('user_id', $UserId)->where('id', $params['tick_id'])->update(
... ... @@ -197,7 +197,7 @@ class Order extends Api
}
$OrderArray = Db::name('order')
->where('user_id', $UserId)
->where('status','NEQ',6)
->where('status', 'NEQ', 6)
->where($map)
->order('updatetime desc')
->select();
... ... @@ -300,7 +300,7 @@ class Order extends Api
'createtime' => time()
];
}
if($OrderInfo['water_num']!=0){
if ($OrderInfo['water_num'] != 0) {
Db::name('num')->insert($NumData);
}
//优惠券归还
... ...
... ... @@ -10108,8 +10108,10 @@ class Algorithm extends Api
// if ($CurrentInnateEnergyTendency[0] == $CurrentInnateEnergyTendency[1]) {
// //两个相同的最高分值,为“排名1能量+排名2能量 主导”
// $CurrentInnate = $this->CurrentInnateName($CurrentInnateEnergyTendency[0], $CurrentInnateEnergyTendencyArray) . '+' . $this->CurrentInnateName($CurrentInnateEnergyTendency[1], $CurrentInnateEnergyTendencyArray) . '能主导';
if ($CurrentInnateEnergyTendency[0] == $CurrentInnateEnergyTendency[1] || $CurrentInnateEnergyTendency[1] == $CurrentInnateEnergyTendency[2]) {
if ($CurrentInnateEnergyTendency[0] == $CurrentInnateEnergyTendency[1] && $CurrentInnateEnergyTendency[1] == $CurrentInnateEnergyTendency[2]) {
//三能体质
$CurrentInnate = '三能平衡';
} elseif ($CurrentInnateEnergyTendency[0] == $CurrentInnateEnergyTendency[1] || $CurrentInnateEnergyTendency[1] == $CurrentInnateEnergyTendency[2]) {
//出现两个相同分值的特殊情况
if ($CurrentInnateEnergyTendency[0] == $CurrentInnateEnergyTendency[1]) {
//出现两个相同的最高分值,为“排名1能量($First)+排名2($Second)能量 主导”
... ... @@ -11138,7 +11140,9 @@ class Algorithm extends Api
$B = $InnateEnergyTendency[1] - $InnateEnergyTendency[2];
$C = $InnateEnergyTendency[0] - $InnateEnergyTendency[1];
//判断用户天生能量倾向 $Innate 能量标签
if ($InnateEnergyTendency[0] == $InnateEnergyTendency[1] || $InnateEnergyTendency[1] == $InnateEnergyTendency[2]) {
if ($InnateEnergyTendency[0] == $InnateEnergyTendency[1] && $InnateEnergyTendency[1] == $InnateEnergyTendency[2]) {
$Innate = '三能平衡';
} elseif ($InnateEnergyTendency[0] == $InnateEnergyTendency[1] || $InnateEnergyTendency[1] == $InnateEnergyTendency[2]) {
//出现两个相同分值的特殊情况
if ($InnateEnergyTendency[0] == $InnateEnergyTendency[1]) {
//出现两个相同的最高分值,为“排名1能量($First)+排名2($Second)能量 主导”
... ...