Privacy.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Learn TypeScript:
  2. // - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
  3. // Learn Attribute:
  4. // - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
  5. // Learn life-cycle callbacks:
  6. // - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
  7. import { Privacy_rule, Privacy_user, Privacy_zhengce } from "../Template/Const";
  8. import PopComponet from "../Template/PopComponet";
  9. const { ccclass, property } = cc._decorator;
  10. @ccclass
  11. export default class Privacy extends PopComponet {
  12. @property(cc.Label)
  13. Contentlabel: cc.Label = null;
  14. @property(cc.Label)
  15. Titlelabel: cc.Label = null;
  16. start() {
  17. // this.InitPrivacy()
  18. // this.InitUser()
  19. }
  20. onLoad() {
  21. }
  22. Close() {
  23. this.node.destroy()
  24. }
  25. InitPrivacy() {
  26. this.Titlelabel.string = '隐私政策'
  27. this.Contentlabel.string = Privacy_zhengce
  28. }
  29. InitUser() {
  30. this.Titlelabel.string = '用户协议'
  31. this.Contentlabel.string = Privacy_user
  32. }
  33. InitRule() {
  34. this.Titlelabel.string = '规则'
  35. this.Contentlabel.string = Privacy_rule
  36. }
  37. }