小程序
小游戏
企业微信
微信支付
扫描小程序码分享
问题:小程序突然变得所有页面全部可以分享,而且代码中未编写分享相关功能。
经排查后,代码应该没有问题:
如果有人遇到过此类问题,希望告知下原因,谢谢。
4 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
const app = getApp() Page({ data: { active: 0, question: '/static/image/icons/question.png', used: '/static/image/icons/used.png' }, onShow() { this.getGiftCardList() }, getGiftCardList(pageNo = 1) { wx.showLoading({ title: '加载中...' }) const { active, cardInfo } = this.data const card = cardInfo[active] app.API.request({ url: app.API.urls.getGiftCardList, data: { useStatus: active === 0 ? 2 : 3, pageNo }, success: res => { if (pageNo == 1) { card.list = res.data.list card.pageCount = res.data.pageCount card.count = res.data.count } else { card.list = card.list.concat(res.data.list) } card.pageNo = pageNo this.setData({ cardInfo }) wx.hideLoading() }, fail: err => { wx.hideLoading() } }) }, tabChange(e) { this.setData({ active: e.detail.index }) const card = this.data.cardInfo[this.data.active] if (card.pageCount == 0) return this.getGiftCardList() }, showTip() { wx.showModal({ title: '使用说明', content: '请在有效期内使用', showCancel: false, confirmColor: '#994539' }) }, goBind() { wx.navigateTo({ url: '/subPages/mine/wallet/giftcard/bind/index' }) }, touchBottom() { const card = this.data.cardInfo[this.data.active] if (card.pageNo >= card.pageCount) return this.getGiftCardList(card.pageNo + 1) } })
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
const app = getApp() Page({ data: { active: 0, question: '/static/image/icons/question.png', used: '/static/image/icons/used.png' }, onShow() { this.getGiftCardList() }, getGiftCardList(pageNo = 1) { wx.showLoading({ title: '加载中...' }) const { active, cardInfo } = this.data const card = cardInfo[active] app.API.request({ url: app.API.urls.getGiftCardList, data: { useStatus: active === 0 ? 2 : 3, pageNo }, success: res => { if (pageNo == 1) { card.list = res.data.list card.pageCount = res.data.pageCount card.count = res.data.count } else { card.list = card.list.concat(res.data.list) } card.pageNo = pageNo this.setData({ cardInfo }) wx.hideLoading() }, fail: err => { wx.hideLoading() } }) }, tabChange(e) { this.setData({ active: e.detail.index }) const card = this.data.cardInfo[this.data.active] if (card.pageCount == 0) return this.getGiftCardList() }, showTip() { wx.showModal({ title: '使用说明', content: '请在有效期内使用', showCancel: false, confirmColor: '#994539' }) }, goBind() { wx.navigateTo({ url: '/subPages/mine/wallet/giftcard/bind/index' }) }, touchBottom() { const card = this.data.cardInfo[this.data.active] if (card.pageNo >= card.pageCount) return this.getGiftCardList(card.pageNo + 1) } })