import * as MsMngClient from "./MsMng";
import * as KtMsClient from "cn.keytop.midend.microservice.Client";


let routeHost = "https://mms-test.keytop.cn/";
let appId = "cn.keytop.stc.cm.app1";
let appKey = "98e56a0213ac603549a07eca7dfb9ed2";
const serviceClientConfig = new KtMsClient.ServiceClientConfig(routeHost, appId, appKey)

async function getTest3() {
    let msMng = new MsMngClient.MsMng(serviceClientConfig)
    // //
    // let response = await msMng.getTest3('123', '333123')
    // //
    // if (response.data) {
    //     console.log(response.data.uri)
    //     response.data.uri = '1';
    //     console.log(response.data.uri)
    // }
    // //
    // //
    // if (response.data) {
    //     let postResult = await msMng.postTest2(response.data)
    //     console.log(postResult)
    // }
    // //
    // let post2Param = new MsMngClient.Post2Param()
    // post2Param.param1 = '1111'
    // let postResult2 = await msMng.postTest2(post2Param)
    // if (postResult2.data) {
    //     console.log(postResult2)
    //     console.log(postResult2.data.body)
    // }
    //
    // let response1 = await msMng.getTest1('1', '3123123')
    //
    // console.log(response1)

    let response5 = await msMng.getTest5('1', '2')

    console.log(response5)
    if (response5.data)
        console.log(response5.data.thisLong)
}

getTest3();

function getTest4() {

    let mode1 = new MsMngClient.Post2Param()
    mode1.date = 1570991017113
    console.log(mode1.date)


    let result = newPost2Param();
    console.log(result.date)
}

function newPost2Param(): MsMngClient.Post2Param {
    return {'date': 1570991017113}
}

