master
parent
2b75ef6aa2
commit
0cdd7aad94
|
|
@ -173,7 +173,7 @@
|
|||
min-height: 86rpx;
|
||||
}
|
||||
.goods-base-content .goods-title-content .goods-title {
|
||||
font-size: 28rpx;
|
||||
font-size: 30rpx;
|
||||
line-height: 40rpx;
|
||||
font-weight: bold;
|
||||
width: calc(100% - 200rpx);
|
||||
|
|
@ -241,10 +241,10 @@
|
|||
width: 76rpx;
|
||||
}
|
||||
.price-content .price-icon {
|
||||
padding: 0px 10rpx;
|
||||
color: #FF5722;
|
||||
padding: 0px 8rpx;
|
||||
color: #fff;
|
||||
border: 1px solid #FF5722;
|
||||
background: transparent;
|
||||
background: #FF5722;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.price-content .sales-price {
|
||||
|
|
@ -337,12 +337,14 @@
|
|||
}
|
||||
|
||||
/*
|
||||
* icon
|
||||
* 标题icon
|
||||
*/
|
||||
.goods-icon-container .item {
|
||||
border: 1px solid #3bb4f2;
|
||||
color: #3bb4f2;
|
||||
padding: 2rpx 16rpx;
|
||||
.goods-title-icon-item {
|
||||
background: #666;
|
||||
color: #fff;
|
||||
padding: 0 8rpx;
|
||||
line-height: 26rpx;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -137,20 +137,21 @@
|
|||
<view class="goods-base-content border-radius-main bg-white spacing-mb">
|
||||
<view class="padding-main">
|
||||
<view class="goods-title-content oh flex-row jc-sb align-c">
|
||||
<!-- 标题 -->
|
||||
<!-- 标题容器 -->
|
||||
<view class="goods-title flex-1 flex-width" :style="'color:' + goods.title_color">
|
||||
<text class="va-m">{{ goods.title }}</text>
|
||||
<!-- icon -->
|
||||
<view v-if="(goods.plugins_view_icon_data || null) != null && goods.plugins_view_icon_data.length > 0" class="goods-icon-container dis-inline-block va-m">
|
||||
<block v-if="(goods.plugins_view_icon_data || null) != null && goods.plugins_view_icon_data.length > 0">
|
||||
<block v-for="(item, index) in goods.plugins_view_icon_data" :key="index">
|
||||
<text
|
||||
v-if="(item.name || null) != null"
|
||||
class="item round text-size-xs bg-white margin-left-sm"
|
||||
:style="((item.br_color || null) == null ? '' : 'border:1px solid ' + item.br_color + ';') + '' + ((item.color || null) == null ? '' : 'color: ' + item.color + ';')"
|
||||
class="goods-title-icon-item va-m radius text-size-xs margin-right-xs"
|
||||
:style="((item.br_color || null) == null ? '' : 'border:1px solid ' + item.br_color + ';') + ((item.bg_color || null) == null ? '' : 'background: ' + item.bg_color + ';') + '' + ((item.color || null) == null ? '' : 'color: ' + item.color + ';')"
|
||||
:data-value="item.url || ''"
|
||||
@tap="url_event">{{ item.name }}</text>
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 标题 -->
|
||||
<text class="va-m">{{ goods.title }}</text>
|
||||
</view>
|
||||
<view v-if="(plugins_seckill_data || null) !== null" class="flex-row align-c padding-left-main">
|
||||
<!-- 分享 -->
|
||||
|
|
@ -902,9 +903,11 @@
|
|||
// 获取数据
|
||||
init() {
|
||||
// 缓存数据
|
||||
var goods = app.globalData.goods_data_cache_handle(this.params.id);
|
||||
if(goods != null) {
|
||||
this.init_result_data_handle(goods);
|
||||
if((this.goods || null) == null) {
|
||||
var goods = app.globalData.goods_data_cache_handle(this.params.id);
|
||||
if(goods != null) {
|
||||
this.init_result_data_handle(goods);
|
||||
}
|
||||
}
|
||||
|
||||
// 获取数据
|
||||
|
|
@ -1012,7 +1015,8 @@
|
|||
},
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 初始化数据处理
|
||||
init_result_data_handle(goods) {
|
||||
// 价格字段
|
||||
var price_text_arr = [this.$t('goods-detail.goods-detail.bogx42'), this.$t('goods-category.goods-category.g2u3lf'), this.$t('goods-detail.goods-detail.3kdgjl')];
|
||||
|
|
|
|||
|
|
@ -487,18 +487,22 @@
|
|||
|
||||
// 获取数据
|
||||
init(params = {}) {
|
||||
// 本地缓存数据
|
||||
var key = app.globalData.data.cache_index_data_key;
|
||||
var upd_data = uni.getStorageSync(key) || null;
|
||||
if(upd_data != null) {
|
||||
// 先使用缓存数据展示
|
||||
this.setData(upd_data);
|
||||
// 还没有数据则读取缓存
|
||||
if(this.load_status == 0)
|
||||
{
|
||||
// 本地缓存数据
|
||||
var key = app.globalData.data.cache_index_data_key;
|
||||
var upd_data = uni.getStorageSync(key) || null;
|
||||
if(upd_data != null) {
|
||||
// 先使用缓存数据展示
|
||||
this.setData(upd_data);
|
||||
|
||||
// 初始化返回公共处理
|
||||
this.init_result_common_handle();
|
||||
// 初始化返回公共处理
|
||||
this.init_result_common_handle();
|
||||
|
||||
// 已有本地缓存则直接取远程有效数据(默认首次取的是远程缓存数据)
|
||||
params['is_cache'] = 0;
|
||||
// 已有本地缓存则直接取远程有效数据(默认首次取的是远程缓存数据)
|
||||
params['is_cache'] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// 网络检查
|
||||
|
|
|
|||
Loading…
Reference in New Issue