当前位置:网站首页>Click Cancel to return to the previous page and modify the parameter value of the previous page, let pages = getcurrentpages() let prevpage = pages [pages. Length - 2] / / the data of the previous pag
Click Cancel to return to the previous page and modify the parameter value of the previous page, let pages = getcurrentpages() let prevpage = pages [pages. Length - 2] / / the data of the previous pag
2022-04-23 17:47:00 【Youyoujing】
Realization function :
Personal center :

List to be visited :

Details page to be visited :

1. Other pages return Personal center page , Need to retrieve data , Update page content ;
2. Details page to be visited , After completing the follow-up , Point return , Back to the waiting list , Retrieve data , Update the data of the list to be visited .
Code implementation :
1. Personal center page :
<view class="iconbox" bindtap="daizhuifang">
<image class="iconimg" mode="widthFix" src="../../images/kehuxitong/xsicon04.png" />
<view class="icontxt"> To be followed up </view>
<view class="daizhuikh" wx:if="{
{daizhuikh}}">{
{daizhuikh}}</view> <!-- Here are the unread numbers displayed -->
</view>
/** * Life cycle function -- Monitor page display */
// onLoad Called when the page loads , You can get parameters , adopt options.
// onShow Call... When the page is displayed .
onShow: function() {
// Refresh the page display and update the data ;
// console.log(this.data.token);
// console.log(this.data.type);
wx.showLoading({
title: ' Loading ...',
mask: true,
})
this.getcard()
this.getCollectiondata()
this.gethistorydata()
if (this.data.type == 1) {
this.getmarketArticle(0)
this.getmarketArticle(1)
this.getmarketArticle(2)
this.getmarketArticle(3)
this.getmarketLoupanList()
// this.getgetUserInfo();
this.getgetCardIsStatus()
this.getgetMemberCount()
this.getsecondManageCount()
console.log('onshow')
// this.getgetManageUserList();
}
setTimeout(() => {
wx.hideLoading()
}, 500)
// if (this.data.token != '') {
// this.setData({
// token: false
// })
// }
},
2. Waiting list page :
/** * Life cycle function -- Monitor page display */
onShow: function() {
wx.stopPullDownRefresh() // Stop the pull-down refresh effect when the refresh is complete
this.getgetTagsList()
if (this.data.isaddkehu) {
// isaddkehu The parameter is transmitted from the details page to be followed up , Update the page if there is a value , Otherwise, do not update the list page ;
console.log('isaddkehu')
this.setData({
nomore: 0,
isLoadInterface: false,
pagecount: 1,
page: 1,
kehulistarr: [],
})
this.getgetManageUserList()
this.setData({
isaddkehu: false,
})
}
},
3. Details page to be visited :
// After submitting for follow-up , perform
setTimeout(() => {
let pages = getCurrentPages() // Data for the current page ,
let prevPage = pages[pages.length - 2] // The data on the previous page
prevPage.setData({
isaddkehu: true, // Modify the parameter value on the previous page
})
// console.log(pages);
// wx.navigateBack({
// delta: 1
// })
}, 1000)
thus , On the previous page onShow We can judge this in the future isaddkehu Whether the parameter value has been modified , You can know whether to update the data .
版权声明
本文为[Youyoujing]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230550531985.html
边栏推荐
- Flask项目的部署详解
- 209. Minimum length subarray - sliding window
- 列錶的使用-增删改查
- Router object, route object, declarative navigation, programmed navigation
- Ouvrir des contrats à terme, ouvrir des comptes en nuage ou faire confiance aux logiciels des sociétés à terme?
- Learning record of uni app dark horse yougou project (Part 2)
- [二叉数] 二叉树的最大深度+N叉树的最大深度
- The method of changing a value in the array and a value in the object of wechat applet
- 开期货,开户云安全还是相信期货公司的软件?
- 2022年上海市安全员C证操作证考试题库及模拟考试
猜你喜欢

In JS, t, = > Analysis of

编译原理 求first集 follow集 select集预测分析表 判断符号串是否符合文法定义(有源码!!!)

Compilation principle first set follow set select set prediction analysis table to judge whether the symbol string conforms to the grammar definition (with source code!!!)

常用SQL语句总结

Kubernetes 服务发现 监控Endpoints

Client example analysis of easymodbustcp

2022 tea artist (primary) examination simulated 100 questions and simulated examination

Use of five routing guards

练习:求偶数和、阈值分割和求差( list 对象的两个基础小题)

C1小笔记【任务训练篇二】
随机推荐
MySQL进阶学习之SQL优化【插入,主键,排序,分组,分页,计数】
索引:手把手教你索引从零基础到精通使用
Commonly used functions -- spineros:: and spineros::)
C1小笔记【任务训练篇二】
Use of list - addition, deletion, modification and query
MySQL进阶之索引【分类,性能分析,使用,设计原则】
958. 二叉树的完全性检验
958. Complete binary tree test
MySQL installation
Client example analysis of easymodbustcp
Leak detection and vacancy filling (VIII)
470. 用 Rand7() 实现 Rand10()
列錶的使用-增删改查
SystemVerilog(六)-变量
92. 反转链表 II-字节跳动高频题
On the problem of V-IF display and hiding
JS implementation private attribute
Compilation principle first set follow set select set prediction analysis table to judge whether the symbol string conforms to the grammar definition (with source code!!!)
31. Next arrangement
386. 字典序排数(中等)-迭代-全排列