VS2019使用Intel 2019出现Element <LanguageStandard> has an invalid value of "Default". 问题

本文详细介绍了在Visual Studio 2017中使用Intel C++ Compiler时遇到的问题及解决方法,主要关注如何正确设置C++ LanguageStandard属性避免编译错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题:

Element <LanguageStandard> has an invalid value of "Default".

Invalid parameters passed to the Intel.Build.ICLTasks.ICL task.

 

解决方案:

Configuration Properties ==> C/C++ ==> Language ==> C++ LanguageStandard属性设置为ISO C++ Latest Draft Standard(/std:c++latest)



首先,关于VS使用intelC++Compiler请参考【在VisualStudio2017使用IntelC++Compiler2018https://blog.youkuaiyun.com/Owen_Suen/article/details/82988857

 

 

创建C++控制台项目

 

此时,默认使用的是VC++Compiler,要使用IntelC++Compeler需要进行设置,项目右键==>Intel Compiler==>Use Intel C++

 

本以为这样就OK了,但出现问题了

报错:

Element <LanguageStandard> has an invalid value of "Default".

Invalid parameters passed to the Intel.Build.ICLTasks.ICL task.

双击定位到该文件

 

根据报错信息,可以知道问题应该出现在了LanguageStandard上

我认为应该是环境命令参数错误

进入属性设置查找LanguageStandard相关的参数选项,终于,在

Configuration Properties ==> C/C++ ==> Language

中找到了C++ LanguageStandard属性设置

 

修改属性值

我选择的最新标准

运行成功

 

 

================  DONE  ===============

