Преглед на файлове

sdk 支付 及 客服链接等

gdl_123 преди 8 месеца
родител
ревизия
cce55705b6

+ 4 - 1
Assets/Content/Config/LanguagePackage_cn.csv

@@ -19202,4 +19202,7 @@ RSLCfg_Name_549,Пакет астролога
 RSLCfg_Name_548,Пакет скинов китаской мифологии
 RSLCfg_Name_550,Суперпакет скинов китаской мифологии с выгодой
 ZsHmyPmXx,Пока что нет информации о рейтинге~
-QsrYssdWjdMz,Введите имя игрока для поиска~
+QsrYssdWjdMz,Введите имя игрока для поиска~
+KeFu,KeFu
+VkSheQu,VkSheQu
+VkSheQun,VkSheQun

+ 211 - 6
Assets/Content/Prefabs/UI/UILanuch/UILanuch.prefab

@@ -153,7 +153,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!224 &5788688030631292169
 RectTransform:
   m_ObjectHideFlags: 0
@@ -684,6 +684,7 @@ RectTransform:
   - {fileID: 2101444537049934089}
   - {fileID: 8463033401591846688}
   - {fileID: 5788688030631292169}
+  - {fileID: 3381515312592700213}
   m_Father: {fileID: 7649674231761263977}
   m_RootOrder: 3
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -2014,6 +2015,210 @@ MonoBehaviour:
   m_FillOrigin: 0
   m_UseSpriteMesh: 0
   m_PixelsPerUnitMultiplier: 1
+--- !u!1 &3362458839707281550
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 3381515312592700213}
+  - component: {fileID: 2430680858118050941}
+  - component: {fileID: 8370717742073716404}
+  - component: {fileID: 7450751748573392419}
+  - component: {fileID: 1311809326280006439}
+  m_Layer: 5
+  m_Name: SDKLink
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &3381515312592700213
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3362458839707281550}
+  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 671772581252100833}
+  m_RootOrder: 3
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0, y: 1}
+  m_AnchorMax: {x: 1, y: 1}
+  m_AnchoredPosition: {x: 10, y: -388}
+  m_SizeDelta: {x: -20, y: 278.05005}
+  m_Pivot: {x: 0.5, y: 0}
+--- !u!222 &2430680858118050941
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3362458839707281550}
+  m_CullTransparentMesh: 1
+--- !u!114 &8370717742073716404
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3362458839707281550}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_RaycastTarget: 1
+  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+  m_Maskable: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+  m_text: 11111111
+  m_isRightToLeft: 0
+  m_fontAsset: {fileID: 11400000, guid: ff9a33292f9ee2e4bb6b5beaa43eb505, type: 2}
+  m_sharedMaterial: {fileID: 21889736603187208, guid: ff9a33292f9ee2e4bb6b5beaa43eb505,
+    type: 2}
+  m_fontSharedMaterials: []
+  m_fontMaterial: {fileID: 0}
+  m_fontMaterials: []
+  m_fontColor32:
+    serializedVersion: 2
+    rgba: 4294967295
+  m_fontColor: {r: 1, g: 1, b: 1, a: 1}
+  m_enableVertexGradient: 0
+  m_colorMode: 3
+  m_fontColorGradient:
+    topLeft: {r: 1, g: 1, b: 1, a: 1}
+    topRight: {r: 1, g: 1, b: 1, a: 1}
+    bottomLeft: {r: 1, g: 1, b: 1, a: 1}
+    bottomRight: {r: 1, g: 1, b: 1, a: 1}
+  m_fontColorGradientPreset: {fileID: 0}
+  m_spriteAsset: {fileID: 0}
+  m_tintAllSprites: 0
+  m_StyleSheet: {fileID: 0}
+  m_TextStyleHashCode: -1183493901
+  m_overrideHtmlColors: 0
+  m_faceColor:
+    serializedVersion: 2
+    rgba: 4294967295
+  m_fontSize: 24
+  m_fontSizeBase: 36
+  m_fontWeight: 400
+  m_enableAutoSizing: 1
+  m_fontSizeMin: 12
+  m_fontSizeMax: 24
+  m_fontStyle: 0
+  m_HorizontalAlignment: 1
+  m_VerticalAlignment: 256
+  m_textAlignment: 65535
+  m_characterSpacing: 0
+  m_wordSpacing: 0
+  m_lineSpacing: 40
+  m_lineSpacingMax: 0
+  m_paragraphSpacing: 0
+  m_charWidthMaxAdj: 0
+  m_enableWordWrapping: 1
+  m_wordWrappingRatios: 0.4
+  m_overflowMode: 0
+  m_linkedTextComponent: {fileID: 0}
+  parentLinkedComponent: {fileID: 0}
+  m_enableKerning: 1
+  m_enableExtraPadding: 0
+  checkPaddingRequired: 0
+  m_isRichText: 1
+  m_parseCtrlCharacters: 1
+  m_isOrthographic: 1
+  m_isCullingEnabled: 0
+  m_horizontalMapping: 0
+  m_verticalMapping: 0
+  m_uvLineOffset: 0
+  m_geometrySortingOrder: 0
+  m_IsTextObjectScaleStatic: 0
+  m_VertexBufferAutoSizeReduction: 1
+  m_useMaxVisibleDescender: 1
+  m_pageToDisplay: 1
+  m_margin: {x: 0, y: 0, z: 0, w: 0}
+  m_isUsingLegacyAnimationComponent: 0
+  m_isVolumetricText: 0
+  m_hasFontAssetChanged: 0
+  m_baseMaterial: {fileID: 0}
+  m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
+--- !u!114 &7450751748573392419
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3362458839707281550}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Navigation:
+    m_Mode: 3
+    m_WrapAround: 0
+    m_SelectOnUp: {fileID: 0}
+    m_SelectOnDown: {fileID: 0}
+    m_SelectOnLeft: {fileID: 0}
+    m_SelectOnRight: {fileID: 0}
+  m_Transition: 0
+  m_Colors:
+    m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
+    m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+    m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
+    m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+    m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
+    m_ColorMultiplier: 1
+    m_FadeDuration: 0.1
+  m_SpriteState:
+    m_HighlightedSprite: {fileID: 0}
+    m_PressedSprite: {fileID: 0}
+    m_SelectedSprite: {fileID: 0}
+    m_DisabledSprite: {fileID: 0}
+  m_AnimationTriggers:
+    m_NormalTrigger: Normal
+    m_HighlightedTrigger: Highlighted
+    m_PressedTrigger: Pressed
+    m_SelectedTrigger: Selected
+    m_DisabledTrigger: Disabled
+  m_Interactable: 1
+  m_TargetGraphic: {fileID: 8370717742073716404}
+  m_OnClick:
+    m_PersistentCalls:
+      m_Calls: []
+--- !u!114 &1311809326280006439
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3362458839707281550}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 8759edc0b8b4b3d4aa8ffef2482e17ee, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  UIName: 
+  keys:
+  - UnityEngine.RectTransform
+  - UnityEngine.CanvasRenderer
+  - TMPro.TextMeshProUGUI
+  - UnityEngine.UI.Button
+  - UINode
+  values: 0000010100
+  depObjs: []
+  activeType: 0
 --- !u!1 &3392933597926134564
 GameObject:
   m_ObjectHideFlags: 0
