From 9dfbbc79eb97ebb5d8d46a780fd81371eabbec1e Mon Sep 17 00:00:00 2001 From: fmk Date: Sat, 4 Sep 2021 18:13:42 +0800 Subject: [PATCH 1/2] safety --- android/app/build.gradle | 1 - ios/Podfile.lock | 10 - ios/Runner.xcodeproj/project.pbxproj | 48 +- .../Resources/PandoraApi.bundle/all.js | 2 +- .../Resources/PandoraApi.bundle/beep-beep.caf | Bin 0 -> 4720 bytes .../Resources/PandoraApi.bundle/feature.plist | 353 +++--- .../developers/en.lproj/Localizable.strings | Bin 39900 -> 40990 bytes .../zh-Hans.lproj/Localizable.strings | Bin 27388 -> 28072 bytes .../zh-Hant.lproj/Localizable.strings | Bin 27334 -> 28018 bytes .../i18n/users/en.lproj/Localizable.strings | Bin 9206 -> 10270 bytes .../users/zh-Hans.lproj/Localizable.strings | Bin 6474 -> 7116 bytes .../users/zh-Hant.lproj/Localizable.strings | Bin 6474 -> 7116 bytes .../Resources/PandoraApi.bundle/iconfont.ttf | Bin 0 -> 3112 bytes lib/home/activity_list_page.dart | 2 +- lib/home/home_page.dart | 27 +- lib/home/home_view/brand_view.dart | 3 - lib/home/home_view/home_banner.dart | 4 +- lib/home/home_view/hot_article.dart | 2 +- lib/home/huixiang_view/huixiang_banner.dart | 4 +- .../points_mall_view/points_mall_banner.dart | 4 +- lib/integral/integral_page.dart | 583 +--------- lib/integral/intergra_view/in_for_points.dart | 236 ++++ lib/integral/intergra_view/integral_task.dart | 202 ++++ lib/integral/intergra_view/integral_vip.dart | 132 +++ lib/main.dart | 17 +- lib/mine/mine_vip_level_page.dart | 5 +- lib/mine/mine_wallet_page.dart | 19 - lib/mine/recharge_page.dart | 6 + lib/order/order_detail_page.dart | 17 +- lib/union/store_details_page.dart | 1006 ----------------- lib/union/union_details_page.dart | 2 +- lib/union/union_page.dart | 2 +- lib/view_widget/comment_menu.dart | 10 +- lib/view_widget/hot_item.dart | 4 +- lib/view_widget/mine_vip_view.dart | 192 ++-- lib/web/web_page.dart | 318 ++++++ lib/web/web_view/comment_list.dart | 422 +++++++ lib/web/web_view/input_comment.dart | 178 +++ lib/web/web_view/web_content.dart | 170 +++ lib/web/web_view/web_header.dart | 100 ++ pubspec.lock | 7 - pubspec.yaml | 2 +- 42 files changed, 2182 insertions(+), 1908 deletions(-) create mode 100644 lib/integral/intergra_view/in_for_points.dart create mode 100644 lib/integral/intergra_view/integral_task.dart create mode 100644 lib/integral/intergra_view/integral_vip.dart delete mode 100644 lib/union/store_details_page.dart create mode 100644 lib/web/web_page.dart create mode 100644 lib/web/web_view/comment_list.dart create mode 100644 lib/web/web_view/input_comment.dart create mode 100644 lib/web/web_view/web_content.dart create mode 100644 lib/web/web_view/web_header.dart diff --git a/android/app/build.gradle b/android/app/build.gradle index 07302d39..be6c78ab 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -36,7 +36,6 @@ MobSDK { ShareSDK { - // platform configuration information devInfo { Wechat { id 4 diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 1d24a7a8..8d00ae52 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -7,7 +7,6 @@ PODS: - BaiduMapKit/Utils (6.2.0): - BaiduMapKit/Base - BMKLocationKit (2.0.0) - - Bugly (2.5.90) - Flutter (1.0.0) - flutter_baidu_mapapi_base (2.0.0): - BaiduMapKit/Utils (= 6.2.0) @@ -27,9 +26,6 @@ PODS: - flutter_bmflocation (1.0.3): - BMKLocationKit - Flutter - - flutter_bugly (0.0.1): - - Bugly - - Flutter - fluwx (0.0.1): - Flutter - WechatOpenSDK (= 1.8.7.1) @@ -108,7 +104,6 @@ DEPENDENCIES: - flutter_baidu_mapapi_search (from `.symlinks/plugins/flutter_baidu_mapapi_search/ios`) - flutter_baidu_mapapi_utils (from `.symlinks/plugins/flutter_baidu_mapapi_utils/ios`) - flutter_bmflocation (from `.symlinks/plugins/flutter_bmflocation/ios`) - - flutter_bugly (from `.symlinks/plugins/flutter_bugly/ios`) - fluwx (from `.symlinks/plugins/fluwx/ios`) - image_cropper (from `.symlinks/plugins/image_cropper/ios`) - image_picker (from `.symlinks/plugins/image_picker/ios`) @@ -129,7 +124,6 @@ SPEC REPOS: trunk: - BaiduMapKit - BMKLocationKit - - Bugly - FMDB - mob_sharesdk - MOBFoundation @@ -151,8 +145,6 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/flutter_baidu_mapapi_utils/ios" flutter_bmflocation: :path: ".symlinks/plugins/flutter_bmflocation/ios" - flutter_bugly: - :path: ".symlinks/plugins/flutter_bugly/ios" fluwx: :path: ".symlinks/plugins/fluwx/ios" image_cropper: @@ -185,14 +177,12 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: BaiduMapKit: 907c6d9b74f66c3ff4741fc4b568ae0b339917f8 BMKLocationKit: 097814ef672b1e57e86e6c1968d7892fb78002bf - Bugly: 88bc32c0acc6fef7b74d610f0319ee7560d6b9fe Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c flutter_baidu_mapapi_base: 90fddba11ec4435406a7211d6ee905b4311c31db flutter_baidu_mapapi_map: 771bf00671832b1fcddb17733518cd631529df16 flutter_baidu_mapapi_search: 4cffaa74e739a4114595c4f82f790e1783bb612d flutter_baidu_mapapi_utils: a5bd582b91ecd35be1bc45558b38f49d5684f70a flutter_bmflocation: 12f1ba91bae4b16d78d4f475023e0254ed351f1c - flutter_bugly: c9800f4d5bc5bdc27ffdde3417a26ba44266e0c3 fluwx: 07a55ed66bf3a4961e836a2a411b02dcada32902 FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a image_cropper: f1668dd8d2cad2d357955caad15a40547856edcb diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index abb6f228..656c85d9 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -47,6 +47,13 @@ 6EE8F376269581FB00237A5E /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F375269581FB00237A5E /* AddressBook.framework */; }; 6EE8F3782695820600237A5E /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F3772695820600237A5E /* libiconv.tbd */; }; 6EE8F37F269582C200237A5E /* UniappPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE8F37E269582C200237A5E /* UniappPlugin.m */; }; + 89319A6F26E237A5001EFBD7 /* __uniappes6.js in Resources */ = {isa = PBXBuildFile; fileRef = 89319A6826E237A5001EFBD7 /* __uniappes6.js */; }; + 89319A7026E237A5001EFBD7 /* uni-jsframework.js in Resources */ = {isa = PBXBuildFile; fileRef = 89319A6926E237A5001EFBD7 /* uni-jsframework.js */; }; + 89319A7126E237A5001EFBD7 /* PandoraApi.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 89319A6A26E237A5001EFBD7 /* PandoraApi.bundle */; }; + 89319A7226E237A5001EFBD7 /* unincomponents.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 89319A6B26E237A5001EFBD7 /* unincomponents.ttf */; }; + 89319A7326E237A5001EFBD7 /* userPosition@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 89319A6C26E237A5001EFBD7 /* userPosition@2x.png */; }; + 89319A7426E237A5001EFBD7 /* weex-polyfill.js in Resources */ = {isa = PBXBuildFile; fileRef = 89319A6D26E237A5001EFBD7 /* weex-polyfill.js */; }; + 89319A7526E237A5001EFBD7 /* weexUniJs.js in Resources */ = {isa = PBXBuildFile; fileRef = 89319A6E26E237A5001EFBD7 /* weexUniJs.js */; }; 899C4C3C26A5179900B44087 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 899C4C3E26A5179900B44087 /* InfoPlist.strings */; }; 89A6269F26A7F6D30004A8F0 /* liblibPayment.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 89A6269E26A7F6D30004A8F0 /* liblibPayment.a */; }; 89A626A126A7F6E30004A8F0 /* libwxpay.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 89A626A026A7F6E30004A8F0 /* libwxpay.a */; }; @@ -214,6 +221,13 @@ 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 7AFFD8EE1D35381100E5BB4D /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AppDelegate.mm; sourceTree = ""; }; 81880E8F5E90EA6E5E0D57EB /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 89319A6826E237A5001EFBD7 /* __uniappes6.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = __uniappes6.js; sourceTree = ""; }; + 89319A6926E237A5001EFBD7 /* uni-jsframework.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = "uni-jsframework.js"; sourceTree = ""; }; + 89319A6A26E237A5001EFBD7 /* PandoraApi.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = PandoraApi.bundle; sourceTree = ""; }; + 89319A6B26E237A5001EFBD7 /* unincomponents.ttf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = unincomponents.ttf; sourceTree = ""; }; + 89319A6C26E237A5001EFBD7 /* userPosition@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "userPosition@2x.png"; sourceTree = ""; }; + 89319A6D26E237A5001EFBD7 /* weex-polyfill.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = "weex-polyfill.js"; sourceTree = ""; }; + 89319A6E26E237A5001EFBD7 /* weexUniJs.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = weexUniJs.js; sourceTree = ""; }; 89847A4826A14482008C8077 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; }; 899C4C3826A5171500B44087 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Main.strings"; sourceTree = ""; }; 899C4C3926A5171500B44087 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/LaunchScreen.strings"; sourceTree = ""; }; @@ -393,6 +407,7 @@ 6EE8F2E52695815A00237A5E /* Resources */ = { isa = PBXGroup; children = ( + 89319A6726E237A5001EFBD7 /* Resources */, 89AEFA8226A684D700DD2817 /* userPosition@2x.png */, 6EE8F2E62695815A00237A5E /* __uniappes6.js */, 6EE8F2E72695815A00237A5E /* uni-jsframework.js */, @@ -524,6 +539,20 @@ path = Libs; sourceTree = ""; }; + 89319A6726E237A5001EFBD7 /* Resources */ = { + isa = PBXGroup; + children = ( + 89319A6826E237A5001EFBD7 /* __uniappes6.js */, + 89319A6926E237A5001EFBD7 /* uni-jsframework.js */, + 89319A6A26E237A5001EFBD7 /* PandoraApi.bundle */, + 89319A6B26E237A5001EFBD7 /* unincomponents.ttf */, + 89319A6C26E237A5001EFBD7 /* userPosition@2x.png */, + 89319A6D26E237A5001EFBD7 /* weex-polyfill.js */, + 89319A6E26E237A5001EFBD7 /* weexUniJs.js */, + ); + name = Resources; + sourceTree = ""; + }; 89A626A826A7FFF30004A8F0 /* wx */ = { isa = PBXGroup; children = ( @@ -678,18 +707,25 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 89319A6F26E237A5001EFBD7 /* __uniappes6.js in Resources */, 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 89319A7526E237A5001EFBD7 /* weexUniJs.js in Resources */, 6EE8F3452695816000237A5E /* __uniappes6.js in Resources */, 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 6EE8F3472695816000237A5E /* PandoraApi.bundle in Resources */, 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 89319A7126E237A5001EFBD7 /* PandoraApi.bundle in Resources */, 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 6EE8F3482695816000237A5E /* unincomponents.ttf in Resources */, 6EE8F34A2695816000237A5E /* weexUniJs.js in Resources */, 6EE8F3492695816000237A5E /* weex-polyfill.js in Resources */, 89AEFA8426A684D800DD2817 /* userPosition@2x.png in Resources */, 899C4C3C26A5179900B44087 /* InfoPlist.strings in Resources */, + 89319A7326E237A5001EFBD7 /* userPosition@2x.png in Resources */, 6EE8F3462695816000237A5E /* uni-jsframework.js in Resources */, + 89319A7226E237A5001EFBD7 /* unincomponents.ttf in Resources */, + 89319A7426E237A5001EFBD7 /* weex-polyfill.js in Resources */, + 89319A7026E237A5001EFBD7 /* uni-jsframework.js in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -874,7 +910,7 @@ CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 36; + CURRENT_PROJECT_VERSION = 38; DEVELOPMENT_TEAM = YF3Q8DVP52; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -924,7 +960,7 @@ "$(PROJECT_DIR)/baidu", "$(PROJECT_DIR)/Runner/baidu", ); - MARKETING_VERSION = 1.0.36; + MARKETING_VERSION = 1.0.38; ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = ( "$(inherited)", @@ -1110,7 +1146,7 @@ CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 36; + CURRENT_PROJECT_VERSION = 38; DEVELOPMENT_TEAM = YF3Q8DVP52; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -1160,7 +1196,7 @@ "$(PROJECT_DIR)/baidu", "$(PROJECT_DIR)/Runner/baidu", ); - MARKETING_VERSION = 1.0.36; + MARKETING_VERSION = 1.0.38; ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = ( "$(inherited)", @@ -1239,7 +1275,7 @@ CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 36; + CURRENT_PROJECT_VERSION = 38; DEVELOPMENT_TEAM = YF3Q8DVP52; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -1289,7 +1325,7 @@ "$(PROJECT_DIR)/baidu", "$(PROJECT_DIR)/Runner/baidu", ); - MARKETING_VERSION = 1.0.36; + MARKETING_VERSION = 1.0.38; ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = ( "$(inherited)", diff --git a/ios/UniMPSDK/Resources/PandoraApi.bundle/all.js b/ios/UniMPSDK/Resources/PandoraApi.bundle/all.js index 15326c16..4b9ac84a 100644 --- a/ios/UniMPSDK/Resources/PandoraApi.bundle/all.js +++ b/ios/UniMPSDK/Resources/PandoraApi.bundle/all.js @@ -1 +1 @@ -var plusType;function __adsfsdaf99dsafsd090dsfsd__(){var a=["plus","tools","bridge","Console","console","concat","slice","call","logLevel","apply","j","o","stringify","c","","error JSON.stringify()ing argument: ","prototype","toString","","length","string","exec","shift","push","%","%","unshift","join","","log","LOG","info","INFO","warn","WARN","error","ERROR","assert","ASSERT:","clear","clear","time","valueOf","timeEnd","Timer [",": ","ms]","format","logLevel"," ","debug","addEventListener","error","message","\rfilename:","filename","\rlineno:","lineno"],e=(window[a[0]][a[1]],window[a[0]]);function t(e,t){t=[e][a[5]]([][a[6]][a[7]](t)),logger[a[8]][a[9]](logger,t)}function n(e,t){if(null==e)return[a[18]];if(1==arguments[a[19]])return[e[a[17]]()];typeof e!=a[20]&&(e=e[a[17]]());for(var n=/(.*?)%(.)(.*)/,i=e,o=[];t[a[19]];){var r=n[a[21]](i);if(!r)break;var s=t[a[22]](),i=r[3];o[a[23]](r[1]),r[2]!=a[24]?o[a[23]](function(e,t){try{switch(t){case a[10]:case a[11]:return JSON[a[12]](e);case a[13]:return a[14]}}catch(e){return a[15]+e}return null==e?Object[a[16]].toString[a[7]](e):e[a[17]]()}(s,r[2])):(o[a[23]](a[24]),t[a[26]](s))}o[a[23]](i);var c=[][a[6]][a[7]](t);return c[a[26]](o[a[27]](a[14])),c}B=window[a[0]][a[2]],_LOGF=a[3],winConsole=window[a[4]],Timers={},logger={},logger[a[29]]=function(e){t(a[30],arguments)},logger[a[31]]=function(e){t(a[32],arguments)},logger[a[33]]=function(e){t(a[34],arguments)},logger[a[35]]=function(e){t(a[36],arguments)},logger[a[37]]=function(e){if(!e){var t=vformat([][a[6]][a[7]](arguments,1));throw logger[a[29]](a[38]+t),new Error(t)}},logger[a[39]]=function(){B[a[21]](_LOGF,a[40],0)},logger[a[41]]=function(e){Timers[e]=(new Date)[a[42]]()},logger[a[43]]=function(e){var t=Timers[e];t&&(t=(new Date)[a[42]]()-t,logger[a[29]](a[44]+e+a[45]+t+a[46]))},logger[a[8]]=function(e){var t=[][a[6]][a[7]](arguments,1),t=logger[a[47]][a[9]](logger[a[47]],t);B[a[21]](_LOGF,a[48],[e,t])},logger[a[47]]=function(e,t){return n(e,[][a[6]][a[7]](arguments,1))[a[27]](a[49])},e[a[4]]={},e[a[4]][a[29]]=function(){},e[a[4]][a[31]]=function(){},e[a[4]][a[35]]=function(){},e[a[4]][a[33]]=function(){},e[a[4]][a[37]]=function(){},e[a[4]][a[39]]=function(){},e[a[4]][a[41]]=function(){},e[a[4]][a[43]]=function(){},e[a[1]][a[50]]&&(window[a[4]][a[29]]=logger[a[29]],window[a[4]][a[31]]=logger[a[31]],window[a[4]][a[35]]=logger[a[35]],window[a[4]][a[33]]=logger[a[33]],window[a[51]](a[52],function(e){e=e[a[53]]+a[54]+e[a[55]]+a[56]+e[a[57]];window[a[4]][a[35]](e)}))}window.plus&&(!window.plus||window.plus.isReady)||(plusType=typeof window.plus,"function"==plusType||"object"==plusType?(window.plus.isReady=!0,navigator.plus=window.__html5plus__=window.plus):window.__html5plus__=window.plus=navigator.plus={isReady:!0}),function(e){var i=e.tools={__UUID__:0,UNKNOWN:-1,IOS:0,ANDROID:1,platform:-1,debug:!1,UUID:function(e){return e+this.__UUID__+++(new Date).valueOf()},extend:function(e,t){for(var n in t)e[n]=t[n]},typeName:function(e){return Object.prototype.toString.call(e).slice(8,-1)},isDate:function(e){return"Date"==i.typeName(e)},isArray:function(e){return"Array"==i.typeName(e)},isDebug:function(){return e.tools.debug},stringify:function(e){return(window.JSON3||JSON).stringify(e)},isNumber:function(e){return"number"==typeof e||e instanceof Number},getElementOffsetInWebview:function(e,t){for(var n=0,i=e;i;)n+=i[t],i=i.offsetParent;return n},getElementOffsetXInWebview:function(e){return i.getElementOffsetInWebview(e,"offsetLeft")},getElementOffsetYInWebview:function(e){return i.getElementOffsetInWebview(e,"offsetTop")},execJSfile:function(e){var t=document.createElement("script");t.type="text/javascript",t.src=e,function e(t){var n=document.head,i=document.body;n?n.insertBefore(t,n.firstChild):i?i.insertBefore(t,i.firstChild):setTimeout(function(){e(t)},100)}(t)},copyObjProp2Obj:function(e,t,n){var i,o=n instanceof Array;for(i in t){var r=!0;if(o)for(var s=0;sthis.length?this.position=this.length:this.position=e)},t.truncate=function(e){if(this.readyState===y.WRITING)throw new u(u.INVALID_STATE_ERR);this.readyState=y.WRITING;var t=this;"function"==typeof t.onwritestart&&t.onwritestart(new i("writestart",{target:this})),a.exec(function(e){t.readyState!==y.DONE&&(t.readyState=y.DONE,t.length=e,t.position=Math.min(t.position,e),"function"==typeof t.onwrite&&t.onwrite(new i("write",{target:t})),"function"==typeof t.onwriteend&&t.onwriteend(new i("writeend",{target:t})))},function(e){t.readyState!==y.DONE&&(t.readyState=y.DONE,t.error=new u(e),"function"==typeof t.onerror&&t.onerror(new i("error",{target:t})),"function"==typeof t.onwriteend&&t.onwriteend(new i("writeend",{target:t})))},"truncate",[this.fileName,e,this.position])},e.io={FileSystem:v,DirectoryEntry:d,DirectoryReader:h,FileReader:p,FileWriter:y,requestFileSystem:function(t,n,i){function o(e){"function"==typeof i&&i(new u(e))}var r,e;t<1||4=this.southwest.longitude&&e.latitude<=this.northease.latitude&&e.latitude>=this.southwest.latitude)},g.prototype.equals=function(e){return e instanceof g&&(this.northease.equals(e.northease)&&this.southwest.equals(e.southwest))},g.prototype.getCenter=function(){var e=(this.northease.longitude-this.southwest.longitude)/2,t=(this.northease.latitude-this.southwest.latitude)/2;return new w(e+this.southwest.longitude,t+this.southwest.latitude)},(t=w.prototype).setLng=function(e){this.longitude=e},t.getLng=function(){return this.longitude},t.setLat=function(e){this.latitude=e},t.getLat=function(){return this.latitude},t.equals=function(e){return this.longitude==e.longitude&&this.latitude==e.latitude},(t=n.prototype).show=function(){1!=this.visable&&(this.visable=!0,p(this._UUID_,"show",["true"]))},t.hide=function(){0!=this.visable&&(this.visable=!1,p(this._UUID_,"hide",["false"]))},t.isVisible=function(){return this.visable},t.bringToTop=function(){p(this._UUID_,"bringToTop",[])},(t=b.prototype=new n).constructor=b,t.setPoint=function(e){e instanceof w&&(e=[this.point=e],p(this._UUID_,"setPoint",e))},t.getPoint=function(){return this.point},t.setIcon=function(e){"string"==typeof e&&(this.icon=e,p(this._UUID_,"setIcon",[e]))},t.setLabel=function(e){"string"==typeof e&&(this.caption=e,p(this._UUID_,"setLabel",[e]))},t.getLabel=function(){return this.caption},t.setBubble=function(e,t){var n,i;e instanceof v?((n=e.marker)&&n!=this&&(i=[n.bubble=null,null,null,null,!1],p(n._UUID_,"setBubble",i)),(e.marker=this).bubble=e,i=[this.bubble.label,this.bubble.icon,this.bubble.__contentImageAsDataURL,this.bubble.__contentImage,t],p(this._UUID_,"setBubble",i)):null==e&&p(this._UUID_,"setBubble",[null,null,null,null,t])},t.hideBubble=function(){this.bubble&&p(this._UUID_,"hideBubble",[])},t.getBubble=function(){return this.bubble},t.setDraggable=function(e){e!=this.canDraggable&&(this.canDraggable=!this.canDraggable,p(this._UUID_,"setDraggable",[this.canDraggable]))},t.isDraggable=function(){return this.canDraggable},t.setIcons=function(e,t){p(this._UUID_,"setIcons",[e,t])},(t=m.prototype=new n).constructor=m,t.setStrokeColor=function(e){"string"==typeof e&&(this.strokeColor=e,p(this._UUID_,"setStrokeColor",[e]))},t.getStrokeColor=function(){return this.strokeColor},t.setStrokeOpacity=function(e){"number"==typeof e&&(e<0?e=0:1this.options.minDistance&&(this.direction=1.73*nthis.options.minDistance&&(this.isPull=!0,this.options.onPullStart(e,this.distanceY))),this.isPull&&this.direction===o.DOWN&&(this.distanceY=t.pageY-this.startY,this.refreshY=parseInt(this.distanceY*this.options.pullRatio),this.options.onMove(e,this.distanceY)))},__end:function(e){!this.hasTouch||o.LEFT_RIGHT!==this.direction&&o.DOWN!==this.direction||(this.direction===o.LEFT_RIGHT&&(e.preventDefault(),e.stopPropagation(),this.options.onPullEnd(e,this.distanceX,o.LEFT_RIGHT)),this.direction===o.DOWN&&this.isPull&&(e.preventDefault(),e.stopPropagation(),this.options.onPullEnd(e,this.distanceY,o.DOWN))),this.hasTouch=!1,this.isPull=!1}},{init:function(e){return new r(e)},DIRECTION:o});function r(e){"string"==typeof e.con&&(e.con=t.querySelector(e.con)),this.options=Object.assign({},i,e),this.hasTouch=!1,this.direction=o.NONE,this.distanceX=this.startY=this.startX=0,this.isPull=!1,this.initEvent()}var w,F={drawArrow:w=function(e,t,n,i,o,r,s,c,a,u){"string"==typeof t&&(t=parseFloat(t)),"string"==typeof n&&(n=parseFloat(n)),"string"==typeof i&&(i=parseFloat(i)),"string"==typeof o&&(o=parseFloat(o)),r=void 0!==r?r:3,s=void 0!==s?s:1,c=void 0!==c?c:Math.PI/8,a=void 0!==a?a:10;var l,_,f="function"!=typeof r?b:r,d=Math.sqrt((i-t)*(i-t)+(o-n)*(o-n)),h=(d-a/3)/d,d=1&s?(l=Math.round(t+(i-t)*h),Math.round(n+(o-n)*h)):(l=i,o),h=2&s?(_=t+(i-t)*(1-h),n+(o-n)*(1-h)):(_=t,n);e.beginPath(),e.moveTo(_,h),e.lineTo(l,d),e.stroke();var p,y,v,g,d=Math.atan2(o-n,i-t),a=Math.abs(a/Math.cos(c));1&s&&(p=d+Math.PI+c,y=i+Math.cos(p)*a,v=o+Math.sin(p)*a,g=d+Math.PI-c,f(e,y,v,i,o,i+Math.cos(g)*a,o+Math.sin(g)*a,r,u)),2&s&&(p=d+c,g=d-c,f(e,y=t+Math.cos(p)*a,v=n+Math.sin(p)*a,t,n,t+Math.cos(g)*a,n+Math.sin(g)*a,r,u))},drawArcedArrow:function(e,t,n,i,o,r,s,c,a,u,l,_,f,d){var h,p,y,v,g;c=void 0!==c?c:3,a=void 0!==a?a:1,u=void 0!==u?u:Math.PI/8,l=void 0!==l?l:10,_=void 0!==_?_:1,e.save(),e.beginPath(),e.globalAlpha=1,e.restore(),e.lineWidth=_,e.beginPath(),e.arc(t,n,i,o,r,s),e.stroke(),1&a&&(h=Math.cos(o)*i+t,p=Math.sin(o)*i+n,y=Math.atan2(t-h,p-n),g=s?(v=h+10*Math.cos(y),p+10*Math.sin(y)):(v=h-10*Math.cos(y),p-10*Math.sin(y)),w(e,h,p,v,g,c,2,u,l,d)),2&a&&(h=Math.cos(r)*i+t,p=Math.sin(r)*i+n,y=Math.atan2(t-h,p-n),g=s?(v=h-10*Math.cos(y),p-10*Math.sin(y)):(v=h+10*Math.cos(y),p+10*Math.sin(y)),w(e,h-f*Math.sin(r),p+f*Math.cos(r),v-f*Math.sin(r),g+f*Math.cos(r),c,2,u,l,d)),e.restore()}};function b(e,t,n,i,o,r,s,c,a){switch("string"==typeof t&&(t=parseFloat(t)),"string"==typeof n&&(n=parseFloat(n)),"string"==typeof i&&(i=parseFloat(i)),"string"==typeof o&&(o=parseFloat(o)),"string"==typeof r&&(r=parseFloat(r)),"string"==typeof s&&(s=parseFloat(s)),Math.PI,e.save(),c){case 0:var u=Math.sqrt((r-t)*(r-t)+(s-n)*(s-n));e.arcTo(i,o,t,n,.55*u),e.fill();break;case 1:.5=this.minRefreshDistance&&(this.shouldRefresh=!0),this.shouldRefresh},pullTipExist:function(){return this.$pullTip},reset:function(){var e=this.isRefreshing;this.isRefreshing=!1,this.shouldRefresh=!1,this.removePullTip(e)},canvasObj:(a=s=c=null,u=!1,_=l=100,f=50,d=!(r=15),(h=["green"])[0],p=1,y={startAngle:0,speed:5,color:h[0],counterClockwise:!1,globalCompositeOperation:"source-out",lineWidth:r},v={startAngle:0,speed:5,color:"white",counterClockwise:!1,globalCompositeOperation:"destination-out",lineWidth:r+40},b=y,m="draw",I=50,S=x=w=g=0,{init:function(e,t){this.reset(),S=0,d=!1,s=e.querySelector("canvas"),a=s.getContext?s.getContext("2d"):s,u=!s.getContext,w=g=0,y.startAngle=v.startAngle=0,x=R(g),p=1,h=[t.options.color],y.color=h[p],m="draw",b=y,c=t,u?l=_=f=(40-2*9)/2:(l=_=100,f=50)},reset:function(){a=s=null},drawArrowedArcByDis:function(e){O(e)},drawArc:function(e){C?console.log("not support"):A()},clearCurrent:function(){var e,n,i,o,t;C?console.log("not support"):(t=c.$pullTip.ownerDocument.defaultView.getComputedStyle(c.$pullTip,null),(t=(e=t.transform,t=0,e&&(t=(e=(e=e.replace("matrix(","").replace(")","")).replace(/\s+/gi,"")).split(",")[5]||0),t))
'.replace(/\{WIDTH\}/g,40*this.options.ratio+"px").replace(/\{SHADOWOFFSETY\}/g,2*this.options.ratio).replace(/\{SHADOWBLUR\}/g,5*this.options.ratio),this.$pullTip=document.body.appendChild(t.firstElementChild),n=this.$pullTip,this.$pullTipInner=n.querySelector("div"),t=n.offsetHeight,E=25*this.options.ratio,this.minRefreshDistance=70*this.options.ratio,(n=n).querySelector("canvas"),n.style.top=this.options.offset-t+"px",n.style.webkitTransition="none",n.style.webkitTransform="translate3d(0,0,0)",this.initCanvas())},movePullTip:function(e,t,n){var i;this.pullTipExist()&&(i=Math.min(this.options.range+20*this.options.ratio,e),this.$pullTip.style.webkitTransition=t||"none",t=50*this.options.ratio,i=Math.max(0,i-t),this.$pullTip.style.webkitTransform="translate3d(0,"+i+"px,0)",this.$pullTip.style.height=Math.min(e,t)+"px",this.$pullTipInner.style.webkitTransform="translateY("+Math.min(0,Math.max(-t,e-t))+"px)",0===e?this.canvasObj.clearCurrent():E=40*this.options.ratio&&this.canvasObj.rotate(e),this.canvasObj.drawArrowedArcByDis(e-E),this.canvasObj.changeOpacity(e-E))))},changePullTip:function(e,t){this.pullTipExist()},removePullTip:function(e){this.pullTipExist()&&(e?(this.canvasObj.stopAuto(),this.$pullTip.style.webkitTransition="all 100ms linear",this.$pullTip.style.opacity=.1,this.$pullTip.style.webkitTransform+=" scale(0.1)"):(this.$pullTip.removeEventListener("webkitTransitionEnd",this.onTransitionEnd,!1),this.$pullTip.remove(),this.$pullTip=null))}},{init:function(e){return new t(e)}}}(),y=/complete|loaded|interactive/,v=!1;window.__setPullToRefresh__=function(i,o){var e;e=function(){return!i.support&&s?(s.reset(),s.touchPull.detachEvent(),void(v=!0)):void(i.support&&(980===(n=window.innerWidth)&&(n=window.plus&&plus.screen.resolutionWidth||window.screen.width),e=n/(window.plus&&plus.screen.resolutionWidth||window.screen.width),t=parseInt(i.offset),n=parseInt(i.range)||128,useCapture=!1!==i.useCapture,n=n*e+(t*=e),s?(s.options.useCapture=useCapture,v&&s.touchPull.initEvent(),i.offset&&(s.options.offset=t),i.range&&(s.options.range=n),i.color&&(s.options.color=i.color),s.options.doRefresh=o):s=c.init({offset:t,range:n,ratio:e,useCapture:useCapture,color:i.color||"green",doRefresh:o})));var e,t,n},y.test(document.readyState)?e():document.addEventListener("DOMContentLoaded",function(){e()},!1)},window.__endPullToRefresh__=function(){s&&s.reset()},window.__beginPullToRefresh__=function(){s&&s.beginPullToRefresh()}}(),__Mkey__Push__=function(){var i=[];return{pushCallback_Push:function(e,t,n){i[e]={fun:t,nokeep:n}},execCallback_Push:function(e,t,n){i[e]&&i[e].fun&&i[e].fun(n)}}}(),function(i){var i=i,o=window.plus.bridge,r=window.plus.tools,s="Push";function c(e,t,n){this.__UUID__=null,this.message=e,this.Payload=t,this.options=n}i.push={getClientInfo:function(){return o.execSync2(s,"getClientInfo",[])},getClientInfoAsync:function(t,n){var e=o.callbackId(function(e){"function"==typeof t&&t(e)},function(e){"function"==typeof n&&n(e)});o.exec(s,"getClientInfoAsync",[e])},createMessage:function(e,t,n){r.platform==r.IOS?o.exec(s,"createMessage",[e,t,n]):(n&&n.icon&&(n.icon=i.io.convertLocalFileSystemURL(n.icon)),e=new c(e,t,n),n=o.execSync(s,"createMessage",[e]),e.__UUID__=n)},clear:function(){o.exec(s,"clear",[])},addEventListener:function(e,t,n){var i=r.UUID(e);__Mkey__Push__.pushCallback_Push(i,t,n),o.exec(s,"addEventListener",[window.__HtMl_Id__,i,e])},remove:function(e){o.exec(s,"remove",[e.__UUID__])},getAllMessage:function(){return o.execSync(s,"getAllMessage",[])},setAutoNotification:function(e){o.exec(s,"setAutoNotification",[e])}}}(window.plus),function(e){var e=e,c=window.plus.bridge,a="Runtime";e.runtime={arguments:null,version:null,innerVersion:null,uniVersion:"",launchLoadedTime:null,launcher:null,origin:null,processId:null,startupTime:null,isRecovery:!1,restart:function(){c.exec(a,"restart",[])},install:function(e,t,n,i){i=c.callbackId(n,i);c.exec(a,"install",[e,i,t])},getProperty:function(e,t){t=c.callbackId(t);c.exec(a,"getProperty",[e,t])},quit:function(){c.exec(a,"quit",[])},openURL:function(e,t,n){var i=c.callbackId(null,function(e){"function"==typeof t&&t(e)});c.exec(a,"openURL",[e,i,n])},launchApplication:function(e,t){var n=c.callbackId(null,function(e){"function"==typeof t&&t(e)});c.exec(a,"launchApplication",[e,n])},setBadgeNumber:function(e,t){"number"==typeof e&&c.exec(a,"setBadgeNumber",[e,t])},openFile:function(e,t,n){var i=c.callbackId(null,function(e){"function"==typeof n&&n(e)});c.exec(a,"openFile",[e,t,i])},isStreamValid:function(){return c.execSync(a,"isStreamValid")},openWeb:function(e){return c.exec(a,"openWeb",[e])},isApplicationExist:function(e){return null!=e&&"string"!=typeof e&&c.execSync(a,"isApplicationExist",[e])},processDirectPage:function(){return c.execSync(a,"processDirectPage",[])},isCustomLaunchPath:function(){return c.execSync(a,"isCustomLaunchPath")},getDCloudId:function(){return c.execSync(a,"getDCloudId")},agreePrivacy:function(){c.exec(a,"agreePrivacy",[])},disagreePrivacy:function(){c.exec(a,"disagreePrivacy",[])},isAgreePrivacy:function(){return c.execSync(a,"isAgreePrivacy",[])},downloadFile:function(o,r,s){var e;if("string"==typeof o.url)10r.Uninitialized&&("function"==typeof this.onabort&&this.onabort(this.__progessEvent__),this.__init__(),o.exec(r.__F__,"abort",[this.__UUID__]))},s.getAllResponseHeaders=function(){if(this.readyState>=r.Receiving){if(this.__noParseResponseHeader__)return this.__noParseResponseHeader__;var e,t="";for(e in this.__responseHeaders__)t=t+e+": "+this.__responseHeaders__[e]+"\r\n";return this.__noParseResponseHeader__=t,this.__noParseResponseHeader__}return null},s.getResponseHeader=function(e){if("string"==typeof e&&this.readyState>=r.Receiving){var t=null;if(e=e.toLowerCase(),t=this.__cacheReponseHeaders__[e])return t;for(n in this.__responseHeaders__){var n,i=this.__responseHeaders__[n];e===(n=n.toLowerCase())&&(t=t?t+", "+i:i)}return this.__cacheReponseHeaders__[e]=t}return null},s.setRequestHeader=function(e,t){var n;"string"==typeof e&&"string"==typeof t&&r.Open==this.readyState&&(n=this.__requestHeaders__[e],this.__requestHeaders__[e]=n?n+", "+t:t)},s.open=function(e,t,n,i){r.Open!=this.readyState&&r.Loaded!=this.readyState||this.__init__(),r.Uninitialized==this.readyState&&(this.readyState=r.Open,o.exec(r.__F__,"open",[this.__UUID__,e,"string"==typeof(t=t)?0==(t=t.replace(/(^\s*)|(\s*$)/g,"")).indexOf("http://")||0==t.indexOf("https://")?t:t=0==t.indexOf("/")?location.origin+t:location.origin+location.pathname+t:"",n,i,this.timeout]),"function"==typeof this.onreadystatechange&&this.onreadystatechange())},s.overrideMimeType=function(e){o.exec(r.__F__,"overrideMimeType",[this.__UUID__,e])},s.send=function(e){var n=this;if(r.Open!=this.readyState)throw new Error("XMLHttpRequest not open");this.readyState=r.Sent,"function"==typeof this.onloadstart&&this.onloadstart(n.__progessEvent__);var t=o.callbackId(function(e){if(r.Receiving==e.readyState)r.Sent==n.readyState?(n.readyState=r.Receiving,n.status=e.status,n.statusText=e.statusText,n.__responseHeaders__=e.header,n.__progessEvent__.lengthComputable=e.lengthComputable,n.__progessEvent__.total=e.totalSize):r.Receiving==n.readyState&&(n.responseText=e.responseText,n.__progessEvent__.loaded=e.revSize),"function"==typeof n.onreadystatechange&&n.onreadystatechange(),"function"==typeof n.onprogress&&n.onprogress(n.__progessEvent__);else if(r.Loaded==e.readyState){n.readyState=r.Loaded,e.status&&(n.status=e.status);try{n.responseText&&(t=new DOMParser,n.responseXML=t.parseFromString(n.responseText,"text/xml"))}catch(e){n.responseXML=null}try{var t;"document"==n.responseType?(t=new DOMParser,n.response=n.responseXML):"json"==n.responseType&&(n.response=JSON.parse(n.responseText))}catch(e){n.response=null}"function"==typeof n.onreadystatechange&&n.onreadystatechange(),e.error==i.Timeout?"function"==typeof n.ontimeout&&n.ontimeout(n.__progessEvent__):e.error==i.Other?"function"==typeof n.onerror&&n.onerror(n.__progessEvent__):"function"==typeof n.onload&&n.onload(n.__progessEvent__),"function"==typeof n.onloadend&&n.onloadend(n.__progessEvent__)}});return o.exec(r.__F__,"send",[this.__UUID__,t,e,this.__requestHeaders__]),void("function"==typeof this.onreadystatechange&&this.onreadystatechange())},e.net={XMLHttpRequest:r}}(window.plus),function(e){var e=e,o=window.plus.bridge,r="Zip";e.zip={compressVideo:function(e,t,n){n=o.callbackId(function(e){t&&(e={tempFilePath:e.tempFilePath,size:e.size},t(e))},n);o.exec(r,"compressVideo",[e,n])},decompress:function(e,t,n,i){i=o.callbackId(n,i);o.exec(r,"decompress",[e,t,i])},compress:function(e,t,n,i){i=o.callbackId(n,i);o.exec(r,"compress",[e,t,i])},compressImage:function(e,t,n){n=o.callbackId(function(e){t&&(e={target:e.path,width:e.w,height:e.h,size:e.size},t(e))},n);o.exec(r,"compressImage",[e,n])}}}(window.plus),function(i){var r=(i=i).bridge,s="ShortVideo",o=i.tools;function c(e){return o.getElementOffsetXInWebview(e)}function a(e){return o.getElementOffsetYInWebview(e)}function e(e,t){this.id=o.UUID("dt"),this.IDENTITY=s,div=document.getElementById(e);var n=this.id,e=[];div&&(i.tools.platform==i.tools.ANDROID?document.addEventListener("plusorientationchange",function(){setTimeout(function(){var e=[c(div),a(div),div.offsetWidth,div.offsetHeight];r.exec(s,"resize",[n,e])},200)},!1):div.addEventListener("resize",function(){var e=[c(div),a(div),div.offsetWidth,div.offsetHeight];r.exec(s,"resize",[n,e])},!1),e=[c(div),a(div),div.offsetWidth,div.offsetHeight]),r.exec(s,"ShortVideo",[this.id,e,t])}var t=e.prototype;function n(e,t){this.id=o.UUID("dt"),this.IDENTITY=s,div=document.getElementById(e);var e=[],n=this.id;div&&(i.tools.platform==i.tools.ANDROID?document.addEventListener("plusorientationchange",function(){setTimeout(function(){var e=[c(div),a(div),div.offsetWidth,div.offsetHeight];r.exec(s,"shortVideoEditor_resize",[n,e])},200)},!1):div.addEventListener("resize",function(){var e=[c(div),a(div),div.offsetWidth,div.offsetHeight];r.exec(s,"shortVideoEditor_resize",[n,e])},!1),e=[c(div),a(div),div.offsetWidth,div.offsetHeight]),r.exec(s,"ShortVideoEditor",[this.id,e,t])}t.start=function(e){r.exec(s,"ShortVideo_start",[this.id,e])},t.pause=function(){r.exec(s,"ShortVideo_pause",[this.id])},t.resume=function(){r.exec(s,"ShortVideo_resume",[this.id])},t.stop=function(){r.exec(s,"ShortVideo_stop",[this.id])},t.close=function(){r.exec(s,"ShortVideo_close",[this.id])},t.switchCamera=function(e){r.exec(s,"ShortVideo_switchCamera",[this.id,e])},t.setStyles=function(e){r.exec(s,"ShortVideo_setStyles",[this.id,e])},t.startMixAudio=function(e){r.exec(s,"ShortVideo_startMixAudio",[this.id,e])},t.pauseMixAudio=function(){r.exec(s,"ShortVideo_pauseMixAudio",[this.id])},t.resumeMixAudio=function(){r.exec(s,"ShortVideo_resumeMixAudio",[this.id])},t.stopMixAudio=function(){r.exec(s,"ShortVideo_stopMixAudio",[this.id])},t.addEventListener=function(e,t){var n,i=this;t&&(n=function(e){"function"==typeof t&&(e.target=i,t(e))},t.callback=n,n=r.callbackId(n)),r.exec(s,"ShortVideo_addEventListener",[this.id,e,n])},(t=n.prototype).play=function(){r.exec(s,"shortVideoEditor_play",[this.id])},t.pause=function(){r.exec(s,"shortVideoEditor_pause",[this.id])},t.resume=function(){r.exec(s,"shortVideoEditor_resume",[this.id])},t.stop=function(){r.exec(s,"shortVideoEditor_stop",[this.id])},t.close=function(){r.exec(s,"shortVideoEditor_close",[this.id])},t.setStyles=function(e){r.exec(s,"shortVideoEditor_setStyles",[this.id,e])},t.save=function(e,t,n){var i="function"!=typeof t?null:function(e){t(e)},o="function"!=typeof n?null:function(e){n(e)},o=r.callbackId(i,o);r.exec(s,"shortVideoEditor_save",[this.id,e,o])},t.addEventListener=function(e,t){var n,i=this;t&&(n=function(e){"function"==typeof t&&(e.target=i,t(e))},t.callback=n,n=r.callbackId(n)),r.exec(s,"shortVideoEditor_addEventListener",[this.id,e,n])},t={Camera:e,Editor:n,upload:function(e,t,n){var i="function"!=typeof t?null:function(e){t(e)},o="function"!=typeof n?null:function(e){n(e)},o=r.callbackId(i,o);r.exec(s,"uploader",[e,o])}},i.shortvideo=t}(window.plus),function(e){var o="iBeacon",r=e.bridge,t={startBeaconDiscovery:function(t){if("object"==typeof t){var n="function"!=typeof t.complete?function(){}:t.complete,e="function"!=typeof t.success?n:function(e){t.success(e),n(e)},i="function"!=typeof t.fail?n:function(e){t.fail(e),n(e)};return callbackID=r.callbackId(e,i),r.exec(o,"startBeaconDiscovery",[callbackID,t.uuids])}},stopBeaconDiscovery:function(t){var n="function"!=typeof t.complete?function(){}:t.complete,e="function"!=typeof t.success?n:function(e){t.success(e),n(e)},i="function"!=typeof t.fail?n:function(e){t.fail(e),n(e)};return callbackID=r.callbackId(e,i),r.exec(o,"stopBeaconDiscovery",[callbackID])},getBeacons:function(t){var n="function"!=typeof t.complete?function(){}:t.complete,e="function"!=typeof t.success?n:function(e){t.success(e),n(e)},i="function"!=typeof t.fail?n:function(e){t.fail(e),n(e)};return callbackID=r.callbackId(e,i),r.exec(o,"getBeacons",[callbackID])},onBeaconUpdate:function(e){e="function"!=typeof e?null:e;return callbackID=r.callbackId(e),r.exec(o,"onBeaconUpdate",[callbackID])},onBeaconServiceChange:function(e){e="function"!=typeof e?null:e;return callbackID=r.callbackId(e),r.execSync(o,"onBeaconServiceChange",[callbackID])}};e.ibeacon=t}(window.plus),function(e){var i="Bluetooth",a=window.plus.bridge,t={closeBluetoothAdapter:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(i,"closeBluetoothAdapter",[callbackID])},openBluetoothAdapter:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(i,"openBluetoothAdapter",[callbackID])},getBluetoothAdapterState:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(i,"getBluetoothAdapterState",[callbackID])},getBluetoothDevices:function(r){var s=this,c="function"!=typeof r.complete?function(){}:r.complete,e="function"!=typeof r.success?null:function(e){for(var t=e.devices,n=0;nthis.length?this.position=this.length:this.position=e)},t.truncate=function(e){if(this.readyState===y.WRITING)throw new u(u.INVALID_STATE_ERR);this.readyState=y.WRITING;var t=this;"function"==typeof t.onwritestart&&t.onwritestart(new i("writestart",{target:this})),c.exec(function(e){t.readyState!==y.DONE&&(t.readyState=y.DONE,t.length=e,t.position=Math.min(t.position,e),"function"==typeof t.onwrite&&t.onwrite(new i("write",{target:t})),"function"==typeof t.onwriteend&&t.onwriteend(new i("writeend",{target:t})))},function(e){t.readyState!==y.DONE&&(t.readyState=y.DONE,t.error=new u(e),"function"==typeof t.onerror&&t.onerror(new i("error",{target:t})),"function"==typeof t.onwriteend&&t.onwriteend(new i("writeend",{target:t})))},"truncate",[this.fileName,e,this.position])},e.io={FileSystem:v,DirectoryEntry:d,DirectoryReader:h,FileReader:p,FileWriter:y,requestFileSystem:function(t,n,i){function o(e){"function"==typeof i&&i(new u(e))}var r,e;t<1||4=this.southwest.longitude&&e.latitude<=this.northease.latitude&&e.latitude>=this.southwest.latitude)},g.prototype.equals=function(e){return e instanceof g&&(this.northease.equals(e.northease)&&this.southwest.equals(e.southwest))},g.prototype.getCenter=function(){var e=(this.northease.longitude-this.southwest.longitude)/2,t=(this.northease.latitude-this.southwest.latitude)/2;return new w(e+this.southwest.longitude,t+this.southwest.latitude)},(t=w.prototype).setLng=function(e){this.longitude=e},t.getLng=function(){return this.longitude},t.setLat=function(e){this.latitude=e},t.getLat=function(){return this.latitude},t.equals=function(e){return this.longitude==e.longitude&&this.latitude==e.latitude},(t=n.prototype).show=function(){1!=this.visable&&(this.visable=!0,p(this._UUID_,"show",["true"]))},t.hide=function(){0!=this.visable&&(this.visable=!1,p(this._UUID_,"hide",["false"]))},t.isVisible=function(){return this.visable},t.bringToTop=function(){p(this._UUID_,"bringToTop",[])},(t=b.prototype=new n).constructor=b,t.setPoint=function(e){e instanceof w&&(e=[this.point=e],p(this._UUID_,"setPoint",e))},t.getPoint=function(){return this.point},t.setIcon=function(e){"string"==typeof e&&(this.icon=e,p(this._UUID_,"setIcon",[e]))},t.setLabel=function(e){"string"==typeof e&&(this.caption=e,p(this._UUID_,"setLabel",[e]))},t.getLabel=function(){return this.caption},t.setBubble=function(e,t){var n,i;e instanceof v?((n=e.marker)&&n!=this&&(i=[n.bubble=null,null,null,null,!1],p(n._UUID_,"setBubble",i)),(e.marker=this).bubble=e,i=[this.bubble.label,this.bubble.icon,this.bubble.__contentImageAsDataURL,this.bubble.__contentImage,t],p(this._UUID_,"setBubble",i)):null==e&&p(this._UUID_,"setBubble",[null,null,null,null,t])},t.hideBubble=function(){this.bubble&&p(this._UUID_,"hideBubble",[])},t.getBubble=function(){return this.bubble},t.setDraggable=function(e){e!=this.canDraggable&&(this.canDraggable=!this.canDraggable,p(this._UUID_,"setDraggable",[this.canDraggable]))},t.isDraggable=function(){return this.canDraggable},t.setIcons=function(e,t){p(this._UUID_,"setIcons",[e,t])},(t=m.prototype=new n).constructor=m,t.setStrokeColor=function(e){"string"==typeof e&&(this.strokeColor=e,p(this._UUID_,"setStrokeColor",[e]))},t.getStrokeColor=function(){return this.strokeColor},t.setStrokeOpacity=function(e){"number"==typeof e&&(e<0?e=0:1this.options.minDistance&&(this.direction=1.73*nthis.options.minDistance&&(this.isPull=!0,this.options.onPullStart(e,this.distanceY))),this.isPull&&this.direction===o.DOWN&&(this.distanceY=t.pageY-this.startY,this.refreshY=parseInt(this.distanceY*this.options.pullRatio),this.options.onMove(e,this.distanceY)))},__end:function(e){!this.hasTouch||o.LEFT_RIGHT!==this.direction&&o.DOWN!==this.direction||(this.direction===o.LEFT_RIGHT&&(e.preventDefault(),e.stopPropagation(),this.options.onPullEnd(e,this.distanceX,o.LEFT_RIGHT)),this.direction===o.DOWN&&this.isPull&&(e.preventDefault(),e.stopPropagation(),this.options.onPullEnd(e,this.distanceY,o.DOWN))),this.hasTouch=!1,this.isPull=!1}},{init:function(e){return new r(e)},DIRECTION:o});function r(e){"string"==typeof e.con&&(e.con=t.querySelector(e.con)),this.options=Object.assign({},i,e),this.hasTouch=!1,this.direction=o.NONE,this.distanceX=this.startY=this.startX=0,this.isPull=!1,this.initEvent()}var w,F={drawArrow:w=function(e,t,n,i,o,r,s,a,c,u){"string"==typeof t&&(t=parseFloat(t)),"string"==typeof n&&(n=parseFloat(n)),"string"==typeof i&&(i=parseFloat(i)),"string"==typeof o&&(o=parseFloat(o)),r=void 0!==r?r:3,s=void 0!==s?s:1,a=void 0!==a?a:Math.PI/8,c=void 0!==c?c:10;var l,_,f="function"!=typeof r?b:r,d=Math.sqrt((i-t)*(i-t)+(o-n)*(o-n)),h=(d-c/3)/d,d=1&s?(l=Math.round(t+(i-t)*h),Math.round(n+(o-n)*h)):(l=i,o),h=2&s?(_=t+(i-t)*(1-h),n+(o-n)*(1-h)):(_=t,n);e.beginPath(),e.moveTo(_,h),e.lineTo(l,d),e.stroke();var p,y,v,g,d=Math.atan2(o-n,i-t),c=Math.abs(c/Math.cos(a));1&s&&(p=d+Math.PI+a,y=i+Math.cos(p)*c,v=o+Math.sin(p)*c,g=d+Math.PI-a,f(e,y,v,i,o,i+Math.cos(g)*c,o+Math.sin(g)*c,r,u)),2&s&&(p=d+a,g=d-a,f(e,y=t+Math.cos(p)*c,v=n+Math.sin(p)*c,t,n,t+Math.cos(g)*c,n+Math.sin(g)*c,r,u))},drawArcedArrow:function(e,t,n,i,o,r,s,a,c,u,l,_,f,d){var h,p,y,v,g;a=void 0!==a?a:3,c=void 0!==c?c:1,u=void 0!==u?u:Math.PI/8,l=void 0!==l?l:10,_=void 0!==_?_:1,e.save(),e.beginPath(),e.globalAlpha=1,e.restore(),e.lineWidth=_,e.beginPath(),e.arc(t,n,i,o,r,s),e.stroke(),1&c&&(h=Math.cos(o)*i+t,p=Math.sin(o)*i+n,y=Math.atan2(t-h,p-n),g=s?(v=h+10*Math.cos(y),p+10*Math.sin(y)):(v=h-10*Math.cos(y),p-10*Math.sin(y)),w(e,h,p,v,g,a,2,u,l,d)),2&c&&(h=Math.cos(r)*i+t,p=Math.sin(r)*i+n,y=Math.atan2(t-h,p-n),g=s?(v=h-10*Math.cos(y),p-10*Math.sin(y)):(v=h+10*Math.cos(y),p+10*Math.sin(y)),w(e,h-f*Math.sin(r),p+f*Math.cos(r),v-f*Math.sin(r),g+f*Math.cos(r),a,2,u,l,d)),e.restore()}};function b(e,t,n,i,o,r,s,a,c){switch("string"==typeof t&&(t=parseFloat(t)),"string"==typeof n&&(n=parseFloat(n)),"string"==typeof i&&(i=parseFloat(i)),"string"==typeof o&&(o=parseFloat(o)),"string"==typeof r&&(r=parseFloat(r)),"string"==typeof s&&(s=parseFloat(s)),Math.PI,e.save(),a){case 0:var u=Math.sqrt((r-t)*(r-t)+(s-n)*(s-n));e.arcTo(i,o,t,n,.55*u),e.fill();break;case 1:.5=this.minRefreshDistance&&(this.shouldRefresh=!0),this.shouldRefresh},pullTipExist:function(){return this.$pullTip},reset:function(){var e=this.isRefreshing;this.isRefreshing=!1,this.shouldRefresh=!1,this.removePullTip(e)},canvasObj:(c=s=a=null,u=!1,_=l=100,f=50,d=!(r=15),(h=["green"])[0],p=1,y={startAngle:0,speed:5,color:h[0],counterClockwise:!1,globalCompositeOperation:"source-out",lineWidth:r},v={startAngle:0,speed:5,color:"white",counterClockwise:!1,globalCompositeOperation:"destination-out",lineWidth:r+40},b=y,m="draw",I=50,S=x=w=g=0,{init:function(e,t){this.reset(),S=0,d=!1,s=e.querySelector("canvas"),c=s.getContext?s.getContext("2d"):s,u=!s.getContext,w=g=0,y.startAngle=v.startAngle=0,x=R(g),p=1,h=[t.options.color],y.color=h[p],m="draw",b=y,a=t,u?l=_=f=(40-2*9)/2:(l=_=100,f=50)},reset:function(){c=s=null},drawArrowedArcByDis:function(e){O(e)},drawArc:function(e){C?console.log("not support"):A()},clearCurrent:function(){var e,n,i,o,t;C?console.log("not support"):(t=a.$pullTip.ownerDocument.defaultView.getComputedStyle(a.$pullTip,null),(t=(e=t.transform,t=0,e&&(t=(e=(e=e.replace("matrix(","").replace(")","")).replace(/\s+/gi,"")).split(",")[5]||0),t))
'.replace(/\{WIDTH\}/g,40*this.options.ratio+"px").replace(/\{SHADOWOFFSETY\}/g,2*this.options.ratio).replace(/\{SHADOWBLUR\}/g,5*this.options.ratio),this.$pullTip=document.body.appendChild(t.firstElementChild),n=this.$pullTip,this.$pullTipInner=n.querySelector("div"),t=n.offsetHeight,E=25*this.options.ratio,this.minRefreshDistance=70*this.options.ratio,(n=n).querySelector("canvas"),n.style.top=this.options.offset-t+"px",n.style.webkitTransition="none",n.style.webkitTransform="translate3d(0,0,0)",this.initCanvas())},movePullTip:function(e,t,n){var i;this.pullTipExist()&&(i=Math.min(this.options.range+20*this.options.ratio,e),this.$pullTip.style.webkitTransition=t||"none",t=50*this.options.ratio,i=Math.max(0,i-t),this.$pullTip.style.webkitTransform="translate3d(0,"+i+"px,0)",this.$pullTip.style.height=Math.min(e,t)+"px",this.$pullTipInner.style.webkitTransform="translateY("+Math.min(0,Math.max(-t,e-t))+"px)",0===e?this.canvasObj.clearCurrent():E=40*this.options.ratio&&this.canvasObj.rotate(e),this.canvasObj.drawArrowedArcByDis(e-E),this.canvasObj.changeOpacity(e-E))))},changePullTip:function(e,t){this.pullTipExist()},removePullTip:function(e){this.pullTipExist()&&(e?(this.canvasObj.stopAuto(),this.$pullTip.style.webkitTransition="all 100ms linear",this.$pullTip.style.opacity=.1,this.$pullTip.style.webkitTransform+=" scale(0.1)"):(this.$pullTip.removeEventListener("webkitTransitionEnd",this.onTransitionEnd,!1),this.$pullTip.remove(),this.$pullTip=null))}},{init:function(e){return new t(e)}}}(),y=/complete|loaded|interactive/,v=!1;window.__setPullToRefresh__=function(i,o){var e;e=function(){return!i.support&&s?(s.reset(),s.touchPull.detachEvent(),void(v=!0)):void(i.support&&(980===(n=window.innerWidth)&&(n=window.plus&&plus.screen.resolutionWidth||window.screen.width),e=n/(window.plus&&plus.screen.resolutionWidth||window.screen.width),t=parseInt(i.offset),n=parseInt(i.range)||128,useCapture=!1!==i.useCapture,n=n*e+(t*=e),s?(s.options.useCapture=useCapture,v&&s.touchPull.initEvent(),i.offset&&(s.options.offset=t),i.range&&(s.options.range=n),i.color&&(s.options.color=i.color),s.options.doRefresh=o):s=a.init({offset:t,range:n,ratio:e,useCapture:useCapture,color:i.color||"green",doRefresh:o})));var e,t,n},y.test(document.readyState)?e():document.addEventListener("DOMContentLoaded",function(){e()},!1)},window.__endPullToRefresh__=function(){s&&s.reset()},window.__beginPullToRefresh__=function(){s&&s.beginPullToRefresh()}}(),__Mkey__Push__=function(){var i=[];return{pushCallback_Push:function(e,t,n){i[e]={fun:t,nokeep:n}},execCallback_Push:function(e,t,n){i[e]&&i[e].fun&&i[e].fun(n)}}}(),function(i){var i=i,o=window.plus.bridge,r=window.plus.tools,s="Push";function a(e,t,n){this.__UUID__=null,this.message=e,this.Payload=t,this.options=n}i.push={getClientInfo:function(){return o.execSync2(s,"getClientInfo",[])},getClientInfoAsync:function(t,n){var e=o.callbackId(function(e){"function"==typeof t&&t(e)},function(e){"function"==typeof n&&n(e)});o.exec(s,"getClientInfoAsync",[e])},createMessage:function(e,t,n){r.platform==r.IOS?o.exec(s,"createMessage",[e,t,n]):(n&&n.icon&&(n.icon=i.io.convertLocalFileSystemURL(n.icon)),e=new a(e,t,n),n=o.execSync(s,"createMessage",[e]),e.__UUID__=n)},clear:function(){o.exec(s,"clear",[])},addEventListener:function(e,t,n){var i=r.UUID(e);__Mkey__Push__.pushCallback_Push(i,t,n),o.exec(s,"addEventListener",[window.__HtMl_Id__,i,e])},remove:function(e){o.exec(s,"remove",[e.__UUID__])},getAllMessage:function(){return o.execSync(s,"getAllMessage",[])},setAutoNotification:function(e){o.exec(s,"setAutoNotification",[e])}}}(window.plus),function(e){var e=e,a=window.plus.bridge,c="Runtime";e.runtime={arguments:null,version:null,innerVersion:null,uniVersion:"",launchLoadedTime:null,launcher:null,origin:null,processId:null,startupTime:null,isRecovery:!1,restart:function(){a.exec(c,"restart",[])},install:function(e,t,n,i){i=a.callbackId(n,i);a.exec(c,"install",[e,i,t])},getProperty:function(e,t){t=a.callbackId(t);a.exec(c,"getProperty",[e,t])},quit:function(){a.exec(c,"quit",[])},openURL:function(e,t,n){var i=a.callbackId(null,function(e){"function"==typeof t&&t(e)});a.exec(c,"openURL",[e,i,n])},launchApplication:function(e,t){var n=a.callbackId(null,function(e){"function"==typeof t&&t(e)});a.exec(c,"launchApplication",[e,n])},setBadgeNumber:function(e,t){"number"==typeof e&&a.exec(c,"setBadgeNumber",[e,t])},openFile:function(e,t,n){var i=a.callbackId(null,function(e){"function"==typeof n&&n(e)});a.exec(c,"openFile",[e,t,i])},openDocument:function(e,t,n,i){var o=a.callbackId(function(e){"function"==typeof n&&n(e)},function(e){"function"==typeof i&&i(e)});a.exec(c,"openDocument",[e,t,o])},isStreamValid:function(){return a.execSync(c,"isStreamValid")},openWeb:function(e){return a.exec(c,"openWeb",[e])},isApplicationExist:function(e){return null!=e&&"string"!=typeof e&&a.execSync(c,"isApplicationExist",[e])},processDirectPage:function(){return a.execSync(c,"processDirectPage",[])},isCustomLaunchPath:function(){return a.execSync(c,"isCustomLaunchPath")},getDCloudId:function(){return a.execSync(c,"getDCloudId")},agreePrivacy:function(){a.exec(c,"agreePrivacy",[])},disagreePrivacy:function(){a.exec(c,"disagreePrivacy",[])},isAgreePrivacy:function(){return a.execSync(c,"isAgreePrivacy",[])},downloadFile:function(o,r,s){var e;if("string"==typeof o.url)10r.Uninitialized&&("function"==typeof this.onabort&&this.onabort(this.__progessEvent__),this.__init__(),o.exec(r.__F__,"abort",[this.__UUID__]))},s.getAllResponseHeaders=function(){if(this.readyState>=r.Receiving){if(this.__noParseResponseHeader__)return this.__noParseResponseHeader__;var e,t="";for(e in this.__responseHeaders__)t=t+e+": "+this.__responseHeaders__[e]+"\r\n";return this.__noParseResponseHeader__=t,this.__noParseResponseHeader__}return null},s.getResponseHeader=function(e){if("string"==typeof e&&this.readyState>=r.Receiving){var t=null;if(e=e.toLowerCase(),t=this.__cacheReponseHeaders__[e])return t;for(n in this.__responseHeaders__){var n,i=this.__responseHeaders__[n];e===(n=n.toLowerCase())&&(t=t?t+", "+i:i)}return this.__cacheReponseHeaders__[e]=t}return null},s.setRequestHeader=function(e,t){var n;"string"==typeof e&&"string"==typeof t&&r.Open==this.readyState&&(n=this.__requestHeaders__[e],this.__requestHeaders__[e]=n?n+", "+t:t)},s.open=function(e,t,n,i){r.Open!=this.readyState&&r.Loaded!=this.readyState||this.__init__(),r.Uninitialized==this.readyState&&(this.readyState=r.Open,o.exec(r.__F__,"open",[this.__UUID__,e,"string"==typeof(t=t)?0==(t=t.replace(/(^\s*)|(\s*$)/g,"")).indexOf("http://")||0==t.indexOf("https://")?t:t=0==t.indexOf("/")?location.origin+t:location.origin+location.pathname+t:"",n,i,this.timeout]),"function"==typeof this.onreadystatechange&&this.onreadystatechange())},s.overrideMimeType=function(e){o.exec(r.__F__,"overrideMimeType",[this.__UUID__,e])},s.send=function(e){var n=this;if(r.Open!=this.readyState)throw new Error("XMLHttpRequest not open");this.readyState=r.Sent,"function"==typeof this.onloadstart&&this.onloadstart(n.__progessEvent__);var t=o.callbackId(function(e){if(r.Receiving==e.readyState)r.Sent==n.readyState?(n.readyState=r.Receiving,n.status=e.status,n.statusText=e.statusText,n.__responseHeaders__=e.header,n.__progessEvent__.lengthComputable=e.lengthComputable,n.__progessEvent__.total=e.totalSize):r.Receiving==n.readyState&&(n.responseText=e.responseText,n.__progessEvent__.loaded=e.revSize),"function"==typeof n.onreadystatechange&&n.onreadystatechange(),"function"==typeof n.onprogress&&n.onprogress(n.__progessEvent__);else if(r.Loaded==e.readyState){n.readyState=r.Loaded,e.status&&(n.status=e.status);try{n.responseText&&(t=new DOMParser,n.responseXML=t.parseFromString(n.responseText,"text/xml"))}catch(e){n.responseXML=null}try{var t;"document"==n.responseType?(t=new DOMParser,n.response=n.responseXML):"json"==n.responseType&&(n.response=JSON.parse(n.responseText))}catch(e){n.response=null}"function"==typeof n.onreadystatechange&&n.onreadystatechange(),e.error==i.Timeout?"function"==typeof n.ontimeout&&n.ontimeout(n.__progessEvent__):e.error==i.Other?"function"==typeof n.onerror&&n.onerror(n.__progessEvent__):"function"==typeof n.onload&&n.onload(n.__progessEvent__),"function"==typeof n.onloadend&&n.onloadend(n.__progessEvent__)}});return o.exec(r.__F__,"send",[this.__UUID__,t,e,this.__requestHeaders__]),void("function"==typeof this.onreadystatechange&&this.onreadystatechange())},e.net={XMLHttpRequest:r}}(window.plus),function(e){var e=e,o=window.plus.bridge,r="Zip";e.zip={compressVideo:function(e,t,n){n=o.callbackId(function(e){t&&(e={tempFilePath:e.tempFilePath,size:e.size},t(e))},n);o.exec(r,"compressVideo",[e,n])},decompress:function(e,t,n,i){i=o.callbackId(n,i);o.exec(r,"decompress",[e,t,i])},compress:function(e,t,n,i){i=o.callbackId(n,i);o.exec(r,"compress",[e,t,i])},compressImage:function(e,t,n){n=o.callbackId(function(e){t&&(e={target:e.path,width:e.w,height:e.h,size:e.size},t(e))},n);o.exec(r,"compressImage",[e,n])}}}(window.plus),function(i){var r=(i=i).bridge,s="ShortVideo",o=i.tools;function a(e){return o.getElementOffsetXInWebview(e)}function c(e){return o.getElementOffsetYInWebview(e)}function e(e,t){this.id=o.UUID("dt"),this.IDENTITY=s,div=document.getElementById(e);var n=this.id,e=[];div&&(i.tools.platform==i.tools.ANDROID?document.addEventListener("plusorientationchange",function(){setTimeout(function(){var e=[a(div),c(div),div.offsetWidth,div.offsetHeight];r.exec(s,"resize",[n,e])},200)},!1):div.addEventListener("resize",function(){var e=[a(div),c(div),div.offsetWidth,div.offsetHeight];r.exec(s,"resize",[n,e])},!1),e=[a(div),c(div),div.offsetWidth,div.offsetHeight]),r.exec(s,"ShortVideo",[this.id,e,t])}var t=e.prototype;function n(e,t){this.id=o.UUID("dt"),this.IDENTITY=s,div=document.getElementById(e);var e=[],n=this.id;div&&(i.tools.platform==i.tools.ANDROID?document.addEventListener("plusorientationchange",function(){setTimeout(function(){var e=[a(div),c(div),div.offsetWidth,div.offsetHeight];r.exec(s,"shortVideoEditor_resize",[n,e])},200)},!1):div.addEventListener("resize",function(){var e=[a(div),c(div),div.offsetWidth,div.offsetHeight];r.exec(s,"shortVideoEditor_resize",[n,e])},!1),e=[a(div),c(div),div.offsetWidth,div.offsetHeight]),r.exec(s,"ShortVideoEditor",[this.id,e,t])}t.start=function(e){r.exec(s,"ShortVideo_start",[this.id,e])},t.pause=function(){r.exec(s,"ShortVideo_pause",[this.id])},t.resume=function(){r.exec(s,"ShortVideo_resume",[this.id])},t.stop=function(){r.exec(s,"ShortVideo_stop",[this.id])},t.close=function(){r.exec(s,"ShortVideo_close",[this.id])},t.switchCamera=function(e){r.exec(s,"ShortVideo_switchCamera",[this.id,e])},t.setStyles=function(e){r.exec(s,"ShortVideo_setStyles",[this.id,e])},t.startMixAudio=function(e){r.exec(s,"ShortVideo_startMixAudio",[this.id,e])},t.pauseMixAudio=function(){r.exec(s,"ShortVideo_pauseMixAudio",[this.id])},t.resumeMixAudio=function(){r.exec(s,"ShortVideo_resumeMixAudio",[this.id])},t.stopMixAudio=function(){r.exec(s,"ShortVideo_stopMixAudio",[this.id])},t.addEventListener=function(e,t){var n,i=this;t&&(n=function(e){"function"==typeof t&&(e.target=i,t(e))},t.callback=n,n=r.callbackId(n)),r.exec(s,"ShortVideo_addEventListener",[this.id,e,n])},(t=n.prototype).play=function(){r.exec(s,"shortVideoEditor_play",[this.id])},t.pause=function(){r.exec(s,"shortVideoEditor_pause",[this.id])},t.resume=function(){r.exec(s,"shortVideoEditor_resume",[this.id])},t.stop=function(){r.exec(s,"shortVideoEditor_stop",[this.id])},t.close=function(){r.exec(s,"shortVideoEditor_close",[this.id])},t.setStyles=function(e){r.exec(s,"shortVideoEditor_setStyles",[this.id,e])},t.save=function(e,t,n){var i="function"!=typeof t?null:function(e){t(e)},o="function"!=typeof n?null:function(e){n(e)},o=r.callbackId(i,o);r.exec(s,"shortVideoEditor_save",[this.id,e,o])},t.addEventListener=function(e,t){var n,i=this;t&&(n=function(e){"function"==typeof t&&(e.target=i,t(e))},t.callback=n,n=r.callbackId(n)),r.exec(s,"shortVideoEditor_addEventListener",[this.id,e,n])},t={Camera:e,Editor:n,upload:function(e,t,n){var i="function"!=typeof t?null:function(e){t(e)},o="function"!=typeof n?null:function(e){n(e)},o=r.callbackId(i,o);r.exec(s,"uploader",[e,o])}},i.shortvideo=t}(window.plus),function(e){var o="iBeacon",r=e.bridge,t={startBeaconDiscovery:function(t){if("object"==typeof t){var n="function"!=typeof t.complete?function(){}:t.complete,e="function"!=typeof t.success?n:function(e){t.success(e),n(e)},i="function"!=typeof t.fail?n:function(e){t.fail(e),n(e)};return callbackID=r.callbackId(e,i),r.exec(o,"startBeaconDiscovery",[callbackID,t.uuids])}},stopBeaconDiscovery:function(t){var n="function"!=typeof t.complete?function(){}:t.complete,e="function"!=typeof t.success?n:function(e){t.success(e),n(e)},i="function"!=typeof t.fail?n:function(e){t.fail(e),n(e)};return callbackID=r.callbackId(e,i),r.exec(o,"stopBeaconDiscovery",[callbackID])},getBeacons:function(t){var n="function"!=typeof t.complete?function(){}:t.complete,e="function"!=typeof t.success?n:function(e){t.success(e),n(e)},i="function"!=typeof t.fail?n:function(e){t.fail(e),n(e)};return callbackID=r.callbackId(e,i),r.exec(o,"getBeacons",[callbackID])},onBeaconUpdate:function(e){e="function"!=typeof e?null:e;return callbackID=r.callbackId(e),r.exec(o,"onBeaconUpdate",[callbackID])},onBeaconServiceChange:function(e){e="function"!=typeof e?null:e;return callbackID=r.callbackId(e),r.execSync(o,"onBeaconServiceChange",[callbackID])}};e.ibeacon=t}(window.plus),function(e){var i="Bluetooth",c=window.plus.bridge,t={closeBluetoothAdapter:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),c.exec(i,"closeBluetoothAdapter",[callbackID])},openBluetoothAdapter:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),c.exec(i,"openBluetoothAdapter",[callbackID])},getBluetoothAdapterState:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),c.exec(i,"getBluetoothAdapterState",[callbackID])},getBluetoothDevices:function(r){var s=this,a="function"!=typeof r.complete?function(){}:r.complete,e="function"!=typeof r.success?null:function(e){for(var t=e.devices,n=0;n<0FI!t4}@SGkU>R*fPs9Y?4W?6 zvWX&!2nt3ZF6>)x}x=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`Yi3h$;yXa?^R@R0%+_62cLwU#uNY|(~-|%;BpAuZHIj} z4X3VK$ZZXFiAji|HPxrLfKD3ryN<}GieCduqR2@fp - Accelerometer + Bluetooth class - PGAccelerometer + libBlueTooth + + Geolocation + + class + PGGeolocation global - Ad + Orientation class - FeatureUniAd + PGOrientation + global + + + Maps + + class + PGMap global + server + + class + PGBaiduKeyVerify + identifier + com.baidu.keyverify + - Audio + Device class - PGAudio + PGDeviceStatus global - Bluetooth + File class - libBlueTooth + PGFile + global + Cache @@ -35,287 +56,271 @@ global - Camera + Zip class - PGCamera + PGZip global - + - Console + Runtime class - PGLog + PGRuntime global - + - Contacts + Audio class - PGContacts + PGAudio global - Device + Accelerometer class - PGDeviceStatus + PGAccelerometer global - Downloader + Push - class - PGDownload + server + + class + PGPushServer + identifier + com.pushserver + + baseclass + PGPush global + autostart + - File + barcode class - PGFile + PGBarcode global - + - Gallery + XMLHttpRequest class - PGGallery + PGXHR global - + - Geolocation + UI class - PGGeolocation + PGUI global + extend + + Navigator + PG_Navigate + WebNavigator + PGWebNavi + - Invocation + Contacts class - PGInvocation + PGContacts global - LivePusher + Proximity class - PGLivePush + PGProximity global - + - Maps + Invocation class - PGMap + PGInvocation global - + + + Statistic + server class - PGBaiduKeyVerify + PGUmengStartUp identifier - com.baidu.keyverify + com.umeng.startup - - Media - class - PGMediaVideo + PGStatistic global + autostart + - Messaging + Camera class - PGMessaging + PGCamera global - NativeObj + Console - autostart - class - PGNativeObj + PGLog global - NativeUI + Storage class - PGNativeUI + PGNStorage + autostart + global - + - Navigator + Gallery class - PGNavigator + PGGallery global - + - Notification + Downloader - autostart - class - PGNotification + PGDownload global - OAuth + Messaging class - PGOauthManager - extend - - apple - PGAppleOauth - qihoo - PGQHOauth - qq - PGQQOauth - univerify - PGUniVerify - weibo - PGSinaWBOauth - weixin - PGWXOauth - xiaomi - PGMiOauth - + PGMessaging global - Orientation + Uploader class - PGOrientation + PGUpload global - + Payment class PGPlatbyManager - extend - - alix - PGAlixPay - appleiap - PGPlatbyIAP - weixin - PGWXPay - global + extend + - Proximity - - class - PGProximity - global - - - Push + Speech - autostart - - baseclass - PGPush class - PGPushActualize + PGSpeech global - server + extend - class - PGPushServerAct - identifier - com.pushserver + baidu + PGBaiduSpeech + ifly + PGIFLYSpeech - Runtime + OAuth - class - PGRuntime + extend + + weibo + PGSinaWBOauth + xiaomi + PGMiOauth + qq + PGQQOauth + qihoo + PGQHOauth + weixin + PGWXOauth + apple + PGAppleOauth + univerify + PGUniVerify + global - + + class + PGOauthManager Share - argument - weixin - autostart - class PGShareManager + global + + autostart + + argument + weixin extend qq PGTencentQQShare - sinaweibo - PGSinaShare tencentweibo PGQQShare + sinaweibo + PGSinaShare weixin PGWXShare - global - - ShortVideo + NativeObj class - PluginShortVideo - global + PGNativeObj + autostart + global + - Speech + NativeUI class - PGSpeech - extend - - baidu - PGBaiduSpeech - ifly - PGIFLYSpeech - + PGNativeUI global - + - Sqlite + Navigator class - libSqlite + PGNavigator global - Statistic + Notification - autostart - class - PGStatistic + PGNotification global - server - - class - PGUmengStartUp - identifier - com.umeng.startup - - - Storage - autostart + + fingerprint + class - PGNStorage + Fingerprint global @@ -326,66 +331,52 @@ global - UI + VideoPlayer class - PGUI - extend - - Navigator - PG_Navigate - WebNavigator - PGWebNavi - + PGVideo global - + - Uploader + Media class - PGUpload + PGMediaVideo global - VideoPlayer + LivePusher class - PGVideo + PGLivePush global - XMLHttpRequest + Ad class - PGXHR + FeatureUniAd global - + - Zip + ShortVideo class - PGZip + PluginShortVideo global - barcode - - class - PGBarcode - global - - - fingerprint + iBeacon class - Fingerprint + PGBeacon global - + - iBeacon + Sqlite class - PGBeacon + libSqlite global diff --git a/ios/UniMPSDK/Resources/PandoraApi.bundle/i18n/developers/en.lproj/Localizable.strings b/ios/UniMPSDK/Resources/PandoraApi.bundle/i18n/developers/en.lproj/Localizable.strings index a9cc2bf7479e9113588d0d94ea7f414c9381ea2a..4e845784609d338f67400657515ebba5f409f014 100644 GIT binary patch delta 391 zcmcb!ooU_yrVR83HETx+^;8GZX+7 zV^bMQfLaxRh9rXNBA`ejLo(RV6recF_)@TXpy87ny@e<5aF?NqS-ZVuCm+ZVnCu{| zCjzrcMj;I7YF7qh23dv4cXT8s=LxG#RuJ~XtAJ5)^7;%#6mw*u<`^-^U^fSw0uDt6 KB?fB-E(QQ^`dJ$Q delta 14 VcmbPtfa%V5rVR+=~37*c^E3Ji%rRsll}kXOP`4CH43 zML={BP$ZEd8OTp%NCEOoz$^uZQn30|pu7T5S0+O)5SKvR6P&~l-%`dO!(G)MSCD#s z;-}bs{RTl?egV^z7_1q%fT}_urcCDNwHJYzD5DStbe$`MF@vna0FeCz51q?YrUI{}n zke>k*0ntT3kwk`MAU~BM1;{S}vlJLg!Rk{PiY8Bt6_yH4>YmzC#vj97)gM=pdVb=k z*pLYZL0oa}p6aYN3TD|}P delta 14 Wcmex#i}Bc1#tnLUn=ABY*Z=@Ha0a6Q diff --git a/ios/UniMPSDK/Resources/PandoraApi.bundle/i18n/users/en.lproj/Localizable.strings b/ios/UniMPSDK/Resources/PandoraApi.bundle/i18n/users/en.lproj/Localizable.strings index 199bf88f3d77e5dc9f3e1ba402b2e8cb4073001a..ed1a031f51bc71896976be617b8ee0e24bf35433 100644 GIT binary patch literal 10270 zcmeI2T~Av_5Qg_UO8$d|6g8DvlBT_BtF$E$(kO(WLbypP#5XR)Mz#r|Kfdkz?CZ&% zV;>s`QJXZ#0*?30&d$fXvoo{&{ny=eH?`7s>ZaHFbWvPmJEss;qmW`E9LxocXP#1My<*mPY&f-H}8=)zWIm z`W$81TIo)@oqkDQ>V1s2CCjGdZf8AOnNwfS=z)}Q?dbO)ufu!RM}kh;*Z6UseUQG& z&#bd4DVVpNXKbfKJ)h=h^XTb&aJ!5Y=(Z!yXwyw+dfL$l+V*6PO^qID)Rw=t%BWSU z2-=k8KJKR=zxC_|X>lqY zz#{gv6yu|&eqPhKeDm8sw5Qn5Smupn>J7OyjWffM;Em*EKXkJ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yHNTIWcfJ_@sN1B2^mD$mgMx3I>G07Z9T$E0R8;7{m__K!PSq_O z2!fe`o4+-|(}k>QZJ1%KOCS#Qem#BKSm5=Q&em&d|5ny^nO=%r%8s$V5#&gEq>n6n zeADmWG1iW-u&i$cu@&FZ=xyD}^9|Q~rHd>Od|hC@z)+p(46n#)c#?g-`+e(WpNXW7 z)monD>41nWUxA!W+V9rR-E>zn@C}sdm`NZk(Z6G?2ZG(qC!v=dpm?YPxmgfF*^@zv?YQ8)KgEOS*VSiA%A7d>1iM*si- diff --git a/ios/UniMPSDK/Resources/PandoraApi.bundle/i18n/users/zh-Hans.lproj/Localizable.strings b/ios/UniMPSDK/Resources/PandoraApi.bundle/i18n/users/zh-Hans.lproj/Localizable.strings index 6c227b5dd81d51f81adca1b0173dba4bb6668a84..26d6c9ec7d4068da2f7b155e18fb3b74cf30f72c 100644 GIT binary patch literal 7116 zcmeHMZETxY6~5c5ur$tK65>Y$!bB>{B+_ODF;=wEE?rAW`zH14rj44!jh#1+iQ@!+ zr70{aQUsfvkVJG{>5o-NbgDFMDu4L+Gd?87Bp6~6od!Z(CDbvHplC(w#MGMSxyL8> zb(?0b*bk79<;1@C+;g7ueeUb(wM}M|iJFv|FynYln4DQ}T20;rrf5p|pToC@@c!N6 z`QBFZdAr+bhOnLjO}4iCs{i=7?sl85+G_6b$%C@G9#SZ$gmW3lnY4W3W)wUqD~iNX6{)Mmm=l#5iaRDL>oF|FS>jeIhm z8vESfn@joGdbmY)=FbFn&!UG#;zSZol?4e zH9PshK7w~1)U*t}M-BmW6K!U@+e%?7KWP%m#fN2imKLWk()c8&8e-3Sr4z}glyaNd zuKWhS6xY>WNDbg0v276?GO%NzMtL#aH1$U17l)L3JCIEQ7d=3Gh@>X(u|=imu0tM1 z`ej58qn6s0Av0e)eR&~jepx%OFa3Na z7Wl`3%PZPHVy%>~v(STyeYMjnmom%N2joR>GnQ#zMzd)9(c#v|RAwh+G8+QyGlwK6 z#E0aS1fDcrxfy&kO6_8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JIKS)Yi3Eij?R<9t940OiPmywk~9!nmC{S#+p9x1Jn3Tt<`K*8~-(OPak$x z&wrZbyuzRd^DN%kc(cH^I7gKmGdid>uRSK3>C|=W)7-_l7iwPf7H}hdd;_&Nrf+5c k9hyX5mv$UpUF3zHHG842m;Xls_Ta5LUOKfJ{eOl30=)JWSpWb4 diff --git a/ios/UniMPSDK/Resources/PandoraApi.bundle/i18n/users/zh-Hant.lproj/Localizable.strings b/ios/UniMPSDK/Resources/PandoraApi.bundle/i18n/users/zh-Hant.lproj/Localizable.strings index 03413dca1090020f9c2820e58f1d7b8c48788c80..6e94bc1c712f8f3156e90802d10d7dff5d3236c5 100644 GIT binary patch literal 7116 zcmeHMYiOI-89r^9Q`<6Yp>z;drZ{AHWp+>lW zH`)4QgCS&p-#PDj@7JU9jh$+z@~WtsR1^42s63%BN??6T zpB`0T)X$_71{XXR)hD7Vh36UlY;a`oF4*pc3(7VE%#>zQ&EaVTE0i_^ZG^Epj#Z=S z&eFl>uby5FH9Om;MHinQtUtCg{9u_Hs4f3K+?0RgR4MH#uNQwbb~z#MJL8`ZMpI7= zUnylyRO>wqdbFz_l;agWjaKM=&HqYFY)3zs0w-Q|P-`hwfq6OfRsWmcdoe0-y%jwL zzYh6+TM&j^+PG|RKpIBk)@lQ~u6|FLu5*~kwBvQ-_Z z?7TPp&7iFIfocr)F}lqGLlSz-Rv<4Y>SwaW-yRj{1K?~1e9;2bhoMyO)UF6bcNOPu zPRHOm^jb<+0L@J0^tIDo<&?~M@$mwlo{p?8NywKbanv8}R_8CJa zCX5Ye6-W+7zE)Bi=sn?cl#iL9R`vW}Ie#c~<8L zQqSRIJj7D^vZf@qHaZY%g@HGY6O8&9P@srtchUdae7Le_^dNgi z){bwz=hWnyi|G^Qype$Txpvaoy_TB#+2Q+r;>W$vXL!StOw3gKon%8BNnUL&cLY_R zFjegTzWTr6tJ|h8j=S^Sf3L5y=HJfKOx4^x%bK`+Yjt}`V$wu_)ExFMrkBei4={sD zHejZh)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1>*l=+PJJ99MI+w}M&*y5zTB%T8C>D<9ic^*HOr>1gTbQkv z^3{7QZrxX?9w}DJkyIj?ytn#?wMTd5%k_NqcqEnC97!irTSgzIlOL)U^0i7el1e2q ziDV*erPC4H8ai04-P^j_ADJzb3)OtBFdaE~Jo3m?Wp|}gPCyYVkb`NMf)ZhM!g7#- zJj~OVgBr0dGG8Qkl(J&rr4W?(bHG@YD+EieiXyLWzwyep7ijp(YQsXWX$UM5K2 zqM0VXP1q0|B)?TG|MytmK0iVcS6NX}QeG4&a}hd6dHsl!pWSqt%2MKk|H0jr*`nK^ w&8bQRYG%k$phm4kr$3;H9=%>Je!@;BU6^uV+J%-2GcL4SFyrdmuD+f8C%1bHGXMYp literal 0 HcmV?d00001 diff --git a/lib/home/activity_list_page.dart b/lib/home/activity_list_page.dart index fd388ad7..9fa55b6b 100644 --- a/lib/home/activity_list_page.dart +++ b/lib/home/activity_list_page.dart @@ -91,7 +91,7 @@ class _ActivityListPage extends State return InkWell( onTap: () { Navigator.of(context).pushNamed( - '/router/store_detail_page', + '/router/web_page', arguments: {"activityId": activityList[position].id}); }, child: FrameSeparateWidget( diff --git a/lib/home/home_page.dart b/lib/home/home_page.dart index f1dee7c3..d730d76a 100644 --- a/lib/home/home_page.dart +++ b/lib/home/home_page.dart @@ -77,17 +77,6 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { apiService = ApiService(Dio(), context: context, token: value.getString('token'), showLoading: false); - BaseData> baseData = await apiService.queryBanner({ - "model": {"type": "HOME_PAGE"}, - }).catchError((onError) { - refreshController.refreshFailed(); - }); - if (baseData != null && baseData.isSuccess) { - bannerData.clear(); - bannerData.addAll(baseData.data.records); - if (bannerData.length > 0) controller.move(0, animation: false); - } - BaseData brand = await apiService.queryHomeBrand().catchError((onError) { refreshController.refreshFailed(); }); @@ -101,7 +90,7 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { BaseData> article = await apiService.queryArticle({ "pageNum": 1, - "pageSize": 2, + "pageSize": 3, "searchKey": "", "state": 1, "type": 2 @@ -119,18 +108,28 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { "pageNum": 1, "pageSize": 10, "state": 1 + }).catchError((onError) { + refreshController.refreshFailed(); }); if (goodsData != null && goodsData.isSuccess) { gooods.clear(); gooods.addAll(goodsData.data.list); } - // SmartDialog.dismiss(); - EasyLoading.dismiss(); + + BaseData> baseData = await apiService.queryBanner({ + "model": {"type": "HOME_PAGE"}, + }).catchError((onError) { + refreshController.refreshFailed(); + }); if (baseData != null && baseData.isSuccess) { + bannerData.clear(); + bannerData.addAll(baseData.data.records); refreshController.refreshCompleted(); + if (bannerData.length > 0) controller.move(0, animation: false); } else { refreshController.refreshFailed(); } + EasyLoading.dismiss(); } @override diff --git a/lib/home/home_view/brand_view.dart b/lib/home/home_view/brand_view.dart index 1da0f3e3..eff1deea 100644 --- a/lib/home/home_view/brand_view.dart +++ b/lib/home/home_view/brand_view.dart @@ -36,7 +36,6 @@ class _BrandView extends State { ); } - brands() { return Container( height: 90.h, @@ -48,8 +47,6 @@ class _BrandView extends State { loop: true, itemBuilder: (context, position) { return Container( - // height: 60.h, - // width: 120.w, margin: EdgeInsets.symmetric(horizontal: 3.w, vertical: 15.h), decoration: BoxDecoration( color: Colors.white, diff --git a/lib/home/home_view/home_banner.dart b/lib/home/home_view/home_banner.dart index 3d31264e..062d732b 100644 --- a/lib/home/home_view/home_banner.dart +++ b/lib/home/home_view/home_banner.dart @@ -78,13 +78,13 @@ class _HomeBanner extends State { break; case 2: Navigator.of(context) - .pushNamed('/router/store_detail_page', arguments: { + .pushNamed('/router/web_page', arguments: { "activityId": bannerData.content, }); break; case 3: Navigator.of(context) - .pushNamed('/router/store_detail_page', arguments: { + .pushNamed('/router/web_page', arguments: { "articleId": bannerData.content, }); break; diff --git a/lib/home/home_view/hot_article.dart b/lib/home/home_view/hot_article.dart index 46262212..685f57e7 100644 --- a/lib/home/home_view/hot_article.dart +++ b/lib/home/home_view/hot_article.dart @@ -46,7 +46,7 @@ class _HotArticle extends State { itemCount: widget.articles != null ? ((widget.articles.length > 3) ? 3 : widget.articles.length) : 0, - physics: BouncingScrollPhysics(), + physics: NeverScrollableScrollPhysics(), scrollDirection: Axis.vertical, padding: EdgeInsets.symmetric(vertical: 12.h), itemBuilder: (context, position) { diff --git a/lib/home/huixiang_view/huixiang_banner.dart b/lib/home/huixiang_view/huixiang_banner.dart index c013beaa..c535ac38 100644 --- a/lib/home/huixiang_view/huixiang_banner.dart +++ b/lib/home/huixiang_view/huixiang_banner.dart @@ -70,13 +70,13 @@ class _HuiXiangBanner extends State { break; case 2: Navigator.of(context) - .pushNamed('/router/store_detail_page', arguments: { + .pushNamed('/router/web_page', arguments: { "activityId": bannerData.content, }); break; case 3: Navigator.of(context) - .pushNamed('/router/store_detail_page', arguments: { + .pushNamed('/router/web_page', arguments: { "articleId": bannerData.content, }); break; diff --git a/lib/home/points_mall_view/points_mall_banner.dart b/lib/home/points_mall_view/points_mall_banner.dart index ab695a84..cf8492ea 100644 --- a/lib/home/points_mall_view/points_mall_banner.dart +++ b/lib/home/points_mall_view/points_mall_banner.dart @@ -76,13 +76,13 @@ class _PointMallBanner extends State { break; case 2: Navigator.of(context) - .pushNamed('/router/store_detail_page', arguments: { + .pushNamed('/router/web_page', arguments: { "activityId": bannerData.content, }); break; case 3: Navigator.of(context) - .pushNamed('/router/store_detail_page', arguments: { + .pushNamed('/router/web_page', arguments: { "articleId": bannerData.content, }); break; diff --git a/lib/integral/integral_page.dart b/lib/integral/integral_page.dart index 360ba9b7..f76a60ff 100644 --- a/lib/integral/integral_page.dart +++ b/lib/integral/integral_page.dart @@ -3,22 +3,20 @@ import 'dart:convert'; import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/integral/intergra_view/in_for_points.dart'; +import 'package:huixiang/integral/intergra_view/integral_vip.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/rank.dart'; import 'package:huixiang/retrofit/data/sign_info.dart'; -import 'package:huixiang/retrofit/data/task.dart'; import 'package:huixiang/retrofit/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; -import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:huixiang/view_widget/round_button.dart'; -import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; import 'package:huixiang/view_widget/sign_in_widget.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'intergra_view/integral_task.dart'; class IntegralPage extends StatefulWidget { @override @@ -31,48 +29,44 @@ class _IntegralPage extends State { ApiService apiService; SignInfo signInfo; - UserInfo userinfo; + UserInfo userInfo; List ranks = []; int rankLevel = 1; - @override - void initState() { - super.initState(); - - SharedPreferences.getInstance().then((value) { - apiService = ApiService(Dio(), - context: context, - token: value.getString("token"), - showLoading: false); - userinfo = UserInfo.fromJson(jsonDecode(value.getString("user"))); - EasyLoading.show(status: S.of(context).zhengzaijiazai); - querySignInfo(); - }); - } - querySignInfo() async { - BaseData baseData = await apiService.signInInfo(); + EasyLoading.show(status: S.of(context).zhengzaijiazai); + + SharedPreferences value = await SharedPreferences.getInstance(); + apiService = ApiService( + Dio(), + context: context, + token: value.getString("token"), + showLoading: false, + ); + userInfo = UserInfo.fromJson(jsonDecode(value.getString("user"))); - BaseData> rankData = await apiService.rankList(); + BaseData> rankData = + await apiService.rankList().catchError((onError) {}); if (rankData != null && rankData.isSuccess) { ranks.clear(); ranks.addAll(rankData.data); } - if (userinfo != null && - userinfo.memberRankVo != null && + if (userInfo != null && + userInfo.memberRankVo != null && ranks != null && ranks.length > 0) { rankLevel = (ranks - .indexWhere((element) => element.id == userinfo.memberRankVo.id) + + .indexWhere((element) => element.id == userInfo.memberRankVo.id) + 1); } - // SmartDialog.dismiss(closeType: 3); - EasyLoading.dismiss(); + + BaseData baseData = + await apiService.signInInfo().catchError((onError) {}); if (baseData != null && baseData.isSuccess) { signInfo = baseData.data; - setState(() {}); } + EasyLoading.dismiss(); } @override @@ -103,417 +97,46 @@ class _IntegralPage extends State { ), ), ), - body: SingleChildScrollView( - child: Container( - child: Stack( - children: [ - Positioned( - child: Container( - height: 122.h, - color: Color(0xFF3A405A), - ), - top: 0, - left: 0, - right: 0, - ), - Column( - children: [ - integralAndVip(), - inForPoints(), - integralTask(), - ], - ), - ], - ), - ), - ), - ); - } - - Widget integralTask() { - return Container( - width: MediaQuery.of(context).size.width - 32, - height: 300.h, - margin: EdgeInsets.all(16), - padding: EdgeInsets.fromLTRB(10.w, 20.h, 10.w, 20.h), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, - spreadRadius: 0, - ) - ], - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - margin: EdgeInsets.only(left: 10.w), - child: Text( - S.of(context).zuorenwudejifen, - style: TextStyle( - color: Color(0xFF353535), - fontWeight: MyFontWeight.medium, - fontSize: 16.sp, + body: Container( + child: Stack( + children: [ + Positioned( + child: Container( + height: 122.h, + color: Color(0xFF3A405A), ), + top: 0, + left: 0, + right: 0, ), - ), - Expanded( - child: Container( - child: Swiper( - loop: false, - physics: BouncingScrollPhysics(), - pagination: SwiperPagination( - alignment: Alignment.bottomCenter, - builder: DotSwiperPaginationBuilder( - size: 8, - activeSize: 8, - space: 5, - activeColor: Colors.black, - color: Colors.black.withAlpha(76), - ), - ), - itemBuilder: (context, position) { - return taskPage(position); - }, - itemCount: (signInfo != null && - signInfo.taskList != null && - signInfo.taskList.length > 0) - ? (signInfo.taskList.length < 3 - ? 1 - : (signInfo.taskList.length ~/ 3 + - (signInfo.taskList.length % 3 > 0 ? 1 : 0))) - : 1), - ), - flex: 1, - ) - ], - ), - ); - } - - Widget taskPage(position) { - if (signInfo == null || signInfo.taskList == null) return Container(); - return Container( - margin: EdgeInsets.only(left: 10.w, right: 10.w, top: 16.h), - child: Column( - children: [ - tashItem(signInfo.taskList[position * 3 + 0]), - if (signInfo.taskList.length > (position * 3 + 1)) - tashItem(signInfo.taskList[position * 3 + 1]), - if (signInfo.taskList.length > (position * 3 + 2)) - tashItem(signInfo.taskList[position * 3 + 2]), - ], - ), - ); - } - - taskImg(String taskType) { - switch (taskType) { - case "bill_type_point_login": - return "assets/image/icon_integral_share.png"; - break; - case "bill_type_point_order": - return "assets/image/icon_integral_order.png"; - break; - case "bill_type_point_signin": - return "assets/image/icon_integral_sign.png"; - break; - } - return "assets/image/icon_integral_share.png"; - } + SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: FutureBuilder( + future: querySignInfo(), + builder: (context, snap) { + return Column( + children: [ + /// 上面的积分和VIP等级显示 + IntegralVip(rankLevel, signInfo, userInfo), - Widget tashItem(Task task) { - return Container( - margin: EdgeInsets.only(top: 8.h, bottom: 8.h), - alignment: Alignment.center, - child: Row( - children: [ - Image.asset( - taskImg(task.type), - width: 24.w, - height: 24.h, - ), - SizedBox( - width: 21.w, - ), - Expanded( - flex: 1, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - task.name, - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF353535), - ), - ), - SizedBox( - height: 7.h, - ), - Row( - children: [ - Text( - "+${double.tryParse(task.rewardValue).toInt()}", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF727272), - ), - ), - SizedBox( - width: 20.w, - ), - Text( - S.of(context).wancheng_( - "${task.complateNum ?? task.conplateNum}/${task.limitDay}"), - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF727272), - ), - ), - ], - ) - ], - ), - ), - RoundButton( - text: task.limitDay == (task.complateNum ?? task.conplateNum) - ? S.of(context).yiwancheng - : S.of(context).quwancheng, - textColor: Colors.white, - backgroup: task.limitDay == (task.complateNum ?? task.conplateNum) - ? Color(0xFFA0A0A0) - : Color(0xFF32A060), - radius: 12.w, - fontSize: 14.sp, - fontWeight: FontWeight.bold, - padding: EdgeInsets.symmetric(vertical: 4.h, horizontal: 12.w), - ), - ], - ), - ); - } + ///立即签到 + InForPoints(signInfo, _signIn), - Widget signInItem(position) { - if (position == 6) { - return Container( - padding: EdgeInsets.all(4), - decoration: BoxDecoration( - color: Color(0xFFF0F0F2), - borderRadius: BorderRadius.circular(4), - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "0${position + 1}", - style: TextStyle( - color: Color(0xFF353535), - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - ), - ), - Container( - alignment: Alignment.center, - height: 30.h, - child: Text( - S.of(context).shenmijifendali, - style: TextStyle( - color: Color(0xFF727272), - fontWeight: FontWeight.bold, - fontSize: 10.sp, - ), - ), - ), - Text( - "", - style: TextStyle( - color: Color(0xFF353535), - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - ), - ), - ], - ), - flex: 1, - ), - Container( - alignment: Alignment.center, - child: Image.asset( - "assets/image/icon_gold_blessing.png", - width: 59.w, - height: 59.h, - ), - ), - ], - ), - ); - } else { - return Container( - padding: EdgeInsets.all(4), - decoration: BoxDecoration( - color: (signInfo != null && - signInfo.signInList != null && - signInfo.signInList.length > position) - ? Color(0xFF32A060) - : Color(0xFFF0F0F2), - borderRadius: BorderRadius.circular(4), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "0${position + 1}", - style: TextStyle( - color: (signInfo != null && - signInfo.signInList != null && - signInfo.signInList.length > position) - ? Colors.white - : Color(0xFF353535), - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - ), - ), - Container( - alignment: Alignment.center, - child: Image.asset( - "assets/image/icon_gold_coin.png", - width: 30.w, - height: 30.h, - ), - ), - Container( - alignment: Alignment.center, - margin: EdgeInsets.only( - top: 2.h, - ), - child: Text( - (signInfo != null && - signInfo.rewardList != null && - signInfo.rewardList.length > position) - ? "+${signInfo.rewardList[position]}" - : "+10", - style: TextStyle( - color: (signInfo != null && - signInfo.signInList != null && - signInfo.signInList.length > position) - ? Colors.white - : Color(0xFF727272), - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - ), + ///积分任务 + IntegralTask(signInfo), + ], + ); + }, ), ), ], ), - ); - } - } - - ///立即签到 - Widget inForPoints() { - return Container( - width: double.infinity, - margin: EdgeInsets.symmetric(horizontal: 16.w, vertical: 6.h), - padding: EdgeInsets.symmetric(horizontal: 20.w, vertical: 20.h), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, - spreadRadius: 0, - ) - ], - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - S.of(context).qiandaolingjifen, - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 16.sp, - color: Color(0xFF353535), - ), - ), - SizedBox( - height: 10.h, - ), - Text( - S.of(context).lianxuqiandaolingqushuangbeijifen, - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 11.sp, - color: Color(0xFF727272), - ), - ), - SizedBox( - height: 32.h, - ), - StaggeredGridView.countBuilder( - crossAxisCount: 4, - shrinkWrap: true, - itemCount: 7, - mainAxisSpacing: 8, - crossAxisSpacing: 18, - padding: EdgeInsets.only(bottom: 32), - physics: NeverScrollableScrollPhysics(), - itemBuilder: (context, position) { - return signInItem(position); - }, - staggeredTileBuilder: (position) { - return StaggeredTile.count(position == 6 ? 2 : 1, 1.28); - }, - ), - InkWell( - onTap: signIn, - child: Container( - alignment: Alignment.center, - child: RoundButton( - width: 106.w, - height: 34.h, - text: (signInfo != null && signInfo.todayHasSignin) - ? S.of(context).yiqiandao - : S.of(context).lijiqiandao, - textColor: Colors.white, - backgroup: (signInfo != null && signInfo.todayHasSignin) - ? Colors.grey - : Color(0xFF32A060), - fontSize: 16.sp, - fontWeight: MyFontWeight.regular, - padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 6.h), - radius: 4.w, - ), - ), - ), - ], ), ); } ///立即签到 - signIn() async { + _signIn() async { if ((signInfo != null && signInfo.todayHasSignin)) { SmartDialog.showToast("今日已签到了", alignment: Alignment.center); return; @@ -521,7 +144,7 @@ class _IntegralPage extends State { EasyLoading.show(status: S.of(context).zhengzaijiazai); BaseData baseData = await apiService.signIn(); if (baseData != null && baseData.isSuccess) { - querySignInfo(); + setState(() {}); SmartDialog.show( widget: SignInWidget("${signInfo.signInList.length + 1}", "${signInfo.rewardList[signInfo.signInList.length]}")); @@ -529,108 +152,4 @@ class _IntegralPage extends State { EasyLoading.dismiss(); } } - - //上面的积分和VIP等级显示 - Widget integralAndVip() { - return Container( - padding: EdgeInsets.only(top: 16.h, bottom: 16.h), - color: Color(0xFF3A405A), - child: Row( - children: [ - Expanded( - flex: 1, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - signInfo != null ? "${signInfo.point}" : "0", - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 21.sp, - color: Colors.white, - ), - ), - SizedBox( - height: 6.h, - ), - Text( - S.of(context).wodejifenzhi, - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFFF2F2F2), - ), - ) - ], - ), - ), - Container( - width: 2.w, - height: 32.h, - color: Color(0xFFFFFFFF), - ), - Expanded( - flex: 1, - child: InkWell( - onTap: () { - SharedPreferences.getInstance().then((value) { - if (value.getString("token") != null && - value.getString("token") != "") { - Navigator.of(context) - .pushNamed('/router/mine_vip_level_page', arguments: { - "rankLevel": rankLevel, - "createTime": - (userinfo != null) ? "${userinfo.createTime}" : "", - "points": (userinfo != null) - ? int.tryParse(userinfo.points) - : 0, - }); - } - }); - }, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - (signInfo != null && signInfo.rank != null) - ? "${signInfo.rank.rankName.replaceAll("会员", "")}" - : "", - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 21.sp, - color: Colors.white, - ), - ), - SizedBox( - height: 6.h, - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - S.of(context).wodehuiyuandengji, - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFFF2F2F2), - ), - ), - Icon( - Icons.keyboard_arrow_right, - color: Colors.white, - size: 15, - ), - ], - ), - ], - ), - ), - ), - ], - ), - ); - } } diff --git a/lib/integral/intergra_view/in_for_points.dart b/lib/integral/intergra_view/in_for_points.dart new file mode 100644 index 00000000..931728ce --- /dev/null +++ b/lib/integral/intergra_view/in_for_points.dart @@ -0,0 +1,236 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; +import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/retrofit/data/sign_info.dart'; +import 'package:huixiang/utils/font_weight.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:huixiang/view_widget/round_button.dart'; + + +class InForPoints extends StatefulWidget { + + final SignInfo signInfo; + final Function signIn; + + InForPoints(this.signInfo, this.signIn); + + @override + State createState() { + return _InForPoints(); + } + +} + +class _InForPoints extends State { + + @override + Widget build(BuildContext context) { + return Container( + width: double.infinity, + margin: EdgeInsets.symmetric(horizontal: 16.w, vertical: 6.h), + padding: EdgeInsets.symmetric(horizontal: 20.w, vertical: 20.h), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, + ) + ], + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + S.of(context).qiandaolingjifen, + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 16.sp, + color: Color(0xFF353535), + ), + ), + SizedBox( + height: 10.h, + ), + Text( + S.of(context).lianxuqiandaolingqushuangbeijifen, + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 11.sp, + color: Color(0xFF727272), + ), + ), + SizedBox( + height: 32.h, + ), + StaggeredGridView.countBuilder( + crossAxisCount: 4, + shrinkWrap: true, + itemCount: 7, + mainAxisSpacing: 8, + crossAxisSpacing: 18, + padding: EdgeInsets.only(bottom: 32), + physics: NeverScrollableScrollPhysics(), + itemBuilder: (context, position) { + return signInItem(position); + }, + staggeredTileBuilder: (position) { + return StaggeredTile.count(position == 6 ? 2 : 1, 1.28); + }, + ), + InkWell( + onTap: widget.signIn, + child: Container( + alignment: Alignment.center, + child: RoundButton( + width: 106.w, + height: 34.h, + text: (widget.signInfo != null && widget.signInfo.todayHasSignin) + ? S.of(context).yiqiandao + : S.of(context).lijiqiandao, + textColor: Colors.white, + backgroup: (widget.signInfo != null && widget.signInfo.todayHasSignin) + ? Colors.grey + : Color(0xFF32A060), + fontSize: 16.sp, + fontWeight: MyFontWeight.regular, + padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 6.h), + radius: 4.w, + ), + ), + ), + ], + ), + ); + } + + + Widget signInItem(position) { + if (position == 6) { + return Container( + padding: EdgeInsets.all(4), + decoration: BoxDecoration( + color: Color(0xFFF0F0F2), + borderRadius: BorderRadius.circular(4), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "0${position + 1}", + style: TextStyle( + color: Color(0xFF353535), + fontSize: 14.sp, + fontWeight: MyFontWeight.medium, + ), + ), + Container( + alignment: Alignment.center, + height: 30.h, + child: Text( + S.of(context).shenmijifendali, + style: TextStyle( + color: Color(0xFF727272), + fontWeight: FontWeight.bold, + fontSize: 10.sp, + ), + ), + ), + Text( + "", + style: TextStyle( + color: Color(0xFF353535), + fontSize: 14.sp, + fontWeight: MyFontWeight.medium, + ), + ), + ], + ), + flex: 1, + ), + Container( + alignment: Alignment.center, + child: Image.asset( + "assets/image/icon_gold_blessing.png", + width: 59.w, + height: 59.h, + ), + ), + ], + ), + ); + } else { + return Container( + padding: EdgeInsets.all(4), + decoration: BoxDecoration( + color: (widget.signInfo != null && + widget.signInfo.signInList != null && + widget.signInfo.signInList.length > position) + ? Color(0xFF32A060) + : Color(0xFFF0F0F2), + borderRadius: BorderRadius.circular(4), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "0${position + 1}", + style: TextStyle( + color: (widget.signInfo != null && + widget.signInfo.signInList != null && + widget.signInfo.signInList.length > position) + ? Colors.white + : Color(0xFF353535), + fontSize: 14.sp, + fontWeight: MyFontWeight.medium, + ), + ), + Container( + alignment: Alignment.center, + child: Image.asset( + "assets/image/icon_gold_coin.png", + width: 30.w, + height: 30.h, + ), + ), + Container( + alignment: Alignment.center, + margin: EdgeInsets.only( + top: 2.h, + ), + child: Text( + (widget.signInfo != null && + widget.signInfo.rewardList != null && + widget.signInfo.rewardList.length > position) + ? "+${widget.signInfo.rewardList[position]}" + : "+10", + style: TextStyle( + color: (widget.signInfo != null && + widget.signInfo.signInList != null && + widget.signInfo.signInList.length > position) + ? Colors.white + : Color(0xFF727272), + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + ), + ), + ), + ], + ), + ); + } + } + + +} diff --git a/lib/integral/intergra_view/integral_task.dart b/lib/integral/intergra_view/integral_task.dart new file mode 100644 index 00000000..0ec67080 --- /dev/null +++ b/lib/integral/intergra_view/integral_task.dart @@ -0,0 +1,202 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_swiper/flutter_swiper.dart'; +import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/retrofit/data/sign_info.dart'; +import 'package:huixiang/retrofit/data/task.dart'; +import 'package:huixiang/utils/font_weight.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:huixiang/view_widget/round_button.dart'; + +class IntegralTask extends StatefulWidget { + final SignInfo signInfo; + + IntegralTask(this.signInfo); + + @override + State createState() { + return _IntegralTask(); + } +} + +class _IntegralTask extends State { + @override + Widget build(BuildContext context) { + return Container( + width: MediaQuery.of(context).size.width - 32, + height: 300.h, + margin: EdgeInsets.all(16), + padding: EdgeInsets.symmetric( + horizontal: 10.w, + vertical: 20.h, + ), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, + ) + ], + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(left: 10.w), + child: Text( + S.of(context).zuorenwudejifen, + style: TextStyle( + color: Color(0xFF353535), + fontWeight: MyFontWeight.medium, + fontSize: 16.sp, + ), + ), + ), + Expanded( + child: Container( + child: Swiper( + loop: false, + physics: BouncingScrollPhysics(), + pagination: SwiperPagination( + alignment: Alignment.bottomCenter, + builder: DotSwiperPaginationBuilder( + size: 8, + activeSize: 8, + space: 5, + activeColor: Colors.black, + color: Colors.black.withAlpha(76), + ), + ), + itemBuilder: (context, position) { + return taskPage(position); + }, + itemCount: (widget.signInfo != null && + widget.signInfo.taskList != null && + widget.signInfo.taskList.length > 0) + ? (widget.signInfo.taskList.length < 3 + ? 1 + : (widget.signInfo.taskList.length ~/ 3 + + (widget.signInfo.taskList.length % 3 > 0 + ? 1 + : 0))) + : 1), + ), + flex: 1, + ) + ], + ), + ); + } + + Widget taskPage(position) { + if (widget.signInfo == null || widget.signInfo.taskList == null) + return Container(); + return Container( + margin: EdgeInsets.only(left: 10.w, right: 10.w, top: 16.h), + child: Column( + children: [ + tashItem(widget.signInfo.taskList[position * 3 + 0]), + if (widget.signInfo.taskList.length > (position * 3 + 1)) + tashItem(widget.signInfo.taskList[position * 3 + 1]), + if (widget.signInfo.taskList.length > (position * 3 + 2)) + tashItem(widget.signInfo.taskList[position * 3 + 2]), + ], + ), + ); + } + + taskImg(String taskType) { + switch (taskType) { + case "bill_type_point_login": + return "assets/image/icon_integral_share.png"; + break; + case "bill_type_point_order": + return "assets/image/icon_integral_order.png"; + break; + case "bill_type_point_signin": + return "assets/image/icon_integral_sign.png"; + break; + } + return "assets/image/icon_integral_share.png"; + } + + Widget tashItem(Task task) { + return Container( + margin: EdgeInsets.only(top: 8.h, bottom: 8.h), + alignment: Alignment.center, + child: Row( + children: [ + Image.asset( + taskImg(task.type), + width: 24.w, + height: 24.h, + ), + SizedBox( + width: 21.w, + ), + Expanded( + flex: 1, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + task.name, + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF353535), + ), + ), + SizedBox( + height: 7.h, + ), + Row( + children: [ + Text( + "+${double.tryParse(task.rewardValue).toInt()}", + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF727272), + ), + ), + SizedBox( + width: 20.w, + ), + Text( + S.of(context).wancheng_( + "${task.complateNum ?? task.conplateNum}/${task.limitDay}"), + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF727272), + ), + ), + ], + ), + ], + ), + ), + RoundButton( + text: task.limitDay == (task.complateNum ?? task.conplateNum) + ? S.of(context).yiwancheng + : S.of(context).quwancheng, + textColor: Colors.white, + backgroup: task.limitDay == (task.complateNum ?? task.conplateNum) + ? Color(0xFFA0A0A0) + : Color(0xFF32A060), + radius: 12.w, + fontSize: 14.sp, + fontWeight: FontWeight.bold, + padding: EdgeInsets.symmetric(vertical: 4.h, horizontal: 12.w), + ), + ], + ), + ); + } +} diff --git a/lib/integral/intergra_view/integral_vip.dart b/lib/integral/intergra_view/integral_vip.dart new file mode 100644 index 00000000..3336d2b6 --- /dev/null +++ b/lib/integral/intergra_view/integral_vip.dart @@ -0,0 +1,132 @@ +import 'package:flutter/material.dart'; +import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/retrofit/data/sign_info.dart'; +import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/utils/font_weight.dart'; +import 'package:shared_preferences/shared_preferences.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; + +class IntegralVip extends StatefulWidget { + + final SignInfo signInfo; + final UserInfo userinfo; + final rankLevel; + + IntegralVip(this.rankLevel, this.signInfo, this.userinfo); + + @override + State createState() { + return _IntegralVip(); + } + +} + + +class _IntegralVip extends State { + @override + Widget build(BuildContext context) { + return Container( + padding: EdgeInsets.symmetric(vertical: 16.h), + child: Row( + children: [ + Expanded( + flex: 1, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + widget.signInfo != null ? "${widget.signInfo.point}" : "0", + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 21.sp, + color: Colors.white, + ), + ), + SizedBox( + height: 6.h, + ), + Text( + S.of(context).wodejifenzhi, + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFFF2F2F2), + ), + ) + ], + ), + ), + Container( + width: 2.w, + height: 32.h, + color: Color(0xFFFFFFFF), + ), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + SharedPreferences.getInstance().then((value) { + if (value.getString("token") != null && + value.getString("token") != "") { + Navigator.of(context) + .pushNamed('/router/mine_vip_level_page', arguments: { + "rankLevel": widget.rankLevel, + "createTime": + (widget.userinfo != null) ? "${widget.userinfo.createTime}" : "", + "points": (widget.userinfo != null) + ? int.tryParse(widget.userinfo.points) + : 0, + }); + } + }); + }, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + (widget.signInfo != null && widget.signInfo.rank != null) + ? "${widget.signInfo.rank.rankName.replaceAll("会员", "")}" + : "", + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 21.sp, + color: Colors.white, + ), + ), + SizedBox( + height: 6.h, + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + S.of(context).wodehuiyuandengji, + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFFF2F2F2), + ), + ), + Icon( + Icons.keyboard_arrow_right, + color: Colors.white, + size: 15, + ), + ], + ), + ], + ), + ), + ), + ], + ), + ); + } + + + + +} diff --git a/lib/main.dart b/lib/main.dart index 6c97f288..b149fae3 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -6,7 +6,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_bmflocation/bdmap_location_flutter_plugin.dart'; -import 'package:flutter_bugly/flutter_bugly.dart'; +// import 'package:flutter_bugly/flutter_bugly.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/address/address_map_page.dart'; @@ -51,7 +51,7 @@ import 'package:huixiang/setting/setting_page.dart'; import 'package:huixiang/setting/treaty_page.dart'; import 'package:huixiang/union/location_map_page.dart'; -import 'package:huixiang/union/store_details_page.dart'; +import 'package:huixiang/web/web_page.dart'; import 'package:huixiang/union/union_details_page.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -87,12 +87,11 @@ void main() async { } initSdk(); bool isFirst = sharedPreferences.getBool("isFirst"); - print("isFirst:$isFirst"); - FlutterBugly.postCatchedException((){ - runApp(MyApp(locale, isFirst)); - }); - FlutterBugly.init(androidAppId: "204f207673",iOSAppId: "8bb92ba0f6"); + runApp(MyApp(locale, isFirst)); + // FlutterBugly.postCatchedException((){ + // }); + // FlutterBugly.init(androidAppId: "204f207673",iOSAppId: "8bb92ba0f6"); } XgFlutterPlugin xgFlutterPlugin = XgFlutterPlugin(); @@ -242,8 +241,8 @@ Map routers = { '/router/treaty_page': (context, {arguments}) => TreatyPage(), '/router/union_detail_page': (context, {arguments}) => UnionDetailsPage(arguments: arguments), - '/router/store_detail_page': (context, {arguments}) => - StoreDetailsPage(arguments: arguments), + '/router/web_page': (context, {arguments}) => + WebPage(arguments: arguments), '/router/integral_store_page': (context, {arguments}) => IntegralStoreDetailsPage( arguments: arguments, diff --git a/lib/mine/mine_vip_level_page.dart b/lib/mine/mine_vip_level_page.dart index 2b115a1e..83ef7a84 100644 --- a/lib/mine/mine_vip_level_page.dart +++ b/lib/mine/mine_vip_level_page.dart @@ -6,6 +6,7 @@ import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/rank.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; +import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/view_widget/mine_vip_view.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; @@ -26,7 +27,7 @@ class _MineVipLevelPage extends State { ApiService apiService; List ranks = []; - SwiperController controller = SwiperController(); + final SwiperController controller = SwiperController(); @override void initState() { @@ -67,7 +68,7 @@ class _MineVipLevelPage extends State { child: Column( children: [ Container( - height: 224.h, + height: (MediaQuery.of(context).size.width) / 1.78 * AppUtils.textScale(context), child: Swiper( viewportFraction: 0.95, loop: false, diff --git a/lib/mine/mine_wallet_page.dart b/lib/mine/mine_wallet_page.dart index 9fd608d7..fdbe9446 100644 --- a/lib/mine/mine_wallet_page.dart +++ b/lib/mine/mine_wallet_page.dart @@ -166,25 +166,6 @@ class _MineWalletPage extends State { SizedBox( height: 16.h, ), - // Row( - // children: [ - // Container( - // width: 3, - // height: 15, - // color: Color(0xFF20662A), - // ), - // SizedBox( - // width: 3, - // ), - // Text( - // "09/2021", - // style: TextStyle( - // color: Color(0xFF353535), - // fontSize: 14, - // ), - // ), - // ], - // ), Container( margin: EdgeInsets.only(top: 14.h), child: ListView.builder( diff --git a/lib/mine/recharge_page.dart b/lib/mine/recharge_page.dart index ab5f73ef..ffb33f3b 100644 --- a/lib/mine/recharge_page.dart +++ b/lib/mine/recharge_page.dart @@ -207,6 +207,12 @@ class _RechargePage extends State { } int amount = int.tryParse(money); if (checkIndex == 1) { + + if (amount < 10) { + SmartDialog.showToast(S.of(context).chongzhizuixiaojine(10), alignment: Alignment.center); + return; + } + if (!(await Min.isInitialize())) { // 小程序的微信支付和app的充值支付使用同一个WXPayEntryActivity回调, // 然而充值时小程序未初始化会导致回调内部代码调用getPackage空指针, diff --git a/lib/order/order_detail_page.dart b/lib/order/order_detail_page.dart index ebce206c..9582ca60 100644 --- a/lib/order/order_detail_page.dart +++ b/lib/order/order_detail_page.dart @@ -178,16 +178,13 @@ class _OrderDetailPage extends State { child:*/ Stack( children: [ - Container( - color: Color(0xFF3A405A), - child:Positioned( - top: 0, - left: 0, - right: 0, - child: Container( - height: 36.h, - color: Color(0xFF3A405A), - ), + Positioned( + top: 0, + left: 0, + right: 0, + child: Container( + height: 36.h, + color: Color(0xFF3A405A), ), ), SingleChildScrollView( diff --git a/lib/union/store_details_page.dart b/lib/union/store_details_page.dart deleted file mode 100644 index 5e791df4..00000000 --- a/lib/union/store_details_page.dart +++ /dev/null @@ -1,1006 +0,0 @@ -import 'dart:io'; -import 'dart:ui'; - -import 'package:dio/dio.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; -import 'package:flutter_html/flutter_html.dart'; -import 'package:flutter_html/image_render.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/retrofit/data/member_comment_list.dart'; -import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/activity.dart'; -import 'package:huixiang/retrofit/data/article.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/page.dart'; -import 'package:huixiang/retrofit/retrofit_api.dart'; -import 'package:huixiang/view_widget/comment_menu.dart'; -import 'package:huixiang/view_widget/custom_image.dart'; -import 'package:huixiang/view_widget/login_tips.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:huixiang/view_widget/share_dialog.dart'; -import 'package:huixiang/view_widget/tips_dialog.dart'; -import 'package:like_button/like_button.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:sharesdk_plugin/sharesdk_defines.dart'; -import 'package:sharesdk_plugin/sharesdk_interface.dart'; -import 'package:sharesdk_plugin/sharesdk_map.dart'; -import 'package:video_player/video_player.dart'; -import 'package:webview_flutter/webview_flutter.dart'; -import 'package:flutter_html/src/replaced_element.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:chewie/src/chewie_progress_colors.dart' as chewie; -import 'package:chewie/chewie.dart'; - -class StoreDetailsPage extends StatefulWidget { - final Map arguments; - - ///富文本 文章 活动 - StoreDetailsPage({this.arguments}); - - @override - State createState() { - return _StoreDetailsPage(); - } -} - -class _StoreDetailsPage extends State - with WidgetsBindingObserver { - ApiService apiService; - RefreshController _refreshController; - int commentTotal = 0; - var commentTextController = TextEditingController(); - var commentFocus = FocusNode(); - String hintText = S.current.liuxianinjingcaidepinglunba; - String parenId = "0"; - - bool isKeyBoardShow = false; - - @override - void didChangeMetrics() { - super.didChangeMetrics(); - WidgetsBinding.instance.addPostFrameCallback((_) { - setState(() { - print("object: ${MediaQuery.of(context).viewInsets.bottom}"); - if (MediaQuery.of(context).viewInsets.bottom == 0) { - if (isKeyBoardShow) { - isKeyBoardShow = false; - //关闭键盘 软键盘关闭了, 清除输入控件的焦点, 否则重新进入页面会导致软键盘再弹出问题 - FocusScope.of(context).requestFocus(FocusNode()); - } - } else { - isKeyBoardShow = true; - } - }); - }); - } - - @override - void initState() { - super.initState(); - WidgetsBinding.instance.addObserver(this); - - _refreshController = RefreshController(); - - if (Platform.isAndroid) WebView.platform = SurfaceAndroidWebView(); - - SharedPreferences.getInstance().then((value) { - apiService = - ApiService(Dio(), context: context, token: value.getString("token")); - queryHtml(); - queryMemberCommentList(); - }); - } - - Activity activity; - Article article; - List memberList = []; - GlobalKey commentKey = GlobalKey(); - ScrollController scrollController = ScrollController(); - - queryHtml() async { - //activityInfo - if (widget.arguments["activityId"] != null) { - BaseData baseData = - await apiService.activityInfo(widget.arguments["activityId"]); - if (baseData != null && baseData.isSuccess) { - setState(() { - activity = baseData.data; - }); - } - } - if (widget.arguments["articleId"] != null) { - BaseData
baseData = - await apiService.informationInfo(widget.arguments["articleId"]); - if (baseData != null && baseData.isSuccess) { - setState(() { - article = baseData.data; - }); - } - } - } - - share() async { - SSDKMap params = SSDKMap() - ..setGeneral( - activity != null - ? activity.mainTitle - : article != null - ? article.mainTitle - : "", - activity != null - ? activity.viceTitle - : article != null - ? article.viceTitle - : "", - [ - activity != null - ? activity.coverImg - : article != null - ? article.coverImg - : "", - ], - activity != null - ? activity.coverImg - : article != null - ? article.coverImg - : "", - "", - buildShareUrl(), - "", - "", - "", - "", - SSDKContentTypes.webpage, - ); - - debugPrint(activity != null - ? activity.coverImg - : article != null - ? article.coverImg - : ""); - - showModalBottomSheet( - context: context, - backgroundColor: Colors.transparent, - builder: (context) { - return ShareDialog((platform) { - if (platform == ShareSDKPlatforms.line) { - params.map["type"] = SSDKContentTypes.text.value; - params.map["text"] = - "${activity != null ? activity.viceTitle : article != null ? article.viceTitle : ""} ${buildShareUrl()}"; - } - SharesdkPlugin.share(platform, params, - (state, userData, contentEntity, error) { - print("share!$state"); - }); - }); - }); - } - - String buildShareUrl() { - return "https://hx.lotus-wallet.com/index.html?id=${widget.arguments["activityId"] ?? widget.arguments["articleId"]}&type=${activity != null ? "activity" : article != null ? "article" : ""}"; - } - - //评论列表 - queryMemberCommentList() async { - BaseData> baseData = - await apiService.memberCommentList({ - "pageNum": 1, - "pageSize": 100, - "relationalId": - widget.arguments["activityId"] ?? widget.arguments["articleId"], - "relationalType": 1, - }).catchError((error) { - _refreshController.refreshFailed(); - }); - if (baseData != null && baseData.isSuccess) { - _refreshController.refreshCompleted(); - setState(() { - commentTotal = baseData.data.size; - memberList = baseData.data.list; - }); - } - } - - //评论点赞 - queryCommentLike(String id) async { - SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); - String token = sharedPreferences.getString("token"); - if (token == null || token == "") { - SmartDialog.show( - widget: LoginTips( - click: () { - SharedPreferences.getInstance() - .then((value) => value..setString("token", "")); - Navigator.of(context) - .pushNamed('/router/login_page', arguments: {"login": "login"}); - }, - ), - clickBgDismissTemp: false, - ); - return; - } - - BaseData baseData = - await apiService.commentLike(id).catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { - setState(() { - memberList.forEach((element) { - if (element.id == id) { - if (element.liked) { - element.likes -= 1; - element.liked = false; - } else { - element.likes += 1; - element.liked = true; - } - } - }); - }); - } - } - - //给文章/活动点赞 - queryInformationLikes() async { - BaseData baseData = await apiService.informationLikes( - widget.arguments["activityId"] ?? widget.arguments["articleId"]); - if (baseData != null && baseData.isSuccess) { - setState(() { - if (article != null) { - if (article.liked) { - article.likes -= 1; - } else { - article.likes += 1; - } - article.liked = !article.liked; - } else if (activity != null) { - if (activity.liked) { - activity.likes -= 1; - } else { - activity.likes += 1; - } - activity.liked = !activity.liked; - } - }); - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } - - //发布评论 - queryMemberComment(String content) async { - BaseData baseData = await apiService.memberComment({ - "content": content, - "parentId": parenId, - "relationalId": - widget.arguments["activityId"] ?? widget.arguments["articleId"], - "relationalType": 1 - }).catchError((error) { - _refreshController.refreshFailed(); - }); - if (baseData != null && baseData.isSuccess) { - commentTextController.text = ""; - await queryMemberCommentList(); - toComment(); - } - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: MyAppBar( - action: Container( - margin: EdgeInsets.only(right: 10), - child: GestureDetector( - onTap: () { - share(); - }, - child: Icon( - Icons.share, - size: 24, - color: Colors.black, - ), - ), - ), - background: Color(0xFFF7F7F7), - leadingColor: Colors.black, - title: activity != null - ? activity.mainTitle - : article != null - ? article.mainTitle - : "", - titleSize: 18.sp, - titleColor: Colors.black, - ), - body: Container( - child: Column( - children: [ - Expanded( - child: GestureDetector( - onTap: () { - commentFocus.unfocus(); - setState(() { - hintText = S.of(context).liuxianinjingcaidepinglunba; - }); - parenId = "0"; - }, - child: SingleChildScrollView( - controller: scrollController, - physics: BouncingScrollPhysics(), - child: Column( - children: [ - Container( - color: Color(0xFFF7F7F7), - padding: EdgeInsets.all(12), - alignment: Alignment.centerLeft, - child: Text( - activity != null - ? activity.mainTitle - : article != null - ? article.mainTitle - : "", - style: TextStyle( - fontSize: 16.sp, - fontWeight: FontWeight.bold, - color: Color(0xFF353535), - ), - ), - ), - Container( - padding: EdgeInsets.symmetric(horizontal: 12.w), - child: Row( - children: [ - InkWell( - child: Text( - "${activity != null ? (activity.storeName ?? "") : (article != null && article.author != null) ? (article.author.name ?? "") : ""}", - style: TextStyle( - fontWeight: FontWeight.normal, - fontSize: 14.sp, - color: Colors.blue, - ), - ), - onTap: () { - if (activity != null) { - if (widget.arguments["source"] != null && - widget.arguments["source"] == - activity.storeId) { - Navigator.of(context).pop(); - } else { - Navigator.of(context).pushNamed( - '/router/union_detail_page', - arguments: { - "id": activity.storeId, - "source": - widget.arguments["activityId"] - }); - } - } - }, - ), - SizedBox( - width: 10.w, - ), - Text( - activity != null - ? activity.createTime - : article != null - ? article.createTime - : "", - style: TextStyle( - fontWeight: FontWeight.normal, - fontSize: 12.sp, - color: Colors.grey, - ), - ), - ], - ), - ), - Html( - data: activity != null - ? activity.content - : article != null - ? article.content - : "", - customImageRenders: { - base64DataUriMatcher(): base64ImageRender(), - assetUriMatcher(): assetImageRender(), - networkSourceMatcher(extension: "svg"): - svgNetworkImageRender(), - networkSourceMatcher(): networkImageRender( - loadingWidget: () { - return Container(); - }, - ), - }, - customRender: { - "video": (context, parsedChild, attributes, element) { - return videoWidget( - double.tryParse(attributes['width'] ?? ""), - double.tryParse( - element.attributes['height'] ?? ""), - element.children.first.attributes["src"], - element.attributes["sandbox"]); - }, - "iframe": - (context, parsedChild, attributes, element) { - return videoWidget( - double.tryParse(attributes['width'] ?? ""), - double.tryParse( - element.attributes['height'] ?? ""), - element.children.first.attributes["src"], - element.attributes["sandbox"]); - }, - "audio": (context, parsedChild, attributes, element) { - final sources = [ - if (element.attributes['src'] != null) - element.attributes['src'], - ]; - if (sources == null || - sources.isEmpty || - sources.first == null) { - return EmptyContentElement(); - } - return audioWidget( - attributes['controls'] != null, - attributes['loop'] != null, - attributes['autoplay'] != null, - sources, - context.style.width ?? 300.w, - ); - }, - }, - ), - Container( - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 2), - blurRadius: 14, - spreadRadius: 0, - ), - ], - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - key: commentKey, - padding: EdgeInsets.all(16), - child: Row( - children: [ - Text( - S - .of(context) - .pinglun_(commentTotal.toString()), - style: TextStyle( - fontSize: 16.sp, - fontWeight: FontWeight.bold, - color: Color(0xff1A1A1A), - ), - ), - SizedBox( - width: 16.w, - ), - Text( - S.of(context).xihuan_( - "${article?.likes ?? activity?.likes ?? "0"}"), - style: TextStyle( - fontSize: 16.sp, - fontWeight: FontWeight.bold, - color: Color(0xff1A1A1A), - ), - ), - ], - ), - ), - if (memberList != null && memberList.length > 0) - ListView.builder( - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - itemCount: - memberList != null ? memberList.length : 0, - scrollDirection: Axis.vertical, - itemBuilder: (context, position) { - return Material( - color: Colors.white, - child: InkWell( - onTap: () { - showPressMenu( - memberList[position].createUser, - memberList[position]); - }, - child: commentItem(memberList[position], - position, memberList.length), - ), - ); - }, - ), - if (memberList != null && memberList.length > 0) - Container( - height: 63.h, - decoration: BoxDecoration( - color: Color(0xFFF2F2F2), - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 2), - blurRadius: 14, - spreadRadius: 0, - ), - ], - ), - alignment: Alignment.center, - child: Text( - S.of(context).yixiansquanbupinglun, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xff353535), - ), - ), - ), - if (memberList == null || memberList.length == 0) - Container( - width: double.infinity, - height: 80.h, - alignment: Alignment.center, - child: Text( - S.of(context).zanwupinglun, - style: TextStyle( - fontSize: 14.sp, - fontWeight: FontWeight.bold, - color: Color(0xFFA0A0A0), - ), - ), - ), - ], - ), - ), - SizedBox( - height: 12.h, - ), - ], - ), - ), - ), - flex: 1, - ), - commentWidget(), - ], - ), - ), - ); - } - - showPressMenu(String userId, memberComment) { - if (isKeyBoardShow) { - setState(() { - hintText = S.of(context).liuxianinjingcaidepinglunba; - }); - FocusScope.of(context).requestFocus(FocusNode()); - return; - } - SharedPreferences.getInstance().then((value) { - showModalBottomSheet( - context: context, - backgroundColor: Colors.transparent, - builder: (context) { - return CommentMenu( - (type) { - print("click: $type"); - if (type == "huifu") { - reply(memberComment); - } else if (type == "shanchu") { - delCommentTips(); - } - }, - isSelf: userId == value.getString("userId"), - ); - }, - ); - }); - } - - delCommentTips() { - SmartDialog.show(widget: Tips(() { - delComment(); - })); - } - - delComment() async { - BaseData baseData = await apiService.delComment( - widget.arguments["activityId"] ?? widget.arguments["articleId"]); - if (baseData != null && baseData.isSuccess) { - queryMemberCommentList(); - } - } - - reply(memberComment) { - FocusScope.of(context).requestFocus(commentFocus); - parenId = memberComment.id; - setState(() { - hintText = S.of(context).huifu_("${memberComment.username}"); - }); - } - - Widget commentWidget() { - return Container( - padding: EdgeInsets.all(16), - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 2), - blurRadius: 14, - spreadRadius: 0, - ), - ], - borderRadius: BorderRadius.vertical( - top: Radius.circular(8), - ), - ), - child: Row( - children: [ - Expanded( - flex: 1, - child: Container( - decoration: BoxDecoration( - color: Color(0xffF2F2F2), - borderRadius: BorderRadius.circular(2.0), - ), - child: Column( - children: [ - Container( - margin: EdgeInsets.fromLTRB(4, 0, 4, 0), - alignment: Alignment.topLeft, - child: TextField( - maxLines: 8, - minLines: 1, - focusNode: commentFocus, - controller: commentTextController, - decoration: InputDecoration( - border: InputBorder.none, - hintText: hintText, - hintStyle: TextStyle( - fontSize: 14.sp, - color: Color(0xFF868686), - ), - ), - ), - ), - ], - ), - ), - ), - if (isKeyBoardShow) - GestureDetector( - onTap: () { - var commentText = commentTextController.text; - if (commentText == "") { - return; - } - queryMemberComment(commentText); - }, - child: Container( - padding: EdgeInsets.symmetric(horizontal: 20.w), - child: Text( - S.of(context).fasong, - style: TextStyle( - fontSize: 16.sp, - fontWeight: FontWeight.bold, - color: Color(0XFF1A1A1A), - ), - ), - ), - ), - if (!isKeyBoardShow) - InkWell( - onTap: toComment, - child: Container( - padding: EdgeInsets.only(left: 20, right: 10), - child: Image.asset( - "assets/image/icon_comment.png", - width: 24, - height: 24, - ), - ), - ), - if (!isKeyBoardShow) - LikeButton( - padding: EdgeInsets.all(10), - size: 24, - circleSize: 24, - circleColor: CircleColor( - start: Color(0xff00ddff), - end: Color(0xff0099cc), - ), - bubblesColor: BubblesColor( - dotPrimaryColor: Color(0xff33b5e5), - dotSecondaryColor: Color(0xff0099cc), - ), - bubblesSize: 24, - likeBuilder: (bool isLiked) { - return isLiked - ? Image.asset( - "assets/image/icon_like.png", - width: 24, - height: 24, - ) - : Image.asset( - "assets/image/icon_like_h.png", - width: 24, - height: 24, - ); - }, - isLiked: (activity != null - ? activity.liked - : article != null - ? article.liked - : false), - onTap: (isLiked) async { - await queryInformationLikes(); - return (activity != null - ? activity.liked - : article != null - ? article.liked - : false); - }, - // likeCount: memberList.likes, - countBuilder: (int count, bool isLiked, String text) { - return Text( - text, - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 12.sp, - ), - ); - }, - ), - ], - ), - ); - } - - toComment() { - if (commentKey.currentContext == null) return; - RenderBox firstRenderBox = commentKey.currentContext.findRenderObject(); - Offset first = firstRenderBox.localToGlobal(Offset.zero); - scrollController.animateTo( - first.dy + - scrollController.offset - - (kToolbarHeight + MediaQuery.of(context).padding.top), - duration: Duration(milliseconds: 100), - curve: Curves.easeIn); - } - - VideoPlayerController videoPlayerController; - ChewieController chewieAudioController; - Chewie chewies; - - Widget videoWidget(double width, double height, src, sandboxMode) { - print("src : $src"); - return Container( - width: MediaQuery.of(context).size.width, - height: (MediaQuery.of(context).size.width) / (width / height), - child: chewies = Chewie( - controller: chewieAudioController = ChewieController( - videoPlayerController: videoPlayerController = - VideoPlayerController.network( - src, - ), - aspectRatio: width / height, - //宽高比 - autoPlay: false, - //自动播放 - looping: false, - //循环播放 - // 拖动条样式颜色 - materialProgressColors: chewie.ChewieProgressColors( - playedColor: Colors.white, - handleColor: Colors.white, - backgroundColor: Colors.grey, - bufferedColor: Colors.transparent, - ), - autoInitialize: true, - ), - ), - ); - } - - Widget audioWidget(showControls, loop, autoplay, src, width) { - return Container( - width: width, - child: chewies = Chewie( - controller: chewieAudioController = ChewieController( - videoPlayerController: VideoPlayerController.network( - src.first ?? "", - ), - autoPlay: autoplay, - looping: loop, - showControls: showControls, - autoInitialize: true, - ), - ), - ); - } - - Widget commentItem(MemberCommentList memberList, int index, int max) { - return Container( - padding: EdgeInsets.symmetric(vertical: 8.w), - child: Column( - children: [ - Container( - padding: EdgeInsets.symmetric(horizontal: 16.w), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - MImage( - memberList.userAvatarUrl ?? "", - fit: BoxFit.cover, - isCircle: true, - width: 40, - height: 40, - fadeSrc: "assets/image/default_user.png", - errorSrc: "assets/image/default_user.png", - ), - SizedBox( - width: 12.w, - ), - Expanded( - child: Container( - height: 60.h, - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text.rich( - TextSpan( - children: [ - TextSpan( - text: memberList.username, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 14.sp, - color: Colors.black, - ), - ), - ], - ), - textDirection: TextDirection.ltr, - ), - Text( - memberList.createTime, - overflow: TextOverflow.ellipsis, - maxLines: 2, - style: TextStyle( - fontSize: 12.sp, - color: Color(0xff808080), - ), - ), - ], - ), - ), - flex: 1, - ), - Container( - alignment: Alignment.topRight, - child: LikeButton( - padding: EdgeInsets.all(10), - circleSize: 16, - circleColor: CircleColor( - start: Color(0xff00ddff), - end: Color(0xff0099cc), - ), - bubblesColor: BubblesColor( - dotPrimaryColor: Color(0xff33b5e5), - dotSecondaryColor: Color(0xff0099cc), - ), - bubblesSize: 15, - likeBuilder: (bool isLiked) { - return isLiked - ? Image.asset( - "assets/image/icon_like.png", - width: 16, - height: 16, - ) - : Image.asset( - "assets/image/icon_like_h.png", - width: 16, - height: 16, - ); - }, - isLiked: memberList.liked ?? false, - onTap: (isLiked) async { - await queryCommentLike(memberList.id); - return (memberList == null || memberList.liked == null) - ? false - : memberList.liked; - }, - likeCount: memberList.likes, - countBuilder: (int count, bool isLiked, String text) { - return Text( - text, - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 12.sp, - ), - ); - }, - ), - ), - ], - ), - ), - Container( - padding: - EdgeInsets.only(left: 68, right: 16, top: 16.h, bottom: 16.h), - child: Align( - alignment: Alignment.centerLeft, - child: Text( - memberList.content, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xff1A1A1A), - ), - ), - ), - ), - SizedBox( - height: 12.h, - ), - if (memberList.parentContent != null) - Container( - margin: EdgeInsets.only(left: 68.w, right: 16.w), - decoration: BoxDecoration( - color: Color(0xffF2F2F2), - borderRadius: BorderRadius.circular(2.0), - ), - child: Padding( - padding: EdgeInsets.only(left: 4.w, top: 4.h, bottom: 4.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "${memberList.parentUserName}:" ?? "", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xff808080), - ), - ), - Expanded( - flex: 1, - child: Text( - memberList.parentContent ?? "", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xff808080), - ), - ), - ), - ], - ), - ), - ), - ], - ), - ); - } - - @override - void dispose() { - WidgetsBinding.instance.removeObserver(this); - if (chewieAudioController != null) chewieAudioController.dispose(); - - if (videoPlayerController != null) videoPlayerController.dispose(); - - super.dispose(); - } -} diff --git a/lib/union/union_details_page.dart b/lib/union/union_details_page.dart index 5c06cdfb..b4ba090f 100644 --- a/lib/union/union_details_page.dart +++ b/lib/union/union_details_page.dart @@ -772,7 +772,7 @@ class _UnionDetailsPage extends State { widget.arguments["source"] == activitys[position].id) { Navigator.of(context).pop(); } else { - Navigator.of(context).pushNamed('/router/store_detail_page', + Navigator.of(context).pushNamed('/router/web_page', arguments: { "activityId": activitys[position].id, "source": widget.arguments["id"] diff --git a/lib/union/union_page.dart b/lib/union/union_page.dart index 0ecea3e4..e7ea2960 100644 --- a/lib/union/union_page.dart +++ b/lib/union/union_page.dart @@ -517,7 +517,7 @@ class _UnionPage extends State crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( - padding: EdgeInsets.only(top: 1.h, left: 2, right: 2), + padding: EdgeInsets.only(top: 3.h, left: 2, right: 2), child: Image.asset( "assets/image/icon_union_location_black.png", width: 14, diff --git a/lib/view_widget/comment_menu.dart b/lib/view_widget/comment_menu.dart index 947c30c8..fb0d4c10 100644 --- a/lib/view_widget/comment_menu.dart +++ b/lib/view_widget/comment_menu.dart @@ -34,10 +34,11 @@ class _CommentMenu extends State { children: [ InkWell( onTap: () { - Navigator.of(context).pop(); widget.clickType("huifu"); }, child: Container( + width: MediaQuery.of(context).size.width, + alignment: Alignment.center, padding: EdgeInsets.all(20.h), child: Text( S.of(context).huifu, @@ -56,10 +57,11 @@ class _CommentMenu extends State { if (widget.isSelf) InkWell( onTap: () { - Navigator.of(context).pop(); widget.clickType("shanchu"); }, child: Container( + width: MediaQuery.of(context).size.width, + alignment: Alignment.center, padding: EdgeInsets.all(20.h), child: Text( S.of(context).shanchu, @@ -78,9 +80,11 @@ class _CommentMenu extends State { ), InkWell( onTap: () { - Navigator.of(context).pop(); + widget.clickType("quxiao"); }, child: Container( + width: MediaQuery.of(context).size.width, + alignment: Alignment.center, padding: EdgeInsets.all(20.h), child: Text( S.of(context).quxiao, diff --git a/lib/view_widget/hot_item.dart b/lib/view_widget/hot_item.dart index bafe1b8b..a55f04fc 100644 --- a/lib/view_widget/hot_item.dart +++ b/lib/view_widget/hot_item.dart @@ -33,7 +33,7 @@ class _HotArticleItem extends State { } click() async { - await Navigator.of(context).pushNamed('/router/store_detail_page', + await Navigator.of(context).pushNamed('/router/web_page', arguments: {"articleId": widget.article.id}); widget.article.viewers = (widget.article.viewers + 1); setState(() {}); @@ -236,7 +236,7 @@ class _HotArticleItem extends State { ), flex: 1, ), - if (widget.isHot != null && widget.isHot) + // if (widget.isHot != null && widget.isHot) IconText( widget.article != null ? (widget.article.createTime.split(" ")[0]) diff --git a/lib/view_widget/mine_vip_view.dart b/lib/view_widget/mine_vip_view.dart index 8f25ee71..4fd60891 100644 --- a/lib/view_widget/mine_vip_view.dart +++ b/lib/view_widget/mine_vip_view.dart @@ -46,8 +46,8 @@ class MineVipView extends StatelessWidget { userInfo.memberRankVo != null && ranks != null && ranks.length > 0) { - curLevel = (ranks.indexWhere( - (element) => element.id == userInfo.memberRankVo.id) + + curLevel = (ranks + .indexWhere((element) => element.id == userInfo.memberRankVo.id) + 1); vipLevel = curLevel; } @@ -115,26 +115,30 @@ class MineVipView extends StatelessWidget { } return GestureDetector( onTap: () { - SharedPreferences.getInstance().then((value) { - if (value.getString("token") == null || - value.getString("token") == "") { - LoginTipsDialog().show(context); - return; - } - Navigator.of(context) - .pushNamed('/router/mine_vip_level_page', arguments: { - "rankLevel": curLevel, - "createTime": (userInfo != null) ? "${userInfo.createTime}" : "", - "points": (userInfo != null) ? int.tryParse(userInfo.points) : 0, + if (userInfo != null) { + SharedPreferences.getInstance().then((value) { + if (value.getString("token") == null || + value.getString("token") == "") { + LoginTipsDialog().show(context); + return; + } + Navigator.of(context) + .pushNamed('/router/mine_vip_level_page', arguments: { + "rankLevel": curLevel, + "createTime": (userInfo != null) ? "${userInfo.createTime}" : "", + "points": (userInfo != null) ? int.tryParse(userInfo.points) : 0, + }); }); - }); + } }, child: Hero( tag: tag, child: Container( margin: EdgeInsets.fromLTRB(padding.w, 16.h, padding.w, 8.h), width: MediaQuery.of(context).size.width - 32.w, - height: 200.h, + height: (MediaQuery.of(context).size.width - 32.w) / + 1.78 * + AppUtils.textScale(context), decoration: BoxDecoration( gradient: LinearGradient( colors: linearColor, @@ -156,13 +160,13 @@ class MineVipView extends StatelessWidget { children: [ Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( - height: 95.h, + height: 86.w, child: Column( mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.max, children: [ Container( padding: EdgeInsets.fromLTRB(9.w, 4.h, 8.w, 4.h), @@ -201,97 +205,103 @@ class MineVipView extends StatelessWidget { child: Image.asset( "assets/image/icon_mine_huixiang_logo.png", width: 86.w, - height: 86.h, + height: 86.w, fit: BoxFit.contain, ), ), ], ), - Container( - margin: EdgeInsets.only(left: 13.w, right: 12.w, bottom: 12.h), - child: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.baseline, - textBaseline: TextBaseline.alphabetic, - children: [ - Expanded( - child: Text( - rank > rankMax - ? S.of(context).dangqiandengji - : "${S.of(context).jifen_(rankMax - rank)} ${S.of(context).daoxiayidengji}", - overflow: TextOverflow.ellipsis, - style: TextStyle( - color: textColor, - fontWeight: FontWeight.w400, - fontSize: 14.sp, + Expanded( + child: Container( + margin: EdgeInsets.only( + left: 13.w, + right: 12.w, + bottom: 12.h, + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.baseline, + textBaseline: TextBaseline.alphabetic, + children: [ + Expanded( + child: Text( + rank > rankMax + ? S.of(context).dangqiandengji + : "${S.of(context).jifen_(rankMax - rank)} ${S.of(context).daoxiayidengji}", + overflow: TextOverflow.ellipsis, + style: TextStyle( + color: textColor, + fontWeight: FontWeight.w400, + fontSize: 14.sp, + ), ), + flex: 1, ), - flex: 1, - ), - Text.rich( - TextSpan( - children: [ - TextSpan( - text: "$rank", - style: TextStyle( - fontSize: 26.sp, - fontWeight: FontWeight.bold, - color: textColor, - ), - ), - if (rank <= rankMax) + Text.rich( + TextSpan( + children: [ TextSpan( - // string - text: rankMax > 0 ? "/$rankMax" : "/0", + text: "$rank", style: TextStyle( - fontSize: 14.sp, - fontWeight: FontWeight.w400, + fontSize: 26.sp, + fontWeight: FontWeight.bold, color: textColor, ), ), - ], + if (rank <= rankMax) + TextSpan( + text: rankMax > 0 ? "/$rankMax" : "/0", + style: TextStyle( + fontSize: 14.sp, + fontWeight: FontWeight.w400, + color: textColor, + ), + ), + ], + ), ), - ), - ], - ), - Container( - margin: EdgeInsets.only(top: 12.h, bottom: 12.h), - height: 8.h, - child: ClipRRect( - borderRadius: BorderRadius.circular(6.5), - child: LinearProgressIndicator( - value: rankMax > 0 ? rank / rankMax : 0, - backgroundColor: Colors.white, - color: levelColor, - ), + ], ), - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - S.of(context).kaitongriqi( - (createTime != null && createTime != "") - ? createTime.split(" ")[0] - : "$createTime"), - style: TextStyle( - color: textColor, - fontWeight: FontWeight.w400, - fontSize: 12.sp, + Container( + height: 8.h, + child: ClipRRect( + borderRadius: BorderRadius.circular(6.5), + child: LinearProgressIndicator( + value: rankMax > 0 ? rank / rankMax : 0, + backgroundColor: Colors.white, + color: levelColor, ), ), - Icon( - Icons.qr_code, - size: 24, - color: Colors.white, - ), - ], - ), - ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + S.of(context).kaitongriqi( + (createTime != null && createTime != "") + ? createTime.split(" ")[0] + : "$createTime"), + style: TextStyle( + color: textColor, + fontWeight: FontWeight.w400, + fontSize: 12.sp, + ), + ), + Icon( + Icons.qr_code, + size: 24, + color: Colors.white, + ), + ], + ), + ], + ), ), + flex: 1, ), ], ), diff --git a/lib/web/web_page.dart b/lib/web/web_page.dart new file mode 100644 index 00000000..2e6436a5 --- /dev/null +++ b/lib/web/web_page.dart @@ -0,0 +1,318 @@ +import 'dart:io'; +import 'dart:ui'; + +import 'package:dio/dio.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/rendering.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; +import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/retrofit/data/activity.dart'; +import 'package:huixiang/retrofit/data/article.dart'; +import 'package:huixiang/retrofit/data/base_data.dart'; +import 'package:huixiang/retrofit/retrofit_api.dart'; +import 'package:huixiang/view_widget/my_appbar.dart'; +import 'package:huixiang/view_widget/share_dialog.dart'; +import 'package:huixiang/view_widget/tips_dialog.dart'; +import 'package:huixiang/web/web_view/comment_list.dart'; +import 'package:huixiang/web/web_view/input_comment.dart'; +import 'package:huixiang/web/web_view/web_content.dart'; +import 'package:huixiang/web/web_view/web_header.dart'; +import 'package:shared_preferences/shared_preferences.dart'; +import 'package:sharesdk_plugin/sharesdk_defines.dart'; +import 'package:sharesdk_plugin/sharesdk_interface.dart'; +import 'package:sharesdk_plugin/sharesdk_map.dart'; +import 'package:webview_flutter/webview_flutter.dart'; +import 'package:flutter/cupertino.dart'; + +class WebPage extends StatefulWidget { + final Map arguments; + + ///富文本 文章 活动 + WebPage({this.arguments}); + + @override + State createState() { + return _WebPage(); + } +} + +class _WebPage extends State with WidgetsBindingObserver { + ApiService apiService; + int commentTotal = 0; + String hintText = S.current.liuxianinjingcaidepinglunba; + var commentFocus = FocusNode(); + String parenId = "0"; + + Activity activity; + Article article; + final GlobalKey commentKey = GlobalKey(); + final GlobalKey inputKey = GlobalKey(); + final ScrollController scrollController = ScrollController(); + + @override + void initState() { + super.initState(); + WidgetsBinding.instance.addObserver(this); + if (Platform.isAndroid) WebView.platform = SurfaceAndroidWebView(); + + queryHtml(); + + } + + bool isKeyBoardShow = false; + + @override + void didChangeMetrics() { + WidgetsBinding.instance.addPostFrameCallback((_) { + if (MediaQuery.of(context).viewInsets.bottom == 0) { + if (isKeyBoardShow) { + FocusScope.of(context).requestFocus(FocusNode()); + setState(() { + hintText = S.current.liuxianinjingcaidepinglunba; + isKeyBoardShow = false; + }); + } + } else { + setState(() { + isKeyBoardShow = true; + }); + } + }); + } + + @override + void dispose() { + WidgetsBinding.instance.removeObserver(this); + super.dispose(); + } + + queryHtml() async { + SharedPreferences value = await SharedPreferences.getInstance(); + if (apiService == null) + apiService = ApiService(Dio(), context: context, token: value.getString("token")); + + if (widget.arguments["activityId"] != null) { + BaseData baseData = await apiService.activityInfo(widget.arguments["activityId"]).catchError((onError){}); + if (baseData != null && baseData.isSuccess) { + activity = baseData.data; + setState(() {}); + } + } + if (widget.arguments["articleId"] != null) { + BaseData
baseData = await apiService.informationInfo(widget.arguments["articleId"]).catchError((onError){}); + if (baseData != null && baseData.isSuccess) { + article = baseData.data; + setState(() {}); + } + } + } + + //发布评论 + _queryMemberComment(String content) async { + BaseData baseData = await apiService.memberComment({ + "content": content, + "parentId": parenId, + "relationalId": + widget.arguments["activityId"] ?? widget.arguments["articleId"], + "relationalType": 1 + }).catchError((error) {}); + if (baseData != null && baseData.isSuccess) { + _toComment(); + } + } + + share() async { + SSDKMap params = SSDKMap() + ..setGeneral( + activity != null + ? activity.mainTitle + : article != null + ? article.mainTitle + : "", + activity != null + ? activity.viceTitle + : article != null + ? article.viceTitle + : "", + [ + activity != null + ? activity.coverImg + : article != null + ? article.coverImg + : "", + ], + activity != null + ? activity.coverImg + : article != null + ? article.coverImg + : "", + "", buildShareUrl(), "", "", "", "", + SSDKContentTypes.webpage, + ); + + showModalBottomSheet( + context: context, + backgroundColor: Colors.transparent, + builder: (context) { + return ShareDialog((platform) { + if (platform == ShareSDKPlatforms.line) { + params.map["type"] = SSDKContentTypes.text.value; + params.map["text"] = + "${activity != null ? activity.viceTitle : article != null ? article.viceTitle : ""} ${buildShareUrl()}"; + } + SharesdkPlugin.share(platform, params, + (state, userData, contentEntity, error) { + print("share!$state"); + }); + }); + }); + } + + String buildShareUrl() { + return "https://hx.lotus-wallet.com/index.html?id=${widget.arguments["activityId"] ?? widget.arguments["articleId"]}&type=${activity != null ? "activity" : article != null ? "article" : ""}"; + } + + //给文章/活动点赞 + _queryInformationLikes() async { + BaseData baseData = await apiService.informationLikes( + widget.arguments["activityId"] ?? widget.arguments["articleId"]); + if (baseData != null && baseData.isSuccess) { + if (article != null) { + if (article.liked) { + article.likes -= 1; + } else { + article.likes += 1; + } + article.liked = !article.liked; + } else if (activity != null) { + if (activity.liked) { + activity.likes -= 1; + } else { + activity.likes += 1; + } + activity.liked = !activity.liked; + } + } else { + SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: MyAppBar( + action: Container( + margin: EdgeInsets.only(right: 10), + child: GestureDetector( + onTap: () { + share(); + }, + child: Icon( + Icons.share, + size: 24, + color: Colors.black, + ), + ), + ), + background: Color(0xFFF7F7F7), + leadingColor: Colors.black, + title: activity != null + ? activity.mainTitle + : article != null + ? article.mainTitle + : "", + titleSize: 18.sp, + titleColor: Colors.black, + ), + body: Container( + child: Column( + children: [ + Expanded( + child: GestureDetector( + onTap: () { + commentFocus.unfocus(); + hintText = S.of(context).liuxianinjingcaidepinglunba; + inputKey.currentState.setState(() {});; + parenId = "0"; + }, + child: SingleChildScrollView( + controller: scrollController, + physics: BouncingScrollPhysics(), + child: Column( + children: [ + /// 富文本的头部 + WebHeader(widget.arguments, activity, article), + + /// 富文本的内容 + WebContent(activity, article), + + /// 富文本的评论 + CommentList( + commentKey, + widget.arguments, + activity, + article, + isKeyBoardShow, + _reply, + _delCommentTips, + ), + ], + ), + ), + ), + flex: 1, + ), + + /// 富文本评论的输入框 + InputComment( + inputKey, + hintText, + activity, + article, + isKeyBoardShow, + commentFocus, + _toComment, + _queryMemberComment, + _queryInformationLikes, + ), + ], + ), + ), + ); + } + + _delCommentTips() { + SmartDialog.show(widget: Tips(() { + delComment(); + })); + } + + delComment() async { + BaseData baseData = await apiService.delComment( + widget.arguments["activityId"] ?? widget.arguments["articleId"]); + if (baseData != null && baseData.isSuccess) { + commentKey.currentState.setState(() {}); + } + } + + _reply(memberComment) { + FocusScope.of(context).requestFocus(commentFocus); + parenId = memberComment.id; + hintText = S.of(context).huifu_("${memberComment.username}"); + } + + _toComment() { + if (commentKey.currentContext == null) return; + RenderBox firstRenderBox = commentKey.currentContext.findRenderObject(); + Offset first = firstRenderBox.localToGlobal(Offset.zero); + scrollController.animateTo( + first.dy + + scrollController.offset - + (kToolbarHeight + MediaQuery.of(context).padding.top), + duration: Duration(milliseconds: 1000), + curve: Curves.easeIn); + } + + +} diff --git a/lib/web/web_view/comment_list.dart b/lib/web/web_view/comment_list.dart new file mode 100644 index 00000000..2a9e9c60 --- /dev/null +++ b/lib/web/web_view/comment_list.dart @@ -0,0 +1,422 @@ +import 'package:dio/dio.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; +import 'package:huixiang/generated/l10n.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:huixiang/retrofit/data/activity.dart'; +import 'package:huixiang/retrofit/data/article.dart'; +import 'package:huixiang/retrofit/data/base_data.dart'; +import 'package:huixiang/retrofit/data/member_comment_list.dart'; +import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/retrofit/retrofit_api.dart'; +import 'package:huixiang/view_widget/comment_menu.dart'; +import 'package:huixiang/view_widget/custom_image.dart'; +import 'package:huixiang/view_widget/login_tips_dialog.dart'; +import 'package:like_button/like_button.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +class CommentList extends StatefulWidget { + final Map arguments; + final Activity activity; + final Article article; + final bool isKeyBoardShow; + final Function reply; + final Function delCommentTips; + + CommentList( + Key key, + this.arguments, + this.activity, + this.article, + this.isKeyBoardShow, + this.reply, + this.delCommentTips, + ) : super(key: key); + + @override + State createState() { + return _CommentList(); + } +} + +class _CommentList extends State { + int commentTotal = 0; + List memberList = []; + ApiService apiService; + + //评论点赞 + queryCommentLike(String id) async { + SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); + String token = sharedPreferences.getString("token"); + if (token == null || token == "") { + LoginTipsDialog().show(context); + return; + } + BaseData baseData = + await apiService.commentLike(id).catchError((onError) {}); + if (baseData != null && baseData.isSuccess) { + memberList.forEach((element) { + if (element.id == id) { + if (element.liked) { + element.likes -= 1; + element.liked = false; + } else { + element.likes += 1; + element.liked = true; + } + } + }); + } + } + + @override + void initState() { + super.initState(); + queryMemberCommentList(); + } + + @override + Widget build(BuildContext context) { + return Column( + children: [ + Container( + decoration: BoxDecoration( + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 2), + blurRadius: 14, + spreadRadius: 0, + ), + ], + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + padding: EdgeInsets.all(16), + child: Row( + children: [ + Text( + S.of(context).pinglun_(commentTotal.toString()), + style: TextStyle( + fontSize: 16.sp, + fontWeight: FontWeight.bold, + color: Color(0xff1A1A1A), + ), + ), + SizedBox( + width: 16.w, + ), + Text( + S.of(context).xihuan_( + "${widget.article?.likes ?? widget.activity?.likes ?? "0"}"), + style: TextStyle( + fontSize: 16.sp, + fontWeight: FontWeight.bold, + color: Color(0xff1A1A1A), + ), + ), + ], + ), + ), + if (memberList != null && memberList.length > 0) + ListView.builder( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + itemCount: memberList != null ? memberList.length : 0, + scrollDirection: Axis.vertical, + itemBuilder: (context, position) { + return Material( + color: Colors.white, + child: InkWell( + onTap: () { + showPressMenu(memberList[position].createUser, + memberList[position]); + }, + child: commentItem( + memberList[position], position, memberList.length), + ), + ); + }, + ), + if (memberList != null && memberList.length > 0) + Container( + height: 63.h, + decoration: BoxDecoration( + color: Color(0xFFF2F2F2), + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 2), + blurRadius: 14, + spreadRadius: 0, + ), + ], + ), + alignment: Alignment.center, + child: Text( + S.of(context).yixiansquanbupinglun, + style: TextStyle( + fontSize: 14.sp, + color: Color(0xff353535), + ), + ), + ), + if (memberList == null || memberList.length == 0) + Container( + width: double.infinity, + height: 80.h, + alignment: Alignment.center, + child: Text( + S.of(context).zanwupinglun, + style: TextStyle( + fontSize: 14.sp, + fontWeight: FontWeight.bold, + color: Color(0xFFA0A0A0), + ), + ), + ), + ], + ), + ), + SizedBox( + height: 12.h, + ), + ], + ); + } + + //评论列表 + queryMemberCommentList() async { + SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); + if (apiService == null) + apiService = ApiService(Dio(), + context: context, token: sharedPreferences.getString("token")); + BaseData> baseData = + await apiService.memberCommentList({ + "pageNum": 1, + "pageSize": 100, + "relationalId": + widget.arguments["activityId"] ?? widget.arguments["articleId"], + "relationalType": 1, + }).catchError((error) {}); + if (baseData != null && baseData.isSuccess) { + commentTotal = baseData.data.size; + memberList = baseData.data.list; + setState(() {}); + } + } + + showPressMenu(String userId, memberComment) { + if (widget.isKeyBoardShow) { + FocusScope.of(context).requestFocus(FocusNode()); + return; + } + SharedPreferences.getInstance().then((value) { + // showModalBottomSheet( + // context: context, + // backgroundColor: Colors.transparent, + // builder: (context) { + // return CommentMenu( + // (type) { + // print("click: $type"); + // if (type == "huifu") { + // widget.reply(memberComment); + // } else if (type == "shanchu") { + // widget.delCommentTips(); + // } + // }, + // isSelf: userId == value.getString("userId"), + // ); + // }, + // ); + + SmartDialog.show( + widget: CommentMenu((type) { + SmartDialog.dismiss(); + if (type == "huifu") { + widget.reply(memberComment); + } else if (type == "shanchu") { + widget.delCommentTips(); + } + }, + isSelf: userId == value.getString("userId"), + ), + alignmentTemp: Alignment.bottomCenter, + isUseAnimationTemp: true, + animationDurationTemp: Duration(milliseconds: 300), + ); + }); + } + + Widget commentItem(MemberCommentList memberList, int index, int max) { + return Container( + padding: EdgeInsets.symmetric(vertical: 8.w), + child: Column( + children: [ + Container( + padding: EdgeInsets.symmetric(horizontal: 16.w), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + MImage( + memberList.userAvatarUrl ?? "", + fit: BoxFit.cover, + isCircle: true, + width: 40, + height: 40, + fadeSrc: "assets/image/default_user.png", + errorSrc: "assets/image/default_user.png", + ), + SizedBox( + width: 12.w, + ), + Expanded( + child: Container( + height: 60.h, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text.rich( + TextSpan( + children: [ + TextSpan( + text: memberList.username, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 14.sp, + color: Colors.black, + ), + ), + ], + ), + textDirection: TextDirection.ltr, + ), + Text( + memberList.createTime, + overflow: TextOverflow.ellipsis, + maxLines: 2, + style: TextStyle( + fontSize: 12.sp, + color: Color(0xff808080), + ), + ), + ], + ), + ), + flex: 1, + ), + Container( + alignment: Alignment.topRight, + child: LikeButton( + padding: EdgeInsets.all(10), + circleSize: 16, + circleColor: CircleColor( + start: Color(0xff00ddff), + end: Color(0xff0099cc), + ), + bubblesColor: BubblesColor( + dotPrimaryColor: Color(0xff33b5e5), + dotSecondaryColor: Color(0xff0099cc), + ), + bubblesSize: 15, + likeBuilder: (bool isLiked) { + return isLiked + ? Image.asset( + "assets/image/icon_like.png", + width: 16, + height: 16, + ) + : Image.asset( + "assets/image/icon_like_h.png", + width: 16, + height: 16, + ); + }, + isLiked: memberList.liked ?? false, + onTap: (isLiked) async { + await queryCommentLike(memberList.id); + return (memberList == null || memberList.liked == null) + ? false + : memberList.liked; + }, + likeCount: memberList.likes, + countBuilder: (int count, bool isLiked, String text) { + return Text( + text, + style: TextStyle( + color: Color(0xFF1A1A1A), + fontSize: 12.sp, + ), + ); + }, + ), + ), + ], + ), + ), + Container( + padding: EdgeInsets.only( + left: 68, + right: 16, + top: 16.h, + bottom: 16.h, + ), + child: Align( + alignment: Alignment.centerLeft, + child: Text( + memberList.content, + style: TextStyle( + fontSize: 14.sp, + color: Color(0xff1A1A1A), + ), + ), + ), + ), + SizedBox( + height: 12.h, + ), + if (memberList.parentContent != null) + Container( + margin: EdgeInsets.only(left: 68.w, right: 16.w), + decoration: BoxDecoration( + color: Color(0xffF2F2F2), + borderRadius: BorderRadius.circular(2.0), + ), + child: Padding( + padding: EdgeInsets.only(left: 4.w, top: 4.h, bottom: 4.h), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "${memberList.parentUserName}:" ?? "", + style: TextStyle( + fontSize: 12.sp, + color: Color(0xff808080), + ), + ), + Expanded( + flex: 1, + child: Text( + memberList.parentContent ?? "", + style: TextStyle( + fontSize: 12.sp, + color: Color(0xff808080), + ), + ), + ), + ], + ), + ), + ), + ], + ), + ); + } +} diff --git a/lib/web/web_view/input_comment.dart b/lib/web/web_view/input_comment.dart new file mode 100644 index 00000000..2833ad87 --- /dev/null +++ b/lib/web/web_view/input_comment.dart @@ -0,0 +1,178 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/retrofit/data/activity.dart'; +import 'package:huixiang/retrofit/data/article.dart'; +import 'package:like_button/like_button.dart'; + +class InputComment extends StatefulWidget { + final String hintText; + final Activity activity; + final Article article; + final bool isKeyBoardShow; + final FocusNode commentFocus; + final Function toComment; + final Function(String text) queryMemberComment; + final Function() queryInformationLikes; + + InputComment( + Key key, + this.hintText, + this.activity, + this.article, + this.isKeyBoardShow, + this.commentFocus, + this.toComment, + this.queryMemberComment, + this.queryInformationLikes, + ) : super(key: key); + + @override + State createState() { + return _InputComment(); + } +} + +class _InputComment extends State { + + var commentTextController = TextEditingController(); + + @override + Widget build(BuildContext context) { + return Container( + padding: EdgeInsets.all(16), + decoration: BoxDecoration( + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 2), + blurRadius: 14, + spreadRadius: 0, + ), + ], + borderRadius: BorderRadius.vertical( + top: Radius.circular(8), + ), + ), + child: Row( + children: [ + Expanded( + flex: 1, + child: Container( + decoration: BoxDecoration( + color: Color(0xffF2F2F2), + borderRadius: BorderRadius.circular(2.0), + ), + child: Column( + children: [ + Container( + margin: EdgeInsets.symmetric(horizontal: 4.w), + alignment: Alignment.topLeft, + child: TextField( + maxLines: 8, + minLines: 1, + focusNode: widget.commentFocus, + controller: commentTextController, + decoration: InputDecoration( + border: InputBorder.none, + hintText: widget.hintText, + hintStyle: TextStyle( + fontSize: 14.sp, + color: Color(0xFF868686), + ), + ), + ), + ), + ], + ), + ), + ), + if (widget.isKeyBoardShow) + GestureDetector( + onTap: () { + var commentText = commentTextController.text; + if (commentText == "") { + return; + } + widget.queryMemberComment(commentText); + }, + child: Container( + padding: EdgeInsets.symmetric(horizontal: 20.w), + child: Text( + S.of(context).fasong, + style: TextStyle( + fontSize: 16.sp, + fontWeight: FontWeight.bold, + color: Color(0XFF1A1A1A), + ), + ), + ), + ), + if (!widget.isKeyBoardShow) + InkWell( + onTap: widget.toComment, + child: Container( + padding: EdgeInsets.only(left: 20.w, right: 10.w), + child: Image.asset( + "assets/image/icon_comment.png", + width: 24, + height: 24, + ), + ), + ), + if (!widget.isKeyBoardShow) + LikeButton( + padding: EdgeInsets.all(10), + size: 24, + circleSize: 24, + circleColor: CircleColor( + start: Color(0xff00ddff), + end: Color(0xff0099cc), + ), + bubblesColor: BubblesColor( + dotPrimaryColor: Color(0xff33b5e5), + dotSecondaryColor: Color(0xff0099cc), + ), + bubblesSize: 24, + likeBuilder: (bool isLiked) { + return isLiked + ? Image.asset( + "assets/image/icon_like.png", + width: 24, + height: 24, + ) + : Image.asset( + "assets/image/icon_like_h.png", + width: 24, + height: 24, + ); + }, + isLiked: (widget.activity != null + ? widget.activity.liked + : widget.article != null + ? widget.article.liked + : false), + onTap: (isLiked) async { + await widget.queryInformationLikes(); + return (widget.activity != null + ? widget.activity.liked + : widget.article != null + ? widget.article.liked + : false); + }, + countBuilder: (int count, bool isLiked, String text) { + return Text( + text, + style: TextStyle( + color: Color(0xFF1A1A1A), + fontSize: 12.sp, + ), + ); + }, + ), + ], + ), + ); + } +} diff --git a/lib/web/web_view/web_content.dart b/lib/web/web_view/web_content.dart new file mode 100644 index 00000000..b50ce1e7 --- /dev/null +++ b/lib/web/web_view/web_content.dart @@ -0,0 +1,170 @@ + + +import 'package:chewie/chewie.dart'; +import 'package:flutter_html/flutter_html.dart'; +import 'package:flutter_html/image_render.dart'; +import 'package:chewie/src/chewie_progress_colors.dart' as chewie; +import 'package:flutter/material.dart'; +import 'package:flutter_html/src/replaced_element.dart'; +import 'package:huixiang/retrofit/data/activity.dart'; +import 'package:huixiang/retrofit/data/article.dart'; +import 'package:video_player/video_player.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; + +class WebContent extends StatefulWidget { + + final Activity activity; + final Article article; + + WebContent(this.activity, this.article); + + @override + State createState() { + return _WebContent(); + } + +} + +class _WebContent extends State { + @override + Widget build(BuildContext context) { + return Html( + data: widget.activity != null + ? widget.activity.content + : widget.article != null + ? widget.article.content + : "", + customImageRenders: { + base64DataUriMatcher(): base64ImageRender(), + assetUriMatcher(): assetImageRender(), + networkSourceMatcher(extension: "svg"): + svgNetworkImageRender(), + networkSourceMatcher(): networkImageRender( + loadingWidget: () { + return Container(); + }, + ), + }, + customRender: { + "video": + (context, parsedChild, attributes, element) { + var src = attributes['src']; + return videoWidget( + double.tryParse(attributes['width'] ?? ""), + double.tryParse( + element.attributes['height'] ?? ""), + (src != null && + src != "" && + src.endsWith(".mp4")) + ? src + : element + .children.first.attributes["src"], + element.attributes["sandbox"]); + }, + "iframe": + (context, parsedChild, attributes, element) { + var src = attributes['src']; + return videoWidget( + double.tryParse(attributes['width'] ?? ""), + double.tryParse( + element.attributes['height'] ?? ""), + (src != null && + src != "" && + src.endsWith(".mp4")) + ? src + : element + .children.first.attributes["src"], + element.attributes["sandbox"]); + }, + "audio": + (context, parsedChild, attributes, element) { + final sources = [ + if (element.attributes['src'] != null) + element.attributes['src'], + ]; + if (sources == null || + sources.isEmpty || + sources.first == null) { + return EmptyContentElement(); + } + return audioWidget( + attributes['controls'] != null, + attributes['loop'] != null, + attributes['autoplay'] != null, + sources, + context.style.width ?? 300.w, + ); + }, + }, + ); + } + + VideoPlayerController videoPlayerController; + ChewieController chewieAudioController; + Chewie chewies; + + Widget videoWidget(double width, double height, src, sandboxMode) { + print("src : $src"); + return Container( + width: MediaQuery.of(context).size.width, + height: (MediaQuery.of(context).size.width) / (width / height), + child: chewies = Chewie( + controller: chewieAudioController = ChewieController( + videoPlayerController: videoPlayerController = + VideoPlayerController.network( + src, + ), + aspectRatio: width / height, + //宽高比 + autoPlay: false, + //自动播放 + looping: false, + //循环播放 + // 拖动条样式颜色 + materialProgressColors: chewie.ChewieProgressColors( + playedColor: Colors.white, + handleColor: Colors.white, + backgroundColor: Colors.grey, + bufferedColor: Colors.transparent, + ), + autoInitialize: true, + ), + ), + ); + } + + Widget audioWidget(showControls, loop, autoplay, src, width) { + return Container( + width: width, + child: chewies = Chewie( + controller: chewieAudioController = ChewieController( + videoPlayerController: VideoPlayerController.network( + src.first ?? "", + ), + autoPlay: autoplay, + looping: loop, + showControls: showControls, + autoInitialize: true, + ), + ), + ); + } + + @override + void dispose() { + + if (chewieAudioController != null) { + chewieAudioController.pause(); + chewieAudioController.dispose(); + chewieAudioController = null; + } + + if (videoPlayerController != null) { + videoPlayerController.pause(); + videoPlayerController.dispose(); + } + + super.dispose(); + } + +} \ No newline at end of file diff --git a/lib/web/web_view/web_header.dart b/lib/web/web_view/web_header.dart new file mode 100644 index 00000000..025e897b --- /dev/null +++ b/lib/web/web_view/web_header.dart @@ -0,0 +1,100 @@ + +import 'package:flutter/material.dart'; +import 'package:huixiang/retrofit/data/activity.dart'; +import 'package:huixiang/retrofit/data/article.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; + +class WebHeader extends StatefulWidget { + + final Map arguments; + final Activity activity; + final Article article; + + WebHeader(this.arguments, this.activity, this.article); + + @override + State createState() { + return _WebHeader(); + } + +} + +class _WebHeader extends State { + @override + Widget build(BuildContext context) { + return Column( + children: [ + Container( + color: Color(0xFFF7F7F7), + padding: EdgeInsets.all(12), + alignment: Alignment.centerLeft, + child: Text( + widget.activity != null + ? widget.activity.mainTitle + : widget.article != null + ? widget.article.mainTitle + : "", + style: TextStyle( + fontSize: 16.sp, + fontWeight: FontWeight.bold, + color: Color(0xFF353535), + ), + ), + ), + Container( + padding: EdgeInsets.symmetric(horizontal: 12.w), + child: Row( + children: [ + InkWell( + child: Text( + "${widget.activity != null ? (widget.activity.storeName ?? "") : (widget.article != null && widget.article.author != null) ? (widget.article.author.name ?? "") : ""}", + style: TextStyle( + fontWeight: FontWeight.normal, + fontSize: 14.sp, + color: Colors.blue, + ), + ), + onTap: () { + if (widget.activity != null) { + if (widget.arguments["source"] != null && + widget.arguments["source"] == + widget.activity.storeId) { + Navigator.of(context).pop(); + } else { + Navigator.of(context).pushNamed( + '/router/union_detail_page', + arguments: { + "id": widget.activity.storeId, + "source": + widget.arguments["activityId"] + }); + } + } + }, + ), + SizedBox( + width: 10.w, + ), + Text( + widget.activity != null + ? widget.activity.createTime + : widget.article != null + ? widget.article.createTime + : "", + style: TextStyle( + fontWeight: FontWeight.normal, + fontSize: 12.sp, + color: Colors.grey, + ), + ), + ], + ), + ), + ], + ); + } + +} + + + diff --git a/pubspec.lock b/pubspec.lock index 853abd16..ef77fc11 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -321,13 +321,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.0.4" - flutter_bugly: - dependency: "direct main" - description: - name: flutter_bugly - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.3.3" flutter_cache_manager: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 1bfe3480..928d8713 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -92,7 +92,7 @@ dependencies: rive: ^0.6.8 flare_flutter: ^3.0.2 - flutter_bugly: ^0.3.3 +# flutter_bugly: ^0.3.3 dev_dependencies: flutter_test: From 110892e82e9f2c1c0332993bc80eb7d315dd66cc Mon Sep 17 00:00:00 2001 From: fmk Date: Sat, 4 Sep 2021 18:34:26 +0800 Subject: [PATCH 2/2] safety --- lib/mine/mine_page.dart | 1 + lib/view_widget/mine_vip_view.dart | 346 +++++++++++++++-------------- 2 files changed, 175 insertions(+), 172 deletions(-) diff --git a/lib/mine/mine_page.dart b/lib/mine/mine_page.dart index a38c8f8d..e20417bf 100644 --- a/lib/mine/mine_page.dart +++ b/lib/mine/mine_page.dart @@ -154,6 +154,7 @@ class _MinePage extends State with AutomaticKeepAliveClientMixin { ///我的 VIP等级信息 MineVipView( + tag: "vip", ranks: ranks, userInfo: userInfo, rank: (userInfo != null) diff --git a/lib/view_widget/mine_vip_view.dart b/lib/view_widget/mine_vip_view.dart index 4fd60891..06ff8692 100644 --- a/lib/view_widget/mine_vip_view.dart +++ b/lib/view_widget/mine_vip_view.dart @@ -21,7 +21,7 @@ class MineVipView extends StatelessWidget { MineVipView({ this.vipLevel = 1, this.ranks, - this.tag = "", + this.tag, this.userInfo, this.padding = 16, this.curLevel = 1, @@ -113,200 +113,202 @@ class MineVipView extends StatelessWidget { break; } } - return GestureDetector( - onTap: () { - if (userInfo != null) { - SharedPreferences.getInstance().then((value) { - if (value.getString("token") == null || - value.getString("token") == "") { - LoginTipsDialog().show(context); - return; - } - Navigator.of(context) - .pushNamed('/router/mine_vip_level_page', arguments: { - "rankLevel": curLevel, - "createTime": (userInfo != null) ? "${userInfo.createTime}" : "", - "points": (userInfo != null) ? int.tryParse(userInfo.points) : 0, - }); - }); - } - }, - child: Hero( - tag: tag, - child: Container( - margin: EdgeInsets.fromLTRB(padding.w, 16.h, padding.w, 8.h), - width: MediaQuery.of(context).size.width - 32.w, - height: (MediaQuery.of(context).size.width - 32.w) / - 1.78 * - AppUtils.textScale(context), - decoration: BoxDecoration( - gradient: LinearGradient( - colors: linearColor, - begin: Alignment.topLeft, - end: Alignment.bottomRight, - ), - borderRadius: BorderRadius.circular(8), - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, - spreadRadius: 0, - ), - ], + + Widget widget = Container( + margin: EdgeInsets.fromLTRB(padding.w, 16.h, padding.w, 8.h), + width: MediaQuery.of(context).size.width - 32.w, + height: (MediaQuery.of(context).size.width - 32.w) / + 1.78 * + AppUtils.textScale(context), + decoration: BoxDecoration( + gradient: LinearGradient( + colors: linearColor, + begin: Alignment.topLeft, + end: Alignment.bottomRight, + ), + borderRadius: BorderRadius.circular(8), + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, ), - child: Column( + ], + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - height: 86.w, - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - padding: EdgeInsets.fromLTRB(9.w, 4.h, 8.w, 4.h), - decoration: BoxDecoration( - color: levelColor, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(8), - bottomRight: Radius.circular(8), - ), - ), - child: Text( - topLeft, - style: TextStyle( - fontSize: 12.sp, - fontWeight: FontWeight.bold, - color: Colors.white, - ), - ), + Container( + height: 86.w, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + padding: EdgeInsets.fromLTRB(9.w, 4.h, 8.w, 4.h), + decoration: BoxDecoration( + color: levelColor, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(8), + bottomRight: Radius.circular(8), ), - Container( - margin: EdgeInsets.only(left: 13.w), - child: Text( - levelText, - style: TextStyle( - color: textColor, - fontWeight: FontWeight.bold, - fontSize: 23.sp, - ), - ), + ), + child: Text( + topLeft, + style: TextStyle( + fontSize: 12.sp, + fontWeight: FontWeight.bold, + color: Colors.white, ), - ], + ), ), - ), - Container( - margin: EdgeInsets.only(right: 11.w, bottom: 9.h), - child: Image.asset( - "assets/image/icon_mine_huixiang_logo.png", - width: 86.w, - height: 86.w, - fit: BoxFit.contain, + Container( + margin: EdgeInsets.only(left: 13.w), + child: Text( + levelText, + style: TextStyle( + color: textColor, + fontWeight: FontWeight.bold, + fontSize: 23.sp, + ), + ), ), - ), - ], + ], + ), ), - Expanded( - child: Container( - margin: EdgeInsets.only( - left: 13.w, - right: 12.w, - bottom: 12.h, - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, + Container( + margin: EdgeInsets.only(right: 11.w, bottom: 9.h), + child: Image.asset( + "assets/image/icon_mine_huixiang_logo.png", + width: 86.w, + height: 86.w, + fit: BoxFit.contain, + ), + ), + ], + ), + Expanded( + child: Container( + margin: EdgeInsets.only( + left: 13.w, + right: 12.w, + bottom: 12.h, + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.baseline, + textBaseline: TextBaseline.alphabetic, children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.baseline, - textBaseline: TextBaseline.alphabetic, - children: [ - Expanded( - child: Text( - rank > rankMax - ? S.of(context).dangqiandengji - : "${S.of(context).jifen_(rankMax - rank)} ${S.of(context).daoxiayidengji}", - overflow: TextOverflow.ellipsis, + Expanded( + child: Text( + rank > rankMax + ? S.of(context).dangqiandengji + : "${S.of(context).jifen_(rankMax - rank)} ${S.of(context).daoxiayidengji}", + overflow: TextOverflow.ellipsis, + style: TextStyle( + color: textColor, + fontWeight: FontWeight.w400, + fontSize: 14.sp, + ), + ), + flex: 1, + ), + Text.rich( + TextSpan( + children: [ + TextSpan( + text: "$rank", style: TextStyle( + fontSize: 26.sp, + fontWeight: FontWeight.bold, color: textColor, - fontWeight: FontWeight.w400, - fontSize: 14.sp, ), ), - flex: 1, - ), - Text.rich( - TextSpan( - children: [ - TextSpan( - text: "$rank", - style: TextStyle( - fontSize: 26.sp, - fontWeight: FontWeight.bold, - color: textColor, - ), + if (rank <= rankMax) + TextSpan( + text: rankMax > 0 ? "/$rankMax" : "/0", + style: TextStyle( + fontSize: 14.sp, + fontWeight: FontWeight.w400, + color: textColor, ), - if (rank <= rankMax) - TextSpan( - text: rankMax > 0 ? "/$rankMax" : "/0", - style: TextStyle( - fontSize: 14.sp, - fontWeight: FontWeight.w400, - color: textColor, - ), - ), - ], - ), - ), - ], + ), + ], + ), ), - Container( - height: 8.h, - child: ClipRRect( - borderRadius: BorderRadius.circular(6.5), - child: LinearProgressIndicator( - value: rankMax > 0 ? rank / rankMax : 0, - backgroundColor: Colors.white, - color: levelColor, - ), + ], + ), + Container( + height: 8.h, + child: ClipRRect( + borderRadius: BorderRadius.circular(6.5), + child: LinearProgressIndicator( + value: rankMax > 0 ? rank / rankMax : 0, + backgroundColor: Colors.white, + color: levelColor, + ), + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + S.of(context).kaitongriqi( + (createTime != null && createTime != "") + ? createTime.split(" ")[0] + : "$createTime"), + style: TextStyle( + color: textColor, + fontWeight: FontWeight.w400, + fontSize: 12.sp, ), ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - S.of(context).kaitongriqi( - (createTime != null && createTime != "") - ? createTime.split(" ")[0] - : "$createTime"), - style: TextStyle( - color: textColor, - fontWeight: FontWeight.w400, - fontSize: 12.sp, - ), - ), - Icon( - Icons.qr_code, - size: 24, - color: Colors.white, - ), - ], + Icon( + Icons.qr_code, + size: 24, + color: Colors.white, ), ], ), - ), - flex: 1, + ], ), - ], + ), + flex: 1, ), - ), + ], ), ); + + return GestureDetector( + onTap: () { + if (userInfo != null) { + SharedPreferences.getInstance().then((value) { + if (value.getString("token") == null || + value.getString("token") == "") { + LoginTipsDialog().show(context); + return; + } + Navigator.of(context) + .pushNamed('/router/mine_vip_level_page', arguments: { + "rankLevel": curLevel, + "createTime": (userInfo != null) ? "${userInfo.createTime}" : "", + "points": (userInfo != null) ? int.tryParse(userInfo.points) : 0, + }); + }); + } + }, + child: (tag == null || tag == "") + ? widget + : Hero(tag: tag, child: widget), + ); } }