用html可以正常显示
以下内容为程序代码:
1 <html>
2
3 <head>
4 <script src="https://g.alicdn.com/dingding/h5-dingtalk-login/0.21.0/ddlogin.js"></script>
5 <style> .ewmys {width: 300px;height: 300px;} </style>
6 </head>
7
8 <body>
9 <div id="ewm" class="ewmys"></div>
10 <script>
11 window.DTFrameLogin(
12 {id: 'ewm',width: 300,height: 300,},
13 { redirect_uri: encodeURIComponent('http://47.98.135.225/login.htm'),
14 client_id: 'ding5y87shvpizjbvr5z',
15 scope: 'openid',
16 response_type: 'code',
17 state: '12345678',
18 prompt: 'consent',},
19 (loginResult) => {const {redirectUrl, authCode, state} = loginResult;
20 window.location.href = redirectUrl;console.log(authCode);},
21 (errorMsg) => {alert(`Login Error: ${errorMsg}`);},);
22 </script>
23 </body>
24
25 </html>
改成下面这个样子
以下内容为程序代码:
1 Dim wb As New weui
2 wb.AppendHTML("< script src = "https: / / g.alicdn.com / dingding / h5 - dingtalk - login / 0.21.0 / ddlogin.js" > < / script >", True)
3 wb.AppendHTML("< style > .ewmys {width: 300px;height: 300px;} < / style >", True)
4 wb.InsertHTML("< div id = "ewm" Class = "ewmys" > < / div > ")
5 wb.InsertHTML(" < script > ")
6 wb.InsertHTML("window.DTFrameLogin(")
7 wb.InsertHTML("{id: 'ewm',width: 300,height: 300,},")
8 wb.InsertHTML("{ redirect_uri: encodeURIComponent('http://47.98.135.225/login.htm'),")
9 wb.InsertHTML("client_id: 'ding5y87shvpizjbvr5z',")
10 wb.InsertHTML("scope: 'openid',")
11 wb.InsertHTML("response_type: 'code',")
12 wb.InsertHTML("state: '12345678',")
13 wb.InsertHTML("prompt: 'consent',},")
14 wb.InsertHTML("(loginResult) = > {Const {redirectUrl, authCode, state} = loginResult;")
15 wb.InsertHTML("window.location.href = redirectUrl;console.log(authCode);}, ")
16 wb.InsertHTML("(errorMsg) = > {alert(`Login Error: ${errorMsg}`);}, );")
17 wb.InsertHTML(" < / script > ")
18 e.WriteString(wb.Build)
报错

此主题相关图片如下:a2c8999d-39d3-4ddf-82ee-cefd8696fe20.png

请问这段应该怎么改?