fix
This commit is contained in:
@@ -86,8 +86,7 @@ export class PastGirlListPanel extends li_BaseView {
|
||||
// 获取已解锁女孩列表
|
||||
const ids = await this.getUnlockedGirls();
|
||||
|
||||
if (true) {
|
||||
//!ids || ids.length === 0) {
|
||||
if (!ids || ids.length === 0) {
|
||||
this._nodeTab.cleanBg.active = true;
|
||||
} else {
|
||||
this._nodeTab.cleanBg.active = false;
|
||||
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
view,
|
||||
Size,
|
||||
Vec3,
|
||||
EventTouch,
|
||||
} from "cc";
|
||||
import li_BaseView from "db://assets/Scripts/Main/Common/li_BaseView";
|
||||
import ResManager from "db://assets/Scripts/Main/Manager/ResManager";
|
||||
@@ -65,6 +66,12 @@ export class ShowPanel extends li_BaseView {
|
||||
this
|
||||
);
|
||||
}
|
||||
|
||||
// 阻止触摸事件传递,防止拖动画面(特别是Web平台视频超出屏幕时)
|
||||
this.node.on(Node.EventType.TOUCH_START, this.onTouchBlock, this);
|
||||
this.node.on(Node.EventType.TOUCH_MOVE, this.onTouchBlock, this);
|
||||
this.node.on(Node.EventType.TOUCH_END, this.onTouchBlock, this);
|
||||
this.node.on(Node.EventType.TOUCH_CANCEL, this.onTouchBlock, this);
|
||||
}
|
||||
|
||||
onDestroy() {
|
||||
@@ -76,6 +83,22 @@ export class ShowPanel extends li_BaseView {
|
||||
this
|
||||
);
|
||||
}
|
||||
|
||||
// 清理触摸事件监听
|
||||
this.node.off(Node.EventType.TOUCH_START, this.onTouchBlock, this);
|
||||
this.node.off(Node.EventType.TOUCH_MOVE, this.onTouchBlock, this);
|
||||
this.node.off(Node.EventType.TOUCH_END, this.onTouchBlock, this);
|
||||
this.node.off(Node.EventType.TOUCH_CANCEL, this.onTouchBlock, this);
|
||||
}
|
||||
|
||||
/**
|
||||
* 阻止触摸事件传递,防止拖动画面
|
||||
*/
|
||||
private onTouchBlock(event: EventTouch) {
|
||||
// 阻止事件冒泡
|
||||
event.propagationStopped = true;
|
||||
// 阻止浏览器默认行为(如拖动、滚动)
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
protected onClose() {
|
||||
|
||||
@@ -78,23 +78,7 @@ export class DetailImageItem extends Component {
|
||||
base: this,
|
||||
type: this.type,
|
||||
});
|
||||
|
||||
// ViewManager.I.openBundlesView("PopupGirlDetailPanel", {
|
||||
// category: this.category,
|
||||
// resId: this.resId,
|
||||
// girlId: this.girlId,
|
||||
// base: this,
|
||||
// type: this.type,
|
||||
// });
|
||||
}
|
||||
// if (!this.isImage) {
|
||||
// //判断是否已经解锁此资源
|
||||
// } else {
|
||||
// if (this.url) {
|
||||
// ViewManager.I.openBundlesView("ShowPanel", data);
|
||||
// this.base.setVideEnable(false);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -251,6 +235,13 @@ export class DetailImageItem extends Component {
|
||||
ResManager.I.changeRemoteSpriteFrame(this.img, newPath, () => {
|
||||
this.scaleToFillItem();
|
||||
});
|
||||
if (this.isVisible) {
|
||||
this.video.enabled = false;
|
||||
this.videoReady.enabled = true;
|
||||
} else {
|
||||
this.video.enabled = true;
|
||||
this.videoReady.enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user