去除子页面启动参数处理

master
gongfuxiang 2021-11-22 11:05:28 +08:00
parent c42a87d8d7
commit 7d6fbdb58c
15 changed files with 13 additions and 54 deletions

View File

@ -61,8 +61,6 @@
props: {}, props: {},
onLoad(params) { onLoad(params) {
//
params = app.globalData.launch_params_handle(params);
this.setData({ this.setData({
params: params, params: params,
nav_active_value: params.id || 0 nav_active_value: params.id || 0

View File

@ -35,7 +35,7 @@
</view> </view>
</template> </template>
<script> <script>
const app = getApp(); const app = getApp();
import htmlParser from '../../common/js/lib/html-parser.js'; import htmlParser from '../../common/js/lib/html-parser.js';
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";
@ -59,8 +59,6 @@
props: {}, props: {},
onLoad(params) { onLoad(params) {
//
params = app.globalData.launch_params_handle(params);
this.setData({ this.setData({
params: params params: params
}); });
@ -115,10 +113,10 @@
uni.hideLoading(); uni.hideLoading();
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
var data = res.data.data; var data = res.data.data;
if (res.data.code == 0 && (data.data || null) != null) { if (res.data.code == 0 && (data.data || null) != null) {
var article = data.data; var article = data.data;
if((article.content || null) != null) { if((article.content || null) != null) {
article['content'] = htmlParser(article.content); article['content'] = htmlParser(article.content);
} }
this.setData({ this.setData({
data_bottom_line_status: true, data_bottom_line_status: true,

View File

@ -51,8 +51,6 @@
props: {}, props: {},
onLoad(params) { onLoad(params) {
//
params = app.globalData.launch_params_handle(params);
this.setData({ this.setData({
params: params params: params
}); });

View File

@ -623,11 +623,6 @@
}, },
onLoad(params) { onLoad(params) {
//
params = app.globalData.launch_params_handle(params);
//params['goods_id']=12;
// ,
var system_info = app.globalData.get_system_info(); var system_info = app.globalData.get_system_info();
this.setData({ this.setData({
params: params, params: params,

View File

@ -210,10 +210,6 @@
props: {}, props: {},
onLoad(params) { onLoad(params) {
//
params = app.globalData.launch_params_handle(params);
//
this.setData({ this.setData({
params: params, params: params,
post_data: { post_data: {

View File

@ -72,8 +72,6 @@
props: {}, props: {},
onLoad(params) { onLoad(params) {
//
params = app.globalData.launch_params_handle(params);
this.setData({ this.setData({
params: params params: params
}); });

View File

@ -67,7 +67,7 @@
</view> </view>
</template> </template>
<script> <script>
const app = getApp(); const app = getApp();
import htmlParser from '../../../../common/js/lib/html-parser.js'; import htmlParser from '../../../../common/js/lib/html-parser.js';
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";
@ -93,8 +93,6 @@
props: {}, props: {},
onLoad(params) { onLoad(params) {
//
params = app.globalData.launch_params_handle(params);
this.setData({ this.setData({
params: params params: params
}); });
@ -121,7 +119,7 @@
return { return {
title: this.data.seo_title || this.data.title || app.globalData.data.application_title, title: this.data.seo_title || this.data.title || app.globalData.data.application_title,
desc: this.data.seo_desc || app.globalData.data.application_describe, desc: this.data.seo_desc || app.globalData.data.application_describe,
path: '/pages/plugins/blog/detail/detail?id='+blog_id+'&referrer=' + user_id, path: '/pages/plugins/blog/detail/detail?id='+blog_id+'&referrer=' + user_id,
imageUrl: this.data.cover imageUrl: this.data.cover
}; };
}, },
@ -132,7 +130,7 @@
var blog_id = this.params.id || 0; var blog_id = this.params.id || 0;
return { return {
title: this.data.seo_title || this.data.title || app.globalData.data.application_title, title: this.data.seo_title || this.data.title || app.globalData.data.application_title,
query: 'id='+blog_id+'&referrer=' + user_id, query: 'id='+blog_id+'&referrer=' + user_id,
imageUrl: this.data.cover imageUrl: this.data.cover
}; };
}, },
@ -165,10 +163,10 @@
uni.hideLoading(); uni.hideLoading();
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
var data = res.data.data; var data = res.data.data;
if (res.data.code == 0 && (data.data || null) != null) { if (res.data.code == 0 && (data.data || null) != null) {
var blog = data.data; var blog = data.data;
if((blog.content || null) != null) { if((blog.content || null) != null) {
blog['content'] = htmlParser(blog.content); blog['content'] = htmlParser(blog.content);
} }
this.setData({ this.setData({
data_bottom_line_status: true, data_bottom_line_status: true,

View File

@ -72,8 +72,6 @@
props: {}, props: {},
onLoad(params) { onLoad(params) {
//
params = app.globalData.launch_params_handle(params);
this.setData({ this.setData({
params: params, params: params,
nav_active_value: params.id || 0, nav_active_value: params.id || 0,

View File

@ -88,10 +88,6 @@
props: {}, props: {},
onLoad(params) { onLoad(params) {
//
params = app.globalData.launch_params_handle(params);
//
this.setData({ this.setData({
params: params params: params
}); });

View File

@ -134,8 +134,6 @@
props: {}, props: {},
onLoad(params) { onLoad(params) {
//
params = app.globalData.launch_params_handle(params);
this.setData({ this.setData({
params: params, params: params,
user: app.globalData.get_user_cache_info() user: app.globalData.get_user_cache_info()

View File

@ -166,8 +166,6 @@
props: {}, props: {},
onLoad(params) { onLoad(params) {
//
params = app.globalData.launch_params_handle(params);
this.setData({ this.setData({
params: params, params: params,
user: app.globalData.get_user_cache_info() user: app.globalData.get_user_cache_info()

View File

@ -68,8 +68,6 @@
props: {}, props: {},
onLoad(params) { onLoad(params) {
//
params = app.globalData.launch_params_handle(params);
this.setData({ this.setData({
params: params params: params
}); });

View File

@ -122,10 +122,6 @@
props: {}, props: {},
onLoad(params) { onLoad(params) {
//
params = app.globalData.launch_params_handle(params);
//
this.setData({ this.setData({
params: params, params: params,
post_data: { post_data: {

View File

@ -78,9 +78,6 @@
props: {}, props: {},
onLoad(params) { onLoad(params) {
//
params = app.globalData.launch_params_handle(params);
//params['id'] = 1;
this.setData({ this.setData({
params: params params: params
}); });

View File

@ -68,10 +68,7 @@
}, },
props: {}, props: {},
onLoad(params) { onLoad(params) {
//
params = app.globalData.launch_params_handle(params);
// //
var nav_status_index = 0; var nav_status_index = 0;
if ((params.status || null) != null) { if ((params.status || null) != null) {