门店新增基础模式

master
gongfuxiang 2024-05-06 00:49:55 +08:00
parent 114c0150c8
commit 514f2d083d
11 changed files with 221 additions and 141 deletions

View File

@ -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;

View File

@ -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 -->

View File

@ -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>
<!-- 商品参数弹窗 -->

View File

@ -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) {

View File

@ -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;
}
/**

View File

@ -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>

View File

@ -382,7 +382,7 @@
//
tel_event(e) {
app.globalData.call_tel(e.currentTarget.dataset.value || null);
app.globalData.call_tel(e);
},
//

View File

@ -458,7 +458,7 @@
//
tel_event(e) {
app.globalData.call_tel(e.currentTarget.dataset.value || null);
app.globalData.call_tel(e);
},
//

View File

@ -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>

View File

@ -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.