mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-31 15:00:52 +00:00
Merge branch 'v4.7.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v4.7.0dev
This commit is contained in:
commit
4de8ef2044
@ -184,7 +184,7 @@ class RefundOrder extends AuthController
|
||||
$refund_data['open_id'] = $wechatUserServices->uidToOpenid((int)$order['uid'], 'routine') ?? '';
|
||||
$refund_data['refund_no'] = $orderRefund['order_id'];
|
||||
//修改订单退款状态
|
||||
unset($data['refund_price']);
|
||||
$data['refund_price'] = $data['refunded_price'];
|
||||
if ($this->services->agreeRefund($id, $refund_data)) {
|
||||
$this->services->update($id, $data);
|
||||
return app('json')->success(400149);
|
||||
|
||||
@ -148,7 +148,7 @@ class SystemCrontabListener implements ListenerInterface
|
||||
$timer_log_open = config("log.timer_log", false);
|
||||
if ($timer_log_open){
|
||||
$date = date('Y-m-d H:i:s', time());
|
||||
Log::notice($date . $msg);
|
||||
Log::info($date . $msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -482,25 +482,27 @@ class StoreOrderComputedServices extends BaseServices
|
||||
$tempNumber = $temp_num[$tempId]['number'] ?? 0;
|
||||
if (!$tempId || !$tempPostage || !$tempNumber) continue;
|
||||
$type = $temp_num[$tempId]['type'];
|
||||
$cartNumber = $item['cart_num'];
|
||||
if ((($cartAlready[$tempId]['number'] ?? 0) + $cartNumber) >= $tempNumber) {
|
||||
|
||||
|
||||
if ($type == 1) {
|
||||
$num = $item['cart_num'];
|
||||
} elseif ($type == 2) {
|
||||
$num = $item['cart_num'] * $item['productInfo']['attrInfo']['weight'];
|
||||
} else {
|
||||
$num = $item['cart_num'] * $item['productInfo']['attrInfo']['volume'];
|
||||
}
|
||||
if ((($cartAlready[$tempId]['number'] ?? 0) + $num) >= $tempNumber) {
|
||||
$price = isset($cartAlready[$tempId]['price']) ? bcsub((string)$tempPostage, (string)$cartAlready[$tempId]['price'], 6) : $tempPostage;
|
||||
} else {
|
||||
$price = bcmul((string)$tempPostage, bcdiv((string)$cartNumber, (string)$tempNumber, 6), 6);
|
||||
$price = bcmul((string)$tempPostage, bcdiv((string)$num, (string)$tempNumber, 6), 6);
|
||||
}
|
||||
$cartAlready[$tempId]['number'] = bcadd((string)($cartNumber[$tempId]['number'] ?? 0), (string)$cartNumber, 4);
|
||||
$cartAlready[$tempId]['price'] = bcadd((string)($cartNumber[$tempId]['price'] ?? 0.00), (string)$price, 4);
|
||||
$cartAlready[$tempId]['number'] = bcadd((string)($cartAlready[$tempId]['number'] ?? 0), (string)$num, 4);
|
||||
$cartAlready[$tempId]['price'] = bcadd((string)($cartAlready[$tempId]['price'] ?? 0.00), (string)$price, 4);
|
||||
|
||||
if ($express_rule_number && $express_rule_number < 100) {
|
||||
$price = bcmul($price, $discountRate, 4);
|
||||
}
|
||||
if ($type == 2) {
|
||||
$price = bcmul($price, $item['productInfo']['attrInfo']['weight'], 6);
|
||||
} elseif ($type == 3) {
|
||||
$price = bcmul($price, $item['productInfo']['attrInfo']['volume'], 6);
|
||||
}
|
||||
$price = sprintf("%.2f", $price);
|
||||
$item['postage_price'] = $price;
|
||||
$item['postage_price'] = sprintf("%.2f", $price);
|
||||
}
|
||||
if ($express_rule_number && $express_rule_number < 100) {
|
||||
$storePostageDiscount = $storePostage;
|
||||
|
||||
@ -1171,6 +1171,8 @@ class StoreOrderRefundServices extends BaseServices
|
||||
$orderData['pay_postage'] = $this->getOrderSumPrice($orderData['cart_info'], 'origin_postage_price', false);
|
||||
$orderData['member_price'] = 0;
|
||||
$orderData['routine_contact_type'] = sys_config('routine_contact_type', 0);
|
||||
$orderData['levelPrice'] = $this->getOrderSumPrice($orderData['cart_info'], 'level');//获取会员等级优惠
|
||||
$orderData['memberPrice'] = $this->getOrderSumPrice($orderData['cart_info'], 'member');//获取付费会员优惠
|
||||
|
||||
switch ($orderInfo['pay_type']) {
|
||||
case PayServices::WEIXIN_PAY:
|
||||
@ -1185,6 +1187,9 @@ class StoreOrderRefundServices extends BaseServices
|
||||
case PayServices::ALIAPY_PAY:
|
||||
$pay_type_name = '支付宝支付';
|
||||
break;
|
||||
case PayServices::ALLIN_PAY:
|
||||
$pay_type_name = '通联支付';
|
||||
break;
|
||||
default:
|
||||
$pay_type_name = '其他支付';
|
||||
break;
|
||||
|
||||
@ -51,12 +51,12 @@ class OrderPayServices
|
||||
public function getPayType(string $payType)
|
||||
{
|
||||
//微信支付没有开启,通联支付开启,用户访问端在小程序或者公众号的时候,使用通联微信H5支付
|
||||
if ($payType == PayServices::WEIXIN_PAY) {
|
||||
if ($payType == PayServices::WEIXIN_PAY && !request()->isH5() && !request()->isApp()) {
|
||||
$payType = sys_config('pay_weixin_open', 0);
|
||||
}
|
||||
|
||||
//支付宝没有开启,通联支付开了,用户使用支付宝支付,并且在app端访问的时候,使用通联app支付宝支付
|
||||
if ($payType == PayServices::ALIAPY_PAY) {
|
||||
if ($payType == PayServices::ALIAPY_PAY && request()->isApp()) {
|
||||
$payType = sys_config('ali_pay_status', 0);
|
||||
}
|
||||
|
||||
@ -106,6 +106,8 @@ class OrderPayServices
|
||||
*/
|
||||
public function beforePay(array $orderInfo, string $payType, array $options = [])
|
||||
{
|
||||
$wehcat = $payType == PayServices::WEIXIN_PAY;
|
||||
|
||||
$payType = $this->getPayType($payType);
|
||||
|
||||
if ($orderInfo['paid']) {
|
||||
@ -133,6 +135,11 @@ class OrderPayServices
|
||||
}
|
||||
$options['openid'] = $openid;
|
||||
break;
|
||||
case PayServices::ALLIN_PAY:
|
||||
if ($wehcat) {
|
||||
$options['wechat'] = $wehcat;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@ -186,7 +193,7 @@ class OrderPayServices
|
||||
$payKey = md5($order['order_id']);
|
||||
switch ($payType) {
|
||||
case PayServices::ALIAPY_PAY:
|
||||
$jsConfig->invalid = time() + 60;
|
||||
if (request()->isPc()) $jsConfig->invalid = time() + 60;
|
||||
CacheService::set($payKey, ['order_id' => $order['order_id'], 'other_pay_type' => false], 300);
|
||||
break;
|
||||
case PayServices::ALLIN_PAY:
|
||||
|
||||
@ -265,7 +265,7 @@ class SystemCrontabServices extends BaseServices
|
||||
$timer_log_open = config("log.timer_log", false);
|
||||
if ($timer_log_open) {
|
||||
$date = date('Y-m-d H:i:s', time());
|
||||
Log::notice($date . $msg);
|
||||
Log::info($date . $msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1465,7 +1465,7 @@ class UserServices extends BaseServices
|
||||
$user['vip_name'] = $userLevel['name'] ?? '';
|
||||
}
|
||||
}
|
||||
$user['yesterDay'] = $userBill->getUsersBokerageSum(['uid' => $uid, 'pm' => 1], 'yesterday');
|
||||
$user['yesterDay'] = $frozenPrices->getUsersBokerageSum(['uid' => $uid, 'pm' => 1], 'yesterday');
|
||||
$user['recharge_switch'] = (int)sys_config('recharge_switch');//充值开关
|
||||
$user['adminid'] = $storeService->checkoutIsService(['uid' => $uid, 'status' => 1, 'customer' => 1]);
|
||||
if ($user['phone'] && $user['user_type'] != 'h5') {
|
||||
|
||||
@ -17,7 +17,7 @@ return [
|
||||
// 默认日志记录通道
|
||||
'default' => Env::get('log.channel', 'file'),
|
||||
// 日志记录级别
|
||||
'level' => ['error', 'warning', 'fail', 'success'],
|
||||
'level' => ['error', 'warning', 'fail', 'success', 'info', 'notice'],
|
||||
// 日志类型记录的通道 ['error'=>'email',...]
|
||||
'type_channel' => [],
|
||||
//是否开启业务成功日志
|
||||
|
||||
@ -80,7 +80,7 @@ class WechatService
|
||||
];
|
||||
if (isset($wechat['wechat_encode']) && (int)$wechat['wechat_encode'] > 0 && isset($wechat['wechat_encodingaeskey']) && !empty($wechat['wechat_encodingaeskey']))
|
||||
$config['aes_key'] = $wechat['wechat_encodingaeskey'];
|
||||
if (isset($payment['pay_weixin_open']) && $payment['pay_weixin_open'] == 'weixin') {
|
||||
if (isset($payment['pay_weixin_open'])) {
|
||||
$config['payment'] = [
|
||||
'app_id' => $appId,
|
||||
'merchant_id' => trim($payment['pay_weixin_mchid']),
|
||||
|
||||
@ -198,7 +198,14 @@ class AllinPay extends Client
|
||||
$this->api = self::UNITODER_PAY_API;
|
||||
$this->payType = $isWechat ? 'W01' : 'A01';
|
||||
$this->version = self::VERSION_NUM_11;
|
||||
return $this->create($trxamt, $orderId, $body, null, null, null, '', $remark);
|
||||
$res = $this->create($trxamt, $orderId, $body, null, null, null, '', $remark);
|
||||
$invalid = time() + 60;
|
||||
if ($isWechat) {
|
||||
$key = 'code_url';
|
||||
} else {
|
||||
$key = 'qrCode';
|
||||
}
|
||||
return ['invalid' => $invalid, 'logo' => sys_config('wap_login_logo'), $key => $res['payinfo']];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -201,8 +201,6 @@ class V3WechatPay extends BasePay implements PayInterface
|
||||
{
|
||||
return $this->instance->v3pay->handleNotify(function ($notify, $successful) {
|
||||
|
||||
Log::info('支付回调:' . json_encode($notify));
|
||||
|
||||
if ($successful) {
|
||||
$data = [
|
||||
'attach' => $notify->attach,
|
||||
|
||||
@ -59,6 +59,8 @@ class Arr
|
||||
$newData = [];
|
||||
foreach ($data as $k => $v) {
|
||||
$temp = [];
|
||||
$temp['id'] = $v['id'];
|
||||
$temp['pid'] = $v['pid'];
|
||||
$temp['path'] = $v['menu_path'];
|
||||
$temp['title'] = $v['menu_name'];
|
||||
$temp['icon'] = $v['icon'];
|
||||
|
||||
@ -33508,8 +33508,8 @@ INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config
|
||||
(425, 'allin_cusid', 'text', '', 108, '', 1, '', 0, 0, '\"\"', '通联商户号', '通联支付商户号,由贵公司申请获得', 99, 1),
|
||||
(426, 'allin_appid', 'text', '', 108, '', 1, '', 100, 0, '\"\"', '通联支付Appid', '通联商户后台的设置-》对接设置中查看', 98, 1),
|
||||
(428, 'queue_open', 'radio', 'input', 26, '0=>关闭\n1=>开启', 1, '', 0, 0, '\"0\"', '消息队列', '是否启用消息队列,启用后提升程序运行速度,启用前必须配置Redis缓存', 0, 1),
|
||||
(429, 'get_avatar', 'radio', 'input', 7, '0=>关闭\n1=>开启', 1, '', 0, 0, '\"0\"', '强制获取昵称头像', '是否在小程序用户授权之后,弹窗获取用户的昵称和头像', 0, 1);
|
||||
|
||||
(429, 'get_avatar', 'radio', 'input', 7, '0=>关闭\n1=>开启', 1, '', 0, 0, '\"0\"', '强制获取昵称头像', '是否在小程序用户授权之后,弹窗获取用户的昵称和头像', 0, 1),
|
||||
(430, 'share_qrcode', 'radio', 'input', 2, '0=>商城\n1=>公众号', 1, '', 0, 0, '\"0\"', '公众号推广码类型', '公众号生成的推广码类型:商城:扫码直接进入商城,公众号:扫码进入公众号后推送商城的链接', 0, 1);
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
|
||||
@ -224,7 +224,7 @@ export default {
|
||||
if (data.queue === false) {
|
||||
this.$Notice.warning({
|
||||
title: '温馨提示',
|
||||
desc: '您的【消息队列】未开启,没有开启会导致异步任务无法执行。请尽快执行命令开启!!<a href="https://doc.crmeb.com/single/crmeb_v4/6963" target="_blank">点击查看开启方法</a>',
|
||||
desc: '您的【消息队列】未开启,没有开启会导致异步任务无法执行。请尽快执行命令开启!!<a href="https://doc.crmeb.com/single/crmeb_v4/7217" target="_blank">点击查看开启方法</a>',
|
||||
duration: 30,
|
||||
});
|
||||
}
|
||||
@ -265,7 +265,7 @@ export default {
|
||||
isNotice = true;
|
||||
this.$Notice.warning({
|
||||
title: '温馨提示',
|
||||
desc: '您的【长连接】未开启,没有开启会导致系统默认客服无法使用,后台订单通知无法收到。请尽快执行命令开启!!<a href="https://doc.crmeb.com/single/crmeb_v4/6931" target="_blank">点击查看开启方法</a>',
|
||||
desc: '您的【长连接】未开启,没有开启会导致系统默认客服无法使用,后台订单通知无法收到。请尽快执行命令开启!!<a href="https://doc.crmeb.com/single/crmeb_v4/7219" target="_blank">点击查看开启方法</a>',
|
||||
duration: 30,
|
||||
});
|
||||
}
|
||||
@ -275,7 +275,7 @@ export default {
|
||||
isNotice = true;
|
||||
this.$Notice.warning({
|
||||
title: '温馨提示',
|
||||
desc: '您的【长连接】未开启,没有开启会导致系统默认客服无法使用,后台订单通知无法收到。请尽快执行命令开启!!<a href="https://doc.crmeb.com/single/crmeb_v4/6931" target="_blank">点击查看开启方法</a>',
|
||||
desc: '您的【长连接】未开启,没有开启会导致系统默认客服无法使用,后台订单通知无法收到。请尽快执行命令开启!!<a href="https://doc.crmeb.com/single/crmeb_v4/7219" target="_blank">点击查看开启方法</a>',
|
||||
duration: 30,
|
||||
});
|
||||
}
|
||||
|
||||
@ -375,6 +375,6 @@ export default {
|
||||
.num {
|
||||
white-space: nowrap;
|
||||
margin: 0 10px;
|
||||
width: 15px;
|
||||
width: 17px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -392,13 +392,13 @@
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
background-color: rgb(197, 150, 63, 0.5);
|
||||
background-color: rgb(17, 200, 26, 0.5);
|
||||
line-height: 30px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.suc-bg {
|
||||
background-color: rgb(197, 150, 63, 0.5);
|
||||
background-color: rgb(17, 200, 26, 0.5);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startcolorstr=#7f5CB85C, endcolorstr=#7f5CB85C);
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -518,11 +518,17 @@
|
||||
|
||||
case 'ALIPAY_PAY':
|
||||
//#ifdef H5
|
||||
uni.hideLoading();
|
||||
that.formContent = res.data.result.jsConfig;
|
||||
that.$nextTick(() => {
|
||||
document.getElementById('alipaysubmit').submit();
|
||||
})
|
||||
uni.hideLoading();
|
||||
that.$util.Tips({
|
||||
title: that.$t(`等待支付中`)
|
||||
}, {
|
||||
tab: 4,
|
||||
url: goPages + '&status=0'
|
||||
});
|
||||
that.formContent = res.data.result.jsConfig;
|
||||
setTimeout(() => {
|
||||
document.getElementById('alipaysubmit').submit();
|
||||
}, 1500);
|
||||
//#endif
|
||||
// #ifdef MP
|
||||
uni.navigateTo({
|
||||
|
||||
@ -369,7 +369,7 @@
|
||||
<view class='bnt bg-color' v-if="status.class_status==5" @tap='goOrderConfirm'>{{$t(`再次购买`)}}
|
||||
</view>
|
||||
<view class='bnt bg-color refundBnt'
|
||||
v-if="[1,2,4].includes(orderInfo.refund_type) && !orderInfo.is_cancel && orderInfo.type !=3"
|
||||
v-if="[1,2,4].includes(orderInfo.refund_type) && !orderInfo.is_cancel && orderInfo.type !=3 && orderInfo.refund_status != 2"
|
||||
@tap='cancelRefundOrder'>
|
||||
{{$t(`取消申请`)}}
|
||||
</view>
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
<view class='item acea-row row-between-wrapper'
|
||||
v-if="order_pay_info.paid==0 && order_pay_info.pay_type != 'offline'">
|
||||
<view>{{$t(`失败原因`)}}</view>
|
||||
<view class='itemCom'>{{status==2 ? $t(`取消支付`):msg}}</view>
|
||||
<view class='itemCom'>{{$t(`未支付`)}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!--失败时: 重新购买 -->
|
||||
|
||||
@ -392,13 +392,13 @@
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
background-color: rgb(197, 150, 63, 0.5);;
|
||||
background-color: rgb(17, 200, 26, 0.5);;
|
||||
line-height: 30px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.suc-bg {
|
||||
background-color: rgb(197, 150, 63, 0.5);;
|
||||
background-color: rgb(17, 200, 26, 0.5);;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startcolorstr=#7f5CB85C, endcolorstr=#7f5CB85C);
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -300,6 +300,7 @@
|
||||
|
||||
.collectionGoods .item .text {
|
||||
height: 130rpx;
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user