master
gongfuxiang 2024-10-21 21:29:38 +08:00
parent 1bca78e9f3
commit 7fdc156da3
8 changed files with 75 additions and 74 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

@ -25,7 +25,6 @@
<componentDiyArticleList v-else-if="item.key == 'article-list'" :propIndex="is_immersive_style_and_general_safe_distance_value ? item.index : -1" :propKey="item.id" :propValue="item.com_data"></componentDiyArticleList>
<componentDiyArticleTabs v-else-if="item.key == 'article-tabs'" :propIndex="is_immersive_style_and_general_safe_distance_value ? item.index : -1" :propKey="item.id" :propValue="item.com_data" :propTop="(!is_immersion_model ? temp_sticky_top : 0) + tabs_height" :propScrollTop="scroll_top" :propCustomNavHeight="!is_immersion_model && is_header_top ? (is_search_alone_row ? 66 + data_alone_row_space : 33) : 0"></componentDiyArticleTabs>
<componentDiyGoodsTabs v-else-if="item.key == 'goods-tabs'" :ref="'diy_goods_buy' + index" :propIndex="is_immersive_style_and_general_safe_distance_value ? item.index : -1" :propDiyIndex="index" :propKey="item.id" :propValue="item.com_data" :propTop="(!is_immersion_model ? temp_sticky_top : 0) + tabs_height" :propScrollTop="scroll_top" :propCustomNavHeight="!is_immersion_model && is_header_top ? (is_search_alone_row ? 66 + data_alone_row_space : 33) : 0" @goods_buy_event="goods_buy_event"></componentDiyGoodsTabs>
<componentDiyGoodsList v-else-if="item.key == 'goods-list'" :ref="'diy_goods_buy' + index" :propIndex="is_immersive_style_and_general_safe_distance_value ? item.index : -1" :propDiyIndex="index" :propKey="item.id" :propValue="item.com_data" @goods_buy_event="goods_buy_event"></componentDiyGoodsList>
<componentDiyDataMagic v-else-if="item.key == 'data-magic'" :propIndex="is_immersive_style_and_general_safe_distance_value ? item.index : -1" :propKey="item.id" :propValue="item.com_data"></componentDiyDataMagic>
<componentDiyCustom v-else-if="item.key == 'custom'" :propIndex="is_immersive_style_and_general_safe_distance_value ? item.index : -1" :propKey="item.id" :propValue="item.com_data"></componentDiyCustom>

View File

