Merge branch 'dev' of gitee.com:zongzhige/shopxo-uniapp into dev-sws

master
sws 2024-10-10 14:04:55 +08:00
commit f0696d0eef
14 changed files with 599 additions and 791 deletions

View File

@ -26,8 +26,8 @@
</view>
</view>
<view class="buttom tc margin-top-xxxl padding-top-lg">
<button type="default" size="mini" class="br-grey cr-base bg-white text-size-sm round margin-right-xxxl" @tap="exit_event">{{$t('agreement.agreement.062co8')}}</button>
<button type="default" size="mini" class="br-main cr-white bg-main text-size-sm round margin-left-xxxl" open-type="agreePrivacyAuthorization" @agreeprivacyauthorization="agree_privacy_auth_event">{{$t('agreement.agreement.60t34e')}}</button>
<button type="default" size="mini" class="btn br-grey cr-base bg-white text-size-sm round margin-right-xxxl" @tap="exit_event">{{$t('agreement.agreement.062co8')}}</button>
<button type="default" size="mini" class="btn br-main cr-white bg-main text-size-sm round margin-left-xxxl" open-type="agreePrivacyAuthorization" @agreeprivacyauthorization="agree_privacy_auth_event">{{$t('agreement.agreement.60t34e')}}</button>
</view>
</view>
</view>
@ -229,7 +229,7 @@
max-height: calc(30vh);
overflow-y: auto;
}
.agreement-content .buttom button {
.agreement-content .buttom .btn {
min-width: 200rpx;
}
</style>

View File

@ -36,10 +36,10 @@
</view>
</view>
<view v-else-if="propStatusType == 4" class="card-image pa top-0 right-0">
<image :src="coupon_static_url + 'coupon-used.png'" mode="scaleToFill"></image>
<image class="image" :src="coupon_static_url + 'coupon-used.png'" mode="scaleToFill"></image>
</view>
<view v-else-if="propStatusType == 5" class="card-image pa top-0 right-0">
<image :src="coupon_static_url + 'coupon-expire.png'" mode="scaleToFill"></image>
<image class="image" :src="coupon_static_url + 'coupon-expire.png'" mode="scaleToFill"></image>
</view>
<view v-else @tap="receive">{{$t('coupon-card.coupon-card.j318xx')}}</view>
</view>
@ -223,7 +223,7 @@
bottom: -20rpx;
}
.card-image image {
.card-image .image {
width: 136rpx;
height: 108rpx;
}

View File

@ -44,7 +44,7 @@
<text v-if="(item.base.inventory || 0) == 0" class="fr text-size-xs cr-grey">{{$t('goods-batch-buy.goods-batch-buy.dsfd98')}}</text>
<view v-else class="tc oh round fr item-right text-size-xs">
<view @tap="batchbuy_goods_buy_number_event" class="number-submit tc cr-grey fl va-m" data-type="0" :data-index="index">-</view>
<input @blur="batchbuy_goods_buy_number_blur" class="tc cr-grey bg-white fl va-m radius-0" type="number" :value="item.buy_number || 0" :data-index="index" />
<input @blur="batchbuy_goods_buy_number_blur" class="number-input tc cr-grey bg-white fl va-m radius-0" type="number" :value="item.buy_number || 0" :data-index="index" />
<view @tap="batchbuy_goods_buy_number_event" class="number-submit tc cr-grey fl va-m" data-type="1" :data-index="index">+</view>
</view>
</view>
@ -536,11 +536,11 @@ export default {
width: 80rpx;
font-weight: bold;
}
.plugins-batchbuy-container .item-right input {
.plugins-batchbuy-container .item-right .number-input {
width: 50px;
}
.plugins-batchbuy-container .item-right .number-submit,
.plugins-batchbuy-container .item-right input {
.plugins-batchbuy-container .item-right .number-input {
padding: 0;
height: 60rpx;
line-height: 60rpx;

View File

@ -17,9 +17,9 @@
</view>
<view class="base-content oh padding-vertical-sm">
<view class="content cr-base text-size-sm">{{ item.content }}</view>
<view v-if="(item.images || null) != null && item.images.length > 0" class="images oh margin-top-lg">
<view v-if="(item.images || null) != null && item.images.length > 0" class="image-list oh margin-top-lg">
<block v-for="(iv, ix) in item.images" :key="ix">
<image class="br radius" @tap="comment_images_show_event" :data-index="index" :data-ix="ix" :src="iv" mode="aspectFit"></image>
<image class="image br radius" @tap="comment_images_show_event" :data-index="index" :data-ix="ix" :src="iv" mode="aspectFit"></image>
</block>
</view>
<view v-if="(item.msg || null) != null" class="spec cr-grey margin-top-lg">{{ item.msg }}</view>
@ -45,10 +45,8 @@
export default {
props: {
propData: {
type: Array,
default: () => {
return [];
},
type: [Array,String],
default: '',
},
//
propIsReply: {
@ -76,8 +74,8 @@
var index = e.currentTarget.dataset.index;
var ix = e.currentTarget.dataset.ix;
uni.previewImage({
current: this.goods.comments_data[index]['images'][ix],
urls: this.goods.comments_data[index]['images'],
current: this.propData[index]['images'][ix],
urls: this.propData[index]['images'],
});
},
},
@ -114,11 +112,11 @@
.goods-comment-item .base-content .reply {
line-height: 46rpx;
}
.goods-comment-item .base-content .images image {
.goods-comment-item .base-content .image-list .image {
width: 100rpx;
height: 100rpx;
}
.goods-comment-item .base-content .images image:not(:last-child) {
.goods-comment-item .base-content .image-list .image:not(:last-child) {
margin-right: 10rpx;
}
.no-comment {

View File

@ -10,14 +10,14 @@
<view class="share-popup-content">
<!-- #ifdef MP-ALIPAY -->
<view class="share-items oh cp" @tap="share_base_event">
<image :src="common_static_url + 'share-user-icon.png'" mode="scaleToFill"></image>
<image class="image" :src="common_static_url + 'share-user-icon.png'" mode="scaleToFill"></image>
<text class="cr-grey text-size-xs single-text">{{ $t('share-popup.share-popup.h04xiy') }}</text>
</view>
<!-- #endif -->
<!-- #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-TOUTIAO || MP-KUAISHOU -->
<view class="share-items oh cp">
<button class="dis-block br-0 ht-auto" type="default" size="mini" open-type="share" hover-class="none" @tap="popup_close_event">
<image :src="common_static_url + 'share-user-icon.png'" mode="scaleToFill"></image>
<button class="btn dis-block br-0 ht-auto" type="default" size="mini" open-type="share" hover-class="none" @tap="popup_close_event">
<image class="image" :src="common_static_url + 'share-user-icon.png'" mode="scaleToFill"></image>
<text class="cr-grey text-size-xs single-text">{{ $t('share-popup.share-popup.h04xiy') }}</text>
</button>
</view>
@ -25,33 +25,33 @@
<!-- #ifdef APP -->
<block v-if="is_app_weixin">
<view class="share-items oh cp" data-scene="WXSceneSession" data-provider="weixin" @tap="share_app_event">
<image :src="common_static_url + 'share-user-icon.png'" mode="scaleToFill"></image>
<image class="image" :src="common_static_url + 'share-user-icon.png'" mode="scaleToFill"></image>
<text class="cr-grey text-size-xs single-text">{{ $t('share-popup.share-popup.rhs2c5') }}</text>
</view>
<view class="share-items oh cp" data-scene="WXSceneTimeline" data-provider="weixin" @tap="share_app_event">
<image :src="common_static_url + 'share-friend-icon.png'" mode="scaleToFill"></image>
<image class="image" :src="common_static_url + 'share-friend-icon.png'" mode="scaleToFill"></image>
<text class="cr-grey text-size-xs single-text">{{ $t('share-popup.share-popup.mv9l10') }}</text>
</view>
<view class="share-items oh cp" data-scene="WXSceneFavorite" data-provider="weixin" @tap="share_app_event">
<image :src="common_static_url + 'share-favor-icon.png'" mode="scaleToFill"></image>
<image class="image" :src="common_static_url + 'share-favor-icon.png'" mode="scaleToFill"></image>
<text class="cr-grey text-size-xs single-text">{{ $t('share-popup.share-popup.f08y38') }}</text>
</view>
</block>
<block v-if="is_app_qq">
<view class="share-items oh cp" data-provider="qq" @tap="share_app_event">
<image :src="common_static_url + 'share-qq-icon.png'" mode="scaleToFill"></image>
<image class="image":src="common_static_url + 'share-qq-icon.png'" mode="scaleToFill"></image>
<text class="cr-grey text-size-xs single-text">{{ $t('share-popup.share-popup.1242w9') }}</text>
</view>
</block>
<!-- #endif -->
<!-- #ifdef H5 || APP -->
<view class="share-items oh cp" @tap="share_url_copy_event">
<image :src="common_static_url + 'share-url-icon.png'" mode="scaleToFill"></image>
<image class="image" :src="common_static_url + 'share-url-icon.png'" mode="scaleToFill"></image>
<text class="cr-grey text-size-xs single-text">{{ $t('share-popup.share-popup.1oh013') }}</text>
</view>
<!-- #endif -->
<view v-if="is_goods_poster == 1 && (goods_id || 0) != 0" class="share-items oh cp" @tap="poster_event">
<image :src="common_static_url + 'share-poster-icon.png'" mode="scaleToFill"></image>
<image class="image" :src="common_static_url + 'share-poster-icon.png'" mode="scaleToFill"></image>
<text class="cr-grey text-size-xs single-text">{{ $t('share-popup.share-popup.dcp2qu') }}</text>
</view>
</view>
@ -272,14 +272,14 @@
.share-popup-content .share-items:not(:first-child) {
border-top: 1px solid #f0f0f0;
}
.share-popup-content .share-items button {
.share-popup-content .share-items .btn {
background: transparent;
padding: 0;
width: 100%;
text-align: left;
margin: 0;
}
.share-popup-content .share-items image {
.share-popup-content .share-items .image {
width: 80rpx;
height: 80rpx;
vertical-align: middle;

View File

@ -331,13 +331,13 @@
<!-- 购物车底部导航 -->
<view class="botton-nav bg-white round pa oh padding-sm flex-row jc-sb align-c" :style="botton_nav_style+(cart_status ? 'z-index:5;' : '')">
<view class="flex-row align-c flex-1 flex-width">
<view class="cart pr cp top-sm padding-left-lg" @tap="cart_event">
<view class="cart pr cp top-sm padding-left-sm" @tap="cart_event">
<iconfont name="icon-applet-shop-acquiesce" size="36rpx" color="#666"></iconfont>
<view v-if="(cart || null) != null && (cart.buy_number || 0) != 0" class="badge-icon pa">
<component-badge :propNumber="cart.buy_number"></component-badge>
</view>
</view>
<view class="cart-total-price single-text padding-left-lg fw-b cr-red flex-1">
<view class="cart-total-price single-text padding-left-sm fw-b cr-red flex-1">
<text class="text-size-xss">{{ currency_symbol }}</text>
<text class="text-size-lg">{{ (cart || null) == null ? 0 : cart.total_price || 0 }}</text>
</view>

View File

@ -436,7 +436,7 @@
</view>
<!-- 左侧购买导航列表 -->
<block v-if="buy_left_nav.length > 0">
<block v-for="(item, index) in buy_left_nav">
<block v-for="(item, index) in buy_left_nav" :key="index">
<!-- 不展示收藏 -->
<block v-if="item.type != 'favor'">
<!-- 客服 -->

View File

@ -24,7 +24,7 @@
<image :src="avatar" mode="aspectFill" class="user-avatar fl circle"></image>
<view class="right-base flex-1 flex-width">
<view class="comments border-radius-main padding-main">
<textarea :placeholder="$t('ask-comments.ask-comments.m67961')" placeholder-class="cr-base" class="wh-auto bg-grey-f8" :value="input_comments_value" :maxlength="input_comments_length_max" @input="comments_input_event" @blur="comments_input_event"></textarea>
<textarea :placeholder="$t('ask-comments.ask-comments.m67961')" placeholder-class="cr-base" class="textarea wh-auto bg-grey-f8" :value="input_comments_value" :maxlength="input_comments_length_max" @input="comments_input_event" @blur="comments_input_event"></textarea>
<view class="oh flex-row jc-sb align-e">
<image :src="common_static_url + 'emoji-icon.png'" mode="aspectFill" class="emoji-icon va-m" @tap="emoji_event"></image>
<view class="flex-row align-e">
@ -121,7 +121,7 @@
</view>
</view>
</view>
<textarea :placeholder="$t('ask-comments.ask-comments.m67961')" placeholder-class="cr-base" class="wh-auto br padding-main" :value="input_comments_value" :maxlength="input_comments_length_max" @input="comments_input_event" @blur="comments_input_event"></textarea>
<textarea :placeholder="$t('ask-comments.ask-comments.m67961')" placeholder-class="cr-base" class="textarea wh-auto br padding-main" :value="input_comments_value" :maxlength="input_comments_length_max" @input="comments_input_event" @blur="comments_input_event"></textarea>
<view class="margin-top-lg oh">
<image :src="common_static_url + 'emoji-icon.png'" mode="aspectFill" class="emoji-icon va-m" @tap="emoji_event"></image>
<view class="fr">
@ -492,8 +492,8 @@
// url
url_event(e) {
app.globalData.url_event(e);
},
},
}
}
};
</script>
<style scoped>
@ -519,7 +519,7 @@
.ask-comments-reply-container .right-base .comments {
background-color: #f8f8f8;
}
.ask-comments-reply-container .right-base textarea {
.ask-comments-reply-container .right-base .textarea {
height: 120rpx;
}
.ask-comments-modal {
@ -538,7 +538,7 @@
margin-top: 30%;
max-width: calc(800px - 180rpx);
}
.ask-comments-modal-content textarea {
.ask-comments-modal-content .textarea {
height: 200rpx;
}
.ask-comments-modal-content .close {

View File

@ -0,0 +1,468 @@
<template>
<view :class="theme_view">
<!-- 搜索 -->
<view class="flex-row jc-sb align-c padding-main bg-white pr oh">
<view class="flex-1 wh-auto">
<view class="search flex-row jc-sb align-c round border-color-main bg-white">
<view class="flex-row align-c flex-1 wh-auto padding-left-main">
<iconfont name="icon-index-search" size="28rpx" color="#ccc"></iconfont>
<input class="text-size-md flex-1 wh-auto padding-left-sm" type="done" :placeholder="$t('detail.detail.8q6345')" :value="search_keywords_value || ''" placeholder-class="cr-grey-c" @input="search_keywords_event" />
</view>
<button class="bg-main br-main cr-white round text-size-xs" type="default" size="mini" hover-class="none" @tap="search_button_event" :data-value="'/pages/plugins/shop/search/search?shop_id=' + propShop.id + '&'">
{{ is_shop_search_all_search_button == 1 ? $t('design.design.i7725u') : $t('common.search') }}
</button>
</view>
</view>
<view v-if="is_shop_search_all_search_button == 1" class="search-btn padding-left-main flex-row align-c">
<button class="bg-main-pair br-main-pair cr-white round text-size-xs" type="default" size="mini" hover-class="none" @tap="search_button_event" data-value="/pages/goods-search/goods-search?">{{$t('design.design.ay7m42')}}</button>
</view>
</view>
<!-- 顶部 -->
<view class="header plugins-shop-data-list bg-white oh">
<image :src="propShop.logo" mode="widthFix" class="shop-logo fl border-radius-main cp" @tap="image_show_event" :data-value="propShop.logo"></image>
<view class="base fr item">
<view class="shop-title single-text">
<!-- 认证信息 -->
<view v-if="(propBase.is_enable_auth || 0) == 1 && ((propShop.auth_type != -1 && (propShop.auth_type_msg || null) != null) || ((propShop.bond_status || 0) == 1 && (propShop.bond_status_msg || null) != null))" class="auth-icon dis-inline-block">
<!-- 实名认证 -->
<block v-if="propShop.auth_type != -1 && (propShop.auth_type_msg || null) != null">
<image :src="propShop.auth_type == 0 ? propBase.shop_auth_personal_icon : propBase.shop_auth_company_icon" class="icon va-m" mode="aspectFill" :data-value="'/pages/plugins/shop/license/license?id=' + propShop.id" @tap="url_event"></image>
</block>
<!-- 保证金认证 -->
<block v-if="(propShop.bond_status || 0) == 1 && (propShop.bond_status_msg || null) != null">
<image :src="propBase.shop_auth_bond_icon" class="icon va-m" mode="aspectFill"></image>
</block>
</view>
<!-- 标题 -->
<text class="fw-b text-size va-m">{{ propShop.name }}</text>
</view>
<view class="base-bottom oh margin-top-sm text-size-xs">
<!-- 在线客服 -->
<view v-if="(propBase.is_service_info || 0) == 1" class="fl margin-right-xxl cp" @tap="popup_service_open_event">
<image class="va-m margin-right-sm" :src="common_static_url + 'customer-service-icon.png'" mode="scaleToFill"></image>
<text class="va-m cr-base">{{$t('design.design.21kak7')}}</text>
</view>
<!-- 收藏 -->
<view class="fl single-text cp" @tap="shop_favor_event">
<image class="va-m margin-right-sm" :src="common_static_url + 'favor' + (shop_favor_info.status == 1 ? '-active' : '') + '-icon.png'" mode="scaleToFill"></image>
<text :class="'va-m ' + (shop_favor_info.status == 1 ? 'cr-main' : '')">{{ shop_favor_info.text }}({{ shop_favor_info.count }})</text>
</view>
<!-- 评分 -->
<view v-if="(propShop.score_data || null) != null" class="fl margin-left-xxl">
<view class="dis-inline-block va-m">
<uni-rate :value="propShop.score_data.value" :readonly="true" :is-fill="false" :size="14" />
</view>
<text class="va-m cr-red">{{ propShop.score_data.value }}{{$t('design.design.745kx2')}}</text>
</view>
</view>
</view>
</view>
<!-- 导航 -->
<view v-if="((propShopGoodsCategory || null) != null && propShopGoodsCategory.length > 0) || ((shop_navigation || null) != null && shop_navigation.length > 0)" class="nav bg-white padding-sm flex-row">
<view v-if="propShopGoodsCategory.length > 0" class="item padding-main arrow-bottom nav-shop-category dis-inline-block cp" @tap="nav_shop_category_event">{{$t('recommend-form.recommend-form.203itn')}}</view>
<scroll-view scroll-x class="nav-scroll">
<view class="pr flex-row">
<block v-if="(shop_navigation || null) != null && shop_navigation.length > 0">
<block v-for="(item, index) in shop_navigation" :key="index">
<block v-if="(item.items || null) == null || item.items.length == 0">
<view class="item par dis-inline-block cp" @tap="nav_event" :data-value="item.url" :data-index="index">{{ item.name }}</view>
</block>
<block v-else>
<view class="item par dis-inline-block cp" @tap="nav_event" :data-index="index">{{ item.name }}</view>
<view v-if="(item.items_status || 0) == 1" class="nav-items pf oh bg-white cr-base">
<block v-for="(items, index2) in item.items" :key="index2">
<view class="item cp" @tap="nav_event" :data-value="items.url" :data-index="index" :data-indexs="index2">{{ items.name }}</view>
</block>
</view>
</block>
</block>
</block>
</view>
</scroll-view>
<view v-if="nav_category_status" class="nav-category bg-white pa">
<scroll-view scroll-y class="category-scroll">
<block v-if="(propShopGoodsCategory || null) != null && propShopGoodsCategory.length > 0">
<block v-for="(item, index) in propShopGoodsCategory" :key="index">
<view class="item dis-block cr-base single-text cp" @tap="shop_category_event" :data-value="item.id">{{ item.name }}</view>
<block v-if="(item.items || null) != null && item.items.length > 0">
<view v-for="(item2, index2) in item.items" :key="index2" class="padding-left-xl">
<view class="item dis-block cr-base single-text cp" @tap="shop_category_event" :data-value="item2.id">{{ item2.name }}</view>
</view>
</block>
</block>
</block>
<block v-else>
<view class="padding-top-xxl padding-bottom-xxl cr-grey">{{$t('design.design.83occ4')}}</view>
</block>
</scroll-view>
</view>
</view>
<!-- 客服弹窗 -->
<component-popup :propShow="popup_service_status" propPosition="bottom" @onclose="popup_service_close_event">
<view class="padding-top-main bg-white">
<view class="padding-horizontal-main">
<view class="close oh">
<view class="fr" @tap.stop="popup_service_close_event">
<iconfont name="icon-close-o" size="28rpx" color="#999"></iconfont>
</view>
</view>
</view>
<view class="popup-service-container">
<view v-if="(propShop || null) != null && (propBase || null) != null && (propBase.is_service_info || 0) == 1" class="header-service">
<view v-if="(propShop.chat_info || null) != null" class="item padding-main single-text">
<text class="va-m">{{$t('detail.detail.r4124d')}}</text>
<view class="dis-inline-block chat-info cp" @tap="chat_event">
<image class="dis-inline-block va-m" :src="propShop.chat_info.icon" mode="scaleToFill"></image>
<text class="margin-left-sm va-m cr-blue" :data-value="propShop.chat_info.chat_url">{{ propShop.chat_info.name }}</text>
</view>
</view>
<view v-if="(propShop.service_qq || null) != null" class="item padding-main br-t-f9 single-text">
<text>Q Q</text>
<text class="cp" @tap="text_copy_event" :data-value="propShop.service_qq">{{ propShop.service_qq }}</text>
</view>
<view v-if="(propShop.service_tel || null) != null" class="item padding-main br-t-f9 single-text">
<text>{{$t('order.order.7dxbm5')}}</text>
<text class="cp" @tap="tel_event" :data-value="propShop.service_tel">{{ propShop.service_tel }}</text>
</view>
<view v-if="(propShop.open_week_name || null) != null && (propShop.close_week_name || null) != null" class="item padding-main br-t-f9 single-text">
<text>{{$t('article-detail.article-detail.728374')}}</text>
<text class="cp" @tap="text_copy_event" :data-value="propShop.open_week_name + $t('design.design.gv16tj') + propShop.close_week_name + '' + propShop.open_time + '-' + propShop.close_time">{{ propShop.open_week_name }}{{$t('detail.detail.324777')}}{{ propShop.close_week_name }}{{ propShop.open_time }}-{{ propShop.close_time }}</text>
</view>
<view v-if="(propShop.service_weixin_qrcode || null) != null || (propShop.service_line_qrcode || null) != null" class="oh qrcode tc br-t-f9 padding-top-main">
<view v-if="(propShop.service_weixin_qrcode || null) != null" class="item padding-bottom-lg dis-inline-block">
<image class="radius cp" :src="propShop.service_weixin_qrcode" mode="scaleToFill" @tap="image_show_event" :data-value="propShop.service_weixin_qrcode"></image>
<view>{{$t('detail.detail.54k10s')}}</view>
</view>
<view v-if="(propShop.service_line_qrcode || null) != null" class="item padding-bottom-lg dis-inline-block">
<image class="radius cp" :src="propShop.service_line_qrcode" mode="scaleToFill" @tap="image_show_event" :data-value="propShop.service_line_qrcode"></image>
<view>{{$t('detail.detail.vj4nom')}}</view>
</view>
</view>
</view>
</view>
</view>
</component-popup>
</view>
</template>
<script>
const app = getApp();
import componentPopup from '@/components/popup/popup';
var common_static_url = app.globalData.get_static_url('common');
export default {
props: {
propBase: {
type: [Object,String],
default: '',
},
propShop: {
type: [Object,String],
default: '',
},
propShopGoodsCategory: {
type: [Array,String],
default: '',
},
propShopNavigation: {
type: [Array,String],
default: '',
},
propShopFavorUser: {
type: [Array,Object],
default: '',
},
},
data() {
return {
theme_view: app.globalData.get_theme_value_view(),
common_static_url: common_static_url,
is_shop_search_all_search_button: 0,
search_keywords_value: '',
popup_service_status: false,
nav_category_status: false,
shop_category_tab_value: 0,
shop_navigation: [],
shop_favor_info: {
"text": this.$t('goods-detail.goods-detail.dco1sc'),
"status": 0,
"count": 0
},
};
},
components: {
componentPopup
},
created() {
this.init();
},
methods: {
//
init() {
var upd_data = {
is_shop_search_all_search_button: (this.propBase == null || parseInt(this.propBase.is_shop_search_all_search_button || 0) != 1) ? 0 : 1,
shop_navigation: this.propShopNavigation,
}
//
if ((this.propShop || null) != null) {
var status = this.propShopFavorUser.indexOf(this.propShop.id) != -1 ? 1 : 0;
upd_data['shop_favor_info'] = {
count: this.propShop.shop_favor_count || 0,
status: status,
text: (status == 1 ? this.$t('goods-detail.goods-detail.by7052') : '') + this.$t('goods-detail.goods-detail.dco1sc')
};
}
this.setData(upd_data);
},
//
shop_favor_event(e) {
var user = app.globalData.get_user_info(this, 'shop_favor_event');
if (user != false) {
uni.showLoading({
title: this.$t('common.processing_in_text')
});
uni.request({
url: app.globalData.get_request_url("favor", "shopfavor", "shop"),
method: 'POST',
data: {
"id": this.propShop.id
},
dataType: 'json',
success: res => {
uni.hideLoading();
if (res.data.code == 0) {
this.setData({
shop_favor_info: res.data.data
});
app.globalData.showToast(res.data.msg, 'success');
} else {
if (app.globalData.is_login_check(res.data, this, 'shop_favor_event')) {
app.globalData.showToast(res.data.msg);
}
}
},
fail: () => {
uni.hideLoading();
app.globalData.showToast(this.$t('common.internet_error_tips'));
}
});
}
},
//
search_keywords_event(e) {
this.setData({
search_keywords_value: e.detail.value || ''
});
},
//
search_button_event(e) {
var value = e.currentTarget.dataset.value || null;
app.globalData.url_open(value + 'keywords=' + this.search_keywords_value || '');
},
//
nav_shop_category_event(e) {
this.setData({
nav_category_status: !this.nav_category_status
});
},
//
shop_category_event(e) {
var value = e.currentTarget.dataset.value || null;
app.globalData.url_open('/pages/plugins/shop/search/search?shop_id=' + this.propShop.id + '&category_id=' + value);
},
//
nav_event(e) {
//
var value = e.currentTarget.dataset.value || null;
if(value == null) {
var index = e.currentTarget.dataset.index;
var temp_nav = this.propShopNavigation;
for(var i in temp_nav) {
if(i == index) {
temp_nav[i]['items_status'] = ((temp_nav[i]['items_status'] || 0) == 0) ? 1 : 0;
} else {
temp_nav[i]['items_status'] = 0;
}
}
this.setData({shop_navigation: temp_nav});
} else {
app.globalData.url_event(e);
}
},
//
popup_service_open_event(e) {
this.setData({
popup_service_status: true,
});
},
//
popup_service_close_event(e) {
this.setData({
popup_service_status: false,
});
},
// url
url_event(e) {
app.globalData.url_event(e);
},
//
text_copy_event(e) {
app.globalData.text_copy_event(e);
},
//
tel_event(e) {
app.globalData.call_tel(e);
},
//
image_show_event(e) {
app.globalData.image_show_event(e);
},
//
chat_event() {
app.globalData.chat_entry_handle(this.propShop.chat_info.chat_url);
}
},
};
</script>
<style scoped>
/**
* 搜索
*/
.search {
border: 2rpx solid;
padding: 2rpx;
}
.search button {
width: 140rpx;
height: 56rpx;
line-height: 56rpx;
padding: 0;
}
.search input {
height: 56rpx;
line-height: 56rpx;
}
.search-btn {
width: 148rpx;
}
.search-btn button {
width: 100%;
padding: 0;
height: 64rpx;
line-height: 64rpx;
}
/**
* 头部
*/
.header {
padding: 20rpx 24rpx;
font-size: 24rpx;
}
.shop-logo {
width: 90rpx;
}
.base-bottom image {
width: 28rpx;
height: 28rpx;
}
.header .base {
width: calc(100% - 110rpx);
}
.shop-title {
line-height: 40rpx;
}
/**
* 导航
*/
.nav .nav-scroll {
float: right;
width: calc(100% - 172rpx);
}
.nav .nav-scroll .item.par {
height: 56rpx;
line-height: 56rpx;
white-space: nowrap;
}
.nav .item {
padding: 0 20rpx;
}
.nav-shop-category {
padding-right: 32rpx !important;
background-size: 28rpx 28rpx;
height: 56rpx;
line-height: 56rpx;
}
.nav .nav-items {
left: calc(50% - 212rpx);
top: 322rpx;
z-index: 1;
border-radius: 0 0 8rpx 8rpx;
box-shadow: 0 12rpx 12rpx rgb(0 0 0 / 10%);
}
.nav .nav-items .item {
padding: 20rpx;
}
/**
* 导航商品分类
*/
.nav-category {
z-index: 1;
box-shadow: 0 12rpx 12rpx rgb(0 0 0 / 10%);
border-bottom-right-radius: 8rpx;
margin-top: 70rpx;
}
.nav-category .category-scroll {
max-height: 600rpx;
}
.nav-category .item {
padding: 20rpx 30rpx;
}
/**
* 商品分类切换
*/
.shop-category-list .item {
margin: 20rpx 0;
}
.shop-category-list .item {
margin-left: 20rpx;
}
.shop-category-list .item:last-child {
margin-right: 20rpx;
}
</style>

View File

@ -1,125 +0,0 @@
/**
*
*/
.search {
border: 2rpx solid;
padding: 2rpx;
}
.search button {
width: 140rpx;
height: 56rpx;
line-height: 56rpx;
padding: 0;
}
.search input {
height: 56rpx;
line-height: 56rpx;
}
.search-btn {
width: 148rpx;
}
.search-btn button {
width: 100%;
padding: 0;
height: 64rpx;
line-height: 64rpx;
}
/**
*
*/
.header {
padding: 20rpx 24rpx;
font-size: 24rpx;
}
.shop-logo {
width: 90rpx;
}
.base-bottom image {
width: 28rpx;
height: 28rpx;
}
.header .base {
width: calc(100% - 110rpx);
}
.shop-title {
line-height: 40rpx;
}
/**
*
*/
.nav .nav-scroll {
float: right;
width: calc(100% - 172rpx);
}
.nav .nav-scroll .item.par {
height: 56rpx;
line-height: 56rpx;
white-space: nowrap;
}
.nav .item {
padding: 0 20rpx;
}
.nav-shop-category {
padding-right: 32rpx !important;
background-size: 28rpx 28rpx;
height: 56rpx;
line-height: 56rpx;
}
.nav .nav-items {
left: calc(50% - 212rpx);
top: 322rpx;
z-index: 1;
border-radius: 0 0 8rpx 8rpx;
box-shadow: 0 12rpx 12rpx rgb(0 0 0 / 10%);
}
.nav .nav-items .item {
padding: 20rpx;
}
/**
*
*/
.nav-category {
z-index: 1;
box-shadow: 0 12rpx 12rpx rgb(0 0 0 / 10%);
border-bottom-right-radius: 8rpx;
margin-top: 70rpx;
}
.nav-category .category-scroll {
max-height: 600rpx;
}
.nav-category .item {
padding: 20rpx;
}
/**
*
*/
.shop-category-list .item {
margin: 20rpx 0;
}
.shop-category-list .item {
margin-left: 20rpx;
}
.shop-category-list .item:last-child {
margin-right: 20rpx;
}

View File

@ -2,100 +2,8 @@
<view :class="theme_view">
<view v-if="(data || null) != null" class="pr">
<!-- 头部 -->
<block v-if="(data.is_header || 0) == 1">
<!-- 搜索 -->
<view class="flex-row jc-sb align-c padding-main bg-white pr oh" :class="is_shop_search_all_search_button == 1 ? '' : 'header-shop-whole-search'">
<view class="flex-1 wh-auto">
<view class="search flex-row jc-sb align-c round border-color-main bg-white">
<view class="flex-row align-c flex-1 wh-auto padding-left-main">
<iconfont name="icon-index-search" size="28rpx" color="#ccc"></iconfont>
<input class="text-size-md flex-1 wh-auto padding-left-sm" type="done" :placeholder="$t('detail.detail.8q6345')" :value="search_keywords_value || ''" placeholder-class="cr-grey-c" @input="search_keywords_event" />
</view>
<button class="bg-main br-main cr-white round text-size-xs" type="default" size="mini" hover-class="none" @tap="search_button_event" :data-value="'/pages/plugins/shop/search/search?shop_id=' + shop.id + '&'">
{{ is_shop_search_all_search_button == 1 ? $t('design.design.i7725u') : $t('common.search') }}
</button>
</view>
</view>
<view class="search-btn padding-left-main flex-row align-c">
<button v-if="is_shop_search_all_search_button == 1" class="bg-main-pair br-main-pair cr-white round text-size-xs" type="default" size="mini" hover-class="none" @tap="search_button_event" data-value="/pages/goods-search/goods-search?">{{$t('design.design.ay7m42')}}</button>
</view>
</view>
<!-- 顶部 -->
<view class="header plugins-shop-data-list bg-white oh">
<image :src="shop.logo" mode="widthFix" class="shop-logo fl border-radius-main cp"></image>
<view class="base fr item">
<view class="shop-title single-text">
<!-- 认证信息 -->
<view v-if="(data_base.is_enable_auth || 0) == 1 && ((shop.auth_type != -1 && (shop.auth_type_msg || null) != null) || ((shop.bond_status || 0) == 1 && (shop.bond_status_msg || null) != null))" class="auth-icon dis-inline-block">
<!-- 实名认证 -->
<block v-if="shop.auth_type != -1 && (shop.auth_type_msg || null) != null">
<image :src="shop.auth_type == 0 ? data_base.shop_auth_personal_icon : data_base.shop_auth_company_icon" class="icon va-m" mode="aspectFill" :data-value="'/pages/plugins/shop/license/license?id=' + shop.id" @tap="url_event"></image>
</block>
<!-- 保证金认证 -->
<block v-if="(shop.bond_status || 0) == 1 && (shop.bond_status_msg || null) != null">
<image :src="data_base.shop_auth_bond_icon" class="icon va-m" mode="aspectFill"></image>
</block>
</view>
<!-- 标题 -->
<text class="fw-b text-size va-m">{{ shop.name }}</text>
</view>
<view class="base-bottom oh margin-top-sm text-size-xs">
<!-- 在线客服 -->
<view v-if="(data_base.is_service_info || 0) == 1" class="fl margin-right-xxl cp" @tap="popup_service_open_event">
<image class="va-m margin-right-sm" :src="common_static_url + 'customer-service-icon.png'" mode="scaleToFill"></image>
<text class="va-m cr-base">{{$t('design.design.21kak7')}}</text>
</view>
<!-- 收藏 -->
<view class="fl single-text cp" @tap="shop_favor_event">
<image class="va-m margin-right-sm" :src="common_static_url + 'favor' + (shop_favor_info.status == 1 ? '-active' : '') + '-icon.png'" mode="scaleToFill"></image>
<text :class="'va-m ' + (shop_favor_info.status == 1 ? 'cr-main' : '')">{{ shop_favor_info.text }}({{ shop_favor_info.count }})</text>
</view>
<!-- 评分 -->
<view v-if="(shop.score_data || null) != null" class="fl margin-left-xxl">
<view class="dis-inline-block va-m">
<uni-rate :value="shop.score_data.value" :readonly="true" :is-fill="false" :size="14" />
</view>
<text class="va-m cr-red">{{ shop.score_data.value }}{{$t('design.design.745kx2')}}</text>
</view>
</view>
</view>
</view>
<!-- 导航 -->
<view v-if="shop_goods_category.length > 0 || shop_navigation.length > 0" class="nav bg-white padding-sm flex-row">
<view v-if="shop_goods_category.length > 0" class="item padding-main arrow-bottom nav-shop-category dis-inline-block cp" @tap="nav_shop_category_event">{{$t('recommend-form.recommend-form.203itn')}}</view>
<scroll-view scroll-x class="nav-scroll">
<view class="pr flex-row">
<block v-if="shop_navigation.length > 0">
<block v-for="(item, index) in shop_navigation" :key="index">
<block v-if="(item.items || null) == null || item.items.length == 0">
<view class="item par dis-inline-block cp" @tap="nav_event" :data-value="item.url" :data-index="index">{{ item.name }}</view>
</block>
<block v-else>
<view class="item par dis-inline-block cp" @tap="nav_event" :data-index="index">{{ item.name }}</view>
<view v-if="(item.items_status || 0) == 1" class="nav-items pf oh bg-white cr-base">
<block v-for="(items, index2) in item.items" :key="index2">
<view class="item cp" @tap="nav_event" :data-value="items.url" :data-index="index" :data-indexs="index2">{{ items.name }}</view>
</block>
</view>
</block>
</block>
</block>
</view>
</scroll-view>
<view v-if="nav_category_status" class="nav-category bg-white pa">
<scroll-view scroll-y class="category-scroll">
<block v-if="shop_goods_category.length > 0">
<block v-for="(item, index) in shop_goods_category" :key="index">
<view class="item dis-block cr-base single-text cp" @tap="shop_category_event" :data-value="item.id">{{ item.name }}</view>
</block>
</block>
<block v-else>
<view class="padding-top-xxl padding-bottom-xxl cr-grey">{{$t('design.design.83occ4')}}</view>
</block>
</scroll-view>
</view>
</view>
<block v-if="(data.is_header || 0) == 1">
<component-shop-header :propBase="data_base" :propShop="shop" :propShopGoodsCategory="shop_goods_category" :propShopNavigation="shop_navigation" :propShopFavorUser="shop_favor_user"></component-shop-header>
</block>
<!-- 拖拽模式引入拖拽数据模块 -->
@ -111,52 +19,6 @@
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
</block>
<!-- 客服弹窗 -->
<component-popup :propShow="popup_service_status" propPosition="bottom" @onclose="popup_service_close_event">
<view class="padding-top-main bg-white">
<view class="padding-horizontal-main">
<view class="close oh">
<view class="fr" @tap.stop="popup_service_close_event">
<iconfont name="icon-close-o" size="28rpx" color="#999"></iconfont>
</view>
</view>
</view>
<view class="popup-service-container">
<view v-if="(shop || null) != null && (data_base || null) != null && (data_base.is_service_info || 0) == 1" class="header-service">
<view v-if="(shop.chat_info || null) != null" class="item padding-main single-text">
<text class="va-m">{{$t('detail.detail.r4124d')}}</text>
<view class="dis-inline-block chat-info cp" @tap="chat_event">
<image class="dis-inline-block va-m" :src="shop.chat_info.icon" mode="scaleToFill"></image>
<text class="margin-left-sm va-m cr-blue" :data-value="shop.chat_info.chat_url">{{ shop.chat_info.name }}</text>
</view>
</view>
<view v-if="(shop.service_qq || null) != null" class="item padding-main br-t-f9 single-text">
<text>Q Q</text>
<text class="cp" @tap="text_copy_event" :data-value="shop.service_qq">{{ shop.service_qq }}</text>
</view>
<view v-if="(shop.service_tel || null) != null" class="item padding-main br-t-f9 single-text">
<text>{{$t('order.order.7dxbm5')}}</text>
<text class="cp" @tap="tel_event" :data-value="shop.service_tel">{{ shop.service_tel }}</text>
</view>
<view v-if="(shop.open_week_name || null) != null && (shop.close_week_name || null) != null" class="item padding-main br-t-f9 single-text">
<text>{{$t('article-detail.article-detail.728374')}}</text>
<text class="cp" @tap="text_copy_event" :data-value="shop.open_week_name + $t('design.design.gv16tj') + shop.close_week_name + '' + shop.open_time + '-' + shop.close_time">{{ shop.open_week_name }}{{$t('detail.detail.324777')}}{{ shop.close_week_name }}{{ shop.open_time }}-{{ shop.close_time }}</text>
</view>
<view v-if="(shop.service_weixin_qrcode || null) != null || (shop.service_line_qrcode || null) != null" class="oh qrcode tc br-t-f9 padding-top-main">
<view v-if="(shop.service_weixin_qrcode || null) != null" class="item padding-bottom-lg dis-inline-block">
<image class="radius cp" :src="shop.service_weixin_qrcode" mode="scaleToFill" @tap="image_show_event" :data-value="shop.service_weixin_qrcode"></image>
<view>{{$t('detail.detail.54k10s')}}</view>
</view>
<view v-if="(shop.service_line_qrcode || null) != null" class="item padding-bottom-lg dis-inline-block">
<image class="radius cp" :src="shop.service_line_qrcode" mode="scaleToFill" @tap="image_show_event" :data-value="shop.service_line_qrcode"></image>
<view>{{$t('detail.detail.vj4nom')}}</view>
</view>
</view>
</view>
</view>
</view>
</component-popup>
<!-- 公共 -->
<component-common ref="common"></component-common>
</view>
@ -166,38 +28,25 @@
import componentCommon from '@/components/common/common';
import componentLayout from "@/components/layout/layout";
import componentNoData from "@/components/no-data/no-data";
import componentBottomLine from "@/components/bottom-line/bottom-line";
import componentPopup from '@/components/popup/popup';
import componentBottomLine from "@/components/bottom-line/bottom-line";
import componentShopHeader from '../components/shop-header/shop-header';
var common_static_url = app.globalData.get_static_url('common');
export default {
data() {
return {
theme_view: app.globalData.get_theme_value_view(),
common_static_url: common_static_url,
is_shop_search_all_search_button: 0,
data_bottom_line_status: false,
data_list_loding_status: 1,
data_list_loding_msg: '',
params: null,
user: null,
data_base: null,
params: {},
data_base: null,
data: null,
layout_data: [],
shop: null,
shop_favor_user: [],
shop_navigation: [],
shop_goods_category: [],
data: null,
layout_data: [],
//
search_keywords_value: '',
popup_service_status: false,
nav_category_status: false,
shop_category_tab_value: 0,
shop_favor_info: {
"text": this.$t('goods-detail.goods-detail.dco1sc'),
"status": 0,
"count": 0
},
//
share_info: {}
};
@ -207,8 +56,8 @@
componentCommon,
componentLayout,
componentNoData,
componentBottomLine,
componentPopup
componentBottomLine,
componentShopHeader
},
onLoad(params) {
@ -217,8 +66,7 @@
//
this.setData({
params: params,
user: app.globalData.get_user_cache_info()
params: app.globalData.launch_params_handle(params)
});
},
@ -246,9 +94,7 @@
uni.request({
url: app.globalData.get_request_url("index", "design", "shop"),
method: 'POST',
data: {
"id": this.params.id || 0
},
data: this.params,
dataType: 'json',
success: res => {
uni.stopPullDownRefresh();
@ -261,25 +107,12 @@
shop_favor_user: data.shop_favor_user || [],
shop_navigation: data.shop_navigation || [],
shop_goods_category: data.shop_goods_category || [],
is_shop_search_all_search_button: (base == null || parseInt(base.is_shop_search_all_search_button || 0) != 1) ? 0 : 1,
data: (data.data || null) != null && data.data.length != 0 ? data.data : null,
layout_data: data.layout_data || [],
data_list_loding_msg: '',
data_list_loding_status: 0,
data_bottom_line_status: true
});
//
if ((this.shop || null) != null) {
var status = this.shop_favor_user.indexOf(this.shop.id) != -1 ? 1 : 0;
this.setData({
shop_favor_info: {
"count": this.shop.shop_favor_count || 0,
"status": status,
"text": (status == 1 ? this.$t('goods-detail.goods-detail.by7052') : '') + this.$t('goods-detail.goods-detail.dco1sc')
}
});
}
});
if ((this.data || null) != null) {
//
@ -316,133 +149,11 @@
data_list_loding_status: 2,
data_list_loding_msg: this.$t('common.internet_error_tips')
});
app.globalData.showToast(this.$t('common.internet_error_tips'));
}
});
},
//
shop_favor_event(e) {
var user = app.globalData.get_user_info(this, 'shop_favor_event');
if (user != false) {
uni.showLoading({
title: this.$t('common.processing_in_text')
});
uni.request({
url: app.globalData.get_request_url("favor", "shopfavor", "shop"),
method: 'POST',
data: {
"id": this.shop.id
},
dataType: 'json',
success: res => {
uni.hideLoading();
if (res.data.code == 0) {
this.setData({
shop_favor_info: res.data.data
});
app.globalData.showToast(res.data.msg, 'success');
} else {
if (app.globalData.is_login_check(res.data, this, 'shop_favor_event')) {
app.globalData.showToast(res.data.msg);
}
}
},
fail: () => {
uni.hideLoading();
app.globalData.showToast(this.$t('common.internet_error_tips'));
}
});
}
},
//
search_keywords_event(e) {
this.setData({
search_keywords_value: e.detail.value || ''
});
},
//
search_button_event(e) {
var value = e.currentTarget.dataset.value || null;
app.globalData.url_open(value + 'keywords=' + this.search_keywords_value || '');
},
//
nav_shop_category_event(e) {
this.setData({
nav_category_status: !this.nav_category_status
});
},
//
shop_category_event(e) {
var value = e.currentTarget.dataset.value || null;
app.globalData.url_open('/pages/plugins/shop/search/search?shop_id=' + this.shop.id + '&category_id=' + value);
},
//
nav_event(e) {
//
var value = e.currentTarget.dataset.value || null;
if(value == null) {
var index = e.currentTarget.dataset.index;
var temp_nav = this.shop_navigation;
for(var i in temp_nav) {
if(i == index) {
temp_nav[i]['items_status'] = ((temp_nav[i]['items_status'] || 0) == 0) ? 1 : 0;
} else {
temp_nav[i]['items_status'] = 0;
}
}
this.setData({shop_navigation: temp_nav});
} else {
app.globalData.url_event(e);
}
},
//
popup_service_open_event(e) {
this.setData({
popup_service_status: true,
});
},
//
popup_service_close_event(e) {
this.setData({
popup_service_status: false,
});
},
// url
url_event(e) {
app.globalData.url_event(e);
},
//
text_copy_event(e) {
app.globalData.text_copy_event(e);
},
//
tel_event(e) {
app.globalData.call_tel(e);
},
//
image_show_event(e) {
app.globalData.image_show_event(e);
},
//
chat_event() {
app.globalData.chat_entry_handle(this.shop.chat_info.chat_url);
}
}
};
</script>
<style scoped>
@import './design.css';
<style>
</style>

View File

@ -1,99 +1,8 @@
<template>
<view :class="theme_view">
<view v-if="(shop || null) != null" class="pr">
<!-- 搜索 -->
<view class="flex-row jc-sb align-c padding-main bg-white pr oh">
<view class="flex-1 wh-auto">
<view class="search flex-row jc-sb align-c round border-color-main bg-white">
<view class="flex-row align-c flex-1 wh-auto padding-left-main">
<iconfont name="icon-index-search" size="28rpx" color="#ccc"></iconfont>
<input class="text-size-md flex-1 wh-auto padding-left-sm" type="done" :placeholder="$t('detail.detail.8q6345')" :value="search_keywords_value || ''" placeholder-class="cr-grey-c" @input="search_keywords_event" />
</view>
<button class="bg-main br-main cr-white round text-size-xs" type="default" size="mini" hover-class="none" @tap="search_button_event" :data-value="'/pages/plugins/shop/search/search?shop_id=' + shop.id + '&'">
{{ is_shop_search_all_search_button == 1 ? $t('design.design.i7725u') : $t('common.search') }}
</button>
</view>
</view>
<view v-if="is_shop_search_all_search_button == 1" class="search-btn padding-left-main flex-row align-c">
<button class="bg-main-pair br-main-pair cr-white round text-size-xs" type="default" size="mini" hover-class="none" @tap="search_button_event" data-value="/pages/goods-search/goods-search?">{{$t('design.design.ay7m42')}}</button>
</view>
</view>
<!-- 顶部 -->
<view class="header plugins-shop-data-list bg-white oh">
<image :src="shop.logo" mode="widthFix" class="shop-logo fl border-radius-main cp"></image>
<view class="base fr item">
<view class="shop-title single-text">
<!-- 认证信息 -->
<view v-if="(data_base.is_enable_auth || 0) == 1 && ((shop.auth_type != -1 && (shop.auth_type_msg || null) != null) || ((shop.bond_status || 0) == 1 && (shop.bond_status_msg || null) != null))" class="auth-icon dis-inline-block">
<!-- 实名认证 -->
<block v-if="shop.auth_type != -1 && (shop.auth_type_msg || null) != null">
<image :src="shop.auth_type == 0 ? data_base.shop_auth_personal_icon : data_base.shop_auth_company_icon" class="icon va-m" mode="aspectFill" :data-value="'/pages/plugins/shop/license/license?id=' + shop.id" @tap="url_event"></image>
</block>
<!-- 保证金认证 -->
<block v-if="(shop.bond_status || 0) == 1 && (shop.bond_status_msg || null) != null">
<image :src="data_base.shop_auth_bond_icon" class="icon va-m" mode="aspectFill"></image>
</block>
</view>
<!-- 标题 -->
<text class="fw-b text-size va-m">{{ shop.name }}</text>
</view>
<view class="base-bottom oh margin-top-sm text-size-xs">
<!-- 在线客服 -->
<view v-if="(data_base.is_service_info || 0) == 1" class="fl margin-right-xxl cp" @tap="popup_service_open_event">
<image class="va-m margin-right-sm" :src="common_static_url + 'customer-service-icon.png'" mode="scaleToFill"></image>
<text class="va-m cr-base">{{$t('design.design.21kak7')}}</text>
</view>
<!-- 收藏 -->
<view class="fl single-text cp" @tap="shop_favor_event">
<image class="va-m margin-right-sm" :src="common_static_url + 'favor' + (shop_favor_info.status == 1 ? '-active' : '') + '-icon.png'" mode="scaleToFill"></image>
<text :class="'va-m ' + (shop_favor_info.status == 1 ? 'cr-main' : '')">{{ shop_favor_info.text }}({{ shop_favor_info.count }})</text>
</view>
<!-- 评分 -->
<view v-if="(shop.score_data || null) != null" class="fl margin-left-xxl">
<view class="dis-inline-block va-m">
<uni-rate :value="shop.score_data.value" :readonly="true" :is-fill="false" :size="14" />
</view>
<text class="va-m cr-red">{{ shop.score_data.value }}{{$t('design.design.745kx2')}}</text>
</view>
</view>
</view>
</view>
<!-- 导航 -->
<view v-if="shop_goods_category.length > 0 || shop_navigation.length > 0" class="nav bg-white padding-sm flex-row">
<view v-if="shop_goods_category.length > 0" class="item padding-main arrow-bottom nav-shop-category dis-inline-block cp" @tap="nav_shop_category_event">{{$t('recommend-form.recommend-form.203itn')}}</view>
<scroll-view scroll-x class="nav-scroll">
<view class="pr flex-row">
<block v-if="shop_navigation.length > 0">
<block v-for="(item, index) in shop_navigation" :key="index">
<block v-if="(item.items || null) == null || item.items.length == 0">
<view class="item par dis-inline-block cp" @tap="nav_event" :data-value="item.url" :data-index="index">{{ item.name }}</view>
</block>
<block v-else>
<view class="item par dis-inline-block cp" @tap="nav_event" :data-index="index">{{ item.name }}</view>
<view v-if="(item.items_status || 0) == 1" class="nav-items pf oh bg-white cr-base">
<block v-for="(items, index2) in item.items" :key="index2">
<view class="item cp" @tap="nav_event" :data-value="items.url" :data-index="index" :data-indexs="index2">{{ items.name }}</view>
</block>
</view>
</block>
</block>
</block>
</view>
</scroll-view>
<view v-if="nav_category_status" class="nav-category bg-white pa">
<scroll-view scroll-y class="category-scroll">
<block v-if="shop_goods_category.length > 0">
<block v-for="(item, index) in shop_goods_category" :key="index">
<view class="item dis-block cr-base single-text cp" @tap="shop_category_event" :data-value="item.id">{{ item.name }}</view>
</block>
</block>
<block v-else>
<view class="padding-top-xxl padding-bottom-xxl cr-grey">{{$t('design.design.83occ4')}}</view>
</block>
</scroll-view>
</view>
</view>
<!-- 头部 -->
<component-shop-header :propBase="data_base" :propShop="shop" :propShopGoodsCategory="shop_goods_category" :propShopNavigation="shop_navigation" :propShopFavorUser="shop_favor_user"></component-shop-header>
<!-- 数据模式 -->
<!-- 自动模式 -->
@ -150,52 +59,6 @@
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
</block>
<!-- 客服弹窗 -->
<component-popup :propShow="popup_service_status" propPosition="bottom" @onclose="popup_service_close_event">
<view class="padding-top-main bg-white">
<view class="padding-horizontal-main">
<view class="close oh">
<view class="fr" @tap.stop="popup_service_close_event">
<iconfont name="icon-close-o" size="28rpx" color="#999"></iconfont>
</view>
</view>
</view>
<view class="popup-service-container">
<view v-if="(shop || null) != null && (data_base || null) != null && (data_base.is_service_info || 0) == 1" class="header-service">
<view v-if="(shop.chat_info || null) != null" class="item padding-main single-text">
<text class="va-m">{{$t('detail.detail.r4124d')}}</text>
<view class="dis-inline-block chat-info cp" @tap="chat_event">
<image class="dis-inline-block va-m" :src="shop.chat_info.icon" mode="scaleToFill"></image>
<text class="margin-left-sm va-m cr-blue" :data-value="shop.chat_info.chat_url">{{ shop.chat_info.name }}</text>
</view>
</view>
<view v-if="(shop.service_qq || null) != null" class="item padding-main br-t-f9 single-text">
<text>Q Q</text>
<text class="cp" @tap="text_copy_event" :data-value="shop.service_qq">{{ shop.service_qq }}</text>
</view>
<view v-if="(shop.service_tel || null) != null" class="item padding-main br-t-f9 single-text">
<text>{{$t('order.order.7dxbm5')}}</text>
<text class="cp" @tap="tel_event" :data-value="shop.service_tel">{{ shop.service_tel }}</text>
</view>
<view v-if="(shop.open_week_name || null) != null && (shop.close_week_name || null) != null" class="item padding-main br-t-f9 single-text">
<text>{{$t('article-detail.article-detail.728374')}}</text>
<text class="cp" @tap="text_copy_event" :data-value="shop.open_week_name + $t('design.design.gv16tj') + shop.close_week_name + '' + shop.open_time + '-' + shop.close_time">{{ shop.open_week_name }}{{$t('detail.detail.324777')}}{{ shop.close_week_name }}{{ shop.open_time }}-{{ shop.close_time }}</text>
</view>
<view v-if="(shop.service_weixin_qrcode || null) != null || (shop.service_line_qrcode || null) != null" class="oh qrcode tc br-t-f9 padding-top-main">
<view v-if="(shop.service_weixin_qrcode || null) != null" class="item padding-bottom-lg dis-inline-block">
<image class="radius cp" :src="shop.service_weixin_qrcode" mode="scaleToFill" @tap="image_show_event" :data-value="shop.service_weixin_qrcode"></image>
<view>{{$t('detail.detail.54k10s')}}</view>
</view>
<view v-if="(shop.service_line_qrcode || null) != null" class="item padding-bottom-lg dis-inline-block">
<image class="radius cp" :src="shop.service_line_qrcode" mode="scaleToFill" @tap="image_show_event" :data-value="shop.service_line_qrcode"></image>
<view>{{$t('detail.detail.vj4nom')}}</view>
</view>
</view>
</view>
</view>
</view>
</component-popup>
<!-- 公共 -->
<component-common ref="common"></component-common>
</view>
@ -208,7 +71,7 @@
import componentBottomLine from '@/components/bottom-line/bottom-line';
import componentBanner from '@/components/slider/slider';
import componentGoodsList from '@/components/goods-list/goods-list';
import componentPopup from '@/components/popup/popup';
import componentShopHeader from '../components/shop-header/shop-header';
var common_static_url = app.globalData.get_static_url('common');
export default {
data() {
@ -219,9 +82,7 @@
data_list_loding_status: 1,
data_list_loding_msg: '',
currency_symbol: app.globalData.currency_symbol(),
is_shop_search_all_search_button: 0,
params: null,
user: null,
data_base: null,
shop: null,
shop_favor_user: [],
@ -232,11 +93,6 @@
search_keywords_value: '',
popup_service_status: false,
nav_category_status: false,
shop_favor_info: {
text: this.$t('goods-detail.goods-detail.dco1sc'),
status: 0,
count: 0,
},
//
share_info: {},
};
@ -248,7 +104,7 @@
componentBottomLine,
componentBanner,
componentGoodsList,
componentPopup
componentShopHeader
},
onLoad(params) {
//
@ -256,8 +112,7 @@
//
this.setData({
params: app.globalData.launch_params_handle(params),
user: app.globalData.get_user_cache_info(),
params: app.globalData.launch_params_handle(params)
});
},
@ -310,9 +165,7 @@
uni.request({
url: app.globalData.get_request_url('detail', 'index', 'shop'),
method: 'POST',
data: {
id: this.params.id || 0,
},
data: this.params,
dataType: 'json',
success: (res) => {
uni.stopPullDownRefresh();
@ -326,7 +179,6 @@
shop_favor_user: data.shop_favor_user || [],
shop_navigation: data.shop_navigation || [],
shop_goods_category: data.shop_goods_category || [],
is_shop_search_all_search_button: base == null || parseInt(base.is_shop_search_all_search_button || 0) != 1 ? 0 : 1,
data: temp_data,
slider: data.slider || [],
data_list_loding_msg: '',
@ -334,15 +186,6 @@
data_bottom_line_status: temp_data.length > 0,
});
if ((this.shop || null) != null) {
//
var status = this.shop_favor_user.indexOf(this.shop.id) != -1 ? 1 : 0;
this.setData({
shop_favor_info: {
count: this.shop.shop_favor_count || 0,
status: status,
text: (status == 1 ? this.$t('goods-detail.goods-detail.by7052') : '') + this.$t('goods-detail.goods-detail.dco1sc'),
},
});
//
this.setData({
share_info: {
@ -352,6 +195,10 @@
query: 'id=' + this.shop.id,
img: this.shop.logo,
},
});
//
uni.setNavigationBarTitle({
title: this.shop.name
});
}
} else {
@ -371,139 +218,15 @@
data_list_loding_status: 2,
data_list_loding_msg: this.$t('common.internet_error_tips'),
});
app.globalData.showToast(this.$t('common.internet_error_tips'));
},
});
},
//
shop_favor_event(e) {
var user = app.globalData.get_user_info(this, 'shop_favor_event');
if (user != false) {
uni.showLoading({
title: this.$t('common.processing_in_text'),
});
uni.request({
url: app.globalData.get_request_url('favor', 'shopfavor', 'shop'),
method: 'POST',
data: {
id: this.shop.id,
},
dataType: 'json',
success: (res) => {
uni.hideLoading();
if (res.data.code == 0) {
this.setData({
shop_favor_info: res.data.data,
});
app.globalData.showToast(res.data.msg, 'success');
} else {
if (app.globalData.is_login_check(res.data, this, 'shop_favor_event')) {
app.globalData.showToast(res.data.msg);
}
}
},
fail: () => {
uni.hideLoading();
app.globalData.showToast(this.$t('common.internet_error_tips'));
},
});
}
},
//
search_keywords_event(e) {
this.setData({
search_keywords_value: e.detail.value || '',
});
},
//
search_button_event(e) {
var value = e.currentTarget.dataset.value || null;
app.globalData.url_open(value + 'keywords=' + this.search_keywords_value || '');
},
//
nav_shop_category_event(e) {
var temp_nav = this.shop_navigation;
for (var i in temp_nav) {
temp_nav[i]['items_status'] = 0;
}
this.setData({
shop_navigation: temp_nav,
nav_category_status: !this.nav_category_status,
});
},
//
shop_category_event(e) {
var value = e.currentTarget.dataset.value || null;
app.globalData.url_open('/pages/plugins/shop/search/search?shop_id=' + this.shop.id + '&category_id=' + value);
},
//
nav_event(e) {
//
var value = e.currentTarget.dataset.value || null;
if (value == null) {
var index = e.currentTarget.dataset.index;
var temp_nav = this.shop_navigation;
for (var i in temp_nav) {
if (i == index) {
temp_nav[i]['items_status'] = (temp_nav[i]['items_status'] || 0) == 0 ? 1 : 0;
} else {
temp_nav[i]['items_status'] = 0;
}
}
this.setData({
shop_navigation: temp_nav,
nav_category_status: false,
});
} else {
app.globalData.url_event(e);
}
},
//
popup_service_open_event(e) {
this.setData({
popup_service_status: true,
});
},
//
popup_service_close_event(e) {
this.setData({
popup_service_status: false,
});
},
// url
url_event(e) {
app.globalData.url_event(e);
},
//
text_copy_event(e) {
app.globalData.text_copy_event(e);
},
//
tel_event(e) {
app.globalData.call_tel(e);
},
//
image_show_event(e) {
app.globalData.image_show_event(e);
},
//
chat_event() {
app.globalData.chat_entry_handle(this.shop.chat_info.chat_url);
},
},
}
}
};
</script>
<style>

