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: { data: {
// //
// //
//request_url: 'http://shopxo.com/', request_url: 'http://shopxo.com/',
request_url:'https://new.shopxo.vip/', // request_url:'https://new.shopxo.vip/',
// publicpublichttps://d1.shopxo.vip/public/ // publicpublichttps://d1.shopxo.vip/public/
//static_url: 'http://shopxo.com/', static_url: 'http://shopxo.com/',
static_url:'https://new.shopxo.vip/', // static_url:'https://new.shopxo.vip/',
// default // default
system_type: 'default', system_type: 'default',

View File

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

View File

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