太初秘卷修改

dev_chengFeng
jiaoyangna 2021-08-11 17:14:20 +08:00
parent c3d45f1316
commit b83ee5e000
5 changed files with 205 additions and 39 deletions

View File

@ -104,8 +104,8 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 838045334281417467}
m_RootOrder: 2
m_Father: {fileID: 5665718498097657906}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@ -405,6 +405,8 @@ RectTransform:
- {fileID: 6532840170437637994}
- {fileID: 8329884962036650588}
- {fileID: 1915107041368105942}
- {fileID: 292383046426468324}
- {fileID: 3086266629382961749}
m_Father: {fileID: 838045334281417467}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -424,7 +426,6 @@ GameObject:
- component: {fileID: 4857275258040740634}
- component: {fileID: 8890730762987158791}
- component: {fileID: 2198781733884664743}
- component: {fileID: 3502884012609026530}
m_Layer: 5
m_Name: bg
m_TagString: Untagged
@ -488,18 +489,6 @@ MonoBehaviour:
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!114 &3502884012609026530
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6531145027874733707}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -146154839, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &6783067781988425480
GameObject:
m_ObjectHideFlags: 0
@ -574,6 +563,80 @@ MonoBehaviour:
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!1 &7311530429622308950
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 292383046426468324}
- component: {fileID: 4577208638755532487}
- component: {fileID: 947173779260489847}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &292383046426468324
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7311530429622308950}
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_Children: []
m_Father: {fileID: 5665718498097657906}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 0, y: 249.14996}
m_SizeDelta: {x: 0, y: 237}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4577208638755532487
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7311530429622308950}
m_CullTransparentMesh: 0
--- !u!114 &947173779260489847
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7311530429622308950}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 6cd7bf75933a53243816f8b377e592e1, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!1 &7705492895448595525
GameObject:
m_ObjectHideFlags: 0
@ -607,7 +670,6 @@ RectTransform:
m_Children:
- {fileID: 6237935301652922318}
- {fileID: 5665718498097657906}
- {fileID: 3086266629382961749}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -710,7 +772,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -0.0000706025}
m_AnchoredPosition: {x: 0, y: -0.000045178225}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &921486100088032325
@ -761,6 +823,7 @@ GameObject:
- component: {fileID: 1915107041368105942}
- component: {fileID: 3006324354038409040}
- component: {fileID: 3860835654851360999}
- component: {fileID: 1725631571882342664}
m_Layer: 5
m_Name: circle
m_TagString: Untagged
@ -828,3 +891,15 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.ScrollRect+ScrollRectEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!114 &1725631571882342664
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8477601868341582866}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -146154839, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:

View File