View File

@ -27,7 +27,7 @@
*
*/
.search-map {
height: calc(100vh - 160rpx);
height: calc(100vh - 180rpx);
overflow-y: scroll;
overflow-x: hidden;
}
@ -54,7 +54,7 @@
line-height: 66rpx;
}
.map-content {
line-height: 60rpx;
line-height: 50rpx;
}
.map-content .item {
margin-bottom: 20rpx;
@ -62,30 +62,15 @@
.map-content .item:not(:last-child) {
margin-right: 20rpx;
}
.map-text-item .item,
.map-images-text-item .item {
.map-text-item .item {
padding: 0 15rpx;
border: 1px solid transparent;
}
.map-images-text-item .item {
vertical-align: middle;
border: 1px solid #eee;
width: 150rpx;
height: 72rpx;
line-height: 72rpx;
}
.map-images-text-item .item image {
width: 150rpx;
height: calc(100% - 8rpx);
display: block;
margin: 0 auto;
margin-top: 4rpx;
}
.search-map .search-submit {
left: 0;
bottom: 0;
}
.search-map .search-submit button {
.search-map .search-submit .btn {
height: 80rpx;
line-height: 80rpx;
}

View File

@ -51,13 +51,22 @@
</view>
<view class="map-content map-text-item map-category-container oh margin-top-lg" :style="'height:' + map_fields_list.category_list.height + ';'">
<block v-for="(item, index) in search_map_list.category_list" :key="index">
<view :class="'item fl cr-base radius ' + (item.active == 1 ? 'cr-main br-main' : '')" @tap="map_item_event" :data-index="index" data-field="category_list">{{item.name}}</view>
<view :class="'item fl radius ' + (item.active == 1 ? 'cr-main br-main' : 'cr-base')" @tap="map_item_event" :data-value="item.id" data-field="category_list">{{item.name}}</view>
</block>
</view>
</view>
<block v-for="(item, index) in search_map_list.category_list" :key="index">
<view v-if="item.active == 1 && (item.items || null) != null && item.items.length > 0" class="map-category-two map-text-item padding-bottom">
<view class="bg-grey-f7 oh radius padding-sm">
<block v-for="(item2, index2) in item.items" :key="index2">
<view :class="'item fl radius ' + (item2.active == 1 ? 'cr-main' : 'cr-base')" @tap="map_item_event" :data-pvalue="item.id" :data-value="item2.id" data-field="category_list">{{item2.name}}</view>
</block>
</view>
</view>
</block>
</view>
<view class="search-submit padding-main pa">
<button form-type="submit" class="bg-main cr-white text-size wh-auto round" :disabled="popup_form_loading_status" hover-class="none">{{$t('common.confirm')}}</button>
<button form-type="submit" class="btn bg-main cr-white text-size wh-auto round" :disabled="popup_form_loading_status" hover-class="none">{{$t('common.confirm')}}</button>
</view>
</view>
</form>
@ -192,7 +201,12 @@
var category = data.shop_goods_category || [];
if((this.params.category_id || 0) != 0 && category.length > 0) {
for(var i in category) {
category[i]['active'] = (category[i]['id'] == this.params.category_id) ? 1 : 0;
category[i]['active'] = (category[i]['id'] == this.params.category_id) ? 1 : 0;
if((category[i]['items'] || null) != null && category[i]['items'].length > 0) {
for(var x in category[i]['items']) {
category[i]['items'][x]['active'] = (category[i]['items'][x]['id'] == this.params.category_id) ? 1 : 0;
}
}
}
}
this.setData({
@ -339,15 +353,20 @@
var temp_list = this.search_map_list;
for (var i in temp_field) {
if (temp_list[i] != null != null && temp_list[i].length > 0) {
var temp = {};
var index = 0;
var value = '';
for (var k in temp_list[i]) {
if ((temp_list[i][k]['active'] || 0) == 1) {
temp[index] = temp_list[i][k]['id'];
index++;
value = temp_list[i][k]['id'];
if((temp_list[i][k]['items'] || null) != null) {
for(var x in temp_list[i][k]['items']) {
if ((temp_list[i][k]['items'][x]['active'] || 0) == 1) {
value = temp_list[i][k]['items'][x]['id'];
}
}
}
}
}
post_data[temp_field[i]['form_key']] = app.globalData.get_length(temp) > 0 ? JSON.stringify(temp) : '';
}
post_data[temp_field[i]['form_key']] = value;
}
}
@ -457,13 +476,37 @@
// -
map_item_event(e) {
var index = e.currentTarget.dataset.index;
var pvalue = e.currentTarget.dataset.pvalue;
var value = e.currentTarget.dataset.value;
var field = e.currentTarget.dataset.field;
var temp_list = this.search_map_list;
if ((temp_list[field] || null) != null && (temp_list[field][index] || null) != null) {
temp_list[field][index]['active'] = (temp_list[field][index]['active'] || 0) == 0 ? 1 : 0;
var temp_list = this.search_map_list;
if ((temp_list[field] || null) != null) {
if(pvalue === undefined) {
for(var i in temp_list[field]) {
temp_list[field][i]['active'] = (temp_list[field][i]['id'] == value) ? (temp_list[field][i]['active'] == 1 ? 0 : 1) : 0;
//
if(temp_list[field][i]['active'] == 0 && (temp_list[field][i]['items'] || null) != null) {
for(var x in temp_list[field][i]['items']) {
temp_list[field][i]['items'][x]['active'] = 0;
}
}
}
} else {
for(var i in temp_list[field]) {
temp_list[field][i]['active'] = (temp_list[field][i]['id'] == pvalue) ? 1 : 0;
if((temp_list[field][i]['items'] || null) != null) {
for(var x in temp_list[field][i]['items']) {
temp_list[field][i]['items'][x]['active'] = (temp_list[field][i]['items'][x]['id'] == value) ? (temp_list[field][i]['items'][x]['active'] == 1 ? 0 : 1) : 0;
//
if(temp_list[field][i]['items'][x]['active'] == 1) {
temp_list[field][i]['active'] = 1;
}
}
}
}
}
this.setData({
search_map_list: temp_list
search_map_list: temp_list,
});
}
},
@ -480,7 +523,12 @@
for (var i in temp_list) {
if((temp_list[i] || null) != null && temp_list[i].length > 0) {
for(var k in temp_list[i]) {
temp_list[i][k]['active'] = 0;
temp_list[i][k]['active'] = 0;
if((temp_list[i][k]['items'] || null) != null) {
for(var x in temp_list[i][k]['items']) {
temp_list[i][k]['items'][x]['active'] = 0;
}
}
}
}
}