diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/auth/MemberAuthServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/auth/MemberAuthServiceImpl.java index 2bfe917b5..1e8827f19 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/auth/MemberAuthServiceImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/auth/MemberAuthServiceImpl.java @@ -97,12 +97,7 @@ public class MemberAuthServiceImpl implements MemberAuthService { smsCodeApi.useSmsCode(AuthConvert.INSTANCE.convert(reqVO, SmsSceneEnum.MEMBER_LOGIN.getScene(), userIp)); // 获得获得注册用户 - // 校验账号是否存在 - MemberUserDO user = userService.getUserByMobile(reqVO.getMobile()); - if (user == null) { - createLoginLog(null, reqVO.getMobile(), LoginLogTypeEnum.LOGIN_SMS, LoginResultEnum.BAD_CREDENTIALS); - throw exception(AUTH_LOGIN_BAD_CREDENTIALS); - } + MemberUserDO user = userService.createUserIfAbsent(reqVO.getMobile(),reqVO.getMobile(), userIp,reqVO.getPromoterId()); // 校验是否禁用 if (ObjectUtil.notEqual(user.getStatus(), CommonStatusEnum.ENABLE.getStatus())) { createLoginLog(user.getId(), reqVO.getMobile(), LoginLogTypeEnum.LOGIN_SMS, LoginResultEnum.USER_DISABLED); diff --git a/yudao-ui-app/components/aliPayLinkCopy/index.vue b/yudao-ui-app/components/aliPayLinkCopy/index.vue new file mode 100644 index 000000000..70a32de4a --- /dev/null +++ b/yudao-ui-app/components/aliPayLinkCopy/index.vue @@ -0,0 +1,50 @@ + + + + + diff --git a/yudao-ui-app/libs/pay.js b/yudao-ui-app/libs/pay.js index a6635551f..1f09568a4 100644 --- a/yudao-ui-app/libs/pay.js +++ b/yudao-ui-app/libs/pay.js @@ -7,6 +7,11 @@ const payTypes = ['WXPAY', 'ALIPAY'] * @param payInfo // 支付下单信息 * @param payType // 支付类型 * @param createOrderFun // 预下单方法 + * @param payResultHandle // 支付参数返回处理方法,不同的业务逻辑下单后返回的支付参数字段可能不一样,需要处理成统一格式 + * { + jsapiResult: '', 微信jsapi支付参数 + body: '', 支付宝支付参数 + } * @param wxPaySuccess // 微信支付下单支付成功回调 * @param aliPaySuccess // 支付宝支付下单成功回调 */ @@ -15,6 +20,7 @@ const unityPay = (options) => { payInfo: {}, payType: '', createOrderFun: () => {}, + payResultHandle: (res) => res, wxPaySuccess: () => {}, aliPaySuccess: () => {} } @@ -35,6 +41,11 @@ const unityPay = (options) => { }) } _options.payInfo.openid = openId + if (_options.payType === 'WXPAY') { + _options.payInfo.payChannel = '微信支付' + } else if (_options.payType === 'ALIPAY') { + _options.payInfo.payChannel = '支付宝' + } uni.showLoading({ title: '支付中', mask: true @@ -43,7 +54,7 @@ const unityPay = (options) => { ..._options.payInfo, payType: _options.payType }).then(res => { - const payConfig = res.data + const payConfig = _options.payResultHandle(res.data) switch (_options.payType) { // 微信JSAPI支付 case 'WXPAY': diff --git a/yudao-ui-app/pages/goods_cashier/index.vue b/yudao-ui-app/pages/goods_cashier/index.vue index fd0d3fac3..23f6d671c 100644 --- a/yudao-ui-app/pages/goods_cashier/index.vue +++ b/yudao-ui-app/pages/goods_cashier/index.vue @@ -17,7 +17,7 @@ 请选择支付方式 + v-show='item.payStatus' @click="payType(item.value, index)"> @@ -32,7 +32,7 @@ - 确认支付 + 确认支付 暂不支付 @@ -52,51 +52,54 @@ - + +