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

21
src/views/agent/siteServiceList.vue

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

Loading…
Cancel
Save