发布服务
@@ -37,7 +37,13 @@
@@ -51,16 +57,61 @@
data () {
return {
form: {
- images: []
+ files: [],
+ themeId: '',
+ themeTitle: '',
+ source: 0,
+ content: '',
+ visibleRange: 0
},
+ topicList: [],
isShow: false
}
},
- onLoad() {
+ onLoad () {
+ this.getTopicList()
},
methods: {
+ submit () {
+ if (!this.form.content) {
+ return this.$toast(`内容不能为空`)
+ }
+
+ this.$instance.post(`/app/appneighborhoodassistance/addOrUpdate`, {
+ ...this.form
+ }).then(res => {
+ uni.hideLoading()
+ if (res.code === 0) {
+ this.$dialog.alert({
+ title: '温馨提示',
+ content: '提交成功'
+ }).then(() => {
+ uni.navigateBack()
+ uni.$emit('updateList')
+ }).catch(() => {})
+ }
+ })
+ },
+
+ onSwitchChange (e) {
+ this.form.visibleRange = e.detail.value ? 1 : 0
+ },
+
+ getTopicList () {
+ this.$instance.post(`/app/appneighborhoodassistancetheme/list`, null, {
+ withoutToken: true,
+ params: {
+ current: 1,
+ size: 100
+ }
+ }).then(res => {
+ if (res.code === 0) {
+ this.topicList = res.data.records
+ }
+ })
+ },
}
}
@@ -93,6 +144,10 @@
padding: 20px 48px;
color: #333333;
font-size: 30px;
+
+ &.active {
+ color: #2D7DFF;
+ }
}
}
}
diff --git a/src/project/fengdu/AppCircle/AppCircle.vue b/src/project/fengdu/AppCircle/AppCircle.vue
index 4b03faa..b716d37 100644
--- a/src/project/fengdu/AppCircle/AppCircle.vue
+++ b/src/project/fengdu/AppCircle/AppCircle.vue
@@ -126,7 +126,6 @@
params: {
current: this.current,
size: 10,
- source: 0,
visibleRange: this.currIndex === 0 ? 1 : 0
}
}).then(res => {
diff --git a/src/project/fengdu/AppCircle/TopicDetail.vue b/src/project/fengdu/AppCircle/TopicDetail.vue
index aa9bb29..b457fd7 100644
--- a/src/project/fengdu/AppCircle/TopicDetail.vue
+++ b/src/project/fengdu/AppCircle/TopicDetail.vue
@@ -99,7 +99,6 @@
params: {
current: this.current,
size: 10,
- source: 0,
themeId: this.themeId,
visibleRange: this.currIndex === 0 ? 1 : 0
}