|
@@ -157,7 +157,8 @@ class ConfigService extends BaseService
|
|
|
$result = json_decode($result, true);
|
|
$result = json_decode($result, true);
|
|
|
$rate = number_format($result['usd']['cnh'], 2);
|
|
$rate = number_format($result['usd']['cnh'], 2);
|
|
|
$info = self::findOne(['field' => 'exchange_rate_rmb']);
|
|
$info = self::findOne(['field' => 'exchange_rate_rmb']);
|
|
|
- $info->val = $rate;
|
|
|
|
|
|
|
+ //在原有基础上 增加0.15 的汇率
|
|
|
|
|
+ $info->val = bcadd($rate, 0.15, 2);
|
|
|
$info->save();
|
|
$info->save();
|
|
|
return $result;
|
|
return $result;
|
|
|
}
|
|
}
|