purui 3 months ago
parent
commit
112b45aade
1 changed files with 6 additions and 7 deletions
  1. 6 7
      packages/merchant/src/pages/agent/designer/archives/index.vue

+ 6 - 7
packages/merchant/src/pages/agent/designer/archives/index.vue

@@ -25,6 +25,7 @@ import {
 } from '../../../../core/libs/agent-requests'
 import { addUnit } from 'wot-design-uni/components/common/util'
 import { messages } from '../../../../core/libs/messages'
+import { getByDictType } from '../../../../core/libs/requests'
 import { omit } from 'radash'
 import BottomAppBar from '@/components/bottom-app-bar.vue'
 import { renders } from '../../../../core/libs/renders'
@@ -74,6 +75,7 @@ const familyPageRef = ref<ComponentExposed<typeof PageHelperEvo>>()
 const awardsListRef = ref<ComponentExposed<typeof ListHelperEvo>>()
 const saleListRef = ref<ComponentExposed<typeof ListHelperEvo>>()
 const activityListRef = ref<ComponentExposed<typeof ListHelperEvo>>()
+const sharingIntentType = ref()
 const getFormDataFoucs = computed(() => familyData.value?.focus)
 // const {} = useRequest()
 const handleEditBasicInfo = async () => {
@@ -315,6 +317,8 @@ const handleSubmitFocus = async () => {
 onLoad(async (query?: Record<string | 'id', any>) => {
   id.value = query?.id
   await setData()
+  let value = await getByDictType('sharing_intent_type')
+  sharingIntentType.value = value.data
   formDataFoucs.value.focus = familyData.value?.focus as any
 })
 onShow(async () => {
@@ -430,13 +434,8 @@ onShow(async () => {
                 <DataRender
                   v-bind="{
                     type: 'Select',
-                    value: value,
-                    options: [
-                      { label: '不愿意', value: 3 },
-                      { label: '一般', value: 1 },
-                      { label: '愿意', value: 2 },
-                      { label: '非常愿意', value: 4 },
-                    ],
+                    value: String(value),
+                    options: sharingIntentType,
                   }"
                 ></DataRender>
               </template>