Commit 4087db6a authored by Edwise's avatar Edwise 🍷

头像居中

parent 46214a0f
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"happyCoin":1000, "happyCoin":1000,
"experience": 80, "experience": 80,
"level": "1", "level": "1",
"avatar": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=vFHbMm8SPFPHPFRHPG7HPmPhvmgyPGPIP07-OF*eMmQT&width=80&height=80&type=sns", "avatar": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=Pk*HOFxSPCNGOHgyX8R-MGIyPCZzPk8uOmHuvkxYOHQT&width=80&height=80&type=sns",
"sence": 1, "sence": 1,
"catName": "哈哈哈", "catName": "哈哈哈",
"senceTips":["1说话说话说话说话说话说话说话说话说话说话说话","2说话说话说话说话说话说话说话说话说话说话说话说话","3说话说话说话说话说话说话说话说话说话说话说话说话"], "senceTips":["1说话说话说话说话说话说话说话说话说话说话说话","2说话说话说话说话说话说话说话说话说话说话说话说话","3说话说话说话说话说话说话说话说话说话说话说话说话"],
......
...@@ -47537,7 +47537,7 @@ var MainSceneBtnUi = (function (_super) { ...@@ -47537,7 +47537,7 @@ var MainSceneBtnUi = (function (_super) {
that.catAvatar = new FYGE.Sprite(); that.catAvatar = new FYGE.Sprite();
that.catInfoGroup.addChild(that.catAvatar); that.catInfoGroup.addChild(that.catAvatar);
var mask = new FYGE.Shape(); var mask = new FYGE.Shape();
mask.beginFill(6, 1); mask.beginFill(6, 0.2);
mask.drawCircle(0, 0, 24); mask.drawCircle(0, 0, 24);
mask.endFill(); mask.endFill();
mask.position.set(33, 33); mask.position.set(33, 33);
...@@ -47596,7 +47596,7 @@ var MainSceneBtnUi = (function (_super) { ...@@ -47596,7 +47596,7 @@ var MainSceneBtnUi = (function (_super) {
that.catAvatar.texture = FYGE.Texture.fromUrl(avatar); that.catAvatar.texture = FYGE.Texture.fromUrl(avatar);
that.catAvatar.width = 52; that.catAvatar.width = 52;
that.catAvatar.height = 52; that.catAvatar.height = 52;
that.catAvatar.x = that.catAvatar.y = 5; that.catAvatar.x = that.catAvatar.y = 6;
that.catNameLabel.text = catName; that.catNameLabel.text = catName;
that.catLevelLabel.text = "Lv." + level; that.catLevelLabel.text = "Lv." + level;
that.fishPointLabel.text = "" + happyCoin; that.fishPointLabel.text = "" + happyCoin;
This diff is collapsed.
...@@ -47539,7 +47539,7 @@ var MainSceneBtnUi = (function (_super) { ...@@ -47539,7 +47539,7 @@ var MainSceneBtnUi = (function (_super) {
that.catAvatar = new FYGE.Sprite(); that.catAvatar = new FYGE.Sprite();
that.catInfoGroup.addChild(that.catAvatar); that.catInfoGroup.addChild(that.catAvatar);
var mask = new FYGE.Shape(); var mask = new FYGE.Shape();
mask.beginFill(6, 1); mask.beginFill(6, 0.2);
mask.drawCircle(0, 0, 24); mask.drawCircle(0, 0, 24);
mask.endFill(); mask.endFill();
mask.position.set(33, 33); mask.position.set(33, 33);
...@@ -47598,7 +47598,7 @@ var MainSceneBtnUi = (function (_super) { ...@@ -47598,7 +47598,7 @@ var MainSceneBtnUi = (function (_super) {
that.catAvatar.texture = FYGE.Texture.fromUrl(avatar); that.catAvatar.texture = FYGE.Texture.fromUrl(avatar);
that.catAvatar.width = 52; that.catAvatar.width = 52;
that.catAvatar.height = 52; that.catAvatar.height = 52;
that.catAvatar.x = that.catAvatar.y = 5; that.catAvatar.x = that.catAvatar.y = 6;
that.catNameLabel.text = catName; that.catNameLabel.text = catName;
that.catLevelLabel.text = "Lv." + level; that.catLevelLabel.text = "Lv." + level;
that.fishPointLabel.text = "" + happyCoin; that.fishPointLabel.text = "" + happyCoin;
...@@ -114,7 +114,7 @@ export class MainSceneBtnUi extends Module { ...@@ -114,7 +114,7 @@ export class MainSceneBtnUi extends Module {
that.catAvatar = new FYGE.Sprite(); that.catAvatar = new FYGE.Sprite();
that.catInfoGroup.addChild(that.catAvatar); that.catInfoGroup.addChild(that.catAvatar);
var mask = new FYGE.Shape(); var mask = new FYGE.Shape();
mask.beginFill(6, 1); mask.beginFill(6, 0.2);
mask.drawCircle(0, 0, 24) mask.drawCircle(0, 0, 24)
mask.endFill(); mask.endFill();
mask.position.set(33, 33) mask.position.set(33, 33)
...@@ -186,7 +186,7 @@ export class MainSceneBtnUi extends Module { ...@@ -186,7 +186,7 @@ export class MainSceneBtnUi extends Module {
that.catAvatar.texture = FYGE.Texture.fromUrl(avatar); that.catAvatar.texture = FYGE.Texture.fromUrl(avatar);
that.catAvatar.width = 52; that.catAvatar.width = 52;
that.catAvatar.height = 52; that.catAvatar.height = 52;
that.catAvatar.x = that.catAvatar.y = 5 that.catAvatar.x = that.catAvatar.y = 6;
that.catNameLabel.text = catName; that.catNameLabel.text = catName;
that.catLevelLabel.text = "Lv." + level; that.catLevelLabel.text = "Lv." + level;
that.fishPointLabel.text = "" + happyCoin; that.fishPointLabel.text = "" + happyCoin;
......
...@@ -47539,7 +47539,7 @@ var MainSceneBtnUi = (function (_super) { ...@@ -47539,7 +47539,7 @@ var MainSceneBtnUi = (function (_super) {
that.catAvatar = new FYGE.Sprite(); that.catAvatar = new FYGE.Sprite();
that.catInfoGroup.addChild(that.catAvatar); that.catInfoGroup.addChild(that.catAvatar);
var mask = new FYGE.Shape(); var mask = new FYGE.Shape();
mask.beginFill(6, 1); mask.beginFill(6, 0.2);
mask.drawCircle(0, 0, 24); mask.drawCircle(0, 0, 24);
mask.endFill(); mask.endFill();
mask.position.set(33, 33); mask.position.set(33, 33);
...@@ -47598,7 +47598,7 @@ var MainSceneBtnUi = (function (_super) { ...@@ -47598,7 +47598,7 @@ var MainSceneBtnUi = (function (_super) {
that.catAvatar.texture = FYGE.Texture.fromUrl(avatar); that.catAvatar.texture = FYGE.Texture.fromUrl(avatar);
that.catAvatar.width = 52; that.catAvatar.width = 52;
that.catAvatar.height = 52; that.catAvatar.height = 52;
that.catAvatar.x = that.catAvatar.y = 5; that.catAvatar.x = that.catAvatar.y = 6;
that.catNameLabel.text = catName; that.catNameLabel.text = catName;
that.catLevelLabel.text = "Lv." + level; that.catLevelLabel.text = "Lv." + level;
that.fishPointLabel.text = "" + happyCoin; that.fishPointLabel.text = "" + happyCoin;
...@@ -95,7 +95,7 @@ Page({ ...@@ -95,7 +95,7 @@ Page({
console.log('on ready') console.log('on ready')
//授权和登录先搞 //授权和登录先搞
await this.getAuth(); // await this.getAuth();
// this.initCanvas(); // this.initCanvas();
my.__onMessage__ = (e) => { my.__onMessage__ = (e) => {
this.onMessage(e) this.onMessage(e)
...@@ -188,9 +188,6 @@ Page({ ...@@ -188,9 +188,6 @@ Page({
onCanvasReady(query) { onCanvasReady(query) {
console.log('onCanvasReady', query) console.log('onCanvasReady', query)
setInterval(()=>{
console.log("测试测试测试")
},2000)
//授权和登录先搞 //授权和登录先搞
checkSystem().then(r => { checkSystem().then(r => {
if (r) { if (r) {
...@@ -301,10 +298,9 @@ Page({ ...@@ -301,10 +298,9 @@ Page({
onShow() { onShow() {
// 页面显示 // 页面显示
if (this.main) { if (this.main) {
console.log("界面显示")
this.main.run(); this.main.run();
this.main.dispatchGlobalEvent("onShow"); this.main.dispatchGlobalEvent("onShow");
this.showPageLogin(); my.__updateUserInfo__();
} }
}, },
...@@ -313,7 +309,6 @@ Page({ ...@@ -313,7 +309,6 @@ Page({
if (this.main) { if (this.main) {
this.main.pause(); this.main.pause();
this.main.dispatchGlobalEvent("onHide"); this.main.dispatchGlobalEvent("onHide");
console.log("主页面隐藏")
} }
}, },
...@@ -381,27 +376,6 @@ Page({ ...@@ -381,27 +376,6 @@ Page({
this.initCanvas(); this.initCanvas();
} }
}, },
/**页面显示登录 */
async showPageLogin() {
const {
nickName,
avatar
} = app;
const {
success,
data,
} = await API.login({
userNick: nickName,
avatar
}).catch(res => {
commonToast(res && res.message);
}) || {};
if (success) {
app.openId = data.openId;
my.__updateUserInfo__();
}
},
/**刷新用户信息 */ /**刷新用户信息 */
updateUserInfo() { updateUserInfo() {
console.log("通知canvas刷新用户信息") console.log("通知canvas刷新用户信息")
...@@ -503,4 +477,4 @@ Page({ ...@@ -503,4 +477,4 @@ Page({
path path
} }
} }
}); });
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment