mirror of
https://gitee.com/zongzhige/shopxo-uniapp.git
synced 2026-06-06 02:38:52 +08:00
门店多个商品进入门店高亮这个商品
This commit is contained in:
23
App.vue
23
App.vue
@ -60,15 +60,6 @@
|
||||
// 全站阻止打开商品详情页面(0 否, 1 是)
|
||||
is_forbid_to_goods_detail: 0,
|
||||
|
||||
// 门店详情顶部导航返回按钮(0 否, 1 是)
|
||||
is_realstore_top_nav_back: 1,
|
||||
|
||||
// 门店详情搜索框内扫码加购(0否, 1是)
|
||||
is_realstore_top_search_scan: 1,
|
||||
|
||||
// 门店详情阻止跳转到商品详情页面去(0否, 1是)
|
||||
is_realstore_forbid_to_goods_detail: 0,
|
||||
|
||||
// 开启浮动客服、前提是后台需要开启客服功能(0 否, 1 是)
|
||||
is_online_service_fixed: 1,
|
||||
|
||||
@ -99,10 +90,22 @@
|
||||
|
||||
// 强制使用文字作为logo(默认当前指定logo->后台站点设置手机端图片logo->后台手机管理小程序配置名称->站点设置中的站点名称)
|
||||
is_home_logo_use_text: 0,
|
||||
|
||||
|
||||
// 首页开启地理位置选择(0否, 1是)优先级高于logo展示
|
||||
is_home_location_choice: 1,
|
||||
|
||||
// 门店详情顶部导航返回按钮(0 否, 1 是)
|
||||
is_realstore_top_nav_back: 1,
|
||||
|
||||
// 门店详情搜索框内扫码加购(0否, 1是)
|
||||
is_realstore_top_search_scan: 1,
|
||||
|
||||
// 门店详情阻止跳转到商品详情页面去(0否, 1是)
|
||||
is_realstore_forbid_to_goods_detail: 0,
|
||||
|
||||
// 钱包插件货币符号使用当前 currency_symbol 数据的固定值(0否, 1是)
|
||||
is_wallet_use_fixed_currency_symbol: 0,
|
||||
|
||||
// tabbar页面
|
||||
tabbar_pages: ['/pages/index/index', '/pages/goods-category/goods-category', '/pages/cart/cart', '/pages/user/user'],
|
||||
|
||||
|
||||
@ -256,18 +256,18 @@
|
||||
if(this.info.status_info.status != 1) {
|
||||
btn_status = false;
|
||||
btn_text = this.info.status_info.msg;
|
||||
}
|
||||
|
||||
// 购物车是否存在商品
|
||||
if((this.cart || null) == null || parseInt(this.cart.buy_number || 0) == 0) {
|
||||
btn_status = false;
|
||||
btn_text = '未加购';
|
||||
} else {
|
||||
// 起步价
|
||||
var msg = this.starting_price_handle();
|
||||
if(msg !== null) {
|
||||
// 购物车是否存在商品
|
||||
if((this.cart || null) == null || parseInt(this.cart.buy_number || 0) == 0) {
|
||||
btn_status = false;
|
||||
btn_text = msg;
|
||||
btn_text = '未加购';
|
||||
} else {
|
||||
// 起步价
|
||||
var msg = this.starting_price_handle();
|
||||
if(msg !== null) {
|
||||
btn_status = false;
|
||||
btn_text = msg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<view :class="theme_view">
|
||||
<view v-if="(data_list || null) != null && data_list.length > 0" class="plugins-realstore-data-list oh">
|
||||
<block v-for="(item, index) in data_list" :key="index">
|
||||
<view class="item bg-white padding-top-xl padding-bottom-sm padding-horizontal-main border-radius-main pr spacing-mb" :class="item.status_info.type === 2 ? 'opacity' : ''" :data-value="item.url" @tap="url_event">
|
||||
<view class="item bg-white padding-top-xl padding-bottom-sm padding-horizontal-main border-radius-main pr spacing-mb" :class="item.status_info.type === 2 ? 'opacity' : ''" :data-value="item.url+propRealstoreDetailQuery" @tap="url_event">
|
||||
<view class="base oh flex-row">
|
||||
<!-- 基础内容 -->
|
||||
<image :src="item.logo" mode="widthFix" class="logo circle br"></image>
|
||||
@ -72,6 +72,10 @@ export default {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
propRealstoreDetailQuery: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
// 属性值改变监听
|
||||
watch: {
|
||||
|
||||
@ -217,6 +217,18 @@
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.search-content.sm .search-icon {
|
||||
padding-top: 16rpx;
|
||||
}
|
||||
.search-content.sm .input {
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
.search-content.sm .search-btn {
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
|
||||
.search-content.md .search-icon {
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
@ -540,7 +540,7 @@
|
||||
</view>
|
||||
<view class="plugins-realstore-popup">
|
||||
<block v-if="(plugins_realstore_data || null) != null && plugins_realstore_data.length > 0">
|
||||
<component-realstore-list :propDataList="plugins_realstore_data" :propIsFavor="false"></component-realstore-list>
|
||||
<component-realstore-list :propDataList="plugins_realstore_data" :propRealstoreDetailQuery="'&source_goods_id='+goods.id" :propIsFavor="false"></component-realstore-list>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="cr-grey tc padding-top-xl padding-bottom-xxxl">无相关门店信息</view>
|
||||
|
||||
@ -50,15 +50,15 @@
|
||||
* 搜索
|
||||
*/
|
||||
.search-fixed-seat {
|
||||
padding-top: 72rpx;
|
||||
padding-top: 78rpx;
|
||||
/* #ifdef MP-TOUTIAO */
|
||||
padding-top: 50rpx;
|
||||
padding-top: 58rpx;
|
||||
/* #endif */
|
||||
}
|
||||
.search-fixed-seat.nav-enable-search {
|
||||
padding-top: 140rpx;
|
||||
padding-top: 146rpx;
|
||||
/* #ifdef MP-TOUTIAO */
|
||||
padding-top: 82rpx;
|
||||
padding-top: 88rpx;
|
||||
/* #endif */
|
||||
}
|
||||
.search-content-fixed {
|
||||
|
||||
@ -51,14 +51,14 @@
|
||||
<view v-if="common_app_is_enable_search == 1" class="search-content-input padding-horizontal-main">
|
||||
<!-- 是否开启搜索框前面icon扫一扫 -->
|
||||
<block v-if="is_home_search_scan == 1">
|
||||
<component-search :propIsBtn="true" propPlaceholder="输入商品名称搜索" propPlaceholderClass="cr-grey-c" propIconColor="#999" propBgColor="#fff"
|
||||
<component-search :propIsBtn="true" propSize="sm" propPlaceholder="输入商品名称搜索" propPlaceholderClass="cr-grey-c" propIconColor="#999" propBgColor="#fff"
|
||||
<!-- #ifndef H5 -->
|
||||
@onicon="search_icon_event" propIcon="icon-mendian-sousuosm" :propIsIconOnEvent="true"
|
||||
<!-- #endif -->
|
||||
></component-search>
|
||||
</block>
|
||||
<block v-else>
|
||||
<component-search :propIsBtn="true" propPlaceholder="输入商品名称搜索" propPlaceholderClass="cr-grey-c" propIconColor="#999" propBgColor="#fff"></component-search>
|
||||
<component-search :propIsBtn="true" propSize="sm" propPlaceholder="输入商品名称搜索" propPlaceholderClass="cr-grey-c" propIconColor="#999" propBgColor="#fff"></component-search>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -130,6 +130,10 @@ page {
|
||||
.goods-list .goods-base .buy-number {
|
||||
min-width: 32rpx;
|
||||
}
|
||||
.goods-list .goods-item.item-highlight {
|
||||
box-shadow: 0rpx 9rpx 20rpx 0px rgba(0, 0, 0, 0.1);
|
||||
background: #F7FBF6 !important;
|
||||
}
|
||||
|
||||
/**
|
||||
* 客服弹窗
|
||||
|
||||
@ -162,41 +162,43 @@
|
||||
</view>
|
||||
<!-- 右侧商品列表 -->
|
||||
<block v-if="(data_list || null) != null && data_list.length > 0">
|
||||
<view v-for="(item, index) in data_list" :key="index" class="item bg-white padding-main border-radius-main oh spacing-mb">
|
||||
<view :data-value="'/pages/goods-detail/goods-detail?id=' + item.id + '&is_opt_back=1&buy_use_type_index=' + buy_use_type_index + '&realstore_id=' + info.id" @tap="goods_url_event">
|
||||
<view class="flex-row jc-sb">
|
||||
<image :src="item.images" mode="widthFix" class="goods-img radius fl br"></image>
|
||||
<view class="goods-base flex-1 flex-width padding-left-main flex-col jc-sb">
|
||||
<view class="goods-base-content">
|
||||
<view class="goods-title text-size-md multi-text fw-b">{{ item.title }}</view>
|
||||
<view v-if="(item.simple_desc || null) != null" class="simple-desc cr-grey-9 text-size-xs margin-top-xs single-text">{{ item.simple_desc }}</view>
|
||||
</view>
|
||||
<view class="margin-top oh flex-row jc-sb align-c">
|
||||
<view class="single-text sales-price va-b va-m">
|
||||
<text class="text-size-xss">{{ currency_symbol }}</text>
|
||||
<text class="text-size-lg">{{ item.min_price }}</text>
|
||||
<block v-for="(item, index) in data_list" :key="index">
|
||||
<view :class="'goods-item bg-white padding-main border-radius-main oh spacing-mb '+((item.is_highlight || 0) == 1 ? 'item-highlight' : '')">
|
||||
<view :data-value="'/pages/goods-detail/goods-detail?id=' + item.id + '&is_opt_back=1&buy_use_type_index=' + buy_use_type_index + '&realstore_id=' + info.id" @tap="goods_url_event">
|
||||
<view class="flex-row jc-sb">
|
||||
<image :src="item.images" mode="widthFix" class="goods-img radius fl br"></image>
|
||||
<view class="goods-base flex-1 flex-width padding-left-main flex-col jc-sb">
|
||||
<view class="goods-base-content">
|
||||
<view class="goods-title text-size-md multi-text fw-b">{{ item.title }}</view>
|
||||
<view v-if="(item.simple_desc || null) != null" class="simple-desc cr-grey-9 text-size-xs margin-top-xs single-text">{{ item.simple_desc }}</view>
|
||||
</view>
|
||||
<view class="tc flex-row align-c">
|
||||
<block v-if="(item.is_error || 0) == 0">
|
||||
<view v-if="(item.buy_number || 0) > 0" class="cp pr top-sm" :data-index="index" data-type="0" @tap.stop="buy_number_event">
|
||||
<iconfont name="icon-cart-dec" size="40rpx" :color="theme_color"></iconfont>
|
||||
</view>
|
||||
<view v-if="(item.buy_number || 0) > 0" class="buy-number cr-black text-size-sm padding-left-xs padding-right-xs">
|
||||
{{ item.buy_number }}
|
||||
</view>
|
||||
<view class="cp pr top-sm" :data-index="index" data-type="1" @tap.stop="buy_number_event">
|
||||
<iconfont name="icon-cart-inc" size="40rpx" :color="theme_color"></iconfont>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<text class="cr-grey-c text-size-xs">{{ item.is_error_msg }}</text>
|
||||
</block>
|
||||
<view class="margin-top oh flex-row jc-sb align-c">
|
||||
<view class="single-text sales-price va-b va-m">
|
||||
<text class="text-size-xss">{{ currency_symbol }}</text>
|
||||
<text class="text-size-lg">{{ item.min_price }}</text>
|
||||
</view>
|
||||
<view class="tc flex-row align-c">
|
||||
<block v-if="(item.is_error || 0) == 0">
|
||||
<view v-if="(item.buy_number || 0) > 0" class="cp pr top-sm" :data-index="index" data-type="0" @tap.stop="buy_number_event">
|
||||
<iconfont name="icon-cart-dec" size="40rpx" :color="theme_color"></iconfont>
|
||||
</view>
|
||||
<view v-if="(item.buy_number || 0) > 0" class="buy-number cr-black text-size-sm padding-left-xs padding-right-xs">
|
||||
{{ item.buy_number }}
|
||||
</view>
|
||||
<view class="cp pr top-sm" :data-index="index" data-type="1" @tap.stop="buy_number_event">
|
||||
<iconfont name="icon-cart-inc" size="40rpx" :color="theme_color"></iconfont>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<text class="cr-grey-c text-size-xs">{{ item.is_error_msg }}</text>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
||||
<block v-else>
|
||||
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
|
||||
@ -350,6 +352,7 @@
|
||||
onPullDownRefresh() {
|
||||
this.setData({
|
||||
data_page: 1,
|
||||
data_list_loding_status: (this.data_list_loding_status == 2) ? 1 : this.data_list_loding_status
|
||||
});
|
||||
this.reset_scroll();
|
||||
this.get_detail_init();
|
||||
@ -500,6 +503,10 @@
|
||||
var temp_search_nav_sort = this.search_nav_sort_list;
|
||||
post_data['order_by_type'] = temp_search_nav_sort[temp_index]['sort'] == 'desc' ? 'asc' : 'desc';
|
||||
post_data['order_by_field'] = temp_search_nav_sort[temp_index]['field'];
|
||||
// 指定商品
|
||||
if((this.params.source_goods_id || null) != null) {
|
||||
post_data['source_goods_id'] = this.params.source_goods_id;
|
||||
}
|
||||
|
||||
// 获取数据
|
||||
uni.request({
|
||||
@ -511,6 +518,16 @@
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
// 存在参数指定来源商品id则清空
|
||||
if((this.params.source_goods_id || null) != null) {
|
||||
var temp_params = this.params;
|
||||
delete temp_params['source_goods_id'];
|
||||
this.setData({
|
||||
params: temp_params
|
||||
});
|
||||
}
|
||||
|
||||
// 列表数据处理
|
||||
if (data.data.length > 0) {
|
||||
if (this.data_page <= 1) {
|
||||
var temp_data_list = data.data;
|
||||
|
||||
@ -53,7 +53,8 @@
|
||||
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
|
||||
</view>
|
||||
<!-- 支付弹窗 -->
|
||||
<component-payment
|
||||
<component-payment
|
||||
:prop-currency-symbol="currency_symbol"
|
||||
:prop-pay-url="pay_url"
|
||||
:prop-qrcode-url="qrcode_url"
|
||||
prop-pay-data-key="recharge_id"
|
||||
@ -75,13 +76,14 @@
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
import componentPayment from '@/components/payment/payment';
|
||||
var wallet_static_url = app.globalData.get_static_url('wallet', true) + 'app/';
|
||||
|
||||
|
||||
var currency_symbol = (app.globalData.data.is_wallet_use_fixed_currency_symbol == 1) ? app.globalData.data.currency_symbol : app.globalData.currency_symbol();
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
wallet_static_url: wallet_static_url,
|
||||
currency_symbol: app.globalData.currency_symbol(),
|
||||
currency_symbol: currency_symbol,
|
||||
params: null,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
|
||||
Reference in New Issue
Block a user