fix
This commit is contained in:
@@ -0,0 +1,40 @@
|
|||||||
|
import { _decorator, Button, Component, Node } from "cc";
|
||||||
|
import li_BaseView from "../../../Main/Common/li_BaseView";
|
||||||
|
import Utils from "../../../Main/Common/Utils";
|
||||||
|
import { GButton } from "../../../Main/Common/GButton";
|
||||||
|
import { PopupGirlDetailPanel } from "./PopupGirlDetailPanel";
|
||||||
|
import { GirlListItem } from "../../uiitems/GirlListItem";
|
||||||
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
|
@ccclass("GirlListPopupPanel")
|
||||||
|
export class GirlListPopupPanel extends li_BaseView {
|
||||||
|
private _nodeTab: any = {};
|
||||||
|
|
||||||
|
private girlId: number;
|
||||||
|
|
||||||
|
base: GirlListItem;
|
||||||
|
openUIDataCT(data) {
|
||||||
|
this.girlId = data.id;
|
||||||
|
this.base = data.base;
|
||||||
|
}
|
||||||
|
onLoadCT() {
|
||||||
|
Utils.parseNode(this.node, this._nodeTab);
|
||||||
|
this.registerListener();
|
||||||
|
}
|
||||||
|
registerListener() {
|
||||||
|
GButton.BandClick(this._nodeTab.BuyBtn, this.buyCharacter, this);
|
||||||
|
GButton.BandClick(this._nodeTab.CloseBtn, this.Close, this);
|
||||||
|
}
|
||||||
|
Close() {
|
||||||
|
this.close();
|
||||||
|
}
|
||||||
|
buyCharacter() {
|
||||||
|
// 购买id为girlId的女生
|
||||||
|
console.log(this.girlId);
|
||||||
|
|
||||||
|
if (true) {
|
||||||
|
this.base.refreshBuy(true);
|
||||||
|
this.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
"ver": "4.0.24",
|
"ver": "4.0.24",
|
||||||
"importer": "typescript",
|
"importer": "typescript",
|
||||||
"imported": true,
|
"imported": true,
|
||||||
"uuid": "5d94228f-b43d-4fd7-8cb6-0336edbff11b",
|
"uuid": "8c377088-00d5-423d-bf8b-331e05789f60",
|
||||||
"files": [],
|
"files": [],
|
||||||
"subMetas": {},
|
"subMetas": {},
|
||||||
"userData": {}
|
"userData": {}
|
||||||
+8
-6
@@ -1,17 +1,19 @@
|
|||||||
import { _decorator, Button, Component, Node } from "cc";
|
import { _decorator, Component, Node } from "cc";
|
||||||
import li_BaseView from "../../../Main/Common/li_BaseView";
|
import li_BaseView from "../../../Main/Common/li_BaseView";
|
||||||
import Utils from "../../../Main/Common/Utils";
|
|
||||||
import { GButton } from "../../../Main/Common/GButton";
|
import { GButton } from "../../../Main/Common/GButton";
|
||||||
|
import Utils from "../../../Main/Common/Utils";
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
@ccclass("PopupGirlListPanel")
|
@ccclass("PopupGirlDetailPanel")
|
||||||
export class PopupGirlListPanel extends li_BaseView {
|
export class PopupGirlDetailPanel extends li_BaseView {
|
||||||
private _nodeTab: any = {};
|
private _nodeTab: any = {};
|
||||||
|
|
||||||
private girlId: number;
|
private girlId: number;
|
||||||
|
private resId: number;
|
||||||
|
|
||||||
openUIDataCT(data) {
|
openUIDataCT(data) {
|
||||||
this.girlId = data;
|
this.resId = data.resId;
|
||||||
|
this.girlId = data.girlId;
|
||||||
}
|
}
|
||||||
onLoadCT() {
|
onLoadCT() {
|
||||||
Utils.parseNode(this.node, this._nodeTab);
|
Utils.parseNode(this.node, this._nodeTab);
|
||||||
@@ -26,6 +28,6 @@ export class PopupGirlListPanel extends li_BaseView {
|
|||||||
}
|
}
|
||||||
buyCharacter() {
|
buyCharacter() {
|
||||||
// 购买id为girlId的女生
|
// 购买id为girlId的女生
|
||||||
console.log(this.girlId);
|
console.log(this.girlId + "---" + this.resId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"ver": "4.0.24",
|
||||||
|
"importer": "typescript",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "5d78d19c-53d5-4b1e-b0a9-634b420be34c",
|
||||||
|
"files": [],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {}
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ import {
|
|||||||
Node,
|
Node,
|
||||||
Sprite,
|
Sprite,
|
||||||
UITransform,
|
UITransform,
|
||||||
|
View,
|
||||||
} from "cc";
|
} from "cc";
|
||||||
import { Config18x } from "db://assets/Scripts/Main/Config/Config18x";
|
import { Config18x } from "db://assets/Scripts/Main/Config/Config18x";
|
||||||
import ResManager from "db://assets/Scripts/Main/Manager/ResManager";
|
import ResManager from "db://assets/Scripts/Main/Manager/ResManager";
|
||||||
@@ -58,9 +59,19 @@ export class DetailImageItem extends Component {
|
|||||||
this.base.setVideEnable(true);
|
this.base.setVideEnable(true);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
if (this.url) {
|
|
||||||
ViewManager.I.openBundlesView("ShowPanel", data);
|
//判断是否已经解锁此资源
|
||||||
this.base.setVideEnable(false);
|
const isRelease = false;
|
||||||
|
if (isRelease) {
|
||||||
|
if (this.url) {
|
||||||
|
ViewManager.I.openBundlesView("ShowPanel", data);
|
||||||
|
this.base.setVideEnable(false);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ViewManager.I.openBundlesView("PopupGirlDetailPanel", {
|
||||||
|
resId: this.resId,
|
||||||
|
girlId: this.girlId,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -141,13 +141,22 @@ export class GirlListItem extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
refreshBuy(success: boolean) {
|
||||||
|
if (success) {
|
||||||
|
this.refreshData(this.category, this.id, this.baseNode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onClickDetail() {
|
onClickDetail() {
|
||||||
if (false) {
|
if (false) {
|
||||||
NavigationManager.Instance.navigateToGirlDetail(this.id);
|
NavigationManager.Instance.navigateToGirlDetail(this.id);
|
||||||
ViewManager.I.closeView(this.baseNode);
|
ViewManager.I.closeView(this.baseNode);
|
||||||
} else {
|
} else {
|
||||||
//未解锁
|
//未解锁
|
||||||
ViewManager.I.openBundlesView("PopupGirlListPanel", this.id);
|
ViewManager.I.openBundlesView("GirlListPopupPanel", {
|
||||||
|
base: this,
|
||||||
|
id: this.id,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"__type__": "cc.Prefab",
|
"__type__": "cc.Prefab",
|
||||||
"_name": "PopupGirlListPanel",
|
"_name": "GirlListPopupPanel",
|
||||||
"_objFlags": 0,
|
"_objFlags": 0,
|
||||||
"__editorExtras__": {},
|
"__editorExtras__": {},
|
||||||
"_native": "",
|
"_native": "",
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__type__": "cc.Node",
|
"__type__": "cc.Node",
|
||||||
"_name": "PopupGirlListPanel",
|
"_name": "GirlListPopupPanel",
|
||||||
"_objFlags": 0,
|
"_objFlags": 0,
|
||||||
"__editorExtras__": {},
|
"__editorExtras__": {},
|
||||||
"_parent": null,
|
"_parent": null,
|
||||||
@@ -2846,7 +2846,7 @@
|
|||||||
"fileId": "d1s++F71pCoo/ePChgCcoU"
|
"fileId": "d1s++F71pCoo/ePChgCcoU"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__type__": "5d942KPtD1P14y2Azbtv/Eb",
|
"__type__": "8c377CIANVCPb+LMx4FeJ9g",
|
||||||
"_name": "",
|
"_name": "",
|
||||||
"_objFlags": 0,
|
"_objFlags": 0,
|
||||||
"__editorExtras__": {},
|
"__editorExtras__": {},
|
||||||
@@ -2862,7 +2862,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__type__": "cc.CompPrefabInfo",
|
"__type__": "cc.CompPrefabInfo",
|
||||||
"fileId": "010N5nyQBFzb5OtX6ndt1Y"
|
"fileId": "1eVMW1Z2dAjZUclnA2X65+"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__type__": "cc.PrefabInfo",
|
"__type__": "cc.PrefabInfo",
|
||||||
+2
-2
@@ -2,12 +2,12 @@
|
|||||||
"ver": "1.1.50",
|
"ver": "1.1.50",
|
||||||
"importer": "prefab",
|
"importer": "prefab",
|
||||||
"imported": true,
|
"imported": true,
|
||||||
"uuid": "9ae8b535-a2b4-45db-9a53-a5ef8b7dd605",
|
"uuid": "ffb262b6-bda3-455c-a5bd-18c17c54e879",
|
||||||
"files": [
|
"files": [
|
||||||
".json"
|
".json"
|
||||||
],
|
],
|
||||||
"subMetas": {},
|
"subMetas": {},
|
||||||
"userData": {
|
"userData": {
|
||||||
"syncNodeName": "PopupGirlListPanel"
|
"syncNodeName": "GirlListPopupPanel"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+25
-3
@@ -1,7 +1,7 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"__type__": "cc.Prefab",
|
"__type__": "cc.Prefab",
|
||||||
"_name": "Popup_girlDetailPanel",
|
"_name": "PopupGirlDetailPanel",
|
||||||
"_objFlags": 0,
|
"_objFlags": 0,
|
||||||
"__editorExtras__": {},
|
"__editorExtras__": {},
|
||||||
"_native": "",
|
"_native": "",
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__type__": "cc.Node",
|
"__type__": "cc.Node",
|
||||||
"_name": "Popup_girlDetailPanel",
|
"_name": "PopupGirlDetailPanel",
|
||||||
"_objFlags": 0,
|
"_objFlags": 0,
|
||||||
"__editorExtras__": {},
|
"__editorExtras__": {},
|
||||||
"_parent": null,
|
"_parent": null,
|
||||||
@@ -44,10 +44,13 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__id__": 74
|
"__id__": 74
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 76
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_prefab": {
|
"_prefab": {
|
||||||
"__id__": 76
|
"__id__": 78
|
||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
@@ -1771,6 +1774,25 @@
|
|||||||
"__type__": "cc.CompPrefabInfo",
|
"__type__": "cc.CompPrefabInfo",
|
||||||
"fileId": "ed8YwALRhB1pi+/dgBbTa2"
|
"fileId": "ed8YwALRhB1pi+/dgBbTa2"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"__type__": "5d78dGcU9VLHrCpY0tCC+NM",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": {
|
||||||
|
"__id__": 77
|
||||||
|
},
|
||||||
|
"m_rootNode": null,
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.CompPrefabInfo",
|
||||||
|
"fileId": "b7tDDDBy9A+5eUfz6NepMC"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"__type__": "cc.PrefabInfo",
|
"__type__": "cc.PrefabInfo",
|
||||||
"root": {
|
"root": {
|
||||||
+1
-1
@@ -8,6 +8,6 @@
|
|||||||
],
|
],
|
||||||
"subMetas": {},
|
"subMetas": {},
|
||||||
"userData": {
|
"userData": {
|
||||||
"syncNodeName": "Popup_girlDetailPanel"
|
"syncNodeName": "PopupGirlDetailPanel"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6084,7 +6084,7 @@
|
|||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 467.75000000000006,
|
"y": 935.95,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"_lrot": {
|
"_lrot": {
|
||||||
@@ -6144,7 +6144,7 @@
|
|||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 16.69999999999996,
|
"y": -221,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"_lrot": {
|
"_lrot": {
|
||||||
@@ -7745,7 +7745,7 @@
|
|||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": -237.70000000000002,
|
"y": -475.4,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"_lrot": {
|
"_lrot": {
|
||||||
@@ -7882,6 +7882,8 @@
|
|||||||
"__id__": 0
|
"__id__": 0
|
||||||
},
|
},
|
||||||
"fileId": "8ebvTeO6lMSYYDg4uDho8z",
|
"fileId": "8ebvTeO6lMSYYDg4uDho8z",
|
||||||
|
"instance": null,
|
||||||
|
"targetOverrides": null,
|
||||||
"nestedPrefabInstanceRoots": null
|
"nestedPrefabInstanceRoots": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -7904,7 +7906,7 @@
|
|||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
"__type__": "cc.Vec2",
|
"__type__": "cc.Vec2",
|
||||||
"x": 0.5,
|
"x": 0.5,
|
||||||
"y": 0.5
|
"y": 1
|
||||||
},
|
},
|
||||||
"_id": ""
|
"_id": ""
|
||||||
},
|
},
|
||||||
@@ -8138,6 +8140,8 @@
|
|||||||
"__id__": 0
|
"__id__": 0
|
||||||
},
|
},
|
||||||
"fileId": "70oATObmVB8YbRUVE9gFZQ",
|
"fileId": "70oATObmVB8YbRUVE9gFZQ",
|
||||||
|
"instance": null,
|
||||||
|
"targetOverrides": null,
|
||||||
"nestedPrefabInstanceRoots": null
|
"nestedPrefabInstanceRoots": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
Submodule proto_cs updated: 4943c6df6b...f055100cf0
Reference in New Issue
Block a user