Commit cf514893 authored by wildfirecode13's avatar wildfirecode13

u

parent 340edf99
const w = 200;
const h = 80;
export default class TestButton extends FYGE.Sprite {
getRect(){
return [w,h]
}
constructor(txt,parent?) {
super();
const bg = new FYGE.Shape();
bg.beginFill(0, 1);
bg.drawRoundedRect(0, 0, w, h,10,10,10,10);
bg.endFill();
this.addChild(bg);
const buttonTxt = new FYGE.TextField;
buttonTxt.text = txt;
buttonTxt.textWidth = 200;
buttonTxt.textHeight = 80;
buttonTxt.size = 30;
buttonTxt.textAlign=FYGE.TEXT_ALIGN.CENTER;
buttonTxt.verticalAlign=FYGE.VERTICAL_ALIGN.MIDDLE;
buttonTxt.fillColor = '0xffffff';
this.addChild(buttonTxt);
if(parent)
parent.addChild(this)
}
}
\ No newline at end of file
...@@ -4,6 +4,7 @@ import { RES } from "../../module/RES"; ...@@ -4,6 +4,7 @@ import { RES } from "../../module/RES";
import { layers } from "../../module/views/layers"; import { layers } from "../../module/views/layers";
import { Scene } from "../../module/views/Scene"; import { Scene } from "../../module/views/Scene";
import getObject from "../common/getObject"; import getObject from "../common/getObject";
import TestButton from "../common/TestButton";
import { isMember } from "../isMember"; import { isMember } from "../isMember";
import { getTimesPanel } from "../panels/getTimes"; import { getTimesPanel } from "../panels/getTimes";
import { RulePanel } from "../panels/RulePanel"; import { RulePanel } from "../panels/RulePanel";
...@@ -41,6 +42,15 @@ export class IndexScene extends Scene { ...@@ -41,6 +42,15 @@ export class IndexScene extends Scene {
initUi() { initUi() {
super.initUi(); super.initUi();
const btn = new TestButton('测试跳转任务',this)
btn.y=300;
btn.addEventListener(FYGE.MouseEvent.CLICK,()=>{
console.log('测试跳转任务');
window['wx'].miniProgram.navigateTo({
url:'/pages/points-mall/member-task/member-task'
});
},this);
if (!isMember()) { if (!isMember()) {
initNonmemberMask(); initNonmemberMask();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment