gitignore
This commit is contained in:
@@ -24,6 +24,6 @@ export { DataWebModel } from './src/main/ets/models/DataWebModel'
|
||||
|
||||
export { PromptActionClass } from './src/main/ets/components/PromptActionClass'
|
||||
|
||||
export { RequestDefaultModel } from './src/main/ets/models/RequestDefaultModel'
|
||||
export { RequestDefaultModel,ExpertData } from './src/main/ets/models/RequestDefaultModel'
|
||||
|
||||
export { HdList, HdListController } from './src/main/ets/components/HdList'
|
||||
|
||||
@@ -10,7 +10,7 @@ export class BasicConstant {
|
||||
static readonly urlmyLan = "https://dev-app.igandan.com/app/expertAPI/";
|
||||
static readonly urlapp = "https://dev-app.igandan.com//app/expertApp/"
|
||||
static readonly urlHtml = "http://dev-doc.igandan.com/app/"
|
||||
static readonly imageHeader = "http://doc.igandan.com/app/"
|
||||
static readonly imageHeader = "https://dev-doc.igandan.com/app/"
|
||||
static readonly urlExpert = "https://dev-app.igandan.com/app/expert/"
|
||||
|
||||
|
||||
|
||||
@@ -11,3 +11,43 @@ export interface DefaulyData {
|
||||
'name':string;
|
||||
'uuid':string;
|
||||
}
|
||||
|
||||
export interface ExpertData{
|
||||
isEnable:number;
|
||||
isVisit:number;
|
||||
modifyDate:string;
|
||||
currentSpec:string;
|
||||
deviceType:number;
|
||||
currentType:number;
|
||||
deviceSpec:string;
|
||||
positionName:string;
|
||||
userName:string;
|
||||
createDate:string;
|
||||
password:string;
|
||||
officeName:string;
|
||||
certificateImg:string;
|
||||
birthDate:string;
|
||||
isStar:number;
|
||||
countyId:number;
|
||||
cityId:number;
|
||||
email:string;
|
||||
photo:string;
|
||||
qrcode:string;
|
||||
mobile:string;
|
||||
hospitalName:string;
|
||||
officeUuid:string;
|
||||
checkInfo:string;
|
||||
hospitalUuid:string;
|
||||
officePhone:string;
|
||||
positionUuid:string;
|
||||
nation:number;
|
||||
wechat_qrcode:string;
|
||||
sex:number;
|
||||
provId:number;
|
||||
uuid:string;
|
||||
intro:string;
|
||||
certificate:string;
|
||||
state:number;
|
||||
realName:string;
|
||||
specialy:Array<object>;
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
import { preferences } from '@kit.ArkData'
|
||||
import { router } from '@kit.ArkUI'
|
||||
import { Data } from '../models/LoginInfoModel'
|
||||
import { ExpertData } from '../models/RequestDefaultModel'
|
||||
|
||||
export interface HdUser {
|
||||
id: string
|
||||
@@ -31,6 +32,12 @@ class AuthStore {
|
||||
await this.getStore().flush()
|
||||
}
|
||||
|
||||
async updateUser(user: ExpertData) {
|
||||
AppStorage.setOrCreate('user', user)
|
||||
await this.getStore().put(AUTH_STORE_KEY, JSON.stringify(user))
|
||||
await this.getStore().flush()
|
||||
}
|
||||
|
||||
async delUser() {
|
||||
AppStorage.setOrCreate('user', {})
|
||||
await this.getStore().put(AUTH_STORE_KEY, '{}')
|
||||
|
||||
@@ -126,6 +126,7 @@ class HdHttp {
|
||||
// 可选,默认为60s
|
||||
readTimeout: 60000,
|
||||
// 开发者根据自身业务需要添加header字段
|
||||
// 开发者根据自身业务需要添加header字段
|
||||
header: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
@@ -142,10 +143,11 @@ class HdHttp {
|
||||
}
|
||||
|
||||
return httpInstance.request(fullUrl, options).then((res) => {
|
||||
return Promise.reject(res.result)
|
||||
logger.info('Response fullUrl:' +fullUrl+ res.result);
|
||||
const result = res.result as HdResponse<T>
|
||||
return result
|
||||
}).catch((err: BusinessError) => {
|
||||
logger.error(fullUrl+`Response succeeded: ${err}+${err.name}+${err.message}+${err.data}+${err.stack}`);
|
||||
// logger.error(fullUrl, err.code?.toString(), err.message)
|
||||
logger.info(fullUrl+`Response succeeded: ${err}`);
|
||||
promptAction.showToast({ message: err.message || '网络错误' })
|
||||
return Promise.reject(err)
|
||||
}).finally(() => {
|
||||
@@ -198,7 +200,7 @@ class HdHttp {
|
||||
logger.info('Response httpReq:' + data.result);
|
||||
let json:TimestampBean = JSON.parse(data.result.toString()) as TimestampBean;
|
||||
let tp = json.timestamp;
|
||||
datas.set("user_uuid", authStore.getUser().uuid?authStore.getUser().uuid:'');
|
||||
datas.set("user_uuid", authStore.getUser().uuid.length>0?authStore.getUser().uuid:'');
|
||||
datas.set("client_type", 'A');
|
||||
datas.set("version",'4.0.0' );
|
||||
datas.set('timestamp',tp+'');
|
||||
|
||||
Reference in New Issue
Block a user