Merge branch 'v4.7.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v4.7.0dev

This commit is contained in:
吴昊天 2023-02-18 18:16:49 +08:00
commit cee9c3473d
17 changed files with 1551 additions and 1534 deletions

View File

@ -157,8 +157,8 @@ class OtherOrderController
*/
public function pay_type(Request $request)
{
$payType['ali_pay_status'] = sys_config('ali_pay_status', 0) != 0;
$payType['pay_weixin_open'] = sys_config('pay_weixin_open', 0) != 0;
$payType['ali_pay_status'] = sys_config('ali_pay_status', '0') != '0';
$payType['pay_weixin_open'] = sys_config('pay_weixin_open', '0') != '0';
$payType['site_name'] = sys_config('site_name');
$payType['now_money'] = $request->user('now_money');
$payType['offline_pay_status'] = true;

View File

@ -484,7 +484,7 @@ class StoreOrderController
}
/**
* 支付宝单独支付
* TODO 支付宝单独支付 弃用
* @param OrderPayServices $payServices
* @param OtherOrderServices $services
* @param string $key
@ -494,11 +494,11 @@ class StoreOrderController
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function aliPay(OrderPayServices $payServices, OtherOrderServices $services, string $key, string $quitUrl)
{
$payInfo = $this->services->aliPayOrder($payServices, $services, $key, $quitUrl);
return app('json')->success(['pay_content' => $payInfo]);
}
// public function aliPay(OrderPayServices $payServices, OtherOrderServices $services, string $key, string $quitUrl)
// {
// $payInfo = $this->services->aliPayOrder($payServices, $services, $key, $quitUrl);
// return app('json')->success(['pay_content' => $payInfo]);
// }
/**
* 订单列表

View File

@ -61,7 +61,7 @@ class UserRechargeController
}
/**
* 小程序充值
* TODO 小程序充值 弃用
* @param Request $request
* @return mixed
*/
@ -82,7 +82,7 @@ class UserRechargeController
}
/**
* 公众号充值
* TODO 公众号充值 弃用
* @param Request $request
* @return mixed
*/

View File

