Commit cfd317f5 authored by liujiangnan's avatar liujiangnan

fix

parent 4d743eaf
...@@ -5,7 +5,7 @@ import { ...@@ -5,7 +5,7 @@ import {
import { MyCocosSceneComponent_NJ_usercenter } from "../script/MyCocosSceneComponent_NJ_usercenter"; import { MyCocosSceneComponent_NJ_usercenter } from "../script/MyCocosSceneComponent_NJ_usercenter";
const { ccclass, property } = cc._decorator; const { ccclass, property } = cc._decorator;
const AUTH_TOKEN = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwicGhvbmUiOiIxNTUwMDAwMDAwMSIsInNpZ24iOiJjM2VjMDdkNC0wODlmLTQwYWMtOWI3MC04ZDhjOTAwZGQwNzAiLCJ1bmlfc2lnbiI6bnVsbCwiaWF0IjoxNjc2NDIzOTUwLCJleHAiOjE2NzkwMTU5NTB9.MnEgThik1V32RmPuUl7-3xy9XtLwqnYiCQfHPLtIaDc" const AUTH_TOKEN = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwicGhvbmUiOiIxNTUwMDAwMDAwMSIsInNpZ24iOiJiMTVhNWVkOC1hZmIwLTRhY2MtYjQ5MS02NTNlYmJlMmU4NGUiLCJpYXQiOjE3MDEwNzUxMzIsImV4cCI6MTcwMzY2NzEzMn0.-V5ZlOsG-A6OLDPa_6YN8Xr2HqSyLlOo2Db41U-iVHc"
@ccclass @ccclass
export default class SceneComponent extends MyCocosSceneComponent_NJ_usercenter { export default class SceneComponent extends MyCocosSceneComponent_NJ_usercenter {
...@@ -84,7 +84,7 @@ export default class SceneComponent extends MyCocosSceneComponent_NJ_usercenter ...@@ -84,7 +84,7 @@ export default class SceneComponent extends MyCocosSceneComponent_NJ_usercenter
} }
// 购买的有效期 // 购买的有效期
const productRes: any = await asyncCallNetworkApiGet('/api/oxford/v1/product/list', {token: this.token}); const productRes: any = await asyncCallNetworkApiGet('/api/oxford/v1/product/list', {token: this.token});
const products = JSON.parse(productRes).rows; const products = JSON.parse(productRes).rows.filter(item => item.type_==2);
if (products && products.length>0) { if (products && products.length>0) {
const endDate = products[0].syll_end_date.split("T")[0].trim(); const endDate = products[0].syll_end_date.split("T")[0].trim();
cc.find(`Canvas/usercenter/view/content/scollpage/user_center/enddate`).getComponent(cc.Label).string = `有效期至:${endDate}`; cc.find(`Canvas/usercenter/view/content/scollpage/user_center/enddate`).getComponent(cc.Label).string = `有效期至:${endDate}`;
......
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