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
456b278f
Commit
456b278f
authored
Sep 28, 2020
by
Edwise
🍷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1234
parent
357a12a9
Changes
21
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
47862 additions
and
139 deletions
+47862
-139
output.js
project/src/canvas/game/output.js
+39
-11
output.js.map
project/src/canvas/game/output.js.map
+1
-1
output.js
project/src/canvas/game/released/output.js
+39
-11
TaoBaoNet.ts
project/src/canvas/game/src/TaoBaoNet.ts
+5
-0
Guide.ts
project/src/canvas/game/src/guide/Guide.ts
+19
-13
MainScene.ts
project/src/canvas/game/src/scenes/MainScene.ts
+29
-1
MainSceneBtnUi.ts
project/src/canvas/game/src/ui/MainSceneBtnUi.ts
+12
-1
comcatname.acss
taobao_mini/client/components/comcatname/comcatname.acss
+2
-2
comcatname.js
taobao_mini/client/components/comcatname/comcatname.js
+3
-0
commessage.acss
taobao_mini/client/components/commessage/commessage.acss
+20
-5
commessage.axml
taobao_mini/client/components/commessage/commessage.axml
+5
-4
commessage.js
taobao_mini/client/components/commessage/commessage.js
+30
-11
comrecallcat.acss
taobao_mini/client/components/comrecallcat/comrecallcat.acss
+2
-2
comrecallcat.axml
taobao_mini/client/components/comrecallcat/comrecallcat.axml
+2
-2
comrecallcat.js
taobao_mini/client/components/comrecallcat/comrecallcat.js
+53
-16
output.js
taobao_mini/client/pages/pagecanvas/output.js
+39
-11
pagecanvas.axml
taobao_mini/client/pages/pagecanvas/pagecanvas.axml
+2
-2
pagecanvas.js
taobao_mini/client/pages/pagecanvas/pagecanvas.js
+63
-35
pagecanvasoutput.js
taobao_mini/client/pages/pagecanvasoutput.js
+39
-11
resList.js
taobao_mini/client/resconfig/resList.js
+6
-0
debug.log
taobao_mini/debug.log
+47452
-0
No files found.
project/src/canvas/game/output.js
View file @
456b278f
...
@@ -2409,6 +2409,7 @@ var TbNetName;
...
@@ -2409,6 +2409,7 @@ var TbNetName;
TbNetName["getUserEnergy"] = "tmallCat.getUserEnergy";
TbNetName["getUserEnergy"] = "tmallCat.getUserEnergy";
TbNetName["getSence"] = "tmallCat.getSence";
TbNetName["getSence"] = "tmallCat.getSence";
TbNetName["updateSenceGuide"] = "tmallCat.updateSenceGuide";
TbNetName["updateSenceGuide"] = "tmallCat.updateSenceGuide";
TbNetName["recallInfo"] = "tmallCat.recallInfo";
TbNetName["trackingReport"] = "squirrelsAdoptRest2c.trackingReport";
TbNetName["trackingReport"] = "squirrelsAdoptRest2c.trackingReport";
TbNetName["getActivityBaseInfoById"] = "bubbleSurviva.getActivityBaseInfoById";
TbNetName["getActivityBaseInfoById"] = "bubbleSurviva.getActivityBaseInfoById";
TbNetName["authorize"] = "mine.authorize";
TbNetName["authorize"] = "mine.authorize";
...
@@ -2870,21 +2871,27 @@ var Guide = (function (_super) {
...
@@ -2870,21 +2871,27 @@ var Guide = (function (_super) {
that.initEvents();
that.initEvents();
};
};
Guide.prototype.changeGuide = function () {
Guide.prototype.changeGuide = function () {
this.index++;
var that = this;
if (this.index >= this['guideUUIDArr_' + this.guideType].length) {
that.index++;
this.callBack && this.callBack();
if (that.index >= that['guideUUIDArr_' + that.guideType].length) {
that.guideTouch.mouseEnable = false;
setTimeout(function () {
if (that && that.guideTouch)
that.guideTouch.mouseEnable = true;
}, 1000);
that.callBack && that.callBack();
return;
return;
}
}
th
is.guide.texture = RES_1.RES.getRes(resCanvasList_1.default[this['guideUUIDArr_' + this.guideType][this
.index]].url);
th
at.guide.texture = RES_1.RES.getRes(resCanvasList_1.default[that['guideUUIDArr_' + that.guideType][that
.index]].url);
if (th
is.guideType == 3 || this
.guideType == 4) {
if (th
at.guideType == 3 || that
.guideType == 4) {
if (th
is.index == 4 || this
.index == 5) {
if (th
at.index == 4 || that
.index == 5) {
th
is
.catImg1.visible = false;
th
at
.catImg1.visible = false;
}
}
else {
else {
th
is
.catImg1.visible = true;
th
at
.catImg1.visible = true;
}
}
}
}
console.log(th
is.guide.x, this
.guide.y);
console.log(th
at.guide.x, that
.guide.y);
};
};
Guide.prototype.initEvents = function () {
Guide.prototype.initEvents = function () {
this.guideTouch.addEventListener(FYGE.MouseEvent.CLICK, this.changeGuide, this);
this.guideTouch.addEventListener(FYGE.MouseEvent.CLICK, this.changeGuide, this);
...
@@ -46963,7 +46970,17 @@ var MainScene = (function (_super) {
...
@@ -46963,7 +46970,17 @@ var MainScene = (function (_super) {
MainScene.prototype.openLetter = function () {
MainScene.prototype.openLetter = function () {
console.log("打开信封弹窗");
console.log("打开信封弹窗");
if (this.letter && this.letter.visible) {
if (this.letter && this.letter.visible) {
Ins_1.Ins.showModule('messageModal', { catName: Ins_1.Ins.userInfo.catName });
Ins_1.Ins.showLoading();
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.recallInfo, {}, function (s, r) {
if (s) {
Ins_1.Ins.hideLoading();
Ins_1.Ins.showModule('messageModal', { catName: Ins_1.Ins.userInfo.catName, recallInfo: r.data });
}
else {
Ins_1.Ins.hideLoading();
Ins_1.Ins.showToast(r.message);
}
});
}
}
};
};
MainScene.prototype.removeLetter = function () {
MainScene.prototype.removeLetter = function () {
...
@@ -47315,6 +47332,7 @@ exports.MainSceneBtnUi = void 0;
...
@@ -47315,6 +47332,7 @@ exports.MainSceneBtnUi = void 0;
var Module_1 = __webpack_require__(/*! ../../module/views/Module */ "./module/views/Module.ts");
var Module_1 = __webpack_require__(/*! ../../module/views/Module */ "./module/views/Module.ts");
var Enum_1 = __webpack_require__(/*! ../Enum */ "./src/Enum.ts");
var Enum_1 = __webpack_require__(/*! ../Enum */ "./src/Enum.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts");
var MainSceneBtnUi = (function (_super) {
var MainSceneBtnUi = (function (_super) {
__extends(MainSceneBtnUi, _super);
__extends(MainSceneBtnUi, _super);
function MainSceneBtnUi(data) {
function MainSceneBtnUi(data) {
...
@@ -47533,7 +47551,17 @@ var MainSceneBtnUi = (function (_super) {
...
@@ -47533,7 +47551,17 @@ var MainSceneBtnUi = (function (_super) {
};
};
MainSceneBtnUi.prototype.catRecallHandler = function () {
MainSceneBtnUi.prototype.catRecallHandler = function () {
console.log("召回猫咪");
console.log("召回猫咪");
Ins_1.Ins.showModule("recallcatModal", { catType: Ins_1.Ins.userInfo.catType });
Ins_1.Ins.showLoading();
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.recallInfo, {}, function (s, r) {
if (s) {
Ins_1.Ins.hideLoading();
Ins_1.Ins.showModule('recallcatModal', { catType: Ins_1.Ins.userInfo.catType, catName: Ins_1.Ins.userInfo.catName, recallInfo: r.data });
}
else {
Ins_1.Ins.hideLoading();
Ins_1.Ins.showToast(r.message);
}
});
};
};
MainSceneBtnUi.prototype.getEnergy = function () {
MainSceneBtnUi.prototype.getEnergy = function () {
console.log("补充精力");
console.log("补充精力");
project/src/canvas/game/output.js.map
View file @
456b278f
This diff is collapsed.
Click to expand it.
project/src/canvas/game/released/output.js
View file @
456b278f
...
@@ -2411,6 +2411,7 @@ var TbNetName;
...
@@ -2411,6 +2411,7 @@ var TbNetName;
TbNetName["getUserEnergy"] = "tmallCat.getUserEnergy";
TbNetName["getUserEnergy"] = "tmallCat.getUserEnergy";
TbNetName["getSence"] = "tmallCat.getSence";
TbNetName["getSence"] = "tmallCat.getSence";
TbNetName["updateSenceGuide"] = "tmallCat.updateSenceGuide";
TbNetName["updateSenceGuide"] = "tmallCat.updateSenceGuide";
TbNetName["recallInfo"] = "tmallCat.recallInfo";
TbNetName["trackingReport"] = "squirrelsAdoptRest2c.trackingReport";
TbNetName["trackingReport"] = "squirrelsAdoptRest2c.trackingReport";
TbNetName["getActivityBaseInfoById"] = "bubbleSurviva.getActivityBaseInfoById";
TbNetName["getActivityBaseInfoById"] = "bubbleSurviva.getActivityBaseInfoById";
TbNetName["authorize"] = "mine.authorize";
TbNetName["authorize"] = "mine.authorize";
...
@@ -2872,21 +2873,27 @@ var Guide = (function (_super) {
...
@@ -2872,21 +2873,27 @@ var Guide = (function (_super) {
that.initEvents();
that.initEvents();
};
};
Guide.prototype.changeGuide = function () {
Guide.prototype.changeGuide = function () {
this.index++;
var that = this;
if (this.index >= this['guideUUIDArr_' + this.guideType].length) {
that.index++;
this.callBack && this.callBack();
if (that.index >= that['guideUUIDArr_' + that.guideType].length) {
that.guideTouch.mouseEnable = false;
setTimeout(function () {
if (that && that.guideTouch)
that.guideTouch.mouseEnable = true;
}, 1000);
that.callBack && that.callBack();
return;
return;
}
}
th
is.guide.texture = RES_1.RES.getRes(resCanvasList_1.default[this['guideUUIDArr_' + this.guideType][this
.index]].url);
th
at.guide.texture = RES_1.RES.getRes(resCanvasList_1.default[that['guideUUIDArr_' + that.guideType][that
.index]].url);
if (th
is.guideType == 3 || this
.guideType == 4) {
if (th
at.guideType == 3 || that
.guideType == 4) {
if (th
is.index == 4 || this
.index == 5) {
if (th
at.index == 4 || that
.index == 5) {
th
is
.catImg1.visible = false;
th
at
.catImg1.visible = false;
}
}
else {
else {
th
is
.catImg1.visible = true;
th
at
.catImg1.visible = true;
}
}
}
}
console.log(th
is.guide.x, this
.guide.y);
console.log(th
at.guide.x, that
.guide.y);
};
};
Guide.prototype.initEvents = function () {
Guide.prototype.initEvents = function () {
this.guideTouch.addEventListener(FYGE.MouseEvent.CLICK, this.changeGuide, this);
this.guideTouch.addEventListener(FYGE.MouseEvent.CLICK, this.changeGuide, this);
...
@@ -46965,7 +46972,17 @@ var MainScene = (function (_super) {
...
@@ -46965,7 +46972,17 @@ var MainScene = (function (_super) {
MainScene.prototype.openLetter = function () {
MainScene.prototype.openLetter = function () {
console.log("打开信封弹窗");
console.log("打开信封弹窗");
if (this.letter && this.letter.visible) {
if (this.letter && this.letter.visible) {
Ins_1.Ins.showModule('messageModal', { catName: Ins_1.Ins.userInfo.catName });
Ins_1.Ins.showLoading();
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.recallInfo, {}, function (s, r) {
if (s) {
Ins_1.Ins.hideLoading();
Ins_1.Ins.showModule('messageModal', { catName: Ins_1.Ins.userInfo.catName, recallInfo: r.data });
}
else {
Ins_1.Ins.hideLoading();
Ins_1.Ins.showToast(r.message);
}
});
}
}
};
};
MainScene.prototype.removeLetter = function () {
MainScene.prototype.removeLetter = function () {
...
@@ -47317,6 +47334,7 @@ exports.MainSceneBtnUi = void 0;
...
@@ -47317,6 +47334,7 @@ exports.MainSceneBtnUi = void 0;
var Module_1 = __webpack_require__(/*! ../../module/views/Module */ "./module/views/Module.ts");
var Module_1 = __webpack_require__(/*! ../../module/views/Module */ "./module/views/Module.ts");
var Enum_1 = __webpack_require__(/*! ../Enum */ "./src/Enum.ts");
var Enum_1 = __webpack_require__(/*! ../Enum */ "./src/Enum.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts");
var MainSceneBtnUi = (function (_super) {
var MainSceneBtnUi = (function (_super) {
__extends(MainSceneBtnUi, _super);
__extends(MainSceneBtnUi, _super);
function MainSceneBtnUi(data) {
function MainSceneBtnUi(data) {
...
@@ -47535,7 +47553,17 @@ var MainSceneBtnUi = (function (_super) {
...
@@ -47535,7 +47553,17 @@ var MainSceneBtnUi = (function (_super) {
};
};
MainSceneBtnUi.prototype.catRecallHandler = function () {
MainSceneBtnUi.prototype.catRecallHandler = function () {
console.log("召回猫咪");
console.log("召回猫咪");
Ins_1.Ins.showModule("recallcatModal", { catType: Ins_1.Ins.userInfo.catType });
Ins_1.Ins.showLoading();
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.recallInfo, {}, function (s, r) {
if (s) {
Ins_1.Ins.hideLoading();
Ins_1.Ins.showModule('recallcatModal', { catType: Ins_1.Ins.userInfo.catType, catName: Ins_1.Ins.userInfo.catName, recallInfo: r.data });
}
else {
Ins_1.Ins.hideLoading();
Ins_1.Ins.showToast(r.message);
}
});
};
};
MainSceneBtnUi.prototype.getEnergy = function () {
MainSceneBtnUi.prototype.getEnergy = function () {
console.log("补充精力");
console.log("补充精力");
project/src/canvas/game/src/TaoBaoNet.ts
View file @
456b278f
...
@@ -37,6 +37,11 @@ export enum TbNetName {
...
@@ -37,6 +37,11 @@ export enum TbNetName {
*/
*/
updateSenceGuide
=
"tmallCat.updateSenceGuide"
,
updateSenceGuide
=
"tmallCat.updateSenceGuide"
,
/**
* 召回信息
*/
recallInfo
=
"tmallCat.recallInfo"
,
/**
/**
* 埋点统计 到时改名字
* 埋点统计 到时改名字
* activityId params elemType
* activityId params elemType
...
...
project/src/canvas/game/src/guide/Guide.ts
View file @
456b278f
...
@@ -39,15 +39,15 @@ export class Guide extends Module {
...
@@ -39,15 +39,15 @@ export class Guide extends Module {
callBack
;
callBack
;
catImg1
:
FYGE
.
Lottie
;
catImg1
:
FYGE
.
Lottie
;
initUi
()
{
initUi
()
{
var
that
=
this
;
var
that
=
this
;
that
.
index
=
0
;
that
.
index
=
0
;
that
.
catPosArr
=
[
80
,
40
,
60
,
70
];
that
.
catPosArr
=
[
80
,
40
,
60
,
70
];
var
arr
=
[
lanmao02shuohua
,
jumaoshuohua
,
sanhua02shuohua2
,
xianluoshuohua
]
var
arr
=
[
lanmao02shuohua
,
jumaoshuohua
,
sanhua02shuohua2
,
xianluoshuohua
]
/**猫咪图片 */
/**猫咪图片 */
that
.
catImgUUIDArr
=
[
'3e6311fd-15ab-4656-bb84-1c49f4ad4ed9'
,
'bbb10ff2-f4fb-43a8-83d8-abbb04949f2d'
,
'9fc6517e-debe-4457-88ef-9c733d5bc072'
,
'ecb49f23-2e65-4507-8be6-1eee021a3b35'
]
that
.
catImgUUIDArr
=
[
'3e6311fd-15ab-4656-bb84-1c49f4ad4ed9'
,
'bbb10ff2-f4fb-43a8-83d8-abbb04949f2d'
,
'9fc6517e-debe-4457-88ef-9c733d5bc072'
,
'ecb49f23-2e65-4507-8be6-1eee021a3b35'
]
...
@@ -66,7 +66,7 @@ export class Guide extends Module {
...
@@ -66,7 +66,7 @@ export class Guide extends Module {
// that.addChild(that.catImg);
// that.addChild(that.catImg);
that
.
catImg1
=
new
FYGE
.
Lottie
(
arr
[
Ins
.
userInfo
.
catType
-
1
])
that
.
catImg1
=
new
FYGE
.
Lottie
(
arr
[
Ins
.
userInfo
.
catType
-
1
])
that
.
addChild
(
that
.
catImg1
);
that
.
addChild
(
that
.
catImg1
);
if
(
Ins
.
userInfo
.
catType
==
2
)
{
if
(
Ins
.
userInfo
.
catType
==
2
)
{
that
.
catImg1
.
y
=
30
;
that
.
catImg1
.
y
=
30
;
}
}
// var x = (Ins.stageW - that.catImg.width) * 0.5;
// var x = (Ins.stageW - that.catImg.width) * 0.5;
...
@@ -82,21 +82,27 @@ export class Guide extends Module {
...
@@ -82,21 +82,27 @@ export class Guide extends Module {
}
}
changeGuide
()
{
changeGuide
()
{
this
.
index
++
;
var
that
=
this
;
if
(
this
.
index
>=
this
[
'guideUUIDArr_'
+
this
.
guideType
].
length
)
{
that
.
index
++
;
if
(
that
.
index
>=
that
[
'guideUUIDArr_'
+
that
.
guideType
].
length
)
{
that
.
guideTouch
.
mouseEnable
=
false
;
setTimeout
(()
=>
{
if
(
that
&&
that
.
guideTouch
)
that
.
guideTouch
.
mouseEnable
=
true
;
},
1000
);
// GDispatcher.dispatchEvent(MSG.GUIDE_BEDROOMEND);
// GDispatcher.dispatchEvent(MSG.GUIDE_BEDROOMEND);
th
is
.
callBack
&&
this
.
callBack
();
th
at
.
callBack
&&
that
.
callBack
();
return
;
return
;
}
}
th
is
.
guide
.
texture
=
RES
.
getRes
(
resCanvasList
[
this
[
'guideUUIDArr_'
+
this
.
guideType
][
this
.
index
]].
url
)
th
at
.
guide
.
texture
=
RES
.
getRes
(
resCanvasList
[
that
[
'guideUUIDArr_'
+
that
.
guideType
][
that
.
index
]].
url
)
if
(
th
is
.
guideType
==
3
||
this
.
guideType
==
4
)
{
if
(
th
at
.
guideType
==
3
||
that
.
guideType
==
4
)
{
if
(
th
is
.
index
==
4
||
this
.
index
==
5
)
{
if
(
th
at
.
index
==
4
||
that
.
index
==
5
)
{
th
is
.
catImg1
.
visible
=
false
;
th
at
.
catImg1
.
visible
=
false
;
}
else
{
}
else
{
th
is
.
catImg1
.
visible
=
true
;
th
at
.
catImg1
.
visible
=
true
;
}
}
}
}
console
.
log
(
th
is
.
guide
.
x
,
this
.
guide
.
y
)
console
.
log
(
th
at
.
guide
.
x
,
that
.
guide
.
y
)
}
}
initEvents
()
{
initEvents
()
{
...
...
project/src/canvas/game/src/scenes/MainScene.ts
View file @
456b278f
...
@@ -40,6 +40,9 @@ export class MainScene extends Scene {
...
@@ -40,6 +40,9 @@ export class MainScene extends Scene {
private
maxEnergy
:
number
=
1500
;
//最大精力值
private
maxEnergy
:
number
=
1500
;
//最大精力值
private
recoverEnergyHandler
:
any
;
//恢复精力的定时器,用于保存下来方便清空
private
recoverEnergyHandler
:
any
;
//恢复精力的定时器,用于保存下来方便清空
/**召回倒计时 */
private
recallTimer
;
/**猫咪等级 */
/**猫咪等级 */
private
level
:
number
=
0
;
private
level
:
number
=
0
;
...
@@ -108,9 +111,23 @@ export class MainScene extends Scene {
...
@@ -108,9 +111,23 @@ export class MainScene extends Scene {
that
.
cat
.
visible
=
false
;
that
.
cat
.
visible
=
false
;
//当猫出走的时候,隐藏猫咪,创建信封
//当猫出走的时候,隐藏猫咪,创建信封
that
.
letter
.
visible
=
true
;
that
.
letter
.
visible
=
true
;
// that.initRecallCatTimer()
}
}
}
}
/**当猫出走的时候,初始化前端的召回倒计时 */
initRecallCatTimer
(){
var
that
=
this
;
sendTbNet
(
TbNetName
.
recallInfo
,{},(
s
,
r
)
=>
{
if
(
s
){
that
.
recallTimer
=
setTimeout
(()
=>
{
that
.
recallCat
();
},
r
.
data
.
backTime
-
r
.
data
.
serverTime
)
}
})
}
/**初始化引导 */
/**初始化引导 */
initGuide
(
sence
)
{
initGuide
(
sence
)
{
var
that
=
this
;
var
that
=
this
;
...
@@ -154,7 +171,17 @@ export class MainScene extends Scene {
...
@@ -154,7 +171,17 @@ export class MainScene extends Scene {
openLetter
()
{
openLetter
()
{
console
.
log
(
"打开信封弹窗"
)
console
.
log
(
"打开信封弹窗"
)
if
(
this
.
letter
&&
this
.
letter
.
visible
)
{
if
(
this
.
letter
&&
this
.
letter
.
visible
)
{
Ins
.
showModule
(
'messageModal'
,
{
catName
:
Ins
.
userInfo
.
catName
})
Ins
.
showLoading
();
sendTbNet
(
TbNetName
.
recallInfo
,{},(
s
,
r
)
=>
{
if
(
s
){
Ins
.
hideLoading
();
Ins
.
showModule
(
'messageModal'
,
{
catName
:
Ins
.
userInfo
.
catName
,
recallInfo
:
r
.
data
})
}
else
{
Ins
.
hideLoading
();
Ins
.
showToast
(
r
.
message
);
}
})
}
}
}
}
...
@@ -327,6 +354,7 @@ export class MainScene extends Scene {
...
@@ -327,6 +354,7 @@ export class MainScene extends Scene {
Ins
.
senceInfo
=
r
.
data
;
Ins
.
senceInfo
=
r
.
data
;
if
(
r
.
data
.
sence
<
4
)
{
if
(
r
.
data
.
sence
<
4
)
{
Ins
.
catIsOut
=
false
;
Ins
.
catIsOut
=
false
;
// clearTimeout(that.recallTimer)
that
.
letter
.
visible
=
false
;
that
.
letter
.
visible
=
false
;
if
(
r
.
data
.
sence
==
3
)
{
if
(
r
.
data
.
sence
==
3
)
{
that
.
cat
.
visible
=
true
;
that
.
cat
.
visible
=
true
;
...
...
project/src/canvas/game/src/ui/MainSceneBtnUi.ts
View file @
456b278f
...
@@ -7,6 +7,7 @@ import PanelCtrl from "../../module/ctrls/panelCtrl";
...
@@ -7,6 +7,7 @@ import PanelCtrl from "../../module/ctrls/panelCtrl";
import
{
changeScene
,
showPanel
}
from
"../../module/ctrls"
;
import
{
changeScene
,
showPanel
}
from
"../../module/ctrls"
;
import
{
RulePanel
}
from
"../panels/rulePanel"
;
import
{
RulePanel
}
from
"../panels/rulePanel"
;
import
{
MyPrizeScene
}
from
"../scenes/MyPrizeScene"
;
import
{
MyPrizeScene
}
from
"../scenes/MyPrizeScene"
;
import
{
sendTbNet
,
TbNetName
}
from
"../TaoBaoNet"
;
export
class
MainSceneBtnUi
extends
Module
{
export
class
MainSceneBtnUi
extends
Module
{
/**主场景ui
/**主场景ui
...
@@ -298,7 +299,17 @@ export class MainSceneBtnUi extends Module {
...
@@ -298,7 +299,17 @@ export class MainSceneBtnUi extends Module {
/**召回猫咪事件 */
/**召回猫咪事件 */
catRecallHandler
()
{
catRecallHandler
()
{
console
.
log
(
"召回猫咪"
);
console
.
log
(
"召回猫咪"
);
Ins
.
showModule
(
"recallcatModal"
,
{
catType
:
Ins
.
userInfo
.
catType
})
Ins
.
showLoading
();
sendTbNet
(
TbNetName
.
recallInfo
,
{},
(
s
,
r
)
=>
{
if
(
s
)
{
Ins
.
hideLoading
();
Ins
.
showModule
(
'recallcatModal'
,
{
catType
:
Ins
.
userInfo
.
catType
,
catName
:
Ins
.
userInfo
.
catName
,
recallInfo
:
r
.
data
})
}
else
{
Ins
.
hideLoading
();
Ins
.
showToast
(
r
.
message
);
}
})
// Ins.showModule("recallcatModal", { catType: Ins.userInfo.catType })
}
}
/**补充精力 */
/**补充精力 */
...
...
taobao_mini/client/components/comcatname/comcatname.acss
View file @
456b278f
...
@@ -79,10 +79,10 @@
...
@@ -79,10 +79,10 @@
background-color: rgba(0, 0, 0, 0);
background-color: rgba(0, 0, 0, 0);
}
}
.catname .catnameinput .catnameinputrandom {
.catname .catnameinput .catnameinputrandom {
width:
50
0rpx;
width:
15
0rpx;
height: 26rpx;
height: 26rpx;
opacity: 1;
opacity: 1;
left:
0
rpx;
left:
175
rpx;
top: 121rpx;
top: 121rpx;
position: absolute;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
transform-origin: 0rpx 0rpx 0rpx;
...
...
taobao_mini/client/components/comcatname/comcatname.js
View file @
456b278f
...
@@ -16,6 +16,8 @@ Component({
...
@@ -16,6 +16,8 @@ Component({
/**获取字符串字符长度 */
/**获取字符串字符长度 */
getlen
(
str
)
{
getlen
(
str
)
{
var
strlen
=
0
;
var
strlen
=
0
;
console
.
log
(
"名称长度"
,
str
.
length
)
console
.
log
(
"charChodeAt"
,
str
.
charCodeAt
)
for
(
var
i
=
0
;
i
<
str
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
str
.
length
;
i
++
)
{
if
(
str
.
charCodeAt
(
i
)
>
255
)
//如果是汉字,则字符串长度加2
if
(
str
.
charCodeAt
(
i
)
>
255
)
//如果是汉字,则字符串长度加2
strlen
+=
2
;
strlen
+=
2
;
...
@@ -83,6 +85,7 @@ Component({
...
@@ -83,6 +85,7 @@ Component({
this
.
onSelectCatOk
();
this
.
onSelectCatOk
();
}
else
{
}
else
{
console
.
log
(
"ergerg"
)
console
.
log
(
"ergerg"
)
my
.
hideLoading
();
my
.
showToast
({
content
:
adoptCat
.
message
||
'网络异常,请稍后重试~'
})
my
.
showToast
({
content
:
adoptCat
.
message
||
'网络异常,请稍后重试~'
})
}
}
}
}
...
...
taobao_mini/client/components/commessage/commessage.acss
View file @
456b278f
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
margin-top: -325rpx;
margin-top: -325rpx;
/* top: 418rpx; */
/* top: 418rpx; */
position: absolute;
position: absolute;
transform-origin:
0rpx 0rpx
0rpx;
transform-origin:
50% 50%
0rpx;
}
}
.message .message_bg {
.message .message_bg {
width: 676rpx;
width: 676rpx;
...
@@ -34,15 +34,30 @@
...
@@ -34,15 +34,30 @@
transform-origin: 0rpx 0rpx 0rpx;
transform-origin: 0rpx 0rpx 0rpx;
}
}
.message .message_txt {
.message .message_txt {
width:
142
rpx;
width:
676
rpx;
height: 25rpx;
height: 25rpx;
opacity: 1;
opacity: 1;
left:
268
rpx;
left:
0
rpx;
top: 355rpx;
top: 355rpx;
position: absolute;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 26rpx;
font-size: 26rpx;
color: #685b4e;
color: #685b4e;
text-align: center;
}
.message .message_backTime {
width: 578rpx;
height: 58rpx;
opacity: 1;
display: block;
left: 60rpx;
top: 211rpx;
position: absolute;
font-size: 28rpx;
color: rgba(104, 91, 78, 1);
transform-origin: 0rpx 0rpx 0rpx;
text-align: center;
font-weight: bold;
}
}
.message .message_btn {
.message .message_btn {
width: 45rpx;
width: 45rpx;
...
@@ -51,7 +66,7 @@
...
@@ -51,7 +66,7 @@
left: 577rpx;
left: 577rpx;
top: 24rpx;
top: 24rpx;
position: absolute;
position: absolute;
transform-origin:
0rpx 0rpx
0rpx;
transform-origin:
50% 50%
0rpx;
}
}
.message .message_closebtn {
.message .message_closebtn {
width: 352rpx;
width: 352rpx;
...
@@ -60,5 +75,5 @@
...
@@ -60,5 +75,5 @@
left: 161rpx;
left: 161rpx;
top: 510rpx;
top: 510rpx;
position: absolute;
position: absolute;
transform-origin:
0rpx 0rpx
0rpx;
transform-origin:
50% 50%
0rpx;
}
}
taobao_mini/client/components/commessage/commessage.axml
View file @
456b278f
<view class="message-modal">
<view class="message-modal">
<view class="message__shade modal-animate-fade-in" />
<view class="message__shade modal-animate-fade-in" />
<view class="message ">
<view class="message
modal-animate-zoom-in
">
<image class="message_bg " src={{resList['
ed31e83e-535d-45bf-ba5b-20827a4cd104
'].url}} />
<image class="message_bg " src={{resList['
fc1fd3ee-e606-46de-9bb6-ea5fb41567df
'].url}} />
<label class="message_txt ">{{mydata.catName+" 留"}}</label>
<label class="message_txt ">{{mydata.catName+" 留"}}</label>
<image class="message_btn " onTap="onModalClose" src={{resList['3ad6a924-dda8-49f4-b8fc-0e796347e802'].url}} />
<label class="message_backTime ">{{backTime}}</label>
<image class="message_closebtn " onTap="onModalClose" src={{resList['5488b126-f520-496f-ace6-010a89eb108f'].url}} />
<image class="message_btn" onTap="onModalClose" src={{resList['3ad6a924-dda8-49f4-b8fc-0e796347e802'].url}} />
<image class="message_closebtn btn" onTap="onModalClose" src={{resList['5488b126-f520-496f-ace6-010a89eb108f'].url}} />
</view>
</view>
</view>
</view>
\ No newline at end of file
taobao_mini/client/components/commessage/commessage.js
View file @
456b278f
...
@@ -2,31 +2,50 @@
...
@@ -2,31 +2,50 @@
import
API
from
'../../api'
;
import
API
from
'../../api'
;
import
resList
from
'../../resconfig/resList'
;
import
resList
from
'../../resconfig/resList'
;
const
app
=
getApp
();
const
{
tbcc
}
=
app
;
const
{
commonToast
}
=
tbcc
.
tb
;
Component
({
Component
({
props
:
{
props
:
{
mydata
:
null
mydata
:
null
},
},
data
:
{
data
:
{
resList
:
resList
,
resList
:
resList
,
backTime
:
''
backTime
:
''
},
},
methods
:
{
methods
:
{
onModalClose
()
{
onModalClose
()
{
const
{
onModalClose
}
=
this
.
props
;
const
{
onModalClose
}
=
this
.
props
;
onModalClose
&&
onModalClose
();
onModalClose
&&
onModalClose
();
console
.
log
(
'onModalClose'
)
console
.
log
(
'onModalClose'
)
}
},
},
/**根据时间戳获取日期-月-日 */
getDateDayMonthByTime
(
time
)
{
async
didMount
(){
let
date
=
new
Date
(
time
);
const
recall
=
await
API
.
recallInfo
();
let
hours
=
date
.
getHours
();
if
(
recall
&&
recall
.
success
){
let
minutes
=
date
.
getMinutes
();
minutes
=
minutes
<=
0
?
''
:
minutes
+
'分'
date
=
hours
+
"点"
+
minutes
;
return
date
;
},
async
getBackTime
()
{
// my.showLoading();
// const recall = await API.recallInfo().catch(r=>{
// commonToast(r&&r.message)
// my.hideLoading();
// })||{};
// if (recall && recall.success) {
// my.hideLoading();
this
.
setData
({
this
.
setData
({
backTime
:
recall
.
data
.
backTime
backTime
:
this
.
getDateDayMonthByTime
(
this
.
props
.
mydata
.
recallInfo
.
backTime
)
})
})
}
else
{
// }
my
.
showToast
(
recall
?
recall
.
message
:
null
);
}
}
},
didMount
()
{
this
.
getBackTime
();
}
}
});
});
\ No newline at end of file
taobao_mini/client/components/comrecallcat/comrecallcat.acss
View file @
456b278f
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
height: 105rpx;
height: 105rpx;
opacity: 1;
opacity: 1;
position: absolute;
position: absolute;
transform-origin:
0rpx 0rpx
0rpx;
transform-origin:
50% 50%
0rpx;
}
}
.recallcat .recallbtngroup .recallbtngo {
.recallcat .recallbtngroup .recallbtngo {
width: 281rpx;
width: 281rpx;
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
opacity: 1;
opacity: 1;
left: 327rpx;
left: 327rpx;
position: absolute;
position: absolute;
transform-origin:
0rpx 0rpx
0rpx;
transform-origin:
50% 50%
0rpx;
}
}
.recallcat .recallbtnclose {
.recallcat .recallbtnclose {
width: 44rpx;
width: 44rpx;
...
...
taobao_mini/client/components/comrecallcat/comrecallcat.axml
View file @
456b278f
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
<label class="recallcatbacklabel">{{timeText}}</label>
<label class="recallcatbacklabel">{{timeText}}</label>
<label class="recallcathappycoin">{{happyCoinCnt}}</label>
<label class="recallcathappycoin">{{happyCoinCnt}}</label>
<view class="recallbtngroup">
<view class="recallbtngroup">
<image class="recallbtncancel" onTap="onModalClose" src={{resList['6957d9f3-9aa4-4ed6-9b83-57cc68f16512'].url}} />
<image class="recallbtncancel
btn
" onTap="onModalClose" src={{resList['6957d9f3-9aa4-4ed6-9b83-57cc68f16512'].url}} />
<image class="recallbtngo" onTap="onRecallCat" src={{resList['6d8cdd11-fbc5-4e84-b5ef-1f74c9070738'].url}} />
<image class="recallbtngo
btn" disable="{{btnEnable}}
" onTap="onRecallCat" src={{resList['6d8cdd11-fbc5-4e84-b5ef-1f74c9070738'].url}} />
</view>
</view>
<image class="recallbtnclose" onTap="onModalClose" src={{resList['29e80fbb-98ed-40fb-a11b-e14b45fee158'].url}} />
<image class="recallbtnclose" onTap="onModalClose" src={{resList['29e80fbb-98ed-40fb-a11b-e14b45fee158'].url}} />
</view>
</view>
taobao_mini/client/components/comrecallcat/comrecallcat.js
View file @
456b278f
...
@@ -2,12 +2,18 @@
...
@@ -2,12 +2,18 @@
import
API
from
'../../api'
;
import
API
from
'../../api'
;
import
resList
from
'../../resconfig/resList'
;
import
resList
from
'../../resconfig/resList'
;
const
app
=
getApp
();
const
{
tbcc
}
=
app
;
const
{
commonToast
}
=
tbcc
.
tb
;
Component
({
Component
({
props
:
{},
props
:
{
mydata
:
null
},
data
:
{
data
:
{
resList
:
resList
,
resList
:
resList
,
timeText
:
''
,
timeText
:
''
,
happyCoinCnt
:
''
happyCoinCnt
:
''
,
btnEnable
:
true
},
},
methods
:
{
methods
:
{
onModalClose
()
{
onModalClose
()
{
...
@@ -27,6 +33,7 @@ Component({
...
@@ -27,6 +33,7 @@ Component({
let
hours
=
date
.
getHours
();
let
hours
=
date
.
getHours
();
let
minutes
=
date
.
getMinutes
();;
let
minutes
=
date
.
getMinutes
();;
let
seconds
=
date
.
getSeconds
();
let
seconds
=
date
.
getSeconds
();
if
(
hours
<=
0
)
{
if
(
hours
<=
0
)
{
if
(
minutes
<=
0
)
{
if
(
minutes
<=
0
)
{
// if (seconds <= 0) {
// if (seconds <= 0) {
...
@@ -47,36 +54,66 @@ Component({
...
@@ -47,36 +54,66 @@ Component({
return
date
;
return
date
;
},
},
/**计算两个时间戳相差的时间,小时,分,秒 */
compareTime
(
startTime
,
endTime
){
let
between
=
(
endTime
-
startTime
)
/
1000
;
let
hours
=
Math
.
floor
(
between
%
(
24
*
36000
)
/
3600
);
let
minutes
=
Math
.
floor
(
between
%
3600
/
60
);
let
seconds
=
Math
.
floor
(
between
%
60
/
60
);
let
date
;
if
(
hours
<=
0
)
{
if
(
minutes
<=
0
)
{
// if (seconds <= 0) {
date
=
0
+
'小时'
+
0
+
'分'
;
// } else {
// date = seconds + "秒"
// }
}
else
{
date
=
hours
+
'小时'
+
minutes
+
'分'
;
}
}
else
{
date
=
hours
+
'小时'
+
minutes
+
'分'
;
}
return
date
;
},
/**召回猫,打开召回猫的奖励弹窗 */
/**召回猫,打开召回猫的奖励弹窗 */
async
onRecallCat
()
{
async
onRecallCat
()
{
const
recallCat
=
await
API
.
recallCat
();
if
(
!
this
.
data
.
btnEnable
)
return
;
console
.
log
(
"召回猫"
)
my
.
__clickDelay__
(
this
);
my
.
showLoading
();
const
recallCat
=
await
API
.
recallCat
().
catch
(
r
=>
{
my
.
hideLoading
();
commonToast
(
r
&&
r
.
message
);
})
||
{};
if
(
recallCat
&&
recallCat
.
success
)
{
if
(
recallCat
&&
recallCat
.
success
)
{
my
.
hideLoading
();
this
.
onModalClose
();
this
.
onModalClose
();
const
{
const
{
onRecallCat
onRecallCat
}
=
this
.
props
;
}
=
this
.
props
;
onRecallCat
&&
onRecallCat
(
recallCat
.
data
);
onRecallCat
&&
onRecallCat
(
recallCat
.
data
);
my
.
__updateUserInfo__
();
}
}
else
{
my
.
showToast
({
content
:
recallCat
?
recallCat
.
message
:
null
})
}
}
}
},
},
async
didMount
()
{
async
didMount
()
{
const
recall
=
await
API
.
recallInfo
();
// const recall = await API.recallInfo().catch(r=>{
console
.
log
(
recall
);
// commonToast(r&&r.message)
if
(
recall
&&
recall
.
success
)
{
// })||{};
var
text
=
"猫咪预计"
+
this
.
getDateDayMonthByTime
(
recall
.
data
.
backTime
-
recall
.
data
.
serverTime
)
+
"后回寝"
;
// console.log(recall);
// if (recall && recall.success) {
var
text
=
"猫咪预计"
+
this
.
compareTime
(
this
.
props
.
mydata
.
recallInfo
.
serverTime
,
this
.
props
.
mydata
.
recallInfo
.
backTime
)
+
"后回寝"
;
this
.
setData
({
this
.
setData
({
timeText
:
text
,
timeText
:
text
,
happyCoinCnt
:
recall
.
data
.
value
+
''
happyCoinCnt
:
this
.
props
.
mydata
.
recallInfo
.
value
+
''
})
})
}
else
{
// }
my
.
showToast
(
recall
?
recall
.
message
:
null
)
}
}
}
});
});
\ No newline at end of file
taobao_mini/client/pages/pagecanvas/output.js
View file @
456b278f
...
@@ -2411,6 +2411,7 @@ var TbNetName;
...
@@ -2411,6 +2411,7 @@ var TbNetName;
TbNetName["getUserEnergy"] = "tmallCat.getUserEnergy";
TbNetName["getUserEnergy"] = "tmallCat.getUserEnergy";
TbNetName["getSence"] = "tmallCat.getSence";
TbNetName["getSence"] = "tmallCat.getSence";
TbNetName["updateSenceGuide"] = "tmallCat.updateSenceGuide";
TbNetName["updateSenceGuide"] = "tmallCat.updateSenceGuide";
TbNetName["recallInfo"] = "tmallCat.recallInfo";
TbNetName["trackingReport"] = "squirrelsAdoptRest2c.trackingReport";
TbNetName["trackingReport"] = "squirrelsAdoptRest2c.trackingReport";
TbNetName["getActivityBaseInfoById"] = "bubbleSurviva.getActivityBaseInfoById";
TbNetName["getActivityBaseInfoById"] = "bubbleSurviva.getActivityBaseInfoById";
TbNetName["authorize"] = "mine.authorize";
TbNetName["authorize"] = "mine.authorize";
...
@@ -2872,21 +2873,27 @@ var Guide = (function (_super) {
...
@@ -2872,21 +2873,27 @@ var Guide = (function (_super) {
that.initEvents();
that.initEvents();
};
};
Guide.prototype.changeGuide = function () {
Guide.prototype.changeGuide = function () {
this.index++;
var that = this;
if (this.index >= this['guideUUIDArr_' + this.guideType].length) {
that.index++;
this.callBack && this.callBack();
if (that.index >= that['guideUUIDArr_' + that.guideType].length) {
that.guideTouch.mouseEnable = false;
setTimeout(function () {
if (that && that.guideTouch)
that.guideTouch.mouseEnable = true;
}, 1000);
that.callBack && that.callBack();
return;
return;
}
}
th
is.guide.texture = RES_1.RES.getRes(resCanvasList_1.default[this['guideUUIDArr_' + this.guideType][this
.index]].url);
th
at.guide.texture = RES_1.RES.getRes(resCanvasList_1.default[that['guideUUIDArr_' + that.guideType][that
.index]].url);
if (th
is.guideType == 3 || this
.guideType == 4) {
if (th
at.guideType == 3 || that
.guideType == 4) {
if (th
is.index == 4 || this
.index == 5) {
if (th
at.index == 4 || that
.index == 5) {
th
is
.catImg1.visible = false;
th
at
.catImg1.visible = false;
}
}
else {
else {
th
is
.catImg1.visible = true;
th
at
.catImg1.visible = true;
}
}
}
}
console.log(th
is.guide.x, this
.guide.y);
console.log(th
at.guide.x, that
.guide.y);
};
};
Guide.prototype.initEvents = function () {
Guide.prototype.initEvents = function () {
this.guideTouch.addEventListener(FYGE.MouseEvent.CLICK, this.changeGuide, this);
this.guideTouch.addEventListener(FYGE.MouseEvent.CLICK, this.changeGuide, this);
...
@@ -46965,7 +46972,17 @@ var MainScene = (function (_super) {
...
@@ -46965,7 +46972,17 @@ var MainScene = (function (_super) {
MainScene.prototype.openLetter = function () {
MainScene.prototype.openLetter = function () {
console.log("打开信封弹窗");
console.log("打开信封弹窗");
if (this.letter && this.letter.visible) {
if (this.letter && this.letter.visible) {
Ins_1.Ins.showModule('messageModal', { catName: Ins_1.Ins.userInfo.catName });
Ins_1.Ins.showLoading();
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.recallInfo, {}, function (s, r) {
if (s) {
Ins_1.Ins.hideLoading();
Ins_1.Ins.showModule('messageModal', { catName: Ins_1.Ins.userInfo.catName, recallInfo: r.data });
}
else {
Ins_1.Ins.hideLoading();
Ins_1.Ins.showToast(r.message);
}
});
}
}
};
};
MainScene.prototype.removeLetter = function () {
MainScene.prototype.removeLetter = function () {
...
@@ -47317,6 +47334,7 @@ exports.MainSceneBtnUi = void 0;
...
@@ -47317,6 +47334,7 @@ exports.MainSceneBtnUi = void 0;
var Module_1 = __webpack_require__(/*! ../../module/views/Module */ "./module/views/Module.ts");
var Module_1 = __webpack_require__(/*! ../../module/views/Module */ "./module/views/Module.ts");
var Enum_1 = __webpack_require__(/*! ../Enum */ "./src/Enum.ts");
var Enum_1 = __webpack_require__(/*! ../Enum */ "./src/Enum.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts");
var MainSceneBtnUi = (function (_super) {
var MainSceneBtnUi = (function (_super) {
__extends(MainSceneBtnUi, _super);
__extends(MainSceneBtnUi, _super);
function MainSceneBtnUi(data) {
function MainSceneBtnUi(data) {
...
@@ -47535,7 +47553,17 @@ var MainSceneBtnUi = (function (_super) {
...
@@ -47535,7 +47553,17 @@ var MainSceneBtnUi = (function (_super) {
};
};
MainSceneBtnUi.prototype.catRecallHandler = function () {
MainSceneBtnUi.prototype.catRecallHandler = function () {
console.log("召回猫咪");
console.log("召回猫咪");
Ins_1.Ins.showModule("recallcatModal", { catType: Ins_1.Ins.userInfo.catType });
Ins_1.Ins.showLoading();
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.recallInfo, {}, function (s, r) {
if (s) {
Ins_1.Ins.hideLoading();
Ins_1.Ins.showModule('recallcatModal', { catType: Ins_1.Ins.userInfo.catType, catName: Ins_1.Ins.userInfo.catName, recallInfo: r.data });
}
else {
Ins_1.Ins.hideLoading();
Ins_1.Ins.showToast(r.message);
}
});
};
};
MainSceneBtnUi.prototype.getEnergy = function () {
MainSceneBtnUi.prototype.getEnergy = function () {
console.log("补充精力");
console.log("补充精力");
taobao_mini/client/pages/pagecanvas/pagecanvas.axml
View file @
456b278f
<view disable-scroll="true" class="page-game">
<view disable-scroll="true" class="page-game">
<canvas disable-scroll="true" id="canvas" class="canvas" onTouchStart="onMouseEvent" onTouchMove="onMouseEvent" onTouchEnd="onMouseEvent" onReady="onCanvasReady">
<canvas disable-scroll="true" id="canvas"
type="webgl"
class="canvas" onTouchStart="onMouseEvent" onTouchMove="onMouseEvent" onTouchEnd="onMouseEvent" onReady="onCanvasReady">
</canvas>
</canvas>
</view>
</view>
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<message-modal a:if="{{messageModalVisible}}" mydata="{{messageModalData}}" onModalClose="closeMessageModal"></message-modal>
<message-modal a:if="{{messageModalVisible}}" mydata="{{messageModalData}}" onModalClose="closeMessageModal"></message-modal>
<view class="popcontainer" a:if="{{selectcatModalVisible}}"><selectcat-modal onModalClose="closeSelectcatModal" onSelectCat="selectCat"></selectcat-modal></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="{{catnameModalVisible}}" ><catname-modal selectType="{{catType}}" onModalClose="closeCatnameModal" onSelectCatOk="selectCatOk" /></view>
<view class="popcontainer" a:if="{{recallcatModalVisible}}"><recallcat-modal onRecallCat="recallCat" onModalClose="closeRecallcatModal"></recallcat-modal></view>
<view class="popcontainer" a:if="{{recallcatModalVisible}}"><recallcat-modal
mydata="{{recallcatModalData}}"
onRecallCat="recallCat" onModalClose="closeRecallcatModal"></recallcat-modal></view>
<view class="popcontainer" a:if="{{getcatModalVisible}}"><getcat-modal selectType="{{catType}}" catName="{{catName}}" onPostSelectCat="postSelectCat" onModalClose="closeGetcatModal"></getcat-modal></view>
<view class="popcontainer" a:if="{{getcatModalVisible}}"><getcat-modal selectType="{{catType}}" catName="{{catName}}" onPostSelectCat="postSelectCat" onModalClose="closeGetcatModal"></getcat-modal></view>
<view class="popcontainer" a:if="{{catbackbedModalVisible}}"><catbackbed-modal mydata="{{recallcatModalData}}" recallCatInfo="{{recallCatInfo}}" onUpdateUserInfo="updateUserInfo" onModalClose="closeCatbackModal"></catbackbed-modal></view>
<view class="popcontainer" a:if="{{catbackbedModalVisible}}"><catbackbed-modal mydata="{{recallcatModalData}}" recallCatInfo="{{recallCatInfo}}" onUpdateUserInfo="updateUserInfo" onModalClose="closeCatbackModal"></catbackbed-modal></view>
<task-modal a:if="{{taskModalVisible}}" onModalClose="closeTaskModal"></task-modal>
<task-modal a:if="{{taskModalVisible}}" onModalClose="closeTaskModal"></task-modal>
...
...
taobao_mini/client/pages/pagecanvas/pagecanvas.js
View file @
456b278f
...
@@ -35,7 +35,7 @@ Page({
...
@@ -35,7 +35,7 @@ Page({
data
:
{
data
:
{
catType
:
1
,
catType
:
1
,
catName
:
''
,
catName
:
''
,
activityBaseInfo
:
null
,
activityBaseInfo
:
null
,
recallCatInfo
:
{},
recallCatInfo
:
{},
taskModalVisible
:
0
,
taskModalVisible
:
0
,
messageModalVisible
:
false
,
messageModalVisible
:
false
,
...
@@ -43,7 +43,7 @@ Page({
...
@@ -43,7 +43,7 @@ Page({
ruleModalVisible
:
false
,
ruleModalVisible
:
false
,
levelupModalVisible
:
0
,
levelupModalVisible
:
0
,
levelupModalData
:
null
,
levelupModalData
:
null
,
selectcatModalVisible
:
fals
e
,
selectcatModalVisible
:
tru
e
,
catnameModalVisible
:
false
,
catnameModalVisible
:
false
,
recallcatModalVisible
:
false
,
recallcatModalVisible
:
false
,
recallcatModalData
:
{},
recallcatModalData
:
{},
...
@@ -53,9 +53,15 @@ Page({
...
@@ -53,9 +53,15 @@ Page({
catruleModalVisible
:
0
catruleModalVisible
:
0
},
},
async
doHelp
()
{
async
doHelp
()
{
if
(
!
app
.
inviteId
)
return
;
if
(
!
app
.
inviteId
)
return
;
commonToast
(
'正在发起助力~'
)
commonToast
(
'正在发起助力~'
)
const
{
success
,
data
,
message
}
=
await
API
.
doHelp
({
inviteId
:
app
.
inviteId
}).
catch
(
res
=>
{
const
{
success
,
data
,
message
}
=
await
API
.
doHelp
({
inviteId
:
app
.
inviteId
}).
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
commonToast
(
res
&&
res
.
message
);
})
||
{};
})
||
{};
...
@@ -128,7 +134,18 @@ Page({
...
@@ -128,7 +134,18 @@ Page({
console
.
log
(
"通知canvas刷新用户信息"
)
console
.
log
(
"通知canvas刷新用户信息"
)
this
.
main
&&
this
.
main
.
dispatchGlobalEvent
(
"UPDATE_USERINFO"
)
this
.
main
&&
this
.
main
.
dispatchGlobalEvent
(
"UPDATE_USERINFO"
)
}
}
my
.
__clickDelay__
=
(
obj
)
=>
{
obj
.
setData
({
btnEnable
:
false
})
setTimeout
(()
=>
{
if
(
obj
){
obj
.
setData
({
btnEnable
:
true
})
}
},
2000
)
}
// setTimeout(() => {
// setTimeout(() => {
// my.__pageTo__('myprize')
// my.__pageTo__('myprize')
// }, 100);
// }, 100);
...
@@ -166,12 +183,14 @@ Page({
...
@@ -166,12 +183,14 @@ Page({
this
.
doHelp
();
this
.
doHelp
();
}
}
},
},
fail
:
()
=>
{
console
.
log
(
'createCanvas fail'
);
}
fail
:
()
=>
{
console
.
log
(
'createCanvas fail'
);
}
});
});
},
},
onCanvasReady
(
query
)
{
onCanvasReady
(
query
)
{
console
.
log
(
'onCanvasReady'
,
query
)
console
.
log
(
'onCanvasReady'
,
query
)
//授权和登录先搞
//授权和登录先搞
checkSystem
().
then
(
r
=>
{
checkSystem
().
then
(
r
=>
{
if
(
r
)
{
if
(
r
)
{
...
@@ -312,47 +331,52 @@ Page({
...
@@ -312,47 +331,52 @@ Page({
app
.
nickName
=
nickName
;
app
.
nickName
=
nickName
;
app
.
avatar
=
avatar
;
app
.
avatar
=
avatar
;
this
.
login
();
this
.
login
();
}
}
},
},
/**
/**
* 登录接口
* 登录接口
*/
*/
async
login
()
{
async
login
()
{
const
{
const
{
nickName
,
nickName
,
avatar
avatar
}
=
app
;
}
=
app
;
const
{
const
{
success
,
data
,
success
,
}
=
await
API
.
login
({
data
,
userNick
:
nickName
,
}
=
await
API
.
login
({
avatar
userNick
:
nickName
,
}).
catch
(
res
=>
{
avatar
commonToast
(
res
&&
res
.
message
);
}).
catch
(
res
=>
{
})
||
{};
commonToast
(
res
&&
res
.
message
);
})
||
{};
if
(
success
)
{
app
.
openId
=
data
.
openId
;
this
.
getActivityBaseInfoById
();
}
if
(
success
)
{
app
.
openId
=
data
.
openId
;
this
.
getActivityBaseInfoById
();
}
},
},
/**
/**
* 获取活动信息
* 获取活动信息
*/
*/
async
getActivityBaseInfoById
(){
async
getActivityBaseInfoById
()
{
my
.
showLoading
();
my
.
showLoading
();
const
{
success
,
data
}
=
await
API
.
getActivityBaseInfoById
().
catch
(
r
=>
{
const
{
commonToast
(
r
&&
r
.
message
)
success
,
})
||
{};
data
}
=
await
API
.
getActivityBaseInfoById
().
catch
(
r
=>
{
my
.
hideLoading
();
commonToast
(
r
&&
r
.
message
)
})
||
{};
if
(
success
)
{
if
(
success
)
{
my
.
hideLoading
();
my
.
hideLoading
();
this
.
setData
({
this
.
setData
({
activityBaseInfo
:
data
activityBaseInfo
:
data
})
})
this
.
initCanvas
();
//
this.initCanvas();
}
}
},
},
/**刷新用户信息 */
/**刷新用户信息 */
...
@@ -382,6 +406,7 @@ Page({
...
@@ -382,6 +406,7 @@ Page({
},
},
/**召回猫 */
/**召回猫 */
recallCat
(
r
)
{
recallCat
(
r
)
{
this
.
main
.
dispatchGlobalEvent
(
"RECALL_CAT"
);
this
.
setData
({
this
.
setData
({
recallCatInfo
:
r
,
recallCatInfo
:
r
,
catbackbedModalVisible
:
true
catbackbedModalVisible
:
true
...
@@ -440,12 +465,15 @@ Page({
...
@@ -440,12 +465,15 @@ Page({
},
},
onShareAppMessage
()
{
onShareAppMessage
()
{
// 返回自定义分享信息
// 返回自定义分享信息
let
{
path
,
...
rest
}
=
SHARE_CONFIG
;
let
{
console
.
log
(
'app.openId'
,
app
.
openId
);
path
,
...
rest
}
=
SHARE_CONFIG
;
console
.
log
(
'app.openId'
,
app
.
openId
);
if
(
app
.
openId
)
{
if
(
app
.
openId
)
{
path
=
'/pages/pagecanvas/pagecanvas'
+
'?openId='
+
app
.
openId
;
path
=
'/pages/pagecanvas/pagecanvas'
+
'?openId='
+
app
.
openId
;
}
}
console
.
log
(
'path'
,
path
)
console
.
log
(
'path'
,
path
)
return
{
return
{
...
rest
,
...
rest
,
...
...
taobao_mini/client/pages/pagecanvasoutput.js
View file @
456b278f
...
@@ -2411,6 +2411,7 @@ var TbNetName;
...
@@ -2411,6 +2411,7 @@ var TbNetName;
TbNetName["getUserEnergy"] = "tmallCat.getUserEnergy";
TbNetName["getUserEnergy"] = "tmallCat.getUserEnergy";
TbNetName["getSence"] = "tmallCat.getSence";
TbNetName["getSence"] = "tmallCat.getSence";
TbNetName["updateSenceGuide"] = "tmallCat.updateSenceGuide";
TbNetName["updateSenceGuide"] = "tmallCat.updateSenceGuide";
TbNetName["recallInfo"] = "tmallCat.recallInfo";
TbNetName["trackingReport"] = "squirrelsAdoptRest2c.trackingReport";
TbNetName["trackingReport"] = "squirrelsAdoptRest2c.trackingReport";
TbNetName["getActivityBaseInfoById"] = "bubbleSurviva.getActivityBaseInfoById";
TbNetName["getActivityBaseInfoById"] = "bubbleSurviva.getActivityBaseInfoById";
TbNetName["authorize"] = "mine.authorize";
TbNetName["authorize"] = "mine.authorize";
...
@@ -2872,21 +2873,27 @@ var Guide = (function (_super) {
...
@@ -2872,21 +2873,27 @@ var Guide = (function (_super) {
that.initEvents();
that.initEvents();
};
};
Guide.prototype.changeGuide = function () {
Guide.prototype.changeGuide = function () {
this.index++;
var that = this;
if (this.index >= this['guideUUIDArr_' + this.guideType].length) {
that.index++;
this.callBack && this.callBack();
if (that.index >= that['guideUUIDArr_' + that.guideType].length) {
that.guideTouch.mouseEnable = false;
setTimeout(function () {
if (that && that.guideTouch)
that.guideTouch.mouseEnable = true;
}, 1000);
that.callBack && that.callBack();
return;
return;
}
}
th
is.guide.texture = RES_1.RES.getRes(resCanvasList_1.default[this['guideUUIDArr_' + this.guideType][this
.index]].url);
th
at.guide.texture = RES_1.RES.getRes(resCanvasList_1.default[that['guideUUIDArr_' + that.guideType][that
.index]].url);
if (th
is.guideType == 3 || this
.guideType == 4) {
if (th
at.guideType == 3 || that
.guideType == 4) {
if (th
is.index == 4 || this
.index == 5) {
if (th
at.index == 4 || that
.index == 5) {
th
is
.catImg1.visible = false;
th
at
.catImg1.visible = false;
}
}
else {
else {
th
is
.catImg1.visible = true;
th
at
.catImg1.visible = true;
}
}
}
}
console.log(th
is.guide.x, this
.guide.y);
console.log(th
at.guide.x, that
.guide.y);
};
};
Guide.prototype.initEvents = function () {
Guide.prototype.initEvents = function () {
this.guideTouch.addEventListener(FYGE.MouseEvent.CLICK, this.changeGuide, this);
this.guideTouch.addEventListener(FYGE.MouseEvent.CLICK, this.changeGuide, this);
...
@@ -46965,7 +46972,17 @@ var MainScene = (function (_super) {
...
@@ -46965,7 +46972,17 @@ var MainScene = (function (_super) {
MainScene.prototype.openLetter = function () {
MainScene.prototype.openLetter = function () {
console.log("打开信封弹窗");
console.log("打开信封弹窗");
if (this.letter && this.letter.visible) {
if (this.letter && this.letter.visible) {
Ins_1.Ins.showModule('messageModal', { catName: Ins_1.Ins.userInfo.catName });
Ins_1.Ins.showLoading();
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.recallInfo, {}, function (s, r) {
if (s) {
Ins_1.Ins.hideLoading();
Ins_1.Ins.showModule('messageModal', { catName: Ins_1.Ins.userInfo.catName, recallInfo: r.data });
}
else {
Ins_1.Ins.hideLoading();
Ins_1.Ins.showToast(r.message);
}
});
}
}
};
};
MainScene.prototype.removeLetter = function () {
MainScene.prototype.removeLetter = function () {
...
@@ -47317,6 +47334,7 @@ exports.MainSceneBtnUi = void 0;
...
@@ -47317,6 +47334,7 @@ exports.MainSceneBtnUi = void 0;
var Module_1 = __webpack_require__(/*! ../../module/views/Module */ "./module/views/Module.ts");
var Module_1 = __webpack_require__(/*! ../../module/views/Module */ "./module/views/Module.ts");
var Enum_1 = __webpack_require__(/*! ../Enum */ "./src/Enum.ts");
var Enum_1 = __webpack_require__(/*! ../Enum */ "./src/Enum.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts");
var MainSceneBtnUi = (function (_super) {
var MainSceneBtnUi = (function (_super) {
__extends(MainSceneBtnUi, _super);
__extends(MainSceneBtnUi, _super);
function MainSceneBtnUi(data) {
function MainSceneBtnUi(data) {
...
@@ -47535,7 +47553,17 @@ var MainSceneBtnUi = (function (_super) {
...
@@ -47535,7 +47553,17 @@ var MainSceneBtnUi = (function (_super) {
};
};
MainSceneBtnUi.prototype.catRecallHandler = function () {
MainSceneBtnUi.prototype.catRecallHandler = function () {
console.log("召回猫咪");
console.log("召回猫咪");
Ins_1.Ins.showModule("recallcatModal", { catType: Ins_1.Ins.userInfo.catType });
Ins_1.Ins.showLoading();
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.recallInfo, {}, function (s, r) {
if (s) {
Ins_1.Ins.hideLoading();
Ins_1.Ins.showModule('recallcatModal', { catType: Ins_1.Ins.userInfo.catType, catName: Ins_1.Ins.userInfo.catName, recallInfo: r.data });
}
else {
Ins_1.Ins.hideLoading();
Ins_1.Ins.showToast(r.message);
}
});
};
};
MainSceneBtnUi.prototype.getEnergy = function () {
MainSceneBtnUi.prototype.getEnergy = function () {
console.log("补充精力");
console.log("补充精力");
taobao_mini/client/resconfig/resList.js
View file @
456b278f
...
@@ -495,6 +495,12 @@ const resList = {
...
@@ -495,6 +495,12 @@ const resList = {
ext
:
'.png'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/unluckyBtn.e57fc34e49370d30a6942fb835395377a9cf4721.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/unluckyBtn.e57fc34e49370d30a6942fb835395377a9cf4721.png'
,
uuid
:
'c8c50400-1d65-4971-8be5-e4fb2eecfcd5'
uuid
:
'c8c50400-1d65-4971-8be5-e4fb2eecfcd5'
},
'fc1fd3ee-e606-46de-9bb6-ea5fb41567df'
:
{
name
:
'catMessageBg'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/catMessageBg.e74d2bf93254933a994d05aa9ce29f9e3914c149.png'
,
uuid
:
'fc1fd3ee-e606-46de-9bb6-ea5fb41567df'
}
}
};
};
export
default
resList
;
export
default
resList
;
taobao_mini/debug.log
View file @
456b278f
This diff is collapsed.
Click to expand it.
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