import { CommonUtils } from "./common"; class getuiInstance { constructor() { this.cid = "" } getClientID(Userbm, UserName) { // #ifdef APP-PLUS const info = plus.push.getClientInfo() this.cid = info["clientid"] console.log('cid: ', this.cid); this.setUserClientIDRelative(Userbm, UserName, this.cid, 1) // #endif }; async setUserClientIDRelative(Userbm, UserName, ClientID, Online) { try { let res = await CommonUtils.doRequest2Async({ url: "/Web/SetGy_UserClientIdConnection", method: "POST", data: { HUserbm: Userbm, HUserName: UserName, HClientID: ClientID, HOnline: Online } }) let { data, count, Message } = res.data if(count != 1) { CommonUtils.showTips({ title: "温馨提示", message: Message }) } }catch(err) { CommonUtils.showTips({ title: "温馨提示", message: err }) } } } export default new getuiInstance()