| 123456789101112131415161718192021 |
- import { _decorator, Component, Node, WebView } from 'cc';
- const { ccclass, property } = _decorator;
- @ccclass('WebWindow')
- export class WebWindow extends Component {
- @property({ type: WebView, tooltip: "网页" }) web: WebView;
- public onParams(type: string): void {
- let url = "";
- switch (type) {
- case "1":
- url = "https://fengshen.mokamrp.com/page/yhxy_hyfs.html";
- break;
- case "2":
- url = "https://fengshen.mokamrp.com/page/yszc_hyfs.html";
- break;
- }
- this.web.url = url;
- }
- }
|