门店详情支持指定下单类型
parent
032a2b4583
commit
bad124f8fe
|
|
@ -633,9 +633,15 @@
|
||||||
self.order_item_pay_success_handle(data, order_id);
|
self.order_item_pay_success_handle(data, order_id);
|
||||||
},
|
},
|
||||||
fail: (res) => {
|
fail: (res) => {
|
||||||
let msg = res.memo || res.errMsg || self.$t('paytips.paytips.6y488i');
|
let error = res.memo || res.errMsg || null;
|
||||||
let code = res.resultCode || res.errCode || res.errNo || null;
|
if(error != null) {
|
||||||
self.order_item_pay_fail_handle(data, order_id, msg+(code == null ? '' : '('+code+')'));
|
let code = res.resultCode || res.errCode || res.errNo || null;
|
||||||
|
if(code != null) {
|
||||||
|
error += '('+code+')';
|
||||||
|
}
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
self.order_item_pay_fail_handle(data, order_id, self.$t('paytips.paytips.6y488i'));
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -911,10 +911,12 @@
|
||||||
}
|
}
|
||||||
// 门店信息
|
// 门店信息
|
||||||
if((this.info || null) != null) {
|
if((this.info || null) != null) {
|
||||||
|
// 门店下单类型列表
|
||||||
|
var use_type_list = this.info.buy_use_type_list;
|
||||||
// 用户未设置类型则使用默认的
|
// 用户未设置类型则使用默认的
|
||||||
var active_index = this.get_cache_buy_use_type_active_index();
|
var active_index = this.get_cache_buy_use_type_active_index();
|
||||||
if(active_index !== null && active_index !== '') {
|
if(active_index !== null && active_index !== '') {
|
||||||
var temp = this.info.buy_use_type_list[active_index] || null;
|
var temp = use_type_list[active_index] || null;
|
||||||
if(temp != null) {
|
if(temp != null) {
|
||||||
data['active_index'] = active_index;
|
data['active_index'] = active_index;
|
||||||
data['data_index'] = temp.index;
|
data['data_index'] = temp.index;
|
||||||
|
|
@ -923,15 +925,26 @@
|
||||||
// 是否默认类型
|
// 是否默认类型
|
||||||
if(this.info.default_buy_use_type != undefined && this.info.default_buy_use_type != -1) {
|
if(this.info.default_buy_use_type != undefined && this.info.default_buy_use_type != -1) {
|
||||||
// 不在店铺设置的类型列表则默认0
|
// 不在店铺设置的类型列表则默认0
|
||||||
for (var i in this.info.buy_use_type_list) {
|
for (var i in use_type_list) {
|
||||||
if(this.info.buy_use_type_list[i]['index'] == this.info.default_buy_use_type) {
|
if(use_type_list[i]['index'] == this.info.default_buy_use_type) {
|
||||||
data['active_index'] = i;
|
data['active_index'] = i;
|
||||||
data['data_index'] = this.info.buy_use_type_list[i]['index'];
|
data['data_index'] = use_type_list[i]['index'];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 是否指定类型
|
||||||
|
if(this.params.buy_use_type !== undefined) {
|
||||||
|
var buy_use_type = parseInt(this.params.buy_use_type);
|
||||||
|
for (var i in use_type_list) {
|
||||||
|
if(use_type_list[i]['index'] == buy_use_type) {
|
||||||
|
data['active_index'] = i;
|
||||||
|
data['data_index'] = use_type_list[i]['index'];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1059,7 +1059,10 @@
|
||||||
if((this.$refs.realstore_cart || null) != null) {
|
if((this.$refs.realstore_cart || null) != null) {
|
||||||
return this.$refs.realstore_cart.buy_use_type_data();
|
return this.$refs.realstore_cart.buy_use_type_data();
|
||||||
}
|
}
|
||||||
return 0;
|
return {
|
||||||
|
active_index: 0,
|
||||||
|
data_index: 0,
|
||||||
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
// 商品事件
|
// 商品事件
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue