12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- import {
- getWxQrcode,
- } from '~/api/user'
- const app = getApp()
- Component({
- properties: {},
- data: {
- show: false,
- isIos: app.globalData.isIOS,
- qrCode: '',
- },
- methods: {
- async open() {
- if (!this.data.isIos) {
- wx.navigateTo({
- url: '/pages/commodity/index',
- })
- } else {
- let qrCode = await getWxQrcode()
- this.setData({
- qrCode: qrCode.ticketUrl
- })
- console.log(typeof this.getTabBar === 'function' &&
- this.getTabBar());
- if (typeof this.getTabBar === 'function' &&
- this.getTabBar()) {
- this.getTabBar().setData({
- mask: true
- })
- }
- this.setData({
- show: true,
- })
- }
- },
- closeModal() {
- this.setData({
- show: false
- })
- if (typeof this.getTabBar === 'function' &&
- this.getTabBar()) {
- this.getTabBar().setData({
- mask: false
- })
- }
- },
- }
- })
|