@ -42,8 +42,8 @@ Route::group(function () {
Route::post('register/reset', 'v1.LoginController/reset')->name('registerReset');
// 绑定手机号(静默授权 还未有用户信息)
Route::post('binding', 'v1.LoginController/binding_phone')->name('bindingPhone');
// 支付宝复制链接支付
Route::get('ali_pay', 'v1.order.StoreOrderController/aliPay')->name('aliPay');
// 支付宝复制链接支付 弃用
// Route::get('ali_pay', 'v1.order.StoreOrderController/aliPay')->name('aliPay');
//查询版权
Route::get('copyright', 'v1.PublicController/copyright')->option(['real_name' => '申请版权']);

View File

@ -159,7 +159,7 @@ class OrderPayServices
}
//发起支付
$jsConfig = $this->payServices->payV2($payType, $orderInfo['order_id'], $orderInfo['pay_price'], $successAction, $body, $options);
$jsConfig = $this->payServices->pay($payType, $orderInfo['order_id'], $orderInfo['pay_price'], $successAction, $body, $options);
//发起支付后处理返回参数
$payInfo = $this->afterPay($orderInfo, $jsConfig, $payType);

View File

@ -105,7 +105,7 @@ class PayServices
* @param string $body
* @return array|string
*/
public function payV2(string $payType, string $orderId, string $price, string $successAction, string $body, array $options = [])
public function pay(string $payType, string $orderId, string $price, string $successAction, string $body, array $options = [])
{
try {
@ -139,7 +139,7 @@ class PayServices
}
/**
* 发起支付
* TODO 发起支付 弃用
* @param string $payType
* @param string $openid
* @param string $orderId
@ -148,46 +148,46 @@ class PayServices
* @param string $body
* @return array|string
*/
public function pay(string $payType, string $openid, string $orderId, string $price, string $successAction, string $body, bool $isCode = false)
{
try {
//这些全都是微信支付
if (in_array($payType, ['routine', 'weixinh5', 'weixin', 'pc', 'store'])) {
$payType = 'wechat_pay';
//判断是否使用v3
if (sys_config('pay_wechat_type') == 1) {
$payType = 'v3_wechat_pay';
}
}
if ($payType == 'alipay') {
$payType = 'ali_pay';
}
$options = [];
if (self::ALLIN_PAY === $payType) {
$options['returl'] = $this->getOption('returl');
if ($options['returl']) {
$options['returl'] = str_replace('http://', 'https://', $options['returl']);
}
$options['is_wechat'] = $this->getOption('is_wechat', false);
$options['appid'] = sys_config('routine_appId');
$payType = 'allin_pay';
}
/** @var Pay $pay */
$pay = app()->make(Pay::class, [$payType]);
return $pay->create($orderId, $price, $successAction, $body, '', ['openid' => $openid, 'isCode' => $isCode, 'pay_new_weixin_open' => (bool)sys_config('pay_new_weixin_open')] + $options);
} catch (\Exception $e) {
if (strpos($e->getMessage(), 'api unauthorized rid') !== false) {
throw new ApiException('请在微信支付配置中将小程序商户号选择改为商户号绑定');
}
throw new ApiException($e->getMessage());
}
}
// public function pay(string $payType, string $openid, string $orderId, string $price, string $successAction, string $body, bool $isCode = false)
// {
// try {
//
// //这些全都是微信支付
// if (in_array($payType, ['routine', 'weixinh5', 'weixin', 'pc', 'store'])) {
// $payType = 'wechat_pay';
// //判断是否使用v3
// if (sys_config('pay_wechat_type') == 1) {
// $payType = 'v3_wechat_pay';
// }
// }
//
// if ($payType == 'alipay') {
// $payType = 'ali_pay';
// }
//
//
// $options = [];
// if (self::ALLIN_PAY === $payType) {
// $options['returl'] = $this->getOption('returl');
// if ($options['returl']) {
// $options['returl'] = str_replace('http://', 'https://', $options['returl']);
// }
// $options['is_wechat'] = $this->getOption('is_wechat', false);
// $options['appid'] = sys_config('routine_appId');
// $payType = 'allin_pay';
// }
//
// /** @var Pay $pay */
// $pay = app()->make(Pay::class, [$payType]);
//
//
// return $pay->create($orderId, $price, $successAction, $body, '', ['openid' => $openid, 'isCode' => $isCode, 'pay_new_weixin_open' => (bool)sys_config('pay_new_weixin_open')] + $options);
//
// } catch (\Exception $e) {
// if (strpos($e->getMessage(), 'api unauthorized rid') !== false) {
// throw new ApiException('请在微信支付配置中将小程序商户号选择改为商户号绑定');
// }
// throw new ApiException($e->getMessage());
// }
// }
}

View File

@ -86,7 +86,7 @@ class RechargeServices
$openid = '';
}
$res = $this->pay->pay($recharge['recharge_type'], $openid, $recharge['order_id'], $recharge['price'], 'user_recharge', '用户充值');
$res = $this->pay->pay($recharge['recharge_type'], $recharge['order_id'], $recharge['price'], 'user_recharge', '用户充值', ['openid' => $openid]);
if ($payType == PayServices::WEIXIN_PAY) {
if (request()->isH5()) {
@ -100,7 +100,7 @@ class RechargeServices
$payStstus = 'allinpay_pay';
}
return ['jsConfig' => $res, 'order_id' => $recharge['order_id'], 'pay_type' => strtoupper($payStstus)];
return ['jsConfig' => $res, 'pay_key' => md5($recharge['order_id']), 'order_id' => $recharge['order_id'], 'pay_type' => strtoupper($payStstus)];
}
}

View File

@ -2137,6 +2137,7 @@ export default {
},
end() {
this.moveIndex = '';
this.generate(1)
},
// 单独设置会员设置
checkAllGroupChange(data) {

View File

@ -78,7 +78,6 @@
let arr = new Array(num.toString().length);
arr.fill(0);
this.indexArr = arr;
console.log(this.indexArr)
},
watch: {
num: function(val, oldVal) {
@ -99,7 +98,6 @@
this.indexArr = arr;
}
this.numChange(val);
console.log(this.indexArr)
}
},
mounted() {
@ -129,7 +127,6 @@
}
}
this.indexArr = copyIndexArr;
console.log(this.indexArr)
})
}
}

View File

@ -140,7 +140,12 @@
.sharing-packets .sharing-con .text .shareBut {
font-size: 22rpx;
color: #fff;
// #ifdef H5
margin-top: 14rpx;
// #endif
// #ifndef H5
margin-top: 26rpx;
// #endif
height: 50rpx;
line-height: 50rpx;
}

View File

