zrg
16 小时以前 b298e383b1f2ddc0cb8ad1715512f2be6eb7ef02
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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()