当前位置:网站首页>Wechat applet catchtap = "todetail" event problem
Wechat applet catchtap = "todetail" event problem
2022-04-23 09:03:00 【Accpdaiyekun】
const app = getApp()
const util = require('/../../../utils/util.js')
Component({
options: {
addGlobalClass: true // Be sure to add this sentence , Otherwise there is no style
},
data: {
tbaseurl:app.globalData.apiUrl,
cardCur: 0,
isCard:false,
swiperList: [{
id: 0,
type: 'image',
url: app.globalData.apiUrl + 'Uploads/homeimg/img001.jpg'
}, {
id: 1,
type: 'image',
url: app.globalData.apiUrl + 'Uploads/homeimg/img002.jpg'
}, {
id: 2,
type: 'image',
url: app.globalData.apiUrl + 'Uploads/homeimg/img003.jpg'
}, {
id: 3,
type: 'image',
url: app.globalData.apiUrl + 'Uploads/homeimg/img004.jpg'
}, {
id: 4,
type: 'image',
url: app.globalData.apiUrl + 'Uploads/homeimg/img005.jpg'
}, {
id: 5,
type: 'image',
url: app.globalData.apiUrl + 'Uploads/homeimg/img006.jpg'
}, {
id: 6,
type: 'image',
url: app.globalData.apiUrl + 'Uploads/homeimg/img007.jpg'
}],
toplists:[]// copy
},
methods: {
GetWan: function () {
var that=this;
wx.request({
url: app.globalData.apiUrl + 'WxXcx/XcxWn/GetListTopNum',
data: {
LoginKey: wx.getStorageSync('loginKey'),
},
method: 'GET',
header: {
'content-type': 'application/json'
},
success: function (res) {
//debugger;
var tempdata=res.data.data;
that.setData({
toplists:tempdata
})
}
})
},
toDetail(e) {// Jump to the details page
var currid = e.currentTarget.dataset.currid; // Get subscript
// Get the title
wx.navigateTo({
// Keep this page , Jump to another page
url: '/pages/component/Document/detail?Id=' + currid, // Page Jump url+ value
})
}
},
lifetimes: {
// Life cycle function , It can be a function , Or one in methods The method name defined in the amount to page onload
attached: function () {
// debugger;
this.GetWan();
}, // amount to page Inside onLoad
moved: function () {},
detached: function () {},
},
// Life cycle function , It can be a function , Or one in methods The method name defined in the
ready: function () {
},
pageLifetimes: {
show() {
}
},
})
component Under components catchtap event problem .
The solution is methods discharge toDetail The method will do
版权声明
本文为[Accpdaiyekun]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230721028972.html
边栏推荐
- Judgment on heap (25 points) two insertion methods
- The crawler returns null when parsing with XPath. The reason why the crawler cannot get the corresponding element and the solution
- [in-depth good article] detailed explanation of Flink SQL streaming batch integration technology (I)
- Open services in the bottom bar of idea
- npm ERR! network
- Complete binary search tree (30 points)
- 小程序报错 :should have url attribute when using navigateTo, redirectTo or switchTab
- 爬虫使用xpath解析时返回为空,获取不到相应的元素的原因和解决办法
- Output first order traversal according to second order and middle order traversal (25 points)
- Complete binary search tree (30 points)
猜你喜欢

First principle mind map

Resource packaging dependency tree

Valgrind et kcachegrind utilisent l'analyse d'exécution

Brush classic topics

PCTP考试经验分享
![[Luke V0] verification environment 2 - Verification Environment components](/img/aa/820000a52bc493a0734ff0eb76f536.png)
[Luke V0] verification environment 2 - Verification Environment components

1099 establish binary search tree (30 points)

Notes on xctf questions

GoLand debug go use - white record

深度学习框架中的自动微分及高阶导数
随机推荐
[boutique] using dynamic agent to realize unified transaction management II
2021李宏毅机器学习之Adaptive Learning Rate
Idea package jar file
Write down the post order traversal of the ~ binary tree
基于点云凸包的凹包获取方法
Go language self-study series | golang structure pointer
I don't understand time, timestamp and time zone. Look at this article
是否同一棵二叉搜索树 (25 分)
Use include in databinding
OneFlow學習筆記:從Functor到OpExprInterpreter
Initial experience of talent plan learning camp: communication + adhering to the only way to learn open source collaborative courses
基于ThinkPHP5版本TRC20-资金归集解决方案
L2-3 浪漫侧影 (25 分)
node安装
考研线性代数常见概念、问题总结
[in-depth good article] detailed explanation of Flink SQL streaming batch integration technology (I)
Rembg split mask
GoLand debug go use - white record
cadence的工艺角仿真、蒙特卡洛仿真、PSRR
Arbre de dépendance de l'emballage des ressources