jiangping
2025-07-17 6b96f204e4083d32996c2943a25e36c15d668bd1
small-program/unpackage/dist/dev/mp-weixin/common/main.js
@@ -130,8 +130,7 @@
  computed: _objectSpread({}, (0, _vuex.mapState)(['userInfo', 'openid'])),
  onLaunch: function onLaunch() {
    var that = this;
    console.log(this.userInfo);
    if (!this.userInfo || JSON.stringify(this.userInfo) == '{}') {
    if (!this.openid || this.openid == '') {
      uni.login({
        provider: 'weixin',
        success: function () {
@@ -148,7 +147,7 @@
                    });
                  case 3:
                    res = _context.sent;
                    if (res.code === 200) {
                    if (res && res.code === 200) {
                      that.$store.commit('setToken', res.data.token);
                      that.$store.commit('setOpenid', res.data.openid);
                      that.$store.commit('setUserInfo', res.data.member);
@@ -171,6 +170,17 @@
  },
  onShow: function onShow() {
    console.log('App Show');
    var that = this;
    var res = this.$u.api.getMemberInfo({}).then(function (res) {
      if (res && res.code === 200) {
        that.$store.commit('setUserInfo', res.data);
        that.$isResolve();
      } else {
        that.$store.commit('setToken', '');
        that.$store.commit('setUserInfo', {});
        that.$isResolve();
      }
    });
  },
  onHide: function onHide() {
    console.log('App Hide');