|
|
|
@ -2,87 +2,116 @@
|
|
|
|
|
<div class>
|
|
|
|
|
<Row>
|
|
|
|
|
<i-col :span="12">
|
|
|
|
|
<Form ref="welcomeForm" :model="welcome" :rules="welcomeRules">
|
|
|
|
|
<FormItem label="欢迎语内容" prop="content">
|
|
|
|
|
<i-input
|
|
|
|
|
v-model="welcome.content"
|
|
|
|
|
<Form ref="welcomeForm"
|
|
|
|
|
:model="welcome"
|
|
|
|
|
:rules="welcomeRules">
|
|
|
|
|
<FormItem label="欢迎语内容"
|
|
|
|
|
prop="content">
|
|
|
|
|
<i-input v-model="welcome.content"
|
|
|
|
|
type="textarea"
|
|
|
|
|
style="height: 220px"
|
|
|
|
|
:autosize="{ minRows: 10, maxRows: 10 }"
|
|
|
|
|
placeholder="请输入欢迎语内容,最多100个字"
|
|
|
|
|
></i-input>
|
|
|
|
|
placeholder="请输入欢迎语内容,最多100个字"></i-input>
|
|
|
|
|
</FormItem>
|
|
|
|
|
<Row
|
|
|
|
|
style="margin-bottom: 10px"
|
|
|
|
|
<Row style="margin-bottom: 10px"
|
|
|
|
|
:gutter="10"
|
|
|
|
|
class="inputItem"
|
|
|
|
|
v-for="(item, index) in welcome.params"
|
|
|
|
|
:key="index"
|
|
|
|
|
>
|
|
|
|
|
:key="index">
|
|
|
|
|
<div v-if="item.type == 3">
|
|
|
|
|
<i-col style="line-height: 32px" :span="2">标题 {{ index + 1 }}</i-col>
|
|
|
|
|
<i-col style="line-height: 32px"
|
|
|
|
|
:span="2">标题 {{ index + 1 }}</i-col>
|
|
|
|
|
<i-col :span="3">
|
|
|
|
|
<i-input class="inputClass" type="text" disabled v-model="item.key"></i-input>
|
|
|
|
|
<i-input class="inputClass"
|
|
|
|
|
type="text"
|
|
|
|
|
disabled
|
|
|
|
|
v-model="item.key"></i-input>
|
|
|
|
|
</i-col>
|
|
|
|
|
<i-col style="line-height: 32px" :span="2">APPID {{ index + 1 }}</i-col>
|
|
|
|
|
<i-col style="line-height: 32px"
|
|
|
|
|
:span="2">APPID {{ index + 1 }}</i-col>
|
|
|
|
|
<i-col :span="3">
|
|
|
|
|
<i-input class="inputClass" type="text" disabled v-model="item.defaultVal"></i-input>
|
|
|
|
|
<i-input class="inputClass"
|
|
|
|
|
type="text"
|
|
|
|
|
disabled
|
|
|
|
|
v-model="item.defaultVal"></i-input>
|
|
|
|
|
</i-col>
|
|
|
|
|
<i-col style="line-height: 32px" :span="2">URI {{ index + 1 }}</i-col>
|
|
|
|
|
<i-col style="line-height: 32px"
|
|
|
|
|
:span="2">URI {{ index + 1 }}</i-col>
|
|
|
|
|
<i-col :span="3">
|
|
|
|
|
<i-input class="inputClass" type="text" disabled v-model="item.description"></i-input>
|
|
|
|
|
<i-input class="inputClass"
|
|
|
|
|
type="text"
|
|
|
|
|
disabled
|
|
|
|
|
v-model="item.description"></i-input>
|
|
|
|
|
</i-col>
|
|
|
|
|
<i-col style="line-height: 32px" :span="2">MediaId{{ index + 1 }}</i-col>
|
|
|
|
|
<i-col style="line-height: 32px"
|
|
|
|
|
:span="2">MediaId{{ index + 1 }}</i-col>
|
|
|
|
|
<i-col :span="3">
|
|
|
|
|
<i-input class="inputClass" type="text" disabled v-model="item.limitLower"></i-input>
|
|
|
|
|
<i-input class="inputClass"
|
|
|
|
|
type="text"
|
|
|
|
|
disabled
|
|
|
|
|
v-model="item.limitLower"></i-input>
|
|
|
|
|
</i-col>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else-if="item.type == 2">
|
|
|
|
|
<i-col style="line-height: 32px" :span="4">标题 {{ index + 1 }}</i-col>
|
|
|
|
|
<i-col :span="8">
|
|
|
|
|
<i-input class="inputClass" type="text" disabled v-model="item.description"></i-input>
|
|
|
|
|
<i-col style="line-height: 32px"
|
|
|
|
|
:span="4">标题 {{ index + 1 }}</i-col>
|
|
|
|
|
<i-col :span="6">
|
|
|
|
|
<i-input class="inputClass"
|
|
|
|
|
type="text"
|
|
|
|
|
disabled
|
|
|
|
|
v-model="item.description"></i-input>
|
|
|
|
|
</i-col>
|
|
|
|
|
<i-col style="line-height: 32px" :span="4">URL {{ index + 1 }}</i-col>
|
|
|
|
|
<i-col :span="8">
|
|
|
|
|
<i-input class="inputClass" type="text" disabled v-model="item.defaultVal"></i-input>
|
|
|
|
|
<i-col style="line-height: 32px"
|
|
|
|
|
:span="4">URL {{ index + 1 }}</i-col>
|
|
|
|
|
<i-col :span="6">
|
|
|
|
|
<i-input class="inputClass"
|
|
|
|
|
type="text"
|
|
|
|
|
disabled
|
|
|
|
|
v-model="item.defaultVal"></i-input>
|
|
|
|
|
</i-col>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else>
|
|
|
|
|
<i-col style="line-height: 32px" :span="4">{{ item.name }}{{ index + 1 }}</i-col>
|
|
|
|
|
<i-col style="line-height: 32px"
|
|
|
|
|
:span="4">{{ item.name }}{{ index + 1 }}</i-col>
|
|
|
|
|
<i-col :span="16">
|
|
|
|
|
<i-input class="inputClass" type="text" disabled v-model="item.defaultVal"></i-input>
|
|
|
|
|
<i-input class="inputClass"
|
|
|
|
|
type="text"
|
|
|
|
|
disabled
|
|
|
|
|
v-model="item.defaultVal"></i-input>
|
|
|
|
|
</i-col>
|
|
|
|
|
</div>
|
|
|
|
|
<i-col :span="4">
|
|
|
|
|
<Button type="error" @click="delActivityInput(index)">删除</Button>
|
|
|
|
|
<Button type="error"
|
|
|
|
|
@click="delActivityInput(index)">删除</Button>
|
|
|
|
|
</i-col>
|
|
|
|
|
</Row>
|
|
|
|
|
<FormItem>
|
|
|
|
|
<Button type="text" @click="() => (showMessageTypes = true)" icon="md-add">添加图片/网页/小程序消息</Button>
|
|
|
|
|
<Button type="text"
|
|
|
|
|
@click="() => (showMessageTypes = true)"
|
|
|
|
|
icon="md-add">添加图片/网页/小程序消息</Button>
|
|
|
|
|
</FormItem>
|
|
|
|
|
<FormItem label="配置范围: ">
|
|
|
|
|
<span
|
|
|
|
|
@click="showStores"
|
|
|
|
|
v-if="welcome.stores.length > 0"
|
|
|
|
|
>{{ welcome.stores[0].name }}等{{ welcome.stores.length }}家店铺</span>
|
|
|
|
|
<Button
|
|
|
|
|
type="text"
|
|
|
|
|
<span @click="showStores"
|
|
|
|
|
v-if="welcome.stores.length > 0">{{ welcome.stores[0].name }}等{{ welcome.stores.length }}家店铺</span>
|
|
|
|
|
<Button type="text"
|
|
|
|
|
v-if="welcome.stores.length <= 0"
|
|
|
|
|
@click="showStores"
|
|
|
|
|
icon="md-add"
|
|
|
|
|
>全部店铺</Button>
|
|
|
|
|
icon="md-add">全部店铺</Button>
|
|
|
|
|
</FormItem>
|
|
|
|
|
<FormItem>
|
|
|
|
|
<Button type="primary" long @click="submit">确定</Button>
|
|
|
|
|
<Button type="primary"
|
|
|
|
|
long
|
|
|
|
|
@click="submit">确定</Button>
|
|
|
|
|
</FormItem>
|
|
|
|
|
</Form>
|
|
|
|
|
</i-col>
|
|
|
|
|
</Row>
|
|
|
|
|
<Modal v-model="showMessageTypes" title="添加图片/网页/小程序消息" :footer-hide="true">
|
|
|
|
|
<Modal v-model="showMessageTypes"
|
|
|
|
|
title="添加图片/网页/小程序消息"
|
|
|
|
|
:footer-hide="true">
|
|
|
|
|
<Row :gutter="24">
|
|
|
|
|
<i-col :span="8">
|
|
|
|
|
<Upload
|
|
|
|
|
ref="upload"
|
|
|
|
|
<Upload ref="upload"
|
|
|
|
|
:show-upload-list="false"
|
|
|
|
|
:on-success="uploadImgSuccess"
|
|
|
|
|
:format="['jpg', 'jpeg', 'png']"
|
|
|
|
@ -92,49 +121,77 @@
|
|
|
|
|
multiple
|
|
|
|
|
type="drag"
|
|
|
|
|
action
|
|
|
|
|
style="width: 100%;"
|
|
|
|
|
>
|
|
|
|
|
style="width: 100%;">
|
|
|
|
|
<div style="width: 100%;">
|
|
|
|
|
<Button long type="primary">{{imageUploading ? "上传中..." : "图片"}}</Button>
|
|
|
|
|
<Button long
|
|
|
|
|
type="primary">{{imageUploading ? "上传中..." : "图片"}}</Button>
|
|
|
|
|
</div>
|
|
|
|
|
</Upload>
|
|
|
|
|
</i-col>
|
|
|
|
|
<i-col :span="8">
|
|
|
|
|
<Button long @click="doShowWeb" type="primary">网页</Button>
|
|
|
|
|
<Button long
|
|
|
|
|
@click="doShowWeb"
|
|
|
|
|
type="primary">网页</Button>
|
|
|
|
|
</i-col>
|
|
|
|
|
<i-col :span="8">
|
|
|
|
|
<Button long @click="doShowMini" type="primary">小程序</Button>
|
|
|
|
|
<Button long
|
|
|
|
|
@click="doShowMini"
|
|
|
|
|
type="primary">小程序</Button>
|
|
|
|
|
</i-col>
|
|
|
|
|
</Row>
|
|
|
|
|
</Modal>
|
|
|
|
|
<Modal v-model="showWeb" title="添加网页消息" :loading="true">
|
|
|
|
|
<Form ref="webForm" :model="webForm" :rules="webFormRules">
|
|
|
|
|
<FormItem label="标题" prop="url">
|
|
|
|
|
<i-input v-model="webForm.title" type="text" placeholder="请输入网页标题"></i-input>
|
|
|
|
|
<Modal v-model="showWeb"
|
|
|
|
|
title="添加网页消息"
|
|
|
|
|
:loading="true">
|
|
|
|
|
<Form ref="webForm"
|
|
|
|
|
:model="webForm"
|
|
|
|
|
:rules="webFormRules">
|
|
|
|
|
<FormItem label="标题"
|
|
|
|
|
prop="title">
|
|
|
|
|
<i-input v-model="webForm.title"
|
|
|
|
|
type="text"
|
|
|
|
|
placeholder="请输入网页标题"></i-input>
|
|
|
|
|
</FormItem>
|
|
|
|
|
<FormItem label="添加网页消息" prop="url">
|
|
|
|
|
<i-input v-model="webForm.url" type="text" placeholder="以http或https开头"></i-input>
|
|
|
|
|
<FormItem label="添加网页消息"
|
|
|
|
|
prop="url">
|
|
|
|
|
<i-input v-model="webForm.url"
|
|
|
|
|
type="text"
|
|
|
|
|
placeholder="以http或https开头"></i-input>
|
|
|
|
|
</FormItem>
|
|
|
|
|
</Form>
|
|
|
|
|
<div slot="footer">
|
|
|
|
|
<Button type="primary" @click="cancelWeb">取消</Button>
|
|
|
|
|
<Button type="primary" @click="okWeb">确定</Button>
|
|
|
|
|
<Button type="primary"
|
|
|
|
|
@click="cancelWeb">取消</Button>
|
|
|
|
|
<Button type="primary"
|
|
|
|
|
@click="okWeb">确定</Button>
|
|
|
|
|
</div>
|
|
|
|
|
</Modal>
|
|
|
|
|
<Modal v-model="showMini" title="添加小程序消息" :loading="true">
|
|
|
|
|
<Form ref="miniForm" :model="miniForm" :rules="miniFormRules">
|
|
|
|
|
<FormItem label="标题" prop="key">
|
|
|
|
|
<i-input v-model="miniForm.key" type="text" placeholder="请输入标题"></i-input>
|
|
|
|
|
<Modal v-model="showMini"
|
|
|
|
|
title="添加小程序消息"
|
|
|
|
|
:loading="true">
|
|
|
|
|
<Form ref="miniForm"
|
|
|
|
|
:model="miniForm"
|
|
|
|
|
:rules="miniFormRules">
|
|
|
|
|
<FormItem label="标题"
|
|
|
|
|
prop="key">
|
|
|
|
|
<i-input v-model="miniForm.key"
|
|
|
|
|
type="text"
|
|
|
|
|
placeholder="请输入标题"></i-input>
|
|
|
|
|
</FormItem>
|
|
|
|
|
<FormItem label="APPID" prop="appid">
|
|
|
|
|
<i-input v-model="miniForm.appid" type="text" placeholder="请输入appid"></i-input>
|
|
|
|
|
<FormItem label="APPID"
|
|
|
|
|
prop="appid">
|
|
|
|
|
<i-input v-model="miniForm.appid"
|
|
|
|
|
type="text"
|
|
|
|
|
placeholder="请输入appid"></i-input>
|
|
|
|
|
</FormItem>
|
|
|
|
|
<FormItem label="URI" prop="uri">
|
|
|
|
|
<i-input v-model="miniForm.uri" type="text" placeholder="请输入URl"></i-input>
|
|
|
|
|
<FormItem label="URI"
|
|
|
|
|
prop="uri">
|
|
|
|
|
<i-input v-model="miniForm.uri"
|
|
|
|
|
type="text"
|
|
|
|
|
placeholder="请输入URl"></i-input>
|
|
|
|
|
</FormItem>
|
|
|
|
|
<FormItem label="封面图">
|
|
|
|
|
<Upload
|
|
|
|
|
ref="upload"
|
|
|
|
|
<Upload ref="upload"
|
|
|
|
|
:show-upload-list="false"
|
|
|
|
|
:on-success="miniUploadImgSuccess"
|
|
|
|
|
:format="['jpg', 'jpeg', 'png']"
|
|
|
|
@ -143,26 +200,29 @@
|
|
|
|
|
multiple
|
|
|
|
|
type="drag"
|
|
|
|
|
action
|
|
|
|
|
style="display: inline-block;"
|
|
|
|
|
>
|
|
|
|
|
style="display: inline-block;">
|
|
|
|
|
<div style="width: 200px;height:200px;line-height: 200px;border:1px dashed #dedede">
|
|
|
|
|
<span v-if="!miniForm.limitUpper">请上传图片</span>
|
|
|
|
|
<img
|
|
|
|
|
v-if="miniForm.limitUpper"
|
|
|
|
|
<img v-if="miniForm.limitUpper"
|
|
|
|
|
:src="`/kiisoo-ic` + miniForm.limitUpper"
|
|
|
|
|
alt
|
|
|
|
|
style="width: 100%; height: auto"
|
|
|
|
|
/>
|
|
|
|
|
style="width: 100%; height: auto" />
|
|
|
|
|
</div>
|
|
|
|
|
</Upload>
|
|
|
|
|
</FormItem>
|
|
|
|
|
</Form>
|
|
|
|
|
<div slot="footer">
|
|
|
|
|
<Button type="primary" @click="cancelMini">取消</Button>
|
|
|
|
|
<Button type="primary" @click="okMini">确定</Button>
|
|
|
|
|
<Button type="primary"
|
|
|
|
|
@click="cancelMini">取消</Button>
|
|
|
|
|
<Button type="primary"
|
|
|
|
|
@click="okMini">确定</Button>
|
|
|
|
|
</div>
|
|
|
|
|
</Modal>
|
|
|
|
|
<selectStoreStep :isModify="id>0" @doShow="doShow" :schedule="welcome" :show="showStoreCheck"></selectStoreStep>
|
|
|
|
|
<selectStoreStep :title="'配置范围'"
|
|
|
|
|
:isModify="id>0"
|
|
|
|
|
@doShow="doShow"
|
|
|
|
|
:schedule="welcome"
|
|
|
|
|
:show="showStoreCheck"></selectStoreStep>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|