- 自定义tabBar切换时闪烁?
[图片] 自定义tabBar跳转问题,点击订单,页面跳到了订单页,但是个人中心图标却是被选中状态。 .xml <cover-view class="tab-bar" style='height:{{isIphoneX?166:120}}rpx;'> <cover-view class="tab-bar-border"></cover-view> <cover-view wx:for="{{list}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="switchTab"> <cover-image class='cover-image' src="{{selected === index ? item.selectedIconPath : item.iconPath}}"></cover-image> <cover-view style="color: {{selected === index ? selectedColor : color}}">{{item.text}}</cover-view> </cover-view> </cover-view> .js const app = getApp(); Component({ data: { selected: 0, color: "#7A7E83", selectedColor: "#3cc51f", list: [{ pagePath: "/pages/index/index", iconPath: "/pages/images/menuicon/index_off.png", selectedIconPath: "/pages/images/menuicon/index_on.png", text: "首页", }, { pagePath: "/pages/order/order/order", iconPath: "/pages/images/menuicon/order_off.png", selectedIconPath: "/pages/images/menuicon/order_on.png", text: "订单", }, { pagePath: "/pages/user/user", iconPath: "/pages/images/menuicon/user_off.png", selectedIconPath: "/pages/images/menuicon/user_on.png", text: "个人", }], //适配IphoneX的屏幕底部横线 isIphoneX: app.globalData.isIphoneX }, // attached() {}, methods: { switchTab(e) { var dataset = e.currentTarget.dataset console.log(dataset); var path = dataset.path var index = dataset.index wx.switchTab({ url: path }) this.setData({ selected: index }) console.log(this.data.selected) } } })
2021-05-14 - 微信小程序消息订阅一次性订阅是什么意思?
微信小程序消息订阅的类型 分为一次性订阅和长期订阅,这之间有什么区别吗?一次性订阅是什么意思呢?是每次登录都要订阅一次吗?还是只需要订阅一次,以后都可以给用户推送消息了。
2021-05-11 - 如何获取unionId?
微信小程序获取用户信息改版之后应该怎么获取unionId?之前是通过wx.getUserInfo,获取到加密信息然后解密获取。现在不使用getUserInfo应该怎么获取呢?如何凭借code获取unionId
2021-05-02 - wx.getUserInfo 获取不到用户的头像和昵称
使用wx.getUserInfo获取到的用户信息是错误的 avatarUrl: "https://thirdwx.qlogo.cn/mmopen/vi_32/POgEwh4mIHO4nibH0KlMECNjjGxQUq24ZEaGT4poC6icRiccVGKSyXwibcPq4BWmiaIGuG1icwxaQX6grC9VemZoJ8rg/132"city: ""country: ""gender: 0language: ""nickName: "微信用户"province: ""hasOwnProperty: (...)isPrototypeOf: (...)propertyIsEnumerable: (...)toLocaleString: (...)toString: (...)valueOf: (...)__defineGetter__: (...)__defineSetter__: (...)__lookupGetter__: (...)__lookupSetter__: (...)
2021-05-02 - 使用腾讯服务地图选点插件报错?
使用腾讯服务地图选点插件报错。错误信息:请设置key授权本小程序appId,设置请点击https://lbs.qq.com/console/mykey.html 可是我已经在腾讯地图服务配置过了
2021-01-11 - ios用户如何吧小程序分享到朋友圈?
page.onShareAppMessage page.onShareTimeline 使用这两个方法ios用户还是没有办法把小程序分享到朋友圈
2021-01-11 - 刚上线的小程序为啥不能分享到朋友圈?
刚上线的小程序怎么不能分享到朋友圈。小程序怎么分享到朋友圈
2021-01-10 - jscode2session返回错误吗40163?
https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/login/auth.code2Session.html 接口返回错误status:[40163],message[code been used, hints: [ req_id: yhcachqge-trI3PA ]]
2021-01-05 - 登录接口返回失败?
/sns/jscode2session? 接口返回status:[40163],message[code been used, hints: [ req_id: yhcachqge-trI3PA ]]
2021-01-05 - 审核不通过,说是违反了3.4条例?
[图片][图片]这个登录页面到底不服和3.4的哪条标准啊,为啥是过不了审核呢?关键我第一版也是这样就通过的啊
2021-01-05