dzduole 1 일 전
부모
커밋
354c9af917

+ 2 - 2
art/fgui/assets/game/UISecretary/UIShop/component/Component58_11.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="616,637" designImageLayer="1">
-  <controller name="c1" pages="0,球杆,1,道具" selected="1"/>
+  <controller name="c1" pages="0,球杆,1,道具" selected="0"/>
   <displayList>
     <image id="n23_qlo0" name="n23" src="qlo041k" fileName="UISkill/asset/qq_dtd.png" xy="-1,0" size="616,637"/>
     <image id="n41_9d32" name="n41" src="qlo041j" fileName="UISkill/asset/qq_dtd2.png" xy="559,0" size="56,636" alpha="0.4">
@@ -8,7 +8,7 @@
     </image>
     <component id="n45_lp3l" name="n_qiuGan" src="lp3lv4j2" fileName="UISecretary/UIShop/component/Component98_3.xml" xy="560,1" controller="c1,0"/>
     <component id="n44_s46i" name="n_daoju" src="s46iv4f0" fileName="UISecretary/UIShop/component/Component98_1.xml" xy="560,132" controller="c1,1"/>
-    <list id="n37_qlo0" name="myList" xy="9,9" size="541,615" overflow="scroll" lineGap="10" defaultItem="ui://isxx5ak7uqohv4lr" align="center" autoClearItems="true">
+    <list id="n37_qlo0" name="myList" xy="9,11" size="541,615" overflow="scroll" lineGap="10" defaultItem="ui://isxx5ak7uqohv4lr" align="center" autoClearItems="true">
       <gearDisplay controller="c1" pages="0"/>
       <item/>
       <item/>

+ 1 - 1
art/fgui/assets/game/UISecretary/UIShop/component/btn_buy.xml

@@ -12,5 +12,5 @@
     </image>
     <text id="n2_so7l" name="n2" xy="25,16" size="190,42" fontSize="30" color="#ffffff" align="center" vAlign="middle" autoSize="none" bold="true" text="Buy"/>
   </displayList>
-  <Button/>
+  <Button downEffect="dark" downEffectValue="0.8"/>
 </component>

BIN
client/laya/bin/asset/fgui/game.obj


+ 15 - 27
client/laya/bin/js/bundle.js

@@ -872,7 +872,7 @@
             }
         }
         sendPost2025(reqUrl, data, call) {
-            let isDev = false;
+            let isDev = true;
             let urlTop = "https://api.kessongame.site/";
             let urlMid = urlTop + "prod-api/api/game/";
             if (isDev) {
@@ -5831,27 +5831,22 @@
             this.initData();
         }
         initData() {
+            this.ui.btn_buy.onClick(this, this.buySp);
             this.ui.btn_buy.onClick(this, this.buyDj);
             let data = cfgTable.daoJuData[this.index + 1];
             console.log('zh:' + JSON.stringify(data));
-            this.ui.nameTxt.text = data.name;
-            this.ui.n_jiaGe.text = data.price + "";
-            this.ui.n_zuanShi.text = data.price + "";
+            this.ui.nameTxt.text = data.spbt;
+            this.ui.n_jiaGe.text = data.spjg + "";
+            this.ui.n_zuanShi.text = data.spjg + "";
             let baseUrl = "asset/sound/ogg/";
             this.ui.zsImg.url = xGame.common.getGameIconUrl(data.img);
         }
         buyDj() {
             xGame.soundMgr.playSound(xGame.common.btnClickStr);
         }
-        buyBallRod() {
-        }
-        logEventForGouMaiGan(qiuGanName) {
-            const ev = {
-                value: qiuGanName
-            };
-            const jsonStr = JSON.stringify(ev);
-            console.log('zh:ts  logEventForGouMaiGan req jsonStr=' + jsonStr);
-            JSBridgeUtils.instance.logEventForAdHaveParams('iap_start', jsonStr);
+        buySp() {
+            let data = cfgTable.daoJuData[this.index + 1];
+            console.log('zh:点击购买 data =' + JSON.stringify(data));
         }
     }
 
@@ -5884,7 +5879,6 @@
         }
         show(type) {
             super.show();
-            console.log('zh:show type = ' + type);
             this.curType = type == 0 ? "qiugan" : "daoju";
             this.switchBtn("qiugan");
             this.playSecretaryIdle();
@@ -22385,27 +22379,22 @@
             this.initData();
         }
         initData() {
+            this.ui.btn_buy.onClick(this, this.buySp);
             this.ui.btn_buy.onClick(this, this.buyDj);
             let data = cfgTable.daoJuData[this.index + 1];
             console.log('zh:' + JSON.stringify(data));
-            this.ui.nameTxt.text = data.name;
-            this.ui.n_jiaGe.text = data.price + "";
-            this.ui.n_zuanShi.text = data.price + "";
+            this.ui.nameTxt.text = data.spbt;
+            this.ui.n_jiaGe.text = data.spjg + "";
+            this.ui.n_zuanShi.text = data.spjg + "";
             let baseUrl = "asset/sound/ogg/";
             this.ui.zsImg.url = xGame.common.getGameIconUrl(data.img);
         }
         buyDj() {
             xGame.soundMgr.playSound(xGame.common.btnClickStr);
         }
