1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- const app = getApp();
- Component({
- data: {
- selected: 0,
- color: "#7A7E83",
- selectedColor: "#3cc51f",
- list: [
- {
- pagePath: "/pages/index/index",
- text: "首页",
- iconPath: "/static/tabbar/index.png",
- selectedIconPath: "/static/tabbar/index-active.png"
- },
- {
- pagePath: "/pages/store/store",
- text: "门店",
- iconPath: "/static/tabbar/store.png",
- selectedIconPath: "/static/tabbar/store-active.png"
- },
- {
- pagePath: "/pages/mine/mine",
- text: "我的",
- iconPath: "/static/tabbar/me.png",
- selectedIconPath: "/static/tabbar/me-active.png"
- }
- ],
- showShare: false,
- },
- methods: {
- switchTab(e) {
- const { path, index } = e.currentTarget.dataset
- wx.switchTab({ url: path })
- this.setData({ selected: index })
- },
- onCloseShare() {
- this.setData({ showShare: false })
- },
- openShare() {
- this.setData({ showShare: true })
- },
- // 分享逻辑
- onShareAppMessage() {
- return {
- path: '/pages/index/index',
- imageUrl: app.globalData.programConfig.share_img
- }
- },
- // onShareTimeline() {
- // return {
- // title: '分享到朋友圈标题',
- // query: 'id=123',
- // imageUrl: '/static/tabbar/tp.png'
- // }
- // },
- }
- })
|