@@ -10300,8 +10505,8 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 1}
   m_AnchorMax: {x: 0, y: 1}
-  m_AnchoredPosition: {x: 368.005, y: -22.01}
-  m_SizeDelta: {x: 616.01, y: 34.02}
+  m_AnchoredPosition: {x: 246.235, y: -20.645}
+  m_SizeDelta: {x: 372.47, y: 31.29}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &2446754421016673636
 CanvasRenderer:
@@ -10353,7 +10558,7 @@ MonoBehaviour:
   m_spriteAsset: {fileID: 0}
   m_tintAllSprites: 0
   m_StyleSheet: {fileID: 0}
-  m_TextStyleHashCode: 0
+  m_TextStyleHashCode: -1183493901
   m_overrideHtmlColors: 0
   m_faceColor:
     serializedVersion: 2
@@ -10366,8 +10571,8 @@ MonoBehaviour:
   m_fontSizeMax: 72
   m_fontStyle: 0
   m_HorizontalAlignment: 1
-  m_VerticalAlignment: 256
-  m_textAlignment: 513
+  m_VerticalAlignment: 512
+  m_textAlignment: 65535
   m_characterSpacing: 0
   m_wordSpacing: 0
   m_lineSpacing: 0

BIN
Assets/Content/Raw_Art/UI/UIActivity/text_dailyrecharge_yuan_cn.png


+ 29 - 0
Assets/Lua/Config/LanuchLinkCfg.lua

@@ -0,0 +1,29 @@
+local LanuchLinkCfg =
+{
+    --客服 https://chaten.sobot.com/chat/pc/v2/index.html?sysnum=390a63bc9030438a8562b8ec32beb7db&source=2
+    --VK社区:https://vk.com/club231946096
+    --VK社群:https://vk.me/join///F_UD6QMm9C2n8tpNibQnHDPhPYnuAj8nk=
+    --<u><color=#00ab65><link=>《用户协议》</link></color></u>
+    [1] = 
+    {
+        Color = "#828282",
+        Url = "https://chaten.sobot.com/chat/pc/v2/index.html?sysnum=390a63bc9030438a8562b8ec32beb7db&source=2",
+        Txt = "KeFu",
+    },
+    [2]= 
+    {
+        Color = "#828282",
+        Url = "https://vk.com/club231946096",
+        Txt = "VkSheQu",
+    },
+    [3] = 
+    {
+        Color = "#828282",
+        Url = "https://vk.me/join///F_UD6QMm9C2n8tpNibQnHDPhPYnuAj8nk=",
+        Txt = "VkSheQun",
+    },
+    LinkStringFormat = "<u><color=%s><link=%s>%s</link></color></u>",
+    LinkIsOpen = true,
+}
+
+return LanuchLinkCfg

