FordevelopersofuniCloud,theirbackgroundmanagementsystemshouldusethisframework.
uni-adminhascodegenerationtoolsforpresetfunctions,pluginecologyanddatatablemanagement.
Withthiscombination,thedevelopmentofthemanagementsystemhasbecomeunprecedentedlysimple,efficientandlow-cost.
uni-adminsupportsbothPCandmobile.Thebasemoduleisavailableinfullend,butnotethatsomepluginsarenotfullend.
ThePCsideisasshownbelow:
Themobileterminalisasfollows:
uni-adminisacompleteopensourceuni-appproject,anyengineerfamiliarwithuni-appcandevelopextendedfunctionsbythemselves.
Whenyouneedtouseuni-adminfordevelopment,youneedtousemanualdeploymenttoimportthesourcecodeintoHBXfordevelopment.
Afterthecreationiscomplete,youcanfollowthecloudservicespaceinitializationwizardtoinitializetheproject,createandbindthecloudservicespace
Notice:
Note:Afterregistration,itisrecommendedtoremovethislinkfromtheloginpage
Afterloggingin,wewillseethefollowingform,whichisdividedintothreeparts,topWindowtopwindow(navigationbar),leftwindowleftwindow(menubar),andthecontentmainformontheright
Bydefault,thetopwindowdisplaysthesystemlogoontheleftandthenavigationlinksontheright.Theeffectisasshownabove.Thedisplaycontentcanbeconfiguredthroughtheadmin.config.jsfileintheprojectrootdirectory.Thefollowingisanexample:
Menudataisstoredintheopendb-admin-menustableintheclouddatabase.Thetablefieldsaredescribedasfollows:
Menutablefieldexplanation:
Addmenurecordsneedattention:
Menuitemsaredividedintodirectorymenuandpagemenu.
Whenadjustingthemenucolor,justsetthemenubackgroundcolor$menu-bg-colorandmatchthetextforegroundcolorbyyourself
Ifyouwanttotransferthepagedevelopedbyyourselftothehomepageafterlogin,youcanadjustitinpage.json.
Overallinterfacelayout
Theinformationonthispagewillbeusedinassociationwiththeappreleaseandappupgrademodules,pleasefillincarefully
Informationdescription
Tips
Sinceuni-admin1.9.3+versions,uni-portalisbuiltintotheuni-adminprojectasabuilt-inpluginofuni-admin.
Theuni-adminadministratorcanquicklygenerateanapplicationreleasepageafterfillingintheapplicationinformation(suchasapkdownloadaddress,appletQRcode)inthe"ApplicationManagement"module.
Sinceuni-admin1.9.3+versions,uni-upgrade-centerisbuiltintotheuni-adminprojectasabuilt-inpluginofuni-admin.
Aftertheuni-adminadministratorfillsintheapplicationinformation(suchasapkdownloadaddress,appletQRcode)inthe"ApplicationManagement"module,hecanentertheupgradecenterthroughthecolumnoperationforversionmanagement.
uniStatistics2.0isanopensource,full-end,cloud-integratedstatisticalplatformthatismoresuitableforuni-app.stat-v2.html)
1.Fullend
Full-endtrafficstatistics,onereportcanviewtheoperationdataofalldevices(iOS,Android,Webandvariousminiprograms).
ThereisnoneedtoconnectdifferentSDKsateachend,andthereisnoneedtoviewdataindifferentreports.Atpresent,thereisonlyonesolutionknowninthemarketthatcanseethebusinesspanoramainonereport.
2.Opensource,free,freetocustomize
RegardlessoftheSDKthatcollectsdatainthefront-end,thecloudfunctionthatreceivesdatainthecloud,thecloudfunctionthatrunsbatchstatisticsinthecloud,andthereportthatdisplaysthestatisticalresults,allthesecodesareallopensource.
Front-endcustommanagement,back-endcustomstatisticaldimensions,freecustomreports,everythingcanbeflexiblycustomized.
3.Privatedeployment,dataautomaticcontrol
Usingtraditionalsaasstatisticalproducts,alldataarereportedtostatisticalserviceproviders.
uniStatistics2.0isimplementedbasedonuniCloud,cloudfunctionsandstatisticaldataareallhostedinthedeveloper'sownservicespace(AlibabaCloudorTencentCloudoptional),anddevelopershavecompletecontrolovertheirownstatisticaldata.
4.Thedefaultfunctionisrich
5.EffectiveErrorAnalysis
Traditionalstatisticalplatformsdonothavejserrorstatistics.Developerscannotknowonwhichdevicestheirjscodewillreporterrors.
Theerrorinformationofunistatisticsismorecomprehensive,includingjsfront-enderrorsandappnativelayercrashes.Helpdevelopersmakeapplicationsbetter.
6.Moresuitableforuni-appanduniCloud
unistatisticsgoesdeepintothebottomlayerofuni-appanduniCloudframework,andprovidesmanyfunctionsthatotherstatisticsplatformscannotprovide:
7.OpenEcosystem
Iftherearescenariossuchascustomercare,membershipservices,e-commerceactivities,andnewproductlaunchesthatneedtosendtextmessagestousers,thereisnoneedfordevelopment.Youcanselectusers/tagsintheuni-adminconsoletosendtextmessagestousersingroups,savingtimeandefficiency.Atthesametime,itsupportsdynamicreplacementofSMStemplatevariablestomakeSMSmorepersonalized.
Step1:ActivateSMSservice
Step2:Addsignatureandtemplate
Forexample:[TEST]Dear${username},happybirthdaytoyou!Thankyouforyourlong-termtrustandsupporttoxxmall.Memberscanenjoydoubleshoppingpointsontheirbirthdaymonth.Welookforwardtoyourvisit!
Step3:ExportSMSTemplate
Step4:SendSMSviauni-adminconsole
Forfirstuse,configureSMSAPIkeyinuni-config-center/uni-sms-co/config.json
Atpresent,SMSsupportsfixedtextsendingandassociateddatatablefieldsending.Thefollowingdescribeshowtosendintwoways
fixedtextsending
Usedatatablefieldstosendastemplatevariables
SMSvariablessupporttwomethodsoffixedvalueanddatatablequery;fixedvaluesuchas:colleagues,datatablequerysuchas:{uni-id-users.username};pleasenotethatifyouusethedatatablequerymethod,currentlyonlysupportsqueryuni-id-userstable;andpayattentiontoensurethatthevalueofthequeryfieldinthedatabaseisnotempty,otherwisetheSMSwillfailtobesent.
Itshouldbenotedthatthedynamicmenuoftheadminframeworkalsoreliesontheuni-idpermissiontable(uni-id-permissions).
Themenutable(opendb-admin-menus)isdefinedasfollows:
adminprovidestwobuilt-inmethodstofacilitatetheauthenticationofloginuserpermissionsandrolesinthepage:
Theadminframeworkhasabuilt-insetoficonicons.IntheStaticFunctionDemonstration-Iconmenu,clicktheicontocopytheclassdefinitionoftheicon.
Withthestyleselected,enterthestylenameintheformontheNewMenupage.Menuitemswithoutstyleswillhavenoicons.
Ofcourse,youcanalsouseathird-partyiconlibrary.TaketheiconusingelementUIasanexample,importthestylefileoftheiconlibraryinapp.vue:
Toaddnewpages,youcandevelopyourownpages,oryoucandownloadplug-insfromtheplug-inmarket.Ifyouneedtoaddamenutothepage,see[Menumanagement]above(#%E9%9D%99%E6%80%81%E8%8F%9C%E5%8D%95%E5%92%8C%E5%8A%A8%E6%80%81%E8%8F%9C%E5%8D%95).
Thedevelopmentpageisnotlimitedtothedevelopmentmethod:
Note:Whenusinguni-cloud-router,thefoldersandfilesunderthecontrollershouldnotbenamedthesame.Forexample,thewritingofapp/roomcannottellwhetherappisthefileapp.jsorthefolderapp`
Thedevelopmentpageinadministhesameastheuni-appdevelopmentvuepage.
Stepsforusage:
----------------------------------Dividingline----------------------------------------
Wearenotonlyusersofplugins,butalsodevelopersofplugins,sohowtodevelopauni-adminplugin
Fortheadminplug-in,thefunctioncanbedevelopedintheproject,andthenthisfunctioncanbestrippedintoaplug-in.Theprocessofotherdevelopersusingthepluginistorestoretheplugintoafunctionintheproject.
Theadminpluginincludescloudfunctionsandfront-endpages.Itmustbebasedontheuni-idaccountandpermissionsystem.Itdoesnotlimitthedevelopmentmethodofcloudfunctions.Youcanwriteordinarycloudfunctionsyourself,useanysingle-routecloudfunctionframework,oruseclientDB..
Theadminplugincannotbeanoverallprojectandcannotcontainamanifest.Itismoresimilartoapagetemplate.
Directorystructureofthe_adminplugin:_
Thisfileisusedforthedynamicmenuontheleftsideofthepluginregistrationuni-admin.
pluginIdisthepluginidyoufilledinwhenuploadingthepluginmarketplace(eachplugininthepluginmarketplacehasauniqueid).
Ifyourpluginidis"xxx-yyy",thenplacexxx-yyy-menu.jsonintherootdirectoryoftheplugin,andconfigurethecontentinthefollowingformat.(pluginIdisnotrequiredunderuni_module,itisdirectlymenu.json)
[{"menu_id":"xxx-yyy","name":"显示名称","icon":"","url":"/pages/system/permission/list","sort":1,"parent_id":"system_management","permission":[]}]Intheaboveexample:
Aftertheplugincontaining%pluginId%-menu.jsonisimportedintotheproject,rununi-admin,themenumanagementmodulewillautomaticallyreadthemenuconfigurationinthisjsonfile,generate[tobeaddedmenu],configurationandadmin[managedynamicmenu]Thesameistrue.Theplug-inauthorcanvisuallyclickontheinterfacetoconfirmtheaddition,andthenthemenucanbeaddedtohisproject.
Althoughmenuinitializationcanalsobedoneviadb_init.json,thisisnotrecommended.Itiseasytoconflictwiththeuser'sdatabase.The%pluginId%-menu.jsonmethodisstillrecommended.
Aboutuni-adminanduni-cloud-routerpublicmodulesuni-admincomeswithasingleroutingframework,uni-cloud-router,andthencomeswithauni-admincloudfunctionthatusesthisuni-cloud-router.Butthepluginauthor'splugincannotbewrittenintheuni-admindirectory.Thecloudfunctionoftheplug-inmustbeprefixedwiththeplug-inid.Ifyouwanttocombineallthecloudfunctionsofyourplug-inintoonecloudfunction,youcancreateanewcloudfunctionofyourown,andreferencetheuni-cloud-routerpublicmoduleinit.
Useschema2codetogenerateadminpage
Mostoftheformpagesoftheadminplug-incanbeautomaticallygeneratedbytheschema2codetoolthatcomeswithuniCloud,whichcandirectlygenerateacompletepageofdatabaseadditions,deletions,changes,andinquiries.Somakingaplugininuni-adminisverysimple.
Topreventfileconflictswithuserprojects,theplugin'spageshouldhavetheplugin'sprefix,suchaspages/xxx-page.Thebuilt-indatabaseschemafileisalsorecommendedtobeprefixed.
Howtouploadpluginmarketafterplugindevelopment
uni-adminsupportsallthree-partyVueUIlibraries,includingnon-uni-appUIlibrariessuchaselementUI,butnotethattheseforh5uilibrariescanonlybeusedinbrowsersandcannotbeadaptedtoappsandapplets,asfollows.