EvilDragon 4 주 전
부모
커밋
592b923fef

+ 3 - 2
packages/app/env/.env.development

@@ -5,7 +5,7 @@ VITE_DELETE_CONSOLE = false
 # 是否开启sourcemap
 VITE_SHOW_SOURCEMAP = true
 
-VITE_SERVER_BASEURL = 'https://www.zhuchaohui.com'
+VITE_SERVER_BASEURL='https://www.zhuchaohui.com'
 # VITE_SERVER_BASEURL = 'http://39.106.91.179:48080'
 # VITE_SERVER_BASEURL = 'http://192.168.2.50:48080'
 # 王超
@@ -16,5 +16,6 @@ VITE_SERVER_BASEURL = 'https://www.zhuchaohui.com'
 # 赵要军
 # VITE_SERVER_BASEURL = 'http://192.168.2.41:48080'
 # 赵添更
-# VITE_SERVER_BASEURL = 'http://192.168.0.108:48080'
+# VITE_SERVER_BASEURL='http://192.168.2.45:48080'
+# VITE_SERVER_BASEURL='http://192.168.2.58:48080'
 

+ 4 - 0
packages/app/src/core/libs/models.ts

@@ -1301,6 +1301,10 @@ export enum DictType {
    * 活动类型
    */
   MemberActivityType = 'member_activity_type',
+  /**
+   * 渠道类型
+   */
+  MemberChannelType = 'member_channel_type',
 }
 /**
  * 徽章

+ 1 - 1
packages/app/src/pages/login/index.vue

@@ -94,7 +94,7 @@ onLoad(async (query: { type?: 'test' }) => {
             @click="
               toContentHtml({
                 title: '筑巢荟用户服务协议',
-                type: AgreementType.HuiWuServiceAgreement,
+                type: AgreementType.ZCHServiceAgreement,
               })
             "
             class="text-[#0cbe7c] text-xs font-normal font-['PingFang_SC'] leading-tight"

+ 1 - 1
packages/app/src/pages/mine/homepage/edit/index.vue

@@ -110,7 +110,7 @@ onMounted(async () => {
             class="mt-4.5 mx--3.5 text-black/40 text-xs font-normal font-['PingFang_SC'] leading-snug"
           >
             <wd-textarea
-              placeholder="例:中国室内装饰协会会员、 xxx 空间设计事务所创始人、筑巢奖金奖设计师等等"
+              placeholder="例:中国室内装饰协会会员、 xxx 空间设计事务所创始人、筑巢奖金奖设计师等等。&#10;多个身份时,请用“、”符号隔开"
               v-model="form.personalIdentity"
             />
           </div>

+ 12 - 1
packages/merchant/src/core/libs/requests.ts

@@ -4,7 +4,7 @@ import {
   ResPageData,
   Todo,
   Agent,
-  AgentTask,
+  AgentTask, DictType,
 } from '@designer-hub/app/src/core/libs/models'
 import {AgreementType} from "@/core/libs/enums";
 
@@ -231,3 +231,14 @@ export const updatePassword = (data: UpdatePasswordData) =>
   httpPut('/app-api/member/auth/update-password', data)
 export const fakeThis = (query: { agreement: AgreementType }) =>
   httpGet<string>('/app-api/infra/file/download', query)
+export const getByDictType = (
+  type: string | 'member_channel_source' | 'member_spatial_expertise_type' | DictType,
+) =>
+  httpGet<
+    {
+      label: string
+      value: string
+      dictType: string
+      status: number
+    }[]
+  >('/app-api/system/dict-data/type', { type })

+ 5 - 2
packages/merchant/src/pages/mine/agent/settings/index.vue

@@ -16,7 +16,10 @@ import SectionHeading from '@designer-hub/app/src/components/section-heading.vue
 import { messages } from '../../../../core/libs/messages'
 import { useMessage } from 'wot-design-uni'
 import BottomAppBar from '@/components/bottom-app-bar.vue'
+import { useDictStore } from '@/store/dict'
 
+const dictStore = useDictStore()
+const { getOptionLabel } = dictStore
 const userStore = useUserStore()
 // cons useMessage()
 const { isLogined, userInfo } = storeToRefs(userStore)
@@ -47,11 +50,11 @@ onMounted(async () => {
       </template>
     </SectionHeading>
     <SectionHeading size="sm" :title="'姓名'" :end-text="String(data?.brokerName)"></SectionHeading>
-    <SectionHeading size="sm" :title="'ID'" :end-text="String(data?.id)"></SectionHeading>
+    <!--    <SectionHeading size="sm" :title="'ID'" :end-text="String(data?.id)"></SectionHeading>-->
     <SectionHeading
       size="sm"
       :title="messages.mine.setting.channelTypeTitleText"
-      :end-text="String(data?.channelType)"
+      :end-text="getOptionLabel('member_channel_type', String(data?.channelType))"
     ></SectionHeading>
     <SectionHeading
       size="sm"

+ 2 - 2
packages/merchant/src/pages/mine/components/agent-mine.vue

@@ -33,8 +33,8 @@ const designerDataList = computed(() =>
       value: it.quantity ?? 0,
       subTitle: index === 0 ? designerData.value[1].typeName : '占比',
       subValue:
-        index === designerData.value[1].quantity
-          ? 0
+        index === 0
+          ? designerData.value[1].quantity
           : `${((it.quantity / designerData.value[0].quantity) * 100).toFixed(0)}%`,
     })),
 )

+ 26 - 0
packages/merchant/src/store/dict.ts

@@ -0,0 +1,26 @@
+import { zipToObject } from 'radash'
+import { getByDictType } from '@/core/libs/requests'
+import { defineStore } from 'pinia'
+
+const initData = ['member_channel_type']
+export const useDictStore = defineStore('dict', () => {
+  //   const options = ref({})
+  const { data: options, run: fetchOptions } = useRequest(async () => ({
+    data: zipToObject(
+      initData,
+      await Promise.all(initData.map((it) => getByDictType(it).then((it) => it.data))),
+    ),
+    msg: '',
+    code: 0,
+  }))
+  const getOptionLabel = (type: string, value: string | number) =>
+    options.value[type]?.find((it) => it.value === value)?.label
+  //   const fetchOptions = async () => {
+  //     options.value = await zipToObject(
+  //       initData,
+  //       await Promise.all(initData.map((it) => getByDictType(it).then((it) => it.data))),
+  //     )
+  //   }
+  fetchOptions().then()
+  return { options, getOptionLabel }
+})