Use the template string of es6. If you want to reference the variable ws.url, how do you reference it?

I hope in

userLogin : `http://${ws.url}/api/login`

can introduce url, of ws. How do you write it?

var ENV = (function(){
    // 
    var defaultPage = "";
    return {
        // 
        pageTitleCustom: "",
        // 
        defaultPage: defaultPage,
        // 
        telecommunication: {
            interval: 60, // 
            // 
            minute: 2.1, // 
            // 
            mockDataBoolean: false,
            // 
            mockDataTime: 0.5 // 
        },
        ws: {
            url: "127.0.0.1",
            port: 6600,
            username: "admin",
            password: "123456"
        },

        /**
         * :python 
         * :Abbott.liu
         *
         */
        pythonAPI: {

            userLogin : `http://${ws.url}/api/login`
        },

        /**
         * 
         */

        stateCode: {
            success: 200
        },

        userRole: {
            demo: 1, // demo 
            employee: 2 // 
        }



    }
})();
Apr.01,2021

userLogin : `http://${ENV.ws.url}/api/login`
Menu