This commit is contained in:
zhangguoping 2024-10-29 10:11:33 +08:00
parent 18cb093e45
commit 7f9ac80c2f
3 changed files with 15 additions and 9 deletions

View File

@ -54,7 +54,7 @@
<p>
<span>账号:</span>
<input :type="acctype" onkeyup="this.value=this.value.replace(/\D/g,'')"
:disabled="goodsDetail.available!=1"
:disabled="goodsDetail.available!=1 || !!goodsDetail.account"
onKeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))" :maxlength="11"
v-model="account" placeholder="请输入手机号" @focus="(e)=>focusFn(e)">
</p>
@ -73,21 +73,21 @@
<template v-else>
<p v-if="acctype=='tel'"><span>账号:</span><input :type="acctype"
onkeyup="this.value=this.value.replace(/\D/g,'')"
:disabled="goodsDetail.available!=1"
:disabled="goodsDetail.available!=1 || !!goodsDetail.account"
onKeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))"
:maxlength="maxlen" v-model="account" :placeholder="placeholder"
@focus="(e)=>focusFn(e)"></p>
<p v-if="acctype=='tel'"><span>再次输入:</span> <input :type="acctype"
onkeyup="this.value=this.value.replace(/\D/g,'')"
:disabled="goodsDetail.available!=1"
:disabled="goodsDetail.available!=1 || !!goodsDetail.account"
onKeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))"
:maxlength="maxlen" v-model="reAccount" placeholder="请再次输入"
@focus="(e)=>focusFn(e)"></p>
<p v-if="acctype!='tel'"><span>账号:</span> <input :type="acctype" :maxlength="maxlen"
v-model="account" :disabled="goodsDetail.available!=1" :placeholder="placeholder"
v-model="account" :disabled="goodsDetail.available!=1 || !!goodsDetail.account" :placeholder="placeholder"
@focus="(e)=>focusFn(e)"></p>
<p v-if="acctype!='tel'"><span>再次输入:</span><input :type="acctype" :maxlength="maxlen"
v-model="reAccount" :disabled="goodsDetail.available!=1" placeholder="请再次输入"
v-model="reAccount" :disabled="goodsDetail.available!=1 || !!goodsDetail.account" placeholder="请再次输入"
@focus="(e)=>focusFn(e)"></p>
</template>
</template>
@ -360,6 +360,8 @@
//商品详情
goodsDetail = JSON.parse(localStorage.getItem('goodsInfo'));
this.account = goodsDetail.account || '';
this.reAccount = goodsDetail.account || '';
let goodsId = goodsDetail.id;
let code_batch_id = goodsDetail.coupon && goodsDetail.coupon.code_batch_id || goodsDetail.code_batch_id;
this.getDetails(goodsId, code_batch_id);

View File

@ -57,9 +57,9 @@
</div>
<div class="form">
<template v-if="goodsInfo.available!==9">
<input type="text" placeholder="请输入真实姓名" class="f-input" v-model="form.receive_name"
<input type="text" placeholder="请输入真实姓名" class="f-input" :disabled="!!goodsInfo.account" v-model="form.receive_name"
maxlength="100">
<input type="text" placeholder="请输入支付宝账号" class="f-input" v-model="form.receive_account">
<input type="text" placeholder="请输入支付宝账号" class="f-input" :disabled="!!goodsInfo.account" v-model="form.receive_account">
<p class="f-prompt">您可在支付宝的个人信息中查看【支付宝账号】</p>
<button class="but" @click="receive">{{buttonTextFun(goodsInfo.type,'receive')}}</button>
</template>
@ -148,6 +148,8 @@
}
document.title = localStorage.getItem('title');
this.form.receive_name = this.goodsInfo.receive_name || '';
this.form.receive_account = this.goodsInfo.account || '';
// /* 初始弹窗 */
if (this.goodsInfo.available == 8 || this.goodsInfo.available == 11) {

View File

@ -56,9 +56,9 @@
</div>
<div class="form">
<template v-if="goodsInfo.available!==9">
<input type="text" placeholder="请输入真实姓名" class="f-input" v-model="form.receive_name"
<input type="text" placeholder="请输入真实姓名" class="f-input" :disabled="!!goodsInfo.account" v-model="form.receive_name"
maxlength="100">
<input type="text" placeholder="请输入支付宝账号" class="f-input" v-model="form.receive_account">
<input type="text" placeholder="请输入支付宝账号" class="f-input" :disabled="!!goodsInfo.account" v-model="form.receive_account">
<p class="f-prompt">您可在支付宝的个人信息中查看【支付宝账号】</p>
<button class="but" @click="receive">{{buttonTextFun(goodsInfo.type,'receive')}}</button>
</template>
@ -141,6 +141,8 @@
mounted() {
document.title = localStorage.getItem('title');
this.form.receive_name = this.goodsInfo.receive_name || '';
this.form.receive_account = this.goodsInfo.account || '';
/* 初始弹窗 */
if (this.goodsInfo.available == 8 || this.goodsInfo.available == 11) {