Authored by 李奇

fix: 小程序加载版本号

  1 +const _ = require('lodash');
1 const haveGainModel = require('../models/have-gain'); 2 const haveGainModel = require('../models/have-gain');
2 const headerModel = require('../../../doraemon/models/header'); 3 const headerModel = require('../../../doraemon/models/header');
3 4
@@ -148,6 +149,10 @@ class HaveGain { @@ -148,6 +149,10 @@ class HaveGain {
148 149
149 body.socialMediaList = JSON.parse(body.socialMediaList || '[]', true); 150 body.socialMediaList = JSON.parse(body.socialMediaList || '[]', true);
150 151
  152 + if (req.yoho.isMiniApp) {
  153 + uid.appVersion = _.get(global, 'yoho.config.appVersion');
  154 + }
  155 +
151 return req.ctx(haveGainModel).submitApply(Object.assign({uid}, body)).then(result => { 156 return req.ctx(haveGainModel).submitApply(Object.assign({uid}, body)).then(result => {
152 return res.json(result); 157 return res.json(result);
153 }).catch(next); 158 }).catch(next);