user-api.uts 2.22 KB
// 登录相关接口封装,直接使用项目现成的 http.uts(已包含签名逻辑)

import http from '@/api/request/http.uts'

// ---------- 数科账号登录(与 simgle_app/api/module/loginApi.js 对齐) ----------

export async function apiShukeLoginInit(params: UTSJSONObject): Promise<UTSJSONObject> {
	return await http.shukeRequest("linkwe-gateway/auth/accountLoginSp/init", params, "POST", true) as UTSJSONObject
}

export async function apiShukeStoreList(body: UTSJSONObject): Promise<UTSJSONObject> {
	return await http.shukeRequest("linkwe-gateway/auth/accountLoginSp/stores", body, "POST", true) as UTSJSONObject
}

export async function apiShukeConfirmStore(body: UTSJSONObject): Promise<UTSJSONObject> {
	return await http.shukeRequest("linkwe-gateway/auth/accountLoginSp/confirm", body, "POST", true) as UTSJSONObject
}

export async function apiShukeSaveLogin(body: UTSJSONObject): Promise<UTSJSONObject> {
	return await http.shukeRequest("linkwe-gateway/auth/accountLoginSp/save", body, "POST", true) as UTSJSONObject
}

// 获取短信验证码:dj.api.smartcarlife.sms.get.code
export async function apiGetSmsCode(params: UTSJSONObject): Promise<UTSJSONObject> {
  const data: UTSJSONObject = {
    projectName: 'boutique',
    ...params
  }
  return await http.fetch('dj.api.smartcarlife.sms.get.code', data, true, 'dj')
}

// 手机验证码登录:dj.api.smartcarlife.sms.applogin
export async function apiSmsLogin(params: UTSJSONObject): Promise<UTSJSONObject> {
  const data: UTSJSONObject = {
    projectName: 'boutique',
    source: 'MINIAPP',
    productCode: 'PC00c2',
    ...params
  }
  return await http.fetch('dj.api.smartcarlife.sms.applogin', data, true, 'dj')
}

// 免登:dj.api.smartcarlife.sms.noSignIn.login
export async function apiAutoLogin(params: UTSJSONObject): Promise<UTSJSONObject> {
  const data: UTSJSONObject = {
    projectName: 'boutique',
    ...params
  }
  return await http.fetch('dj.api.smartcarlife.sms.noSignIn.login', data, true, 'dj')
}

/** 查询门店保险权益 */
export function getMerchantInsuranceListApi(data: UTSJSONObject): Promise<any> {
	return http.post({
		'method': 'dj.api.smartcarlife.recepiton.findMerchantItem',
		'projectName': 'boutique',
		...data
	} as UTSJSONObject)
}