<?xml version="1.0" encoding="utf-8"?> <Language Name="English"> <LocaleResource Name="AboutUs"> <Value>About us</Value> </LocaleResource> <LocaleResource Name="Account.AccountActivation"> <Value>Account activation</Value> </LocaleResource> <LocaleResource Name="Account.AccountActivation.Activated"> <Value>Your account has been activated</Value> </LocaleResource> <LocaleResource Name="Account.AccountActivation.InvalidEmailOrToken"> <Value>Unknown email or token. Please register again.</Value> </LocaleResource> <LocaleResource Name="Account.Administration"> <Value>Admin</Value> </LocaleResource> <LocaleResource Name="Account.AssociatedExternalAuth"> <Value>External authentication</Value> </LocaleResource> <LocaleResource Name="Account.AssociatedExternalAuth.AuthMethodName"> <Value>Authentication method</Value> </LocaleResource> <LocaleResource Name="Account.AssociatedExternalAuth.Email"> <Value>Email</Value> </LocaleResource> <LocaleResource Name="Account.AssociatedExternalAuth.ExternalIdentifier"> <Value>External identifier</Value> </LocaleResource> <LocaleResource Name="Account.AssociatedExternalAuth.YourAccountWillBeLinkedTo"> <Value>Account Association: Your new user account will be linked to</Value> </LocaleResource> <LocaleResource Name="Account.Avatar"> <Value>Avatar</Value> </LocaleResource> <LocaleResource Name="Account.Avatar.MaximumUploadedFileSize"> <Value>Maximum avatar size is {0}</Value> </LocaleResource> <LocaleResource Name="Account.Avatar.RemoveAvatar"> <Value>Remove avatar</Value> </LocaleResource> <LocaleResource Name="Account.Avatar.UploadRules"> <Value>Avatar must be in GIF, PNG or JPG format with the maximum size of {0}</Value> </LocaleResource> <LocaleResource Name="Account.BackInStockSubscriptions"> <Value>Back in stock subscriptions</Value> </LocaleResource> <LocaleResource Name="Account.BackInStockSubscriptions.DeleteSelected"> <Value>Delete selected</Value> </LocaleResource> <LocaleResource Name="Account.BackInStockSubscriptions.Description"> <Value>You will receive an e-mail when a particular product is back in stock.</Value> </LocaleResource> <LocaleResource Name="Account.BackInStockSubscriptions.NoSubscriptions"> <Value>You are not currently subscribed to any Back In Stock notification lists</Value> </LocaleResource> <LocaleResource Name="Account.BackInStockSubscriptions.ProductColumn"> <Value>Product</Value> </LocaleResource> <LocaleResource Name="Account.ChangePassword"> <Value>Change password</Value> </LocaleResource> <LocaleResource Name="Account.ChangePassword.Button"> <Value>Change password</Value> </LocaleResource> <LocaleResource Name="Account.ChangePassword.Fields.ConfirmNewPassword"> <Value>Confirm password</Value> </LocaleResource> <LocaleResource Name="Account.ChangePassword.Fields.NewPassword"> <Value>New password</Value> </LocaleResource> <LocaleResource Name="Account.ChangePassword.Fields.OldPassword"> <Value>Old password</Value> </LocaleResource> <LocaleResource Name="Account.ChangePassword.Success"> <Value>Password was changed</Value> </LocaleResource> <LocaleResource Name="Account.CheckUsernameAvailability.Available"> <Value>Username available</Value> </LocaleResource> <LocaleResource Name="Account.CheckUsernameAvailability.Button"> <Value>Check Availability</Value> </LocaleResource> <LocaleResource Name="Account.CheckUsernameAvailability.CurrentUsername"> <Value>Current username</Value> </LocaleResource> <LocaleResource Name="Account.CheckUsernameAvailability.NotAvailable"> <Value>Username not available</Value> </LocaleResource> <LocaleResource Name="Account.CompanyDetails"> <Value>Company Details</Value> </LocaleResource> <LocaleResource Name="Account.CreateAccount"> <Value>Create account</Value> </LocaleResource> <LocaleResource Name="Account.CustomerAddresses"> <Value>Addresses</Value> </LocaleResource> <LocaleResource Name="Account.CustomerAddresses.AddNew"> <Value>Add new address</Value> </LocaleResource> <LocaleResource Name="Account.CustomerAddresses.Edit"> <Value>Edit address</Value> </LocaleResource> <LocaleResource Name="Account.CustomerAddresses.NoAddresses"> <Value>No addresses</Value> </LocaleResource> <LocaleResource Name="Account.CustomerInfo"> <Value>Customer info</Value> </LocaleResource> <LocaleResource Name="Account.CustomerOrders"> <Value>Orders</Value> </LocaleResource> <LocaleResource Name="Account.CustomerOrders.NoOrders"> <Value>No orders</Value> </LocaleResource> <LocaleResource Name="Account.CustomerOrders.NotYourOrder"> <Value>This is not your order.</Value> </LocaleResource> <LocaleResource Name="Account.CustomerOrders.OrderDate"> <Value>Order Date</Value> </LocaleResource> <LocaleResource Name="Account.CustomerOrders.OrderDetails"> <Value>Details</Value> </LocaleResource> <LocaleResource Name="Account.CustomerOrders.OrderNumber"> <Value>Order Number</Value> </LocaleResource> <LocaleResource Name="Account.CustomerOrders.OrderStatus"> <Value>Order status</Value> </LocaleResource> <LocaleResource Name="Account.CustomerOrders.OrderTotal"> <Value>Order Total</Value> </LocaleResource> <LocaleResource Name="Account.CustomerOrders.RecurringOrders"> <Value>Repeat deliveries</Value> </LocaleResource> <LocaleResource Name="Account.CustomerOrders.RecurringOrders.Cancel"> <Value>Cancel repeat delivery</Value> </LocaleResource> <LocaleResource Name="Account.CustomerOrders.RecurringOrders.CancelDelivery"> <Value>Would you like to cancel the repeat delivery?</Value> </LocaleResource> <LocaleResource Name="Account.CustomerOrders.RecurringOrders.CycleInfo"> <Value>Interval</Value> </LocaleResource> <LocaleResource Name="Account.CustomerOrders.RecurringOrders.CyclesRemaining"> <Value>Remaining</Value> </LocaleResource> <LocaleResource Name="Account.CustomerOrders.RecurringOrders.NextPayment"> <Value>Next payment</Value> </LocaleResource> <LocaleResource Name="Account.CustomerOrders.RecurringOrders.StartDate"> <Value>Start date</Value> </LocaleResource> <LocaleResource Name="Account.CustomerOrders.RecurringOrders.SuccessfullyCanceled"> <Value>The repeat delivery was successfully canceled.</Value> </LocaleResource> <LocaleResource Name="Account.CustomerOrders.RecurringOrders.TotalCycles"> <Value>Total deliveries</Value> </LocaleResource> <LocaleResource Name="Account.CustomerOrders.ReturnItems"> <Value>Return Item(s)</Value> </LocaleResource> <LocaleResource Name="Account.CustomerReturnRequests"> <Value>Return requests</Value> </LocaleResource> <LocaleResource Name="Account.CustomerReturnRequests.Action"> <Value>Return action</Value> </LocaleResource> <LocaleResource Name="Account.CustomerReturnRequests.Comments"> <Value>Your Comments:</Value> </LocaleResource> <LocaleResource Name="Account.CustomerReturnRequests.Date"> <Value>Date Requested</Value> </LocaleResource> <LocaleResource Name="Account.CustomerReturnRequests.Item"> <Value>Item</Value> </LocaleResource> <LocaleResource Name="Account.CustomerReturnRequests.Reason"> <Value>Return reason</Value> </LocaleResource> <LocaleResource Name="Account.CustomerReturnRequests.Title"> <Value>Return #{0} - {1}</Value> </LocaleResource> <LocaleResource Name="Account.CustomerSince"> <Value>Customer since {0}</Value> </LocaleResource> <LocaleResource Name="Account.DownloadableProducts"> <Value>Downloadable products</Value> </LocaleResource> <LocaleResource Name="Account.EmailUsernameErrors.EmailTooLong"> <Value>E-mail address is too long</Value> </LocaleResource> <LocaleResource Name="Account.EmailUsernameErrors.NewEmailIsNotValid"> <Value>New email is not valid</Value> </LocaleResource> <LocaleResource Name="Account.EmailUsernameErrors.UsernameTooLong"> <Value>Username is too long</Value> </LocaleResource> <LocaleResource Name="Account.Fields.City"> <Value>City</Value> </LocaleResource> <LocaleResource Name="Account.Fields.Company"> <Value>Company name</Value> </LocaleResource> <LocaleResource Name="Account.Fields.ConfirmPassword"> <Value>Confirm password</Value> </LocaleResource> <LocaleResource Name="Account.Fields.ConfirmPassword.Required"> <Value>Password is required.</Value> </LocaleResource> <LocaleResource Name="Account.Fields.Country"> <Value>Country</Value> </LocaleResource> <LocaleResource Name="Account.Fields.CustomerNumber"> <Value>Customer number</Value> </LocaleResource> <LocaleResource Name="Account.Fields.DateOfBirth"> <Value>Date of birth</Value> </LocaleResource> <LocaleResource Name="Account.Fields.Email"> <Value>Email</Value> </LocaleResource> <LocaleResource Name="Account.Fields.Fax"> <Value>Fax</Value> </LocaleResource> <LocaleResource Name="Account.Fields.FirstName"> <Value>First name</Value> </LocaleResource> <LocaleResource Name="Account.Fields.FullName"> <Value>Name</Value> </LocaleResource> <LocaleResource Name="Account.Fields.Gender"> <Value>Gender</Value> </LocaleResource> <LocaleResource Name="Account.Fields.Gender.Female"> <Value>Female</Value> </LocaleResource> <LocaleResource Name="Account.Fields.Gender.Male"> <Value>Male</Value> </LocaleResource> <LocaleResource Name="Account.Fields.LastName"> <Value>Last name</Value> </LocaleResource> <LocaleResource Name="Account.Fields.Newsletter"> <Value>I would like to subscribe to the newsletter. I agree to the <a href="{0}">Privacy policy</a>. Unsubscription is possible at any time.</Value> </LocaleResource> <LocaleResource Name="Account.Fields.Password"> <Value>Password</Value> </LocaleResource> <LocaleResource Name="Account.Fields.Password.LengthValidation"> <Value>The password should have at least {0} characters.</Value> </LocaleResource> <LocaleResource Name="Account.Fields.PasswordSecurity"> <Value>Password security</Value> </LocaleResource> <LocaleResource Name="Account.Fields.Phone"> <Value>Phone</Value> </LocaleResource> <LocaleResource Name="Account.Fields.PreferredPaymentMethod"> <Value>Preferred payment method</Value> </LocaleResource> <LocaleResource Name="Account.Fields.PreferredShippingMethod"> <Value>Preferred shipping method</Value> </LocaleResource> <LocaleResource Name="Account.Fields.Signature"> <Value>Signature</Value> </LocaleResource> <LocaleResource Name="Account.Fields.StateProvince"> <Value>State / province</Value> </LocaleResource> <LocaleResource Name="Account.Fields.StreetAddress"> <Value>Street address</Value> </LocaleResource> <LocaleResource Name="Account.Fields.StreetAddress2"> <Value>Street address 2</Value> </LocaleResource> <LocaleResource Name="Account.Fields.Timezone"> <Value>Time zone</Value> </LocaleResource> <LocaleResource Name="Account.Fields.Title"> <Value>Title</Value> </LocaleResource> <LocaleResource Name="Account.Fields.Username"> <Value>Username</Value> </LocaleResource> <LocaleResource Name="Account.Fields.VatNumber"> <Value>VAT number</Value> </LocaleResource> <LocaleResource Name="Account.Fields.VatNumber.Note"> <Value>NOTE: Enter VAT number with country code (e.g. GB 111 111 11)</Value> </LocaleResource> <LocaleResource Name="Account.Fields.VatNumber.Status"> <Value>Status</Value> </LocaleResource> <LocaleResource Name="Account.Fields.VatNumberStatus"> <Value>status: {0}</Value> </LocaleResource> <LocaleResource Name="Account.Fields.ZipPostalCode"> <Value>Zip code</Value> </LocaleResource> <LocaleResource Name="Account.ForumSubscriptions"> <Value>Forum subscriptions</Value> </LocaleResource> <LocaleResource Name="Account.ForumSubscriptions.DeleteSelected"> <Value>Delete Selected</Value> </LocaleResource> <LocaleResource Name="Account.ForumSubscriptions.Description"> <Value>You will receive an e-mail when a new forum topic/post is created.</Value> </LocaleResource> <LocaleResource Name="Account.ForumSubscriptions.InfoColumn"> <Value>Forum/Topic</Value> </LocaleResource> <LocaleResource Name="Account.ForumSubscriptions.NoSubscriptions"> <Value>You are not currently subscribed to any forums</Value> </LocaleResource> <LocaleResource Name="Account.ImpersonatedAs"> <Value>Impersonated as {0}</Value> </LocaleResource> <LocaleResource Name="Account.ImpersonatedAs.Finish"> <Value>finish impersonated session</Value> </LocaleResource> <LocaleResource Name="Account.ImpersonatedAs.Finish.Hint"> <Value>Click here to finish impersonated session</Value> </LocaleResource> <LocaleResource Name="Account.Login"> <Value>Log in</Value> </LocaleResource> <LocaleResource Name="Account.Login.CheckEmailAccount"> <Value>The credentials provided are incorrect or you have not activated your account yet. Please check your email inbox and confirm the registration.</Value> </LocaleResource> <LocaleResource Name="Account.Login.CheckoutAsGuest"> <Value>Checkout as Guest</Value> </LocaleResource> <LocaleResource Name="Account.Login.CheckoutAsGuestOrRegister"> <Value>Checkout as a guest or register</Value> </LocaleResource> <LocaleResource Name="Account.Login.Fields.Email"> <Value>Email</Value> </LocaleResource> <LocaleResource Name="Account.Login.Fields.Password"> <Value>Password</Value> </LocaleResource> <LocaleResource Name="Account.Login.Fields.RememberMe"> <Value>Remember me?</Value> </LocaleResource> <LocaleResource Name="Account.Login.Fields.UserName"> <Value>Username</Value> </LocaleResource> <LocaleResource Name="Account.Login.Fields.UsernameOrEmail"> <Value>Username or email</Value> </LocaleResource> <LocaleResource Name="Account.Login.ForgotPassword"> <Value>Forgot password?</Value> </LocaleResource> <LocaleResource Name="Account.Login.LoginButton"> <Value>Log in</Value> </LocaleResource> <LocaleResource Name="Account.Login.NewCustomer"> <Value>New Customer</Value> </LocaleResource> <LocaleResource Name="account.login.newcustomertext"> <Value>As a registered customer you will be able to shop faster, be up to date on an orders status, and keep track of the orders you have previously made.</Value> </LocaleResource> <LocaleResource Name="Account.Login.NotRegisteredYet"> <Value>Not registered yet?</Value> </LocaleResource> <LocaleResource Name="Account.Login.ReturningCustomer"> <Value>I am already registered</Value> </LocaleResource> <LocaleResource Name="Account.Login.Unsuccessful"> <Value>Login was unsuccessful. Please correct the errors and try again.</Value> </LocaleResource> <LocaleResource Name="Account.Login.Welcome"> <Value>Sign In</Value> </LocaleResource> <LocaleResource Name="Account.Login.WrongCredentials"> <Value>The credentials provided are incorrect</Value> </LocaleResource> <LocaleResource Name="Account.Logout"> <Value>Log out</Value> </LocaleResource> <LocaleResource Name="Account.MyAccount"> <Value>My account</Value> </LocaleResource> <LocaleResource Name="Account.MyOrders"> <Value>My orders</Value> </LocaleResource> <LocaleResource Name="Account.Options"> <Value>Options</Value> </LocaleResource> <LocaleResource Name="Account.PasswordRecovery"> <Value>Reset password</Value> </LocaleResource> <LocaleResource Name="Account.PasswordRecovery.ChangePasswordButton"> <Value>Recover</Value> </LocaleResource> <LocaleResource Name="Account.PasswordRecovery.ConfirmNewPassword"> <Value>Confirm password</Value> </LocaleResource> <LocaleResource Name="Account.PasswordRecovery.Email"> <Value>Your email address</Value> </LocaleResource> <LocaleResource Name="Account.PasswordRecovery.EmailHasBeenSent"> <Value>We have sent you an email with further instructions if an account exists with your email address.</Value> </LocaleResource> <LocaleResource Name="Account.PasswordRecovery.NewPassword"> <Value>New password</Value> </LocaleResource> <LocaleResource Name="Account.PasswordRecovery.OldPassword"> <Value>Old password</Value> </LocaleResource> <LocaleResource Name="Account.PasswordRecovery.OldPassword.Required"> <Value>Old password is required.</Value> </LocaleResource> <LocaleResource Name="Account.PasswordRecovery.PasswordHasBeenChanged"> <Value>Your password has been changed</Value> </LocaleResource> <LocaleResource Name="Account.PasswordRecovery.RecoverButton"> <Value>Recover</Value> </LocaleResource> <LocaleResource Name="Account.PasswordRecovery.Tooltip"> <Value>Please enter your email address below. You will receive a link to reset your password.</Value> </LocaleResource> <LocaleResource Name="Account.PasswordRecoveryConfirm.InvalidEmailOrToken"> <Value>Unknown email or token. Please click "Forgot password" again, if you want to renew your password.</Value> </LocaleResource> <LocaleResource Name="Account.Preferences"> <Value>Preferences</Value> </LocaleResource> <LocaleResource Name="Account.Register"> <Value>Register</Value> </LocaleResource> <LocaleResource Name="Account.Register.Button"> <Value>Register</Value> </LocaleResource> <LocaleResource Name="Account.Register.Errors.AlreadyRegistered"> <Value>The customer is already registered.</Value> </LocaleResource> <LocaleResource Name="Account.Register.Errors.CannotRegisterSearchEngine"> <Value>A search engine can't be registered.</Value> </LocaleResource> <LocaleResource Name="Account.Register.Errors.CannotRegisterTaskAccount"> <Value>A background task account can't be registered.</Value> </LocaleResource> <LocaleResource Name="Account.Register.Errors.EmailIsNotProvided"> <Value>Email is not provided</Value> </LocaleResource> <LocaleResource Name="Account.Register.Errors.PasswordIsNotProvided"> <Value>Password is not provided</Value> </LocaleResource> <LocaleResource Name="Account.Register.Errors.UsernameIsNotProvided"> <Value>Username is not provided</Value> </LocaleResource> <LocaleResource Name="Account.Register.Result.AdminApproval"> <Value>Your account will be activated after approving by administrator.</Value> </LocaleResource> <LocaleResource Name="Account.Register.Result.AlreadyRegistered"> <Value>You are already registered.</Value> </LocaleResource> <LocaleResource Name="Account.Register.Result.Continue"> <Value>Continue</Value> </LocaleResource> <LocaleResource Name="Account.Register.Result.Disabled"> <Value>Registration is not allowed at the moment.</Value> </LocaleResource> <LocaleResource Name="Account.Register.Result.EmailValidation"> <Value>Your registration has been successfully completed. You have just been sent an email containing membership activation instructions.</Value> </LocaleResource> <LocaleResource Name="Account.Register.Result.Standard"> <Value>Your registration completed</Value> </LocaleResource> <LocaleResource Name="Account.Register.Unsuccessful"> <Value>Registration was not complete. Please correct the errors and try again.</Value> </LocaleResource> <LocaleResource Name="Account.RewardPoints"> <Value>Reward points</Value> </LocaleResource> <LocaleResource Name="Account.ShoppingCart"> <Value>Shopping Cart</Value> </LocaleResource> <LocaleResource Name="Account.YourAddress"> <Value>Your Address</Value> </LocaleResource> <LocaleResource Name="Account.YourContactInformation"> <Value>Your Contact Information</Value> </LocaleResource> <LocaleResource Name="Account.YourPassword"> <Value>Your Password</Value> </LocaleResource> <LocaleResource Name="Account.YourPersonalDetails"> <Value>Your Personal Details</Value> </LocaleResource> <LocaleResource Name="ActivityLog.AddNewCategory"> <Value>Added a new category ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.AddNewCheckoutAttribute"> <Value>Added a new checkout attribute ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.AddNewCustomer"> <Value>Added a new customer (ID = {0})</Value> </LocaleResource> <LocaleResource Name="ActivityLog.AddNewCustomerRole"> <Value>Added a new customer role ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.AddNewDiscount"> <Value>Added a new discount ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.AddNewGiftCard"> <Value>Added a new gift card ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.AddNewManufacturer"> <Value>Added a new manufacturer ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.AddNewProduct"> <Value>Added a new product ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.AddNewProductAttribute"> <Value>Added a new product attribute ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.AddNewSetting"> <Value>Added a new setting ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.AddNewSpecAttribute"> <Value>Added a new specification attribute ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.AddNewWidget"> <Value>Added a new widget (ID = {0})</Value> </LocaleResource> <LocaleResource Name="ActivityLog.DeleteCategory"> <Value>Deleted a category ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.DeleteCheckoutAttribute"> <Value>Deleted a checkout attribute ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.DeleteCustomer"> <Value>Deleted a customer (ID = {0})</Value> </LocaleResource> <LocaleResource Name="ActivityLog.DeleteCustomerRole"> <Value>Deleted a customer role ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.DeleteDiscount"> <Value>Deleted a discount ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.DeleteGiftCard"> <Value>Deleted a gift card ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.DeleteManufacturer"> <Value>Deleted a manufacturer ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.DeleteOrder"> <Value>Deleted order {0}</Value> </LocaleResource> <LocaleResource Name="ActivityLog.DeleteProduct"> <Value>Deleted a product ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.DeleteProductAttribute"> <Value>Deleted a product attribute ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.DeleteReturnRequest"> <Value>Deleted a return request (ID = {0})</Value> </LocaleResource> <LocaleResource Name="ActivityLog.DeleteSetting"> <Value>Deleted a setting ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.DeleteSpecAttribute"> <Value>Deleted a specification attribute ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.DeleteWidget"> <Value>Deleted a widget (ID = {0})</Value> </LocaleResource> <LocaleResource Name="ActivityLog.EditCategory"> <Value>Edited a category ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.EditCheckoutAttribute"> <Value>Edited a checkout attribute ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.EditCustomer"> <Value>Edited a customer (ID = {0})</Value> </LocaleResource> <LocaleResource Name="ActivityLog.EditCustomerRole"> <Value>Edited a customer role ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.EditDiscount"> <Value>Edited a discount ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.EditGiftCard"> <Value>Edited a gift card ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.EditManufacturer"> <Value>Edited a manufacturer ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.EditOrder"> <Value>Edited order {0}</Value> </LocaleResource> <LocaleResource Name="ActivityLog.EditProduct"> <Value>Edited a product ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.EditProductAttribute"> <Value>Edited a product attribute ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.EditReturnRequest"> <Value>Edited a return request (ID = {0})</Value> </LocaleResource> <LocaleResource Name="ActivityLog.EditSettings"> <Value>The setting {0} has been changed. The new value is {1}.</Value> </LocaleResource> <LocaleResource Name="ActivityLog.EditSpecAttribute"> <Value>Edited a specification attribute ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.EditThemeVars"> <Value>Variablen für Theme "{0}" geändert</Value> </LocaleResource> <LocaleResource Name="ActivityLog.EditWidget"> <Value>Edited a widget (ID = {0})</Value> </LocaleResource> <LocaleResource Name="ActivityLog.ExportThemeVars"> <Value>Successfully exported theme '{0}'.</Value> </LocaleResource> <LocaleResource Name="ActivityLog.ImportThemeVars"> <Value>Imported {0} variables for theme '{1}'.</Value> </LocaleResource> <LocaleResource Name="ActivityLog.PublicStore.AddBlogComment"> <Value>Added a blog comment</Value> </LocaleResource> <LocaleResource Name="ActivityLog.PublicStore.AddNewsComment"> <Value>Added a news comment</Value> </LocaleResource> <LocaleResource Name="ActivityLog.PublicStore.AddProductReview"> <Value>Added a product review ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.PublicStore.AddToCompareList"> <Value>Added a product to compare list ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.PublicStore.AddToShoppingCart"> <Value>Added a product to shopping cart ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.PublicStore.AddToWishlist"> <Value>Added a product to wishlist ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.PublicStore.ContactUs"> <Value>Used contact us form</Value> </LocaleResource> <LocaleResource Name="ActivityLog.PublicStore.Login"> <Value>Login</Value> </LocaleResource> <LocaleResource Name="ActivityLog.PublicStore.LoginExternal"> <Value>Logged in with {0}</Value> </LocaleResource> <LocaleResource Name="ActivityLog.PublicStore.Logout"> <Value>Logout</Value> </LocaleResource> <LocaleResource Name="ActivityLog.PublicStore.PlaceOrder"> <Value>Placed a new order (ID = {0})</Value> </LocaleResource> <LocaleResource Name="ActivityLog.PublicStore.ViewCategory"> <Value>Public store. Viewed a category details page ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.PublicStore.ViewManufacturer"> <Value>Public store. Viewed a manufacturer details page ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.PublicStore.ViewProduct"> <Value>Public store. Viewed a product details page ('{0}')</Value> </LocaleResource> <LocaleResource Name="ActivityLog.ResetThemeVars"> <Value>Theme "{0}" zurückgesetzt</Value> </LocaleResource> <LocaleResource Name="AddProductToCompareList.CouldNotBeAdded"> <Value>Product could not be added.</Value> </LocaleResource> <LocaleResource Name="AddProductToCompareList.CouldNotBeRemoved"> <Value>Product could not be removed.</Value> </LocaleResource> <LocaleResource Name="AddProductToCompareList.ProductWasAdded"> <Value>The product '{0}' was added to the compare list.</Value> </LocaleResource> <LocaleResource Name="AddProductToCompareList.ProductWasDeleted"> <Value>The product '{0}' was removed from the compare list.</Value> </LocaleResource> <LocaleResource Name="Address"> <Value>Address</Value> </LocaleResource> <LocaleResource Name="Address.Fields.Address1"> <Value>Address 1</Value> </LocaleResource> <LocaleResource Name="Address.Fields.Address1.Required"> <Value>Address 1 is required.</Value> </LocaleResource> <LocaleResource Name="Address.Fields.Address2"> <Value>Address 2</Value> </LocaleResource> <LocaleResource Name="Address.Fields.Address2.Required"> <Value>Address 2 is required.</Value> </LocaleResource> <LocaleResource Name="Address.Fields.City"> <Value>City</Value> </LocaleResource> <LocaleResource Name="Address.Fields.City.Required"> <Value>City is required.</Value> </LocaleResource> <LocaleResource Name="Address.Fields.Company"> <Value>Company</Value> </LocaleResource> <LocaleResource Name="Address.Fields.Company.Required"> <Value>Company is required.</Value> </LocaleResource> <LocaleResource Name="Address.Fields.Country"> <Value>Country</Value> </LocaleResource> <LocaleResource Name="Address.Fields.Country.Required"> <Value>Country is required.</Value> </LocaleResource> <LocaleResource Name="Address.Fields.Email"> <Value>Email</Value> </LocaleResource> <LocaleResource Name="Address.Fields.EmailMatch"> <Value>Reenter email address</Value> </LocaleResource> <LocaleResource Name="Address.Fields.FaxNumber"> <Value>Fax number</Value> </LocaleResource> <LocaleResource Name="Address.Fields.FaxNumber.Required"> <Value>Fax number is required.</Value> </LocaleResource> <LocaleResource Name="Address.Fields.FirstName"> <Value>First name</Value> </LocaleResource> <LocaleResource Name="Address.Fields.IsDefaultBillingAddress"> <Value>Set as default billing address</Value> </LocaleResource> <LocaleResource Name="Address.Fields.IsDefaultShippingAddress"> <Value>Set as default shipping address</Value> </LocaleResource> <LocaleResource Name="Address.Fields.LastName"> <Value>Last name</Value> </LocaleResource> <LocaleResource Name="Address.Fields.PhoneNumber"> <Value>Phone number</Value> </LocaleResource> <LocaleResource Name="Address.Fields.PhoneNumber.Required"> <Value>Phone number is required.</Value> </LocaleResource> <LocaleResource Name="Address.Fields.Salutation"> <Value>Salutation</Value> </LocaleResource> <LocaleResource Name="Address.Fields.StateProvince"> <Value>State / province</Value> </LocaleResource> <LocaleResource Name="Address.Fields.StateProvince.Required"> <Value>State is required.</Value> </LocaleResource> <LocaleResource Name="Address.Fields.Title"> <Value>Title</Value> </LocaleResource> <LocaleResource Name="Address.Fields.ZipPostalCode"> <Value>Zip / postal code</Value> </LocaleResource> <LocaleResource Name="Address.Fields.ZipPostalCode.Required"> <Value>Zip / postal code is required.</Value> </LocaleResource> <LocaleResource Name="Address.IsDefaultAddress"> <Value>Is default address</Value> </LocaleResource> <LocaleResource Name="Address.IsDefaultBillingAddress"> <Value>Is default billing address</Value> </LocaleResource> <LocaleResource Name="Address.IsDefaultShippingAddress"> <Value>Is default shipping address</Value> </LocaleResource> <LocaleResource Name="Address.OtherNonUS"> <Value>Other (Non US)</Value> </LocaleResource> <LocaleResource Name="Address.SelectCountry"> <Value>Select country</Value> </LocaleResource> <LocaleResource Name="Address.SetDefaultAddress"> <Value>Sets the address as the default billing and shipping address.</Value> </LocaleResource> <LocaleResource Name="Admin"> <Value>Admin</Value> </LocaleResource> <LocaleResource Name="Admin.AccessDenied.Description"> <Value>You do not have permission to perform the selected operation.</Value> </LocaleResource> <LocaleResource Name="Admin.AccessDenied.DetailedDescription"> <Value>You do not have authorization to perform this operation. Permission: {0}, Systemname: {1}.</Value> </LocaleResource> <LocaleResource Name="Admin.AccessDenied.Title"> <Value>Access denied.</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields"> <Value>Address 1</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.Address1"> <Value>Address 1</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.Address1.Hint"> <Value>Enter address 1</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.Address2"> <Value>Address 2</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.Address2.Hint"> <Value>Enter address 2</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.City"> <Value>City</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.City.Hint"> <Value>Enter city</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.Company"> <Value>Company</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.Company.Hint"> <Value>Enter company</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.Country"> <Value>Country</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.Country.Hint"> <Value>Select country</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.Country.MustBePublished"> <Value>Invalid country</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.Country.Required"> <Value>Country is required.</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.Email"> <Value>Email</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.Email.Hint"> <Value>Enter email</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.EmailMatch"> <Value>Reenter email address</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.EmailMatch.MustMatchEmail"> <Value>The email address has to match the email address entered before</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.FaxNumber"> <Value>Fax number</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.FaxNumber.Hint"> <Value>Enter fax number</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.FirstName"> <Value>First name</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.FirstName.Hint"> <Value>Enter first name</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.LastName"> <Value>Last name</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.LastName.Hint"> <Value>Enter last name</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.Name.InvalidChars"> <Value>Please check your input. Numbers and the following characters are not allowed: {0}</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.PhoneNumber"> <Value>Phone number</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.PhoneNumber.Hint"> <Value>Enter phone number</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.StateProvince"> <Value>State / province</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.StateProvince.Hint"> <Value>Select state / province</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.StateProvince.Required"> <Value>State / province is required.</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.ZipPostalCode"> <Value>Zip / postal code</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Fields.ZipPostalCode.Hint"> <Value>Enter zip / postal code</Value> </LocaleResource> <LocaleResource Name="Admin.Address.OtherNonUS"> <Value>Other (Non US)</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Salutation"> <Value>Mr.</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Salutation.Mr"> <Value>Mr.</Value> </LocaleResource> <LocaleResource Name="Admin.Address.Salutation.Mrs"> <Value>Mrs.</Value> </LocaleResource> <LocaleResource Name="Admin.Address.SelectCountry"> <Value>Select country</Value> </LocaleResource> <LocaleResource Name="Admin.Affiliates"> <Value>Affiliates</Value> </LocaleResource> <LocaleResource Name="Admin.Affiliates.Added"> <Value>The new affiliate has been added successfully.</Value> </LocaleResource> <LocaleResource Name="Admin.Affiliates.AddNew"> <Value>Add a new affiliate</Value> </LocaleResource> <LocaleResource Name="Admin.Affiliates.Customers"> <Value>Affiliated customers</Value> </LocaleResource> <LocaleResource Name="Admin.Affiliates.Deleted"> <Value>The affiliate has been deleted successfully.</Value> </LocaleResource> <LocaleResource Name="Admin.Affiliates.EditAffiliateDetails"> <Value>Edit affiliate details</Value> </LocaleResource> <LocaleResource Name="Admin.Affiliates.Fields"> <Value>Active</Value> </LocaleResource> <LocaleResource Name="Admin.Affiliates.Fields.Active"> <Value>Active</Value> </LocaleResource> <LocaleResource Name="Admin.Affiliates.Fields.Active.Hint"> <Value>A value indicating whether the affiliate is active.</Value> </LocaleResource> <LocaleResource Name="Admin.Affiliates.Fields.ID"> <Value>Affiliate identifier</Value> </LocaleResource> <LocaleResource Name="Admin.Affiliates.Fields.ID.Hint"> <Value>Affiliate's unique identifier.</Value> </LocaleResource> <LocaleResource Name="Admin.Affiliates.Fields.URL"> <Value>Affiliate URL</Value> </LocaleResource> <LocaleResource Name="Admin.Affiliates.Fields.URL.Hint"> <Value>When this hyperlink is clicked from the affiliate site, this site looks for an Affiliate ID query string parameter. If one exists, the customer is tagged with that affiliate.</Value> </LocaleResource> <LocaleResource Name="Admin.Affiliates.Info"> <Value>Affiliate info</Value> </LocaleResource> <LocaleResource Name="Admin.Affiliates.Orders"> <Value>Affiliated orders</Value> </LocaleResource> <LocaleResource Name="Admin.Affiliates.Orders.Order"> <Value>Created order</Value> </LocaleResource> <LocaleResource Name="Admin.Affiliates.Orders.OrderStatus"> <Value>Order status</Value> </LocaleResource> <LocaleResource Name="Admin.Affiliates.Orders.OrderTotal"> <Value>Order total</Value> </LocaleResource> <LocaleResource Name="Admin.Affiliates.Orders.PaymentStatus"> <Value>Payment status</Value> </LocaleResource> <LocaleResource Name="Admin.Affiliates.Orders.ShippingStatus"> <Value>Shipping status</Value> </LocaleResource> <LocaleResource Name="Admin.Affiliates.Updated"> <Value>The affiliate has been updated successfully.</Value> </LocaleResource> <LocaleResource Name="Admin.AI.CreateFullDesc"> <Value>Generate full description</Value> </LocaleResource> <LocaleResource Name="Admin.AI.CreateImage"> <Value>Generate image</Value> </LocaleResource> <LocaleResource Name="Admin.AI.CreateMetaDesc"> <Value>Generate meta description</Value> </LocaleResource> <LocaleResource Name="Admin.AI.CreateMetaKeywords"> <Value>Generate meta keywords</Value> </LocaleResource> <LocaleResource Name="Admin.AI.CreateMetaTitle"> <Value>Generate title tag</Value> </LocaleResource> <LocaleResource Name="Admin.AI.CreateShortDesc"> <Value>Generate short description</Value> </LocaleResource> <LocaleResource Name="Admin.AI.CreateText"> <Value>Generate text</Value> </LocaleResource> <LocaleResource Name="Admin.AI.EditHtml"> <Value>Edit HTML text</Value> </LocaleResource> <LocaleResource Name="Admin.AI.ImageCreation.DefaultPrompt"> <Value>Generate a picture about the topic: '{0}'.</Value> </LocaleResource> <LocaleResource Name="Admin.AI.MakeSuggestions"> <Value>Make suggestions</Value> </LocaleResource> <LocaleResource Name="Admin.AI.MenuItemTitle.ChangeStyle"> <Value>Change style</Value> </LocaleResource> <LocaleResource Name="Admin.AI.MenuItemTitle.ChangeTone"> <Value>Change tone</Value> </LocaleResource> </Language> 标签内容翻译中文
最新发布
07-22
<?xml version="1.0" encoding="utf-8"?> <resources> <string name="error__6">Operation failed. Please try later.</string> <string name="error_263">No default tenant found, please contact service provider.</string> <string name="error__107">Failed to connect to the camera. Try again later.</string> <string name="error_004">Invalid email address.</string> <string name="error_006">Incorrect mobile number.</string> <string name="error_009">The phone number has already been registered once, please use another number or use this number to login.</string> <string name="error_010">Incorrect verification code.</string> <string name="error_011">The email address has been bound.</string> <string name="error_012">Failed to log in to the app. Please log in again.</string> <string name="error_018">Invalid application ID.</string> <string name="error_019">Invalid operation.</string> <string name="error_024">Invalid plug-in.</string> <string name="error_025">Operation failed. Please try later.</string> <string name="error_026">Plug-in does not exist.</string> <string name="error_027">Failed to log in to the app. Please log in again.</string> <string name="error_030">The terminal has been bound.</string> <string name="error_031">Operation failed. Please try later.</string> <string name="error_032">The terminal does not bind to this account.</string> <string name="error_033">Terminals are being operated by other users.</string> <string name="error_034">Operation failed. Please try later.</string> <string name="error_035">Failed to obtain the application list.</string> <string name="error_036">Failed to obtain the application image.</string> <string name="error_037">Failed to obtain the application version.</string> <string name="error_038">Failed to obtain the Wi-Fi coverage information.</string> <string name="error_040">The email address has not been bound to an account.</string> <string name="error_042">Operation failed. Please try later.</string> <string name="error_044">Operation failed. Please try later.</string> <string name="error_048">Operation failed. Please try later.</string> <string name="error_050">Operation failed. Please try later.</string> <string name="error_051">Operation failed. Please try later.</string> <string name="error_056">Configuration page query failed.</string> <string name="error_057">Operation failed. Please try later.</string> <string name="error_058">Plug-in list query failed.</string> <string name="error_059">Plug-in image query failed.</string> <string name="error_060">Operation failed. Please try later.</string> <string name="error_061">Operation failed. Please try later.</string> <string name="error_063">Invalid broadband account.</string> <string name="error_064">Operation failed. Please try later.</string> <string name="error_066">Invalid account type.</string> <string name="error_067">The password cannot be empty.</string> <string name="error_068">The confirmation password cannot be empty.</string> <string name="error_069">The account cannot be empty.</string> <string name="error_070">Incorrect PPPoE account.</string> <string name="error_072">The cloud account is empty.</string> <string name="error_073">Incorrect cloud account type.</string> <string name="error_075">The cloud account is registered.</string> <string name="error_076">The cloud account does not exist.</string> <string name="error_077">You have not bound any broadband account or gateway.</string> <string name="error_078">The MAC address of the device is not registered to the cloud platform. </string> <string name="error_081">The current binding relationship does not exist.</string> <string name="error_082">The user account does not exist.</string> <string name="error_087">Binding failed, No broadband account.</string> <string name="error_093">You have not bound any broadband account.</string> <string name="error_094">The number of gateways to be bound has reached the maximum. New gateways cannot be bound.</string> <string name="error_097">Broadband account verification is not currently available.</string> <string name="error_098">The device already exists.</string> <string name="error_099">The Wi-Fi SSID already exists.</string> <string name="error_100">The Wi-Fi SSID is empty.</string> <string name="error_101">The account is added.</string> <string name="error_103">The password will expire soon.</string> <string name="error_105">The user account is locked.</string> <string name="error_106">User login failed.</string> <string name="error_107">Exceeded the number limit of accounts that can be logged in at the same time.</string> <string name="error_108">Password complexity is invalid.</string> <string name="error_110">Incorrect mobile phone type.</string> <string name="error_111">The mobile phone version is empty.</string> <string name="error_112">Exceeded the password resetting limit in 24 hours.</string> <string name="error_113">Exceeded the number limit of security question attempts. The password resetting is locked.</string> <string name="error_114">Incorrect answer to the security question.</string> <string name="error_115">Invalid parameter for the security question.</string> <string name="error_116">Incorrect old password.</string> <string name="error_117">No plug-in version.</string> <string name="error_118">Incorrect password.</string> <string name="error_121">Invalid order number.</string> <string name="error_122">WO cloud account has been registered.</string> <string name="error_123">WO cloud account does not exist.</string> <string name="error_124">WO cloud client authentication failed.</string> <string name="error_133">Failed to join.</string> <string name="error_139">Only administrators have this permission.</string> <string name="error_144">The log file size exceeds 5 MB and cannot be uploaded.</string> <string name="error_145">Plug-in already exists.</string> <string name="error_146">Plug-in version already exists.</string> <string name="error_150">The log switch has been enabled.</string> <string name="error_151">The log switch has been disabled.</string> <string name="error_152">Failed to query third-party authentication information.</string> <string name="error_153">Failed to forward plug-in third-party authentication information.</string> <string name="error_154">Duplicate room name.</string> <string name="error_155">The message template cannot be left empty.</string> <string name="error_156">The message template does not exist.</string> <string name="error_157">The mapping SMS template does not exist.</string> <string name="error_158">The SMS gateway is unavailable.</string> <string name="error_159">The plug-in service name is left empty or does not exist.</string> <string name="error_160">The plug-in service code is left empty or does not exist.</string> <string name="error_161">The plug-in random code is left blank or does not exist.</string> <string name="error_162">The mobile number cannot be left empty.</string> <string name="error_163">Failed to connect to the SMS gateway.</string> <string name="error_164">Failed to bind the SMS gateway.</string> <string name="error_165">Failed to send the SMS message.</string> <string name="error_166">SMS sending timed out.</string> <string name="error_171">The email address for receiving an authentication code is not the email address of the administrator.</string> <string name="error_172">The format of the message notification switch is incorrect.</string> <string name="error_173">The user password of the storage service fails the verification.</string> <string name="error_174">Status of the gateway to which the user is bound is invalid.</string> <string name="error_175">The email server is not configured.</string> <string name="error_176">Failed to send the email.</string> <string name="error_184">Sender authentication on the email server failed.</string> <string name="error_185">Incorrect email address.</string> <string name="error_186">Operation failed. Please try later.</string> <string name="error_187">Operation failed. Please try later.</string> <string name="error_189">You do not have the permission to access the gateway.</string> <string name="error_192">This type of message is not currently supported by the SMS gateway.</string> <string name="error_193">Sessiontimeout must be specified if the speed-up interface oper_type is set to 0.</string> <string name="error_196">Image size too large.</string> <string name="error_197">Incorrect image format.</string> <string name="error_198">The plug-in software version is not available.</string> <string name="error_199">Mandatory parameter symbolicName not found.</string> <string name="error_200">The plug-in record is empty.</string> <string name="error_204">BSS is not configured.</string> <string name="error_205">Failed to register the cloud account.</string> <string name="error_209">Mandatory parameter #{field} is not carried or is left empty.</string> <string name="error_210">Invalid request format.</string> <string name="error_211">The password has expired.</string> <string name="error_212">The user is blocked.</string> <string name="error_213">The MAC address is not bound.</string> <string name="error_215">You have not purchased such type of device.</string> <string name="error_216">Failed to identify the device type.</string> <string name="error_217">The number of devices of this type exceeds the maximum allowed by the package.</string> <string name="error_218">The package has not been activated.</string> <string name="error_222">Cloud storage has not been configured on the web page.</string> <string name="error_226">The account is not bound to a mobile number.</string> <string name="error_227">The account is not bound to an email address.</string> <string name="error_228">The cloud storage parameters cannot be left empty.</string> <string name="error_230">Failed to create the temporary Amazon Cloud certificate.</string> <string name="error_231">The verification code has expired.</string> <string name="error_232">No profile image has been uploaded for the user.</string> <string name="error_233">The application has not been purchased.</string> <string name="error_234">Incorrect cloud storage configuration.</string> <string name="error_236">Failed to obtain the cloud token.</string> <string name="error_237">Non-current administrator to create sub-accounts</string> <string name="error_244">The mobile number cannot be used for login.</string> <string name="error_245">The email address cannot be used for login.</string> <string name="error_246">The account cannot be modified repeatedly.</string> <string name="error_248">The plug-in is the latest version.</string> <string name="error_249">The login has expired.</string> <string name="error_250">The plug-in is the latest version.</string> <string name="error_251">Users with no service provisioned cannot bind a gateway.</string> <string name="error_252">The mobile number bound to the new administrator does not match the number segment specified by the carrier.</string> <string name="error_253">The mobile phone number bound to the new administrator is not used.</string> <string name="error_254">The mobile phone number bound to the new administrator has been used.</string> <string name="error_256">Your account has been disabled.</string> <string name="error_1018">Your password has been reset, please set a new password on the cloud platform</string> <string name="error_30000001">Operation failed. Please try later.</string> <string name="error_30000101">The account already exists.</string> <string name="error_30000102">The account does not exist.</string> <string name="error_30000103">The new account already exists.</string> <string name="error_30000104">The mobile number already exists.</string> <string name="error_30000105">The email address already exists.</string> <string name="error_30000106">The package does not exist.</string> <string name="error_30000107">Product ID{#{field}} does not exist.</string> <string name="error_30000108">Incorrect email address format.</string> <string name="error_30000109">The password does not meet the complexity requirements. Enter a correct one.</string> <string name="error_30000110">The account is not an administrator account.</string> <string name="error_30000111">No gateway has been bound for the account.</string> <string name="error_30000112">Multiple gateways have been bound for the account.</string> <string name="error_30000113">The gateway bound to this account has been enabled for remote management.</string> <string name="error_30000114">The gateway bound to this account has suspended remote management</string> <string name="error_30000115">The package is not specified.</string> <string name="error_30000116">Failed to delete the storage service file.</string> <string name="error_30000121">Unknown northbound bundle operation.</string> <string name="error_30000122">The plug-in software version is not found.</string> <string name="error_30000123">The plug-in software version already exists.</string> <string name="error_30000124">Mandatory parameter symbolicName is not specified.</string> <string name="error_30000125">The plug-in record is empty.</string> <string name="error_30000126">The plug-in has been bound to an app.</string> <string name="error_30000127">The plug-in does not exist.</string> <string name="error_30000128">The format of the mobile number is incorrect.</string> <string name="error_30000129">A new account cannot be the same as the old account.</string> <string name="error_30000130">The password must be different from previous passwords.</string> <string name="error__1004">The service package is not available for use.</string> <string name="error__1008">The entered broadband account is inconsistent with the one used for dial-up access.</string> <string name="error__1011">The user is offline.</string> <string name="error__1012">Subscribed services have expired.</string> <string name="error__1014">The IP address is outside the IP address range that has access to smart speed-up.</string> <string name="error__1015">The remaining quota is zero.</string> <string name="error_2002">The room does not exist.</string> <string name="error_2003">The device SN does not exist.</string> <string name="error_2004">The device is already added.</string> <string name="error_2005">No such device service is purchased.</string> <string name="error_2006">The package is not activated.</string> <string name="error_2007">The number of devices exceeds the limit of package.</string> <string name="error_2008">The device name already exists.</string> <string name="error_10100502">The service is invalid.</string> <string name="error_10100503">The service has ceased.</string> <string name="error_10100505">The service package does not exist.</string> <string name="error_10100508">BOD services do not support accumulation.</string> <string name="error_10100509">No basic-bandwidth information is available to calculate the amount of additional BOD bandwidth required.</string> <string name="error_10100601">The service is not subscribed.</string> <string name="error_10100602">The service is in used.</string> <string name="error_10100604">The service is not in use and the acceleration does not need to be stopped.</string> <string name="error_999">Operation failed. Please try later.</string> <string name="error_999108">Operation failed. Please try later.</string> <string name="error_999100">Service cannot parse XML-request and detect necessary fields</string> <string name="error_999101">Account for requested login or contract number is not found (for methods like balance checking)</string> <string name="error_999102">The contract attachment of the requested number is not found.</string> <string name="error_999103">Service with the requested number is not found</string> <string name="error_999104">Wrong phone number format</string> <string name="error_999105">Wrong email format</string> <string name="error_999106">Password doesn\'t meet the requirements (too short, etc)</string> <string name="error_999107">Error of internal account identification</string> <string name="error_999200">Method is not supported or not currently available</string> <string name="error_999202">BSS returns an error indicating that changing the mobile phone number failed.</string> <string name="error_999203">BSS returns an error indicating that changing the email address failed.</string> <string name="error_999300">Error during internal request processing in billing system (it will be returned XML-structure with details of the error)</string> <string name="error_network_err">Connection timed out. Check your network connection.</string> <string name="error_40000002">The length exceeds the maximum limit.</string> <string name="error_40000005">The parameter value exceeds the maximum value.</string> <string name="error_40000006">The parameter value is less than the minimum value.</string> <string name="error_80010001">The scene name already exists.</string> <string name="error_80010002">The scene name is empty.</string> <string name="error_80010003">The scene contains non-existing or deleted devices.</string> <string name="error_80010004">The scene name does not exist.</string> <string name="error_80000001">The plug-in name is empty.</string> <string name="error_80000002">The data flag is empty.</string> <string name="error_80010005">The action of the device is empty.</string> <string name="error_80010006">The device type does not exist.</string> <string name="error_80011001">The app name does not exist.</string> <string name="error_80011002">The operation name is empty.</string> <string name="error_80011003">The service name does not exist.</string> <string name="error_80012001">The camera password is incorrect or locked.</string> <string name="error_80013001">More rooms are created than allowed.</string> <string name="error_80010007">Incorrect time format in the scheduled scene.</string> <string name="error_80010008">The action name is empty.</string> <string name="error_80010009">Name of trigger condition is empty.</string> <string name="error_1013">The MAC address of your gateway does not exist on the server.</string> <string name="logo_homeGatewayService.token.invalid">Your login has expired.</string> <string name="error_1014">The number of verification codes sent in your account has reached the maximum. Please try again tomorrow.</string> <string name="error_0x02163dc3">The number of same characters in a row in the password has exceeded the maximum.</string> <string name="error_0x02163dcc">Failed to input the correct old password.</string> <string name="error_0x02163dc1">The password does not meet requirements.</string> <string name="error_0x02163dc2">The length of the password does not meet requirements.</string> <string name="error_0x021639b8">The new password must contain at least two characters that are not used in the old password.</string> <string name="error_0x02163dc4">The password does not comply with the repetition policy.</string> <string name="error_0x02163dc6">The operation does not comply with the minimum modification time interval.</string> <string name="error_0035014004">Password entered incorrectly too many times, please wait %1$s minutes and try again.</string> <string name="error_276">The mobile number has been registered with another broadband service provider and cannot be invited.</string> <string name="error_across_tenant">The mobile number has been registered with another broadband service provider, so you cannot invite it.</string> <string name="error__11">Operation failed. Please try later.</string> <string name="error__12">Operation failed. Please try later.</string> <string name="error_HomeGatewayService_parameter_invalid">Incorrect request parameter.</string> <string name="error_HomeGatewayService_cmdtype_invalid">The current platform version does not support this function.</string> <string name="error_HomeGatewayService_service_invalid">Server error.</string> <string name="error_HomeGatewayService_homegateway_no_permission">You do not have permission to manage the gateway.</string> <string name="error_281">Failed to send the SMS message. Please contact your broadband service provider.</string> <string name="error_282">The server fails to send an SMS message because the mobile number is invalid.</string> <string name="error_283">The server fails to send an SMS message because the mobile number is invalid.</string> <string name="error_284">The server is busy sending SMS messages. Please try again later.</string> <string name="error_285">The server is busy sending SMS messages. Please try again later.</string> <string name="error_286">The server fails to send the SMS message because the content is invalid.</string> <string name="error_287">The server fails to send an SMS message because the number is in the blacklist.</string> <string name="error_288">The SMS message sent by the server contains sensitive words. Change your gateway remarks and try again.</string> <string name="error_0">Operation successful.</string> <string name="error_7">The gateway is busy and cannot process the current request. Try again later.</string> <string name="error__1">Operation failed. Please try later.</string> <string name="error__2">Network request timed out.</string> <string name="error__36">The Wi-Fi service has been disabled.</string> <string name="error__100">Failed to assign transit server port. Try again</string> <string name="error__101">Failed to connect to the transit server. Check if the server is online.</string> <string name="error__105">Failed to obtain the video service address of the camera</string> <string name="error__108">User authentication failed</string> <string name="error__202">When MLO is enabled, the authentication mode must be WPA2, WPA3, or WPA2/WPA3.</string> <string name="error_001">Duplicate username.</string> <string name="error_002">Passwords don’t match.</string> <string name="error_003">Incorrect username or password.</string> <string name="error_005">The length of the password does not meet requirements.</string> <string name="error_007">The username cannot be empty.</string> <string name="error_008">Duplicate nickname.</string> <string name="error_013">Incorrect username or password.</string> <string name="error_014">Exceeded the maximum number of terminals bound to the current account.</string> <string name="error_015">Exceeded the maximum number of accounts bound to this terminal.</string> <string name="error_016">No smart ONT has been bound</string> <string name="error_020">The gateway is offline.</string> <string name="error_021">You do not have the permission to access the gateway.</string> <string name="error_022">The gateway is not registered.</string> <string name="error_023">The username does not exist.</string> <string name="error_029">No terminal is bound to this account.</string> <string name="error_039">The mobile number has not been bound to an account.</string> <string name="error_041">Failed to modify the password: The old password is entered incorrectly.</string> <string name="error_043">The gateway connection timed out. Try again later or check whether the gateway network is connected.</string> <string name="error_045">Operation failed. Please try later.</string> <string name="error_046">Operation failed. Please try later.</string> <string name="error_047">Failed to obtain the device control list.</string> <string name="error_049">Exceeded the maximum number of controllable devices.</string> <string name="error_052">The gateway is not registered.</string> <string name="error_053">Device control is not supported.</string> <string name="error_054">Operation failed. Please try later.</string> <string name="error_055">Unknown error occurred on the device control template.</string> <string name="error_065">Problem description cannot be empty.</string> <string name="error_071">Not a smart gateway.</string> <string name="error_079">Operation failed: the gateway has been unbound.</string> <string name="error_080">Operation failed: the current account has not joined.</string> <string name="error_083">Operation failed. Please try later.</string> <string name="error_084">A non-invite user cannot modify the remarks.</string> <string name="error_085">Unbinding failed. Please try again later.</string> <string name="error_086">Devices exist in the room.</string> <string name="error_088">This app does not support non-smart gateways.</string> <string name="error_089">Binding failed. Please try again later.</string> <string name="error_090">Binding failed. Please try again later.</string> <string name="error_091">Binding failed. Please try again later.</string> <string name="error_092">The number of invited users has exceeded the upper limit.</string> <string name="error_095">Deletion failed. The last user cannot be deleted.</string> <string name="error_096">The list of network users to be deleted is empty.</string> <string name="error_102">The new password cannot be the same as any previous password.</string> <string name="error_104">The password has expired.</string> <string name="error_109">The greeting message is empty.</string> <string name="error_119">The room name cannot be empty.</string> <string name="error_120">The room ID cannot be empty.</string> <string name="error_125">The username does not meet the complexity requirements. Enter a correct one.</string> <string name="error_126">The username cannot be empty.</string> <string name="error_127">The username does not meet the complexity requirements. Enter a correct one.</string> <string name="error_128">No mobile number is bound.</string> <string name="error_129">This mobile number is not a administrator account.</string> <string name="error_130">The mobile number must be a Bahraini number.</string> <string name="error_131">The mobile number has been bound.</string> <string name="error_132">No phone number is bound to the current account.</string> <string name="error_134">Administrators cannot leave.</string> <string name="error_135">The mobile number is not bound to any account.</string> <string name="error_136">The login has expired.</string> <string name="error_140">The device has been updated to the latest version.</string> <string name="error_141">No new version is available.</string> <string name="error_143">Incorrect log file format.</string> <string name="error_147">The gateway is being upgraded.</string> <string name="error_148">The phone number has already been registered once, please use another number or use this number to login.</string> <string name="error_149">Duplicate room name.</string> <string name="error_167">Operation failed. Please try later.</string> <string name="error_168">Starting the plug-in…</string> <string name="error_169">Stopping the plug-in…</string> <string name="error_170">Uninstalling the plug-in…</string> <string name="error_188">The gateway does not exist.</string> <string name="error_190">You do not have access to this gateway.</string> <string name="error_191">The message push type is empty or of an incorrect format.</string> <string name="error_194">Operation failed. Please try later.</string> <string name="error_195">You cannot invite other network members to join.</string> <string name="error_LHConsumerService_login_accountRoleMismatch">Members from other enterprises are not allowed.</string> <string name="error_LHConsumerService_bindGroup_exceedMaxBindGroupNum">Members from other enterprises are not allowed.</string> <string name="error_201">Failed to check the remaining balance.</string> <string name="error_202">Failed to change the mobile number.</string> <string name="error_203">Failed to change the email address.</string> <string name="error_214">Incorrect addedDeviceList format.</string> <string name="error_219">The password cannot be the same as the username or the username in reverse.</string> <string name="error_220">You do not have the administrative permission.</string> <string name="error_221">Failed to uninstall all the plug-ins of the home gateway.</string> <string name="error_224">The new gateway is not registered.</string> <string name="error_225">The new home gateway has been bound.</string> <string name="error_238">Your account has not been bound with a mobile number or email address. The password cannot be retrieved through self service. You are advised to contact your administrator to retrieve the password.</string> <string name="error_239">The mobile number is bound to multiple accounts.</string> <string name="error_240">The email address is bound to multiple accounts.</string> <string name="error_247">Anonymous binding information cannot be queried by using a mobile number or an email address.</string> <string name="error_255">The account has been bound to a gateway, and cannot be bound to another one.</string> <string name="error_272">Incorrect username or password.</string> <string name="error_1002">The interval between requests for sending verification codes is too short.</string> <string name="error_30000117">The home gateway MAC address does not exist.</string> <string name="error_30000118">The home gateway is offline.</string> <string name="error_30000119">The home gateway plug-in does not exist.</string> <string name="error_30000120">The plug-in is not installed or not upgraded on the home gateway.</string> <string name="error__1013">The MAC address (XXX) of your gateway does not exist on the server.</string> <string name="error_2001">The input parameter is empty.</string> <string name="error_40000001">The parameter contains unsupported special characters.</string> <string name="error_40000003">The length is less than the minimum limit.</string> <string name="error_40000004">The parameter is not a numeric type.</string> <string name="error_40000007">Invalid IP address.</string> <string name="net_conn_failed">Connection failed.</string> <string name="error__3">Connection failed.</string> <string name="error__4">The gateway is busy and cannot process the current request. Try again later.</string> <string name="error__5">Operation failed. Please try later.</string> <string name="error__7">Operation failed. Please try later.</string> <string name="error__8">Not supported by the gateway.</string> <string name="error__9">Operation failed. Please try later.</string> <string name="error__10">Your login has expired. Please log in again.</string> <string name="error_280">Failed to send the SMS message. Please try again later.</string> <string name="error_300">The current server version does not support user name registration.</string> <string name="error__102">Camera offline or camera connection failed. Check if the camera is powered on.</string> <string name="error__104">Camera video service address illegal, please report impaired</string> <string name="error__106">Gateway cannot connect to the transit server. Check if the server is online.</string> <string name="error__200">Reached the upper limit.</string> <string name="error__201">When MLO is enabled, the working mode must be 802.11be.</string> <string name="error__203">Saving Wi-Fi settings. Please wait.</string> <string name="error__204">Incorrect request parameter.</string> <string name="error__205">The Wi-Fi frequency band is not enabled. Enable it first.</string> <string name="error__301">Fails to play the real-time video of the camera. Failed to connect to the gateway locally.</string> <string name="error__330">Application control is not enabled. Please enable it first.</string> <string name="error__331">The number of application control policies has reached the upper limit.</string> <string name="error__332">The app control rule does not exist.</string> <string name="error__622">The rate limit periods cannot overlap with each other.</string> <string name="error_028">Your account has been used for login on another device. If this was done without your knowledge, your account and password may have been compromised. Choose Settings > Account And Security to change your account password.</string> <string name="error_2009">Failed to query the package status.</string> <string name="error__99999">Operation failed. Please try later.</string> <string name="error_1017">The MAC address cannot be empty.</string> <string name="error_licence_expire">Licence expired, please contact service provider.</string> <string name="LHConsumerService.bindLocalAccount.hasFamily">The account is already in a family.</string> <string name="LHConsumerService.bindLocalAccount.bound">Already bound to another account.</string> <string name="LHConsumerService.weakvalue.error">The password is too simple.</string> <string name="error_LHConsumerService_feedback_daylimit">The number of problems you reported has reached the upper limit. Try again 24 hours later.</string> <string name="error_306">Failed to send the verification code.The possible cause is that the mobile number format is incorrect or the mobile number has been bound.</string> <string name="error_307">Failed to send the verification code.The possible cause is that the email address format is incorrect or the email address has been bound.</string> <string name="error_308">Failed to send the verification code.The possible cause is that the mobile number format is incorrect or the mobile number is not bound.</string> <string name="error_309">Failed to send the verification code.The possible cause is that the email address format is incorrect or the email address is not bound.</string> <string name="error_310">The client IP address is locked,please try again later.</string> <string name="error_311">The current version does not support multi-factor authentication. Contact the administrator to disable multi-factor authentication.</string> <string name="error__340">The portal function has been enabled. The speed limit cannot be configured. To set the rate limit, disable Portal authentication on the web management page of the gateway.</string> <string name="error_AppSdk_notInitialized">Failed to initialize the app. Please log in again.</string> <string name="error_log_collect_offline">Device is offline</string> <string name="error_log_collect_conflict">Another collection task of the device is in progress.</string> <string name="error_log_collect_failed">Log collection failed</string> <string name="LHConsumerService.domainMigration.notSupportBinding">The server has been switched. Please switch to the corresponding region and register again.</string> <string name="error__41">Failed to set the 5G Wi-Fi because it has been locked. Contact your carrier to enable it first.</string> <string name="error__14">The same Wi-Fi SSID already exists in the current frequency band.</string> <string name="BindGateway_101">You have joined a family. Please refresh the home page and view it.</string> <string name="error_third_platform_user">Third-party users exist, unbinding failed.</string> </resources>
06-11
/** * implement a container like std::map */ #ifndef SJTU_MAP_HPP #define SJTU_MAP_HPP #include <cstdio> // only for std::less<T> #include <functional> #include <cstddef> #include "utility.hpp" #include "exceptions.hpp" namespace sjtu { template< class Key, class T, class Compare = std::less <Key> > class AAtree{ public: typedef pair<const Key, T> value_type; struct Node { Node *lson, *rson, *parent; int level; value_type data; Node(const value_type &d, int lv = 1, Node *p = nullptr, Node *l = nullptr, Node *r = nullptr) : data(d), level(lv), parent(p), lson(l), rson(r) {} }; Node *root; size_t tree_size; Compare comp; AAtree(): root(nullptr), tree_size(0) {} AAtree(const AAtree &other) { root = copyTree(other.root, nullptr); tree_size = other.tree_size; } AAtree &operator=(const AAtree &other) { if (this != &other) { clear(root); root = copyTree(other.root, nullptr); tree_size = other.tree_size; } return *this; } ~AAtree() { clear(root); tree_size = 0; } Node *skew(Node *node) { if (!node || !node->lson) return node; if (node->lson->level == node->level) { Node *L = node->lson; node->lson = L->rson; if (L->rson) L->rson->parent = node; L->rson = node; L->parent = node->parent; node->parent = L; return L; } return node; } Node *split(Node *node) { if (!node || !node->rson || !node->rson->rson) return node; if (node->level == node->rson->rson->level) { Node *R = node->rson; node->rson = R->lson; if (R->lson) R->lson->parent = node; R->lson = node; R->parent = node->parent; node->parent = R; ++R->level; return R; } return node; } Node *insert(Node *node, const value_type &value, Node *parent = nullptr) { if (!node) { ++tree_size; return new Node(value, 1, parent); } if (comp(value.first, node->data.first)) { node->lson = insert(node->lson, value, node); node->lson->parent = node; } else if (comp(node->data.first, value.first)) { node->rson = insert(node->rson, value, node); node->rson->parent = node; } else return node; node = skew(node); node = split(node); return node; } Node *erase(Node *node, const Key &key) { if (!node) return nullptr; if (comp(key, node->data.first)) { node->lson = erase(node->lson, key); if (node->lson) node->lson->parent = node; } else if (comp(node->data.first, key)) { node->rson = erase(node->rson, key); if (node->rson) node->rson->parent = node; } else { if (!node->lson && !node->rson) { if (node->parent) { if (node->parent->lson == node) { node->parent->lson = nullptr; } else { node->parent->rson = nullptr; } } delete node; node = nullptr; --tree_size; return nullptr; } else if (!node->lson) { Node *temp = node->rson; temp->parent = node->parent; delete node; node = nullptr; --tree_size; return temp; } else if (!node->rson) { Node *temp = node->lson; temp->parent = node->parent; delete node; node = nullptr; --tree_size; return temp; } Node *predecessor = node->lson; while (predecessor->rson) predecessor = predecessor->rson; Node *newNode = new Node(predecessor->data, node->level, node->parent, node->lson, node->rson); if (newNode->lson) newNode->lson->parent = newNode; if (newNode->rson) newNode->rson->parent = newNode; if (newNode->parent) { if (newNode->parent->lson == node) { newNode->parent->lson = newNode; } else { newNode->parent->rson = newNode; } } newNode->lson = erase(newNode->lson, predecessor->data.first); if (newNode->lson) newNode->lson->parent = newNode; delete node; node = newNode; } if (node->lson && node->rson) { size_t min_level = node->lson->level < node->rson->level ? node->lson->level : node->rson->level; if (node->level > min_level + 1) { node->level = min_level + 1; if (node->rson && node->rson->level > node->level) node->rson->level = node->level; } } node = skew(node); node->rson = skew(node->rson); if (node->rson) node->rson->rson = skew(node->rson->rson); node = split(node); node->rson = split(node->rson); return node; } Node *find(Node *node, const Key &key) const { while (node) { if (comp(key, node->data.first)) node = node->lson; else if (comp(node->data.first, key)) node = node->rson; else return node; } return nullptr; } Node *findMin(Node *node) const { if (!node) return nullptr; // printf("In findmin: %d\n", (node)); while (node->lson) node = node->lson; // printf("finish find min\n"); return node; } Node *findMax(Node *node) const { if (!node) return nullptr; while (node->rson) node = node->rson; return node; } Node *successor(Node *node) const { // printf("in successor\n"); if (!node) return nullptr; // printf("in successor2\n"); if (node->rson) return findMin(node->rson); // printf("in successor3\n"); Node *parent = node->parent; while (parent && node == parent->rson) { node = parent; parent = parent->parent; } // printf("finish successor\n"); return parent; } Node *predecessor(Node *node) const { if (!node) return nullptr; if (node->lson) return findMax(node->lson); Node *parent = node->parent; while (parent && node == parent->lson) { node = parent; parent = parent->parent; } return parent; } Node *copyTree(Node *node, Node *parent) { if (!node) return nullptr; Node *newNode = new Node(node->data, node->level, parent); newNode->lson = copyTree(node->lson, newNode); newNode->rson = copyTree(node->rson, newNode); return newNode; } void clear(Node *node) { if (!node) return; clear(node->lson); clear(node->rson); delete node; node = nullptr; } }; template< class Key, class T, class Compare = std::less <Key> > class map { public: /** * the internal type of data. * it should have a default constructor, a copy constructor. * You can use sjtu::map as value_type by typedef. */ typedef pair<const Key, T> value_type; AAtree<Key, T, Compare> aa_tree; /** * see BidirectionalIterator at CppReference for help. * * if there is anything wrong throw invalid_iterator. * like it = map.begin(); --it; * or it = map.end(); ++end(); */ typedef typename AAtree<Key, T, Compare>::Node Node; class const_iterator; class iterator { private: /** * TODO add data members * just add whatever you want. */ map* container; Node *node; public: iterator(map *c = nullptr, Node *n = nullptr): container(c), node(n) { // TODO } iterator(const iterator &other):container(other.container), node(other.node) { // TODO } /** * TODO iter++ */ iterator operator++(int) { if (!node) throw invalid_iterator(); iterator temp = *this; node = container->aa_tree.successor(node); return temp; } /** * TODO ++iter */ iterator &operator++() { if (!node) throw invalid_iterator(); node = container->aa_tree.successor(node); return *this; } /** * TODO iter-- */ iterator operator--(int) { iterator temp = *this; if (node == nullptr) { node = container->aa_tree.findMax(container->aa_tree.root); if (!node) throw invalid_iterator(); } else { node = container->aa_tree.predecessor(node); if (!node) throw invalid_iterator(); } return temp; } /** * TODO --iter */ iterator &operator--() { if (node == nullptr) { node = container->aa_tree.findMax(container->aa_tree.root); if (!node) throw invalid_iterator(); } else { node = container->aa_tree.predecessor(node); if (!node) throw invalid_iterator(); } return *this; } /** * a operator to check whether two iterators are same (pointing to the same memory). */ value_type &operator*() const { if (!node) throw invalid_iterator(); return node->data; } bool operator==(const iterator &rhs) const { return node == rhs.node && container == rhs.container; } bool operator==(const const_iterator &rhs) const { return node == rhs.getNode() && container == rhs.getContainer(); } /** * some other operator for iterator. */ bool operator!=(const iterator &rhs) const { return node != rhs.node || container != rhs.container; } bool operator!=(const const_iterator &rhs) const { return node != rhs.getNode() || container != rhs.getContainer(); } map *getContainer() const { return container; } Node *getNode() const { return node; } /** * for the support of it->first. * See <http://kelvinh.github.io/blog/2013/11/20/overloading-of-member-access-operator-dash-greater-than-symbol-in-cpp/> for help. */ value_type *operator->() const noexcept { // if (!node) throw invalid_iterator(); return &(node->data); } }; class const_iterator { // it should has similar member method as iterator. // and it should be able to construct from an iterator. private: // data members. map* container; Node *node; public: // const_iterator(const map *c = nullptr, Node *n = nullptr): container(const_cast<map*>(c)), node(n) { // // TODO // } const_iterator(map *c = nullptr, Node *n = nullptr): container(c), node(n) { // TODO } const_iterator(const const_iterator &other): container(other.container), node(other.node) { // TODO } const_iterator(const iterator &other) { // TODO container = other.getContainer(); node = other.getNode(); } /** * TODO iter++ */ const_iterator operator++(int) { if (!node) throw invalid_iterator(); const_iterator temp = *this; node = container->aa_tree.successor(node); return temp; } /** * TODO ++iter */ const_iterator &operator++() { if (!node) throw invalid_iterator(); node = container->aa_tree.successor(node); return *this; } /** * TODO iter-- */ const_iterator operator--(int) { const_iterator temp = *this; if (node == nullptr) { node = container->aa_tree.findMax(container->aa_tree.root); if (!node) throw invalid_iterator(); } else { node = container->aa_tree.predecessor(node); if (!node) throw invalid_iterator(); } return temp; } /** * TODO --iter */ const_iterator &operator--() { if (node == nullptr) { node = container->aa_tree.findMax(container->aa_tree.root); if (!node) throw invalid_iterator(); } else { node = container->aa_tree.predecessor(node); if (!node) throw invalid_iterator(); } return *this; } /** * a operator to check whether two iterators are same (pointing to the same memory). */ const value_type &operator*() const { if (!node) throw invalid_iterator(); return node->data; } bool operator==(const iterator &rhs) const { return node == rhs.getNode() && container == rhs.getContainer(); } bool operator==(const const_iterator &rhs) const { return node == rhs.node && container == rhs.container; } /** * some other operator for iterator. */ bool operator!=(const iterator &rhs) const { return node != rhs.getNode() || container != rhs.getContainer(); } bool operator!=(const const_iterator &rhs) const { return node != rhs.node || container != rhs.container; } map *getContainer() const { return container; } Node *getNode() const { return node; } /** * for the support of it->first. * See <http://kelvinh.github.io/blog/2013/11/20/overloading-of-member-access-operator-dash-greater-than-symbol-in-cpp/> for help. */ const value_type *operator->() const noexcept { // if (!node) throw invalid_iterator(); return &(node->data); } }; /** * TODO two constructors */ map(): aa_tree() {} map(const map &other): aa_tree(other.aa_tree) {} /** * TODO assignment operator */ map &operator=(const map &other) { if (this != &other) { aa_tree = other.aa_tree; } return *this; } /** * TODO Destructors */ ~map() {} /** * TODO * access specified element with bounds checking * Returns a reference to the mapped value of the element with key equivalent to key. * If no such element exists, an exception of type `index_out_of_bound' */ T &at(const Key &key) { auto node = aa_tree.find(aa_tree.root, key); if (!node) throw index_out_of_bound(); return node->data.second; } const T &at(const Key &key) const { auto node = aa_tree.find(aa_tree.root, key); if (!node) throw index_out_of_bound(); return node->data.second; } /** * TODO * access specified element * Returns a reference to the value that is mapped to a key equivalent to key, * performing an insertion if such key does not already exist. */ T &operator[](const Key &key) { auto node = aa_tree.find(aa_tree.root, key); if (node) return node->data.second; aa_tree.root = aa_tree.insert(aa_tree.root, value_type(key, T())); return aa_tree.find(aa_tree.root, key)->data.second; } /** * behave like at() throw index_out_of_bound if such key does not exist. */ const T &operator[](const Key &key) const { return at(key); } /** * return a iterator to the beginning */ iterator begin() { return iterator(this, aa_tree.findMin(aa_tree.root)); } const_iterator cbegin() const { return const_iterator(const_cast<map*>(this), aa_tree.findMin(aa_tree.root)); } /** * return a iterator to the end * in fact, it returns past-the-end. */ iterator end() { return iterator(this, nullptr); } const_iterator cend() const { return const_iterator(const_cast<map*>(this), nullptr); } /** * checks whether the container is empty * return true if empty, otherwise false. */ bool empty() const { return aa_tree.tree_size == 0; } /** * returns the number of elements. */ size_t size() const { return aa_tree.tree_size; } /** * clears the contents */ void clear() { aa_tree.clear(aa_tree.root); aa_tree.root = nullptr; aa_tree.tree_size = 0; } /** * insert an element. * return a pair, the first of the pair is * the iterator to the new element (or the element that prevented the insertion), * the second one is true if insert successfully, or false. */ pair<iterator, bool> insert(const value_type &value) { auto node = aa_tree.find(aa_tree.root, value.first); if (node) return {iterator(this, node), false}; aa_tree.root = aa_tree.insert(aa_tree.root, value); node = aa_tree.find(aa_tree.root, value.first); return {iterator(this, node), true}; } /** * erase the element at pos. * * throw if pos pointed to a bad element (pos == this->end() || pos points an element out of this) */ void erase(iterator pos) { if (pos == end() || pos.getContainer() != this) throw invalid_iterator(); aa_tree.root = aa_tree.erase(aa_tree.root, (*pos).first); } /** * Returns the number of elements with key * that compares equivalent to the specified argument, * which is either 1 or 0 * since this container does not allow duplicates. * The default method of check the equivalence is !(a < b || b > a) */ size_t count(const Key &key) const { return aa_tree.find(aa_tree.root, key) ? 1 : 0; } /** * Finds an element with key equivalent to key. * key value of the element to search for. * Iterator to an element with key equivalent to key. * If no such element is found, past-the-end (see end()) iterator is returned. */ iterator find(const Key &key) { return iterator(this, aa_tree.find(aa_tree.root, key)); } const_iterator find(const Key &key) const { return const_iterator(const_cast<map*>(this), aa_tree.find(aa_tree.root, key)); } }; } #endif 下面是valgrind的报错: ==9160== Invalid read of size 4 ==9160== at 0x10FDB9: check13() (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== by 0x110CC9: main (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== Address 0x6c8bcfc is 28 bytes inside a block of size 40 free'd ==9160== at 0x484BB6F: operator delete(void*, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==9160== by 0x1150A1: sjtu::AAtree<int, int, std::less<int> >::erase(sjtu::AAtree<int, int, std::less<int> >::Node*, int const&) (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== by 0x115001: sjtu::AAtree<int, int, std::less<int> >::erase(sjtu::AAtree<int, int, std::less<int> >::Node*, int const&) (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== by 0x115001: sjtu::AAtree<int, int, std::less<int> >::erase(sjtu::AAtree<int, int, std::less<int> >::Node*, int const&) (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== by 0x115001: sjtu::AAtree<int, int, std::less<int> >::erase(sjtu::AAtree<int, int, std::less<int> >::Node*, int const&) (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== by 0x115292: sjtu::AAtree<int, int, std::less<int> >::erase(sjtu::AAtree<int, int, std::less<int> >::Node*, int const&) (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== by 0x115001: sjtu::AAtree<int, int, std::less<int> >::erase(sjtu::AAtree<int, int, std::less<int> >::Node*, int const&) (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== by 0x114F98: sjtu::AAtree<int, int, std::less<int> >::erase(sjtu::AAtree<int, int, std::less<int> >::Node*, int const&) (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== by 0x115001: sjtu::AAtree<int, int, std::less<int> >::erase(sjtu::AAtree<int, int, std::less<int> >::Node*, int const&) (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== by 0x115001: sjtu::AAtree<int, int, std::less<int> >::erase(sjtu::AAtree<int, int, std::less<int> >::Node*, int const&) (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== by 0x115001: sjtu::AAtree<int, int, std::less<int> >::erase(sjtu::AAtree<int, int, std::less<int> >::Node*, int const&) (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== by 0x115001: sjtu::AAtree<int, int, std::less<int> >::erase(sjtu::AAtree<int, int, std::less<int> >::Node*, int const&) (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== Block was alloc'd at ==9160== at 0x4849013: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==9160== by 0x1147E3: sjtu::AAtree<int, int, std::less<int> >::insert(sjtu::AAtree<int, int, std::less<int> >::Node*, sjtu::pair<int const, int> const&, sjtu::AAtree<int, int, std::less<int> >::Node*) (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== by 0x114850: sjtu::AAtree<int, int, std::less<int> >::insert(sjtu::AAtree<int, int, std::less<int> >::Node*, sjtu::pair<int const, int> const&, sjtu::AAtree<int, int, std::less<int> >::Node*) (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== by 0x1148A7: sjtu::AAtree<int, int, std::less<int> >::insert(sjtu::AAtree<int, int, std::less<int> >::Node*, sjtu::pair<int const, int> const&, sjtu::AAtree<int, int, std::less<int> >::Node*) (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== by 0x1148A7: sjtu::AAtree<int, int, std::less<int> >::insert(sjtu::AAtree<int, int, std::less<int> >::Node*, sjtu::pair<int const, int> const&, sjtu::AAtree<int, int, std::less<int> >::Node*) (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== by 0x114850: sjtu::AAtree<int, int, std::less<int> >::insert(sjtu::AAtree<int, int, std::less<int> >::Node*, sjtu::pair<int const, int> const&, sjtu::AAtree<int, int, std::less<int> >::Node*) (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== by 0x1148A7: sjtu::AAtree<int, int, std::less<int> >::insert(sjtu::AAtree<int, int, std::less<int> >::Node*, sjtu::pair<int const, int> const&, sjtu::AAtree<int, int, std::less<int> >::Node*) (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== by 0x1148A7: sjtu::AAtree<int, int, std::less<int> >::insert(sjtu::AAtree<int, int, std::less<int> >::Node*, sjtu::pair<int const, int> const&, sjtu::AAtree<int, int, std::less<int> >::Node*) (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== by 0x1148A7: sjtu::AAtree<int, int, std::less<int> >::insert(sjtu::AAtree<int, int, std::less<int> >::Node*, sjtu::pair<int const, int> const&, sjtu::AAtree<int, int, std::less<int> >::Node*) (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== by 0x1148A7: sjtu::AAtree<int, int, std::less<int> >::insert(sjtu::AAtree<int, int, std::less<int> >::Node*, sjtu::pair<int const, int> const&, sjtu::AAtree<int, int, std::less<int> >::Node*) (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== by 0x1148A7: sjtu::AAtree<int, int, std::less<int> >::insert(sjtu::AAtree<int, int, std::less<int> >::Node*, sjtu::pair<int const, int> const&, sjtu::AAtree<int, int, std::less<int> >::Node*) (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== by 0x1148A7: sjtu::AAtree<int, int, std::less<int> >::insert(sjtu::AAtree<int, int, std::less<int> >::Node*, sjtu::pair<int const, int> const&, sjtu::AAtree<int, int, std::less<int> >::Node*) (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== Test 13 Passed! Test 14 Passed! ==9160== ==9160== HEAP SUMMARY: ==9160== in use at exit: 0 bytes in 0 blocks ==9160== total heap usage: 325,886 allocs, 325,886 frees, 13,111,520 bytes allocated ==9160== ==9160== All heap blocks were freed -- no leaks are possible ==9160== ==9160== ERROR SUMMARY: 4308 errors from 1 contexts (suppressed: 0 from 0) ==9160== ==9160== 4308 errors in context 1 of 1: ==9160== Invalid read of size 4 ==9160== at 0x10FDB9: check13() (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== by 0x110CC9: main (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== Address 0x6c8bcfc is 28 bytes inside a block of size 40 free'd ==9160== at 0x484BB6F: operator delete(void*, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==9160== by 0x1150A1: sjtu::AAtree<int, int, std::less<int> >::erase(sjtu::AAtree<int, int, std::less<int> >::Node*, int const&) (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== by 0x115001: sjtu::AAtree<int, int, std::less<int> >::erase(sjtu::AAtree<int, int, std::less<int> >::Node*, int const&) (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) ==9160== by 0x115001: sjtu::AAtree<int, int, std::less<int> >::erase(sjtu::AAtree<int, int, std::less<int> >::Node*, int const&) (in /root/code/STLite/STLite-ACM-2025/map/build/map_three_men) map_three_men: bool check13(){ // erase(it--) sjtu::map<int, int> Q; std::map<int, int> stdQ; int num[30001]; num[0] = 0; for(int i = 1; i <= 30000; i++) num[i] = num[i - 1] + rand() % 325 + 1; for(int i = 1; i <= 60000; i++) swap(num[rand() % 30000 + 1], num[rand() % 30000 + 1]); for(int i = 1; i <= 30000; i++){ int t = rand(); stdQ[num[i]] = t; Q[num[i]] = t; } // cout << "Stage 1" << endl; sjtu::map<int, int>::iterator it; std::map<int, int>::iterator stdit; for(int i = 1; i <= 60000; i++) swap(num[rand() % 30000 + 1], num[rand() % 30000 + 1]); for(int i = 1; i <= 10325; i++){ it = Q.find(num[i]); if(it != Q.begin()) { Q.erase(it--); // cout << "Erase it" << endl; } stdit = stdQ.find(num[i]); if(stdit != stdQ.begin()) { stdQ.erase(stdit--); // cout << "Erase it" << endl; } // cout << "i = " << i << " it, std = " << (it)->first << " " << stdit->first << endl; if(it -> first != stdit -> first)return 0; } // cout << "Stage 2" << endl; if(Q.size() != stdQ.size()) return 0; it = Q.begin(); // cout << "Stage 3" << endl; for(stdit = stdQ.begin(); stdit != stdQ.end(); stdit++){ if(stdit -> first != it -> first) return 0; if(stdit -> second != (*it).second) return 0; it++; } stdit = --stdQ.end(); for(it = --Q.end(); it != Q.begin(); it--){ if(stdit -> first != it -> first) return 0; if(stdit -> second != (*it).second) return 0; stdit--; } return 1; }
05-28
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"> <title>黑马点评</title> <!-- 引入样式 --> <link rel="stylesheet" href="./css/element.css"> <link href="./css/blog-detail.css" rel="stylesheet"> <link href="./css/main.css" rel="stylesheet"> <style type="text/tailwindcss"> @layer utilities { .content-auto { content-visibility: auto; } .comment-input { @apply w-full min-h-[120px] border border-gray-300 text-lg leading-relaxed resize-none outline-none bg-white mb-3 px-4 py-3 rounded-lg transition-all duration-300; } .comment-input:focus { @apply border-primary ring-1 ring-primary/20; } .comment-input::placeholder { @apply text-gray-400; } .comment-box { @apply flex p-4 border-b border-gray-100; } .comment-icon { @apply w-10 h-10 rounded-full overflow-hidden mr-3 flex-shrink-0; } .comment-icon img { @apply w-full h-full object-cover; } .comment-user { @apply font-medium text-gray-800; } .comment-info { @apply flex-1; } .send-btn { @apply bg-primary hover:bg-primary/90 text-white px-6 py-2 rounded-full transition-all duration-300 disabled:opacity-50 disabled:cursor-not-allowed; } } </style> <style> .header { position: relative; } .foot-view span { font-size: 12px; } .liked { color: #ff6633; } /* 评论输入框样式 */ .comment-container { position: fixed; bottom: 0; left: 0; right: 0; height: 0; background-color: white; z-index: 150; display: flex; flex-direction: column; box-shadow: -2px -2px 10px rgba(0,0,0,0.05); transition: height 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); } .comment-container.active { height: 60%; /* 增加评论容器高度 */ } .comment-header { height: 56px; padding: 0 16px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #E5E7EB; } .comment-header .cancel-btn { color: #6B7280; font-size: 16px; background: none; border: none; cursor: pointer; } .comment-header .send-btn { color: white; background-color: #FF7A00; border: 1px solid #FF7A00; /* 橙色边框 */ padding: 8px 16px; border-radius: 20px; font-size: 14px; font-weight: 500; transition: background-color 0.2s; } .comment-header .send-btn:hover { background-color: #FF6600; border-color: #FF6600; /* 悬停时边框颜色加深 */ } .comment-content { padding: 16px; display: flex; flex-direction: column; height: 100%; } /* 新增样式 */ .loading { display: flex; justify-content: center; align-items: center; height: 40px; color: #9CA3AF; } .empty-comment { text-align: center; padding: 20px 0; color: #9CA3AF; font-size: 14px; } .load-more { display: flex; justify-content: center; align-items: center; padding: 15px 0; color: #6B7280; font-size: 14px; cursor: pointer; } </style> </head> <body> <div id="app"> <div class="header"> <div class="header-back-btn" @click="goBack"><i class="el-icon-arrow-left"></i></div> <div class="header-title"></div> <div class="header-share">...</div> </div> <div style="height: 85%; overflow-y: scroll; overflow-x: hidden"> <div class="blog-info-box" ref="swiper" @touchstart="moveStart" @touchmove="moving" @touchend="moveEnd"> <div class="swiper-item" v-for="(img, i) in blog.images" :key="i"> <img :src="img" alt="" style="width: 100%" height="100%"> </div> </div> <div class="basic"> <div class="basic-icon" @click="toOtherInfo"> <img :src="blog.icon || '/imgs/icons/default-icon.png'" alt="用户头像"> </div> <div class="basic-info"> <div class="name">{{blog.name}}</div> <span class="time">{{formatTime(new Date(blog.createTime))}}</span> </div> <div style="width: 20%"> <div class="logout-btn" @click="follow" v-show="!user || user.id !== blog.userId "> {{followed ? '取消关注' : '关注'}} </div> </div> </div> <div class="blog-text" v-html="blog.content"> </div> <div class="shop-basic"> <div class="shop-icon"> <img :src="shop.image" alt="店铺图片"> </div> <div style="width: 80%"> <div class="name">{{shop.name}}</div> <div> <el-rate v-model="shop.score/10"> </el-rate> </div> <div class="shop-avg">¥{{shop.avgPrice}}/人</div> </div> </div> <div class="zan-box"> <div> <svg t="1646634642977" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2187" width="20" height="20"> <path d="M160 944c0 8.8-7.2 16-16 16h-32c-26.5 0-48-21.5-48-48V528c0-26.5 21.5-48 48-48h32c8.8 0 16 7.2 16 16v448zM96 416c-53 0-96 43-96 96v416c0 53 43 96 96 96h96c17.7 0 32-14.3 32-32V448c0-17.7-14.3-32-32-32H96zM505.6 64c16.2 0 26.4 8.7 31 13.9 4.6 5.2 12.1 16.3 10.3 32.4l-23.5 203.4c-4.9 42.2 8.6 84.6 36.8 116.4 28.3 31.7 68.9 49.9 111.4 49.9h271.2c6.6 0 10.8 3.3 13.2 6.1s5 7.5 4 14l-48 303.4c-6.9 43.6-29.1 83.4-62.7 112C815.8 944.2 773 960 728.9 960h-317c-33.1 0-59.9-26.8-59.9-59.9v-455c0-6.1 1.7-12 5-17.1 69.5-109 106.4-234.2 107-364h41.6z m0-64h-44.9C427.2 0 400 27.2 400 60.7c0 127.1-39.1 251.2-112 355.3v484.1c0 68.4 55.5 123.9 123.9 123.9h317c122.7 0 227.2-89.3 246.3-210.5l47.9-303.4c7.8-49.4-30.4-94.1-80.4-94.1H671.6c-50.9 0-90.5-44.4-84.6-95l23.5-203.4C617.7 55 568.7 0 505.6 0z" p-id="2188" :fill="blog.isLike ? '#ff6633' : '#82848a'"></path> </svg> </div> <div class="zan-list"> <div class="user-icon-mini" v-for="u in likes" :key="u.id"> <img :src="u.icon || '/imgs/icons/default-icon.png'" alt="点赞用户头像"> </div> <div style="margin-left:10px;text-align: center;line-height: 24px;">{{blog.liked}}人点赞</div> </div> </div> <div class="blog-divider"></div> <div class="blog-comments"> <div class="comments-head"> <div>网友评价 <span>{{totalComments}}条</span></div> <div @click="loadMoreComments" v-if="hasMore && !isLoading"> <i class="el-icon-arrow-right"></i> </div> <div v-else-if="isLoading"> <i class="el-icon-loading is-spinning"></i> 加载中... </div> <div v-else>没有更多评论了</div> </div> <!-- 加载状态 --> <div v-if="isLoading && comments.length === 0" class="loading"> <i class="el-icon-loading is-spinning"></i> <span>加载评论中...</span> </div> <!-- 空评论状态 --> <div v-else-if="comments.length === 0 && !isLoading" class="empty-comment"> 暂无评论,快来发表第一条评论吧 </div> <!-- 评论列表 --> <div class="comment-list" v-else> <div class="comment-box" v-for="comment in comments" :key="comment.id"> <div class="comment-icon"> <img :src="comment.icon || '/imgs/icons/default-icon.png'" alt="评论用户头像"> </div> <div class="comment-info"> <div class="comment-user"> {{comment.name}} <span v-if="comment.level">Lv{{comment.level}}</span> </div> <div style="padding: 5px 0; font-size: 14px"> {{comment.content}} </div> <div style="display: flex; justify-content: space-between; align-items: center; margin-top: 5px; color: #999;"> <div>{{formatCommentTime(comment.createTime)}}</div> </div> </div> </div> <!-- 加载更多按钮 --> <div v-if="hasMore && !isLoading" class="load-more" @click="loadMoreComments"> 查看更多评论 <i class="el-icon-arrow-down"></i> </div> </div> </div> <div class="blog-divider"></div> </div> <div class="foot"> <div class="foot-box"> <div class="foot-view" @click="addLike()"> <svg t="1646634642977" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2187" width="26" height="26"> <path d="M160 944c0 8.8-7.2 16-16 16h-32c-26.5 0-48-21.5-48-48V528c0-26.5 21.5-48 48-48h32c8.8 0 16 7.2 16 16v448zM96 416c-53 0-96 43-96 96v416c0 53 43 96 96 96h96c17.7 0 32-14.3 32-32V448c0-17.7-14.3-32-32-32H96zM505.6 64c16.2 0 26.4 8.7 31 13.9 4.6 5.2 12.1 16.3 10.3 32.4l-23.5 203.4c-4.9 42.2 8.6 84.6 36.8 116.4 28.3 31.7 68.9 49.9 111.4 49.9h271.2c6.6 0 10.8 3.3 13.2 6.1s5 7.5 4 14l-48 303.4c-6.9 43.6-29.1 83.4-62.7 112C815.8 944.2 773 960 728.9 960h-317c-33.1 0-59.9-26.8-59.9-59.9v-455c0-6.1 1.7-12 5-17.1 69.5-109 106.4-234.2 107-364h41.6z m0-64h-44.9C427.2 0 400 27.2 400 60.7c0 127.1-39.1 251.2-112 355.3v484.1c0 68.4 55.5 123.9 123.9 123.9h317c122.7 0 227.2-89.3 246.3-210.5l47.9-303.4c7.8-49.4-30.4-94.1-80.4-94.1H671.6c-50.9 0-90.5-44.4-84.6-95l23.5-203.4C617.7 55 568.7 0 505.6 0z" p-id="2188" :fill="blog.isLike ? '#ff6633' : '#82848a'"></path> </svg> <span :class="{liked: blog.isLike}">{{blog.liked}}</span> </div> </div> <div style="width: 40%"> </div> <div class="foot-box"> <div class="foot-view" @click="showCommentBox"> <i class="el-icon-chat-square"></i> </div> </div> </div> <!-- 评论输入框 --> <div class="comment-container" ref="commentContainer"> <div class="comment-header"> <button class="cancel-btn" @click="hideCommentBox">取消</button> <h3>评论</h3> <button class="send-btn" @click="sendComment" :disabled="!commentText.trim()">发送</button> </div> <div class="comment-content"> <textarea class="comment-input" v-model="commentText" placeholder="输入评论内容..." ref="commentInput"></textarea> </div> </div> </div> <script src="./js/vue.js"></script> <script src="./js/axios.min.js"></script> <!-- 引入组件库 --> <script src="./js/element.js"></script> <script src="./js/common.js"></script> <script> let each = function (ary, callback) { for (let i = 0, l = ary.length; i < l; i++) { if (callback(ary[i], i) === false) break } } const app = new Vue({ el: "#app", data: { util, blog: {}, shop: {}, likes: [], user: {}, // 登录用户 followed: false, // 是否关注了 _width: 0, duration: 300, container: null, items: [], active: 0, start: { x: 0, y: 0 }, move: { x: 0, y: 0 }, sensitivity: 60, resistance: 0.3, commentText: '', // 评论内容 commentContainer: null, // 评论相关数据 comments: [], // 当前页评论列表 totalComments: 0, // 评论总数 currentPage: 1, // 当前页码 pageSize: 10, // 每页大小 hasMore: false, // 是否有更多数据 isLoading: false, // 是否正在加载 }, created() { let id = util.getUrlParam("id"); this.queryBlogById(id); this.fetchComments(id); }, mounted() { this.commentContainer = this.$refs.commentContainer; }, methods: { init() { // 获得父容器节点 this.container = this.$refs.swiper // 获得所有的子节点 this.items = this.container.querySelectorAll('.swiper-item') this.updateItemWidth() this.setTransform() this.setTransition('none') }, goBack() { history.back(); }, toOtherInfo(){ if(this.blog.userId === this.user.id){ location.href = "/info.html" }else{ location.href = "/other-info.html?id=" + this.blog.userId } }, queryBlogById(id) { axios.get("/blog/" + id) .then(({data}) => { data.images = data.images.split(",") this.blog = data; this.$nextTick(this.init); this.queryShopById(data.shopId) this.queryLikeList(id); this.queryLoginUser(); }) .catch(this.$message.error) }, queryShopById(shopId) { axios.get("/shop/" + shopId) .then(({data}) => { data.image = data.images.split(",")[0] this.shop = data }) .catch(this.$message.error) }, queryLikeList(id){ axios.get("/blog/likes/" + id) .then(({data}) => this.likes = data) .catch(this.$message.error) }, addLike(){ axios.put("/blog/like/" +this.blog.id) .then(({data}) => { axios.get("/blog/" + this.blog.id) .then(({data}) => { data.images = data.images.split(",") this.blog = data; this.queryLikeList(this.blog.id); }) .catch(this.$message.error) }) .catch(err => { this.$message.error(err) }) }, isFollowed(){ axios.get("/follow/or/not/" + this.blog.userId) .then(({data}) => this.followed = data) .catch(this.$message.error) }, follow(){ axios.put("/follow/" + this.blog.userId + "/" + !this.followed) .then(() => { this.$message.success(this.followed ? "已取消关注" : "已关注") this.followed = !this.followed }) .catch(this.$message.error) }, formatTime(b) { return b.getFullYear() + "年" + (b.getMonth() + 1) + "月" + b.getDate() + "日 "; }, formatMinutes(m) { if (m < 10) m = "0" + m return m; }, queryLoginUser(){ // 查询用户信息 axios.get("/user/me") .then(({ data }) => { // 保存用户 this.user = data; if(this.user.id !== this.blog.userId){ this.isFollowed(); } }) .catch(console.log) }, // 轮播图相关方法 updateItemWidth() { this._width = this.container.offsetWidth || document.documentElement.offsetWidth }, setTransform(offset) { offset = offset || 0 each(this.items, (item, i) => { let distance = (i - this.active) * this._width + offset let transform = `translate3d(${distance}px, 0, 0)` item.style.webkitTransform = transform item.style.transform = transform }) }, setTransition(duration) { duration = duration || this.duration duration = typeof duration === 'number' ? (duration + 'ms') : duration each(this.items, (item) => { item.style.webkitTransition = duration item.style.transition = duration }) }, moveStart(e) { this.start.x = e.changedTouches[0].pageX this.start.y = e.changedTouches[0].pageY this.setTransition('none') }, moving(e) { e.preventDefault() e.stopPropagation() let distanceX = e.changedTouches[0].pageX - this.start.x let distanceY = e.changedTouches[0].pageY - this.start.y if (Math.abs(distanceX) > Math.abs(distanceY)) { this.isMoving = true this.move.x = this.start.x + distanceX this.move.y = this.start.y + distanceY if ((this.active === 0 && distanceX > 0) || (this.active === (this.items.length - 1) && distanceX < 0)) { distanceX = distanceX * this.resistance } this.setTransform(distanceX) } }, moveEnd(e) { if (this.isMoving) { e.preventDefault() e.stopPropagation() let distance = this.move.x - this.start.x if (Math.abs(distance) > this.sensitivity) { if (distance < 0) { this.next() } else { this.prev() } } else { this.back() } this.reset() this.isMoving = false; } }, next() { let index = this.active + 1 this.go(index) }, prev() { let index = this.active - 1 this.go(index) }, reset() { this.start.x = 0 this.start.y = 0 this.move.x = 0 this.move.y = 0 }, back() { this.setTransition() this.setTransform() }, destroy() { this.setTransition('none') }, go(index) { this.active = index if (this.active < 0) { this.active = 0 } else if (this.active > this.items.length - 1) { this.active = this.items.length - 1 } this.$emit('change', this.active) this.setTransition() this.setTransform() }, // 评论相关方法 showCommentBox() { if (!this.user.id) { this.$message.warning("请先登录"); return; } this.commentContainer.classList.add('active'); setTimeout(() => { this.$refs.commentInput.focus(); }, 300); }, hideCommentBox() { this.commentContainer.classList.remove('active'); this.commentText = ''; }, sendComment() { const content = this.commentText.trim(); if (content) { // 使用FormData格式,与后端接口参数匹配 const formData = new FormData(); formData.append('comment', content); formData.append('blogId', this.blog.id); axios.post("/blog-comments", formData) .then(() => { this.$message.success("评论发送成功"); this.hideCommentBox(); this.commentText = ''; // 刷新第一页评论 this.fetchComments(this.blog.id, 1); }) .catch(err => { this.$message.error("评论发送失败: " + err.response?.data?.message || err.message); console.error(err); }); } else { this.$message.warning("请输入评论内容"); } }, // 获取评论列表 - 适配后端分页接口 fetchComments(blogId, page = 1) { // 如果是加载第一页,清空现有评论 if (page === 1) { this.comments = []; } this.isLoading = true; axios.get(`/blog-comments/${blogId}`, { params: { page: page, size: this.pageSize } }) .then((response) => { // 确保响应数据存在 if (!response.data) { this.$message.warning("评论数据为空"); this.hasMore = false; this.isLoading = false; return; } const pageResult = response.data; // 验证必要字段存在 if (pageResult.records === undefined || pageResult.totalRecords === undefined) { this.$message.warning("评论数据格式异常,缺少必要字段"); this.hasMore = false; this.isLoading = false; return; } // 更新评论列表 if (page === 1) { this.comments = pageResult.records || []; } else { this.comments = [...this.comments, ...(pageResult.records || [])]; } // 更新分页信息 this.totalComments = pageResult.totalRecords || 0; this.currentPage = pageResult.currentPage || page; this.pageSize = pageResult.pageSize || this.pageSize; // 判断是否还有更多数据 this.hasMore = this.comments.length < this.totalComments; }) .catch(err => { this.$message.error('评论加载失败: ' + err.response?.data?.message || '网络错误'); console.error(err); }) .finally(() => { this.isLoading = false; }); }, // 加载更多评论 loadMoreComments() { if (!this.isLoading && this.hasMore) { this.fetchComments(this.blog.id, this.currentPage + 1); } }, // 格式化评论时间(最终修复版) formatCommentTime(timestamp) { if (!timestamp) return ''; // 尝试将时间戳转换为数字 let timeValue; // 处理字符串类型的时间戳 if (typeof timestamp === 'string') { // 移除所有非数字字符 const cleanTimestamp = timestamp.replace(/[^\d]/g, ''); // 如果清理后为空字符串,尝试其他解析方法 if (!cleanTimestamp) { // 尝试直接解析原始字符串 try { timeValue = Number(timestamp); } catch (e) { console.error('Failed to parse timestamp:', timestamp); return '未知时间'; } } else { timeValue = Number(cleanTimestamp); } } else if (typeof timestamp === 'number') { timeValue = timestamp; } else { console.error('Unsupported timestamp type:', typeof timestamp); return '未知时间'; } // 验证转换后的时间戳是否为有效数字 if (isNaN(timeValue)) { console.error('Invalid timestamp value:', timestamp); return '未知时间'; } // 处理零或负时间戳 if (timeValue <= 0) { return '未知时间'; } // 根据时间戳范围智能判断(优化处理超长时间戳) let commentDate; // 特殊处理:如果时间戳大于当前时间的2倍,可能是前端时间戳生成问题 const currentTime = Date.now(); if (timeValue > currentTime * 2) { // 尝试将超长时间戳除以10的幂,直到合理范围 let adjustedTimestamp = timeValue; while (adjustedTimestamp > currentTime * 2 && adjustedTimestamp > 1e15) { adjustedTimestamp = Math.floor(adjustedTimestamp / 10); } // 使用调整后的时间戳 commentDate = new Date(adjustedTimestamp); } else { // 默认作为毫秒级时间戳处理 commentDate = new Date(timeValue); } // 验证日期有效性 if (isNaN(commentDate.getTime())) { console.error('Invalid date from timestamp:', timestamp); return '未知时间'; } // 计算与当前时间的差(毫秒) const now = new Date(); const diffMs = now - commentDate; // 处理未来时间(diffMs为负数) if (diffMs < 0) { // 未来时间显示完整日期 return commentDate.toISOString().slice(0, 10); } // 计算差(分钟、小时、天) const diffMinutes = Math.floor(diffMs / 60000); const diffHours = Math.floor(diffMs / 3600000); const diffDays = Math.floor(diffMs / 86400000); // 相对时间显示 if (diffMinutes < 1) return '刚刚'; if (diffMinutes < 60) return `${diffMinutes}分钟前`; if (diffHours < 24) return `${diffHours}小时前`; if (diffDays < 7) return `${diffDays}天前`; // 超过7天,显示完整日期 return commentDate.toISOString().slice(0, 10); } } }) </script> </body> </html>时间显示错了,传进来的"createTime": 1749989266662,后端System.currentTimeMillis()产生的,时间显示错了
06-16
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值