Browse Source

服务添加根据站点类型显示

pull/97/head
pengda 1 month ago
parent
commit
94dffb9cc7
  1. 15
      src/components/site/addSiteStep/step3.vue
  2. 21
      src/views/agent/siteServiceList.vue

15
src/components/site/addSiteStep/step3.vue

@ -3,10 +3,8 @@
<div class="step3-wrap min-flex"> <div class="step3-wrap min-flex">
<div class="step3-top flex-common"> <div class="step3-top flex-common">
<h3 class="flex gap8"><img src="@/assets/menu/littleTitleIcon1.svg" alt="">服务列表</h3> <h3 class="flex gap8"><img src="@/assets/menu/littleTitleIcon1.svg" alt="">服务列表</h3>
<div class="btngroup"> <div class="btngroup" v-if="addProd">
<GuipButton type="ignore" :btnstyle="{ width: '97px', height: '33px' }" @click="serviceAdd(1)">添加查重服务</GuipButton> <GuipButton v-for="(item,key) in addProd" :key="item" type="ignore" :btnstyle="{ width: '97px', height: '33px' }" @click="serviceAdd(key)">添加{{item}}</GuipButton>
<GuipButton type="ignore" :btnstyle="{ width: '97px', height: '33px' }" @click="serviceAdd(3)">添加写作辅助</GuipButton>
<GuipButton type="ignore" :btnstyle="{ width: '97px', height: '33px' }" @click="serviceAdd(2)">添加AIGC</GuipButton>
</div> </div>
</div> </div>
<div> <div>
@ -173,11 +171,11 @@ export default {
PromptText, GuipDialog, PaymentMethod, PromptText, GuipDialog, PaymentMethod,
GuipTable, GuipSwitch, SvgIcon, GuipInput, GuipTable, GuipSwitch, SvgIcon, GuipInput,
GuipButton GuipButton
}, },
data(){ data(){
return { return {
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTI2NDY1NDUsIm5iZiI6MTc1MjY0NjU0NSwiZXhwIjoxNzU1MjM4NTQ1LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.G-Is-x9qPMiV_urOlDPQVRjfAIozySxL5EK2k82d46k', token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTI2NDY1NDUsIm5iZiI6MTc1MjY0NjU0NSwiZXhwIjoxNzU1MjM4NTQ1LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.G-Is-x9qPMiV_urOlDPQVRjfAIozySxL5EK2k82d46k',
addProd: {},
serviceList:[], serviceList:[],
tableLoading:false, tableLoading:false,
currentPage: 1, // currentPage: 1, //
@ -252,9 +250,12 @@ export default {
} }
}).then(response => { }).then(response => {
that.tableLoading = false that.tableLoading = false
if(response.status && response.data.service_list.length>0){ if(response.status){
that.$nextTick(() => { that.$nextTick(() => {
that.serviceList = response.data.service_list that.addProd = response.data.add_proids
if(response.data.service_list){
that.serviceList = response.data.service_list
}
}) })
} }
}).catch(error => { }).catch(error => {

21
src/views/agent/siteServiceList.vue

@ -13,10 +13,8 @@
<GuipButton type="ignore" :btnstyle="btnInfostyleObj" @click="handleBatchDelClick">批量删除</GuipButton> <GuipButton type="ignore" :btnstyle="btnInfostyleObj" @click="handleBatchDelClick">批量删除</GuipButton>
</div> </div>
<div class="pageheader-right"> <div class="pageheader-right" v-if="addProd">
<GuipButton type="primary" :btnstyle="btnstyleObj" @click="jumpAdd(1)">添加查重服务</GuipButton> <GuipButton v-for="(item,key) in addProd" :key="item" type="primary" :btnstyle="btnstyleObj" @click="jumpAdd(key)">添加{{item}}</GuipButton>
<GuipButton type="primary" :btnstyle="btnstyleObj" @click="jumpAdd(3)">添加写作辅助</GuipButton>
<GuipButton type="primary" :btnstyle="btnstyleObj" @click="jumpAdd(2)">添加AIGC</GuipButton>
</div> </div>
</div> </div>
@ -190,6 +188,8 @@ export default {
uid:0, uid:0,
// //
siteShortName: "", siteShortName: "",
//
addProd: {},
// //
serviceList: [], serviceList: [],
// //
@ -255,10 +255,15 @@ export default {
} }
}).then(response => { }).then(response => {
this.tableLoading = false this.tableLoading = false
this.$nextTick(() => { if(response.status){
that.serviceList = response.data.service_list that.$nextTick(() => {
store.commit('SET_BREADRIGHTTEXT', response.data.site_short_name); that.addProd = response.data.add_proids
}) store.commit('SET_BREADRIGHTTEXT', response.data.site_short_name);
if(response.data.service_list){
that.serviceList = response.data.service_list
}
})
}
}).catch(error => { }).catch(error => {
console.error(error, 'error') console.error(error, 'error')
}) })

Loading…
Cancel
Save