This commit is contained in:
YZ\249929363 2025-08-07 16:55:07 +08:00
parent b52fdb1385
commit 06e41bf83a
12 changed files with 1287 additions and 891 deletions

View File

@ -7978,8 +7978,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 40,
"height": 56
"width": 18,
"height": 48
},
"_anchorPoint": {
"__type__": "cc.Vec2",

View File

@ -726,11 +726,9 @@ export default class JiaZai extends cc.Component {
}
let name = "补发充值成功" + productId;
cc.fx.GameTool.shushu_Track("payment", dataSuccess);
let version = cc.fx.GameTool.getWechatGameVersion();
if (version == "正式版") {
MiniGameSdk.API.yinli_Pay(price, order.outTradeNo, name);
}
console.log("引力付费透传", price, order.outTradeNo, name);
MiniGameSdk.API.yinli_Pay(price, order.outTradeNo, name);
} else {
// 如果当前订单不处理,直接处理下一个订单

View File

@ -11,7 +11,7 @@ import NumberToImage from "./NumberToImage";
import SceneManager from "./SceneManager";
import { MiniGameSdk } from "./Sdk/MiniGameSdk";
import Animation = cc.Animation;
import Revive from "./Revive";
// import Revive from "./Revive";
import Utils from "./module/Pay/Utils";
const { ccclass, property } = cc._decorator;
@ -664,19 +664,19 @@ export default class MapConroler extends cc.Component {
if (type == "wall") opacity = 255;
if (type == "turn") opacity = 250;
if (this.mapBlocksWall[pointA.x][pointA.y].opacity == 249 && this.mapBlocksWall[pointB.x][pointB.y].opacity == 249) {
console.log("缺角", pointA, pointB);
//console.log("缺角", pointA, pointB);
return null;
}
else if (this.mapBlocksWall[pointA.x][pointA.y].opacity == 249 && this.mapBlocksWall[pointC.x][pointC.y].opacity == 249) {
console.log("缺角", pointA, pointC);
//console.log("缺角", pointA, pointC);
return null;
}
else if (this.mapBlocksWall[pointA.x][pointA.y].opacity == 249 && this.mapBlocksWall[pointD.x][pointD.y].opacity == 249) {
console.log("缺角", pointA, pointD);
//console.log("缺角", pointA, pointD);
return null;
}
else if (this.mapBlocksWall[pointA.x][pointA.y].opacity == 249 && this.mapBlocksWall[pointE.x][pointE.y].opacity == 249) {
console.log("缺角", pointA, pointE);
//console.log("缺角", pointA, pointE);
return null;
}
@ -1840,7 +1840,7 @@ export default class MapConroler extends cc.Component {
result: "fail"
}
if (cc.fx.GameConfig.GM_INFO.revive == 0 && this.revive) {
this.revive.getComponent(Revive).offShow();
this.revive.getComponent("Revive").offShow();
this.node.active = false;
}
cc.fx.GameTool.shushu_Track("finish_stage", data);
@ -1929,7 +1929,7 @@ export default class MapConroler extends cc.Component {
.to(0.15, { scale: 1.0 }, { easing: 'sineOut' })
.start();
this.node.parent.parent.getChildByName("Lose").getChildByName("lose").getChildByName("Time").active = true;
this.revive.getComponent(Revive).init();
this.revive.getComponent("Revive").init();
this.node.parent.parent.getChildByName("Lose").getChildByName("lose").getChildByName("Boom").active = false;
if (cc.fx.GameConfig.GM_INFO.otherLevel > 0) {
this.node.parent.parent.getChildByName("Lose").getChildByName("share").active = false;

View File

@ -59,6 +59,7 @@ export default class Revive extends cc.Component {
}
cc.fx.GameTool.shushu_Track("payment", dataSuccess);
let name = "购买金币道具:" + iosID;
console.log("引力付费透传", iosAmount, iosOutTradeNo, name);
MiniGameSdk.API.yinli_Pay(iosAmount, iosOutTradeNo, name)
Utils.setPayInfo(
(res) => {
@ -135,8 +136,15 @@ export default class Revive extends cc.Component {
}
}
init() {
this.addListener();
this.btn_Touch = true;
if (cc.fx.GameConfig.GM_INFO.revive == 1) {
this.node.active = false;
}
}
addListener() {
if (cc.sys.platform === cc.sys.WECHAT_GAME) {
this.onShowListener = null;
// 定义监听函数
this.onShowListener = () => {
this.onShow();
@ -144,10 +152,6 @@ export default class Revive extends cc.Component {
//@ts-ignore
wx.onShow(this.onShowListener);
}
this.btn_Touch = true;
if (cc.fx.GameConfig.GM_INFO.revive == 1) {
this.node.active = false;
}
}
//购买
@ -315,6 +319,7 @@ export default class Revive extends cc.Component {
}
cc.fx.GameTool.shushu_Track("payment", dataSuccess);
let name = "购买金币道具:" + productId;
console.log("引力付费透传", price, Utils.outTradeNo, name);
MiniGameSdk.API.yinli_Pay(price, Utils.outTradeNo, name)
console.log("7.14_______________充值成功,轮训成功,准备发货");
Utils.setPayInfo(

View File

@ -1192,7 +1192,7 @@ export namespace MiniGameSdk {
current_health: cc.fx.GameConfig.GM_INFO.hp, //当前体力值
tmp_coin: cc.fx.GameConfig.GM_INFO.coin,//当前金币
version: cc.fx.GameConfig.GM_INFO.version.toString(),//当前版本号
uid: cc.fx.GameConfig.GM_INFO.uid.toString() //用户id
user_id: cc.fx.GameConfig.GM_INFO.uid.toString() //用户id
};
if (register_time != null) {
// console.log("设置用户公共属性注册:————————————", register_time);
@ -1202,7 +1202,7 @@ export namespace MiniGameSdk {
tmp_coin: cc.fx.GameConfig.GM_INFO.coin,//当前金币
version: cc.fx.GameConfig.GM_INFO.version.toString(),
register_time: register_time,
uid: cc.fx.GameConfig.GM_INFO.uid.toString(), //用户id
user_id: cc.fx.GameConfig.GM_INFO.uid.toString(), //用户id
pay_user: pay_user
};
}
@ -1213,7 +1213,7 @@ export namespace MiniGameSdk {
current_health: cc.fx.GameConfig.GM_INFO.hp, //当前体力值
tmp_coin: cc.fx.GameConfig.GM_INFO.coin,//当前金币
version: cc.fx.GameConfig.GM_INFO.version.toString(),
uid: cc.fx.GameConfig.GM_INFO.uid.toString(), //用户id
user_id: cc.fx.GameConfig.GM_INFO.uid.toString(), //用户id
pay_user: pay_user
}
}
@ -1337,7 +1337,14 @@ export namespace MiniGameSdk {
*/
static yinli_Pay(payAmount, orderId, payReason) {
if (typeof wx !== 'undefined' && wx !== null) {
API._ge.payEvent(payAmount, "CNY", orderId, payReason, "微信");
let version = cc.fx.GameTool.getWechatGameVersion();
if (version == "开发版" || version == "体验版") {
}
else {
API._ge.payEvent(payAmount, "CNY", orderId, payReason, "微信");
}
console.log("版本:", version);
}
}

View File

@ -41,6 +41,7 @@ export default class NewClass extends cc.Component {
}
onShow() {
console.log("后台进入前台monthlcard");
if (cc.sys.platform === cc.sys.WECHAT_GAME) {
console.log("从后台进入前台订单号:", cc.fx.GameConfig.GM_INFO.iosOutTradeNo);
if (cc.fx.GameConfig.GM_INFO.iosOutTradeNo != null && cc.fx.GameConfig.GM_INFO.iosOutTradeNo != "") {
@ -66,6 +67,7 @@ export default class NewClass extends cc.Component {
}
cc.fx.GameTool.shushu_Track("payment", dataSuccess);
let name = "购买金币道具:" + iosID;
console.log("引力付费透传", iosAmount, iosOutTradeNo, name);
MiniGameSdk.API.yinli_Pay(iosAmount, iosOutTradeNo, name)
Utils.setPayInfo(
(res) => {
@ -152,9 +154,9 @@ export default class NewClass extends cc.Component {
}
init() {
if (cc.sys.platform === cc.sys.WECHAT_GAME) {
this.onShowListener = null;
// 定义监听函数
this.onShowListener = () => {
console.log("微信小游戏切到前台,monthCard");
this.onShow();
};
//@ts-ignore
@ -261,7 +263,7 @@ export default class NewClass extends cc.Component {
// update (dt) {}
}
closeMonthCard() {
this.init();
// this.init();
//获取商城界面更新图标方法
let shop = cc.find("Canvas/shop");
if (shop) {
@ -273,8 +275,10 @@ export default class NewClass extends cc.Component {
// 移除 wx.onShow 监听器
if (cc.sys.platform === cc.sys.WECHAT_GAME && this.onShowListener) {
console.log("月卡关闭监听");
//@ts-ignore
wx.offShow(this.onShowListener);
}
//jiazai
const jiazaiNode = cc.find("Canvas"); // 假设 JiaZai 挂在 Canvas 节点
@ -416,6 +420,7 @@ export default class NewClass extends cc.Component {
}
cc.fx.GameTool.shushu_Track("payment", dataSuccess);
let name = "购买金币道具:" + productId;
console.log("引力付费透传", price, Utils.outTradeNo, name);
MiniGameSdk.API.yinli_Pay(price, Utils.outTradeNo, name)
console.log("7.14_______________充值成功,轮训成功,准备发货");
Utils.setPayInfo(

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 94 KiB

View File

@ -8,8 +8,8 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 503,
"height": 1104,
"width": 256,
"height": 2040,
"platformSettings": {},
"subMetas": {}
}

View File

@ -635,8 +635,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 47,
"height": 63
"width": 25,
"height": 53
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@ -745,7 +745,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 47,
"height": 63
"height": 51
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@ -854,7 +854,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 47,
"height": 63
"height": 51
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@ -963,7 +963,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 47,
"height": 63
"height": 51
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@ -1270,7 +1270,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 33,
"width": 25,
"height": 37
},
"_anchorPoint": {
@ -1488,7 +1488,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 33,
"width": 25,
"height": 37
},
"_anchorPoint": {
@ -1706,7 +1706,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 33,
"width": 25,
"height": 37
},
"_anchorPoint": {
@ -1893,8 +1893,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 40,
"height": 46
"width": 38,
"height": 44
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@ -2003,7 +2003,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 40,
"height": 46
"height": 44
},
"_anchorPoint": {
"__type__": "cc.Vec2",

View File

@ -57,15 +57,15 @@ export default class NewClass extends cc.Component {
start() {
this.btn_Touch = true;
this.openShop();
this.init();
}
init() {
this.onShowListener = null;
console.log("初始化");
if (cc.sys.platform === cc.sys.WECHAT_GAME) {
// 定义监听函数
this.onShowListener = () => {
console.log("回到前台");
console.log("回到前台shop");
this.onShow();
};
//@ts-ignore
@ -187,7 +187,7 @@ export default class NewClass extends cc.Component {
}
onShow() {
console.log("从后台进入前台 onShow");
console.log("从后台进入前台 shop");
//如果月卡打开就return
if (this.monthCard) {
return;
@ -222,9 +222,10 @@ export default class NewClass extends cc.Component {
cc.fx.GameTool.shushu_Track("payment", dataSuccess);
let name = "购买金币道具:" + iosID;
let version = cc.fx.GameTool.getWechatGameVersion();
if (version == "正式版") {
MiniGameSdk.API.yinli_Pay(iosAmount, iosOutTradeNo, name)
}
// if (version == "正式版") {
console.log("引力付费透传", iosAmount, iosOutTradeNo, name);
MiniGameSdk.API.yinli_Pay(iosAmount, iosOutTradeNo, name)
// }
Utils.setPayInfo(
(res) => {
@ -546,10 +547,10 @@ export default class NewClass extends cc.Component {
cc.fx.GameTool.shushu_Track("payment", dataSuccess);
let name = "购买金币道具:" + productId;
let version = cc.fx.GameTool.getWechatGameVersion();
if (version == "正式版") {
MiniGameSdk.API.yinli_Pay(price, Utils.outTradeNo, name);
}
// if (version == "正式版") {
console.log("引力付费透传", price, Utils.outTradeNo, name);
MiniGameSdk.API.yinli_Pay(price, Utils.outTradeNo, name);
// }
console.log("7.14_______________充值成功,轮训成功,准备发货");
Utils.setPayInfo(
(res) => {