优惠券下单支持自动选择、登录页面优化
parent
f8bec6622d
commit
353a7611f2
|
|
@ -807,13 +807,14 @@
|
|||
|
||||
// 优惠劵弹层开启
|
||||
plugins_coupon_open_event(e) {
|
||||
var index = e.currentTarget.dataset.index;
|
||||
var temp_list = this.plugins_coupon_data[index]['coupon_data']['coupon_list'];
|
||||
var index = e.currentTarget.dataset.index;
|
||||
var coupon_data = this.plugins_coupon_data[index]['coupon_data'];
|
||||
var coupon_choice = coupon_data.coupon_choice || null;
|
||||
var temp_list = coupon_data.coupon_list || [];
|
||||
// 选中处理
|
||||
if (temp_list.length > 0) {
|
||||
var temp_ids = this.plugins_use_coupon_ids;
|
||||
for (var i in temp_list) {
|
||||
temp_list[i]['is_active'] = temp_ids.indexOf(temp_list[i]['id']) != -1 ? 1 : 0;
|
||||
temp_list[i]['is_active'] = (coupon_choice.id == temp_list[i]['id']) ? 1 : 0;
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
|
|
@ -837,23 +838,25 @@
|
|||
var temp_ids = this.plugins_use_coupon_ids;
|
||||
if (this.popup_plugins_coupon_index !== null && temp_ids.indexOf(value) == -1) {
|
||||
var temp_data = this.plugins_coupon_data[this.popup_plugins_coupon_index];
|
||||
var temp_list = this.plugins_coupon_list;
|
||||
var temp_list = this.plugins_coupon_list;
|
||||
// 当前索引数据已选中则不处理
|
||||
if((temp_list[index]['is_active'] || 0) != 1) {
|
||||
// 选中处理
|
||||
for (var i in temp_list) {
|
||||
temp_list[i]['is_active'] = index == i ? 1 : 0;
|
||||
}
|
||||
|
||||
// 选中处理
|
||||
for (var i in temp_list) {
|
||||
temp_list[i]['is_active'] = index == i ? 1 : 0;
|
||||
// 根据仓库id和优惠券id记录
|
||||
temp_ids[temp_data['warehouse_id']] = value;
|
||||
this.setData({
|
||||
plugins_use_coupon_ids: temp_ids,
|
||||
plugins_coupon_list: temp_list,
|
||||
popup_plugins_coupon_status: false,
|
||||
});
|
||||
|
||||
// 重新获取数据
|
||||
this.init();
|
||||
}
|
||||
|
||||
// 根据仓库id和优惠券id记录
|
||||
temp_ids[temp_data['warehouse_id']] = value;
|
||||
this.setData({
|
||||
plugins_use_coupon_ids: temp_ids,
|
||||
plugins_coupon_list: temp_list,
|
||||
popup_plugins_coupon_status: false,
|
||||
});
|
||||
|
||||
// 重新获取数据
|
||||
this.init();
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
</block>
|
||||
|
||||
<!-- 站点logo -->
|
||||
<image v-if="current_opt_form != 'bind' && current_opt_form != 'bind_verify' && current_opt_form != 'success'" class="icon circle auto dis-block br" :src="home_site_logo_square" mode="widthFix"></image>
|
||||
<image v-if="(home_site_logo_square || null) != null && current_opt_form != 'bind' && current_opt_form != 'bind_verify' && current_opt_form != 'success'" class="icon circle auto dis-block br" :src="home_site_logo_square" mode="widthFix"></image>
|
||||
|
||||
<!-- 非登录成功则需要展示的数据 -->
|
||||
<block v-if="current_opt_form != 'success'">
|
||||
|
|
@ -541,7 +541,7 @@
|
|||
// 数据处理
|
||||
var type = user == null ? 'auth' : 'bind';
|
||||
var form = type;
|
||||
var is_base = (this.home_site_logo_square || null) != null ? 1 : 0;
|
||||
var is_base = app.globalData.data.common_data_init_status || 0;
|
||||
// #ifdef H5 || APP
|
||||
if (user == null) {
|
||||
// 非小程序:如果开启登录则取第一个登录方式
|
||||
|
|
|
|||
Loading…
Reference in New Issue