Commit 9fcc7d37 authored by wildfirecode13's avatar wildfirecode13

Merge branch 'tianmaoxiaoyuan' of gitlab2.dui88.com:wanghongyuan/new_taobao into tianmaoxiaoyuan

parents a7e61245 6c928df7
{ {
"success": false, "success": true,
"message":"请稍后重试", "message":"请稍后重试",
"data": "aaaa", "data": "aaaa",
"code": "000" "code": "000"
......
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
"data": { "data": {
"catType": 1, "catType": 1,
"userNick": "Edwise", "userNick": "Edwise",
"energy": "100", "energy": 1000,
"happyCoin": "1000", "happyCoin":1000,
"experience": "50", "experience": 50,
"level": "1", "level": "1",
"avatar": "https://yun.duiba.com.cn/spark/assets/b1992c528b36c2d26942e9c83941242e59481475.png", "avatar": "https://yun.duiba.com.cn/spark/assets/a3ae99684afa9a1f8d94f4c95ee6f1ed81de9996.png",
"sence": 1, "sence": 3,
"catName": "喵喵喵" "catName": "喵喵喵"
} }
} }
\ No newline at end of file
...@@ -632,14 +632,26 @@ const resCanvasList = { ...@@ -632,14 +632,26 @@ const resCanvasList = {
'0cc64b0c-3ccc-4d88-b697-bb402319cef7': { '0cc64b0c-3ccc-4d88-b697-bb402319cef7': {
name: 'ToastBg', name: 'ToastBg',
ext: '.png', ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/ToastBg.81e208c0050ce46ac576ba881d02db07a02bffe2.png', url: 'https://yun.duiba.com.cn/spark/assets/ToastBg.81e208c0050ce46ac576ba881d02db07a02bffe2.png',
uuid: '0cc64b0c-3ccc-4d88-b697-bb402319cef7' uuid: '0cc64b0c-3ccc-4d88-b697-bb402319cef7'
}, },
'69009eb9-4593-4a43-a9d7-a6356ebd6d04': { '69009eb9-4593-4a43-a9d7-a6356ebd6d04': {
name: '精力条对话框', name: '精力条对话框',
ext: '.png', ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/精力条对话框.da8e059d18cf967026989e3c376b7364210c3d4e.png', url: 'https://yun.duiba.com.cn/spark/assets/精力条对话框.da8e059d18cf967026989e3c376b7364210c3d4e.png',
uuid: '69009eb9-4593-4a43-a9d7-a6356ebd6d04' uuid: '69009eb9-4593-4a43-a9d7-a6356ebd6d04'
},
'72345190-f95b-4152-bccf-393b8a5aa8d0': {
name: '召回猫咪icon',
ext: '.png',
url: 'https://yun.duiba.com.cn/spark/assets/召回猫咪icon.41d0b6bb23a7eccf0facb8918cfb679239b7f82f.png',
uuid: '72345190-f95b-4152-bccf-393b8a5aa8d0'
},
'3b12798d-d932-4f5b-a442-6e4877ba5c16': {
name: 'LetterTexture',
ext: '.png',
url: 'https://yun.duiba.com.cn/spark/assets/LetterTexture.78192e79fa3b21a85b245038f23561eeb5141d4d.png',
uuid: '3b12798d-d932-4f5b-a442-6e4877ba5c16'
} }
}; };
export default resCanvasList; export default resCanvasList;
...@@ -3,6 +3,7 @@ const BlueCatTexture = require("./src/lottieSrc/lottieTextureJson/BlueCatTexture ...@@ -3,6 +3,7 @@ const BlueCatTexture = require("./src/lottieSrc/lottieTextureJson/BlueCatTexture
const OrengeCatTexture = require("./src/lottieSrc/lottieTextureJson/OrengeCatTexture.json") const OrengeCatTexture = require("./src/lottieSrc/lottieTextureJson/OrengeCatTexture.json")
const SanhuaCatTexture = require("./src/lottieSrc/lottieTextureJson/SanhuaCatTexture.json") const SanhuaCatTexture = require("./src/lottieSrc/lottieTextureJson/SanhuaCatTexture.json")
const XianluoCatTexture = require("./src/lottieSrc/lottieTextureJson/XianluoCatTexture.json") const XianluoCatTexture = require("./src/lottieSrc/lottieTextureJson/XianluoCatTexture.json")
const LetterTexture = require("./src/lottieSrc/lottieTextureJson/LetterTexture.json")
const resLottieList = { const resLottieList = {
"blueCat":{ "blueCat":{
imgUrl:resCanvasList["a7dc39fa-5f6d-4e94-8979-81c4a4aa183f"].url, imgUrl:resCanvasList["a7dc39fa-5f6d-4e94-8979-81c4a4aa183f"].url,
...@@ -19,6 +20,10 @@ const resLottieList = { ...@@ -19,6 +20,10 @@ const resLottieList = {
"xianluoCat":{ "xianluoCat":{
imgUrl:resCanvasList["de2d1dca-ed1c-4fe0-93ef-684f4b96c87e"].url, imgUrl:resCanvasList["de2d1dca-ed1c-4fe0-93ef-684f4b96c87e"].url,
json:XianluoCatTexture json:XianluoCatTexture
},
"letter":{
imgUrl:resCanvasList["3b12798d-d932-4f5b-a442-6e4877ba5c16"].url,
json:LetterTexture
} }
} }
export default resLottieList; export default resLottieList;
\ No newline at end of file
...@@ -7,13 +7,16 @@ export class Ins { ...@@ -7,13 +7,16 @@ export class Ins {
public static stageW: number; public static stageW: number;
public static stageH: number; public static stageH: number;
/**猫咪是否出寝了 */
public static catIsOut:boolean;
public static userInfo: { public static userInfo: {
"catName": string, //猫咪姓名 "catName": string, //猫咪姓名
"catType": string, //猫咪类型 "catType": string, //猫咪类型
"userNick": string, //用户昵称 "userNick": string, //用户昵称
"energy": string, //精力值 "energy": number, //精力值
"happyCoin": string, //欢乐币 "happyCoin": number, //欢乐币
"experience": string, //经验值 "experience": number, //经验值
"level": string, //等级 "level": string, //等级
"avatar": string, //头像 "avatar": string, //头像
"sence": number, //场景 "sence": number, //场景
......
...@@ -114,12 +114,12 @@ export class Main { ...@@ -114,12 +114,12 @@ export class Main {
sendTbNet(TbNetName.getActivityBaseInfoById, {}, (s, res) => { sendTbNet(TbNetName.getActivityBaseInfoById, {}, (s, res) => {
console.log('getActivityBaseInfoById success,res',s,res) console.log('getActivityBaseInfoById success,res',s,res)
}) })
console.log('准备打开弹窗') // console.log('准备打开弹窗')
setTimeout(() => { // setTimeout(() => {
sendTbNet(TbNetName.showModal, {name:'ruleModal'}, (s, res) => { // sendTbNet(TbNetName.showModal, {name:'ruleModal'}, (s, res) => {
console.log('showModal ruleModal, success,res',s,res) // console.log('showModal ruleModal, success,res',s,res)
}) // })
}, 3000); // }, 3000);
// console.log('准备切换到兑换页面') // console.log('准备切换到兑换页面')
// setTimeout(() => { // setTimeout(() => {
// sendTbNet(TbNetName.navigateToPage, {name:'pageshop'}, (s, res) => { // sendTbNet(TbNetName.navigateToPage, {name:'pageshop'}, (s, res) => {
......
...@@ -150,6 +150,7 @@ export class Cat extends Module { ...@@ -150,6 +150,7 @@ export class Cat extends Module {
console.log(actType); console.log(actType);
sendTbNet(TbNetName.interaction, {}, (s, r) => { sendTbNet(TbNetName.interaction, {}, (s, r) => {
if (s) { if (s) {
FYGE.GDispatcher.dispatchEvent(MSG.UPDATE_USERINFO);
that.actRunning = true; that.actRunning = true;
switch (actType) { switch (actType) {
case CAT_ACTTYPEP.SLEEP: case CAT_ACTTYPEP.SLEEP:
...@@ -160,7 +161,8 @@ export class Cat extends Module { ...@@ -160,7 +161,8 @@ export class Cat extends Module {
} }
}else }else
{ {
FYGE.GDispatcher.dispatchEvent("23",r.message) // FYGE.GDispatcher.dispatchEvent("23",r.message)
showToast(r.message)
} }
}) })
......
{
"1085e1ca-a5a5-4e1c-9917-fb27efa359f7.png": {
"x": 2,
"y": 2,
"w": 299,
"h": 175,
"ox": 0,
"oy": 0,
"sw": 299,
"sh": 175,
"ro": false
},
"eafa36c0-16e3-4112-b56e-a492a4899a5f.png": {
"x": 2,
"y": 179,
"w": 298,
"h": 243,
"ox": 0,
"oy": 0,
"sw": 298,
"sh": 243,
"ro": true
},
"6612ca2f-948b-49a3-982f-250e4cd9c635.png": {
"x": 247,
"y": 179,
"w": 249,
"h": 215,
"ox": 0,
"oy": 0,
"sw": 249,
"sh": 215,
"ro": false
},
"798dbdf0-d769-4d22-baaf-b811eb29db30.png": {
"x": 2,
"y": 479,
"w": 187,
"h": 24,
"ox": 0,
"oy": 0,
"sw": 187,
"sh": 24,
"ro": false
}
}
\ No newline at end of file
export const letter = {
"v": "5.6.10",
"fr": 30,
"ip": 0,
"op": 17,
"w": 750,
"h": 1624,
"nm": "底",
"layers": [
{
"ind": 1,
"ty": 2,
"nm": "点击信封打开看看",
"refId": "798dbdf0-d769-4d22-baaf-b811eb29db30",
"ks": {
"o": {
"a": 1,
"k": [
{
"t": 0,
"s": [
100
]
},
{
"t": 7,
"s": [
100
]
},
{
"t": 8,
"s": [
0
]
},
{
"t": 15,
"s": [
0
]
},
{
"t": 16,
"s": [
100
]
}
]
},
"r": {
"a": 0,
"k": 0
},
"p": {
"a": 0,
"k": [
383.5,
1003,
0
]
},
"a": {
"a": 0,
"k": [
93.5,
12,
0
]
},
"s": {
"a": 0,
"k": [
100,
100,
100
]
}
},
"ip": 0,
"op": 600
},
{
"ind": 3,
"ty": 2,
"nm": "上",
"refId": "1085e1ca-a5a5-4e1c-9917-fb27efa359f7",
"ks": {
"o": {
"a": 0,
"k": 100
},
"r": {
"a": 0,
"k": 0
},
"p": {
"a": 0,
"k": [
388.5,
887.5,
0
]
},
"a": {
"a": 0,
"k": [
149.5,
87.5,
0
]
},
"s": {
"a": 0,
"k": [
100,
100,
100
]
}
},
"ip": 0,
"op": 600
},
{
"ind": 4,
"ty": 2,
"nm": "字条",
"refId": "6612ca2f-948b-49a3-982f-250e4cd9c635",
"ks": {
"o": {
"a": 0,
"k": 100
},
"r": {
"a": 0,
"k": 0
},
"p": {
"a": 1,
"k": [
{
"t": 0,
"s": [
388.5,
866.5,
0
]
},
{
"t": 8,
"s": [
388.5,
859.5,
0
]
},
{
"t": 16,
"s": [
388.5,
866.5,
0
]
}
]
},
"a": {
"a": 0,
"k": [
124.5,
107.5,
0
]
},
"s": {
"a": 0,
"k": [
100,
100,
100
]
}
},
"ip": 0,
"op": 600
},
{
"ind": 5,
"ty": 2,
"nm": "下",
"refId": "eafa36c0-16e3-4112-b56e-a492a4899a5f",
"ks": {
"o": {
"a": 0,
"k": 100
},
"r": {
"a": 0,
"k": 0
},
"p": {
"a": 0,
"k": [
390,
835.5,
0
]
},
"a": {
"a": 0,
"k": [
149,
121.5,
0
]
},
"s": {
"a": 0,
"k": [
100,
100,
100
]
}
},
"ip": 0,
"op": 600
}
],
"markers": []
}
\ No newline at end of file
...@@ -19,7 +19,7 @@ export class SelectCatPanel extends Panel { ...@@ -19,7 +19,7 @@ export class SelectCatPanel extends Panel {
var bg = Ins.initSprite("db53267d-4141-4d3e-afda-9b523c89be3e"); var bg = Ins.initSprite("db53267d-4141-4d3e-afda-9b523c89be3e");
that.addChild(bg); that.addChild(bg);
that.x = (Ins.stageW - bg.width) >> 1; that.x = (Ins.stageW - bg.width) >> 1;
that.y = Ins.stageH < 1624 ? (Ins.stageH - bg.height + 300) >> 1 : (Ins.stageH - bg.height) >> 1; that.y = (Ins.stageH - bg.height) >> 1;
that.selectSureBtn = Ins.initSprite("628fc38b-7dc0-4c69-aac1-279d60c8f1ed", 185, 804); that.selectSureBtn = Ins.initSprite("628fc38b-7dc0-4c69-aac1-279d60c8f1ed", 185, 804);
that.addChild(that.selectSureBtn); that.addChild(that.selectSureBtn);
......
...@@ -5,7 +5,7 @@ import Root from "./Root"; ...@@ -5,7 +5,7 @@ import Root from "./Root";
import resCanvasList from "../../../game/resCanvasList" import resCanvasList from "../../../game/resCanvasList"
import { MainScene } from "./MainScene"; import { MainScene } from "./MainScene";
import { Ins } from "../Ins"; import { Ins } from "../Ins";
import { showPanel, showToast } from "../../module/ctrls"; import { changeScene, showPanel, showToast } from "../../module/ctrls";
import { SelectCatPanel } from "../panels/selectcatpanel/SelectCatPanel"; import { SelectCatPanel } from "../panels/selectcatpanel/SelectCatPanel";
import { sendTbNet, TbNetName } from "../TaoBaoNet"; import { sendTbNet, TbNetName } from "../TaoBaoNet";
export class StartScene extends Scene { export class StartScene extends Scene {
...@@ -20,7 +20,13 @@ export class StartScene extends Scene { ...@@ -20,7 +20,13 @@ export class StartScene extends Scene {
if(s){ if(s){
if(r.data){ if(r.data){
Ins.userInfo = r.data; Ins.userInfo = r.data;
this.addChild(new MainScene()); /**判断猫咪是否出寝,只在用户进入游戏时判断,后面要根据接口改写,现在先做测试 */
if(r.data.happyCoin>2000){
Ins.catIsOut = true;
}else{
Ins.catIsOut = false;
}
changeScene(MainScene)
}else }else
{ {
showPanel(SelectCatPanel); showPanel(SelectCatPanel);
......
...@@ -5,4 +5,4 @@ ...@@ -5,4 +5,4 @@
</view> </view>
<rule-modal a:if="{{ruleModalVisible}}" onModalClose="closeRuleModal"><text>{{rule}}</text></rule-modal> <rule-modal a:if="{{ruleModalVisible}}" onModalClose="closeRuleModal"><text>{{rule}}</text></rule-modal>
<levelup-modal a:if="{{levelupModalVisible}}" onModalClose="closeLevelupModal"></levelup-modal> <levelup-modal a:if="{{levelupModalVisible}}" onModalClose="closeLevelupModal"></levelup-modal>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment