Commit 4bf12b59 authored by 郭志伟's avatar 郭志伟

Merge branch 'master' of http://git.quantgroup.cn/ui/cauchy-ui

parents 8b5fefcd e005f939
...@@ -1133,9 +1133,9 @@ ...@@ -1133,9 +1133,9 @@
"integrity": "sha512-VZMYa7+fXHdwIq1TDhSXoVmSPEGM/aa+6Aiq3nVVJ9bXr24zScr+NlKFKC3iPljA7ho/GAZr+d2jOf5GIRC30Q==" "integrity": "sha512-VZMYa7+fXHdwIq1TDhSXoVmSPEGM/aa+6Aiq3nVVJ9bXr24zScr+NlKFKC3iPljA7ho/GAZr+d2jOf5GIRC30Q=="
}, },
"@qg/cherry-ui": { "@qg/cherry-ui": {
"version": "2.21.3", "version": "2.21.7",
"resolved": "http://npmprivate.quantgroups.com/@qg%2fcherry-ui/-/cherry-ui-2.21.3.tgz", "resolved": "http://npmprivate.quantgroups.com/@qg%2fcherry-ui/-/cherry-ui-2.21.7.tgz",
"integrity": "sha512-Ft46F+cT/eGD8q3Uc0DgaP2eQlEivEezIEIZlm4usKGLzh7yt11YHvc7FDBJbZcwgX1pQRZI0JTspBgtO1EMag==", "integrity": "sha512-kFt8N5aQpTeAKNRldxIJyDIVJ8PSKawv+vLHTJhlZRJfW1d7UepkXdnA0sZwXJsSE/ID6DyUhUessIoKS0a6xA==",
"requires": { "requires": {
"@popperjs/core": "^2.5.4", "@popperjs/core": "^2.5.4",
"vue-lazyload": "^1.3.3", "vue-lazyload": "^1.3.3",
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
}, },
"dependencies": { "dependencies": {
"@better-scroll/core": "^2.0.0-beta.6", "@better-scroll/core": "^2.0.0-beta.6",
"@qg/cherry-ui": "^2.21.3", "@qg/cherry-ui": "^2.21.7",
"@qg/js-bridge": "^1.1.9", "@qg/js-bridge": "^1.1.9",
"@qg/qg-scroll": "^1.4.2", "@qg/qg-scroll": "^1.4.2",
"@qg/ui-request": "0.0.20", "@qg/ui-request": "0.0.20",
......
...@@ -53,7 +53,7 @@ export default { ...@@ -53,7 +53,7 @@ export default {
}; };
</script> </script>
<style lang="less"> <style lang="less">
@import './style/var.less'; @import './style/index.less';
.app { .app {
user-select: none; user-select: none;
height: 100%; height: 100%;
......
...@@ -67,6 +67,10 @@ const kaGetNextUrl = function() { ...@@ -67,6 +67,10 @@ const kaGetNextUrl = function() {
return request.get(`${talosHost}/api/kdsp/ka/process/get-next-url`); return request.get(`${talosHost}/api/kdsp/ka/process/get-next-url`);
}; };
const reissueContract = function(params) {
return request.post(`${talosHost}/open/checkout/payReissueContract`, params);
};
export { export {
pay, pay,
prepay, prepay,
...@@ -78,5 +82,6 @@ export { ...@@ -78,5 +82,6 @@ export {
queryPayInfo, queryPayInfo,
getGoodsList, getGoodsList,
kaGetNextUrl, kaGetNextUrl,
queryPayStatus queryPayStatus,
reissueContract
}; };
...@@ -12,7 +12,7 @@ const localStorageParams = [ ...@@ -12,7 +12,7 @@ const localStorageParams = [
'sonVccChannel', 'sonVccChannel',
'formXcxPage' 'formXcxPage'
]; ];
const cookiesParams = ['h', 'returnUrl']; const cookiesParams = ['h', 'returnUrl', 'source'];
const sessionStorageParams = []; const sessionStorageParams = [];
export default { export default {
......
...@@ -88,4 +88,4 @@ ...@@ -88,4 +88,4 @@
@ios-bottom-height: 60px; @ios-bottom-height: 60px;
// 页面顶部header高度 // 页面顶部header高度
@nav-bar-height: 48px; @nav-bar-height: 48px;
\ No newline at end of file
...@@ -75,12 +75,6 @@ export default { ...@@ -75,12 +75,6 @@ export default {
setTimeout(() => { setTimeout(() => {
this.inputBlur = false; this.inputBlur = false;
}, 500); }, 500);
if (this.phoneNo && !checkPhoneFormat(this.phoneNo)) {
this.$toast.fail('请您输入正确的手机号');
this.input();
return;
}
!this.phoneHome && this.queryhome(); !this.phoneHome && this.queryhome();
this.input(); this.input();
}, },
...@@ -111,6 +105,10 @@ export default { ...@@ -111,6 +105,10 @@ export default {
position: relative; position: relative;
z-index: 9; z-index: 9;
border-bottom: @border-width-base solid @gray-2; border-bottom: @border-width-base solid @gray-2;
font-size: 24px;
input::placeholder {
font-size: 20px;
}
.cr-field:not(:last-child)::after { .cr-field:not(:last-child)::after {
display: none; display: none;
} }
......
...@@ -34,7 +34,8 @@ export default { ...@@ -34,7 +34,8 @@ export default {
rechargeType: 'recharge', rechargeType: 'recharge',
tabItemStyle: { tabItemStyle: {
width: '75px', width: '75px',
flex: 'none' flex: 'none',
fontWeight: 'bold'
}, },
selectedRechargeInfo: {}, selectedRechargeInfo: {},
rechargeList: { rechargeList: {
...@@ -77,5 +78,10 @@ export default { ...@@ -77,5 +78,10 @@ export default {
height: 282px; height: 282px;
margin-top: @padding-xs; margin-top: @padding-xs;
margin-bottom: @padding-xs; margin-bottom: @padding-xs;
.cr-tabs__item--active {
.cr-tabs__text {
font-weight: bold;
}
}
} }
</style> </style>
...@@ -8,7 +8,9 @@ ...@@ -8,7 +8,9 @@
> >
充值订单 充值订单
</a> </a>
<a href="" class="top-link-title" @click="goOrderListTrack('联系客服', 'cs')">联系客服</a> <a href="javascript:;" class="top-link-title" @click="goOrderListTrack('联系客服', 'cs')"
>联系客服</a
>
</div> </div>
<div class="top-tabs"> <div class="top-tabs">
<p class="top-tabs-title">娱乐生活</p> <p class="top-tabs-title">娱乐生活</p>
...@@ -88,8 +90,9 @@ export default { ...@@ -88,8 +90,9 @@ export default {
padding: 10px; padding: 10px;
background-size: 100%; background-size: 100%;
box-sizing: border-box; box-sizing: border-box;
background-repeat: no-repeat;
background: url('~@/assets/images/ellipse.png'); background: url('~@/assets/images/ellipse.png');
background-size: 100%;
background-repeat: no-repeat;
.recharge { .recharge {
width: 55px; width: 55px;
...@@ -105,11 +108,24 @@ export default { ...@@ -105,11 +108,24 @@ export default {
text-align: right; text-align: right;
&-title { &-title {
.text-14(); .text-14();
width: 64px; display: inline-block;
color: @white; color: @white;
box-sizing: border-box;
padding: 0 @padding-xs; padding: 0 @padding-xs;
text-align: center;
&-first { &-first {
border-right: 1px solid @white; position: relative;
}
&-first::after {
position: absolute;
content: '';
display: inline-block;
right: 0;
width: 1px;
height: 10px;
background: @white;
top: 50%;
transform: translateY(-50%);
} }
} }
} }
......
...@@ -21,6 +21,9 @@ ...@@ -21,6 +21,9 @@
z-index: 9; z-index: 9;
.button{ .button{
.text-16(); .text-16();
span{
font-weight: bold;
}
} }
} }
} }
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
:disabled="!disabled" :disabled="!disabled"
@click="goOrder" @click="goOrder"
> >
{{ selectedRechargeInfo.salePrice ? `¥${selectedRechargeInfo.salePrice}` : '' }}立即充值 {{ selectedRechargeInfo.price ? `¥${selectedRechargeInfo.price}` : '' }} 立即充值
</cr-button> </cr-button>
</div> </div>
</div> </div>
...@@ -33,7 +33,7 @@ import RechargeTop from './components/RechargeTop.vue'; ...@@ -33,7 +33,7 @@ import RechargeTop from './components/RechargeTop.vue';
import RechargeList from './components/RechargeList.vue'; import RechargeList from './components/RechargeList.vue';
import RechargeInput from './components/RechargeInput.vue'; import RechargeInput from './components/RechargeInput.vue';
import localStorage from '@/service/localStorage.service'; import localStorage from '@/service/localStorage.service';
import { throttle } from '@/service/utils.service'; import { throttle, checkPhoneFormat } from '@/service/utils.service';
const { getSpuList } = api; const { getSpuList } = api;
export default { export default {
components: { components: {
...@@ -54,7 +54,11 @@ export default { ...@@ -54,7 +54,11 @@ export default {
}, },
computed: { computed: {
disabled: function() { disabled: function() {
return this.rechargePhoneInfo.phoneNo && this.selectedRechargeInfo.salePrice; return (
this.rechargePhoneInfo.phoneNo &&
checkPhoneFormat(this.rechargePhoneInfo.phoneNo) &&
this.selectedRechargeInfo.salePrice
);
} }
}, },
created() { created() {
...@@ -77,13 +81,13 @@ export default { ...@@ -77,13 +81,13 @@ export default {
this.selectedRechargeInfo = rechargeInfo; this.selectedRechargeInfo = rechargeInfo;
}, },
async goOrderApi() { async goOrderApi() {
const { skuNo, salePrice } = this.selectedRechargeInfo; const { skuNo, price } = this.selectedRechargeInfo;
this.$track.registeredEvents('h5_RechargeCenterPagePhoneBillClick', { this.$track.registeredEvents('h5_RechargeCenterPagePhoneBillClick', {
recharge_type: this.phoneRecharge[`${this.rechargeType}Type`] === 601 ? '快充' : '慢充', recharge_type: this.phoneRecharge[`${this.rechargeType}Type`] === 601 ? '快充' : '慢充',
cost_value: salePrice cost_value: price
}); });
const [res, error] = await orderApi.orderCreate({ const [res, error] = await orderApi.orderCreate({
totalFee: salePrice, totalFee: price,
terminal: 'H5', terminal: 'H5',
account: this.rechargePhoneInfo?.phoneNo, account: this.rechargePhoneInfo?.phoneNo,
registrationLocation: this.rechargePhoneInfo?.phoneNoHome, registrationLocation: this.rechargePhoneInfo?.phoneNoHome,
......
...@@ -114,6 +114,15 @@ function isDetentionFn() { ...@@ -114,6 +114,15 @@ function isDetentionFn() {
}); });
} }
} }
function havePayingOrder() {
/* 有享花卡未支付的订单 */
this.$dialog({
message: '您的享花卡额度被其他订单占用,暂时不可使用享花卡支付哦!',
confirmButtonText: '重新选择',
showCancelButton: false,
confirmButtonColor: '#EC1500'
});
}
function filterAllPayList(type, data) { function filterAllPayList(type, data) {
for (let item in data.payList) { for (let item in data.payList) {
if (data.payList[item].payType === type) { if (data.payList[item].payType === type) {
...@@ -140,6 +149,7 @@ export { ...@@ -140,6 +149,7 @@ export {
IS_GROUP_PAY, IS_GROUP_PAY,
IS_CREDIT_PAY, IS_CREDIT_PAY,
isDetentionFn, isDetentionFn,
havePayingOrder,
filterAllPayList, filterAllPayList,
ACCOUNT_NO_APPLY, ACCOUNT_NO_APPLY,
PAYMENT_CODE_PAY, PAYMENT_CODE_PAY,
......
<template> <template>
<div class="pay-type-list"> <div class="pay-type-list">
<p class="type-title b-b">{{ value.title }}</p> <p class="type-title">{{ value.title }}</p>
<payGroupItem <payGroupItem
v-if="value.isGroupPay" v-if="value.isGroupPay"
v-model="payList" v-model="payList"
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
:disabled="disabled" :disabled="disabled"
:coupon-info="couponInfo" :coupon-info="couponInfo"
:show-coupon="showCoupon" :show-coupon="showCoupon"
:risk-limit="riskLimit"
:coupon-disabled="showCoupon && !payCouponCouldBeUsed" :coupon-disabled="showCoupon && !payCouponCouldBeUsed"
/> />
<template v-else> <template v-else>
...@@ -21,7 +20,6 @@ ...@@ -21,7 +20,6 @@
:disabled="disabled" :disabled="disabled"
:coupon-info="couponInfo" :coupon-info="couponInfo"
:show-coupon="showCoupon" :show-coupon="showCoupon"
:risk-limit="riskLimit"
:coupon-disabled="showCoupon && !payCouponCouldBeUsed" :coupon-disabled="showCoupon && !payCouponCouldBeUsed"
/> />
</template> </template>
...@@ -71,6 +69,7 @@ export default { ...@@ -71,6 +69,7 @@ export default {
.type-title { .type-title {
height: 48px; height: 48px;
.text-16; .text-16;
font-weight: bold;
padding-left: @padding-md; padding-left: @padding-md;
position: relative; position: relative;
line-height: 48px; line-height: 48px;
......
<template> <template>
<div class="payCardItem"> <div class="payCardItem">
<div :class="['type-item', { 'b-t': !isGroupPay }]" @click="changePayType(value)"> <div
:class="['type-item', { 'b-t': !isGroupPay || value.payType === 1 }]"
@click="changePayType(value)"
>
<div class="type-item-content"> <div class="type-item-content">
<div class="type-item-content-info"> <div class="type-item-content-info">
<cr-image :src="value.icon" class="icon" mode="aspectFit" width="39" height="39" /> <cr-image :src="value.icon" class="icon" mode="aspectFit" width="39" height="39" />
...@@ -17,20 +20,20 @@ ...@@ -17,20 +20,20 @@
<p>{{ value.accountStatusDesc }}</p> <p>{{ value.accountStatusDesc }}</p>
</div> </div>
</div> </div>
<div <div v-if="showCoupon && value.payType === 1" class="coupon">
v-if="showCoupon && value.payType === 1" <p class="couponDes" :class="{ disable: couponDisabled }" @click.stop="openCouponModal">
class="couponDes" <span v-if="couponInfo.pickupId">
:class="{ disable: couponDisabled }" {{ `满${couponInfo.limitAmount}减${couponInfo.faceValue}元` }}
@click.stop="openCouponModal" </span>
> <span v-else>
<span v-if="couponInfo.pickupId"> 未选择优惠券
{{ `满${couponInfo.limitAmount}减${couponInfo.faceValue}元` }} </span>
</span> <cr-icon type="arrow" class="selectArrow" size="15px" />
<span v-else> </p>
未选择优惠券
</span>
<cr-icon type="arrow" class="selectArrow" size="15px" />
</div> </div>
<p v-if="value.riskLimitDesc" class="limitDes">
{{ value.riskLimitDesc }}
</p>
</div> </div>
<cr-checkbox <cr-checkbox
v-if="!isGroupPay" v-if="!isGroupPay"
...@@ -42,18 +45,9 @@ ...@@ -42,18 +45,9 @@
@click.native="changePayType(value)" @click.native="changePayType(value)"
/> />
</div> </div>
<p v-if="riskLimit && value.riskManagementDesc && !disabled" class="limitDes">
{{ value.riskManagementDesc }}
</p>
</div> </div>
</template> </template>
<script> <script>
// import { registeredEvents } from '@/utils/sa';
// const payTypeE = [
// 'PD_YXMMAEC_UserClickCashierSelectXiangHuaCardPay',
// 'PD_YXMMAEC_UserClickCashierSelectWechatPay'
// ];
// const payTypeMiniAppE = ['c_cashierselectxianghuacardpay', 'c_cashierselectwechatpay'];
export default { export default {
name: 'PayCardItem', name: 'PayCardItem',
inject: ['payCard', 'pay'], inject: ['payCard', 'pay'],
...@@ -90,8 +84,13 @@ export default { ...@@ -90,8 +84,13 @@ export default {
width: 100%; width: 100%;
padding-bottom: 2px; padding-bottom: 2px;
} }
.coupon {
margin-top: 4px;
height: 20px;
padding-left: 51px;
display: flex;
}
.couponDes { .couponDes {
margin-left: 50px;
display: inline-block; display: inline-block;
color: @text-color-red; color: @text-color-red;
.text-12; .text-12;
...@@ -113,9 +112,9 @@ export default { ...@@ -113,9 +112,9 @@ export default {
.limitDes { .limitDes {
color: #ed6a0c; color: #ed6a0c;
background: #fffbe8; background: #fffbe8;
.text-12; .text-11;
padding: 10px 8px; padding: 4px 8px;
margin: 8px; margin: 8px 8px 8px 4px;
border-radius: 3px; border-radius: 3px;
} }
.type-item { .type-item {
...@@ -184,5 +183,6 @@ export default { ...@@ -184,5 +183,6 @@ export default {
} }
.selectArrow { .selectArrow {
vertical-align: text-top; vertical-align: text-top;
margin-left: -2px;
} }
</style> </style>
...@@ -13,6 +13,12 @@ ...@@ -13,6 +13,12 @@
</div> </div>
<div class="dashed"> <div class="dashed">
<p class="dashed-line" /> <p class="dashed-line" />
<cr-image
src="../../../assets//images/addicon.png"
width="24px"
height="24px"
class="dashed-icon"
/>
<cr-checkbox <cr-checkbox
v-model="thirdPayInfo.isCheck" v-model="thirdPayInfo.isCheck"
shape="round" shape="round"
...@@ -42,7 +48,6 @@ ...@@ -42,7 +48,6 @@
</div> </div>
</template> </template>
<script> <script>
// import { registeredEvents } from '@/utils/sa';
import PayCardItem from './PayCardItem.vue'; import PayCardItem from './PayCardItem.vue';
export default { export default {
name: 'PayGroupCard', name: 'PayGroupCard',
...@@ -128,6 +133,7 @@ export default { ...@@ -128,6 +133,7 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
position: relative;
&-line { &-line {
width: 310px; width: 310px;
border-bottom: 1px dashed #dcdcdc; border-bottom: 1px dashed #dcdcdc;
...@@ -135,6 +141,11 @@ export default { ...@@ -135,6 +141,11 @@ export default {
&-checkbox { &-checkbox {
width: 18px; width: 18px;
} }
&-icon {
position: absolute;
left: 50%;
transform: translateX(-50%);
}
} }
.more-title { .more-title {
......
...@@ -7,13 +7,13 @@ ...@@ -7,13 +7,13 @@
<p class="sms-des">为保证您账户安全,此笔交易需要短信验证</p> <p class="sms-des">为保证您账户安全,此笔交易需要短信验证</p>
<p class="phone">已发送至 {{ getPhone() }}</p> <p class="phone">已发送至 {{ getPhone() }}</p>
<cr-authcode-field <cr-authcode-field
span-size="20px" span-size="24px"
type="number" type="number"
border-type="bottom" border-type="bottom"
:number="6" :number="6"
height="40px" height="40px"
span-color="#000" span-color="#666"
input-color="#000" input-color="#666"
input-size="20px" input-size="20px"
class="sms-input" class="sms-input"
:success="success" :success="success"
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
</template> </template>
<script> <script>
// import { registeredEvents } from '@/utils/sa';
import localStorage from '@/service/localStorage.service'; import localStorage from '@/service/localStorage.service';
import { sendSms as sendSmsApi } from '@/api/pay.api'; import { sendSms as sendSmsApi } from '@/api/pay.api';
export default { export default {
...@@ -69,12 +68,9 @@ export default { ...@@ -69,12 +68,9 @@ export default {
success(smsCode) { success(smsCode) {
this.$emit('submit', smsCode); this.$emit('submit', smsCode);
}, },
async sendSms(val) { async sendSms() {
// 页面摧毁清掉定时器 // 页面摧毁清掉定时器
if (this.send) return; if (this.send) return;
if (!val) {
// registeredEvents('PD_YXMMACP_UserClickResendCaptcha');
}
const [, error] = await sendSmsApi({ orderNo: this.orderNo, flowOrderNo: this.flowOrderNo }); const [, error] = await sendSmsApi({ orderNo: this.orderNo, flowOrderNo: this.flowOrderNo });
if (!error) { if (!error) {
this.send = true; this.send = true;
...@@ -91,12 +87,6 @@ export default { ...@@ -91,12 +87,6 @@ export default {
const phoneS = `${phone}`.replace(/(\d{3})\d*(\d{4})/, '+86 $1 **** $2'); const phoneS = `${phone}`.replace(/(\d{3})\d*(\d{4})/, '+86 $1 **** $2');
return phoneS; return phoneS;
}, },
sendSa() {
// if (!this.numberArr.length && !this.isDel) {
// registeredEvents('PD_YXMMACP_UserClickAgainVerificationCodeInputbox');
// wx.reportAnalytics('c_againverificationcodeinputbox', {});
// }
},
clearTimer() { clearTimer() {
clearInterval(this.timer); clearInterval(this.timer);
this.send = false; this.send = false;
...@@ -113,7 +103,7 @@ export default { ...@@ -113,7 +103,7 @@ export default {
left: 50%; left: 50%;
top: 26%; top: 26%;
margin-left: -150px; margin-left: -150px;
padding: 12px 12px 24px; padding: 12px 18px 24px;
width: 300px; width: 300px;
border-radius: 16px; border-radius: 16px;
background: #fff; background: #fff;
...@@ -129,9 +119,10 @@ export default { ...@@ -129,9 +119,10 @@ export default {
text-align: center; text-align: center;
width: 100%; width: 100%;
font-size: 16px; font-size: 16px;
font-weight: bold;
} }
&-des { &-des {
padding: 17px 0 0 8px; padding: 18px 0 0 8px;
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
font-size: 12px; font-size: 12px;
......
...@@ -10,11 +10,13 @@ export const goUrlExtends = { ...@@ -10,11 +10,13 @@ export const goUrlExtends = {
}); });
} }
const returnUrl = this.getReturnUrl(); const returnUrl = this.getReturnUrl();
if (returnUrl) { setTimeout(() => {
window.location.replace(`${returnUrl}`); if (returnUrl) {
return; window.location.replace(`${returnUrl}`);
} return;
this.$router.replace({ name: 'home' }); }
this.$router.replace({ name: 'home' });
}, 500);
}, },
goOrderList(payStatus) { goOrderList(payStatus) {
if (payStatus) { if (payStatus) {
...@@ -24,11 +26,13 @@ export const goUrlExtends = { ...@@ -24,11 +26,13 @@ export const goUrlExtends = {
}); });
} }
const returnUrl = this.getReturnUrl(); const returnUrl = this.getReturnUrl();
if (returnUrl) { setTimeout(() => {
window.location.replace(`${returnUrl}/orderList`); if (returnUrl) {
return; window.location.replace(`${returnUrl}/orderList`);
} return;
this.$router.replace({ name: 'orderList' }); }
this.$router.replace({ name: 'orderList' });
}, 500);
}, },
goOrderDetail() { goOrderDetail() {
const returnUrl = this.getReturnUrl(); const returnUrl = this.getReturnUrl();
......
@import url('../../style/mixins');
.pay { .pay {
// width: 100%;
padding: @padding-xs; padding: @padding-xs;
} }
.price-box { .price-box {
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
.price{ .price{
.text-30; .text-30;
color: @font-color-red; color: @font-color-red;
font-weight: bold;
margin-top: @padding-xs; margin-top: @padding-xs;
&:before{ &:before{
content: '¥'; content: '¥';
...@@ -38,11 +39,16 @@ ...@@ -38,11 +39,16 @@
bottom: 0; bottom: 0;
left:0; left:0;
background-color:@white; background-color:@white;
.iphonex-fix-margin;
button{ button{
.text-16;
width: 100%; width: 100%;
color: @white; color: @white;
font-size: @line-height-sm; font-size: @line-height-sm;
border-radius: @border-radius-lx; border-radius: @border-radius-lx;
span{
font-weight: bold;
}
} }
button[disabled] { button[disabled] {
color: rgba(255,255,255,.6); color: rgba(255,255,255,.6);
......
...@@ -20,7 +20,9 @@ ...@@ -20,7 +20,9 @@
:show-coupon="showCoupon" :show-coupon="showCoupon"
:coupon-info="selectedCoupon" :coupon-info="selectedCoupon"
:has-pwd="creditPayInfo.hasPwd" :has-pwd="creditPayInfo.hasPwd"
:pay-coupon-could-be-used="displayInfo.payCouponInfo.payCouponCouldBeUsed" :pay-coupon-could-be-used="
displayInfo.payCouponInfo && displayInfo.payCouponInfo.payCouponCouldBeUsed
"
@changePayType="changePayType" @changePayType="changePayType"
/> />
...@@ -30,11 +32,12 @@ ...@@ -30,11 +32,12 @@
v-model="thirdPayList" v-model="thirdPayList"
:pay-type="payType" :pay-type="payType"
:disabled="overtime" :disabled="overtime"
:risk-limit="riskLimit"
:show-coupon="showCoupon" :show-coupon="showCoupon"
:coupon-info="selectedCoupon" :coupon-info="selectedCoupon"
:has-pwd="creditPayInfo.hasPwd" :has-pwd="creditPayInfo.hasPwd"
:pay-coupon-could-be-used="displayInfo.payCouponInfo.payCouponCouldBeUsed" :pay-coupon-could-be-used="
displayInfo && displayInfo.payCouponInfo && displayInfo.payCouponInfo.payCouponCouldBeUsed
"
@changePayType="changePayType" @changePayType="changePayType"
/> />
...@@ -99,7 +102,6 @@ import localStorage from '@/service/localStorage.service'; ...@@ -99,7 +102,6 @@ import localStorage from '@/service/localStorage.service';
import { throttle } from '@/service/utils.service'; import { throttle } from '@/service/utils.service';
import { goUrlExtends } from './extends'; import { goUrlExtends } from './extends';
import cookies from '@/service/cookieStorage.service'; import cookies from '@/service/cookieStorage.service';
import { getTokenFromNative } from '@/service/utils.service';
import { import {
codeArr, codeArr,
payTypeE, payTypeE,
...@@ -110,6 +112,7 @@ import { ...@@ -110,6 +112,7 @@ import {
IS_GROUP_PAY, IS_GROUP_PAY,
IS_CREDIT_PAY, IS_CREDIT_PAY,
isDetentionFn, isDetentionFn,
havePayingOrder,
filterAllPayList, filterAllPayList,
PAYMENT_CODE_PAY, // 支付密码 PAYMENT_CODE_PAY, // 支付密码
ACCOUNT_APPLY_FAIL, ACCOUNT_APPLY_FAIL,
...@@ -125,7 +128,8 @@ import { ...@@ -125,7 +128,8 @@ import {
h5AppyUrl, h5AppyUrl,
ocrFaceId, ocrFaceId,
queryPayInfo, queryPayInfo,
kaGetNextUrl kaGetNextUrl,
reissueContract
} from '@/api/pay.api.js'; } from '@/api/pay.api.js';
const VCC_CHANNEL = localStorage.get('vccChannel'); const VCC_CHANNEL = localStorage.get('vccChannel');
let Current_Url = null; let Current_Url = null;
...@@ -232,13 +236,16 @@ export default { ...@@ -232,13 +236,16 @@ export default {
methods: { methods: {
/* 查询支付信息 */ /* 查询支付信息 */
async queryPayInfo() { async queryPayInfo() {
const [data, error] = await queryPayInfo({ orderNo: this.orderNo }); const [data, error] = await queryPayInfo({
orderNo: this.orderNo,
isUsedMergePayMethod: cookies.get('source') !== 'tob'
});
if (error && codeArr.indexOf(error?.response?.businessCode) < 0) { if (error && codeArr.indexOf(error?.response?.businessCode) < 0) {
this.payResult('Fail'); this.payResult('Fail');
return; return;
} }
this.isReady = true; this.isReady = true;
const { displayInfo = {}, payMethods } = data || {}; const { displayInfo = {}, payMethods, creditQuotaInfo } = data || {};
this.overtime = displayInfo.periodSeconds <= 0; this.overtime = displayInfo.periodSeconds <= 0;
this.success = true; this.success = true;
if (this.overtime) { if (this.overtime) {
...@@ -318,6 +325,9 @@ export default { ...@@ -318,6 +325,9 @@ export default {
this.isShowProtocol && (this.isCheckAgreement = true); this.isShowProtocol && (this.isCheckAgreement = true);
this.setAmount(); this.setAmount();
} }
if (creditQuotaInfo?.isFreezeCreditInOtherOrder && !this.payInfo?.payType) {
havePayingOrder.call(this);
}
}, },
isRiskLimit() { isRiskLimit() {
const { accountStatus, riskManagementAmt } = this.creditPayInfo; const { accountStatus, riskManagementAmt } = this.creditPayInfo;
...@@ -392,6 +402,13 @@ export default { ...@@ -392,6 +402,13 @@ export default {
vcc_state: !IS_THIRD_PAY(this.payType) ? this.creditPayInfo?.accountStatus : '', vcc_state: !IS_THIRD_PAY(this.payType) ? this.creditPayInfo?.accountStatus : '',
buttons_name: this.accountS.text buttons_name: this.accountS.text
}); });
if (this.isShowProtocol) {
if (!this.isCheckAgreement) {
this.$toast('请仔细阅读并同意相关协议');
return;
}
this.reissueContract();
}
this.accountS.fn(); this.accountS.fn();
}, 1000), }, 1000),
/* 预支付 */ /* 预支付 */
...@@ -402,10 +419,6 @@ export default { ...@@ -402,10 +419,6 @@ export default {
return; return;
} }
this.error = ''; this.error = '';
if (this.isShowProtocol && !this.isCheckAgreement) {
this.$toast('请仔细阅读并同意相关协议');
return;
}
this.setAmount(); this.setAmount();
if (!params && !this.isDetention && IS_THIRD_PAY(this.payType) && !isOcr) { if (!params && !this.isDetention && IS_THIRD_PAY(this.payType) && !isOcr) {
this.isDetention = true; this.isDetention = true;
...@@ -448,12 +461,7 @@ export default { ...@@ -448,12 +461,7 @@ export default {
if (error) { if (error) {
if (error?.response?.businessCode === '3001') { if (error?.response?.businessCode === '3001') {
/* 有享花卡未支付的订单 */ /* 有享花卡未支付的订单 */
this.$dialog({ havePayingOrder.call(this);
message: '您的享花卡额度被其他订单占用,暂时不可使用享花卡支付哦!',
confirmButtonText: '重新选择',
showCancelButton: false,
confirmButtonColor: '#EC1500'
});
return; return;
} }
if (codeArr.indexOf(error?.response?.businessCode) < 0) { if (codeArr.indexOf(error?.response?.businessCode) < 0) {
...@@ -607,6 +615,11 @@ export default { ...@@ -607,6 +615,11 @@ export default {
? this.selectedCoupon?.faceValue || '0.00' ? this.selectedCoupon?.faceValue || '0.00'
: '0.00'; : '0.00';
cookies.set('amount', { finalAmt, freeAmount }); cookies.set('amount', { finalAmt, freeAmount });
},
async reissueContract() {
await reissueContract({
templateIdList: this.payContractInfo.contractInfos.map(item => item.contractId)
});
} }
} }
}; };
......
...@@ -3,8 +3,10 @@ ...@@ -3,8 +3,10 @@
<cr-field <cr-field
v-model="accountMask" v-model="accountMask"
:placeholder="`请输入${info.name || ''}账号`" :placeholder="`请输入${info.name || ''}账号`"
:max-length="maxLength"
clearable clearable
class="Vl__account__field"
:type="info.type === 101 ? 'text' : 'number'"
@input="checkPhone"
> >
<template #button> <template #button>
<cr-image <cr-image
...@@ -16,23 +18,11 @@ ...@@ -16,23 +18,11 @@
/> />
</template> </template>
</cr-field> </cr-field>
<!-- <div class="Vl__list" :class="{ show: !inputBlur }">
<div
v-for="(item, index) in list"
:key="index"
class="Vl__list-item"
@click="handleSelectPhone(item)"
>
<span class="phone">{{ phoneFormat(item.phone) }}</span>
<span class="phone-home">{{ item.home }}</span>
<span v-if="index === 0" class="current">上次充值</span>
</div>
</div> -->
</div> </div>
</template> </template>
<script> <script>
import rechargeApi from '@/api/recharge.api'; import rechargeApi from '@/api/recharge.api';
import { phoneFormat } from '@/service/utils.service'; import { phoneFormat, phoneTrim } from '@/service/utils.service';
export default { export default {
name: 'AccountInput', name: 'AccountInput',
props: { props: {
...@@ -44,28 +34,20 @@ export default { ...@@ -44,28 +34,20 @@ export default {
}, },
data: function() { data: function() {
return { return {
// inputBlur: true accountMask: ''
// showList: false
// list: [
// {
// phone: '17165445433',
// home: '北京 移动'
// }
// ]
}; };
}, },
computed: { computed: {
maxLength() { maxLength() {
return this.info.type !== 101 ? 13 : 30; return this.info.type !== 101 ? 13 : 30;
}, },
accountMask: { phoneNo() {
get() { return phoneTrim(this.accountMask);
return this.info.type !== 101 ? this.phoneFormat(this.value) : this.value; }
}, },
set(val) { watch: {
this.$emit('input', val.replace(/\s/g, '')); info: function() {
// this.getPhoneHome(); this.checkPhone();
}
} }
}, },
methods: { methods: {
...@@ -76,6 +58,14 @@ export default { ...@@ -76,6 +58,14 @@ export default {
async getPhoneHome() { async getPhoneHome() {
const [res] = await rechargeApi({ phoneNo: this.value }); const [res] = await rechargeApi({ phoneNo: this.value });
this.phoneHome = res.phoneHome; this.phoneHome = res.phoneHome;
},
checkPhone() {
if (this.info.type !== 101) {
this.accountMask = this.phoneFormat(this.accountMask);
} else {
this.accountMask = this.phoneNo;
}
this.$emit('input', this.phoneNo);
} }
} }
}; };
...@@ -87,6 +77,9 @@ export default { ...@@ -87,6 +77,9 @@ export default {
position: relative; position: relative;
@{deep} .cr-field { @{deep} .cr-field {
padding: @padding-xs + 2 0; padding: @padding-xs + 2 0;
input::placeholder {
font-size: 20px !important;
}
&--control-in { &--control-in {
.text-24(); .text-24();
} }
......
...@@ -143,17 +143,6 @@ export default { ...@@ -143,17 +143,6 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
position: relative; position: relative;
// &::before,
// &::after {
// content: ' ';
// flex-shrink: 0;
// display: block;
// width: @padding-sm;
// height: 97px;
// }
// &::after {
// width: @padding-unit;
// }
&-item { &-item {
height: 97px; height: 97px;
width: 95px; width: 95px;
......
...@@ -67,7 +67,8 @@ export default { ...@@ -67,7 +67,8 @@ export default {
computed: { computed: {
disabled() { disabled() {
return ( return (
(this.spuInfo.rechargeAccountType !== 2 && !this.account) || (this.spuInfo.rechargeAccountType !== 2 &&
(!this.account || (this.spuInfo.type !== 101 && !isPhone(this.account)))) ||
!this.skuList.length || !this.skuList.length ||
!this.skuInfo.hasStock !this.skuInfo.hasStock
); );
...@@ -162,11 +163,6 @@ export default { ...@@ -162,11 +163,6 @@ export default {
this.showLoading = false; this.showLoading = false;
}, },
goOrder: throttle(async function() { goOrder: throttle(async function() {
if (!this.account && this.spuInfo.rechargeAccountType !== 2)
return this.$toast.fail('请填写账号!');
if (this.spuInfo.type !== 101 && !isPhone(this.account)) {
return this.$toast.fail('请填写正确的手机号!');
}
if (!this.skuInfo.skuNo) return this.$toast.fail('请选择类型!'); if (!this.skuInfo.skuNo) return this.$toast.fail('请选择类型!');
this.$track.registeredEvents('h5_OtherRechargePageRechargeNowClick', { this.$track.registeredEvents('h5_OtherRechargePageRechargeNowClick', {
classify_name: this.spuData[this.currentTab - 1].name, classify_name: this.spuData[this.currentTab - 1].name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment