index.js 458 字节
Newer Older
study夏羽's avatar
study夏羽 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
'use strict';
const success = {
	success: true
}
const fail = {
	success: false
}
const createPublishHtml = require('./createPublishHtml')

exports.main = async (event, context) => {
	//event为客户端上传的参数
	console.log('event : ', event)

	let res = {};
	let params = event.data || event.params;

	switch (event.action) {
		case 'createPublishHtml':
			res = createPublishHtml(params.id)
			break;
	}

	//返回数据给客户端
	return res
};