@ -14,6 +14,76 @@ this.OpenUIList = {}
this.selectIndex = {dataType = 0,goodsId = {}}
this.selectIndex2 = {dataType = 0,goodsId = {}}
this.NiuQiIndex = 1
this.TaiChuMiJuanData = {}
function this.SetTaiChuMiJuanData(msg,fun)
local datas
if not msg or #msg.secretvolume < 1 then
-----------------------------------------------测试数据
-- datas = {[1] = {id = 1,strategyLink = "https://pc.yiyouliao.com/msn/article.html?recId=eed09eaec41c4d18abc08ddbb3452fdc_s&infoId=II003LYBG9XPE7A",windowLink = "https://img-nos.yiyouliao.com/inforec-20210811-e1fd1cf39f6abfc1cdb35be92b6bc3d0.jpg?time=1628668135&signature=89DFF74746F289F5ED404A0BC627387A"},
-- [2] = {id = 2,strategyLink = "https://pc.yiyouliao.com/msn/article.html?recId=b5f830ada8a04ab2bac07efa621ba453_s&infoId=IT00TLAILJ9X7KZ",windowLink = "https://img-nos.yiyouliao.com/inforec-20210811-8e07612db47c17ec56fbba613d31cc7b.jpg?time=1628668250&signature=CA7856DD83E45651B5E2274D76D8BF48"},
-- [3] = {id = 3,strategyLink = "https://mini.eastday.com/nsa/210811133830637498814.html?qid=02034",windowLink = "https://lupic.cdn.bcebos.com/20191203/3016121736_23.jpg"},
-- [4] = {id = 4,strategyLink = "https://pc.yiyouliao.com/msn/article.html?recId=b5f830ada8a04ab2bac07efa621ba453_s&infoId=IT003LL8LJF1X9E",windowLink = "https://lupic.cdn.bcebos.com/20210629/938550_23.jpg"},
-- [5] = {id = 5,strategyLink = "https://mini.eastday.com/nsa/n210811082523736.html?qid=04232",windowLink = "https://img-nos.yiyouliao.com/inforec-20210811-361d4790c345bae2c5a5e1706c2b550b.jpg?time=1628668377&signature=B1350B327A0806326DD29054B83B071E"},
-- [6] = {id = 6,strategyLink = "http://ex.chinadaily.com.cn/exchange/partners/82/rss/channel/cn/columns/sz8srm/stories/WS6111cd6fa3101e7ce975deae.html",windowLink = "http://cn.chinadaily.com.cn/image/2018/j-2.jpg"},
-- [7] = {id = 7,strategyLink = "https://pc.yiyouliao.com/msn/article.html?recId=bdba7a24fe304b598695dbd25219f8e4_s&infoId=II003JLZ9IT187M",windowLink = "https://img-nos.yiyouliao.com/inforec-20210811-9987eceb8e5181eadb24778c05d9195b.jpg?time=1628668882&signature=842592897E6CE7C3DB594FAFC515B22E"},
-- [8] = {id = 8,strategyLink = "https://mini.eastday.com/nsa/210811065335765353208.html?qid=02034",windowLink = "https://lupic.cdn.bcebos.com/20200412/3062717289_23_800_349.jpg"},
-- }
if fun then
fun(msg)
end
else
datas = msg.secretvolume
end
coroutine.start(function()
for k,v in ipairs(datas) do
local str = v.windowLink
local www = WWW.New(str)
coroutine.www(www)
local tex2d = www.texture
local m_sprite = Sprite.Create(tex2d, Rect.New(0, 0, tex2d.width, tex2d.height), Vector2.New(0, 0));
if not this.TaiChuMiJuanData[v.id] then
this.TaiChuMiJuanData[v.id] = {}
this.TaiChuMiJuanData[v.id].id = v.id
this.TaiChuMiJuanData[v.id].linkAddress = v.strategyLink
this.TaiChuMiJuanData[v.id].windowLink = v.windowLink
this.TaiChuMiJuanData[v.id].sprite = m_sprite
end
end
if fun then
fun(msg)
end
end)
end
function this.GetwwwProgress()
return this.IsFisish
end
function this.GetATaiChuMiJuanData(data)
this.IsFisish = true
if not this.TaiChuMiJuanData[data.id] or this.TaiChuMiJuanData[data.id].windowLink ~= data.windowLink then
this.IsFisish = false
coroutine.start(function()
local str = data.windowLink
local www = WWW.New(str)
coroutine.www(www)
local tex2d = www.texture
local m_sprite = Sprite.Create(tex2d, Rect.New(0, 0, tex2d.width, tex2d.height), Vector2.New(0, 0));
if not this.TaiChuMiJuanData[data.id] then
this.TaiChuMiJuanData[data.id] = {}
end
this.TaiChuMiJuanData[data.id].id = data.id
this.TaiChuMiJuanData[data.id].linkAddress = data.strategyLink
this.TaiChuMiJuanData[data.id].windowLink = data.windowLink
this.TaiChuMiJuanData[data.id].sprite = m_sprite
this.IsFisish = true
end)
else
return this.TaiChuMiJuanData[data.id]
end
end
function this.SetSelectIndex(dataType,goodsId,b)
this.selectIndex.dataType = dataType
this.selectIndex.goodsId = goodsId
@ -25,6 +95,7 @@ function this.SetSelectIndex(dataType,goodsId,b)
end
function this.Initialize()
this.TaiChuMiJuanData = {}
end
function this.AddUIList(jumpId)

View File

@ -664,6 +664,7 @@ function this.ExecuteLoading()
function() NetManager.BeautyBagWishEquipRequest(nil,LoadingPanel.OnStep) end,
function() LingLongBaoJingManager.InitData(LoadingPanel.OnStep) end,
function() NetManager.IsCrossRequert(LoadingPanel.OnStep) end,
function() NetManager.TaiChuSecretvolumeRequest(LoadingPanel.OnStep) end,
--[[[35] =]] function() -- 登录请求最终接口,所有请求放在此接口之前
-- 登录成功确认
NetManager.LoginConfimRequest()

View File