@ -132,11 +132,12 @@
let footer_height = nav_height + parseInt(new_style.common_style.margin_top) + parseInt(new_style.common_style.margin_bottom);
// 20
var safe_area_insets_bottom = parseInt(uni.getSystemInfoSync().safeAreaInsets.bottom);
if (safe_area_insets_bottom > 0) {
safe_area_insets_bottom -= 24;
var safe_areaInsets = uni.getSystemInfoSync().safeAreaInsets || {};
var bottom = parseInt(safe_areaInsets.bottom || 0);
if (bottom > 0) {
bottom -= 24;
}
footer_height += safe_area_insets_bottom;
footer_height += bottom;
//
this.$emit('onFooterHeight', footer_height);

View File

@ -178,9 +178,7 @@
props: {
propValue: {
type: Object,
default: () => {
return {};
},
default: () => ({}),
},
propIsCommonStyle: {
type: Boolean,
@ -245,55 +243,57 @@
methods: {
isEmpty,
init() {
const new_form = this.propValue.content;
const new_style = this.propValue.style;
let new_list = [];
//
if (!isEmpty(new_form.data_list) && new_form.data_type == '0') {
new_list = new_form.data_list.map((item) => ({
...item.data,
title: !isEmpty(item.new_title) ? item.new_title : item.data.title,
new_cover: item.new_cover,
}));
} else if (!isEmpty(new_form.data_auto_list) && new_form.data_type == '1') {
//
new_list = new_form.data_auto_list;
}
//
const flex = ['0', '2', '6'].includes(new_form.theme) ? 'flex-col ' : 'flex-row ';
const wrap = new_form.theme == '5' ? '' : 'flex-wrap ';
const background = ['6'].includes(new_form.theme) ? 'bg-white ' : '';
const button_gradient = gradient_handle(new_style.shop_button_color, '180deg');
const new_form = this.propValue.content || null;
const new_style = this.propValue.style || null;
if(new_form != null && new_style != null) {
let new_list = [];
//
if (!isEmpty(new_form.data_list) && new_form.data_type == '0') {
new_list = new_form.data_list.map((item) => ({
...item.data,
title: !isEmpty(item.new_title) ? item.new_title : item.data.title,
new_cover: item.new_cover,
}));
} else if (!isEmpty(new_form.data_auto_list) && new_form.data_type == '1') {
//
new_list = new_form.data_auto_list;
}
//
const flex = ['0', '2', '6'].includes(new_form.theme) ? 'flex-col ' : 'flex-row ';
const wrap = new_form.theme == '5' ? '' : 'flex-wrap ';
const background = ['6'].includes(new_form.theme) ? 'bg-white ' : '';
const button_gradient = gradient_handle(new_style.shop_button_color, '180deg');
this.setData({
form: new_form,
new_style: new_style,
outer_class: flex + wrap + background + 'oh',
list: new_list,
content_radius: radius_computer(new_style.shop_radius), //
content_img_radius: radius_computer(new_style.shop_img_radius), //
content_padding: padding_computer(new_style.shop_padding) + 'box-sizing: border-box;', //
theme: new_form.theme, //
content_outer_spacing: new_style.content_outer_spacing, //
onter_style: new_form.theme == '6' ? radius_computer(new_style.shop_radius) : `gap: ${new_style.content_outer_spacing * 2 + 'rpx'};`,
//
layout_type: this.get_layout_type(new_form),
layout_style: this.get_layout_style(new_style, new_form),
content_style: this.get_content_style(new_style, new_form), //
show_content: ['0', '1', '2'].includes(new_form.theme), //
text_line: this.get_text_line(new_form), //
style_container: this.propIsCommonStyle ? common_styles_computer(new_style.common_style) : '', //
style_img_container: this.propIsCommonStyle ? common_img_computer(new_style.common_style, this.propIndex) : '', //
//
button_gradient: button_gradient,
title_style: this.trends_config(new_style, 'title', 'title', new_form.theme),
price_style: this.trends_config(new_style, 'price'),
sold_number_style: this.trends_config(new_style, 'sold_number'),
score_style: this.trends_config(new_style, 'score'),
button_style: this.trends_config(new_style, 'button', 'buy_button')+button_gradient,
simple_desc: this.trends_config(new_style, 'simple_desc', 'desc'),
shop_content_list: this.get_shop_content_list(new_list, new_form),
});
this.setData({
form: new_form,
new_style: new_style,
outer_class: flex + wrap + background + 'oh',
list: new_list,
content_radius: radius_computer(new_style.shop_radius), //
content_img_radius: radius_computer(new_style.shop_img_radius), //
content_padding: padding_computer(new_style.shop_padding) + 'box-sizing: border-box;', //
theme: new_form.theme, //
content_outer_spacing: new_style.content_outer_spacing, //
onter_style: new_form.theme == '6' ? radius_computer(new_style.shop_radius) : `gap: ${new_style.content_outer_spacing * 2 + 'rpx'};`,
//
layout_type: this.get_layout_type(new_form),
layout_style: this.get_layout_style(new_style, new_form),
content_style: this.get_content_style(new_style, new_form), //
show_content: ['0', '1', '2'].includes(new_form.theme), //
text_line: this.get_text_line(new_form), //
style_container: this.propIsCommonStyle ? common_styles_computer(new_style.common_style) : '', //
style_img_container: this.propIsCommonStyle ? common_img_computer(new_style.common_style, this.propIndex) : '', //
//
button_gradient: button_gradient,
title_style: this.trends_config(new_style, 'title', 'title', new_form.theme),
price_style: this.trends_config(new_style, 'price'),
sold_number_style: this.trends_config(new_style, 'sold_number'),
score_style: this.trends_config(new_style, 'score'),
button_style: this.trends_config(new_style, 'button', 'buy_button')+button_gradient,
simple_desc: this.trends_config(new_style, 'simple_desc', 'desc'),
shop_content_list: this.get_shop_content_list(new_list, new_form),
});
}
},
get_shop_content_list(list, form) {
//

View File

@ -13,7 +13,8 @@
const app = getApp();
import { common_styles_computer, common_img_computer, padding_computer, margin_computer, background_computer, gradient_computer } from '@/common/js/common/common.js';
import componentDiyModulesTabsView from '@/components/diy/modules/tabs-view';
import componentGoodsList from '@/components/diy/goods-list'; //
import componentGoodsList from '@/components/diy/goods-list';
//
var bar_height = parseInt(app.globalData.get_system_info('statusBarHeight', 0));
// #ifdef MP-TOUTIAO
bar_height = 0;
@ -26,9 +27,7 @@
props: {
propValue: {
type: Object,
default: () => {
return {};
},
default: () => ({}),
},
propTop: {
type: Number,
@ -132,9 +131,9 @@
},
methods: {
init() {
const new_content = this.propValue.content || {};
const new_style = this.propValue.style || {};
let new_data = JSON.parse(JSON.stringify(this.propValue));
let new_data = typeof(this.propValue) == 'string' ? JSON.parse(JSON.stringify(this.propValue)) : this.propValue;
const new_content = new_data.content || {};
const new_style = new_data.style || {};
//
new_data.content.data_type = new_data.content.tabs_list[0].data_type;
new_data.content.category = new_data.content.tabs_list[0].category;

View File

@ -99,8 +99,8 @@
export default {
props: {
propValue: {
type: Object,
default: () => ({}),
type: [String,Number,Object],
default: '',
},
//
propScrollTop: {
@ -108,7 +108,7 @@
default: 0,
},
propKey: {
type: [String, Number],
type: [String,Number],
default: '',
},
},

View File

@ -3,7 +3,7 @@
<view :style="style_img_container">
<swiper circular="true" :autoplay="new_style.is_roll == '1'" :interval="new_style.interval_time * 1000" :duration="500" :style="{ height: new_height }" @change="slideChange">
<swiper-item v-for="(item, index) in nav_content_list" :key="index" class="flex-row align-c">
<view class="bannerImg flex-row flex-wrap wh-auto" :style="space">
<view class="banner-img flex-row flex-wrap wh-auto" :style="space">
<view v-for="(item1, index1) in item.split_list" :key="index1" class="flex-col gap-10 align-c" :style="group_width + nav_title_space" :data-value="item1.link.page" @tap="url_open_event">
<view v-if="['image_with_text', 'image'].includes(nav_style)" class="flex-row align-c jc-c">
<view class="top-img" :style="img_size">
@ -106,7 +106,7 @@
const query = uni.createSelectorQuery().in(this);
//
query
.select('.bannerImg')
.select('.banner-img')
.boundingClientRect((res) => {
if ((res || null) != null) {
// data

View File

@ -180,8 +180,10 @@
.fields({
computedStyle: ['position'],
})
.exec((e) => {
resolve('sticky' === e[0].position);
.exec((e) => {
if((e || null) != null && (e[0] || null) != null) {
resolve('sticky' === e[0].position);
}
});
});
// #endif