Commit a315303d2f5023ba9eed576d5956d8926880f050

Authored by 刘淇
1 parent f76e8e60

购买会员卡

Showing 1 changed file with 14 additions and 0 deletions
src/views/cards/buyCard.vue
@@ -325,6 +325,8 @@ export default { @@ -325,6 +325,8 @@ export default {
325 queryVipCardInfoByPlNo(jsondata).then(data => { 325 queryVipCardInfoByPlNo(jsondata).then(data => {
326 console.log(data); 326 console.log(data);
327 if (data.code == 0) { 327 if (data.code == 0) {
  328 + me.cardTypeList = []
  329 + me.carType = '请点击选择'
328 // res.vipCardList = 330 // res.vipCardList =
329 // this.cardTypeList = res.vipCardList 331 // this.cardTypeList = res.vipCardList
330 // { name: "月卡", num: 1, method: this.clickAction }, 332 // { name: "月卡", num: 1, method: this.clickAction },
@@ -335,6 +337,17 @@ export default { @@ -335,6 +337,17 @@ export default {
335 me.cardTypeList.push(item); 337 me.cardTypeList.push(item);
336 }); 338 });
337 console.log(me.cardTypeList); 339 console.log(me.cardTypeList);
  340 + if(me.carType=='请点击选择'){
  341 +
  342 + }else{
  343 + me.cardNum = 1
  344 + me.unitPrice = vipCardList[0].price;
  345 + me.disPrice = vipCardList[0].price * ((10 - vipCardList[0].discValue) / 10);
  346 + me.needPay = this.unitPrice - this.disPrice;
  347 + // me.startData = new Date();
  348 + me.typeNum = vipCardList[0].cardType;
  349 + me.createVipCardOrder = e;
  350 + }
338 } else { 351 } else {
339 this.$vux.toast.text(data.message, "top"); 352 this.$vux.toast.text(data.message, "top");
340 } 353 }
@@ -391,6 +404,7 @@ export default { @@ -391,6 +404,7 @@ export default {
391 this.$vux.toast.text("请选择停车场", "top"); 404 this.$vux.toast.text("请选择停车场", "top");
392 return; 405 return;
393 } 406 }
  407 + console.log(this.carType)
394 if (this.carType == "请点击选择") { 408 if (this.carType == "请点击选择") {
395 this.$vux.toast.text("请选择卡类型", "top"); 409 this.$vux.toast.text("请选择卡类型", "top");
396 return; 410 return;