Authored by 李奇

测试环境管理权限

... ... @@ -25,6 +25,7 @@ let logger;
const app = express();
app.locals.devEnv = app.get('env') === 'development';
app.locals.isTest = app.get('env') === 'test3';
app.locals.isProduction = app.get('env') === 'production';
app.locals.version = pkg.version;
app.locals.startTime = moment().format('YYYYMMDDHH');
... ...
... ... @@ -5,7 +5,8 @@ module.exports = (req, res, next) => {
try {
const privateIps = _.get(req, 'app.locals.yap.json.privateips', []);
if (_.includes(privateIps, req.yoho.clientIp) || _.get(req, 'app.locals.devEnv', false)) {
if (_.includes(privateIps, req.yoho.clientIp) || _.get(req, 'app.locals.devEnv', false )
|| _.get(req, 'app.locals.isTest', false )) {
return next();
}
} catch (error) {
... ...
... ... @@ -78,7 +78,7 @@
<img class="preview-img" :src="conf.wheel_bg">
</div>
<Button v-show="!conf.wheel_bg">
<span ref="upload_img_wheelBg" img-key="wheel_bg">添加</span>
<span ref="upload_img_wheelBg" img-key="wheel_bg">添加(630x630)</span>
</Button>
</FormItem>
<FormItem label="抽奖按钮" prop="prize_btn_bg">
... ... @@ -87,7 +87,7 @@
<img class="preview-img" :src="conf.prize_btn_bg">
</div>
<Button v-show="!conf.prize_btn_bg">
<span ref="upload_img_tryBg" img-key="prize_btn_bg">添加</span>
<span ref="upload_img_tryBg" img-key="prize_btn_bg">添加(200x218)</span>
</Button>
</FormItem>
<FormItem label="中奖蒙层" prop="win_prize_bg">
... ... @@ -96,7 +96,7 @@
<img class="preview-img" :src="conf.win_prize_bg">
</div>
<Button v-show="!conf.win_prize_bg">
<span ref="upload_img_winPrizeBg" img-key="win_prize_bg">添加</span>
<span ref="upload_img_winPrizeBg" img-key="win_prize_bg">添加(750x1680)</span>
</Button>
</FormItem>
</Form>
... ... @@ -109,7 +109,7 @@
<img class="preview-img" :src="conf.rule_btn_bg">
</div>
<Button v-show="!conf.rule_btn_bg">
<span ref="upload_img_ruleBg" img-key="rule_btn_bg">添加</span>
<span ref="upload_img_ruleBg" img-key="rule_btn_bg">添加(154x62)</span>
</Button>
</FormItem>
<FormItem label="分享按钮" prop="share_btn_bg">
... ... @@ -118,7 +118,7 @@
<img class="preview-img" :src="conf.share_btn_bg">
</div>
<Button v-show="!conf.share_btn_bg">
<span ref="upload_img_shareBg" img-key="share_btn_bg">添加</span>
<span ref="upload_img_shareBg" img-key="share_btn_bg">添加(154x62)</span>
</Button>
</FormItem>
<FormItem label="分享缩略图" prop="share_btn_bg">
... ... @@ -127,7 +127,7 @@
<img class="preview-img" :src="conf.share_img">
</div>
<Button v-show="!conf.share_img">
<span ref="upload_img_shareImg" img-key="share_img">添加(300x300)</span>
<span ref="upload_img_shareImg" img-key="share_img">添加(300x300)</span>
</Button>
</FormItem>
<FormItem label="底部按钮1" prop="jump_btn_left_bg">
... ...