+ 7 - 0
Assets/Lua/Config/LanuchLinkCfg.lua.meta

@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 6aec8fcbe405c3849a42f13bfdb8a7f5
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 1 - 1
Assets/Lua/Managers/CfgMgr.lua

@@ -150,7 +150,7 @@ function CfgMgr:ctor()
     self.WJRewordCfg = InternalRequire('WJRewardCfg')
     self.WJRankRewardCfg = InternalRequire('WJRankRewardCfg')
     self.WjBattleBuffCfg = InternalRequire('WjBattleBuffCfg')
-
+    self.LanuchLinkCfg = InternalRequire('LanuchLinkCfg')
     self:InitWJRewardCfg()
     self:InitWJRankRewardCfg()
 end

+ 34 - 0
Assets/Lua/UI/UILanuch/UILanuchView.lua

@@ -44,6 +44,7 @@ function UILanuchView:Init()
 	self:RefreshServer()
 	self:RefreshVersionCode()
 	self:RefreshSpecialInfo()
+	self:RefSDKLink()
 	if PlatformPack.ShowHealthBulletin then
 		self.editionTxt:SetActive(true)
 	else
@@ -388,5 +389,38 @@ function UILanuchView:OnClickAgreementText()
 	ManagerContainer.LuaUIMgr:Open(Enum.UIPageName.UISimpleWeb, url, nil, nil, nil, Enum.UISibling[Enum.UIType.Top] - 2)
 end
 
+function UILanuchView:OnClickSDKLinkText()
+	local text = self.sDKLink.text
+	local linkIndex = TMPro.TMP_TextUtilities.FindIntersectingLink(text, UnityEngine.Input.mousePosition, CameraMgr.Instance.UICamera);
+	if linkIndex < 0 then
+		return
+	end
+	local linkInfo = text.textInfo.linkInfo[linkIndex]
+	if not linkInfo then
+		return
+	end
+	local url = linkInfo:GetLinkID()
+	UnityEngine.Application.OpenURL(url)
+end
+
+
+function UILanuchView:RefSDKLink()
+	local cfg = ManagerContainer.CfgMgr.LanuchLinkCfg
+	if cfg == nil or not cfg.LinkIsOpen then
+		self.sDKLink:SetActive(false)
+		return
+	end
+	self.sDKLink:SetActive(true)
+
+	local txt =""
+
+	for index, value in ipairs(cfg) do
+		--LogError(Inspect(value))
+		local linkName = I18N.T(value.Txt)
+		txt = txt..string.format(cfg.LinkStringFormat,value.Color,value.Url,linkName).."\n"
+	end
+	 self.sDKLink.text.text = txt
+	self.uiBase:AddButtonUniqueEventListener(self.sDKLink.button, self, self.OnClickSDKLinkText)
+end
 return UILanuchView
 

+ 30 - 3
Assets/Lua/UI/UILanuch/UILanuchView_Generate.lua

@@ -10,6 +10,11 @@
 ---@field public gameObject UnityEngine.GameObject
 ---@field public text UnityEngine.UI.Text
 
+---@class UILanuch__Generate_sDKLink
+---@field public gameObject UnityEngine.GameObject
+---@field public text TMPro.TextMeshProUGUI
+---@field public button UnityEngine.UI.Button
+
 ---@class UILanuch__Generate_editionTxt
 ---@field public gameObject UnityEngine.GameObject
 ---@field public text TMPro.TextMeshProUGUI
@@ -97,6 +102,7 @@
 ---@field private appVol UILanuch__Generate_appVol
 ---@field private resVol UILanuch__Generate_resVol
 ---@field private editionTxt UILanuch__Generate_editionTxt
+---@field private sDKLink UILanuch__Generate_sDKLink
 ---@field private loadingRoot UnityEngine.GameObject
 ---@field private text UILanuch__Generate_text
 ---@field private numberText UILanuch__Generate_numberText
@@ -146,6 +152,7 @@ function UILanuchView:InitGenerate(Root, data)
 	self:InitGenerate__24(Root,data)
 	self:InitGenerate__25(Root,data)
 	self:InitGenerate__26(Root,data)
