Commit 651d57db authored by 张子雨's avatar 张子雨

Merge branch 'master' into feature/orderPaymentStatus

* master:
  fix: 处理sms手机号null的问题
  fix: 处理sms手机号null的问题
  fix: 处理sms手机号null的问题
  fix: 处理sms手机号null的问题
  feat:组合支付方式参数注释
  fix:秒杀去掉我的订单
  fix:订单超时修改
  fix:获取验证码修改
  fix:修改获取验证码
  fix:秒杀收银台删除我的订单页面
  feat(rysdk): 添加热云事件
  fix:修复密码输入框点击延迟问题
  fix: 腾讯会员只能输入数字
  fix: 修改按钮价格展示
  fix: 花费充值订单改为售价
  fix(route.js): 移除重定向限制
  fix:秒杀配置
  fix:适配秒杀
parents bd9a36bb c9bc8ed6
registry=http://npmprivate.quantgroups.com/
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -71,6 +71,11 @@ const reissueContract = function(params) { ...@@ -71,6 +71,11 @@ const reissueContract = function(params) {
return request.post(`${talosHost}/open/checkout/payReissueContract`, params); return request.post(`${talosHost}/open/checkout/payReissueContract`, params);
}; };
// 获取用户手机号
const getPhoneNumber = function() {
return request.get(`${talosHost}/api/kdsp/user/phone`);
};
export { export {
pay, pay,
prepay, prepay,
...@@ -83,5 +88,6 @@ export { ...@@ -83,5 +88,6 @@ export {
getGoodsList, getGoodsList,
kaGetNextUrl, kaGetNextUrl,
queryPayStatus, queryPayStatus,
reissueContract reissueContract,
getPhoneNumber
}; };
...@@ -2,7 +2,7 @@ let protocol = window.location.protocol; ...@@ -2,7 +2,7 @@ let protocol = window.location.protocol;
let payHost = protocol + '//mapi-qa.liangkebang.net/pay'; let payHost = protocol + '//mapi-qa.liangkebang.net/pay';
let shenceHost = 'https://bn.xyqb.com/sa?project=default'; // 测试地址 let shenceHost = 'https://bn.xyqb.com/sa?project=default'; // 测试地址
let talosHost = 'http://talos-vcc2.liangkebang.net'; // 电商分期测试环境服务地址 let talosHost = 'http://talos-test1.liangkebang.net'; // 电商分期测试环境服务地址
let operatorHost = 'https://operator.liangkebang.com'; let operatorHost = 'https://operator.liangkebang.com';
const toBHost = 'https://tob.liangkebang.net'; const toBHost = 'https://tob.liangkebang.net';
export default { talosHost, operatorHost, payHost, shenceHost, test: true, toBHost }; export default { talosHost, operatorHost, payHost, shenceHost, test: true, toBHost };
...@@ -13,6 +13,9 @@ import RavenVue from 'raven-js/plugins/vue'; ...@@ -13,6 +13,9 @@ import RavenVue from 'raven-js/plugins/vue';
import { release } from '../.sentryclirc'; import { release } from '../.sentryclirc';
import fontResize from './directives/fontResize'; import fontResize from './directives/fontResize';
import cfg from './config'; import cfg from './config';
import FastClick from 'fastclick';
FastClick.attach(document.body, { tapDelay: 1 });
if (process.env.SENTRY_ENV !== 'test' && process.env.NODE_ENV === 'production') { if (process.env.SENTRY_ENV !== 'test' && process.env.NODE_ENV === 'production') {
Raven.config('//7fc2cea5ef8244fd9b4cf13051e408d8@sentry.quantgroups.com/73', { Raven.config('//7fc2cea5ef8244fd9b4cf13051e408d8@sentry.quantgroups.com/73', {
release, release,
......
export default [ export default [
{ {
path: '/', path: '/',
redirect: '/vipLife' redirect: '/home'
}, },
{ {
path: '/home', path: '/home',
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
:disabled="!disabled" :disabled="!disabled"
@click="goOrder" @click="goOrder"
> >
{{ selectedRechargeInfo.price ? `¥${selectedRechargeInfo.price}` : '' }} 立即充值 {{ selectedRechargeInfo.salePrice ? `¥${selectedRechargeInfo.salePrice}` : '' }} 立即充值
</cr-button> </cr-button>
</div> </div>
</div> </div>
...@@ -81,13 +81,13 @@ export default { ...@@ -81,13 +81,13 @@ export default {
this.selectedRechargeInfo = rechargeInfo; this.selectedRechargeInfo = rechargeInfo;
}, },
async goOrderApi() { async goOrderApi() {
const { skuNo, price } = this.selectedRechargeInfo; const { skuNo, price, salePrice } = 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: price cost_value: price
}); });
const [res, error] = await orderApi.orderCreate({ const [res, error] = await orderApi.orderCreate({
totalFee: price, totalFee: salePrice,
terminal: 'H5', terminal: 'H5',
account: this.rechargePhoneInfo?.phoneNo, account: this.rechargePhoneInfo?.phoneNo,
registrationLocation: this.rechargePhoneInfo?.phoneNoHome, registrationLocation: this.rechargePhoneInfo?.phoneNoHome,
......
...@@ -134,6 +134,16 @@ function filterAllPayList(type, data) { ...@@ -134,6 +134,16 @@ function filterAllPayList(type, data) {
} }
return data; return data;
} }
const payTypeMap = {
'1': '信用支付',
'2': '微信支付',
'3': '支付宝支付',
'4': '信用支付_微信支付',
'5': '信用支付_支付宝支付',
'6': '虚拟支付0元付'
};
export { export {
status, status,
codeArr, codeArr,
...@@ -163,5 +173,6 @@ export { ...@@ -163,5 +173,6 @@ export {
ACCOUNT_APPLY_AUDIT_FAIL, ACCOUNT_APPLY_AUDIT_FAIL,
SMS_VERIFICATION_CODE_PAY, SMS_VERIFICATION_CODE_PAY,
FACE_VERIFICATION_CODE_PAY, FACE_VERIFICATION_CODE_PAY,
CENTER_CODE_PAY CENTER_CODE_PAY,
payTypeMap
}; };
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<p class="sms-icon"><cr-icon type="cross" color="#999999" @click="closeModal" /></p> <p class="sms-icon"><cr-icon type="cross" color="#999999" @click="closeModal" /></p>
<p class="sms-title">请输入短信验证码</p> <p class="sms-title">请输入短信验证码</p>
<p class="sms-des">为保证您账户安全,此笔交易需要短信验证</p> <p class="sms-des">为保证您账户安全,此笔交易需要短信验证</p>
<p class="phone">已发送至 {{ getPhone() }}</p> <p class="phone">已发送至 {{ phoneNumber }}</p>
<cr-authcode-field <cr-authcode-field
span-size="24px" span-size="24px"
type="number" type="number"
...@@ -29,8 +29,7 @@ ...@@ -29,8 +29,7 @@
</template> </template>
<script> <script>
import localStorage from '@/service/localStorage.service'; import { sendSms as sendSmsApi, getPhoneNumber } from '@/api/pay.api';
import { sendSms as sendSmsApi } from '@/api/pay.api';
export default { export default {
props: { props: {
value: { value: {
...@@ -45,7 +44,8 @@ export default { ...@@ -45,7 +44,8 @@ export default {
return { return {
send: false, send: false,
time: 60, time: 60,
timer: null timer: null,
phoneNumber: ''
}; };
}, },
computed: {}, computed: {},
...@@ -57,9 +57,9 @@ export default { ...@@ -57,9 +57,9 @@ export default {
}, },
errorInfo: function() {} errorInfo: function() {}
}, },
onShow() {}, created() {
onLoad() {}, this.getPhone();
onReady() {}, },
methods: { methods: {
closeModal() { closeModal() {
this.clearTimer(); this.clearTimer();
...@@ -82,10 +82,9 @@ export default { ...@@ -82,10 +82,9 @@ export default {
}, 1000); }, 1000);
} }
}, },
getPhone() { async getPhone() {
const phone = localStorage.get('phoneNo'); const [phoneNumber] = await getPhoneNumber();
const phoneS = `${phone}`.replace(/(\d{3})\d*(\d{4})/, '+86 $1 **** $2'); this.phoneNumber = phoneNumber;
return phoneS;
}, },
clearTimer() { clearTimer() {
clearInterval(this.timer); clearInterval(this.timer);
......
...@@ -54,7 +54,9 @@ ...@@ -54,7 +54,9 @@
</cr-button> </cr-button>
</p> </p>
<p v-if="overtime" class="btn"> <p v-if="overtime" class="btn">
<cr-button type="default" class="btn-default" @click="goOrderList">我的订单</cr-button> <cr-button v-if="isOrder" type="default" class="btn-default" @click="goOrderList"
>我的订单</cr-button
>
<cr-button type="primary" class="btn-primary" @click="goHome">返回商城</cr-button> <cr-button type="primary" class="btn-primary" @click="goHome">返回商城</cr-button>
</p> </p>
<p class="placeholder" /> <p class="placeholder" />
...@@ -130,7 +132,7 @@ import { ...@@ -130,7 +132,7 @@ import {
kaGetNextUrl, kaGetNextUrl,
reissueContract 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;
export default { export default {
components: { components: {
...@@ -146,6 +148,7 @@ export default { ...@@ -146,6 +148,7 @@ export default {
extends: goUrlExtends, extends: goUrlExtends,
data() { data() {
return { return {
isOrder: true,
error: '', error: '',
random: '', random: '',
orderNo: '', orderNo: '',
...@@ -217,6 +220,8 @@ export default { ...@@ -217,6 +220,8 @@ export default {
} }
}, },
mounted() { mounted() {
this.getQuery();
this.setIsOrder();
this.orderNo = this.$route.query.orderNo || cookies.get('orderNo')?.orderNo; this.orderNo = this.$route.query.orderNo || cookies.get('orderNo')?.orderNo;
cookies.set('orderNo', { orderNo: this.orderNo }); cookies.set('orderNo', { orderNo: this.orderNo });
if (this.$route?.query?.ocrflag) { if (this.$route?.query?.ocrflag) {
...@@ -233,11 +238,23 @@ export default { ...@@ -233,11 +238,23 @@ export default {
this.getCouponList(this.orderNo); this.getCouponList(this.orderNo);
}, },
methods: { methods: {
getQuery() {
this.returnUrl = cookies.get('returnUrl') || '';
if (localStorage.get('hideOrder')) {
this.isOrder = false;
}
},
setIsOrder() {
const { hideOrder } = this.$route.query || {};
if (hideOrder) {
localStorage.set('hideOrder', hideOrder);
}
},
/* 查询支付信息 */ /* 查询支付信息 */
async queryPayInfo() { async queryPayInfo() {
const [data, error] = await queryPayInfo({ const [data, error] = await queryPayInfo({
orderNo: this.orderNo, orderNo: this.orderNo,
isUsedMergePayMethod: cookies.get('source') !== 'tob' isUsedMergePayMethod: cookies.get('source') !== 'tob' // 是否需要组合支付,true需要。false不需要
}); });
if (error && codeArr.indexOf(error?.response?.businessCode) < 0) { if (error && codeArr.indexOf(error?.response?.businessCode) < 0) {
this.payResult('Fail'); this.payResult('Fail');
...@@ -357,7 +374,7 @@ export default { ...@@ -357,7 +374,7 @@ export default {
}; };
} else if (accountStatus === ACCOUNT_APPLY_SUCCESS) { } else if (accountStatus === ACCOUNT_APPLY_SUCCESS) {
const finalCount = this.showCoupon const finalCount = this.showCoupon
? (this.displayInfo.orderAmt - (this.selectedCoupon.faceValue || 0)).toFixed(2) ? (this.displayInfo.orderAmt - (this.selectedCoupon.faceValueNew || 0)).toFixed(2)
: this.displayInfo.orderAmt; : this.displayInfo.orderAmt;
const txt = `实际支付${finalCount || '0.00'}`; const txt = `实际支付${finalCount || '0.00'}`;
this.accountS = { this.accountS = {
...@@ -515,7 +532,8 @@ export default { ...@@ -515,7 +532,8 @@ export default {
name: `pay${type}`, name: `pay${type}`,
query: { query: {
reason: error, reason: error,
orderNo: this.orderNo orderNo: this.orderNo,
payType: this.payType
} }
}); });
}, },
...@@ -600,7 +618,9 @@ export default { ...@@ -600,7 +618,9 @@ export default {
}, },
/* 忘记密码 */ /* 忘记密码 */
retrieveLink() { retrieveLink() {
let url = `${this.creditPayInfo.forgetPwdJumpUrl}&vccChannel=${VCC_CHANNEL}&redirectUrl=${window.location.href}`; const { orderNo, hideOrder, returnUrl } = this.$route.query || {};
const redirectUrl = `${window.location.origin}${window.location.pathname}?orderNo=${orderNo}&hideOrder=${hideOrder}&returnUrl=${returnUrl}`;
let url = `${this.creditPayInfo.forgetPwdJumpUrl}&vccChannel=${VCC_CHANNEL}&redirectUrl=${redirectUrl}`;
url = url.replace('{token}', localStorage.get('vccToken')); url = url.replace('{token}', localStorage.get('vccToken'));
window.location.href = url; window.location.href = url;
}, },
......
...@@ -14,19 +14,19 @@ ...@@ -14,19 +14,19 @@
<p v-if="freeAmount > 0" class="info__text info__free">已优惠¥{{ freeAmount }}</p> <p v-if="freeAmount > 0" class="info__text info__free">已优惠¥{{ freeAmount }}</p>
</div> </div>
</div> </div>
<p class="tips"> <p v-if="isOrder" class="tips">
您可在“我的-我的订单”中查看详情 您可在“我的-我的订单”中查看详情
</p> </p>
<div class="actions"> <div :class="['actions', !isOrder && 'no-order']">
<cr-button <cr-button
shape="circle" shape="circle"
class="actions__back" class="actions__back"
:plain="true" :plain="true"
type="primary" type="primary"
@click="goHome(payStatus)" @click="goHome"
>返回首页</cr-button >{{ returnUrl ? '返回秒杀' : '返回首页' }}</cr-button
> >
<cr-button shape="circle" type="primary" @click="goOrderList(payStatus)" <cr-button v-if="isOrder" shape="circle" type="primary" @click="goOrderList(payStatus)"
>查看订单</cr-button >查看订单</cr-button
> >
</div> </div>
...@@ -54,7 +54,10 @@ ...@@ -54,7 +54,10 @@
<script> <script>
import RecoGoods from '@/components/RecoGoods.vue'; import RecoGoods from '@/components/RecoGoods.vue';
import cookies from '@/service/cookieStorage.service'; import cookies from '@/service/cookieStorage.service';
import localStorage from '@/service/localStorage.service';
import { isApp } from '@/service/validation.service';
import { goUrlExtends } from './extends'; import { goUrlExtends } from './extends';
import { payTypeMap } from './STATIC_DATA';
export default { export default {
components: { RecoGoods }, components: { RecoGoods },
extends: goUrlExtends, extends: goUrlExtends,
...@@ -64,11 +67,14 @@ export default { ...@@ -64,11 +67,14 @@ export default {
orderNo: null, orderNo: null,
isSuccess: false, isSuccess: false,
freeAmount: 0, freeAmount: 0,
payStatus: '' payStatus: '',
returnUrl: '',
isOrder: true
}; };
}, },
created() { created() {
const { orderNo, reason } = this.$route.query; this.getQuery();
const { orderNo, reason, payType } = this.$route.query;
const { success } = this.$route.meta; const { success } = this.$route.meta;
const amount = cookies.get('amount') || {}; const amount = cookies.get('amount') || {};
this.money = amount.finalAmt; this.money = amount.finalAmt;
...@@ -80,8 +86,25 @@ export default { ...@@ -80,8 +86,25 @@ export default {
this.$track.registeredEvents('h5_RechargeResultPageExposure', { this.$track.registeredEvents('h5_RechargeResultPageExposure', {
pay_status: this.payStatus pay_status: this.payStatus
}); });
this.isSuccess &&
isApp &&
this.util.run({
event: 'reyunAnalytics',
data: {
method: 'PaySuccess', //string submitOrder OR PaySuccess
orderId: orderNo, //string 订单号
amount: amount.finalAmt, //float 金额
payType: payTypeMap[payType] //string 支付类型
}
});
}, },
methods: { methods: {
getQuery() {
this.returnUrl = cookies.get('returnUrl') || '';
if (localStorage.get('hideOrder')) {
this.isOrder = false;
}
},
goPay() { goPay() {
this.$track.registeredEvents('h5_RechargeResultPageClick', { this.$track.registeredEvents('h5_RechargeResultPageClick', {
pay_status: this.payStatus, pay_status: this.payStatus,
...@@ -141,6 +164,9 @@ export default { ...@@ -141,6 +164,9 @@ export default {
flex-direction: row; flex-direction: row;
margin-top: @padding-lg; margin-top: @padding-lg;
justify-content: space-between; justify-content: space-between;
&.no-order {
justify-content: center;
}
&__back { &__back {
color: @cherry-color-error; color: @cherry-color-error;
border: 1px solid @cherry-color-error; border: 1px solid @cherry-color-error;
......
...@@ -16,16 +16,16 @@ ...@@ -16,16 +16,16 @@
<p class="tips"> <p class="tips">
努力返回支付结果中,请留心查看! 努力返回支付结果中,请留心查看!
</p> </p>
<div class="actions"> <div :class="['actions', !isOrder && 'no-order']">
<cr-button <cr-button
class="actions__back" class="actions__back"
:plain="true" :plain="true"
type="primary" type="primary"
shape="circle" shape="circle"
@click="goHome('正在支付')" @click="goHome('正在支付')"
>返回首页</cr-button >{{ returnUrl ? '返回秒杀' : '返回首页' }}</cr-button
> >
<cr-button shape="circle" type="primary" @click="goOrderDetail('正在支付')" <cr-button v-if="isOrder" shape="circle" type="primary" @click="goOrderDetail('正在支付')"
>查看订单</cr-button >查看订单</cr-button
> >
</div> </div>
...@@ -36,6 +36,7 @@ import { queryPayStatus } from '@/api/pay.api'; ...@@ -36,6 +36,7 @@ import { queryPayStatus } from '@/api/pay.api';
import cookies from '@/service/cookieStorage.service'; import cookies from '@/service/cookieStorage.service';
import { goUrlExtends } from './extends'; import { goUrlExtends } from './extends';
import { isApp } from '@/service/validation.service'; import { isApp } from '@/service/validation.service';
import localStorage from '@/service/localStorage.service';
export default { export default {
components: {}, components: {},
extends: goUrlExtends, extends: goUrlExtends,
...@@ -44,7 +45,9 @@ export default { ...@@ -44,7 +45,9 @@ export default {
orderNo: null, orderNo: null,
timer: null, timer: null,
time: 10, time: 10,
init: false init: false,
returnUrl: '',
isOrder: true
}; };
}, },
created() { created() {
...@@ -56,6 +59,7 @@ export default { ...@@ -56,6 +59,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.getQuery();
this.$track.registeredEvents('h5_RechargeResultPageExposure', { this.$track.registeredEvents('h5_RechargeResultPageExposure', {
pay_status: '正在支付' pay_status: '正在支付'
}); });
...@@ -81,6 +85,12 @@ export default { ...@@ -81,6 +85,12 @@ export default {
clearInterval(this.timer); clearInterval(this.timer);
}, },
methods: { methods: {
getQuery() {
this.returnUrl = cookies.get('returnUrl') || '';
if (localStorage.get('hideOrder')) {
this.isOrder = false;
}
},
loop() { loop() {
this.query(); this.query();
this.timer = setInterval(() => { this.timer = setInterval(() => {
...@@ -165,7 +175,9 @@ export default { ...@@ -165,7 +175,9 @@ export default {
flex-direction: row; flex-direction: row;
margin-top: @padding-lg; margin-top: @padding-lg;
justify-content: space-between; justify-content: space-between;
&.no-order {
justify-content: center;
}
&__back { &__back {
color: @cherry-color-error; color: @cherry-color-error;
border: 1px solid @cherry-color-error; border: 1px solid @cherry-color-error;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
:placeholder="`请输入${info.name || ''}账号`" :placeholder="`请输入${info.name || ''}账号`"
clearable clearable
class="Vl__account__field" class="Vl__account__field"
:type="info.type === 101 ? 'text' : 'number'" type="tel"
@input="checkPhone" @input="checkPhone"
> >
<template #button> <template #button>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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