bug
This commit is contained in:
@@ -42,13 +42,13 @@
|
|||||||
<div class="type">
|
<div class="type">
|
||||||
<p class="color-666">其它类型</p>
|
<p class="color-666">其它类型</p>
|
||||||
<u-radio-group v-model="form.contentType">
|
<u-radio-group v-model="form.contentType">
|
||||||
<u-radio v-for="(item, index) in typeList" :key="index" :name="item.type"> {{item.name}}</u-radio>
|
<u-radio v-for="(item, index) in typeList" :key="index" :name="item.type" @change="radioChange" > {{item.name}}</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<div class="type-content">
|
<div class="type-content">
|
||||||
<div class="flex" v-if="form.contentType == 'image'">
|
<div class="flex" v-if="form.contentType == 'image'">
|
||||||
<p class="label" style="width:40px;">图片</p>
|
<p class="label" style="width:40px;">图片</p>
|
||||||
<ai-uploader multiple @data="formData.fileList" :limit="1" action="/admin/file/add2"></ai-uploader>
|
<AiUploader :def.sync="formData.imgList" :limit="1" action="/admin/file/add2"></AiUploader>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="form.contentType == 'link'">
|
<div v-if="form.contentType == 'link'">
|
||||||
<div class="flex border-b">
|
<div class="flex border-b">
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex border-b">
|
<div class="flex border-b">
|
||||||
<p class="label">链接图片</p>
|
<p class="label">链接图片</p>
|
||||||
<ai-uploader multiple @data="formData.imgList" :limit="1" action="/admin/file/add2"></ai-uploader>
|
<AiUploader multiple :def.sync="formData.imgList" :limit="1" action="/admin/file/add2"></AiUploader>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<p class="label">链接标题</p>
|
<p class="label">链接标题</p>
|
||||||
@@ -70,11 +70,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex" v-if="form.contentType == 'video'">
|
<div class="flex" v-if="form.contentType == 'video'">
|
||||||
<p class="label" style="width:40px;">视频</p>
|
<p class="label" style="width:40px;">视频</p>
|
||||||
<AiUploader :multiple="true" type="file" :limit="1" placeholder="上传视频" @list="formData.fileList" action="/admin/file/add2"></AiUploader>
|
<AiUploader type="video" :limit="1" placeholder="上传视频" :def.sync="formData.fileList" action="/admin/file/add2"></AiUploader>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex" v-if="form.contentType == 'file'">
|
<div class="flex" v-if="form.contentType == 'file'">
|
||||||
<p class="label" style="width:40px;">视频</p>
|
<p class="label" style="width:40px;">附件</p>
|
||||||
<AiUploader :multiple="true" type="file" :limit="1" placeholder="上传附件" @list="formData.fileList" action="/admin/file/add2"></AiUploader>
|
<AiUploader type="file" :limit="1" placeholder="上传附件" :def.sync="formData.fileList" action="/admin/file/add2"></AiUploader>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="form.contentType == 'miniapp'" class="flex-label">
|
<div v-if="form.contentType == 'miniapp'" class="flex-label">
|
||||||
<div class="flex border-b">
|
<div class="flex border-b">
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<p class="label" style="width:80px;">小程序图片</p>
|
<p class="label" style="width:80px;">小程序图片</p>
|
||||||
<ai-uploader multiple @data="formData.imgList" :limit="1" action="/admin/file/add2"></ai-uploader>
|
<AiUploader multiple :def.sync="formData.imgList" :limit="1" action="/admin/file/add2"></AiUploader>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -168,11 +168,11 @@ export default {
|
|||||||
computed: {...mapState(['user'])},
|
computed: {...mapState(['user'])},
|
||||||
methods: {
|
methods: {
|
||||||
radioChange(e) {
|
radioChange(e) {
|
||||||
this.form.contentType = e
|
this.formDataInit()
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.contentType = e
|
||||||
|
})
|
||||||
},
|
},
|
||||||
typeChange(e) {
|
|
||||||
this.form.sendType = e
|
|
||||||
},
|
|
||||||
toSelect() {
|
toSelect() {
|
||||||
uni.navigateTo({url: `./SelectUser?tagIdList=${this.tagIdList}&areaList=${this.areaIdList}`})
|
uni.navigateTo({url: `./SelectUser?tagIdList=${this.tagIdList}&areaList=${this.areaIdList}`})
|
||||||
},
|
},
|
||||||
@@ -210,10 +210,27 @@ export default {
|
|||||||
}
|
}
|
||||||
this.$http.post("/app/pushmessage/addOrUpdate", params).then(res => {
|
this.$http.post("/app/pushmessage/addOrUpdate", params).then(res => {
|
||||||
if (res?.code == 0) {
|
if (res?.code == 0) {
|
||||||
|
this.$u.toast('发送成功')
|
||||||
|
this.form = {
|
||||||
|
content: '',
|
||||||
|
contentType: 'text',
|
||||||
|
sendType: '0',
|
||||||
|
sendTime: ''
|
||||||
|
}
|
||||||
|
this.areaIdList = []
|
||||||
|
this.tagIdList = []
|
||||||
|
this.formDataInit()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
formDataInit() {
|
||||||
|
for(let key in this.formData) {
|
||||||
|
this.formData[key] = ''
|
||||||
|
}
|
||||||
|
this.formData.imgList = []
|
||||||
|
this.formData.fileList = []
|
||||||
|
this.formData.file = {}
|
||||||
|
},
|
||||||
back() {
|
back() {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,12 +66,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapActions } from 'vuex'
|
import { mapActions, mapState } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'info',
|
name: 'info',
|
||||||
inject: ['top'],
|
inject: ['top'],
|
||||||
computed: {
|
computed: {
|
||||||
|
...mapState(['user']),
|
||||||
resident() {
|
resident() {
|
||||||
return this.top.detail?.residentInfo?.resident || {}
|
return this.top.detail?.residentInfo?.resident || {}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user