12345678910111213141516171819202122232425262728293031 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- namespace LoyalSoftSDK
- {
- public class PayItemPanel : MonoBehaviour
- {
- private Text productName;
- private Text orderId;
- private Text time;
- private Text amount;
- private Text status;
- // Use this for initialization
- public void SetInfo(string _productName, string _orderId, string _time, string _amount)
- {
- productName = this.transform.Find("ProductName").gameObject.GetComponent<Text>();
- orderId = this.transform.Find("OrderId").gameObject.GetComponent<Text>();
- time = this.transform.Find("Time").gameObject.GetComponent<Text>();
- amount = this.transform.Find("Amount").gameObject.GetComponent<Text>();
- status = this.transform.Find("Status").gameObject.GetComponent<Text>();
- status.text = "已完成";
- productName.text = _productName;
- orderId.text = _orderId;
- time.text = _time;
- float amt = float.Parse(_amount)/100;
- amount.text = amt.ToString("F2") + "元";
- }
- }
- }
|