商品规格点击支持展示模式
parent
ed0cf6f83d
commit
26ead98d87
|
|
@ -58,7 +58,7 @@
|
|||
<view v-if="(opt_button || null) != null && opt_button.length > 0" class="padding-bottom-main">
|
||||
<view :class="'oh buy-nav-btn-number-' + (opt_button.length || 0)">
|
||||
<block v-for="(item, index) in opt_button" :key="index">
|
||||
<view v-if="(item.name || null) != null && (item.type || null) != null && (item.type == 'cart' || item.type == 'buy')" class="item fl bs-bb padding-horizontal-main">
|
||||
<view v-if="(item.name || null) != null && (item.type || null) != null && (item.type == 'cart' || item.type == 'buy' || item.type == 'show')" 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-value="item.value" :data-type="item.type" hover-class="none">{{ item.name }}</button>
|
||||
</view>
|
||||
</block>
|
||||
|
|
@ -156,7 +156,7 @@
|
|||
var opt_button = [];
|
||||
var buy_button = params.buy_button || null;
|
||||
if (buy_button != null && (buy_button.data || null) != null && buy_button.data.length > 0) {
|
||||
var arr = ['buy', 'cart'];
|
||||
var arr = ['buy', 'cart', 'show'];
|
||||
for (var i in buy_button.data) {
|
||||
if (arr.indexOf(buy_button.data[i]['type']) != -1) {
|
||||
opt_button.push(buy_button.data[i]);
|
||||
|
|
@ -748,6 +748,13 @@
|
|||
var type = e == null ? this.buy_event_type : e.currentTarget.dataset.type || this.buy_event_type;
|
||||
var value = e == null ? null : e.currentTarget.dataset.value || null;
|
||||
switch (type) {
|
||||
// 展示型、商品页面规格选择展示型 拨打电话操作
|
||||
case 'show':
|
||||
case 'spec-show':
|
||||
app.globalData.call_tel(value || app.globalData.get_config('config.common_app_customer_service_tel'));
|
||||
break;
|
||||
|
||||
// 购买
|
||||
case 'buy':
|
||||
// 进入订单确认页面
|
||||
var data = {
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@
|
|||
"no_relevant_data_tips": "沒有相關資料",
|
||||
"internet_error_tips": "網絡開小差了哦~",
|
||||
"sub_error_retry_tips": "提交失敗,請重試!",
|
||||
"not_more_list_data_tips": "無更多清單數據"
|
||||
"not_more_list_data_tips": "無更多清單數據",
|
||||
"scan_name": "掃一掃"
|
||||
},
|
||||
"pages": {
|
||||
"index": "ShopXO",
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@
|
|||
"not_more_list_data_tips": "No more list data available",
|
||||
"login_in_text": "Logging in",
|
||||
"sending_in_text": "Sending",
|
||||
"sending": "Sending"
|
||||
"sending": "Sending",
|
||||
"scan_name": "Scan it"
|
||||
},
|
||||
"pages": {
|
||||
"index": "ShopXO",
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@
|
|||
"no_relevant_data_tips": "No hay datos relevantes",
|
||||
"internet_error_tips": "La red está un poco mal.",
|
||||
"sub_error_retry_tips": "¡La presentación falló, ¡ por favor, vuelva a intentarlo!",
|
||||
"not_more_list_data_tips": "No hay más datos de lista"
|
||||
"not_more_list_data_tips": "No hay más datos de lista",
|
||||
"scan_name": "Barrer"
|
||||
},
|
||||
"pages": {
|
||||
"index": "Shopxo",
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@
|
|||
"no_relevant_data_tips": "没有相关数据",
|
||||
"internet_error_tips": "网络开小差了哦~",
|
||||
"sub_error_retry_tips": "提交失败,请重试!",
|
||||
"not_more_list_data_tips": "无更多列表数据"
|
||||
"not_more_list_data_tips": "无更多列表数据",
|
||||
"scan_name": "扫一扫"
|
||||
},
|
||||
"pages": {
|
||||
"index": "ShopXO",
|
||||
|
|
|
|||
|
|
@ -535,10 +535,10 @@
|
|||
overflow-x: hidden;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.plugins-wholesale-container .item>view:nth-child(2n) {
|
||||
.plugins-wholesale-container .item:nth-child(2n)>view {
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.plugins-wholesale-container .item>view:nth-child(2n+1) {
|
||||
.plugins-wholesale-container .item:nth-child(2n+1)>view {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
.plugins-wholesale-container .spec-tips {
|
||||
|
|
|
|||
|
|
@ -242,9 +242,12 @@
|
|||
</view>
|
||||
|
||||
<!-- 规格选择 -->
|
||||
<view v-if="!plugins_realstore_cart_nav_status && goods.is_exist_many_spec == 1 && (buy_button || null) != null && (buy_button.is_buy || 0) + (buy_button.is_cart || 0) + (buy_button.is_show || 0) > 0" class="spec-container-view oh padding-horizontal-main padding-main border-radius-main bg-white arrow-right text-size-xs spacing-mb">
|
||||
<view v-if="!plugins_realstore_cart_nav_status && goods.is_exist_many_spec == 1 && (buy_button || null) != null && (buy_button.is_buy || 0) + (buy_button.is_cart || 0) + (buy_button.is_show || 0) > 0" class="spec-container-view oh padding-horizontal-main padding-main border-radius-main bg-white text-size-xs spacing-mb">
|
||||
<view class="fl item-title">{{$t('goods-detail.goods-detail.u401fi')}}</view>
|
||||
<view class="fr column-right-view border-radius-main cr-base single-text cp" @tap="nav_buy_submit_event" :data-type="(buy_button.is_buy || 0) == 1 ? 'buy' : (buy_button.is_cart || 0) == 1 ? 'cart' : 'show'">{{ goods_spec_selected_text }}</view>
|
||||
<view class="fr column-right-view border-radius-main single-text cp" @tap="nav_buy_submit_event" :data-type="(buy_button.is_buy || 0) == 1 ? 'buy' : (buy_button.is_cart || 0) == 1 ? 'cart' : 'spec-show'">
|
||||
<text class="text-size-xs cr-grey-9">{{ goods_spec_selected_text }}</text>
|
||||
<iconfont name="icon-arrow-right" color="#999" propClass="va-m"></iconfont>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
|
@ -270,7 +273,7 @@
|
|||
</text>
|
||||
</block>
|
||||
</view>
|
||||
<iconfont name="icon-arrow-right" color="#999"></iconfont>
|
||||
<iconfont name="icon-arrow-right" color="#999" propClass="va-m"></iconfont>
|
||||
</view>
|
||||
|
||||
<!-- 组合搭配 -->
|
||||
|
|
@ -1109,7 +1112,8 @@
|
|||
case 'show':
|
||||
app.globalData.call_tel(value || this.common_app_customer_service_tel);
|
||||
break;
|
||||
// 购买、加入购物车
|
||||
// 规格选择(展示模式)、购买、加入购物车
|
||||
case 'spec-show':
|
||||
case 'buy':
|
||||
case 'cart':
|
||||
this.setData({ buy_event_type: type });
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<view class="va-m dis-inline-block margin-right-xs">
|
||||
<iconfont name="icon-scan" size="28rpx" propClass="lh-il va-m" color="#CC2121"></iconfont>
|
||||
</view>
|
||||
<text class="va-m">扫一扫</text>
|
||||
<text class="va-m">{{$t('common.scan_name')}}</text>
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
Loading…
Reference in New Issue