update:问卷UI修改
This commit is contained in:
@@ -43,13 +43,13 @@ function showModal(options) {
|
||||
* @param {*} data
|
||||
* @returns
|
||||
*/
|
||||
const canPlanetPublishPSM = function(data) {
|
||||
const canPlanetPublishPSM = function (data) {
|
||||
let isFb = true;
|
||||
let message = '';
|
||||
let title = '题目设置未完成';
|
||||
const incompleteQuestionList = [];
|
||||
data.questions
|
||||
&& data.questions.forEach((s) => {
|
||||
data.questions &&
|
||||
data.questions.forEach((s) => {
|
||||
if (s.question_type === 101 && s.config.price_gradient.length <= 0) {
|
||||
isFb = false;
|
||||
message = 'psm题目未完成设置,请设置价格区间后投放';
|
||||
@@ -73,15 +73,15 @@ const canPlanetPublishPSM = function(data) {
|
||||
* @param {*} data
|
||||
* @returns
|
||||
*/
|
||||
const canPlanetPublishMxdAndHotArea = function(data) {
|
||||
const canPlanetPublishMxdAndHotArea = function (data) {
|
||||
let isFb = true;
|
||||
let message = '';
|
||||
const qSteams = [];
|
||||
const incompleteQuestionList = [];
|
||||
let type = 0;
|
||||
let title = '题目设置未完成';
|
||||
data.questions
|
||||
&& data.questions.forEach((s) => {
|
||||
data.questions &&
|
||||
data.questions.forEach((s) => {
|
||||
if (s.question_type === 105 && s.config.design_version <= 0) {
|
||||
isFb = false;
|
||||
message = 'maxdiff题目未完成设置,请生成设计后投放';
|
||||
@@ -120,14 +120,14 @@ const canPlanetPublishMxdAndHotArea = function(data) {
|
||||
* @param {*} data
|
||||
* @returns
|
||||
*/
|
||||
const canPlanetPublish3D = function(data) {
|
||||
const canPlanetPublish3D = function (data) {
|
||||
{
|
||||
let canFB = true;
|
||||
let message = '';
|
||||
const qSteams = [];
|
||||
let title = '';
|
||||
data.questions
|
||||
&& data.questions.forEach((s) => {
|
||||
data.questions &&
|
||||
data.questions.forEach((s) => {
|
||||
if (QUESTION_TYPE.contains(s.question_type)) {
|
||||
try {
|
||||
if (s.config.is_three_dimensions && !s.config.scene) {
|
||||
@@ -157,15 +157,15 @@ const canPlanetPublish3D = function(data) {
|
||||
let message = '';
|
||||
const qSteams = [];
|
||||
let title = '';
|
||||
data.questions
|
||||
&& data.questions.forEach((s) => {
|
||||
data.questions &&
|
||||
data.questions.forEach((s) => {
|
||||
if (QUESTION_TYPE.contains(s.question_type)) {
|
||||
try {
|
||||
if (s.config.is_three_dimensions && s.config.is_binding_goods) {
|
||||
const wares = [];
|
||||
const _sceneInformation = s.config.scene_information;
|
||||
const sceneInformation
|
||||
= typeof _sceneInformation === 'string'
|
||||
const sceneInformation =
|
||||
typeof _sceneInformation === 'string'
|
||||
? JSON.parse(_sceneInformation)
|
||||
: _sceneInformation;
|
||||
sceneInformation.shelves.forEach((shelf) => {
|
||||
@@ -215,14 +215,14 @@ const canPlanetPublish3D = function(data) {
|
||||
* @param {*} data
|
||||
* @returns
|
||||
*/
|
||||
const canPlanetPublishImage = function(data) {
|
||||
const canPlanetPublishImage = function (data) {
|
||||
{
|
||||
let canFB = true;
|
||||
let message = '';
|
||||
const qSteams = [];
|
||||
let title = '';
|
||||
data.questions
|
||||
&& data.questions.forEach((s) => {
|
||||
data.questions &&
|
||||
data.questions.forEach((s) => {
|
||||
if (s.question_type === 13) {
|
||||
try {
|
||||
if (s.options.length <= 0 || s.options.some((y) => y.length <= 0)) {
|
||||
@@ -317,8 +317,8 @@ function canPublishRandom(data, publishType) {
|
||||
if (!isValidated) {
|
||||
errors.push({
|
||||
message:
|
||||
field.message
|
||||
|| `请填写"${random.title}"中第${index + 1}组"随机题组"的"${field.name}"`
|
||||
field.message ||
|
||||
`请填写"${random.title}"中第${index + 1}组"随机题组"的"${field.name}"`
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -397,11 +397,11 @@ function isLoopingLogicValid(data, publishType) {
|
||||
if (
|
||||
(data?.cycle_pages || []).every((i) => {
|
||||
return (
|
||||
i.question_index
|
||||
&& i.relation_type !== undefined
|
||||
&& i.relation_type !== null
|
||||
&& i.first_page
|
||||
&& i.last_page
|
||||
i.question_index &&
|
||||
i.relation_type !== undefined &&
|
||||
i.relation_type !== null &&
|
||||
i.first_page &&
|
||||
i.last_page
|
||||
);
|
||||
})
|
||||
) {
|
||||
@@ -425,7 +425,7 @@ function isLoopingLogicValid(data, publishType) {
|
||||
* @param sn
|
||||
* @param publishType undefined投放;null投放;0投放;1预览;2投放;3测试
|
||||
*/
|
||||
export const canPlanetPublish = async function(sn, publishType) {
|
||||
export const canPlanetPublish = async function (sn, publishType) {
|
||||
const parsedPublishType = !publishType ? 2 : publishType;
|
||||
const num = window.location.href.indexOf('code=');
|
||||
let code;
|
||||
|
||||
Reference in New Issue
Block a user