123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- var util = require('../../utils/util.js');
- var app = getApp();
- Page({
-
- data: {
- qrcode: ''
- },
-
- onLoad: function (options) {
- if (!util.check_login()) {
- wx.switchTab({
- url: '/lionfish_comshop/pages/user/me',
- })
- }
- wx.showLoading();
- },
- getData(){
- var token = wx.getStorageSync('token');
- var that = this;
- app.util.request({
- 'url': 'entry/wxapp/user',
- 'data': {
- controller: 'community.get_community_zhitui_qrcode',
- token: token
- },
- dataType: 'json',
- success: function (res) {
- wx.hideLoading();
- if (res.data.code == 0) {
- that.setData({ qrcode: res.data.qrcode })
- } else {
- wx.switchTab({
- url: '/lionfish_comshop/pages/user/me',
- })
- }
- }
- })
- },
-
- onShow: function () {
- this.getData();
- }
- })
|