update
This commit is contained in:
@@ -26,9 +26,6 @@ export class DetailImageItem extends Component {
|
||||
@property(Sprite)
|
||||
img: Sprite;
|
||||
|
||||
@property(Node)
|
||||
question: Node;
|
||||
|
||||
@property(Sprite)
|
||||
video: Sprite;
|
||||
|
||||
@@ -36,8 +33,7 @@ export class DetailImageItem extends Component {
|
||||
priceFrame: Node;
|
||||
@property(Label)
|
||||
videoPrice: Label;
|
||||
@property(Node)
|
||||
loading: Node;
|
||||
|
||||
base: GirlDetailPanel;
|
||||
url: string;
|
||||
isImage: boolean;
|
||||
@@ -102,16 +98,16 @@ export class DetailImageItem extends Component {
|
||||
/**
|
||||
* 查看图片或者视频上报,用于排行榜
|
||||
* @param girlId 角色Id
|
||||
*/
|
||||
*/
|
||||
private async reqViewGirl(girlId: number) {
|
||||
const reqData = {
|
||||
girlId
|
||||
girlId,
|
||||
};
|
||||
let res = await GirlService.I.reqViewGirl(reqData);
|
||||
if (res && res.code === proto.cs.EnmRetCode.SUCCESS) {
|
||||
const resData = res.data;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
scaleToFillItem() {
|
||||
if (!this.img || !this.img.spriteFrame) return;
|
||||
@@ -167,8 +163,6 @@ export class DetailImageItem extends Component {
|
||||
this.resId = resId;
|
||||
//this.question.active = true; // 显示问号,表示加载中
|
||||
|
||||
this.loading.active = true;
|
||||
|
||||
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
|
||||
let imgPath = "";
|
||||
this.video.enabled = type === proto.cs.EnmResType.ERT_Video;
|
||||
@@ -231,9 +225,7 @@ export class DetailImageItem extends Component {
|
||||
const envData = DataManager.I.getDataById<EnvData>(DataId.Env);
|
||||
let newPath = envData.cdn + "/" + "Girls/" + imgPath + ".jpg";
|
||||
ResManager.I.changeRemoteSpriteFrame(this.img, newPath, () => {
|
||||
this.question.active = false;
|
||||
this.scaleToFillItem();
|
||||
this.loading.active = false;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -246,7 +238,6 @@ export class DetailImageItem extends Component {
|
||||
const envData = DataManager.I.getDataById<EnvData>(DataId.Env);
|
||||
let newPath = envData.cdn + "/" + "Girls/" + imgPath + ".jpg";
|
||||
ResManager.I.changeRemoteSpriteFrame(this.img, newPath, () => {
|
||||
this.question.active = false; // 图片加载成功后隐藏问号
|
||||
this.scaleToFillItem();
|
||||
});
|
||||
}
|
||||
@@ -262,10 +253,8 @@ export class DetailImageItem extends Component {
|
||||
this.type = null;
|
||||
this.isVisible = false;
|
||||
|
||||
this.question.active = true;
|
||||
this.video.enabled = false;
|
||||
this.priceFrame.active = false;
|
||||
this.loading.active = false;
|
||||
this.videoPrice.string = "";
|
||||
|
||||
if (this.img && this.img.spriteFrame) {
|
||||
|
||||
Reference in New Issue
Block a user