|
|
|
@ -1,22 +1,25 @@
|
|
|
|
|
<template>
|
|
|
|
|
<Modal
|
|
|
|
|
v-model="dispalyModal"
|
|
|
|
|
<Modal v-model="dispalyModal"
|
|
|
|
|
width="1000"
|
|
|
|
|
:loading="true"
|
|
|
|
|
:mask-closable="false"
|
|
|
|
|
@on-visible-change="visibleChange"
|
|
|
|
|
@on-cancel="cancel"
|
|
|
|
|
>
|
|
|
|
|
<p slot="header" style="color:#f60;text-align:left">
|
|
|
|
|
@on-cancel="cancel">
|
|
|
|
|
<p slot="header"
|
|
|
|
|
style="color:#f60;text-align:left">
|
|
|
|
|
<span>配置活动</span>
|
|
|
|
|
</p>
|
|
|
|
|
<div>基本配置</div>
|
|
|
|
|
<Form ref="formValidate" :model="formValidate" :rules="ruleValidate" :label-width="80">
|
|
|
|
|
<Form ref="formValidate"
|
|
|
|
|
:model="formValidate"
|
|
|
|
|
:rules="ruleValidate"
|
|
|
|
|
:label-width="80">
|
|
|
|
|
<Row>
|
|
|
|
|
<i-col style="text-align: left;" span="8">
|
|
|
|
|
<FormItem label prop="logo">
|
|
|
|
|
<Upload
|
|
|
|
|
ref="upload"
|
|
|
|
|
<i-col style="text-align: left;"
|
|
|
|
|
span="8">
|
|
|
|
|
<FormItem label
|
|
|
|
|
prop="logo">
|
|
|
|
|
<Upload ref="upload"
|
|
|
|
|
:show-upload-list="false"
|
|
|
|
|
:on-success="uploadImgSuccess"
|
|
|
|
|
:format="['jpg', 'jpeg', 'png']"
|
|
|
|
@ -25,72 +28,97 @@
|
|
|
|
|
multiple
|
|
|
|
|
type="drag"
|
|
|
|
|
action
|
|
|
|
|
style="display: inline-block;"
|
|
|
|
|
>
|
|
|
|
|
style="display: inline-block;">
|
|
|
|
|
<div style="width: 200px;height:200px;line-height: 200px;">
|
|
|
|
|
<span v-if="!formValidate.logo">请上传图片</span>
|
|
|
|
|
<img
|
|
|
|
|
v-if="formValidate.logo"
|
|
|
|
|
<img v-if="formValidate.logo"
|
|
|
|
|
:src="`/kiisoo-ic` + formValidate.logo"
|
|
|
|
|
alt
|
|
|
|
|
style="width: 100%; height: auto"
|
|
|
|
|
/>
|
|
|
|
|
style="width: 100%; height: auto" />
|
|
|
|
|
</div>
|
|
|
|
|
</Upload>
|
|
|
|
|
</FormItem>
|
|
|
|
|
</i-col>
|
|
|
|
|
<i-col span="15" offset="1">
|
|
|
|
|
<FormItem label="活动名称" prop="name">
|
|
|
|
|
<i-input type="text" v-model="formValidate.name" placeholder="请输入活动名称"></i-input>
|
|
|
|
|
<i-col span="15"
|
|
|
|
|
offset="1">
|
|
|
|
|
<FormItem label="活动名称"
|
|
|
|
|
prop="name">
|
|
|
|
|
<i-input type="text"
|
|
|
|
|
v-model="formValidate.name"
|
|
|
|
|
placeholder="请输入活动名称"></i-input>
|
|
|
|
|
</FormItem>
|
|
|
|
|
<Form-item label="活动描述" prop="description">
|
|
|
|
|
<i-input
|
|
|
|
|
v-model="formValidate.description"
|
|
|
|
|
<Form-item label="活动描述"
|
|
|
|
|
prop="description">
|
|
|
|
|
<i-input v-model="formValidate.description"
|
|
|
|
|
type="textarea"
|
|
|
|
|
:autosize="{ minRows: 3 }"
|
|
|
|
|
placeholder="请输入活动描述"
|
|
|
|
|
></i-input>
|
|
|
|
|
placeholder="请输入活动描述"></i-input>
|
|
|
|
|
</Form-item>
|
|
|
|
|
<Form-item label="欢迎语" prop="description">
|
|
|
|
|
<i-input
|
|
|
|
|
v-model="formValidate.welcome"
|
|
|
|
|
<Form-item label="欢迎语"
|
|
|
|
|
prop="description">
|
|
|
|
|
<i-input v-model="formValidate.welcome"
|
|
|
|
|
type="textarea"
|
|
|
|
|
:autosize="{ minRows: 3 }"
|
|
|
|
|
placeholder="请输入欢迎语"
|
|
|
|
|
></i-input>
|
|
|
|
|
placeholder="请输入欢迎语"></i-input>
|
|
|
|
|
</Form-item>
|
|
|
|
|
<FormItem label="APPID" prop="appId">
|
|
|
|
|
<i-input type="text" v-model="formValidate.appId" placeholder="请输入appid"></i-input>
|
|
|
|
|
<FormItem label="标题"
|
|
|
|
|
prop="title">
|
|
|
|
|
<i-input type="text"
|
|
|
|
|
v-model="formValidate.title"
|
|
|
|
|
placeholder="请输入标题"></i-input>
|
|
|
|
|
</FormItem>
|
|
|
|
|
<FormItem label="URI" prop="uri">
|
|
|
|
|
<i-input type="text" v-model="formValidate.uri" placeholder="请输入URI"></i-input>
|
|
|
|
|
<FormItem label="APPID"
|
|
|
|
|
prop="appId">
|
|
|
|
|
<i-input type="text"
|
|
|
|
|
v-model="formValidate.appId"
|
|
|
|
|
placeholder="请输入appid"></i-input>
|
|
|
|
|
</FormItem>
|
|
|
|
|
<FormItem label="URI"
|
|
|
|
|
prop="uri">
|
|
|
|
|
<i-input type="text"
|
|
|
|
|
v-model="formValidate.uri"
|
|
|
|
|
placeholder="请输入URI"></i-input>
|
|
|
|
|
</FormItem>
|
|
|
|
|
</i-col>
|
|
|
|
|
</Row>
|
|
|
|
|
</Form>
|
|
|
|
|
<div class="topic">活动类型</div>
|
|
|
|
|
<Row :gutter="10" class="inputItem" v-for="(item, index) in formValidate.params" :key="index">
|
|
|
|
|
<Row :gutter="10"
|
|
|
|
|
class="inputItem"
|
|
|
|
|
v-for="(item, index) in formValidate.params"
|
|
|
|
|
:key="index">
|
|
|
|
|
<i-col :span="2">类型{{ index + 1 }}</i-col>
|
|
|
|
|
<i-col :span="9">
|
|
|
|
|
<i-input class="inputClass" type="text" v-model="item.name" placeholder="请输入活动类型名称"></i-input>
|
|
|
|
|
<i-input class="inputClass"
|
|
|
|
|
type="text"
|
|
|
|
|
v-model="item.name"
|
|
|
|
|
placeholder="请输入活动类型名称"></i-input>
|
|
|
|
|
</i-col>
|
|
|
|
|
<i-col :span="9">
|
|
|
|
|
<i-input
|
|
|
|
|
class="inputClass"
|
|
|
|
|
<i-input class="inputClass"
|
|
|
|
|
type="text"
|
|
|
|
|
style="margin-left: 20px"
|
|
|
|
|
v-model="item.defaultVal"
|
|
|
|
|
placeholder="请输入参数"
|
|
|
|
|
></i-input>
|
|
|
|
|
placeholder="请输入参数"></i-input>
|
|
|
|
|
</i-col>
|
|
|
|
|
<i-col :span="4">
|
|
|
|
|
<Button style="margin-left: 20px" type="error" @click="delActivityInput(index)">删除</Button>
|
|
|
|
|
<Button style="margin-left: 20px"
|
|
|
|
|
type="error"
|
|
|
|
|
@click="delActivityInput(index)">删除</Button>
|
|
|
|
|
</i-col>
|
|
|
|
|
</Row>
|
|
|
|
|
<Button style="margin-top: 10px" type="primary" @click="addActivityInput">+添加活动类型</Button>
|
|
|
|
|
<Button style="margin-top: 10px"
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="addActivityInput">+添加活动类型</Button>
|
|
|
|
|
<div slot="footer">
|
|
|
|
|
<Button type="primary" shape="circle" :loading="modal_loading" @click="cancel">取消</Button>
|
|
|
|
|
<Button type="primary" shape="circle" :loading="modal_loading" @click="save">确定</Button>
|
|
|
|
|
<Button type="primary"
|
|
|
|
|
shape="circle"
|
|
|
|
|
:loading="modal_loading"
|
|
|
|
|
@click="cancel">取消</Button>
|
|
|
|
|
<Button type="primary"
|
|
|
|
|
shape="circle"
|
|
|
|
|
:loading="modal_loading"
|
|
|
|
|
@click="save">确定</Button>
|
|
|
|
|
</div>
|
|
|
|
|
</Modal>
|
|
|
|
|
</template>
|
|
|
|
@ -114,6 +142,7 @@ export default {
|
|
|
|
|
description: [
|
|
|
|
|
{ required: true, message: "活动描述不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
title: [{ required: true, message: "请输入标题", trigger: "blur" }],
|
|
|
|
|
appId: [{ required: true, message: "appId不能为空", trigger: "blur" }],
|
|
|
|
|
uri: [{ required: true, message: "URI不能为空", trigger: "blur" }],
|
|
|
|
|
welcome: [{ required: true, message: "请输入欢迎语", trigger: "blur" }]
|
|
|
|
@ -207,6 +236,7 @@ export default {
|
|
|
|
|
const me = this;
|
|
|
|
|
let data = new FormData();
|
|
|
|
|
data.append("file", res);
|
|
|
|
|
data.append("needMediaId", true)
|
|
|
|
|
axios({
|
|
|
|
|
method: "post",
|
|
|
|
|
url: "/upload",
|
|
|
|
@ -218,6 +248,7 @@ export default {
|
|
|
|
|
if (res.data.success) {
|
|
|
|
|
// me.formValidate.logo = res.data.results;
|
|
|
|
|
me.$set(me.formValidate, "logo", res.data.results.localPath);
|
|
|
|
|
me.$set(me.formValidate, "mediaId", res.data.results.mediaId);
|
|
|
|
|
console.log(me.formValidate.logo);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|