Merge branch 'master' into combining
This commit is contained in:
commit
8d0a5cd10c
|
@ -126,12 +126,13 @@
|
||||||
<span class="coupon" :class="dynamicAsh(item)">券后价</span>
|
<span class="coupon" :class="dynamicAsh(item)">券后价</span>
|
||||||
<span class="sign" :class="dynamicAsh(item)">¥</span>
|
<span class="sign" :class="dynamicAsh(item)">¥</span>
|
||||||
<span class="current-price"
|
<span class="current-price"
|
||||||
:class="dynamicAsh(item)">{{item.coupon_price}}</span>
|
:class="dynamicAsh(item)">{{Number(item.coupon_price)}}</span>
|
||||||
</p>
|
</p>
|
||||||
</template>
|
</template>
|
||||||
<p class="money moneyExtra" v-else>
|
<p class="money moneyExtra" v-else>
|
||||||
<span class="sign" :class="dynamicAsh(item)">¥</span>
|
<span class="sign" :class="dynamicAsh(item)">¥</span>
|
||||||
<span class="current-price" :class="dynamicAsh(item)">{{item.origin_price}}</span>
|
<span class="current-price"
|
||||||
|
:class="dynamicAsh(item)">{{Number(item.origin_price)}}</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -162,15 +163,16 @@
|
||||||
<div class="details">
|
<div class="details">
|
||||||
<template v-if="item.origin_price!==item.coupon_price">
|
<template v-if="item.origin_price!==item.coupon_price">
|
||||||
<p class="sign" :class="dynamicAsh(item)">¥</p>
|
<p class="sign" :class="dynamicAsh(item)">¥</p>
|
||||||
<p class="price" :class="dynamicAsh(item)">{{item.coupon_price}}</p>
|
<p class="price" :class="dynamicAsh(item)">{{Number(item.coupon_price)}}</p>
|
||||||
<p class="coupon" :class="dynamicAsh(item)">券后价</p>
|
<p class="coupon" :class="dynamicAsh(item)">券后价</p>
|
||||||
<p class="original-price" :class="dynamicAsh(item)">
|
<p class="original-price" :class="dynamicAsh(item)">
|
||||||
原价¥{{item.origin_price}}
|
原价¥{{Number(item.origin_price)}}
|
||||||
</p>
|
</p>
|
||||||
</template>
|
</template>
|
||||||
<p v-else style="margin-top:0.05rem">
|
<p v-else style="margin-top:0.05rem">
|
||||||
<span class="sign" :class="dynamicAsh(item)">¥</span>
|
<span class="sign" :class="dynamicAsh(item)">¥</span>
|
||||||
<span class="price" :class="dynamicAsh(item)">{{item.origin_price}}</span>
|
<span class="price"
|
||||||
|
:class="dynamicAsh(item)">{{Number(item.origin_price)}}</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -227,10 +229,10 @@
|
||||||
x{{item.entity.send_num}}</span>
|
x{{item.entity.send_num}}</span>
|
||||||
</font>
|
</font>
|
||||||
<template v-if="item.origin_price!==item.coupon_price">
|
<template v-if="item.origin_price!==item.coupon_price">
|
||||||
<p class="original-price" :class="dynamicAsh(item)">原价¥{{item.origin_price}}</p>
|
<p class="original-price" :class="dynamicAsh(item)">原价¥{{Number(item.origin_price)}}</p>
|
||||||
<p>
|
<p>
|
||||||
<span class="sign" :class="dynamicAsh(item)">¥</span>
|
<span class="sign" :class="dynamicAsh(item)">¥</span>
|
||||||
<span class="price" :class="dynamicAsh(item)">{{item.coupon_price}}</span>
|
<span class="price" :class="dynamicAsh(item)">{{Number(item.coupon_price)}}</span>
|
||||||
<span class="coupon" :class="dynamicAsh(item)">券后价</span>
|
<span class="coupon" :class="dynamicAsh(item)">券后价</span>
|
||||||
</p>
|
</p>
|
||||||
</template>
|
</template>
|
||||||
|
@ -238,7 +240,7 @@
|
||||||
<p class="original-price" :class="dynamicAsh(item)"></p>
|
<p class="original-price" :class="dynamicAsh(item)"></p>
|
||||||
<p>
|
<p>
|
||||||
<span class="sign" :class="dynamicAsh(item)">¥</span>
|
<span class="sign" :class="dynamicAsh(item)">¥</span>
|
||||||
<span class="price" :class="dynamicAsh(item)">{{item.origin_price}}</span>
|
<span class="price" :class="dynamicAsh(item)">{{Number(item.origin_price)}}</span>
|
||||||
</p>
|
</p>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -49,20 +49,47 @@
|
||||||
<p class="text">{{goodInfo.product_name}}</p>
|
<p class="text">{{goodInfo.product_name}}</p>
|
||||||
</div>
|
</div>
|
||||||
<template v-if="goodInfo.product_type===1||(goodInfo.product_type===2&&goodInfo.card_show==1)">
|
<template v-if="goodInfo.product_type===1||(goodInfo.product_type===2&&goodInfo.card_show==1)">
|
||||||
<p v-if="acctype=='tel'"><span>账号:</span><input :type="acctype"
|
<!-- 京东E卡 -->
|
||||||
onkeyup="this.value=this.value.replace(/\D/g,'')" :disabled="goodsDetail.available!=1"
|
<template v-if="goodInfo.is_e_card">
|
||||||
onKeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))" :maxlength="maxlen"
|
<p>
|
||||||
v-model="account" :placeholder="placeholder" @focus="(e)=>focusFn(e)"></p>
|
<span>账号:</span>
|
||||||
<p v-if="acctype=='tel'"><span>再次输入:</span> <input :type="acctype"
|
<input :type="acctype" onkeyup="this.value=this.value.replace(/\D/g,'')"
|
||||||
onkeyup="this.value=this.value.replace(/\D/g,'')" :disabled="goodsDetail.available!=1"
|
:disabled="goodsDetail.available!=1"
|
||||||
onKeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))" :maxlength="maxlen"
|
onKeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))" :maxlength="11"
|
||||||
v-model="reAccount" placeholder="请再次输入" @focus="(e)=>focusFn(e)"></p>
|
v-model="account" placeholder="请输入手机号" @focus="(e)=>focusFn(e)">
|
||||||
<p v-if="acctype!='tel'"><span>账号:</span> <input :type="acctype" :maxlength="maxlen"
|
</p>
|
||||||
v-model="account" :disabled="goodsDetail.available!=1" :placeholder="placeholder"
|
<p>
|
||||||
@focus="(e)=>focusFn(e)"></p>
|
<span>验证码:</span>
|
||||||
<p v-if="acctype!='tel'"><span>再次输入:</span><input :type="acctype" :maxlength="maxlen"
|
<input class="queryCode" :type="acctype"
|
||||||
v-model="reAccount" :disabled="goodsDetail.available!=1" placeholder="请再次输入"
|
onkeyup="this.value=this.value.replace(/\D/g,'')"
|
||||||
@focus="(e)=>focusFn(e)"></p>
|
:disabled="goodsDetail.available!=1"
|
||||||
|
onKeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))" :maxlength="6"
|
||||||
|
v-model="jd_code" placeholder="请输入验证码" @focus="(e)=>focusFn(e)">
|
||||||
|
<button :disabled="!computedAccount" class="query-code" @click="sendJDSms">
|
||||||
|
{{cunt!==60?cunt+'s':'获取验证码'}}
|
||||||
|
</button>
|
||||||
|
</p>
|
||||||
|
</template>
|
||||||
|
<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"
|
||||||
|
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"
|
||||||
|
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"
|
||||||
|
@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="请再次输入"
|
||||||
|
@focus="(e)=>focusFn(e)"></p>
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div class="bottom" id="bottom" :style="{borderWidth:(describe.type||detailUrl)?'0.05rem':'0'}"
|
<div class="bottom" id="bottom" :style="{borderWidth:(describe.type||detailUrl)?'0.05rem':'0'}"
|
||||||
|
@ -157,17 +184,10 @@
|
||||||
{{(goodsDetail.origin_price-goodsDetail.coupon_price).toFixed(2)}}</p>
|
{{(goodsDetail.origin_price-goodsDetail.coupon_price).toFixed(2)}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<template v-if="goodsDetail.type===1||(goodInfo.product_type === 2 &&goodInfo.card_show == 1)">
|
<button class="exchange-btn"
|
||||||
<button class="exchange-btn"
|
:style="{'background': computedExChange?bgcolor:'#D7D7D7','color':computedExChange?ftColor:'#333'}"
|
||||||
v-if="goodInfo.product_type===1||(goodInfo.product_type === 2 &&goodInfo.card_show == 1)"
|
|
||||||
:style="{'background': exchangeOpen?bgcolor:'#D7D7D7','color':exchangeOpen?ftColor:'#333'}"
|
|
||||||
@click="exchangeGoodsFn">立即支付</button>
|
|
||||||
|
|
||||||
<button v-else class="exchange-btn" v-else :style="{'background': bgcolor,'color':ftColor}"
|
|
||||||
@click="exchangeGoodsFn">立即支付</button>
|
|
||||||
</template>
|
|
||||||
<button class="exchange-btn" v-else :style="{'background': bgcolor,'color':ftColor}"
|
|
||||||
@click="exchangeGoodsFn">立即支付</button>
|
@click="exchangeGoodsFn">立即支付</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -207,6 +227,8 @@
|
||||||
placeholder: '',
|
placeholder: '',
|
||||||
exchangeOpen: false,
|
exchangeOpen: false,
|
||||||
suspension: false,
|
suspension: false,
|
||||||
|
cunt: 60,
|
||||||
|
jd_code: '',
|
||||||
describe: {},
|
describe: {},
|
||||||
detailUrl: '',
|
detailUrl: '',
|
||||||
goodInfo: '',
|
goodInfo: '',
|
||||||
|
@ -340,6 +362,18 @@
|
||||||
this.getDetails(goodsId, code_batch_id);
|
this.getDetails(goodsId, code_batch_id);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
/* 手机号验证 */
|
||||||
|
computedAccount () {
|
||||||
|
return /^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(this.account);
|
||||||
|
},
|
||||||
|
|
||||||
|
/* 兑换按钮验证 */
|
||||||
|
computedExChange () {
|
||||||
|
return this.exchangeOpen || (this.goodInfo.product_type === 2 && this.goodInfo.card_show == 2) || this.goodInfo.is_e_card && this.computedAccount && this.jd_code.length === 6;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
bindAvailable () {
|
bindAvailable () {
|
||||||
if (goodsDetail.wait_pay_order == 1) {
|
if (goodsDetail.wait_pay_order == 1) {
|
||||||
|
@ -352,6 +386,27 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/* 获取京东E卡短信 */
|
||||||
|
sendJDSms () {
|
||||||
|
if (this.cunt === 60) {
|
||||||
|
req.axiosPost('/key/order/jdSendSms', { code_batch_id: this.goodsDetail.code_batch_id, mobile: this.account })
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.openDialog('短信下发成功!');
|
||||||
|
const clr = setInterval(() => {
|
||||||
|
if (this.cunt <= 1) {
|
||||||
|
this.cunt = 60;
|
||||||
|
return clearInterval(clr);
|
||||||
|
}
|
||||||
|
this.cunt--;
|
||||||
|
}, 1000);
|
||||||
|
} else {
|
||||||
|
this.openErrorDialog(res.message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
/* 请求详情 */
|
/* 请求详情 */
|
||||||
getDetails (goods_id, code_batch_id) {
|
getDetails (goods_id, code_batch_id) {
|
||||||
const token = localStorage.getItem('token');
|
const token = localStorage.getItem('token');
|
||||||
|
@ -449,10 +504,22 @@
|
||||||
this.openErrorDialog('您有未支付的订单');
|
this.openErrorDialog('您有未支付的订单');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (goodsDetail.available != 1) {
|
if (goodsDetail.available != 1) {
|
||||||
this.openErrorDialog(product_status(goodsDetail.available, goodsDetail));
|
this.openErrorDialog(product_status(goodsDetail.available, goodsDetail));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 京东E卡 */
|
||||||
|
if (this.goodInfo.is_e_card && this.goodInfo.product_type === 1) {
|
||||||
|
if (this.computedExChange) {
|
||||||
|
localStorage.setItem('account', this.account);
|
||||||
|
localStorage.setItem('jd_code', this.jd_code);
|
||||||
|
window.location.href = './settlement.html';
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((this.goodsDetail.type === 1 && this.goodInfo.product_type === 1) || (this.goodInfo.product_type === 2 && this.goodInfo.card_show == 1)) { /* 兑换码 */
|
if ((this.goodsDetail.type === 1 && this.goodInfo.product_type === 1) || (this.goodInfo.product_type === 2 && this.goodInfo.card_show == 1)) { /* 兑换码 */
|
||||||
if (!this.account) {
|
if (!this.account) {
|
||||||
this.openDialog('请输入兑换账号!');
|
this.openDialog('请输入兑换账号!');
|
||||||
|
|
|
@ -290,7 +290,8 @@
|
||||||
"goods_id": this.goodInfo.goods_id,
|
"goods_id": this.goodInfo.goods_id,
|
||||||
"account": this.account, /* 卡密时默认账号 */
|
"account": this.account, /* 卡密时默认账号 */
|
||||||
"pay_type": payType == 2 ? 1 : 5,
|
"pay_type": payType == 2 ? 1 : 5,
|
||||||
"pay_amount": this.goodsDetail.coupon_price
|
"pay_amount": this.goodsDetail.coupon_price,
|
||||||
|
'jd_code': this.goodInfo.is_e_card ? localStorage.getItem('jd_code') : ''
|
||||||
};
|
};
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
req.axiosPost('/key/createCouponOrder', data).then(res => {
|
req.axiosPost('/key/createCouponOrder', data).then(res => {
|
||||||
|
|
102
exchange.html
102
exchange.html
|
@ -51,20 +51,44 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ipt-acc" style="position: relative;z-index: 99;" @click="bindAvailable">
|
<div class="ipt-acc" style="position: relative;z-index: 99;" @click="bindAvailable">
|
||||||
<h4 class="title" v-if="goodInfo.product_type===2&&goodInfo.card_show==2">{{goodInfo.product_name}}</h4>
|
<h4 class="title">{{goodInfo.product_name}}</h4>
|
||||||
<template v-if="goodInfo.product_type===1||goodInfo.product_type===2&&goodInfo.card_show==1">
|
<template v-if="goodInfo.product_type===1||goodInfo.product_type===2&&goodInfo.card_show==1">
|
||||||
<p v-if="acctype=='tel'"><span>账号:</span><input :type="acctype"
|
<!-- 京东E卡 -->
|
||||||
onkeyup="this.value=this.value.replace(/\D/g,'')" :disabled="goodsDetail.available!=1"
|
<template v-if="goodInfo.is_e_card">
|
||||||
onKeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))" :maxlength="maxlen" v-model="account"
|
<p>
|
||||||
:placeholder="placeholder" @focus="(e)=>focusFn(e)"></p>
|
<span>账号:</span>
|
||||||
<p v-if="acctype=='tel'"><span>再次输入:</span> <input :type="acctype"
|
<input :type="acctype" onkeyup="this.value=this.value.replace(/\D/g,'')"
|
||||||
onkeyup="this.value=this.value.replace(/\D/g,'')" :disabled="goodsDetail.available!=1"
|
:disabled="goodsDetail.available!=1"
|
||||||
onKeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))" :maxlength="maxlen"
|
onKeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))" :maxlength="11" v-model="account"
|
||||||
v-model="reaccount" placeholder="请再次输入" @focus="(e)=>focusFn(e)"></p>
|
placeholder="请输入手机号" @focus="(e)=>focusFn(e)">
|
||||||
<p v-if="acctype!='tel'"><span>账号:</span> <input :type="acctype" :maxlength="maxlen" v-model="account"
|
</p>
|
||||||
:disabled="goodsDetail.available!=1" :placeholder="placeholder" @focus="(e)=>focusFn(e)"></p>
|
<p>
|
||||||
<p v-if="acctype!='tel'"><span>再次输入:</span><input :type="acctype" :maxlength="maxlen" v-model="reaccount"
|
<span>验证码:</span>
|
||||||
:disabled="goodsDetail.available!=1" placeholder="请再次输入" @focus="(e)=>focusFn(e)"></p>
|
<input class="queryCode" :type="acctype" onkeyup="this.value=this.value.replace(/\D/g,'')"
|
||||||
|
:disabled="goodsDetail.available!=1"
|
||||||
|
onKeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))" :maxlength="6" v-model="jd_code"
|
||||||
|
placeholder="请输入验证码" @focus="(e)=>focusFn(e)">
|
||||||
|
<button :disabled="!computedAccount" class="query-code" @click="sendJDSms">
|
||||||
|
{{cunt!==60?cunt+'s':'获取验证码'}}
|
||||||
|
</button>
|
||||||
|
</p>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- 非E卡 -->
|
||||||
|
<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"
|
||||||
|
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"
|
||||||
|
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" @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="请再次输入" @focus="(e)=>focusFn(e)"></p>
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div class="bottom" id="bottom" v-show="describe.type||detailUrl">
|
<div class="bottom" id="bottom" v-show="describe.type||detailUrl">
|
||||||
|
@ -79,7 +103,7 @@
|
||||||
<p>订单</p>
|
<p>订单</p>
|
||||||
</div>
|
</div>
|
||||||
<button class="exchange-btn"
|
<button class="exchange-btn"
|
||||||
:style="{'background': (exchangeOpen||(goodInfo.product_type===2&&goodInfo.card_show==2))?bgcolor:'#D7D7D7','color':(exchangeOpen||(goodInfo.product_type===2&&goodInfo.card_show==2))?ftcolor:'#333'}"
|
:style="{'background': computedExChange?bgcolor:'#D7D7D7','color':computedExChange?ftcolor:'#333'}"
|
||||||
@click="exchangeGoodsFn">立即兑换</button>
|
@click="exchangeGoodsFn">立即兑换</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -147,6 +171,8 @@
|
||||||
popboxshow: false,
|
popboxshow: false,
|
||||||
exchangeOpen: false,
|
exchangeOpen: false,
|
||||||
suspension: false,
|
suspension: false,
|
||||||
|
cunt: 60,
|
||||||
|
jd_code: '',
|
||||||
popboxtype: '',
|
popboxtype: '',
|
||||||
describe: {},
|
describe: {},
|
||||||
detailUrl: '',
|
detailUrl: '',
|
||||||
|
@ -207,6 +233,28 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/* 获取京东E卡短信 */
|
||||||
|
sendJDSms () {
|
||||||
|
if (this.cunt === 60) {
|
||||||
|
req.axiosPost('/key/order/jdSendSms', { code_batch_id: this.goodsDetail.code_batch_id, mobile: this.account })
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.openDialog('短信下发成功!');
|
||||||
|
const clr = setInterval(() => {
|
||||||
|
if (this.cunt <= 1) {
|
||||||
|
this.cunt = 60;
|
||||||
|
return clearInterval(clr);
|
||||||
|
}
|
||||||
|
this.cunt--;
|
||||||
|
}, 1000);
|
||||||
|
} else {
|
||||||
|
this.openErrorDialog(res.message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
openErrorDialog (tip) {
|
openErrorDialog (tip) {
|
||||||
this.maskshow = true;
|
this.maskshow = true;
|
||||||
this.popboxtype = '提示';
|
this.popboxtype = '提示';
|
||||||
|
@ -260,6 +308,16 @@
|
||||||
return this.surexchangeBtn();
|
return this.surexchangeBtn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 京东E卡 */
|
||||||
|
if (this.goodInfo.is_e_card && this.goodInfo.product_type === 1) {
|
||||||
|
if (this.computedExChange) {
|
||||||
|
this.maskshow = true;
|
||||||
|
this.popboxshow = true;
|
||||||
|
this.popboxtype = '兑换';
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!this.account) {
|
if (!this.account) {
|
||||||
this.openDialog('请输入兑换账号!');
|
this.openDialog('请输入兑换账号!');
|
||||||
return false;
|
return false;
|
||||||
|
@ -330,7 +388,8 @@
|
||||||
"goods_id": this.goodInfo.goods_id,
|
"goods_id": this.goodInfo.goods_id,
|
||||||
"account": this.account,
|
"account": this.account,
|
||||||
"code_batch_id": this.goodInfo.code_batch_id,
|
"code_batch_id": this.goodInfo.code_batch_id,
|
||||||
"token": localStorage.getItem('token')
|
"token": localStorage.getItem('token'),
|
||||||
|
'jd_code': this.jd_code
|
||||||
};
|
};
|
||||||
self.popboxshow = false;
|
self.popboxshow = false;
|
||||||
req.axiosPost('/key/usage', data).then(res => {
|
req.axiosPost('/key/usage', data).then(res => {
|
||||||
|
@ -397,6 +456,19 @@
|
||||||
this.reaccount = "";
|
this.reaccount = "";
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
/* 手机号验证 */
|
||||||
|
computedAccount () {
|
||||||
|
return /^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(this.account);
|
||||||
|
},
|
||||||
|
|
||||||
|
/* 兑换按钮验证 */
|
||||||
|
computedExChange () {
|
||||||
|
return this.exchangeOpen || (this.goodInfo.product_type === 2 && this.goodInfo.card_show == 2) || this.goodInfo.is_e_card && this.computedAccount && this.jd_code.length === 6;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
account () {
|
account () {
|
||||||
if ((this.account == this.reaccount) && this.account) {
|
if ((this.account == this.reaccount) && this.account) {
|
||||||
|
|
|
@ -777,6 +777,21 @@ img.changegray {
|
||||||
z-index: 888;
|
z-index: 888;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#exchangePage .queryCode {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#exchangePage .query-code {
|
||||||
|
color: #2691fc;
|
||||||
|
border: 0;
|
||||||
|
outline: 0;
|
||||||
|
font-size: 0.14rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#exchangePage .query-code:disabled {
|
||||||
|
color: #a2cbf5;
|
||||||
|
}
|
||||||
|
|
||||||
#exchangePage .about-good > span {
|
#exchangePage .about-good > span {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0.1rem;
|
top: 0.1rem;
|
||||||
|
@ -893,7 +908,7 @@ img.changegray {
|
||||||
font-size: 0.17rem;
|
font-size: 0.17rem;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #0a0a0a;
|
color: #0a0a0a;
|
||||||
margin-left: 0.12rem;
|
margin-left: 0.24rem;
|
||||||
margin-bottom: 0.24rem;
|
margin-bottom: 0.24rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue