新ui入版
This commit is contained in:
@@ -4,7 +4,7 @@ import ResManager from "db://assets/Scripts/Main/Manager/ResManager";
|
||||
import { ViewManager } from "db://assets/Scripts/Main/Manager/ViewManager";
|
||||
import { GButton } from "db://assets/Scripts/Main/Common/GButton";
|
||||
import { GirlDetailPanel } from "../ui/panels/GirlDetailPanel";
|
||||
import proto from 'db://assets/Scripts/proto/proto.pb.js';
|
||||
import proto from "db://assets/Scripts/proto/proto.pb.js";
|
||||
import { DataManager, DataId } from "../data/DataManager";
|
||||
import { GirlData } from "../data/GirlData";
|
||||
|
||||
@@ -15,11 +15,12 @@ export class DetailImageItem extends Component {
|
||||
@property(Sprite)
|
||||
img: Sprite;
|
||||
|
||||
@property(Node)
|
||||
lock: Node;
|
||||
@property(Node)
|
||||
question: Node;
|
||||
|
||||
@property(Sprite)
|
||||
video: Sprite;
|
||||
|
||||
base: GirlDetailPanel;
|
||||
url: string;
|
||||
isImage: boolean;
|
||||
@@ -27,7 +28,7 @@ export class DetailImageItem extends Component {
|
||||
category: number;
|
||||
id: number;
|
||||
index: number;
|
||||
type : number;
|
||||
type: number;
|
||||
|
||||
onLoad() {
|
||||
GButton.BandClick(this.node, this.onClickThis, this);
|
||||
@@ -99,21 +100,33 @@ export class DetailImageItem extends Component {
|
||||
this.category = category;
|
||||
this.id = id;
|
||||
this.index = index;
|
||||
this.lock.active = false;
|
||||
this.question.active = true; // 显示问号,表示加载中
|
||||
|
||||
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
|
||||
let imgPath = "";
|
||||
this.video.enabled = type === 2;
|
||||
if (type === 1) {
|
||||
// 图片
|
||||
this.url = girlData.getGrilPhotoPic(this.category.toString(), this.id, this.index);
|
||||
this.url = girlData.getGrilPhotoPic(
|
||||
this.category.toString(),
|
||||
this.id,
|
||||
this.index
|
||||
);
|
||||
imgPath = this.url;
|
||||
this.isImage = true;
|
||||
} else if (type === 2) {
|
||||
// 视频
|
||||
this.isImage = false;
|
||||
this.url = girlData.getGrilVideoPath(this.category.toString(), this.id, this.index);
|
||||
let videoPrice = girlData.getGrilVideoPrice(this.category.toString(), this.id, this.index);
|
||||
this.url = girlData.getGrilVideoPath(
|
||||
this.category.toString(),
|
||||
this.id,
|
||||
this.index
|
||||
);
|
||||
let videoPrice = girlData.getGrilVideoPrice(
|
||||
this.category.toString(),
|
||||
this.id,
|
||||
this.index
|
||||
);
|
||||
if (videoPrice > 0) {
|
||||
imgPath = this.url + "_thumbnail_blur";
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user