Commit 8345adba authored by liujiangnan's avatar liujiangnan

feat: 支付loading加载

parent 1d1d758c
{
"__type__": "cc.AnimationClip",
"_name": "payloading",
"_objFlags": 0,
"_native": "",
"_duration": 1.0166666666666666,
"sample": 60,
"speed": 2,
"wrapMode": 2,
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "a119a99f-3ea4-40d4-b456-44cec0020da3"
}
},
{
"frame": 0.16666666666666666,
"value": {
"__uuid__": "38cb4684-6038-404a-abe6-65a62e266a89"
}
},
{
"frame": 0.3333333333333333,
"value": {
"__uuid__": "e7fe4aee-4041-4fad-bba7-42079ec43c45"
}
},
{
"frame": 0.5,
"value": {
"__uuid__": "01dd3a4d-eb15-49b3-8566-5e5c06edb8af"
}
},
{
"frame": 0.6666666666666666,
"value": {
"__uuid__": "687fd71a-f71d-468e-af86-ee30d1232a0a"
}
},
{
"frame": 0.8333333333333334,
"value": {
"__uuid__": "18d64b4f-c6d2-4da0-8442-f1d4abe245d7"
}
},
{
"frame": 1,
"value": {
"__uuid__": "a119a99f-3ea4-40d4-b456-44cec0020da3"
}
}
]
}
}
},
"events": []
}
\ No newline at end of file
{
"ver": "2.1.0",
"uuid": "56808348-873f-469c-b9c1-b1acd8e4cf92",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "e72efbf7-5013-4d94-afbc-1e1266612039",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "3173cf34-ae8d-4171-a28b-9b78a48eee9c",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 100,
"height": 100,
"platformSettings": {},
"subMetas": {
"0": {
"ver": "1.0.4",
"uuid": "a119a99f-3ea4-40d4-b456-44cec0020da3",
"rawTextureUuid": "3173cf34-ae8d-4171-a28b-9b78a48eee9c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 11,
"trimY": 6,
"width": 78,
"height": 88,
"rawWidth": 100,
"rawHeight": 100,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "2ce86fd3-e9d5-40ea-baf9-3cfa100d75e7",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 100,
"height": 100,
"platformSettings": {},
"subMetas": {
"1": {
"ver": "1.0.4",
"uuid": "38cb4684-6038-404a-abe6-65a62e266a89",
"rawTextureUuid": "2ce86fd3-e9d5-40ea-baf9-3cfa100d75e7",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 9.5,
"trimX": 13,
"trimY": 8,
"width": 74,
"height": 65,
"rawWidth": 100,
"rawHeight": 100,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "c8e98f70-97e4-4160-967e-eda183f68786",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 100,
"height": 100,
"platformSettings": {},
"subMetas": {
"2": {
"ver": "1.0.4",
"uuid": "e7fe4aee-4041-4fad-bba7-42079ec43c45",
"rawTextureUuid": "c8e98f70-97e4-4160-967e-eda183f68786",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 13,
"trimY": 8,
"width": 74,
"height": 84,
"rawWidth": 100,
"rawHeight": 100,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "4eebe5c1-196e-4c59-9e5a-2adf2cca28fd",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 100,
"height": 100,
"platformSettings": {},
"subMetas": {
"3": {
"ver": "1.0.4",
"uuid": "01dd3a4d-eb15-49b3-8566-5e5c06edb8af",
"rawTextureUuid": "4eebe5c1-196e-4c59-9e5a-2adf2cca28fd",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 11,
"trimY": 6,
"width": 78,
"height": 88,
"rawWidth": 100,
"rawHeight": 100,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "28b2c9c2-1be7-4e13-90e3-365c0e58d3dd",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 100,
"height": 100,
"platformSettings": {},
"subMetas": {
"4": {
"ver": "1.0.4",
"uuid": "687fd71a-f71d-468e-af86-ee30d1232a0a",
"rawTextureUuid": "28b2c9c2-1be7-4e13-90e3-365c0e58d3dd",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -9.5,
"trimX": 11,
"trimY": 25,
"width": 78,
"height": 69,
"rawWidth": 100,
"rawHeight": 100,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "0d12f21b-bdb9-476e-b129-e153607fcd7b",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 100,
"height": 100,
"platformSettings": {},
"subMetas": {
"5": {
"ver": "1.0.4",
"uuid": "18d64b4f-c6d2-4da0-8442-f1d4abe245d7",
"rawTextureUuid": "0d12f21b-bdb9-476e-b129-e153607fcd7b",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 13,
"trimY": 8,
"width": 74,
"height": 84,
"rawWidth": 100,
"rawHeight": 100,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
...@@ -155,6 +155,18 @@ export default class NewClass extends middleLayerBase { ...@@ -155,6 +155,18 @@ export default class NewClass extends middleLayerBase {
await queryPayStatus(); await queryPayStatus();
} }
showPayLoading(pNode) {
const payloading = cc.find(`payloading`, pNode);
payloading.active = true;
payloading.getComponent(cc.Animation).play();
}
hidePayLoading(pNode) {
const payloading = cc.find(`payloading`, pNode);
payloading.getComponent(cc.Animation).stop();
payloading.active = false;
}
// 购买 // 购买
async buy(product) { async buy(product) {
// 苹果支付 // 苹果支付
...@@ -166,11 +178,13 @@ export default class NewClass extends middleLayerBase { ...@@ -166,11 +178,13 @@ export default class NewClass extends middleLayerBase {
cc.find(`buy_status_text`, statusWin).getComponent(cc.Label).string = "支付中"; cc.find(`buy_status_text`, statusWin).getComponent(cc.Label).string = "支付中";
cc.find(`buy_status_sub_text`, statusWin).getComponent(cc.Label).string = "请勿关闭App!"; cc.find(`buy_status_sub_text`, statusWin).getComponent(cc.Label).string = "请勿关闭App!";
statusWin.active = true; statusWin.active = true;
this.showPayLoading(statusWin);
(<any>window).courseware.startBuyToAppStore({ (<any>window).courseware.startBuyToAppStore({
productid: product.id, productid: product.id,
puid: userId, puid: userId,
ios_product_str: product.ios_product_str ios_product_str: product.ios_product_str
}, async (res) => { }, async (res) => {
this.hidePayLoading(statusWin);
console.log(`===成功调用startBuyToAppStoreCallBack===${res}`); console.log(`===成功调用startBuyToAppStoreCallBack===${res}`);
if (typeof (res) == 'string') { if (typeof (res) == 'string') {
res = JSON.parse(res); res = JSON.parse(res);
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"premultiplyAlpha": false, "premultiplyAlpha": false,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 837, "width": 873,
"height": 281, "height": 281,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
......
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