|
@@ -1,6 +1,28 @@
|
|
import { computed, reactive, ref, watch } from 'vue'
|
|
import { computed, reactive, ref, watch } from 'vue'
|
|
import { requestBehaviorClues, requestGetStaticInfo, requestRetainedCapital } from '@/api/api'
|
|
import { requestBehaviorClues, requestGetStaticInfo, requestRetainedCapital } from '@/api/api'
|
|
|
|
|
|
|
|
+// pc静态弹窗卡片信息获取
|
|
|
|
+export function useStaticCustomInfo() {
|
|
|
|
+ const configInfo = reactive({
|
|
|
|
+ name: '',
|
|
|
|
+ remark: '',
|
|
|
|
+ wxer: '',
|
|
|
|
+ phone: '',
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ // 获取静态信息
|
|
|
|
+ useStaticInfoRequest().then((r) => {
|
|
|
|
+ if (r) {
|
|
|
|
+ Object.assign(configInfo, r)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ return {
|
|
|
|
+ configInfo
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 线索弹窗卡片信息获取
|
|
export function usePreLeaveInfo(options = {}) {
|
|
export function usePreLeaveInfo(options = {}) {
|
|
const { props } = options
|
|
const { props } = options
|
|
const visible = ref(false)
|
|
const visible = ref(false)
|
|
@@ -55,6 +77,21 @@ export function usePreLeaveInfo(options = {}) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// 与我联系-判断逻辑
|
|
|
|
+export async function useContactMeLogic(options = {}) {
|
|
|
|
+ const { props } = options
|
|
|
|
+ const visible = ref(false)
|
|
|
|
+ function updateVisible(e) {
|
|
|
|
+ visible.value = e
|
|
|
|
+ }
|
|
|
|
+ const { info } = await useLeaveInfoRequest({ source: props.source })
|
|
|
|
+ return {
|
|
|
|
+ updateVisible,
|
|
|
|
+ close: () => (visible.value = false),
|
|
|
|
+ visible,
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
export async function useBehaviorCluesRequest(value) {
|
|
export async function useBehaviorCluesRequest(value) {
|
|
const res = await requestBehaviorClues({ source_desc: value })
|
|
const res = await requestBehaviorClues({ source_desc: value })
|
|
const { error_code: code, data } = res
|
|
const { error_code: code, data } = res
|