@ -295,32 +295,52 @@ end
--绑定事件(用于子类重写)
function this:BindEvent()
Util.AddOnceClick(this.taiChuMiJuanBtn,function(msg)
NetManager.TaiChuSecretvolumeRequest(function()
local data = {}
local str
local www
Util.AddOnceClick(this.taiChuMiJuanBtn,function()
NetManager.TaiChuSecretvolumeRequest(function(msg)
local data = {}
coroutine.start(function()
for k,v in ipairs(msg.secretvolume) do
local str = v.windowLink
www = WWW.New(str)
coroutine.www(www)
local tex2d = www.texture
local m_sprite = Sprite.Create(tex2d, Rect.New(0, 0, tex2d.width, tex2d.height), Vector2.New(0, 0));
data[k] = {}
data[k].id = v.id
data[k].linkAddress = v.strategyLink
data[k].windowLink = v.windowLink
data[k].sprite = v.m_sprite
end
coroutine.wait(0.01)
for k,v in ipairs(msg.secretvolume) do
local isContinue = DynamicActivityManager.GetATaiChuMiJuanData(v)
while(not DynamicActivityManager.GetwwwProgress()) do
coroutine.wait(0.01)
end
isContinue = DynamicActivityManager.GetATaiChuMiJuanData(v)
table.insert(data,isContinue)
end
table.sort(data,function(a,b)
return a.id < b.id
end)
coroutine.wait(0.01)
UIManager.OpenPanel(UIName.taiChuMiJuan,data)
end)
end)
------------------------------------------------------------- 测试数据
-- local data = {}
-- local datas = {[1] = {id = 1,strategyLink = "https://pc.yiyouliao.com/msn/article.html?recId=eed09eaec41c4d18abc08ddbb3452fdc_s&infoId=II003LYBG9XPE7A",windowLink = "https://img-nos.yiyouliao.com/inforec-20210811-e1fd1cf39f6abfc1cdb35be92b6bc3d0.jpg?time=1628668135&signature=89DFF74746F289F5ED404A0BC627387A"},
-- [2] = {id = 2,strategyLink = "https://pc.yiyouliao.com/msn/article.html?recId=b5f830ada8a04ab2bac07efa621ba453_s&infoId=IT00TLAILJ9X7KZ",windowLink = "https://img-nos.yiyouliao.com/inforec-20210811-8e07612db47c17ec56fbba613d31cc7b.jpg?time=1628668250&signature=CA7856DD83E45651B5E2274D76D8BF48"},
-- [3] = {id = 3,strategyLink = "https://mini.eastday.com/nsa/210811133830637498814.html?qid=02034",windowLink = "https://lupic.cdn.bcebos.com/20191203/3016121736_23.jpg"},
-- [4] = {id = 4,strategyLink = "https://pc.yiyouliao.com/msn/article.html?recId=b5f830ada8a04ab2bac07efa621ba453_s&infoId=IT003LL8LJF1X9E",windowLink = "https://lupic.cdn.bcebos.com/20210629/938550_23.jpg"},
-- [5] = {id = 5,strategyLink = "https://mini.eastday.com/nsa/n210811082523736.html?qid=04232",windowLink = "https://img-nos.yiyouliao.com/inforec-20210811-361d4790c345bae2c5a5e1706c2b550b.jpg?time=1628668377&signature=B1350B327A0806326DD29054B83B071E"},
-- [6] = {id = 6,strategyLink = "http://ex.chinadaily.com.cn/exchange/partners/82/rss/channel/cn/columns/sz8srm/stories/WS6111cd6fa3101e7ce975deae.html",windowLink = "http://cn.chinadaily.com.cn/image/2018/j-2.jpg"},
-- [7] = {id = 7,strategyLink = "https://pc.yiyouliao.com/msn/article.html?recId=bdba7a24fe304b598695dbd25219f8e4_s&infoId=II003JLZ9IT187M",windowLink = "https://img-nos.yiyouliao.com/inforec-20210811-9987eceb8e5181eadb24778c05d9195b.jpg?time=1628668882&signature=842592897E6CE7C3DB594FAFC515B22E"},
-- [8] = {id = 8,strategyLink = "https://mini.eastday.com/nsa/210811065335765353208.html?qid=02034",windowLink = "https://dfzximg01.dftoutiao.com/minimodify/20210810/640x427_611230bb2fc8e.png"},
-- [9] = {id = 9,strategyLink = "https://pc.yiyouliao.com/msn/article.html?recId=ef71759530174eb7a644f43a1c82fc41_s&infoId=IC003K1PNC70DBQ",windowLink = "https://img-nos.yiyouliao.com/inforec-20210811-da593f41724ecf38354bb712398cfca6.jpg?time=1628672089&signature=6EABA2FF759B313F41F158D7AD8FDF6A"},
-- }
-- coroutine.start(function()
-- for k,v in ipairs(datas) do
-- local isContinue = DynamicActivityManager.GetATaiChuMiJuanData(v)
-- local time = 0
-- while(not DynamicActivityManager.GetwwwProgress()) do
-- coroutine.wait(0.01)
-- time = time + 0.01
-- end
-- isContinue = DynamicActivityManager.GetATaiChuMiJuanData(v)
-- table.insert(data,isContinue)
-- end
-- table.sort(data,function(a,b)
-- return a.id < b.id
-- end)
-- UIManager.OpenPanel(UIName.taiChuMiJuan,data)
-- end)
end)
Util.AddOnceClick(this.btnEndLess,function()

View File

@ -5464,6 +5464,7 @@ end
--请求太初秘卷
function NetManager.TaiChuSecretvolumeRequest(func)
--DynamicActivityManager.SetTaiChuMiJuanData(nil,func) 测试用
local data=PlayerInfoProto_pb.TaiChuSecretvolumeRequest()
local msg = data:SerializeToString()
Network:SendMessageWithCallBack(MessageTypeProto_pb.TAI_CHU_SECRET_VOLUME_REQUEST, MessageTypeProto_pb.TAI_CHU_SECRET_VOLUME_RESPONS, msg, function(buffer)
@ -5473,9 +5474,7 @@ function NetManager.TaiChuSecretvolumeRequest(func)
for k,v in ipairs(msg.secretvolume) do
LogGreen("id:"..v.id.." strategyLink:"..v.strategyLink.." windowLink:"..v.windowLink)
end
if func then
func(msg)
end
DynamicActivityManager.SetTaiChuMiJuanData(msg,func)
end)
end