Authored by htoooth

banner editor

... ... @@ -12,16 +12,48 @@
<th>
<Form>
<FormItem>
<Select>
<Select v-model="i.url.action">
<Option value="go.h5">H5网页</Option>
<Option value="go.ufo">商品列表页</Option>
<Option value="go.pool">商品池</Option>
</Select>
</FormItem>
<FormItem>
<Input/>
</FormItem>
<template v-if="i.url.action === 'go.h5'">
<FormItem>
<Input v-model="i.url.title" placeholder="参数"/>
</FormItem>
<FormItem>
<Input v-model="i.url.url" placeholder="参数"/>
</FormItem>
</template>
<template v-if="i.url.action === 'go.ufo'">
<FormItem>
<Input v-model="i.url.productListTitle" placeholder="参数"/>
</FormItem>
<FormItem>
<Input v-model="i.url.productPool" placeholder="参数"/>
</FormItem>
<FormItem>
<Input v-model="i.url.url" placeholder="参数"/>
</FormItem>
</template>
<template v-if="i.url.action === 'go.pool'">
<FormItem>
<Input v-model="i.url.productId" placeholder="参数"/>
</FormItem>
<FormItem>
<Input v-model="i.url.url" placeholder="参数"/>
</FormItem>
</template>
</Form>
</th>
... ... @@ -87,12 +119,24 @@ export default {
for (const i of keys) {
let a = m[i];
let url = new URL(a.url.url);
let params = new URLSearchParams(url.search);
a.url.url = `${url.origin}${url.pathname}`
console.log(a);
if (a.url.action === 'go.ufo' && params.get('pagename') === 'productDetail') {
a.url.action = 'go.pool'
}
for (let p of params) {
a.url[p[0]] = p[1]
}
result.push(a)
}
console.log(result);
return result;
}
},
... ...