Commit 6fc969c1 authored by wildfirecode13's avatar wildfirecode13

Merge branch 'master' of gitlab2.dui88.com:wildfirecode13/icbcrpg

parents d3d7b2f5 1621f59c
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
}, },
"dependencies": { "dependencies": {
"@spark/api-base": "^1.0.11", "@spark/api-base": "^1.0.11",
"@spark/guideact": "^1.0.2", "@spark/guideact": "^1.0.10",
"@spark/projectx": "^1.0.3", "@spark/projectx": "^1.0.3",
"@spark/ui": "^1.0.25", "@spark/ui": "^1.0.25",
"axios": "^0.19.2", "axios": "^0.19.2",
......
...@@ -130,13 +130,13 @@ class Select extends Component { ...@@ -130,13 +130,13 @@ class Select extends Component {
nickName:planame, nickName:planame,
figureId:Role[this.nshowidx].figureid figureId:Role[this.nshowidx].figureid
}); });
// updateuinfo = {
// "code": null,
// "data": true,
// "message": null,
// "success": true
// }
if(updateuinfo&&updateuinfo.success){ if(updateuinfo&&updateuinfo.success){
if(updateuinfo.data){
const {result,joyBeans} = updateuinfo.data;
if(result){
dataCenter.setData(Store.newgoldnum,joyBeans);
}
}
getHomeInfo(); getHomeInfo();
this.props.onClose(); this.props.onClose();
dataCenter.setData(Store.needguide,true); dataCenter.setData(Store.needguide,true);
......
...@@ -11,6 +11,7 @@ export const Store = { ...@@ -11,6 +11,7 @@ export const Store = {
//新手引导 //新手引导
needguide:"needguide", needguide:"needguide",
newgoldnum:"newgoldnum",
} }
//人物角色对应 //人物角色对应
export let Role = { export let Role = {
......
...@@ -167,7 +167,7 @@ var GameStage = /** @class */ (function (_super) { ...@@ -167,7 +167,7 @@ var GameStage = /** @class */ (function (_super) {
this.canclick = false; this.canclick = false;
setTimeout(function () { setTimeout(function () {
_this.canclick = true; _this.canclick = true;
}, 1000); }, 200);
var stepdata = this.guideconfig[this.step]; var stepdata = this.guideconfig[this.step];
var skipbtn = stepdata.skipbtn; var skipbtn = stepdata.skipbtn;
var lastlevel; var lastlevel;
...@@ -193,7 +193,7 @@ var GameStage = /** @class */ (function (_super) { ...@@ -193,7 +193,7 @@ var GameStage = /** @class */ (function (_super) {
//步数渲染 //步数渲染
GameStage.prototype.setGuideShow = function () { GameStage.prototype.setGuideShow = function () {
return __awaiter(this, void 0, void 0, function () { return __awaiter(this, void 0, void 0, function () {
var stepdata, hole, txt, role, nextbtn, skipbtn, touch, holetype, holex, holey, holesize, cirectwid, cirecthei, cirectrad, dot1, dot2, dot3, dot4, dot5, dot6, dot7, dot8, text, txtwidth, txtx, txty, txtalign, _a, rolex, roley, _b, firstcont, svga, btnx, btny, btntex, skipx, skipy, skiptex, touchx, touchy, touchsize; var stepdata, hole, txt, role, nextbtn, skipbtn, touch, holetype, holex, holey, holesize, cirectwid, cirecthei, cirectrad, dot1, dot2, dot3, dot4, dot5, dot6, dot7, dot8, text, txtwidth, txtx, txty, txtalign, _a, rolex, roley, _b, goldprize, firstcont, svga, btnx, btny, btntex, skipx, skipy, skiptex, touchx, touchy, touchsize;
return __generator(this, function (_c) { return __generator(this, function (_c) {
switch (_c.label) { switch (_c.label) {
case 0: case 0:
...@@ -281,7 +281,8 @@ var GameStage = /** @class */ (function (_super) { ...@@ -281,7 +281,8 @@ var GameStage = /** @class */ (function (_super) {
_c.label = 3; _c.label = 3;
case 3: case 3:
if (this.step == 1) { if (this.step == 1) {
firstcont = this.getFirstTcont(); goldprize = stepdata.goldprize;
firstcont = this.getFirstTcont(goldprize);
this.rolecont.addChild(firstcont); this.rolecont.addChild(firstcont);
console.log("添加firstCont===>", firstcont); console.log("添加firstCont===>", firstcont);
firstcont.x = rolex - 300; firstcont.x = rolex - 300;
...@@ -345,7 +346,7 @@ var GameStage = /** @class */ (function (_super) { ...@@ -345,7 +346,7 @@ var GameStage = /** @class */ (function (_super) {
}); });
}); });
}; };
GameStage.prototype.getFirstTcont = function () { GameStage.prototype.getFirstTcont = function (goldprize) {
this.firstTcont = new Container(); this.firstTcont = new Container();
this.firstTcont.addChild(new Sprite(TextureCache["guide1"])); this.firstTcont.addChild(new Sprite(TextureCache["guide1"]));
this.firstTcont.width = 633; this.firstTcont.width = 633;
...@@ -355,7 +356,10 @@ var GameStage = /** @class */ (function (_super) { ...@@ -355,7 +356,10 @@ var GameStage = /** @class */ (function (_super) {
this.firstTxt.size = 30; this.firstTxt.size = 30;
this.firstTxt.x = 266; this.firstTxt.x = 266;
this.firstTxt.y = 186; this.firstTxt.y = 186;
this.firstTxt.text = "1000欢趣豆"; if (!goldprize) {
goldprize = 0;
}
this.firstTxt.text = goldprize + "欢趣豆";
this.firstTcont.addChild(this.firstTxt); this.firstTcont.addChild(this.firstTxt);
this.firstTcont.anchorX = 390; this.firstTcont.anchorX = 390;
this.firstTcont.anchorY = 410; this.firstTcont.anchorY = 410;
......
...@@ -6,7 +6,7 @@ import API from '../../api'; ...@@ -6,7 +6,7 @@ import API from '../../api';
import { Aup, AUPOP, AUP_MBX_STATE } from '../../pop'; import { Aup, AUPOP, AUP_MBX_STATE } from '../../pop';
import './main3.less'; import './main3.less';
import { CanvasWidget } from 'spark-utils'; import { CanvasWidget } from 'spark-utils';
import { Guideact } from './bundle';//'@spark/guideact';// import { Guideact } from '@spark/guideact';//'./bundle';//
import { getStepData, widgetConfig } from './widgetConfig'; import { getStepData, widgetConfig } from './widgetConfig';
import { GDispatcher } from "spark-wrapper-fyge" import { GDispatcher } from "spark-wrapper-fyge"
import dataCenter, { Store } from '../../dataCenter'; import dataCenter, { Store } from '../../dataCenter';
......
import dataCenter, { Store } from "../../dataCenter";
let clientWidth = document.body.clientWidth; let clientWidth = document.body.clientWidth;
let clientHeight = document.body.clientHeight; let clientHeight = document.body.clientHeight;
...@@ -39,7 +41,7 @@ let nextbtndata = { ...@@ -39,7 +41,7 @@ let nextbtndata = {
let skipbtndata = { let skipbtndata = {
skipx: (canvaswid - 107) / 2, skipx: (canvaswid - 107) / 2,
skipy: canvashei - 200, skipy: canvashei - 200,
skiplevel: 7, skiplevel: 9,
skiptex: "skipbtn", skiptex: "skipbtn",
}; };
...@@ -60,6 +62,7 @@ function getstep1() { ...@@ -60,6 +62,7 @@ function getstep1() {
txt: null, txt: null,
role: roledata, role: roledata,
nextbtn: null, nextbtn: null,
goldprize:dataCenter.getData(Store.newgoldnum)||0,
skipbtn: skipbtndata, skipbtn: skipbtndata,
touch: touchdata, touch: touchdata,
pagey: 0, pagey: 0,
...@@ -251,12 +254,7 @@ function getstep7(){ ...@@ -251,12 +254,7 @@ function getstep7(){
btny: 910 - offsety, btny: 910 - offsety,
btntex: "nextbtn" btntex: "nextbtn"
}, },
skipbtn: { skipbtn: skipbtndata,
skipx: (canvaswid - 107) / 2,
skipy: canvashei - 200,
skiplevel: 6,
skiptex: "skipbtn",
},
touch: touchdata, touch: touchdata,
pagey: offsety, pagey: offsety,
} }
...@@ -300,12 +298,7 @@ function getstep8(){ ...@@ -300,12 +298,7 @@ function getstep8(){
btny: 1280 - offsety, btny: 1280 - offsety,
btntex: "nextbtn" btntex: "nextbtn"
}, },
skipbtn: { skipbtn: skipbtndata,
skipx: (canvaswid - 107) / 2,
skipy: canvashei - 200,
skiplevel: 6,
skiptex: "skipbtn",
},
touch: touchdata, touch: touchdata,
pagey: offsety, pagey: offsety,
} }
......
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