历史记录bug修改
This commit is contained in:
parent
bdc590f3a3
commit
1265371e60
@ -44,6 +44,7 @@ export class History extends Component {
|
||||
|
||||
holdOn = false
|
||||
finish = false
|
||||
clickLock = false
|
||||
|
||||
sel_idx: HISTORY_TYPE = HISTORY_TYPE.TODAY
|
||||
|
||||
@ -397,7 +398,10 @@ export class History extends Component {
|
||||
|
||||
|
||||
async clickItem(event: Event, roundId: string) {
|
||||
|
||||
if (this.clickLock) {
|
||||
return
|
||||
}
|
||||
this.clickLock = true
|
||||
// console.log("clickItem, roundId = ", roundId)
|
||||
|
||||
const history_detail = instantiate(this.history_detail)
|
||||
@ -416,7 +420,9 @@ export class History extends Component {
|
||||
self.scheduleOnce(() => { comp.entryFinish() })
|
||||
})
|
||||
.start()
|
||||
|
||||
this.scheduleOnce(() => {
|
||||
this.clickLock = false
|
||||
}, 1)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -591,6 +591,7 @@ export class HistoryDetail extends Component {
|
||||
|
||||
this.showLoading()
|
||||
await this.loadDetailList()
|
||||
this.scrollControl.setTouchEnable(true)
|
||||
}
|
||||
|
||||
removeReturnBtn() {
|
||||
|
||||
@ -46,12 +46,12 @@ export class ScrollControl extends Component {
|
||||
onLoad() {
|
||||
this.node_history_detail = this.node.parent
|
||||
|
||||
this.node.on(Node.EventType.TOUCH_START, this._onTouchStart, this);
|
||||
this.node.on(Node.EventType.TOUCH_MOVE, this._onTouchMove, this);
|
||||
this.node.on(Node.EventType.TOUCH_END, this._onTouchEnd, this);
|
||||
this.node.on(Node.EventType.TOUCH_CANCEL, this._onTouchEnd, this);
|
||||
// this.node.on(Node.EventType.TOUCH_START, this._onTouchStart, this);
|
||||
// this.node.on(Node.EventType.TOUCH_MOVE, this._onTouchMove, this);
|
||||
// this.node.on(Node.EventType.TOUCH_END, this._onTouchEnd, this);
|
||||
// this.node.on(Node.EventType.TOUCH_CANCEL, this._onTouchEnd, this);
|
||||
|
||||
this.node.on(Node.EventType.MOUSE_WHEEL, this.onMouseWheel, this);
|
||||
// this.node.on(Node.EventType.MOUSE_WHEEL, this.onMouseWheel, this);
|
||||
}
|
||||
|
||||
onDisable() {
|
||||
@ -322,6 +322,22 @@ export class ScrollControl extends Component {
|
||||
this.vert_scrollView.scrollToOffset(vec2, 0.1, true);
|
||||
}
|
||||
|
||||
setTouchEnable(enbaled) {
|
||||
if (enbaled) {
|
||||
this.node.on(Node.EventType.TOUCH_START, this._onTouchStart, this);
|
||||
this.node.on(Node.EventType.TOUCH_MOVE, this._onTouchMove, this);
|
||||
this.node.on(Node.EventType.TOUCH_END, this._onTouchEnd, this);
|
||||
this.node.on(Node.EventType.TOUCH_CANCEL, this._onTouchEnd, this);
|
||||
this.node.on(Node.EventType.MOUSE_WHEEL, this.onMouseWheel, this);
|
||||
} else {
|
||||
this.node.off(Node.EventType.TOUCH_START, this._onTouchStart, this);
|
||||
this.node.off(Node.EventType.TOUCH_MOVE, this._onTouchMove, this);
|
||||
this.node.off(Node.EventType.TOUCH_END, this._onTouchEnd, this);
|
||||
this.node.off(Node.EventType.TOUCH_CANCEL, this._onTouchEnd, this);
|
||||
this.node.off(Node.EventType.MOUSE_WHEEL, this.onMouseWheel, this);
|
||||
}
|
||||
}
|
||||
|
||||
// 判断触摸点是否在节点矩形内
|
||||
isTouchOnNode(node: Node, touchPos: Readonly<Vec2>): boolean {
|
||||
const uiTransform = node.getComponent(UITransform);
|
||||
|
||||
@ -184,7 +184,7 @@
|
||||
"_priority": 0,
|
||||
"_fov": 45,
|
||||
"_fovAxis": 0,
|
||||
"_orthoHeight": 960.0000000000001,
|
||||
"_orthoHeight": 960,
|
||||
"_near": 0,
|
||||
"_far": 2000,
|
||||
"_color": {
|
||||
|
||||
@ -7,7 +7,7 @@ import { PREVIEW } from "cc/env"
|
||||
const gameId = "rp_11001";
|
||||
// let apiaddr = "https://rpgames-api.rpfafafahkdev.com";
|
||||
let apiaddr = "";
|
||||
let token = "eyJQIjoxMDM0NTAsIkUiOjE3Njk4ODc2NzEsIlMiOjk5OSwiRCI6InJwXzExMDAxIn0.xZTrzpsrV_Cyrrl9oRGjDcKRTWf3Xzps-y0nMCpSOMs";
|
||||
let token = "eyJQIjoxMDA5NDksIkUiOjE3NzAxNTA3OTgsIlMiOjk5NywiRCI6InJwXzExMDAxIn0.FERDo2kkrNmbh_bdo-pEavL81qFzMay0yTVqZRiXpuM";
|
||||
|
||||
let language = "en"
|
||||
let currency = "THB"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user