Commit 9b8dacdd authored by FE-安焕焕's avatar FE-安焕焕 👣

修复多个问题

parent 7900ec19
...@@ -1159,11 +1159,31 @@ ...@@ -1159,11 +1159,31 @@
} }
}, },
"@qg/ui-request": { "@qg/ui-request": {
"version": "0.0.15", "version": "0.0.17",
"resolved": "http://npmprivate.quantgroups.com/@qg%2fui-request/-/ui-request-0.0.15.tgz", "resolved": "http://npmprivate.quantgroups.com/@qg%2fui-request/-/ui-request-0.0.17.tgz",
"integrity": "sha512-ZYR/7NMFDY0NBU0B71D3/ENdI29YTKhmk0BE68IFlt63rPwKXeUWzUtmfsA1Wgx/iMkNE8qfJMKt7lPLreYYWA==", "integrity": "sha512-jYrp+qSqGy+HEBcOqYJtFSErxtLLkpuh4eUiexgX2sjjseED3vXB8pQRiimWCqBP+P/u3+Q1Bzp7KcMSj2OPNQ==",
"requires": { "requires": {
"@qg/js-bridge": "^1.2.0-beta2",
"axios": "^0.19.2" "axios": "^0.19.2"
},
"dependencies": {
"@qg/js-bridge": {
"version": "1.2.0-beta2",
"resolved": "http://npmprivate.quantgroups.com/@qg%2fjs-bridge/-/js-bridge-1.2.0-beta2.tgz",
"integrity": "sha512-iGWg5cUZnkI7xD8m8ra7mxqdLVc3DEtUpS5zAafAcINMqG7vtzXJyJACRQtxb8T2WZMSblSuGmdAiiqCeY8+4g==",
"requires": {
"qs": "^6.10.1",
"weixin-js-sdk": "^1.6.0"
}
},
"qs": {
"version": "6.10.1",
"resolved": "http://npmprivate.quantgroups.com/qs/-/qs-6.10.1.tgz",
"integrity": "sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg==",
"requires": {
"side-channel": "^1.0.4"
}
}
} }
}, },
"@qg/webpack-cos-cdn-upload-plugin": { "@qg/webpack-cos-cdn-upload-plugin": {
...@@ -2960,6 +2980,15 @@ ...@@ -2960,6 +2980,15 @@
} }
} }
}, },
"call-bind": {
"version": "1.0.2",
"resolved": "http://npmprivate.quantgroups.com/call-bind/-/call-bind-1.0.2.tgz",
"integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
"requires": {
"function-bind": "^1.1.1",
"get-intrinsic": "^1.0.2"
}
},
"call-me-maybe": { "call-me-maybe": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "http://npmprivate.quantgroups.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz", "resolved": "http://npmprivate.quantgroups.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz",
...@@ -5798,8 +5827,7 @@ ...@@ -5798,8 +5827,7 @@
"function-bind": { "function-bind": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "http://npmprivate.quantgroups.com/function-bind/-/function-bind-1.1.1.tgz", "resolved": "http://npmprivate.quantgroups.com/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
"dev": true
}, },
"functional-red-black-tree": { "functional-red-black-tree": {
"version": "1.0.1", "version": "1.0.1",
...@@ -5819,6 +5847,16 @@ ...@@ -5819,6 +5847,16 @@
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
"dev": true "dev": true
}, },
"get-intrinsic": {
"version": "1.1.1",
"resolved": "http://npmprivate.quantgroups.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
"integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
"requires": {
"function-bind": "^1.1.1",
"has": "^1.0.3",
"has-symbols": "^1.0.1"
}
},
"get-own-enumerable-property-symbols": { "get-own-enumerable-property-symbols": {
"version": "3.0.2", "version": "3.0.2",
"resolved": "http://npmprivate.quantgroups.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz", "resolved": "http://npmprivate.quantgroups.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz",
...@@ -5972,7 +6010,6 @@ ...@@ -5972,7 +6010,6 @@
"version": "1.0.3", "version": "1.0.3",
"resolved": "http://npmprivate.quantgroups.com/has/-/has-1.0.3.tgz", "resolved": "http://npmprivate.quantgroups.com/has/-/has-1.0.3.tgz",
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
"dev": true,
"requires": { "requires": {
"function-bind": "^1.1.1" "function-bind": "^1.1.1"
} }
...@@ -6003,8 +6040,7 @@ ...@@ -6003,8 +6040,7 @@
"has-symbols": { "has-symbols": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "http://npmprivate.quantgroups.com/has-symbols/-/has-symbols-1.0.1.tgz", "resolved": "http://npmprivate.quantgroups.com/has-symbols/-/has-symbols-1.0.1.tgz",
"integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg=="
"dev": true
}, },
"has-value": { "has-value": {
"version": "1.0.0", "version": "1.0.0",
...@@ -10978,6 +11014,23 @@ ...@@ -10978,6 +11014,23 @@
"integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==",
"dev": true "dev": true
}, },
"side-channel": {
"version": "1.0.4",
"resolved": "http://npmprivate.quantgroups.com/side-channel/-/side-channel-1.0.4.tgz",
"integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
"requires": {
"call-bind": "^1.0.0",
"get-intrinsic": "^1.0.2",
"object-inspect": "^1.9.0"
},
"dependencies": {
"object-inspect": {
"version": "1.11.0",
"resolved": "http://npmprivate.quantgroups.com/object-inspect/-/object-inspect-1.11.0.tgz",
"integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg=="
}
}
},
"signal-exit": { "signal-exit": {
"version": "3.0.3", "version": "3.0.3",
"resolved": "http://npmprivate.quantgroups.com/signal-exit/-/signal-exit-3.0.3.tgz", "resolved": "http://npmprivate.quantgroups.com/signal-exit/-/signal-exit-3.0.3.tgz",
...@@ -14601,6 +14654,11 @@ ...@@ -14601,6 +14654,11 @@
"resolved": "http://npmprivate.quantgroups.com/webwackify/-/webwackify-0.1.6.tgz", "resolved": "http://npmprivate.quantgroups.com/webwackify/-/webwackify-0.1.6.tgz",
"integrity": "sha512-pGcw1T3HpNnM/UTRQqqRkkkzythSLts05mB+7Gr00B+0VbL0m39dFL5g20rSIEUt9Wrpw+/8k+snxRlUFHhcqA==" "integrity": "sha512-pGcw1T3HpNnM/UTRQqqRkkkzythSLts05mB+7Gr00B+0VbL0m39dFL5g20rSIEUt9Wrpw+/8k+snxRlUFHhcqA=="
}, },
"weixin-js-sdk": {
"version": "1.6.0",
"resolved": "http://npmprivate.quantgroups.com/weixin-js-sdk/-/weixin-js-sdk-1.6.0.tgz",
"integrity": "sha512-3IYQH7aalJGFJrwdT3epvTdR1MboMiH7vIZ5BRL2eYOJ12BNah7csoMkmSZzkq1+l92sSq29XdTCVjCJoK2sBQ=="
},
"which": { "which": {
"version": "1.3.1", "version": "1.3.1",
"resolved": "http://npmprivate.quantgroups.com/which/-/which-1.3.1.tgz", "resolved": "http://npmprivate.quantgroups.com/which/-/which-1.3.1.tgz",
......
...@@ -31,7 +31,7 @@ export default [ ...@@ -31,7 +31,7 @@ export default [
{ {
path: '/paySuccess', path: '/paySuccess',
name: 'paySuccess', name: 'paySuccess',
alias: ['/paySuccess'], // 有问题🤨 alias: ['/paySuccess'],
meta: { meta: {
title: '支付成功', title: '支付成功',
success: true success: true
......
...@@ -329,7 +329,6 @@ export function phoneFormat(mobile) { ...@@ -329,7 +329,6 @@ export function phoneFormat(mobile) {
return value; return value;
} }
export function checkPhoneFormat(mobile) { export function checkPhoneFormat(mobile) {
console.log(mobile);
/* 校验手机号格式 */ /* 校验手机号格式 */
if (!mobile) return; if (!mobile) return;
const reg = /^1([3-9][0-9]|4[5,7]|5[0,1,2,3,5,6,7,8,9]|6[2,5,6,7]|7[0,1,7,8]|8[0-9]|9[1,8,9])\d{8}$/; const reg = /^1([3-9][0-9]|4[5,7]|5[0,1,2,3,5,6,7,8,9]|6[2,5,6,7]|7[0,1,7,8]|8[0-9]|9[1,8,9])\d{8}$/;
...@@ -428,3 +427,16 @@ export function throttle(fn, wait) { ...@@ -428,3 +427,16 @@ export function throttle(fn, wait) {
} }
}; };
} }
let top = 0;
export function stopBodyScroll(isFixed) {
if (isFixed) {
top = document.documentElement.scrollTop || document.body.scrollTop;
document
.querySelector('body')
.setAttribute('style', `position: fixed;top: ${-top}px;width: 100%;`);
} else {
document.querySelector('body').setAttribute('style', `position: '';top: '';`);
window.scrollTo(0, top);
}
}
...@@ -7,11 +7,12 @@ ...@@ -7,11 +7,12 @@
<cr-field <cr-field
v-model="rechargeTel" v-model="rechargeTel"
type="tel" type="tel"
clearable
class="center-phone-field" class="center-phone-field"
placeholder="请输入手机号码" placeholder="请输入手机号码"
@input="changeTelFormat" @input="changeTelFormat"
@blur="searchPhoneNo(rechargeTel)" @blur="searchPhoneNo(rechargeTel)"
@focus="inputBlur = true" @focus="focusHandler"
/> />
<div class="center-phone__list" :class="{ show: inputBlur }"> <div class="center-phone__list" :class="{ show: inputBlur }">
<div <div
...@@ -66,12 +67,16 @@ export default { ...@@ -66,12 +67,16 @@ export default {
changeTelFormat(phone) { changeTelFormat(phone) {
this.phoneNoHome = ''; this.phoneNoHome = '';
this.rechargeTel = phoneFormat(phone); this.rechargeTel = phoneFormat(phone);
if (this.rechargeTel.length > 12) { if (this.rechargeTel?.length > 12) {
this.queryhome(); this.queryhome();
} }
}, },
async searchPhoneNo() { async searchPhoneNo(e) {
console.log(e);
setTimeout(() => {
this.inputBlur = false; this.inputBlur = false;
}, 500);
if (!this.phoneNo) return; if (!this.phoneNo) return;
if (!checkPhoneFormat(this.phoneNo)) { if (!checkPhoneFormat(this.phoneNo)) {
this.$toast.fail('请您输入正确的手机号'); this.$toast.fail('请您输入正确的手机号');
...@@ -95,14 +100,18 @@ export default { ...@@ -95,14 +100,18 @@ export default {
}, },
input() { input() {
this.$emit('input', { phoneNo: this.phoneNo, phoneNoHome: this.phoneNoHome }); this.$emit('input', { phoneNo: this.phoneNo, phoneNoHome: this.phoneNoHome });
},
focusHandler() {
this.inputBlur = true;
} }
} }
}; };
</script> </script>
<style lang="less"> <style lang="less">
.center { .center {
position: relative;
&-phone { &-phone {
position: relative;
z-index: 9;
border-bottom: @border-width-base solid @gray-2; border-bottom: @border-width-base solid @gray-2;
.cr-field:not(:last-child)::after { .cr-field:not(:last-child)::after {
display: none; display: none;
...@@ -125,9 +134,9 @@ export default { ...@@ -125,9 +134,9 @@ export default {
&__list { &__list {
display: none; display: none;
position: absolute; position: absolute;
top: 100px; width: 351px;
width: 100%;
margin: auto; margin: auto;
margin-top: 5px;
left: -@padding-lg; left: -@padding-lg;
right: -@padding-lg; right: -@padding-lg;
z-index: 3; z-index: 3;
......
...@@ -55,7 +55,14 @@ export default { ...@@ -55,7 +55,14 @@ export default {
this.phoneRecharge[`${name}Type`] this.phoneRecharge[`${name}Type`]
); );
this.$emit('changeRechargetype', name); this.$emit('changeRechargetype', name);
this.rechargeList[name] = data?.rechargeList || []; this.rechargeList[name] = [...data?.rechargeList] || [];
this.selectedRechargeInfo = this.rechargeList[name][0];
this.rechargeList[name].forEach(element => {
if (element.salePrice === '100.00') {
this.selectedRechargeInfo = { ...element };
}
});
this.$emit('selectedRecharge', { rechargeInfo: this.selectedRechargeInfo });
}, },
handleSkuSelected(item) { handleSkuSelected(item) {
this.selectedRechargeInfo = item; this.selectedRechargeInfo = item;
...@@ -66,7 +73,8 @@ export default { ...@@ -66,7 +73,8 @@ export default {
</script> </script>
<style lang="less"> <style lang="less">
.center-recharge { .center-recharge {
height: 300px; overflow: hidden;
height: 282px;
margin-top: @padding-xs; margin-top: @padding-xs;
margin-bottom: @padding-xs; margin-bottom: @padding-xs;
} }
......
...@@ -2,17 +2,28 @@ ...@@ -2,17 +2,28 @@
height: 100%; height: 100%;
.center { .center {
width: 351px; width: 351px;
height: 451px; height: 471px;
position: relative;
box-sizing: border-box; box-sizing: border-box;
background: @white; background: @white;
border-radius: 8px; border-radius: 8px;
padding: 14px; padding: 14px;
margin: auto; margin: auto;
margin-top: 50px; margin-top: 50px;
.footer{
position: absolute;
width: 100%;
bottom:20px;
left:0px;
box-sizing: border-box;
padding: 0 14px;
background-color: @white;
z-index: 9;
.button{ .button{
.text-18(); .text-18();
} }
} }
}
.slowRechargeTip{ .slowRechargeTip{
.text-12(); .text-12();
color: @gray-4; color: @gray-4;
......
...@@ -2,16 +2,13 @@ ...@@ -2,16 +2,13 @@
<div class="home"> <div class="home">
<RechargeTop v-model="vipLife" /> <RechargeTop v-model="vipLife" />
<div class="center"> <div class="center">
<RechargeInput <RechargeInput v-model="rechargePhoneInfo" :user-phone-info="userPhoneInfo" />
v-model="rechargePhoneInfo"
:user-phone-info="userPhoneInfo"
:list="historyRecordList"
/>
<RechargeList <RechargeList
:phone-recharge="phoneRecharge" :phone-recharge="phoneRecharge"
@selectedRecharge="selectedRecharge" @selectedRecharge="selectedRecharge"
@changeRechargetype="rechargeType = $event" @changeRechargetype="rechargeType = $event"
/> />
<div class="footer">
<p v-if="rechargeType === 'slowRecharge'" class="slowRechargeTip"> <p v-if="rechargeType === 'slowRecharge'" class="slowRechargeTip">
充值后预计最迟48小时内到账,请耐心等待 充值后预计最迟48小时内到账,请耐心等待
</p> </p>
...@@ -27,6 +24,7 @@ ...@@ -27,6 +24,7 @@
</cr-button> </cr-button>
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
import api from '@/api/recharge.api'; import api from '@/api/recharge.api';
...@@ -35,7 +33,7 @@ import RechargeTop from './components/RechargeTop.vue'; ...@@ -35,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 { getTokenFromNative, throttle } from '@/service/utils.service'; import { throttle } from '@/service/utils.service';
const { getSpuList } = api; const { getSpuList } = api;
export default { export default {
components: { components: {
...@@ -50,7 +48,6 @@ export default { ...@@ -50,7 +48,6 @@ export default {
phoneRecharge: {}, phoneRecharge: {},
userPhoneInfo: {}, userPhoneInfo: {},
rechargeType: 'recharge', rechargeType: 'recharge',
historyRecordList: [],
rechargePhoneInfo: {}, rechargePhoneInfo: {},
selectedRechargeInfo: {} selectedRechargeInfo: {}
}; };
...@@ -79,12 +76,7 @@ export default { ...@@ -79,12 +76,7 @@ export default {
this.selectedRechargeInfo = rechargeInfo; this.selectedRechargeInfo = rechargeInfo;
}, },
async goOrderApi() { async goOrderApi() {
/* 需要加防抖 */
const { skuNo, salePrice } = this.selectedRechargeInfo; const { skuNo, salePrice } = this.selectedRechargeInfo;
const token = localStorage.get('vccToken');
if (!token) {
await getTokenFromNative();
}
const [res] = await orderApi.orderCreate({ const [res] = await orderApi.orderCreate({
totalFee: salePrice, totalFee: salePrice,
terminal: 'H5', terminal: 'H5',
......
<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"
......
<template> <template>
<div class="payCardItem"> <div class="payCardItem">
<div :class="['type-item', { 'b-t': !isGroupPay }]"> <div :class="['type-item', 'b-t']" @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" />
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
class="type-item-checkbox" class="type-item-checkbox"
checked-color="#EC1500" checked-color="#EC1500"
:disabled="disabled || value.disabled" :disabled="disabled || value.disabled"
@click.native="changePayType(value)"
/> />
</div> </div>
<p v-if="riskLimit && value.riskManagementDesc && !disabled" class="limitDes"> <p v-if="riskLimit && value.riskManagementDesc && !disabled" class="limitDes">
......
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