Commit f18eb236 authored by 郭志伟's avatar 郭志伟

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

parents 5cf103e0 499e424b
...@@ -9,7 +9,7 @@ const payTypeE = [ ...@@ -9,7 +9,7 @@ const payTypeE = [
'PD_YXMMAEC_UserClickCashierSelectWechatPay' 'PD_YXMMAEC_UserClickCashierSelectWechatPay'
]; ];
const codeArr = ['4034', '4035', '4036', '3005', '6049', '401']; const codeArr = ['4034', '4035', '4036', '3005'];
// (4034, "密码错误"), // (4034, "密码错误"),
// (4035, "密码重试超限,无法验证"), // (4035, "密码重试超限,无法验证"),
// (4036, "验证码错误"); // (4036, "验证码错误");
......
<template> <template>
<div @click="changePayType(thirdPayInfo)"> <div>
<div class="groupCard"> <div @click="changePayType(thirdPayInfo)">
<PayCardItem <div class="groupCard">
:is-group-pay="true" <PayCardItem
:value="creditPayInfo" :is-group-pay="true"
:coupon-info="couponInfo" :value="creditPayInfo"
:show-coupon="showCoupon" :coupon-info="couponInfo"
:risk-limit="riskLimit" :show-coupon="showCoupon"
:coupon-disabled="couponDisabled" :risk-limit="riskLimit"
/> :coupon-disabled="couponDisabled"
</div> />
<div class="dashed"> </div>
<p class="dashed-line" /> <div class="dashed">
<cr-checkbox <p class="dashed-line" />
v-model="thirdPayInfo.isCheck" <cr-checkbox
shape="round" v-model="thirdPayInfo.isCheck"
checked-color="#EC1500" shape="round"
:disabled="disabled || thirdPayInfo.disabled" checked-color="#EC1500"
class="dashed-checkbox" :disabled="disabled || thirdPayInfo.disabled"
@click.native="changePayType(thirdPayInfo)" class="dashed-checkbox"
/> @click.native="changePayType(thirdPayInfo)"
</div> />
<div class="groupCard"> </div>
<PayCardItem :is-group-pay="true" :value="thirdPayInfo" /> <div class="groupCard">
<PayCardItem :is-group-pay="true" :value="thirdPayInfo" />
</div>
</div> </div>
<p class="group-more b-t" @click="openMore">更多支付组合<cr-icon type="arrow" size="15px" /></p> <p class="group-more b-t" @click="openMore">更多支付组合<cr-icon type="arrow" size="15px" /></p>
<cr-popup v-model="morePopup" round position="bottom" :style="{ height: '30%' }" closeable> <cr-popup v-model="morePopup" round position="bottom" :style="{ height: '30%' }" closeable>
......
import cookies from '@/service/cookieStorage.service'; import cookies from '@/service/cookieStorage.service';
export const goUrlExtends = { export const goUrlExtends = {
methods: { methods: {
goHome() { goHome(payStatus) {
// 商城地址 // 商城地址
if (payStatus) {
this.$track.registeredEvents('h5_RechargeResultPageClick', {
pay_status: payStatus,
buttons_name: '返回首页'
});
}
const returnUrl = this.getReturnUrl(); const returnUrl = this.getReturnUrl();
if (returnUrl) { if (returnUrl) {
window.location.replace(`${returnUrl}`); window.location.replace(`${returnUrl}`);
...@@ -10,7 +16,13 @@ export const goUrlExtends = { ...@@ -10,7 +16,13 @@ export const goUrlExtends = {
} }
this.$router.replace({ name: 'home' }); this.$router.replace({ name: 'home' });
}, },
goOrderList() { goOrderList(payStatus) {
if (payStatus) {
this.$track.registeredEvents('h5_RechargeResultPageClick', {
pay_status: payStatus,
buttons_name: '查看订单'
});
}
const returnUrl = this.getReturnUrl(); const returnUrl = this.getReturnUrl();
if (returnUrl) { if (returnUrl) {
window.location.replace(`${returnUrl}/orderList`); window.location.replace(`${returnUrl}/orderList`);
......
...@@ -81,7 +81,6 @@ ...@@ -81,7 +81,6 @@
:show-coupon="couponPopup" :show-coupon="couponPopup"
:enable-list="payCouponList" :enable-list="payCouponList"
:value="selectedCoupon.id" :value="selectedCoupon.id"
@click="selectCouponItem"
@change="handleSelectCoupon" @change="handleSelectCoupon"
/> />
</cr-popup> </cr-popup>
...@@ -100,6 +99,7 @@ import localStorage from '@/service/localStorage.service'; ...@@ -100,6 +99,7 @@ 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,
...@@ -223,6 +223,7 @@ export default { ...@@ -223,6 +223,7 @@ export default {
// 先支付再查询信息 // 先支付再查询信息
this.pay(this.payInfo?.paramsData, 'ocr', cookies.get('ocrflag')); this.pay(this.payInfo?.paramsData, 'ocr', cookies.get('ocrflag'));
} }
!this.$route?.query?.ocrflag && this.$track.registeredEvents('h5_CheckOutCouterExposure');
const vccToken = localStorage.get('vccToken'); const vccToken = localStorage.get('vccToken');
Current_Url = `${window.location.origin}/payWaiting?vccToken=${vccToken}&orderNo=${this.orderNo}`; Current_Url = `${window.location.origin}/payWaiting?vccToken=${vccToken}&orderNo=${this.orderNo}`;
this.queryPayInfo(); this.queryPayInfo();
...@@ -311,7 +312,7 @@ export default { ...@@ -311,7 +312,7 @@ export default {
this.creditPayInfo = displayInfo.creditPayInfo || {}; this.creditPayInfo = displayInfo.creditPayInfo || {};
displayInfo.periodSeconds = displayInfo.periodSeconds * 1000; displayInfo.periodSeconds = displayInfo.periodSeconds * 1000;
this.getBtnStatus(this.isRiskLimit()); this.getBtnStatus(this.isRiskLimit());
if (this.payInfo.payType) { if (this.payInfo?.payType) {
this.selectedCoupon = this.payInfo.selectedCoupon; this.selectedCoupon = this.payInfo.selectedCoupon;
this.changePayType(this.payInfo.payType, this.payInfo.mergePayPretreatmentInfo); this.changePayType(this.payInfo.payType, this.payInfo.mergePayPretreatmentInfo);
this.isShowProtocol && (this.isCheckAgreement = true); this.isShowProtocol && (this.isCheckAgreement = true);
...@@ -385,6 +386,12 @@ export default { ...@@ -385,6 +386,12 @@ export default {
} }
}, },
nextAction: throttle(function() { nextAction: throttle(function() {
this.$track.registeredEvents('h5_CheckOutCounterConfirmPayClick', {
order_id: this.orderNo,
pay_method: this.payType,
vcc_state: !IS_THIRD_PAY(this.payType) ? this.creditPayInfo?.accountStatus : '',
buttons_name: this.accountS.text
});
this.accountS.fn(); this.accountS.fn();
}, 1000), }, 1000),
/* 预支付 */ /* 预支付 */
...@@ -492,7 +499,7 @@ export default { ...@@ -492,7 +499,7 @@ export default {
payType: this.payType, payType: this.payType,
selectedCoupon: this.selectedCoupon, selectedCoupon: this.selectedCoupon,
isCheckAgreement: this.isCheckAgreement, isCheckAgreement: this.isCheckAgreement,
mergePayPretreatmentId: this.mergePayPretreatmentId mergePayPretreatmentInfo: this.mergePayPretreatmentInfo
}); });
this.close(); this.close();
this.goOcr(); this.goOcr();
...@@ -517,13 +524,17 @@ export default { ...@@ -517,13 +524,17 @@ export default {
this.mergePayPretreatmentInfo = mergePayPretreatmentInfo || null; this.mergePayPretreatmentInfo = mergePayPretreatmentInfo || null;
}, },
openCouponModal() { openCouponModal() {
registeredEvents('PD_YXMMACP_UserClickCouponBanner');
this.random = Math.random(); this.random = Math.random();
this.couponPopup = true; this.couponPopup = true;
this.$track.registeredEvents('h5_CheckOutCouterCouponBannerClick');
}, },
/* 选取优惠券 */ /* 选取优惠券 */
handleSelectCoupon(id, selectedCoupon) { handleSelectCoupon(id, selectedCoupon) {
registeredEvents('PD_YXMMACP_UserClickCouponPopupWindowComfirmBtn'); this.$track.registeredEvents('h5_CheckOutCounterCouponPopupWindowClick', {
coupon_type: '享花券',
check_or_not: id ? '勾选' : '取消',
coupon_id: id
});
this.selectedCoupon = selectedCoupon || {}; this.selectedCoupon = selectedCoupon || {};
this.getBtnStatus(this.isRiskLimit()); this.getBtnStatus(this.isRiskLimit());
this.couponPopup = false; this.couponPopup = false;
...@@ -573,12 +584,6 @@ export default { ...@@ -573,12 +584,6 @@ export default {
if (!res.callBackUrl) return; if (!res.callBackUrl) return;
window.location.href = res.callBackUrl; window.location.href = res.callBackUrl;
}, },
selectCouponItem(isSelected, couponInfo) {
registeredEvents('PD_YXMMACP_UserClickCouponPopupWindowCoupon', {
check_or_not: isSelected ? '勾选' : '取消',
coupon_id: couponInfo.id
});
},
/* 密码支付失败 */ /* 密码支付失败 */
retrieve() { retrieve() {
this.$refs.pwd.tips(false, this.error); this.$refs.pwd.tips(false, this.error);
......
...@@ -18,10 +18,17 @@ ...@@ -18,10 +18,17 @@
您可在“我的-我的订单”中查看详情 您可在“我的-我的订单”中查看详情
</p> </p>
<div class="actions"> <div class="actions">
<cr-button shape="circle" class="actions__back" :plain="true" type="primary" @click="goHome" <cr-button
shape="circle"
class="actions__back"
:plain="true"
type="primary"
@click="goHome(payStatus)"
>返回首页</cr-button >返回首页</cr-button
> >
<cr-button shape="circle" type="primary" @click="goOrderList">查看订单</cr-button> <cr-button shape="circle" type="primary" @click="goOrderList(payStatus)"
>查看订单</cr-button
>
</div> </div>
</div> </div>
<div v-else class="card"> <div v-else class="card">
...@@ -45,7 +52,6 @@ ...@@ -45,7 +52,6 @@
</div> </div>
</template> </template>
<script> <script>
import { registeredEvents } from '@/service/sa.service';
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 { goUrlExtends } from './extends'; import { goUrlExtends } from './extends';
...@@ -57,7 +63,8 @@ export default { ...@@ -57,7 +63,8 @@ export default {
money: '00.00', money: '00.00',
orderNo: null, orderNo: null,
isSuccess: false, isSuccess: false,
freeAmount: 0 freeAmount: 0,
payStatus: ''
}; };
}, },
created() { created() {
...@@ -69,11 +76,16 @@ export default { ...@@ -69,11 +76,16 @@ export default {
this.reason = reason || ''; this.reason = reason || '';
this.isSuccess = success || false; this.isSuccess = success || false;
this.freeAmount = amount.freeAmount; this.freeAmount = amount.freeAmount;
this.payStatus = success ? '订单支付成功' : '订单支付失败';
this.$track.registeredEvents('h5_RechargeResultPageExposure', {
pay_status: this.payStatus
});
}, },
methods: { methods: {
goPay() { goPay() {
registeredEvents('PD_YXMMAEC_UserClickCashierPaymentAgainBtn', { this.$track.registeredEvents('h5_RechargeResultPageClick', {
order_id: this.orderNo pay_status: this.payStatus,
buttons_name: '重新支付'
}); });
this.$router.replace({ name: 'pay', query: { orderNo: this.orderNo } }); this.$router.replace({ name: 'pay', query: { orderNo: this.orderNo } });
} }
......
...@@ -15,10 +15,17 @@ ...@@ -15,10 +15,17 @@
努力返回支付结果中,请留心查看! 努力返回支付结果中,请留心查看!
</p> </p>
<div class="actions"> <div class="actions">
<cr-button class="actions__back" :plain="true" type="primary" shape="circle" @click="goHome" <cr-button
class="actions__back"
:plain="true"
type="primary"
shape="circle"
@click="goHome('正在支付')"
>返回首页</cr-button >返回首页</cr-button
> >
<cr-button shape="circle" type="primary" @click="goOrderDetail">查看订单</cr-button> <cr-button shape="circle" type="primary" @click="goOrderDetail('正在支付')"
>查看订单</cr-button
>
</div> </div>
</div> </div>
</template> </template>
...@@ -47,12 +54,19 @@ export default { ...@@ -47,12 +54,19 @@ export default {
} }
}, },
mounted() { mounted() {
this.$track.registeredEvents('h5_RechargeResultPageExposure', {
pay_status: '正在支付'
});
this.$dialog({ this.$dialog({
message: '请确认订单已完成支付', message: '请确认订单已完成支付',
confirmButtonText: '已完成支付', confirmButtonText: '已完成支付',
cancelButtonText: '重新支付', cancelButtonText: '重新支付',
confirmButtonColor: '#EC1500', confirmButtonColor: '#EC1500',
onCancel: () => { onCancel: () => {
this.$track.registeredEvents('h5_RechargeResultPageClick', {
pay_status: '正在支付',
buttons_name: '重新支付'
});
this.goPay(); this.goPay();
}, },
onConfirm: () => { onConfirm: () => {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
:key="index" :key="index"
class="Vl__sku-item" class="Vl__sku-item"
:class="{ :class="{
cheap: item.price - item.salePrice > 0, cheap: item.price - item.salePrice < 0,
active: props.info.skuNo === item.skuNo, active: props.info.skuNo === item.skuNo,
'no-stock': !item.hasStock, 'no-stock': !item.hasStock,
nohhird: (index + 1) % 3 !== 0 nohhird: (index + 1) % 3 !== 0
......
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