积分兑换及商品是否展示和符号及单位适配

master
gongfuxiang 2024-02-05 16:20:11 +08:00
parent da17826afd
commit 40adae8768
11 changed files with 120 additions and 83 deletions

View File

@ -7,10 +7,10 @@
data: {
//
//
request_url: 'https://d1.shopxo.vip/',
request_url: 'http://shopxo.com/',
// publicpublichttps://d1.shopxo.vip/public/
static_url: 'https://d1.shopxo.vip/',
static_url: 'http://shopxo.com/',
// default
system_type: 'default',

View File

@ -1024,6 +1024,11 @@ button[disabled].bg-grey {
.goods-data-grid-list .item .error-msg {
line-height: 341rpx;
}
.goods-data-grid-list .item .open-grid-btn {
width: calc(100% - 80rpx);
min-height: 50rpx;
line-height: 50rpx;
}
/**
*

View File

@ -9,22 +9,14 @@
<view class="base-right bs-bb padding-left-main">
<view class="fw-b text-size-lg cr-base single-text">{{ item.title }}</view>
<view class="sales-price margin-top-main single-text">
<text class="text-size-xs">
{{ propCurrencySymbol }}
</text>
<text class="text-size-lg fw-b">
{{ item.estimate_price }}
</text>
<text class="text-size-xs">{{ propCurrencySymbol }}</text>
<text class="text-size-lg fw-b">{{ item.estimate_price }}</text>
</view>
<view v-if="(item.estimate_discount_price || 0) != 0" class="margin-top-sm single-text flex-row align-c">
<text class="discount-icon cr-white text-size-xs">{{$t('detail.detail.6026t4')}}</text>
<view class="cr-green single-text">
<text class="text-size-xs">
{{ propCurrencySymbol }}
</text>
<text class="text-size">
{{ item.estimate_discount_price }}
</text>
<text class="text-size-xs">{{ propCurrencySymbol }}</text>
<text class="text-size">{{ item.estimate_discount_price }}</text>
</view>
</view>
</view>
@ -38,8 +30,11 @@
<image :src="gv.images" mode="aspectFit" class="goods-images fl dis-block radius"></image>
<view class="goods-right fr bs-bb">
<view class="single-text text-size-sm">{{ gv.title }}</view>
<view class="single-text sales-price text-size-xss">{{ propCurrencySymbol }}{{ gv.price }}</view>
<view v-if="(gv.discount_price || null) != null" class="single-text cr-green text-size-xss">{{$t('detail.detail.6026t4')}}{{ propCurrencySymbol }}{{ gv.discount_price }}</view>
<view class="single-text">
<text class="sales-price va-m text-size-xss">{{ gv.show_price_symbol }}{{ gv.price }}</text>
<text class="cr-grey va-m text-size-xsss">{{ gv.show_price_unit }}</text>
</view>
<view v-if="(gv.discount_price || null) != null" class="single-text cr-green text-size-xss">{{$t('detail.detail.6026t4')}}{{ gv.show_price_symbol }}{{ gv.discount_price }}</view>
</view>
</view>
</block>

View File

@ -87,9 +87,12 @@
<!-- 底部内容 -->
<view class="goods-bottom pr margin-top-sm flex-row jc-sb align-c">
<!-- 价格 -->
<view class="sales-price fw-b">
<text class="text-size-sm">{{ currency_symbol }}</text>
<text class="text-size-lg">{{ item.price }}</text>
<view>
<text class="sales-price fw-b va-m">
<text class="text-size-sm">{{ item.show_price_symbol }}</text>
<text class="text-size-lg">{{ item.price }}</text>
</text>
<text class="cr-grey text-size-xs va-m">{{ item.show_price_unit }}</text>
</view>
<!-- 数量 -->

View File

@ -12,10 +12,13 @@
<image :src="goods_spec_base_images" mode="scaleToFill" class="radius br" @tap="goods_detail_images_view_event" :data-value="goods_spec_base_images"></image>
<view class="goods-spec-base-content">
<view class="goods-price">
<view class="sales-price">{{ propCurrencySymbol }}{{ goods_spec_base_price }}</view>
<view v-if="(goods_spec_base_original_price || null) != null && goods_spec_base_original_price != 0" class="original-price margin-top-sm">{{ propCurrencySymbol }}{{ goods_spec_base_original_price }}</view>
<view>
<text class="sales-price va-m">{{ goods.show_price_symbol }}{{ goods_spec_base_price }}</text>
<text class="cr-grey text-size-xs va-m">{{ goods.show_price_unit }}</text>
</view>
<view v-if="(goods_spec_base_original_price || null) != null && goods_spec_base_original_price != 0" class="original-price margin-top-sm">{{ goods.show_original_price_symbol }}{{ goods_spec_base_original_price }}{{ goods.show_original_price_unit }}</view>
</view>
<view class="inventory text-size-xs margin-top-xs">
<view class="inventory text-size-xs margin-top">
<text class="cr-grey">{{ $t('goods-detail.goods-detail.1s79t4') }}</text>
<text class="cr-base">{{ goods_spec_base_inventory }}</text>
<text class="cr-grey">{{ goods.inventory_unit }}</text>

View File

@ -20,11 +20,14 @@
<view class="multi-text">{{ item.title }}</view>
<view v-if="(item.simple_desc || null) != null" class="cr-grey single-text margin-top-sm text-size-sm">{{ item.simple_desc }}</view>
<view class="flex-row jc-sb align-c margin-top-main pr">
<view class="base-bottom">
<text v-if="propIsShowPriceIcon && (item.price_icon || null) != null" class="bg-red br-red cr-white text-size-xs padding-left-sm padding-right-sm round va-m margin-right-xs">{{ item.price_icon }}</text>
<text class="sales-price va-m text-size-xss va-b">{{ propCurrencySymbol }}</text>
<text class="sales-price va-m">{{ item[propPriceField] }}</text>
</view>
<block v-if="(propPriceField || null) != null && item[propPriceField] != undefined">
<view class="base-bottom">
<text v-if="propIsShowPriceIcon && (item.price_icon || null) != null" class="bg-red br-red cr-white text-size-xs padding-left-sm padding-right-sm round va-m margin-right-xs">{{ item.price_icon }}</text>
<text class="sales-price va-m text-size-xss va-m">{{ item.show_price_symbol }}</text>
<text class="sales-price va-m">{{ item[propPriceField] }}</text>
<text class="cr-grey text-size-xs va-m">{{ item.show_price_unit }}</text>
</view>
</block>
<block v-if="(item.is_error || 0) == 0 && is_show_cart">
<view v-if="propOpenCart" class="bg-white right-cart-icon" :data-index="index" @tap.stop="goods_cart_event">
<iconfont name="icon-cart-inc" size="40rpx" :color="theme_color"></iconfont>
@ -59,25 +62,31 @@
<image class="goods-img dis-block wh-auto" :src="item.images" mode="widthFix"></image>
<view class="base padding-horizontal-main margin-top-sm">
<view class="goods-title multi-text">{{ item.title }}</view>
<view class="margin-top-sm flex-row jc-sb align-c">
<view>
<view class="margin-top-sm flex-row jc-sb align-c pr">
<view :class="propIsOpenGridBtnSet ? 'open-grid-btn' : ''">
<block v-if="!propIntegral">
<text v-if="propIsShowPriceIcon && (item.price_icon || null) != null" class="bg-red br-red cr-white text-size-xs padding-left-sm padding-right-sm round va-m margin-right-xs">{{ item.price_icon }}</text>
<text class="sales-price va-m text-size-xss va-b">{{ propCurrencySymbol }}</text>
<text class="sales-price va-m">{{ item[propPriceField] }}</text>
<block v-if="(propPriceField || null) != null && item[propPriceField] != undefined">
<text v-if="propIsShowPriceIcon && (item.price_icon || null) != null" class="bg-red br-red cr-white text-size-xs padding-left-sm padding-right-sm round va-m margin-right-xs">{{ item.price_icon }}</text>
<text class="sales-price va-m text-size-xss va-m">{{ item.show_price_symbol }}</text>
<text class="sales-price va-m">{{ item[propPriceField] }}</text>
<text class="cr-grey text-size-xs va-m">{{ item.show_price_unit }}</text>
</block>
</block>
<block v-else>
<view class="flex-col">
<view class="original-price">
<text class="va-m text-size-xsss va-b">{{ propCurrencySymbol }}</text>
<text class="va-m text-size-xs">{{ item[propPriceField] }}</text>
</view>
<block v-if="(propPriceField || null) != null && item[propPriceField] != undefined">
<view class="original-price single-text">
<text class="text-size-xsss va-m">{{ item.show_price_symbol }}</text>
<text class="text-size-xs va-m">{{ item[propPriceField] }}</text>
<text class="cr-grey text-size-xs va-m">{{ item.show_price_unit }}</text>
</view>
</block>
<view class="cr-main text-size-xs"> {{ item.integral }}{{ $t('index.index.t26j9z') }}</view>
</view>
</block>
</view>
<block v-if="propIsOpenGridBtnSet">
<view :disabled="grid_btn_config.disabled" @tap="url_event" :style="[{ color: grid_btn_config.color }, { 'background-color': grid_btn_config.bg_color }, { padding: grid_btn_config.padding }, { 'border-radius': grid_btn_config.border_radius }, { 'font-size': grid_btn_config.font_size }]">
<view class="pa bottom-0 right-0" :disabled="grid_btn_config.disabled" @tap="url_event" :style="[{ color: grid_btn_config.color }, { 'background-color': grid_btn_config.bg_color }, { padding: grid_btn_config.padding }, { 'border-radius': grid_btn_config.border_radius }, { 'font-size': grid_btn_config.font_size }]">
{{ grid_btn_config.name }}
</view>
</block>
@ -129,11 +138,14 @@
</view>
</view>
</block>
<view class="flex-1 flex-width">
<text v-if="propIsShowPriceIcon && (item.price_icon || null) != null" class="bg-red br-red cr-white text-size-xs padding-left-sm padding-right-sm round va-m margin-right-xs">{{ item.price_icon }}</text>
<text class="sales-price va-m text-size-xss va-b">{{ propCurrencySymbol }}</text>
<text class="sales-price va-m">{{ item[propPriceField] }}</text>
</view>
<block v-if="(propPriceField || null) != null && item[propPriceField] != undefined">
<view class="flex-1 flex-width">
<text v-if="propIsShowPriceIcon && (item.price_icon || null) != null" class="bg-red br-red cr-white text-size-xs padding-left-sm padding-right-sm round va-m margin-right-xs">{{ item.price_icon }}</text>
<text class="sales-price va-m text-size-xss va-m">{{ item.show_price_symbol }}</text>
<text class="sales-price va-m">{{ item[propPriceField] }}</text>
<text class="cr-grey text-size-xs va-m">{{ item.show_price_unit }}</text>
</view>
</block>
</view>
</view>
</view>

View File

@ -16,15 +16,16 @@
</view>
<view class="cr-grey-9 text-size-xs margin-bottom-sm">{{ item.describe }}</view>
<swiper :class="items.data.length % 2 == 0 ? 'swiper-2' : items.data.length === index + 1 ? 'swiper-1' : 'swiper-2'" circular :autoplay="(item.rolling_time || null) !== null ? true : false" :vertical="propVertical" :interval="(item.rolling_time || null) !== null ? Number(item.rolling_time) * 1000 : '6000'" :duration="propDuration">
<swiper-item v-for="(swiperItem, swiperIndex) in item.data" :key="swiperIndex">
<swiper-item v-for="(swiper_item, swiper_index) in item.data" :key="swiper_index">
<view class="swiper-item">
<view class="flex-row">
<view v-for="(listItem, listIndex) in swiperItem" :key="listIndex" :class="items.data.length % 2 == 0 ? 'flex-width-half' : items.data.length === index + 1 ? 'flex-width-half-2' : 'flex-width-half'">
<view class="padding-horizontal-main tc" :data-value="(listItem.goods_url || null) !== null ? listItem.goods_url : ''" @tap="url_event">
<image :src="(listItem.images || null) !== null ? listItem.images : ''" mode="heightFix" class="swiper-img border-radius-sm"> </image>
<view v-for="(gv, gi) in swiper_item" :key="gi" :class="items.data.length % 2 == 0 ? 'flex-width-half' : items.data.length === index + 1 ? 'flex-width-half-2' : 'flex-width-half'">
<view class="padding-horizontal-main tc" :data-value="(gv.goods_url || null) !== null ? gv.goods_url : ''" @tap="url_event">
<image :src="(gv.images || null) !== null ? gv.images : ''" mode="heightFix" class="swiper-img border-radius-sm"> </image>
<view class="price tc single-text">
<text class="sales-price va-m text-size-xss va-b">{{ propCurrencySymbol }}</text>
<text class="sales-price va-m text-size-xs">{{ listItem.min_price }}</text>
<text class="sales-price va-m text-size-xss va-b">{{ gv.show_price_symbol }}</text>
<text class="sales-price va-m text-size-xs">{{ gv.min_price }}</text>
<text class="cr-grey va-m text-size-xss">{{ gv.show_price_unit }}</text>
</view>
</view>
</view>

View File

@ -65,9 +65,14 @@
<text>{{ spec.value }}</text>
</block>
</view>
<view class="oh pr margin-top-xs">
<text class="fw-b">{{ currency_symbol }}{{ item.price }}</text>
<text v-if="item.original_price > 0" class="original-price margin-left-sm">{{ currency_symbol }}{{ item.original_price }}</text>
<view class="oh pr margin-top-xs">
<block v-if="item.show_field_price_status == 1">
<text class="fw-b va-m">{{ item.show_price_symbol }}{{ item.price }}</text>
<text class="cr-grey text-size-xs va-m">{{ item.show_price_unit }}</text>
</block>
<block v-if="item.show_field_original_price_status == 1">
<text v-if="item.original_price > 0" class="original-price margin-left-sm">{{ item.show_original_price_symbol }}{{ item.original_price }}{{ item.show_original_price_unit }}</text>
</block>
<text class="buy-number pa cr-grey">x{{ item.stock }}</text>
</view>
</view>
@ -106,14 +111,15 @@
</view>
<!-- 扩展数据展示 -->
<view v-if="group.order_base.extension_data.length > 0" class="extension-list radius margin-top-lg">
<view v-for="(item, index2) in group.order_base.extension_data" :key="index2" class="item oh padding-vertical-xs padding-main">
<text class="cr-base fl">{{ item.name }}</text>
<text class="text-tips fr">{{ item.tips }}</text>
<view v-for="(item, index2) in group.order_base.extension_data" :key="index2">
<view class="item oh padding-vertical-xs padding-main">
<text class="cr-base fl">{{ item.name }}</text>
<text class="text-tips fr">{{ item.tips }}</text>
</view>
</view>
</view>
<!-- 小计 -->
<view class="oh tr wh-auto goods-group-footer padding-top-xl">
<text v-if="group.order_base.total_price != group.order_base.actual_price" class="original-price margin-right-sm">{{ currency_symbol }}{{ group.order_base.total_price }}</text>
<text class="sales-price">{{ currency_symbol }}{{ group.order_base.actual_price }}</text>
</view>
</view>
@ -128,16 +134,13 @@
<input type="number" class="br radius dis-inline-block va-m tc text-size-xs padding-horizontal-sm margin-left-xs plugins-points-use-value" :value="actual_use_integral" @input="points_use_value_event" @confirm="points_use_value_confirm_event" :placeholder="$t('buy.buy.80y7sv')" />
<button type="default" size="mini" class="bg-grey-e cr-gray cr-base text-size-xs radius va-m margin-right-xs plugins-points-use-submit" @tap="points_use_value_confirm_event">{{$t('common.confirm')}}</button>
<text class="va-m">{{$t('buy.buy.4di4i2')}}</text>
</view>
<text class="sales-price va-m">-{{ currency_symbol }}{{ plugins_points_data.discount_price }}</text>
<view class="fr cp">
<block v-if="(plugins_points_data.is_pure_exchange_modal || 0) == 1 && plugins_points_data.discount_type == 1">
<iconfont name="icon-zhifu-yixuan" size="34rpx" color="#999"></iconfont>
</block>
<view v-else @tap="points_event">
<iconfont :name="'icon-zhifu-' + (plugins_points_status ? 'yixuan' : 'weixuan')" size="34rpx" :color="plugins_points_status ? theme_color : '#999'"></iconfont>
</view>
</view>
</view>
<block v-if="plugins_points_data.is_pure_exchange_modal == undefined || plugins_points_data.is_pure_exchange_modal != 1 || plugins_points_data.discount_type != 1">
<text class="sales-price va-m">-{{ currency_symbol }}{{ plugins_points_data.discount_price }}</text>
<view class="fr cp" @tap="points_event">
<iconfont :name="'icon-zhifu-' + (plugins_points_status ? 'yixuan' : 'weixuan')" size="34rpx" :color="plugins_points_status ? theme_color : '#999'"></iconfont>
</view>
</block>
</view>
<view class="desc margin-top-xs">
<text v-if="plugins_points_data.discount_type == 1">{{$t('buy.buy.q800ri')}}{{ plugins_points_data.user_integral }}{{$t('buy.buy.w96878')}}</text>
@ -313,7 +316,6 @@
user_note_value: '',
user_note_status: false,
is_first: 1,
extension_data: [],
common_site_type: 0,
extraction_address: [],
site_model: 0,
@ -531,13 +533,28 @@
disabled: temp_dt.disabled || '',
//
error_msg: temp_dt.error_msg || this.$t('buy.buy.q8u066'),
};
};
//
var goods_list = data.goods_list;
for(var i in goods_list) {
//
var temp_extension_data = [];
if((goods_list[i]['order_base'] || null) != null && (goods_list[i]['order_base']['extension_data'] || null) != null) {
var temp_ext = goods_list[i]['order_base']['extension_data'];
for(var t in temp_ext) {
if(temp_ext[t]['is_buy_show'] == undefined || temp_ext[t]['is_buy_show'] == 1) {
temp_extension_data.push(temp_ext[t]);
}
}
}
goods_list[i]['order_base']['extension_data'] = temp_extension_data;
}
//
this.setData({
goods_list: data.goods_list,
goods_list: goods_list,
total_price: data.base.actual_price,
extension_data: data.extension_data || [],
data_list_loding_status: 3,
common_site_type: data.common_site_type || 0,
extraction_address: data.base.extraction_address || [],

View File

@ -71,9 +71,7 @@
<view v-if="(plugins_label_data || null) != null && plugins_label_data.data.length > 0" :class="'plugins-label oh pa plugins-label-' + ((plugins_label_data.base.is_user_goods_label_icon || 0) == 0 ? 'text' : 'img') + ' plugins-label-' + (plugins_label_data.base.user_goods_show_style || 'top-left')">
<block v-for="(lv, li) in plugins_label_data.data" :key="li">
<view class="lv dis-inline-block va-m" :data-value="(plugins_label_data.base.is_user_goods_label_url || 0) == 1 ? lv.url || '' : ''" @tap="url_event">
<view v-if="(plugins_label_data.base.is_user_goods_label_icon || 0) == 0" class="round cr-white bg-main text-size-xs fl" :style="((lv.bg_color || null) != null ? 'background-color:' + lv.bg_color + ' !important;' : '') + ((lv.text_color || null) != null ? 'color:' + lv.text_color + ' !important;' : '')">{{
lv.name
}}</view>
<view v-if="(plugins_label_data.base.is_user_goods_label_icon || 0) == 0" class="round cr-white bg-main text-size-xs fl" :style="((lv.bg_color || null) != null ? 'background-color:' + lv.bg_color + ' !important;' : '') + ((lv.text_color || null) != null ? 'color:' + lv.text_color + ' !important;' : '')">{{ lv.name }}</view>
<image v-else class="dis-block" :src="lv.icon" mode="scaleToFill"></image>
</view>
</block>
@ -88,14 +86,15 @@
<text v-if="(show_field_price_text || null) != null" class="price-icon round va-m">{{ show_field_price_text }}</text>
<!-- 售价 -->
<view v-if="(goods.show_field_price_status || 0) == 1" class="item single-text">
<text class="sales-price va-m">{{ currency_symbol }}{{ goods_spec_base_price }}</text>
<text class="sales-price va-m">{{ goods.show_price_symbol }}{{ goods_spec_base_price }}</text>
<text class="text-size-xs cr-grey va-m">{{ goods.show_price_unit }}</text>
</view>
<!-- 原价 -->
<view v-if="(goods.show_field_original_price_status || 0) == 1 && (goods_spec_base_original_price || null) != null && goods_spec_base_original_price != 0" class="item original-price single-text">{{ currency_symbol }}{{ goods_spec_base_original_price }}</view>
<view v-if="(goods.show_field_original_price_status || 0) == 1 && (goods_spec_base_original_price || null) != null && goods_spec_base_original_price != 0" class="item original-price single-text">{{ goods.show_original_price_symbol }}{{ goods_spec_base_original_price }}{{ goods.show_original_price_unit }}</view>
<!-- 积分兑换 -->
<view v-if="(goods.plugins_points_data || null) != null" class="item">
<text class="sales-price va-m margin-left-sm">{{ goods.plugins_points_data.points_value }}</text>
<text v-if="(goods.plugins_points_data.points_value_last_unit || null) != null" class="unit text-size-xs cr-grey-c va-m margin-left-xs">{{goods.plugins_points_data.points_value_last_unit}}</text>
<view v-if="(goods.plugins_points_data || null) != null && (goods.plugins_points_data.is_goods_detail_show || 0) == 1" class="item">
<text class="text-size-lg cr-base va-m">{{ goods.plugins_points_data.points_value }}</text>
<text class="text-size-xs cr-grey va-m margin-left-xs">{{goods.plugins_points_data.points_unit}}</text>
</view>
</view>
<block v-if="(plugins_seckill_data || null) != null && plugins_seckill_data.time.status == 1">

View File

@ -19,9 +19,12 @@
</label>
</view>
<view class="single-text margin-top-sm flex-row align-c">
<view class="sales-price">
<text class="text-size-xs">{{ currency_symbol }}</text>
<text class="text-size-lg fw-b">{{ item.price }}</text>
<view>
<text class="sales-price va-m">
<text class="text-size-xs">{{ item.show_price_symbol }}</text>
<text class="text-size-lg fw-b">{{ item.price }}</text>
</text>
<text class="cr-grey text-size-xs va-m">{{ item.show_price_unit }}</text>
</view>
<view v-if="(item.discount_price || 0) != 0" class="cr-green margin-left-lg text-size-xs">{{$t('detail.detail.6026t4')}}<text class="text-size-xs">{{ currency_symbol }}</text>
{{ item.discount_price }}

View File

@ -29,8 +29,7 @@
<image class="avatar dis-block circle" @tap="preview_event" :src="user.avatar || avatar_default" mode="widthFix"></image>
<view class="padding-left-main">
<view class="text-size fw-b">{{ user.user_name_view }}</view>
<view class="desc margin-top-sm cr-grey"
>{{$t('index.index.b46kge')}}<text class="cr-black fw-b padding-horizontal-xs">
<view class="desc margin-top-sm cr-grey">{{$t('index.index.b46kge')}}<text class="cr-black fw-b padding-horizontal-xs">
{{ user_integral.integral || 0 }}
</text>{{$t('index.index.t26j9z')}}</view>
</view>
@ -69,7 +68,7 @@
<!-- 商品兑换 -->
<view v-if="(data_base.goods_exchange_data || null) != null && data_base.goods_exchange_data.length > 0">
<component-goods-list :propData="{ style_type: 1, title: $t('index.index.f3l1xt'), url: '/pages/goods-search/goods-search', goods_list: data_base.goods_exchange_data }" propMoreUrlKey="url" :propCurrencySymbol="currency_symbol" :propGridBtnConfig="gridBtnConfig" :propIsOpenGridBtnSet="isOpenGridBtnSet" propPriceField="price" propIntegral></component-goods-list>
<component-goods-list :propData="{ style_type: 1, title: $t('index.index.f3l1xt'), url: '/pages/goods-search/goods-search', goods_list: data_base.goods_exchange_data }" propMoreUrlKey="url" :propCurrencySymbol="currency_symbol" :propGridBtnConfig="gridBtnConfig" :propIsOpenGridBtnSet="isOpenGridBtnSet" :propPriceField="(data_base.is_pure_exchange_modal || 0) == 1 ? '' : 'price'" propIntegral></component-goods-list>
</view>
</view>