pc banner js
Step 1. Fetch and check out the branch for this merge request
git fetch origin git checkout -b feature/getbannerAction origin/feature/getbannerAction
Step 2. Review the changes locally
Step 3. Merge the branch and fix any conflicts that come up
git checkout master git merge --no-ff feature/getbannerAction
Step 4. Push the result of the merge to GitLab
git push origin master
Note that pushing to GitLab requires write access to this repository.
Tip: You can also checkout merge requests locally by following these guidelines
The changes were not merged into master.
* @date: 2016/11/30 | ||
*/ | ||
'use strict'; | ||
const helpers = global.yoho.helpers; | ||
const serviceApi = global.yoho.ServiceAPI; | ||
const URL_OPERATIONS_RESOURCE_GET = 'operations/api/v5/resource/get'; | ||
/** | ||
* 获取资源数据 | ||
* | ||
* @param string $content_code | ||
* @param string $client_type | ||
* @param boolean $isOnlyUrl false | ||
|
} else { | ||
let banner = ''; | ||
let md = data.data[0]; | ||
if (md && md.data) { | ||
if (md.template_name === 'single_image') { | ||
banner = md.data[0]; | ||
} else if (md.template_name === 'single_name_image') | ||
{ | ||
banner = md.data; | ||
} | ||
if ( banner) { | ||
if (!width || !height) { | ||
width = 2600; | ||
|
* @author: gxh<xuhui.ge@yoho.cn> | ||
* @date: 2016/11/30 | ||
*/ | ||
'use strict'; | ||
const gtModel = require('../models/getBanner'); | ||
const helpers = global.yoho.helpers; | ||
const index = (req, res) => { | ||
let contentCode = req.query.content_code || ''; | ||
let width = req.query.width || ''; | ||
let height = req.query.height || ''; | ||
gtModel.getResource(contentCode).then(data=>{ | ||
|
Status changed to closed