-        buyBallRod() {
-        }
-        logEventForGouMaiGan(qiuGanName) {
-            const ev = {
-                value: qiuGanName
-            };
-            const jsonStr = JSON.stringify(ev);
-            console.log('zh:ts  logEventForGouMaiGan req jsonStr=' + jsonStr);
-            JSBridgeUtils.instance.logEventForAdHaveParams('iap_start', jsonStr);
+        buySp() {
+            let data = cfgTable.daoJuData[this.index + 1];
+            console.log('zh:点击购买 data =' + JSON.stringify(data));
         }
     }
 
@@ -22438,7 +22427,6 @@
         }
         show(type) {
             super.show();
-            console.log('zh:show type = ' + type);
             this.curType = type == 0 ? "qiugan" : "daoju";
             this.switchBtn("qiugan");
             this.playSecretaryIdle();

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
client/laya/bin/js/bundle.js.map


+ 11 - 12
client/laya/bin/js/cfgTable.js

@@ -1054,27 +1054,26 @@ cfgTable.paiHangBangData = {
 cfgTable.daoJuData = {
     [1]: {
         id: 1,
-        name: 'Gem50',
-        price: 0.99,
-        describe: 'Gem50',
+        spbt: 'Gem50',
+        spjg: 0.99,
+        spms: 'Gem50',
         img: 'sp_zs1',
         sort: 1
     },
-     [2]: {
+    [2]: {
         id: 1,
-        name: 'Gem100',
-        price: 1.99,
-        describe: 'Gem100',
+        spbt: 'Gem100',
+        spjg: 1.99,
+        spms: 'Gem100',
         img: 'sp_zs2',
         sort: 2
     },
-     [3]: {
+    [3]: {
         id: 1,
-        name: 'Gem500',
-        price: 4.99,
-        describe: 'Gem500',
+        spbt: 'Gem150',
+        spjg: 3.99,
+        spms: 'Gem150',
         img: 'sp_zs3',
         sort: 3
     },
-
 }

+ 5 - 5
client/laya/libs/cfgTable.d.ts

@@ -54,12 +54,12 @@ declare namespace cfgTable {
     export class daoJu {
         //序号
         readonly id: number;
-        //球杆名称
-        readonly name: string;
+        //商品标题
+        readonly spbt: string;
         //价格
-        readonly price: number;
-        //品描述
-        readonly describe: string;
+        readonly spjg: number;
+        //品描述
+        readonly spms: string;
        
         //图标名称
         readonly img: string;

+ 1 - 1
client/laya/src/core/mgrs/HttpMgr.ts

@@ -52,7 +52,7 @@ export class HttpMgr {
      * post请求,参数待扩展
      */
     public sendPost2025(reqUrl, data, call) {
-        let isDev = false;//是否是开发环境
+        let isDev = true;//是否是开发环境
         // let urlStr ="https://api.kessongame.site/prod-api/api/game/";
         //////////////https://api.kessongame.site/prod-api/api/game/getClassicCfg
         let urlTop = "https://api.kessongame.site/";

+ 0 - 4
client/laya/src/ui/UIShop.ts

@@ -28,10 +28,8 @@ export default class UIShop extends UIBase {
         this.addUIClick(this.ui.myNode.n_qiuGan, () => this.switchBtn("qiugan"));
         this.addUIClick(this.ui.myNode.n_daoju, () => this.switchBtn("daoju"));
         // this.addUIClick(this.ui.btn_qiugan, this.test123);
-        // this.addUIClick(this.ui.btn_daoju, this.test123);
         this.addUIClick(this.ui, this.interuptSecretary);
 
-    
         this.ui.myNode.myList.itemRenderer = Laya.Handler.create(this, this.renderBallRod, null, false);
         this.ballRodArr = [];
         this.itemNums = Object.keys(cfgTable.ballrodData).length;
@@ -51,8 +49,6 @@ export default class UIShop extends UIBase {
     }
     public show(type): void {
         super.show();
-
-        console.log('zh:show type = ' + type)
         //type,0-球杆,1-道具
         this.curType = type == 0 ? "qiugan" : "daoju";
         this.switchBtn("qiugan");

+ 12 - 23
client/laya/src/ui/item/DaoJuDisplay.ts

@@ -19,13 +19,13 @@ export default class DaoJuDisplay {
         this.initData();
     }
     public initData() {
-        // this.ui.btn_buy.onClick(this, this.buyBallRod);
+        this.ui.btn_buy.onClick(this, this.buySp);
         this.ui.btn_buy.onClick(this, this.buyDj);
         let data = cfgTable.daoJuData[this.index + 1];
-        console.log('zh:'+JSON.stringify(data))
-        this.ui.nameTxt.text = data.name;
-        this.ui.n_jiaGe.text = data.price + "";
-        this.ui.n_zuanShi.text = data.price+"";
+        console.log('zh:' + JSON.stringify(data))
+        this.ui.nameTxt.text = data.spbt;
+        this.ui.n_jiaGe.text = data.spjg + "";
+        this.ui.n_zuanShi.text = data.spjg + "";
 
         let baseUrl = "asset/sound/ogg/";
         this.ui.zsImg.url = xGame.common.getGameIconUrl(data.img);
@@ -38,10 +38,11 @@ export default class DaoJuDisplay {
     buyDj() {
         xGame.soundMgr.playSound(xGame.common.btnClickStr);
     }
-    buyBallRod() {
-
-
-        // let selectedIndex = this.ui.btn_buy.c1.selectedIndex;
+    buySp() {
+        let data = cfgTable.daoJuData[this.index + 1];
+        console.log('zh:点击购买 data ='+JSON.stringify(data) );
+      
+        //let selectedIndex = this.ui.btn_buy.c1.selectedIndex;
         // switch (selectedIndex) {
         //     case 0:
         //         //  console.log('zh:点击了 000000000000000');
@@ -50,7 +51,7 @@ export default class DaoJuDisplay {
         //         console.log('zh:点击了 USE THIS');
         //         DataMgr.setCurBallRod(this.index);
 
-          
+
 
         //         let curUse = DataMgr.getCurBallRod();
         //         console.log('zh:updateSelf 选择的球杆 = ' + curUse);
@@ -83,17 +84,5 @@ export default class DaoJuDisplay {
 
 
 
-    /**
-     * 购买球杆
-     * @param qiuGanName 
-     */
-    logEventForGouMaiGan(qiuGanName) {
-        //{"value":"商品ID"}
-        const ev = {
-            value: qiuGanName
-        };
-        const jsonStr = JSON.stringify(ev);
-        console.log('zh:ts  logEventForGouMaiGan req jsonStr=' + jsonStr);
-        JSBridgeUtils.instance.logEventForAdHaveParams('iap_start', jsonStr);
-    }
+
 }

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.