购买规格错误修复

master
gongfuxiang 2023-11-30 16:15:03 +08:00
parent 5aeaa9c3f6
commit 7ee1e06511
3 changed files with 21 additions and 10 deletions

View File

@ -56,7 +56,7 @@
<view :class="'oh buy-nav-btn-number-' + buy_button.count || 0">
<block v-for="(item, index) in buy_button.data" :key="index">
<view v-if="(item.name || null) != null && (item.type || null) != null" class="item fl bs-bb padding-horizontal-main">
<button :class="'cr-white round text-size-sm bg-' + ((item.color || 'main') == 'main' ? 'main' : 'main-pair')" type="default" @tap="spec_confirm_event" :data-type="item.type" hover-class="none">{{ item.name }}</button>
<button :class="'cr-white round text-size-sm bg-' + ((item.color || 'main') == 'main' ? 'main' : 'main-pair')" type="default" @tap="spec_confirm_event" :data-value="item.value" :data-type="item.type" hover-class="none">{{ item.name }}</button>
</view>
</block>
</view>
@ -216,13 +216,14 @@ export default {
goods_spec_base_original_price: "...",
});
//
var active =
temp_data[i]["value"]
.map(function (v) {
return v.is_active;
})
.join("") || null;
var active = temp_data[i]["value"].map(function (v) {
return v.is_active;
}).join("") || null;
if (active == null) {
//
self.spec_handle_dont(i);
//
var status = false;
for (var k in temp_data[i]["value"]) {
//
@ -642,6 +643,7 @@ export default {
//
var type = e == null ? this.buy_event_type : e.currentTarget.dataset.type || this.buy_event_type;
var value = e.currentTarget.dataset.value || null;
switch (type) {
case "buy":
//
@ -670,8 +672,17 @@ export default {
this.goods_cart_event(spec);
break;
// url
case "url":
if (value == null) {
app.globalData.showToast("url事件为空");
return false;
}
app.globalData.url_open(value);
break;
default:
app.globalData.showToast("操作事件类型有误");
app.globalData.showToast("操作事件类型有误("+type+")");
}
}
}

View File

@ -115,7 +115,7 @@
<text v-if="plugins_points_data.discount_type == 1" class="va-m">使{{ plugins_points_data.use_integral }}</text>
<view v-else class="dis-inline-block">
<text class="va-m">使用</text>
<input type="number" class="br radius dis-inline-block va-m tc text-size-xs padding-horizontal-sm margin-left-xs plugins-points-use-value" :value="actual_use_integral" @input="points_use_value_event" placeholder="抵扣" />
<input type="number" class="br radius dis-inline-block va-m tc text-size-xs padding-horizontal-sm margin-left-xs plugins-points-use-value" :value="actual_use_integral" @input="points_use_value_event" @confirm="points_use_value_confirm_event" placeholder="抵扣" />
<button type="default" size="mini" class="bg-grey-e cr-gray cr-base text-size-xs radius va-m margin-right-xs plugins-points-use-submit" @tap="points_use_value_confirm_event"></button>
<text class="va-m">个积分</text>
</view>

View File

@ -1100,7 +1100,7 @@
break;
//
default:
app.globalData.showToast('事件未处理');
app.globalData.showToast('事件未处理('+type+')');
}
},