|
@@ -231,7 +231,6 @@
|
|
|
}
|
|
|
],
|
|
|
showModal: false,
|
|
|
- showModalType:1,
|
|
|
showModalstauts:0
|
|
|
}
|
|
|
},
|
|
@@ -245,35 +244,29 @@
|
|
|
},
|
|
|
methods: {
|
|
|
async initStorage(option){
|
|
|
- console.log(option)
|
|
|
const data = JSON.parse(option.data)
|
|
|
const userInfo = await this.$api.getStorage()
|
|
|
- console.log('infodata',data)
|
|
|
+ console.log('data',data)
|
|
|
this.productParam.userId =
|
|
|
this.cartParam.userId =
|
|
|
this.supportParm.userId =
|
|
|
this.postageParam.userId = userInfo.userId ? userInfo.userId : 0
|
|
|
this.confirmParam.clubId = userInfo.clubId ? userInfo.clubId : 0
|
|
|
switch(option.type){
|
|
|
- case '1':
|
|
|
- console.log('商品详情立即购买')
|
|
|
+ case '1':// 商品详情立即购买
|
|
|
this.confirmParam.cartType = 2
|
|
|
this.productParam.productCount = data.data.productCount
|
|
|
this.productParam.productId = data.data.productIds
|
|
|
- // this.productIds = this.postageParam.productIds = data.data.productIds
|
|
|
this.productIds = data.data.productIds
|
|
|
this.GetProductCreateOrderInfo()
|
|
|
- break;
|
|
|
- case '2':
|
|
|
- console.log('购物车结算')
|
|
|
+ break
|
|
|
+ case '2':// 购物车结算
|
|
|
this.confirmParam.cartType = 1
|
|
|
this.confirmType = 2
|
|
|
- // this.productIds = this.cartParam.productIds = this.postageParam.productIds = data.data.productIds
|
|
|
this.productIds = this.cartParam.productIds = data.data.productIds
|
|
|
this.CartCreateOrderInfo()
|
|
|
- break;
|
|
|
- case '3':
|
|
|
- console.log('组合商品立即购买')
|
|
|
+ break
|
|
|
+ case '3':// 组合商品立即购买
|
|
|
this.confirmParam.cartType = 1
|
|
|
this.confirmType = 2
|
|
|
this.supportParm.productInfo = JSON.stringify(data.data)
|
|
@@ -546,6 +539,7 @@
|
|
|
if(this.orderShouldPayFee <1000){
|
|
|
this.showModal = true
|
|
|
this.contentModalText = '采购金额过小,将扣除500采美豆,建议您前往采美旗下“呵呵商城”小程序购买小额商品。' //操作文字提示语句
|
|
|
+ this.showModalstauts = 1
|
|
|
this.modalButton= [
|
|
|
{
|
|
|
text: '前往呵呵商城',
|
|
@@ -561,24 +555,6 @@
|
|
|
plain: false
|
|
|
}
|
|
|
]
|
|
|
- }else if(this.orderShouldPayFee <1000 && this.freightData.userBeans <0){
|
|
|
- this.showModal = true
|
|
|
- this.contentModalText = '您已有采美豆不足,不能提交订单。建议您前往采美旗下“呵呵商城”小程序购买小额商品。' //操作文字提示语句
|
|
|
- this.modalButton=[
|
|
|
- {
|
|
|
- text: '了解',
|
|
|
- type: 'gray',
|
|
|
- plain: true //是否空心
|
|
|
- },
|
|
|
- {
|
|
|
- text: '前往呵呵商城',
|
|
|
- customStyle: {
|
|
|
- color: '#fff',
|
|
|
- bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)'
|
|
|
- },
|
|
|
- plain: false
|
|
|
- }
|
|
|
- ]
|
|
|
}else{
|
|
|
this.handleClickOrderSubmitMit()
|
|
|
}
|
|
@@ -639,7 +615,28 @@
|
|
|
this.confirmParam.payInfo = JSON.parse(this.confirmParam.payInfo)
|
|
|
this.confirmParam.orderInfo = JSON.parse(this.confirmParam.orderInfo)
|
|
|
this.confirmParam.orderInvoice = JSON.parse(this.confirmParam.orderInvoice)
|
|
|
- this.$util.msg(error.msg,3000)
|
|
|
+ if(error.code == -3){
|
|
|
+ this.showModal = true
|
|
|
+ this.contentModalText = error.msg //操作文字提示语句
|
|
|
+ this.showModalstauts = 3
|
|
|
+ this.modalButton=[
|
|
|
+ {
|
|
|
+ text: '了解',
|
|
|
+ type: 'gray',
|
|
|
+ plain: true //是否空心
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text: '前往呵呵商城',
|
|
|
+ customStyle: {
|
|
|
+ color: '#fff',
|
|
|
+ bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)'
|
|
|
+ },
|
|
|
+ plain: false
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }else{
|
|
|
+ this.$util.msg(error.msg,3000)
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
handFreightAlertShow(){//显示邮费弹窗
|
|
@@ -655,7 +652,7 @@
|
|
|
},
|
|
|
handleClick(e){// 采购量过小提示弹窗
|
|
|
if (e.index == 1) {
|
|
|
- if( this.orderShouldPayFee <1000 ){
|
|
|
+ if( this.showModalstauts == 1){
|
|
|
this.showModal = false
|
|
|
this.handleClickOrderSubmitMit()
|
|
|
}else{
|
|
@@ -663,7 +660,7 @@
|
|
|
this.handleClickHeHeMiniApplet()
|
|
|
}
|
|
|
}else{
|
|
|
- if( this.orderShouldPayFee <1000 ){
|
|
|
+ if( this.showModalstauts == 1 ){
|
|
|
this.showModal = false
|
|
|
this.handleClickHeHeMiniApplet()
|
|
|
}else{
|