Merge branch 'master' into card-pwd

This commit is contained in:
zhangds 2024-03-19 19:47:44 +08:00
commit 21cb27d619
2 changed files with 34 additions and 29 deletions

View File

@ -215,7 +215,7 @@
let goodsCount = null, goodsDetail = null;
new Vue({
el: '#exchangePage',
data () {
data() {
return {
account: '',
reAccount: '',
@ -253,7 +253,7 @@
filters: {
cardType (val) {
cardType(val) {
return val.map((item) => {
return item == 1 ? "借记卡" : "信用卡" + " ";
}).join(" ");
@ -261,17 +261,17 @@
},
watch: {
account (va) {
account(va) {
va && this.watchAccount();
},
reAccount (va) {
reAccount(va) {
va && this.watchAccount();
},
productType: {
immediate: true,
handler (newVal) {
handler(newVal) {
this.maxlen = 50;
this.acctype = "text";
switch (Number(newVal)) {
@ -345,15 +345,17 @@
modelPop
},
created () {
created() {
/* 配置信息 */
document.title = localStorage.getItem('title');
let detailsConfig = JSON.parse(localStorage.getItem('product_detail'));
goodsCount = localStorage.getItem('goodsCount');
this.backAble = goodsCount > 1;//多个商品才有返回
if (detailsConfig) {
this.bgcolor = detailsConfig.button_color;
this.ftColor = detailsConfig.font_color;
this.describe = detailsConfig.describe;
}
//商品详情
goodsDetail = JSON.parse(localStorage.getItem('goodsInfo'));
@ -364,18 +366,18 @@
computed: {
/* 手机号验证 */
computedAccount () {
computedAccount() {
return /^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(this.account);
},
/* 兑换按钮验证 */
computedExChange () {
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: {
bindAvailable () {
bindAvailable() {
if (goodsDetail.wait_pay_order == 1) {
this.openErrorDialog('您有未支付的订单');
return;
@ -387,7 +389,7 @@
},
/* 获取京东E卡短信 */
sendJDSms () {
sendJDSms() {
if (this.cunt === 60) {
req.axiosPost('/key/order/jdSendSms', { code_batch_id: this.goodsDetail.code_batch_id, mobile: this.account })
.then((res) => {
@ -408,7 +410,7 @@
},
/* 请求详情 */
getDetails (goods_id, code_batch_id) {
getDetails(goods_id, code_batch_id) {
const token = localStorage.getItem('token');
return new Promise((resolve, reject) => {
req.axiosPost(`/key/product_detail/${goods_id}`, { token, code_batch_id }).then(({ code, data, message }) => {
@ -452,11 +454,11 @@
},
/* 跳转订单 */
toOrder () {
toOrder() {
window.location.replace('./myOrder.html');
},
openErrorDialog (tip, bottomText) {
openErrorDialog(tip, bottomText) {
this.popTitle = '温馨提示';
this.popText = tip;
this.popStatus = 2;
@ -464,7 +466,7 @@
this.bottomText = bottomText;
},
backHandler () {
backHandler() {
if (goodsCount > 1) {
window.location.replace('./couponCollection.html');
} else {
@ -473,7 +475,7 @@
},
// 单条弹框
openDialog (tip) {
openDialog(tip) {
this.promtshow = true;
this.promttip = tip;
setTimeout(() => {
@ -483,14 +485,14 @@
},
/* 弹窗回调 */
backFunctionPop (type) {
backFunctionPop(type) {
if (this.isLogin) {
this.delayedOut();
}
},
/* 延时自动退出 */
delayedOut (time = 1) {
delayedOut(time = 1) {
let entryLink = localStorage.getItem('entryLink');
setTimeout(() => {
window.location.replace(entryLink);
@ -498,7 +500,7 @@
},
//兑换商品
exchangeGoodsFn () {
exchangeGoodsFn() {
//wait_pay_order 1有订单 5无订单
if (goodsDetail.wait_pay_order == 1) {
this.openErrorDialog('您有未支付的订单');
@ -603,7 +605,7 @@
window.location.href = './settlement.html';
},
focusFn (a) {
focusFn(a) {
let ele = document.querySelector('.ipt-acc');
setTimeout(function () {
ele.scrollIntoView(false);
@ -612,7 +614,7 @@
}, 400);
},
/* 监听账号 */
watchAccount () {
watchAccount() {
if ((this.account === this.reAccount) && this.account) {
this.exchangeOpen = true;
} else {

View File

@ -28,7 +28,8 @@
<img v-show='!!loadShowHeight' class='img-lodging'
src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/img-logding.png" alt="">
<div class="content" slot="content" @scroll="scrollBottom($event)">
<div class="content-item" v-for="item in orderList" :key="item.order_number" @click="toDetails(item)">
<div class="content-item" v-for="item in orderList" :key="item.order_number"
@click.stop="toDetails(item)">
<div class="top">
<p class="time">{{item.update_time}}</p>
<p class="status" :style="{color:statusColor(item.status)}">{{item.status_text}}
@ -48,19 +49,19 @@
<p class="money">实付金额:¥<span>{{item.pay_amount}}</span></p>
<!-- 立即支付 -->
<div v-if="item.status==6" class="cancel-pay">
<p class="button" @click="immediatelyCancel(item)">取消订单</p>
<p class="button" @click="immediatelyPay(item)">立即支付</p>
<p class="button" @click.stop="immediatelyCancel(item)">取消订单</p>
<p class="button" @click.stop="immediatelyPay(item)">立即支付</p>
</div>
<template v-if="item.type==2">
<!-- 立减金待领取 -->
<p class="button" @click="receiveFn(item)" v-if="item.status==0">去兑换</p>
<p class="button" @click.stop="receiveFn(item)" v-if="item.status==0">去兑换</p>
<!-- 立减金领取过期 -->
<p class="button filter" @click="receiveFn(item)" v-if="item.status==5">去兑换
<p class="button filter" @click.stop="receiveFn(item)" v-if="item.status==5">去兑换
</p>
</template>
<template v-if="item.type==1">
<!-- 查看卡密 -->
<p class="button-card" @click="lookCard(item)"
<p class="button-card" @click.stop="lookCard(item)"
v-if="item.status==2&&item.goods.product_type==2&&item.goods.card_show==2">查看卡密</p>
<!-- 款项状态 -->
<p class="pay_status" v-if="[2,3].includes(item.pay_status)&&item.status==3">
@ -192,6 +193,8 @@
/*跳转详情*/
toDetails(order) {
if (order.status === 4 || order.status === 6) return;
sessionStorage.setItem('orderNumber', order.order_number);
switch (order.goods.product_type) {
case 1: