Merge branch 'dev-sws' of gitee.com:zongzhige/shopxo-uniapp into dev

master
gongfuxiang 2024-10-22 19:17:06 +08:00
commit 01b85e7780
3 changed files with 39 additions and 34 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

@ -105,7 +105,7 @@
export default {
props: {
propValue: {
type: [String,Number,Object],
type: [String, Number, Object],
default: '',
},
//
@ -114,7 +114,7 @@
default: 0,
},
propKey: {
type: [String,Number],
type: [String, Number],
default: '',
},
},
@ -215,11 +215,13 @@
//
let menu_button_info = 'max-width:100%';
let new_text_style = `font-weight:${new_style.header_background_title_typeface}; font-size: ${new_style.header_background_title_size * 2}rpx; color: ${new_style.header_background_title_color};`;
// #ifndef MP-TOUTIAO
// #ifdef MP
const custom = uni.getMenuButtonBoundingClientRect();
menu_button_info = `max-width:calc(100% - ${custom.width + 10}px);`;
new_text_style += `right:-${custom.width + 10}px;`;
// #endif
// #endif
this.setData({
form: this.propValue,
position: new_style.up_slide_display == '1' ? 'position:fixed;' : 'position:relative;',
@ -288,7 +290,7 @@
height: 66rpx;
overflow: hidden;
top: -1rpx;
/* #ifdef H5 */
/* #ifdef H5 || MP-TOUTIAO */
top: 4rpx;
/* #endif */
}

View File

@ -2,7 +2,7 @@
<view :class="theme_view">
<block v-if="(data || null) != null">
<!-- diy模块 -->
<componentDiy :propValue="data.config" :propDataId="data.id" @onLocationBack="user_back_choice_location">
<componentDiy :propValue="data.config" :propDataId="data.id" :propKey="random_value" @onLocationBack="user_back_choice_location">
<!-- 底部内容 -->
<template slot="diy-bottom-content">
<!-- 结尾 -->
@ -23,14 +23,14 @@
const app = getApp();
import componentCommon from '@/components/common/common';
import componentDiy from '@/components/diy/diy';
import componentNoData from "@/components/no-data/no-data";
import componentBottomLine from "@/components/bottom-line/bottom-line";
import componentNoData from '@/components/no-data/no-data';
import componentBottomLine from '@/components/bottom-line/bottom-line';
export default {
components: {
componentCommon,
componentDiy,
componentNoData,
componentBottomLine
componentBottomLine,
},
data() {
return {
@ -42,24 +42,26 @@
params: null,
data: null,
//
share_info: {}
share_info: {},
//
random_value: 0,
};
},
onLoad(params) {
//
app.globalData.page_event_onload_handle(params);
//
this.setData({
params: app.globalData.launch_params_handle(params),
});
},
onShow() {
//
app.globalData.page_event_onshow_handle();
//
this.get_data();
@ -71,7 +73,7 @@
//
this.set_navigation_bar_color();
},
//
onPullDownRefresh() {
this.get_data();
@ -81,7 +83,7 @@
//
get_data(params = {}) {
//
var cache_key = app.globalData.data.cache_diy_page_data_key+(this.params.id || 0);
var cache_key = app.globalData.data.cache_diy_page_data_key + (this.params.id || 0);
if (this.load_status == 0) {
//
var upd_data = uni.getStorageSync(cache_key) || null;
@ -100,11 +102,11 @@
params['is_cache'] = 0;
}
uni.request({
url: app.globalData.get_request_url("index", "diy"),
url: app.globalData.get_request_url('index', 'diy'),
method: 'POST',
data: {...this.params, ...params},
data: { ...this.params, ...params },
dataType: 'json',
success: res => {
success: (res) => {
uni.stopPullDownRefresh();
if (res.data.code == 0) {
var data = res.data.data;
@ -112,7 +114,8 @@
data: data.data || null,
data_list_loding_msg: '',
data_list_loding_status: 0,
data_bottom_line_status: true
data_bottom_line_status: true,
random_value: Math.random(),
};
this.setData(upd_data);
//
@ -130,33 +133,33 @@
title: this.data.name,
desc: this.data.describe,
path: '/pages/diy/diy',
query: 'id='+this.data.id,
img: this.data.logo
}
query: 'id=' + this.data.id,
img: this.data.logo,
},
});
//
uni.setNavigationBarTitle({
title: this.data.name
title: this.data.name,
});
//
this.set_navigation_bar_color();
}
//
app.globalData.page_share_handle(this.share_info);
} else {
this.setData({
data_bottom_line_status: false,
data_list_loding_status: 2,
data_list_loding_msg: res.data.msg
data_list_loding_msg: res.data.msg,
});
}
//
this.setData({
load_status: 1
load_status: 1,
});
},
fail: () => {
@ -165,9 +168,9 @@
data_bottom_line_status: false,
data_list_loding_status: 2,
load_status: 1,
data_list_loding_msg: this.$t('common.internet_error_tips')
data_list_loding_msg: this.$t('common.internet_error_tips'),
});
}
},
});
},
@ -181,7 +184,7 @@
//
this.get_data();
},
}
},
};
</script>
<style></style>
<style></style>