ui修改
This commit is contained in:
@@ -16,7 +16,7 @@ import { NavigationManager } from "../../manager/NavigationManager";
|
||||
import { Web3PopPanel } from "./Web3PopPanel";
|
||||
import { TipsPanel } from "./TipsPanel";
|
||||
import { logger } from "db://assets/Scripts/Main/Common/Logger";
|
||||
import { PaymentMethod } from 'db://assets/Scripts/chat18x/payment/types';
|
||||
import { PaymentMethod } from "db://assets/Scripts/chat18x/payment/types";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -30,8 +30,6 @@ export class PurchasePanel extends li_BaseView {
|
||||
private vipPrice30: Label;
|
||||
private vipTime30: Label;
|
||||
|
||||
private ScrollView: ScrollView;
|
||||
|
||||
private currentPayType: proto.cs.EnmPayType =
|
||||
proto.cs.EnmPayType.EPT_Cash_INR;
|
||||
private defaultNetworkType: proto.cs.EnmNetworkType =
|
||||
@@ -44,9 +42,7 @@ export class PurchasePanel extends li_BaseView {
|
||||
}
|
||||
|
||||
cashBtnSelecting;
|
||||
cashBtnNotSelect;
|
||||
web3BtnSelecting;
|
||||
web3BtnNotSelect;
|
||||
|
||||
base: Node;
|
||||
openUIDataCT(data: any): void {
|
||||
@@ -66,12 +62,8 @@ export class PurchasePanel extends li_BaseView {
|
||||
this.vipPrice30 = this._nodeTab.vipPrice30.getComponent(Label);
|
||||
this.vipTime30 = this._nodeTab.vipTime30.getComponent(Label);
|
||||
|
||||
this.ScrollView = this._nodeTab.ScrollView.getComponent(ScrollView);
|
||||
|
||||
this.cashBtnSelecting = this._nodeTab.cashBtn.getChildByName("selecting");
|
||||
this.cashBtnNotSelect = this._nodeTab.cashBtn.getChildByName("notSelect");
|
||||
this.web3BtnSelecting = this._nodeTab.web3Btn.getChildByName("selecting");
|
||||
this.web3BtnNotSelect = this._nodeTab.web3Btn.getChildByName("notSelect");
|
||||
|
||||
this.bandBtn();
|
||||
|
||||
@@ -172,7 +164,6 @@ export class PurchasePanel extends li_BaseView {
|
||||
const memberId30 = this.shopData.get30DayMemberId();
|
||||
const price30 = this.shopData.getOriginalPriceById(memberId30);
|
||||
this.vipPrice30.string = `$ ${price30}`;
|
||||
this.ScrollView.scrollToBottom();
|
||||
}
|
||||
|
||||
// 0:cash 1:web3
|
||||
@@ -195,7 +186,12 @@ export class PurchasePanel extends li_BaseView {
|
||||
const isRechargeId = shopData.isRechargeId(id);
|
||||
if (isRechargeId) {
|
||||
// 需要外部支付进行购买
|
||||
this.startPayment(id, this.currentPayType, networkType, PaymentMethod.CashPay);
|
||||
this.startPayment(
|
||||
id,
|
||||
this.currentPayType,
|
||||
networkType,
|
||||
PaymentMethod.CashPay
|
||||
);
|
||||
}
|
||||
//测试用
|
||||
// Utils.sendInnerMsg(InnerMsgCode.PayOrderCreateSucc, {
|
||||
@@ -288,7 +284,12 @@ export class PurchasePanel extends li_BaseView {
|
||||
}
|
||||
|
||||
// 创建订单
|
||||
async startPayment(goodId: number, payType: number, network: number, payMethod: PaymentMethod) {
|
||||
async startPayment(
|
||||
goodId: number,
|
||||
payType: number,
|
||||
network: number,
|
||||
payMethod: PaymentMethod
|
||||
) {
|
||||
// 请求数据
|
||||
const reqData = {
|
||||
goodId,
|
||||
@@ -319,15 +320,15 @@ export class PurchasePanel extends li_BaseView {
|
||||
onClickCashBtn() {
|
||||
if (this.curPayType == 0) return;
|
||||
this.curPayType = 0;
|
||||
this.cashBtnSelecting.active = this.web3BtnNotSelect.active = true;
|
||||
this.cashBtnNotSelect.active = this.web3BtnSelecting.active = false;
|
||||
this.cashBtnSelecting.active = true;
|
||||
this.web3BtnSelecting.active = false;
|
||||
this.updateShops(0);
|
||||
}
|
||||
onClickWeb3Btn() {
|
||||
if (this.curPayType == 1) return;
|
||||
this.curPayType = 1;
|
||||
this.cashBtnSelecting.active = this.web3BtnNotSelect.active = false;
|
||||
this.cashBtnNotSelect.active = this.web3BtnSelecting.active = true;
|
||||
this.cashBtnSelecting.active = false;
|
||||
this.web3BtnSelecting.active = true;
|
||||
this.updateShops(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user