chat girldetail 图集制作

This commit is contained in:
2025-09-19 15:19:59 +08:00
parent fb0a9abcce
commit 6ed9f82a6e
41 changed files with 1607 additions and 1508 deletions
+2 -2
View File
@@ -289,8 +289,8 @@ export class SDKManager { //extends Component
//region 播放背景视频 cbMap = {cbReady, cbEnded}
static PlayBgAudio(remoteUrl:string, vtype:VideoRoleType, loop:boolean = false, extra:any = {}) {
this.sdk.playBgAudio(remoteUrl, vtype, loop, extra);
static PlayBgAudio(remoteUrl:string, loop:boolean = false, extra:any = {}) {
this.sdk.playBgAudio(remoteUrl, loop, extra);
}
//添加要播放的表情视频
static AddEmoAudio(remoteUrl:string, vtype:VideoRoleType, loop:boolean = false, extra:any = {}) {
+2 -5
View File
@@ -643,17 +643,16 @@ export class WXSDK {
private curPlayType: VideoRoleType = VideoRoleType.None; //当前播放的视频的类型
playBgAudio(
remoteUrl: string,
vtype: VideoRoleType,
loop: boolean = false,
extra: any = {}
) {
if (this._bgVideo && this._bgShow) {
this.playBgAudioNext(remoteUrl, vtype, loop, extra);
this.playBgAudioNext(remoteUrl, loop, extra);
return;
}
let self = this;
console.log("微信 播放背景视频组件1", remoteUrl);
this.curPlayType = vtype;
//this.curPlayType = vtype;
if (!this._bgVideo) {
this._bgVideo = this.createVideoHandle();
// this._bgVideo.onPlay(() => {
@@ -694,13 +693,11 @@ export class WXSDK {
private _bgTempShow: boolean = false;
playBgAudioNext(
remoteUrl: string,
vtype: VideoRoleType,
loop: boolean = false,
extra: any = {}
) {
this.removeBgAudioNext();
console.log("微信 创建背景视频组件2--->", remoteUrl);
this.curPlayType = vtype;
let self = this;
if (!this._bgTempVideo) {
this._bgTempVideo = this.createVideoHandle();
+22 -12
View File
@@ -47,7 +47,9 @@ export class SceneBgVideoLayer extends li_BaseView {
openUIDataCT(data: any): void {
this._data = data;
}
getVideoClone() {
return this.videoPlayer;
}
/**初始化视频事件监听 */
private initVideoEvents() {
if (!this.videoPlayer) return;
@@ -111,7 +113,7 @@ export class SceneBgVideoLayer extends li_BaseView {
this.pendingVideoConfig = {
size: config.size,
position: config.position,
scale: options?.scale
scale: options?.scale,
};
const envData = DataManager.I.getDataById<EnvData>(DataId.Env);
@@ -199,13 +201,13 @@ export class SceneBgVideoLayer extends li_BaseView {
if (this.isPlaying && this.videoPlayer.isPlaying) {
this.applyVideoConfiguration({
size: targetSize,
position: position
position: position,
});
} else {
// 如果视频还未准备好,存储配置等待应用
this.pendingVideoConfig = {
size: targetSize,
position: position
position: position,
};
console.log("SceneBgVideoLayer: 视频未准备好,配置已存储等待应用");
}
@@ -246,17 +248,21 @@ export class SceneBgVideoLayer extends li_BaseView {
targetWorldPos = new Vec3(pos.x, pos.y, pos.z || 0);
}
this.videoPlayer.node.setWorldPosition(targetWorldPos);
console.log(`SceneBgVideoLayer: 设置视频位置 (${targetWorldPos.x}, ${targetWorldPos.y}, ${targetWorldPos.z})`);
console.log(
`SceneBgVideoLayer: 设置视频位置 (${targetWorldPos.x}, ${targetWorldPos.y}, ${targetWorldPos.z})`
);
}
// 应用尺寸和缩放设置
if (config.size) {
// 获取视频的原始尺寸(此时应该是准确的)
const videoSize = uiTransform.contentSize;
if (videoSize.width > 0 && videoSize.height > 0) {
const targetWidth = config.size instanceof Size ? config.size.width : config.size.width;
const targetHeight = config.size instanceof Size ? config.size.height : config.size.height;
const targetWidth =
config.size instanceof Size ? config.size.width : config.size.width;
const targetHeight =
config.size instanceof Size ? config.size.height : config.size.height;
// 计算缩放比例(填满整个区域)
const scaleX = targetWidth / videoSize.width;
@@ -264,7 +270,9 @@ export class SceneBgVideoLayer extends li_BaseView {
const scale = Math.max(scaleX, scaleY);
this.videoPlayer.node.setScale(new Vec3(scale, scale, 1));
console.log(`SceneBgVideoLayer: 设置视频缩放 ${scale} (原始尺寸: ${videoSize.width}x${videoSize.height}, 目标尺寸: ${targetWidth}x${targetHeight})`);
console.log(
`SceneBgVideoLayer: 设置视频缩放 ${scale} (原始尺寸: ${videoSize.width}x${videoSize.height}, 目标尺寸: ${targetWidth}x${targetHeight})`
);
} else {
console.warn("SceneBgVideoLayer: 无法获取视频尺寸,跳过缩放设置");
}
@@ -275,7 +283,9 @@ export class SceneBgVideoLayer extends li_BaseView {
console.log(`SceneBgVideoLayer: 设置显式缩放 ${config.scale}`);
} else {
this.videoPlayer.node.setScale(config.scale);
console.log(`SceneBgVideoLayer: 设置显式缩放 (${config.scale.x}, ${config.scale.y}, ${config.scale.z})`);
console.log(
`SceneBgVideoLayer: 设置显式缩放 (${config.scale.x}, ${config.scale.y}, ${config.scale.z})`
);
}
} else {
// 没有指定尺寸或缩放,保持原始缩放
@@ -288,14 +298,14 @@ export class SceneBgVideoLayer extends li_BaseView {
private onVideoReadyToPlay = () => {
console.log("SceneBgVideoLayer: 视频准备完成");
// 应用待处理的视频配置
if (this.pendingVideoConfig) {
this.applyVideoConfiguration(this.pendingVideoConfig);
// 清空待处理配置
this.pendingVideoConfig = null;
}
this.onVideoReady();
};
File diff suppressed because it is too large Load Diff
@@ -372,7 +372,7 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "d5aa44e9-a6e4-4570-bfba-238a902ca222@f9941",
"__uuid__": "1f2275dc-ceb1-4b48-a4ae-f63f7abb1095@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
@@ -4241,7 +4241,7 @@
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 1,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
@@ -4267,6 +4267,8 @@
"__id__": 0
},
"fileId": "eaXcMsu9NIZbMyNhSIVgD3",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
+3
View File
@@ -0,0 +1,3 @@
{
"__type__": "cc.SpriteAtlas"
}
@@ -0,0 +1,36 @@
{
"ver": "1.0.8",
"importer": "auto-atlas",
"imported": true,
"uuid": "3d9a361a-18c3-4aaa-9f33-6ad0d21435bf",
"files": [
".json"
],
"subMetas": {},
"userData": {
"maxWidth": 1024,
"maxHeight": 1024,
"padding": 2,
"allowRotation": true,
"forceSquared": false,
"powerOfTwo": false,
"algorithm": "MaxRects",
"format": "png",
"quality": 80,
"contourBleed": true,
"paddingBleed": true,
"filterUnused": true,
"removeTextureInBundle": true,
"removeImageInBundle": true,
"removeSpriteAtlasInBundle": true,
"compressSettings": {},
"textureSetting": {
"wrapModeS": "repeat",
"wrapModeT": "repeat",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 714 B

@@ -2,7 +2,7 @@
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "d5aa44e9-a6e4-4570-bfba-238a902ca222",
"uuid": "760237d1-46b3-4c02-8e0b-849a95e36873",
"files": [
".json",
".png"
@@ -10,14 +10,14 @@
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "d5aa44e9-a6e4-4570-bfba-238a902ca222@6c48a",
"displayName": "遮罩",
"uuid": "760237d1-46b3-4c02-8e0b-849a95e36873@6c48a",
"displayName": "矩形 11 拷贝",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "d5aa44e9-a6e4-4570-bfba-238a902ca222",
"imageUuidOrDatabaseUri": "760237d1-46b3-4c02-8e0b-849a95e36873",
"isUuid": true,
"visible": false,
"minfilter": "linear",
@@ -34,8 +34,8 @@
},
"f9941": {
"importer": "sprite-frame",
"uuid": "d5aa44e9-a6e4-4570-bfba-238a902ca222@f9941",
"displayName": "遮罩",
"uuid": "760237d1-46b3-4c02-8e0b-849a95e36873@f9941",
"displayName": "矩形 11 拷贝",
"id": "f9941",
"name": "spriteFrame",
"userData": {
@@ -46,9 +46,9 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1080,
"width": 10,
"height": 307,
"rawWidth": 1080,
"rawWidth": 10,
"rawHeight": 307,
"borderTop": 0,
"borderBottom": 0,
@@ -61,16 +61,16 @@
"meshType": 0,
"vertices": {
"rawPosition": [
-540,
-5,
-153.5,
0,
540,
5,
-153.5,
0,
-540,
-5,
153.5,
0,
540,
5,
153.5,
0
],
@@ -85,11 +85,11 @@
"uv": [
0,
307,
1080,
10,
307,
0,
0,
1080,
10,
0
],
"nuv": [
@@ -103,18 +103,18 @@
1
],
"minPos": [
-540,
-5,
-153.5,
0
],
"maxPos": [
540,
5,
153.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "d5aa44e9-a6e4-4570-bfba-238a902ca222@6c48a",
"imageUuidOrDatabaseUri": "760237d1-46b3-4c02-8e0b-849a95e36873@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
@@ -129,6 +129,6 @@
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "d5aa44e9-a6e4-4570-bfba-238a902ca222@6c48a"
"redirect": "760237d1-46b3-4c02-8e0b-849a95e36873@6c48a"
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

-134
View File
@@ -1,134 +0,0 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "8de6a058-06ab-4713-a448-e7935a56ed28",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "8de6a058-06ab-4713-a448-e7935a56ed28@6c48a",
"displayName": "矩形 14",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "8de6a058-06ab-4713-a448-e7935a56ed28",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "8de6a058-06ab-4713-a448-e7935a56ed28@f9941",
"displayName": "矩形 14",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1080,
"height": 281,
"rawWidth": 1080,
"rawHeight": 281,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-540,
-140.5,
0,
540,
-140.5,
0,
-540,
140.5,
0,
540,
140.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
281,
1080,
281,
0,
0,
1080,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-540,
-140.5,
0
],
"maxPos": [
540,
140.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "8de6a058-06ab-4713-a448-e7935a56ed28@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "8de6a058-06ab-4713-a448-e7935a56ed28@6c48a"
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

+20 -20
View File
@@ -46,10 +46,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1080,
"height": 150,
"rawWidth": 1080,
"rawHeight": 150,
"width": 512,
"height": 71,
"rawWidth": 512,
"rawHeight": 71,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
@@ -61,17 +61,17 @@
"meshType": 0,
"vertices": {
"rawPosition": [
-540,
-75,
-256,
-35.5,
0,
540,
-75,
256,
-35.5,
0,
-540,
75,
-256,
35.5,
0,
540,
75,
256,
35.5,
0
],
"indexes": [
@@ -84,12 +84,12 @@
],
"uv": [
0,
150,
1080,
150,
71,
512,
71,
0,
0,
1080,
512,
0
],
"nuv": [
@@ -103,13 +103,13 @@
1
],
"minPos": [
-540,
-75,
-256,
-35.5,
0
],
"maxPos": [
540,
75,
256,
35.5,
0
]
},
@@ -0,0 +1,3 @@
{
"__type__": "cc.SpriteAtlas"
}
@@ -0,0 +1,36 @@
{
"ver": "1.0.8",
"importer": "auto-atlas",
"imported": true,
"uuid": "31c01aab-820a-4aa2-b0bc-bb9e1081b7e2",
"files": [
".json"
],
"subMetas": {},
"userData": {
"maxWidth": 1024,
"maxHeight": 1024,
"padding": 2,
"allowRotation": true,
"forceSquared": false,
"powerOfTwo": false,
"algorithm": "MaxRects",
"format": "png",
"quality": 80,
"contourBleed": true,
"paddingBleed": true,
"filterUnused": true,
"removeTextureInBundle": true,
"removeImageInBundle": true,
"removeSpriteAtlasInBundle": true,
"compressSettings": {},
"textureSetting": {
"wrapModeS": "repeat",
"wrapModeT": "repeat",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 KiB

@@ -1,134 +0,0 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "5cc7e853-548e-44d6-819e-725fcfca8da2",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "5cc7e853-548e-44d6-819e-725fcfca8da2@6c48a",
"displayName": "ref1",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "5cc7e853-548e-44d6-819e-725fcfca8da2",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "5cc7e853-548e-44d6-819e-725fcfca8da2@f9941",
"displayName": "ref1",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 341,
"height": 438,
"rawWidth": 341,
"rawHeight": 438,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-170.5,
-219,
0,
170.5,
-219,
0,
-170.5,
219,
0,
170.5,
219,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
438,
341,
438,
0,
0,
341,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-170.5,
-219,
0
],
"maxPos": [
170.5,
219,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "5cc7e853-548e-44d6-819e-725fcfca8da2@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "5cc7e853-548e-44d6-819e-725fcfca8da2@6c48a"
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

@@ -1,134 +0,0 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "479c1e8c-f1a9-48a7-9f85-1a27b25f0a5a",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "479c1e8c-f1a9-48a7-9f85-1a27b25f0a5a@6c48a",
"displayName": "ref2",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "479c1e8c-f1a9-48a7-9f85-1a27b25f0a5a",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "479c1e8c-f1a9-48a7-9f85-1a27b25f0a5a@f9941",
"displayName": "ref2",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1080,
"height": 1391,
"rawWidth": 1080,
"rawHeight": 1391,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-540,
-695.5,
0,
540,
-695.5,
0,
-540,
695.5,
0,
540,
695.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
1391,
1080,
1391,
0,
0,
1080,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-540,
-695.5,
0
],
"maxPos": [
540,
695.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "479c1e8c-f1a9-48a7-9f85-1a27b25f0a5a@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "479c1e8c-f1a9-48a7-9f85-1a27b25f0a5a@6c48a"
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

@@ -1,134 +0,0 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "b1d17801-99e3-41ad-962e-f8fd4b14bc27",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "b1d17801-99e3-41ad-962e-f8fd4b14bc27@6c48a",
"displayName": "ref3",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "b1d17801-99e3-41ad-962e-f8fd4b14bc27",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "b1d17801-99e3-41ad-962e-f8fd4b14bc27@f9941",
"displayName": "ref3",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 341,
"height": 439,
"rawWidth": 341,
"rawHeight": 439,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-170.5,
-219.5,
0,
170.5,
-219.5,
0,
-170.5,
219.5,
0,
170.5,
219.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
439,
341,
439,
0,
0,
341,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-170.5,
-219.5,
0
],
"maxPos": [
170.5,
219.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "b1d17801-99e3-41ad-962e-f8fd4b14bc27@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "b1d17801-99e3-41ad-962e-f8fd4b14bc27@6c48a"
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 714 B

@@ -46,9 +46,9 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1080,
"width": 10,
"height": 307,
"rawWidth": 1080,
"rawWidth": 10,
"rawHeight": 307,
"borderTop": 0,
"borderBottom": 0,
@@ -61,16 +61,16 @@
"meshType": 0,
"vertices": {
"rawPosition": [
-540,
-5,
-153.5,
0,
540,
5,
-153.5,
0,
-540,
-5,
153.5,
0,
540,
5,
153.5,
0
],
@@ -85,11 +85,11 @@
"uv": [
0,
307,
1080,
10,
307,
0,
0,
1080,
10,
0
],
"nuv": [
@@ -103,12 +103,12 @@
1
],
"minPos": [
-540,
-5,
-153.5,
0
],
"maxPos": [
540,
5,
153.5,
0
]
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

@@ -46,10 +46,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1029,
"height": 114,
"rawWidth": 1029,
"rawHeight": 114,
"width": 800,
"height": 88,
"rawWidth": 800,
"rawHeight": 88,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
@@ -61,17 +61,17 @@
"meshType": 0,
"vertices": {
"rawPosition": [
-514.5,
-57,
-400,
-44,
0,
514.5,
-57,
400,
-44,
0,
-514.5,
57,
-400,
44,
0,
514.5,
57,
400,
44,
0
],
"indexes": [
@@ -84,12 +84,12 @@
],
"uv": [
0,
114,
1029,
114,
88,
800,
88,
0,
0,
1029,
800,
0
],
"nuv": [
@@ -103,13 +103,13 @@
1
],
"minPos": [
-514.5,
-57,
-400,
-44,
0
],
"maxPos": [
514.5,
57,
400,
44,
0
]
},
Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

+34
View File
@@ -0,0 +1,34 @@
//app.js
App({
onLaunch: function () {
// show localstorage
let logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
// login
wx.login({
success: res => {
// get custom login info res
}
})
// get user settings
wx.getSetting({
success: res => {
if (res.authSetting['scope.userInfo']) {
// Already authorized, you can directly call getUserInfo to get the avatar nickname without popping up
wx.getUserInfo({
success: res => {
// get custom user info res
this.globalData.userInfo = res.userInfo;
}
})
}
}
})
},
globalData: {
userInfo: null
}
})
+13
View File
@@ -0,0 +1,13 @@
{
"pages": [
"pages/index/index",
"pages/logs/logs"
],
"style": "v2",
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "TCSAS Mini Program",
"navigationBarTextStyle": "black"
}
}
+9
View File
@@ -0,0 +1,9 @@
.container {
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: 200rpx 0;
box-sizing: border-box;
}
+53
View File
@@ -0,0 +1,53 @@
//index.js
//get application instance
const { defaultIcon } = require('../../utils/icon');
const app = getApp()
Page({
data: {
motto: 'Hello World',
userInfo: {},
hasUserInfo: false,
canIUse: wx.canIUse('button.open-type.getUserInfo')
},
// event handler function
bindViewTap: function () {
wx.navigateTo({
url: '../logs/logs'
})
},
onLoad: function () {
if (app.globalData.userInfo) {
this.setData({
userInfo: app.globalData.userInfo,
hasUserInfo: true
})
} else if (this.data.canIUse) {
// do someting
} else {
// There is no compatibility processing for open-type=getUserInfo version
wx.getUserInfo({
success: res => {
app.globalData.userInfo = res.userInfo
this.setData({
userInfo: res.userInfo,
hasUserInfo: true
})
}
})
}
},
getUserInfo: function (e) {
console.log('getUserInfo ----> ', e);
app.globalData.userInfo = e.detail.userInfo || "";
const userInfo = e.detail.userInfo || {
avatarUrl: defaultIcon,
nickName: 'userNickName'
}
this.setData({
userInfo: userInfo,
hasUserInfo: true
})
}
})
+3
View File
@@ -0,0 +1,3 @@
{
"usingComponents": {}
}
+1
View File
@@ -0,0 +1 @@
<web-view src="http://120.25.215.205:39002/"></web-view>
+20
View File
@@ -0,0 +1,20 @@
.userinfo {
display: flex;
flex-direction: column;
align-items: center;
}
.userinfo-avatar {
width: 128rpx;
height: 128rpx;
margin: 20rpx;
border-radius: 50%;
}
.userinfo-nickname {
color: #aaa;
}
.usermotto {
margin-top: 200px;
}
+15
View File
@@ -0,0 +1,15 @@
//logs.js
const util = require('../../utils/util.js')
Page({
data: {
logs: []
},
onLoad: function () {
this.setData({
logs: (wx.getStorageSync('logs') || []).map(log => {
return util.formatTime(new Date(log))
})
})
}
})
+4
View File
@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "Logs",
"usingComponents": {}
}
+5
View File
@@ -0,0 +1,5 @@
<view class="container log-list">
<block wx:for="{{logs}}" wx:for-item="log" wx:key="*this">
<text class="log-item">{{index + 1}}. {{log}}</text>
</block>
</view>
+9
View File
@@ -0,0 +1,9 @@
.log-list {
display: flex;
flex-direction: column;
padding: 40rpx;
}
.log-item {
margin: 10rpx;
}
+47
View File
@@ -0,0 +1,47 @@
{
"projectid": "mp0ygqvghc940ppb_AIphrodite",
"setting": {
"urlCheck": true,
"es6": true,
"postcss": true,
"minified": true,
"newFeature": true,
"autoAudits": false,
"nodeModules": true,
"uploadWithSourceMap": true,
"uglifyFileName": true,
"remoteDebugLogEnable": true,
"prefetch": false
},
"LuffaToolsLibVersion": "2.2.13",
"compileType": "miniprogram",
"createTime": 1758263984023,
"accessTime": 1758263984023,
"packOptions": {
"ignore": []
},
"debugOptions": {
"hidedInDevtools": []
},
"LuffaToolsappid": "mp0ygqvghc940ppb",
"projectname": "AIphrodite",
"scripts": {},
"condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"game": {
"currentL": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": []
}
}
}
+5
View File
@@ -0,0 +1,5 @@
const defaultIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAAbFBMVEUyxnH///+x5sUOwmPm9+wsxW4lxGsUwmUdw2jW8uBZzojQ8NzY8uLb8+Rg0Iw+yXih4bn0/Pf5/fvg9ejr+fCW3rHE7NOk4rtm0ZCQ3K2C2KO86c1Iy35w1JfK7td31ZtRzYN+16C258iL26mIAYOpAAAK/klEQVR4nN3d53bjKhAAYGSZEttxUdziuPv933GR3GQVmEE07fy695zdRN8OAiTBQBL3sfgZ/w3mv7vTYTsdjUbT6eF0uc0Hf+OfhYffTlz+8Oz7ujrtKedCMMZoOeT/C8E5m21/B19Ooa6E2WRzmqVcSBdRhbQKkdLD/OiK6UKYHVd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WqPsrHR+gTvToL5fOGpzf28gacrfWX40CYJMe9D6MgwOckB0LZ5bg2UkHMOhhbQplHl22V8lmn/FkRJsnkkLoZO1g6Oup/vQeh7FdXxPp0lQpxs7IB0IpQxnqbWvxWSBk/Xw3Hv2rYEsq53OZsCcn4bGVvF649oYzh5tz1BCGa88yOL2kJq0IZy8GWm37bpkyko41ZgbD2sC3MY7waob/g50dI7W9r3OM7KFwIZWTjzYGmggGcNMeJ6eroQJeHI2ERi+NgdyZctloprVKplOVHf9HzZb7G1irGhEvhPbKf43Vzu2zP5ZJis/P2tJsPjt+OEleKf+9clRDl++4DAAAAAElFTkSuQmCC'
module.exports = {
defaultIcon
}
+19
View File
@@ -0,0 +1,19 @@
const formatTime = date => {
const year = date.getFullYear()
const month = date.getMonth() + 1
const day = date.getDate()
const hour = date.getHours()
const minute = date.getMinutes()
const second = date.getSeconds()
return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
}
const formatNumber = n => {
n = n.toString()
return n[1] ? n : '0' + n
}
module.exports = {
formatTime: formatTime
}