@ -254,6 +254,7 @@
.flash-sale .timeLsit .item.on .state {
width: 120rpx;
height: 30rpx;
line-height: 30rpx;
border-radius: 15rpx;
background: var(--view-theme);
color: #fff;

View File

@ -469,7 +469,7 @@
this.groomList();
uni.hideLoading();
uni.showToast({
title: this.$t(`成功开启0元试用`),
title: this.$t(`成功开启试用`),
});
}
}).catch(err => {
@ -488,7 +488,7 @@
this.groomList();
uni.hideLoading();
uni.showToast({
title: this.$t(`成功开启0元试用`),
title: this.$t(`成功开启试用`),
});
}
}).catch(err => {

File diff suppressed because it is too large Load Diff

View File

@ -1363,7 +1363,6 @@
addressId: that.addressId,
formId: '',
couponId: that.couponId,
payType: that.payType,
useIntegral: that.useIntegral,
bargainId: that.BargainId,
combinationId: that.combinationId,
@ -1615,8 +1614,8 @@
.mark {
background-color: #f9f9f9;
width: 345px;
height: 70px;
// width: 345px;
min-height: 70px;
border-radius: 1px;
margin-top: 15px;
padding: 12px 14px;
@ -1627,7 +1626,7 @@
.mark-msg {
color: #333;
font-size: 32rpx;
font-size: 28rpx;
}
}
@ -1670,11 +1669,12 @@
.order-submission .wrapper .item textarea {
background-color: #f9f9f9;
width: 690rpx;
height: 140rpx;
width: 100%;
height: 135rpx;
border-radius: 3rpx;
margin-top: 30rpx;
padding: 25rpx 28rpx;
padding: 25rpx 28rpx;
font-size: 28rpx;
box-sizing: border-box;
}

View File

@ -4,7 +4,8 @@
<view class="item acea-row row-center-wrapper" :class="{ on: navOn === 1 }" @click="onNav(1)">{{$t(`未使用`)}}
</view>
<view class="item acea-row row-center-wrapper" :class="{ on: navOn === 2 }" @click="onNav(2)">
{{$t(`已使用/过期`)}}</view>
{{$t(`已使用/过期`)}}
</view>
</view>
<view class='coupon-list' v-if="couponsList.length">
<view class='item acea-row row-center-wrapper' v-for='(item,index) in couponsList' :key="index"
@ -13,7 +14,8 @@
<view class='money' :class='item._type == 0 ? "moneyGray" : ""'>
<view>{{$t(`¥`)}}<text class='num'>{{item.coupon_price}}</text></view>
<view class="pic-num" v-if="item.use_min_price > 0">
{{$t(`满`)}}{{item.use_min_price}}{{$t(`元可用`)}}</view>
{{$t(`满`)}}{{item.use_min_price}}{{$t(`元可用`)}}
</view>
<view class="pic-num" v-else>{{$t(`无门槛券`)}}</view>
</view>
</view>
@ -122,6 +124,7 @@
this.getUseCoupons();
},
useCoupon(item) {
if (this.navOn == 2) return
let url = '';
if (item.category_id == 0 && item.product_id == '') {
url = '/pages/goods/goods_list/index?title=默认'
@ -204,7 +207,7 @@
.coupon-list .item .text .condition .name {
font-size: 24rpx;
font-weight: 500;
font-weight: 500;
line-height: 28rpx;
/* display: flex;
align-items: center; */
@ -218,6 +221,7 @@
display: inline-block;
vertical-align: middle;
}
.condition .line-title {
/* width: 70rpx; */
height: 36rpx !important;

File diff suppressed because it is too large Load Diff

View File

@ -7,8 +7,8 @@
<view>
<view class="user-msg">
<image class="avatar" :src="userInfo.avatar" mode=""></image>
<view class="nickname">{{userInfo.nickname}}</view>
<view v-if="userInfo.is_agent_level" class="level" @click="jumbPath">
<view class="nickname line1">{{userInfo.nickname}}</view>
<view v-if="userInfo.is_agent_level" class="level line1" @click="jumbPath">
<text>{{userInfo.agent_level_name?$t(userInfo.agent_level_name):$t(`分销等级`)}}</text>
<text v-if="userInfo.is_agent_level" class='iconfont icon-xiangyou'></text>
</view>
@ -270,7 +270,8 @@
.nickname {
font-size: 32rpx;
margin: 10rpx 0;
margin: 10rpx 0;
max-width: 8rem;
}
.level {
@ -281,7 +282,7 @@
transform: scale(0.9);
display: flex;
align-items: center;
max-width: 10rem;
.icon-xiangyou {
transform: scale(0.7);
font-size: 28rpx;