门店详情支持指定下单类型

master
gongfuxiang 2025-05-23 18:19:13 +08:00
parent 032a2b4583
commit bad124f8fe
3 changed files with 30 additions and 8 deletions

View File

@ -633,9 +633,15 @@
self.order_item_pay_success_handle(data, order_id);
},
fail: (res) => {
let msg = res.memo || res.errMsg || self.$t('paytips.paytips.6y488i');
let code = res.resultCode || res.errCode || res.errNo || null;
self.order_item_pay_fail_handle(data, order_id, msg+(code == null ? '' : '('+code+')'));
let error = res.memo || res.errMsg || null;
if(error != null) {
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'));
},
});
}

View File

@ -911,10 +911,12 @@
}
//
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();
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) {
data['active_index'] = active_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) {
// 0
for (var i in this.info.buy_use_type_list) {
if(this.info.buy_use_type_list[i]['index'] == this.info.default_buy_use_type) {
for (var i in use_type_list) {
if(use_type_list[i]['index'] == this.info.default_buy_use_type) {
data['active_index'] = i;
data['data_index'] = this.info.buy_use_type_list[i]['index'];
data['data_index'] = use_type_list[i]['index'];
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;
},

View File

@ -1059,7 +1059,10 @@
if((this.$refs.realstore_cart || null) != null) {
return this.$refs.realstore_cart.buy_use_type_data();
}
return 0;
return {
active_index: 0,
data_index: 0,
};
},
//