暂存
This commit is contained in:
parent
c3514df331
commit
e3f5280d94
Binary file not shown.
BIN
Assets/Resources/Images/pf.jpg
Normal file
BIN
Assets/Resources/Images/pf.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
128
Assets/Resources/Images/pf.jpg.meta
Normal file
128
Assets/Resources/Images/pf.jpg.meta
Normal file
@ -0,0 +1,128 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7cbb4d5d72593dc4e99909d2d9ec7d3b
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 11
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 1
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: -1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
applyGammaDecoding: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -111,7 +111,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 1}
|
||||
m_SizeDelta: {x: 0, y: 50}
|
||||
m_SizeDelta: {x: 0, y: 41}
|
||||
m_Pivot: {x: 0.5, y: 0}
|
||||
--- !u!222 &6816596473864697549
|
||||
CanvasRenderer:
|
||||
|
||||
@ -65,10 +65,10 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Padding:
|
||||
m_Left: 0
|
||||
m_Right: 0
|
||||
m_Top: 0
|
||||
m_Bottom: 0
|
||||
m_Left: 7
|
||||
m_Right: 7
|
||||
m_Top: 7
|
||||
m_Bottom: 7
|
||||
m_ChildAlignment: 0
|
||||
m_Spacing: 0
|
||||
m_ChildForceExpandWidth: 1
|
||||
@ -372,6 +372,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 74fe80f225b0aff448f240dde817f640, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
newNav: {fileID: 0}
|
||||
--- !u!1 &5632244676142748335
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -486,7 +487,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: -40.000008, y: -40}
|
||||
m_SizeDelta: {x: -26, y: -26}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5632244676682049327
|
||||
CanvasRenderer:
|
||||
@ -743,7 +744,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 315, y: 0}
|
||||
m_AnchoredPosition: {x: 322, y: 0}
|
||||
m_SizeDelta: {x: 630, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!222 &8458141832532476108
|
||||
|
||||
@ -38,5 +38,10 @@ namespace Assets.Scripts.Apis
|
||||
{
|
||||
return Get<JsonResult<AntManufacturer>>($"MapRecord/GetAntManufacturerById?id={id}");
|
||||
}
|
||||
|
||||
public async Task<JsonResult<byte[]>> GetRecordSnapShot(int id)
|
||||
{
|
||||
return await GetAsync<JsonResult<byte[]>>($"Share/GetRecordSnapShot?id={id}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -164,7 +164,16 @@ public class WeChatController
|
||||
public void ShareImageToWX(int scene, byte[] image)
|
||||
{
|
||||
#if UNITY_ANDROID
|
||||
mainActivityClass.CallStatic("ShareImageToWX", scene, image);
|
||||
mainActivityClass.CallStatic("ShareImageToWX", scene, image,null);
|
||||
#elif UNITY_IOS
|
||||
ShareImgToWX(scene,image,image.Length);
|
||||
#endif
|
||||
}
|
||||
|
||||
public void ShareImageToWX(int scene, byte[] image,byte[] thumb)
|
||||
{
|
||||
#if UNITY_ANDROID
|
||||
mainActivityClass.CallStatic("ShareImageToWX", scene, image, thumb);
|
||||
#elif UNITY_IOS
|
||||
ShareImgToWX(scene,image,image.Length);
|
||||
#endif
|
||||
|
||||
@ -9,6 +9,10 @@ using DG.Tweening;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.SceneManagement;
|
||||
using Facebook.Unity;
|
||||
using System.Web;
|
||||
using UnityEngine.Networking;
|
||||
using System.Collections;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
@ -104,11 +108,13 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
photoURL: new Uri(cyclingController.mapRoute.CoverImage));
|
||||
}
|
||||
|
||||
private void shareToWx(BaseEventData b)
|
||||
{
|
||||
private async void shareToWx(BaseEventData b)
|
||||
{
|
||||
UIManager.Instance.StartCoroutine(ShowLoading());
|
||||
var res = await ConfigHelper.mapInterruptRecordApi.GetRecordSnapShot(cyclingController.RankingId);
|
||||
if (App.weChatController.IsWeChatAppInstalled())
|
||||
{
|
||||
App.weChatController.ShareWebpageToWX(0, $"{App.CurrentUser.WebHost}RoutesRecords/{cyclingController.RankingId}?Token={App.CurrentUser.cookie}", cyclingController.mapRoute.Name, "By " + App.CurrentUser.Nickname,null);
|
||||
App.weChatController.ShareImageToWX(0, res.data, Resources.Load<Sprite>("Images/pf").texture.EncodeToJPG());
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -116,11 +122,18 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
}
|
||||
}
|
||||
|
||||
private void shareToWxGp(BaseEventData b)
|
||||
private IEnumerator ShowLoading()
|
||||
{
|
||||
Utils.showToast(null, "首次分享图片会消耗一些时间,请耐心等待", type: 1);
|
||||
yield return null;
|
||||
}
|
||||
private async void shareToWxGp(BaseEventData b)
|
||||
{
|
||||
UIManager.Instance.StartCoroutine(ShowLoading());
|
||||
var res = await ConfigHelper.mapInterruptRecordApi.GetRecordSnapShot(cyclingController.RankingId);
|
||||
if (App.weChatController.IsWeChatAppInstalled())
|
||||
{
|
||||
App.weChatController.ShareWebpageToWX(1, $"{App.CurrentUser.WebHost}RoutesRecords/{cyclingController.RankingId}?Token={App.CurrentUser.cookie}", cyclingController.mapRoute.Name, "By " + App.CurrentUser.Nickname,null);
|
||||
App.weChatController.ShareImageToWX(1, res.data,Resources.Load<Sprite>("Images/pf").texture.EncodeToJPG());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -140,7 +140,8 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
|
||||
SetActive4Button(false);
|
||||
|
||||
var isRecent = App.CurrentRouteType == "Recent Routes" && myMap.RecentRecord != null && myMap.RecentRecord.ContinueCyclingParam != null && !isModal;
|
||||
var isRecent = myMap.RecentRecord != null && myMap.RecentRecord.ContinueCyclingParam != null && !isModal;
|
||||
//var isRecent = App.CurrentRouteType == "Recent Routes" && myMap.RecentRecord != null && myMap.RecentRecord.ContinueCyclingParam != null && !isModal;
|
||||
transform.Find("BtnContinue").gameObject.SetActive(isRecent);
|
||||
transform.Find("BtnReride").gameObject.SetActive(isRecent);
|
||||
transform.Find("MapHBImg").gameObject.SetActive(!isRecent);
|
||||
|
||||
@ -840,5 +840,18 @@ namespace Assets.Scripts
|
||||
return time.ToString("yyyy-MM-dd");
|
||||
}
|
||||
}
|
||||
|
||||
public static IEnumerator ShareImageToWx(int scene, byte[] image)
|
||||
{
|
||||
if (App.weChatController.IsWeChatAppInstalled())
|
||||
{
|
||||
App.weChatController.ShareImageToWX(scene, image);
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.showToast(null, "未安装微信");
|
||||
}
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
</packages>
|
||||
<files />
|
||||
<settings>
|
||||
<setting name="androidAbis" value="arm64-v8a,armeabi-v7a" />
|
||||
<setting name="androidAbis" value="armeabi-v7a" />
|
||||
<setting name="bundleId" value="com.ZhiXingPai.PowerFunUnity" />
|
||||
<setting name="explodeAars" value="True" />
|
||||
<setting name="gradleBuildEnabled" value="True" />
|
||||
@ -22,7 +22,7 @@
|
||||
<setting name="packageDir" value="Assets/Plugins/Android" />
|
||||
<setting name="patchAndroidManifest" value="True" />
|
||||
<setting name="patchMainTemplateGradle" value="True" />
|
||||
<setting name="projectExportEnabled" value="True" />
|
||||
<setting name="projectExportEnabled" value="False" />
|
||||
<setting name="useJetifier" value="False" />
|
||||
</settings>
|
||||
</dependencies>
|
||||
@ -6,8 +6,8 @@ EditorBuildSettings:
|
||||
serializedVersion: 2
|
||||
m_Scenes:
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/Login.unity
|
||||
guid: 6dce3e17997730b4492f91dd8fede429
|
||||
path: Assets/Scenes/Login-Mobile.unity
|
||||
guid: 4be878da00cf764499988cf403faf94d
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/MainScene.unity
|
||||
guid: ab586a3c1bacd4a48a55178eb06fe0cc
|
||||
|
||||
@ -38,6 +38,7 @@ GraphicsSettings:
|
||||
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 16003, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_PreloadedShaders: []
|
||||
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
|
||||
type: 0}
|
||||
|
||||
@ -256,7 +256,7 @@ PlayerSettings:
|
||||
clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea
|
||||
templatePackageId: com.unity.template.3d@4.2.8
|
||||
templateDefaultScene: Assets/Scenes/SampleScene.unity
|
||||
AndroidTargetArchitectures: 3
|
||||
AndroidTargetArchitectures: 1
|
||||
AndroidSplashScreenScale: 0
|
||||
androidSplashScreen: {fileID: 0}
|
||||
AndroidKeystoreName: '{inproject}: Assets/Plugins/Android/powerfun.keystore'
|
||||
@ -868,7 +868,7 @@ PlayerSettings:
|
||||
platformArchitecture:
|
||||
iPhone: 1
|
||||
scriptingBackend:
|
||||
Android: 1
|
||||
Android: 0
|
||||
Standalone: 0
|
||||
il2cppCompilerConfiguration:
|
||||
Standalone: 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user