门店新增基础模式
parent
114c0150c8
commit
514f2d083d
|
|
@ -1084,12 +1084,12 @@ button[disabled].bg-grey {
|
|||
*/
|
||||
.header-service {
|
||||
width: 430rpx;
|
||||
left: 80rpx;
|
||||
top: 240rpx;
|
||||
left: calc(50% - 215rpx);
|
||||
top: calc(50vh - 360rpx);
|
||||
z-index: 10;
|
||||
font-size: 24rpx;
|
||||
-webkit-box-shadow: 0 10px 10px rgb(0 0 0 / 30%);
|
||||
box-shadow: 0 10px 10px rgb(0 0 0 / 30%);
|
||||
-webkit-box-shadow: 0 0 100px rgb(0 0 0 / 30%);
|
||||
box-shadow: 0 0 100px rgb(0 0 0 / 30%);
|
||||
}
|
||||
.header-service .item:first-child {
|
||||
border-top: 0 !important;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
</view>
|
||||
<!-- 右侧操作 -->
|
||||
<view class="icon-list pa">
|
||||
<view v-if="(item.contacts_tel || null) != null" class="icon-item dis-inline-block tc cp" :data-value="item.contacts_tel" @tap.stop="tel_event">
|
||||
<view v-if="(item.service_data || null) != null && (item.service_data.service_tel || null) != null" class="icon-item dis-inline-block tc cp" :data-value="item.service_data.service_tel" @tap.stop="tel_event">
|
||||
<iconfont name="icon-md-phone" size="40rpx"></iconfont>
|
||||
</view>
|
||||
<!-- #ifndef MP-KUAISHOU -->
|
||||
|
|
|
|||
|
|
@ -475,7 +475,7 @@
|
|||
</view>
|
||||
</block>
|
||||
<view v-else class="goods-buy-nav oh wh-auto bg-white br-top-shadow bottom-line-exclude flex-row jc-sb align-c">
|
||||
<button class="bg-white br-white round tc text-size-md wh-auto margin-horizontal-main" type="default" :loading="true">{{ $t('realstore-cart.realstore-cart.50lf68') }}</button>
|
||||
<button class="bg-white br-white round tc text-size-md wh-auto margin-horizontal-main cr-grey" type="default" :loading="true">{{ $t('realstore-cart.realstore-cart.50lf68') }}</button>
|
||||
</view>
|
||||
|
||||
<!-- 商品参数弹窗 -->
|
||||
|
|
|
|||
|
|
@ -94,9 +94,6 @@
|
|||
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
|
||||
<!-- 分享弹窗 -->
|
||||
<component-share-popup ref="share"></component-share-popup>
|
||||
</view>
|
||||
<view v-else>
|
||||
<!-- 提示信息 -->
|
||||
|
|
@ -118,7 +115,6 @@
|
|||
import componentGoodsSpecChoice from '@/components/goods-spec-choice/goods-spec-choice';
|
||||
import componentGoodsBuy from '@/components/goods-buy/goods-buy';
|
||||
import componentBadge from '@/components/badge/badge';
|
||||
import componentSharePopup from '@/components/share-popup/share-popup';
|
||||
let binding_static_url = app.globalData.get_static_url('binding', true);
|
||||
|
||||
export default {
|
||||
|
|
@ -145,8 +141,7 @@
|
|||
componentBottomLine,
|
||||
componentGoodsSpecChoice,
|
||||
componentGoodsBuy,
|
||||
componentBadge,
|
||||
componentSharePopup,
|
||||
componentBadge
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
|
|
|
|||
|
|
@ -141,11 +141,28 @@ page {
|
|||
}
|
||||
|
||||
/**
|
||||
* 客服弹窗
|
||||
* 独立模式下底部操作导航
|
||||
*/
|
||||
.header-service {
|
||||
left: auto;
|
||||
right: 24rpx;
|
||||
.button-list {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.button-list .item {
|
||||
height: 70rpx;
|
||||
padding: 0 40rpx;
|
||||
}
|
||||
.button-list .button-left {
|
||||
display: flex;
|
||||
width: 50%;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
.button-list .button-right {
|
||||
display: flex;
|
||||
width: 50%;
|
||||
}
|
||||
.button-list .button-right button {
|
||||
line-height: 70rpx;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -7,9 +7,12 @@
|
|||
<!-- 头部 -->
|
||||
<view class="header pr z-i">
|
||||
<component-nav-back :propIsShowBack="is_realstore_top_nav_back == 1" :propFixed="false" propColor="#333">
|
||||
<template slot="right" :class="is_mp_env ? 'top-search-width' : 'flex-1 flex-width'">
|
||||
<view :class="'va-m wh-auto top-nav-search '+(is_realstore_top_nav_back == 1 ? 'padding-left-main' : '')">
|
||||
<!-- #ifndef H5 -->
|
||||
<template slot="right" :class="is_top_search_width ? 'top-search-width' : 'flex-1 flex-width'">
|
||||
<view v-if="is_base_mode != 1" :class="'va-m wh-auto top-nav-search '+(is_realstore_top_nav_back == 1 ? 'padding-left-main' : '')">
|
||||
<block v-if="client_type == 'h5'">
|
||||
<component-search @onsearch="search_button_event" :propIsRequired="false" propIconColor="#333" propPlaceholderClass="cr-grey-c" :propPlaceholder="$t('detail.detail.q42ger')" propBgColor="#fff"></component-search>
|
||||
</block>
|
||||
<block v-else>
|
||||
<component-search
|
||||
@onsearch="search_button_event"
|
||||
@onicon="search_icon_event"
|
||||
|
|
@ -22,10 +25,7 @@
|
|||
propIconColor="#333"
|
||||
:propPlaceholder="$t('detail.detail.q42ger')"
|
||||
></component-search>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5 -->
|
||||
<component-search @onsearch="search_button_event" :propIsRequired="false" propIconColor="#333" propPlaceholderClass="cr-grey-c" :propPlaceholder="$t('detail.detail.q42ger')" propBgColor="#fff"></component-search>
|
||||
<!-- #endif -->
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
<template slot="content">
|
||||
|
|
@ -43,13 +43,13 @@
|
|||
<!-- 基础内容 -->
|
||||
<image :src="info.logo" mode="widthFix" class="logo border-radius-sm fl br" :data-value="info.logo" @tap="image_show_event"></image>
|
||||
<view class="base-right flex-1 flex-width">
|
||||
<view v-if="(info.buy_use_type_list || null) != null && info.buy_use_type_list.length > 0" class="use-type-icon pa text-size-xs cr-white bg-main" @tap="buy_use_type_event">
|
||||
<view v-if="is_base_mode != 1 && (info.buy_use_type_list || null) != null && info.buy_use_type_list.length > 0" class="use-type-icon pa text-size-xs cr-white bg-main" @tap="buy_use_type_event">
|
||||
<text class="va-m margin-right-xs">{{ info.buy_use_type_list[buy_use_type_index]['name'] }}</text>
|
||||
<view class="dis-inline-block va-m pr top-sm">
|
||||
<iconfont name="icon-arrow-bottom" size="28rpx" color="#fff"></iconfont>
|
||||
</view>
|
||||
</view>
|
||||
<view :class="'title fw-b text-size single-text ' + ((info.buy_use_type_list || null) != null && info.buy_use_type_list.length > 0 ? 'title-length-limit' : '')">
|
||||
<view :class="'title fw-b text-size single-text ' + (is_base_mode != 1 && (info.buy_use_type_list || null) != null && info.buy_use_type_list.length > 0 ? 'title-length-limit' : '')">
|
||||
<text v-if="(info.alias || null) != null" class="va-m title-icon border-radius-sm br-main cr-main text-size-xs padding-left-sm padding-right-sm margin-right-xs">{{ info.alias }}</text>
|
||||
<text class="va-m">{{ info.name }}</text>
|
||||
</view>
|
||||
|
|
@ -120,7 +120,36 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 内容 -->
|
||||
<!-- 内容、是否基础模式则展示门店介绍 -->
|
||||
<view v-if="is_base_mode == 1" class="padding-horizontal-main padding-top-main border-radius-main bg-white">
|
||||
<view class="fw-b title-left-border">门店介绍</view>
|
||||
<scroll-view :scroll-y="true" class="margin-top-sm cr-base text-size-sm" :style="content_style">{{info.describe}}</scroll-view>
|
||||
<view v-if="(data_base.is_service_info || 0) == 1" class="bg-white pf left-0 bottom-0 wh-auto padding-main bs-bb br-top-shadow">
|
||||
<view class="bottom-line-exclude button-list">
|
||||
<view class="button-left tc">
|
||||
<!-- #ifndef MP-KUAISHOU -->
|
||||
<view v-if="info.lat != 0 && info.lng != 0" propClass="item" @tap="address_map_event">
|
||||
<view>
|
||||
<iconfont name="icon-map-navigator" class="lh-sm" size="26rpx"></iconfont>
|
||||
</view>
|
||||
<view class="cr-base text-size-md">{{$t('detail.detail.688i26')}}</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<view class="item" @tap="share_event">
|
||||
<view>
|
||||
<iconfont name="icon-share-square" propClass="lh-sm" size="26rpx"></iconfont>
|
||||
</view>
|
||||
<view class="cr-base text-size-md">{{$t('common.share')}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="button-right">
|
||||
<button type="default" class="item br-main bg-main cr-white round text-size-md dis-block wh-auto" @tap="header_service_event">{{$t('cart.cart.31h34v')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<block v-else>
|
||||
<!-- 左侧分类和右侧商品 -->
|
||||
<view class="content oh bg-white pr flex-row jc-sb" :style="content_style">
|
||||
<!-- 左侧 -->
|
||||
<scroll-view :scroll-y="true" class="left-content ht-auto bg-base">
|
||||
|
|
@ -211,6 +240,7 @@
|
|||
|
||||
<!-- 商品购买 -->
|
||||
<component-goods-buy ref="goods_buy" :propCurrencySymbol="currency_symbol" v-on:CartSuccessEvent="goods_spec_cart_back_event"></component-goods-buy>
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
|
|
@ -220,7 +250,12 @@
|
|||
</view>
|
||||
|
||||
<!-- 门店购物车 -->
|
||||
<block v-if="is_base_mode != 1">
|
||||
<component-realstore-cart ref="realstore_cart" :propCurrencySymbol="currency_symbol" :propStatus="is_cart_nav" v-on:CartSuccessEvent="goods_opt_cart_back_event" v-on:BuyTypeSwitchEvent="buy_type_switch_event" v-on:CartDataBackEvent="cart_data_back_event"></component-realstore-cart>
|
||||
</block>
|
||||
|
||||
<!-- 分享弹窗 -->
|
||||
<component-share-popup ref="share"></component-share-popup>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
|
|
@ -232,6 +267,7 @@
|
|||
import componentBadge from '@/components/badge/badge';
|
||||
import componentPopup from '@/components/popup/popup';
|
||||
import componentRealstoreCart from '@/components/realstore-cart/realstore-cart';
|
||||
import componentSharePopup from '@/components/share-popup/share-popup';
|
||||
|
||||
var common_static_url = app.globalData.get_static_url('common');
|
||||
var status_bar_height = parseInt(app.globalData.get_system_info('statusBarHeight', 0, true));
|
||||
|
|
@ -242,15 +278,17 @@
|
|||
theme_color: app.globalData.get_theme_color(),
|
||||
status_bar_height: status_bar_height,
|
||||
common_static_url: common_static_url,
|
||||
is_mp_env: false,
|
||||
// #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-KUAISHOU
|
||||
is_mp_env: true,
|
||||
client_type: app.globalData.application_client_type(),
|
||||
currency_symbol: app.globalData.currency_symbol(),
|
||||
is_top_search_width: false,
|
||||
// #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-KUAISHOU || APP
|
||||
is_top_search_width: true,
|
||||
// #endif
|
||||
content_style: '',
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
data_is_loading: 0,
|
||||
currency_symbol: app.globalData.currency_symbol(),
|
||||
is_base_mode: 0,
|
||||
is_cart_nav: false,
|
||||
buy_use_type_index: 0,
|
||||
params: null,
|
||||
|
|
@ -332,7 +370,8 @@
|
|||
componentSearch,
|
||||
componentBadge,
|
||||
componentPopup,
|
||||
componentRealstoreCart
|
||||
componentRealstoreCart,
|
||||
componentSharePopup
|
||||
},
|
||||
props: {},
|
||||
|
||||
|
|
@ -404,21 +443,30 @@
|
|||
if (res.data.code == 0) {
|
||||
// 门店数据
|
||||
var data = res.data.data;
|
||||
// 基础配置
|
||||
var data_base = data.base || {};
|
||||
// 是否基础模式
|
||||
var is_base_mode = parseInt(data.is_base_mode || 0);
|
||||
// 桌码
|
||||
var tablecode = data.tablecode || null;
|
||||
// 内容其他高度
|
||||
var content_other_height = '364rpx';
|
||||
// #ifdef H5
|
||||
content_other_height = '376rpx';
|
||||
// #endif
|
||||
// 开启门店基础
|
||||
var base_mode_style = '0rpx';
|
||||
if(is_base_mode == 1) {
|
||||
// 开启了联系客服有底部按钮、则仅内容高度
|
||||
base_mode_style = ((data_base.is_service_info || 0) == 1) ? '240rpx' : '90rpx';
|
||||
}
|
||||
// 内容高度
|
||||
var content_style = 'height: calc(100vh - '+(this.client_type == 'h5' ? '376rpx' : '364rpx')+' - '+this.status_bar_height+'px - '+(tablecode == null ? '0rpx' : '44rpx')+ ' - '+base_mode_style+');';
|
||||
|
||||
this.setData({
|
||||
is_base_mode: is_base_mode,
|
||||
is_cart_nav: true,
|
||||
data_base: data.base || null,
|
||||
data_base: data_base,
|
||||
info: data.info || null,
|
||||
goods_category: data.goods_category || [],
|
||||
favor_user: data.favor_user || [],
|
||||
tablecode: tablecode,
|
||||
content_style: 'height: calc(100vh - '+content_other_height+' - '+this.status_bar_height+'px - '+(tablecode == null ? '0rpx' : '44rpx')+');',
|
||||
content_style: content_style,
|
||||
});
|
||||
|
||||
// 收藏处理
|
||||
|
|
@ -451,8 +499,11 @@
|
|||
},
|
||||
});
|
||||
|
||||
// 是否基础模式
|
||||
if(this.is_base_mode != 1) {
|
||||
// 获取购物车数据
|
||||
this.get_cart_data();
|
||||
}
|
||||
|
||||
// 下单类型索引
|
||||
this.setData({
|
||||
|
|
@ -461,7 +512,11 @@
|
|||
|
||||
// 获取数据、仅首次调用,获取列表接口
|
||||
if (this.is_first == 1) {
|
||||
// 是否基础模式
|
||||
if(this.is_base_mode != 1) {
|
||||
this.get_data_list();
|
||||
}
|
||||
// 非首次记录
|
||||
this.setData({
|
||||
is_first: 0,
|
||||
});
|
||||
|
|
@ -772,7 +827,7 @@
|
|||
|
||||
// 电话
|
||||
tel_event(e) {
|
||||
app.globalData.call_tel(this.info.service_tel || null);
|
||||
app.globalData.call_tel(e);
|
||||
},
|
||||
|
||||
// 图片预览
|
||||
|
|
@ -901,8 +956,17 @@
|
|||
this.setData({
|
||||
header_service_status: !this.header_service_status,
|
||||
});
|
||||
},
|
||||
|
||||
// 分享开启弹层
|
||||
share_event(e) {
|
||||
if ((this.$refs.share || null) != null) {
|
||||
this.$refs.share.init({
|
||||
share_info: this.share_info
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
|
|
|
|||
|
|
@ -382,7 +382,7 @@
|
|||
|
||||
// 电话
|
||||
tel_event(e) {
|
||||
app.globalData.call_tel(e.currentTarget.dataset.value || null);
|
||||
app.globalData.call_tel(e);
|
||||
},
|
||||
|
||||
// 图片预览
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@
|
|||
|
||||
// 电话
|
||||
tel_event(e) {
|
||||
app.globalData.call_tel(e.currentTarget.dataset.value || null);
|
||||
app.globalData.call_tel(e);
|
||||
},
|
||||
|
||||
// 图片预览
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<view class="signin-opration-group pa flex-col cr-white">
|
||||
<view v-if="(data_base.is_share || 0) == 1" class="share oh flex-row" @tap="share_event">
|
||||
<view class="content">
|
||||
<iconfont name="icon-qiandao-fenxiang" propClass="pr top-xs" size="32rpx"></iconfont>
|
||||
<iconfont name="icon-share-square" propClass="pr top-xs" size="32rpx"></iconfont>
|
||||
<text>{{$t('common.share')}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,10 @@
|
|||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-map-navigator:before {
|
||||
content: "\10183";
|
||||
}
|
||||
|
||||
.icon-down-mark:before {
|
||||
content: "\e729";
|
||||
}
|
||||
|
|
@ -250,7 +254,7 @@
|
|||
content: "\e6bc";
|
||||
}
|
||||
|
||||
.icon-qiandao-fenxiang:before {
|
||||
.icon-share-square:before {
|
||||
content: "\e6bd";
|
||||
}
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue