Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
new_taobao
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
new_taobao
Commits
7937ad81
Commit
7937ad81
authored
Sep 23, 2020
by
Edwise
🍷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1234
parent
199cae6d
Changes
32
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
1035 additions
and
722 deletions
+1035
-722
tmallCat.getUserInfo.json
...ect/src/canvas/game/mock/miniTb/tmallCat.getUserInfo.json
+2
-2
output.js
project/src/canvas/game/output.js
+101
-203
output.js.map
project/src/canvas/game/output.js.map
+1
-1
output.js
project/src/canvas/game/released/output.js
+101
-203
Ins.ts
project/src/canvas/game/src/Ins.ts
+7
-0
ResJson.ts
project/src/canvas/game/src/ResJson.ts
+1
-1
MainScene.ts
project/src/canvas/game/src/scenes/MainScene.ts
+4
-6
StartScene.ts
project/src/canvas/game/src/scenes/StartScene.ts
+41
-29
comgetcat.jsx
project/src/components/comgetcat/comgetcat.jsx
+25
-0
comgetcat.less
project/src/components/comgetcat/comgetcat.less
+52
-0
comrecallcat.jsx
project/src/components/comrecallcat/comrecallcat.jsx
+27
-0
comrecallcat.less
project/src/components/comrecallcat/comrecallcat.less
+73
-0
api.js
taobao_mini/client/api.js
+10
-0
comcatname.acss
taobao_mini/client/components/comcatname/comcatname.acss
+10
-7
comcatname.axml
taobao_mini/client/components/comcatname/comcatname.axml
+5
-5
comcatname.js
taobao_mini/client/components/comcatname/comcatname.js
+74
-11
comgetcat.acss
taobao_mini/client/components/comgetcat/comgetcat.acss
+52
-0
comgetcat.axml
taobao_mini/client/components/comgetcat/comgetcat.axml
+8
-0
comgetcat.js
taobao_mini/client/components/comgetcat/comgetcat.js
+26
-0
comgetcat.json
taobao_mini/client/components/comgetcat/comgetcat.json
+4
-0
commessage.axml
taobao_mini/client/components/commessage/commessage.axml
+1
-1
commessage.js
taobao_mini/client/components/commessage/commessage.js
+13
-2
comrecallcat.acss
taobao_mini/client/components/comrecallcat/comrecallcat.acss
+74
-0
comrecallcat.axml
taobao_mini/client/components/comrecallcat/comrecallcat.axml
+11
-0
comrecallcat.js
taobao_mini/client/components/comrecallcat/comrecallcat.js
+65
-0
comrecallcat.json
taobao_mini/client/components/comrecallcat/comrecallcat.json
+4
-0
comselectcat.js
taobao_mini/client/components/comselectcat/comselectcat.js
+41
-37
output.js
taobao_mini/client/pages/pagecanvas/output.js
+101
-204
pagecanvas.axml
taobao_mini/client/pages/pagecanvas/pagecanvas.axml
+5
-2
pagecanvas.js
taobao_mini/client/pages/pagecanvas/pagecanvas.js
+34
-7
pagecanvas.json
taobao_mini/client/pages/pagecanvas/pagecanvas.json
+3
-1
resList.js
taobao_mini/client/resconfig/resList.js
+59
-0
No files found.
project/src/canvas/game/mock/miniTb/tmallCat.getUserInfo.json
View file @
7937ad81
...
...
@@ -9,8 +9,8 @@
"experience"
:
50
,
"level"
:
"1"
,
"avatar"
:
"https://yun.duiba.com.cn/spark/assets/a3ae99684afa9a1f8d94f4c95ee6f1ed81de9996.png"
,
"sence"
:
3
,
"catName"
:
"
喵喵喵
"
,
"sence"
:
4
,
"catName"
:
"
哈哈哈
"
,
"senceTips"
:[
"1说话说话说话说话说话说话说话说话说话说话说话"
,
"2说话说话说话说话说话说话说话说话说话说话说话说话"
,
"3说话说话说话说话说话说话说话说话说话说话说话说话"
]
}
}
\ No newline at end of file
project/src/canvas/game/output.js
View file @
7937ad81
...
...
@@ -2004,9 +2004,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.CAT_ACTTYPEP = exports.CATTYPE = exports.MSG = exports.SCENETYPE = void 0;
var SCENETYPE;
(function (SCENETYPE) {
SCENETYPE[SCENETYPE["CLASSROOM"] =
0
] = "CLASSROOM";
SCENETYPE[SCENETYPE["PLAYGROUND"] =
1
] = "PLAYGROUND";
SCENETYPE[SCENETYPE["BEADROOM"] =
2
] = "BEADROOM";
SCENETYPE[SCENETYPE["CLASSROOM"] =
1
] = "CLASSROOM";
SCENETYPE[SCENETYPE["PLAYGROUND"] =
2
] = "PLAYGROUND";
SCENETYPE[SCENETYPE["BEADROOM"] =
3
] = "BEADROOM";
})(SCENETYPE = exports.SCENETYPE || (exports.SCENETYPE = {}));
var MSG;
(function (MSG) {
...
...
@@ -2048,9 +2048,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.Ins = void 0;
var RES_1 = __webpack_require__(/*! ../module/RES */ "./module/RES.ts");
var resCanvasList_1 = __webpack_require__(/*! ../resCanvasList */ "./resCanvasList.js");
var TaoBaoNet_1 = __webpack_require__(/*! ./TaoBaoNet */ "./src/TaoBaoNet.ts");
var Ins = (function () {
function Ins() {
}
Ins.showModule = function (name, data) {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.showModal, { name: name, data: data ? data : {} }, function (s, res) {
console.log('showModal ruleModal, success,res', s, res);
});
};
Ins.showToast = function (msg) {
FYGE.GDispatcher.dispatchEvent("toast", msg);
};
Ins.showLoading = function () {
FYGE.GDispatcher.dispatchEvent("loading");
};
Ins.hideLoading = function () {
FYGE.GDispatcher.dispatchEvent("hideloading");
};
Ins.stopLottieAnim = function (lottie) {
FYGE.Tween.removeTweens(lottie);
lottie.children.forEach(function (s) {
...
...
@@ -2286,6 +2301,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
Object.defineProperty(exports, "__esModule", { value: true });
exports.destroyNetData = exports.getTbData = exports.sendTbNet = exports.TbNetName = void 0;
var ctrls_1 = __webpack_require__(/*! ../module/ctrls */ "./module/ctrls/index.ts");
var Ins_1 = __webpack_require__(/*! ./Ins */ "./src/Ins.ts");
var Main_1 = __webpack_require__(/*! ./Main */ "./src/Main.ts");
var TbNetName;
(function (TbNetName) {
...
...
@@ -2320,7 +2336,7 @@ var TbNetName;
var dataRecord = {};
var fc;
function sendTbNet(netName, parameter, callback, hideMsg) {
if (hideMsg === void 0) { hideMsg =
fals
e; }
if (hideMsg === void 0) { hideMsg =
tru
e; }
return new Promise(function (resolve, reject) {
var waitObj;
if (!my) {
...
...
@@ -2347,7 +2363,7 @@ function sendTbNet(netName, parameter, callback, hideMsg) {
var d = e.data;
dataRecord[netName] = d;
if (!hideMsg && !d.success)
ctrls_1
.showToast(d.message || "网络超时");
Ins_1.Ins
.showToast(d.message || "网络超时");
callback && callback(d.success, d);
resolve(d);
console.log("\n%c[ request ]\n"
...
...
@@ -2475,22 +2491,26 @@ var xianluoshuohua_1 = __webpack_require__(/*! ../lottieSrc/lottieTs/xianluoCat/
var Enum_1 = __webpack_require__(/*! ../Enum */ "./src/Enum.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts");
var ctrls_1 = __webpack_require__(/*! ../../module/ctrls */ "./module/ctrls/index.ts");
var Cat = (function (_super) {
__extends(Cat, _super);
function Cat(data) {
var _this = _super.call(this, data) || this;
_this.catAnimArr = [];
_this.actRunning = false;
_this.dialogPos = [{ x: 1, y: 1 }];
_this.catType = data.type;
return _this;
}
Cat.prototype.initUi = function () {
var _this = this;
this.initCatLottieArr();
console.log(this.catLottieArr);
this.initCat();
this.initDialog();
this.setCatAnimShow(0);
var tipsArr = Ins_1.Ins.userInfo.senceTips;
var index = Math.floor(Math.random() * tipsArr.length);
this.showDialog(1, tipsArr[index]);
this.setCatAnimShow(1, function () { _this.stopCatAct(); });
this.initEvents();
};
Cat.prototype.initCatLottieArr = function () {
...
...
@@ -2552,22 +2572,31 @@ var Cat = (function (_super) {
};
Cat.prototype.initDialog = function () {
var that = this;
that.dialogPos = [{}, { x: 280, y: 516 }, { x: 320, y: 400 }, { x: 280, y: 556 }, { x: 280, y: 536 }, { x: 370, y: 536 }];
that.dialog = Ins_1.Ins.initSprite("624e8c63-963f-4b20-9802-b0fb006fbf93");
that.dialog.position.set(280, 526);
that.addChild(that.dialog);
that.dialogText = Ins_1.Ins.initLabel({ size: 24, x: 30, y: 20 });
that.dialogText.textWidth = 280;
that.dialog.addChild(that.dialogText);
that.dialogText.text = "哈哈哈哈哈哈哈哈哈哈哈\n哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈";
that.dialogText.textHeight = 138;
that.dialogText.verticalAlign = FYGE.VERTICAL_ALIGN.MIDDLE;
console.log("最大长度为" + that.dialogText.text.length);
that.dialog.visible = false;
console.log("当前文本高度为" + that.dialogText.textHeight);
that.dialog.alpha = 0;
};
Cat.prototype.showDialog = function (msg) {
this.dialogText.text = msg;
this.dialog.visible = true;
Cat.prototype.showDialog = function (type, msg) {
var that = this;
msg = msg.length >= 11 ? msg.substring(0, 11) + '\n' + msg.substring(11) : msg;
that.dialog.position.set(that.dialogPos[type].x, that.dialogPos[type].y);
that.dialogText.text = msg;
FYGE.Tween.removeTweens(that.dialog);
that.dialog.alpha = 0;
FYGE.Tween.get(that.dialog).to({ alpha: 1 }, 400);
};
Cat.prototype.hideDialog = function () {
this.dialog.visible = false;
this.dialog.alpha = 0;
FYGE.Tween.removeTweens(this.dialog);
};
Cat.prototype.setCatAnimShow = function (index, callback) {
if (index == 0 || index == 1) {
...
...
@@ -2588,13 +2617,33 @@ var Cat = (function (_super) {
}
}
};
Cat.prototype.stopCatAct = function () {
var that = this;
that.hideDialog();
that.setCatAnimShow(0, null);
};
Cat.prototype.catAct = function (e) {
if (this.actRunning)
return;
var that = this;
var actType = e.data;
var type;
switch (actType) {
case 2:
type = 2;
break;
case 3:
type = 1;
break;
case 4:
type = 4;
break;
case 5:
type = 3;
break;
}
console.log(actType);
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.interaction, {}, function (s, r) {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.interaction, {
type: type, scene: Ins_1.Ins.curScene
}, function (s, r) {
if (s) {
FYGE.GDispatcher.dispatchEvent(Enum_1.MSG.UPDATE_USERINFO);
that.actRunning = true;
...
...
@@ -2602,15 +2651,15 @@ var Cat = (function (_super) {
case Enum_1.CAT_ACTTYPEP.SLEEP:
break;
default:
that.showDialog(actType, r.data.tips);
that.setCatAnimShow(actType, function () {
that.hideDialog();
that.setCatAnimShow(0, null);
that.stopCatAct();
});
break;
}
}
else {
ctrls_1
.showToast(r.message);
Ins_1.Ins
.showToast(r.message);
}
});
};
...
...
@@ -46531,176 +46580,6 @@ var RulePanel = (function (_super) {
exports.RulePanel = RulePanel;
/***/ }),
/***/ "./src/panels/selectcatpanel/SelectCatGroup.ts":
/*!*****************************************************!*\
!*** ./src/panels/selectcatpanel/SelectCatGroup.ts ***!
\*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.SelectCatGroup = void 0;
var Module_1 = __webpack_require__(/*! ../../../module/views/Module */ "./module/views/Module.ts");
var Enum_1 = __webpack_require__(/*! ../../Enum */ "./src/Enum.ts");
var Ins_1 = __webpack_require__(/*! ../../Ins */ "./src/Ins.ts");
var SelectCatGroup = (function (_super) {
__extends(SelectCatGroup, _super);
function SelectCatGroup(data) {
var _this = _super.call(this, data) || this;
_this.type = data.type;
_this.imgUUid = data.uuid;
_this.nameText = data.name;
return _this;
}
SelectCatGroup.prototype.initUi = function () {
var that = this;
that.mouseEnable = true;
that.mouseChildren = true;
var bg = Ins_1.Ins.initSprite("8850353b-0a98-4335-9d46-a36678f44be0");
that.addChild(bg);
var catImg = Ins_1.Ins.initSprite(that.imgUUid, 67, 36);
that.addChild(catImg);
var nameLabel = Ins_1.Ins.initLabel({ size: 24, x: 32, y: 207, text: that.nameText ? that.nameText : "田园橘猫" });
nameLabel.textWidth = 232;
nameLabel.textAlign = FYGE.TEXT_ALIGN.CENTER;
that.addChild(nameLabel);
that.isSelectImg = Ins_1.Ins.initSprite("f956cda2-5eef-4942-8737-742d171527bd", 224, 172);
that.addChild(that.isSelectImg);
if (that.type == 0) {
that.isSelectImg.visible = true;
}
else {
that.isSelectImg.visible = false;
}
that.initEvents();
};
SelectCatGroup.prototype.initEvents = function () {
this.addEventListener(FYGE.MouseEvent.CLICK, this.selected, this);
FYGE.GDispatcher.addEventListener(Enum_1.MSG.SELECT_CAT, this.changeState, this);
};
SelectCatGroup.prototype.removeEvents = function () {
this.removeEventListener(FYGE.MouseEvent.CLICK, this.selected, this);
FYGE.GDispatcher.removeEventListener(Enum_1.MSG.SELECT_CAT, this.changeState, this);
};
SelectCatGroup.prototype.changeState = function (e) {
if (e.data == this.type) {
this.isSelectImg.visible = true;
}
else {
this.isSelectImg.visible = false;
}
};
SelectCatGroup.prototype.selected = function () {
var that = this;
that.isSelectImg.visible = !that.isSelectImg.visible;
FYGE.GDispatcher.dispatchEvent(Enum_1.MSG.SELECT_CAT, that.type);
};
return SelectCatGroup;
}(Module_1.Module));
exports.SelectCatGroup = SelectCatGroup;
/***/ }),
/***/ "./src/panels/selectcatpanel/SelectCatPanel.ts":
/*!*****************************************************!*\
!*** ./src/panels/selectcatpanel/SelectCatPanel.ts ***!
\*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.SelectCatPanel = void 0;
var ctrls_1 = __webpack_require__(/*! ../../../module/ctrls */ "./module/ctrls/index.ts");
var Panel_1 = __webpack_require__(/*! ../../../module/views/Panel */ "./module/views/Panel.ts");
var Enum_1 = __webpack_require__(/*! ../../Enum */ "./src/Enum.ts");
var Ins_1 = __webpack_require__(/*! ../../Ins */ "./src/Ins.ts");
var MainScene_1 = __webpack_require__(/*! ../../scenes/MainScene */ "./src/scenes/MainScene.ts");
var SelectCatGroup_1 = __webpack_require__(/*! ./SelectCatGroup */ "./src/panels/selectcatpanel/SelectCatGroup.ts");
var SelectCatPanel = (function (_super) {
__extends(SelectCatPanel, _super);
function SelectCatPanel() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.curSelectType = 0;
return _this;
}
SelectCatPanel.prototype.initUi = function () {
var that = this;
var bg = Ins_1.Ins.initSprite("db53267d-4141-4d3e-afda-9b523c89be3e");
that.addChild(bg);
that.x = (Ins_1.Ins.stageW - bg.width) >> 1;
that.y = (Ins_1.Ins.stageH - bg.height) >> 1;
that.selectSureBtn = Ins_1.Ins.initSprite("628fc38b-7dc0-4c69-aac1-279d60c8f1ed", 185, 804);
that.addChild(that.selectSureBtn);
that.initSelectCatGroup();
};
SelectCatPanel.prototype.initSelectCatGroup = function () {
var catData = [
{ img: "e28e5250-c740-4e4f-a855-c415c557e77e", name: "11111" },
{ img: "193f6955-d754-4b9f-80ca-b9b9a72e8a8b", name: "22222" },
{ img: "fe52ffae-fadd-40f3-97b5-d3d56fd04781", name: "33333" },
{ img: "95a6b0a9-3e7a-4a0b-82b6-6742e2a8bddf", name: "44444" }
];
for (var i = 0; i < 4; i++) {
var selectCatGroup = new SelectCatGroup_1.SelectCatGroup({ type: i, uuid: catData[i].img, name: catData[i].name });
selectCatGroup.x = 43 + i % 2 * 334;
selectCatGroup.y = 197 + Math.floor(i / 2) * 304;
this.addChild(selectCatGroup);
}
};
SelectCatPanel.prototype.catSelect = function (e) {
this.curSelectType = e.data;
console.log("选择了", e.data);
};
SelectCatPanel.prototype.selectSure = function () {
ctrls_1.closeCurrentPanel();
ctrls_1.changeScene(MainScene_1.MainScene);
};
SelectCatPanel.prototype.initEvents = function () {
FYGE.GDispatcher.addEventListener(Enum_1.MSG.SELECT_CAT, this.catSelect, this);
this.selectSureBtn.addEventListener(FYGE.MouseEvent.CLICK, this.selectSure, this);
};
SelectCatPanel.prototype.removeEvents = function () {
FYGE.GDispatcher.removeEventListener(Enum_1.MSG.SELECT_CAT, this.catSelect, this);
this.selectSureBtn.removeEventListener(FYGE.MouseEvent.CLICK, this.selectSure, this);
};
return SelectCatPanel;
}(Panel_1.Panel));
exports.SelectCatPanel = SelectCatPanel;
/***/ }),
/***/ "./src/scenes/LoadingScene.ts":
...
...
@@ -46856,8 +46735,9 @@ var MainScene = (function (_super) {
that.y = (Ins_1.Ins.stageH - 1624) >> 1;
console.log(that.y);
that.mouseChildren = true;
Ins_1.Ins.curScene = Ins_1.Ins.userInfo.sence;
that.bgUUID = ["c6d699b0-b276-4985-b3ea-47bcef13f2ea", "efaf990e-5392-49ad-94d8-25c04f651ede", "b3c8c187-e5c9-4968-9a00-a118d18ab2fc"];
that.sceneBg = Ins_1.Ins.initSprite(
"b3c8c187-e5c9-4968-9a00-a118d18ab2fc"
);
that.sceneBg = Ins_1.Ins.initSprite(
that.bgUUID[Ins_1.Ins.curScene == 4 ? 2 : Ins_1.Ins.curScene - 1]
);
that.addChild(that.sceneBg);
that.tlBtn = Ins_1.Ins.initSprite("1f8b040d-2fbc-4ff8-92f9-159773364fae", 0, 640);
that.tlBtn.alpha = 0.1;
...
...
@@ -46869,7 +46749,15 @@ var MainScene = (function (_super) {
that.mxqBtn.alpha = 0.1;
that.mxqBtn.mouseEnable = true;
that.addChild(that.mxqBtn);
that.mainUi = new mainSceneBtnUi_1.MainSceneBtnUi({ uiType: Enum_1.SCENETYPE.BEADROOM });
if (Ins_1.Ins.curScene == Enum_1.SCENETYPE.BEADROOM || Ins_1.Ins.curScene == 4) {
that.tlBtn.visible = true;
that.mxqBtn.visible = true;
}
else {
that.tlBtn.visible = false;
that.mxqBtn.visible = false;
}
that.mainUi = new mainSceneBtnUi_1.MainSceneBtnUi({ uiType: Ins_1.Ins.curScene == 4 ? 3 : Ins_1.Ins.curScene });
that.addChild(that.mainUi);
that.initCat();
that.initEnergy();
...
...
@@ -46888,9 +46776,7 @@ var MainScene = (function (_super) {
MainScene.prototype.openLetter = function () {
console.log("打开信封弹窗");
if (this.letter && this.letter.visible) {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.showModal, { name: 'messageModal', data: { catName: Ins_1.Ins.userInfo.catName } }, function (s, res) {
console.log('showModal ruleModal, success,res', s, res);
});
Ins_1.Ins.showModule('messageModal', { catName: Ins_1.Ins.userInfo.catName });
}
};
MainScene.prototype.removeLetter = function () {
...
...
@@ -46939,17 +46825,18 @@ var MainScene = (function (_super) {
MainScene.prototype.changeMainScene = function (type) {
console.log("切换到" + type);
var that = this;
that.sceneBg.texture = RES_1.RES.getRes(resCanvasList_1.default[that.bgUUID[type]].url);
Ins_1.Ins.curScene = type;
that.sceneBg.texture = RES_1.RES.getRes(resCanvasList_1.default[that.bgUUID[type - 1]].url);
if (Ins_1.Ins.catIsOut) {
that.cat.visible = false;
}
else {
if ((type
+ 1
) == Ins_1.Ins.userInfo.sence) {
if ((type) == Ins_1.Ins.userInfo.sence) {
that.cat.visible = true;
}
else {
that.cat.visible = false;
that.cat.s
etCatAnimShow(0
);
that.cat.s
topCatAct(
);
}
}
switch (type) {
...
...
@@ -47040,7 +46927,6 @@ var Scene_1 = __webpack_require__(/*! ../../module/views/Scene */ "./module/view
var MainScene_1 = __webpack_require__(/*! ./MainScene */ "./src/scenes/MainScene.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var ctrls_1 = __webpack_require__(/*! ../../module/ctrls */ "./module/ctrls/index.ts");
var SelectCatPanel_1 = __webpack_require__(/*! ../panels/selectcatpanel/SelectCatPanel */ "./src/panels/selectcatpanel/SelectCatPanel.ts");
var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts");
var StartScene = (function (_super) {
__extends(StartScene, _super);
...
...
@@ -47057,7 +46943,7 @@ var StartScene = (function (_super) {
if (s) {
if (r.data) {
Ins_1.Ins.userInfo = r.data;
if (r.data.
happyCoin > 2000
) {
if (r.data.
sence == 4
) {
Ins_1.Ins.catIsOut = true;
}
else {
...
...
@@ -47066,15 +46952,27 @@ var StartScene = (function (_super) {
ctrls_1.changeScene(MainScene_1.MainScene);
}
else {
ctrls_1.showPanel(SelectCatPanel_1.SelectCatPanel
);
Ins_1.Ins.showModule("selectcatModal"
);
}
}
else {
ctrls_1
.showToast(r.message);
Ins_1.Ins
.showToast(r.message);
}
});
};
StartScene.prototype.start = function () {
StartScene.prototype.getCat = function (r) {
console.log("选择完猫咪", r);
Ins_1.Ins.userInfo = r.data;
if (r.data.sence == 4) {
Ins_1.Ins.catIsOut = true;
}
else {
Ins_1.Ins.catIsOut = false;
}
ctrls_1.changeScene(MainScene_1.MainScene);
};
StartScene.prototype.initEvents = function () {
FYGE.GDispatcher.addEventListener("selectEnd", this.getCat, this);
};
return StartScene;
}(Scene_1.Scene));
...
...
@@ -47240,20 +47138,20 @@ var MainSceneBtnUi = (function (_super) {
if (Ins_1.Ins.catIsOut) {
that.catRecall.visible = true;
}
else {
else
if (Ins_1.Ins.userInfo.sence == type)
{
that.combingBtn.visible = true;
that.catBtn.visible = true;
}
break;
case Enum_1.SCENETYPE.CLASSROOM:
that.returnBtn.visible = true;
if (!Ins_1.Ins.catIsOut) {
if (!Ins_1.Ins.catIsOut
&& Ins_1.Ins.userInfo.sence == type
) {
that.touchHeadBtn.visible = true;
}
break;
case Enum_1.SCENETYPE.PLAYGROUND:
that.returnBtn.visible = true;
if (!Ins_1.Ins.catIsOut) {
if (!Ins_1.Ins.catIsOut
&& Ins_1.Ins.userInfo.sence == type
) {
that.playBtn.visible = true;
}
break;
project/src/canvas/game/output.js.map
View file @
7937ad81
This source diff could not be displayed because it is too large. You can
view the blob
instead.
project/src/canvas/game/released/output.js
View file @
7937ad81
...
...
@@ -2006,9 +2006,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.CAT_ACTTYPEP = exports.CATTYPE = exports.MSG = exports.SCENETYPE = void 0;
var SCENETYPE;
(function (SCENETYPE) {
SCENETYPE[SCENETYPE["CLASSROOM"] =
0
] = "CLASSROOM";
SCENETYPE[SCENETYPE["PLAYGROUND"] =
1
] = "PLAYGROUND";
SCENETYPE[SCENETYPE["BEADROOM"] =
2
] = "BEADROOM";
SCENETYPE[SCENETYPE["CLASSROOM"] =
1
] = "CLASSROOM";
SCENETYPE[SCENETYPE["PLAYGROUND"] =
2
] = "PLAYGROUND";
SCENETYPE[SCENETYPE["BEADROOM"] =
3
] = "BEADROOM";
})(SCENETYPE = exports.SCENETYPE || (exports.SCENETYPE = {}));
var MSG;
(function (MSG) {
...
...
@@ -2050,9 +2050,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.Ins = void 0;
var RES_1 = __webpack_require__(/*! ../module/RES */ "./module/RES.ts");
var resCanvasList_1 = __webpack_require__(/*! ../resCanvasList */ "./resCanvasList.js");
var TaoBaoNet_1 = __webpack_require__(/*! ./TaoBaoNet */ "./src/TaoBaoNet.ts");
var Ins = (function () {
function Ins() {
}
Ins.showModule = function (name, data) {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.showModal, { name: name, data: data ? data : {} }, function (s, res) {
console.log('showModal ruleModal, success,res', s, res);
});
};
Ins.showToast = function (msg) {
FYGE.GDispatcher.dispatchEvent("toast", msg);
};
Ins.showLoading = function () {
FYGE.GDispatcher.dispatchEvent("loading");
};
Ins.hideLoading = function () {
FYGE.GDispatcher.dispatchEvent("hideloading");
};
Ins.stopLottieAnim = function (lottie) {
FYGE.Tween.removeTweens(lottie);
lottie.children.forEach(function (s) {
...
...
@@ -2288,6 +2303,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
Object.defineProperty(exports, "__esModule", { value: true });
exports.destroyNetData = exports.getTbData = exports.sendTbNet = exports.TbNetName = void 0;
var ctrls_1 = __webpack_require__(/*! ../module/ctrls */ "./module/ctrls/index.ts");
var Ins_1 = __webpack_require__(/*! ./Ins */ "./src/Ins.ts");
var Main_1 = __webpack_require__(/*! ./Main */ "./src/Main.ts");
var TbNetName;
(function (TbNetName) {
...
...
@@ -2322,7 +2338,7 @@ var TbNetName;
var dataRecord = {};
var fc;
function sendTbNet(netName, parameter, callback, hideMsg) {
if (hideMsg === void 0) { hideMsg =
fals
e; }
if (hideMsg === void 0) { hideMsg =
tru
e; }
return new Promise(function (resolve, reject) {
var waitObj;
if (!my) {
...
...
@@ -2349,7 +2365,7 @@ function sendTbNet(netName, parameter, callback, hideMsg) {
var d = e.data;
dataRecord[netName] = d;
if (!hideMsg && !d.success)
ctrls_1
.showToast(d.message || "网络超时");
Ins_1.Ins
.showToast(d.message || "网络超时");
callback && callback(d.success, d);
resolve(d);
console.log("\n%c[ request ]\n"
...
...
@@ -2477,22 +2493,26 @@ var xianluoshuohua_1 = __webpack_require__(/*! ../lottieSrc/lottieTs/xianluoCat/
var Enum_1 = __webpack_require__(/*! ../Enum */ "./src/Enum.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts");
var ctrls_1 = __webpack_require__(/*! ../../module/ctrls */ "./module/ctrls/index.ts");
var Cat = (function (_super) {
__extends(Cat, _super);
function Cat(data) {
var _this = _super.call(this, data) || this;
_this.catAnimArr = [];
_this.actRunning = false;
_this.dialogPos = [{ x: 1, y: 1 }];
_this.catType = data.type;
return _this;
}
Cat.prototype.initUi = function () {
var _this = this;
this.initCatLottieArr();
console.log(this.catLottieArr);
this.initCat();
this.initDialog();
this.setCatAnimShow(0);
var tipsArr = Ins_1.Ins.userInfo.senceTips;
var index = Math.floor(Math.random() * tipsArr.length);
this.showDialog(1, tipsArr[index]);
this.setCatAnimShow(1, function () { _this.stopCatAct(); });
this.initEvents();
};
Cat.prototype.initCatLottieArr = function () {
...
...
@@ -2554,22 +2574,31 @@ var Cat = (function (_super) {
};
Cat.prototype.initDialog = function () {
var that = this;
that.dialogPos = [{}, { x: 280, y: 516 }, { x: 320, y: 400 }, { x: 280, y: 556 }, { x: 280, y: 536 }, { x: 370, y: 536 }];
that.dialog = Ins_1.Ins.initSprite("624e8c63-963f-4b20-9802-b0fb006fbf93");
that.dialog.position.set(280, 526);
that.addChild(that.dialog);
that.dialogText = Ins_1.Ins.initLabel({ size: 24, x: 30, y: 20 });
that.dialogText.textWidth = 280;
that.dialog.addChild(that.dialogText);
that.dialogText.text = "哈哈哈哈哈哈哈哈哈哈哈\n哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈";
that.dialogText.textHeight = 138;
that.dialogText.verticalAlign = FYGE.VERTICAL_ALIGN.MIDDLE;
console.log("最大长度为" + that.dialogText.text.length);
that.dialog.visible = false;
console.log("当前文本高度为" + that.dialogText.textHeight);
that.dialog.alpha = 0;
};
Cat.prototype.showDialog = function (msg) {
this.dialogText.text = msg;
this.dialog.visible = true;
Cat.prototype.showDialog = function (type, msg) {
var that = this;
msg = msg.length >= 11 ? msg.substring(0, 11) + '\n' + msg.substring(11) : msg;
that.dialog.position.set(that.dialogPos[type].x, that.dialogPos[type].y);
that.dialogText.text = msg;
FYGE.Tween.removeTweens(that.dialog);
that.dialog.alpha = 0;
FYGE.Tween.get(that.dialog).to({ alpha: 1 }, 400);
};
Cat.prototype.hideDialog = function () {
this.dialog.visible = false;
this.dialog.alpha = 0;
FYGE.Tween.removeTweens(this.dialog);
};
Cat.prototype.setCatAnimShow = function (index, callback) {
if (index == 0 || index == 1) {
...
...
@@ -2590,13 +2619,33 @@ var Cat = (function (_super) {
}
}
};
Cat.prototype.stopCatAct = function () {
var that = this;
that.hideDialog();
that.setCatAnimShow(0, null);
};
Cat.prototype.catAct = function (e) {
if (this.actRunning)
return;
var that = this;
var actType = e.data;
var type;
switch (actType) {
case 2:
type = 2;
break;
case 3:
type = 1;
break;
case 4:
type = 4;
break;
case 5:
type = 3;
break;
}
console.log(actType);
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.interaction, {}, function (s, r) {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.interaction, {
type: type, scene: Ins_1.Ins.curScene
}, function (s, r) {
if (s) {
FYGE.GDispatcher.dispatchEvent(Enum_1.MSG.UPDATE_USERINFO);
that.actRunning = true;
...
...
@@ -2604,15 +2653,15 @@ var Cat = (function (_super) {
case Enum_1.CAT_ACTTYPEP.SLEEP:
break;
default:
that.showDialog(actType, r.data.tips);
that.setCatAnimShow(actType, function () {
that.hideDialog();
that.setCatAnimShow(0, null);
that.stopCatAct();
});
break;
}
}
else {
ctrls_1
.showToast(r.message);
Ins_1.Ins
.showToast(r.message);
}
});
};
...
...
@@ -46533,176 +46582,6 @@ var RulePanel = (function (_super) {
exports.RulePanel = RulePanel;
/***/ }),
/***/ "./src/panels/selectcatpanel/SelectCatGroup.ts":
/*!*****************************************************!*\
!*** ./src/panels/selectcatpanel/SelectCatGroup.ts ***!
\*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.SelectCatGroup = void 0;
var Module_1 = __webpack_require__(/*! ../../../module/views/Module */ "./module/views/Module.ts");
var Enum_1 = __webpack_require__(/*! ../../Enum */ "./src/Enum.ts");
var Ins_1 = __webpack_require__(/*! ../../Ins */ "./src/Ins.ts");
var SelectCatGroup = (function (_super) {
__extends(SelectCatGroup, _super);
function SelectCatGroup(data) {
var _this = _super.call(this, data) || this;
_this.type = data.type;
_this.imgUUid = data.uuid;
_this.nameText = data.name;
return _this;
}
SelectCatGroup.prototype.initUi = function () {
var that = this;
that.mouseEnable = true;
that.mouseChildren = true;
var bg = Ins_1.Ins.initSprite("8850353b-0a98-4335-9d46-a36678f44be0");
that.addChild(bg);
var catImg = Ins_1.Ins.initSprite(that.imgUUid, 67, 36);
that.addChild(catImg);
var nameLabel = Ins_1.Ins.initLabel({ size: 24, x: 32, y: 207, text: that.nameText ? that.nameText : "田园橘猫" });
nameLabel.textWidth = 232;
nameLabel.textAlign = FYGE.TEXT_ALIGN.CENTER;
that.addChild(nameLabel);
that.isSelectImg = Ins_1.Ins.initSprite("f956cda2-5eef-4942-8737-742d171527bd", 224, 172);
that.addChild(that.isSelectImg);
if (that.type == 0) {
that.isSelectImg.visible = true;
}
else {
that.isSelectImg.visible = false;
}
that.initEvents();
};
SelectCatGroup.prototype.initEvents = function () {
this.addEventListener(FYGE.MouseEvent.CLICK, this.selected, this);
FYGE.GDispatcher.addEventListener(Enum_1.MSG.SELECT_CAT, this.changeState, this);
};
SelectCatGroup.prototype.removeEvents = function () {
this.removeEventListener(FYGE.MouseEvent.CLICK, this.selected, this);
FYGE.GDispatcher.removeEventListener(Enum_1.MSG.SELECT_CAT, this.changeState, this);
};
SelectCatGroup.prototype.changeState = function (e) {
if (e.data == this.type) {
this.isSelectImg.visible = true;
}
else {
this.isSelectImg.visible = false;
}
};
SelectCatGroup.prototype.selected = function () {
var that = this;
that.isSelectImg.visible = !that.isSelectImg.visible;
FYGE.GDispatcher.dispatchEvent(Enum_1.MSG.SELECT_CAT, that.type);
};
return SelectCatGroup;
}(Module_1.Module));
exports.SelectCatGroup = SelectCatGroup;
/***/ }),
/***/ "./src/panels/selectcatpanel/SelectCatPanel.ts":
/*!*****************************************************!*\
!*** ./src/panels/selectcatpanel/SelectCatPanel.ts ***!
\*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.SelectCatPanel = void 0;
var ctrls_1 = __webpack_require__(/*! ../../../module/ctrls */ "./module/ctrls/index.ts");
var Panel_1 = __webpack_require__(/*! ../../../module/views/Panel */ "./module/views/Panel.ts");
var Enum_1 = __webpack_require__(/*! ../../Enum */ "./src/Enum.ts");
var Ins_1 = __webpack_require__(/*! ../../Ins */ "./src/Ins.ts");
var MainScene_1 = __webpack_require__(/*! ../../scenes/MainScene */ "./src/scenes/MainScene.ts");
var SelectCatGroup_1 = __webpack_require__(/*! ./SelectCatGroup */ "./src/panels/selectcatpanel/SelectCatGroup.ts");
var SelectCatPanel = (function (_super) {
__extends(SelectCatPanel, _super);
function SelectCatPanel() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.curSelectType = 0;
return _this;
}
SelectCatPanel.prototype.initUi = function () {
var that = this;
var bg = Ins_1.Ins.initSprite("db53267d-4141-4d3e-afda-9b523c89be3e");
that.addChild(bg);
that.x = (Ins_1.Ins.stageW - bg.width) >> 1;
that.y = (Ins_1.Ins.stageH - bg.height) >> 1;
that.selectSureBtn = Ins_1.Ins.initSprite("628fc38b-7dc0-4c69-aac1-279d60c8f1ed", 185, 804);
that.addChild(that.selectSureBtn);
that.initSelectCatGroup();
};
SelectCatPanel.prototype.initSelectCatGroup = function () {
var catData = [
{ img: "e28e5250-c740-4e4f-a855-c415c557e77e", name: "11111" },
{ img: "193f6955-d754-4b9f-80ca-b9b9a72e8a8b", name: "22222" },
{ img: "fe52ffae-fadd-40f3-97b5-d3d56fd04781", name: "33333" },
{ img: "95a6b0a9-3e7a-4a0b-82b6-6742e2a8bddf", name: "44444" }
];
for (var i = 0; i < 4; i++) {
var selectCatGroup = new SelectCatGroup_1.SelectCatGroup({ type: i, uuid: catData[i].img, name: catData[i].name });
selectCatGroup.x = 43 + i % 2 * 334;
selectCatGroup.y = 197 + Math.floor(i / 2) * 304;
this.addChild(selectCatGroup);
}
};
SelectCatPanel.prototype.catSelect = function (e) {
this.curSelectType = e.data;
console.log("选择了", e.data);
};
SelectCatPanel.prototype.selectSure = function () {
ctrls_1.closeCurrentPanel();
ctrls_1.changeScene(MainScene_1.MainScene);
};
SelectCatPanel.prototype.initEvents = function () {
FYGE.GDispatcher.addEventListener(Enum_1.MSG.SELECT_CAT, this.catSelect, this);
this.selectSureBtn.addEventListener(FYGE.MouseEvent.CLICK, this.selectSure, this);
};
SelectCatPanel.prototype.removeEvents = function () {
FYGE.GDispatcher.removeEventListener(Enum_1.MSG.SELECT_CAT, this.catSelect, this);
this.selectSureBtn.removeEventListener(FYGE.MouseEvent.CLICK, this.selectSure, this);
};
return SelectCatPanel;
}(Panel_1.Panel));
exports.SelectCatPanel = SelectCatPanel;
/***/ }),
/***/ "./src/scenes/LoadingScene.ts":
...
...
@@ -46858,8 +46737,9 @@ var MainScene = (function (_super) {
that.y = (Ins_1.Ins.stageH - 1624) >> 1;
console.log(that.y);
that.mouseChildren = true;
Ins_1.Ins.curScene = Ins_1.Ins.userInfo.sence;
that.bgUUID = ["c6d699b0-b276-4985-b3ea-47bcef13f2ea", "efaf990e-5392-49ad-94d8-25c04f651ede", "b3c8c187-e5c9-4968-9a00-a118d18ab2fc"];
that.sceneBg = Ins_1.Ins.initSprite(
"b3c8c187-e5c9-4968-9a00-a118d18ab2fc"
);
that.sceneBg = Ins_1.Ins.initSprite(
that.bgUUID[Ins_1.Ins.curScene == 4 ? 2 : Ins_1.Ins.curScene - 1]
);
that.addChild(that.sceneBg);
that.tlBtn = Ins_1.Ins.initSprite("1f8b040d-2fbc-4ff8-92f9-159773364fae", 0, 640);
that.tlBtn.alpha = 0.1;
...
...
@@ -46871,7 +46751,15 @@ var MainScene = (function (_super) {
that.mxqBtn.alpha = 0.1;
that.mxqBtn.mouseEnable = true;
that.addChild(that.mxqBtn);
that.mainUi = new mainSceneBtnUi_1.MainSceneBtnUi({ uiType: Enum_1.SCENETYPE.BEADROOM });
if (Ins_1.Ins.curScene == Enum_1.SCENETYPE.BEADROOM || Ins_1.Ins.curScene == 4) {
that.tlBtn.visible = true;
that.mxqBtn.visible = true;
}
else {
that.tlBtn.visible = false;
that.mxqBtn.visible = false;
}
that.mainUi = new mainSceneBtnUi_1.MainSceneBtnUi({ uiType: Ins_1.Ins.curScene == 4 ? 3 : Ins_1.Ins.curScene });
that.addChild(that.mainUi);
that.initCat();
that.initEnergy();
...
...
@@ -46890,9 +46778,7 @@ var MainScene = (function (_super) {
MainScene.prototype.openLetter = function () {
console.log("打开信封弹窗");
if (this.letter && this.letter.visible) {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.showModal, { name: 'messageModal', data: { catName: Ins_1.Ins.userInfo.catName } }, function (s, res) {
console.log('showModal ruleModal, success,res', s, res);
});
Ins_1.Ins.showModule('messageModal', { catName: Ins_1.Ins.userInfo.catName });
}
};
MainScene.prototype.removeLetter = function () {
...
...
@@ -46941,17 +46827,18 @@ var MainScene = (function (_super) {
MainScene.prototype.changeMainScene = function (type) {
console.log("切换到" + type);
var that = this;
that.sceneBg.texture = RES_1.RES.getRes(resCanvasList_1.default[that.bgUUID[type]].url);
Ins_1.Ins.curScene = type;
that.sceneBg.texture = RES_1.RES.getRes(resCanvasList_1.default[that.bgUUID[type - 1]].url);
if (Ins_1.Ins.catIsOut) {
that.cat.visible = false;
}
else {
if ((type
+ 1
) == Ins_1.Ins.userInfo.sence) {
if ((type) == Ins_1.Ins.userInfo.sence) {
that.cat.visible = true;
}
else {
that.cat.visible = false;
that.cat.s
etCatAnimShow(0
);
that.cat.s
topCatAct(
);
}
}
switch (type) {
...
...
@@ -47042,7 +46929,6 @@ var Scene_1 = __webpack_require__(/*! ../../module/views/Scene */ "./module/view
var MainScene_1 = __webpack_require__(/*! ./MainScene */ "./src/scenes/MainScene.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var ctrls_1 = __webpack_require__(/*! ../../module/ctrls */ "./module/ctrls/index.ts");
var SelectCatPanel_1 = __webpack_require__(/*! ../panels/selectcatpanel/SelectCatPanel */ "./src/panels/selectcatpanel/SelectCatPanel.ts");
var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts");
var StartScene = (function (_super) {
__extends(StartScene, _super);
...
...
@@ -47059,7 +46945,7 @@ var StartScene = (function (_super) {
if (s) {
if (r.data) {
Ins_1.Ins.userInfo = r.data;
if (r.data.
happyCoin > 2000
) {
if (r.data.
sence == 4
) {
Ins_1.Ins.catIsOut = true;
}
else {
...
...
@@ -47068,15 +46954,27 @@ var StartScene = (function (_super) {
ctrls_1.changeScene(MainScene_1.MainScene);
}
else {
ctrls_1.showPanel(SelectCatPanel_1.SelectCatPanel
);
Ins_1.Ins.showModule("selectcatModal"
);
}
}
else {
ctrls_1
.showToast(r.message);
Ins_1.Ins
.showToast(r.message);
}
});
};
StartScene.prototype.start = function () {
StartScene.prototype.getCat = function (r) {
console.log("选择完猫咪", r);
Ins_1.Ins.userInfo = r.data;
if (r.data.sence == 4) {
Ins_1.Ins.catIsOut = true;
}
else {
Ins_1.Ins.catIsOut = false;
}
ctrls_1.changeScene(MainScene_1.MainScene);
};
StartScene.prototype.initEvents = function () {
FYGE.GDispatcher.addEventListener("selectEnd", this.getCat, this);
};
return StartScene;
}(Scene_1.Scene));
...
...
@@ -47242,20 +47140,20 @@ var MainSceneBtnUi = (function (_super) {
if (Ins_1.Ins.catIsOut) {
that.catRecall.visible = true;
}
else {
else
if (Ins_1.Ins.userInfo.sence == type)
{
that.combingBtn.visible = true;
that.catBtn.visible = true;
}
break;
case Enum_1.SCENETYPE.CLASSROOM:
that.returnBtn.visible = true;
if (!Ins_1.Ins.catIsOut) {
if (!Ins_1.Ins.catIsOut
&& Ins_1.Ins.userInfo.sence == type
) {
that.touchHeadBtn.visible = true;
}
break;
case Enum_1.SCENETYPE.PLAYGROUND:
that.returnBtn.visible = true;
if (!Ins_1.Ins.catIsOut) {
if (!Ins_1.Ins.catIsOut
&& Ins_1.Ins.userInfo.sence == type
) {
that.playBtn.visible = true;
}
break;
project/src/canvas/game/src/Ins.ts
View file @
7937ad81
...
...
@@ -2,6 +2,7 @@ import { RES } from "../module/RES";
import
resCanvasList
from
"../resCanvasList"
import
{
SCENETYPE
}
from
"./Enum"
;
import
{
sendTbNet
,
TbNetName
}
from
"./TaoBaoNet"
;
/**记录全局信息与全局方法 */
export
class
Ins
{
/**舞台宽高 */
...
...
@@ -28,6 +29,12 @@ export class Ins {
}
public
static
showModule
(
name
:
string
,
data
?){
sendTbNet
(
TbNetName
.
showModal
,
{
name
:
name
,
data
:
data
?
data
:{}
},
(
s
,
res
)
=>
{
console
.
log
(
'showModal ruleModal, success,res'
,
s
,
res
)
})
}
public
static
showToast
(
msg
?:
any
){
FYGE
.
GDispatcher
.
dispatchEvent
(
"toast"
,
msg
);
}
...
...
project/src/canvas/game/src/ResJson.ts
View file @
7937ad81
...
...
@@ -10,5 +10,5 @@ export const ResJson = {
"name"
:
"startScene"
}
],
"path"
:
"https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/1600
763276
/resource/"
"path"
:
"https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/1600
851674
/resource/"
}
\ No newline at end of file
project/src/canvas/game/src/scenes/MainScene.ts
View file @
7937ad81
...
...
@@ -57,7 +57,7 @@ export class MainScene extends Scene {
//0:教室,1:操场,2:寝室
that
.
bgUUID
=
[
"c6d699b0-b276-4985-b3ea-47bcef13f2ea"
,
"efaf990e-5392-49ad-94d8-25c04f651ede"
,
"b3c8c187-e5c9-4968-9a00-a118d18ab2fc"
];
//生成默认场景,后面要改成根据接口值判断
that
.
sceneBg
=
Ins
.
initSprite
(
that
.
bgUUID
[
Ins
.
curScene
-
1
]);
that
.
sceneBg
=
Ins
.
initSprite
(
that
.
bgUUID
[
Ins
.
curScene
==
4
?
2
:
Ins
.
curScene
-
1
]);
that
.
addChild
(
that
.
sceneBg
);
that
.
tlBtn
=
Ins
.
initSprite
(
"1f8b040d-2fbc-4ff8-92f9-159773364fae"
,
0
,
640
);
...
...
@@ -72,7 +72,7 @@ export class MainScene extends Scene {
that
.
mxqBtn
.
mouseEnable
=
true
;
that
.
addChild
(
that
.
mxqBtn
);
if
(
Ins
.
curScene
==
SCENETYPE
.
BEADROOM
){
if
(
Ins
.
curScene
==
SCENETYPE
.
BEADROOM
||
Ins
.
curScene
==
4
){
that
.
tlBtn
.
visible
=
true
;
that
.
mxqBtn
.
visible
=
true
;
}
else
{
...
...
@@ -80,7 +80,7 @@ export class MainScene extends Scene {
that
.
mxqBtn
.
visible
=
false
;
}
that
.
mainUi
=
new
MainSceneBtnUi
({
uiType
:
Ins
.
curScene
});
that
.
mainUi
=
new
MainSceneBtnUi
({
uiType
:
Ins
.
curScene
==
4
?
3
:
Ins
.
curScene
});
that
.
addChild
(
that
.
mainUi
);
that
.
initCat
();
...
...
@@ -105,9 +105,7 @@ export class MainScene extends Scene {
openLetter
()
{
console
.
log
(
"打开信封弹窗"
)
if
(
this
.
letter
&&
this
.
letter
.
visible
)
{
sendTbNet
(
TbNetName
.
showModal
,
{
name
:
'messageModal'
,
data
:
{
catName
:
Ins
.
userInfo
.
catName
}
},
(
s
,
res
)
=>
{
console
.
log
(
'showModal ruleModal, success,res'
,
s
,
res
)
})
Ins
.
showModule
(
'messageModal'
,{
catName
:
Ins
.
userInfo
.
catName
})
}
}
...
...
project/src/canvas/game/src/scenes/StartScene.ts
View file @
7937ad81
...
...
@@ -9,38 +9,50 @@ import { changeScene, showPanel, showToast } from "../../module/ctrls";
import
{
SelectCatPanel
}
from
"../panels/selectcatpanel/SelectCatPanel"
;
import
{
sendTbNet
,
TbNetName
}
from
"../TaoBaoNet"
;
export
class
StartScene
extends
Scene
{
initUi
()
{
super
.
initUi
();
var
sceneBg
=
Ins
.
initSprite
(
"b3c8c187-e5c9-4968-9a00-a118d18ab2fc"
);
this
.
addChild
(
sceneBg
);
this
.
x
=
(
Ins
.
stageW
-
750
)
>>
1
;
this
.
y
=
(
Ins
.
stageH
-
1624
)
>>
1
;
initUi
()
{
super
.
initUi
();
var
sceneBg
=
Ins
.
initSprite
(
"b3c8c187-e5c9-4968-9a00-a118d18ab2fc"
);
this
.
addChild
(
sceneBg
);
this
.
x
=
(
Ins
.
stageW
-
750
)
>>
1
;
this
.
y
=
(
Ins
.
stageH
-
1624
)
>>
1
;
sendTbNet
(
TbNetName
.
getUserInfo
,{},(
s
,
r
)
=>
{
if
(
s
){
if
(
r
.
data
){
Ins
.
userInfo
=
r
.
data
;
/**判断猫咪是否出寝,只在用户进入游戏时判断,后面要根据接口改写,现在先做测试 */
if
(
r
.
data
.
sence
==
4
){
Ins
.
catIsOut
=
true
;
}
else
{
Ins
.
catIsOut
=
false
;
sendTbNet
(
TbNetName
.
getUserInfo
,
{},
(
s
,
r
)
=>
{
if
(
s
)
{
if
(
r
.
data
)
{
Ins
.
userInfo
=
r
.
data
;
/**判断猫咪是否出寝,只在用户进入游戏时判断,后面要根据接口改写,现在先做测试 */
if
(
r
.
data
.
sence
==
4
)
{
Ins
.
catIsOut
=
true
;
}
else
{
Ins
.
catIsOut
=
false
;
}
changeScene
(
MainScene
)
}
else
{
Ins
.
showModule
(
"selectcatModal"
)
}
changeScene
(
MainScene
)
}
else
{
showPanel
(
SelectCatPanel
);
}
else
{
Ins
.
showToast
(
r
.
message
)
}
}
else
{
Ins
.
showToast
(
r
.
message
)
}
})
// this.addChild(new MainScene());
})
// this.addChild(new MainScene());
}
}
/**领养完毕猫咪 */
getCat
(
r
)
{
console
.
log
(
"选择完猫咪"
,
r
)
Ins
.
userInfo
=
r
.
data
;
/**判断猫咪是否出寝,只在用户进入游戏时判断,后面要根据接口改写,现在先做测试 */
if
(
r
.
data
.
sence
==
4
)
{
Ins
.
catIsOut
=
true
;
}
else
{
Ins
.
catIsOut
=
false
;
}
changeScene
(
MainScene
)
}
start
()
{
}
initEvents
(){
FYGE
.
GDispatcher
.
addEventListener
(
"selectEnd"
,
this
.
getCat
,
this
);
}
}
project/src/components/comgetcat/comgetcat.jsx
0 → 100644
View file @
7937ad81
'use strict'
;
import
React
,
{
Component
}
from
'react'
;
import
resList
from
'../../resconfig/resList'
;
import
'./comgetcat.less'
;
class
Comgetcat
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
this
.
state
||
{
resList
:
resList
};
}
render
()
{
return
(
<
div
className=
"getcat"
>
<
img
className=
"getcatimg"
src=
{
this
.
state
.
resList
[
'02aacfd1-3347-40a7-8a3a-9f20c1b5706b'
].
url
}
/>
<
div
className=
"getcatdialog"
>
<
img
className=
"getcatdialogbg"
src=
{
this
.
state
.
resList
[
'24b7d459-41d6-408c-9829-4768fe38abf5'
].
url
}
/>
<
span
className=
"getcatdialogtext"
>
好了,现在你就是 猫咪名字 的铲屎官了~
</
span
>
</
div
>
<
img
className=
"getcatgo"
src=
{
this
.
state
.
resList
[
'97484cf2-5146-4287-b104-ed1f43c71ee0'
].
url
}
/>
</
div
>
);
}
}
export
default
Comgetcat
;
\ No newline at end of file
project/src/components/comgetcat/comgetcat.less
0 → 100644
View file @
7937ad81
.getcat {
width: 465px;
height: 671px;
opacity: 1;
left: 130px;
top: 378px;
position: absolute;
transform-origin: 0px 0px 0px;
.getcatimg {
width: 421px;
height: 301px;
opacity: 1;
left: 34px;
top: 202px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.getcatdialog {
width: 465px;
height: 176px;
opacity: 1;
position: absolute;
transform-origin: 0px 0px 0px;
.getcatdialogbg {
width: 465px;
height: 176px;
opacity: 1;
position: absolute;
transform-origin: 0px 0px 0px;
}
.getcatdialogtext {
width: 326px;
height: 73px;
opacity: 1;
left: 69px;
top: 39px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 28px;
color: rgba(87, 75, 69, 1);
}
}
.getcatgo {
width: 282px;
height: 106px;
opacity: 1;
left: 107px;
top: 565px;
position: absolute;
transform-origin: 0px 0px 0px;
}
}
\ No newline at end of file
project/src/components/comrecallcat/comrecallcat.jsx
0 → 100644
View file @
7937ad81
'use strict'
;
import
React
,
{
Component
}
from
'react'
;
import
resList
from
'../../resconfig/resList'
;
import
'./comrecallcat.less'
;
class
Comrecallcat
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
this
.
state
||
{
resList
:
resList
};
}
render
()
{
return
(
<
div
className=
"recallcat"
>
<
img
className=
"recallcatbg"
src=
{
this
.
state
.
resList
[
'40cac443-7998-4c2a-8f9c-38121b2385e3'
].
url
}
/>
<
span
className=
"recallcatbacklabel"
>
猫咪预计 1 小时 23 分 后回寝
</
span
>
<
span
className=
"recallcathappycoin"
>
101010
</
span
>
<
div
className=
"recallbtngroup"
>
<
img
className=
"recallbtncancel"
src=
{
this
.
state
.
resList
[
'6957d9f3-9aa4-4ed6-9b83-57cc68f16512'
].
url
}
/>
<
img
className=
"recallbtngo"
src=
{
this
.
state
.
resList
[
'6d8cdd11-fbc5-4e84-b5ef-1f74c9070738'
].
url
}
/>
</
div
>
<
img
className=
"recallbtnclose"
src=
{
this
.
state
.
resList
[
'29e80fbb-98ed-40fb-a11b-e14b45fee158'
].
url
}
/>
</
div
>
);
}
}
export
default
Comrecallcat
;
project/src/components/comrecallcat/comrecallcat.less
0 → 100644
View file @
7937ad81
.recallcat {
width: 721px;
height: 562px;
opacity: 1;
left: 18px;
top: 392px;
position: absolute;
transform-origin: 0px 0px 0px;
.recallcatbg {
width: 721px;
height: 562px;
opacity: 1;
position: absolute;
transform-origin: 0px 0px 0px;
}
.recallcatbacklabel {
width: 615px;
height: 25px;
opacity: 1;
left: 52px;
top: 335px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 26px;
color: rgba(104, 91, 78, 1);
text-align: center;
}
.recallcathappycoin {
width: 119px;
height: 29px;
opacity: 1;
left: 265px;
top: 250px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 36px;
color: rgba(231, 72, 70, 1);
}
.recallbtngroup {
width: 608px;
height: 105px;
opacity: 1;
left: 54px;
top: 421px;
position: absolute;
transform-origin: 0px 0px 0px;
.recallbtncancel {
width: 281px;
height: 105px;
opacity: 1;
position: absolute;
transform-origin: 0px 0px 0px;
}
.recallbtngo {
width: 281px;
height: 105px;
opacity: 1;
left: 327px;
position: absolute;
transform-origin: 0px 0px 0px;
}
}
.recallbtnclose {
width: 44px;
height: 44px;
opacity: 1;
display: block;
left: 624px;
top: 38px;
position: absolute;
transform-origin: 0px 0px 0px;
}
}
\ No newline at end of file
taobao_mini/client/api.js
View file @
7937ad81
...
...
@@ -41,6 +41,16 @@ const apiList = {
handle
:
'login'
,
method
:
'get'
,
isShowLoading
:
false
},
adoptCat
:{
handle
:
'adoptCat'
,
method
:
'get'
,
isShowLoading
:
false
},
recallInfo
:{
handle
:
'recallInfo'
,
method
:
'get'
,
isShowLoading
:
false
}
};
...
...
taobao_mini/client/components/comcatname/comcatname.acss
View file @
7937ad81
...
...
@@ -36,7 +36,7 @@
height: 72rpx;
opacity: 1;
left: 59rpx;
top:
46
rpx;
top:
38
rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 28rpx;
...
...
@@ -67,24 +67,27 @@
transform-origin: 0rpx 0rpx 0rpx;
}
.catname .catnameinput .catnameinputlabel {
width:
104
rpx;
height:
2
7rpx;
width:
420
rpx;
height:
4
7rpx;
opacity: 1;
left:
199
rpx;
top:
37
rpx;
left:
33
rpx;
top:
25
rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 28rpx;
color: #685b4e;
background-color: rgba(0, 0, 0, 0);
}
.catname .catnameinput .catnameinputrandom {
width:
91
rpx;
width:
500
rpx;
height: 26rpx;
opacity: 1;
left:
205
rpx;
left:
0
rpx;
top: 121rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 24rpx;
color: #f8f1eb;
text-align: center
}
taobao_mini/client/components/comcatname/comcatname.axml
View file @
7937ad81
<view class="catname">
<image class="catnamecatimg" src=
{{resList['02aacfd1-3347-40a7-8a3a-9f20c1b5706b'].url}}
/>
<image class="catnamecatimg" src=
"{{catImg}}"
/>
<view class="catnamedialog">
<image class="catnamedialogbg" src={{resList['50779aee-069e-4dd9-b2ff-88beda9f43d1'].url}} />
<label class="catnamedialoglabel">铲屎官~帮我取个名字吧!喵~</label>
</view>
<image class="catnamesure" src={{resList['c7916d41-ea9d-4f8e-b5aa-e2060d6ae265'].url}} />
<image class="catnamesure"
onTap="catNameSure"
src={{resList['c7916d41-ea9d-4f8e-b5aa-e2060d6ae265'].url}} />
<view class="catnameinput">
<image class="catnameinputbg" src={{resList['947d970f-52bf-4319-82f0-a3e65620ed75'].url}} />
<
label class="catnameinputlabel">输入名字</label
>
<
label class="catnameinputrandom">随机名字</label
>
<image class="catnameinputbg"
src={{resList['947d970f-52bf-4319-82f0-a3e65620ed75'].url}} />
<
input class="catnameinputlabel" maxlength="6" onBlur="getCatName" value="{{catName}}" placeholder="输入名字" name="" ></input
>
<
text class="catnameinputrandom" onTap="randomName" >随机名字</text
>
</view>
</view>
\ No newline at end of file
taobao_mini/client/components/comcatname/comcatname.js
View file @
7937ad81
'use strict'
;
import
API
from
'../../api'
;
import
resList
from
'../../resconfig/resList'
;
Component
({
props
:
{},
data
:
{
resList
:
resList
},
methods
:
{},
props
:
{
catImgArr
:
[
"90b114e6-83cb-46f1-b607-f88c50077b05"
,
"003e9904-aee4-4b8d-8d5d-fb4b1188bec1"
,
"90283bd3-4b18-4535-97a8-90318f068781"
,
"4e471df6-01ab-421d-ba0b-084b2110dc6d"
],
catName
:
""
},
data
:
{
resList
:
resList
,
catName
:
""
,
catImg
:
""
},
methods
:
{
onModalClose
()
{
const
{
onModalClose
}
=
this
.
props
;
onModalClose
&&
onModalClose
();
},
onSelectCatOk
()
{
const
{
onSelectCatOk
}
=
this
.
props
;
onSelectCatOk
&&
onSelectCatOk
(
this
.
props
.
catName
);
},
/**随机名字 */
randomName
()
{
console
.
log
(
"随即名字"
)
let
name
=
"Edwise"
this
.
setData
({
catName
:
name
})
this
.
props
.
catName
=
name
;
},
/**获取名字 */
getCatName
(
e
)
{
// console.log(e.detail.value)
this
.
props
.
catName
=
e
.
detail
.
value
;
// console.log(this.props.catName)
},
/**确认 */
async
catNameSure
()
{
let
name
=
this
.
props
.
catName
;
if
(
name
.
length
<=
0
)
{
my
.
showToast
({
content
:
"名字不能为空哦"
,
});
}
else
{
/**检查敏感词 */
/**调用领养接口 */
const
adoptCat
=
await
API
.
adoptCat
({
catName
:
name
,
catType
:
this
.
props
.
selectType
});
console
.
log
(
"aaaa"
,
adoptCat
)
if
(
adoptCat
&&
adoptCat
.
success
)
{
this
.
onModalClose
();
this
.
onSelectCatOk
();
}
else
{
my
.
showToast
(
adoptCat
?
adoptCat
.
message
:
null
)
}
}
console
.
log
(
this
.
props
.
catName
)
}
},
didMount
()
{
console
.
log
(
this
.
props
.
catImgArr
[
this
.
props
.
selectType
-
1
].
url
)
this
.
setData
({
catImg
:
resList
[
this
.
props
.
catImgArr
[
this
.
props
.
selectType
-
1
]].
url
})
console
.
log
(
"类型"
+
this
.
props
.
selectType
+
"起名"
)
}
onInit
(
props
)
{
this
.
setData
(
this
.
data
||
{
resList
:
resList
});
}
});
\ No newline at end of file
taobao_mini/client/components/comgetcat/comgetcat.acss
0 → 100644
View file @
7937ad81
.getcat {
width: 465rpx;
height: 671rpx;
opacity: 1;
left: 130rpx;
top: 378rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.getcat .getcatimg {
width: 421rpx;
height: 301rpx;
opacity: 1;
left: 34rpx;
top: 202rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.getcat .getcatdialog {
width: 465rpx;
height: 176rpx;
opacity: 1;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.getcat .getcatdialog .getcatdialogbg {
width: 465rpx;
height: 176rpx;
opacity: 1;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.getcat .getcatdialog .getcatdialogtext {
width: 326rpx;
height: 73rpx;
opacity: 1;
left: 69rpx;
top: 39rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 28rpx;
color: #574b45;
}
.getcat .getcatgo {
width: 282rpx;
height: 106rpx;
opacity: 1;
left: 107rpx;
top: 565rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
taobao_mini/client/components/comgetcat/comgetcat.axml
0 → 100644
View file @
7937ad81
<view class="getcat">
<image class="getcatimg" src={{resList['02aacfd1-3347-40a7-8a3a-9f20c1b5706b'].url}} />
<view class="getcatdialog">
<image class="getcatdialogbg" src={{resList['24b7d459-41d6-408c-9829-4768fe38abf5'].url}} />
<label class="getcatdialogtext">好了,现在你就是{{catName}}的铲屎官了~</label>
</view>
<image class="getcatgo" onTap="onPostSelectCat" src={{resList['97484cf2-5146-4287-b104-ed1f43c71ee0'].url}} />
</view>
\ No newline at end of file
taobao_mini/client/components/comgetcat/comgetcat.js
0 → 100644
View file @
7937ad81
'use strict'
;
import
resList
from
'../../resconfig/resList'
;
Component
({
props
:
{
catName
:
''
},
data
:
{
resList
:
resList
},
methods
:
{
onModalClose
()
{
const
{
onModalClose
}
=
this
.
props
;
onModalClose
&&
onModalClose
();
console
.
log
(
'onModalClose'
)
},
onPostSelectCat
()
{
const
{
onPostSelectCat
}
=
this
.
props
;
onPostSelectCat
&&
onPostSelectCat
();
}
},
});
\ No newline at end of file
taobao_mini/client/components/comgetcat/comgetcat.json
0 → 100644
View file @
7937ad81
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
taobao_mini/client/components/commessage/commessage.axml
View file @
7937ad81
<view class="message-modal">
<view class="message__shade modal-animate-fade-in" />
<view class="message ">
<image class="message_bg " src={{resList['
0c446868-16d2-47f1-a0d6-27dadff681f2
'].url}} />
<image class="message_bg " src={{resList['
ed31e83e-535d-45bf-ba5b-20827a4cd104
'].url}} />
<label class="message_txt ">{{mydata.catName}}</label>
<image class="message_btn " onTap="onModalClose" src={{resList['3ad6a924-dda8-49f4-b8fc-0e796347e802'].url}} />
<image class="message_closebtn " onTap="onModalClose" src={{resList['5488b126-f520-496f-ace6-010a89eb108f'].url}} />
...
...
taobao_mini/client/components/commessage/commessage.js
View file @
7937ad81
'use strict'
;
import
API
from
'../../api'
;
import
resList
from
'../../resconfig/resList'
;
Component
({
props
:
{
mydata
:
null
},
data
:
{
resList
:
resList
resList
:
resList
,
backTime
:
''
},
methods
:
{
onModalClose
()
{
...
...
@@ -16,6 +18,15 @@ Component({
}
},
async
didMount
(){
const
recall
=
await
API
.
recallInfo
();
if
(
recall
&&
recall
.
success
){
this
.
setData
({
backTime
:
recall
.
data
.
backTime
})
}
else
{
my
.
showToast
(
recall
?
recall
.
message
:
null
);
}
}
});
\ No newline at end of file
taobao_mini/client/components/comrecallcat/comrecallcat.acss
0 → 100644
View file @
7937ad81
.recallcat {
width: 721rpx;
height: 562rpx;
opacity: 1;
left: 18rpx;
top: 500rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.recallcat .recallcatbg {
width: 721rpx;
height: 562rpx;
opacity: 1;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.recallcat .recallcatbacklabel {
width: 615rpx;
height: 25rpx;
opacity: 1;
left: 52rpx;
top: 335rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 26rpx;
color: #685b4e;
text-align: center;
}
.recallcat .recallcathappycoin {
width: 119rpx;
height: 29rpx;
opacity: 1;
left: 265rpx;
top: 235rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 36rpx;
color: #e74846;
text-align: center
}
.recallcat .recallbtngroup {
width: 608rpx;
height: 105rpx;
opacity: 1;
left: 54rpx;
top: 421rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.recallcat .recallbtngroup .recallbtncancel {
width: 281rpx;
height: 105rpx;
opacity: 1;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.recallcat .recallbtngroup .recallbtngo {
width: 281rpx;
height: 105rpx;
opacity: 1;
left: 327rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.recallcat .recallbtnclose {
width: 44rpx;
height: 44rpx;
opacity: 1;
display: block;
left: 624rpx;
top: 38rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
taobao_mini/client/components/comrecallcat/comrecallcat.axml
0 → 100644
View file @
7937ad81
<view class="recallcat">
<image class="recallcatbg" src={{resList['40cac443-7998-4c2a-8f9c-38121b2385e3'].url}} />
<label class="recallcatbacklabel">{{timeText}}</label>
<label class="recallcathappycoin">{{happyCoinCnt}}</label>
<view class="recallbtngroup">
<image class="recallbtncancel" onTap="onModalClose" src={{resList['6957d9f3-9aa4-4ed6-9b83-57cc68f16512'].url}} />
<image class="recallbtngo" src={{resList['6d8cdd11-fbc5-4e84-b5ef-1f74c9070738'].url}} />
</view>
<image class="recallbtnclose" onTap="onModalClose" src={{resList['29e80fbb-98ed-40fb-a11b-e14b45fee158'].url}} />
</view>
\ No newline at end of file
taobao_mini/client/components/comrecallcat/comrecallcat.js
0 → 100644
View file @
7937ad81
'use strict'
;
import
API
from
'../../api'
;
import
resList
from
'../../resconfig/resList'
;
Component
({
props
:
{},
data
:
{
resList
:
resList
,
timeText
:
''
,
happyCoinCnt
:
''
},
methods
:
{
onModalClose
()
{
const
{
onModalClose
}
=
this
.
props
;
onModalClose
&&
onModalClose
();
console
.
log
(
'onModalClose'
)
},
/**根据时间戳获取日期-月-日 */
getDateDayMonthByTime
(
time
)
{
let
date
=
new
Date
(
time
);
let
year
=
date
.
getFullYear
();
let
month
=
date
.
getMonth
()
+
1
;
let
day
=
date
.
getDate
();
let
hours
=
date
.
getHours
();
let
minutes
=
date
.
getMinutes
();;
let
seconds
=
date
.
getSeconds
();
if
(
hours
<=
0
)
{
if
(
minutes
<=
0
)
{
// if (seconds <= 0) {
date
=
0
+
'小时'
+
0
+
'分'
;
// } else {
// date = seconds + "秒"
// }
}
else
{
date
=
hours
+
'小时'
+
minutes
+
'分'
;
}
}
else
{
date
=
hours
+
'小时'
+
minutes
+
'分'
;
}
console
.
log
(
hours
);
return
date
;
}
},
async
didMount
()
{
const
recall
=
await
API
.
recallInfo
();
console
.
log
(
recall
);
if
(
recall
&&
recall
.
success
)
{
var
text
=
"猫咪预计"
+
this
.
getDateDayMonthByTime
(
recall
.
data
.
backTime
-
recall
.
data
.
serverTime
)
+
"后回寝"
;
this
.
setData
({
timeText
:
text
,
happyCoinCnt
:
recall
.
data
.
value
+
''
})
}
else
{
my
.
showToast
(
recall
?
recall
.
message
:
null
)
}
}
});
\ No newline at end of file
taobao_mini/client/components/comrecallcat/comrecallcat.json
0 → 100644
View file @
7937ad81
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
taobao_mini/client/components/comselectcat/comselectcat.js
View file @
7937ad81
...
...
@@ -2,45 +2,49 @@
import
resList
from
'../../resconfig/resList'
;
Component
({
props
:
{
},
data
:
{
resList
:
resList
,
curSelect
:
1
//1:蓝猫,2:三花,3:暹罗,4:橘猫
},
methods
:
{
onModalClose
()
{
const
{
onModalClose
}
=
this
.
props
;
onModalClose
&&
onModalClose
();
console
.
log
(
'onModalClose'
)
props
:
{
},
data
:
{
resList
:
resList
,
curSelect
:
1
//1:蓝猫,2:三花,3:暹罗,4:橘猫
},
changeSelectCat
(
e
){
// console.log(e.currentTarget.id);
let
type
=
parseInt
(
e
.
currentTarget
.
id
.
split
(
"_"
)[
1
]);
this
.
setData
({
curSelect
:
type
})
console
.
log
(
type
);
methods
:
{
onModalClose
()
{
const
{
onModalClose
}
=
this
.
props
;
onModalClose
&&
onModalClose
();
console
.
log
(
'onModalClose'
)
},
changeSelectCat
(
e
)
{
// console.log(e.currentTarget.id);
let
type
=
parseInt
(
e
.
currentTarget
.
id
.
split
(
"_"
)[
1
]);
this
.
setData
({
curSelect
:
type
})
console
.
log
(
type
);
},
selectSure
()
{
console
.
log
(
this
.
props
);
this
.
onModalClose
();
const
{
onSelectCat
}
=
this
.
props
;
console
.
log
(
onSelectCat
)
onSelectCat
&&
onSelectCat
(
this
.
data
.
curSelect
);
}
},
didMount
()
{
console
.
log
(
this
.
data
.
curSelect
)
this
.
setData
({
curSelect
:
2
})
},
selectSure
(){
console
.
log
(
this
.
props
);
const
{
closeModal
,
onModalClose
}
=
this
.
props
;
onModalClose
&&
onModalClose
();
console
.
log
(
closeModal
)
closeModal
&&
closeModal
();
}
},
didMount
()
{
console
.
log
(
this
.
data
.
curSelect
)
this
.
setData
({
curSelect
:
2
})
},
});
\ No newline at end of file
taobao_mini/client/pages/pagecanvas/output.js
View file @
7937ad81
import * as FYGE from "fyge-tbmini";
import * as SvgaParser from "svga-parser";
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
...
...
@@ -2006,9 +2005,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.CAT_ACTTYPEP = exports.CATTYPE = exports.MSG = exports.SCENETYPE = void 0;
var SCENETYPE;
(function (SCENETYPE) {
SCENETYPE[SCENETYPE["CLASSROOM"] =
0
] = "CLASSROOM";
SCENETYPE[SCENETYPE["PLAYGROUND"] =
1
] = "PLAYGROUND";
SCENETYPE[SCENETYPE["BEADROOM"] =
2
] = "BEADROOM";
SCENETYPE[SCENETYPE["CLASSROOM"] =
1
] = "CLASSROOM";
SCENETYPE[SCENETYPE["PLAYGROUND"] =
2
] = "PLAYGROUND";
SCENETYPE[SCENETYPE["BEADROOM"] =
3
] = "BEADROOM";
})(SCENETYPE = exports.SCENETYPE || (exports.SCENETYPE = {}));
var MSG;
(function (MSG) {
...
...
@@ -2050,9 +2049,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.Ins = void 0;
var RES_1 = __webpack_require__(/*! ../module/RES */ "./module/RES.ts");
var resCanvasList_1 = __webpack_require__(/*! ../resCanvasList */ "./resCanvasList.js");
var TaoBaoNet_1 = __webpack_require__(/*! ./TaoBaoNet */ "./src/TaoBaoNet.ts");
var Ins = (function () {
function Ins() {
}
Ins.showModule = function (name, data) {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.showModal, { name: name, data: data ? data : {} }, function (s, res) {
console.log('showModal ruleModal, success,res', s, res);
});
};
Ins.showToast = function (msg) {
FYGE.GDispatcher.dispatchEvent("toast", msg);
};
Ins.showLoading = function () {
FYGE.GDispatcher.dispatchEvent("loading");
};
Ins.hideLoading = function () {
FYGE.GDispatcher.dispatchEvent("hideloading");
};
Ins.stopLottieAnim = function (lottie) {
FYGE.Tween.removeTweens(lottie);
lottie.children.forEach(function (s) {
...
...
@@ -2288,6 +2302,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
Object.defineProperty(exports, "__esModule", { value: true });
exports.destroyNetData = exports.getTbData = exports.sendTbNet = exports.TbNetName = void 0;
var ctrls_1 = __webpack_require__(/*! ../module/ctrls */ "./module/ctrls/index.ts");
var Ins_1 = __webpack_require__(/*! ./Ins */ "./src/Ins.ts");
var Main_1 = __webpack_require__(/*! ./Main */ "./src/Main.ts");
var TbNetName;
(function (TbNetName) {
...
...
@@ -2322,7 +2337,7 @@ var TbNetName;
var dataRecord = {};
var fc;
function sendTbNet(netName, parameter, callback, hideMsg) {
if (hideMsg === void 0) { hideMsg =
fals
e; }
if (hideMsg === void 0) { hideMsg =
tru
e; }
return new Promise(function (resolve, reject) {
var waitObj;
if (!my) {
...
...
@@ -2349,7 +2364,7 @@ function sendTbNet(netName, parameter, callback, hideMsg) {
var d = e.data;
dataRecord[netName] = d;
if (!hideMsg && !d.success)
ctrls_1
.showToast(d.message || "网络超时");
Ins_1.Ins
.showToast(d.message || "网络超时");
callback && callback(d.success, d);
resolve(d);
console.log("\n%c[ request ]\n"
...
...
@@ -2477,22 +2492,26 @@ var xianluoshuohua_1 = __webpack_require__(/*! ../lottieSrc/lottieTs/xianluoCat/
var Enum_1 = __webpack_require__(/*! ../Enum */ "./src/Enum.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts");
var ctrls_1 = __webpack_require__(/*! ../../module/ctrls */ "./module/ctrls/index.ts");
var Cat = (function (_super) {
__extends(Cat, _super);
function Cat(data) {
var _this = _super.call(this, data) || this;
_this.catAnimArr = [];
_this.actRunning = false;
_this.dialogPos = [{ x: 1, y: 1 }];
_this.catType = data.type;
return _this;
}
Cat.prototype.initUi = function () {
var _this = this;
this.initCatLottieArr();
console.log(this.catLottieArr);
this.initCat();
this.initDialog();
this.setCatAnimShow(0);
var tipsArr = Ins_1.Ins.userInfo.senceTips;
var index = Math.floor(Math.random() * tipsArr.length);
this.showDialog(1, tipsArr[index]);
this.setCatAnimShow(1, function () { _this.stopCatAct(); });
this.initEvents();
};
Cat.prototype.initCatLottieArr = function () {
...
...
@@ -2554,22 +2573,31 @@ var Cat = (function (_super) {
};
Cat.prototype.initDialog = function () {
var that = this;
that.dialogPos = [{}, { x: 280, y: 516 }, { x: 320, y: 400 }, { x: 280, y: 556 }, { x: 280, y: 536 }, { x: 370, y: 536 }];
that.dialog = Ins_1.Ins.initSprite("624e8c63-963f-4b20-9802-b0fb006fbf93");
that.dialog.position.set(280, 526);
that.addChild(that.dialog);
that.dialogText = Ins_1.Ins.initLabel({ size: 24, x: 30, y: 20 });
that.dialogText.textWidth = 280;
that.dialog.addChild(that.dialogText);
that.dialogText.text = "哈哈哈哈哈哈哈哈哈哈哈\n哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈";
that.dialogText.textHeight = 138;
that.dialogText.verticalAlign = FYGE.VERTICAL_ALIGN.MIDDLE;
console.log("最大长度为" + that.dialogText.text.length);
that.dialog.visible = false;
console.log("当前文本高度为" + that.dialogText.textHeight);
that.dialog.alpha = 0;
};
Cat.prototype.showDialog = function (msg) {
this.dialogText.text = msg;
this.dialog.visible = true;
Cat.prototype.showDialog = function (type, msg) {
var that = this;
msg = msg.length >= 11 ? msg.substring(0, 11) + '\n' + msg.substring(11) : msg;
that.dialog.position.set(that.dialogPos[type].x, that.dialogPos[type].y);
that.dialogText.text = msg;
FYGE.Tween.removeTweens(that.dialog);
that.dialog.alpha = 0;
FYGE.Tween.get(that.dialog).to({ alpha: 1 }, 400);
};
Cat.prototype.hideDialog = function () {
this.dialog.visible = false;
this.dialog.alpha = 0;
FYGE.Tween.removeTweens(this.dialog);
};
Cat.prototype.setCatAnimShow = function (index, callback) {
if (index == 0 || index == 1) {
...
...
@@ -2590,13 +2618,33 @@ var Cat = (function (_super) {
}
}
};
Cat.prototype.stopCatAct = function () {
var that = this;
that.hideDialog();
that.setCatAnimShow(0, null);
};
Cat.prototype.catAct = function (e) {
if (this.actRunning)
return;
var that = this;
var actType = e.data;
var type;
switch (actType) {
case 2:
type = 2;
break;
case 3:
type = 1;
break;
case 4:
type = 4;
break;
case 5:
type = 3;
break;
}
console.log(actType);
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.interaction, {}, function (s, r) {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.interaction, {
type: type, scene: Ins_1.Ins.curScene
}, function (s, r) {
if (s) {
FYGE.GDispatcher.dispatchEvent(Enum_1.MSG.UPDATE_USERINFO);
that.actRunning = true;
...
...
@@ -2604,15 +2652,15 @@ var Cat = (function (_super) {
case Enum_1.CAT_ACTTYPEP.SLEEP:
break;
default:
that.showDialog(actType, r.data.tips);
that.setCatAnimShow(actType, function () {
that.hideDialog();
that.setCatAnimShow(0, null);
that.stopCatAct();
});
break;
}
}
else {
ctrls_1
.showToast(r.message);
Ins_1.Ins
.showToast(r.message);
}
});
};
...
...
@@ -46533,176 +46581,6 @@ var RulePanel = (function (_super) {
exports.RulePanel = RulePanel;
/***/ }),
/***/ "./src/panels/selectcatpanel/SelectCatGroup.ts":
/*!*****************************************************!*\
!*** ./src/panels/selectcatpanel/SelectCatGroup.ts ***!
\*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.SelectCatGroup = void 0;
var Module_1 = __webpack_require__(/*! ../../../module/views/Module */ "./module/views/Module.ts");
var Enum_1 = __webpack_require__(/*! ../../Enum */ "./src/Enum.ts");
var Ins_1 = __webpack_require__(/*! ../../Ins */ "./src/Ins.ts");
var SelectCatGroup = (function (_super) {
__extends(SelectCatGroup, _super);
function SelectCatGroup(data) {
var _this = _super.call(this, data) || this;
_this.type = data.type;
_this.imgUUid = data.uuid;
_this.nameText = data.name;
return _this;
}
SelectCatGroup.prototype.initUi = function () {
var that = this;
that.mouseEnable = true;
that.mouseChildren = true;
var bg = Ins_1.Ins.initSprite("8850353b-0a98-4335-9d46-a36678f44be0");
that.addChild(bg);
var catImg = Ins_1.Ins.initSprite(that.imgUUid, 67, 36);
that.addChild(catImg);
var nameLabel = Ins_1.Ins.initLabel({ size: 24, x: 32, y: 207, text: that.nameText ? that.nameText : "田园橘猫" });
nameLabel.textWidth = 232;
nameLabel.textAlign = FYGE.TEXT_ALIGN.CENTER;
that.addChild(nameLabel);
that.isSelectImg = Ins_1.Ins.initSprite("f956cda2-5eef-4942-8737-742d171527bd", 224, 172);
that.addChild(that.isSelectImg);
if (that.type == 0) {
that.isSelectImg.visible = true;
}
else {
that.isSelectImg.visible = false;
}
that.initEvents();
};
SelectCatGroup.prototype.initEvents = function () {
this.addEventListener(FYGE.MouseEvent.CLICK, this.selected, this);
FYGE.GDispatcher.addEventListener(Enum_1.MSG.SELECT_CAT, this.changeState, this);
};
SelectCatGroup.prototype.removeEvents = function () {
this.removeEventListener(FYGE.MouseEvent.CLICK, this.selected, this);
FYGE.GDispatcher.removeEventListener(Enum_1.MSG.SELECT_CAT, this.changeState, this);
};
SelectCatGroup.prototype.changeState = function (e) {
if (e.data == this.type) {
this.isSelectImg.visible = true;
}
else {
this.isSelectImg.visible = false;
}
};
SelectCatGroup.prototype.selected = function () {
var that = this;
that.isSelectImg.visible = !that.isSelectImg.visible;
FYGE.GDispatcher.dispatchEvent(Enum_1.MSG.SELECT_CAT, that.type);
};
return SelectCatGroup;
}(Module_1.Module));
exports.SelectCatGroup = SelectCatGroup;
/***/ }),
/***/ "./src/panels/selectcatpanel/SelectCatPanel.ts":
/*!*****************************************************!*\
!*** ./src/panels/selectcatpanel/SelectCatPanel.ts ***!
\*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.SelectCatPanel = void 0;
var ctrls_1 = __webpack_require__(/*! ../../../module/ctrls */ "./module/ctrls/index.ts");
var Panel_1 = __webpack_require__(/*! ../../../module/views/Panel */ "./module/views/Panel.ts");
var Enum_1 = __webpack_require__(/*! ../../Enum */ "./src/Enum.ts");
var Ins_1 = __webpack_require__(/*! ../../Ins */ "./src/Ins.ts");
var MainScene_1 = __webpack_require__(/*! ../../scenes/MainScene */ "./src/scenes/MainScene.ts");
var SelectCatGroup_1 = __webpack_require__(/*! ./SelectCatGroup */ "./src/panels/selectcatpanel/SelectCatGroup.ts");
var SelectCatPanel = (function (_super) {
__extends(SelectCatPanel, _super);
function SelectCatPanel() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.curSelectType = 0;
return _this;
}
SelectCatPanel.prototype.initUi = function () {
var that = this;
var bg = Ins_1.Ins.initSprite("db53267d-4141-4d3e-afda-9b523c89be3e");
that.addChild(bg);
that.x = (Ins_1.Ins.stageW - bg.width) >> 1;
that.y = (Ins_1.Ins.stageH - bg.height) >> 1;
that.selectSureBtn = Ins_1.Ins.initSprite("628fc38b-7dc0-4c69-aac1-279d60c8f1ed", 185, 804);
that.addChild(that.selectSureBtn);
that.initSelectCatGroup();
};
SelectCatPanel.prototype.initSelectCatGroup = function () {
var catData = [
{ img: "e28e5250-c740-4e4f-a855-c415c557e77e", name: "11111" },
{ img: "193f6955-d754-4b9f-80ca-b9b9a72e8a8b", name: "22222" },
{ img: "fe52ffae-fadd-40f3-97b5-d3d56fd04781", name: "33333" },
{ img: "95a6b0a9-3e7a-4a0b-82b6-6742e2a8bddf", name: "44444" }
];
for (var i = 0; i < 4; i++) {
var selectCatGroup = new SelectCatGroup_1.SelectCatGroup({ type: i, uuid: catData[i].img, name: catData[i].name });
selectCatGroup.x = 43 + i % 2 * 334;
selectCatGroup.y = 197 + Math.floor(i / 2) * 304;
this.addChild(selectCatGroup);
}
};
SelectCatPanel.prototype.catSelect = function (e) {
this.curSelectType = e.data;
console.log("选择了", e.data);
};
SelectCatPanel.prototype.selectSure = function () {
ctrls_1.closeCurrentPanel();
ctrls_1.changeScene(MainScene_1.MainScene);
};
SelectCatPanel.prototype.initEvents = function () {
FYGE.GDispatcher.addEventListener(Enum_1.MSG.SELECT_CAT, this.catSelect, this);
this.selectSureBtn.addEventListener(FYGE.MouseEvent.CLICK, this.selectSure, this);
};
SelectCatPanel.prototype.removeEvents = function () {
FYGE.GDispatcher.removeEventListener(Enum_1.MSG.SELECT_CAT, this.catSelect, this);
this.selectSureBtn.removeEventListener(FYGE.MouseEvent.CLICK, this.selectSure, this);
};
return SelectCatPanel;
}(Panel_1.Panel));
exports.SelectCatPanel = SelectCatPanel;
/***/ }),
/***/ "./src/scenes/LoadingScene.ts":
...
...
@@ -46858,8 +46736,9 @@ var MainScene = (function (_super) {
that.y = (Ins_1.Ins.stageH - 1624) >> 1;
console.log(that.y);
that.mouseChildren = true;
Ins_1.Ins.curScene = Ins_1.Ins.userInfo.sence;
that.bgUUID = ["c6d699b0-b276-4985-b3ea-47bcef13f2ea", "efaf990e-5392-49ad-94d8-25c04f651ede", "b3c8c187-e5c9-4968-9a00-a118d18ab2fc"];
that.sceneBg = Ins_1.Ins.initSprite(
"b3c8c187-e5c9-4968-9a00-a118d18ab2fc"
);
that.sceneBg = Ins_1.Ins.initSprite(
that.bgUUID[Ins_1.Ins.curScene == 4 ? 2 : Ins_1.Ins.curScene - 1]
);
that.addChild(that.sceneBg);
that.tlBtn = Ins_1.Ins.initSprite("1f8b040d-2fbc-4ff8-92f9-159773364fae", 0, 640);
that.tlBtn.alpha = 0.1;
...
...
@@ -46871,7 +46750,15 @@ var MainScene = (function (_super) {
that.mxqBtn.alpha = 0.1;
that.mxqBtn.mouseEnable = true;
that.addChild(that.mxqBtn);
that.mainUi = new mainSceneBtnUi_1.MainSceneBtnUi({ uiType: Enum_1.SCENETYPE.BEADROOM });
if (Ins_1.Ins.curScene == Enum_1.SCENETYPE.BEADROOM || Ins_1.Ins.curScene == 4) {
that.tlBtn.visible = true;
that.mxqBtn.visible = true;
}
else {
that.tlBtn.visible = false;
that.mxqBtn.visible = false;
}
that.mainUi = new mainSceneBtnUi_1.MainSceneBtnUi({ uiType: Ins_1.Ins.curScene == 4 ? 3 : Ins_1.Ins.curScene });
that.addChild(that.mainUi);
that.initCat();
that.initEnergy();
...
...
@@ -46890,9 +46777,7 @@ var MainScene = (function (_super) {
MainScene.prototype.openLetter = function () {
console.log("打开信封弹窗");
if (this.letter && this.letter.visible) {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.showModal, { name: 'messageModal', data: { catName: Ins_1.Ins.userInfo.catName } }, function (s, res) {
console.log('showModal ruleModal, success,res', s, res);
});
Ins_1.Ins.showModule('messageModal', { catName: Ins_1.Ins.userInfo.catName });
}
};
MainScene.prototype.removeLetter = function () {
...
...
@@ -46941,17 +46826,18 @@ var MainScene = (function (_super) {
MainScene.prototype.changeMainScene = function (type) {
console.log("切换到" + type);
var that = this;
that.sceneBg.texture = RES_1.RES.getRes(resCanvasList_1.default[that.bgUUID[type]].url);
Ins_1.Ins.curScene = type;
that.sceneBg.texture = RES_1.RES.getRes(resCanvasList_1.default[that.bgUUID[type - 1]].url);
if (Ins_1.Ins.catIsOut) {
that.cat.visible = false;
}
else {
if ((type
+ 1
) == Ins_1.Ins.userInfo.sence) {
if ((type) == Ins_1.Ins.userInfo.sence) {
that.cat.visible = true;
}
else {
that.cat.visible = false;
that.cat.s
etCatAnimShow(0
);
that.cat.s
topCatAct(
);
}
}
switch (type) {
...
...
@@ -47042,7 +46928,6 @@ var Scene_1 = __webpack_require__(/*! ../../module/views/Scene */ "./module/view
var MainScene_1 = __webpack_require__(/*! ./MainScene */ "./src/scenes/MainScene.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var ctrls_1 = __webpack_require__(/*! ../../module/ctrls */ "./module/ctrls/index.ts");
var SelectCatPanel_1 = __webpack_require__(/*! ../panels/selectcatpanel/SelectCatPanel */ "./src/panels/selectcatpanel/SelectCatPanel.ts");
var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts");
var StartScene = (function (_super) {
__extends(StartScene, _super);
...
...
@@ -47059,7 +46944,7 @@ var StartScene = (function (_super) {
if (s) {
if (r.data) {
Ins_1.Ins.userInfo = r.data;
if (r.data.
happyCoin > 2000
) {
if (r.data.
sence == 4
) {
Ins_1.Ins.catIsOut = true;
}
else {
...
...
@@ -47068,15 +46953,27 @@ var StartScene = (function (_super) {
ctrls_1.changeScene(MainScene_1.MainScene);
}
else {
ctrls_1.showPanel(SelectCatPanel_1.SelectCatPanel
);
Ins_1.Ins.showModule("selectcatModal"
);
}
}
else {
ctrls_1
.showToast(r.message);
Ins_1.Ins
.showToast(r.message);
}
});
};
StartScene.prototype.start = function () {
StartScene.prototype.getCat = function (r) {
console.log("选择完猫咪", r);
Ins_1.Ins.userInfo = r.data;
if (r.data.sence == 4) {
Ins_1.Ins.catIsOut = true;
}
else {
Ins_1.Ins.catIsOut = false;
}
ctrls_1.changeScene(MainScene_1.MainScene);
};
StartScene.prototype.initEvents = function () {
FYGE.GDispatcher.addEventListener("selectEnd", this.getCat, this);
};
return StartScene;
}(Scene_1.Scene));
...
...
@@ -47242,20 +47139,20 @@ var MainSceneBtnUi = (function (_super) {
if (Ins_1.Ins.catIsOut) {
that.catRecall.visible = true;
}
else {
else
if (Ins_1.Ins.userInfo.sence == type)
{
that.combingBtn.visible = true;
that.catBtn.visible = true;
}
break;
case Enum_1.SCENETYPE.CLASSROOM:
that.returnBtn.visible = true;
if (!Ins_1.Ins.catIsOut) {
if (!Ins_1.Ins.catIsOut
&& Ins_1.Ins.userInfo.sence == type
) {
that.touchHeadBtn.visible = true;
}
break;
case Enum_1.SCENETYPE.PLAYGROUND:
that.returnBtn.visible = true;
if (!Ins_1.Ins.catIsOut) {
if (!Ins_1.Ins.catIsOut
&& Ins_1.Ins.userInfo.sence == type
) {
that.playBtn.visible = true;
}
break;
taobao_mini/client/pages/pagecanvas/pagecanvas.axml
View file @
7937ad81
...
...
@@ -7,6 +7,9 @@
<rule-modal a:if="{{ruleModalVisible}}" onModalClose="closeRuleModal"><text>{{rule}}</text></rule-modal>
<levelup-modal a:if="{{levelupModalVisible}}" onModalClose="closeLevelupModal"></levelup-modal>
<message-modal a:if="{{messageModalVisible}}" mydata="{{messageModalData}}" onModalClose="closeMessageModal"></message-modal>
<view class="popcontainer" a:if="{{selectcatModalVisible}}"><selectcat-modal onModalClose="closeSelectcatModal" closeModal=closeModal></selectcat-modal></view>
<view class="popcontainer" a:if="{{catnameModalVisible}}" ><catname-modal onModalClose="closeCatnameModal"/></view>
<view class="popcontainer" a:if="{{selectcatModalVisible}}"><selectcat-modal onModalClose="closeSelectcatModal" onSelectCat="selectCat"></selectcat-modal></view>
<view class="popcontainer" a:if="{{catnameModalVisible}}" ><catname-modal selectType="{{catType}}" onModalClose="closeCatnameModal" onSelectCatOk="selectCatOk" /></view>
<view class="popcontainer" a:if="{{recallcatModalVisible}}"><recallcat-modal onModalClose="closeRecallcatModal"></recallcat-modal></view>
<view class="popcontainer" a:if="{{getcatModalVisible}}"><getcat-modal catName="{{catName}}" onPostSelectCat="postSelectCat" onModalClose="closeGetcatModal"></getcat-modal></view>
\ No newline at end of file
taobao_mini/client/pages/pagecanvas/pagecanvas.js
View file @
7937ad81
...
...
@@ -34,6 +34,8 @@ Page({
levelupModalVisible
:
false
,
selectcatModalVisible
:
false
,
catnameModalVisible
:
false
,
recallcatModalVisible
:
false
,
getcatModalVisible
:
false
},
onLoad
(
props
)
{
...
...
@@ -64,7 +66,7 @@ Page({
that
.
onMessage
({
data
:
data
})
},
2
000
)
},
1
000
)
//授权和登录先搞
// this.getAuth();
my
.
__onMessage__
=
(
e
)
=>
{
...
...
@@ -97,8 +99,8 @@ Page({
this
.
main
.
addGlobalEvent
(
"onMessage"
,
self
.
onMessage
,
self
);
this
.
main
.
addGlobalEvent
(
"toast"
,
self
.
showToast
,
self
);
this
.
main
.
addGlobalEvent
(
"loading"
,
self
.
showLoadingHandler
,
self
);
this
.
main
.
addGlobalEvent
(
"hideloading"
,
self
.
hideLoadingHandler
,
self
);
this
.
main
.
addGlobalEvent
(
"loading"
,
self
.
showLoadingHandler
,
self
);
this
.
main
.
addGlobalEvent
(
"hideloading"
,
self
.
hideLoadingHandler
,
self
);
}
}
});
...
...
@@ -120,10 +122,10 @@ Page({
duration
:
2000
});
},
showLoadingHandler
(){
showLoadingHandler
()
{
my
.
showLoading
();
},
hideLoadingHandler
(){
hideLoadingHandler
()
{
my
.
hideLoading
();
},
...
...
@@ -267,9 +269,24 @@ Page({
}
},
/**选择猫咪,打开取名弹窗 */
closeModal
(
)
{
selectCat
(
type
)
{
// this.catType = type;
// console.log("选择了", type)
this
.
setData
({
catType
:
type
,
catnameModalVisible
:
true
})
console
.
log
(
"选择了"
,
type
)
},
/**选择好猫咪后打开getCat弹窗 */
selectCatOk
(
name
){
this
.
setData
({
catName
:
name
,
getcatModalVisible
:
true
})
},
/**领养完猫咪之后传输消息给主页 */
postSelectCat
(
r
){
this
.
main
.
dispatchGlobalEvent
(
"selectEnd"
,
r
);
},
closeLevelupModal
()
{
this
.
setData
({
...
...
@@ -296,4 +313,14 @@ Page({
selectcatModalVisible
:
false
})
},
closeRecallcatModal
(){
this
.
setData
({
recallcatModalVisible
:
false
})
},
closeGetcatModal
(){
this
.
setData
({
getcatModalVisible
:
false
})
}
});
\ No newline at end of file
taobao_mini/client/pages/pagecanvas/pagecanvas.json
View file @
7937ad81
...
...
@@ -4,6 +4,8 @@
"levelup-modal"
:
"/components/comlevelup/comlevelup"
,
"message-modal"
:
"/components/commessage/commessage"
,
"selectcat-modal"
:
"/components/comselectcat/comselectcat"
,
"catname-modal"
:
"/components/comcatname/comcatname"
"catname-modal"
:
"/components/comcatname/comcatname"
,
"recallcat-modal"
:
"/components/comrecallcat/comrecallcat"
,
"getcat-modal"
:
"/components/comgetcat/comgetcat"
}
}
\ No newline at end of file
taobao_mini/client/resconfig/resList.js
View file @
7937ad81
...
...
@@ -7,6 +7,12 @@ const resList = {
uuid
:
'0c446868-16d2-47f1-a0d6-27dadff681f2'
,
url
:
'//yun.duiba.com.cn/spark/assets/3b954e2265924a7fd5250a5b2b48627360a0b905.png'
},
'ed31e83e-535d-45bf-ba5b-20827a4cd104'
:
{
name
:
'catMessageBg'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/catMessageBg.da96302fead094c1d868dc0edc62f9c3e4085472.png'
,
uuid
:
'ed31e83e-535d-45bf-ba5b-20827a4cd104'
},
'3ad6a924-dda8-49f4-b8fc-0e796347e802'
:
{
name
:
'message_btn'
,
ext
:
'.png'
,
...
...
@@ -239,5 +245,58 @@ const resList = {
uuid
:
'947d970f-52bf-4319-82f0-a3e65620ed75'
,
url
:
'//yun.duiba.com.cn/spark/assets/b29d45b60af4e4daecce521a84896cb4d276e2a5.png'
},
'90b114e6-83cb-46f1-b607-f88c50077b05'
:
{
name
:
'bluCat'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/bluCat.57cf00351ffde1985720a877d2e1384390970cd6.png'
,
uuid
:
'90b114e6-83cb-46f1-b607-f88c50077b05'
},
'4e471df6-01ab-421d-ba0b-084b2110dc6d'
:
{
name
:
'orengeCat'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/orengeCat.c664a89d9d7f63895c5460144098a5bac5fc31f5.png'
,
uuid
:
'4e471df6-01ab-421d-ba0b-084b2110dc6d'
},
'003e9904-aee4-4b8d-8d5d-fb4b1188bec1'
:
{
name
:
'sanhuaCat'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/sanhuaCat.b58ed1a3960ecd123ff0b0ff38b9cb8ad44c1b4d.png'
,
uuid
:
'003e9904-aee4-4b8d-8d5d-fb4b1188bec1'
},
'90283bd3-4b18-4535-97a8-90318f068781'
:
{
name
:
'xianluoCat'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/xianluoCat.c28961a75753d2d6ffe788a3ae38e7f3c3937344.png'
,
uuid
:
'90283bd3-4b18-4535-97a8-90318f068781'
},
'40cac443-7998-4c2a-8f9c-38121b2385e3'
:
{
name
:
'recallCatBg'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/recallCatBg.adb5325fab0c5387d334fe66dc24c98b5cfb39ca.png'
,
uuid
:
'40cac443-7998-4c2a-8f9c-38121b2385e3'
},
'6957d9f3-9aa4-4ed6-9b83-57cc68f16512'
:
{
name
:
'左'
,
ext
:
'.png'
,
uuid
:
'6957d9f3-9aa4-4ed6-9b83-57cc68f16512'
,
url
:
'//yun.duiba.com.cn/spark/assets/dbc32e22d1df97f18aa30e4da22c13d10ee95a9e.png'
},
'6d8cdd11-fbc5-4e84-b5ef-1f74c9070738'
:
{
name
:
'右'
,
ext
:
'.png'
,
uuid
:
'6d8cdd11-fbc5-4e84-b5ef-1f74c9070738'
,
url
:
'//yun.duiba.com.cn/spark/assets/a55c324b7e8b1560204abe2a60dd1880b2dda47c.png'
},
'29e80fbb-98ed-40fb-a11b-e14b45fee158'
:
{
name
:
'X'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/X.ae6442265f9321c6a127197988053c0714963acd.png'
,
uuid
:
'29e80fbb-98ed-40fb-a11b-e14b45fee158'
},
};
export
default
resList
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment