Commit 624fa527 authored by wildfirecode13's avatar wildfirecode13

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

parents 830932de 357a12a9
......@@ -6,7 +6,7 @@
"senceTips":["测试","测试"],
"senceGuide":{
"1":false,
"2":true,
"2":false,
"3":false,
"4":true
}
......
......@@ -2,7 +2,7 @@
"success": true,
"message":"",
"data": {
"catType": 4,
"catType": 2,
"userNick": "Edwise",
"energy": 1000,
"happyCoin":1000,
......
......@@ -2827,6 +2827,10 @@ var RES_1 = __webpack_require__(/*! ../../module/RES */ "./module/RES.ts");
var Module_1 = __webpack_require__(/*! ../../module/views/Module */ "./module/views/Module.ts");
var resCanvasList_1 = __webpack_require__(/*! ../../resCanvasList */ "./resCanvasList.js");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var lanmao02shuohua_1 = __webpack_require__(/*! ../lottieSrc/lottieTs/blueCat/lanmao02shuohua */ "./src/lottieSrc/lottieTs/blueCat/lanmao02shuohua.ts");
var jumaoshuohua_1 = __webpack_require__(/*! ../lottieSrc/lottieTs/orengeCat/jumaoshuohua */ "./src/lottieSrc/lottieTs/orengeCat/jumaoshuohua.ts");
var sanhua02shuohua_2_1 = __webpack_require__(/*! ../lottieSrc/lottieTs/sanhuaCat/sanhua02shuohua 2 */ "./src/lottieSrc/lottieTs/sanhuaCat/sanhua02shuohua 2.ts");
var xianluoshuohua_1 = __webpack_require__(/*! ../lottieSrc/lottieTs/xianluoCat/xianluoshuohua */ "./src/lottieSrc/lottieTs/xianluoCat/xianluoshuohua.ts");
var Guide = (function (_super) {
__extends(Guide, _super);
function Guide(data) {
......@@ -2847,6 +2851,7 @@ var Guide = (function (_super) {
var that = this;
that.index = 0;
that.catPosArr = [80, 40, 60, 70];
var arr = [lanmao02shuohua_1.lanmao02shuohua, jumaoshuohua_1.jumaoshuohua, sanhua02shuohua_2_1.sanhua02shuohua2, xianluoshuohua_1.xianluoshuohua];
that.catImgUUIDArr = ['3e6311fd-15ab-4656-bb84-1c49f4ad4ed9', 'bbb10ff2-f4fb-43a8-83d8-abbb04949f2d', '9fc6517e-debe-4457-88ef-9c733d5bc072', 'ecb49f23-2e65-4507-8be6-1eee021a3b35'];
that.guideUUIDArr_1 = ['5ae12c38-05d8-4105-9101-765e7f32525e', 'e8ad2e4e-925c-4db5-b229-882ee98881a7', 'c549f0a7-085e-444d-b839-4f2172094b0b', '3f48a757-495b-4ed7-957c-9ec95f82ea5e'];
that.guideUUIDArr_2 = ['d37358ea-ba10-4c08-ab3c-7ff682629ada', 'f44dd5ee-2fa3-4a47-b398-527b0398544b', '6583475b-201e-4324-b15e-4632f33f57ec', 'a90aa98b-2ff1-41a2-8a71-749bb76d6ba3'];
......@@ -2854,12 +2859,11 @@ var Guide = (function (_super) {
'f1154565-9a56-4d95-83de-44832d700b5f', '6ab7cbb8-6c9d-412f-9d57-8404465d9e35', 'df6ccefe-756c-4383-aac3-7da9f74b3a0f', '1a4f7c9e-0857-425a-8abe-3dd5c79b2528'];
that.guide = new FYGE.Sprite(Ins_1.Ins.getRes(that['guideUUIDArr_' + that.guideType][0]));
that.addChild(that.guide);
that.catImg = new FYGE.Sprite(Ins_1.Ins.getRes(that.catImgUUIDArr[Ins_1.Ins.userInfo.catType - 1]));
that.addChild(that.catImg);
var x = (Ins_1.Ins.stageW - that.catImg.width) * 0.5;
var y = (Ins_1.Ins.stageH * 0.5);
that.catImg.position.set(x, y);
console.log("引导猫的位置", x, y);
that.catImg1 = new FYGE.Lottie(arr[Ins_1.Ins.userInfo.catType - 1]);
that.addChild(that.catImg1);
if (Ins_1.Ins.userInfo.catType == 2) {
that.catImg1.y = 30;
}
that.guideTouch = new FYGE.Sprite(RES_1.RES.getRes(resCanvasList_1.default["5996c68c-2626-4a97-a36a-8d5af6b777c0"].url));
that.addChild(that.guideTouch);
that.guideTouch.mouseEnable = true;
......@@ -2874,10 +2878,10 @@ var Guide = (function (_super) {
this.guide.texture = RES_1.RES.getRes(resCanvasList_1.default[this['guideUUIDArr_' + this.guideType][this.index]].url);
if (this.guideType == 3 || this.guideType == 4) {
if (this.index == 4 || this.index == 5) {
this.catImg.visible = false;
this.catImg1.visible = false;
}
else {
this.catImg.visible = true;
this.catImg1.visible = true;
}
}
console.log(this.guide.x, this.guide.y);
This diff is collapsed.
......@@ -2829,6 +2829,10 @@ var RES_1 = __webpack_require__(/*! ../../module/RES */ "./module/RES.ts");
var Module_1 = __webpack_require__(/*! ../../module/views/Module */ "./module/views/Module.ts");
var resCanvasList_1 = __webpack_require__(/*! ../../resCanvasList */ "./resCanvasList.js");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var lanmao02shuohua_1 = __webpack_require__(/*! ../lottieSrc/lottieTs/blueCat/lanmao02shuohua */ "./src/lottieSrc/lottieTs/blueCat/lanmao02shuohua.ts");
var jumaoshuohua_1 = __webpack_require__(/*! ../lottieSrc/lottieTs/orengeCat/jumaoshuohua */ "./src/lottieSrc/lottieTs/orengeCat/jumaoshuohua.ts");
var sanhua02shuohua_2_1 = __webpack_require__(/*! ../lottieSrc/lottieTs/sanhuaCat/sanhua02shuohua 2 */ "./src/lottieSrc/lottieTs/sanhuaCat/sanhua02shuohua 2.ts");
var xianluoshuohua_1 = __webpack_require__(/*! ../lottieSrc/lottieTs/xianluoCat/xianluoshuohua */ "./src/lottieSrc/lottieTs/xianluoCat/xianluoshuohua.ts");
var Guide = (function (_super) {
__extends(Guide, _super);
function Guide(data) {
......@@ -2849,6 +2853,7 @@ var Guide = (function (_super) {
var that = this;
that.index = 0;
that.catPosArr = [80, 40, 60, 70];
var arr = [lanmao02shuohua_1.lanmao02shuohua, jumaoshuohua_1.jumaoshuohua, sanhua02shuohua_2_1.sanhua02shuohua2, xianluoshuohua_1.xianluoshuohua];
that.catImgUUIDArr = ['3e6311fd-15ab-4656-bb84-1c49f4ad4ed9', 'bbb10ff2-f4fb-43a8-83d8-abbb04949f2d', '9fc6517e-debe-4457-88ef-9c733d5bc072', 'ecb49f23-2e65-4507-8be6-1eee021a3b35'];
that.guideUUIDArr_1 = ['5ae12c38-05d8-4105-9101-765e7f32525e', 'e8ad2e4e-925c-4db5-b229-882ee98881a7', 'c549f0a7-085e-444d-b839-4f2172094b0b', '3f48a757-495b-4ed7-957c-9ec95f82ea5e'];
that.guideUUIDArr_2 = ['d37358ea-ba10-4c08-ab3c-7ff682629ada', 'f44dd5ee-2fa3-4a47-b398-527b0398544b', '6583475b-201e-4324-b15e-4632f33f57ec', 'a90aa98b-2ff1-41a2-8a71-749bb76d6ba3'];
......@@ -2856,12 +2861,11 @@ var Guide = (function (_super) {
'f1154565-9a56-4d95-83de-44832d700b5f', '6ab7cbb8-6c9d-412f-9d57-8404465d9e35', 'df6ccefe-756c-4383-aac3-7da9f74b3a0f', '1a4f7c9e-0857-425a-8abe-3dd5c79b2528'];
that.guide = new FYGE.Sprite(Ins_1.Ins.getRes(that['guideUUIDArr_' + that.guideType][0]));
that.addChild(that.guide);
that.catImg = new FYGE.Sprite(Ins_1.Ins.getRes(that.catImgUUIDArr[Ins_1.Ins.userInfo.catType - 1]));
that.addChild(that.catImg);
var x = (Ins_1.Ins.stageW - that.catImg.width) * 0.5;
var y = (Ins_1.Ins.stageH * 0.5);
that.catImg.position.set(x, y);
console.log("引导猫的位置", x, y);
that.catImg1 = new FYGE.Lottie(arr[Ins_1.Ins.userInfo.catType - 1]);
that.addChild(that.catImg1);
if (Ins_1.Ins.userInfo.catType == 2) {
that.catImg1.y = 30;
}
that.guideTouch = new FYGE.Sprite(RES_1.RES.getRes(resCanvasList_1.default["5996c68c-2626-4a97-a36a-8d5af6b777c0"].url));
that.addChild(that.guideTouch);
that.guideTouch.mouseEnable = true;
......@@ -2876,10 +2880,10 @@ var Guide = (function (_super) {
this.guide.texture = RES_1.RES.getRes(resCanvasList_1.default[this['guideUUIDArr_' + this.guideType][this.index]].url);
if (this.guideType == 3 || this.guideType == 4) {
if (this.index == 4 || this.index == 5) {
this.catImg.visible = false;
this.catImg1.visible = false;
}
else {
this.catImg.visible = true;
this.catImg1.visible = true;
}
}
console.log(this.guide.x, this.guide.y);
......@@ -3,6 +3,10 @@ import { Module } from "../../module/views/Module";
import resCanvasList from "../../resCanvasList";
import { MSG } from "../Enum";
import { Ins } from "../Ins";
import { lanmao02shuohua } from "../lottieSrc/lottieTs/blueCat/lanmao02shuohua";
import { jumaoshuohua } from "../lottieSrc/lottieTs/orengeCat/jumaoshuohua";
import { sanhua02shuohua2 } from "../lottieSrc/lottieTs/sanhuaCat/sanhua02shuohua 2";
import { xianluoshuohua } from "../lottieSrc/lottieTs/xianluoCat/xianluoshuohua";
import { GDispatcher } from "../Main";
export class Guide extends Module {
......@@ -35,12 +39,15 @@ export class Guide extends Module {
callBack;
catImg1:FYGE.Lottie;
initUi() {
var that = this;
that.index = 0;
that.catPosArr = [80, 40, 60, 70];
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']
......@@ -55,12 +62,17 @@ export class Guide extends Module {
that.guide = new FYGE.Sprite(Ins.getRes(that['guideUUIDArr_' + that.guideType][0]));
that.addChild(that.guide);
that.catImg = new FYGE.Sprite(Ins.getRes(that.catImgUUIDArr[Ins.userInfo.catType - 1]))
that.addChild(that.catImg);
var x = (Ins.stageW - that.catImg.width) * 0.5;
var y = (Ins.stageH * 0.5)
that.catImg.position.set(x , y);
console.log("引导猫的位置",x,y)
// that.catImg = new FYGE.Sprite(Ins.getRes(that.catImgUUIDArr[Ins.userInfo.catType - 1]))
// that.addChild(that.catImg);
that.catImg1 = new FYGE.Lottie(arr[Ins.userInfo.catType - 1])
that.addChild(that.catImg1);
if(Ins.userInfo.catType == 2){
that.catImg1.y = 30;
}
// var x = (Ins.stageW - that.catImg.width) * 0.5;
// var y = (Ins.stageH * 0.5)
// that.catImg.position.set(x , y);
// console.log("引导猫的位置",x,y)
that.guideTouch = new FYGE.Sprite(RES.getRes(resCanvasList["5996c68c-2626-4a97-a36a-8d5af6b777c0"].url));
that.addChild(that.guideTouch);
......@@ -79,9 +91,9 @@ export class Guide extends Module {
this.guide.texture = RES.getRes(resCanvasList[this['guideUUIDArr_' + this.guideType][this.index]].url)
if (this.guideType == 3 || this.guideType == 4) {
if (this.index == 4 || this.index == 5) {
this.catImg.visible = false;
this.catImg1.visible = false;
} else {
this.catImg.visible = true;
this.catImg1.visible = true;
}
}
console.log(this.guide.x, this.guide.y)
......
......@@ -13,6 +13,17 @@ Component({
catImg: ""
},
methods: {
/**获取字符串字符长度 */
getlen(str) {
var strlen = 0;
for (var i = 0; i < str.length; i++) {
if (str.charCodeAt(i) > 255) //如果是汉字,则字符串长度加2
strlen += 2;
else
strlen++;
}
return strlen;
},
onModalClose() {
const {
onModalClose
......@@ -25,7 +36,7 @@ Component({
} = this.props;
onSelectCatOk && onSelectCatOk(this.props.catName);
},
/**随机名字 */
/**随机名字,需要根据运营数据可配置 */
randomName() {
console.log("随即名字")
let name = "Edwise"
......@@ -44,11 +55,16 @@ Component({
/**确认 */
async catNameSure() {
let name = this.props.catName;
if (name.length <= 0) {
let len = this.getlen(name);
if (len <= 0) {
my.showToast({
content: "名字不能为空哦",
});
} else {
}else if(len>12){
my.showToast({
content: "名字过长哦",
});
}else {
my.showLoading();
/**检查敏感词 */
......
......@@ -2829,6 +2829,10 @@ var RES_1 = __webpack_require__(/*! ../../module/RES */ "./module/RES.ts");
var Module_1 = __webpack_require__(/*! ../../module/views/Module */ "./module/views/Module.ts");
var resCanvasList_1 = __webpack_require__(/*! ../../resCanvasList */ "./resCanvasList.js");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var lanmao02shuohua_1 = __webpack_require__(/*! ../lottieSrc/lottieTs/blueCat/lanmao02shuohua */ "./src/lottieSrc/lottieTs/blueCat/lanmao02shuohua.ts");
var jumaoshuohua_1 = __webpack_require__(/*! ../lottieSrc/lottieTs/orengeCat/jumaoshuohua */ "./src/lottieSrc/lottieTs/orengeCat/jumaoshuohua.ts");
var sanhua02shuohua_2_1 = __webpack_require__(/*! ../lottieSrc/lottieTs/sanhuaCat/sanhua02shuohua 2 */ "./src/lottieSrc/lottieTs/sanhuaCat/sanhua02shuohua 2.ts");
var xianluoshuohua_1 = __webpack_require__(/*! ../lottieSrc/lottieTs/xianluoCat/xianluoshuohua */ "./src/lottieSrc/lottieTs/xianluoCat/xianluoshuohua.ts");
var Guide = (function (_super) {
__extends(Guide, _super);
function Guide(data) {
......@@ -2849,6 +2853,7 @@ var Guide = (function (_super) {
var that = this;
that.index = 0;
that.catPosArr = [80, 40, 60, 70];
var arr = [lanmao02shuohua_1.lanmao02shuohua, jumaoshuohua_1.jumaoshuohua, sanhua02shuohua_2_1.sanhua02shuohua2, xianluoshuohua_1.xianluoshuohua];
that.catImgUUIDArr = ['3e6311fd-15ab-4656-bb84-1c49f4ad4ed9', 'bbb10ff2-f4fb-43a8-83d8-abbb04949f2d', '9fc6517e-debe-4457-88ef-9c733d5bc072', 'ecb49f23-2e65-4507-8be6-1eee021a3b35'];
that.guideUUIDArr_1 = ['5ae12c38-05d8-4105-9101-765e7f32525e', 'e8ad2e4e-925c-4db5-b229-882ee98881a7', 'c549f0a7-085e-444d-b839-4f2172094b0b', '3f48a757-495b-4ed7-957c-9ec95f82ea5e'];
that.guideUUIDArr_2 = ['d37358ea-ba10-4c08-ab3c-7ff682629ada', 'f44dd5ee-2fa3-4a47-b398-527b0398544b', '6583475b-201e-4324-b15e-4632f33f57ec', 'a90aa98b-2ff1-41a2-8a71-749bb76d6ba3'];
......@@ -2856,12 +2861,11 @@ var Guide = (function (_super) {
'f1154565-9a56-4d95-83de-44832d700b5f', '6ab7cbb8-6c9d-412f-9d57-8404465d9e35', 'df6ccefe-756c-4383-aac3-7da9f74b3a0f', '1a4f7c9e-0857-425a-8abe-3dd5c79b2528'];
that.guide = new FYGE.Sprite(Ins_1.Ins.getRes(that['guideUUIDArr_' + that.guideType][0]));
that.addChild(that.guide);
that.catImg = new FYGE.Sprite(Ins_1.Ins.getRes(that.catImgUUIDArr[Ins_1.Ins.userInfo.catType - 1]));
that.addChild(that.catImg);
var x = (Ins_1.Ins.stageW - that.catImg.width) * 0.5;
var y = (Ins_1.Ins.stageH * 0.5);
that.catImg.position.set(x, y);
console.log("引导猫的位置", x, y);
that.catImg1 = new FYGE.Lottie(arr[Ins_1.Ins.userInfo.catType - 1]);
that.addChild(that.catImg1);
if (Ins_1.Ins.userInfo.catType == 2) {
that.catImg1.y = 30;
}
that.guideTouch = new FYGE.Sprite(RES_1.RES.getRes(resCanvasList_1.default["5996c68c-2626-4a97-a36a-8d5af6b777c0"].url));
that.addChild(that.guideTouch);
that.guideTouch.mouseEnable = true;
......@@ -2876,10 +2880,10 @@ var Guide = (function (_super) {
this.guide.texture = RES_1.RES.getRes(resCanvasList_1.default[this['guideUUIDArr_' + this.guideType][this.index]].url);
if (this.guideType == 3 || this.guideType == 4) {
if (this.index == 4 || this.index == 5) {
this.catImg.visible = false;
this.catImg1.visible = false;
}
else {
this.catImg.visible = true;
this.catImg1.visible = true;
}
}
console.log(this.guide.x, this.guide.y);
......@@ -342,11 +342,13 @@ Page({
* 获取活动信息
*/
async getActivityBaseInfoById(){
my.showLoading();
const {success,data} = await API.getActivityBaseInfoById().catch(r=>{
commonToast(r&&r.message)
})||{};
if(success){
my.hideLoading();
this.setData({
activityBaseInfo:data
})
......
......@@ -2829,6 +2829,10 @@ var RES_1 = __webpack_require__(/*! ../../module/RES */ "./module/RES.ts");
var Module_1 = __webpack_require__(/*! ../../module/views/Module */ "./module/views/Module.ts");
var resCanvasList_1 = __webpack_require__(/*! ../../resCanvasList */ "./resCanvasList.js");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var lanmao02shuohua_1 = __webpack_require__(/*! ../lottieSrc/lottieTs/blueCat/lanmao02shuohua */ "./src/lottieSrc/lottieTs/blueCat/lanmao02shuohua.ts");
var jumaoshuohua_1 = __webpack_require__(/*! ../lottieSrc/lottieTs/orengeCat/jumaoshuohua */ "./src/lottieSrc/lottieTs/orengeCat/jumaoshuohua.ts");
var sanhua02shuohua_2_1 = __webpack_require__(/*! ../lottieSrc/lottieTs/sanhuaCat/sanhua02shuohua 2 */ "./src/lottieSrc/lottieTs/sanhuaCat/sanhua02shuohua 2.ts");
var xianluoshuohua_1 = __webpack_require__(/*! ../lottieSrc/lottieTs/xianluoCat/xianluoshuohua */ "./src/lottieSrc/lottieTs/xianluoCat/xianluoshuohua.ts");
var Guide = (function (_super) {
__extends(Guide, _super);
function Guide(data) {
......@@ -2849,6 +2853,7 @@ var Guide = (function (_super) {
var that = this;
that.index = 0;
that.catPosArr = [80, 40, 60, 70];
var arr = [lanmao02shuohua_1.lanmao02shuohua, jumaoshuohua_1.jumaoshuohua, sanhua02shuohua_2_1.sanhua02shuohua2, xianluoshuohua_1.xianluoshuohua];
that.catImgUUIDArr = ['3e6311fd-15ab-4656-bb84-1c49f4ad4ed9', 'bbb10ff2-f4fb-43a8-83d8-abbb04949f2d', '9fc6517e-debe-4457-88ef-9c733d5bc072', 'ecb49f23-2e65-4507-8be6-1eee021a3b35'];
that.guideUUIDArr_1 = ['5ae12c38-05d8-4105-9101-765e7f32525e', 'e8ad2e4e-925c-4db5-b229-882ee98881a7', 'c549f0a7-085e-444d-b839-4f2172094b0b', '3f48a757-495b-4ed7-957c-9ec95f82ea5e'];
that.guideUUIDArr_2 = ['d37358ea-ba10-4c08-ab3c-7ff682629ada', 'f44dd5ee-2fa3-4a47-b398-527b0398544b', '6583475b-201e-4324-b15e-4632f33f57ec', 'a90aa98b-2ff1-41a2-8a71-749bb76d6ba3'];
......@@ -2856,12 +2861,11 @@ var Guide = (function (_super) {
'f1154565-9a56-4d95-83de-44832d700b5f', '6ab7cbb8-6c9d-412f-9d57-8404465d9e35', 'df6ccefe-756c-4383-aac3-7da9f74b3a0f', '1a4f7c9e-0857-425a-8abe-3dd5c79b2528'];
that.guide = new FYGE.Sprite(Ins_1.Ins.getRes(that['guideUUIDArr_' + that.guideType][0]));
that.addChild(that.guide);
that.catImg = new FYGE.Sprite(Ins_1.Ins.getRes(that.catImgUUIDArr[Ins_1.Ins.userInfo.catType - 1]));
that.addChild(that.catImg);
var x = (Ins_1.Ins.stageW - that.catImg.width) * 0.5;
var y = (Ins_1.Ins.stageH * 0.5);
that.catImg.position.set(x, y);
console.log("引导猫的位置", x, y);
that.catImg1 = new FYGE.Lottie(arr[Ins_1.Ins.userInfo.catType - 1]);
that.addChild(that.catImg1);
if (Ins_1.Ins.userInfo.catType == 2) {
that.catImg1.y = 30;
}
that.guideTouch = new FYGE.Sprite(RES_1.RES.getRes(resCanvasList_1.default["5996c68c-2626-4a97-a36a-8d5af6b777c0"].url));
that.addChild(that.guideTouch);
that.guideTouch.mouseEnable = true;
......@@ -2876,10 +2880,10 @@ var Guide = (function (_super) {
this.guide.texture = RES_1.RES.getRes(resCanvasList_1.default[this['guideUUIDArr_' + this.guideType][this.index]].url);
if (this.guideType == 3 || this.guideType == 4) {
if (this.index == 4 || this.index == 5) {
this.catImg.visible = false;
this.catImg1.visible = false;
}
else {
this.catImg.visible = true;
this.catImg1.visible = true;
}
}
console.log(this.guide.x, this.guide.y);
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment