master
gongfuxiang 2024-10-21 18:45:28 +08:00
commit e492c9434f
7 changed files with 42 additions and 39 deletions

View File

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

View File

@ -46,7 +46,7 @@
default: false,
},
propKey: {
type: [String,Number],
type: [String, Number],
default: '',
},
//
@ -137,7 +137,6 @@
let new_content = this.propValue.content || {};
let new_style = this.propValue.style || {};
let new_data = JSON.parse(JSON.stringify(this.propValue));
this.top_up = new_content.tabs_top_up;
new_data.content.theme = new_data.content.article_theme;
new_data.content.data_type = new_data.content.tabs_list[0].data_type;
new_data.content.category = new_data.content.tabs_list[0].category;
@ -164,6 +163,7 @@
margin_top: 0,
});
this.setData({
top_up: new_content.tabs_top_up,
article_tabs: new_data,
style_container: common_styles_computer(common_style),
style_img_container: common_img_computer(common_style, this.propIndex),
@ -190,7 +190,7 @@
diy_key: Math.random(),
});
},
//
//
getTop() {
const query = uni.createSelectorQuery().in(this);
query

View File

@ -9,7 +9,7 @@
<view class="content flex-col" :style="'padding-top:' + (temp_is_header_top ? temp_header_top : '0')">
<view v-for="item in tabs_data" :key="item.key">
<componentDiyTabs v-if="item.key == 'tabs'" :propValue="item.com_data" :propTop="temp_header_top" :propNavIsTop="is_header_top" :propTabsIsTop="temp_is_header_top" @onComputerHeight="tabs_height_event" @onTabsTap="tabs_click_event"></componentDiyTabs>
<componentDiyTabsCarousel v-else-if="item.key == 'tabs-carousel'" :propValue="item.com_data" :propTop="temp_header_top" :propNavIsTop="is_header_top" :propTabsIsTop="temp_is_header_top" @onComputerHeight="tabs_height_event" @onTabsTap="tabs_click_event" @onVideoPlay="video_play"></componentDiyTabsCarousel>
<componentDiyTabsCarousel v-else-if="item.key == 'tabs-carousel'" :propValue="item.com_data" :propTop="temp_header_top" :propNavIsTop="is_header_top" :propTabsIsTop="temp_is_header_top" :propCustomNavHeight="!is_immersion_model && is_header_top ? (is_search_alone_row ? 66 + data_alone_row_space : 33) : 0" @onComputerHeight="tabs_height_event" @onTabsTap="tabs_click_event" @onVideoPlay="video_play"></componentDiyTabsCarousel>
</view>
<template v-if="is_tabs_type">
<template v-if="diy_data.length > 0">
@ -253,7 +253,7 @@
watch: {
propKey(val) {
// diytabs
if((this.tabs_id || null) == null) {
if ((this.tabs_id || null) == null) {
//
this.init();
}
@ -366,7 +366,7 @@
if (bool) {
uni.showLoading({
title: this.$t('common.loading_in_text'),
mask: true
mask: true,
});
uni.request({
url: app.globalData.get_request_url('index', 'diy'),
@ -424,7 +424,7 @@
//
on_scroll_lower_event(e) {
if(!this.is_tabs_type) {
if (!this.is_tabs_type) {
this.get_goods_list();
}
},
@ -599,7 +599,7 @@
//
choice_location_back(e) {
// tabs_idtab
if((this.tabs_id || null) == null) {
if ((this.tabs_id || null) == null) {
this.$emit('onLocationBack', e);
} else {
this.tabs_click_event(this.tabs_id, this.is_tabs_type);
@ -609,5 +609,4 @@
};
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

View File

@ -135,7 +135,6 @@
const new_content = this.propValue.content || {};
const new_style = this.propValue.style || {};
let new_data = JSON.parse(JSON.stringify(this.propValue));
this.top_up = new_content.tabs_top_up;
//
new_data.content.data_type = new_data.content.tabs_list[0].data_type;
new_data.content.category = new_data.content.tabs_list[0].category;
@ -159,6 +158,7 @@
margin_top: 0,
});
this.setData({
top_up:new_content.tabs_top_up,
goods_tabs: new_data,
style_container: common_styles_computer(common_style),
style_img_container: common_img_computer(common_style, this.propIndex),

View File

@ -5,7 +5,7 @@
<view class="tabs flex-1 flex-width">
<scroll-view :scroll-x="true" :show-scrollbar="false" :scroll-with-animation="true" :scroll-into-view="'one-nav-item-' + active_index" class="wh-auto">
<view class="flex-row">
<view v-for="(item, index) in tabs_list" :key="index" :id="'one-nav-item-' + index" class="item nowrap flex-col jc-c align-c gap-4" :class="tabs_theme + (index == active_index ? ' active' : '')" :style="'margin-left:' + (index == 0 ? '0' : tabs_spacing) + 'rpx;margin-right:' + (index - 1 == tabs_list ? '0' : tabs_spacing) + 'rpx;'" :data-index="index" @tap="handle_event">
<view v-for="(item, index) in tabs_list" :key="index" :id="'one-nav-item-' + index" class="item nowrap flex-col jc-c align-c gap-4" :class="tabs_theme + (index == active_index ? ' active' : '') + ((tabs_theme_index == '0' && tabs_theme_1_style) || tabs_theme_index == '1' || tabs_theme_index == '2' ? ' pb-0' : '')" :style="'margin-left:' + (index == 0 ? '0' : tabs_spacing) + 'rpx;margin-right:' + (index - 1 == tabs_list ? '0' : tabs_spacing) + 'rpx;'" :data-index="index" @tap="handle_event">
<view class="nowrap flex-col jc-c align-c gap-4">
<image v-if="!isEmpty(item.img)" :src="item.img[0].url" class="img" mode="widthFix" />
<view class="title" :style="index == active_index ? tabs_theme_style.tabs_title_checked : tabs_theme_style.tabs_title">{{ item.title }}</view>
@ -17,7 +17,7 @@
</view>
</scroll-view>
</view>
<view class="padding-bottom-sm" :class="tabs_theme_index == '3' ? 'pb-12' : ''">
<view :class="tabs_theme_index == '3' ? 'pb-14' : (tabs_theme_index == '0' && tabs_theme_1_style) || tabs_theme_index == '1' || tabs_theme_index == '2' ? '' : 'padding-bottom-sm'">
<iconfont v-if="propIsTabsIcon" :name="'icon-' + icon.more_icon_class || 'category-more'" :size="icon.more_icon_size + '' || '14'" :color="icon.more_icon_color || '#000'" propContainerDisplay="flex" @click="category_check_event"></iconfont>
</view>
</view>
@ -157,6 +157,7 @@
icon: new_icon,
tabs_theme_style: new_tabs_theme_style,
tabs_bottom_line_theme: new_style.tabs_one_theme == '1' ? 'tabs-bottom-line-theme' : '',
tabs_theme_1_style: new_style.tabs_one_theme == '1',
});
},
//
@ -207,9 +208,8 @@
</script>
<style lang="scss" scoped>
.tabs {
min-height: 60rpx;
.item {
padding: 0 0 16rpx 0;
padding: 0 0 10rpx 0;
position: relative;
&:first-of-type {
margin-left: 0;
@ -235,14 +235,15 @@
position: absolute;
left: 0;
right: 0;
bottom: 8rpx;
bottom: 0;
display: none;
}
.icon {
position: absolute;
bottom: -6rpx;
bottom: 0;
text-align: center;
font-size: 40rpx;
line-height: 20rpx !important;
display: none;
}
.img {
@ -260,7 +261,7 @@
}
.tabs-bottom-line-theme {
opacity: 0.6;
bottom: 22rpx;
bottom: 16rpx;
z-index: 0;
height: 14rpx;
border-radius: 0;
@ -278,8 +279,7 @@
.desc {
border-radius: 40rpx;
padding: 4rpx 12rpx;
display: block;
width: -webkit-fill-available;
display: inline-block;
}
}
&.tabs-style-3 {
@ -293,7 +293,7 @@
}
}
&.tabs-style-4 {
padding-bottom: 24rpx;
padding-bottom: 28rpx;
&.active {
.title {
color: #ff2222;
@ -334,7 +334,10 @@
width: 20%;
padding: 20rpx 0;
}
.pb-12 {
padding-bottom: 24rpx !important;
.pb-14 {
padding-bottom: 28rpx;
}
.pb-0 {
padding-bottom: 0 !important;
}
</style>

View File

@ -1,7 +1,7 @@
<template>
<view class="ou" :style="style_container">
<view class="flex-col ou" :style="style_img_container">
<componentDiyTabs :propValue="propValue" :propTop="propTop" :propNavIsTop="propNavIsTop" :propTabsIsTop="propTabsIsTop" :propIsCommon="false" :propSpacingCommonStyle="spacing_common_style" @onTabsTap="tabs_click_event"></componentDiyTabs>
<componentDiyTabs :propValue="propValue" :propTop="propTop" :propNavIsTop="propNavIsTop" :propTabsIsTop="propTabsIsTop" :propIsCommon="false" :propSpacingCommonStyle="spacing_common_style" @onComputerHeight="tabs_height_event" @onTabsTap="tabs_click_event"></componentDiyTabs>
<componentDiycarousel :propValue="propValue" :propIsCommon="false" @onVideoPlay="video_play"></componentDiycarousel>
</view>
</view>
@ -24,7 +24,7 @@
},
},
propTop: {
type: [String,Number],
type: [String, Number],
default: 0,
},
//
@ -38,7 +38,7 @@
default: false,
},
propKey: {
type: [String,Number],
type: [String, Number],
default: '',
},
},
@ -86,7 +86,7 @@
spacing_common_style: {
padding: 0,
padding_top: new_style.common_style.padding_top,
padding_bottom: 0,
padding_bottom: 10,
padding_left: new_style.common_style.padding_left,
padding_right: new_style.common_style.padding_right,
margin: 0,
@ -94,7 +94,7 @@
margin_bottom: 0,
margin_left: new_style.common_style.margin_left,
margin_right: new_style.common_style.margin_right,
}
},
});
},
// tab
@ -107,7 +107,7 @@
},
//
video_play(url, popup_width, popup_height) {
console.log(url, popup_width, popup_height)
console.log(url, popup_width, popup_height);
this.$emit('onVideoPlay', url, popup_width, popup_height);
},
},

View File

@ -29,7 +29,7 @@
},
//
propTop: {
type: [String,Number],
type: [String, Number],
default: '0',
},
//
@ -56,7 +56,7 @@
default: '',
},
propKey: {
type: [String,Number],
type: [String, Number],
default: '',
},
},
@ -129,10 +129,10 @@
this.setData({
tabs_data: new_tabs_data,
style_container: this.propIsCommon ? common_styles_computer(new_style.common_style) + new_tabs_background : new_content.tabs_top_up == '1' ? new_tabs_background : '', //
style_img_container: this.propIsCommon ? common_img_computer(new_style.common_style) : new_content.tabs_top_up == '1' ? margin_computer(this.propSpacingCommonStyle) + padding_computer(this.propSpacingCommonStyle) : '', //
style_img_container: this.propIsCommon ? common_img_computer(new_style.common_style) : new_content.tabs_top_up == '1' ? margin_computer(this.propSpacingCommonStyle) + padding_computer(this.propSpacingCommonStyle) : 'padding-bottom:20rpx;', //
tabs_top_style: new_tabs_top_style,
//
top_up: new_top_up
top_up: new_top_up,
});
},
//
@ -148,11 +148,12 @@
// data
this.setData({
tabs_seat_height: res.height,
tabs_carousel_seat_height: res.height - this.propSpacingCommonStyle.padding_top - this.propSpacingCommonStyle.margin_top //
tabs_carousel_seat_height: res.height - this.propSpacingCommonStyle.padding_top - this.propSpacingCommonStyle.margin_top, //
});
this.$emit('onComputerHeight', this.tabs_seat_height);
}
}).exec();
})
.exec();
} else {
this.$emit('onComputerHeight', 0);
}