+	self:InitGenerate__27(Root,data)
 
 
 end
@@ -447,6 +454,22 @@ end
 
 ---@private
 function UILanuchView:InitGenerate__23(Root, data)
+--[[
+	LoginAnim/Common/SDKLink
+--]]
+	local tmp = Root:Find("LoginAnim/Common/SDKLink").gameObject
+	if tolua.getpeer(tmp) == nil then
+		tolua.setpeer(tmp, {})
+	end
+	self.sDKLink = tmp
+
+	tmp.text = tmp:GetComponent(Enum.TypeInfo.TextMeshProUGUI)
+
+	tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
+end
+
+---@private
+function UILanuchView:InitGenerate__24(Root, data)
 --[[
 	LoginAnim/LoadingRoot
 --]]
@@ -458,7 +481,7 @@ function UILanuchView:InitGenerate__23(Root, data)
 end
 
 ---@private
-function UILanuchView:InitGenerate__24(Root, data)
+function UILanuchView:InitGenerate__25(Root, data)
 --[[
 	LoginAnim/LoadingRoot/LoadingBar/Text
 --]]
@@ -472,7 +495,7 @@ function UILanuchView:InitGenerate__24(Root, data)
 end
 
 ---@private
-function UILanuchView:InitGenerate__25(Root, data)
+function UILanuchView:InitGenerate__26(Root, data)
 --[[
 	LoginAnim/LoadingRoot/LoadingBar/NumberText
 --]]
@@ -486,7 +509,7 @@ function UILanuchView:InitGenerate__25(Root, data)
 end
 
 ---@private
-function UILanuchView:InitGenerate__26(Root, data)
+function UILanuchView:InitGenerate__27(Root, data)
 --[[
 	LoginAnim/LoadingRoot/LoadingBar/Scrollbar
 --]]
@@ -585,6 +608,10 @@ function UILanuchView:GenerateDestroy()
 		tolua.setpeer(self.editionTxt, nil)
 	end
 	self.editionTxt = nil
+	if tolua.getpeer(self.sDKLink) ~= nil then
+		tolua.setpeer(self.sDKLink, nil)
+	end
+	self.sDKLink = nil
 	if tolua.getpeer(self.loadingRoot) ~= nil then
 		tolua.setpeer(self.loadingRoot, nil)
 	end

+ 10 - 1
Assets/Plugins/SDK/SDKMgr.cs

@@ -166,6 +166,14 @@ public partial class SDKMgr : MonoBehaviour
         };
         try
         {
+            int itemp = Mathf.FloorToInt(amount);
+            Debug.Log("价格 = "+itemp);
+
+            if (ProductInfos.ContainsKey(itemp.ToString()))
+            {
+                Debug.Log("有 价格 = " + itemp);
+            }
+
             string extraParams = JsonUtility.ToJson(data);
             sdk.Pay(goodsId, goodsName, goodsDesc,
                 count, amount,
@@ -556,9 +564,10 @@ public partial class SDKMgr : MonoBehaviour
                     Name = name,
                     Other = other,
                 });
+                Debug.Log($"===== 添加 商品配置 {name}   ======  价格 = {amount}");
             }
 
-            //Debug.Log($"=====  商品配置 {name}   ======");
+            Debug.Log($"=====  商品配置 {name}   ======  价格 = {amount}");
         }
 
     }

+ 6 - 1
Build/BuildDependenceResource/Plugins/SDKBridge/TZ_android/YouYiSDKAndroid.cs

@@ -71,10 +71,12 @@ public class YouYiSDKAndroid : SDKBase
 
                 Dictionary<string, SDKMgr.ProductInfo> cfgs = SDKMgr.Instance.ProductInfos;
 
-                string pice = amount.ToString("F2");
+                string  pice = amount.ToString();
 
+                Debug.Log("价格 = "+ pice);
                 if (cfgs.ContainsKey(pice))
                 {
+                    Debug.Log("有 价格 = " + pice);
                     SDKMgr.ProductInfo productInfo = cfgs[pice];
 
                     GameOrderInfo gameOrderInfo = new GameOrderInfo()
@@ -95,7 +97,10 @@ public class YouYiSDKAndroid : SDKBase
                     m_AJO.Call("pay", gameRoleInfo, gameOderString);
                 }
                 else
+                {
+                    Debug.Log("没有 价格 = " + pice);
                     m_YouYiListener.OnPayFailed();
+                }
             }
             //m_AJO.Call("pay", cpOrderId, amount.ToString(), goodsId.ToString(), goodsName, gameRoleInfo.roleId.ToString(), gameRoleInfo.roleName, gameRoleInfo.serverId.ToString(), gameRoleInfo.serverName, gameRoleInfo.roleLv, extrasParams);
             else