diff --git a/components/cart/cart.vue b/components/cart/cart.vue
index 16045d38..622d9215 100644
--- a/components/cart/cart.vue
+++ b/components/cart/cart.vue
@@ -26,7 +26,7 @@
-
+
{{ plugins_realstore_info.buy_use_type_list[plugins_realstore_buy_use_type_index]['name'] }}
diff --git a/components/realstore-cart/realstore-cart.vue b/components/realstore-cart/realstore-cart.vue
index 107e3fc1..727e028a 100644
--- a/components/realstore-cart/realstore-cart.vue
+++ b/components/realstore-cart/realstore-cart.vue
@@ -9,7 +9,7 @@
{{$t('goods-category.goods-category.ico62g')}}
-
+
{{$t('realstore-cart.realstore-cart.v437n6')}}
{{$t('realstore-cart.realstore-cart.6bmc34')}}{{info.buy_use_type_list[buy_use_type_index]['name']}})
@@ -60,7 +60,7 @@
-
+
{{$t('realstore-cart.realstore-cart.v437n6')}}
{{$t('realstore-cart.realstore-cart.6bmc34')}}{{info.buy_use_type_list[buy_use_type_index]['name']}})
@@ -175,6 +175,8 @@
// 操作按钮是否加载中
realstore_goods_data_cart_loading: true,
realstore_goods_data_cart_status: false,
+ realstore_goods_data_cart_type: null,
+ realstore_goods_data_cart_value: null,
realstore_goods_data_cart_text: this.$t('realstore-cart.realstore-cart.50lf68'),
};
},
@@ -214,7 +216,6 @@
info: info,
base: params.base || null,
source: params.source
-
});
// 商品来源
@@ -227,12 +228,22 @@
if(this.source != 'system-cart') {
// 店铺状态正常、是否指定商品、如果不存在操作按钮、不可以加入购物车则置空
var cart_status = false;
+ var cart_type = '';
var cart_text = '';
var realstore_goods_data = params.realstore_goods_data || null;
if(realstore_goods_data != null && (realstore_goods_data.buy_button || null) != null) {
// 是否存在错误
if((realstore_goods_data.buy_button.error || null) != null) {
cart_text = realstore_goods_data.buy_button.error;
+ // 是否展示型、门店存在客服电话则展示电话号码
+ if((realstore_goods_data.buy_button.data || null) != null && (realstore_goods_data.buy_button['data'][0] || null) != null && realstore_goods_data.buy_button['data'][0]['type'] == 'show') {
+ var cart_value = ((info.service_data || null) == null ? info.contacts_tel : (info.service_data.service_tel || info.contacts_tel)) || null;
+ if(cart_value != null) {
+ cart_status = true;
+ cart_type = 'show';
+ cart_text = this.$t('cart.cart.31h34v');
+ }
+ }
} else {
// 匹配是否可以加入购物车操作
if(realstore_goods_data.buy_button.data.length > 0) {
@@ -241,6 +252,7 @@
for(var i in buy_button) {
if(arr.indexOf(buy_button[i]['type']) != -1) {
cart_status = true;
+ cart_type = buy_button[i]['type'];
cart_text = this.$t('realstore-cart.realstore-cart.b27ln3');
break;
}
@@ -251,6 +263,8 @@
this.setData({
realstore_goods_data: realstore_goods_data,
realstore_goods_data_cart_status: cart_status,
+ realstore_goods_data_cart_type: cart_type,
+ realstore_goods_data_cart_value: cart_value,
realstore_goods_data_cart_loading: false,
realstore_goods_data_cart_text: cart_text,
});
@@ -351,7 +365,6 @@
// 购物车是否存在商品
if((this.cart || null) == null || parseInt(this.cart.buy_number || 0) == 0) {
btn_status = false;
- btn_text = this.$t('realstore-cart.realstore-cart.3qmxs7');
} else {
// 起步价
var msg = this.starting_price_handle();
@@ -406,6 +419,13 @@
// 加入购物车
cart_submit_event(e) {
+ // 是否展示模式、则拨打电话
+ if(this.realstore_goods_data_cart_type == 'show' && (this.realstore_goods_data_cart_value || null) != null) {
+ app.globalData.call_tel(this.realstore_goods_data_cart_value);
+ return false;
+ }
+
+ // 门店商品是否正常
if((this.realstore_goods_data || null) == null) {
app.globalData.showToast(this.$t('realstore-cart.realstore-cart.20epzm'));
return false;
diff --git a/lang/en.json b/lang/en.json
index c91de806..6eaab5c8 100644
--- a/lang/en.json
+++ b/lang/en.json
@@ -1631,7 +1631,6 @@
"50lf68": "Loading",
"b27ln3": "Add cart",
"47h2a0": "Request failed, please try again!",
- "3qmxs7": "Not purchased",
"miv944": "start",
"20epzm": "Product data incorrect",
"8tzr7l": "Incorrect store information"
diff --git a/lang/zh.json b/lang/zh.json
index fdd1982d..0120bb8e 100644
--- a/lang/zh.json
+++ b/lang/zh.json
@@ -1617,7 +1617,6 @@
"50lf68": "加载中",
"b27ln3": "加入购物车",
"47h2a0": "请求失败,请重试!",
- "3qmxs7": "未加购",
"miv944": "起步",
"20epzm": "商品数据有误",
"8tzr7l": "门店信息有误"