|
@@ -310,6 +310,10 @@
|
|
|
//选中用户卡号
|
|
//选中用户卡号
|
|
|
checkedUserCard(e) {
|
|
checkedUserCard(e) {
|
|
|
const that = this;
|
|
const that = this;
|
|
|
|
|
+ layer.msg('加载中请稍等。。。', {
|
|
|
|
|
+ icon: 16
|
|
|
|
|
+ ,shade: 0.01
|
|
|
|
|
+ });
|
|
|
if (that.userCardInput.length == 12 || that.userCardInput.length == 15 || that
|
|
if (that.userCardInput.length == 12 || that.userCardInput.length == 15 || that
|
|
|
.userCardInput.length == 8 || that.userCardInput.length == 11 || that
|
|
.userCardInput.length == 8 || that.userCardInput.length == 11 || that
|
|
|
.userCardInput == '1') {
|
|
.userCardInput == '1') {
|
|
@@ -325,12 +329,7 @@
|
|
|
that.UserCard = that.userCardInput;
|
|
that.UserCard = that.userCardInput;
|
|
|
that.userId = data.data.uid;
|
|
that.userId = data.data.uid;
|
|
|
that.userData = data.data.user
|
|
that.userData = data.data.user
|
|
|
- console.log('获取焦点')
|
|
|
|
|
- that.$nextTick(function() {
|
|
|
|
|
- that.$refs.code.focus();
|
|
|
|
|
- // 清空购物车
|
|
|
|
|
- that.delCartAll()
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ that.delCartAll()
|
|
|
} else {
|
|
} else {
|
|
|
layer.msg(data.msg, {
|
|
layer.msg(data.msg, {
|
|
|
icon: 5
|
|
icon: 5
|
|
@@ -372,12 +371,16 @@
|
|
|
// 清空购物车
|
|
// 清空购物车
|
|
|
delCartAll() {
|
|
delCartAll() {
|
|
|
const that = this;
|
|
const that = this;
|
|
|
- console.log('gouwuche ', that.userId);
|
|
|
|
|
$eb.axios.post('{:Url("clear_cart")}', {
|
|
$eb.axios.post('{:Url("clear_cart")}', {
|
|
|
uid: that.userId
|
|
uid: that.userId
|
|
|
}).then(function(res) {
|
|
}).then(function(res) {
|
|
|
|
|
+ that.$nextTick(function() {
|
|
|
|
|
+ that.$refs.code.focus();
|
|
|
|
|
+ })
|
|
|
|
|
+ layer.closeAll('loading');
|
|
|
console.log(res, '购物车清空成功')
|
|
console.log(res, '购物车清空成功')
|
|
|
}).catch(function(err) {
|
|
}).catch(function(err) {
|
|
|
|
|
+ that.delCartAll();
|
|
|
console.log(err);
|
|
console.log(err);
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
@@ -629,12 +632,13 @@
|
|
|
confirmData = res.data
|
|
confirmData = res.data
|
|
|
const orderKey = res.data.data.orderKey;
|
|
const orderKey = res.data.data.orderKey;
|
|
|
let money = await that.computedOrder(orderKey);
|
|
let money = await that.computedOrder(orderKey);
|
|
|
|
|
+
|
|
|
layer.confirm('订单总金额:¥' + that.allPayMoney.toFixed(2) + '<br/> vip优惠:¥' + ((
|
|
layer.confirm('订单总金额:¥' + that.allPayMoney.toFixed(2) + '<br/> vip优惠:¥' + ((
|
|
|
that.allPayMoney - money.pay_price) > 0 ? (
|
|
that.allPayMoney - money.pay_price) > 0 ? (
|
|
|
that.allPayMoney - money.pay_price).toFixed(
|
|
that.allPayMoney - money.pay_price).toFixed(
|
|
|
2) : 0) + '<br/> 实际支付:¥' + money.pay_price
|
|
2) : 0) + '<br/> 实际支付:¥' + money.pay_price
|
|
|
.toFixed(2), {
|
|
.toFixed(2), {
|
|
|
- btn: ['立即支付', '取消', '修复订单'], //按钮
|
|
|
|
|
|
|
+ btn: ['立即支付', '取消', '修复订单','查看数据'], //按钮
|
|
|
yes: async function(index) {
|
|
yes: async function(index) {
|
|
|
layer.close(index);
|
|
layer.close(index);
|
|
|
try {
|
|
try {
|
|
@@ -677,6 +681,11 @@
|
|
|
console.log('对比');
|
|
console.log('对比');
|
|
|
that.orderContrast();
|
|
that.orderContrast();
|
|
|
},
|
|
},
|
|
|
|
|
+ btn3: function(index) {
|
|
|
|
|
+ console.log('对比');
|
|
|
|
|
+ layer.close(index);
|
|
|
|
|
+ layer.alert(`错误返回数据${JSON.stringify(confirmData)}`, {icon: 0});
|
|
|
|
|
+ },
|
|
|
});
|
|
});
|
|
|
console.log(money, '金额计算');
|
|
console.log(money, '金额计算');
|
|
|
} catch (e) {
|
|
} catch (e) {
|