订阅功能
This commit is contained in:
parent
72c168e9d8
commit
b45d940583
@ -1,7 +1,9 @@
|
||||
<template>
|
||||
<view class="dingyue-box">
|
||||
|
||||
<view class="line-box">
|
||||
<view class="dl-title">领域</view>
|
||||
<button size="default" type="primary" @click="saveSet()">保存</button>
|
||||
<view class="dl-content">
|
||||
<view class="line-row" v-for="(item,index) in bloggerTypeList">
|
||||
<view v-for="(t,i) in item" :class="t.code==dataObj.bloggerTypeCode?'line-item click':'line-item'"
|
||||
@ -126,6 +128,10 @@
|
||||
import {
|
||||
getCatgByCode
|
||||
} from '@/api/system/config.js'
|
||||
import {
|
||||
getSubscribeSet,
|
||||
saveSubscribe
|
||||
} from '@/api/business/subscribeSet.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -167,7 +173,7 @@
|
||||
platformCode: "",
|
||||
noticeTypeCode: "",
|
||||
//关键词集和
|
||||
keywordsList: ['关键词1', '关键词2'],
|
||||
keywordsList: [],
|
||||
rewardTypeCode: "",
|
||||
//粉丝是否限制
|
||||
fansLimit: false,
|
||||
@ -189,6 +195,7 @@
|
||||
text: "限制"
|
||||
}
|
||||
],
|
||||
subscribeSet: {}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -200,10 +207,36 @@
|
||||
this.initData("dl_platform", "platformList")
|
||||
this.initData("dl_blogger_type", "bloggerTypeList")
|
||||
},
|
||||
onShow() {
|
||||
this.getSet()
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
getSet() {
|
||||
getSubscribeSet().then(res => {
|
||||
if (res.data) {
|
||||
this.subscribeSet = res.data
|
||||
this.dataObj = JSON.parse(res.data.jsonObj)
|
||||
} else {
|
||||
this.subscribeSet = {}
|
||||
}
|
||||
})
|
||||
},
|
||||
saveSet() {
|
||||
this.subscribeSet.jsonObj = JSON.stringify(this.dataObj)
|
||||
saveSubscribe(this.subscribeSet).then(res => {
|
||||
uni.showToast({
|
||||
title: '保存成功',
|
||||
icon: 'success'
|
||||
})
|
||||
setTimeout(function() {
|
||||
uni.navigateBack()
|
||||
}, 800)
|
||||
})
|
||||
},
|
||||
switchChange(e, code) {
|
||||
this.dataObj[code] = e.detail.value
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user